From 62210e913df0abb3156c0327b71461c41236da96 Mon Sep 17 00:00:00 2001 From: Mehdi BHA Date: Wed, 16 Oct 2024 22:25:28 +0100 Subject: [PATCH] chore: run codemod --- package.json | 8 +- pnpm-lock.yaml | 3006 ++++---- www/package.json | 12 +- www/scripts/build-demos.ts | 136 +- www/scripts/build-registry-demos.ts | 128 +- www/scripts/build-registry.ts | 720 +- www/src/__demos__/index.tsx | 6588 ++++++++--------- www/src/__demos__/registry.ts | 966 +-- www/src/__icons__/create-icon.tsx | 32 +- www/src/__icons__/index.tsx | 460 +- www/src/app/docs/[...slug]/page.tsx | 228 +- www/src/app/layout.tsx | 198 +- www/src/app/manifest.ts | 44 +- www/src/app/page.tsx | 168 +- www/src/app/providers.tsx | 52 +- www/src/app/robots.ts | 32 +- www/src/app/sitemap.ts | 48 +- www/src/app/source.tsx | 32 +- www/src/components/code-block/client.tsx | 362 +- www/src/components/code-block/code-block.tsx | 140 +- www/src/components/code-block/index.ts | 8 +- www/src/components/code/code-client.tsx | 132 +- www/src/components/code/code.tsx | 226 +- www/src/components/code/index.tsx | 2 +- www/src/components/docs-pager.tsx | 74 +- www/src/components/footer.tsx | 308 +- www/src/components/icons/discord-icon.tsx | 48 +- www/src/components/icons/github-icon.tsx | 48 +- www/src/components/icons/index.ts | 6 +- www/src/components/icons/twitter-icon.tsx | 48 +- .../mdx/component-preview-client.tsx | 32 +- www/src/components/mdx/component-preview.tsx | 202 +- www/src/components/mdx/component-source.tsx | 84 +- www/src/components/mdx/mdx-components.tsx | 388 +- www/src/components/theme-toggle.tsx | 76 +- www/src/components/toc.tsx | 136 +- www/src/config/docs-config.tsx | 568 +- www/src/config/index.ts | 2 +- www/src/config/site-config.tsx | 72 +- www/src/hooks/use-config.ts | 72 +- www/src/hooks/use-focus-command-menu.ts | 44 +- www/src/hooks/use-palette.ts | 232 +- www/src/hooks/use-toc-thumb.ts | 112 +- www/src/lib/build-color-scales.ts | 312 +- www/src/lib/colors.ts | 346 +- www/src/lib/get-component-source.ts | 68 +- www/src/lib/get-file-source.ts | 28 +- www/src/lib/github-stargazers.ts | 50 +- www/src/lib/string.ts | 90 +- www/src/lib/theme.ts | 482 +- www/src/registry/blocks.ts | 6 +- www/src/registry/core.ts | 1342 ++-- www/src/registry/hooks.ts | 18 +- www/src/registry/hooks/use-battery.ts | 152 +- www/src/registry/hooks/use-counter.ts | 170 +- www/src/registry/hooks/use-debounce.ts | 34 +- www/src/registry/hooks/use-in-view.ts | 6 +- .../hooks/use-intersection-observer.ts | 72 +- www/src/registry/hooks/use-is-client.ts | 22 +- www/src/registry/hooks/use-list.ts | 76 +- www/src/registry/hooks/use-local-storage.ts | 146 +- www/src/registry/hooks/use-media-query.ts | 86 +- www/src/registry/hooks/use-mounted.ts | 22 +- www/src/registry/hooks/use-mouse.ts | 126 +- www/src/registry/hooks/use-network-state.ts | 168 +- www/src/registry/hooks/use-orientation.ts | 92 +- www/src/registry/hooks/use-previous.ts | 26 +- www/src/registry/hooks/use-scrolled.ts | 54 +- www/src/registry/hooks/use-window-size.ts | 58 +- www/src/registry/icons.ts | 414 +- www/src/registry/index.ts | 14 +- www/src/registry/styles.ts | 40 +- www/src/registry/themes.ts | 8 +- www/src/registry/themes/default.ts | 80 +- www/src/registry/ui-lib.ts | 52 +- .../registry/ui/default/core/alert/alert.tsx | 212 +- .../ui/default/core/alert/demos/action.tsx | 32 +- .../default/core/alert/demos/composition.tsx | 48 +- .../ui/default/core/alert/demos/content.tsx | 18 +- .../default/core/alert/demos/custom-icon.tsx | 12 +- .../ui/default/core/alert/demos/default.tsx | 10 +- .../ui/default/core/alert/demos/title.tsx | 14 +- .../ui/default/core/alert/demos/variants.tsx | 70 +- .../registry/ui/default/core/alert/index.tsx | 2 +- .../core/aspect-ratio/aspect-ratio.tsx | 14 +- .../core/aspect-ratio/demos/as-child.tsx | 30 +- .../core/aspect-ratio/demos/default.tsx | 30 +- .../ui/default/core/aspect-ratio/index.tsx | 2 +- .../ui/default/core/avatar/avatar.tsx | 346 +- .../default/core/avatar/demos/composition.tsx | 40 +- .../ui/default/core/avatar/demos/default.tsx | 22 +- .../ui/default/core/avatar/demos/shape.tsx | 40 +- .../ui/default/core/avatar/demos/sizes.tsx | 34 +- .../registry/ui/default/core/avatar/index.tsx | 2 +- .../registry/ui/default/core/badge/badge.tsx | 126 +- .../ui/default/core/badge/demos/default.tsx | 10 +- .../ui/default/core/badge/demos/icon.tsx | 36 +- .../ui/default/core/badge/demos/sizes.tsx | 34 +- .../ui/default/core/badge/demos/variants.tsx | 74 +- .../registry/ui/default/core/badge/index.tsx | 2 +- .../default/core/breadcrumbs/breadcrumbs.tsx | 156 +- .../default/core/breadcrumbs/demos/basic.tsx | 28 +- .../core/breadcrumbs/demos/composition.tsx | 50 +- .../core/breadcrumbs/demos/disabled.tsx | 28 +- .../default/core/breadcrumbs/demos/icon.tsx | 36 +- .../breadcrumbs/demos/router-integration.tsx | 48 +- .../ui/default/core/breadcrumbs/index.tsx | 2 +- .../ui/default/core/button/button.tsx | 282 +- .../ui/default/core/button/demos/default.tsx | 10 +- .../ui/default/core/button/demos/disabled.tsx | 10 +- .../default/core/button/demos/link-button.tsx | 20 +- .../ui/default/core/button/demos/loading.tsx | 34 +- .../core/button/demos/prefix-and-suffix.tsx | 22 +- .../ui/default/core/button/demos/shapes.tsx | 54 +- .../ui/default/core/button/demos/sizes.tsx | 22 +- .../ui/default/core/button/demos/variants.tsx | 48 +- .../registry/ui/default/core/button/index.tsx | 2 +- .../ui/default/core/calendar/calendar.tsx | 446 +- .../core/calendar/demos/composition.tsx | 76 +- .../core/calendar/demos/controlled.tsx | 46 +- .../default/core/calendar/demos/default.tsx | 10 +- .../default/core/calendar/demos/disabled.tsx | 10 +- .../core/calendar/demos/error-message.tsx | 40 +- .../ui/default/core/calendar/demos/label.tsx | 10 +- .../core/calendar/demos/page-behaviour.tsx | 10 +- .../default/core/calendar/demos/read-only.tsx | 28 +- .../core/calendar/demos/uncontrolled.tsx | 28 +- .../core/calendar/demos/unvailable-dates.tsx | 70 +- .../core/calendar/demos/validation.tsx | 26 +- .../core/calendar/demos/visible-months.tsx | 10 +- .../ui/default/core/calendar/index.tsx | 2 +- .../core/checkbox-group/checkbox-group.tsx | 184 +- .../core/checkbox-group/demos/cards.tsx | 32 +- .../core/checkbox-group/demos/composition.tsx | 44 +- .../checkbox-group/demos/contextual-help.tsx | 44 +- .../core/checkbox-group/demos/controlled.tsx | 54 +- .../core/checkbox-group/demos/default.tsx | 24 +- .../core/checkbox-group/demos/description.tsx | 32 +- .../core/checkbox-group/demos/disabled.tsx | 32 +- .../checkbox-group/demos/error-message.tsx | 32 +- .../core/checkbox-group/demos/label.tsx | 34 +- .../core/checkbox-group/demos/read-only.tsx | 32 +- .../core/checkbox-group/demos/required.tsx | 68 +- .../checkbox-group/demos/uncontrolled.tsx | 24 +- .../ui/default/core/checkbox-group/index.tsx | 2 +- .../ui/default/core/checkbox/checkbox.tsx | 170 +- .../ui/default/core/checkbox/demos/card.tsx | 14 +- .../core/checkbox/demos/controlled.tsx | 36 +- .../default/core/checkbox/demos/default.tsx | 30 +- .../default/core/checkbox/demos/disabled.tsx | 14 +- .../core/checkbox/demos/indeterminate.tsx | 14 +- .../default/core/checkbox/demos/read-only.tsx | 18 +- .../core/checkbox/demos/uncontrolled.tsx | 10 +- .../ui/default/core/checkbox/index.tsx | 2 +- .../default/core/collapsible/collapsible.tsx | 64 +- .../ui/default/core/collapsible/index.tsx | 2 +- .../ui/default/core/color-area/color-area.tsx | 80 +- .../core/color-area/demos/channels.tsx | 10 +- .../core/color-area/demos/composition.tsx | 20 +- .../core/color-area/demos/controlled.tsx | 44 +- .../default/core/color-area/demos/default.tsx | 10 +- .../core/color-area/demos/disabled.tsx | 10 +- .../core/color-area/demos/uncontrolled.tsx | 10 +- .../ui/default/core/color-area/index.ts | 2 +- .../default/core/color-field/color-field.tsx | 186 +- .../core/color-field/demos/composition.tsx | 46 +- .../color-field/demos/contextual-help.tsx | 36 +- .../core/color-field/demos/controlled.tsx | 34 +- .../core/color-field/demos/default.tsx | 16 +- .../core/color-field/demos/description.tsx | 16 +- .../core/color-field/demos/disabled.tsx | 16 +- .../core/color-field/demos/error-message.tsx | 28 +- .../default/core/color-field/demos/form.tsx | 16 +- .../default/core/color-field/demos/label.tsx | 20 +- .../core/color-field/demos/loading.tsx | 22 +- .../color-field/demos/prefix-and-suffix.tsx | 22 +- .../core/color-field/demos/read-only.tsx | 12 +- .../core/color-field/demos/required.tsx | 30 +- .../default/core/color-field/demos/sizes.tsx | 22 +- .../core/color-field/demos/uncontrolled.tsx | 12 +- .../ui/default/core/color-field/index.ts | 2 +- .../core/color-picker/color-picker.tsx | 230 +- .../core/color-picker/demos/composition.tsx | 44 +- .../core/color-picker/demos/controlled.tsx | 22 +- .../core/color-picker/demos/default.tsx | 10 +- .../core/color-picker/demos/options.tsx | 18 +- .../core/color-picker/demos/uncontrolled.tsx | 10 +- .../ui/default/core/color-picker/index.ts | 2 +- .../core/color-slider/color-slider.tsx | 226 +- .../core/color-slider/demos/channel.tsx | 10 +- .../core/color-slider/demos/composition.tsx | 42 +- .../core/color-slider/demos/controlled.tsx | 30 +- .../core/color-slider/demos/default.tsx | 10 +- .../core/color-slider/demos/disabled.tsx | 24 +- .../default/core/color-slider/demos/label.tsx | 14 +- .../core/color-slider/demos/uncontrolled.tsx | 10 +- .../core/color-slider/demos/vertical.tsx | 22 +- .../ui/default/core/color-slider/index.ts | 2 +- .../core/color-swatch/color-swatch.tsx | 46 +- .../core/color-swatch/demos/default.tsx | 10 +- .../ui/default/core/color-swatch/index.ts | 2 +- .../default/core/color-thumb/color-thumb.tsx | 56 +- .../ui/default/core/color-thumb/index.ts | 2 +- .../ui/default/core/combobox/combobox.tsx | 178 +- .../core/combobox/demos/async-loading.tsx | 54 +- .../ui/default/core/combobox/demos/basic.tsx | 34 +- .../core/combobox/demos/composition.tsx | 62 +- .../core/combobox/demos/contextual-help.tsx | 52 +- .../core/combobox/demos/controlled.tsx | 72 +- .../core/combobox/demos/custom-value.tsx | 34 +- .../core/combobox/demos/description.tsx | 34 +- .../default/core/combobox/demos/disabled.tsx | 32 +- .../ui/default/core/combobox/demos/label.tsx | 34 +- .../default/core/combobox/demos/loading.tsx | 32 +- .../default/core/combobox/demos/required.tsx | 34 +- .../default/core/combobox/demos/sections.tsx | 62 +- .../core/combobox/demos/uncontrolled.tsx | 34 +- .../core/combobox/demos/validation.tsx | 42 +- .../ui/default/core/combobox/index.ts | 2 +- .../ui/default/core/command/command.tsx | 334 +- .../registry/ui/default/core/command/index.ts | 2 +- .../core/contextual-help/contextual-help.tsx | 78 +- .../ui/default/core/contextual-help/index.ts | 2 +- .../ui/default/core/date-field/date-field.tsx | 192 +- .../core/date-field/demos/composition.tsx | 38 +- .../core/date-field/demos/contextual-help.tsx | 40 +- .../core/date-field/demos/controlled.tsx | 30 +- .../default/core/date-field/demos/default.tsx | 10 +- .../core/date-field/demos/description.tsx | 16 +- .../core/date-field/demos/disabled.tsx | 10 +- .../core/date-field/demos/error-message.tsx | 28 +- .../core/date-field/demos/granularity.tsx | 52 +- .../core/date-field/demos/hide-time-zone.tsx | 30 +- .../core/date-field/demos/hour-cycle.tsx | 26 +- .../default/core/date-field/demos/label.tsx | 20 +- .../default/core/date-field/demos/loading.tsx | 26 +- .../core/date-field/demos/placeholder.tsx | 26 +- .../date-field/demos/prefix-and-suffix.tsx | 22 +- .../core/date-field/demos/read-only.tsx | 30 +- .../core/date-field/demos/required.tsx | 30 +- .../default/core/date-field/demos/sizes.tsx | 22 +- .../core/date-field/demos/time-zones.tsx | 20 +- .../core/date-field/demos/uncontrolled.tsx | 22 +- .../ui/default/core/date-field/index.ts | 2 +- .../ui/default/core/date-input/date-input.tsx | 106 +- .../ui/default/core/date-input/index.ts | 2 +- .../default/core/date-picker/date-picker.tsx | 198 +- .../core/date-picker/demos/composition.tsx | 82 +- .../date-picker/demos/contextual-help.tsx | 40 +- .../core/date-picker/demos/controlled.tsx | 30 +- .../core/date-picker/demos/default.tsx | 10 +- .../core/date-picker/demos/description.tsx | 16 +- .../core/date-picker/demos/disabled.tsx | 10 +- .../core/date-picker/demos/error-message.tsx | 28 +- .../core/date-picker/demos/granularity.tsx | 52 +- .../core/date-picker/demos/hide-time-zone.tsx | 30 +- .../core/date-picker/demos/hour-cycle.tsx | 26 +- .../default/core/date-picker/demos/label.tsx | 20 +- .../core/date-picker/demos/loading.tsx | 16 +- .../core/date-picker/demos/placeholder.tsx | 26 +- .../default/core/date-picker/demos/prefix.tsx | 12 +- .../core/date-picker/demos/read-only.tsx | 30 +- .../core/date-picker/demos/required.tsx | 30 +- .../default/core/date-picker/demos/sizes.tsx | 22 +- .../core/date-picker/demos/time-zones.tsx | 20 +- .../core/date-picker/demos/uncontrolled.tsx | 28 +- .../ui/default/core/date-picker/index.ts | 2 +- .../date-range-picker/date-range-picker.tsx | 206 +- .../date-range-picker/demos/composition.tsx | 94 +- .../demos/contextual-help.tsx | 40 +- .../date-range-picker/demos/controlled.tsx | 58 +- .../core/date-range-picker/demos/default.tsx | 10 +- .../date-range-picker/demos/description.tsx | 20 +- .../core/date-range-picker/demos/disabled.tsx | 10 +- .../date-range-picker/demos/error-message.tsx | 28 +- .../date-range-picker/demos/granularity.tsx | 52 +- .../demos/hide-time-zone.tsx | 36 +- .../date-range-picker/demos/hour-cycle.tsx | 26 +- .../core/date-range-picker/demos/label.tsx | 20 +- .../core/date-range-picker/demos/loading.tsx | 16 +- .../date-range-picker/demos/placeholder.tsx | 26 +- .../core/date-range-picker/demos/prefix.tsx | 12 +- .../date-range-picker/demos/read-only.tsx | 36 +- .../core/date-range-picker/demos/required.tsx | 46 +- .../core/date-range-picker/demos/sizes.tsx | 22 +- .../date-range-picker/demos/time-zones.tsx | 30 +- .../date-range-picker/demos/uncontrolled.tsx | 34 +- .../default/core/date-range-picker/index.ts | 2 +- .../core/dialog/demos/alert-dialog.tsx | 88 +- .../dialog/demos/async-form-submission.tsx | 118 +- .../ui/default/core/dialog/demos/basic.tsx | 106 +- .../default/core/dialog/demos/composition.tsx | 30 +- .../default/core/dialog/demos/controlled.tsx | 88 +- .../default/core/dialog/demos/description.tsx | 44 +- .../core/dialog/demos/dismiss-button.tsx | 114 +- .../default/core/dialog/demos/dismissable.tsx | 114 +- .../ui/default/core/dialog/demos/drawer.tsx | 82 +- .../core/dialog/demos/inset-content.tsx | 114 +- .../ui/default/core/dialog/demos/nested.tsx | 76 +- .../ui/default/core/dialog/demos/popover.tsx | 118 +- .../ui/default/core/dialog/demos/title.tsx | 38 +- .../ui/default/core/dialog/demos/types.tsx | 164 +- .../ui/default/core/dialog/dialog.tsx | 298 +- .../registry/ui/default/core/dialog/index.ts | 2 +- .../default/core/drop-zone/demos/default.tsx | 22 +- .../default/core/drop-zone/demos/disabled.tsx | 26 +- .../core/drop-zone/demos/file-trigger.tsx | 36 +- .../ui/default/core/drop-zone/demos/label.tsx | 40 +- .../ui/default/core/drop-zone/drop-zone.tsx | 64 +- .../ui/default/core/drop-zone/index.ts | 2 +- .../registry/ui/default/core/field/field.tsx | 290 +- .../registry/ui/default/core/field/index.ts | 2 +- .../core/file-trigger/demos/default.tsx | 60 +- .../demos/directory-selection.tsx | 66 +- .../core/file-trigger/demos/file-types.tsx | 24 +- .../core/file-trigger/demos/media-capture.tsx | 24 +- .../file-trigger/demos/multiple-files.tsx | 62 +- .../core/file-trigger/file-trigger.tsx | 12 +- .../ui/default/core/file-trigger/index.ts | 2 +- .../registry/ui/default/core/group/group.tsx | 12 +- .../registry/ui/default/core/group/index.ts | 2 +- .../ui/default/core/heading/heading.tsx | 38 +- .../registry/ui/default/core/heading/index.ts | 2 +- .../registry/ui/default/core/input/index.ts | 2 +- .../registry/ui/default/core/input/input.tsx | 424 +- www/src/registry/ui/default/core/kbd/index.ts | 2 +- www/src/registry/ui/default/core/kbd/kbd.tsx | 32 +- .../ui/default/core/link/demos/default.tsx | 18 +- .../ui/default/core/link/demos/disabled.tsx | 18 +- .../ui/default/core/link/demos/icon.tsx | 26 +- .../ui/default/core/link/demos/variants.tsx | 42 +- .../registry/ui/default/core/link/index.ts | 2 +- .../registry/ui/default/core/link/link.tsx | 80 +- .../core/list-box/demos/async-loading.tsx | 62 +- .../ui/default/core/list-box/demos/basic.tsx | 24 +- .../core/list-box/demos/composition.tsx | 54 +- .../core/list-box/demos/contact-list.tsx | 6 +- .../core/list-box/demos/controlled.tsx | 64 +- .../core/list-box/demos/disabled-items.tsx | 24 +- .../core/list-box/demos/empty-state.tsx | 24 +- .../ui/default/core/list-box/demos/grid.tsx | 24 +- .../core/list-box/demos/horizontal.tsx | 30 +- .../core/list-box/demos/image-grid.tsx | 6 +- .../core/list-box/demos/item-variant.tsx | 24 +- .../list-box/demos/label-and-description.tsx | 36 +- .../ui/default/core/list-box/demos/links.tsx | 60 +- .../default/core/list-box/demos/loading.tsx | 22 +- .../core/list-box/demos/prefix-and-suffix.tsx | 48 +- .../default/core/list-box/demos/sections.tsx | 50 +- .../list-box/demos/selection-behavior.tsx | 32 +- .../core/list-box/demos/selection-mode.tsx | 40 +- .../default/core/list-box/demos/separator.tsx | 36 +- .../core/list-box/demos/uncontrolled.tsx | 32 +- .../ui/default/core/list-box/index.ts | 2 +- .../ui/default/core/list-box/list-box.tsx | 274 +- .../ui/default/core/menu/demos/basic.tsx | 38 +- .../default/core/menu/demos/composition.tsx | 52 +- .../ui/default/core/menu/demos/controlled.tsx | 54 +- .../core/menu/demos/disabled-items.tsx | 40 +- .../default/core/menu/demos/item-variant.tsx | 38 +- .../core/menu/demos/label-and-description.tsx | 36 +- .../ui/default/core/menu/demos/link-items.tsx | 72 +- .../ui/default/core/menu/demos/long-press.tsx | 36 +- .../core/menu/demos/multiple-selection.tsx | 44 +- .../default/core/menu/demos/overlay-type.tsx | 94 +- .../ui/default/core/menu/demos/placement.tsx | 138 +- .../core/menu/demos/prefix-and-suffix.tsx | 60 +- .../ui/default/core/menu/demos/section.tsx | 48 +- .../ui/default/core/menu/demos/separator.tsx | 44 +- .../ui/default/core/menu/demos/shortcut.tsx | 36 +- .../core/menu/demos/single-selection.tsx | 56 +- .../ui/default/core/menu/demos/submenus.tsx | 70 +- .../registry/ui/default/core/menu/index.ts | 2 +- .../registry/ui/default/core/menu/menu.tsx | 288 +- .../core/number-field/demos/composition.tsx | 54 +- .../number-field/demos/contextual-help.tsx | 36 +- .../core/number-field/demos/controlled.tsx | 40 +- .../core/number-field/demos/default.tsx | 12 +- .../core/number-field/demos/description.tsx | 12 +- .../core/number-field/demos/disabled.tsx | 10 +- .../core/number-field/demos/error-message.tsx | 24 +- .../number-field/demos/format-options.tsx | 88 +- .../default/core/number-field/demos/label.tsx | 20 +- .../core/number-field/demos/read-only.tsx | 12 +- .../core/number-field/demos/required.tsx | 26 +- .../default/core/number-field/demos/sizes.tsx | 22 +- .../core/number-field/demos/uncontrolled.tsx | 12 +- .../ui/default/core/number-field/index.ts | 2 +- .../core/number-field/number-field.tsx | 292 +- .../registry/ui/default/core/overlay/index.ts | 2 +- .../ui/default/core/overlay/overlay.tsx | 632 +- .../core/overlay/use-motion-drawer.tsx | 1375 ++-- .../core/progress/demos/composition.tsx | 38 +- .../core/progress/demos/custom-color.tsx | 34 +- .../progress/demos/custom-value-label.tsx | 30 +- .../default/core/progress/demos/default.tsx | 16 +- .../default/core/progress/demos/duration.tsx | 38 +- .../core/progress/demos/format-options.tsx | 30 +- .../core/progress/demos/indeterminate.tsx | 16 +- .../ui/default/core/progress/demos/label.tsx | 26 +- .../core/progress/demos/min-max-values.tsx | 30 +- .../ui/default/core/progress/demos/shape.tsx | 16 +- .../ui/default/core/progress/demos/sizes.tsx | 44 +- .../default/core/progress/demos/toolbar.tsx | 94 +- .../core/progress/demos/value-label.tsx | 16 +- .../default/core/progress/demos/variants.tsx | 28 +- .../ui/default/core/progress/index.ts | 2 +- .../ui/default/core/progress/progress.tsx | 464 +- .../default/core/radio-group/demos/cards.tsx | 62 +- .../core/radio-group/demos/composition.tsx | 42 +- .../radio-group/demos/contextual-help.tsx | 42 +- .../core/radio-group/demos/controlled.tsx | 44 +- .../core/radio-group/demos/default.tsx | 22 +- .../core/radio-group/demos/description.tsx | 30 +- .../core/radio-group/demos/disabled.tsx | 40 +- .../core/radio-group/demos/error-message.tsx | 32 +- .../default/core/radio-group/demos/label.tsx | 36 +- .../core/radio-group/demos/orientation.tsx | 22 +- .../core/radio-group/demos/read-only.tsx | 22 +- .../core/radio-group/demos/required.tsx | 70 +- .../core/radio-group/demos/uncontrolled.tsx | 24 +- .../ui/default/core/radio-group/index.ts | 2 +- .../default/core/radio-group/radio-group.tsx | 292 +- .../core/range-calendar/demos/composition.tsx | 88 +- .../core/range-calendar/demos/controlled.tsx | 54 +- .../core/range-calendar/demos/default.tsx | 10 +- .../core/range-calendar/demos/disabled.tsx | 10 +- .../range-calendar/demos/error-message.tsx | 46 +- .../core/range-calendar/demos/label.tsx | 10 +- .../demos/non-contiguous-ranges.tsx | 64 +- .../range-calendar/demos/page-behaviour.tsx | 10 +- .../core/range-calendar/demos/read-only.tsx | 34 +- .../range-calendar/demos/uncontrolled.tsx | 34 +- .../range-calendar/demos/unvailable-dates.tsx | 62 +- .../core/range-calendar/demos/validation.tsx | 26 +- .../range-calendar/demos/visible-months.tsx | 10 +- .../ui/default/core/range-calendar/index.ts | 2 +- .../core/range-calendar/range-calendar.tsx | 196 +- .../ui/default/core/resizable/index.ts | 2 +- .../ui/default/core/resizable/resizable.tsx | 130 +- .../core/scroll-area/demos/default.tsx | 74 +- .../core/scroll-area/demos/scrollbars.tsx | 178 +- .../default/core/scroll-area/demos/sizes.tsx | 88 +- .../ui/default/core/scroll-area/index.ts | 2 +- .../default/core/scroll-area/scroll-area.tsx | 288 +- .../core/search-field/demos/composition.tsx | 34 +- .../search-field/demos/contextual-help.tsx | 34 +- .../core/search-field/demos/controlled.tsx | 36 +- .../core/search-field/demos/default.tsx | 12 +- .../core/search-field/demos/description.tsx | 12 +- .../core/search-field/demos/disabled.tsx | 14 +- .../core/search-field/demos/error-message.tsx | 24 +- .../default/core/search-field/demos/form.tsx | 12 +- .../default/core/search-field/demos/label.tsx | 20 +- .../core/search-field/demos/loading.tsx | 22 +- .../search-field/demos/prefix-and-suffix.tsx | 50 +- .../core/search-field/demos/read-only.tsx | 12 +- .../core/search-field/demos/required.tsx | 26 +- .../default/core/search-field/demos/sizes.tsx | 22 +- .../core/search-field/demos/uncontrolled.tsx | 12 +- .../ui/default/core/search-field/index.ts | 2 +- .../core/search-field/search-field.tsx | 244 +- .../registry/ui/default/core/section/index.ts | 2 +- .../ui/default/core/section/section.tsx | 90 +- .../core/select/demos/async-loading.tsx | 56 +- .../ui/default/core/select/demos/basic.tsx | 28 +- .../default/core/select/demos/composition.tsx | 54 +- .../core/select/demos/contextual-help.tsx | 46 +- .../default/core/select/demos/controlled.tsx | 46 +- .../default/core/select/demos/description.tsx | 28 +- .../ui/default/core/select/demos/disabled.tsx | 28 +- .../ui/default/core/select/demos/label.tsx | 28 +- .../ui/default/core/select/demos/links.tsx | 32 +- .../ui/default/core/select/demos/loading.tsx | 28 +- .../default/core/select/demos/placeholder.tsx | 28 +- .../ui/default/core/select/demos/required.tsx | 28 +- .../ui/default/core/select/demos/sections.tsx | 64 +- .../core/select/demos/uncontrolled.tsx | 28 +- .../default/core/select/demos/validation.tsx | 36 +- .../registry/ui/default/core/select/index.ts | 2 +- .../ui/default/core/select/select.tsx | 218 +- .../ui/default/core/separator/demos/card.tsx | 48 +- .../core/separator/demos/orientation.tsx | 36 +- .../ui/default/core/separator/index.ts | 2 +- .../ui/default/core/separator/separator.tsx | 66 +- .../core/skeleton/demos/api-simulation.tsx | 54 +- .../ui/default/core/skeleton/demos/card.tsx | 32 +- .../default/core/skeleton/demos/children.tsx | 20 +- .../skeleton/demos/fixed-size-children.tsx | 20 +- .../ui/default/core/skeleton/demos/show.tsx | 30 +- .../ui/default/core/skeleton/index.ts | 2 +- .../ui/default/core/skeleton/skeleton.tsx | 46 +- .../slider/demos/advanced-composition.tsx | 58 +- .../default/core/slider/demos/composition.tsx | 38 +- .../default/core/slider/demos/controlled.tsx | 40 +- .../ui/default/core/slider/demos/default.tsx | 10 +- .../default/core/slider/demos/description.tsx | 22 +- .../ui/default/core/slider/demos/disabled.tsx | 10 +- .../core/slider/demos/format-options.tsx | 24 +- .../ui/default/core/slider/demos/label.tsx | 20 +- .../ui/default/core/slider/demos/range.tsx | 26 +- .../ui/default/core/slider/demos/sizes.tsx | 22 +- .../ui/default/core/slider/demos/step.tsx | 14 +- .../core/slider/demos/uncontrolled.tsx | 10 +- .../default/core/slider/demos/value-label.tsx | 44 +- .../default/core/slider/demos/value-scale.tsx | 26 +- .../ui/default/core/slider/demos/vertical.tsx | 14 +- .../registry/ui/default/core/slider/index.ts | 2 +- .../ui/default/core/slider/slider.tsx | 462 +- .../default/core/switch/demos/controlled.tsx | 38 +- .../ui/default/core/switch/demos/default.tsx | 12 +- .../ui/default/core/switch/demos/disabled.tsx | 24 +- .../ui/default/core/switch/demos/label.tsx | 22 +- .../ui/default/core/switch/demos/sizes.tsx | 22 +- .../core/switch/demos/uncontrolled.tsx | 12 +- .../registry/ui/default/core/switch/index.ts | 2 +- .../ui/default/core/switch/switch.tsx | 140 +- .../registry/ui/default/core/table/index.ts | 2 +- .../registry/ui/default/core/table/table.tsx | 232 +- .../ui/default/core/tabs/demos/basic.tsx | 32 +- .../ui/default/core/tabs/demos/controlled.tsx | 58 +- .../default/core/tabs/demos/disabled-item.tsx | 36 +- .../ui/default/core/tabs/demos/disabled.tsx | 32 +- .../core/tabs/demos/keyboard-activation.tsx | 32 +- .../ui/default/core/tabs/demos/vertical.tsx | 32 +- .../registry/ui/default/core/tabs/index.ts | 2 +- .../registry/ui/default/core/tabs/tabs.tsx | 156 +- .../core/text-area/demos/composition.tsx | 32 +- .../core/text-area/demos/contextual-help.tsx | 34 +- .../core/text-area/demos/controlled.tsx | 44 +- .../default/core/text-area/demos/default.tsx | 16 +- .../core/text-area/demos/description.tsx | 16 +- .../default/core/text-area/demos/disabled.tsx | 10 +- .../core/text-area/demos/error-message.tsx | 28 +- .../ui/default/core/text-area/demos/form.tsx | 12 +- .../ui/default/core/text-area/demos/label.tsx | 20 +- .../default/core/text-area/demos/loading.tsx | 22 +- .../text-area/demos/prefix-and-suffix.tsx | 120 +- .../core/text-area/demos/read-only.tsx | 20 +- .../default/core/text-area/demos/required.tsx | 30 +- .../core/text-area/demos/uncontrolled.tsx | 16 +- .../ui/default/core/text-area/index.ts | 2 +- .../ui/default/core/text-area/text-area.tsx | 142 +- .../core/text-field/demos/composition.tsx | 32 +- .../core/text-field/demos/contextual-help.tsx | 40 +- .../core/text-field/demos/controlled.tsx | 38 +- .../default/core/text-field/demos/default.tsx | 12 +- .../core/text-field/demos/description.tsx | 16 +- .../core/text-field/demos/disabled.tsx | 10 +- .../core/text-field/demos/error-message.tsx | 30 +- .../default/core/text-field/demos/label.tsx | 20 +- .../default/core/text-field/demos/loading.tsx | 26 +- .../text-field/demos/prefix-and-suffix.tsx | 78 +- .../core/text-field/demos/read-only.tsx | 16 +- .../core/text-field/demos/required.tsx | 30 +- .../default/core/text-field/demos/sizes.tsx | 22 +- .../core/text-field/demos/uncontrolled.tsx | 12 +- .../ui/default/core/text-field/index.ts | 2 +- .../ui/default/core/text-field/text-field.tsx | 188 +- .../registry/ui/default/core/text/index.ts | 2 +- .../registry/ui/default/core/text/text.tsx | 68 +- .../core/time-field/demos/composition.tsx | 38 +- .../core/time-field/demos/contextual-help.tsx | 40 +- .../core/time-field/demos/controlled.tsx | 30 +- .../default/core/time-field/demos/default.tsx | 10 +- .../core/time-field/demos/description.tsx | 26 +- .../core/time-field/demos/disabled.tsx | 10 +- .../core/time-field/demos/error-message.tsx | 28 +- .../core/time-field/demos/granularity.tsx | 26 +- .../core/time-field/demos/hide-time-zone.tsx | 26 +- .../core/time-field/demos/hour-cycle.tsx | 14 +- .../default/core/time-field/demos/label.tsx | 20 +- .../default/core/time-field/demos/loading.tsx | 26 +- .../core/time-field/demos/placeholder.tsx | 16 +- .../time-field/demos/prefix-and-suffix.tsx | 22 +- .../core/time-field/demos/read-only.tsx | 18 +- .../core/time-field/demos/required.tsx | 30 +- .../default/core/time-field/demos/sizes.tsx | 22 +- .../core/time-field/demos/time-zones.tsx | 20 +- .../core/time-field/demos/uncontrolled.tsx | 16 +- .../ui/default/core/time-field/index.ts | 2 +- .../ui/default/core/time-field/time-field.tsx | 180 +- .../core/toggle-button/demos/controlled.tsx | 46 +- .../core/toggle-button/demos/default.tsx | 20 +- .../core/toggle-button/demos/disabled.tsx | 20 +- .../core/toggle-button/demos/shapes.tsx | 48 +- .../core/toggle-button/demos/sizes.tsx | 42 +- .../core/toggle-button/demos/uncontrolled.tsx | 20 +- .../core/toggle-button/demos/variants.tsx | 42 +- .../ui/default/core/toggle-button/index.ts | 2 +- .../core/toggle-button/toggle-button.tsx | 222 +- .../ui/default/core/toggle-group/index.ts | 2 +- .../core/toggle-group/toggle-group.tsx | 546 +- .../ui/default/core/tooltip/demos/arrow.tsx | 26 +- .../core/tooltip/demos/composition.tsx | 32 +- .../core/tooltip/demos/container-padding.tsx | 52 +- .../ui/default/core/tooltip/demos/default.tsx | 26 +- .../ui/default/core/tooltip/demos/delay.tsx | 66 +- .../ui/default/core/tooltip/demos/flip.tsx | 52 +- .../ui/default/core/tooltip/demos/offset.tsx | 52 +- .../default/core/tooltip/demos/placement.tsx | 62 +- .../default/core/tooltip/demos/with-arrow.tsx | 26 +- .../registry/ui/default/core/tooltip/index.ts | 2 +- .../ui/default/core/tooltip/tooltip.tsx | 204 +- www/src/registry/ui/default/lib/cn.ts | 12 +- .../registry/ui/default/lib/focus-styles.ts | 26 +- www/src/styles/fonts.ts | 30 +- www/src/types/theme.ts | 84 +- www/tailwind.config.ts | 548 +- 609 files changed, 24359 insertions(+), 24358 deletions(-) diff --git a/package.json b/package.json index 3d9c5922..180c2f40 100644 --- a/package.json +++ b/package.json @@ -53,5 +53,11 @@ "prettier-plugin-tailwindcss": "^0.6.8", "turbo": "^2.0.12" }, - "packageManager": "pnpm@9.5.0" + "packageManager": "pnpm@9.5.0", + "pnpm": { + "overrides": { + "@types/react": "npm:types-react@19.0.0-rc.1", + "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1" + } + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 77a534b1..3f7599a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,10 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 + importers: .: @@ -214,94 +218,94 @@ importers: version: 3.5.6 '@radix-ui/react-aspect-ratio': specifier: ^1.0.3 - version: 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) '@radix-ui/react-collapsible': specifier: ^1.0.3 - version: 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) '@radix-ui/react-scroll-area': specifier: ^1.0.5 - version: 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) '@radix-ui/react-use-controllable-state': specifier: ^1.0.1 - version: 1.1.0(@types/react@18.3.10)(react@18.3.1) + version: 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) '@react-aria/toolbar': specifier: 3.0.0-beta.4 - version: 3.0.0-beta.4(react@18.3.1) + version: 3.0.0-beta.4(react@19.0.0-rc-cd22717c-20241013) '@react-aria/utils': specifier: ^3.24.0 - version: 3.25.3(react@18.3.1) + version: 3.25.3(react@19.0.0-rc-cd22717c-20241013) '@react-stately/utils': specifier: ^3.10.1 - version: 3.10.4(react@18.3.1) + version: 3.10.4(react@19.0.0-rc-cd22717c-20241013) '@remixicon/react': specifier: ^4.2.0 - version: 4.2.0(react@18.3.1) + version: 4.2.0(react@19.0.0-rc-cd22717c-20241013) '@types/mdx': specifier: ^2.0.13 version: 2.0.13 '@vercel/analytics': specifier: ^1.1.1 - version: 1.3.1(next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) + version: 1.3.1(next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) clsx: specifier: ^2.1.0 version: 2.1.1 cmdk: specifier: ^0.2.0 - version: 0.2.1(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 0.2.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) framer-motion: specifier: ^11.11.8 - version: 11.11.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 11.11.8(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) fumadocs-core: specifier: ^13.4.10 - version: 13.4.10(@types/react@18.3.10)(next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 13.4.10(next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013))(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) fumadocs-docgen: specifier: ^1.2.0 version: 1.2.0(typescript@5.6.2) fumadocs-mdx: specifier: ^10.0.2 - version: 10.0.2(fumadocs-core@13.4.10(@types/react@18.3.10)(next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) + version: 10.0.2(fumadocs-core@13.4.10(next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013))(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1))(next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)) fumadocs-ui: specifier: ^13.4.10 - version: 13.4.10(@types/react-dom@18.3.0)(@types/react@18.3.10)(next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(tailwindcss@3.4.13(ts-node@10.9.2(@types/node@18.19.54)(typescript@5.6.2))) + version: 13.4.10(next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013))(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(tailwindcss@3.4.13(ts-node@10.9.2(@types/node@18.19.54)(typescript@5.6.2)))(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) geist: specifier: ^1.2.2 - version: 1.3.1(next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) + version: 1.3.1(next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)) hast-util-to-string: specifier: ^3.0.1 version: 3.0.1 lucide-react: specifier: ^0.311.0 - version: 0.311.0(react@18.3.1) + version: 0.311.0(react@19.0.0-rc-cd22717c-20241013) next: - specifier: 14.2.14 - version: 14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + specifier: 15.0.0-rc.1 + version: 15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) next-mdx-remote: specifier: ^4.4.1 - version: 4.4.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 4.4.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) next-themes: specifier: ^0.2.1 - version: 0.2.1(next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 0.2.1(next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013))(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) npm-to-yarn: specifier: ^3.0.0 version: 3.0.0 react: - specifier: 18.3.1 - version: 18.3.1 + specifier: 19.0.0-rc-cd22717c-20241013 + version: 19.0.0-rc-cd22717c-20241013 react-aria: specifier: ^3.33.0 - version: 3.35.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 3.35.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) react-aria-components: specifier: ^1.2.1 - version: 1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 1.4.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) react-dom: - specifier: 18.3.1 - version: 18.3.1(react@18.3.1) + specifier: 19.0.0-rc-cd22717c-20241013 + version: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) react-resizable-panels: specifier: ^2.0.19 - version: 2.1.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 2.1.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) react-stately: specifier: ^3.31.0 - version: 3.33.0(react@18.3.1) + version: 3.33.0(react@19.0.0-rc-cd22717c-20241013) remark-gfm: specifier: ^4.0.0 version: 4.0.0 @@ -331,7 +335,7 @@ importers: version: 3.23.8 zustand: specifier: ^4.5.2 - version: 4.5.5(@types/react@18.3.10)(react@18.3.1) + version: 4.5.5(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) devDependencies: '@dotui/eslint-config': specifier: workspace:* @@ -352,11 +356,11 @@ importers: specifier: ^18.17.0 version: 18.19.54 '@types/react': - specifier: ^18.2.37 - version: 18.3.10 + specifier: npm:types-react@19.0.0-rc.1 + version: types-react@19.0.0-rc.1 '@types/react-dom': - specifier: ^18.2.15 - version: 18.3.0 + specifier: npm:types-react-dom@19.0.0-rc.1 + version: types-react-dom@19.0.0-rc.1 autoprefixer: specifier: ^10.4.14 version: 10.4.20(postcss@8.4.47) @@ -1203,62 +1207,56 @@ packages: peerDependencies: react: '>=16' - '@next/env@14.2.14': - resolution: {integrity: sha512-/0hWQfiaD5//LvGNgc8PjvyqV50vGK0cADYzaoOOGN8fxzBn3iAiaq3S0tCRnFBldq0LVveLcxCTi41ZoYgAgg==} + '@next/env@15.0.0-rc.1': + resolution: {integrity: sha512-4neDwowyr+9DfgickGjNATp6Lm3rJ/Y83ulg8irVXUoN+mLikrInYSzFDnwpkflO/wokFR4z5A171RVPnapZ/Q==} '@next/eslint-plugin-next@14.2.13': resolution: {integrity: sha512-z8Mk0VljxhIzsSiZUSdt3wp+t2lKd+jk5a9Jsvh3zDGkItgDMfjv/ZbET6HsxEl/fSihVoHGsXV6VLyDH0lfTQ==} - '@next/swc-darwin-arm64@14.2.14': - resolution: {integrity: sha512-bsxbSAUodM1cjYeA4o6y7sp9wslvwjSkWw57t8DtC8Zig8aG8V6r+Yc05/9mDzLKcybb6EN85k1rJDnMKBd9Gw==} + '@next/swc-darwin-arm64@15.0.0-rc.1': + resolution: {integrity: sha512-YqDdpE3vgcDSiq9oJcFp0YUsLXCfIa3BpAHOZnVfbXNPBz1JcDtIGFsoz2w6l5jmjU9+41l7oeagY8KAWtYdpA==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@next/swc-darwin-x64@14.2.14': - resolution: {integrity: sha512-cC9/I+0+SK5L1k9J8CInahduTVWGMXhQoXFeNvF0uNs3Bt1Ub0Azb8JzTU9vNCr0hnaMqiWu/Z0S1hfKc3+dww==} + '@next/swc-darwin-x64@15.0.0-rc.1': + resolution: {integrity: sha512-mM7rwGB9xuPM9dIAcInlmHpIOaFyBkOsUjj9ytUBANPNEqPkW8C06RITiPJ3toKAiocEcGdLuJeaYPS8MDgf6g==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@next/swc-linux-arm64-gnu@14.2.14': - resolution: {integrity: sha512-RMLOdA2NU4O7w1PQ3Z9ft3PxD6Htl4uB2TJpocm+4jcllHySPkFaUIFacQ3Jekcg6w+LBaFvjSPthZHiPmiAUg==} + '@next/swc-linux-arm64-gnu@15.0.0-rc.1': + resolution: {integrity: sha512-4V3PSaqvjW00qac6Pd7rWAv+zE3HGXv02JAac7TpwOvNIYuneqUq82HLGZe9aZTDtT+zhOS2RnCUuXE7v3BO2Q==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-musl@14.2.14': - resolution: {integrity: sha512-WgLOA4hT9EIP7jhlkPnvz49iSOMdZgDJVvbpb8WWzJv5wBD07M2wdJXLkDYIpZmCFfo/wPqFsFR4JS4V9KkQ2A==} + '@next/swc-linux-arm64-musl@15.0.0-rc.1': + resolution: {integrity: sha512-0xUM0jRNgezRT0F/wCMs2HJ5uuV/WDajYWWeBDSSOLKB8zfTMho+QiZtLqsGG1OjALIPttpKr1E2IDNWoUgXZQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-x64-gnu@14.2.14': - resolution: {integrity: sha512-lbn7svjUps1kmCettV/R9oAvEW+eUI0lo0LJNFOXoQM5NGNxloAyFRNByYeZKL3+1bF5YE0h0irIJfzXBq9Y6w==} + '@next/swc-linux-x64-gnu@15.0.0-rc.1': + resolution: {integrity: sha512-xCusIy4TN9tS5CoZVk1bs6XUqSy1H6/BMco71/LA64oPKO/MsnFv6tbmzVlBKmriASCdedrgPlREE6AXVANRaA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-linux-x64-musl@14.2.14': - resolution: {integrity: sha512-7TcQCvLQ/hKfQRgjxMN4TZ2BRB0P7HwrGAYL+p+m3u3XcKTraUFerVbV3jkNZNwDeQDa8zdxkKkw2els/S5onQ==} + '@next/swc-linux-x64-musl@15.0.0-rc.1': + resolution: {integrity: sha512-eNiz8+boojGEVkTJYOC1BzuT2Wl9Nqoz91rHkZityAW2kd4KpeMEuxXj5Y+IPoRQXRFDfOi39hw7qpj+Nt0LXg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-win32-arm64-msvc@14.2.14': - resolution: {integrity: sha512-8i0Ou5XjTLEje0oj0JiI0Xo9L/93ghFtAUYZ24jARSeTMXLUx8yFIdhS55mTExq5Tj4/dC2fJuaT4e3ySvXU1A==} + '@next/swc-win32-arm64-msvc@15.0.0-rc.1': + resolution: {integrity: sha512-KcH0BWiFqinwfb8dBbIvAT51oWmZqiGHoPOP8yjkEzJK2pVxwKm4mk4WM4Y17EgCSmfAtdT0xklM9bcAm3cD3Q==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@next/swc-win32-ia32-msvc@14.2.14': - resolution: {integrity: sha512-2u2XcSaDEOj+96eXpyjHjtVPLhkAFw2nlaz83EPeuK4obF+HmtDJHqgR1dZB7Gb6V/d55FL26/lYVd0TwMgcOQ==} - engines: {node: '>= 10'} - cpu: [ia32] - os: [win32] - - '@next/swc-win32-x64-msvc@14.2.14': - resolution: {integrity: sha512-MZom+OvZ1NZxuRovKt1ApevjiUJTcU2PmdJKL66xUPaJeRywnbGGRWUlaAOwunD6dX+pm83vj979NTC8QXjGWg==} + '@next/swc-win32-x64-msvc@15.0.0-rc.1': + resolution: {integrity: sha512-mkw4njN+kXYJo1/+V3BxogTwVXRDdHzxBO9gTEEZzZVnxXTdD5TMiPPQuH5hdkZxdcx3O0qhob3j7wdH7gaZ2A==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -1310,8 +1308,8 @@ packages: '@radix-ui/react-accordion@1.2.1': resolution: {integrity: sha512-bg/l7l5QzUjgsh8kjwDFommzAshnUsuVMV5NM56QVCm+7ZckYdd9P/ExR8xG/Oup0OajVxNLaHJ1tb8mXk+nzQ==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1323,8 +1321,8 @@ packages: '@radix-ui/react-arrow@1.1.0': resolution: {integrity: sha512-FmlW1rCg7hBpEBwFbjHwCW6AmWLQM6g/v0Sn8XbP9NvmSZ2San1FpQeyPtufzOMSIx7Y4dzjlHoifhp+7NkZhw==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1336,8 +1334,8 @@ packages: '@radix-ui/react-aspect-ratio@1.1.0': resolution: {integrity: sha512-dP87DM/Y7jFlPgUZTlhx6FF5CEzOiaxp2rBCKlaXlpH5Ip/9Fg5zZ9lDOQ5o/MOfUlf36eak14zoWYpgcgGoOg==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1349,8 +1347,8 @@ packages: '@radix-ui/react-collapsible@1.1.0': resolution: {integrity: sha512-zQY7Epa8sTL0mq4ajSJpjgn2YmCgyrG7RsQgLp3C0LQVkG7+Tf6Pv1CeNWZLyqMjhdPkBa5Lx7wYBeSu7uCSTA==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1362,8 +1360,8 @@ packages: '@radix-ui/react-collapsible@1.1.1': resolution: {integrity: sha512-1///SnrfQHJEofLokyczERxQbWfCGQlQ2XsCZMucVs6it+lq9iw4vXy+uDn1edlb58cOZOWSldnfPAYcT4O/Yg==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1375,8 +1373,8 @@ packages: '@radix-ui/react-collection@1.1.0': resolution: {integrity: sha512-GZsZslMJEyo1VKm5L1ZJY8tGDxZNPAoUeQUIbKeJfoi7Q4kmig5AsgLMYYuyYbfjd8fBmFORAIwYAkXMnXZgZw==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1393,7 +1391,7 @@ packages: '@radix-ui/react-compose-refs@1.0.1': resolution: {integrity: sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: '@types/react': @@ -1402,7 +1400,7 @@ packages: '@radix-ui/react-compose-refs@1.1.0': resolution: {integrity: sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -1416,7 +1414,7 @@ packages: '@radix-ui/react-context@1.0.1': resolution: {integrity: sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: '@types/react': @@ -1425,7 +1423,7 @@ packages: '@radix-ui/react-context@1.1.0': resolution: {integrity: sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -1434,7 +1432,7 @@ packages: '@radix-ui/react-context@1.1.1': resolution: {integrity: sha512-UASk9zi+crv9WteK/NU4PLvOoL3OuE6BWVKNF6hPRBtYBDXQ2u5iu3O59zUlJiTVvkyuycnqrztsHVJwcK9K+Q==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -1449,8 +1447,8 @@ packages: '@radix-ui/react-dialog@1.0.5': resolution: {integrity: sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: @@ -1462,8 +1460,8 @@ packages: '@radix-ui/react-dialog@1.1.2': resolution: {integrity: sha512-Yj4dZtqa2o+kG61fzB0H2qUvmwBA2oyQroGLyNtBj1beo1khoQ3q1a2AO8rrQYjd8256CO9+N8L9tvsS+bnIyA==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1475,7 +1473,7 @@ packages: '@radix-ui/react-direction@1.1.0': resolution: {integrity: sha512-BUuBvgThEiAXh2DWu93XsT+a3aWrGqolGlqqw5VU1kG7p/ZH2cuDlM1sRLNnY3QcBS69UIz2mcKhMxDsdewhjg==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -1490,8 +1488,8 @@ packages: '@radix-ui/react-dismissable-layer@1.0.5': resolution: {integrity: sha512-aJeDjQhywg9LBu2t/At58hCvr7pEm0o2Ke1x33B+MhjNmmZ17sy4KImo0KPLgsnc/zN7GPdce8Cnn0SWvwZO7g==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: @@ -1503,8 +1501,8 @@ packages: '@radix-ui/react-dismissable-layer@1.1.1': resolution: {integrity: sha512-QSxg29lfr/xcev6kSz7MAlmDnzbP1eI/Dwn3Tp1ip0KT5CUELsxkekFEMVBEoykI3oV39hKT4TKZzBNMbcTZYQ==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1521,7 +1519,7 @@ packages: '@radix-ui/react-focus-guards@1.0.1': resolution: {integrity: sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: '@types/react': @@ -1530,7 +1528,7 @@ packages: '@radix-ui/react-focus-guards@1.1.1': resolution: {integrity: sha512-pSIwfrT1a6sIoDASCSpFwOasEwKTZWDw/iBdtnqKO7v6FeOzYJ7U53cPzYFVR3geGGXgVHaH+CdngrrAzqUGxg==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -1545,8 +1543,8 @@ packages: '@radix-ui/react-focus-scope@1.0.4': resolution: {integrity: sha512-sL04Mgvf+FmyvZeYfNu1EPAaaxD+aw7cYeIB9L9Fvq8+urhltTRaEo5ysKOpHuKPclsZcSUMKlN05x4u+CINpA==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: @@ -1558,8 +1556,8 @@ packages: '@radix-ui/react-focus-scope@1.1.0': resolution: {integrity: sha512-200UD8zylvEyL8Bx+z76RJnASR2gRMuxlgFCPAe/Q/679a/r0eK3MBVYMb7vZODZcffZBdob1EGnky78xmVvcA==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1576,7 +1574,7 @@ packages: '@radix-ui/react-id@1.0.1': resolution: {integrity: sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: '@types/react': @@ -1585,7 +1583,7 @@ packages: '@radix-ui/react-id@1.1.0': resolution: {integrity: sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -1594,8 +1592,8 @@ packages: '@radix-ui/react-popover@1.1.2': resolution: {integrity: sha512-u2HRUyWW+lOiA2g0Le0tMmT55FGOEWHwPFt1EPfbLly7uXQExFo5duNKqG2DzmFXIdqOeNd+TpE8baHWJCyP9w==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1607,8 +1605,8 @@ packages: '@radix-ui/react-popper@1.2.0': resolution: {integrity: sha512-ZnRMshKF43aBxVWPWvbj21+7TQCvhuULWJ4gNIKYpRlQt5xGRhLx66tMp8pya2UkGHTSlhpXwmjqltDYHhw7Vg==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1626,8 +1624,8 @@ packages: '@radix-ui/react-portal@1.0.4': resolution: {integrity: sha512-Qki+C/EuGUVCQTOTD5vzJzJuMUlewbzuKyUy+/iHM2uwGiru9gZeBJtHAPKAEkB5KWGi9mP/CHKcY0wt1aW45Q==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: @@ -1639,8 +1637,8 @@ packages: '@radix-ui/react-portal@1.1.2': resolution: {integrity: sha512-WeDYLGPxJb/5EGBoedyJbT0MpoULmwnIPMJMSldkuiMsBAv7N1cRdsTWZWht9vpPOiN3qyiGAtbK2is47/uMFg==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1658,8 +1656,8 @@ packages: '@radix-ui/react-presence@1.0.1': resolution: {integrity: sha512-UXLW4UAbIY5ZjcvzjfRFo5gxva8QirC9hF7wRE4U5gz+TP0DbRk+//qyuAQ1McDxBt1xNMBTaciFGvEmJvAZCg==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: @@ -1671,8 +1669,8 @@ packages: '@radix-ui/react-presence@1.1.0': resolution: {integrity: sha512-Gq6wuRN/asf9H/E/VzdKoUtT8GC9PQc9z40/vEr0VCJ4u5XvvhWIrSsCB6vD2/cH7ugTdSfYq9fLJCcM00acrQ==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1684,8 +1682,8 @@ packages: '@radix-ui/react-presence@1.1.1': resolution: {integrity: sha512-IeFXVi4YS1K0wVZzXNrbaaUvIJ3qdY+/Ih4eHFhWA9SwGR9UDX7Ck8abvL57C4cv3wwMvUE0OG69Qc3NCcTe/A==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1703,8 +1701,8 @@ packages: '@radix-ui/react-primitive@1.0.3': resolution: {integrity: sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 react-dom: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: @@ -1716,8 +1714,8 @@ packages: '@radix-ui/react-primitive@2.0.0': resolution: {integrity: sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1729,8 +1727,8 @@ packages: '@radix-ui/react-roving-focus@1.1.0': resolution: {integrity: sha512-EA6AMGeq9AEeQDeSH0aZgG198qkfHSbvWTf1HvoDmOB5bBG/qTxjYMWUKMnYiV6J/iP/J8MEFSuB2zRU2n7ODA==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1742,8 +1740,8 @@ packages: '@radix-ui/react-scroll-area@1.1.0': resolution: {integrity: sha512-9ArIZ9HWhsrfqS765h+GZuLoxaRHD/j0ZWOWilsCvYTpYJp8XwCqNG7Dt9Nu/TItKOdgLGkOPCodQvDc+UMwYg==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1760,7 +1758,7 @@ packages: '@radix-ui/react-slot@1.0.2': resolution: {integrity: sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: '@types/react': @@ -1769,7 +1767,7 @@ packages: '@radix-ui/react-slot@1.1.0': resolution: {integrity: sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -1778,8 +1776,8 @@ packages: '@radix-ui/react-tabs@1.1.1': resolution: {integrity: sha512-3GBUDmP2DvzmtYLMsHmpA1GtR46ZDZ+OreXM/N+kkQJOPIgytFWWTfDQmBQKBvaFS0Vno0FktdbVzN28KGrMdw==} peerDependencies: - '@types/react': '*' - '@types/react-dom': '*' + '@types/react': npm:types-react@19.0.0-rc.1 + '@types/react-dom': npm:types-react-dom@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: @@ -1796,7 +1794,7 @@ packages: '@radix-ui/react-use-callback-ref@1.0.1': resolution: {integrity: sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: '@types/react': @@ -1805,7 +1803,7 @@ packages: '@radix-ui/react-use-callback-ref@1.1.0': resolution: {integrity: sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -1819,7 +1817,7 @@ packages: '@radix-ui/react-use-controllable-state@1.0.1': resolution: {integrity: sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: '@types/react': @@ -1828,7 +1826,7 @@ packages: '@radix-ui/react-use-controllable-state@1.1.0': resolution: {integrity: sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -1842,7 +1840,7 @@ packages: '@radix-ui/react-use-escape-keydown@1.0.3': resolution: {integrity: sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: '@types/react': @@ -1851,7 +1849,7 @@ packages: '@radix-ui/react-use-escape-keydown@1.1.0': resolution: {integrity: sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -1865,7 +1863,7 @@ packages: '@radix-ui/react-use-layout-effect@1.0.1': resolution: {integrity: sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: '@types/react': @@ -1874,7 +1872,7 @@ packages: '@radix-ui/react-use-layout-effect@1.1.0': resolution: {integrity: sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -1883,7 +1881,7 @@ packages: '@radix-ui/react-use-rect@1.1.0': resolution: {integrity: sha512-0Fmkebhr6PiseyZlYAOtLS+nb7jLmpqTrJyv61Pe68MKYW6OWdRE2kI70TaYY27u7H0lajqM3hSMMLFq18Z7nQ==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -1892,7 +1890,7 @@ packages: '@radix-ui/react-use-size@1.1.0': resolution: {integrity: sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw==} peerDependencies: - '@types/react': '*' + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': @@ -2488,9 +2486,6 @@ packages: '@swc/helpers@0.5.13': resolution: {integrity: sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w==} - '@swc/helpers@0.5.5': - resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==} - '@szmarczak/http-timer@5.0.1': resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} engines: {node: '>=14.16'} @@ -2617,9 +2612,6 @@ packages: '@types/prop-types@15.7.13': resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} - '@types/react-dom@18.3.0': - resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==} - '@types/react@18.3.10': resolution: {integrity: sha512-02sAAlBnP39JgXwkAq3PeU9DVaaGpZyF3MGcC0MKgQVkZor5IiiDAipVaxQHtDJAmO4GIy/rVBy/LzVj76Cyqg==} @@ -4889,21 +4881,24 @@ packages: react: ^16.8 || ^17 || ^18 react-dom: ^16.8 || ^17 || ^18 - next@14.2.14: - resolution: {integrity: sha512-Q1coZG17MW0Ly5x76shJ4dkC23woLAhhnDnw+DfTc7EpZSGuWrlsZ3bZaO8t6u1Yu8FVfhkqJE+U8GC7E0GLPQ==} - engines: {node: '>=18.17.0'} + next@15.0.0-rc.1: + resolution: {integrity: sha512-MUoMUM7u6lh5zx1fRbze2jGESj4VIqc0dplx03wN5cLbpW3RhrVD7I3+sDW1khJxi+bayAZuGx03R5qNV9y/EA==} + engines: {node: '>=18.18.0'} hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 '@playwright/test': ^1.41.2 - react: ^18.2.0 - react-dom: ^18.2.0 + babel-plugin-react-compiler: '*' + react: ^18.2.0 || 19.0.0-rc-cd22717c-20241013 + react-dom: ^18.2.0 || 19.0.0-rc-cd22717c-20241013 sass: ^1.3.0 peerDependenciesMeta: '@opentelemetry/api': optional: true '@playwright/test': optional: true + babel-plugin-react-compiler: + optional: true sass: optional: true @@ -5325,10 +5320,10 @@ packages: react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0 - react-dom@18.3.1: - resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} + react-dom@19.0.0-rc-cd22717c-20241013: + resolution: {integrity: sha512-NzjTBOXygonUxLRQuUUW5V2QLGkAcyUwJoS8+UWxs089paMvQQfoRD51w65Ovgd2OEQ8Rm3HWx+82fvXiT0czQ==} peerDependencies: - react: ^18.3.1 + react: 19.0.0-rc-cd22717c-20241013 react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} @@ -5343,7 +5338,7 @@ packages: resolution: {integrity: sha512-DtSYaao4mBmX+HDo5YWYdBWQwYIQQshUV/dVxFxK+KM26Wjwp1gZ6rv6OC3oujI6Bfu6Xyg3TwK533AQutsn/g==} engines: {node: '>=10'} peerDependencies: - '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8.0 || ^17.0.0 || ^18.0.0 peerDependenciesMeta: '@types/react': @@ -5353,7 +5348,7 @@ packages: resolution: {integrity: sha512-xGVKJJr0SJGQVirVFAUZ2k1QLyO6m+2fy0l8Qawbp5Jgrv3DeLalrfMNBFSlmz5kriGGzsVBtGVnf4pTKIhhWA==} engines: {node: '>=10'} peerDependencies: - '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8.0 || ^17.0.0 || ^18.0.0 peerDependenciesMeta: '@types/react': @@ -5363,7 +5358,7 @@ packages: resolution: {integrity: sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw==} engines: {node: '>=10'} peerDependencies: - '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8.0 || ^17.0.0 || ^18.0.0 peerDependenciesMeta: '@types/react': @@ -5373,7 +5368,7 @@ packages: resolution: {integrity: sha512-I2U4JVEsQenxDAKaVa3VZ/JeJZe0/2DxPWL8Tj8yLKctQJQiZM52pn/GWFpSp8dftjM3pSAHVJZscAnC/y+ySQ==} engines: {node: '>=10'} peerDependencies: - '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8.0 || ^17.0.0 || ^18.0.0 peerDependenciesMeta: '@types/react': @@ -5394,14 +5389,14 @@ packages: resolution: {integrity: sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==} engines: {node: '>=10'} peerDependencies: - '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8.0 || ^17.0.0 || ^18.0.0 peerDependenciesMeta: '@types/react': optional: true - react@18.3.1: - resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} + react@19.0.0-rc-cd22717c-20241013: + resolution: {integrity: sha512-k28GszmyQ1tX/JmeLGZINq5KXiNy/MmN0fCAtcwF8a9INDyVYG0zATCRGJwaPB9WixmkuwPv1BfB1QBfJC7cNg==} engines: {node: '>=0.10.0'} read-cache@1.0.0: @@ -5574,8 +5569,8 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - scheduler@0.23.2: - resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} + scheduler@0.25.0-rc-cd22717c-20241013: + resolution: {integrity: sha512-MnsFR57bKcrYslnbCUsaUG0qBuAArk92VxE0zu6A2Usz38iIuL2uZLunqKlP1W47MF33GrRGDj1sXdPbFKIZfw==} scroll-into-view-if-needed@3.1.0: resolution: {integrity: sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==} @@ -5800,13 +5795,13 @@ packages: style-to-object@1.0.8: resolution: {integrity: sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==} - styled-jsx@5.1.1: - resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} + styled-jsx@5.1.6: + resolution: {integrity: sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==} engines: {node: '>= 12.0.0'} peerDependencies: '@babel/core': '*' babel-plugin-macros: '*' - react: '>= 16.8.0 || 17.x.x || ^18.0.0-0' + react: '>= 16.8.0 || 17.x.x || ^18.0.0-0 || ^19.0.0-0' peerDependenciesMeta: '@babel/core': optional: true @@ -6061,6 +6056,12 @@ packages: resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} engines: {node: '>= 0.4'} + types-react-dom@19.0.0-rc.1: + resolution: {integrity: sha512-VSLZJl8VXCD0fAWp7DUTFUDCcZ8DVXOQmjhJMD03odgeFmu14ZQJHCXeETm3BEAhJqfgJaFkLnGkQv88sRx0fQ==} + + types-react@19.0.0-rc.1: + resolution: {integrity: sha512-RshndUfqTW6K3STLPis8BtAYCGOkMbtvYsi90gmVNDZBXUyUc5juf2PE9LfS/JmOlUIRO8cWTS/1MTnmhjDqyQ==} + typescript@5.6.2: resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} engines: {node: '>=14.17'} @@ -6145,7 +6146,7 @@ packages: resolution: {integrity: sha512-elOQwe6Q8gqZgDA8mrh44qRTQqpIHDcZ3hXTLjBe1i4ph8XpNJnO+aQf3NaG+lriLopI4HMx9VjQLfPQ6vhnoA==} engines: {node: '>=10'} peerDependencies: - '@types/react': ^16.8.0 || ^17.0.0 || ^18.0.0 + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8.0 || ^17.0.0 || ^18.0.0 peerDependenciesMeta: '@types/react': @@ -6155,7 +6156,7 @@ packages: resolution: {integrity: sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==} engines: {node: '>=10'} peerDependencies: - '@types/react': ^16.9.0 || ^17.0.0 || ^18.0.0 + '@types/react': npm:types-react@19.0.0-rc.1 react: ^16.8.0 || ^17.0.0 || ^18.0.0 peerDependenciesMeta: '@types/react': @@ -6312,7 +6313,7 @@ packages: resolution: {integrity: sha512-+0PALYNJNgK6hldkgDq2vLrw5f6g/jCInz52n9RTpropGgeAf/ioFUCdtsjCqu4gNhW9D01rUQBROoRjdzyn2Q==} engines: {node: '>=12.7.0'} peerDependencies: - '@types/react': '>=16.8' + '@types/react': npm:types-react@19.0.0-rc.1 immer: '>=9.0.6' react: '>=16.8' peerDependenciesMeta: @@ -7022,11 +7023,11 @@ snapshots: '@floating-ui/core': 1.6.8 '@floating-ui/utils': 0.2.8 - '@floating-ui/react-dom@2.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@floating-ui/react-dom@2.1.2(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@floating-ui/dom': 1.6.11 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) '@floating-ui/utils@0.2.8': {} @@ -7290,43 +7291,40 @@ snapshots: transitivePeerDependencies: - supports-color - '@mdx-js/react@2.3.0(react@18.3.1)': + '@mdx-js/react@2.3.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@types/mdx': 2.0.13 '@types/react': 18.3.10 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@next/env@14.2.14': {} + '@next/env@15.0.0-rc.1': {} '@next/eslint-plugin-next@14.2.13': dependencies: glob: 10.3.10 - '@next/swc-darwin-arm64@14.2.14': - optional: true - - '@next/swc-darwin-x64@14.2.14': + '@next/swc-darwin-arm64@15.0.0-rc.1': optional: true - '@next/swc-linux-arm64-gnu@14.2.14': + '@next/swc-darwin-x64@15.0.0-rc.1': optional: true - '@next/swc-linux-arm64-musl@14.2.14': + '@next/swc-linux-arm64-gnu@15.0.0-rc.1': optional: true - '@next/swc-linux-x64-gnu@14.2.14': + '@next/swc-linux-arm64-musl@15.0.0-rc.1': optional: true - '@next/swc-linux-x64-musl@14.2.14': + '@next/swc-linux-x64-gnu@15.0.0-rc.1': optional: true - '@next/swc-win32-arm64-msvc@14.2.14': + '@next/swc-linux-x64-musl@15.0.0-rc.1': optional: true - '@next/swc-win32-ia32-msvc@14.2.14': + '@next/swc-win32-arm64-msvc@15.0.0-rc.1': optional: true - '@next/swc-win32-x64-msvc@14.2.14': + '@next/swc-win32-x64-msvc@15.0.0-rc.1': optional: true '@nodelib/fs.scandir@2.1.5': @@ -7370,1598 +7368,1598 @@ snapshots: '@radix-ui/primitive@1.1.0': {} - '@radix-ui/react-accordion@1.2.1(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-accordion@1.2.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: '@radix-ui/primitive': 1.1.0 - '@radix-ui/react-collapsible': 1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-collection': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-context': 1.1.1(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-direction': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-id': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-collapsible': 1.1.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-collection': 1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-context': 1.1.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-direction': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-id': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-controllable-state': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-arrow@1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-arrow@1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-aspect-ratio@1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-aspect-ratio@1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-collapsible@1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-collapsible@1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: '@radix-ui/primitive': 1.1.0 - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-context': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-id': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-presence': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-context': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-id': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-presence': 1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-controllable-state': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-layout-effect': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-collapsible@1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-collapsible@1.1.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: '@radix-ui/primitive': 1.1.0 - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-context': 1.1.1(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-id': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-presence': 1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-context': 1.1.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-id': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-presence': 1.1.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-controllable-state': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-layout-effect': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-collection@1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-collection@1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-context': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-slot': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-context': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-slot': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-compose-refs@1.0.0(react@18.3.1)': + '@radix-ui/react-compose-refs@1.0.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@babel/runtime': 7.25.6 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@radix-ui/react-compose-refs@1.0.1(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-compose-refs@1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-compose-refs@1.1.0(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-compose-refs@1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-context@1.0.0(react@18.3.1)': + '@radix-ui/react-context@1.0.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@babel/runtime': 7.25.6 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@radix-ui/react-context@1.0.1(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-context@1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-context@1.1.0(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-context@1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-context@1.1.1(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-context@1.1.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-dialog@1.0.0(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-dialog@1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 '@radix-ui/primitive': 1.0.0 - '@radix-ui/react-compose-refs': 1.0.0(react@18.3.1) - '@radix-ui/react-context': 1.0.0(react@18.3.1) - '@radix-ui/react-dismissable-layer': 1.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-focus-guards': 1.0.0(react@18.3.1) - '@radix-ui/react-focus-scope': 1.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-id': 1.0.0(react@18.3.1) - '@radix-ui/react-portal': 1.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-presence': 1.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-primitive': 1.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-slot': 1.0.0(react@18.3.1) - '@radix-ui/react-use-controllable-state': 1.0.0(react@18.3.1) + '@radix-ui/react-compose-refs': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-context': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-dismissable-layer': 1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-focus-guards': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-focus-scope': 1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-id': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-portal': 1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-presence': 1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-primitive': 1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-slot': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-use-controllable-state': 1.0.0(react@19.0.0-rc-cd22717c-20241013) aria-hidden: 1.2.4 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - react-remove-scroll: 2.5.4(@types/react@18.3.10)(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + react-remove-scroll: 2.5.4(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) transitivePeerDependencies: - '@types/react' - '@radix-ui/react-dialog@1.0.5(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-dialog@1.0.5(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-context': 1.0.1(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-focus-guards': 1.0.1(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-focus-scope': 1.0.4(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-id': 1.0.1(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-portal': 1.0.4(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-presence': 1.0.1(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-slot': 1.0.2(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@18.3.10)(react@18.3.1) + '@radix-ui/react-compose-refs': 1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-context': 1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-dismissable-layer': 1.0.5(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-focus-guards': 1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-focus-scope': 1.0.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-id': 1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-portal': 1.0.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-presence': 1.0.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 1.0.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-slot': 1.0.2(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-controllable-state': 1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) aria-hidden: 1.2.4 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - react-remove-scroll: 2.5.5(@types/react@18.3.10)(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + react-remove-scroll: 2.5.5(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-dialog@1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-dialog@1.1.2(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: '@radix-ui/primitive': 1.1.0 - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-context': 1.1.1(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-dismissable-layer': 1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-focus-guards': 1.1.1(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-focus-scope': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-id': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-portal': 1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-presence': 1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-slot': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@18.3.10)(react@18.3.1) + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-context': 1.1.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-dismissable-layer': 1.1.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-focus-guards': 1.1.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-focus-scope': 1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-id': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-portal': 1.1.2(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-presence': 1.1.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-slot': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-controllable-state': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) aria-hidden: 1.2.4 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - react-remove-scroll: 2.6.0(@types/react@18.3.10)(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + react-remove-scroll: 2.6.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-direction@1.1.0(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-direction@1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-dismissable-layer@1.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-dismissable-layer@1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@babel/runtime': 7.25.6 '@radix-ui/primitive': 1.0.0 - '@radix-ui/react-compose-refs': 1.0.0(react@18.3.1) - '@radix-ui/react-primitive': 1.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-use-callback-ref': 1.0.0(react@18.3.1) - '@radix-ui/react-use-escape-keydown': 1.0.0(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-compose-refs': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-primitive': 1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-use-callback-ref': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-use-escape-keydown': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@radix-ui/react-dismissable-layer@1.0.5(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-dismissable-layer@1.0.5(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-use-escape-keydown': 1.0.3(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-compose-refs': 1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 1.0.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-callback-ref': 1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-escape-keydown': 1.0.3(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-dismissable-layer@1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-dismissable-layer@1.1.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: '@radix-ui/primitive': 1.1.0 - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-use-escape-keydown': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-callback-ref': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-escape-keydown': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-focus-guards@1.0.0(react@18.3.1)': + '@radix-ui/react-focus-guards@1.0.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@babel/runtime': 7.25.6 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@radix-ui/react-focus-guards@1.0.1(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-focus-guards@1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-focus-guards@1.1.1(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-focus-guards@1.1.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-focus-scope@1.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-focus-scope@1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@babel/runtime': 7.25.6 - '@radix-ui/react-compose-refs': 1.0.0(react@18.3.1) - '@radix-ui/react-primitive': 1.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-use-callback-ref': 1.0.0(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-compose-refs': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-primitive': 1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-use-callback-ref': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@radix-ui/react-focus-scope@1.0.4(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-focus-scope@1.0.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-compose-refs': 1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 1.0.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-callback-ref': 1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-focus-scope@1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-focus-scope@1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-callback-ref': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-id@1.0.0(react@18.3.1)': + '@radix-ui/react-id@1.0.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@babel/runtime': 7.25.6 - '@radix-ui/react-use-layout-effect': 1.0.0(react@18.3.1) - react: 18.3.1 + '@radix-ui/react-use-layout-effect': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@radix-ui/react-id@1.0.1(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-id@1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 - '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 + '@radix-ui/react-use-layout-effect': 1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-id@1.1.0(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-id@1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 + '@radix-ui/react-use-layout-effect': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-popover@1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-popover@1.1.2(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: '@radix-ui/primitive': 1.1.0 - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-context': 1.1.1(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-dismissable-layer': 1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-focus-guards': 1.1.1(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-focus-scope': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-id': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-popper': 1.2.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-portal': 1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-presence': 1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-slot': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@18.3.10)(react@18.3.1) + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-context': 1.1.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-dismissable-layer': 1.1.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-focus-guards': 1.1.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-focus-scope': 1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-id': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-popper': 1.2.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-portal': 1.1.2(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-presence': 1.1.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-slot': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-controllable-state': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) aria-hidden: 1.2.4 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - react-remove-scroll: 2.6.0(@types/react@18.3.10)(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + react-remove-scroll: 2.6.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 - - '@radix-ui/react-popper@1.2.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@floating-ui/react-dom': 2.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-arrow': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-context': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-use-rect': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-use-size': 1.1.0(@types/react@18.3.10)(react@18.3.1) + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 + + '@radix-ui/react-popper@1.2.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': + dependencies: + '@floating-ui/react-dom': 2.1.2(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-arrow': 1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-context': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-callback-ref': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-layout-effect': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-rect': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-size': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) '@radix-ui/rect': 1.1.0 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-portal@1.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-portal@1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@babel/runtime': 7.25.6 - '@radix-ui/react-primitive': 1.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-primitive': 1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@radix-ui/react-portal@1.0.4(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-portal@1.0.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-primitive': 1.0.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-portal@1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-portal@1.1.2(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-layout-effect': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-presence@1.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-presence@1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@babel/runtime': 7.25.6 - '@radix-ui/react-compose-refs': 1.0.0(react@18.3.1) - '@radix-ui/react-use-layout-effect': 1.0.0(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-compose-refs': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + '@radix-ui/react-use-layout-effect': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@radix-ui/react-presence@1.0.1(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-presence@1.0.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-compose-refs': 1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-layout-effect': 1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-presence@1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-presence@1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-layout-effect': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-presence@1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-presence@1.1.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-layout-effect': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-primitive@1.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-primitive@1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@babel/runtime': 7.25.6 - '@radix-ui/react-slot': 1.0.0(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-slot': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@radix-ui/react-primitive@1.0.3(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-primitive@1.0.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 - '@radix-ui/react-slot': 1.0.2(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-slot': 1.0.2(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-primitive@2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-primitive@2.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-slot': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-slot': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-roving-focus@1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-roving-focus@1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: '@radix-ui/primitive': 1.1.0 - '@radix-ui/react-collection': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-context': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-direction': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-id': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-collection': 1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-context': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-direction': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-id': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-callback-ref': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-controllable-state': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-scroll-area@1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-scroll-area@1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: '@radix-ui/number': 1.1.0 '@radix-ui/primitive': 1.1.0 - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-context': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-direction': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-presence': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-context': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-direction': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-presence': 1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-callback-ref': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-layout-effect': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-slot@1.0.0(react@18.3.1)': + '@radix-ui/react-slot@1.0.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@babel/runtime': 7.25.6 - '@radix-ui/react-compose-refs': 1.0.0(react@18.3.1) - react: 18.3.1 + '@radix-ui/react-compose-refs': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@radix-ui/react-slot@1.0.2(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-slot@1.0.2(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 + '@radix-ui/react-compose-refs': 1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-slot@1.1.0(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-slot@1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 + '@radix-ui/react-compose-refs': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-tabs@1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@radix-ui/react-tabs@1.1.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1)': dependencies: '@radix-ui/primitive': 1.1.0 - '@radix-ui/react-context': 1.1.1(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-direction': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-id': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-presence': 1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-primitive': 2.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-roving-focus': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-use-controllable-state': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-context': 1.1.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-direction': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-id': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-presence': 1.1.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 2.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-roving-focus': 1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-use-controllable-state': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - '@types/react-dom': 18.3.0 + '@types/react': types-react@19.0.0-rc.1 + '@types/react-dom': types-react-dom@19.0.0-rc.1 - '@radix-ui/react-use-callback-ref@1.0.0(react@18.3.1)': + '@radix-ui/react-use-callback-ref@1.0.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@babel/runtime': 7.25.6 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@radix-ui/react-use-callback-ref@1.0.1(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-use-callback-ref@1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-use-callback-ref@1.1.0(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-use-callback-ref@1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-use-controllable-state@1.0.0(react@18.3.1)': + '@radix-ui/react-use-controllable-state@1.0.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@babel/runtime': 7.25.6 - '@radix-ui/react-use-callback-ref': 1.0.0(react@18.3.1) - react: 18.3.1 + '@radix-ui/react-use-callback-ref': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@radix-ui/react-use-controllable-state@1.0.1(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-use-controllable-state@1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 + '@radix-ui/react-use-callback-ref': 1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-use-controllable-state@1.1.0(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-use-controllable-state@1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 + '@radix-ui/react-use-callback-ref': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-use-escape-keydown@1.0.0(react@18.3.1)': + '@radix-ui/react-use-escape-keydown@1.0.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@babel/runtime': 7.25.6 - '@radix-ui/react-use-callback-ref': 1.0.0(react@18.3.1) - react: 18.3.1 + '@radix-ui/react-use-callback-ref': 1.0.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@radix-ui/react-use-escape-keydown@1.0.3(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-use-escape-keydown@1.0.3(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 + '@radix-ui/react-use-callback-ref': 1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-use-escape-keydown@1.1.0(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-use-escape-keydown@1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 + '@radix-ui/react-use-callback-ref': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-use-layout-effect@1.0.0(react@18.3.1)': + '@radix-ui/react-use-layout-effect@1.0.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@babel/runtime': 7.25.6 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@radix-ui/react-use-layout-effect@1.0.1(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-use-layout-effect@1.0.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: '@babel/runtime': 7.25.6 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-use-layout-effect@1.1.0(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-use-layout-effect@1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-use-rect@1.1.0(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-use-rect@1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: '@radix-ui/rect': 1.1.0 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - '@radix-ui/react-use-size@1.1.0(@types/react@18.3.10)(react@18.3.1)': + '@radix-ui/react-use-size@1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1)': dependencies: - '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@18.3.10)(react@18.3.1) - react: 18.3.1 + '@radix-ui/react-use-layout-effect': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 '@radix-ui/rect@1.1.0': {} - '@react-aria/accordion@3.0.0-alpha.34(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@react-aria/accordion@3.0.0-alpha.34(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/button': 3.10.0(react@18.3.1) - '@react-aria/selection': 3.20.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/tree': 3.8.5(react@18.3.1) - '@react-types/accordion': 3.0.0-alpha.24(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/selection': 3.20.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/tree': 3.8.5(react@19.0.0-rc-cd22717c-20241013) + '@react-types/accordion': 3.0.0-alpha.24(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@react-aria/breadcrumbs@3.5.17(react@18.3.1)': + '@react-aria/breadcrumbs@3.5.17(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/link': 3.7.5(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-types/breadcrumbs': 3.7.8(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/link': 3.7.5(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/breadcrumbs': 3.7.8(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/button@3.10.0(react@18.3.1)': + '@react-aria/button@3.10.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/toggle': 3.7.8(react@18.3.1) - '@react-types/button': 3.10.0(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/toggle': 3.7.8(react@19.0.0-rc-cd22717c-20241013) + '@react-types/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/calendar@3.5.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@react-aria/calendar@3.5.12(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@internationalized/date': 3.5.6 - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) '@react-aria/live-announcer': 3.4.0 - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/calendar': 3.5.5(react@18.3.1) - '@react-types/button': 3.10.0(react@18.3.1) - '@react-types/calendar': 3.4.10(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/calendar': 3.5.5(react@19.0.0-rc-cd22717c-20241013) + '@react-types/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/calendar': 3.4.10(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - - '@react-aria/checkbox@3.14.7(react@18.3.1)': - dependencies: - '@react-aria/form': 3.0.9(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/label': 3.7.12(react@18.3.1) - '@react-aria/toggle': 3.10.8(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/checkbox': 3.6.9(react@18.3.1) - '@react-stately/form': 3.0.6(react@18.3.1) - '@react-stately/toggle': 3.7.8(react@18.3.1) - '@react-types/checkbox': 3.8.4(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + + '@react-aria/checkbox@3.14.7(react@19.0.0-rc-cd22717c-20241013)': + dependencies: + '@react-aria/form': 3.0.9(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/label': 3.7.12(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/toggle': 3.10.8(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/checkbox': 3.6.9(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/form': 3.0.6(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/toggle': 3.7.8(react@19.0.0-rc-cd22717c-20241013) + '@react-types/checkbox': 3.8.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/collections@3.0.0-alpha.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@react-aria/collections@3.0.0-alpha.5(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/ssr': 3.9.6(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/ssr': 3.9.6(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - use-sync-external-store: 1.2.2(react@18.3.1) - - '@react-aria/color@3.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/numberfield': 3.11.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/slider': 3.7.12(react@18.3.1) - '@react-aria/spinbutton': 3.6.9(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/textfield': 3.14.9(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-aria/visually-hidden': 3.8.16(react@18.3.1) - '@react-stately/color': 3.8.0(react@18.3.1) - '@react-stately/form': 3.0.6(react@18.3.1) - '@react-types/color': 3.0.0(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + use-sync-external-store: 1.2.2(react@19.0.0-rc-cd22717c-20241013) + + '@react-aria/color@3.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': + dependencies: + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/numberfield': 3.11.7(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/slider': 3.7.12(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/spinbutton': 3.6.9(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/textfield': 3.14.9(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/visually-hidden': 3.8.16(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/color': 3.8.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/form': 3.0.6(react@19.0.0-rc-cd22717c-20241013) + '@react-types/color': 3.0.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@react-aria/combobox@3.10.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@react-aria/combobox@3.10.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/listbox': 3.13.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/listbox': 3.13.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) '@react-aria/live-announcer': 3.4.0 - '@react-aria/menu': 3.15.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/overlays': 3.23.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/selection': 3.20.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/textfield': 3.14.9(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/collections': 3.11.0(react@18.3.1) - '@react-stately/combobox': 3.10.0(react@18.3.1) - '@react-stately/form': 3.0.6(react@18.3.1) - '@react-types/button': 3.10.0(react@18.3.1) - '@react-types/combobox': 3.13.0(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/menu': 3.15.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/overlays': 3.23.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/selection': 3.20.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/textfield': 3.14.9(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/collections': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/combobox': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/form': 3.0.6(react@19.0.0-rc-cd22717c-20241013) + '@react-types/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/combobox': 3.13.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@react-aria/datepicker@3.11.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@react-aria/datepicker@3.11.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@internationalized/date': 3.5.6 '@internationalized/number': 3.5.4 '@internationalized/string': 3.2.4 - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/form': 3.0.9(react@18.3.1) - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/label': 3.7.12(react@18.3.1) - '@react-aria/spinbutton': 3.6.9(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/datepicker': 3.10.3(react@18.3.1) - '@react-stately/form': 3.0.6(react@18.3.1) - '@react-types/button': 3.10.0(react@18.3.1) - '@react-types/calendar': 3.4.10(react@18.3.1) - '@react-types/datepicker': 3.8.3(react@18.3.1) - '@react-types/dialog': 3.5.13(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/form': 3.0.9(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/label': 3.7.12(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/spinbutton': 3.6.9(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/datepicker': 3.10.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/form': 3.0.6(react@19.0.0-rc-cd22717c-20241013) + '@react-types/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/calendar': 3.4.10(react@19.0.0-rc-cd22717c-20241013) + '@react-types/datepicker': 3.8.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/dialog': 3.5.13(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@react-aria/dialog@3.5.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@react-aria/dialog@3.5.18(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/overlays': 3.23.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-types/dialog': 3.5.13(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/overlays': 3.23.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/dialog': 3.5.13(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - - '@react-aria/disclosure@3.0.0-alpha.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@react-aria/button': 3.10.0(react@18.3.1) - '@react-aria/selection': 3.20.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/ssr': 3.9.6(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/disclosure': 3.0.0-alpha.0(react@18.3.1) - '@react-stately/toggle': 3.7.8(react@18.3.1) - '@react-stately/tree': 3.8.5(react@18.3.1) - '@react-types/button': 3.10.0(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + + '@react-aria/disclosure@3.0.0-alpha.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': + dependencies: + '@react-aria/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/selection': 3.20.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/ssr': 3.9.6(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/disclosure': 3.0.0-alpha.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/toggle': 3.7.8(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/tree': 3.8.5(react@19.0.0-rc-cd22717c-20241013) + '@react-types/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@react-aria/dnd@3.7.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@react-aria/dnd@3.7.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@internationalized/string': 3.2.4 - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) '@react-aria/live-announcer': 3.4.0 - '@react-aria/overlays': 3.23.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/dnd': 3.4.3(react@18.3.1) - '@react-types/button': 3.10.0(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/overlays': 3.23.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/dnd': 3.4.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@react-aria/focus@3.18.3(react@18.3.1)': + '@react-aria/focus@3.18.3(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 clsx: 2.1.1 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/form@3.0.9(react@18.3.1)': + '@react-aria/form@3.0.9(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/form': 3.0.6(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/form': 3.0.6(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/grid@3.10.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@react-aria/grid@3.10.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) '@react-aria/live-announcer': 3.4.0 - '@react-aria/selection': 3.20.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/collections': 3.11.0(react@18.3.1) - '@react-stately/grid': 3.9.3(react@18.3.1) - '@react-stately/selection': 3.17.0(react@18.3.1) - '@react-types/checkbox': 3.8.4(react@18.3.1) - '@react-types/grid': 3.2.9(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/selection': 3.20.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/collections': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/grid': 3.9.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/selection': 3.17.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/checkbox': 3.8.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/grid': 3.2.9(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - - '@react-aria/gridlist@3.9.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/grid': 3.10.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/selection': 3.20.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/collections': 3.11.0(react@18.3.1) - '@react-stately/list': 3.11.0(react@18.3.1) - '@react-stately/tree': 3.8.5(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + + '@react-aria/gridlist@3.9.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': + dependencies: + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/grid': 3.10.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/selection': 3.20.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/collections': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/list': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/tree': 3.8.5(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@react-aria/i18n@3.12.3(react@18.3.1)': + '@react-aria/i18n@3.12.3(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@internationalized/date': 3.5.6 '@internationalized/message': 3.1.5 '@internationalized/number': 3.5.4 '@internationalized/string': 3.2.4 - '@react-aria/ssr': 3.9.6(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/ssr': 3.9.6(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/interactions@3.22.3(react@18.3.1)': + '@react-aria/interactions@3.22.3(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/ssr': 3.9.6(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/ssr': 3.9.6(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/label@3.7.12(react@18.3.1)': + '@react-aria/label@3.7.12(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/link@3.7.5(react@18.3.1)': + '@react-aria/link@3.7.5(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-types/link': 3.5.8(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/link': 3.5.8(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - - '@react-aria/listbox@3.13.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/label': 3.7.12(react@18.3.1) - '@react-aria/selection': 3.20.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/collections': 3.11.0(react@18.3.1) - '@react-stately/list': 3.11.0(react@18.3.1) - '@react-types/listbox': 3.5.2(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + + '@react-aria/listbox@3.13.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': + dependencies: + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/label': 3.7.12(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/selection': 3.20.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/collections': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/list': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/listbox': 3.5.2(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) '@react-aria/live-announcer@3.4.0': dependencies: '@swc/helpers': 0.5.13 - '@react-aria/menu@3.15.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/overlays': 3.23.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/selection': 3.20.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/collections': 3.11.0(react@18.3.1) - '@react-stately/menu': 3.8.3(react@18.3.1) - '@react-stately/tree': 3.8.5(react@18.3.1) - '@react-types/button': 3.10.0(react@18.3.1) - '@react-types/menu': 3.9.12(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/menu@3.15.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': + dependencies: + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/overlays': 3.23.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/selection': 3.20.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/collections': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/menu': 3.8.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/tree': 3.8.5(react@19.0.0-rc-cd22717c-20241013) + '@react-types/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/menu': 3.9.12(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@react-aria/meter@3.4.17(react@18.3.1)': + '@react-aria/meter@3.4.17(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/progress': 3.4.17(react@18.3.1) - '@react-types/meter': 3.4.4(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/progress': 3.4.17(react@19.0.0-rc-cd22717c-20241013) + '@react-types/meter': 3.4.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - - '@react-aria/numberfield@3.11.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/spinbutton': 3.6.9(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/textfield': 3.14.9(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/form': 3.0.6(react@18.3.1) - '@react-stately/numberfield': 3.9.7(react@18.3.1) - '@react-types/button': 3.10.0(react@18.3.1) - '@react-types/numberfield': 3.8.6(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + + '@react-aria/numberfield@3.11.7(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': + dependencies: + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/spinbutton': 3.6.9(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/textfield': 3.14.9(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/form': 3.0.6(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/numberfield': 3.9.7(react@19.0.0-rc-cd22717c-20241013) + '@react-types/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/numberfield': 3.8.6(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - - '@react-aria/overlays@3.23.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/ssr': 3.9.6(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-aria/visually-hidden': 3.8.16(react@18.3.1) - '@react-stately/overlays': 3.6.11(react@18.3.1) - '@react-types/button': 3.10.0(react@18.3.1) - '@react-types/overlays': 3.8.10(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + + '@react-aria/overlays@3.23.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': + dependencies: + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/ssr': 3.9.6(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/visually-hidden': 3.8.16(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/overlays': 3.6.11(react@19.0.0-rc-cd22717c-20241013) + '@react-types/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/overlays': 3.8.10(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@react-aria/progress@3.4.17(react@18.3.1)': + '@react-aria/progress@3.4.17(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/label': 3.7.12(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-types/progress': 3.5.7(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/label': 3.7.12(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/progress': 3.5.7(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - - '@react-aria/radio@3.10.8(react@18.3.1)': - dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/form': 3.0.9(react@18.3.1) - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/label': 3.7.12(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/radio': 3.10.8(react@18.3.1) - '@react-types/radio': 3.8.4(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + + '@react-aria/radio@3.10.8(react@19.0.0-rc-cd22717c-20241013)': + dependencies: + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/form': 3.0.9(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/label': 3.7.12(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/radio': 3.10.8(react@19.0.0-rc-cd22717c-20241013) + '@react-types/radio': 3.8.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/searchfield@3.7.9(react@18.3.1)': + '@react-aria/searchfield@3.7.9(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/textfield': 3.14.9(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/searchfield': 3.5.7(react@18.3.1) - '@react-types/button': 3.10.0(react@18.3.1) - '@react-types/searchfield': 3.5.9(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/textfield': 3.14.9(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/searchfield': 3.5.7(react@19.0.0-rc-cd22717c-20241013) + '@react-types/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/searchfield': 3.5.9(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - - '@react-aria/select@3.14.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@react-aria/form': 3.0.9(react@18.3.1) - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/label': 3.7.12(react@18.3.1) - '@react-aria/listbox': 3.13.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/menu': 3.15.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/selection': 3.20.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-aria/visually-hidden': 3.8.16(react@18.3.1) - '@react-stately/select': 3.6.8(react@18.3.1) - '@react-types/button': 3.10.0(react@18.3.1) - '@react-types/select': 3.9.7(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + + '@react-aria/select@3.14.10(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': + dependencies: + '@react-aria/form': 3.0.9(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/label': 3.7.12(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/listbox': 3.13.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/menu': 3.15.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/selection': 3.20.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/visually-hidden': 3.8.16(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/select': 3.6.8(react@19.0.0-rc-cd22717c-20241013) + '@react-types/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/select': 3.9.7(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@react-aria/selection@3.20.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@react-aria/selection@3.20.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/selection': 3.17.0(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/selection': 3.17.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@react-aria/separator@3.4.3(react@18.3.1)': + '@react-aria/separator@3.4.3(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - - '@react-aria/slider@3.7.12(react@18.3.1)': - dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/label': 3.7.12(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/slider': 3.5.8(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - '@react-types/slider': 3.7.6(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + + '@react-aria/slider@3.7.12(react@19.0.0-rc-cd22717c-20241013)': + dependencies: + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/label': 3.7.12(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/slider': 3.5.8(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/slider': 3.7.6(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/spinbutton@3.6.9(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@react-aria/spinbutton@3.6.9(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/i18n': 3.12.3(react@18.3.1) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) '@react-aria/live-announcer': 3.4.0 - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-types/button': 3.10.0(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@react-aria/ssr@3.9.6(react@18.3.1)': + '@react-aria/ssr@3.9.6(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/switch@3.6.8(react@18.3.1)': + '@react-aria/switch@3.6.8(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/toggle': 3.10.8(react@18.3.1) - '@react-stately/toggle': 3.7.8(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - '@react-types/switch': 3.5.6(react@18.3.1) + '@react-aria/toggle': 3.10.8(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/toggle': 3.7.8(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/switch': 3.5.6(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/table@3.15.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@react-aria/table@3.15.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/grid': 3.10.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/grid': 3.10.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) '@react-aria/live-announcer': 3.4.0 - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-aria/visually-hidden': 3.8.16(react@18.3.1) - '@react-stately/collections': 3.11.0(react@18.3.1) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/visually-hidden': 3.8.16(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/collections': 3.11.0(react@19.0.0-rc-cd22717c-20241013) '@react-stately/flags': 3.0.4 - '@react-stately/table': 3.12.3(react@18.3.1) - '@react-types/checkbox': 3.8.4(react@18.3.1) - '@react-types/grid': 3.2.9(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - '@react-types/table': 3.10.2(react@18.3.1) + '@react-stately/table': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/checkbox': 3.8.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/grid': 3.2.9(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/table': 3.10.2(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - - '@react-aria/tabs@3.9.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/selection': 3.20.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/tabs': 3.6.10(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - '@react-types/tabs': 3.3.10(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + + '@react-aria/tabs@3.9.6(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': + dependencies: + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/selection': 3.20.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/tabs': 3.6.10(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/tabs': 3.3.10(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - - '@react-aria/tag@3.4.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': - dependencies: - '@react-aria/gridlist': 3.9.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/label': 3.7.12(react@18.3.1) - '@react-aria/selection': 3.20.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/list': 3.11.0(react@18.3.1) - '@react-types/button': 3.10.0(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + + '@react-aria/tag@3.4.6(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': + dependencies: + '@react-aria/gridlist': 3.9.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/label': 3.7.12(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/selection': 3.20.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/list': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - - '@react-aria/textfield@3.14.9(react@18.3.1)': - dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/form': 3.0.9(react@18.3.1) - '@react-aria/label': 3.7.12(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/form': 3.0.6(react@18.3.1) - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - '@react-types/textfield': 3.9.7(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + + '@react-aria/textfield@3.14.9(react@19.0.0-rc-cd22717c-20241013)': + dependencies: + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/form': 3.0.9(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/label': 3.7.12(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/form': 3.0.6(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/textfield': 3.9.7(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/toggle@3.10.8(react@18.3.1)': + '@react-aria/toggle@3.10.8(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/toggle': 3.7.8(react@18.3.1) - '@react-types/checkbox': 3.8.4(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/toggle': 3.7.8(react@19.0.0-rc-cd22717c-20241013) + '@react-types/checkbox': 3.8.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/toolbar@3.0.0-beta.4(react@18.3.1)': + '@react-aria/toolbar@3.0.0-beta.4(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/toolbar@3.0.0-beta.9(react@18.3.1)': + '@react-aria/toolbar@3.0.0-beta.9(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/tooltip@3.7.8(react@18.3.1)': + '@react-aria/tooltip@3.7.8(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/tooltip': 3.4.13(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - '@react-types/tooltip': 3.4.12(react@18.3.1) + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/tooltip': 3.4.13(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/tooltip': 3.4.12(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/tree@3.0.0-beta.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@react-aria/tree@3.0.0-beta.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/gridlist': 3.9.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/selection': 3.20.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/tree': 3.8.5(react@18.3.1) - '@react-types/button': 3.10.0(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/gridlist': 3.9.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/selection': 3.20.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/tree': 3.8.5(react@19.0.0-rc-cd22717c-20241013) + '@react-types/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@react-aria/utils@3.25.3(react@18.3.1)': + '@react-aria/utils@3.25.3(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/ssr': 3.9.6(react@18.3.1) - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/ssr': 3.9.6(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 clsx: 2.1.1 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-aria/virtualizer@4.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@react-aria/virtualizer@4.0.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-stately/virtualizer': 4.1.0(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/virtualizer': 4.1.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - '@react-aria/visually-hidden@3.8.16(react@18.3.1)': + '@react-aria/visually-hidden@3.8.16(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/calendar@3.5.5(react@18.3.1)': + '@react-stately/calendar@3.5.5(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@internationalized/date': 3.5.6 - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/calendar': 3.4.10(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/calendar': 3.4.10(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/checkbox@3.6.9(react@18.3.1)': + '@react-stately/checkbox@3.6.9(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/form': 3.0.6(react@18.3.1) - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/checkbox': 3.8.4(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-stately/form': 3.0.6(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/checkbox': 3.8.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/collections@3.11.0(react@18.3.1)': + '@react-stately/collections@3.11.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/color@3.8.0(react@18.3.1)': + '@react-stately/color@3.8.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@internationalized/number': 3.5.4 '@internationalized/string': 3.2.4 - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-stately/form': 3.0.6(react@18.3.1) - '@react-stately/numberfield': 3.9.7(react@18.3.1) - '@react-stately/slider': 3.5.8(react@18.3.1) - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/color': 3.0.0(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/form': 3.0.6(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/numberfield': 3.9.7(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/slider': 3.5.8(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/color': 3.0.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 - - '@react-stately/combobox@3.10.0(react@18.3.1)': - dependencies: - '@react-stately/collections': 3.11.0(react@18.3.1) - '@react-stately/form': 3.0.6(react@18.3.1) - '@react-stately/list': 3.11.0(react@18.3.1) - '@react-stately/overlays': 3.6.11(react@18.3.1) - '@react-stately/select': 3.6.8(react@18.3.1) - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/combobox': 3.13.0(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + + '@react-stately/combobox@3.10.0(react@19.0.0-rc-cd22717c-20241013)': + dependencies: + '@react-stately/collections': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/form': 3.0.6(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/list': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/overlays': 3.6.11(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/select': 3.6.8(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/combobox': 3.13.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/data@3.11.7(react@18.3.1)': + '@react-stately/data@3.11.7(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/datepicker@3.10.3(react@18.3.1)': + '@react-stately/datepicker@3.10.3(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@internationalized/date': 3.5.6 '@internationalized/string': 3.2.4 - '@react-stately/form': 3.0.6(react@18.3.1) - '@react-stately/overlays': 3.6.11(react@18.3.1) - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/datepicker': 3.8.3(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-stately/form': 3.0.6(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/overlays': 3.6.11(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/datepicker': 3.8.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/disclosure@3.0.0-alpha.0(react@18.3.1)': + '@react-stately/disclosure@3.0.0-alpha.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/dnd@3.4.3(react@18.3.1)': + '@react-stately/dnd@3.4.3(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/selection': 3.17.0(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-stately/selection': 3.17.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 '@react-stately/flags@3.0.4': dependencies: '@swc/helpers': 0.5.13 - '@react-stately/form@3.0.6(react@18.3.1)': + '@react-stately/form@3.0.6(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/grid@3.9.3(react@18.3.1)': + '@react-stately/grid@3.9.3(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/collections': 3.11.0(react@18.3.1) - '@react-stately/selection': 3.17.0(react@18.3.1) - '@react-types/grid': 3.2.9(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-stately/collections': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/selection': 3.17.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/grid': 3.2.9(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/layout@4.0.3(react@18.3.1)': + '@react-stately/layout@4.0.3(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/collections': 3.11.0(react@18.3.1) - '@react-stately/table': 3.12.3(react@18.3.1) - '@react-stately/virtualizer': 4.1.0(react@18.3.1) - '@react-types/grid': 3.2.9(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - '@react-types/table': 3.10.2(react@18.3.1) + '@react-stately/collections': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/table': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/virtualizer': 4.1.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/grid': 3.2.9(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/table': 3.10.2(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/list@3.11.0(react@18.3.1)': + '@react-stately/list@3.11.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/collections': 3.11.0(react@18.3.1) - '@react-stately/selection': 3.17.0(react@18.3.1) - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-stately/collections': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/selection': 3.17.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/menu@3.8.3(react@18.3.1)': + '@react-stately/menu@3.8.3(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/overlays': 3.6.11(react@18.3.1) - '@react-types/menu': 3.9.12(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-stately/overlays': 3.6.11(react@19.0.0-rc-cd22717c-20241013) + '@react-types/menu': 3.9.12(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/numberfield@3.9.7(react@18.3.1)': + '@react-stately/numberfield@3.9.7(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@internationalized/number': 3.5.4 - '@react-stately/form': 3.0.6(react@18.3.1) - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/numberfield': 3.8.6(react@18.3.1) + '@react-stately/form': 3.0.6(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/numberfield': 3.8.6(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/overlays@3.6.11(react@18.3.1)': + '@react-stately/overlays@3.6.11(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/overlays': 3.8.10(react@18.3.1) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/overlays': 3.8.10(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/radio@3.10.8(react@18.3.1)': + '@react-stately/radio@3.10.8(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/form': 3.0.6(react@18.3.1) - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/radio': 3.8.4(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-stately/form': 3.0.6(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/radio': 3.8.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/searchfield@3.5.7(react@18.3.1)': + '@react-stately/searchfield@3.5.7(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/searchfield': 3.5.9(react@18.3.1) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/searchfield': 3.5.9(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/select@3.6.8(react@18.3.1)': + '@react-stately/select@3.6.8(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/form': 3.0.6(react@18.3.1) - '@react-stately/list': 3.11.0(react@18.3.1) - '@react-stately/overlays': 3.6.11(react@18.3.1) - '@react-types/select': 3.9.7(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-stately/form': 3.0.6(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/list': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/overlays': 3.6.11(react@19.0.0-rc-cd22717c-20241013) + '@react-types/select': 3.9.7(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/selection@3.17.0(react@18.3.1)': + '@react-stately/selection@3.17.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/collections': 3.11.0(react@18.3.1) - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-stately/collections': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/slider@3.5.8(react@18.3.1)': + '@react-stately/slider@3.5.8(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - '@react-types/slider': 3.7.6(react@18.3.1) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/slider': 3.7.6(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/table@3.12.3(react@18.3.1)': + '@react-stately/table@3.12.3(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/collections': 3.11.0(react@18.3.1) + '@react-stately/collections': 3.11.0(react@19.0.0-rc-cd22717c-20241013) '@react-stately/flags': 3.0.4 - '@react-stately/grid': 3.9.3(react@18.3.1) - '@react-stately/selection': 3.17.0(react@18.3.1) - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/grid': 3.2.9(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - '@react-types/table': 3.10.2(react@18.3.1) + '@react-stately/grid': 3.9.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/selection': 3.17.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/grid': 3.2.9(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/table': 3.10.2(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/tabs@3.6.10(react@18.3.1)': + '@react-stately/tabs@3.6.10(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/list': 3.11.0(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - '@react-types/tabs': 3.3.10(react@18.3.1) + '@react-stately/list': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/tabs': 3.3.10(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/toggle@3.7.8(react@18.3.1)': + '@react-stately/toggle@3.7.8(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/checkbox': 3.8.4(react@18.3.1) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/checkbox': 3.8.4(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/tooltip@3.4.13(react@18.3.1)': + '@react-stately/tooltip@3.4.13(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/overlays': 3.6.11(react@18.3.1) - '@react-types/tooltip': 3.4.12(react@18.3.1) + '@react-stately/overlays': 3.6.11(react@19.0.0-rc-cd22717c-20241013) + '@react-types/tooltip': 3.4.12(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/tree@3.8.5(react@18.3.1)': + '@react-stately/tree@3.8.5(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-stately/collections': 3.11.0(react@18.3.1) - '@react-stately/selection': 3.17.0(react@18.3.1) - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-stately/collections': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/selection': 3.17.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/utils@3.10.4(react@18.3.1)': + '@react-stately/utils@3.10.4(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-stately/virtualizer@4.1.0(react@18.3.1)': + '@react-stately/virtualizer@4.1.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/accordion@3.0.0-alpha.24(react@18.3.1)': + '@react-types/accordion@3.0.0-alpha.24(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/breadcrumbs@3.7.8(react@18.3.1)': + '@react-types/breadcrumbs@3.7.8(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/link': 3.5.8(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/link': 3.5.8(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/button@3.10.0(react@18.3.1)': + '@react-types/button@3.10.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/calendar@3.4.10(react@18.3.1)': + '@react-types/calendar@3.4.10(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@internationalized/date': 3.5.6 - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/checkbox@3.8.4(react@18.3.1)': + '@react-types/checkbox@3.8.4(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/color@3.0.0(react@18.3.1)': + '@react-types/color@3.0.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - '@react-types/slider': 3.7.6(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/slider': 3.7.6(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/combobox@3.13.0(react@18.3.1)': + '@react-types/combobox@3.13.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/datepicker@3.8.3(react@18.3.1)': + '@react-types/datepicker@3.8.3(react@19.0.0-rc-cd22717c-20241013)': dependencies: '@internationalized/date': 3.5.6 - '@react-types/calendar': 3.4.10(react@18.3.1) - '@react-types/overlays': 3.8.10(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/calendar': 3.4.10(react@19.0.0-rc-cd22717c-20241013) + '@react-types/overlays': 3.8.10(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/dialog@3.5.13(react@18.3.1)': + '@react-types/dialog@3.5.13(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/overlays': 3.8.10(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/overlays': 3.8.10(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/form@3.7.7(react@18.3.1)': + '@react-types/form@3.7.7(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/grid@3.2.9(react@18.3.1)': + '@react-types/grid@3.2.9(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/link@3.5.8(react@18.3.1)': + '@react-types/link@3.5.8(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/listbox@3.5.2(react@18.3.1)': + '@react-types/listbox@3.5.2(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/menu@3.9.12(react@18.3.1)': + '@react-types/menu@3.9.12(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/overlays': 3.8.10(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/overlays': 3.8.10(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/meter@3.4.4(react@18.3.1)': + '@react-types/meter@3.4.4(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/progress': 3.5.7(react@18.3.1) - react: 18.3.1 + '@react-types/progress': 3.5.7(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/numberfield@3.8.6(react@18.3.1)': + '@react-types/numberfield@3.8.6(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/overlays@3.8.10(react@18.3.1)': + '@react-types/overlays@3.8.10(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/progress@3.5.7(react@18.3.1)': + '@react-types/progress@3.5.7(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/radio@3.8.4(react@18.3.1)': + '@react-types/radio@3.8.4(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/searchfield@3.5.9(react@18.3.1)': + '@react-types/searchfield@3.5.9(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - '@react-types/textfield': 3.9.7(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/textfield': 3.9.7(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/select@3.9.7(react@18.3.1)': + '@react-types/select@3.9.7(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/shared@3.25.0(react@18.3.1)': + '@react-types/shared@3.25.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/slider@3.7.6(react@18.3.1)': + '@react-types/slider@3.7.6(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/switch@3.5.6(react@18.3.1)': + '@react-types/switch@3.5.6(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/table@3.10.2(react@18.3.1)': + '@react-types/table@3.10.2(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/grid': 3.2.9(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/grid': 3.2.9(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/tabs@3.3.10(react@18.3.1)': + '@react-types/tabs@3.3.10(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/textfield@3.9.7(react@18.3.1)': + '@react-types/textfield@3.9.7(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@react-types/tooltip@3.4.12(react@18.3.1)': + '@react-types/tooltip@3.4.12(react@19.0.0-rc-cd22717c-20241013)': dependencies: - '@react-types/overlays': 3.8.10(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 + '@react-types/overlays': 3.8.10(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 - '@remixicon/react@4.2.0(react@18.3.1)': + '@remixicon/react@4.2.0(react@19.0.0-rc-cd22717c-20241013)': dependencies: - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 '@rtsao/scc@1.1.0': {} @@ -9015,11 +9013,6 @@ snapshots: dependencies: tslib: 2.7.0 - '@swc/helpers@0.5.5': - dependencies: - '@swc/counter': 0.1.3 - tslib: 2.7.0 - '@szmarczak/http-timer@5.0.1': dependencies: defer-to-connect: 2.0.1 @@ -9162,10 +9155,6 @@ snapshots: '@types/prop-types@15.7.13': {} - '@types/react-dom@18.3.0': - dependencies: - '@types/react': 18.3.10 - '@types/react@18.3.10': dependencies: '@types/prop-types': 15.7.13 @@ -9273,12 +9262,12 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@vercel/analytics@1.3.1(next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)': + '@vercel/analytics@1.3.1(next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)': dependencies: server-only: 0.0.1 optionalDependencies: - next: 14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react: 18.3.1 + next: 15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 JSONStream@1.3.5: dependencies: @@ -9638,20 +9627,20 @@ snapshots: clsx@2.1.1: {} - cmdk@0.2.1(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + cmdk@0.2.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1): dependencies: - '@radix-ui/react-dialog': 1.0.0(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-dialog': 1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) transitivePeerDependencies: - '@types/react' - cmdk@1.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + cmdk@1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1): dependencies: - '@radix-ui/react-dialog': 1.0.5(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@radix-ui/react-dialog': 1.0.5(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-primitive': 1.0.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) transitivePeerDependencies: - '@types/react' - '@types/react-dom' @@ -10140,7 +10129,7 @@ snapshots: debug: 4.3.7 enhanced-resolve: 5.17.1 eslint: 8.57.1 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.1))(eslint@8.57.1) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1) fast-glob: 3.3.2 get-tsconfig: 4.8.1 is-bun-module: 1.2.1 @@ -10153,7 +10142,7 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.1))(eslint@8.57.1): + eslint-module-utils@2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1): dependencies: debug: 3.2.7 optionalDependencies: @@ -10175,7 +10164,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.30.0)(eslint@8.57.1))(eslint@8.57.1) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.3)(eslint@8.57.1) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3 @@ -10476,12 +10465,12 @@ snapshots: fraction.js@4.3.7: {} - framer-motion@11.11.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + framer-motion@11.11.8(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013): dependencies: tslib: 2.7.0 optionalDependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) fs-extra@11.2.0: dependencies: @@ -10506,7 +10495,7 @@ snapshots: fsevents@2.3.3: optional: true - fumadocs-core@13.4.10(@types/react@18.3.10)(next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + fumadocs-core@13.4.10(next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013))(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1): dependencies: '@formatjs/intl-localematcher': 0.5.4 '@shikijs/rehype': 1.21.0 @@ -10515,17 +10504,17 @@ snapshots: github-slugger: 2.0.0 image-size: 1.1.1 negotiator: 0.6.3 - next: 14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) npm-to-yarn: 3.0.0 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - react-remove-scroll: 2.6.0(@types/react@18.3.10)(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + react-remove-scroll: 2.6.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) remark: 15.0.1 remark-gfm: 4.0.0 remark-mdx: 3.0.1 scroll-into-view-if-needed: 3.1.0 shiki: 1.21.0 - swr: 2.2.5(react@18.3.1) + swr: 2.2.5(react@19.0.0-rc-cd22717c-20241013) unist-util-visit: 5.0.0 transitivePeerDependencies: - '@types/react' @@ -10543,7 +10532,7 @@ snapshots: - supports-color - typescript - fumadocs-mdx@10.0.2(fumadocs-core@13.4.10(@types/react@18.3.10)(next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1)): + fumadocs-mdx@10.0.2(fumadocs-core@13.4.10(next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013))(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1))(next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)): dependencies: '@mdx-js/mdx': 3.0.1 chokidar: 3.6.0 @@ -10551,10 +10540,10 @@ snapshots: esbuild: 0.23.1 estree-util-value-to-estree: 3.1.2 fast-glob: 3.3.2 - fumadocs-core: 13.4.10(@types/react@18.3.10)(next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + fumadocs-core: 13.4.10(next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013))(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) gray-matter: 4.0.3 micromatch: 4.0.8 - next: 14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) zod: 3.23.8 transitivePeerDependencies: - supports-color @@ -10570,26 +10559,26 @@ snapshots: transitivePeerDependencies: - supports-color - fumadocs-ui@13.4.10(@types/react-dom@18.3.0)(@types/react@18.3.10)(next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(tailwindcss@3.4.13(ts-node@10.9.2(@types/node@18.19.54)(typescript@5.6.2))): + fumadocs-ui@13.4.10(next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013))(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(tailwindcss@3.4.13(ts-node@10.9.2(@types/node@18.19.54)(typescript@5.6.2)))(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1): dependencies: - '@radix-ui/react-accordion': 1.2.1(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-collapsible': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-dialog': 1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-direction': 1.1.0(@types/react@18.3.10)(react@18.3.1) - '@radix-ui/react-popover': 1.1.2(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-scroll-area': 1.1.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@radix-ui/react-tabs': 1.1.1(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-accordion': 1.2.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-collapsible': 1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-dialog': 1.1.2(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-direction': 1.1.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + '@radix-ui/react-popover': 1.1.2(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-scroll-area': 1.1.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + '@radix-ui/react-tabs': 1.1.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) '@tailwindcss/typography': 0.5.15(tailwindcss@3.4.13(ts-node@10.9.2(@types/node@18.19.54)(typescript@5.6.2))) class-variance-authority: 0.7.0 - cmdk: 1.0.0(@types/react-dom@18.3.0)(@types/react@18.3.10)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - fumadocs-core: 13.4.10(@types/react@18.3.10)(next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - lucide-react: 0.438.0(react@18.3.1) - next: 14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - next-themes: 0.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - react-medium-image-zoom: 5.2.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - swr: 2.2.5(react@18.3.1) + cmdk: 1.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react-dom@19.0.0-rc.1)(types-react@19.0.0-rc.1) + fumadocs-core: 13.4.10(next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013))(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + lucide-react: 0.438.0(react@19.0.0-rc-cd22717c-20241013) + next: 15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + next-themes: 0.3.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + react-medium-image-zoom: 5.2.10(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + swr: 2.2.5(react@19.0.0-rc-cd22717c-20241013) tailwind-merge: 2.5.2 transitivePeerDependencies: - '@types/react' @@ -10608,9 +10597,9 @@ snapshots: functions-have-names@1.2.3: {} - geist@1.3.1(next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1)): + geist@1.3.1(next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013)): dependencies: - next: 14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) gensync@1.0.0-beta.2: {} @@ -11329,13 +11318,13 @@ snapshots: dependencies: yallist: 4.0.0 - lucide-react@0.311.0(react@18.3.1): + lucide-react@0.311.0(react@19.0.0-rc-cd22717c-20241013): dependencies: - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 - lucide-react@0.438.0(react@18.3.1): + lucide-react@0.438.0(react@19.0.0-rc-cd22717c-20241013): dependencies: - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 make-error@1.3.6: {} @@ -12176,49 +12165,49 @@ snapshots: negotiator@0.6.3: {} - next-mdx-remote@4.4.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next-mdx-remote@4.4.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013): dependencies: '@mdx-js/mdx': 2.3.0 - '@mdx-js/react': 2.3.0(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@mdx-js/react': 2.3.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) vfile: 5.3.7 vfile-matter: 3.0.1 transitivePeerDependencies: - supports-color - next-themes@0.2.1(next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next-themes@0.2.1(next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013))(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013): dependencies: - next: 14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + next: 15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - next-themes@0.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next-themes@0.3.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013): dependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - next@14.2.14(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next@15.0.0-rc.1(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013): dependencies: - '@next/env': 14.2.14 - '@swc/helpers': 0.5.5 + '@next/env': 15.0.0-rc.1 + '@swc/counter': 0.1.3 + '@swc/helpers': 0.5.13 busboy: 1.6.0 caniuse-lite: 1.0.30001664 - graceful-fs: 4.2.11 postcss: 8.4.31 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - styled-jsx: 5.1.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + styled-jsx: 5.1.6(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@next/swc-darwin-arm64': 14.2.14 - '@next/swc-darwin-x64': 14.2.14 - '@next/swc-linux-arm64-gnu': 14.2.14 - '@next/swc-linux-arm64-musl': 14.2.14 - '@next/swc-linux-x64-gnu': 14.2.14 - '@next/swc-linux-x64-musl': 14.2.14 - '@next/swc-win32-arm64-msvc': 14.2.14 - '@next/swc-win32-ia32-msvc': 14.2.14 - '@next/swc-win32-x64-msvc': 14.2.14 + '@next/swc-darwin-arm64': 15.0.0-rc.1 + '@next/swc-darwin-x64': 15.0.0-rc.1 + '@next/swc-linux-arm64-gnu': 15.0.0-rc.1 + '@next/swc-linux-arm64-musl': 15.0.0-rc.1 + '@next/swc-linux-x64-gnu': 15.0.0-rc.1 + '@next/swc-linux-x64-musl': 15.0.0-rc.1 + '@next/swc-win32-arm64-msvc': 15.0.0-rc.1 + '@next/swc-win32-x64-msvc': 15.0.0-rc.1 + sharp: 0.33.5 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -12569,185 +12558,182 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 - react-aria-components@1.4.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + react-aria-components@1.4.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013): dependencies: '@internationalized/date': 3.5.6 '@internationalized/string': 3.2.4 - '@react-aria/accordion': 3.0.0-alpha.34(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/collections': 3.0.0-alpha.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/color': 3.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/disclosure': 3.0.0-alpha.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/dnd': 3.7.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) + '@react-aria/accordion': 3.0.0-alpha.34(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/collections': 3.0.0-alpha.5(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/color': 3.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/disclosure': 3.0.0-alpha.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/dnd': 3.7.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) '@react-aria/live-announcer': 3.4.0 - '@react-aria/menu': 3.15.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/toolbar': 3.0.0-beta.9(react@18.3.1) - '@react-aria/tree': 3.0.0-beta.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-aria/virtualizer': 4.0.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-stately/color': 3.8.0(react@18.3.1) - '@react-stately/disclosure': 3.0.0-alpha.0(react@18.3.1) - '@react-stately/layout': 4.0.3(react@18.3.1) - '@react-stately/menu': 3.8.3(react@18.3.1) - '@react-stately/table': 3.12.3(react@18.3.1) - '@react-stately/utils': 3.10.4(react@18.3.1) - '@react-stately/virtualizer': 4.1.0(react@18.3.1) - '@react-types/color': 3.0.0(react@18.3.1) - '@react-types/form': 3.7.7(react@18.3.1) - '@react-types/grid': 3.2.9(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - '@react-types/table': 3.10.2(react@18.3.1) + '@react-aria/menu': 3.15.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/toolbar': 3.0.0-beta.9(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/tree': 3.0.0-beta.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/virtualizer': 4.0.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/color': 3.8.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/disclosure': 3.0.0-alpha.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/layout': 4.0.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/menu': 3.8.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/table': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/utils': 3.10.4(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/virtualizer': 4.1.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/color': 3.0.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/form': 3.7.7(react@19.0.0-rc-cd22717c-20241013) + '@react-types/grid': 3.2.9(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + '@react-types/table': 3.10.2(react@19.0.0-rc-cd22717c-20241013) '@swc/helpers': 0.5.13 client-only: 0.0.1 - react: 18.3.1 - react-aria: 3.35.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react-dom: 18.3.1(react@18.3.1) - react-stately: 3.33.0(react@18.3.1) - use-sync-external-store: 1.2.2(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-aria: 3.35.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + react-stately: 3.33.0(react@19.0.0-rc-cd22717c-20241013) + use-sync-external-store: 1.2.2(react@19.0.0-rc-cd22717c-20241013) - react-aria@3.35.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + react-aria@3.35.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013): dependencies: '@internationalized/string': 3.2.4 - '@react-aria/breadcrumbs': 3.5.17(react@18.3.1) - '@react-aria/button': 3.10.0(react@18.3.1) - '@react-aria/calendar': 3.5.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/checkbox': 3.14.7(react@18.3.1) - '@react-aria/color': 3.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/combobox': 3.10.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/datepicker': 3.11.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/dialog': 3.5.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/dnd': 3.7.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/focus': 3.18.3(react@18.3.1) - '@react-aria/gridlist': 3.9.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/i18n': 3.12.3(react@18.3.1) - '@react-aria/interactions': 3.22.3(react@18.3.1) - '@react-aria/label': 3.7.12(react@18.3.1) - '@react-aria/link': 3.7.5(react@18.3.1) - '@react-aria/listbox': 3.13.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/menu': 3.15.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/meter': 3.4.17(react@18.3.1) - '@react-aria/numberfield': 3.11.7(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/overlays': 3.23.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/progress': 3.4.17(react@18.3.1) - '@react-aria/radio': 3.10.8(react@18.3.1) - '@react-aria/searchfield': 3.7.9(react@18.3.1) - '@react-aria/select': 3.14.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/selection': 3.20.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/separator': 3.4.3(react@18.3.1) - '@react-aria/slider': 3.7.12(react@18.3.1) - '@react-aria/ssr': 3.9.6(react@18.3.1) - '@react-aria/switch': 3.6.8(react@18.3.1) - '@react-aria/table': 3.15.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/tabs': 3.9.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/tag': 3.4.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@react-aria/textfield': 3.14.9(react@18.3.1) - '@react-aria/tooltip': 3.7.8(react@18.3.1) - '@react-aria/utils': 3.25.3(react@18.3.1) - '@react-aria/visually-hidden': 3.8.16(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - - react-dom@18.3.1(react@18.3.1): - dependencies: - loose-envify: 1.4.0 - react: 18.3.1 - scheduler: 0.23.2 + '@react-aria/breadcrumbs': 3.5.17(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/button': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/calendar': 3.5.12(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/checkbox': 3.14.7(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/color': 3.0.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/combobox': 3.10.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/datepicker': 3.11.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/dialog': 3.5.18(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/dnd': 3.7.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/focus': 3.18.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/gridlist': 3.9.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/i18n': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/interactions': 3.22.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/label': 3.7.12(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/link': 3.7.5(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/listbox': 3.13.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/menu': 3.15.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/meter': 3.4.17(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/numberfield': 3.11.7(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/overlays': 3.23.3(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/progress': 3.4.17(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/radio': 3.10.8(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/searchfield': 3.7.9(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/select': 3.14.10(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/selection': 3.20.0(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/separator': 3.4.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/slider': 3.7.12(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/ssr': 3.9.6(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/switch': 3.6.8(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/table': 3.15.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/tabs': 3.9.6(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/tag': 3.4.6(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/textfield': 3.14.9(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/tooltip': 3.7.8(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/utils': 3.25.3(react@19.0.0-rc-cd22717c-20241013) + '@react-aria/visually-hidden': 3.8.16(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + + react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013): + dependencies: + react: 19.0.0-rc-cd22717c-20241013 + scheduler: 0.25.0-rc-cd22717c-20241013 react-is@16.13.1: {} - react-medium-image-zoom@5.2.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + react-medium-image-zoom@5.2.10(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013): dependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) - react-remove-scroll-bar@2.3.6(@types/react@18.3.10)(react@18.3.1): + react-remove-scroll-bar@2.3.6(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1): dependencies: - react: 18.3.1 - react-style-singleton: 2.2.1(@types/react@18.3.10)(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-style-singleton: 2.2.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) tslib: 2.7.0 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - react-remove-scroll@2.5.4(@types/react@18.3.10)(react@18.3.1): + react-remove-scroll@2.5.4(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1): dependencies: - react: 18.3.1 - react-remove-scroll-bar: 2.3.6(@types/react@18.3.10)(react@18.3.1) - react-style-singleton: 2.2.1(@types/react@18.3.10)(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-remove-scroll-bar: 2.3.6(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react-style-singleton: 2.2.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) tslib: 2.7.0 - use-callback-ref: 1.3.2(@types/react@18.3.10)(react@18.3.1) - use-sidecar: 1.1.2(@types/react@18.3.10)(react@18.3.1) + use-callback-ref: 1.3.2(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + use-sidecar: 1.1.2(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - react-remove-scroll@2.5.5(@types/react@18.3.10)(react@18.3.1): + react-remove-scroll@2.5.5(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1): dependencies: - react: 18.3.1 - react-remove-scroll-bar: 2.3.6(@types/react@18.3.10)(react@18.3.1) - react-style-singleton: 2.2.1(@types/react@18.3.10)(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-remove-scroll-bar: 2.3.6(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react-style-singleton: 2.2.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) tslib: 2.7.0 - use-callback-ref: 1.3.2(@types/react@18.3.10)(react@18.3.1) - use-sidecar: 1.1.2(@types/react@18.3.10)(react@18.3.1) + use-callback-ref: 1.3.2(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + use-sidecar: 1.1.2(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - react-remove-scroll@2.6.0(@types/react@18.3.10)(react@18.3.1): + react-remove-scroll@2.6.0(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1): dependencies: - react: 18.3.1 - react-remove-scroll-bar: 2.3.6(@types/react@18.3.10)(react@18.3.1) - react-style-singleton: 2.2.1(@types/react@18.3.10)(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + react-remove-scroll-bar: 2.3.6(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + react-style-singleton: 2.2.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) tslib: 2.7.0 - use-callback-ref: 1.3.2(@types/react@18.3.10)(react@18.3.1) - use-sidecar: 1.1.2(@types/react@18.3.10)(react@18.3.1) + use-callback-ref: 1.3.2(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) + use-sidecar: 1.1.2(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1) optionalDependencies: - '@types/react': 18.3.10 - - react-resizable-panels@2.1.4(react-dom@18.3.1(react@18.3.1))(react@18.3.1): - dependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - - react-stately@3.33.0(react@18.3.1): - dependencies: - '@react-stately/calendar': 3.5.5(react@18.3.1) - '@react-stately/checkbox': 3.6.9(react@18.3.1) - '@react-stately/collections': 3.11.0(react@18.3.1) - '@react-stately/color': 3.8.0(react@18.3.1) - '@react-stately/combobox': 3.10.0(react@18.3.1) - '@react-stately/data': 3.11.7(react@18.3.1) - '@react-stately/datepicker': 3.10.3(react@18.3.1) - '@react-stately/dnd': 3.4.3(react@18.3.1) - '@react-stately/form': 3.0.6(react@18.3.1) - '@react-stately/list': 3.11.0(react@18.3.1) - '@react-stately/menu': 3.8.3(react@18.3.1) - '@react-stately/numberfield': 3.9.7(react@18.3.1) - '@react-stately/overlays': 3.6.11(react@18.3.1) - '@react-stately/radio': 3.10.8(react@18.3.1) - '@react-stately/searchfield': 3.5.7(react@18.3.1) - '@react-stately/select': 3.6.8(react@18.3.1) - '@react-stately/selection': 3.17.0(react@18.3.1) - '@react-stately/slider': 3.5.8(react@18.3.1) - '@react-stately/table': 3.12.3(react@18.3.1) - '@react-stately/tabs': 3.6.10(react@18.3.1) - '@react-stately/toggle': 3.7.8(react@18.3.1) - '@react-stately/tooltip': 3.4.13(react@18.3.1) - '@react-stately/tree': 3.8.5(react@18.3.1) - '@react-types/shared': 3.25.0(react@18.3.1) - react: 18.3.1 - - react-style-singleton@2.2.1(@types/react@18.3.10)(react@18.3.1): + '@types/react': types-react@19.0.0-rc.1 + + react-resizable-panels@2.1.4(react-dom@19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013))(react@19.0.0-rc-cd22717c-20241013): + dependencies: + react: 19.0.0-rc-cd22717c-20241013 + react-dom: 19.0.0-rc-cd22717c-20241013(react@19.0.0-rc-cd22717c-20241013) + + react-stately@3.33.0(react@19.0.0-rc-cd22717c-20241013): + dependencies: + '@react-stately/calendar': 3.5.5(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/checkbox': 3.6.9(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/collections': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/color': 3.8.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/combobox': 3.10.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/data': 3.11.7(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/datepicker': 3.10.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/dnd': 3.4.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/form': 3.0.6(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/list': 3.11.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/menu': 3.8.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/numberfield': 3.9.7(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/overlays': 3.6.11(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/radio': 3.10.8(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/searchfield': 3.5.7(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/select': 3.6.8(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/selection': 3.17.0(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/slider': 3.5.8(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/table': 3.12.3(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/tabs': 3.6.10(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/toggle': 3.7.8(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/tooltip': 3.4.13(react@19.0.0-rc-cd22717c-20241013) + '@react-stately/tree': 3.8.5(react@19.0.0-rc-cd22717c-20241013) + '@react-types/shared': 3.25.0(react@19.0.0-rc-cd22717c-20241013) + react: 19.0.0-rc-cd22717c-20241013 + + react-style-singleton@2.2.1(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1): dependencies: get-nonce: 1.0.1 invariant: 2.2.4 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 tslib: 2.7.0 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - react@18.3.1: - dependencies: - loose-envify: 1.4.0 + react@19.0.0-rc-cd22717c-20241013: {} read-cache@1.0.0: dependencies: @@ -12980,9 +12966,7 @@ snapshots: safer-buffer@2.1.2: {} - scheduler@0.23.2: - dependencies: - loose-envify: 1.4.0 + scheduler@0.25.0-rc-cd22717c-20241013: {} scroll-into-view-if-needed@3.1.0: dependencies: @@ -13246,10 +13230,10 @@ snapshots: dependencies: inline-style-parser: 0.2.4 - styled-jsx@5.1.1(react@18.3.1): + styled-jsx@5.1.6(react@19.0.0-rc-cd22717c-20241013): dependencies: client-only: 0.0.1 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 sucrase@3.35.0: dependencies: @@ -13271,11 +13255,11 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - swr@2.2.5(react@18.3.1): + swr@2.2.5(react@19.0.0-rc-cd22717c-20241013): dependencies: client-only: 0.0.1 - react: 18.3.1 - use-sync-external-store: 1.2.2(react@18.3.1) + react: 19.0.0-rc-cd22717c-20241013 + use-sync-external-store: 1.2.2(react@19.0.0-rc-cd22717c-20241013) tailwind-merge@2.5.2: {} @@ -13571,6 +13555,14 @@ snapshots: is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 + types-react-dom@19.0.0-rc.1: + dependencies: + '@types/react': 18.3.10 + + types-react@19.0.0-rc.1: + dependencies: + csstype: 3.1.3 + typescript@5.6.2: {} uint8array-extras@1.4.0: {} @@ -13679,24 +13671,24 @@ snapshots: dependencies: punycode: 2.3.1 - use-callback-ref@1.3.2(@types/react@18.3.10)(react@18.3.1): + use-callback-ref@1.3.2(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1): dependencies: - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 tslib: 2.7.0 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - use-sidecar@1.1.2(@types/react@18.3.10)(react@18.3.1): + use-sidecar@1.1.2(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1): dependencies: detect-node-es: 1.1.0 - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 tslib: 2.7.0 optionalDependencies: - '@types/react': 18.3.10 + '@types/react': types-react@19.0.0-rc.1 - use-sync-external-store@1.2.2(react@18.3.1): + use-sync-external-store@1.2.2(react@19.0.0-rc-cd22717c-20241013): dependencies: - react: 18.3.1 + react: 19.0.0-rc-cd22717c-20241013 util-deprecate@1.0.2: {} @@ -13865,11 +13857,11 @@ snapshots: zod@3.23.8: {} - zustand@4.5.5(@types/react@18.3.10)(react@18.3.1): + zustand@4.5.5(react@19.0.0-rc-cd22717c-20241013)(types-react@19.0.0-rc.1): dependencies: - use-sync-external-store: 1.2.2(react@18.3.1) + use-sync-external-store: 1.2.2(react@19.0.0-rc-cd22717c-20241013) optionalDependencies: - '@types/react': 18.3.10 - react: 18.3.1 + '@types/react': types-react@19.0.0-rc.1 + react: 19.0.0-rc-cd22717c-20241013 zwitch@2.0.4: {} diff --git a/www/package.json b/www/package.json index 92367330..7763c4c9 100644 --- a/www/package.json +++ b/www/package.json @@ -40,14 +40,14 @@ "geist": "^1.2.2", "hast-util-to-string": "^3.0.1", "lucide-react": "^0.311.0", - "next": "14.2.14", + "next": "15.0.0-rc.1", "next-mdx-remote": "^4.4.1", "next-themes": "^0.2.1", "npm-to-yarn": "^3.0.0", - "react": "18.3.1", + "react": "19.0.0-rc-cd22717c-20241013", "react-aria": "^3.33.0", "react-aria-components": "^1.2.1", - "react-dom": "18.3.1", + "react-dom": "19.0.0-rc-cd22717c-20241013", "react-resizable-panels": "^2.0.19", "react-stately": "^3.31.0", "remark-gfm": "^4.0.0", @@ -68,8 +68,8 @@ "@types/estree": "^1.0.6", "@types/mdast": "^4.0.4", "@types/node": "^18.17.0", - "@types/react": "^18.2.37", - "@types/react-dom": "^18.2.15", + "@types/react": "npm:types-react@19.0.0-rc.1", + "@types/react-dom": "npm:types-react-dom@19.0.0-rc.1", "autoprefixer": "^10.4.14", "postcss": "^8.4.31", "rimraf": "^6.0.1", @@ -79,4 +79,4 @@ "typescript": "^5", "vfile": "^6.0.3" } -} +} \ No newline at end of file diff --git a/www/scripts/build-demos.ts b/www/scripts/build-demos.ts index 562daaa2..1cec5430 100644 --- a/www/scripts/build-demos.ts +++ b/www/scripts/build-demos.ts @@ -1,68 +1,68 @@ -import { existsSync, promises as fs } from "node:fs"; -import path from "path"; -import { rimraf } from "rimraf"; -import { styles } from "@/registry/styles"; -import { demos } from "@/__demos__/registry"; - -async function buildDemos() { - let index = `// This file is autogenerated by scripts/build-registry.ts - // Do not edit this file directly. - import * as React from "react" - - export const Index: Record = { - `; - - // core demos - index += ` core: {`; - for (const style of styles) { - index += ` "${style.name}": {`; - - for (const item of demos) { - const resolveFiles = item.files?.map( - (file) => `registry/ui/${style.name}/${file}` - ); - if (!resolveFiles) { - continue; - } - const type = "core"; - let componentPath = `@/registry/ui/${style.name}/${type}/${item.name}`; - if (item.files) { - const files = item.files.map((file) => - typeof file === "string" - ? { type: "registry:page", path: file } - : file - ); - if (files?.length) { - componentPath = `@/registry/ui/${style.name}/${files[0].path}`; - } - } - index += ` - "${item.name}": { - name: "${item.name}", - files: [${resolveFiles.map((file) => `"${file}"`)}], - component: React.lazy(() => import("${componentPath.replace( - ".tsx", - "" - )}")), - },`; - } - - index += ` - },`; - } - index += ` - },`; - - index += ` -} -`; - - const targetPath = path.join(process.cwd(), "src", "__demos__"); - if (!existsSync(targetPath)) { - await fs.mkdir(targetPath, { recursive: true }); - } - rimraf.sync(path.join(targetPath, "index.tsx")); - await fs.writeFile(path.join(targetPath, "index.tsx"), index, "utf8"); -} - -buildDemos(); +import { existsSync, promises as fs } from "node:fs"; +import path from "path"; +import { rimraf } from "rimraf"; +import { styles } from "@/registry/styles"; +import { demos } from "@/__demos__/registry"; + +async function buildDemos() { + let index = `// This file is autogenerated by scripts/build-registry.ts + // Do not edit this file directly. + import * as React from "react" + + export const Index: Record = { + `; + + // core demos + index += ` core: {`; + for (const style of styles) { + index += ` "${style.name}": {`; + + for (const item of demos) { + const resolveFiles = item.files?.map( + (file) => `registry/ui/${style.name}/${file}` + ); + if (!resolveFiles) { + continue; + } + const type = "core"; + let componentPath = `@/registry/ui/${style.name}/${type}/${item.name}`; + if (item.files) { + const files = item.files.map((file) => + typeof file === "string" + ? { type: "registry:page", path: file } + : file + ); + if (files?.length) { + componentPath = `@/registry/ui/${style.name}/${files[0].path}`; + } + } + index += ` + "${item.name}": { + name: "${item.name}", + files: [${resolveFiles.map((file) => `"${file}"`)}], + component: React.lazy(() => import("${componentPath.replace( + ".tsx", + "" + )}")), + },`; + } + + index += ` + },`; + } + index += ` + },`; + + index += ` +} +`; + + const targetPath = path.join(process.cwd(), "src", "__demos__"); + if (!existsSync(targetPath)) { + await fs.mkdir(targetPath, { recursive: true }); + } + rimraf.sync(path.join(targetPath, "index.tsx")); + await fs.writeFile(path.join(targetPath, "index.tsx"), index, "utf8"); +} + +buildDemos(); diff --git a/www/scripts/build-registry-demos.ts b/www/scripts/build-registry-demos.ts index 07ed0108..2a97baf7 100644 --- a/www/scripts/build-registry-demos.ts +++ b/www/scripts/build-registry-demos.ts @@ -1,64 +1,64 @@ -import { existsSync, readdirSync, promises as fs } from "node:fs"; -import path from "path"; -import { rimraf } from "rimraf"; - -async function buildRegistryDemos() { - let index = ` -type RegistryDemoItem = { - name: string; - files: string[]; -}; - -type RegistryDemos = RegistryDemoItem[]; - -const buildDemos = (component: string, demos: string[]): RegistryDemos => { - return demos.map((demo) => { - return { - name: \`\${component}-\${demo}\`, - files: [\`core/\${component}/demos/\${demo}.tsx\`], - }; - }); -}; - -export const demos: RegistryDemos = [ -`; - - const components = readdirSync( - path.join(process.cwd(), "src/registry/ui/default/core") - ); - for (const component of components) { - if ( - !existsSync( - path.join( - process.cwd(), - "src/registry/ui/default/core", - component, - "demos" - ) - ) - ) { - continue; - } - const demos = readdirSync( - path.join( - process.cwd(), - "src/registry/ui/default/core", - component, - "demos" - ) - ); - index += ` ...buildDemos("${component}", [${demos.map( - (demo) => `"${demo.replace(".tsx", "")}"` - )}]),\n`; - } - index += `] -`; - rimraf.sync(path.join(process.cwd(), "src/__demos__/registry.ts")); - await fs.writeFile( - path.join(process.cwd(), "src/__demos__/registry.ts"), - index - ); - console.log("✅ Done!"); -} - -buildRegistryDemos(); +import { existsSync, readdirSync, promises as fs } from "node:fs"; +import path from "path"; +import { rimraf } from "rimraf"; + +async function buildRegistryDemos() { + let index = ` +type RegistryDemoItem = { + name: string; + files: string[]; +}; + +type RegistryDemos = RegistryDemoItem[]; + +const buildDemos = (component: string, demos: string[]): RegistryDemos => { + return demos.map((demo) => { + return { + name: \`\${component}-\${demo}\`, + files: [\`core/\${component}/demos/\${demo}.tsx\`], + }; + }); +}; + +export const demos: RegistryDemos = [ +`; + + const components = readdirSync( + path.join(process.cwd(), "src/registry/ui/default/core") + ); + for (const component of components) { + if ( + !existsSync( + path.join( + process.cwd(), + "src/registry/ui/default/core", + component, + "demos" + ) + ) + ) { + continue; + } + const demos = readdirSync( + path.join( + process.cwd(), + "src/registry/ui/default/core", + component, + "demos" + ) + ); + index += ` ...buildDemos("${component}", [${demos.map( + (demo) => `"${demo.replace(".tsx", "")}"` + )}]),\n`; + } + index += `] +`; + rimraf.sync(path.join(process.cwd(), "src/__demos__/registry.ts")); + await fs.writeFile( + path.join(process.cwd(), "src/__demos__/registry.ts"), + index + ); + console.log("✅ Done!"); +} + +buildRegistryDemos(); diff --git a/www/scripts/build-registry.ts b/www/scripts/build-registry.ts index 0d3ef855..66e28b9e 100644 --- a/www/scripts/build-registry.ts +++ b/www/scripts/build-registry.ts @@ -1,360 +1,360 @@ -import { registryItemSchema, registrySchema } from "@dotui/registry"; -import { existsSync, promises as fs } from "node:fs"; -import path from "path"; -import { rimraf } from "rimraf"; -import { core } from "@/registry/core"; -import { hooks } from "@/registry/hooks"; -import { iconLibraries, icons } from "@/registry/icons"; -import { styles } from "@/registry/styles"; -import { themes } from "@/registry/themes"; -import { lib } from "@/registry/ui-lib"; -import { registry } from "@/registry"; - -const REGISTRY_PATH = path.join(process.cwd(), "public/registry"); - -// ---------------------------------------------------------------------------- -// Build registry/index.json. -// Contains the list of all components, hooks, etc. -// ---------------------------------------------------------------------------- -const buildRegistry = async () => { - const targetPath = REGISTRY_PATH; - rimraf.sync(targetPath); - if (!existsSync(targetPath)) { - await fs.mkdir(targetPath, { recursive: true }); - } - - const payload = registry.map((item) => ({ - name: item.name, - type: item.type, - })); - - const registryJson = JSON.stringify(payload, null, 2); - await fs.writeFile(path.join(targetPath, "index.json"), registryJson, "utf8"); -}; - -// ---------------------------------------------------------------------------- -// Build registry/icons/index.json. -// Contains the list of all icon libraries. -// -// Build registry/icons/[iconLibrary].json -// Contains the list of all icons in the specified icon library. -// -// Build __icons__/index.tsx -// Contains all the icons as react components. -// ---------------------------------------------------------------------------- -const buildIcons = async () => { - const targetPath = path.join(REGISTRY_PATH, "icons"); - rimraf.sync(targetPath); - if (!existsSync(targetPath)) { - await fs.mkdir(targetPath, { recursive: true }); - } - - // Build registry/icons/index.json - const iconLibrariesJson = JSON.stringify(iconLibraries, null, 2); - await fs.writeFile( - path.join(targetPath, "index.json"), - iconLibrariesJson, - "utf8" - ); - - // Build registry/icons/[iconLibrary].json - for (const iconLibrary of iconLibraries) { - const libIcons = Object.entries(icons).reduce>( - (acc, [key, value]) => { - acc[key] = value[iconLibrary.name as keyof typeof value]; - return acc; - }, - {} - ); - - const payload = { - name: iconLibrary.name, - dependency: iconLibrary.dependency, - icons: libIcons, - }; - - const iconLibraryJson = JSON.stringify(payload, null, 2); - await fs.writeFile( - path.join(targetPath, `${iconLibrary.name}.json`), - iconLibraryJson, - "utf8" - ); - } - - // Build __icons__/index.tsx - const iconsIndexPath = path.join(process.cwd(), "src", "__icons__"); - rimraf.sync(iconsIndexPath); - if (!existsSync(iconsIndexPath)) { - await fs.mkdir(iconsIndexPath, { recursive: true }); - } - - let iconsIndexContent = `// This file is autogenerated by scripts/build-registry.ts -// Do not edit this file directly. -"use client"; - -${iconLibraries - .map((lib) => `import * as ${lib.name} from "${lib.import}";`) - .join("\n")} -import { createIcon } from "./create-icon"; - -`; - - for (const [iconName, iconVariants] of Object.entries(icons)) { - iconsIndexContent += `export const ${iconName} = createIcon({ - ${iconLibraries - .map( - (lib) => - `${lib.name}: ${lib.name}.${ - iconVariants[lib.name as keyof typeof iconVariants] - }` - ) - .join(",\n ")} -});\n\n`; - } - - await fs.writeFile( - path.join(iconsIndexPath, "index.tsx"), - iconsIndexContent, - "utf8" - ); -}; - -// ---------------------------------------------------------------------------- -// Build registry/themes/index.json. -// Contains the list of all themes. -// -// Build registry/themes/[name].json -// Contains theme's variables. -// ---------------------------------------------------------------------------- -const buildThemes = async () => { - const themesTargetPath = path.join(REGISTRY_PATH, "themes"); - rimraf.sync(themesTargetPath); - if (!existsSync(themesTargetPath)) { - await fs.mkdir(themesTargetPath, { recursive: true }); - } - - const allThemes = themes.map((theme) => ({ - name: theme.name, - label: theme.label ?? theme.name, - })); - - // Build registry/themes/index.json - const allThemesJson = JSON.stringify(allThemes, null, 2); - await fs.writeFile( - path.join(themesTargetPath, "index.json"), - allThemesJson, - "utf8" - ); - - // Build registry/themes/[name].json - for (const theme of themes) { - const themeJson = JSON.stringify(theme, null, 2); - await fs.writeFile( - path.join(themesTargetPath, `${theme.name}.json`), - themeJson, - "utf8" - ); - } -}; - -// ---------------------------------------------------------------------------- -// Build registry/styles/index.json. -// Contains the list of all styles. -// -// Build registry/styles/[style]/index.json -// Contains the list of all required deps for the specified style. -// -// Build registry/styles/[style]/[name].json -// Style's component, hook or other entity. -// ---------------------------------------------------------------------------- -const buildStyles = async () => { - const stylesPath = path.join(REGISTRY_PATH, "styles"); - rimraf.sync(stylesPath); - if (!existsSync(stylesPath)) { - await fs.mkdir(stylesPath, { recursive: true }); - } - - for (const style of styles) { - const styleTargetPath = path.join(REGISTRY_PATH, "styles", style.name); - - if (!existsSync(styleTargetPath)) { - await fs.mkdir(styleTargetPath, { recursive: true }); - } - - // ---------------------------------------------------------------------------- - // Build registry/styles/[style]/index.json - // ---------------------------------------------------------------------------- - const styleIndexJson = JSON.stringify(style, null, 2); - await fs.writeFile( - path.join(styleTargetPath, "index.json"), - styleIndexJson, - "utf8" - ); - - for (const item of [...core, ...lib]) { - let files; - if (item.files) { - files = await Promise.all( - item.files.map(async (_file) => { - const file = - typeof _file === "string" - ? { - path: _file, - type: item.type, - content: "", - target: "", - } - : _file; - - const content = await fs.readFile( - path.join( - process.cwd(), - "src", - "registry", - "ui", - style.name, - file.path - ), - "utf8" - ); - - return { - path: file.path, - type: file.type, - content: content, - target: file.target, - }; - }) - ); - } - - const payload = registryItemSchema.safeParse({ - ...item, - files, - }); - - // ---------------------------------------------------------------------------- - // Build registry/styles/[style]/[name].json - // ---------------------------------------------------------------------------- - if (payload.success) { - await fs.writeFile( - path.join(styleTargetPath, `${item.name}.json`), - JSON.stringify(payload.data, null, 2), - "utf8" - ); - } - } - } - - // ---------------------------------------------------------------------------- - // Build registry/styles/index.json. - // ---------------------------------------------------------------------------- - const allStyles = styles.map((style) => ({ - name: style.name, - label: style.label, - type: style.type, - })); - - const stylesJson = JSON.stringify(allStyles, null, 2); - await fs.writeFile( - path.join(REGISTRY_PATH, "styles/index.json"), - stylesJson, - "utf8" - ); -}; - -// ---------------------------------------------------------------------------- -// Build registry/hooks/index.json. -// Contains the list of all hooks. -// -// Build registry/hooks/[name].json -// Hook's entity. -// ---------------------------------------------------------------------------- -const buildHooks = async () => { - const targetPath = path.join(REGISTRY_PATH, "hooks"); - rimraf.sync(targetPath); - if (!existsSync(targetPath)) { - await fs.mkdir(targetPath, { recursive: true }); - } - - const allHooks = hooks.map((hook) => ({ - name: hook.name, - label: hook.label ?? hook.name, - })); - - // Build registry/hooks/index.json - const hooksJson = JSON.stringify(allHooks, null, 2); - await fs.writeFile(path.join(targetPath, "index.json"), hooksJson, "utf8"); - - // Build registry/hooks/[name].json - for (const item of hooks) { - let files; - if (item.files) { - files = await Promise.all( - item.files.map(async (_file) => { - const file = - typeof _file === "string" - ? { - path: _file, - type: item.type, - content: "", - target: "", - } - : _file; - - const content = await fs.readFile( - path.join(process.cwd(), "src", "registry", file.path), - "utf8" - ); - - return { - path: file.path, - type: file.type, - content: content, - target: file.target, - }; - }) - ); - } - - const payload = registryItemSchema.safeParse({ - ...item, - files, - }); - - // ---------------------------------------------------------------------------- - // Build registry/styles/[style]/[name].json - // ---------------------------------------------------------------------------- - if (payload.success) { - await fs.writeFile( - path.join(targetPath, `${item.name}.json`), - JSON.stringify(payload.data, null, 2), - "utf8" - ); - } - } -}; - -const run = async () => { - try { - const result = registrySchema.safeParse(registry); - - if (!result.success) { - console.error(result.error); - process.exit(1); - } - - await buildRegistry(); - await buildStyles(); - await buildHooks(); - await buildThemes(); - await buildIcons(); - - console.log("✅ Done!"); - } catch (error) { - console.error(error); - process.exit(1); - } -}; - -run(); +import { registryItemSchema, registrySchema } from "@dotui/registry"; +import { existsSync, promises as fs } from "node:fs"; +import path from "path"; +import { rimraf } from "rimraf"; +import { core } from "@/registry/core"; +import { hooks } from "@/registry/hooks"; +import { iconLibraries, icons } from "@/registry/icons"; +import { styles } from "@/registry/styles"; +import { themes } from "@/registry/themes"; +import { lib } from "@/registry/ui-lib"; +import { registry } from "@/registry"; + +const REGISTRY_PATH = path.join(process.cwd(), "public/registry"); + +// ---------------------------------------------------------------------------- +// Build registry/index.json. +// Contains the list of all components, hooks, etc. +// ---------------------------------------------------------------------------- +const buildRegistry = async () => { + const targetPath = REGISTRY_PATH; + rimraf.sync(targetPath); + if (!existsSync(targetPath)) { + await fs.mkdir(targetPath, { recursive: true }); + } + + const payload = registry.map((item) => ({ + name: item.name, + type: item.type, + })); + + const registryJson = JSON.stringify(payload, null, 2); + await fs.writeFile(path.join(targetPath, "index.json"), registryJson, "utf8"); +}; + +// ---------------------------------------------------------------------------- +// Build registry/icons/index.json. +// Contains the list of all icon libraries. +// +// Build registry/icons/[iconLibrary].json +// Contains the list of all icons in the specified icon library. +// +// Build __icons__/index.tsx +// Contains all the icons as react components. +// ---------------------------------------------------------------------------- +const buildIcons = async () => { + const targetPath = path.join(REGISTRY_PATH, "icons"); + rimraf.sync(targetPath); + if (!existsSync(targetPath)) { + await fs.mkdir(targetPath, { recursive: true }); + } + + // Build registry/icons/index.json + const iconLibrariesJson = JSON.stringify(iconLibraries, null, 2); + await fs.writeFile( + path.join(targetPath, "index.json"), + iconLibrariesJson, + "utf8" + ); + + // Build registry/icons/[iconLibrary].json + for (const iconLibrary of iconLibraries) { + const libIcons = Object.entries(icons).reduce>( + (acc, [key, value]) => { + acc[key] = value[iconLibrary.name as keyof typeof value]; + return acc; + }, + {} + ); + + const payload = { + name: iconLibrary.name, + dependency: iconLibrary.dependency, + icons: libIcons, + }; + + const iconLibraryJson = JSON.stringify(payload, null, 2); + await fs.writeFile( + path.join(targetPath, `${iconLibrary.name}.json`), + iconLibraryJson, + "utf8" + ); + } + + // Build __icons__/index.tsx + const iconsIndexPath = path.join(process.cwd(), "src", "__icons__"); + rimraf.sync(iconsIndexPath); + if (!existsSync(iconsIndexPath)) { + await fs.mkdir(iconsIndexPath, { recursive: true }); + } + + let iconsIndexContent = `// This file is autogenerated by scripts/build-registry.ts +// Do not edit this file directly. +"use client"; + +${iconLibraries + .map((lib) => `import * as ${lib.name} from "${lib.import}";`) + .join("\n")} +import { createIcon } from "./create-icon"; + +`; + + for (const [iconName, iconVariants] of Object.entries(icons)) { + iconsIndexContent += `export const ${iconName} = createIcon({ + ${iconLibraries + .map( + (lib) => + `${lib.name}: ${lib.name}.${ + iconVariants[lib.name as keyof typeof iconVariants] + }` + ) + .join(",\n ")} +});\n\n`; + } + + await fs.writeFile( + path.join(iconsIndexPath, "index.tsx"), + iconsIndexContent, + "utf8" + ); +}; + +// ---------------------------------------------------------------------------- +// Build registry/themes/index.json. +// Contains the list of all themes. +// +// Build registry/themes/[name].json +// Contains theme's variables. +// ---------------------------------------------------------------------------- +const buildThemes = async () => { + const themesTargetPath = path.join(REGISTRY_PATH, "themes"); + rimraf.sync(themesTargetPath); + if (!existsSync(themesTargetPath)) { + await fs.mkdir(themesTargetPath, { recursive: true }); + } + + const allThemes = themes.map((theme) => ({ + name: theme.name, + label: theme.label ?? theme.name, + })); + + // Build registry/themes/index.json + const allThemesJson = JSON.stringify(allThemes, null, 2); + await fs.writeFile( + path.join(themesTargetPath, "index.json"), + allThemesJson, + "utf8" + ); + + // Build registry/themes/[name].json + for (const theme of themes) { + const themeJson = JSON.stringify(theme, null, 2); + await fs.writeFile( + path.join(themesTargetPath, `${theme.name}.json`), + themeJson, + "utf8" + ); + } +}; + +// ---------------------------------------------------------------------------- +// Build registry/styles/index.json. +// Contains the list of all styles. +// +// Build registry/styles/[style]/index.json +// Contains the list of all required deps for the specified style. +// +// Build registry/styles/[style]/[name].json +// Style's component, hook or other entity. +// ---------------------------------------------------------------------------- +const buildStyles = async () => { + const stylesPath = path.join(REGISTRY_PATH, "styles"); + rimraf.sync(stylesPath); + if (!existsSync(stylesPath)) { + await fs.mkdir(stylesPath, { recursive: true }); + } + + for (const style of styles) { + const styleTargetPath = path.join(REGISTRY_PATH, "styles", style.name); + + if (!existsSync(styleTargetPath)) { + await fs.mkdir(styleTargetPath, { recursive: true }); + } + + // ---------------------------------------------------------------------------- + // Build registry/styles/[style]/index.json + // ---------------------------------------------------------------------------- + const styleIndexJson = JSON.stringify(style, null, 2); + await fs.writeFile( + path.join(styleTargetPath, "index.json"), + styleIndexJson, + "utf8" + ); + + for (const item of [...core, ...lib]) { + let files; + if (item.files) { + files = await Promise.all( + item.files.map(async (_file) => { + const file = + typeof _file === "string" + ? { + path: _file, + type: item.type, + content: "", + target: "", + } + : _file; + + const content = await fs.readFile( + path.join( + process.cwd(), + "src", + "registry", + "ui", + style.name, + file.path + ), + "utf8" + ); + + return { + path: file.path, + type: file.type, + content: content, + target: file.target, + }; + }) + ); + } + + const payload = registryItemSchema.safeParse({ + ...item, + files, + }); + + // ---------------------------------------------------------------------------- + // Build registry/styles/[style]/[name].json + // ---------------------------------------------------------------------------- + if (payload.success) { + await fs.writeFile( + path.join(styleTargetPath, `${item.name}.json`), + JSON.stringify(payload.data, null, 2), + "utf8" + ); + } + } + } + + // ---------------------------------------------------------------------------- + // Build registry/styles/index.json. + // ---------------------------------------------------------------------------- + const allStyles = styles.map((style) => ({ + name: style.name, + label: style.label, + type: style.type, + })); + + const stylesJson = JSON.stringify(allStyles, null, 2); + await fs.writeFile( + path.join(REGISTRY_PATH, "styles/index.json"), + stylesJson, + "utf8" + ); +}; + +// ---------------------------------------------------------------------------- +// Build registry/hooks/index.json. +// Contains the list of all hooks. +// +// Build registry/hooks/[name].json +// Hook's entity. +// ---------------------------------------------------------------------------- +const buildHooks = async () => { + const targetPath = path.join(REGISTRY_PATH, "hooks"); + rimraf.sync(targetPath); + if (!existsSync(targetPath)) { + await fs.mkdir(targetPath, { recursive: true }); + } + + const allHooks = hooks.map((hook) => ({ + name: hook.name, + label: hook.label ?? hook.name, + })); + + // Build registry/hooks/index.json + const hooksJson = JSON.stringify(allHooks, null, 2); + await fs.writeFile(path.join(targetPath, "index.json"), hooksJson, "utf8"); + + // Build registry/hooks/[name].json + for (const item of hooks) { + let files; + if (item.files) { + files = await Promise.all( + item.files.map(async (_file) => { + const file = + typeof _file === "string" + ? { + path: _file, + type: item.type, + content: "", + target: "", + } + : _file; + + const content = await fs.readFile( + path.join(process.cwd(), "src", "registry", file.path), + "utf8" + ); + + return { + path: file.path, + type: file.type, + content: content, + target: file.target, + }; + }) + ); + } + + const payload = registryItemSchema.safeParse({ + ...item, + files, + }); + + // ---------------------------------------------------------------------------- + // Build registry/styles/[style]/[name].json + // ---------------------------------------------------------------------------- + if (payload.success) { + await fs.writeFile( + path.join(targetPath, `${item.name}.json`), + JSON.stringify(payload.data, null, 2), + "utf8" + ); + } + } +}; + +const run = async () => { + try { + const result = registrySchema.safeParse(registry); + + if (!result.success) { + console.error(result.error); + process.exit(1); + } + + await buildRegistry(); + await buildStyles(); + await buildHooks(); + await buildThemes(); + await buildIcons(); + + console.log("✅ Done!"); + } catch (error) { + console.error(error); + process.exit(1); + } +}; + +run(); diff --git a/www/src/__demos__/index.tsx b/www/src/__demos__/index.tsx index ddb4499d..db815c0e 100644 --- a/www/src/__demos__/index.tsx +++ b/www/src/__demos__/index.tsx @@ -1,3294 +1,3294 @@ -// This file is autogenerated by scripts/build-registry.ts -// Do not edit this file directly. -import * as React from "react"; - -export const Index: Record = { - core: { - default: { - "alert-action": { - name: "alert-action", - files: ["registry/ui/default/core/alert/demos/action.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/alert/demos/action") - ), - }, - "alert-composition": { - name: "alert-composition", - files: ["registry/ui/default/core/alert/demos/composition.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/alert/demos/composition") - ), - }, - "alert-content": { - name: "alert-content", - files: ["registry/ui/default/core/alert/demos/content.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/alert/demos/content") - ), - }, - "alert-custom-icon": { - name: "alert-custom-icon", - files: ["registry/ui/default/core/alert/demos/custom-icon.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/alert/demos/custom-icon") - ), - }, - "alert-default": { - name: "alert-default", - files: ["registry/ui/default/core/alert/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/alert/demos/default") - ), - }, - "alert-title": { - name: "alert-title", - files: ["registry/ui/default/core/alert/demos/title.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/alert/demos/title") - ), - }, - "alert-variants": { - name: "alert-variants", - files: ["registry/ui/default/core/alert/demos/variants.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/alert/demos/variants") - ), - }, - "aspect-ratio-as-child": { - name: "aspect-ratio-as-child", - files: ["registry/ui/default/core/aspect-ratio/demos/as-child.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/aspect-ratio/demos/as-child") - ), - }, - "aspect-ratio-default": { - name: "aspect-ratio-default", - files: ["registry/ui/default/core/aspect-ratio/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/aspect-ratio/demos/default") - ), - }, - "avatar-composition": { - name: "avatar-composition", - files: ["registry/ui/default/core/avatar/demos/composition.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/avatar/demos/composition") - ), - }, - "avatar-default": { - name: "avatar-default", - files: ["registry/ui/default/core/avatar/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/avatar/demos/default") - ), - }, - "avatar-shape": { - name: "avatar-shape", - files: ["registry/ui/default/core/avatar/demos/shape.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/avatar/demos/shape") - ), - }, - "avatar-sizes": { - name: "avatar-sizes", - files: ["registry/ui/default/core/avatar/demos/sizes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/avatar/demos/sizes") - ), - }, - "badge-default": { - name: "badge-default", - files: ["registry/ui/default/core/badge/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/badge/demos/default") - ), - }, - "badge-icon": { - name: "badge-icon", - files: ["registry/ui/default/core/badge/demos/icon.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/badge/demos/icon") - ), - }, - "badge-sizes": { - name: "badge-sizes", - files: ["registry/ui/default/core/badge/demos/sizes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/badge/demos/sizes") - ), - }, - "badge-variants": { - name: "badge-variants", - files: ["registry/ui/default/core/badge/demos/variants.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/badge/demos/variants") - ), - }, - "breadcrumbs-basic": { - name: "breadcrumbs-basic", - files: ["registry/ui/default/core/breadcrumbs/demos/basic.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/breadcrumbs/demos/basic") - ), - }, - "breadcrumbs-composition": { - name: "breadcrumbs-composition", - files: ["registry/ui/default/core/breadcrumbs/demos/composition.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/breadcrumbs/demos/composition") - ), - }, - "breadcrumbs-disabled": { - name: "breadcrumbs-disabled", - files: ["registry/ui/default/core/breadcrumbs/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/breadcrumbs/demos/disabled") - ), - }, - "breadcrumbs-icon": { - name: "breadcrumbs-icon", - files: ["registry/ui/default/core/breadcrumbs/demos/icon.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/breadcrumbs/demos/icon") - ), - }, - "breadcrumbs-router-integration": { - name: "breadcrumbs-router-integration", - files: [ - "registry/ui/default/core/breadcrumbs/demos/router-integration.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/breadcrumbs/demos/router-integration" - ) - ), - }, - "button-default": { - name: "button-default", - files: ["registry/ui/default/core/button/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/button/demos/default") - ), - }, - "button-disabled": { - name: "button-disabled", - files: ["registry/ui/default/core/button/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/button/demos/disabled") - ), - }, - "button-link-button": { - name: "button-link-button", - files: ["registry/ui/default/core/button/demos/link-button.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/button/demos/link-button") - ), - }, - "button-loading": { - name: "button-loading", - files: ["registry/ui/default/core/button/demos/loading.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/button/demos/loading") - ), - }, - "button-prefix-and-suffix": { - name: "button-prefix-and-suffix", - files: ["registry/ui/default/core/button/demos/prefix-and-suffix.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/button/demos/prefix-and-suffix") - ), - }, - "button-shapes": { - name: "button-shapes", - files: ["registry/ui/default/core/button/demos/shapes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/button/demos/shapes") - ), - }, - "button-sizes": { - name: "button-sizes", - files: ["registry/ui/default/core/button/demos/sizes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/button/demos/sizes") - ), - }, - "button-variants": { - name: "button-variants", - files: ["registry/ui/default/core/button/demos/variants.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/button/demos/variants") - ), - }, - "calendar-composition": { - name: "calendar-composition", - files: ["registry/ui/default/core/calendar/demos/composition.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/calendar/demos/composition") - ), - }, - "calendar-controlled": { - name: "calendar-controlled", - files: ["registry/ui/default/core/calendar/demos/controlled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/calendar/demos/controlled") - ), - }, - "calendar-default": { - name: "calendar-default", - files: ["registry/ui/default/core/calendar/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/calendar/demos/default") - ), - }, - "calendar-disabled": { - name: "calendar-disabled", - files: ["registry/ui/default/core/calendar/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/calendar/demos/disabled") - ), - }, - "calendar-error-message": { - name: "calendar-error-message", - files: ["registry/ui/default/core/calendar/demos/error-message.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/calendar/demos/error-message") - ), - }, - "calendar-label": { - name: "calendar-label", - files: ["registry/ui/default/core/calendar/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/calendar/demos/label") - ), - }, - "calendar-page-behaviour": { - name: "calendar-page-behaviour", - files: ["registry/ui/default/core/calendar/demos/page-behaviour.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/calendar/demos/page-behaviour") - ), - }, - "calendar-read-only": { - name: "calendar-read-only", - files: ["registry/ui/default/core/calendar/demos/read-only.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/calendar/demos/read-only") - ), - }, - "calendar-uncontrolled": { - name: "calendar-uncontrolled", - files: ["registry/ui/default/core/calendar/demos/uncontrolled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/calendar/demos/uncontrolled") - ), - }, - "calendar-unvailable-dates": { - name: "calendar-unvailable-dates", - files: ["registry/ui/default/core/calendar/demos/unvailable-dates.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/calendar/demos/unvailable-dates") - ), - }, - "calendar-validation": { - name: "calendar-validation", - files: ["registry/ui/default/core/calendar/demos/validation.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/calendar/demos/validation") - ), - }, - "calendar-visible-months": { - name: "calendar-visible-months", - files: ["registry/ui/default/core/calendar/demos/visible-months.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/calendar/demos/visible-months") - ), - }, - "checkbox-card": { - name: "checkbox-card", - files: ["registry/ui/default/core/checkbox/demos/card.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/checkbox/demos/card") - ), - }, - "checkbox-controlled": { - name: "checkbox-controlled", - files: ["registry/ui/default/core/checkbox/demos/controlled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/checkbox/demos/controlled") - ), - }, - "checkbox-default": { - name: "checkbox-default", - files: ["registry/ui/default/core/checkbox/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/checkbox/demos/default") - ), - }, - "checkbox-disabled": { - name: "checkbox-disabled", - files: ["registry/ui/default/core/checkbox/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/checkbox/demos/disabled") - ), - }, - "checkbox-indeterminate": { - name: "checkbox-indeterminate", - files: ["registry/ui/default/core/checkbox/demos/indeterminate.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/checkbox/demos/indeterminate") - ), - }, - "checkbox-read-only": { - name: "checkbox-read-only", - files: ["registry/ui/default/core/checkbox/demos/read-only.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/checkbox/demos/read-only") - ), - }, - "checkbox-uncontrolled": { - name: "checkbox-uncontrolled", - files: ["registry/ui/default/core/checkbox/demos/uncontrolled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/checkbox/demos/uncontrolled") - ), - }, - "checkbox-group-cards": { - name: "checkbox-group-cards", - files: ["registry/ui/default/core/checkbox-group/demos/cards.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/checkbox-group/demos/cards") - ), - }, - "checkbox-group-composition": { - name: "checkbox-group-composition", - files: [ - "registry/ui/default/core/checkbox-group/demos/composition.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/checkbox-group/demos/composition" - ) - ), - }, - "checkbox-group-contextual-help": { - name: "checkbox-group-contextual-help", - files: [ - "registry/ui/default/core/checkbox-group/demos/contextual-help.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/checkbox-group/demos/contextual-help" - ) - ), - }, - "checkbox-group-controlled": { - name: "checkbox-group-controlled", - files: ["registry/ui/default/core/checkbox-group/demos/controlled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/checkbox-group/demos/controlled") - ), - }, - "checkbox-group-default": { - name: "checkbox-group-default", - files: ["registry/ui/default/core/checkbox-group/demos/default.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/checkbox-group/demos/default") - ), - }, - "checkbox-group-description": { - name: "checkbox-group-description", - files: [ - "registry/ui/default/core/checkbox-group/demos/description.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/checkbox-group/demos/description" - ) - ), - }, - "checkbox-group-disabled": { - name: "checkbox-group-disabled", - files: ["registry/ui/default/core/checkbox-group/demos/disabled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/checkbox-group/demos/disabled") - ), - }, - "checkbox-group-error-message": { - name: "checkbox-group-error-message", - files: [ - "registry/ui/default/core/checkbox-group/demos/error-message.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/checkbox-group/demos/error-message" - ) - ), - }, - "checkbox-group-label": { - name: "checkbox-group-label", - files: ["registry/ui/default/core/checkbox-group/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/checkbox-group/demos/label") - ), - }, - "checkbox-group-read-only": { - name: "checkbox-group-read-only", - files: ["registry/ui/default/core/checkbox-group/demos/read-only.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/checkbox-group/demos/read-only") - ), - }, - "checkbox-group-required": { - name: "checkbox-group-required", - files: ["registry/ui/default/core/checkbox-group/demos/required.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/checkbox-group/demos/required") - ), - }, - "checkbox-group-uncontrolled": { - name: "checkbox-group-uncontrolled", - files: [ - "registry/ui/default/core/checkbox-group/demos/uncontrolled.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/checkbox-group/demos/uncontrolled" - ) - ), - }, - "color-area-channels": { - name: "color-area-channels", - files: ["registry/ui/default/core/color-area/demos/channels.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-area/demos/channels") - ), - }, - "color-area-composition": { - name: "color-area-composition", - files: ["registry/ui/default/core/color-area/demos/composition.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/color-area/demos/composition") - ), - }, - "color-area-controlled": { - name: "color-area-controlled", - files: ["registry/ui/default/core/color-area/demos/controlled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-area/demos/controlled") - ), - }, - "color-area-default": { - name: "color-area-default", - files: ["registry/ui/default/core/color-area/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-area/demos/default") - ), - }, - "color-area-disabled": { - name: "color-area-disabled", - files: ["registry/ui/default/core/color-area/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-area/demos/disabled") - ), - }, - "color-area-uncontrolled": { - name: "color-area-uncontrolled", - files: ["registry/ui/default/core/color-area/demos/uncontrolled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/color-area/demos/uncontrolled") - ), - }, - "color-field-composition": { - name: "color-field-composition", - files: ["registry/ui/default/core/color-field/demos/composition.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/color-field/demos/composition") - ), - }, - "color-field-contextual-help": { - name: "color-field-contextual-help", - files: [ - "registry/ui/default/core/color-field/demos/contextual-help.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/color-field/demos/contextual-help" - ) - ), - }, - "color-field-controlled": { - name: "color-field-controlled", - files: ["registry/ui/default/core/color-field/demos/controlled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/color-field/demos/controlled") - ), - }, - "color-field-default": { - name: "color-field-default", - files: ["registry/ui/default/core/color-field/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-field/demos/default") - ), - }, - "color-field-description": { - name: "color-field-description", - files: ["registry/ui/default/core/color-field/demos/description.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/color-field/demos/description") - ), - }, - "color-field-disabled": { - name: "color-field-disabled", - files: ["registry/ui/default/core/color-field/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-field/demos/disabled") - ), - }, - "color-field-error-message": { - name: "color-field-error-message", - files: ["registry/ui/default/core/color-field/demos/error-message.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/color-field/demos/error-message") - ), - }, - "color-field-form": { - name: "color-field-form", - files: ["registry/ui/default/core/color-field/demos/form.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-field/demos/form") - ), - }, - "color-field-label": { - name: "color-field-label", - files: ["registry/ui/default/core/color-field/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-field/demos/label") - ), - }, - "color-field-loading": { - name: "color-field-loading", - files: ["registry/ui/default/core/color-field/demos/loading.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-field/demos/loading") - ), - }, - "color-field-prefix-and-suffix": { - name: "color-field-prefix-and-suffix", - files: [ - "registry/ui/default/core/color-field/demos/prefix-and-suffix.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/color-field/demos/prefix-and-suffix" - ) - ), - }, - "color-field-read-only": { - name: "color-field-read-only", - files: ["registry/ui/default/core/color-field/demos/read-only.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-field/demos/read-only") - ), - }, - "color-field-required": { - name: "color-field-required", - files: ["registry/ui/default/core/color-field/demos/required.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-field/demos/required") - ), - }, - "color-field-sizes": { - name: "color-field-sizes", - files: ["registry/ui/default/core/color-field/demos/sizes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-field/demos/sizes") - ), - }, - "color-field-uncontrolled": { - name: "color-field-uncontrolled", - files: ["registry/ui/default/core/color-field/demos/uncontrolled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/color-field/demos/uncontrolled") - ), - }, - "color-picker-composition": { - name: "color-picker-composition", - files: ["registry/ui/default/core/color-picker/demos/composition.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/color-picker/demos/composition") - ), - }, - "color-picker-controlled": { - name: "color-picker-controlled", - files: ["registry/ui/default/core/color-picker/demos/controlled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/color-picker/demos/controlled") - ), - }, - "color-picker-default": { - name: "color-picker-default", - files: ["registry/ui/default/core/color-picker/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-picker/demos/default") - ), - }, - "color-picker-options": { - name: "color-picker-options", - files: ["registry/ui/default/core/color-picker/demos/options.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-picker/demos/options") - ), - }, - "color-picker-uncontrolled": { - name: "color-picker-uncontrolled", - files: ["registry/ui/default/core/color-picker/demos/uncontrolled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/color-picker/demos/uncontrolled") - ), - }, - "color-slider-channel": { - name: "color-slider-channel", - files: ["registry/ui/default/core/color-slider/demos/channel.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-slider/demos/channel") - ), - }, - "color-slider-composition": { - name: "color-slider-composition", - files: ["registry/ui/default/core/color-slider/demos/composition.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/color-slider/demos/composition") - ), - }, - "color-slider-controlled": { - name: "color-slider-controlled", - files: ["registry/ui/default/core/color-slider/demos/controlled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/color-slider/demos/controlled") - ), - }, - "color-slider-default": { - name: "color-slider-default", - files: ["registry/ui/default/core/color-slider/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-slider/demos/default") - ), - }, - "color-slider-disabled": { - name: "color-slider-disabled", - files: ["registry/ui/default/core/color-slider/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-slider/demos/disabled") - ), - }, - "color-slider-label": { - name: "color-slider-label", - files: ["registry/ui/default/core/color-slider/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-slider/demos/label") - ), - }, - "color-slider-uncontrolled": { - name: "color-slider-uncontrolled", - files: ["registry/ui/default/core/color-slider/demos/uncontrolled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/color-slider/demos/uncontrolled") - ), - }, - "color-slider-vertical": { - name: "color-slider-vertical", - files: ["registry/ui/default/core/color-slider/demos/vertical.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-slider/demos/vertical") - ), - }, - "color-swatch-default": { - name: "color-swatch-default", - files: ["registry/ui/default/core/color-swatch/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/color-swatch/demos/default") - ), - }, - "combobox-async-loading": { - name: "combobox-async-loading", - files: ["registry/ui/default/core/combobox/demos/async-loading.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/combobox/demos/async-loading") - ), - }, - "combobox-basic": { - name: "combobox-basic", - files: ["registry/ui/default/core/combobox/demos/basic.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/combobox/demos/basic") - ), - }, - "combobox-composition": { - name: "combobox-composition", - files: ["registry/ui/default/core/combobox/demos/composition.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/combobox/demos/composition") - ), - }, - "combobox-contextual-help": { - name: "combobox-contextual-help", - files: ["registry/ui/default/core/combobox/demos/contextual-help.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/combobox/demos/contextual-help") - ), - }, - "combobox-controlled": { - name: "combobox-controlled", - files: ["registry/ui/default/core/combobox/demos/controlled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/combobox/demos/controlled") - ), - }, - "combobox-custom-value": { - name: "combobox-custom-value", - files: ["registry/ui/default/core/combobox/demos/custom-value.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/combobox/demos/custom-value") - ), - }, - "combobox-description": { - name: "combobox-description", - files: ["registry/ui/default/core/combobox/demos/description.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/combobox/demos/description") - ), - }, - "combobox-disabled": { - name: "combobox-disabled", - files: ["registry/ui/default/core/combobox/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/combobox/demos/disabled") - ), - }, - "combobox-label": { - name: "combobox-label", - files: ["registry/ui/default/core/combobox/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/combobox/demos/label") - ), - }, - "combobox-loading": { - name: "combobox-loading", - files: ["registry/ui/default/core/combobox/demos/loading.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/combobox/demos/loading") - ), - }, - "combobox-required": { - name: "combobox-required", - files: ["registry/ui/default/core/combobox/demos/required.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/combobox/demos/required") - ), - }, - "combobox-sections": { - name: "combobox-sections", - files: ["registry/ui/default/core/combobox/demos/sections.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/combobox/demos/sections") - ), - }, - "combobox-uncontrolled": { - name: "combobox-uncontrolled", - files: ["registry/ui/default/core/combobox/demos/uncontrolled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/combobox/demos/uncontrolled") - ), - }, - "combobox-validation": { - name: "combobox-validation", - files: ["registry/ui/default/core/combobox/demos/validation.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/combobox/demos/validation") - ), - }, - "date-field-composition": { - name: "date-field-composition", - files: ["registry/ui/default/core/date-field/demos/composition.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-field/demos/composition") - ), - }, - "date-field-contextual-help": { - name: "date-field-contextual-help", - files: [ - "registry/ui/default/core/date-field/demos/contextual-help.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-field/demos/contextual-help" - ) - ), - }, - "date-field-controlled": { - name: "date-field-controlled", - files: ["registry/ui/default/core/date-field/demos/controlled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-field/demos/controlled") - ), - }, - "date-field-default": { - name: "date-field-default", - files: ["registry/ui/default/core/date-field/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-field/demos/default") - ), - }, - "date-field-description": { - name: "date-field-description", - files: ["registry/ui/default/core/date-field/demos/description.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-field/demos/description") - ), - }, - "date-field-disabled": { - name: "date-field-disabled", - files: ["registry/ui/default/core/date-field/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-field/demos/disabled") - ), - }, - "date-field-error-message": { - name: "date-field-error-message", - files: ["registry/ui/default/core/date-field/demos/error-message.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-field/demos/error-message") - ), - }, - "date-field-granularity": { - name: "date-field-granularity", - files: ["registry/ui/default/core/date-field/demos/granularity.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-field/demos/granularity") - ), - }, - "date-field-hide-time-zone": { - name: "date-field-hide-time-zone", - files: ["registry/ui/default/core/date-field/demos/hide-time-zone.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-field/demos/hide-time-zone") - ), - }, - "date-field-hour-cycle": { - name: "date-field-hour-cycle", - files: ["registry/ui/default/core/date-field/demos/hour-cycle.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-field/demos/hour-cycle") - ), - }, - "date-field-label": { - name: "date-field-label", - files: ["registry/ui/default/core/date-field/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-field/demos/label") - ), - }, - "date-field-loading": { - name: "date-field-loading", - files: ["registry/ui/default/core/date-field/demos/loading.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-field/demos/loading") - ), - }, - "date-field-placeholder": { - name: "date-field-placeholder", - files: ["registry/ui/default/core/date-field/demos/placeholder.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-field/demos/placeholder") - ), - }, - "date-field-prefix-and-suffix": { - name: "date-field-prefix-and-suffix", - files: [ - "registry/ui/default/core/date-field/demos/prefix-and-suffix.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-field/demos/prefix-and-suffix" - ) - ), - }, - "date-field-read-only": { - name: "date-field-read-only", - files: ["registry/ui/default/core/date-field/demos/read-only.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-field/demos/read-only") - ), - }, - "date-field-required": { - name: "date-field-required", - files: ["registry/ui/default/core/date-field/demos/required.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-field/demos/required") - ), - }, - "date-field-sizes": { - name: "date-field-sizes", - files: ["registry/ui/default/core/date-field/demos/sizes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-field/demos/sizes") - ), - }, - "date-field-time-zones": { - name: "date-field-time-zones", - files: ["registry/ui/default/core/date-field/demos/time-zones.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-field/demos/time-zones") - ), - }, - "date-field-uncontrolled": { - name: "date-field-uncontrolled", - files: ["registry/ui/default/core/date-field/demos/uncontrolled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-field/demos/uncontrolled") - ), - }, - "date-picker-composition": { - name: "date-picker-composition", - files: ["registry/ui/default/core/date-picker/demos/composition.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-picker/demos/composition") - ), - }, - "date-picker-contextual-help": { - name: "date-picker-contextual-help", - files: [ - "registry/ui/default/core/date-picker/demos/contextual-help.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-picker/demos/contextual-help" - ) - ), - }, - "date-picker-controlled": { - name: "date-picker-controlled", - files: ["registry/ui/default/core/date-picker/demos/controlled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-picker/demos/controlled") - ), - }, - "date-picker-default": { - name: "date-picker-default", - files: ["registry/ui/default/core/date-picker/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-picker/demos/default") - ), - }, - "date-picker-description": { - name: "date-picker-description", - files: ["registry/ui/default/core/date-picker/demos/description.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-picker/demos/description") - ), - }, - "date-picker-disabled": { - name: "date-picker-disabled", - files: ["registry/ui/default/core/date-picker/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-picker/demos/disabled") - ), - }, - "date-picker-error-message": { - name: "date-picker-error-message", - files: ["registry/ui/default/core/date-picker/demos/error-message.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-picker/demos/error-message") - ), - }, - "date-picker-granularity": { - name: "date-picker-granularity", - files: ["registry/ui/default/core/date-picker/demos/granularity.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-picker/demos/granularity") - ), - }, - "date-picker-hide-time-zone": { - name: "date-picker-hide-time-zone", - files: [ - "registry/ui/default/core/date-picker/demos/hide-time-zone.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-picker/demos/hide-time-zone" - ) - ), - }, - "date-picker-hour-cycle": { - name: "date-picker-hour-cycle", - files: ["registry/ui/default/core/date-picker/demos/hour-cycle.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-picker/demos/hour-cycle") - ), - }, - "date-picker-label": { - name: "date-picker-label", - files: ["registry/ui/default/core/date-picker/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-picker/demos/label") - ), - }, - "date-picker-loading": { - name: "date-picker-loading", - files: ["registry/ui/default/core/date-picker/demos/loading.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-picker/demos/loading") - ), - }, - "date-picker-placeholder": { - name: "date-picker-placeholder", - files: ["registry/ui/default/core/date-picker/demos/placeholder.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-picker/demos/placeholder") - ), - }, - "date-picker-prefix": { - name: "date-picker-prefix", - files: ["registry/ui/default/core/date-picker/demos/prefix.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-picker/demos/prefix") - ), - }, - "date-picker-read-only": { - name: "date-picker-read-only", - files: ["registry/ui/default/core/date-picker/demos/read-only.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-picker/demos/read-only") - ), - }, - "date-picker-required": { - name: "date-picker-required", - files: ["registry/ui/default/core/date-picker/demos/required.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-picker/demos/required") - ), - }, - "date-picker-sizes": { - name: "date-picker-sizes", - files: ["registry/ui/default/core/date-picker/demos/sizes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/date-picker/demos/sizes") - ), - }, - "date-picker-time-zones": { - name: "date-picker-time-zones", - files: ["registry/ui/default/core/date-picker/demos/time-zones.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-picker/demos/time-zones") - ), - }, - "date-picker-uncontrolled": { - name: "date-picker-uncontrolled", - files: ["registry/ui/default/core/date-picker/demos/uncontrolled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-picker/demos/uncontrolled") - ), - }, - "date-range-picker-composition": { - name: "date-range-picker-composition", - files: [ - "registry/ui/default/core/date-range-picker/demos/composition.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-range-picker/demos/composition" - ) - ), - }, - "date-range-picker-contextual-help": { - name: "date-range-picker-contextual-help", - files: [ - "registry/ui/default/core/date-range-picker/demos/contextual-help.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-range-picker/demos/contextual-help" - ) - ), - }, - "date-range-picker-controlled": { - name: "date-range-picker-controlled", - files: [ - "registry/ui/default/core/date-range-picker/demos/controlled.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-range-picker/demos/controlled" - ) - ), - }, - "date-range-picker-default": { - name: "date-range-picker-default", - files: ["registry/ui/default/core/date-range-picker/demos/default.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-range-picker/demos/default") - ), - }, - "date-range-picker-description": { - name: "date-range-picker-description", - files: [ - "registry/ui/default/core/date-range-picker/demos/description.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-range-picker/demos/description" - ) - ), - }, - "date-range-picker-disabled": { - name: "date-range-picker-disabled", - files: [ - "registry/ui/default/core/date-range-picker/demos/disabled.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-range-picker/demos/disabled" - ) - ), - }, - "date-range-picker-error-message": { - name: "date-range-picker-error-message", - files: [ - "registry/ui/default/core/date-range-picker/demos/error-message.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-range-picker/demos/error-message" - ) - ), - }, - "date-range-picker-granularity": { - name: "date-range-picker-granularity", - files: [ - "registry/ui/default/core/date-range-picker/demos/granularity.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-range-picker/demos/granularity" - ) - ), - }, - "date-range-picker-hide-time-zone": { - name: "date-range-picker-hide-time-zone", - files: [ - "registry/ui/default/core/date-range-picker/demos/hide-time-zone.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-range-picker/demos/hide-time-zone" - ) - ), - }, - "date-range-picker-hour-cycle": { - name: "date-range-picker-hour-cycle", - files: [ - "registry/ui/default/core/date-range-picker/demos/hour-cycle.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-range-picker/demos/hour-cycle" - ) - ), - }, - "date-range-picker-label": { - name: "date-range-picker-label", - files: ["registry/ui/default/core/date-range-picker/demos/label.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-range-picker/demos/label") - ), - }, - "date-range-picker-loading": { - name: "date-range-picker-loading", - files: ["registry/ui/default/core/date-range-picker/demos/loading.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-range-picker/demos/loading") - ), - }, - "date-range-picker-placeholder": { - name: "date-range-picker-placeholder", - files: [ - "registry/ui/default/core/date-range-picker/demos/placeholder.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-range-picker/demos/placeholder" - ) - ), - }, - "date-range-picker-prefix": { - name: "date-range-picker-prefix", - files: ["registry/ui/default/core/date-range-picker/demos/prefix.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-range-picker/demos/prefix") - ), - }, - "date-range-picker-read-only": { - name: "date-range-picker-read-only", - files: [ - "registry/ui/default/core/date-range-picker/demos/read-only.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-range-picker/demos/read-only" - ) - ), - }, - "date-range-picker-required": { - name: "date-range-picker-required", - files: [ - "registry/ui/default/core/date-range-picker/demos/required.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-range-picker/demos/required" - ) - ), - }, - "date-range-picker-sizes": { - name: "date-range-picker-sizes", - files: ["registry/ui/default/core/date-range-picker/demos/sizes.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/date-range-picker/demos/sizes") - ), - }, - "date-range-picker-time-zones": { - name: "date-range-picker-time-zones", - files: [ - "registry/ui/default/core/date-range-picker/demos/time-zones.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-range-picker/demos/time-zones" - ) - ), - }, - "date-range-picker-uncontrolled": { - name: "date-range-picker-uncontrolled", - files: [ - "registry/ui/default/core/date-range-picker/demos/uncontrolled.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/date-range-picker/demos/uncontrolled" - ) - ), - }, - "dialog-alert-dialog": { - name: "dialog-alert-dialog", - files: ["registry/ui/default/core/dialog/demos/alert-dialog.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/dialog/demos/alert-dialog") - ), - }, - "dialog-async-form-submission": { - name: "dialog-async-form-submission", - files: [ - "registry/ui/default/core/dialog/demos/async-form-submission.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/dialog/demos/async-form-submission" - ) - ), - }, - "dialog-basic": { - name: "dialog-basic", - files: ["registry/ui/default/core/dialog/demos/basic.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/dialog/demos/basic") - ), - }, - "dialog-composition": { - name: "dialog-composition", - files: ["registry/ui/default/core/dialog/demos/composition.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/dialog/demos/composition") - ), - }, - "dialog-controlled": { - name: "dialog-controlled", - files: ["registry/ui/default/core/dialog/demos/controlled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/dialog/demos/controlled") - ), - }, - "dialog-description": { - name: "dialog-description", - files: ["registry/ui/default/core/dialog/demos/description.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/dialog/demos/description") - ), - }, - "dialog-dismiss-button": { - name: "dialog-dismiss-button", - files: ["registry/ui/default/core/dialog/demos/dismiss-button.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/dialog/demos/dismiss-button") - ), - }, - "dialog-dismissable": { - name: "dialog-dismissable", - files: ["registry/ui/default/core/dialog/demos/dismissable.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/dialog/demos/dismissable") - ), - }, - "dialog-drawer": { - name: "dialog-drawer", - files: ["registry/ui/default/core/dialog/demos/drawer.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/dialog/demos/drawer") - ), - }, - "dialog-inset-content": { - name: "dialog-inset-content", - files: ["registry/ui/default/core/dialog/demos/inset-content.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/dialog/demos/inset-content") - ), - }, - "dialog-nested": { - name: "dialog-nested", - files: ["registry/ui/default/core/dialog/demos/nested.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/dialog/demos/nested") - ), - }, - "dialog-popover": { - name: "dialog-popover", - files: ["registry/ui/default/core/dialog/demos/popover.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/dialog/demos/popover") - ), - }, - "dialog-title": { - name: "dialog-title", - files: ["registry/ui/default/core/dialog/demos/title.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/dialog/demos/title") - ), - }, - "dialog-types": { - name: "dialog-types", - files: ["registry/ui/default/core/dialog/demos/types.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/dialog/demos/types") - ), - }, - "drop-zone-default": { - name: "drop-zone-default", - files: ["registry/ui/default/core/drop-zone/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/drop-zone/demos/default") - ), - }, - "drop-zone-disabled": { - name: "drop-zone-disabled", - files: ["registry/ui/default/core/drop-zone/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/drop-zone/demos/disabled") - ), - }, - "drop-zone-file-trigger": { - name: "drop-zone-file-trigger", - files: ["registry/ui/default/core/drop-zone/demos/file-trigger.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/drop-zone/demos/file-trigger") - ), - }, - "drop-zone-label": { - name: "drop-zone-label", - files: ["registry/ui/default/core/drop-zone/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/drop-zone/demos/label") - ), - }, - "file-trigger-default": { - name: "file-trigger-default", - files: ["registry/ui/default/core/file-trigger/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/file-trigger/demos/default") - ), - }, - "file-trigger-directory-selection": { - name: "file-trigger-directory-selection", - files: [ - "registry/ui/default/core/file-trigger/demos/directory-selection.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/file-trigger/demos/directory-selection" - ) - ), - }, - "file-trigger-file-types": { - name: "file-trigger-file-types", - files: ["registry/ui/default/core/file-trigger/demos/file-types.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/file-trigger/demos/file-types") - ), - }, - "file-trigger-media-capture": { - name: "file-trigger-media-capture", - files: [ - "registry/ui/default/core/file-trigger/demos/media-capture.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/file-trigger/demos/media-capture" - ) - ), - }, - "file-trigger-multiple-files": { - name: "file-trigger-multiple-files", - files: [ - "registry/ui/default/core/file-trigger/demos/multiple-files.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/file-trigger/demos/multiple-files" - ) - ), - }, - "link-default": { - name: "link-default", - files: ["registry/ui/default/core/link/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/link/demos/default") - ), - }, - "link-disabled": { - name: "link-disabled", - files: ["registry/ui/default/core/link/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/link/demos/disabled") - ), - }, - "link-icon": { - name: "link-icon", - files: ["registry/ui/default/core/link/demos/icon.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/link/demos/icon") - ), - }, - "link-variants": { - name: "link-variants", - files: ["registry/ui/default/core/link/demos/variants.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/link/demos/variants") - ), - }, - "list-box-async-loading": { - name: "list-box-async-loading", - files: ["registry/ui/default/core/list-box/demos/async-loading.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/list-box/demos/async-loading") - ), - }, - "list-box-basic": { - name: "list-box-basic", - files: ["registry/ui/default/core/list-box/demos/basic.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/list-box/demos/basic") - ), - }, - "list-box-composition": { - name: "list-box-composition", - files: ["registry/ui/default/core/list-box/demos/composition.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/list-box/demos/composition") - ), - }, - "list-box-contact-list": { - name: "list-box-contact-list", - files: ["registry/ui/default/core/list-box/demos/contact-list.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/list-box/demos/contact-list") - ), - }, - "list-box-controlled": { - name: "list-box-controlled", - files: ["registry/ui/default/core/list-box/demos/controlled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/list-box/demos/controlled") - ), - }, - "list-box-disabled-items": { - name: "list-box-disabled-items", - files: ["registry/ui/default/core/list-box/demos/disabled-items.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/list-box/demos/disabled-items") - ), - }, - "list-box-empty-state": { - name: "list-box-empty-state", - files: ["registry/ui/default/core/list-box/demos/empty-state.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/list-box/demos/empty-state") - ), - }, - "list-box-grid": { - name: "list-box-grid", - files: ["registry/ui/default/core/list-box/demos/grid.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/list-box/demos/grid") - ), - }, - "list-box-horizontal": { - name: "list-box-horizontal", - files: ["registry/ui/default/core/list-box/demos/horizontal.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/list-box/demos/horizontal") - ), - }, - "list-box-image-grid": { - name: "list-box-image-grid", - files: ["registry/ui/default/core/list-box/demos/image-grid.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/list-box/demos/image-grid") - ), - }, - "list-box-item-variant": { - name: "list-box-item-variant", - files: ["registry/ui/default/core/list-box/demos/item-variant.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/list-box/demos/item-variant") - ), - }, - "list-box-label-and-description": { - name: "list-box-label-and-description", - files: [ - "registry/ui/default/core/list-box/demos/label-and-description.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/list-box/demos/label-and-description" - ) - ), - }, - "list-box-links": { - name: "list-box-links", - files: ["registry/ui/default/core/list-box/demos/links.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/list-box/demos/links") - ), - }, - "list-box-loading": { - name: "list-box-loading", - files: ["registry/ui/default/core/list-box/demos/loading.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/list-box/demos/loading") - ), - }, - "list-box-prefix-and-suffix": { - name: "list-box-prefix-and-suffix", - files: [ - "registry/ui/default/core/list-box/demos/prefix-and-suffix.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/list-box/demos/prefix-and-suffix" - ) - ), - }, - "list-box-sections": { - name: "list-box-sections", - files: ["registry/ui/default/core/list-box/demos/sections.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/list-box/demos/sections") - ), - }, - "list-box-selection-behavior": { - name: "list-box-selection-behavior", - files: [ - "registry/ui/default/core/list-box/demos/selection-behavior.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/list-box/demos/selection-behavior" - ) - ), - }, - "list-box-selection-mode": { - name: "list-box-selection-mode", - files: ["registry/ui/default/core/list-box/demos/selection-mode.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/list-box/demos/selection-mode") - ), - }, - "list-box-separator": { - name: "list-box-separator", - files: ["registry/ui/default/core/list-box/demos/separator.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/list-box/demos/separator") - ), - }, - "list-box-uncontrolled": { - name: "list-box-uncontrolled", - files: ["registry/ui/default/core/list-box/demos/uncontrolled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/list-box/demos/uncontrolled") - ), - }, - "menu-basic": { - name: "menu-basic", - files: ["registry/ui/default/core/menu/demos/basic.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/menu/demos/basic") - ), - }, - "menu-composition": { - name: "menu-composition", - files: ["registry/ui/default/core/menu/demos/composition.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/menu/demos/composition") - ), - }, - "menu-controlled": { - name: "menu-controlled", - files: ["registry/ui/default/core/menu/demos/controlled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/menu/demos/controlled") - ), - }, - "menu-disabled-items": { - name: "menu-disabled-items", - files: ["registry/ui/default/core/menu/demos/disabled-items.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/menu/demos/disabled-items") - ), - }, - "menu-item-variant": { - name: "menu-item-variant", - files: ["registry/ui/default/core/menu/demos/item-variant.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/menu/demos/item-variant") - ), - }, - "menu-label-and-description": { - name: "menu-label-and-description", - files: [ - "registry/ui/default/core/menu/demos/label-and-description.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/menu/demos/label-and-description" - ) - ), - }, - "menu-link-items": { - name: "menu-link-items", - files: ["registry/ui/default/core/menu/demos/link-items.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/menu/demos/link-items") - ), - }, - "menu-long-press": { - name: "menu-long-press", - files: ["registry/ui/default/core/menu/demos/long-press.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/menu/demos/long-press") - ), - }, - "menu-multiple-selection": { - name: "menu-multiple-selection", - files: ["registry/ui/default/core/menu/demos/multiple-selection.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/menu/demos/multiple-selection") - ), - }, - "menu-overlay-type": { - name: "menu-overlay-type", - files: ["registry/ui/default/core/menu/demos/overlay-type.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/menu/demos/overlay-type") - ), - }, - "menu-placement": { - name: "menu-placement", - files: ["registry/ui/default/core/menu/demos/placement.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/menu/demos/placement") - ), - }, - "menu-prefix-and-suffix": { - name: "menu-prefix-and-suffix", - files: ["registry/ui/default/core/menu/demos/prefix-and-suffix.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/menu/demos/prefix-and-suffix") - ), - }, - "menu-section": { - name: "menu-section", - files: ["registry/ui/default/core/menu/demos/section.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/menu/demos/section") - ), - }, - "menu-separator": { - name: "menu-separator", - files: ["registry/ui/default/core/menu/demos/separator.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/menu/demos/separator") - ), - }, - "menu-shortcut": { - name: "menu-shortcut", - files: ["registry/ui/default/core/menu/demos/shortcut.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/menu/demos/shortcut") - ), - }, - "menu-single-selection": { - name: "menu-single-selection", - files: ["registry/ui/default/core/menu/demos/single-selection.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/menu/demos/single-selection") - ), - }, - "menu-submenus": { - name: "menu-submenus", - files: ["registry/ui/default/core/menu/demos/submenus.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/menu/demos/submenus") - ), - }, - "number-field-composition": { - name: "number-field-composition", - files: ["registry/ui/default/core/number-field/demos/composition.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/number-field/demos/composition") - ), - }, - "number-field-contextual-help": { - name: "number-field-contextual-help", - files: [ - "registry/ui/default/core/number-field/demos/contextual-help.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/number-field/demos/contextual-help" - ) - ), - }, - "number-field-controlled": { - name: "number-field-controlled", - files: ["registry/ui/default/core/number-field/demos/controlled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/number-field/demos/controlled") - ), - }, - "number-field-default": { - name: "number-field-default", - files: ["registry/ui/default/core/number-field/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/number-field/demos/default") - ), - }, - "number-field-description": { - name: "number-field-description", - files: ["registry/ui/default/core/number-field/demos/description.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/number-field/demos/description") - ), - }, - "number-field-disabled": { - name: "number-field-disabled", - files: ["registry/ui/default/core/number-field/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/number-field/demos/disabled") - ), - }, - "number-field-error-message": { - name: "number-field-error-message", - files: [ - "registry/ui/default/core/number-field/demos/error-message.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/number-field/demos/error-message" - ) - ), - }, - "number-field-format-options": { - name: "number-field-format-options", - files: [ - "registry/ui/default/core/number-field/demos/format-options.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/number-field/demos/format-options" - ) - ), - }, - "number-field-label": { - name: "number-field-label", - files: ["registry/ui/default/core/number-field/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/number-field/demos/label") - ), - }, - "number-field-read-only": { - name: "number-field-read-only", - files: ["registry/ui/default/core/number-field/demos/read-only.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/number-field/demos/read-only") - ), - }, - "number-field-required": { - name: "number-field-required", - files: ["registry/ui/default/core/number-field/demos/required.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/number-field/demos/required") - ), - }, - "number-field-sizes": { - name: "number-field-sizes", - files: ["registry/ui/default/core/number-field/demos/sizes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/number-field/demos/sizes") - ), - }, - "number-field-uncontrolled": { - name: "number-field-uncontrolled", - files: ["registry/ui/default/core/number-field/demos/uncontrolled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/number-field/demos/uncontrolled") - ), - }, - "progress-composition": { - name: "progress-composition", - files: ["registry/ui/default/core/progress/demos/composition.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/progress/demos/composition") - ), - }, - "progress-custom-color": { - name: "progress-custom-color", - files: ["registry/ui/default/core/progress/demos/custom-color.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/progress/demos/custom-color") - ), - }, - "progress-custom-value-label": { - name: "progress-custom-value-label", - files: [ - "registry/ui/default/core/progress/demos/custom-value-label.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/progress/demos/custom-value-label" - ) - ), - }, - "progress-default": { - name: "progress-default", - files: ["registry/ui/default/core/progress/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/progress/demos/default") - ), - }, - "progress-duration": { - name: "progress-duration", - files: ["registry/ui/default/core/progress/demos/duration.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/progress/demos/duration") - ), - }, - "progress-format-options": { - name: "progress-format-options", - files: ["registry/ui/default/core/progress/demos/format-options.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/progress/demos/format-options") - ), - }, - "progress-indeterminate": { - name: "progress-indeterminate", - files: ["registry/ui/default/core/progress/demos/indeterminate.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/progress/demos/indeterminate") - ), - }, - "progress-label": { - name: "progress-label", - files: ["registry/ui/default/core/progress/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/progress/demos/label") - ), - }, - "progress-min-max-values": { - name: "progress-min-max-values", - files: ["registry/ui/default/core/progress/demos/min-max-values.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/progress/demos/min-max-values") - ), - }, - "progress-shape": { - name: "progress-shape", - files: ["registry/ui/default/core/progress/demos/shape.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/progress/demos/shape") - ), - }, - "progress-sizes": { - name: "progress-sizes", - files: ["registry/ui/default/core/progress/demos/sizes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/progress/demos/sizes") - ), - }, - "progress-toolbar": { - name: "progress-toolbar", - files: ["registry/ui/default/core/progress/demos/toolbar.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/progress/demos/toolbar") - ), - }, - "progress-value-label": { - name: "progress-value-label", - files: ["registry/ui/default/core/progress/demos/value-label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/progress/demos/value-label") - ), - }, - "progress-variants": { - name: "progress-variants", - files: ["registry/ui/default/core/progress/demos/variants.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/progress/demos/variants") - ), - }, - "radio-group-cards": { - name: "radio-group-cards", - files: ["registry/ui/default/core/radio-group/demos/cards.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/radio-group/demos/cards") - ), - }, - "radio-group-composition": { - name: "radio-group-composition", - files: ["registry/ui/default/core/radio-group/demos/composition.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/radio-group/demos/composition") - ), - }, - "radio-group-contextual-help": { - name: "radio-group-contextual-help", - files: [ - "registry/ui/default/core/radio-group/demos/contextual-help.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/radio-group/demos/contextual-help" - ) - ), - }, - "radio-group-controlled": { - name: "radio-group-controlled", - files: ["registry/ui/default/core/radio-group/demos/controlled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/radio-group/demos/controlled") - ), - }, - "radio-group-default": { - name: "radio-group-default", - files: ["registry/ui/default/core/radio-group/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/radio-group/demos/default") - ), - }, - "radio-group-description": { - name: "radio-group-description", - files: ["registry/ui/default/core/radio-group/demos/description.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/radio-group/demos/description") - ), - }, - "radio-group-disabled": { - name: "radio-group-disabled", - files: ["registry/ui/default/core/radio-group/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/radio-group/demos/disabled") - ), - }, - "radio-group-error-message": { - name: "radio-group-error-message", - files: ["registry/ui/default/core/radio-group/demos/error-message.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/radio-group/demos/error-message") - ), - }, - "radio-group-label": { - name: "radio-group-label", - files: ["registry/ui/default/core/radio-group/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/radio-group/demos/label") - ), - }, - "radio-group-orientation": { - name: "radio-group-orientation", - files: ["registry/ui/default/core/radio-group/demos/orientation.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/radio-group/demos/orientation") - ), - }, - "radio-group-read-only": { - name: "radio-group-read-only", - files: ["registry/ui/default/core/radio-group/demos/read-only.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/radio-group/demos/read-only") - ), - }, - "radio-group-required": { - name: "radio-group-required", - files: ["registry/ui/default/core/radio-group/demos/required.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/radio-group/demos/required") - ), - }, - "radio-group-uncontrolled": { - name: "radio-group-uncontrolled", - files: ["registry/ui/default/core/radio-group/demos/uncontrolled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/radio-group/demos/uncontrolled") - ), - }, - "range-calendar-composition": { - name: "range-calendar-composition", - files: [ - "registry/ui/default/core/range-calendar/demos/composition.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/range-calendar/demos/composition" - ) - ), - }, - "range-calendar-controlled": { - name: "range-calendar-controlled", - files: ["registry/ui/default/core/range-calendar/demos/controlled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/range-calendar/demos/controlled") - ), - }, - "range-calendar-default": { - name: "range-calendar-default", - files: ["registry/ui/default/core/range-calendar/demos/default.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/range-calendar/demos/default") - ), - }, - "range-calendar-disabled": { - name: "range-calendar-disabled", - files: ["registry/ui/default/core/range-calendar/demos/disabled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/range-calendar/demos/disabled") - ), - }, - "range-calendar-error-message": { - name: "range-calendar-error-message", - files: [ - "registry/ui/default/core/range-calendar/demos/error-message.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/range-calendar/demos/error-message" - ) - ), - }, - "range-calendar-label": { - name: "range-calendar-label", - files: ["registry/ui/default/core/range-calendar/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/range-calendar/demos/label") - ), - }, - "range-calendar-non-contiguous-ranges": { - name: "range-calendar-non-contiguous-ranges", - files: [ - "registry/ui/default/core/range-calendar/demos/non-contiguous-ranges.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/range-calendar/demos/non-contiguous-ranges" - ) - ), - }, - "range-calendar-page-behaviour": { - name: "range-calendar-page-behaviour", - files: [ - "registry/ui/default/core/range-calendar/demos/page-behaviour.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/range-calendar/demos/page-behaviour" - ) - ), - }, - "range-calendar-read-only": { - name: "range-calendar-read-only", - files: ["registry/ui/default/core/range-calendar/demos/read-only.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/range-calendar/demos/read-only") - ), - }, - "range-calendar-uncontrolled": { - name: "range-calendar-uncontrolled", - files: [ - "registry/ui/default/core/range-calendar/demos/uncontrolled.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/range-calendar/demos/uncontrolled" - ) - ), - }, - "range-calendar-unvailable-dates": { - name: "range-calendar-unvailable-dates", - files: [ - "registry/ui/default/core/range-calendar/demos/unvailable-dates.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/range-calendar/demos/unvailable-dates" - ) - ), - }, - "range-calendar-validation": { - name: "range-calendar-validation", - files: ["registry/ui/default/core/range-calendar/demos/validation.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/range-calendar/demos/validation") - ), - }, - "range-calendar-visible-months": { - name: "range-calendar-visible-months", - files: [ - "registry/ui/default/core/range-calendar/demos/visible-months.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/range-calendar/demos/visible-months" - ) - ), - }, - "scroll-area-default": { - name: "scroll-area-default", - files: ["registry/ui/default/core/scroll-area/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/scroll-area/demos/default") - ), - }, - "scroll-area-scrollbars": { - name: "scroll-area-scrollbars", - files: ["registry/ui/default/core/scroll-area/demos/scrollbars.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/scroll-area/demos/scrollbars") - ), - }, - "scroll-area-sizes": { - name: "scroll-area-sizes", - files: ["registry/ui/default/core/scroll-area/demos/sizes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/scroll-area/demos/sizes") - ), - }, - "search-field-composition": { - name: "search-field-composition", - files: ["registry/ui/default/core/search-field/demos/composition.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/search-field/demos/composition") - ), - }, - "search-field-contextual-help": { - name: "search-field-contextual-help", - files: [ - "registry/ui/default/core/search-field/demos/contextual-help.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/search-field/demos/contextual-help" - ) - ), - }, - "search-field-controlled": { - name: "search-field-controlled", - files: ["registry/ui/default/core/search-field/demos/controlled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/search-field/demos/controlled") - ), - }, - "search-field-default": { - name: "search-field-default", - files: ["registry/ui/default/core/search-field/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/search-field/demos/default") - ), - }, - "search-field-description": { - name: "search-field-description", - files: ["registry/ui/default/core/search-field/demos/description.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/search-field/demos/description") - ), - }, - "search-field-disabled": { - name: "search-field-disabled", - files: ["registry/ui/default/core/search-field/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/search-field/demos/disabled") - ), - }, - "search-field-error-message": { - name: "search-field-error-message", - files: [ - "registry/ui/default/core/search-field/demos/error-message.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/search-field/demos/error-message" - ) - ), - }, - "search-field-form": { - name: "search-field-form", - files: ["registry/ui/default/core/search-field/demos/form.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/search-field/demos/form") - ), - }, - "search-field-label": { - name: "search-field-label", - files: ["registry/ui/default/core/search-field/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/search-field/demos/label") - ), - }, - "search-field-loading": { - name: "search-field-loading", - files: ["registry/ui/default/core/search-field/demos/loading.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/search-field/demos/loading") - ), - }, - "search-field-prefix-and-suffix": { - name: "search-field-prefix-and-suffix", - files: [ - "registry/ui/default/core/search-field/demos/prefix-and-suffix.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/search-field/demos/prefix-and-suffix" - ) - ), - }, - "search-field-read-only": { - name: "search-field-read-only", - files: ["registry/ui/default/core/search-field/demos/read-only.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/search-field/demos/read-only") - ), - }, - "search-field-required": { - name: "search-field-required", - files: ["registry/ui/default/core/search-field/demos/required.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/search-field/demos/required") - ), - }, - "search-field-sizes": { - name: "search-field-sizes", - files: ["registry/ui/default/core/search-field/demos/sizes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/search-field/demos/sizes") - ), - }, - "search-field-uncontrolled": { - name: "search-field-uncontrolled", - files: ["registry/ui/default/core/search-field/demos/uncontrolled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/search-field/demos/uncontrolled") - ), - }, - "select-async-loading": { - name: "select-async-loading", - files: ["registry/ui/default/core/select/demos/async-loading.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/select/demos/async-loading") - ), - }, - "select-basic": { - name: "select-basic", - files: ["registry/ui/default/core/select/demos/basic.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/select/demos/basic") - ), - }, - "select-composition": { - name: "select-composition", - files: ["registry/ui/default/core/select/demos/composition.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/select/demos/composition") - ), - }, - "select-contextual-help": { - name: "select-contextual-help", - files: ["registry/ui/default/core/select/demos/contextual-help.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/select/demos/contextual-help") - ), - }, - "select-controlled": { - name: "select-controlled", - files: ["registry/ui/default/core/select/demos/controlled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/select/demos/controlled") - ), - }, - "select-description": { - name: "select-description", - files: ["registry/ui/default/core/select/demos/description.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/select/demos/description") - ), - }, - "select-disabled": { - name: "select-disabled", - files: ["registry/ui/default/core/select/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/select/demos/disabled") - ), - }, - "select-label": { - name: "select-label", - files: ["registry/ui/default/core/select/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/select/demos/label") - ), - }, - "select-links": { - name: "select-links", - files: ["registry/ui/default/core/select/demos/links.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/select/demos/links") - ), - }, - "select-loading": { - name: "select-loading", - files: ["registry/ui/default/core/select/demos/loading.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/select/demos/loading") - ), - }, - "select-placeholder": { - name: "select-placeholder", - files: ["registry/ui/default/core/select/demos/placeholder.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/select/demos/placeholder") - ), - }, - "select-required": { - name: "select-required", - files: ["registry/ui/default/core/select/demos/required.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/select/demos/required") - ), - }, - "select-sections": { - name: "select-sections", - files: ["registry/ui/default/core/select/demos/sections.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/select/demos/sections") - ), - }, - "select-uncontrolled": { - name: "select-uncontrolled", - files: ["registry/ui/default/core/select/demos/uncontrolled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/select/demos/uncontrolled") - ), - }, - "select-validation": { - name: "select-validation", - files: ["registry/ui/default/core/select/demos/validation.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/select/demos/validation") - ), - }, - "separator-card": { - name: "separator-card", - files: ["registry/ui/default/core/separator/demos/card.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/separator/demos/card") - ), - }, - "separator-orientation": { - name: "separator-orientation", - files: ["registry/ui/default/core/separator/demos/orientation.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/separator/demos/orientation") - ), - }, - "skeleton-api-simulation": { - name: "skeleton-api-simulation", - files: ["registry/ui/default/core/skeleton/demos/api-simulation.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/skeleton/demos/api-simulation") - ), - }, - "skeleton-card": { - name: "skeleton-card", - files: ["registry/ui/default/core/skeleton/demos/card.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/skeleton/demos/card") - ), - }, - "skeleton-children": { - name: "skeleton-children", - files: ["registry/ui/default/core/skeleton/demos/children.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/skeleton/demos/children") - ), - }, - "skeleton-fixed-size-children": { - name: "skeleton-fixed-size-children", - files: [ - "registry/ui/default/core/skeleton/demos/fixed-size-children.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/skeleton/demos/fixed-size-children" - ) - ), - }, - "skeleton-show": { - name: "skeleton-show", - files: ["registry/ui/default/core/skeleton/demos/show.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/skeleton/demos/show") - ), - }, - "slider-advanced-composition": { - name: "slider-advanced-composition", - files: [ - "registry/ui/default/core/slider/demos/advanced-composition.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/slider/demos/advanced-composition" - ) - ), - }, - "slider-composition": { - name: "slider-composition", - files: ["registry/ui/default/core/slider/demos/composition.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/slider/demos/composition") - ), - }, - "slider-controlled": { - name: "slider-controlled", - files: ["registry/ui/default/core/slider/demos/controlled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/slider/demos/controlled") - ), - }, - "slider-default": { - name: "slider-default", - files: ["registry/ui/default/core/slider/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/slider/demos/default") - ), - }, - "slider-description": { - name: "slider-description", - files: ["registry/ui/default/core/slider/demos/description.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/slider/demos/description") - ), - }, - "slider-disabled": { - name: "slider-disabled", - files: ["registry/ui/default/core/slider/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/slider/demos/disabled") - ), - }, - "slider-format-options": { - name: "slider-format-options", - files: ["registry/ui/default/core/slider/demos/format-options.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/slider/demos/format-options") - ), - }, - "slider-label": { - name: "slider-label", - files: ["registry/ui/default/core/slider/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/slider/demos/label") - ), - }, - "slider-range": { - name: "slider-range", - files: ["registry/ui/default/core/slider/demos/range.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/slider/demos/range") - ), - }, - "slider-sizes": { - name: "slider-sizes", - files: ["registry/ui/default/core/slider/demos/sizes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/slider/demos/sizes") - ), - }, - "slider-step": { - name: "slider-step", - files: ["registry/ui/default/core/slider/demos/step.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/slider/demos/step") - ), - }, - "slider-uncontrolled": { - name: "slider-uncontrolled", - files: ["registry/ui/default/core/slider/demos/uncontrolled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/slider/demos/uncontrolled") - ), - }, - "slider-value-label": { - name: "slider-value-label", - files: ["registry/ui/default/core/slider/demos/value-label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/slider/demos/value-label") - ), - }, - "slider-value-scale": { - name: "slider-value-scale", - files: ["registry/ui/default/core/slider/demos/value-scale.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/slider/demos/value-scale") - ), - }, - "slider-vertical": { - name: "slider-vertical", - files: ["registry/ui/default/core/slider/demos/vertical.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/slider/demos/vertical") - ), - }, - "switch-controlled": { - name: "switch-controlled", - files: ["registry/ui/default/core/switch/demos/controlled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/switch/demos/controlled") - ), - }, - "switch-default": { - name: "switch-default", - files: ["registry/ui/default/core/switch/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/switch/demos/default") - ), - }, - "switch-disabled": { - name: "switch-disabled", - files: ["registry/ui/default/core/switch/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/switch/demos/disabled") - ), - }, - "switch-label": { - name: "switch-label", - files: ["registry/ui/default/core/switch/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/switch/demos/label") - ), - }, - "switch-sizes": { - name: "switch-sizes", - files: ["registry/ui/default/core/switch/demos/sizes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/switch/demos/sizes") - ), - }, - "switch-uncontrolled": { - name: "switch-uncontrolled", - files: ["registry/ui/default/core/switch/demos/uncontrolled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/switch/demos/uncontrolled") - ), - }, - "tabs-basic": { - name: "tabs-basic", - files: ["registry/ui/default/core/tabs/demos/basic.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/tabs/demos/basic") - ), - }, - "tabs-controlled": { - name: "tabs-controlled", - files: ["registry/ui/default/core/tabs/demos/controlled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/tabs/demos/controlled") - ), - }, - "tabs-disabled-item": { - name: "tabs-disabled-item", - files: ["registry/ui/default/core/tabs/demos/disabled-item.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/tabs/demos/disabled-item") - ), - }, - "tabs-disabled": { - name: "tabs-disabled", - files: ["registry/ui/default/core/tabs/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/tabs/demos/disabled") - ), - }, - "tabs-keyboard-activation": { - name: "tabs-keyboard-activation", - files: ["registry/ui/default/core/tabs/demos/keyboard-activation.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/tabs/demos/keyboard-activation") - ), - }, - "tabs-vertical": { - name: "tabs-vertical", - files: ["registry/ui/default/core/tabs/demos/vertical.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/tabs/demos/vertical") - ), - }, - "text-area-composition": { - name: "text-area-composition", - files: ["registry/ui/default/core/text-area/demos/composition.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-area/demos/composition") - ), - }, - "text-area-contextual-help": { - name: "text-area-contextual-help", - files: ["registry/ui/default/core/text-area/demos/contextual-help.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/text-area/demos/contextual-help") - ), - }, - "text-area-controlled": { - name: "text-area-controlled", - files: ["registry/ui/default/core/text-area/demos/controlled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-area/demos/controlled") - ), - }, - "text-area-default": { - name: "text-area-default", - files: ["registry/ui/default/core/text-area/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-area/demos/default") - ), - }, - "text-area-description": { - name: "text-area-description", - files: ["registry/ui/default/core/text-area/demos/description.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-area/demos/description") - ), - }, - "text-area-disabled": { - name: "text-area-disabled", - files: ["registry/ui/default/core/text-area/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-area/demos/disabled") - ), - }, - "text-area-error-message": { - name: "text-area-error-message", - files: ["registry/ui/default/core/text-area/demos/error-message.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/text-area/demos/error-message") - ), - }, - "text-area-form": { - name: "text-area-form", - files: ["registry/ui/default/core/text-area/demos/form.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-area/demos/form") - ), - }, - "text-area-label": { - name: "text-area-label", - files: ["registry/ui/default/core/text-area/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-area/demos/label") - ), - }, - "text-area-loading": { - name: "text-area-loading", - files: ["registry/ui/default/core/text-area/demos/loading.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-area/demos/loading") - ), - }, - "text-area-prefix-and-suffix": { - name: "text-area-prefix-and-suffix", - files: [ - "registry/ui/default/core/text-area/demos/prefix-and-suffix.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/text-area/demos/prefix-and-suffix" - ) - ), - }, - "text-area-read-only": { - name: "text-area-read-only", - files: ["registry/ui/default/core/text-area/demos/read-only.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-area/demos/read-only") - ), - }, - "text-area-required": { - name: "text-area-required", - files: ["registry/ui/default/core/text-area/demos/required.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-area/demos/required") - ), - }, - "text-area-uncontrolled": { - name: "text-area-uncontrolled", - files: ["registry/ui/default/core/text-area/demos/uncontrolled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/text-area/demos/uncontrolled") - ), - }, - "text-field-composition": { - name: "text-field-composition", - files: ["registry/ui/default/core/text-field/demos/composition.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/text-field/demos/composition") - ), - }, - "text-field-contextual-help": { - name: "text-field-contextual-help", - files: [ - "registry/ui/default/core/text-field/demos/contextual-help.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/text-field/demos/contextual-help" - ) - ), - }, - "text-field-controlled": { - name: "text-field-controlled", - files: ["registry/ui/default/core/text-field/demos/controlled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-field/demos/controlled") - ), - }, - "text-field-default": { - name: "text-field-default", - files: ["registry/ui/default/core/text-field/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-field/demos/default") - ), - }, - "text-field-description": { - name: "text-field-description", - files: ["registry/ui/default/core/text-field/demos/description.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/text-field/demos/description") - ), - }, - "text-field-disabled": { - name: "text-field-disabled", - files: ["registry/ui/default/core/text-field/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-field/demos/disabled") - ), - }, - "text-field-error-message": { - name: "text-field-error-message", - files: ["registry/ui/default/core/text-field/demos/error-message.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/text-field/demos/error-message") - ), - }, - "text-field-label": { - name: "text-field-label", - files: ["registry/ui/default/core/text-field/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-field/demos/label") - ), - }, - "text-field-loading": { - name: "text-field-loading", - files: ["registry/ui/default/core/text-field/demos/loading.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-field/demos/loading") - ), - }, - "text-field-prefix-and-suffix": { - name: "text-field-prefix-and-suffix", - files: [ - "registry/ui/default/core/text-field/demos/prefix-and-suffix.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/text-field/demos/prefix-and-suffix" - ) - ), - }, - "text-field-read-only": { - name: "text-field-read-only", - files: ["registry/ui/default/core/text-field/demos/read-only.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-field/demos/read-only") - ), - }, - "text-field-required": { - name: "text-field-required", - files: ["registry/ui/default/core/text-field/demos/required.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-field/demos/required") - ), - }, - "text-field-sizes": { - name: "text-field-sizes", - files: ["registry/ui/default/core/text-field/demos/sizes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/text-field/demos/sizes") - ), - }, - "text-field-uncontrolled": { - name: "text-field-uncontrolled", - files: ["registry/ui/default/core/text-field/demos/uncontrolled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/text-field/demos/uncontrolled") - ), - }, - "time-field-composition": { - name: "time-field-composition", - files: ["registry/ui/default/core/time-field/demos/composition.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/time-field/demos/composition") - ), - }, - "time-field-contextual-help": { - name: "time-field-contextual-help", - files: [ - "registry/ui/default/core/time-field/demos/contextual-help.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/time-field/demos/contextual-help" - ) - ), - }, - "time-field-controlled": { - name: "time-field-controlled", - files: ["registry/ui/default/core/time-field/demos/controlled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/time-field/demos/controlled") - ), - }, - "time-field-default": { - name: "time-field-default", - files: ["registry/ui/default/core/time-field/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/time-field/demos/default") - ), - }, - "time-field-description": { - name: "time-field-description", - files: ["registry/ui/default/core/time-field/demos/description.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/time-field/demos/description") - ), - }, - "time-field-disabled": { - name: "time-field-disabled", - files: ["registry/ui/default/core/time-field/demos/disabled.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/time-field/demos/disabled") - ), - }, - "time-field-error-message": { - name: "time-field-error-message", - files: ["registry/ui/default/core/time-field/demos/error-message.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/time-field/demos/error-message") - ), - }, - "time-field-granularity": { - name: "time-field-granularity", - files: ["registry/ui/default/core/time-field/demos/granularity.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/time-field/demos/granularity") - ), - }, - "time-field-hide-time-zone": { - name: "time-field-hide-time-zone", - files: ["registry/ui/default/core/time-field/demos/hide-time-zone.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/time-field/demos/hide-time-zone") - ), - }, - "time-field-hour-cycle": { - name: "time-field-hour-cycle", - files: ["registry/ui/default/core/time-field/demos/hour-cycle.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/time-field/demos/hour-cycle") - ), - }, - "time-field-label": { - name: "time-field-label", - files: ["registry/ui/default/core/time-field/demos/label.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/time-field/demos/label") - ), - }, - "time-field-loading": { - name: "time-field-loading", - files: ["registry/ui/default/core/time-field/demos/loading.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/time-field/demos/loading") - ), - }, - "time-field-placeholder": { - name: "time-field-placeholder", - files: ["registry/ui/default/core/time-field/demos/placeholder.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/time-field/demos/placeholder") - ), - }, - "time-field-prefix-and-suffix": { - name: "time-field-prefix-and-suffix", - files: [ - "registry/ui/default/core/time-field/demos/prefix-and-suffix.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/time-field/demos/prefix-and-suffix" - ) - ), - }, - "time-field-read-only": { - name: "time-field-read-only", - files: ["registry/ui/default/core/time-field/demos/read-only.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/time-field/demos/read-only") - ), - }, - "time-field-required": { - name: "time-field-required", - files: ["registry/ui/default/core/time-field/demos/required.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/time-field/demos/required") - ), - }, - "time-field-sizes": { - name: "time-field-sizes", - files: ["registry/ui/default/core/time-field/demos/sizes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/time-field/demos/sizes") - ), - }, - "time-field-time-zones": { - name: "time-field-time-zones", - files: ["registry/ui/default/core/time-field/demos/time-zones.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/time-field/demos/time-zones") - ), - }, - "time-field-uncontrolled": { - name: "time-field-uncontrolled", - files: ["registry/ui/default/core/time-field/demos/uncontrolled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/time-field/demos/uncontrolled") - ), - }, - "toggle-button-controlled": { - name: "toggle-button-controlled", - files: ["registry/ui/default/core/toggle-button/demos/controlled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/toggle-button/demos/controlled") - ), - }, - "toggle-button-default": { - name: "toggle-button-default", - files: ["registry/ui/default/core/toggle-button/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/toggle-button/demos/default") - ), - }, - "toggle-button-disabled": { - name: "toggle-button-disabled", - files: ["registry/ui/default/core/toggle-button/demos/disabled.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/toggle-button/demos/disabled") - ), - }, - "toggle-button-shapes": { - name: "toggle-button-shapes", - files: ["registry/ui/default/core/toggle-button/demos/shapes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/toggle-button/demos/shapes") - ), - }, - "toggle-button-sizes": { - name: "toggle-button-sizes", - files: ["registry/ui/default/core/toggle-button/demos/sizes.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/toggle-button/demos/sizes") - ), - }, - "toggle-button-uncontrolled": { - name: "toggle-button-uncontrolled", - files: [ - "registry/ui/default/core/toggle-button/demos/uncontrolled.tsx", - ], - component: React.lazy( - () => - import( - "@/registry/ui/default/core/toggle-button/demos/uncontrolled" - ) - ), - }, - "toggle-button-variants": { - name: "toggle-button-variants", - files: ["registry/ui/default/core/toggle-button/demos/variants.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/toggle-button/demos/variants") - ), - }, - "tooltip-arrow": { - name: "tooltip-arrow", - files: ["registry/ui/default/core/tooltip/demos/arrow.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/tooltip/demos/arrow") - ), - }, - "tooltip-composition": { - name: "tooltip-composition", - files: ["registry/ui/default/core/tooltip/demos/composition.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/tooltip/demos/composition") - ), - }, - "tooltip-container-padding": { - name: "tooltip-container-padding", - files: ["registry/ui/default/core/tooltip/demos/container-padding.tsx"], - component: React.lazy( - () => - import("@/registry/ui/default/core/tooltip/demos/container-padding") - ), - }, - "tooltip-default": { - name: "tooltip-default", - files: ["registry/ui/default/core/tooltip/demos/default.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/tooltip/demos/default") - ), - }, - "tooltip-delay": { - name: "tooltip-delay", - files: ["registry/ui/default/core/tooltip/demos/delay.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/tooltip/demos/delay") - ), - }, - "tooltip-flip": { - name: "tooltip-flip", - files: ["registry/ui/default/core/tooltip/demos/flip.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/tooltip/demos/flip") - ), - }, - "tooltip-offset": { - name: "tooltip-offset", - files: ["registry/ui/default/core/tooltip/demos/offset.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/tooltip/demos/offset") - ), - }, - "tooltip-placement": { - name: "tooltip-placement", - files: ["registry/ui/default/core/tooltip/demos/placement.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/tooltip/demos/placement") - ), - }, - "tooltip-with-arrow": { - name: "tooltip-with-arrow", - files: ["registry/ui/default/core/tooltip/demos/with-arrow.tsx"], - component: React.lazy( - () => import("@/registry/ui/default/core/tooltip/demos/with-arrow") - ), - }, - }, - }, -}; +// This file is autogenerated by scripts/build-registry.ts +// Do not edit this file directly. +import * as React from "react"; + +export const Index: Record = { + core: { + default: { + "alert-action": { + name: "alert-action", + files: ["registry/ui/default/core/alert/demos/action.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/alert/demos/action") + ), + }, + "alert-composition": { + name: "alert-composition", + files: ["registry/ui/default/core/alert/demos/composition.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/alert/demos/composition") + ), + }, + "alert-content": { + name: "alert-content", + files: ["registry/ui/default/core/alert/demos/content.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/alert/demos/content") + ), + }, + "alert-custom-icon": { + name: "alert-custom-icon", + files: ["registry/ui/default/core/alert/demos/custom-icon.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/alert/demos/custom-icon") + ), + }, + "alert-default": { + name: "alert-default", + files: ["registry/ui/default/core/alert/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/alert/demos/default") + ), + }, + "alert-title": { + name: "alert-title", + files: ["registry/ui/default/core/alert/demos/title.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/alert/demos/title") + ), + }, + "alert-variants": { + name: "alert-variants", + files: ["registry/ui/default/core/alert/demos/variants.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/alert/demos/variants") + ), + }, + "aspect-ratio-as-child": { + name: "aspect-ratio-as-child", + files: ["registry/ui/default/core/aspect-ratio/demos/as-child.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/aspect-ratio/demos/as-child") + ), + }, + "aspect-ratio-default": { + name: "aspect-ratio-default", + files: ["registry/ui/default/core/aspect-ratio/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/aspect-ratio/demos/default") + ), + }, + "avatar-composition": { + name: "avatar-composition", + files: ["registry/ui/default/core/avatar/demos/composition.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/avatar/demos/composition") + ), + }, + "avatar-default": { + name: "avatar-default", + files: ["registry/ui/default/core/avatar/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/avatar/demos/default") + ), + }, + "avatar-shape": { + name: "avatar-shape", + files: ["registry/ui/default/core/avatar/demos/shape.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/avatar/demos/shape") + ), + }, + "avatar-sizes": { + name: "avatar-sizes", + files: ["registry/ui/default/core/avatar/demos/sizes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/avatar/demos/sizes") + ), + }, + "badge-default": { + name: "badge-default", + files: ["registry/ui/default/core/badge/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/badge/demos/default") + ), + }, + "badge-icon": { + name: "badge-icon", + files: ["registry/ui/default/core/badge/demos/icon.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/badge/demos/icon") + ), + }, + "badge-sizes": { + name: "badge-sizes", + files: ["registry/ui/default/core/badge/demos/sizes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/badge/demos/sizes") + ), + }, + "badge-variants": { + name: "badge-variants", + files: ["registry/ui/default/core/badge/demos/variants.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/badge/demos/variants") + ), + }, + "breadcrumbs-basic": { + name: "breadcrumbs-basic", + files: ["registry/ui/default/core/breadcrumbs/demos/basic.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/breadcrumbs/demos/basic") + ), + }, + "breadcrumbs-composition": { + name: "breadcrumbs-composition", + files: ["registry/ui/default/core/breadcrumbs/demos/composition.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/breadcrumbs/demos/composition") + ), + }, + "breadcrumbs-disabled": { + name: "breadcrumbs-disabled", + files: ["registry/ui/default/core/breadcrumbs/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/breadcrumbs/demos/disabled") + ), + }, + "breadcrumbs-icon": { + name: "breadcrumbs-icon", + files: ["registry/ui/default/core/breadcrumbs/demos/icon.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/breadcrumbs/demos/icon") + ), + }, + "breadcrumbs-router-integration": { + name: "breadcrumbs-router-integration", + files: [ + "registry/ui/default/core/breadcrumbs/demos/router-integration.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/breadcrumbs/demos/router-integration" + ) + ), + }, + "button-default": { + name: "button-default", + files: ["registry/ui/default/core/button/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/button/demos/default") + ), + }, + "button-disabled": { + name: "button-disabled", + files: ["registry/ui/default/core/button/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/button/demos/disabled") + ), + }, + "button-link-button": { + name: "button-link-button", + files: ["registry/ui/default/core/button/demos/link-button.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/button/demos/link-button") + ), + }, + "button-loading": { + name: "button-loading", + files: ["registry/ui/default/core/button/demos/loading.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/button/demos/loading") + ), + }, + "button-prefix-and-suffix": { + name: "button-prefix-and-suffix", + files: ["registry/ui/default/core/button/demos/prefix-and-suffix.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/button/demos/prefix-and-suffix") + ), + }, + "button-shapes": { + name: "button-shapes", + files: ["registry/ui/default/core/button/demos/shapes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/button/demos/shapes") + ), + }, + "button-sizes": { + name: "button-sizes", + files: ["registry/ui/default/core/button/demos/sizes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/button/demos/sizes") + ), + }, + "button-variants": { + name: "button-variants", + files: ["registry/ui/default/core/button/demos/variants.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/button/demos/variants") + ), + }, + "calendar-composition": { + name: "calendar-composition", + files: ["registry/ui/default/core/calendar/demos/composition.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/calendar/demos/composition") + ), + }, + "calendar-controlled": { + name: "calendar-controlled", + files: ["registry/ui/default/core/calendar/demos/controlled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/calendar/demos/controlled") + ), + }, + "calendar-default": { + name: "calendar-default", + files: ["registry/ui/default/core/calendar/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/calendar/demos/default") + ), + }, + "calendar-disabled": { + name: "calendar-disabled", + files: ["registry/ui/default/core/calendar/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/calendar/demos/disabled") + ), + }, + "calendar-error-message": { + name: "calendar-error-message", + files: ["registry/ui/default/core/calendar/demos/error-message.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/calendar/demos/error-message") + ), + }, + "calendar-label": { + name: "calendar-label", + files: ["registry/ui/default/core/calendar/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/calendar/demos/label") + ), + }, + "calendar-page-behaviour": { + name: "calendar-page-behaviour", + files: ["registry/ui/default/core/calendar/demos/page-behaviour.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/calendar/demos/page-behaviour") + ), + }, + "calendar-read-only": { + name: "calendar-read-only", + files: ["registry/ui/default/core/calendar/demos/read-only.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/calendar/demos/read-only") + ), + }, + "calendar-uncontrolled": { + name: "calendar-uncontrolled", + files: ["registry/ui/default/core/calendar/demos/uncontrolled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/calendar/demos/uncontrolled") + ), + }, + "calendar-unvailable-dates": { + name: "calendar-unvailable-dates", + files: ["registry/ui/default/core/calendar/demos/unvailable-dates.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/calendar/demos/unvailable-dates") + ), + }, + "calendar-validation": { + name: "calendar-validation", + files: ["registry/ui/default/core/calendar/demos/validation.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/calendar/demos/validation") + ), + }, + "calendar-visible-months": { + name: "calendar-visible-months", + files: ["registry/ui/default/core/calendar/demos/visible-months.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/calendar/demos/visible-months") + ), + }, + "checkbox-card": { + name: "checkbox-card", + files: ["registry/ui/default/core/checkbox/demos/card.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/checkbox/demos/card") + ), + }, + "checkbox-controlled": { + name: "checkbox-controlled", + files: ["registry/ui/default/core/checkbox/demos/controlled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/checkbox/demos/controlled") + ), + }, + "checkbox-default": { + name: "checkbox-default", + files: ["registry/ui/default/core/checkbox/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/checkbox/demos/default") + ), + }, + "checkbox-disabled": { + name: "checkbox-disabled", + files: ["registry/ui/default/core/checkbox/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/checkbox/demos/disabled") + ), + }, + "checkbox-indeterminate": { + name: "checkbox-indeterminate", + files: ["registry/ui/default/core/checkbox/demos/indeterminate.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/checkbox/demos/indeterminate") + ), + }, + "checkbox-read-only": { + name: "checkbox-read-only", + files: ["registry/ui/default/core/checkbox/demos/read-only.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/checkbox/demos/read-only") + ), + }, + "checkbox-uncontrolled": { + name: "checkbox-uncontrolled", + files: ["registry/ui/default/core/checkbox/demos/uncontrolled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/checkbox/demos/uncontrolled") + ), + }, + "checkbox-group-cards": { + name: "checkbox-group-cards", + files: ["registry/ui/default/core/checkbox-group/demos/cards.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/checkbox-group/demos/cards") + ), + }, + "checkbox-group-composition": { + name: "checkbox-group-composition", + files: [ + "registry/ui/default/core/checkbox-group/demos/composition.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/checkbox-group/demos/composition" + ) + ), + }, + "checkbox-group-contextual-help": { + name: "checkbox-group-contextual-help", + files: [ + "registry/ui/default/core/checkbox-group/demos/contextual-help.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/checkbox-group/demos/contextual-help" + ) + ), + }, + "checkbox-group-controlled": { + name: "checkbox-group-controlled", + files: ["registry/ui/default/core/checkbox-group/demos/controlled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/checkbox-group/demos/controlled") + ), + }, + "checkbox-group-default": { + name: "checkbox-group-default", + files: ["registry/ui/default/core/checkbox-group/demos/default.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/checkbox-group/demos/default") + ), + }, + "checkbox-group-description": { + name: "checkbox-group-description", + files: [ + "registry/ui/default/core/checkbox-group/demos/description.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/checkbox-group/demos/description" + ) + ), + }, + "checkbox-group-disabled": { + name: "checkbox-group-disabled", + files: ["registry/ui/default/core/checkbox-group/demos/disabled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/checkbox-group/demos/disabled") + ), + }, + "checkbox-group-error-message": { + name: "checkbox-group-error-message", + files: [ + "registry/ui/default/core/checkbox-group/demos/error-message.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/checkbox-group/demos/error-message" + ) + ), + }, + "checkbox-group-label": { + name: "checkbox-group-label", + files: ["registry/ui/default/core/checkbox-group/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/checkbox-group/demos/label") + ), + }, + "checkbox-group-read-only": { + name: "checkbox-group-read-only", + files: ["registry/ui/default/core/checkbox-group/demos/read-only.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/checkbox-group/demos/read-only") + ), + }, + "checkbox-group-required": { + name: "checkbox-group-required", + files: ["registry/ui/default/core/checkbox-group/demos/required.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/checkbox-group/demos/required") + ), + }, + "checkbox-group-uncontrolled": { + name: "checkbox-group-uncontrolled", + files: [ + "registry/ui/default/core/checkbox-group/demos/uncontrolled.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/checkbox-group/demos/uncontrolled" + ) + ), + }, + "color-area-channels": { + name: "color-area-channels", + files: ["registry/ui/default/core/color-area/demos/channels.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-area/demos/channels") + ), + }, + "color-area-composition": { + name: "color-area-composition", + files: ["registry/ui/default/core/color-area/demos/composition.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/color-area/demos/composition") + ), + }, + "color-area-controlled": { + name: "color-area-controlled", + files: ["registry/ui/default/core/color-area/demos/controlled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-area/demos/controlled") + ), + }, + "color-area-default": { + name: "color-area-default", + files: ["registry/ui/default/core/color-area/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-area/demos/default") + ), + }, + "color-area-disabled": { + name: "color-area-disabled", + files: ["registry/ui/default/core/color-area/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-area/demos/disabled") + ), + }, + "color-area-uncontrolled": { + name: "color-area-uncontrolled", + files: ["registry/ui/default/core/color-area/demos/uncontrolled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/color-area/demos/uncontrolled") + ), + }, + "color-field-composition": { + name: "color-field-composition", + files: ["registry/ui/default/core/color-field/demos/composition.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/color-field/demos/composition") + ), + }, + "color-field-contextual-help": { + name: "color-field-contextual-help", + files: [ + "registry/ui/default/core/color-field/demos/contextual-help.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/color-field/demos/contextual-help" + ) + ), + }, + "color-field-controlled": { + name: "color-field-controlled", + files: ["registry/ui/default/core/color-field/demos/controlled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/color-field/demos/controlled") + ), + }, + "color-field-default": { + name: "color-field-default", + files: ["registry/ui/default/core/color-field/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-field/demos/default") + ), + }, + "color-field-description": { + name: "color-field-description", + files: ["registry/ui/default/core/color-field/demos/description.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/color-field/demos/description") + ), + }, + "color-field-disabled": { + name: "color-field-disabled", + files: ["registry/ui/default/core/color-field/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-field/demos/disabled") + ), + }, + "color-field-error-message": { + name: "color-field-error-message", + files: ["registry/ui/default/core/color-field/demos/error-message.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/color-field/demos/error-message") + ), + }, + "color-field-form": { + name: "color-field-form", + files: ["registry/ui/default/core/color-field/demos/form.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-field/demos/form") + ), + }, + "color-field-label": { + name: "color-field-label", + files: ["registry/ui/default/core/color-field/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-field/demos/label") + ), + }, + "color-field-loading": { + name: "color-field-loading", + files: ["registry/ui/default/core/color-field/demos/loading.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-field/demos/loading") + ), + }, + "color-field-prefix-and-suffix": { + name: "color-field-prefix-and-suffix", + files: [ + "registry/ui/default/core/color-field/demos/prefix-and-suffix.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/color-field/demos/prefix-and-suffix" + ) + ), + }, + "color-field-read-only": { + name: "color-field-read-only", + files: ["registry/ui/default/core/color-field/demos/read-only.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-field/demos/read-only") + ), + }, + "color-field-required": { + name: "color-field-required", + files: ["registry/ui/default/core/color-field/demos/required.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-field/demos/required") + ), + }, + "color-field-sizes": { + name: "color-field-sizes", + files: ["registry/ui/default/core/color-field/demos/sizes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-field/demos/sizes") + ), + }, + "color-field-uncontrolled": { + name: "color-field-uncontrolled", + files: ["registry/ui/default/core/color-field/demos/uncontrolled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/color-field/demos/uncontrolled") + ), + }, + "color-picker-composition": { + name: "color-picker-composition", + files: ["registry/ui/default/core/color-picker/demos/composition.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/color-picker/demos/composition") + ), + }, + "color-picker-controlled": { + name: "color-picker-controlled", + files: ["registry/ui/default/core/color-picker/demos/controlled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/color-picker/demos/controlled") + ), + }, + "color-picker-default": { + name: "color-picker-default", + files: ["registry/ui/default/core/color-picker/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-picker/demos/default") + ), + }, + "color-picker-options": { + name: "color-picker-options", + files: ["registry/ui/default/core/color-picker/demos/options.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-picker/demos/options") + ), + }, + "color-picker-uncontrolled": { + name: "color-picker-uncontrolled", + files: ["registry/ui/default/core/color-picker/demos/uncontrolled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/color-picker/demos/uncontrolled") + ), + }, + "color-slider-channel": { + name: "color-slider-channel", + files: ["registry/ui/default/core/color-slider/demos/channel.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-slider/demos/channel") + ), + }, + "color-slider-composition": { + name: "color-slider-composition", + files: ["registry/ui/default/core/color-slider/demos/composition.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/color-slider/demos/composition") + ), + }, + "color-slider-controlled": { + name: "color-slider-controlled", + files: ["registry/ui/default/core/color-slider/demos/controlled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/color-slider/demos/controlled") + ), + }, + "color-slider-default": { + name: "color-slider-default", + files: ["registry/ui/default/core/color-slider/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-slider/demos/default") + ), + }, + "color-slider-disabled": { + name: "color-slider-disabled", + files: ["registry/ui/default/core/color-slider/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-slider/demos/disabled") + ), + }, + "color-slider-label": { + name: "color-slider-label", + files: ["registry/ui/default/core/color-slider/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-slider/demos/label") + ), + }, + "color-slider-uncontrolled": { + name: "color-slider-uncontrolled", + files: ["registry/ui/default/core/color-slider/demos/uncontrolled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/color-slider/demos/uncontrolled") + ), + }, + "color-slider-vertical": { + name: "color-slider-vertical", + files: ["registry/ui/default/core/color-slider/demos/vertical.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-slider/demos/vertical") + ), + }, + "color-swatch-default": { + name: "color-swatch-default", + files: ["registry/ui/default/core/color-swatch/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/color-swatch/demos/default") + ), + }, + "combobox-async-loading": { + name: "combobox-async-loading", + files: ["registry/ui/default/core/combobox/demos/async-loading.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/combobox/demos/async-loading") + ), + }, + "combobox-basic": { + name: "combobox-basic", + files: ["registry/ui/default/core/combobox/demos/basic.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/combobox/demos/basic") + ), + }, + "combobox-composition": { + name: "combobox-composition", + files: ["registry/ui/default/core/combobox/demos/composition.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/combobox/demos/composition") + ), + }, + "combobox-contextual-help": { + name: "combobox-contextual-help", + files: ["registry/ui/default/core/combobox/demos/contextual-help.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/combobox/demos/contextual-help") + ), + }, + "combobox-controlled": { + name: "combobox-controlled", + files: ["registry/ui/default/core/combobox/demos/controlled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/combobox/demos/controlled") + ), + }, + "combobox-custom-value": { + name: "combobox-custom-value", + files: ["registry/ui/default/core/combobox/demos/custom-value.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/combobox/demos/custom-value") + ), + }, + "combobox-description": { + name: "combobox-description", + files: ["registry/ui/default/core/combobox/demos/description.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/combobox/demos/description") + ), + }, + "combobox-disabled": { + name: "combobox-disabled", + files: ["registry/ui/default/core/combobox/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/combobox/demos/disabled") + ), + }, + "combobox-label": { + name: "combobox-label", + files: ["registry/ui/default/core/combobox/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/combobox/demos/label") + ), + }, + "combobox-loading": { + name: "combobox-loading", + files: ["registry/ui/default/core/combobox/demos/loading.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/combobox/demos/loading") + ), + }, + "combobox-required": { + name: "combobox-required", + files: ["registry/ui/default/core/combobox/demos/required.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/combobox/demos/required") + ), + }, + "combobox-sections": { + name: "combobox-sections", + files: ["registry/ui/default/core/combobox/demos/sections.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/combobox/demos/sections") + ), + }, + "combobox-uncontrolled": { + name: "combobox-uncontrolled", + files: ["registry/ui/default/core/combobox/demos/uncontrolled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/combobox/demos/uncontrolled") + ), + }, + "combobox-validation": { + name: "combobox-validation", + files: ["registry/ui/default/core/combobox/demos/validation.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/combobox/demos/validation") + ), + }, + "date-field-composition": { + name: "date-field-composition", + files: ["registry/ui/default/core/date-field/demos/composition.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-field/demos/composition") + ), + }, + "date-field-contextual-help": { + name: "date-field-contextual-help", + files: [ + "registry/ui/default/core/date-field/demos/contextual-help.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-field/demos/contextual-help" + ) + ), + }, + "date-field-controlled": { + name: "date-field-controlled", + files: ["registry/ui/default/core/date-field/demos/controlled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-field/demos/controlled") + ), + }, + "date-field-default": { + name: "date-field-default", + files: ["registry/ui/default/core/date-field/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-field/demos/default") + ), + }, + "date-field-description": { + name: "date-field-description", + files: ["registry/ui/default/core/date-field/demos/description.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-field/demos/description") + ), + }, + "date-field-disabled": { + name: "date-field-disabled", + files: ["registry/ui/default/core/date-field/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-field/demos/disabled") + ), + }, + "date-field-error-message": { + name: "date-field-error-message", + files: ["registry/ui/default/core/date-field/demos/error-message.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-field/demos/error-message") + ), + }, + "date-field-granularity": { + name: "date-field-granularity", + files: ["registry/ui/default/core/date-field/demos/granularity.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-field/demos/granularity") + ), + }, + "date-field-hide-time-zone": { + name: "date-field-hide-time-zone", + files: ["registry/ui/default/core/date-field/demos/hide-time-zone.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-field/demos/hide-time-zone") + ), + }, + "date-field-hour-cycle": { + name: "date-field-hour-cycle", + files: ["registry/ui/default/core/date-field/demos/hour-cycle.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-field/demos/hour-cycle") + ), + }, + "date-field-label": { + name: "date-field-label", + files: ["registry/ui/default/core/date-field/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-field/demos/label") + ), + }, + "date-field-loading": { + name: "date-field-loading", + files: ["registry/ui/default/core/date-field/demos/loading.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-field/demos/loading") + ), + }, + "date-field-placeholder": { + name: "date-field-placeholder", + files: ["registry/ui/default/core/date-field/demos/placeholder.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-field/demos/placeholder") + ), + }, + "date-field-prefix-and-suffix": { + name: "date-field-prefix-and-suffix", + files: [ + "registry/ui/default/core/date-field/demos/prefix-and-suffix.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-field/demos/prefix-and-suffix" + ) + ), + }, + "date-field-read-only": { + name: "date-field-read-only", + files: ["registry/ui/default/core/date-field/demos/read-only.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-field/demos/read-only") + ), + }, + "date-field-required": { + name: "date-field-required", + files: ["registry/ui/default/core/date-field/demos/required.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-field/demos/required") + ), + }, + "date-field-sizes": { + name: "date-field-sizes", + files: ["registry/ui/default/core/date-field/demos/sizes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-field/demos/sizes") + ), + }, + "date-field-time-zones": { + name: "date-field-time-zones", + files: ["registry/ui/default/core/date-field/demos/time-zones.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-field/demos/time-zones") + ), + }, + "date-field-uncontrolled": { + name: "date-field-uncontrolled", + files: ["registry/ui/default/core/date-field/demos/uncontrolled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-field/demos/uncontrolled") + ), + }, + "date-picker-composition": { + name: "date-picker-composition", + files: ["registry/ui/default/core/date-picker/demos/composition.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-picker/demos/composition") + ), + }, + "date-picker-contextual-help": { + name: "date-picker-contextual-help", + files: [ + "registry/ui/default/core/date-picker/demos/contextual-help.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-picker/demos/contextual-help" + ) + ), + }, + "date-picker-controlled": { + name: "date-picker-controlled", + files: ["registry/ui/default/core/date-picker/demos/controlled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-picker/demos/controlled") + ), + }, + "date-picker-default": { + name: "date-picker-default", + files: ["registry/ui/default/core/date-picker/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-picker/demos/default") + ), + }, + "date-picker-description": { + name: "date-picker-description", + files: ["registry/ui/default/core/date-picker/demos/description.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-picker/demos/description") + ), + }, + "date-picker-disabled": { + name: "date-picker-disabled", + files: ["registry/ui/default/core/date-picker/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-picker/demos/disabled") + ), + }, + "date-picker-error-message": { + name: "date-picker-error-message", + files: ["registry/ui/default/core/date-picker/demos/error-message.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-picker/demos/error-message") + ), + }, + "date-picker-granularity": { + name: "date-picker-granularity", + files: ["registry/ui/default/core/date-picker/demos/granularity.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-picker/demos/granularity") + ), + }, + "date-picker-hide-time-zone": { + name: "date-picker-hide-time-zone", + files: [ + "registry/ui/default/core/date-picker/demos/hide-time-zone.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-picker/demos/hide-time-zone" + ) + ), + }, + "date-picker-hour-cycle": { + name: "date-picker-hour-cycle", + files: ["registry/ui/default/core/date-picker/demos/hour-cycle.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-picker/demos/hour-cycle") + ), + }, + "date-picker-label": { + name: "date-picker-label", + files: ["registry/ui/default/core/date-picker/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-picker/demos/label") + ), + }, + "date-picker-loading": { + name: "date-picker-loading", + files: ["registry/ui/default/core/date-picker/demos/loading.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-picker/demos/loading") + ), + }, + "date-picker-placeholder": { + name: "date-picker-placeholder", + files: ["registry/ui/default/core/date-picker/demos/placeholder.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-picker/demos/placeholder") + ), + }, + "date-picker-prefix": { + name: "date-picker-prefix", + files: ["registry/ui/default/core/date-picker/demos/prefix.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-picker/demos/prefix") + ), + }, + "date-picker-read-only": { + name: "date-picker-read-only", + files: ["registry/ui/default/core/date-picker/demos/read-only.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-picker/demos/read-only") + ), + }, + "date-picker-required": { + name: "date-picker-required", + files: ["registry/ui/default/core/date-picker/demos/required.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-picker/demos/required") + ), + }, + "date-picker-sizes": { + name: "date-picker-sizes", + files: ["registry/ui/default/core/date-picker/demos/sizes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/date-picker/demos/sizes") + ), + }, + "date-picker-time-zones": { + name: "date-picker-time-zones", + files: ["registry/ui/default/core/date-picker/demos/time-zones.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-picker/demos/time-zones") + ), + }, + "date-picker-uncontrolled": { + name: "date-picker-uncontrolled", + files: ["registry/ui/default/core/date-picker/demos/uncontrolled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-picker/demos/uncontrolled") + ), + }, + "date-range-picker-composition": { + name: "date-range-picker-composition", + files: [ + "registry/ui/default/core/date-range-picker/demos/composition.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-range-picker/demos/composition" + ) + ), + }, + "date-range-picker-contextual-help": { + name: "date-range-picker-contextual-help", + files: [ + "registry/ui/default/core/date-range-picker/demos/contextual-help.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-range-picker/demos/contextual-help" + ) + ), + }, + "date-range-picker-controlled": { + name: "date-range-picker-controlled", + files: [ + "registry/ui/default/core/date-range-picker/demos/controlled.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-range-picker/demos/controlled" + ) + ), + }, + "date-range-picker-default": { + name: "date-range-picker-default", + files: ["registry/ui/default/core/date-range-picker/demos/default.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-range-picker/demos/default") + ), + }, + "date-range-picker-description": { + name: "date-range-picker-description", + files: [ + "registry/ui/default/core/date-range-picker/demos/description.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-range-picker/demos/description" + ) + ), + }, + "date-range-picker-disabled": { + name: "date-range-picker-disabled", + files: [ + "registry/ui/default/core/date-range-picker/demos/disabled.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-range-picker/demos/disabled" + ) + ), + }, + "date-range-picker-error-message": { + name: "date-range-picker-error-message", + files: [ + "registry/ui/default/core/date-range-picker/demos/error-message.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-range-picker/demos/error-message" + ) + ), + }, + "date-range-picker-granularity": { + name: "date-range-picker-granularity", + files: [ + "registry/ui/default/core/date-range-picker/demos/granularity.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-range-picker/demos/granularity" + ) + ), + }, + "date-range-picker-hide-time-zone": { + name: "date-range-picker-hide-time-zone", + files: [ + "registry/ui/default/core/date-range-picker/demos/hide-time-zone.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-range-picker/demos/hide-time-zone" + ) + ), + }, + "date-range-picker-hour-cycle": { + name: "date-range-picker-hour-cycle", + files: [ + "registry/ui/default/core/date-range-picker/demos/hour-cycle.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-range-picker/demos/hour-cycle" + ) + ), + }, + "date-range-picker-label": { + name: "date-range-picker-label", + files: ["registry/ui/default/core/date-range-picker/demos/label.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-range-picker/demos/label") + ), + }, + "date-range-picker-loading": { + name: "date-range-picker-loading", + files: ["registry/ui/default/core/date-range-picker/demos/loading.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-range-picker/demos/loading") + ), + }, + "date-range-picker-placeholder": { + name: "date-range-picker-placeholder", + files: [ + "registry/ui/default/core/date-range-picker/demos/placeholder.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-range-picker/demos/placeholder" + ) + ), + }, + "date-range-picker-prefix": { + name: "date-range-picker-prefix", + files: ["registry/ui/default/core/date-range-picker/demos/prefix.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-range-picker/demos/prefix") + ), + }, + "date-range-picker-read-only": { + name: "date-range-picker-read-only", + files: [ + "registry/ui/default/core/date-range-picker/demos/read-only.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-range-picker/demos/read-only" + ) + ), + }, + "date-range-picker-required": { + name: "date-range-picker-required", + files: [ + "registry/ui/default/core/date-range-picker/demos/required.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-range-picker/demos/required" + ) + ), + }, + "date-range-picker-sizes": { + name: "date-range-picker-sizes", + files: ["registry/ui/default/core/date-range-picker/demos/sizes.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/date-range-picker/demos/sizes") + ), + }, + "date-range-picker-time-zones": { + name: "date-range-picker-time-zones", + files: [ + "registry/ui/default/core/date-range-picker/demos/time-zones.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-range-picker/demos/time-zones" + ) + ), + }, + "date-range-picker-uncontrolled": { + name: "date-range-picker-uncontrolled", + files: [ + "registry/ui/default/core/date-range-picker/demos/uncontrolled.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/date-range-picker/demos/uncontrolled" + ) + ), + }, + "dialog-alert-dialog": { + name: "dialog-alert-dialog", + files: ["registry/ui/default/core/dialog/demos/alert-dialog.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/dialog/demos/alert-dialog") + ), + }, + "dialog-async-form-submission": { + name: "dialog-async-form-submission", + files: [ + "registry/ui/default/core/dialog/demos/async-form-submission.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/dialog/demos/async-form-submission" + ) + ), + }, + "dialog-basic": { + name: "dialog-basic", + files: ["registry/ui/default/core/dialog/demos/basic.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/dialog/demos/basic") + ), + }, + "dialog-composition": { + name: "dialog-composition", + files: ["registry/ui/default/core/dialog/demos/composition.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/dialog/demos/composition") + ), + }, + "dialog-controlled": { + name: "dialog-controlled", + files: ["registry/ui/default/core/dialog/demos/controlled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/dialog/demos/controlled") + ), + }, + "dialog-description": { + name: "dialog-description", + files: ["registry/ui/default/core/dialog/demos/description.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/dialog/demos/description") + ), + }, + "dialog-dismiss-button": { + name: "dialog-dismiss-button", + files: ["registry/ui/default/core/dialog/demos/dismiss-button.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/dialog/demos/dismiss-button") + ), + }, + "dialog-dismissable": { + name: "dialog-dismissable", + files: ["registry/ui/default/core/dialog/demos/dismissable.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/dialog/demos/dismissable") + ), + }, + "dialog-drawer": { + name: "dialog-drawer", + files: ["registry/ui/default/core/dialog/demos/drawer.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/dialog/demos/drawer") + ), + }, + "dialog-inset-content": { + name: "dialog-inset-content", + files: ["registry/ui/default/core/dialog/demos/inset-content.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/dialog/demos/inset-content") + ), + }, + "dialog-nested": { + name: "dialog-nested", + files: ["registry/ui/default/core/dialog/demos/nested.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/dialog/demos/nested") + ), + }, + "dialog-popover": { + name: "dialog-popover", + files: ["registry/ui/default/core/dialog/demos/popover.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/dialog/demos/popover") + ), + }, + "dialog-title": { + name: "dialog-title", + files: ["registry/ui/default/core/dialog/demos/title.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/dialog/demos/title") + ), + }, + "dialog-types": { + name: "dialog-types", + files: ["registry/ui/default/core/dialog/demos/types.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/dialog/demos/types") + ), + }, + "drop-zone-default": { + name: "drop-zone-default", + files: ["registry/ui/default/core/drop-zone/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/drop-zone/demos/default") + ), + }, + "drop-zone-disabled": { + name: "drop-zone-disabled", + files: ["registry/ui/default/core/drop-zone/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/drop-zone/demos/disabled") + ), + }, + "drop-zone-file-trigger": { + name: "drop-zone-file-trigger", + files: ["registry/ui/default/core/drop-zone/demos/file-trigger.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/drop-zone/demos/file-trigger") + ), + }, + "drop-zone-label": { + name: "drop-zone-label", + files: ["registry/ui/default/core/drop-zone/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/drop-zone/demos/label") + ), + }, + "file-trigger-default": { + name: "file-trigger-default", + files: ["registry/ui/default/core/file-trigger/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/file-trigger/demos/default") + ), + }, + "file-trigger-directory-selection": { + name: "file-trigger-directory-selection", + files: [ + "registry/ui/default/core/file-trigger/demos/directory-selection.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/file-trigger/demos/directory-selection" + ) + ), + }, + "file-trigger-file-types": { + name: "file-trigger-file-types", + files: ["registry/ui/default/core/file-trigger/demos/file-types.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/file-trigger/demos/file-types") + ), + }, + "file-trigger-media-capture": { + name: "file-trigger-media-capture", + files: [ + "registry/ui/default/core/file-trigger/demos/media-capture.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/file-trigger/demos/media-capture" + ) + ), + }, + "file-trigger-multiple-files": { + name: "file-trigger-multiple-files", + files: [ + "registry/ui/default/core/file-trigger/demos/multiple-files.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/file-trigger/demos/multiple-files" + ) + ), + }, + "link-default": { + name: "link-default", + files: ["registry/ui/default/core/link/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/link/demos/default") + ), + }, + "link-disabled": { + name: "link-disabled", + files: ["registry/ui/default/core/link/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/link/demos/disabled") + ), + }, + "link-icon": { + name: "link-icon", + files: ["registry/ui/default/core/link/demos/icon.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/link/demos/icon") + ), + }, + "link-variants": { + name: "link-variants", + files: ["registry/ui/default/core/link/demos/variants.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/link/demos/variants") + ), + }, + "list-box-async-loading": { + name: "list-box-async-loading", + files: ["registry/ui/default/core/list-box/demos/async-loading.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/list-box/demos/async-loading") + ), + }, + "list-box-basic": { + name: "list-box-basic", + files: ["registry/ui/default/core/list-box/demos/basic.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/list-box/demos/basic") + ), + }, + "list-box-composition": { + name: "list-box-composition", + files: ["registry/ui/default/core/list-box/demos/composition.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/list-box/demos/composition") + ), + }, + "list-box-contact-list": { + name: "list-box-contact-list", + files: ["registry/ui/default/core/list-box/demos/contact-list.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/list-box/demos/contact-list") + ), + }, + "list-box-controlled": { + name: "list-box-controlled", + files: ["registry/ui/default/core/list-box/demos/controlled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/list-box/demos/controlled") + ), + }, + "list-box-disabled-items": { + name: "list-box-disabled-items", + files: ["registry/ui/default/core/list-box/demos/disabled-items.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/list-box/demos/disabled-items") + ), + }, + "list-box-empty-state": { + name: "list-box-empty-state", + files: ["registry/ui/default/core/list-box/demos/empty-state.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/list-box/demos/empty-state") + ), + }, + "list-box-grid": { + name: "list-box-grid", + files: ["registry/ui/default/core/list-box/demos/grid.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/list-box/demos/grid") + ), + }, + "list-box-horizontal": { + name: "list-box-horizontal", + files: ["registry/ui/default/core/list-box/demos/horizontal.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/list-box/demos/horizontal") + ), + }, + "list-box-image-grid": { + name: "list-box-image-grid", + files: ["registry/ui/default/core/list-box/demos/image-grid.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/list-box/demos/image-grid") + ), + }, + "list-box-item-variant": { + name: "list-box-item-variant", + files: ["registry/ui/default/core/list-box/demos/item-variant.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/list-box/demos/item-variant") + ), + }, + "list-box-label-and-description": { + name: "list-box-label-and-description", + files: [ + "registry/ui/default/core/list-box/demos/label-and-description.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/list-box/demos/label-and-description" + ) + ), + }, + "list-box-links": { + name: "list-box-links", + files: ["registry/ui/default/core/list-box/demos/links.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/list-box/demos/links") + ), + }, + "list-box-loading": { + name: "list-box-loading", + files: ["registry/ui/default/core/list-box/demos/loading.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/list-box/demos/loading") + ), + }, + "list-box-prefix-and-suffix": { + name: "list-box-prefix-and-suffix", + files: [ + "registry/ui/default/core/list-box/demos/prefix-and-suffix.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/list-box/demos/prefix-and-suffix" + ) + ), + }, + "list-box-sections": { + name: "list-box-sections", + files: ["registry/ui/default/core/list-box/demos/sections.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/list-box/demos/sections") + ), + }, + "list-box-selection-behavior": { + name: "list-box-selection-behavior", + files: [ + "registry/ui/default/core/list-box/demos/selection-behavior.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/list-box/demos/selection-behavior" + ) + ), + }, + "list-box-selection-mode": { + name: "list-box-selection-mode", + files: ["registry/ui/default/core/list-box/demos/selection-mode.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/list-box/demos/selection-mode") + ), + }, + "list-box-separator": { + name: "list-box-separator", + files: ["registry/ui/default/core/list-box/demos/separator.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/list-box/demos/separator") + ), + }, + "list-box-uncontrolled": { + name: "list-box-uncontrolled", + files: ["registry/ui/default/core/list-box/demos/uncontrolled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/list-box/demos/uncontrolled") + ), + }, + "menu-basic": { + name: "menu-basic", + files: ["registry/ui/default/core/menu/demos/basic.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/menu/demos/basic") + ), + }, + "menu-composition": { + name: "menu-composition", + files: ["registry/ui/default/core/menu/demos/composition.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/menu/demos/composition") + ), + }, + "menu-controlled": { + name: "menu-controlled", + files: ["registry/ui/default/core/menu/demos/controlled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/menu/demos/controlled") + ), + }, + "menu-disabled-items": { + name: "menu-disabled-items", + files: ["registry/ui/default/core/menu/demos/disabled-items.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/menu/demos/disabled-items") + ), + }, + "menu-item-variant": { + name: "menu-item-variant", + files: ["registry/ui/default/core/menu/demos/item-variant.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/menu/demos/item-variant") + ), + }, + "menu-label-and-description": { + name: "menu-label-and-description", + files: [ + "registry/ui/default/core/menu/demos/label-and-description.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/menu/demos/label-and-description" + ) + ), + }, + "menu-link-items": { + name: "menu-link-items", + files: ["registry/ui/default/core/menu/demos/link-items.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/menu/demos/link-items") + ), + }, + "menu-long-press": { + name: "menu-long-press", + files: ["registry/ui/default/core/menu/demos/long-press.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/menu/demos/long-press") + ), + }, + "menu-multiple-selection": { + name: "menu-multiple-selection", + files: ["registry/ui/default/core/menu/demos/multiple-selection.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/menu/demos/multiple-selection") + ), + }, + "menu-overlay-type": { + name: "menu-overlay-type", + files: ["registry/ui/default/core/menu/demos/overlay-type.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/menu/demos/overlay-type") + ), + }, + "menu-placement": { + name: "menu-placement", + files: ["registry/ui/default/core/menu/demos/placement.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/menu/demos/placement") + ), + }, + "menu-prefix-and-suffix": { + name: "menu-prefix-and-suffix", + files: ["registry/ui/default/core/menu/demos/prefix-and-suffix.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/menu/demos/prefix-and-suffix") + ), + }, + "menu-section": { + name: "menu-section", + files: ["registry/ui/default/core/menu/demos/section.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/menu/demos/section") + ), + }, + "menu-separator": { + name: "menu-separator", + files: ["registry/ui/default/core/menu/demos/separator.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/menu/demos/separator") + ), + }, + "menu-shortcut": { + name: "menu-shortcut", + files: ["registry/ui/default/core/menu/demos/shortcut.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/menu/demos/shortcut") + ), + }, + "menu-single-selection": { + name: "menu-single-selection", + files: ["registry/ui/default/core/menu/demos/single-selection.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/menu/demos/single-selection") + ), + }, + "menu-submenus": { + name: "menu-submenus", + files: ["registry/ui/default/core/menu/demos/submenus.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/menu/demos/submenus") + ), + }, + "number-field-composition": { + name: "number-field-composition", + files: ["registry/ui/default/core/number-field/demos/composition.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/number-field/demos/composition") + ), + }, + "number-field-contextual-help": { + name: "number-field-contextual-help", + files: [ + "registry/ui/default/core/number-field/demos/contextual-help.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/number-field/demos/contextual-help" + ) + ), + }, + "number-field-controlled": { + name: "number-field-controlled", + files: ["registry/ui/default/core/number-field/demos/controlled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/number-field/demos/controlled") + ), + }, + "number-field-default": { + name: "number-field-default", + files: ["registry/ui/default/core/number-field/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/number-field/demos/default") + ), + }, + "number-field-description": { + name: "number-field-description", + files: ["registry/ui/default/core/number-field/demos/description.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/number-field/demos/description") + ), + }, + "number-field-disabled": { + name: "number-field-disabled", + files: ["registry/ui/default/core/number-field/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/number-field/demos/disabled") + ), + }, + "number-field-error-message": { + name: "number-field-error-message", + files: [ + "registry/ui/default/core/number-field/demos/error-message.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/number-field/demos/error-message" + ) + ), + }, + "number-field-format-options": { + name: "number-field-format-options", + files: [ + "registry/ui/default/core/number-field/demos/format-options.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/number-field/demos/format-options" + ) + ), + }, + "number-field-label": { + name: "number-field-label", + files: ["registry/ui/default/core/number-field/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/number-field/demos/label") + ), + }, + "number-field-read-only": { + name: "number-field-read-only", + files: ["registry/ui/default/core/number-field/demos/read-only.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/number-field/demos/read-only") + ), + }, + "number-field-required": { + name: "number-field-required", + files: ["registry/ui/default/core/number-field/demos/required.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/number-field/demos/required") + ), + }, + "number-field-sizes": { + name: "number-field-sizes", + files: ["registry/ui/default/core/number-field/demos/sizes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/number-field/demos/sizes") + ), + }, + "number-field-uncontrolled": { + name: "number-field-uncontrolled", + files: ["registry/ui/default/core/number-field/demos/uncontrolled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/number-field/demos/uncontrolled") + ), + }, + "progress-composition": { + name: "progress-composition", + files: ["registry/ui/default/core/progress/demos/composition.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/progress/demos/composition") + ), + }, + "progress-custom-color": { + name: "progress-custom-color", + files: ["registry/ui/default/core/progress/demos/custom-color.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/progress/demos/custom-color") + ), + }, + "progress-custom-value-label": { + name: "progress-custom-value-label", + files: [ + "registry/ui/default/core/progress/demos/custom-value-label.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/progress/demos/custom-value-label" + ) + ), + }, + "progress-default": { + name: "progress-default", + files: ["registry/ui/default/core/progress/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/progress/demos/default") + ), + }, + "progress-duration": { + name: "progress-duration", + files: ["registry/ui/default/core/progress/demos/duration.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/progress/demos/duration") + ), + }, + "progress-format-options": { + name: "progress-format-options", + files: ["registry/ui/default/core/progress/demos/format-options.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/progress/demos/format-options") + ), + }, + "progress-indeterminate": { + name: "progress-indeterminate", + files: ["registry/ui/default/core/progress/demos/indeterminate.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/progress/demos/indeterminate") + ), + }, + "progress-label": { + name: "progress-label", + files: ["registry/ui/default/core/progress/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/progress/demos/label") + ), + }, + "progress-min-max-values": { + name: "progress-min-max-values", + files: ["registry/ui/default/core/progress/demos/min-max-values.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/progress/demos/min-max-values") + ), + }, + "progress-shape": { + name: "progress-shape", + files: ["registry/ui/default/core/progress/demos/shape.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/progress/demos/shape") + ), + }, + "progress-sizes": { + name: "progress-sizes", + files: ["registry/ui/default/core/progress/demos/sizes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/progress/demos/sizes") + ), + }, + "progress-toolbar": { + name: "progress-toolbar", + files: ["registry/ui/default/core/progress/demos/toolbar.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/progress/demos/toolbar") + ), + }, + "progress-value-label": { + name: "progress-value-label", + files: ["registry/ui/default/core/progress/demos/value-label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/progress/demos/value-label") + ), + }, + "progress-variants": { + name: "progress-variants", + files: ["registry/ui/default/core/progress/demos/variants.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/progress/demos/variants") + ), + }, + "radio-group-cards": { + name: "radio-group-cards", + files: ["registry/ui/default/core/radio-group/demos/cards.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/radio-group/demos/cards") + ), + }, + "radio-group-composition": { + name: "radio-group-composition", + files: ["registry/ui/default/core/radio-group/demos/composition.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/radio-group/demos/composition") + ), + }, + "radio-group-contextual-help": { + name: "radio-group-contextual-help", + files: [ + "registry/ui/default/core/radio-group/demos/contextual-help.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/radio-group/demos/contextual-help" + ) + ), + }, + "radio-group-controlled": { + name: "radio-group-controlled", + files: ["registry/ui/default/core/radio-group/demos/controlled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/radio-group/demos/controlled") + ), + }, + "radio-group-default": { + name: "radio-group-default", + files: ["registry/ui/default/core/radio-group/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/radio-group/demos/default") + ), + }, + "radio-group-description": { + name: "radio-group-description", + files: ["registry/ui/default/core/radio-group/demos/description.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/radio-group/demos/description") + ), + }, + "radio-group-disabled": { + name: "radio-group-disabled", + files: ["registry/ui/default/core/radio-group/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/radio-group/demos/disabled") + ), + }, + "radio-group-error-message": { + name: "radio-group-error-message", + files: ["registry/ui/default/core/radio-group/demos/error-message.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/radio-group/demos/error-message") + ), + }, + "radio-group-label": { + name: "radio-group-label", + files: ["registry/ui/default/core/radio-group/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/radio-group/demos/label") + ), + }, + "radio-group-orientation": { + name: "radio-group-orientation", + files: ["registry/ui/default/core/radio-group/demos/orientation.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/radio-group/demos/orientation") + ), + }, + "radio-group-read-only": { + name: "radio-group-read-only", + files: ["registry/ui/default/core/radio-group/demos/read-only.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/radio-group/demos/read-only") + ), + }, + "radio-group-required": { + name: "radio-group-required", + files: ["registry/ui/default/core/radio-group/demos/required.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/radio-group/demos/required") + ), + }, + "radio-group-uncontrolled": { + name: "radio-group-uncontrolled", + files: ["registry/ui/default/core/radio-group/demos/uncontrolled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/radio-group/demos/uncontrolled") + ), + }, + "range-calendar-composition": { + name: "range-calendar-composition", + files: [ + "registry/ui/default/core/range-calendar/demos/composition.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/range-calendar/demos/composition" + ) + ), + }, + "range-calendar-controlled": { + name: "range-calendar-controlled", + files: ["registry/ui/default/core/range-calendar/demos/controlled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/range-calendar/demos/controlled") + ), + }, + "range-calendar-default": { + name: "range-calendar-default", + files: ["registry/ui/default/core/range-calendar/demos/default.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/range-calendar/demos/default") + ), + }, + "range-calendar-disabled": { + name: "range-calendar-disabled", + files: ["registry/ui/default/core/range-calendar/demos/disabled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/range-calendar/demos/disabled") + ), + }, + "range-calendar-error-message": { + name: "range-calendar-error-message", + files: [ + "registry/ui/default/core/range-calendar/demos/error-message.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/range-calendar/demos/error-message" + ) + ), + }, + "range-calendar-label": { + name: "range-calendar-label", + files: ["registry/ui/default/core/range-calendar/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/range-calendar/demos/label") + ), + }, + "range-calendar-non-contiguous-ranges": { + name: "range-calendar-non-contiguous-ranges", + files: [ + "registry/ui/default/core/range-calendar/demos/non-contiguous-ranges.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/range-calendar/demos/non-contiguous-ranges" + ) + ), + }, + "range-calendar-page-behaviour": { + name: "range-calendar-page-behaviour", + files: [ + "registry/ui/default/core/range-calendar/demos/page-behaviour.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/range-calendar/demos/page-behaviour" + ) + ), + }, + "range-calendar-read-only": { + name: "range-calendar-read-only", + files: ["registry/ui/default/core/range-calendar/demos/read-only.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/range-calendar/demos/read-only") + ), + }, + "range-calendar-uncontrolled": { + name: "range-calendar-uncontrolled", + files: [ + "registry/ui/default/core/range-calendar/demos/uncontrolled.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/range-calendar/demos/uncontrolled" + ) + ), + }, + "range-calendar-unvailable-dates": { + name: "range-calendar-unvailable-dates", + files: [ + "registry/ui/default/core/range-calendar/demos/unvailable-dates.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/range-calendar/demos/unvailable-dates" + ) + ), + }, + "range-calendar-validation": { + name: "range-calendar-validation", + files: ["registry/ui/default/core/range-calendar/demos/validation.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/range-calendar/demos/validation") + ), + }, + "range-calendar-visible-months": { + name: "range-calendar-visible-months", + files: [ + "registry/ui/default/core/range-calendar/demos/visible-months.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/range-calendar/demos/visible-months" + ) + ), + }, + "scroll-area-default": { + name: "scroll-area-default", + files: ["registry/ui/default/core/scroll-area/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/scroll-area/demos/default") + ), + }, + "scroll-area-scrollbars": { + name: "scroll-area-scrollbars", + files: ["registry/ui/default/core/scroll-area/demos/scrollbars.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/scroll-area/demos/scrollbars") + ), + }, + "scroll-area-sizes": { + name: "scroll-area-sizes", + files: ["registry/ui/default/core/scroll-area/demos/sizes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/scroll-area/demos/sizes") + ), + }, + "search-field-composition": { + name: "search-field-composition", + files: ["registry/ui/default/core/search-field/demos/composition.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/search-field/demos/composition") + ), + }, + "search-field-contextual-help": { + name: "search-field-contextual-help", + files: [ + "registry/ui/default/core/search-field/demos/contextual-help.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/search-field/demos/contextual-help" + ) + ), + }, + "search-field-controlled": { + name: "search-field-controlled", + files: ["registry/ui/default/core/search-field/demos/controlled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/search-field/demos/controlled") + ), + }, + "search-field-default": { + name: "search-field-default", + files: ["registry/ui/default/core/search-field/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/search-field/demos/default") + ), + }, + "search-field-description": { + name: "search-field-description", + files: ["registry/ui/default/core/search-field/demos/description.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/search-field/demos/description") + ), + }, + "search-field-disabled": { + name: "search-field-disabled", + files: ["registry/ui/default/core/search-field/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/search-field/demos/disabled") + ), + }, + "search-field-error-message": { + name: "search-field-error-message", + files: [ + "registry/ui/default/core/search-field/demos/error-message.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/search-field/demos/error-message" + ) + ), + }, + "search-field-form": { + name: "search-field-form", + files: ["registry/ui/default/core/search-field/demos/form.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/search-field/demos/form") + ), + }, + "search-field-label": { + name: "search-field-label", + files: ["registry/ui/default/core/search-field/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/search-field/demos/label") + ), + }, + "search-field-loading": { + name: "search-field-loading", + files: ["registry/ui/default/core/search-field/demos/loading.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/search-field/demos/loading") + ), + }, + "search-field-prefix-and-suffix": { + name: "search-field-prefix-and-suffix", + files: [ + "registry/ui/default/core/search-field/demos/prefix-and-suffix.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/search-field/demos/prefix-and-suffix" + ) + ), + }, + "search-field-read-only": { + name: "search-field-read-only", + files: ["registry/ui/default/core/search-field/demos/read-only.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/search-field/demos/read-only") + ), + }, + "search-field-required": { + name: "search-field-required", + files: ["registry/ui/default/core/search-field/demos/required.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/search-field/demos/required") + ), + }, + "search-field-sizes": { + name: "search-field-sizes", + files: ["registry/ui/default/core/search-field/demos/sizes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/search-field/demos/sizes") + ), + }, + "search-field-uncontrolled": { + name: "search-field-uncontrolled", + files: ["registry/ui/default/core/search-field/demos/uncontrolled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/search-field/demos/uncontrolled") + ), + }, + "select-async-loading": { + name: "select-async-loading", + files: ["registry/ui/default/core/select/demos/async-loading.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/select/demos/async-loading") + ), + }, + "select-basic": { + name: "select-basic", + files: ["registry/ui/default/core/select/demos/basic.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/select/demos/basic") + ), + }, + "select-composition": { + name: "select-composition", + files: ["registry/ui/default/core/select/demos/composition.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/select/demos/composition") + ), + }, + "select-contextual-help": { + name: "select-contextual-help", + files: ["registry/ui/default/core/select/demos/contextual-help.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/select/demos/contextual-help") + ), + }, + "select-controlled": { + name: "select-controlled", + files: ["registry/ui/default/core/select/demos/controlled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/select/demos/controlled") + ), + }, + "select-description": { + name: "select-description", + files: ["registry/ui/default/core/select/demos/description.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/select/demos/description") + ), + }, + "select-disabled": { + name: "select-disabled", + files: ["registry/ui/default/core/select/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/select/demos/disabled") + ), + }, + "select-label": { + name: "select-label", + files: ["registry/ui/default/core/select/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/select/demos/label") + ), + }, + "select-links": { + name: "select-links", + files: ["registry/ui/default/core/select/demos/links.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/select/demos/links") + ), + }, + "select-loading": { + name: "select-loading", + files: ["registry/ui/default/core/select/demos/loading.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/select/demos/loading") + ), + }, + "select-placeholder": { + name: "select-placeholder", + files: ["registry/ui/default/core/select/demos/placeholder.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/select/demos/placeholder") + ), + }, + "select-required": { + name: "select-required", + files: ["registry/ui/default/core/select/demos/required.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/select/demos/required") + ), + }, + "select-sections": { + name: "select-sections", + files: ["registry/ui/default/core/select/demos/sections.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/select/demos/sections") + ), + }, + "select-uncontrolled": { + name: "select-uncontrolled", + files: ["registry/ui/default/core/select/demos/uncontrolled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/select/demos/uncontrolled") + ), + }, + "select-validation": { + name: "select-validation", + files: ["registry/ui/default/core/select/demos/validation.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/select/demos/validation") + ), + }, + "separator-card": { + name: "separator-card", + files: ["registry/ui/default/core/separator/demos/card.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/separator/demos/card") + ), + }, + "separator-orientation": { + name: "separator-orientation", + files: ["registry/ui/default/core/separator/demos/orientation.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/separator/demos/orientation") + ), + }, + "skeleton-api-simulation": { + name: "skeleton-api-simulation", + files: ["registry/ui/default/core/skeleton/demos/api-simulation.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/skeleton/demos/api-simulation") + ), + }, + "skeleton-card": { + name: "skeleton-card", + files: ["registry/ui/default/core/skeleton/demos/card.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/skeleton/demos/card") + ), + }, + "skeleton-children": { + name: "skeleton-children", + files: ["registry/ui/default/core/skeleton/demos/children.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/skeleton/demos/children") + ), + }, + "skeleton-fixed-size-children": { + name: "skeleton-fixed-size-children", + files: [ + "registry/ui/default/core/skeleton/demos/fixed-size-children.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/skeleton/demos/fixed-size-children" + ) + ), + }, + "skeleton-show": { + name: "skeleton-show", + files: ["registry/ui/default/core/skeleton/demos/show.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/skeleton/demos/show") + ), + }, + "slider-advanced-composition": { + name: "slider-advanced-composition", + files: [ + "registry/ui/default/core/slider/demos/advanced-composition.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/slider/demos/advanced-composition" + ) + ), + }, + "slider-composition": { + name: "slider-composition", + files: ["registry/ui/default/core/slider/demos/composition.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/slider/demos/composition") + ), + }, + "slider-controlled": { + name: "slider-controlled", + files: ["registry/ui/default/core/slider/demos/controlled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/slider/demos/controlled") + ), + }, + "slider-default": { + name: "slider-default", + files: ["registry/ui/default/core/slider/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/slider/demos/default") + ), + }, + "slider-description": { + name: "slider-description", + files: ["registry/ui/default/core/slider/demos/description.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/slider/demos/description") + ), + }, + "slider-disabled": { + name: "slider-disabled", + files: ["registry/ui/default/core/slider/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/slider/demos/disabled") + ), + }, + "slider-format-options": { + name: "slider-format-options", + files: ["registry/ui/default/core/slider/demos/format-options.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/slider/demos/format-options") + ), + }, + "slider-label": { + name: "slider-label", + files: ["registry/ui/default/core/slider/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/slider/demos/label") + ), + }, + "slider-range": { + name: "slider-range", + files: ["registry/ui/default/core/slider/demos/range.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/slider/demos/range") + ), + }, + "slider-sizes": { + name: "slider-sizes", + files: ["registry/ui/default/core/slider/demos/sizes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/slider/demos/sizes") + ), + }, + "slider-step": { + name: "slider-step", + files: ["registry/ui/default/core/slider/demos/step.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/slider/demos/step") + ), + }, + "slider-uncontrolled": { + name: "slider-uncontrolled", + files: ["registry/ui/default/core/slider/demos/uncontrolled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/slider/demos/uncontrolled") + ), + }, + "slider-value-label": { + name: "slider-value-label", + files: ["registry/ui/default/core/slider/demos/value-label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/slider/demos/value-label") + ), + }, + "slider-value-scale": { + name: "slider-value-scale", + files: ["registry/ui/default/core/slider/demos/value-scale.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/slider/demos/value-scale") + ), + }, + "slider-vertical": { + name: "slider-vertical", + files: ["registry/ui/default/core/slider/demos/vertical.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/slider/demos/vertical") + ), + }, + "switch-controlled": { + name: "switch-controlled", + files: ["registry/ui/default/core/switch/demos/controlled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/switch/demos/controlled") + ), + }, + "switch-default": { + name: "switch-default", + files: ["registry/ui/default/core/switch/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/switch/demos/default") + ), + }, + "switch-disabled": { + name: "switch-disabled", + files: ["registry/ui/default/core/switch/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/switch/demos/disabled") + ), + }, + "switch-label": { + name: "switch-label", + files: ["registry/ui/default/core/switch/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/switch/demos/label") + ), + }, + "switch-sizes": { + name: "switch-sizes", + files: ["registry/ui/default/core/switch/demos/sizes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/switch/demos/sizes") + ), + }, + "switch-uncontrolled": { + name: "switch-uncontrolled", + files: ["registry/ui/default/core/switch/demos/uncontrolled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/switch/demos/uncontrolled") + ), + }, + "tabs-basic": { + name: "tabs-basic", + files: ["registry/ui/default/core/tabs/demos/basic.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/tabs/demos/basic") + ), + }, + "tabs-controlled": { + name: "tabs-controlled", + files: ["registry/ui/default/core/tabs/demos/controlled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/tabs/demos/controlled") + ), + }, + "tabs-disabled-item": { + name: "tabs-disabled-item", + files: ["registry/ui/default/core/tabs/demos/disabled-item.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/tabs/demos/disabled-item") + ), + }, + "tabs-disabled": { + name: "tabs-disabled", + files: ["registry/ui/default/core/tabs/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/tabs/demos/disabled") + ), + }, + "tabs-keyboard-activation": { + name: "tabs-keyboard-activation", + files: ["registry/ui/default/core/tabs/demos/keyboard-activation.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/tabs/demos/keyboard-activation") + ), + }, + "tabs-vertical": { + name: "tabs-vertical", + files: ["registry/ui/default/core/tabs/demos/vertical.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/tabs/demos/vertical") + ), + }, + "text-area-composition": { + name: "text-area-composition", + files: ["registry/ui/default/core/text-area/demos/composition.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-area/demos/composition") + ), + }, + "text-area-contextual-help": { + name: "text-area-contextual-help", + files: ["registry/ui/default/core/text-area/demos/contextual-help.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/text-area/demos/contextual-help") + ), + }, + "text-area-controlled": { + name: "text-area-controlled", + files: ["registry/ui/default/core/text-area/demos/controlled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-area/demos/controlled") + ), + }, + "text-area-default": { + name: "text-area-default", + files: ["registry/ui/default/core/text-area/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-area/demos/default") + ), + }, + "text-area-description": { + name: "text-area-description", + files: ["registry/ui/default/core/text-area/demos/description.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-area/demos/description") + ), + }, + "text-area-disabled": { + name: "text-area-disabled", + files: ["registry/ui/default/core/text-area/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-area/demos/disabled") + ), + }, + "text-area-error-message": { + name: "text-area-error-message", + files: ["registry/ui/default/core/text-area/demos/error-message.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/text-area/demos/error-message") + ), + }, + "text-area-form": { + name: "text-area-form", + files: ["registry/ui/default/core/text-area/demos/form.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-area/demos/form") + ), + }, + "text-area-label": { + name: "text-area-label", + files: ["registry/ui/default/core/text-area/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-area/demos/label") + ), + }, + "text-area-loading": { + name: "text-area-loading", + files: ["registry/ui/default/core/text-area/demos/loading.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-area/demos/loading") + ), + }, + "text-area-prefix-and-suffix": { + name: "text-area-prefix-and-suffix", + files: [ + "registry/ui/default/core/text-area/demos/prefix-and-suffix.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/text-area/demos/prefix-and-suffix" + ) + ), + }, + "text-area-read-only": { + name: "text-area-read-only", + files: ["registry/ui/default/core/text-area/demos/read-only.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-area/demos/read-only") + ), + }, + "text-area-required": { + name: "text-area-required", + files: ["registry/ui/default/core/text-area/demos/required.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-area/demos/required") + ), + }, + "text-area-uncontrolled": { + name: "text-area-uncontrolled", + files: ["registry/ui/default/core/text-area/demos/uncontrolled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/text-area/demos/uncontrolled") + ), + }, + "text-field-composition": { + name: "text-field-composition", + files: ["registry/ui/default/core/text-field/demos/composition.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/text-field/demos/composition") + ), + }, + "text-field-contextual-help": { + name: "text-field-contextual-help", + files: [ + "registry/ui/default/core/text-field/demos/contextual-help.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/text-field/demos/contextual-help" + ) + ), + }, + "text-field-controlled": { + name: "text-field-controlled", + files: ["registry/ui/default/core/text-field/demos/controlled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-field/demos/controlled") + ), + }, + "text-field-default": { + name: "text-field-default", + files: ["registry/ui/default/core/text-field/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-field/demos/default") + ), + }, + "text-field-description": { + name: "text-field-description", + files: ["registry/ui/default/core/text-field/demos/description.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/text-field/demos/description") + ), + }, + "text-field-disabled": { + name: "text-field-disabled", + files: ["registry/ui/default/core/text-field/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-field/demos/disabled") + ), + }, + "text-field-error-message": { + name: "text-field-error-message", + files: ["registry/ui/default/core/text-field/demos/error-message.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/text-field/demos/error-message") + ), + }, + "text-field-label": { + name: "text-field-label", + files: ["registry/ui/default/core/text-field/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-field/demos/label") + ), + }, + "text-field-loading": { + name: "text-field-loading", + files: ["registry/ui/default/core/text-field/demos/loading.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-field/demos/loading") + ), + }, + "text-field-prefix-and-suffix": { + name: "text-field-prefix-and-suffix", + files: [ + "registry/ui/default/core/text-field/demos/prefix-and-suffix.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/text-field/demos/prefix-and-suffix" + ) + ), + }, + "text-field-read-only": { + name: "text-field-read-only", + files: ["registry/ui/default/core/text-field/demos/read-only.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-field/demos/read-only") + ), + }, + "text-field-required": { + name: "text-field-required", + files: ["registry/ui/default/core/text-field/demos/required.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-field/demos/required") + ), + }, + "text-field-sizes": { + name: "text-field-sizes", + files: ["registry/ui/default/core/text-field/demos/sizes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/text-field/demos/sizes") + ), + }, + "text-field-uncontrolled": { + name: "text-field-uncontrolled", + files: ["registry/ui/default/core/text-field/demos/uncontrolled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/text-field/demos/uncontrolled") + ), + }, + "time-field-composition": { + name: "time-field-composition", + files: ["registry/ui/default/core/time-field/demos/composition.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/time-field/demos/composition") + ), + }, + "time-field-contextual-help": { + name: "time-field-contextual-help", + files: [ + "registry/ui/default/core/time-field/demos/contextual-help.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/time-field/demos/contextual-help" + ) + ), + }, + "time-field-controlled": { + name: "time-field-controlled", + files: ["registry/ui/default/core/time-field/demos/controlled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/time-field/demos/controlled") + ), + }, + "time-field-default": { + name: "time-field-default", + files: ["registry/ui/default/core/time-field/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/time-field/demos/default") + ), + }, + "time-field-description": { + name: "time-field-description", + files: ["registry/ui/default/core/time-field/demos/description.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/time-field/demos/description") + ), + }, + "time-field-disabled": { + name: "time-field-disabled", + files: ["registry/ui/default/core/time-field/demos/disabled.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/time-field/demos/disabled") + ), + }, + "time-field-error-message": { + name: "time-field-error-message", + files: ["registry/ui/default/core/time-field/demos/error-message.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/time-field/demos/error-message") + ), + }, + "time-field-granularity": { + name: "time-field-granularity", + files: ["registry/ui/default/core/time-field/demos/granularity.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/time-field/demos/granularity") + ), + }, + "time-field-hide-time-zone": { + name: "time-field-hide-time-zone", + files: ["registry/ui/default/core/time-field/demos/hide-time-zone.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/time-field/demos/hide-time-zone") + ), + }, + "time-field-hour-cycle": { + name: "time-field-hour-cycle", + files: ["registry/ui/default/core/time-field/demos/hour-cycle.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/time-field/demos/hour-cycle") + ), + }, + "time-field-label": { + name: "time-field-label", + files: ["registry/ui/default/core/time-field/demos/label.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/time-field/demos/label") + ), + }, + "time-field-loading": { + name: "time-field-loading", + files: ["registry/ui/default/core/time-field/demos/loading.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/time-field/demos/loading") + ), + }, + "time-field-placeholder": { + name: "time-field-placeholder", + files: ["registry/ui/default/core/time-field/demos/placeholder.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/time-field/demos/placeholder") + ), + }, + "time-field-prefix-and-suffix": { + name: "time-field-prefix-and-suffix", + files: [ + "registry/ui/default/core/time-field/demos/prefix-and-suffix.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/time-field/demos/prefix-and-suffix" + ) + ), + }, + "time-field-read-only": { + name: "time-field-read-only", + files: ["registry/ui/default/core/time-field/demos/read-only.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/time-field/demos/read-only") + ), + }, + "time-field-required": { + name: "time-field-required", + files: ["registry/ui/default/core/time-field/demos/required.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/time-field/demos/required") + ), + }, + "time-field-sizes": { + name: "time-field-sizes", + files: ["registry/ui/default/core/time-field/demos/sizes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/time-field/demos/sizes") + ), + }, + "time-field-time-zones": { + name: "time-field-time-zones", + files: ["registry/ui/default/core/time-field/demos/time-zones.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/time-field/demos/time-zones") + ), + }, + "time-field-uncontrolled": { + name: "time-field-uncontrolled", + files: ["registry/ui/default/core/time-field/demos/uncontrolled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/time-field/demos/uncontrolled") + ), + }, + "toggle-button-controlled": { + name: "toggle-button-controlled", + files: ["registry/ui/default/core/toggle-button/demos/controlled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/toggle-button/demos/controlled") + ), + }, + "toggle-button-default": { + name: "toggle-button-default", + files: ["registry/ui/default/core/toggle-button/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/toggle-button/demos/default") + ), + }, + "toggle-button-disabled": { + name: "toggle-button-disabled", + files: ["registry/ui/default/core/toggle-button/demos/disabled.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/toggle-button/demos/disabled") + ), + }, + "toggle-button-shapes": { + name: "toggle-button-shapes", + files: ["registry/ui/default/core/toggle-button/demos/shapes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/toggle-button/demos/shapes") + ), + }, + "toggle-button-sizes": { + name: "toggle-button-sizes", + files: ["registry/ui/default/core/toggle-button/demos/sizes.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/toggle-button/demos/sizes") + ), + }, + "toggle-button-uncontrolled": { + name: "toggle-button-uncontrolled", + files: [ + "registry/ui/default/core/toggle-button/demos/uncontrolled.tsx", + ], + component: React.lazy( + () => + import( + "@/registry/ui/default/core/toggle-button/demos/uncontrolled" + ) + ), + }, + "toggle-button-variants": { + name: "toggle-button-variants", + files: ["registry/ui/default/core/toggle-button/demos/variants.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/toggle-button/demos/variants") + ), + }, + "tooltip-arrow": { + name: "tooltip-arrow", + files: ["registry/ui/default/core/tooltip/demos/arrow.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/tooltip/demos/arrow") + ), + }, + "tooltip-composition": { + name: "tooltip-composition", + files: ["registry/ui/default/core/tooltip/demos/composition.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/tooltip/demos/composition") + ), + }, + "tooltip-container-padding": { + name: "tooltip-container-padding", + files: ["registry/ui/default/core/tooltip/demos/container-padding.tsx"], + component: React.lazy( + () => + import("@/registry/ui/default/core/tooltip/demos/container-padding") + ), + }, + "tooltip-default": { + name: "tooltip-default", + files: ["registry/ui/default/core/tooltip/demos/default.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/tooltip/demos/default") + ), + }, + "tooltip-delay": { + name: "tooltip-delay", + files: ["registry/ui/default/core/tooltip/demos/delay.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/tooltip/demos/delay") + ), + }, + "tooltip-flip": { + name: "tooltip-flip", + files: ["registry/ui/default/core/tooltip/demos/flip.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/tooltip/demos/flip") + ), + }, + "tooltip-offset": { + name: "tooltip-offset", + files: ["registry/ui/default/core/tooltip/demos/offset.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/tooltip/demos/offset") + ), + }, + "tooltip-placement": { + name: "tooltip-placement", + files: ["registry/ui/default/core/tooltip/demos/placement.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/tooltip/demos/placement") + ), + }, + "tooltip-with-arrow": { + name: "tooltip-with-arrow", + files: ["registry/ui/default/core/tooltip/demos/with-arrow.tsx"], + component: React.lazy( + () => import("@/registry/ui/default/core/tooltip/demos/with-arrow") + ), + }, + }, + }, +}; diff --git a/www/src/__demos__/registry.ts b/www/src/__demos__/registry.ts index 092fb5cc..59af40e8 100644 --- a/www/src/__demos__/registry.ts +++ b/www/src/__demos__/registry.ts @@ -1,483 +1,483 @@ -type RegistryDemoItem = { - name: string; - files: string[]; -}; - -type RegistryDemos = RegistryDemoItem[]; - -const buildDemos = (component: string, demos: string[]): RegistryDemos => { - return demos.map((demo) => { - return { - name: `${component}-${demo}`, - type: "registry:demo", - files: [`core/${component}/demos/${demo}.tsx`], - }; - }); -}; - -export const demos: RegistryDemos = [ - ...buildDemos("alert", [ - "action", - "composition", - "content", - "custom-icon", - "default", - "title", - "variants", - ]), - ...buildDemos("aspect-ratio", ["as-child", "default"]), - ...buildDemos("avatar", ["composition", "default", "shape", "sizes"]), - ...buildDemos("badge", ["default", "icon", "sizes", "variants"]), - ...buildDemos("breadcrumbs", [ - "basic", - "composition", - "disabled", - "icon", - "router-integration", - ]), - ...buildDemos("button", [ - "default", - "disabled", - "link-button", - "loading", - "prefix-and-suffix", - "shapes", - "sizes", - "variants", - ]), - ...buildDemos("calendar", [ - "composition", - "controlled", - "default", - "disabled", - "error-message", - "label", - "page-behaviour", - "read-only", - "uncontrolled", - "unvailable-dates", - "validation", - "visible-months", - ]), - ...buildDemos("checkbox", [ - "card", - "controlled", - "default", - "disabled", - "indeterminate", - "read-only", - "uncontrolled", - ]), - ...buildDemos("checkbox-group", [ - "cards", - "composition", - "contextual-help", - "controlled", - "default", - "description", - "disabled", - "error-message", - "label", - "read-only", - "required", - "uncontrolled", - ]), - ...buildDemos("color-area", [ - "channels", - "composition", - "controlled", - "default", - "disabled", - "uncontrolled", - ]), - ...buildDemos("color-field", [ - "composition", - "contextual-help", - "controlled", - "default", - "description", - "disabled", - "error-message", - "form", - "label", - "loading", - "prefix-and-suffix", - "read-only", - "required", - "sizes", - "uncontrolled", - ]), - ...buildDemos("color-picker", [ - "composition", - "controlled", - "default", - "options", - "uncontrolled", - ]), - ...buildDemos("color-slider", [ - "channel", - "composition", - "controlled", - "default", - "disabled", - "label", - "uncontrolled", - "vertical", - ]), - ...buildDemos("color-swatch", ["default"]), - ...buildDemos("combobox", [ - "async-loading", - "basic", - "composition", - "contextual-help", - "controlled", - "custom-value", - "description", - "disabled", - "label", - "loading", - "required", - "sections", - "uncontrolled", - "validation", - ]), - ...buildDemos("date-field", [ - "composition", - "contextual-help", - "controlled", - "default", - "description", - "disabled", - "error-message", - "granularity", - "hide-time-zone", - "hour-cycle", - "label", - "loading", - "placeholder", - "prefix-and-suffix", - "read-only", - "required", - "sizes", - "time-zones", - "uncontrolled", - ]), - ...buildDemos("date-picker", [ - "composition", - "contextual-help", - "controlled", - "default", - "description", - "disabled", - "error-message", - "granularity", - "hide-time-zone", - "hour-cycle", - "label", - "loading", - "placeholder", - "prefix", - "read-only", - "required", - "sizes", - "time-zones", - "uncontrolled", - ]), - ...buildDemos("date-range-picker", [ - "composition", - "contextual-help", - "controlled", - "default", - "description", - "disabled", - "error-message", - "granularity", - "hide-time-zone", - "hour-cycle", - "label", - "loading", - "placeholder", - "prefix", - "read-only", - "required", - "sizes", - "time-zones", - "uncontrolled", - ]), - ...buildDemos("dialog", [ - "alert-dialog", - "async-form-submission", - "basic", - "composition", - "controlled", - "description", - "dismiss-button", - "dismissable", - "drawer", - "inset-content", - "nested", - "popover", - "title", - "types", - ]), - ...buildDemos("drop-zone", ["default", "disabled", "file-trigger", "label"]), - ...buildDemos("file-trigger", [ - "default", - "directory-selection", - "file-types", - "media-capture", - "multiple-files", - ]), - ...buildDemos("link", ["default", "disabled", "icon", "variants"]), - ...buildDemos("list-box", [ - "async-loading", - "basic", - "composition", - "contact-list", - "controlled", - "disabled-items", - "empty-state", - "grid", - "horizontal", - "image-grid", - "item-variant", - "label-and-description", - "links", - "loading", - "prefix-and-suffix", - "sections", - "selection-behavior", - "selection-mode", - "separator", - "uncontrolled", - ]), - ...buildDemos("menu", [ - "basic", - "composition", - "controlled", - "disabled-items", - "item-variant", - "label-and-description", - "link-items", - "long-press", - "multiple-selection", - "overlay-type", - "placement", - "prefix-and-suffix", - "section", - "separator", - "shortcut", - "single-selection", - "submenus", - ]), - ...buildDemos("number-field", [ - "composition", - "contextual-help", - "controlled", - "default", - "description", - "disabled", - "error-message", - "format-options", - "label", - "read-only", - "required", - "sizes", - "uncontrolled", - ]), - ...buildDemos("progress", [ - "composition", - "custom-color", - "custom-value-label", - "default", - "duration", - "format-options", - "indeterminate", - "label", - "min-max-values", - "shape", - "sizes", - "toolbar", - "value-label", - "variants", - ]), - ...buildDemos("radio-group", [ - "cards", - "composition", - "contextual-help", - "controlled", - "default", - "description", - "disabled", - "error-message", - "label", - "orientation", - "read-only", - "required", - "uncontrolled", - ]), - ...buildDemos("range-calendar", [ - "composition", - "controlled", - "default", - "disabled", - "error-message", - "label", - "non-contiguous-ranges", - "page-behaviour", - "read-only", - "uncontrolled", - "unvailable-dates", - "validation", - "visible-months", - ]), - ...buildDemos("scroll-area", ["default", "scrollbars", "sizes"]), - ...buildDemos("search-field", [ - "composition", - "contextual-help", - "controlled", - "default", - "description", - "disabled", - "error-message", - "form", - "label", - "loading", - "prefix-and-suffix", - "read-only", - "required", - "sizes", - "uncontrolled", - ]), - ...buildDemos("select", [ - "async-loading", - "basic", - "composition", - "contextual-help", - "controlled", - "description", - "disabled", - "label", - "links", - "loading", - "placeholder", - "required", - "sections", - "uncontrolled", - "validation", - ]), - ...buildDemos("separator", ["card", "orientation"]), - ...buildDemos("skeleton", [ - "api-simulation", - "card", - "children", - "fixed-size-children", - "show", - ]), - ...buildDemos("slider", [ - "advanced-composition", - "composition", - "controlled", - "default", - "description", - "disabled", - "format-options", - "label", - "range", - "sizes", - "step", - "uncontrolled", - "value-label", - "value-scale", - "vertical", - ]), - ...buildDemos("switch", [ - "controlled", - "default", - "disabled", - "label", - "sizes", - "uncontrolled", - ]), - ...buildDemos("tabs", [ - "basic", - "controlled", - "disabled-item", - "disabled", - "keyboard-activation", - "vertical", - ]), - ...buildDemos("text-area", [ - "composition", - "contextual-help", - "controlled", - "default", - "description", - "disabled", - "error-message", - "form", - "label", - "loading", - "prefix-and-suffix", - "read-only", - "required", - "uncontrolled", - ]), - ...buildDemos("text-field", [ - "composition", - "contextual-help", - "controlled", - "default", - "description", - "disabled", - "error-message", - "label", - "loading", - "prefix-and-suffix", - "read-only", - "required", - "sizes", - "uncontrolled", - ]), - ...buildDemos("time-field", [ - "composition", - "contextual-help", - "controlled", - "default", - "description", - "disabled", - "error-message", - "granularity", - "hide-time-zone", - "hour-cycle", - "label", - "loading", - "placeholder", - "prefix-and-suffix", - "read-only", - "required", - "sizes", - "time-zones", - "uncontrolled", - ]), - ...buildDemos("toggle-button", [ - "controlled", - "default", - "disabled", - "shapes", - "sizes", - "uncontrolled", - "variants", - ]), - ...buildDemos("tooltip", [ - "arrow", - "composition", - "container-padding", - "default", - "delay", - "flip", - "offset", - "placement", - "with-arrow", - ]), -]; +type RegistryDemoItem = { + name: string; + files: string[]; +}; + +type RegistryDemos = RegistryDemoItem[]; + +const buildDemos = (component: string, demos: string[]): RegistryDemos => { + return demos.map((demo) => { + return { + name: `${component}-${demo}`, + type: "registry:demo", + files: [`core/${component}/demos/${demo}.tsx`], + }; + }); +}; + +export const demos: RegistryDemos = [ + ...buildDemos("alert", [ + "action", + "composition", + "content", + "custom-icon", + "default", + "title", + "variants", + ]), + ...buildDemos("aspect-ratio", ["as-child", "default"]), + ...buildDemos("avatar", ["composition", "default", "shape", "sizes"]), + ...buildDemos("badge", ["default", "icon", "sizes", "variants"]), + ...buildDemos("breadcrumbs", [ + "basic", + "composition", + "disabled", + "icon", + "router-integration", + ]), + ...buildDemos("button", [ + "default", + "disabled", + "link-button", + "loading", + "prefix-and-suffix", + "shapes", + "sizes", + "variants", + ]), + ...buildDemos("calendar", [ + "composition", + "controlled", + "default", + "disabled", + "error-message", + "label", + "page-behaviour", + "read-only", + "uncontrolled", + "unvailable-dates", + "validation", + "visible-months", + ]), + ...buildDemos("checkbox", [ + "card", + "controlled", + "default", + "disabled", + "indeterminate", + "read-only", + "uncontrolled", + ]), + ...buildDemos("checkbox-group", [ + "cards", + "composition", + "contextual-help", + "controlled", + "default", + "description", + "disabled", + "error-message", + "label", + "read-only", + "required", + "uncontrolled", + ]), + ...buildDemos("color-area", [ + "channels", + "composition", + "controlled", + "default", + "disabled", + "uncontrolled", + ]), + ...buildDemos("color-field", [ + "composition", + "contextual-help", + "controlled", + "default", + "description", + "disabled", + "error-message", + "form", + "label", + "loading", + "prefix-and-suffix", + "read-only", + "required", + "sizes", + "uncontrolled", + ]), + ...buildDemos("color-picker", [ + "composition", + "controlled", + "default", + "options", + "uncontrolled", + ]), + ...buildDemos("color-slider", [ + "channel", + "composition", + "controlled", + "default", + "disabled", + "label", + "uncontrolled", + "vertical", + ]), + ...buildDemos("color-swatch", ["default"]), + ...buildDemos("combobox", [ + "async-loading", + "basic", + "composition", + "contextual-help", + "controlled", + "custom-value", + "description", + "disabled", + "label", + "loading", + "required", + "sections", + "uncontrolled", + "validation", + ]), + ...buildDemos("date-field", [ + "composition", + "contextual-help", + "controlled", + "default", + "description", + "disabled", + "error-message", + "granularity", + "hide-time-zone", + "hour-cycle", + "label", + "loading", + "placeholder", + "prefix-and-suffix", + "read-only", + "required", + "sizes", + "time-zones", + "uncontrolled", + ]), + ...buildDemos("date-picker", [ + "composition", + "contextual-help", + "controlled", + "default", + "description", + "disabled", + "error-message", + "granularity", + "hide-time-zone", + "hour-cycle", + "label", + "loading", + "placeholder", + "prefix", + "read-only", + "required", + "sizes", + "time-zones", + "uncontrolled", + ]), + ...buildDemos("date-range-picker", [ + "composition", + "contextual-help", + "controlled", + "default", + "description", + "disabled", + "error-message", + "granularity", + "hide-time-zone", + "hour-cycle", + "label", + "loading", + "placeholder", + "prefix", + "read-only", + "required", + "sizes", + "time-zones", + "uncontrolled", + ]), + ...buildDemos("dialog", [ + "alert-dialog", + "async-form-submission", + "basic", + "composition", + "controlled", + "description", + "dismiss-button", + "dismissable", + "drawer", + "inset-content", + "nested", + "popover", + "title", + "types", + ]), + ...buildDemos("drop-zone", ["default", "disabled", "file-trigger", "label"]), + ...buildDemos("file-trigger", [ + "default", + "directory-selection", + "file-types", + "media-capture", + "multiple-files", + ]), + ...buildDemos("link", ["default", "disabled", "icon", "variants"]), + ...buildDemos("list-box", [ + "async-loading", + "basic", + "composition", + "contact-list", + "controlled", + "disabled-items", + "empty-state", + "grid", + "horizontal", + "image-grid", + "item-variant", + "label-and-description", + "links", + "loading", + "prefix-and-suffix", + "sections", + "selection-behavior", + "selection-mode", + "separator", + "uncontrolled", + ]), + ...buildDemos("menu", [ + "basic", + "composition", + "controlled", + "disabled-items", + "item-variant", + "label-and-description", + "link-items", + "long-press", + "multiple-selection", + "overlay-type", + "placement", + "prefix-and-suffix", + "section", + "separator", + "shortcut", + "single-selection", + "submenus", + ]), + ...buildDemos("number-field", [ + "composition", + "contextual-help", + "controlled", + "default", + "description", + "disabled", + "error-message", + "format-options", + "label", + "read-only", + "required", + "sizes", + "uncontrolled", + ]), + ...buildDemos("progress", [ + "composition", + "custom-color", + "custom-value-label", + "default", + "duration", + "format-options", + "indeterminate", + "label", + "min-max-values", + "shape", + "sizes", + "toolbar", + "value-label", + "variants", + ]), + ...buildDemos("radio-group", [ + "cards", + "composition", + "contextual-help", + "controlled", + "default", + "description", + "disabled", + "error-message", + "label", + "orientation", + "read-only", + "required", + "uncontrolled", + ]), + ...buildDemos("range-calendar", [ + "composition", + "controlled", + "default", + "disabled", + "error-message", + "label", + "non-contiguous-ranges", + "page-behaviour", + "read-only", + "uncontrolled", + "unvailable-dates", + "validation", + "visible-months", + ]), + ...buildDemos("scroll-area", ["default", "scrollbars", "sizes"]), + ...buildDemos("search-field", [ + "composition", + "contextual-help", + "controlled", + "default", + "description", + "disabled", + "error-message", + "form", + "label", + "loading", + "prefix-and-suffix", + "read-only", + "required", + "sizes", + "uncontrolled", + ]), + ...buildDemos("select", [ + "async-loading", + "basic", + "composition", + "contextual-help", + "controlled", + "description", + "disabled", + "label", + "links", + "loading", + "placeholder", + "required", + "sections", + "uncontrolled", + "validation", + ]), + ...buildDemos("separator", ["card", "orientation"]), + ...buildDemos("skeleton", [ + "api-simulation", + "card", + "children", + "fixed-size-children", + "show", + ]), + ...buildDemos("slider", [ + "advanced-composition", + "composition", + "controlled", + "default", + "description", + "disabled", + "format-options", + "label", + "range", + "sizes", + "step", + "uncontrolled", + "value-label", + "value-scale", + "vertical", + ]), + ...buildDemos("switch", [ + "controlled", + "default", + "disabled", + "label", + "sizes", + "uncontrolled", + ]), + ...buildDemos("tabs", [ + "basic", + "controlled", + "disabled-item", + "disabled", + "keyboard-activation", + "vertical", + ]), + ...buildDemos("text-area", [ + "composition", + "contextual-help", + "controlled", + "default", + "description", + "disabled", + "error-message", + "form", + "label", + "loading", + "prefix-and-suffix", + "read-only", + "required", + "uncontrolled", + ]), + ...buildDemos("text-field", [ + "composition", + "contextual-help", + "controlled", + "default", + "description", + "disabled", + "error-message", + "label", + "loading", + "prefix-and-suffix", + "read-only", + "required", + "sizes", + "uncontrolled", + ]), + ...buildDemos("time-field", [ + "composition", + "contextual-help", + "controlled", + "default", + "description", + "disabled", + "error-message", + "granularity", + "hide-time-zone", + "hour-cycle", + "label", + "loading", + "placeholder", + "prefix-and-suffix", + "read-only", + "required", + "sizes", + "time-zones", + "uncontrolled", + ]), + ...buildDemos("toggle-button", [ + "controlled", + "default", + "disabled", + "shapes", + "sizes", + "uncontrolled", + "variants", + ]), + ...buildDemos("tooltip", [ + "arrow", + "composition", + "container-padding", + "default", + "delay", + "flip", + "offset", + "placement", + "with-arrow", + ]), +]; diff --git a/www/src/__icons__/create-icon.tsx b/www/src/__icons__/create-icon.tsx index 3fd8a499..224af88f 100644 --- a/www/src/__icons__/create-icon.tsx +++ b/www/src/__icons__/create-icon.tsx @@ -1,16 +1,16 @@ -import { useConfig } from "@/hooks/use-config"; - -export const createIcon = (icons: { - lucide: React.ElementType; - remix: React.ElementType; -}) => { - const Icon = (props: { className?: string }) => { - const { iconLibrary } = useConfig(); - const IconComponent = icons[iconLibrary as keyof typeof icons]; - if (!IconComponent) { - return null; - } - return ; - }; - return Icon; -}; +import { useConfig } from "@/hooks/use-config"; + +export const createIcon = (icons: { + lucide: React.ElementType; + remix: React.ElementType; +}) => { + const Icon = (props: { className?: string }) => { + const { iconLibrary } = useConfig(); + const IconComponent = icons[iconLibrary as keyof typeof icons]; + if (!IconComponent) { + return null; + } + return ; + }; + return Icon; +}; diff --git a/www/src/__icons__/index.tsx b/www/src/__icons__/index.tsx index ec9382fc..62d1bd79 100644 --- a/www/src/__icons__/index.tsx +++ b/www/src/__icons__/index.tsx @@ -1,230 +1,230 @@ -"use client"; - -// This file is autogenerated by scripts/build-registry.ts -// Do not edit this file directly. -import * as remix from "@remixicon/react"; -import * as lucide from "lucide-react"; -import { createIcon } from "./create-icon"; - -// This file is autogenerated by scripts/build-registry.ts -// Do not edit this file directly. - -export const LoaderIcon = createIcon({ - lucide: lucide.Loader2Icon, - remix: remix.RiLoader4Line, -}); - -export const DangerIcon = createIcon({ - lucide: lucide.AlertCircleIcon, - remix: remix.RiErrorWarningFill, -}); - -export const WarningIcon = createIcon({ - lucide: lucide.AlertTriangleIcon, - remix: remix.RiAlertLine, -}); - -export const SuccessIcon = createIcon({ - lucide: lucide.CheckCircle2Icon, - remix: remix.RiCheckboxCircleLine, -}); - -export const InfoIcon = createIcon({ - lucide: lucide.InfoIcon, - remix: remix.RiInformationLine, -}); - -export const ChevronRightIcon = createIcon({ - lucide: lucide.ChevronRightIcon, - remix: remix.RiArrowRightSLine, -}); - -export const ChevronLeftIcon = createIcon({ - lucide: lucide.ChevronLeftIcon, - remix: remix.RiArrowLeftSLine, -}); - -export const ChevronDownIcon = createIcon({ - lucide: lucide.ChevronDownIcon, - remix: remix.RiArrowDownSLine, -}); - -export const ChevronUpIcon = createIcon({ - lucide: lucide.ChevronUpIcon, - remix: remix.RiArrowUpSLine, -}); - -export const SearchIcon = createIcon({ - lucide: lucide.SearchIcon, - remix: remix.RiSearchLine, -}); - -export const HelpIcon = createIcon({ - lucide: lucide.HelpCircleIcon, - remix: remix.RiQuestionLine, -}); - -export const CalendarIcon = createIcon({ - lucide: lucide.CalendarIcon, - remix: remix.RiCalendarLine, -}); - -export const XIcon = createIcon({ - lucide: lucide.XIcon, - remix: remix.RiCloseLine, -}); - -export const AsteriskIcon = createIcon({ - lucide: lucide.AsteriskIcon, - remix: remix.RiAsterisk, -}); - -export const CheckIcon = createIcon({ - lucide: lucide.CheckIcon, - remix: remix.RiCheckLine, -}); - -export const MinusIcon = createIcon({ - lucide: lucide.MinusIcon, - remix: remix.RiSubtractLine, -}); - -export const PlusIcon = createIcon({ - lucide: lucide.PlusIcon, - remix: remix.RiAddLine, -}); - -export const WalletIcon = createIcon({ - lucide: lucide.WalletIcon, - remix: remix.RiWalletLine, -}); - -export const GlobeIcon = createIcon({ - lucide: lucide.GlobeIcon, - remix: remix.RiGlobalLine, -}); - -export const UserIcon = createIcon({ - lucide: lucide.User2Icon, - remix: remix.RiUserLine, -}); - -export const ShieldIcon = createIcon({ - lucide: lucide.ShieldIcon, - remix: remix.RiShieldLine, -}); - -export const ChevronRightCircleIcon = createIcon({ - lucide: lucide.ArrowRightCircleIcon, - remix: remix.RiArrowRightCircleLine, -}); - -export const HomeIcon = createIcon({ - lucide: lucide.HomeIcon, - remix: remix.RiHomeLine, -}); - -export const LogInIcon = createIcon({ - lucide: lucide.LogInIcon, - remix: remix.RiLoginBoxLine, -}); - -export const UploadIcon = createIcon({ - lucide: lucide.UploadIcon, - remix: remix.RiUpload2Line, -}); - -export const PaletteIcon = createIcon({ - lucide: lucide.PaletteIcon, - remix: remix.RiPaletteLine, -}); - -export const UsersIcon = createIcon({ - lucide: lucide.UsersIcon, - remix: remix.RiGroupLine, -}); - -export const PlaneIcon = createIcon({ - lucide: lucide.PlaneIcon, - remix: remix.RiPlaneLine, -}); - -export const CameraIcon = createIcon({ - lucide: lucide.CameraIcon, - remix: remix.RiCameraLine, -}); - -export const ExternalLinkIcon = createIcon({ - lucide: lucide.ExternalLinkIcon, - remix: remix.RiExternalLinkLine, -}); - -export const MenuIcon = createIcon({ - lucide: lucide.MenuIcon, - remix: remix.RiMenuLine, -}); - -export const CopyIcon = createIcon({ - lucide: lucide.CopyIcon, - remix: remix.RiFileCopyLine, -}); - -export const PlusSquareIcon = createIcon({ - lucide: lucide.PlusSquareIcon, - remix: remix.RiAddBoxLine, -}); - -export const SquarePenIcon = createIcon({ - lucide: lucide.SquarePenIcon, - remix: remix.RiEditLine, -}); - -export const RotateCwIcon = createIcon({ - lucide: lucide.RotateCwIcon, - remix: remix.RiRestartLine, -}); - -export const XCircleIcon = createIcon({ - lucide: lucide.XCircleIcon, - remix: remix.RiCloseCircleLine, -}); - -export const BoldIcon = createIcon({ - lucide: lucide.BoldIcon, - remix: remix.RiBold, -}); - -export const ItalicIcon = createIcon({ - lucide: lucide.ItalicIcon, - remix: remix.RiItalic, -}); - -export const TimerIcon = createIcon({ - lucide: lucide.TimerIcon, - remix: remix.RiTimerLine, -}); - -export const PinIcon = createIcon({ - lucide: lucide.PinIcon, - remix: remix.RiPushpinLine, -}); - -export const ALargeSmallIcon = createIcon({ - lucide: lucide.ALargeSmallIcon, - remix: remix.RiFontSize, -}); - -export const Volume1Icon = createIcon({ - lucide: lucide.Volume1Icon, - remix: remix.RiVolumeDownLine, -}); - -export const Volume2Icon = createIcon({ - lucide: lucide.Volume2Icon, - remix: remix.RiVolumeUpLine, -}); - -export const ChevronsUpDownIcon = createIcon({ - lucide: lucide.ChevronsUpDownIcon, - remix: remix.RiExpandUpDownLine, -}); +"use client"; + +// This file is autogenerated by scripts/build-registry.ts +// Do not edit this file directly. +import * as remix from "@remixicon/react"; +import * as lucide from "lucide-react"; +import { createIcon } from "./create-icon"; + +// This file is autogenerated by scripts/build-registry.ts +// Do not edit this file directly. + +export const LoaderIcon = createIcon({ + lucide: lucide.Loader2Icon, + remix: remix.RiLoader4Line, +}); + +export const DangerIcon = createIcon({ + lucide: lucide.AlertCircleIcon, + remix: remix.RiErrorWarningFill, +}); + +export const WarningIcon = createIcon({ + lucide: lucide.AlertTriangleIcon, + remix: remix.RiAlertLine, +}); + +export const SuccessIcon = createIcon({ + lucide: lucide.CheckCircle2Icon, + remix: remix.RiCheckboxCircleLine, +}); + +export const InfoIcon = createIcon({ + lucide: lucide.InfoIcon, + remix: remix.RiInformationLine, +}); + +export const ChevronRightIcon = createIcon({ + lucide: lucide.ChevronRightIcon, + remix: remix.RiArrowRightSLine, +}); + +export const ChevronLeftIcon = createIcon({ + lucide: lucide.ChevronLeftIcon, + remix: remix.RiArrowLeftSLine, +}); + +export const ChevronDownIcon = createIcon({ + lucide: lucide.ChevronDownIcon, + remix: remix.RiArrowDownSLine, +}); + +export const ChevronUpIcon = createIcon({ + lucide: lucide.ChevronUpIcon, + remix: remix.RiArrowUpSLine, +}); + +export const SearchIcon = createIcon({ + lucide: lucide.SearchIcon, + remix: remix.RiSearchLine, +}); + +export const HelpIcon = createIcon({ + lucide: lucide.HelpCircleIcon, + remix: remix.RiQuestionLine, +}); + +export const CalendarIcon = createIcon({ + lucide: lucide.CalendarIcon, + remix: remix.RiCalendarLine, +}); + +export const XIcon = createIcon({ + lucide: lucide.XIcon, + remix: remix.RiCloseLine, +}); + +export const AsteriskIcon = createIcon({ + lucide: lucide.AsteriskIcon, + remix: remix.RiAsterisk, +}); + +export const CheckIcon = createIcon({ + lucide: lucide.CheckIcon, + remix: remix.RiCheckLine, +}); + +export const MinusIcon = createIcon({ + lucide: lucide.MinusIcon, + remix: remix.RiSubtractLine, +}); + +export const PlusIcon = createIcon({ + lucide: lucide.PlusIcon, + remix: remix.RiAddLine, +}); + +export const WalletIcon = createIcon({ + lucide: lucide.WalletIcon, + remix: remix.RiWalletLine, +}); + +export const GlobeIcon = createIcon({ + lucide: lucide.GlobeIcon, + remix: remix.RiGlobalLine, +}); + +export const UserIcon = createIcon({ + lucide: lucide.User2Icon, + remix: remix.RiUserLine, +}); + +export const ShieldIcon = createIcon({ + lucide: lucide.ShieldIcon, + remix: remix.RiShieldLine, +}); + +export const ChevronRightCircleIcon = createIcon({ + lucide: lucide.ArrowRightCircleIcon, + remix: remix.RiArrowRightCircleLine, +}); + +export const HomeIcon = createIcon({ + lucide: lucide.HomeIcon, + remix: remix.RiHomeLine, +}); + +export const LogInIcon = createIcon({ + lucide: lucide.LogInIcon, + remix: remix.RiLoginBoxLine, +}); + +export const UploadIcon = createIcon({ + lucide: lucide.UploadIcon, + remix: remix.RiUpload2Line, +}); + +export const PaletteIcon = createIcon({ + lucide: lucide.PaletteIcon, + remix: remix.RiPaletteLine, +}); + +export const UsersIcon = createIcon({ + lucide: lucide.UsersIcon, + remix: remix.RiGroupLine, +}); + +export const PlaneIcon = createIcon({ + lucide: lucide.PlaneIcon, + remix: remix.RiPlaneLine, +}); + +export const CameraIcon = createIcon({ + lucide: lucide.CameraIcon, + remix: remix.RiCameraLine, +}); + +export const ExternalLinkIcon = createIcon({ + lucide: lucide.ExternalLinkIcon, + remix: remix.RiExternalLinkLine, +}); + +export const MenuIcon = createIcon({ + lucide: lucide.MenuIcon, + remix: remix.RiMenuLine, +}); + +export const CopyIcon = createIcon({ + lucide: lucide.CopyIcon, + remix: remix.RiFileCopyLine, +}); + +export const PlusSquareIcon = createIcon({ + lucide: lucide.PlusSquareIcon, + remix: remix.RiAddBoxLine, +}); + +export const SquarePenIcon = createIcon({ + lucide: lucide.SquarePenIcon, + remix: remix.RiEditLine, +}); + +export const RotateCwIcon = createIcon({ + lucide: lucide.RotateCwIcon, + remix: remix.RiRestartLine, +}); + +export const XCircleIcon = createIcon({ + lucide: lucide.XCircleIcon, + remix: remix.RiCloseCircleLine, +}); + +export const BoldIcon = createIcon({ + lucide: lucide.BoldIcon, + remix: remix.RiBold, +}); + +export const ItalicIcon = createIcon({ + lucide: lucide.ItalicIcon, + remix: remix.RiItalic, +}); + +export const TimerIcon = createIcon({ + lucide: lucide.TimerIcon, + remix: remix.RiTimerLine, +}); + +export const PinIcon = createIcon({ + lucide: lucide.PinIcon, + remix: remix.RiPushpinLine, +}); + +export const ALargeSmallIcon = createIcon({ + lucide: lucide.ALargeSmallIcon, + remix: remix.RiFontSize, +}); + +export const Volume1Icon = createIcon({ + lucide: lucide.Volume1Icon, + remix: remix.RiVolumeDownLine, +}); + +export const Volume2Icon = createIcon({ + lucide: lucide.Volume2Icon, + remix: remix.RiVolumeUpLine, +}); + +export const ChevronsUpDownIcon = createIcon({ + lucide: lucide.ChevronsUpDownIcon, + remix: remix.RiExpandUpDownLine, +}); diff --git a/www/src/app/docs/[...slug]/page.tsx b/www/src/app/docs/[...slug]/page.tsx index 4ec71d4b..5001335f 100644 --- a/www/src/app/docs/[...slug]/page.tsx +++ b/www/src/app/docs/[...slug]/page.tsx @@ -1,113 +1,115 @@ -import React from "react"; -import type { Metadata } from "next"; -import { notFound } from "next/navigation"; -import { type TableOfContents as TocType } from "fumadocs-core/server"; -import { ExternalLinkIcon } from "lucide-react"; -import { truncateOnWord } from "@/lib/string"; -import { Breadcrumbs } from "@/components/breadcrumbs"; -import { DocsPager } from "@/components/docs-pager"; -import { AdobeIcon } from "@/components/icons/adobe"; -import { PageLastUpdate } from "@/components/last-update"; -import { mdxComponents } from "@/components/mdx/mdx-components"; -import { TableOfContents } from "@/components/toc"; -import { Button } from "@/registry/ui/default/core/button"; -import { cn } from "@/registry/ui/default/lib/cn"; -import { source } from "@/app/source"; -import { siteConfig } from "@/config"; - -interface PageProps { - params: { - slug: string[]; - }; -} - -const config = siteConfig.global; - -export default async function Page({ params }: PageProps) { - const page = source.getPage(params.slug); - if (!page) notFound(); - const MDXContent = page.data.body; - - return ( -
0, - })} - > -
- -

{page.data.title}

-

{page.data.description}

- {page.data.links && page.data.links.length > 0 && ( -
- {page.data.links.map((link, index) => ( - - ))} -
- )} -
- -
-
- - -
-
- {page.data.toc && page.data.toc.length > 0 && ( -
-
- -
-
- )} -
- ); -} - -const getIcon = (url: string) => { - if (url.includes("adobe")) return ; - return null; -}; - -export function generateMetadata({ params }: PageProps): Metadata { - const page = source.getPage(params.slug); - if (!page) notFound(); - - return { - title: page.data.title, - description: page.data.description, - openGraph: { - title: page.data.title, - description: page.data.description - ? truncateOnWord(page.data.description, 148, true) - : undefined, - type: "article", - url: page.url, - images: [config.thumbnail], - }, - twitter: { - card: "summary_large_image", - title: page.data.title, - description: page.data.description - ? truncateOnWord(page.data.description, 148, true) - : undefined, - images: [config.thumbnail], - creator: config.twitter.creator, - }, - }; -} - -export function generateStaticParams(): PageProps["params"][] { - return source.generateParams(); -} +import React from "react"; +import type { Metadata } from "next"; +import { notFound } from "next/navigation"; +import { type TableOfContents as TocType } from "fumadocs-core/server"; +import { ExternalLinkIcon } from "lucide-react"; +import { truncateOnWord } from "@/lib/string"; +import { Breadcrumbs } from "@/components/breadcrumbs"; +import { DocsPager } from "@/components/docs-pager"; +import { AdobeIcon } from "@/components/icons/adobe"; +import { PageLastUpdate } from "@/components/last-update"; +import { mdxComponents } from "@/components/mdx/mdx-components"; +import { TableOfContents } from "@/components/toc"; +import { Button } from "@/registry/ui/default/core/button"; +import { cn } from "@/registry/ui/default/lib/cn"; +import { source } from "@/app/source"; +import { siteConfig } from "@/config"; + +interface PageProps { + params: Promise<{ + slug: string[]; + }>; +} + +const config = siteConfig.global; + +export default async function Page(props: PageProps) { + const params = await props.params; + const page = source.getPage(params.slug); + if (!page) notFound(); + const MDXContent = page.data.body; + + return ( +
0, + })} + > +
+ +

{page.data.title}

+

{page.data.description}

+ {page.data.links && page.data.links.length > 0 && ( +
+ {page.data.links.map((link, index) => ( + + ))} +
+ )} +
+ +
+
+ + +
+
+ {page.data.toc && page.data.toc.length > 0 && ( +
+
+ +
+
+ )} +
+ ); +} + +const getIcon = (url: string) => { + if (url.includes("adobe")) return ; + return null; +}; + +export async function generateMetadata(props: PageProps): Promise { + const params = await props.params; + const page = source.getPage(params.slug); + if (!page) notFound(); + + return { + title: page.data.title, + description: page.data.description, + openGraph: { + title: page.data.title, + description: page.data.description + ? truncateOnWord(page.data.description, 148, true) + : undefined, + type: "article", + url: page.url, + images: [config.thumbnail], + }, + twitter: { + card: "summary_large_image", + title: page.data.title, + description: page.data.description + ? truncateOnWord(page.data.description, 148, true) + : undefined, + images: [config.thumbnail], + creator: config.twitter.creator, + }, + }; +} + +export function generateStaticParams(): PageProps["params"][] { + return source.generateParams(); +} diff --git a/www/src/app/layout.tsx b/www/src/app/layout.tsx index 43a2aa00..0d1f9bf8 100644 --- a/www/src/app/layout.tsx +++ b/www/src/app/layout.tsx @@ -1,99 +1,99 @@ -import React from "react"; -import type { Metadata, Viewport } from "next"; -import { Analytics } from "@vercel/analytics/react"; -import { truncateOnWord } from "@/lib/string"; -import { MobileNav } from "@/components/mobile-nav"; -import { Sidebar } from "@/components/sidebar"; -import { Badge } from "@/registry/ui/default/core/badge"; -import { cn } from "@/registry/ui/default/lib/cn"; -import { - JosephinFont, - fontDisplay, - geistMono, - geistSans, -} from "@/styles/fonts"; -import "@/styles/globals.css"; -import { siteConfig } from "@/config"; -import { Providers } from "./providers"; -import { source } from "./source"; - -const config = siteConfig.global; - -export const metadata: Metadata = { - title: { default: config.title, template: `%s - ${config.name}` }, - description: truncateOnWord(config.description, 148, true), - keywords: config.keywords, - authors: config.authors, - creator: config.creator, - icons: { - icon: "/favicon.ico", - shortcut: "/favicon-16x16.png", - apple: "/apple-touch-icon.png", - }, - manifest: "/site.webmanifest", - openGraph: { - type: "website", - locale: "en_US", - url: config.url, - title: config.title, - description: truncateOnWord(config.description, 148, true), - siteName: config.name, - images: [config.thumbnail], - }, - twitter: { - card: "summary_large_image", - title: config.title, - description: truncateOnWord(config.description, 148, true), - images: [config.thumbnail], - creator: config.twitter.creator, - }, - metadataBase: new URL(config.url), -}; - -export const viewport: Viewport = { - themeColor: [ - { media: "(prefers-color-scheme: light)", color: "white" }, - { media: "(prefers-color-scheme: dark)", color: "black" }, - ], -}; - -export default function RootLayout({ - children, -}: { - children: React.ReactNode; -}) { - return ( - - - - - {/* TODO: patch min-h-screen */} -
- - -
- {/* Version */} - - v0.1.0 beta - - {children} -
-
-
- - - ); -} +import React from "react"; +import type { Metadata, Viewport } from "next"; +import { Analytics } from "@vercel/analytics/react"; +import { truncateOnWord } from "@/lib/string"; +import { MobileNav } from "@/components/mobile-nav"; +import { Sidebar } from "@/components/sidebar"; +import { Badge } from "@/registry/ui/default/core/badge"; +import { cn } from "@/registry/ui/default/lib/cn"; +import { + JosephinFont, + fontDisplay, + geistMono, + geistSans, +} from "@/styles/fonts"; +import "@/styles/globals.css"; +import { siteConfig } from "@/config"; +import { Providers } from "./providers"; +import { source } from "./source"; + +const config = siteConfig.global; + +export const metadata: Metadata = { + title: { default: config.title, template: `%s - ${config.name}` }, + description: truncateOnWord(config.description, 148, true), + keywords: config.keywords, + authors: config.authors, + creator: config.creator, + icons: { + icon: "/favicon.ico", + shortcut: "/favicon-16x16.png", + apple: "/apple-touch-icon.png", + }, + manifest: "/site.webmanifest", + openGraph: { + type: "website", + locale: "en_US", + url: config.url, + title: config.title, + description: truncateOnWord(config.description, 148, true), + siteName: config.name, + images: [config.thumbnail], + }, + twitter: { + card: "summary_large_image", + title: config.title, + description: truncateOnWord(config.description, 148, true), + images: [config.thumbnail], + creator: config.twitter.creator, + }, + metadataBase: new URL(config.url), +}; + +export const viewport: Viewport = { + themeColor: [ + { media: "(prefers-color-scheme: light)", color: "white" }, + { media: "(prefers-color-scheme: dark)", color: "black" }, + ], +}; + +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + + + + + {/* TODO: patch min-h-screen */} +
+ + +
+ {/* Version */} + + v0.1.0 beta + + {children} +
+
+
+ + + ); +} diff --git a/www/src/app/manifest.ts b/www/src/app/manifest.ts index 169fe1db..a1d53a9c 100644 --- a/www/src/app/manifest.ts +++ b/www/src/app/manifest.ts @@ -1,22 +1,22 @@ -import { MetadataRoute } from "next"; -import { siteConfig } from "@/config/site-config"; - -export default function manifest(): MetadataRoute.Manifest { - return { - name: "dotUI", - short_name: "dotui", - description: siteConfig.global.description, - start_url: "/", - display: "standalone", - background_color: "#010101", - theme_color: "#010101", - icons: [ - { - src: "https://dotui.org/android-chrome-192x192.png", - sizes: "192x192", - type: "image/png", - purpose: "maskable", - }, - ], - }; -} +import { MetadataRoute } from "next"; +import { siteConfig } from "@/config/site-config"; + +export default function manifest(): MetadataRoute.Manifest { + return { + name: "dotUI", + short_name: "dotui", + description: siteConfig.global.description, + start_url: "/", + display: "standalone", + background_color: "#010101", + theme_color: "#010101", + icons: [ + { + src: "https://dotui.org/android-chrome-192x192.png", + sizes: "192x192", + type: "image/png", + purpose: "maskable", + }, + ], + }; +} diff --git a/www/src/app/page.tsx b/www/src/app/page.tsx index 40f2eeb0..d8603c58 100644 --- a/www/src/app/page.tsx +++ b/www/src/app/page.tsx @@ -1,84 +1,84 @@ -import React from "react"; -import { TerminalSquareIcon } from "lucide-react"; -import { Code } from "@/components/code"; -import { SearchCommand } from "@/components/search-command"; -import { Link } from "@/registry/ui/default/core/link"; -import { cn } from "@/registry/ui/default/lib/cn"; -import { siteConfig } from "@/config"; - -export default function HomePage() { - return ( -
-
-
-
-

- Scaffold. implement. ship. -

-

- Add components, hooks, themes and much more to your{" "} - React app. -

-
-
-
-
- -
-
- {/* footer */} -
- {`npx dotui@latest init`} -

- Built by{" "} - - mehdibha - - . The source code is available on{" "} - - GitHub - -

-
-
-
-
- ); -} - -const Terminal = ({ - children, - className, -}: { - children: React.ReactNode; - className?: string; -}) => { - return ( -
-
- -
- - {children} - -
- ); -}; +import React from "react"; +import { TerminalSquareIcon } from "lucide-react"; +import { Code } from "@/components/code"; +import { SearchCommand } from "@/components/search-command"; +import { Link } from "@/registry/ui/default/core/link"; +import { cn } from "@/registry/ui/default/lib/cn"; +import { siteConfig } from "@/config"; + +export default function HomePage() { + return ( +
+
+
+
+

+ Scaffold. implement. ship. +

+

+ Add components, hooks, themes and much more to your{" "} + React app. +

+
+
+
+
+ +
+
+ {/* footer */} +
+ {`npx dotui@latest init`} +

+ Built by{" "} + + mehdibha + + . The source code is available on{" "} + + GitHub + +

+
+
+
+
+ ); +} + +const Terminal = ({ + children, + className, +}: { + children: React.ReactNode; + className?: string; +}) => { + return ( +
+
+ +
+ + {children} + +
+ ); +}; diff --git a/www/src/app/providers.tsx b/www/src/app/providers.tsx index 4a11de29..fd072832 100644 --- a/www/src/app/providers.tsx +++ b/www/src/app/providers.tsx @@ -1,26 +1,26 @@ -"use client"; - -import { useRouter } from "next/navigation"; -import { ThemeProvider } from "next-themes"; -import { RouterProvider } from "react-aria-components"; - -declare module "react-aria-components" { - interface RouterConfig { - routerOptions: NonNullable< - Parameters["push"]>[1] - >; - } -} - -export function Providers({ children }: { children: React.ReactNode }) { - const router = useRouter(); - return ( - - -
- {children} -
-
-
- ); -} +"use client"; + +import { useRouter } from "next/navigation"; +import { ThemeProvider } from "next-themes"; +import { RouterProvider } from "react-aria-components"; + +declare module "react-aria-components" { + interface RouterConfig { + routerOptions: NonNullable< + Parameters["push"]>[1] + >; + } +} + +export function Providers({ children }: { children: React.ReactNode }) { + const router = useRouter(); + return ( + + +
+ {children} +
+
+
+ ); +} diff --git a/www/src/app/robots.ts b/www/src/app/robots.ts index be58582f..b6a78ab4 100644 --- a/www/src/app/robots.ts +++ b/www/src/app/robots.ts @@ -1,16 +1,16 @@ -import { MetadataRoute } from "next"; -import { siteConfig } from "@/config/site-config"; - -export default function robots(): MetadataRoute.Robots { - const domain = siteConfig.global.url; - - return { - rules: [ - { - userAgent: "*", - allow: "/", - }, - ], - sitemap: `${domain}/sitemap.xml`, - }; -} +import { MetadataRoute } from "next"; +import { siteConfig } from "@/config/site-config"; + +export default function robots(): MetadataRoute.Robots { + const domain = siteConfig.global.url; + + return { + rules: [ + { + userAgent: "*", + allow: "/", + }, + ], + sitemap: `${domain}/sitemap.xml`, + }; +} diff --git a/www/src/app/sitemap.ts b/www/src/app/sitemap.ts index c45b20e7..08c582f1 100644 --- a/www/src/app/sitemap.ts +++ b/www/src/app/sitemap.ts @@ -1,24 +1,24 @@ -import { MetadataRoute } from "next"; -import { source } from "@/app/source"; -import { siteConfig } from "@/config"; - -export default async function sitemap(): Promise { - const url = (path: string): string => - new URL(path, siteConfig.global.url).toString(); - - return [ - { - url: url("/"), - changeFrequency: "monthly", - priority: 1, - }, - ...source.getPages().map((page) => ({ - url: url(page.url), - lastModified: page.data.lastModified - ? new Date(page.data.lastModified) - : undefined, - changeFrequency: "weekly", - priority: 0.8, - })), - ]; -} +import { MetadataRoute } from "next"; +import { source } from "@/app/source"; +import { siteConfig } from "@/config"; + +export default async function sitemap(): Promise { + const url = (path: string): string => + new URL(path, siteConfig.global.url).toString(); + + return [ + { + url: url("/"), + changeFrequency: "monthly", + priority: 1, + }, + ...source.getPages().map((page) => ({ + url: url(page.url), + lastModified: page.data.lastModified + ? new Date(page.data.lastModified) + : undefined, + changeFrequency: "weekly", + priority: 0.8, + })), + ]; +} diff --git a/www/src/app/source.tsx b/www/src/app/source.tsx index 2839ec9b..0f65d0a0 100644 --- a/www/src/app/source.tsx +++ b/www/src/app/source.tsx @@ -1,16 +1,16 @@ -import { createElement } from "react"; -import { loader } from "fumadocs-core/source"; -import { createMDXSource } from "fumadocs-mdx"; -import { icons } from "lucide-react"; -import { docs, meta } from "~/.source"; - -export const source = loader({ - baseUrl: "/docs", - source: createMDXSource(docs, meta), - icon: (icon) => { - if (!icon) { - return; - } - if (icon in icons) return createElement(icons[icon as keyof typeof icons]); - }, -}); +import { createElement } from "react"; +import { loader } from "fumadocs-core/source"; +import { createMDXSource } from "fumadocs-mdx"; +import { icons } from "lucide-react"; +import { docs, meta } from "~/.source"; + +export const source = loader({ + baseUrl: "/docs", + source: createMDXSource(docs, meta), + icon: (icon) => { + if (!icon) { + return; + } + if (icon in icons) return createElement(icons[icon as keyof typeof icons]); + }, +}); diff --git a/www/src/components/code-block/client.tsx b/www/src/components/code-block/client.tsx index 1a340d80..966a304f 100644 --- a/www/src/components/code-block/client.tsx +++ b/www/src/components/code-block/client.tsx @@ -1,181 +1,181 @@ -"use client"; - -import React from "react"; -import { CheckIcon, CopyIcon } from "lucide-react"; -import type { Key } from "react-aria-components"; -import { tv } from "tailwind-variants"; -import { Button, type ButtonProps } from "@/registry/ui/default/core/button"; -import { - ScrollArea, - type ScrollAreaProps, -} from "@/registry/ui/default/core/scroll-area"; -import { - Tab, - Tabs, - TabList, - TabPanel, - type TabsProps, -} from "@/registry/ui/default/core/tabs"; -import { cn } from "@/registry/ui/default/lib/cn"; - -const codeBlockStyles = tv({ - slots: { - root: "block w-fit max-w-full rounded-md border", - header: - "bg-bg-muted flex h-10 items-center justify-between rounded-t-[inherit] border-b pr-2", - body: "bg-bg p-4 text-xs", - code: "text-xs", - }, -}); - -interface CodeBlockClientProps { - files: { - fileName: string; - code: JSX.Element; - codeStr: string; - lang: string; - }[]; - preview?: JSX.Element; - previewStr?: string; - expandable?: boolean; -} -const CodeBlockClient = ({ - files, - preview, - previewStr, - expandable = false, - ...props -}: CodeBlockClientProps) => { - const [activeTab, setActiveTab] = React.useState(files[0].fileName); - const [isExpanded, setExpanded] = React.useState(false); - const handleExpand = () => { - const prevState = isExpanded; - if (prevState) { - setActiveTab(files[0].fileName); - } - setExpanded(!prevState); - }; - return ( - - -
- {files.length > 0 && ( - - {files - .slice(0, preview && !isExpanded ? 1 : files.length) - .map(({ fileName }, index) => ( - - {fileName} - - ))} - - )} -
-
- {(preview || expandable) && ( - - )} - fileName === activeTab) - ?.codeStr)! - } - /> -
-
- - {preview && !isExpanded ? ( - - {preview} - - ) : ( - files.map(({ fileName, code }, index) => ( - - {code} - - )) - )} - -
- ); -}; - -type CodeBlockRootProps = TabsProps; -const CodeBlockRoot = ({ className, ...props }: CodeBlockRootProps) => { - const { root } = codeBlockStyles(); - return ; -}; - -type CodeBlockHeaderProps = React.HTMLAttributes; -const CodeBlockHeader = ({ className, ...props }: CodeBlockHeaderProps) => { - const { header } = codeBlockStyles(); - return
; -}; - -type CodeBlockBodyProps = ScrollAreaProps; -const CodeBlockBody = ({ className, ...props }: CodeBlockBodyProps) => { - const { body } = codeBlockStyles(); - return ( - - ); -}; - -interface CodeBlockCopyButtonProps extends ButtonProps { - code: string; -} -const CodeBlockCopyButton = ({ code, ...props }: CodeBlockCopyButtonProps) => { - const [copied, setCopied] = React.useState(false); - const handleCopy = () => { - void navigator.clipboard.writeText(code); - setCopied(true); - setTimeout(() => setCopied(false), 1000); - }; - return ( - - ); -}; - -export type { - CodeBlockClientProps, - CodeBlockRootProps, - CodeBlockHeaderProps, - CodeBlockBodyProps, - CodeBlockCopyButtonProps, -}; - -export { - CodeBlockClient, - CodeBlockRoot, - CodeBlockHeader, - CodeBlockBody, - CodeBlockCopyButton, - codeBlockStyles, -}; +"use client"; + +import React, { type JSX } from "react"; +import { CheckIcon, CopyIcon } from "lucide-react"; +import type { Key } from "react-aria-components"; +import { tv } from "tailwind-variants"; +import { Button, type ButtonProps } from "@/registry/ui/default/core/button"; +import { + ScrollArea, + type ScrollAreaProps, +} from "@/registry/ui/default/core/scroll-area"; +import { + Tab, + Tabs, + TabList, + TabPanel, + type TabsProps, +} from "@/registry/ui/default/core/tabs"; +import { cn } from "@/registry/ui/default/lib/cn"; + +const codeBlockStyles = tv({ + slots: { + root: "block w-fit max-w-full rounded-md border", + header: + "bg-bg-muted flex h-10 items-center justify-between rounded-t-[inherit] border-b pr-2", + body: "bg-bg p-4 text-xs", + code: "text-xs", + }, +}); + +interface CodeBlockClientProps { + files: { + fileName: string; + code: JSX.Element; + codeStr: string; + lang: string; + }[]; + preview?: JSX.Element; + previewStr?: string; + expandable?: boolean; +} +const CodeBlockClient = ({ + files, + preview, + previewStr, + expandable = false, + ...props +}: CodeBlockClientProps) => { + const [activeTab, setActiveTab] = React.useState(files[0].fileName); + const [isExpanded, setExpanded] = React.useState(false); + const handleExpand = () => { + const prevState = isExpanded; + if (prevState) { + setActiveTab(files[0].fileName); + } + setExpanded(!prevState); + }; + return ( + + +
+ {files.length > 0 && ( + + {files + .slice(0, preview && !isExpanded ? 1 : files.length) + .map(({ fileName }, index) => ( + + {fileName} + + ))} + + )} +
+
+ {(preview || expandable) && ( + + )} + fileName === activeTab) + ?.codeStr)! + } + /> +
+
+ + {preview && !isExpanded ? ( + + {preview} + + ) : ( + files.map(({ fileName, code }, index) => ( + + {code} + + )) + )} + +
+ ); +}; + +type CodeBlockRootProps = TabsProps; +const CodeBlockRoot = ({ className, ...props }: CodeBlockRootProps) => { + const { root } = codeBlockStyles(); + return ; +}; + +type CodeBlockHeaderProps = React.HTMLAttributes; +const CodeBlockHeader = ({ className, ...props }: CodeBlockHeaderProps) => { + const { header } = codeBlockStyles(); + return
; +}; + +type CodeBlockBodyProps = ScrollAreaProps; +const CodeBlockBody = ({ className, ...props }: CodeBlockBodyProps) => { + const { body } = codeBlockStyles(); + return ( + + ); +}; + +interface CodeBlockCopyButtonProps extends ButtonProps { + code: string; +} +const CodeBlockCopyButton = ({ code, ...props }: CodeBlockCopyButtonProps) => { + const [copied, setCopied] = React.useState(false); + const handleCopy = () => { + void navigator.clipboard.writeText(code); + setCopied(true); + setTimeout(() => setCopied(false), 1000); + }; + return ( + + ); +}; + +export type { + CodeBlockClientProps, + CodeBlockRootProps, + CodeBlockHeaderProps, + CodeBlockBodyProps, + CodeBlockCopyButtonProps, +}; + +export { + CodeBlockClient, + CodeBlockRoot, + CodeBlockHeader, + CodeBlockBody, + CodeBlockCopyButton, + codeBlockStyles, +}; diff --git a/www/src/components/code-block/code-block.tsx b/www/src/components/code-block/code-block.tsx index 9fb1812c..7f21b94d 100644 --- a/www/src/components/code-block/code-block.tsx +++ b/www/src/components/code-block/code-block.tsx @@ -1,70 +1,70 @@ -import { codeToHtml } from "shiki"; -import type { BundledLanguage } from "shiki"; -import { CodeBlockClient, type CodeBlockRootProps } from "./client"; - -interface CodeBlockProps extends CodeBlockRootProps { - files: { - fileName: string; - code: string; - lang: BundledLanguage; - }[]; - preview?: string; - expandable?: boolean; -} - -const CodeBlock = async ({ - files: _files, - preview: _preview, - ...props -}: CodeBlockProps) => { - let preview = undefined; - if (_preview) { - const html = await codeToHtml(_preview, { - lang: "tsx", - themes: { - light: "github-light", - dark: "github-dark-dimmed", - }, - }); - preview = ( -
- ); - } - const files = await Promise.all( - _files.map(async ({ fileName, code, lang }) => { - const html = await codeToHtml(code, { - lang: lang, - themes: { - light: "light-plus", - dark: "github-dark-dimmed", - }, - }); - - return { - fileName, - codeStr: code, - code: ( -
- ), - lang, - }; - }) - ); - - return ( - - ); -}; - -export { CodeBlock }; +import { codeToHtml } from "shiki"; +import type { BundledLanguage } from "shiki"; +import { CodeBlockClient, type CodeBlockRootProps } from "./client"; + +interface CodeBlockProps extends CodeBlockRootProps { + files: { + fileName: string; + code: string; + lang: BundledLanguage; + }[]; + preview?: string; + expandable?: boolean; +} + +const CodeBlock = async ({ + files: _files, + preview: _preview, + ...props +}: CodeBlockProps) => { + let preview = undefined; + if (_preview) { + const html = await codeToHtml(_preview, { + lang: "tsx", + themes: { + light: "github-light", + dark: "github-dark-dimmed", + }, + }); + preview = ( +
+ ); + } + const files = await Promise.all( + _files.map(async ({ fileName, code, lang }) => { + const html = await codeToHtml(code, { + lang: lang, + themes: { + light: "light-plus", + dark: "github-dark-dimmed", + }, + }); + + return { + fileName, + codeStr: code, + code: ( +
+ ), + lang, + }; + }) + ); + + return ( + + ); +}; + +export { CodeBlock }; diff --git a/www/src/components/code-block/index.ts b/www/src/components/code-block/index.ts index 0358c1f7..c5239aaf 100644 --- a/www/src/components/code-block/index.ts +++ b/www/src/components/code-block/index.ts @@ -1,4 +1,4 @@ -import { codeBlockStyles } from "./client"; -import { CodeBlock } from "./code-block"; - -export { CodeBlock, codeBlockStyles }; +import { codeBlockStyles } from "./client"; +import { CodeBlock } from "./code-block"; + +export { CodeBlock, codeBlockStyles }; diff --git a/www/src/components/code/code-client.tsx b/www/src/components/code/code-client.tsx index a003f3d1..8c2ab6f5 100644 --- a/www/src/components/code/code-client.tsx +++ b/www/src/components/code/code-client.tsx @@ -1,66 +1,66 @@ -"use client"; - -import React from "react"; -import { CheckIcon, CopyIcon } from "lucide-react"; -import { tv } from "tailwind-variants"; -import { Button } from "@/registry/ui/default/core/button"; -import { ScrollArea } from "@/registry/ui/default/core/scroll-area"; - -const codeStyles = tv({ - base: "bg-bg-muted relative rounded-md", - variants: { - variant: { - classic: "p-4 text-xs", - inline: "px-2 py-0.5", - }, - }, -}); - -interface CodeClientProps extends React.HTMLAttributes { - inline?: boolean; - code: string; -} -const CodeClient = ({ - className, - inline = false, - children, - code, -}: CodeClientProps) => { - const [copied, setCopied] = React.useState(false); - const handleCopy = () => { - void navigator.clipboard.writeText(code); - setCopied(true); - setTimeout(() => { - setCopied(false); - }, 1000); - }; - - if (inline) { - return ( - {children} - ); - } - - return ( -
- - {children} - - -
- ); -}; - -export { CodeClient }; +"use client"; + +import React from "react"; +import { CheckIcon, CopyIcon } from "lucide-react"; +import { tv } from "tailwind-variants"; +import { Button } from "@/registry/ui/default/core/button"; +import { ScrollArea } from "@/registry/ui/default/core/scroll-area"; + +const codeStyles = tv({ + base: "bg-bg-muted relative rounded-md", + variants: { + variant: { + classic: "p-4 text-xs", + inline: "px-2 py-0.5", + }, + }, +}); + +interface CodeClientProps extends React.HTMLAttributes { + inline?: boolean; + code: string; +} +const CodeClient = ({ + className, + inline = false, + children, + code, +}: CodeClientProps) => { + const [copied, setCopied] = React.useState(false); + const handleCopy = () => { + void navigator.clipboard.writeText(code); + setCopied(true); + setTimeout(() => { + setCopied(false); + }, 1000); + }; + + if (inline) { + return ( + {children} + ); + } + + return ( +
+ + {children} + + +
+ ); +}; + +export { CodeClient }; diff --git a/www/src/components/code/code.tsx b/www/src/components/code/code.tsx index f6df84fd..1fb3bbc1 100644 --- a/www/src/components/code/code.tsx +++ b/www/src/components/code/code.tsx @@ -1,113 +1,113 @@ -import React from "react"; -import { codeToHtml } from "shiki"; -import { CodeClient } from "./code-client"; - -interface CodeProps { - className?: string; - children?: React.ReactNode; - code?: string; - lang?: string; - inline?: boolean; - colorReplacements?: Record; -} - -const Code = async ({ - children, - inline, - lang: _lang, - colorReplacements, - ...props -}: CodeProps) => { - const { code: codeStr, lang } = parseChildren(children as CodeText, _lang); - const html = await codeToHtml(codeStr, { - lang: lang, - themes: { - light: "github-light", - dark: "github-dark-dimmed", - }, - colorReplacements, - structure: inline ? "inline" : "classic", - }); - const ElementType = inline ? "span" : "div"; - const code = ( - - ); - - return ( - - {code} - - ); -}; - -type MdCodeText = { - type: "code"; - props: { className?: string; children: string }; -}; - -type MdMultiCodeText = { - type: Function; - props: { - children: MdCodeText[]; - }; -}; - -type CodeText = string | MdCodeText | MdMultiCodeText; - -function parseChildren( - children: CodeText, - lang?: string, - code?: string -): { lang: string; code: string; title?: string } { - if (typeof children === "string" || code) { - return { - code: (children as string) || code || "", - lang: lang || "text", - }; - } - - if ( - typeof children === "object" && - typeof children?.props?.children === "string" - ) { - return { - code: children.props?.children, - ...getLanguageAndTitle((children as MdCodeText).props?.className), - }; - } - - if (typeof children === "object") { - const files = React.Children.toArray(children as any).map((file: any) => { - const code = file.props?.children; - const className = file.props?.className; - return { - code: code as string, - ...getLanguageAndTitle(className as string), - }; - }); - return files[0]; - } - - return { - code: (children as string) || code || "", - lang: lang || "text", - }; -} - -function getLanguageAndTitle(className: string | undefined) { - if (!className) { - return { lang: "text" }; - } - const metastring = className.replace("language-", ""); - const lang = metastring.split(".").pop()!; - - if (lang !== metastring) { - return { lang, title: metastring }; - } - return { lang }; -} - -export { Code }; +import React from "react"; +import { codeToHtml } from "shiki"; +import { CodeClient } from "./code-client"; + +interface CodeProps { + className?: string; + children?: React.ReactNode; + code?: string; + lang?: string; + inline?: boolean; + colorReplacements?: Record; +} + +const Code = async ({ + children, + inline, + lang: _lang, + colorReplacements, + ...props +}: CodeProps) => { + const { code: codeStr, lang } = parseChildren(children as CodeText, _lang); + const html = await codeToHtml(codeStr, { + lang: lang, + themes: { + light: "github-light", + dark: "github-dark-dimmed", + }, + colorReplacements, + structure: inline ? "inline" : "classic", + }); + const ElementType = inline ? "span" : "div"; + const code = ( + + ); + + return ( + + {code} + + ); +}; + +type MdCodeText = { + type: "code"; + props: { className?: string; children: string }; +}; + +type MdMultiCodeText = { + type: Function; + props: { + children: MdCodeText[]; + }; +}; + +type CodeText = string | MdCodeText | MdMultiCodeText; + +function parseChildren( + children: CodeText, + lang?: string, + code?: string +): { lang: string; code: string; title?: string } { + if (typeof children === "string" || code) { + return { + code: (children as string) || code || "", + lang: lang || "text", + }; + } + + if ( + typeof children === "object" && + typeof children?.props?.children === "string" + ) { + return { + code: children.props?.children, + ...getLanguageAndTitle((children as MdCodeText).props?.className), + }; + } + + if (typeof children === "object") { + const files = React.Children.toArray(children as any).map((file: any) => { + const code = file.props?.children; + const className = file.props?.className; + return { + code: code as string, + ...getLanguageAndTitle(className as string), + }; + }); + return files[0]; + } + + return { + code: (children as string) || code || "", + lang: lang || "text", + }; +} + +function getLanguageAndTitle(className: string | undefined) { + if (!className) { + return { lang: "text" }; + } + const metastring = className.replace("language-", ""); + const lang = metastring.split(".").pop()!; + + if (lang !== metastring) { + return { lang, title: metastring }; + } + return { lang }; +} + +export { Code }; diff --git a/www/src/components/code/index.tsx b/www/src/components/code/index.tsx index 2ff47715..544f28ed 100644 --- a/www/src/components/code/index.tsx +++ b/www/src/components/code/index.tsx @@ -1 +1 @@ -export { Code } from "./code"; +export { Code } from "./code"; diff --git a/www/src/components/docs-pager.tsx b/www/src/components/docs-pager.tsx index 62c62da7..7359b5ef 100644 --- a/www/src/components/docs-pager.tsx +++ b/www/src/components/docs-pager.tsx @@ -1,37 +1,37 @@ -import { findNeighbour } from "fumadocs-core/server"; -import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react"; -import { Button } from "@/registry/ui/default/core/button"; -import { source } from "@/app/source"; - -export const DocsPager = ({ currentPathname }: { currentPathname: string }) => { - const { previous, next } = findNeighbour(source.pageTree, currentPathname); - - return ( -
- {previous ? ( - - ) : ( -
- )} - {next ? ( - - ) : ( -
- )} -
- ); -}; +import { findNeighbour } from "fumadocs-core/server"; +import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react"; +import { Button } from "@/registry/ui/default/core/button"; +import { source } from "@/app/source"; + +export const DocsPager = ({ currentPathname }: { currentPathname: string }) => { + const { previous, next } = findNeighbour(source.pageTree, currentPathname); + + return ( +
+ {previous ? ( + + ) : ( +
+ )} + {next ? ( + + ) : ( +
+ )} +
+ ); +}; diff --git a/www/src/components/footer.tsx b/www/src/components/footer.tsx index 16c0b785..51bd750b 100644 --- a/www/src/components/footer.tsx +++ b/www/src/components/footer.tsx @@ -1,154 +1,154 @@ -import React from "react"; -import NavLink from "next/link"; -import Link from "next/link"; -import { GitHubIcon, TwitterIcon } from "@/components/icons"; -import { Avatar } from "@/registry/ui/default/core/avatar"; -import { Badge } from "@/registry/ui/default/core/badge"; -import { Separator } from "@/registry/ui/default/core/separator"; -import { cn } from "@/registry/ui/default/lib/cn"; -import { focusRing } from "@/registry/ui/default/lib/focus-styles"; -import { siteConfig } from "@/config"; - -const links = [ - { - label: "Product", - links: [ - { - label: "Docs", - href: "/docs/installation", - }, - { - label: "Components", - href: "/components", - }, - { - label: "Hooks", - href: "/hooks", - }, - ], - }, - { - label: "Community", - links: [ - { - label: "GitHub", - href: siteConfig.links.github, - }, - { - label: "Discord", - href: siteConfig.links.discord, - }, - ], - }, - { - label: "Support", - links: [ - { - label: "Open an issue", - href: "https://github.com/mehdibha/dotUI/issues/new", - }, - { - label: "Request a feature", - href: "https://github.com/mehdibha/dotUI/discussions/new?category=ideas", - }, - { - label: "Request an element", - href: "https://github.com/mehdibha/dotUI/discussions/new?category=requests", - }, - ], - }, -]; - -const socialLinks = [ - { icon: TwitterIcon, href: siteConfig.links.twitter, label: "Twitter" }, - { icon: GitHubIcon, href: siteConfig.links.github, label: "GitHub" }, -]; - -export const Footer = () => { - return ( -
-
-
-
- - -
- {siteConfig.global.name} -
- - beta - -
-

- {siteConfig.global.description} -

-
- {socialLinks.map((Link, index) => ( - - - {Link.label} - - ))} -
-
-
- {links.map((group, index) => ( -
-

{group.label}

-
    - {group.links.map((link, index) => ( -
  • - - {link.label} - -
  • - ))} -
-
- ))} -
-
- -

- Built by{" "} - - mehdibha - - . The source code is available on{" "} - - GitHub. - -

-
-
- ); -}; +import React from "react"; +import NavLink from "next/link"; +import Link from "next/link"; +import { GitHubIcon, TwitterIcon } from "@/components/icons"; +import { Avatar } from "@/registry/ui/default/core/avatar"; +import { Badge } from "@/registry/ui/default/core/badge"; +import { Separator } from "@/registry/ui/default/core/separator"; +import { cn } from "@/registry/ui/default/lib/cn"; +import { focusRing } from "@/registry/ui/default/lib/focus-styles"; +import { siteConfig } from "@/config"; + +const links = [ + { + label: "Product", + links: [ + { + label: "Docs", + href: "/docs/installation", + }, + { + label: "Components", + href: "/components", + }, + { + label: "Hooks", + href: "/hooks", + }, + ], + }, + { + label: "Community", + links: [ + { + label: "GitHub", + href: siteConfig.links.github, + }, + { + label: "Discord", + href: siteConfig.links.discord, + }, + ], + }, + { + label: "Support", + links: [ + { + label: "Open an issue", + href: "https://github.com/mehdibha/dotUI/issues/new", + }, + { + label: "Request a feature", + href: "https://github.com/mehdibha/dotUI/discussions/new?category=ideas", + }, + { + label: "Request an element", + href: "https://github.com/mehdibha/dotUI/discussions/new?category=requests", + }, + ], + }, +]; + +const socialLinks = [ + { icon: TwitterIcon, href: siteConfig.links.twitter, label: "Twitter" }, + { icon: GitHubIcon, href: siteConfig.links.github, label: "GitHub" }, +]; + +export const Footer = () => { + return ( +
+
+
+
+ + +
+ {siteConfig.global.name} +
+ + beta + +
+

+ {siteConfig.global.description} +

+
+ {socialLinks.map((Link, index) => ( + + + {Link.label} + + ))} +
+
+
+ {links.map((group, index) => ( +
+

{group.label}

+
    + {group.links.map((link, index) => ( +
  • + + {link.label} + +
  • + ))} +
+
+ ))} +
+
+ +

+ Built by{" "} + + mehdibha + + . The source code is available on{" "} + + GitHub. + +

+
+
+ ); +}; diff --git a/www/src/components/icons/discord-icon.tsx b/www/src/components/icons/discord-icon.tsx index 4a5a5eb1..c02ea6bd 100644 --- a/www/src/components/icons/discord-icon.tsx +++ b/www/src/components/icons/discord-icon.tsx @@ -1,24 +1,24 @@ -import { type SVGProps } from "react"; - -interface IconProps extends Partial> { - size?: string | number; -} - -export const DiscordIcon = ({ - color = "currentColor", - size = 24, - ...rest -}: IconProps) => { - return ( - - - - ); -}; +import { type SVGProps } from "react"; + +interface IconProps extends Partial> { + size?: string | number; +} + +export const DiscordIcon = ({ + color = "currentColor", + size = 24, + ...rest +}: IconProps) => { + return ( + + + + ); +}; diff --git a/www/src/components/icons/github-icon.tsx b/www/src/components/icons/github-icon.tsx index a3d97a70..85e43ca3 100644 --- a/www/src/components/icons/github-icon.tsx +++ b/www/src/components/icons/github-icon.tsx @@ -1,24 +1,24 @@ -import { type SVGProps } from "react"; - -interface IconProps extends Partial> { - size?: string | number; -} - -export const GitHubIcon = ({ - color = "currentColor", - size = 24, - ...rest -}: IconProps) => { - return ( - - - - ); -}; +import { type SVGProps } from "react"; + +interface IconProps extends Partial> { + size?: string | number; +} + +export const GitHubIcon = ({ + color = "currentColor", + size = 24, + ...rest +}: IconProps) => { + return ( + + + + ); +}; diff --git a/www/src/components/icons/index.ts b/www/src/components/icons/index.ts index 0fb7f2bd..c2d793d5 100644 --- a/www/src/components/icons/index.ts +++ b/www/src/components/icons/index.ts @@ -1,3 +1,3 @@ -export { GitHubIcon } from "./github-icon"; -export { TwitterIcon } from "./twitter-icon"; -export { DiscordIcon } from "./discord-icon"; +export { GitHubIcon } from "./github-icon"; +export { TwitterIcon } from "./twitter-icon"; +export { DiscordIcon } from "./discord-icon"; diff --git a/www/src/components/icons/twitter-icon.tsx b/www/src/components/icons/twitter-icon.tsx index 17b2abaf..b3ec25db 100644 --- a/www/src/components/icons/twitter-icon.tsx +++ b/www/src/components/icons/twitter-icon.tsx @@ -1,24 +1,24 @@ -import { type SVGProps } from "react"; - -interface IconProps extends Partial> { - size?: string | number; -} - -export const TwitterIcon = ({ - color = "currentColor", - size = 24, - ...rest -}: IconProps) => { - return ( - - - - ); -}; +import { type SVGProps } from "react"; + +interface IconProps extends Partial> { + size?: string | number; +} + +export const TwitterIcon = ({ + color = "currentColor", + size = 24, + ...rest +}: IconProps) => { + return ( + + + + ); +}; diff --git a/www/src/components/mdx/component-preview-client.tsx b/www/src/components/mdx/component-preview-client.tsx index e6cb2934..57123c1e 100644 --- a/www/src/components/mdx/component-preview-client.tsx +++ b/www/src/components/mdx/component-preview-client.tsx @@ -1,16 +1,16 @@ -"use client"; - -import { useConfig } from "@/hooks/use-config"; -import { styles } from "@/registry/styles"; - -export const ComponentPreviewClient = ({ - demos, -}: { - demos: React.ReactNode[]; -}) => { - const config = useConfig(); - const currentStyleIndex = styles.findIndex( - (style) => style.name === config.style - ); - return demos[currentStyleIndex]; -}; +"use client"; + +import { useConfig } from "@/hooks/use-config"; +import { styles } from "@/registry/styles"; + +export const ComponentPreviewClient = ({ + demos, +}: { + demos: React.ReactNode[]; +}) => { + const config = useConfig(); + const currentStyleIndex = styles.findIndex( + (style) => style.name === config.style + ); + return demos[currentStyleIndex]; +}; diff --git a/www/src/components/mdx/component-preview.tsx b/www/src/components/mdx/component-preview.tsx index 0bc4b436..85428c9e 100644 --- a/www/src/components/mdx/component-preview.tsx +++ b/www/src/components/mdx/component-preview.tsx @@ -1,101 +1,101 @@ -import React from "react"; -import { ScrollArea } from "@radix-ui/react-scroll-area"; -import { getFileSource } from "@/lib/get-file-source"; -import { CodeBlock } from "@/components/code-block"; -import { styles } from "@/registry/styles"; -import { cn } from "@/registry/ui/default/lib/cn"; -import { Index } from "@/__demos__"; -import { ComponentPreviewClient } from "./component-preview-client"; - -export interface ComponentPreviewProps { - name: string; - containerClassName?: string; - className?: string; - preview?: string; - expandable?: boolean; -} - -export const ComponentPreview = async ({ - name, - containerClassName, - className, - preview, - expandable, -}: ComponentPreviewProps) => { - const type = name.split("/")[0]; - const componentName = name.split("/")[1]; - - if (type === "core") { - const demos: { - component: React.ComponentType; - code: Array<{ - fileName: string; - code: string; - }>; - }[] = styles.map((style) => { - const demo = Index["core"][style.name][componentName]; - return { - component: demo.component, - code: demo.files.map((file: string) => { - const { fileName, content } = getFileSource(file); - return { - fileName, - code: content, - }; - }), - }; - }); - - return ( -
-
- -
-
- { - const Comp = elem.component; - return ; - })} - /> -
-
-
-
- { - return ( - ({ - fileName: file.fileName, - code: file.code, - lang: "tsx", - }))} - preview={preview} - className={"w-full rounded-t-none border-x-0 border-b-0"} - expandable={expandable} - /> - ); - })} - /> -
- ); - } - - // TODO: handle other component types - return ( -

Component type {type} not handled.

- ); -}; +import React from "react"; +import { ScrollArea } from "@radix-ui/react-scroll-area"; +import { getFileSource } from "@/lib/get-file-source"; +import { CodeBlock } from "@/components/code-block"; +import { styles } from "@/registry/styles"; +import { cn } from "@/registry/ui/default/lib/cn"; +import { Index } from "@/__demos__"; +import { ComponentPreviewClient } from "./component-preview-client"; + +export interface ComponentPreviewProps { + name: string; + containerClassName?: string; + className?: string; + preview?: string; + expandable?: boolean; +} + +export const ComponentPreview = async ({ + name, + containerClassName, + className, + preview, + expandable, +}: ComponentPreviewProps) => { + const type = name.split("/")[0]; + const componentName = name.split("/")[1]; + + if (type === "core") { + const demos: { + component: React.ComponentType; + code: Array<{ + fileName: string; + code: string; + }>; + }[] = styles.map((style) => { + const demo = Index["core"][style.name][componentName]; + return { + component: demo.component, + code: demo.files.map((file: string) => { + const { fileName, content } = getFileSource(file); + return { + fileName, + code: content, + }; + }), + }; + }); + + return ( +
+
+ +
+
+ { + const Comp = elem.component; + return ; + })} + /> +
+
+
+
+ { + return ( + ({ + fileName: file.fileName, + code: file.code, + lang: "tsx", + }))} + preview={preview} + className={"w-full rounded-t-none border-x-0 border-b-0"} + expandable={expandable} + /> + ); + })} + /> +
+ ); + } + + // TODO: handle other component types + return ( +

Component type {type} not handled.

+ ); +}; diff --git a/www/src/components/mdx/component-source.tsx b/www/src/components/mdx/component-source.tsx index 9036455b..eec685d8 100644 --- a/www/src/components/mdx/component-source.tsx +++ b/www/src/components/mdx/component-source.tsx @@ -1,42 +1,42 @@ -import { getFilesSource } from "@/lib/get-files-source"; -import { CodeBlock } from "@/components/code-block"; - -export const ComponentSource = async ({ - name, - className, -}: { - name: string | string[]; - className?: string; -}) => { - let code: { title: string; code: string }[] = []; - - if (typeof name === "string") { - code = await getFilesSource(name); - } - - if (Array.isArray(name)) { - for (const n of name) { - code.push(...(await getFilesSource(n))); - } - } - - if (code.length === 0) { - return

Source code not found

; - } - - code = code.map((file) => ({ - ...file, - })); - - return ( - ({ - fileName: file.title, - code: file.code, - lang: "tsx", - }))} - className={className} - expandable - /> - ); -}; +import { getFilesSource } from "@/lib/get-files-source"; +import { CodeBlock } from "@/components/code-block"; + +export const ComponentSource = async ({ + name, + className, +}: { + name: string | string[]; + className?: string; +}) => { + let code: { title: string; code: string }[] = []; + + if (typeof name === "string") { + code = await getFilesSource(name); + } + + if (Array.isArray(name)) { + for (const n of name) { + code.push(...(await getFilesSource(n))); + } + } + + if (code.length === 0) { + return

Source code not found

; + } + + code = code.map((file) => ({ + ...file, + })); + + return ( + ({ + fileName: file.title, + code: file.code, + lang: "tsx", + }))} + className={className} + expandable + /> + ); +}; diff --git a/www/src/components/mdx/mdx-components.tsx b/www/src/components/mdx/mdx-components.tsx index aa211fff..6c591475 100644 --- a/www/src/components/mdx/mdx-components.tsx +++ b/www/src/components/mdx/mdx-components.tsx @@ -1,194 +1,194 @@ -import React from "react"; -import NavLink from "next/link"; -import { MDXComponents } from "mdx/types"; -import { Alert, AlertProps } from "@/registry/ui/default/core/alert"; -import { cn } from "@/registry/ui/default/lib/cn"; -import { Pre } from "./code-block"; -import { - ComponentPreview, - type ComponentPreviewProps, -} from "./component-preview"; -import { ComponentSource } from "./component-source"; -import { InstallTab, InstallTabs } from "./install-tabs"; -import { Tabs, Tab, type TabsProps } from "./tabs"; - -export const mdxComponents: MDXComponents = { - h1: createHeading(1, "font-heading mt-2 scroll-m-20 text-4xl font-bold"), - h2: createHeading( - 2, - "font-heading mt-12 scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0" - ), - h3: createHeading( - 3, - "font-heading mt-8 scroll-m-20 text-xl font-semibold tracking-tight" - ), - h4: createHeading( - 4, - "font-heading mt-8 scroll-m-20 text-lg font-semibold tracking-tight" - ), - h5: createHeading(5, "mt-8 scroll-m-20 text-lg font-semibold tracking-tight"), - h6: createHeading( - 6, - "mt-8 scroll-m-20 text-base font-semibold tracking-tight" - ), - a: Link, - p: ({ className, ...props }) => ( -

- ), - ul: ({ className, ...props }) => ( -

    - ), - ol: ({ className, ...props }) => ( -
      - ), - li: ({ className, ...props }) => ( -
    1. - ), - blockquote: ({ className, ...props }) => ( -
      *]:text-fg-muted mt-6 border-l-2 pl-6 italic", - className - )} - {...props} - /> - ), - img: ({ className, alt, ...props }) => ( - {alt} - ), - hr: ({ ...props }) =>
      , - table: ({ className, ...props }) => ( -
      - - - ), - thead: ({ className, ...props }) => ( - - ), - tr: ({ className, ...props }) => ( - - ), - th: ({ className, ...props }) => ( - - ), - // add mt-4 to all pre except when it has a parent with class install-tabs - pre: ({ className, ...props }: React.HTMLAttributes) => ( -
      -  ),
      -  code: ({ className, ...props }: React.HTMLAttributes) => (
      -    
      -      {props.children}
      -    
      -  ),
      -  Tab,
      -  Tabs: (props: TabsProps) => (
      -    
      -  ),
      -  InstallTab,
      -  InstallTabs,
      -  ComponentSource: ({ name, ...rest }: { name: string }) => (
      -    
      -  ),
      -  ComponentPreview: (props: ComponentPreviewProps) => (
      -    
      -  ),
      -  Step: ({ className, ...props }: React.ComponentProps<"h3">) => (
      -    

      - ), - Steps: ({ ...props }: React.ComponentProps<"div">) => ( -
      - ), - Alert: ({ className, ...props }: AlertProps) => ( - - ), -}; - -function createHeading(level: number, className?: string) { - const Component = ({ - children, - ...props - }: React.HTMLAttributes) => { - return React.createElement(`h${level}`, { className, ...props }, children); - }; - Component.displayName = `Heading${level}`; - return Component; -} - -function Link({ - className, - href, - ref: _, - children, - ...props -}: React.ComponentProps<"a">) { - const classes = cn("font-medium underline underline-offset-4", className); - - if (!!href?.startsWith("/")) { - return ( - - {children} - - ); - } - - return ( - - {children} - - ); -} +import React from "react"; +import NavLink from "next/link"; +import { MDXComponents } from "mdx/types"; +import { Alert, AlertProps } from "@/registry/ui/default/core/alert"; +import { cn } from "@/registry/ui/default/lib/cn"; +import { Pre } from "./code-block"; +import { + ComponentPreview, + type ComponentPreviewProps, +} from "./component-preview"; +import { ComponentSource } from "./component-source"; +import { InstallTab, InstallTabs } from "./install-tabs"; +import { Tabs, Tab, type TabsProps } from "./tabs"; + +export const mdxComponents: MDXComponents = { + h1: createHeading(1, "font-heading mt-2 scroll-m-20 text-4xl font-bold"), + h2: createHeading( + 2, + "font-heading mt-12 scroll-m-20 border-b pb-2 text-2xl font-semibold tracking-tight first:mt-0" + ), + h3: createHeading( + 3, + "font-heading mt-8 scroll-m-20 text-xl font-semibold tracking-tight" + ), + h4: createHeading( + 4, + "font-heading mt-8 scroll-m-20 text-lg font-semibold tracking-tight" + ), + h5: createHeading(5, "mt-8 scroll-m-20 text-lg font-semibold tracking-tight"), + h6: createHeading( + 6, + "mt-8 scroll-m-20 text-base font-semibold tracking-tight" + ), + a: Link, + p: ({ className, ...props }) => ( +

      + ), + ul: ({ className, ...props }) => ( +

        + ), + ol: ({ className, ...props }) => ( +
          + ), + li: ({ className, ...props }) => ( +
        1. + ), + blockquote: ({ className, ...props }) => ( +
          *]:text-fg-muted mt-6 border-l-2 pl-6 italic", + className + )} + {...props} + /> + ), + img: ({ className, alt, ...props }) => ( + {alt} + ), + hr: ({ ...props }) =>
          , + table: ({ className, ...props }) => ( +
          +

      - ), - td: ({ className, children, ...props }) => ( - -
      {children}
      -
      + + ), + thead: ({ className, ...props }) => ( + + ), + tr: ({ className, ...props }) => ( + + ), + th: ({ className, ...props }) => ( + + ), + // add mt-4 to all pre except when it has a parent with class install-tabs + pre: ({ className, ...props }: React.HTMLAttributes) => ( +
      +  ),
      +  code: ({ className, ...props }: React.HTMLAttributes) => (
      +    
      +      {props.children}
      +    
      +  ),
      +  Tab,
      +  Tabs: (props: TabsProps) => (
      +    
      +  ),
      +  InstallTab,
      +  InstallTabs,
      +  ComponentSource: ({ name, ...rest }: { name: string }) => (
      +    
      +  ),
      +  ComponentPreview: (props: ComponentPreviewProps) => (
      +    
      +  ),
      +  Step: ({ className, ...props }: React.ComponentProps<"h3">) => (
      +    

      + ), + Steps: ({ ...props }: React.ComponentProps<"div">) => ( +
      + ), + Alert: ({ className, ...props }: AlertProps) => ( + + ), +}; + +function createHeading(level: number, className?: string) { + const Component = ({ + children, + ...props + }: React.HTMLAttributes) => { + return React.createElement(`h${level}`, { className, ...props }, children); + }; + Component.displayName = `Heading${level}`; + return Component; +} + +function Link({ + className, + href, + ref: _, + children, + ...props +}: React.ComponentProps<"a">) { + const classes = cn("font-medium underline underline-offset-4", className); + + if (!!href?.startsWith("/")) { + return ( + + {children} + + ); + } + + return ( + + {children} + + ); +} diff --git a/www/src/components/theme-toggle.tsx b/www/src/components/theme-toggle.tsx index cb3edee2..99f21ee9 100644 --- a/www/src/components/theme-toggle.tsx +++ b/www/src/components/theme-toggle.tsx @@ -1,38 +1,38 @@ -"use client"; - -import React from "react"; -import { MoonIcon, SunIcon } from "lucide-react"; -import { useTheme } from "next-themes"; -import { Button } from "@/registry/ui/default/core/button"; -import { Item, ListBox } from "@/registry/ui/default/core/list-box"; -import { Overlay } from "@/registry/ui/default/core/overlay"; -import { SelectRoot } from "@/registry/ui/default/core/select"; - -export const ThemeToggle = () => { - const { theme, setTheme } = useTheme(); - - return ( - setTheme(key as string)} - aria-label="Change Theme" - > - - - - System - Light - Dark - - - - ); -}; +"use client"; + +import React from "react"; +import { MoonIcon, SunIcon } from "lucide-react"; +import { useTheme } from "next-themes"; +import { Button } from "@/registry/ui/default/core/button"; +import { Item, ListBox } from "@/registry/ui/default/core/list-box"; +import { Overlay } from "@/registry/ui/default/core/overlay"; +import { SelectRoot } from "@/registry/ui/default/core/select"; + +export const ThemeToggle = () => { + const { theme, setTheme } = useTheme(); + + return ( + setTheme(key as string)} + aria-label="Change Theme" + > + + + + System + Light + Dark + + + + ); +}; diff --git a/www/src/components/toc.tsx b/www/src/components/toc.tsx index 789d63dd..bc893843 100644 --- a/www/src/components/toc.tsx +++ b/www/src/components/toc.tsx @@ -1,68 +1,68 @@ -"use client"; - -import React from "react"; -import { - type TOCItemType, - type TableOfContents as TocType, -} from "fumadocs-core/server"; -import * as TocPrimitive from "fumadocs-core/toc"; -import { useTocThumb } from "@/hooks/use-toc-thumb"; -import { ScrollArea } from "@/registry/ui/default/core/scroll-area"; -import { cn } from "@/registry/ui/default/lib/cn"; - -export const TableOfContents = ({ toc }: { toc: TocType }) => { - if (toc.length === 0) return null; - - return ( - - - - - - ); -}; - -const TocItems = ({ toc }: { toc: TocType }) => { - const containerRef = React.useRef(null); - const viewportRef = React.useRef(null); - const pos = useTocThumb(containerRef); - - return ( - -
      -
      -
      - {toc.map((item) => ( - - ))} -
      -
      - - ); -}; - -function TOCItem({ item }: { item: TOCItemType }): React.ReactElement { - return ( - = 4 && "ps-12" - )} - > - {item.title} - - ); -} +"use client"; + +import React from "react"; +import { + type TOCItemType, + type TableOfContents as TocType, +} from "fumadocs-core/server"; +import * as TocPrimitive from "fumadocs-core/toc"; +import { useTocThumb } from "@/hooks/use-toc-thumb"; +import { ScrollArea } from "@/registry/ui/default/core/scroll-area"; +import { cn } from "@/registry/ui/default/lib/cn"; + +export const TableOfContents = ({ toc }: { toc: TocType }) => { + if (toc.length === 0) return null; + + return ( + + + + + + ); +}; + +const TocItems = ({ toc }: { toc: TocType }) => { + const containerRef = React.useRef(null); + const viewportRef = React.useRef(null); + const pos = useTocThumb(containerRef); + + return ( + +
      +
      +
      + {toc.map((item) => ( + + ))} +
      +
      + + ); +}; + +function TOCItem({ item }: { item: TOCItemType }): React.ReactElement { + return ( + = 4 && "ps-12" + )} + > + {item.title} + + ); +} diff --git a/www/src/config/docs-config.tsx b/www/src/config/docs-config.tsx index 54f373c4..0f3f54c4 100644 --- a/www/src/config/docs-config.tsx +++ b/www/src/config/docs-config.tsx @@ -1,284 +1,284 @@ -import { ReactNode } from "react"; -import { - BookIcon, - BoxIcon, - FunctionSquareIcon, - PaletteIcon, -} from "lucide-react"; - -type NavItem = { - title: string; - href?: string; - label?: string; - disabled?: boolean; - items?: NavItem[]; -}; - -type NavSection = { - title: string; - slug: string; - icon: ReactNode; - href?: string; - items?: NavItem[]; -}; - -type DocsConfig = { - nav: NavSection[]; -}; - -export const docsConfig: DocsConfig = { - nav: [ - { - title: "Getting Started", - slug: "docs", - href: "/docs/getting-started/installation", - items: [ - { title: "Introduction", href: "/docs/getting-started/intro" }, - { title: "Installation", href: "/docs/getting-started/installation" }, - { title: "Config", href: "/docs/getting-started/config" }, - { title: "CLI", href: "/docs/getting-started/cli" }, - { title: "Color system", href: "/docs/getting-started/color-system" }, - { title: "Changelog", href: "/docs/getting-started/changelog" }, - { title: "Roadmap", href: "/docs/getting-started/roadmap" }, - ], - icon: , - }, - { - title: "Components", - slug: "components", - icon: , - href: "/components/buttons/button", - items: [ - { - title: "Buttons", - items: [ - { title: "Button", href: "/docs/components/buttons/button" }, - { - title: "Toggle Button", - href: "/docs/components/buttons/toggle-button", - }, - { - title: "File Trigger", - href: "/docs/components/buttons/file-trigger", - }, - ], - }, - { - title: "Inputs", - items: [ - { title: "TextField", href: "/docs/components/inputs/text-field" }, - { title: "TextArea", href: "/docs/components/inputs/text-area" }, - { - title: "SearchField", - href: "/docs/components/inputs/search-field", - }, - { - title: "NumberField", - href: "/docs/components/inputs/number-field", - }, - { title: "Checkbox", href: "/docs/components/inputs/checkbox" }, - { - title: "Checkbox Group", - href: "/docs/components/inputs/checkbox-group", - }, - { - title: "Radio Group", - href: "/docs/components/inputs/radio-group", - }, - { title: "Switch", href: "/docs/components/inputs/switch" }, - { title: "Slider", href: "/docs/components/inputs/slider" }, - ], - }, - { - title: "Menus and Selection", - items: [ - { - title: "Menu", - href: "/docs/components/menus-and-selection/menu", - }, - { - title: "ListBox", - href: "/docs/components/menus-and-selection/list-box", - }, - { - title: "Select", - href: "/docs/components/menus-and-selection/select", - }, - { - title: "Combobox", - href: "/docs/components/menus-and-selection/combobox", - }, - ], - }, - { - title: "Dates", - items: [ - { title: "Calendar", href: "/docs/components/dates/calendar" }, - { - title: "Range Calendar", - href: "/docs/components/dates/range-calendar", - }, - { title: "Time Field", href: "/docs/components/dates/time-field" }, - { title: "Date Field", href: "/docs/components/dates/date-field" }, - { - title: "Date Picker", - href: "/docs/components/dates/date-picker", - }, - { - title: "Date Range Picker", - href: "/docs/components/dates/date-range-picker", - }, - ], - }, - { - title: "Colors", - items: [ - { title: "Color Area", href: "/docs/components/colors/color-area" }, - { - title: "Color Field", - href: "/docs/components/colors/color-field", - }, - { - title: "Color Slider", - href: "/docs/components/colors/color-slider", - }, - { - title: "Color Swatch", - href: "/docs/components/colors/color-swatch", - }, - { - title: "Color Picker", - href: "/docs/components/colors/color-picker", - }, - ], - }, - { - title: "Drag and drop", - items: [ - { - title: "DropZone", - href: "/docs/components/drag-and-drop/drop-zone", - }, - ], - }, - { - title: "Feedback", - items: [ - { title: "Alert", href: "/docs/components/feedback/alert" }, - { title: "Progress", href: "/docs/components/feedback/progress" }, - { title: "Skeleton", href: "/docs/components/feedback/skeleton" }, - ], - }, - { - title: "Layout", - items: [ - { - title: "Aspect Ratio", - href: "/docs/components/layout/aspect-ratio", - }, - { - title: "Scroll Area", - href: "/docs/components/layout/scroll-area", - }, - ], - }, - { - title: "Data display", - items: [ - { title: "Avatar", href: "/docs/components/data-display/avatar" }, - { title: "Badge", href: "/docs/components/data-display/badge" }, - { - title: "Separator", - href: "/docs/components/data-display/separator", - }, - ], - }, - { - title: "Navigation", - items: [ - { title: "Link", href: "/docs/components/navigation/link" }, - { title: "Tabs", href: "/docs/components/navigation/tabs" }, - { - title: "Breadcrumbs", - href: "/docs/components/navigation/breadcrumbs", - }, - ], - }, - { - title: "Overlay", - items: [ - { title: "Dialog", href: "/docs/components/overlay/dialog" }, - { - title: "Alert Dialog", - href: "/docs/components/overlay/dialog#alert-dialog", - }, - { title: "Drawer", href: "/docs/components/overlay/dialog#drawer" }, - { - title: "Popover", - href: "/docs/components/overlay/dialog#popover", - }, - { title: "Tooltip", href: "/docs/components/overlay/tooltip" }, - ], - }, - ], - }, - { - title: "Hooks", - slug: "hooks", - icon: , - items: [ - { - title: "browser", - items: [ - { title: "useMediaQuery", href: "/hooks/browser/use-media-query" }, - ], - }, - { - title: "elements", - items: [ - { title: "useInView", href: "/hooks/elements/use-in-view" }, - { - title: "useIntersectionObserver", - href: "/hooks/elements/use-intersection-observer", - }, - { title: "useWindowSize", href: "/hooks/elements/use-window-size" }, - ], - }, - { - title: "sensors", - items: [ - { title: "useBattery", href: "/hooks/sensors/use-battery" }, - { title: "useMouse", href: "/hooks/sensors/use-mouse" }, - { title: "useOrientation", href: "/hooks/sensors/use-orientation" }, - ], - }, - { - title: "state", - items: [ - { - title: "useLocalStorage", - href: "/hooks/state/use-local-storage", - }, - ], - }, - { - title: "utils", - items: [ - { title: "useCounter", href: "/hooks/utils/use-counter" }, - { title: "useDebounce", href: "/hooks/utils/use-debounce" }, - { title: "useIsClient", href: "/hooks/utils/use-is-client" }, - { title: "useList", href: "/hooks/utils/use-list" }, - { title: "useMounted", href: "/hooks/utils/use-mounted" }, - { title: "usePrevious", href: "/hooks/utils/use-previous" }, - ], - }, - ], - }, - { - title: "Themes", - slug: "themes", - icon: , - href: "/themes", - }, - ], -}; +import { ReactNode } from "react"; +import { + BookIcon, + BoxIcon, + FunctionSquareIcon, + PaletteIcon, +} from "lucide-react"; + +type NavItem = { + title: string; + href?: string; + label?: string; + disabled?: boolean; + items?: NavItem[]; +}; + +type NavSection = { + title: string; + slug: string; + icon: ReactNode; + href?: string; + items?: NavItem[]; +}; + +type DocsConfig = { + nav: NavSection[]; +}; + +export const docsConfig: DocsConfig = { + nav: [ + { + title: "Getting Started", + slug: "docs", + href: "/docs/getting-started/installation", + items: [ + { title: "Introduction", href: "/docs/getting-started/intro" }, + { title: "Installation", href: "/docs/getting-started/installation" }, + { title: "Config", href: "/docs/getting-started/config" }, + { title: "CLI", href: "/docs/getting-started/cli" }, + { title: "Color system", href: "/docs/getting-started/color-system" }, + { title: "Changelog", href: "/docs/getting-started/changelog" }, + { title: "Roadmap", href: "/docs/getting-started/roadmap" }, + ], + icon: , + }, + { + title: "Components", + slug: "components", + icon: , + href: "/components/buttons/button", + items: [ + { + title: "Buttons", + items: [ + { title: "Button", href: "/docs/components/buttons/button" }, + { + title: "Toggle Button", + href: "/docs/components/buttons/toggle-button", + }, + { + title: "File Trigger", + href: "/docs/components/buttons/file-trigger", + }, + ], + }, + { + title: "Inputs", + items: [ + { title: "TextField", href: "/docs/components/inputs/text-field" }, + { title: "TextArea", href: "/docs/components/inputs/text-area" }, + { + title: "SearchField", + href: "/docs/components/inputs/search-field", + }, + { + title: "NumberField", + href: "/docs/components/inputs/number-field", + }, + { title: "Checkbox", href: "/docs/components/inputs/checkbox" }, + { + title: "Checkbox Group", + href: "/docs/components/inputs/checkbox-group", + }, + { + title: "Radio Group", + href: "/docs/components/inputs/radio-group", + }, + { title: "Switch", href: "/docs/components/inputs/switch" }, + { title: "Slider", href: "/docs/components/inputs/slider" }, + ], + }, + { + title: "Menus and Selection", + items: [ + { + title: "Menu", + href: "/docs/components/menus-and-selection/menu", + }, + { + title: "ListBox", + href: "/docs/components/menus-and-selection/list-box", + }, + { + title: "Select", + href: "/docs/components/menus-and-selection/select", + }, + { + title: "Combobox", + href: "/docs/components/menus-and-selection/combobox", + }, + ], + }, + { + title: "Dates", + items: [ + { title: "Calendar", href: "/docs/components/dates/calendar" }, + { + title: "Range Calendar", + href: "/docs/components/dates/range-calendar", + }, + { title: "Time Field", href: "/docs/components/dates/time-field" }, + { title: "Date Field", href: "/docs/components/dates/date-field" }, + { + title: "Date Picker", + href: "/docs/components/dates/date-picker", + }, + { + title: "Date Range Picker", + href: "/docs/components/dates/date-range-picker", + }, + ], + }, + { + title: "Colors", + items: [ + { title: "Color Area", href: "/docs/components/colors/color-area" }, + { + title: "Color Field", + href: "/docs/components/colors/color-field", + }, + { + title: "Color Slider", + href: "/docs/components/colors/color-slider", + }, + { + title: "Color Swatch", + href: "/docs/components/colors/color-swatch", + }, + { + title: "Color Picker", + href: "/docs/components/colors/color-picker", + }, + ], + }, + { + title: "Drag and drop", + items: [ + { + title: "DropZone", + href: "/docs/components/drag-and-drop/drop-zone", + }, + ], + }, + { + title: "Feedback", + items: [ + { title: "Alert", href: "/docs/components/feedback/alert" }, + { title: "Progress", href: "/docs/components/feedback/progress" }, + { title: "Skeleton", href: "/docs/components/feedback/skeleton" }, + ], + }, + { + title: "Layout", + items: [ + { + title: "Aspect Ratio", + href: "/docs/components/layout/aspect-ratio", + }, + { + title: "Scroll Area", + href: "/docs/components/layout/scroll-area", + }, + ], + }, + { + title: "Data display", + items: [ + { title: "Avatar", href: "/docs/components/data-display/avatar" }, + { title: "Badge", href: "/docs/components/data-display/badge" }, + { + title: "Separator", + href: "/docs/components/data-display/separator", + }, + ], + }, + { + title: "Navigation", + items: [ + { title: "Link", href: "/docs/components/navigation/link" }, + { title: "Tabs", href: "/docs/components/navigation/tabs" }, + { + title: "Breadcrumbs", + href: "/docs/components/navigation/breadcrumbs", + }, + ], + }, + { + title: "Overlay", + items: [ + { title: "Dialog", href: "/docs/components/overlay/dialog" }, + { + title: "Alert Dialog", + href: "/docs/components/overlay/dialog#alert-dialog", + }, + { title: "Drawer", href: "/docs/components/overlay/dialog#drawer" }, + { + title: "Popover", + href: "/docs/components/overlay/dialog#popover", + }, + { title: "Tooltip", href: "/docs/components/overlay/tooltip" }, + ], + }, + ], + }, + { + title: "Hooks", + slug: "hooks", + icon: , + items: [ + { + title: "browser", + items: [ + { title: "useMediaQuery", href: "/hooks/browser/use-media-query" }, + ], + }, + { + title: "elements", + items: [ + { title: "useInView", href: "/hooks/elements/use-in-view" }, + { + title: "useIntersectionObserver", + href: "/hooks/elements/use-intersection-observer", + }, + { title: "useWindowSize", href: "/hooks/elements/use-window-size" }, + ], + }, + { + title: "sensors", + items: [ + { title: "useBattery", href: "/hooks/sensors/use-battery" }, + { title: "useMouse", href: "/hooks/sensors/use-mouse" }, + { title: "useOrientation", href: "/hooks/sensors/use-orientation" }, + ], + }, + { + title: "state", + items: [ + { + title: "useLocalStorage", + href: "/hooks/state/use-local-storage", + }, + ], + }, + { + title: "utils", + items: [ + { title: "useCounter", href: "/hooks/utils/use-counter" }, + { title: "useDebounce", href: "/hooks/utils/use-debounce" }, + { title: "useIsClient", href: "/hooks/utils/use-is-client" }, + { title: "useList", href: "/hooks/utils/use-list" }, + { title: "useMounted", href: "/hooks/utils/use-mounted" }, + { title: "usePrevious", href: "/hooks/utils/use-previous" }, + ], + }, + ], + }, + { + title: "Themes", + slug: "themes", + icon: , + href: "/themes", + }, + ], +}; diff --git a/www/src/config/index.ts b/www/src/config/index.ts index a2e31c84..2d7b47cf 100644 --- a/www/src/config/index.ts +++ b/www/src/config/index.ts @@ -1 +1 @@ -export * from "./site-config"; +export * from "./site-config"; diff --git a/www/src/config/site-config.tsx b/www/src/config/site-config.tsx index 30b560d4..dcefa8d6 100644 --- a/www/src/config/site-config.tsx +++ b/www/src/config/site-config.tsx @@ -1,36 +1,36 @@ -export const siteConfig = { - global: { - url: "https://dotui.org", - name: "dotUI", - logo: "/images/logo.png", - title: "dotUI", - description: "Accessible, mobile friendly, modern UI components.", - keywords: [], - authors: [ - { - name: "mehdibha", - url: "https://www.mehdibha.com", - }, - ], - creator: "mehdibha", - thumbnail: "/images/thumbnail.png", - twitter: { - creator: "@mehdibha_", - }, - }, - links: { - github: "https://github.com/mehdibha/dotui", - twitter: "https://x.com/mehdibha_", - discord: "https://discord.gg/DXpj5V2fU8", - creatorGithub: "https://github.com/mehdibha", - }, -}; - -export const searchConfig = { - defaultResults: [ - { name: "Installation", href: "/docs/getting-started/installation" }, - { name: "Button", href: "/docs/components/buttons/button" }, - { name: "TextField", href: "/docs/components/inputs/text-field" }, - { name: "Menu", href: "/docs/components/menus-and-selection/menu" }, - ], -}; +export const siteConfig = { + global: { + url: "https://dotui.org", + name: "dotUI", + logo: "/images/logo.png", + title: "dotUI", + description: "Accessible, mobile friendly, modern UI components.", + keywords: [], + authors: [ + { + name: "mehdibha", + url: "https://www.mehdibha.com", + }, + ], + creator: "mehdibha", + thumbnail: "/images/thumbnail.png", + twitter: { + creator: "@mehdibha_", + }, + }, + links: { + github: "https://github.com/mehdibha/dotui", + twitter: "https://x.com/mehdibha_", + discord: "https://discord.gg/DXpj5V2fU8", + creatorGithub: "https://github.com/mehdibha", + }, +}; + +export const searchConfig = { + defaultResults: [ + { name: "Installation", href: "/docs/getting-started/installation" }, + { name: "Button", href: "/docs/components/buttons/button" }, + { name: "TextField", href: "/docs/components/inputs/text-field" }, + { name: "Menu", href: "/docs/components/menus-and-selection/menu" }, + ], +}; diff --git a/www/src/hooks/use-config.ts b/www/src/hooks/use-config.ts index fcca5403..03aa7aa3 100644 --- a/www/src/hooks/use-config.ts +++ b/www/src/hooks/use-config.ts @@ -1,36 +1,36 @@ -import { create } from "zustand"; -import { persist } from "zustand/middleware"; -import { defaultTheme } from "@/lib/theme"; -import type { IconLibrary } from "@/registry/icons"; -import type { Style } from "@/registry/styles"; -import type { Theme } from "@/types/theme"; - -type Config = { - theme: Theme; - setTheme: (theme: Theme) => void; - style: Style["name"]; - setStyle: (style: Style["name"]) => void; - mode: "light" | "dark"; - setMode: (mode: "light" | "dark") => void; - iconLibrary: IconLibrary; - setIconLibrary: (iconLibrary: IconLibrary) => void; -}; - -export const useConfig = create()( - persist( - (set) => ({ - style: "default", - mode: "dark", - iconLibrary: "lucide", - theme: defaultTheme, - setStyle: (style: Style["name"]) => set((state) => ({ ...state, style })), - setTheme: (theme: Theme) => set((state) => ({ ...state, theme })), - setMode: (mode: "light" | "dark") => set((state) => ({ ...state, mode })), - setIconLibrary: (iconLibrary: IconLibrary) => - set((state) => ({ ...state, iconLibrary })), - }), - { - name: "preview-theme", - } - ) -); +import { create } from "zustand"; +import { persist } from "zustand/middleware"; +import { defaultTheme } from "@/lib/theme"; +import type { IconLibrary } from "@/registry/icons"; +import type { Style } from "@/registry/styles"; +import type { Theme } from "@/types/theme"; + +type Config = { + theme: Theme; + setTheme: (theme: Theme) => void; + style: Style["name"]; + setStyle: (style: Style["name"]) => void; + mode: "light" | "dark"; + setMode: (mode: "light" | "dark") => void; + iconLibrary: IconLibrary; + setIconLibrary: (iconLibrary: IconLibrary) => void; +}; + +export const useConfig = create()( + persist( + (set) => ({ + style: "default", + mode: "dark", + iconLibrary: "lucide", + theme: defaultTheme, + setStyle: (style: Style["name"]) => set((state) => ({ ...state, style })), + setTheme: (theme: Theme) => set((state) => ({ ...state, theme })), + setMode: (mode: "light" | "dark") => set((state) => ({ ...state, mode })), + setIconLibrary: (iconLibrary: IconLibrary) => + set((state) => ({ ...state, iconLibrary })), + }), + { + name: "preview-theme", + } + ) +); diff --git a/www/src/hooks/use-focus-command-menu.ts b/www/src/hooks/use-focus-command-menu.ts index f63fa472..73d9b964 100644 --- a/www/src/hooks/use-focus-command-menu.ts +++ b/www/src/hooks/use-focus-command-menu.ts @@ -1,22 +1,22 @@ -import { RefObject } from "react"; -import { create } from "zustand"; - -type FocusCommandMenuStore = { - inputRef: RefObject | null; - setInputRef: (ref: RefObject) => void; - focusInput: () => void; -}; - -export const useCommandMenuInputRef = create( - (set, get) => ({ - inputRef: null, - setInputRef: (ref) => set({ inputRef: ref }), - focusInput: () => { - const { inputRef } = get(); - - if (inputRef && inputRef.current) { - inputRef.current.focus(); - } - }, - }) -); +import { RefObject } from "react"; +import { create } from "zustand"; + +type FocusCommandMenuStore = { + inputRef: RefObject | null; + setInputRef: (ref: RefObject) => void; + focusInput: () => void; +}; + +export const useCommandMenuInputRef = create( + (set, get) => ({ + inputRef: null, + setInputRef: (ref) => set({ inputRef: ref }), + focusInput: () => { + const { inputRef } = get(); + + if (inputRef && inputRef.current) { + inputRef.current.focus(); + } + }, + }) +); diff --git a/www/src/hooks/use-palette.ts b/www/src/hooks/use-palette.ts index 1f9b58a6..93ca24a7 100644 --- a/www/src/hooks/use-palette.ts +++ b/www/src/hooks/use-palette.ts @@ -1,116 +1,116 @@ -import { - BackgroundColor, - Color, - Theme, - type CssColor, -} from "@adobe/leonardo-contrast-colors"; -import { useConfig } from "./use-config"; - -export const usePalette = ( - paletteName: "neutral" | "accent" | "success" | "danger" | "warning" -) => { - const { theme, mode, setTheme } = useConfig(); - const palette = theme[mode].palettes[paletteName]; - const baseColors = palette.baseColors; - const smooth = palette.smooth; - const lightness = palette.lightness; - const saturation = palette.saturation; - const ratios = palette.ratios; - - const updateTheme = ({ - baseColors: _baseColors, - smooth: _smooth, - lightness: _lightness, - saturation: _saturation, - ratios: _ratios, - }: { - baseColors?: CssColor[]; - smooth?: boolean; - lightness?: number; - saturation?: number; - ratios?: number[]; - }) => { - const bg = new BackgroundColor({ - name: "bg", - colorKeys: ["#000"], - ratios: [1], - }); - const baseColor = new Color({ - name: "base", - colorKeys: _baseColors ?? baseColors, - smooth: _smooth ?? smooth, - ratios: _ratios ?? ratios, - }); - const colors = new Theme({ - colors: [baseColor], - backgroundColor: bg, - lightness: _lightness ?? lightness, - saturation: _saturation ?? saturation, - output: "HSL", - }); - setTheme({ - ...theme, - [mode]: { - ...theme[mode], - palettes: { - ...theme[mode].palettes, - [paletteName]: { - baseColors: _baseColors ?? baseColors, - smooth: _smooth ?? smooth, - saturation: _saturation ?? saturation, - lightness: _lightness ?? lightness, - ratios: _ratios ?? ratios, - colors: transformObject(colors.contrastColorPairs), - }, - }, - }, - }); - }; - - const handleChangeSmooth = (isSelected: boolean) => { - updateTheme({ smooth: isSelected }); - }; - - const handleChangeColor = (color: CssColor, index: number) => { - const newBaseColors = baseColors.map((c, i) => (i === index ? color : c)); - updateTheme({ baseColors: newBaseColors }); - }; - - const handleChangeLightness = (value: number | number[]) => { - updateTheme({ lightness: value as number }); - }; - - const handleChangeSaturation = (value: number | number[]) => { - updateTheme({ saturation: value as number }); - }; - - const handleChangeRatio = (value: number, index: number) => { - if (isNaN(value)) return; - const newRatios = ratios.map((r, i) => (i === index ? value : r)); - updateTheme({ ratios: newRatios }); - }; - - return { - smooth, - handleChangeSmooth, - baseColors, - handleChangeColor, - lightness, - handleChangeLightness, - saturation, - handleChangeSaturation, - ratios, - handleChangeRatio, - }; -}; - -function transformObject(input: Record) { - const output: Record = {}; - for (const key in input) { - if (key !== "background") { - const newKey = key.replace("base", ""); - output[newKey] = input[key]; - } - } - return output; -} +import { + BackgroundColor, + Color, + Theme, + type CssColor, +} from "@adobe/leonardo-contrast-colors"; +import { useConfig } from "./use-config"; + +export const usePalette = ( + paletteName: "neutral" | "accent" | "success" | "danger" | "warning" +) => { + const { theme, mode, setTheme } = useConfig(); + const palette = theme[mode].palettes[paletteName]; + const baseColors = palette.baseColors; + const smooth = palette.smooth; + const lightness = palette.lightness; + const saturation = palette.saturation; + const ratios = palette.ratios; + + const updateTheme = ({ + baseColors: _baseColors, + smooth: _smooth, + lightness: _lightness, + saturation: _saturation, + ratios: _ratios, + }: { + baseColors?: CssColor[]; + smooth?: boolean; + lightness?: number; + saturation?: number; + ratios?: number[]; + }) => { + const bg = new BackgroundColor({ + name: "bg", + colorKeys: ["#000"], + ratios: [1], + }); + const baseColor = new Color({ + name: "base", + colorKeys: _baseColors ?? baseColors, + smooth: _smooth ?? smooth, + ratios: _ratios ?? ratios, + }); + const colors = new Theme({ + colors: [baseColor], + backgroundColor: bg, + lightness: _lightness ?? lightness, + saturation: _saturation ?? saturation, + output: "HSL", + }); + setTheme({ + ...theme, + [mode]: { + ...theme[mode], + palettes: { + ...theme[mode].palettes, + [paletteName]: { + baseColors: _baseColors ?? baseColors, + smooth: _smooth ?? smooth, + saturation: _saturation ?? saturation, + lightness: _lightness ?? lightness, + ratios: _ratios ?? ratios, + colors: transformObject(colors.contrastColorPairs), + }, + }, + }, + }); + }; + + const handleChangeSmooth = (isSelected: boolean) => { + updateTheme({ smooth: isSelected }); + }; + + const handleChangeColor = (color: CssColor, index: number) => { + const newBaseColors = baseColors.map((c, i) => (i === index ? color : c)); + updateTheme({ baseColors: newBaseColors }); + }; + + const handleChangeLightness = (value: number | number[]) => { + updateTheme({ lightness: value as number }); + }; + + const handleChangeSaturation = (value: number | number[]) => { + updateTheme({ saturation: value as number }); + }; + + const handleChangeRatio = (value: number, index: number) => { + if (isNaN(value)) return; + const newRatios = ratios.map((r, i) => (i === index ? value : r)); + updateTheme({ ratios: newRatios }); + }; + + return { + smooth, + handleChangeSmooth, + baseColors, + handleChangeColor, + lightness, + handleChangeLightness, + saturation, + handleChangeSaturation, + ratios, + handleChangeRatio, + }; +}; + +function transformObject(input: Record) { + const output: Record = {}; + for (const key in input) { + if (key !== "background") { + const newKey = key.replace("base", ""); + output[newKey] = input[key]; + } + } + return output; +} diff --git a/www/src/hooks/use-toc-thumb.ts b/www/src/hooks/use-toc-thumb.ts index 27a666c1..bc3cf8a8 100644 --- a/www/src/hooks/use-toc-thumb.ts +++ b/www/src/hooks/use-toc-thumb.ts @@ -1,55 +1,57 @@ -import { type RefObject, useEffect, useState } from "react"; -import * as Primitive from "fumadocs-core/toc"; - -export type TOCThumb = [top: number, height: number]; - -export function useTocThumb(containerRef: RefObject): TOCThumb { - const active = Primitive.useActiveAnchors(); - const [pos, setPos] = useState([0, 0]); - - useEffect(() => { - if (!containerRef.current) return; - const container = containerRef.current; - - function onResize(): void { - if (active.length === 0 || container.clientHeight === 0) { - setPos([0, 0]); - return; - } - - let upper = Number.MAX_VALUE, - lower = 0; - - for (const item of active) { - const element = container.querySelector( - `a[href="#${item}"]` - ); - if (!element) continue; - - const styles = getComputedStyle(element); - upper = Math.min( - upper, - element.offsetTop + parseFloat(styles.paddingTop) - ); - lower = Math.max( - lower, - element.offsetTop + - element.clientHeight - - parseFloat(styles.paddingBottom) - ); - } - - setPos([upper, lower - upper]); - } - - onResize(); - const observer = new ResizeObserver(onResize); - observer.observe(container); - - return () => { - observer.disconnect(); - }; - }, [active, containerRef]); - - return pos; -} +import { type RefObject, useEffect, useState } from "react"; +import * as Primitive from "fumadocs-core/toc"; + +export type TOCThumb = [top: number, height: number]; + +export function useTocThumb( + containerRef: RefObject +): TOCThumb { + const active = Primitive.useActiveAnchors(); + const [pos, setPos] = useState([0, 0]); + + useEffect(() => { + if (!containerRef.current) return; + const container = containerRef.current; + + function onResize(): void { + if (active.length === 0 || container.clientHeight === 0) { + setPos([0, 0]); + return; + } + + let upper = Number.MAX_VALUE, + lower = 0; + + for (const item of active) { + const element = container.querySelector( + `a[href="#${item}"]` + ); + if (!element) continue; + + const styles = getComputedStyle(element); + upper = Math.min( + upper, + element.offsetTop + parseFloat(styles.paddingTop) + ); + lower = Math.max( + lower, + element.offsetTop + + element.clientHeight - + parseFloat(styles.paddingBottom) + ); + } + + setPos([upper, lower - upper]); + } + + onResize(); + const observer = new ResizeObserver(onResize); + observer.observe(container); + + return () => { + observer.disconnect(); + }; + }, [active, containerRef]); + + return pos; +} diff --git a/www/src/lib/build-color-scales.ts b/www/src/lib/build-color-scales.ts index 40ffdd17..e29e51cb 100644 --- a/www/src/lib/build-color-scales.ts +++ b/www/src/lib/build-color-scales.ts @@ -1,156 +1,156 @@ -import { - Theme, - Color, - BackgroundColor, - type CssColor, -} from "@adobe/leonardo-contrast-colors"; - -type ThemeMode = "light" | "dark"; - -type ColorConfig = - | { - baseColors: CssColor[]; - ratios?: number[]; - } - | CssColor[]; - -type Colors = { - neutral: ColorConfig; - accent: ColorConfig; - primary: ColorConfig; - success: ColorConfig; - warning: ColorConfig; - danger: ColorConfig; -}; - -type ThemeConfig = { - saturation: number; - lightness: number; - colors: Colors; -}; - -const defaultConfig = { - light: { - saturation: 100, - lightness: 97, - colors: { - neutral: { - baseColors: ["#000000"], - ratios: [1, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - primary: { - baseColors: ["#ffffff"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - success: { - baseColors: ["#1A9338"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - warning: { - baseColors: ["#E79D13"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - danger: { - baseColors: ["#D93036"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - accent: { - baseColors: ["#0091FF"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - }, - }, - dark: { - saturation: 100, - lightness: 0, - colors: { - neutral: { - baseColors: ["#ffffff"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - primary: { - baseColors: ["#000000"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - success: { - baseColors: ["#1A9338"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - warning: { - baseColors: ["#E79D13"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - danger: { - baseColors: ["#D93036"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - accent: { - baseColors: ["#0091FF"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - }, - }, -} as const satisfies Record; - -export const buildDotUIColorScales = ( - mode: ThemeMode, - colors: Colors, - options?: { - saturation?: number; - lightness?: number; - } -) => { - const defaultModeConfig = defaultConfig[mode]; - - const getColorKeys = (colorBase: keyof Colors) => { - const color = colors[colorBase]; - return Array.isArray(color) ? color : color.baseColors; - }; - - const getRatios = (colorBase: keyof Colors) => { - const color = colors[colorBase]; - return Array.isArray(color) - ? defaultModeConfig.colors[colorBase].ratios - : (color.ratios ?? defaultModeConfig.colors[colorBase].ratios); - }; - - const neutral = new BackgroundColor({ - name: "neutral-", - colorKeys: getColorKeys("neutral"), - ratios: getRatios("neutral"), - }); - - const colorScales = Object.entries(colors) - .map(([name]) => { - if (name === "neutral") return null; - - return new Color({ - name: `${name}-`, - colorKeys: getColorKeys(name as keyof Colors), - ratios: getRatios(name as keyof Colors), - }); - }) - .filter(Boolean) as Color[]; - - const theme = new Theme({ - colors: [neutral, ...colorScales], - backgroundColor: neutral, - lightness: options?.lightness ?? defaultModeConfig.lightness, - saturation: options?.saturation ?? defaultModeConfig.saturation, - output: "HSL", - }); - - const colorVars = Object.entries(theme.contrastColorPairs).reduce( - (acc, [key, value]) => { - if (key === "background") { - return acc; - } - const [h, s, l] = value.match(/\d+(\.\d+)?/g) || []; - acc[key] = `hsl(${h} ${s}% ${l}%)`; - return acc; - }, - {} as Record - ); - - return colorVars; -}; +import { + Theme, + Color, + BackgroundColor, + type CssColor, +} from "@adobe/leonardo-contrast-colors"; + +type ThemeMode = "light" | "dark"; + +type ColorConfig = + | { + baseColors: CssColor[]; + ratios?: number[]; + } + | CssColor[]; + +type Colors = { + neutral: ColorConfig; + accent: ColorConfig; + primary: ColorConfig; + success: ColorConfig; + warning: ColorConfig; + danger: ColorConfig; +}; + +type ThemeConfig = { + saturation: number; + lightness: number; + colors: Colors; +}; + +const defaultConfig = { + light: { + saturation: 100, + lightness: 97, + colors: { + neutral: { + baseColors: ["#000000"], + ratios: [1, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + primary: { + baseColors: ["#ffffff"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + success: { + baseColors: ["#1A9338"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + warning: { + baseColors: ["#E79D13"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + danger: { + baseColors: ["#D93036"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + accent: { + baseColors: ["#0091FF"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + }, + }, + dark: { + saturation: 100, + lightness: 0, + colors: { + neutral: { + baseColors: ["#ffffff"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + primary: { + baseColors: ["#000000"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + success: { + baseColors: ["#1A9338"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + warning: { + baseColors: ["#E79D13"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + danger: { + baseColors: ["#D93036"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + accent: { + baseColors: ["#0091FF"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + }, + }, +} as const satisfies Record; + +export const buildDotUIColorScales = ( + mode: ThemeMode, + colors: Colors, + options?: { + saturation?: number; + lightness?: number; + } +) => { + const defaultModeConfig = defaultConfig[mode]; + + const getColorKeys = (colorBase: keyof Colors) => { + const color = colors[colorBase]; + return Array.isArray(color) ? color : color.baseColors; + }; + + const getRatios = (colorBase: keyof Colors) => { + const color = colors[colorBase]; + return Array.isArray(color) + ? defaultModeConfig.colors[colorBase].ratios + : (color.ratios ?? defaultModeConfig.colors[colorBase].ratios); + }; + + const neutral = new BackgroundColor({ + name: "neutral-", + colorKeys: getColorKeys("neutral"), + ratios: getRatios("neutral"), + }); + + const colorScales = Object.entries(colors) + .map(([name]) => { + if (name === "neutral") return null; + + return new Color({ + name: `${name}-`, + colorKeys: getColorKeys(name as keyof Colors), + ratios: getRatios(name as keyof Colors), + }); + }) + .filter(Boolean) as Color[]; + + const theme = new Theme({ + colors: [neutral, ...colorScales], + backgroundColor: neutral, + lightness: options?.lightness ?? defaultModeConfig.lightness, + saturation: options?.saturation ?? defaultModeConfig.saturation, + output: "HSL", + }); + + const colorVars = Object.entries(theme.contrastColorPairs).reduce( + (acc, [key, value]) => { + if (key === "background") { + return acc; + } + const [h, s, l] = value.match(/\d+(\.\d+)?/g) || []; + acc[key] = `hsl(${h} ${s}% ${l}%)`; + return acc; + }, + {} as Record + ); + + return colorVars; +}; diff --git a/www/src/lib/colors.ts b/www/src/lib/colors.ts index 9a45b317..d0fac849 100644 --- a/www/src/lib/colors.ts +++ b/www/src/lib/colors.ts @@ -1,173 +1,173 @@ -import { - contrast, - convertColorValue, - type ColorTuple, - Theme, - Color, - BackgroundColor, - type CssColor, -} from "@adobe/leonardo-contrast-colors"; - -export const getContrastTextColor = (color: string): "white" | "black" => { - const RGBColor = convertColorValue(color, "RGB", true) as unknown as { - r: number; - g: number; - b: number; - }; - const colorTuple: ColorTuple = [RGBColor.r, RGBColor.g, RGBColor.b]; - const contrastWithBlack = contrast(colorTuple, [0, 0, 0]); - const contrastWithWhite = contrast(colorTuple, [255, 255, 255]); - const contrastText = - contrastWithBlack > contrastWithWhite ? "black" : "white"; - return contrastText; -}; - -type ThemeMode = "light" | "dark"; - -type ColorConfig = - | { - baseColors: CssColor[]; - ratios?: number[]; - } - | CssColor[]; - -type Colors = { - neutral: ColorConfig; - accent: ColorConfig; - primary: ColorConfig; - success: ColorConfig; - warning: ColorConfig; - danger: ColorConfig; -}; - -type ThemeConfig = { - saturation: number; - lightness: number; - colors: Colors; -}; - -const defaultConfig = { - light: { - saturation: 100, - lightness: 97, - colors: { - neutral: { - baseColors: ["#000000"], - ratios: [1, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - primary: { - baseColors: ["#ffffff"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - success: { - baseColors: ["#1A9338"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - warning: { - baseColors: ["#E79D13"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - danger: { - baseColors: ["#D93036"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - accent: { - baseColors: ["#0091FF"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - }, - }, - dark: { - saturation: 100, - lightness: 0, - colors: { - neutral: { - baseColors: ["#ffffff"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - primary: { - baseColors: ["#000000"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - success: { - baseColors: ["#1A9338"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - warning: { - baseColors: ["#E79D13"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - danger: { - baseColors: ["#D93036"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - accent: { - baseColors: ["#0091FF"], - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - }, - }, - }, -} as const satisfies Record; - -export const buildDotUIColorScales = ( - mode: ThemeMode, - colors: Colors, - options?: { - saturation?: number; - lightness?: number; - } -) => { - const defaultModeConfig = defaultConfig[mode]; - - const getColorKeys = (colorBase: keyof Colors) => { - const color = colors[colorBase]; - return Array.isArray(color) ? color : color.baseColors; - }; - - const getRatios = (colorBase: keyof Colors) => { - const color = colors[colorBase]; - return Array.isArray(color) - ? defaultModeConfig.colors[colorBase].ratios - : (color.ratios ?? defaultModeConfig.colors[colorBase].ratios); - }; - - const neutral = new BackgroundColor({ - name: "neutral-", - colorKeys: getColorKeys("neutral"), - ratios: getRatios("neutral"), - }); - - const colorScales = Object.entries(colors) - .map(([name]) => { - if (name === "neutral") return null; - - return new Color({ - name: `${name}-`, - colorKeys: getColorKeys(name as keyof Colors), - ratios: getRatios(name as keyof Colors), - }); - }) - .filter(Boolean) as Color[]; - - const theme = new Theme({ - colors: [neutral, ...colorScales], - backgroundColor: neutral, - lightness: options?.lightness ?? defaultModeConfig.lightness, - saturation: options?.saturation ?? defaultModeConfig.saturation, - output: "HSL", - }); - - const colorVars = Object.entries(theme.contrastColorPairs).reduce( - (acc, [key, value]) => { - if (key === "background") { - return acc; - } - const [h, s, l] = value.match(/\d+(\.\d+)?/g) || []; - acc[key] = `hsl(${h} ${s}% ${l}%)`; - return acc; - }, - {} as Record - ); - - return colorVars; -}; +import { + contrast, + convertColorValue, + type ColorTuple, + Theme, + Color, + BackgroundColor, + type CssColor, +} from "@adobe/leonardo-contrast-colors"; + +export const getContrastTextColor = (color: string): "white" | "black" => { + const RGBColor = convertColorValue(color, "RGB", true) as unknown as { + r: number; + g: number; + b: number; + }; + const colorTuple: ColorTuple = [RGBColor.r, RGBColor.g, RGBColor.b]; + const contrastWithBlack = contrast(colorTuple, [0, 0, 0]); + const contrastWithWhite = contrast(colorTuple, [255, 255, 255]); + const contrastText = + contrastWithBlack > contrastWithWhite ? "black" : "white"; + return contrastText; +}; + +type ThemeMode = "light" | "dark"; + +type ColorConfig = + | { + baseColors: CssColor[]; + ratios?: number[]; + } + | CssColor[]; + +type Colors = { + neutral: ColorConfig; + accent: ColorConfig; + primary: ColorConfig; + success: ColorConfig; + warning: ColorConfig; + danger: ColorConfig; +}; + +type ThemeConfig = { + saturation: number; + lightness: number; + colors: Colors; +}; + +const defaultConfig = { + light: { + saturation: 100, + lightness: 97, + colors: { + neutral: { + baseColors: ["#000000"], + ratios: [1, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + primary: { + baseColors: ["#ffffff"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + success: { + baseColors: ["#1A9338"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + warning: { + baseColors: ["#E79D13"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + danger: { + baseColors: ["#D93036"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + accent: { + baseColors: ["#0091FF"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + }, + }, + dark: { + saturation: 100, + lightness: 0, + colors: { + neutral: { + baseColors: ["#ffffff"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + primary: { + baseColors: ["#000000"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + success: { + baseColors: ["#1A9338"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + warning: { + baseColors: ["#E79D13"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + danger: { + baseColors: ["#D93036"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + accent: { + baseColors: ["#0091FF"], + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + }, + }, + }, +} as const satisfies Record; + +export const buildDotUIColorScales = ( + mode: ThemeMode, + colors: Colors, + options?: { + saturation?: number; + lightness?: number; + } +) => { + const defaultModeConfig = defaultConfig[mode]; + + const getColorKeys = (colorBase: keyof Colors) => { + const color = colors[colorBase]; + return Array.isArray(color) ? color : color.baseColors; + }; + + const getRatios = (colorBase: keyof Colors) => { + const color = colors[colorBase]; + return Array.isArray(color) + ? defaultModeConfig.colors[colorBase].ratios + : (color.ratios ?? defaultModeConfig.colors[colorBase].ratios); + }; + + const neutral = new BackgroundColor({ + name: "neutral-", + colorKeys: getColorKeys("neutral"), + ratios: getRatios("neutral"), + }); + + const colorScales = Object.entries(colors) + .map(([name]) => { + if (name === "neutral") return null; + + return new Color({ + name: `${name}-`, + colorKeys: getColorKeys(name as keyof Colors), + ratios: getRatios(name as keyof Colors), + }); + }) + .filter(Boolean) as Color[]; + + const theme = new Theme({ + colors: [neutral, ...colorScales], + backgroundColor: neutral, + lightness: options?.lightness ?? defaultModeConfig.lightness, + saturation: options?.saturation ?? defaultModeConfig.saturation, + output: "HSL", + }); + + const colorVars = Object.entries(theme.contrastColorPairs).reduce( + (acc, [key, value]) => { + if (key === "background") { + return acc; + } + const [h, s, l] = value.match(/\d+(\.\d+)?/g) || []; + acc[key] = `hsl(${h} ${s}% ${l}%)`; + return acc; + }, + {} as Record + ); + + return colorVars; +}; diff --git a/www/src/lib/get-component-source.ts b/www/src/lib/get-component-source.ts index 608709fe..f2636c4d 100644 --- a/www/src/lib/get-component-source.ts +++ b/www/src/lib/get-component-source.ts @@ -1,34 +1,34 @@ -import fs from "node:fs"; -import path from "path"; - -export const getComponentSource = (relativePath: string) => { - const fullPath = path.join(process.cwd(), "src", "lib", relativePath); - let code: { title: string; code: string }[] = []; - - // if directory, get all files - if (fs.existsSync(fullPath) && fs.lstatSync(fullPath).isDirectory()) { - const files = fs.readdirSync(fullPath); - code = files - .map((file) => { - const filePath = path.join(fullPath, file); - const fileContent = fs.readFileSync(filePath, "utf-8"); - return { - title: file === "index.tsx" ? `${path.basename(fullPath)}.tsx` : file, - code: fileContent, - }; - }) - .sort((a) => (a.title === `${path.basename(fullPath)}.tsx` ? -1 : 1)); - } else { - // if file, get file content and name - if (!fs.existsSync(`${fullPath}.tsx`) && !fs.existsSync(`${fullPath}.ts`)) { - console.log(`${fullPath}.ts(x) does not exist`); - return []; - } - // get file extension - const fileExt = fs.existsSync(`${fullPath}.ts`) ? "ts" : "tsx"; - const fileContent = fs.readFileSync(`${fullPath}.${fileExt}`, "utf-8"); - const fileName = path.basename(fullPath); - code = [{ title: `${fileName}.${fileExt}`, code: fileContent }]; - } - return code; -}; +import fs from "node:fs"; +import path from "path"; + +export const getComponentSource = (relativePath: string) => { + const fullPath = path.join(process.cwd(), "src", "lib", relativePath); + let code: { title: string; code: string }[] = []; + + // if directory, get all files + if (fs.existsSync(fullPath) && fs.lstatSync(fullPath).isDirectory()) { + const files = fs.readdirSync(fullPath); + code = files + .map((file) => { + const filePath = path.join(fullPath, file); + const fileContent = fs.readFileSync(filePath, "utf-8"); + return { + title: file === "index.tsx" ? `${path.basename(fullPath)}.tsx` : file, + code: fileContent, + }; + }) + .sort((a) => (a.title === `${path.basename(fullPath)}.tsx` ? -1 : 1)); + } else { + // if file, get file content and name + if (!fs.existsSync(`${fullPath}.tsx`) && !fs.existsSync(`${fullPath}.ts`)) { + console.log(`${fullPath}.ts(x) does not exist`); + return []; + } + // get file extension + const fileExt = fs.existsSync(`${fullPath}.ts`) ? "ts" : "tsx"; + const fileContent = fs.readFileSync(`${fullPath}.${fileExt}`, "utf-8"); + const fileName = path.basename(fullPath); + code = [{ title: `${fileName}.${fileExt}`, code: fileContent }]; + } + return code; +}; diff --git a/www/src/lib/get-file-source.ts b/www/src/lib/get-file-source.ts index 04f6488c..bf521e67 100644 --- a/www/src/lib/get-file-source.ts +++ b/www/src/lib/get-file-source.ts @@ -1,14 +1,14 @@ -import fs from "node:fs"; -import path from "path"; - -export const getFileSource = (filePath: string) => { - const fullPath = path.join(process.cwd(), "src", filePath); - const fileContent = fs.readFileSync(fullPath, "utf-8"); - - const fileName = path.basename(fullPath); - - return { - fileName, - content: fileContent, - }; -}; +import fs from "node:fs"; +import path from "path"; + +export const getFileSource = (filePath: string) => { + const fullPath = path.join(process.cwd(), "src", filePath); + const fileContent = fs.readFileSync(fullPath, "utf-8"); + + const fileName = path.basename(fullPath); + + return { + fileName, + content: fileContent, + }; +}; diff --git a/www/src/lib/github-stargazers.ts b/www/src/lib/github-stargazers.ts index 97eedeee..bf1a4492 100644 --- a/www/src/lib/github-stargazers.ts +++ b/www/src/lib/github-stargazers.ts @@ -1,25 +1,25 @@ -export async function getGitHubStars(): Promise { - try { - const response = await fetch( - "https://api.github.com/repos/mehdibha/dotUI", - { - headers: { - Accept: "application/vnd.github+json", - }, - next: { - revalidate: 60, - }, - } - ); - - if (!response?.ok) { - return null; - } - - const json = await response.json(); - - return parseInt(json["stargazers_count"]).toLocaleString(); - } catch (error) { - return null; - } -} +export async function getGitHubStars(): Promise { + try { + const response = await fetch( + "https://api.github.com/repos/mehdibha/dotUI", + { + headers: { + Accept: "application/vnd.github+json", + }, + next: { + revalidate: 60, + }, + } + ); + + if (!response?.ok) { + return null; + } + + const json = await response.json(); + + return parseInt(json["stargazers_count"]).toLocaleString(); + } catch (error) { + return null; + } +} diff --git a/www/src/lib/string.ts b/www/src/lib/string.ts index 48efcae6..262d1355 100644 --- a/www/src/lib/string.ts +++ b/www/src/lib/string.ts @@ -1,45 +1,45 @@ -export function removeLastS(word: string): string { - if (word.endsWith("s")) { - return word.slice(0, -1); - } - return word; -} - -export function slugify(str: string) { - return str - .toString() - .toLowerCase() - .trim() // Remove whitespace from both ends of a string - .replace(/\s+/g, "-") // Replace spaces with - - .replace(/&/g, "-and-") // Replace & with 'and' - .replace(/[^\w\-]+/g, "") // Remove all non-word characters except for - - .replace(/\-\-+/g, "-"); // Replace multiple - with single - -} - -export const toKebabCase = (string: string): string => { - return string - .replace(/([a-z0-9])([A-Z])/g, "$1-$2") - .toLowerCase() - .trim(); -}; - -export const kekabCaseToTitle = (string: string): string => { - return string - .replace(/-/g, " ") - .replace(/\b\w/g, (char) => char.toUpperCase()); -}; - -export const truncateOnWord = ( - text: string, - maxLength: number, - ellipsis = true -) => { - if (text.length <= maxLength) return text; - let truncatedText = text.substring(0, maxLength); - truncatedText = truncatedText.substring( - 0, - Math.min(truncatedText.length, truncatedText.lastIndexOf(" ")) - ); - if (ellipsis) truncatedText += "..."; - return truncatedText; -}; +export function removeLastS(word: string): string { + if (word.endsWith("s")) { + return word.slice(0, -1); + } + return word; +} + +export function slugify(str: string) { + return str + .toString() + .toLowerCase() + .trim() // Remove whitespace from both ends of a string + .replace(/\s+/g, "-") // Replace spaces with - + .replace(/&/g, "-and-") // Replace & with 'and' + .replace(/[^\w\-]+/g, "") // Remove all non-word characters except for - + .replace(/\-\-+/g, "-"); // Replace multiple - with single - +} + +export const toKebabCase = (string: string): string => { + return string + .replace(/([a-z0-9])([A-Z])/g, "$1-$2") + .toLowerCase() + .trim(); +}; + +export const kekabCaseToTitle = (string: string): string => { + return string + .replace(/-/g, " ") + .replace(/\b\w/g, (char) => char.toUpperCase()); +}; + +export const truncateOnWord = ( + text: string, + maxLength: number, + ellipsis = true +) => { + if (text.length <= maxLength) return text; + let truncatedText = text.substring(0, maxLength); + truncatedText = truncatedText.substring( + 0, + Math.min(truncatedText.length, truncatedText.lastIndexOf(" ")) + ); + if (ellipsis) truncatedText += "..."; + return truncatedText; +}; diff --git a/www/src/lib/theme.ts b/www/src/lib/theme.ts index 7c133abd..44dfd8eb 100644 --- a/www/src/lib/theme.ts +++ b/www/src/lib/theme.ts @@ -1,241 +1,241 @@ -import type { Theme } from "@/types/theme"; - -export const defaultTheme: Theme = { - light: { - palettes: { - neutral: { - baseColors: ["#000000"], - ratios: [1, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - smooth: true, - lightness: 97, - saturation: 100, - colors: { - "100": "hsl(0, 0%, 96%)", - "200": "hsl(0, 0%, 88%)", - "300": "hsl(0, 0%, 79%)", - "400": "hsl(0, 0%, 66%)", - "500": "hsl(0, 0%, 54%)", - "600": "hsl(0, 0%, 51%)", - "700": "hsl(0, 0%, 48%)", - "800": "hsl(0, 0%, 45%)", - "900": "hsl(0, 0%, 16%)", - "1000": "hsl(0, 0%, 12%)", - }, - }, - primary: { - baseColors: ["#ffffff"], - smooth: true, - lightness: 97, - saturation: 100, - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - colors: { - "100": "hsl(0, 0%, 87%)", - "200": "hsl(0, 0%, 79%)", - "300": "hsl(0, 0%, 73%)", - "400": "hsl(0, 0%, 65%)", - "500": "hsl(0, 0%, 54%)", - "600": "hsl(0, 0%, 42%)", - "700": "hsl(0, 0%, 35%)", - "800": "hsl(0, 0%, 28%)", - "900": "hsl(0, 0%, 16%)", - "1000": "hsl(0, 0%, 12%)", - }, - }, - success: { - baseColors: ["#1A9338"], - smooth: true, - lightness: 97, - saturation: 100, - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - colors: { - "100": "hsl(130, 34%, 83%)", - "200": "hsl(131, 35%, 75%)", - "300": "hsl(131, 35%, 66%)", - "400": "hsl(132, 35%, 56%)", - "500": "hsl(131, 41%, 43%)", - "600": "hsl(132, 41%, 34%)", - "700": "hsl(132, 41%, 28%)", - "800": "hsl(131, 41%, 23%)", - "900": "hsl(131, 40%, 13%)", - "1000": "hsl(132, 42%, 9%)", - }, - }, - warning: { - baseColors: ["#E79D13"], - smooth: true, - lightness: 97, - saturation: 100, - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - colors: { - "100": "hsl(35, 100%, 80%)", - "200": "hsl(35, 100%, 69%)", - "300": "hsl(35, 100%, 58%)", - "400": "hsl(35, 93%, 49%)", - "500": "hsl(35, 92%, 41%)", - "600": "hsl(35, 93%, 32%)", - "700": "hsl(35, 93%, 26%)", - "800": "hsl(35, 93%, 22%)", - "900": "hsl(35, 94%, 12%)", - "1000": "hsl(36, 91%, 9%)", - }, - }, - danger: { - baseColors: ["#D93036"], - smooth: true, - lightness: 97, - saturation: 100, - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - colors: { - "100": "hsl(358, 69%, 90%)", - "200": "hsl(358, 69%, 85%)", - "300": "hsl(358, 70%, 79%)", - "400": "hsl(358, 69%, 73%)", - "500": "hsl(358, 69%, 63%)", - "600": "hsl(358, 64%, 49%)", - "700": "hsl(358, 63%, 41%)", - "800": "hsl(358, 64%, 33%)", - "900": "hsl(357, 64%, 20%)", - "1000": "hsl(358, 65%, 15%)", - }, - }, - accent: { - baseColors: ["#0091FF"], - smooth: true, - lightness: 97, - saturation: 100, - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - colors: { - "100": "hsl(210, 100%, 88%)", - "200": "hsl(210, 100%, 81%)", - "300": "hsl(210, 100%, 74%)", - "400": "hsl(210, 100%, 67%)", - "500": "hsl(210, 64%, 55%)", - "600": "hsl(210, 51%, 44%)", - "700": "hsl(210, 51%, 36%)", - "800": "hsl(210, 52%, 29%)", - "900": "hsl(211, 52%, 17%)", - "1000": "hsl(211, 52%, 12%)", - }, - }, - }, - }, - dark: { - palettes: { - neutral: { - baseColors: ["#ffffff"], - smooth: true, - lightness: 0, - saturation: 100, - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - colors: { - "100": "hsl(0, 0%, 1%)", - "200": "hsl(0, 0%, 17%)", - "300": "hsl(0, 0%, 22%)", - "400": "hsl(0, 0%, 27%)", - "500": "hsl(0, 0%, 36%)", - "600": "hsl(0, 0%, 47%)", - "700": "hsl(0, 0%, 55%)", - "800": "hsl(0, 0%, 64%)", - "900": "hsl(0, 0%, 80%)", - "1000": "hsl(0, 0%, 86%)", - }, - }, - primary: { - baseColors: ["#000000"], - smooth: true, - lightness: 0, - saturation: 100, - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - colors: { - "100": "hsl(0, 0%, 12%)", - "200": "hsl(0, 0%, 17%)", - "300": "hsl(0, 0%, 22%)", - "400": "hsl(0, 0%, 27%)", - "500": "hsl(0, 0%, 36%)", - "600": "hsl(0, 0%, 47%)", - "700": "hsl(0, 0%, 55%)", - "800": "hsl(0, 0%, 64%)", - "900": "hsl(0, 0%, 80%)", - "1000": "hsl(0, 0%, 86%)", - }, - }, - success: { - baseColors: ["#1A9338"], - smooth: true, - lightness: 0, - saturation: 100, - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - colors: { - "100": "hsl(132, 42%, 9%)", - "200": "hsl(130, 41%, 14%)", - "300": "hsl(131, 41%, 18%)", - "400": "hsl(132, 41%, 22%)", - "500": "hsl(131, 41%, 29%)", - "600": "hsl(131, 41%, 38%)", - "700": "hsl(131, 41%, 45%)", - "800": "hsl(131, 34%, 55%)", - "900": "hsl(131, 34%, 76%)", - "1000": "hsl(130, 35%, 83%)", - }, - }, - warning: { - baseColors: ["#E79D13"], - smooth: true, - lightness: 0, - saturation: 100, - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - colors: { - "100": "hsl(34, 91%, 9%)", - "200": "hsl(34, 91%, 13%)", - "300": "hsl(35, 93%, 17%)", - "400": "hsl(35, 92%, 21%)", - "500": "hsl(35, 93%, 27%)", - "600": "hsl(35, 92%, 35%)", - "700": "hsl(35, 92%, 42%)", - "800": "hsl(35, 93%, 48%)", - "900": "hsl(35, 100%, 72%)", - "1000": "hsl(35, 100%, 80%)", - }, - }, - danger: { - baseColors: ["#D93036"], - smooth: true, - lightness: 0, - saturation: 100, - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - colors: { - "100": "hsl(357, 64%, 14%)", - "200": "hsl(358, 64%, 21%)", - "300": "hsl(358, 64%, 26%)", - "400": "hsl(358, 64%, 32%)", - "500": "hsl(358, 64%, 42%)", - "600": "hsl(358, 69%, 55%)", - "700": "hsl(358, 69%, 65%)", - "800": "hsl(358, 69%, 72%)", - "900": "hsl(359, 70%, 86%)", - "1000": "hsl(358, 69%, 90%)", - }, - }, - accent: { - baseColors: ["#0091FF"], - smooth: true, - lightness: 0, - saturation: 100, - ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], - colors: { - "100": "hsl(211, 51%, 12%)", - "200": "hsl(211, 52%, 18%)", - "300": "hsl(210, 52%, 23%)", - "400": "hsl(209, 51%, 28%)", - "500": "hsl(210, 52%, 37%)", - "600": "hsl(210, 51%, 48%)", - "700": "hsl(210, 68%, 57%)", - "800": "hsl(210, 85%, 65%)", - "900": "hsl(210, 100%, 82%)", - "1000": "hsl(210, 100%, 87%)", - }, - }, - }, - }, - radius: "0.5", // in rem -}; +import type { Theme } from "@/types/theme"; + +export const defaultTheme: Theme = { + light: { + palettes: { + neutral: { + baseColors: ["#000000"], + ratios: [1, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + smooth: true, + lightness: 97, + saturation: 100, + colors: { + "100": "hsl(0, 0%, 96%)", + "200": "hsl(0, 0%, 88%)", + "300": "hsl(0, 0%, 79%)", + "400": "hsl(0, 0%, 66%)", + "500": "hsl(0, 0%, 54%)", + "600": "hsl(0, 0%, 51%)", + "700": "hsl(0, 0%, 48%)", + "800": "hsl(0, 0%, 45%)", + "900": "hsl(0, 0%, 16%)", + "1000": "hsl(0, 0%, 12%)", + }, + }, + primary: { + baseColors: ["#ffffff"], + smooth: true, + lightness: 97, + saturation: 100, + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + colors: { + "100": "hsl(0, 0%, 87%)", + "200": "hsl(0, 0%, 79%)", + "300": "hsl(0, 0%, 73%)", + "400": "hsl(0, 0%, 65%)", + "500": "hsl(0, 0%, 54%)", + "600": "hsl(0, 0%, 42%)", + "700": "hsl(0, 0%, 35%)", + "800": "hsl(0, 0%, 28%)", + "900": "hsl(0, 0%, 16%)", + "1000": "hsl(0, 0%, 12%)", + }, + }, + success: { + baseColors: ["#1A9338"], + smooth: true, + lightness: 97, + saturation: 100, + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + colors: { + "100": "hsl(130, 34%, 83%)", + "200": "hsl(131, 35%, 75%)", + "300": "hsl(131, 35%, 66%)", + "400": "hsl(132, 35%, 56%)", + "500": "hsl(131, 41%, 43%)", + "600": "hsl(132, 41%, 34%)", + "700": "hsl(132, 41%, 28%)", + "800": "hsl(131, 41%, 23%)", + "900": "hsl(131, 40%, 13%)", + "1000": "hsl(132, 42%, 9%)", + }, + }, + warning: { + baseColors: ["#E79D13"], + smooth: true, + lightness: 97, + saturation: 100, + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + colors: { + "100": "hsl(35, 100%, 80%)", + "200": "hsl(35, 100%, 69%)", + "300": "hsl(35, 100%, 58%)", + "400": "hsl(35, 93%, 49%)", + "500": "hsl(35, 92%, 41%)", + "600": "hsl(35, 93%, 32%)", + "700": "hsl(35, 93%, 26%)", + "800": "hsl(35, 93%, 22%)", + "900": "hsl(35, 94%, 12%)", + "1000": "hsl(36, 91%, 9%)", + }, + }, + danger: { + baseColors: ["#D93036"], + smooth: true, + lightness: 97, + saturation: 100, + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + colors: { + "100": "hsl(358, 69%, 90%)", + "200": "hsl(358, 69%, 85%)", + "300": "hsl(358, 70%, 79%)", + "400": "hsl(358, 69%, 73%)", + "500": "hsl(358, 69%, 63%)", + "600": "hsl(358, 64%, 49%)", + "700": "hsl(358, 63%, 41%)", + "800": "hsl(358, 64%, 33%)", + "900": "hsl(357, 64%, 20%)", + "1000": "hsl(358, 65%, 15%)", + }, + }, + accent: { + baseColors: ["#0091FF"], + smooth: true, + lightness: 97, + saturation: 100, + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + colors: { + "100": "hsl(210, 100%, 88%)", + "200": "hsl(210, 100%, 81%)", + "300": "hsl(210, 100%, 74%)", + "400": "hsl(210, 100%, 67%)", + "500": "hsl(210, 64%, 55%)", + "600": "hsl(210, 51%, 44%)", + "700": "hsl(210, 51%, 36%)", + "800": "hsl(210, 52%, 29%)", + "900": "hsl(211, 52%, 17%)", + "1000": "hsl(211, 52%, 12%)", + }, + }, + }, + }, + dark: { + palettes: { + neutral: { + baseColors: ["#ffffff"], + smooth: true, + lightness: 0, + saturation: 100, + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + colors: { + "100": "hsl(0, 0%, 1%)", + "200": "hsl(0, 0%, 17%)", + "300": "hsl(0, 0%, 22%)", + "400": "hsl(0, 0%, 27%)", + "500": "hsl(0, 0%, 36%)", + "600": "hsl(0, 0%, 47%)", + "700": "hsl(0, 0%, 55%)", + "800": "hsl(0, 0%, 64%)", + "900": "hsl(0, 0%, 80%)", + "1000": "hsl(0, 0%, 86%)", + }, + }, + primary: { + baseColors: ["#000000"], + smooth: true, + lightness: 0, + saturation: 100, + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + colors: { + "100": "hsl(0, 0%, 12%)", + "200": "hsl(0, 0%, 17%)", + "300": "hsl(0, 0%, 22%)", + "400": "hsl(0, 0%, 27%)", + "500": "hsl(0, 0%, 36%)", + "600": "hsl(0, 0%, 47%)", + "700": "hsl(0, 0%, 55%)", + "800": "hsl(0, 0%, 64%)", + "900": "hsl(0, 0%, 80%)", + "1000": "hsl(0, 0%, 86%)", + }, + }, + success: { + baseColors: ["#1A9338"], + smooth: true, + lightness: 0, + saturation: 100, + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + colors: { + "100": "hsl(132, 42%, 9%)", + "200": "hsl(130, 41%, 14%)", + "300": "hsl(131, 41%, 18%)", + "400": "hsl(132, 41%, 22%)", + "500": "hsl(131, 41%, 29%)", + "600": "hsl(131, 41%, 38%)", + "700": "hsl(131, 41%, 45%)", + "800": "hsl(131, 34%, 55%)", + "900": "hsl(131, 34%, 76%)", + "1000": "hsl(130, 35%, 83%)", + }, + }, + warning: { + baseColors: ["#E79D13"], + smooth: true, + lightness: 0, + saturation: 100, + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + colors: { + "100": "hsl(34, 91%, 9%)", + "200": "hsl(34, 91%, 13%)", + "300": "hsl(35, 93%, 17%)", + "400": "hsl(35, 92%, 21%)", + "500": "hsl(35, 93%, 27%)", + "600": "hsl(35, 92%, 35%)", + "700": "hsl(35, 92%, 42%)", + "800": "hsl(35, 93%, 48%)", + "900": "hsl(35, 100%, 72%)", + "1000": "hsl(35, 100%, 80%)", + }, + }, + danger: { + baseColors: ["#D93036"], + smooth: true, + lightness: 0, + saturation: 100, + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + colors: { + "100": "hsl(357, 64%, 14%)", + "200": "hsl(358, 64%, 21%)", + "300": "hsl(358, 64%, 26%)", + "400": "hsl(358, 64%, 32%)", + "500": "hsl(358, 64%, 42%)", + "600": "hsl(358, 69%, 55%)", + "700": "hsl(358, 69%, 65%)", + "800": "hsl(358, 69%, 72%)", + "900": "hsl(359, 70%, 86%)", + "1000": "hsl(358, 69%, 90%)", + }, + }, + accent: { + baseColors: ["#0091FF"], + smooth: true, + lightness: 0, + saturation: 100, + ratios: [1.25, 1.5, 1.8, 2.23, 3.16, 4.78, 6.36, 8.28, 13.2, 15.2], + colors: { + "100": "hsl(211, 51%, 12%)", + "200": "hsl(211, 52%, 18%)", + "300": "hsl(210, 52%, 23%)", + "400": "hsl(209, 51%, 28%)", + "500": "hsl(210, 52%, 37%)", + "600": "hsl(210, 51%, 48%)", + "700": "hsl(210, 68%, 57%)", + "800": "hsl(210, 85%, 65%)", + "900": "hsl(210, 100%, 82%)", + "1000": "hsl(210, 100%, 87%)", + }, + }, + }, + }, + radius: "0.5", // in rem +}; diff --git a/www/src/registry/blocks.ts b/www/src/registry/blocks.ts index 9a8b471c..eb7078b2 100644 --- a/www/src/registry/blocks.ts +++ b/www/src/registry/blocks.ts @@ -1,3 +1,3 @@ -import type { Registry } from "@dotui/registry/types"; - -export const blocks: Registry = []; +import type { Registry } from "@dotui/registry/types"; + +export const blocks: Registry = []; diff --git a/www/src/registry/core.ts b/www/src/registry/core.ts index dc4a4451..0ff251de 100644 --- a/www/src/registry/core.ts +++ b/www/src/registry/core.ts @@ -1,671 +1,671 @@ -import type { Registry } from "@dotui/registry/types"; - -export const core: Registry = [ - { - name: "alert", - type: "registry:core", - files: [ - { - path: "core/alert/alert.tsx", - type: "registry:core", - target: "core/alert.tsx", - }, - ], - }, - { - name: "aspect-ratio", - type: "registry:core", - dependencies: ["@radix-ui/react-aspect-ratio"], - files: [ - { - path: "core/aspect-ratio/aspect-ratio.tsx", - type: "registry:core", - target: "core/aspect-ratio.tsx", - }, - ], - }, - { - name: "avatar", - type: "registry:core", - files: [ - { - path: "core/avatar/avatar.tsx", - type: "registry:core", - target: "core/avatar.tsx", - }, - ], - }, - { - name: "badge", - type: "registry:core", - files: [ - { - path: "core/badge/badge.tsx", - type: "registry:core", - target: "core/badge.tsx", - }, - ], - }, - { - name: "breadcrumbs", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/breadcrumbs/breadcrumbs.tsx", - type: "registry:core", - target: "core/breadcrumbs.tsx", - }, - ], - }, - { - name: "button", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/button/button.tsx", - type: "registry:core", - target: "core/button.tsx", - }, - ], - }, - { - name: "calendar", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["button", "heading", "text"], - files: [ - { - path: "core/calendar/calendar.tsx", - type: "registry:core", - target: "core/calendar.tsx", - }, - ], - }, - { - name: "checkbox", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/checkbox/checkbox.tsx", - type: "registry:core", - target: "core/checkbox.tsx", - }, - ], - }, - { - name: "checkbox-group", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["checkbox"], - files: [ - { - path: "core/checkbox-group/checkbox-group.tsx", - type: "registry:core", - target: "core/checkbox-group.tsx", - }, - ], - }, - { - name: "color-area", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["color-thumb"], - files: [ - { - path: "core/color-area/color-area.tsx", - type: "registry:core", - target: "core/color-area.tsx", - }, - ], - }, - { - name: "color-field", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["field", "input"], - files: [ - { - path: "core/color-field/color-field.tsx", - type: "registry:core", - target: "core/color-field.tsx", - }, - ], - }, - { - name: "color-picker", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: [ - "button", - "color-area", - "color-field", - "color-slider", - "color-swatch", - "dialog", - "list-box", - "select", - ], - files: [ - { - path: "core/color-picker/color-picker.tsx", - type: "registry:core", - target: "core/color-picker.tsx", - }, - ], - }, - { - name: "color-slider", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["color-thumb", "field"], - files: [ - { - path: "core/color-slider/color-slider.tsx", - type: "registry:core", - target: "core/color-slider.tsx", - }, - ], - }, - { - name: "color-swatch", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/color-swatch/color-swatch.tsx", - type: "registry:core", - target: "core/color-swatch.tsx", - }, - ], - }, - { - name: "color-thumb", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/color-thumb/color-thumb.tsx", - type: "registry:core", - target: "core/color-thumb.tsx", - }, - ], - }, - { - name: "combobox", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["button", "field", "input", "list-box", "overlay"], - files: [ - { - path: "core/combobox/combobox.tsx", - type: "registry:core", - target: "core/combobox.tsx", - }, - ], - }, - { - name: "date-field", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["date-input", "field", "input"], - files: [ - { - path: "core/date-field/date-field.tsx", - type: "registry:core", - target: "core/date-field.tsx", - }, - ], - }, - { - name: "date-input", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/date-input/date-input.tsx", - type: "registry:core", - target: "core/date-input.tsx", - }, - ], - }, - { - name: "date-picker", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: [ - "button", - "calendar", - "dialog", - "date-input", - "field", - "input", - ], - files: [ - { - path: "core/date-picker/date-picker.tsx", - type: "registry:core", - target: "core/date-picker.tsx", - }, - ], - }, - { - name: "date-range-picker", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: [ - "button", - "range-calendar", - "dialog", - "date-input", - "field", - "input", - ], - files: [ - { - path: "core/date-range-picker/date-range-picker.tsx", - type: "registry:core", - target: "core/date-range-picker.tsx", - }, - ], - }, - { - name: "dialog", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["overlay", "heading", "text"], - files: [ - { - path: "core/dialog/dialog.tsx", - type: "registry:core", - target: "core/dialog.tsx", - }, - ], - }, - { - name: "drop-zone", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/drop-zone/drop-zone.tsx", - type: "registry:core", - target: "core/drop-zone.tsx", - }, - ], - }, - { - name: "field", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/field/field.tsx", - type: "registry:core", - target: "core/field.tsx", - }, - ], - }, - { - name: "file-trigger", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/file-trigger/file-trigger.tsx", - type: "registry:core", - target: "core/file-trigger.tsx", - }, - ], - }, - { - name: "group", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/group/group.tsx", - type: "registry:core", - target: "core/group.tsx", - }, - ], - }, - { - name: "heading", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/heading/heading.tsx", - type: "registry:core", - target: "core/heading.tsx", - }, - ], - }, - { - name: "input", - type: "registry:core", - dependencies: [ - "react-aria-components", - "@react-aria/utils", - "@react-stately/utils", - ], - files: [ - { - path: "core/input/input.tsx", - type: "registry:core", - target: "core/input.tsx", - }, - ], - }, - { - name: "kbd", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/kbd/kbd.tsx", - type: "registry:core", - target: "core/kbd.tsx", - }, - ], - }, - { - name: "link", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/link/link.tsx", - type: "registry:core", - target: "core/link.tsx", - }, - ], - }, - { - name: "list-box", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["text"], - files: [ - { - path: "core/list-box/list-box.tsx", - type: "registry:core", - target: "core/list-box.tsx", - }, - ], - }, - { - name: "menu", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["overlay", "kbd", "text"], - files: [ - { - path: "core/menu/menu.tsx", - type: "registry:core", - target: "core/menu.tsx", - }, - ], - }, - // TODO: add useMediaQuery - { - name: "number-field", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["input", "field", "button"], - files: [ - { - path: "core/number-field/number-field.tsx", - type: "registry:core", - target: "core/number-field.tsx", - }, - ], - }, - // TODO: add useMediaQuery - { - name: "overlay", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["button"], - files: [ - { - path: "core/overlay/overlay.tsx", - type: "registry:core", - target: "core/overlay.tsx", - }, - { - path: "core/overlay/use-motion-drawer.tsx", - type: "registry:core", - target: "core/overlay.tsx", - }, - ], - }, - { - name: "progress", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["field"], - files: [ - { - path: "core/progress/progress.tsx", - type: "registry:core", - target: "core/progress.tsx", - }, - ], - }, - { - name: "radio-group", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["field"], - files: [ - { - path: "core/radio-group/radio-group.tsx", - type: "registry:core", - target: "core/radio-group.tsx", - }, - ], - }, - { - name: "range-calendar", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["button", "calendar", "heading", "text"], - files: [ - { - path: "core/range-calendar/range-calendar.tsx", - type: "registry:core", - target: "core/range-calendar.tsx", - }, - ], - }, - { - name: "scroll-area", - type: "registry:core", - dependencies: ["@radix-ui/react-scroll-area"], - files: [ - { - path: "core/scroll-area/scroll-area.tsx", - type: "registry:core", - target: "core/scroll-area.tsx", - }, - ], - }, - { - name: "search-field", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["button", "field", "input"], - files: [ - { - path: "core/search-field/search-field.tsx", - type: "registry:core", - target: "core/search-field.tsx", - }, - ], - }, - { - name: "section", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/section/section.tsx", - type: "registry:core", - target: "core/section.tsx", - }, - ], - }, - { - name: "select", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["button", "field", "list-box", "overlay"], - files: [ - { - path: "core/select/select.tsx", - type: "registry:core", - target: "core/select.tsx", - }, - ], - }, - { - name: "separator", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/separator/separator.tsx", - type: "registry:core", - target: "core/separator.tsx", - }, - ], - }, - { - name: "skeleton", - type: "registry:core", - files: [ - { - path: "core/separator/separator.tsx", - type: "registry:core", - target: "core/separator.tsx", - }, - ], - }, - { - name: "slider", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["field"], - files: [ - { - path: "core/slider/slider.tsx", - type: "registry:core", - target: "core/slider.tsx", - }, - ], - }, - { - name: "switch", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/switch/switch.tsx", - type: "registry:core", - target: "core/switch.tsx", - }, - ], - }, - { - name: "tabs", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/tabs/tabs.tsx", - type: "registry:core", - target: "core/tabs.tsx", - }, - ], - }, - { - name: "text", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/text/text.tsx", - type: "registry:core", - target: "core/text.tsx", - }, - ], - }, - { - name: "text-area", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["field", "input", "text-field"], - files: [ - { - path: "core/text-area/text-area.tsx", - type: "registry:core", - target: "core/text-area.tsx", - }, - ], - }, - { - name: "text-field", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["field", "input"], - files: [ - { - path: "core/text-field/text-field.tsx", - type: "registry:core", - target: "core/text-field.tsx", - }, - ], - }, - { - name: "time-field", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["field", "input", "date-input"], - files: [ - { - path: "core/time-field/time-field.tsx", - type: "registry:core", - target: "core/time-field.tsx", - }, - ], - }, - { - name: "toggle-button", - type: "registry:core", - dependencies: ["react-aria-components"], - files: [ - { - path: "core/toggle-button/toggle-button.tsx", - type: "registry:core", - target: "core/toggle-button.tsx", - }, - ], - }, - { - name: "tooltip", - type: "registry:core", - dependencies: ["react-aria-components"], - registryDependencies: ["overlay", "text"], - files: [ - { - path: "core/tooltip/tooltip.tsx", - type: "registry:core", - target: "core/tooltip.tsx", - }, - ], - }, -]; +import type { Registry } from "@dotui/registry/types"; + +export const core: Registry = [ + { + name: "alert", + type: "registry:core", + files: [ + { + path: "core/alert/alert.tsx", + type: "registry:core", + target: "core/alert.tsx", + }, + ], + }, + { + name: "aspect-ratio", + type: "registry:core", + dependencies: ["@radix-ui/react-aspect-ratio"], + files: [ + { + path: "core/aspect-ratio/aspect-ratio.tsx", + type: "registry:core", + target: "core/aspect-ratio.tsx", + }, + ], + }, + { + name: "avatar", + type: "registry:core", + files: [ + { + path: "core/avatar/avatar.tsx", + type: "registry:core", + target: "core/avatar.tsx", + }, + ], + }, + { + name: "badge", + type: "registry:core", + files: [ + { + path: "core/badge/badge.tsx", + type: "registry:core", + target: "core/badge.tsx", + }, + ], + }, + { + name: "breadcrumbs", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/breadcrumbs/breadcrumbs.tsx", + type: "registry:core", + target: "core/breadcrumbs.tsx", + }, + ], + }, + { + name: "button", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/button/button.tsx", + type: "registry:core", + target: "core/button.tsx", + }, + ], + }, + { + name: "calendar", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["button", "heading", "text"], + files: [ + { + path: "core/calendar/calendar.tsx", + type: "registry:core", + target: "core/calendar.tsx", + }, + ], + }, + { + name: "checkbox", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/checkbox/checkbox.tsx", + type: "registry:core", + target: "core/checkbox.tsx", + }, + ], + }, + { + name: "checkbox-group", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["checkbox"], + files: [ + { + path: "core/checkbox-group/checkbox-group.tsx", + type: "registry:core", + target: "core/checkbox-group.tsx", + }, + ], + }, + { + name: "color-area", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["color-thumb"], + files: [ + { + path: "core/color-area/color-area.tsx", + type: "registry:core", + target: "core/color-area.tsx", + }, + ], + }, + { + name: "color-field", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["field", "input"], + files: [ + { + path: "core/color-field/color-field.tsx", + type: "registry:core", + target: "core/color-field.tsx", + }, + ], + }, + { + name: "color-picker", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: [ + "button", + "color-area", + "color-field", + "color-slider", + "color-swatch", + "dialog", + "list-box", + "select", + ], + files: [ + { + path: "core/color-picker/color-picker.tsx", + type: "registry:core", + target: "core/color-picker.tsx", + }, + ], + }, + { + name: "color-slider", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["color-thumb", "field"], + files: [ + { + path: "core/color-slider/color-slider.tsx", + type: "registry:core", + target: "core/color-slider.tsx", + }, + ], + }, + { + name: "color-swatch", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/color-swatch/color-swatch.tsx", + type: "registry:core", + target: "core/color-swatch.tsx", + }, + ], + }, + { + name: "color-thumb", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/color-thumb/color-thumb.tsx", + type: "registry:core", + target: "core/color-thumb.tsx", + }, + ], + }, + { + name: "combobox", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["button", "field", "input", "list-box", "overlay"], + files: [ + { + path: "core/combobox/combobox.tsx", + type: "registry:core", + target: "core/combobox.tsx", + }, + ], + }, + { + name: "date-field", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["date-input", "field", "input"], + files: [ + { + path: "core/date-field/date-field.tsx", + type: "registry:core", + target: "core/date-field.tsx", + }, + ], + }, + { + name: "date-input", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/date-input/date-input.tsx", + type: "registry:core", + target: "core/date-input.tsx", + }, + ], + }, + { + name: "date-picker", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: [ + "button", + "calendar", + "dialog", + "date-input", + "field", + "input", + ], + files: [ + { + path: "core/date-picker/date-picker.tsx", + type: "registry:core", + target: "core/date-picker.tsx", + }, + ], + }, + { + name: "date-range-picker", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: [ + "button", + "range-calendar", + "dialog", + "date-input", + "field", + "input", + ], + files: [ + { + path: "core/date-range-picker/date-range-picker.tsx", + type: "registry:core", + target: "core/date-range-picker.tsx", + }, + ], + }, + { + name: "dialog", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["overlay", "heading", "text"], + files: [ + { + path: "core/dialog/dialog.tsx", + type: "registry:core", + target: "core/dialog.tsx", + }, + ], + }, + { + name: "drop-zone", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/drop-zone/drop-zone.tsx", + type: "registry:core", + target: "core/drop-zone.tsx", + }, + ], + }, + { + name: "field", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/field/field.tsx", + type: "registry:core", + target: "core/field.tsx", + }, + ], + }, + { + name: "file-trigger", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/file-trigger/file-trigger.tsx", + type: "registry:core", + target: "core/file-trigger.tsx", + }, + ], + }, + { + name: "group", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/group/group.tsx", + type: "registry:core", + target: "core/group.tsx", + }, + ], + }, + { + name: "heading", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/heading/heading.tsx", + type: "registry:core", + target: "core/heading.tsx", + }, + ], + }, + { + name: "input", + type: "registry:core", + dependencies: [ + "react-aria-components", + "@react-aria/utils", + "@react-stately/utils", + ], + files: [ + { + path: "core/input/input.tsx", + type: "registry:core", + target: "core/input.tsx", + }, + ], + }, + { + name: "kbd", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/kbd/kbd.tsx", + type: "registry:core", + target: "core/kbd.tsx", + }, + ], + }, + { + name: "link", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/link/link.tsx", + type: "registry:core", + target: "core/link.tsx", + }, + ], + }, + { + name: "list-box", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["text"], + files: [ + { + path: "core/list-box/list-box.tsx", + type: "registry:core", + target: "core/list-box.tsx", + }, + ], + }, + { + name: "menu", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["overlay", "kbd", "text"], + files: [ + { + path: "core/menu/menu.tsx", + type: "registry:core", + target: "core/menu.tsx", + }, + ], + }, + // TODO: add useMediaQuery + { + name: "number-field", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["input", "field", "button"], + files: [ + { + path: "core/number-field/number-field.tsx", + type: "registry:core", + target: "core/number-field.tsx", + }, + ], + }, + // TODO: add useMediaQuery + { + name: "overlay", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["button"], + files: [ + { + path: "core/overlay/overlay.tsx", + type: "registry:core", + target: "core/overlay.tsx", + }, + { + path: "core/overlay/use-motion-drawer.tsx", + type: "registry:core", + target: "core/overlay.tsx", + }, + ], + }, + { + name: "progress", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["field"], + files: [ + { + path: "core/progress/progress.tsx", + type: "registry:core", + target: "core/progress.tsx", + }, + ], + }, + { + name: "radio-group", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["field"], + files: [ + { + path: "core/radio-group/radio-group.tsx", + type: "registry:core", + target: "core/radio-group.tsx", + }, + ], + }, + { + name: "range-calendar", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["button", "calendar", "heading", "text"], + files: [ + { + path: "core/range-calendar/range-calendar.tsx", + type: "registry:core", + target: "core/range-calendar.tsx", + }, + ], + }, + { + name: "scroll-area", + type: "registry:core", + dependencies: ["@radix-ui/react-scroll-area"], + files: [ + { + path: "core/scroll-area/scroll-area.tsx", + type: "registry:core", + target: "core/scroll-area.tsx", + }, + ], + }, + { + name: "search-field", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["button", "field", "input"], + files: [ + { + path: "core/search-field/search-field.tsx", + type: "registry:core", + target: "core/search-field.tsx", + }, + ], + }, + { + name: "section", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/section/section.tsx", + type: "registry:core", + target: "core/section.tsx", + }, + ], + }, + { + name: "select", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["button", "field", "list-box", "overlay"], + files: [ + { + path: "core/select/select.tsx", + type: "registry:core", + target: "core/select.tsx", + }, + ], + }, + { + name: "separator", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/separator/separator.tsx", + type: "registry:core", + target: "core/separator.tsx", + }, + ], + }, + { + name: "skeleton", + type: "registry:core", + files: [ + { + path: "core/separator/separator.tsx", + type: "registry:core", + target: "core/separator.tsx", + }, + ], + }, + { + name: "slider", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["field"], + files: [ + { + path: "core/slider/slider.tsx", + type: "registry:core", + target: "core/slider.tsx", + }, + ], + }, + { + name: "switch", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/switch/switch.tsx", + type: "registry:core", + target: "core/switch.tsx", + }, + ], + }, + { + name: "tabs", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/tabs/tabs.tsx", + type: "registry:core", + target: "core/tabs.tsx", + }, + ], + }, + { + name: "text", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/text/text.tsx", + type: "registry:core", + target: "core/text.tsx", + }, + ], + }, + { + name: "text-area", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["field", "input", "text-field"], + files: [ + { + path: "core/text-area/text-area.tsx", + type: "registry:core", + target: "core/text-area.tsx", + }, + ], + }, + { + name: "text-field", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["field", "input"], + files: [ + { + path: "core/text-field/text-field.tsx", + type: "registry:core", + target: "core/text-field.tsx", + }, + ], + }, + { + name: "time-field", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["field", "input", "date-input"], + files: [ + { + path: "core/time-field/time-field.tsx", + type: "registry:core", + target: "core/time-field.tsx", + }, + ], + }, + { + name: "toggle-button", + type: "registry:core", + dependencies: ["react-aria-components"], + files: [ + { + path: "core/toggle-button/toggle-button.tsx", + type: "registry:core", + target: "core/toggle-button.tsx", + }, + ], + }, + { + name: "tooltip", + type: "registry:core", + dependencies: ["react-aria-components"], + registryDependencies: ["overlay", "text"], + files: [ + { + path: "core/tooltip/tooltip.tsx", + type: "registry:core", + target: "core/tooltip.tsx", + }, + ], + }, +]; diff --git a/www/src/registry/hooks.ts b/www/src/registry/hooks.ts index 9a88e423..0cb513c8 100644 --- a/www/src/registry/hooks.ts +++ b/www/src/registry/hooks.ts @@ -1,9 +1,9 @@ -import type { Registry } from "@dotui/registry/types"; - -export const hooks: Registry = [ - { - name: "use-media-query", - type: "registry:hook", - files: ["hooks/use-media-query.ts"], - }, -]; +import type { Registry } from "@dotui/registry/types"; + +export const hooks: Registry = [ + { + name: "use-media-query", + type: "registry:hook", + files: ["hooks/use-media-query.ts"], + }, +]; diff --git a/www/src/registry/hooks/use-battery.ts b/www/src/registry/hooks/use-battery.ts index 358c687d..6255b97c 100644 --- a/www/src/registry/hooks/use-battery.ts +++ b/www/src/registry/hooks/use-battery.ts @@ -1,76 +1,76 @@ -import React from "react"; - -interface BatteryManager extends EventTarget { - charging: boolean; - chargingTime: number; - dischargingTime: number; - level: number; -} - -type NavigatorWithBattery = Navigator & { - getBattery: () => Promise; -}; - -export function useBattery() { - const [state, setState] = React.useState<{ - isSupported: boolean; - isLoading: boolean; - isCharging: boolean; - level: number; - chargingTime: number; - dischargingTime: number; - }>({ - isSupported: false, - isLoading: true, - isCharging: false, - level: 1, - chargingTime: 0, - dischargingTime: 0, - }); - - React.useEffect(() => { - if (!(navigator as NavigatorWithBattery).getBattery) { - setState((s) => ({ - ...s, - isSupported: false, - isLoading: false, - })); - return; - } - - let battery: BatteryManager | null; - - const handleChange = () => { - if (!battery) return; - setState({ - isSupported: true, - isLoading: false, - level: battery.level, - isCharging: battery.charging, - chargingTime: battery.chargingTime, - dischargingTime: battery.dischargingTime, - }); - }; - - void (navigator as NavigatorWithBattery).getBattery().then((b) => { - battery = b; - handleChange(); - - b.addEventListener("levelchange", handleChange); - b.addEventListener("chargingchange", handleChange); - b.addEventListener("chargingtimechange", handleChange); - b.addEventListener("dischargingtimechange", handleChange); - }); - - return () => { - if (battery) { - battery.removeEventListener("levelchange", handleChange); - battery.removeEventListener("chargingchange", handleChange); - battery.removeEventListener("chargingtimechange", handleChange); - battery.removeEventListener("dischargingtimechange", handleChange); - } - }; - }, []); - - return state; -} +import React from "react"; + +interface BatteryManager extends EventTarget { + charging: boolean; + chargingTime: number; + dischargingTime: number; + level: number; +} + +type NavigatorWithBattery = Navigator & { + getBattery: () => Promise; +}; + +export function useBattery() { + const [state, setState] = React.useState<{ + isSupported: boolean; + isLoading: boolean; + isCharging: boolean; + level: number; + chargingTime: number; + dischargingTime: number; + }>({ + isSupported: false, + isLoading: true, + isCharging: false, + level: 1, + chargingTime: 0, + dischargingTime: 0, + }); + + React.useEffect(() => { + if (!(navigator as NavigatorWithBattery).getBattery) { + setState((s) => ({ + ...s, + isSupported: false, + isLoading: false, + })); + return; + } + + let battery: BatteryManager | null; + + const handleChange = () => { + if (!battery) return; + setState({ + isSupported: true, + isLoading: false, + level: battery.level, + isCharging: battery.charging, + chargingTime: battery.chargingTime, + dischargingTime: battery.dischargingTime, + }); + }; + + void (navigator as NavigatorWithBattery).getBattery().then((b) => { + battery = b; + handleChange(); + + b.addEventListener("levelchange", handleChange); + b.addEventListener("chargingchange", handleChange); + b.addEventListener("chargingtimechange", handleChange); + b.addEventListener("dischargingtimechange", handleChange); + }); + + return () => { + if (battery) { + battery.removeEventListener("levelchange", handleChange); + battery.removeEventListener("chargingchange", handleChange); + battery.removeEventListener("chargingtimechange", handleChange); + battery.removeEventListener("dischargingtimechange", handleChange); + } + }; + }, []); + + return state; +} diff --git a/www/src/registry/hooks/use-counter.ts b/www/src/registry/hooks/use-counter.ts index d32469f3..10317296 100644 --- a/www/src/registry/hooks/use-counter.ts +++ b/www/src/registry/hooks/use-counter.ts @@ -1,85 +1,85 @@ -import React from "react"; - -export function useCounter( - startingValue = 0, - options: { min?: number; max?: number } = {} -): [ - number, - { - increment: () => void; - decrement: () => void; - set: (nextCount: number) => void; - reset: () => void; - }, -] { - const { min, max } = options; - - if (typeof min === "number" && startingValue < min) { - throw new Error( - `Your starting value of ${startingValue} is less than your min of ${min}.` - ); - } - - if (typeof max === "number" && startingValue > max) { - throw new Error( - `Your starting value of ${startingValue} is greater than your max of ${max}.` - ); - } - - const [count, setCount] = React.useState(startingValue); - - const increment = React.useCallback(() => { - setCount((c) => { - const nextCount = c + 1; - - if (typeof max === "number" && nextCount > max) { - return c; - } - - return nextCount; - }); - }, [max]); - - const decrement = React.useCallback(() => { - setCount((c) => { - const nextCount = c - 1; - - if (typeof min === "number" && nextCount < min) { - return c; - } - - return nextCount; - }); - }, [min]); - - const set = React.useCallback( - (nextCount: number) => { - setCount((c) => { - if (typeof max === "number" && nextCount > max) { - return c; - } - - if (typeof min === "number" && nextCount < min) { - return c; - } - - return nextCount; - }); - }, - [max, min] - ); - - const reset = React.useCallback(() => { - setCount(startingValue); - }, [startingValue]); - - return [ - count, - { - increment, - decrement, - set, - reset, - }, - ]; -} +import React from "react"; + +export function useCounter( + startingValue = 0, + options: { min?: number; max?: number } = {} +): [ + number, + { + increment: () => void; + decrement: () => void; + set: (nextCount: number) => void; + reset: () => void; + }, +] { + const { min, max } = options; + + if (typeof min === "number" && startingValue < min) { + throw new Error( + `Your starting value of ${startingValue} is less than your min of ${min}.` + ); + } + + if (typeof max === "number" && startingValue > max) { + throw new Error( + `Your starting value of ${startingValue} is greater than your max of ${max}.` + ); + } + + const [count, setCount] = React.useState(startingValue); + + const increment = React.useCallback(() => { + setCount((c) => { + const nextCount = c + 1; + + if (typeof max === "number" && nextCount > max) { + return c; + } + + return nextCount; + }); + }, [max]); + + const decrement = React.useCallback(() => { + setCount((c) => { + const nextCount = c - 1; + + if (typeof min === "number" && nextCount < min) { + return c; + } + + return nextCount; + }); + }, [min]); + + const set = React.useCallback( + (nextCount: number) => { + setCount((c) => { + if (typeof max === "number" && nextCount > max) { + return c; + } + + if (typeof min === "number" && nextCount < min) { + return c; + } + + return nextCount; + }); + }, + [max, min] + ); + + const reset = React.useCallback(() => { + setCount(startingValue); + }, [startingValue]); + + return [ + count, + { + increment, + decrement, + set, + reset, + }, + ]; +} diff --git a/www/src/registry/hooks/use-debounce.ts b/www/src/registry/hooks/use-debounce.ts index ce3a701a..51144612 100644 --- a/www/src/registry/hooks/use-debounce.ts +++ b/www/src/registry/hooks/use-debounce.ts @@ -1,17 +1,17 @@ -import React from "react"; - -export function useDebounce(value: T, delay: number): T { - const [debouncedValue, setDebouncedValue] = React.useState(value); - - React.useEffect(() => { - const handler = setTimeout(() => { - setDebouncedValue(value); - }, delay); - - return () => { - clearTimeout(handler); - }; - }, [value, delay]); - - return debouncedValue; -} +import React from "react"; + +export function useDebounce(value: T, delay: number): T { + const [debouncedValue, setDebouncedValue] = React.useState(value); + + React.useEffect(() => { + const handler = setTimeout(() => { + setDebouncedValue(value); + }, delay); + + return () => { + clearTimeout(handler); + }; + }, [value, delay]); + + return debouncedValue; +} diff --git a/www/src/registry/hooks/use-in-view.ts b/www/src/registry/hooks/use-in-view.ts index af25627d..f2b9fefe 100644 --- a/www/src/registry/hooks/use-in-view.ts +++ b/www/src/registry/hooks/use-in-view.ts @@ -1,3 +1,3 @@ -export const useInView = () => { - return; -}; +export const useInView = () => { + return; +}; diff --git a/www/src/registry/hooks/use-intersection-observer.ts b/www/src/registry/hooks/use-intersection-observer.ts index 93bc6ffa..e1216d33 100644 --- a/www/src/registry/hooks/use-intersection-observer.ts +++ b/www/src/registry/hooks/use-intersection-observer.ts @@ -1,36 +1,36 @@ -import React from "react"; - -export const useIntersectionObserver = ( - options: IntersectionObserverInit = {} -): [React.RefCallback, IntersectionObserverEntry | null] => { - const { threshold = 1, root = null, rootMargin = "0px" } = options; - const [entry, setEntry] = React.useState( - null - ); - - const previousObserver = React.useRef(null); - - const customRef = React.useCallback( - (node: Element | null) => { - if (previousObserver.current) { - previousObserver.current.disconnect(); - previousObserver.current = null; - } - - if (node?.nodeType === Node.ELEMENT_NODE) { - const observer = new IntersectionObserver( - ([entry]) => { - setEntry(entry); - }, - { threshold, root, rootMargin } - ); - - observer.observe(node); - previousObserver.current = observer; - } - }, - [threshold, root, rootMargin] - ); - - return [customRef, entry]; -}; +import React from "react"; + +export const useIntersectionObserver = ( + options: IntersectionObserverInit = {} +): [React.RefCallback, IntersectionObserverEntry | null] => { + const { threshold = 1, root = null, rootMargin = "0px" } = options; + const [entry, setEntry] = React.useState( + null + ); + + const previousObserver = React.useRef(null); + + const customRef = React.useCallback( + (node: Element | null) => { + if (previousObserver.current) { + previousObserver.current.disconnect(); + previousObserver.current = null; + } + + if (node?.nodeType === Node.ELEMENT_NODE) { + const observer = new IntersectionObserver( + ([entry]) => { + setEntry(entry); + }, + { threshold, root, rootMargin } + ); + + observer.observe(node); + previousObserver.current = observer; + } + }, + [threshold, root, rootMargin] + ); + + return [customRef, entry]; +}; diff --git a/www/src/registry/hooks/use-is-client.ts b/www/src/registry/hooks/use-is-client.ts index a06d7213..7822f5b9 100644 --- a/www/src/registry/hooks/use-is-client.ts +++ b/www/src/registry/hooks/use-is-client.ts @@ -1,11 +1,11 @@ -import React from "react"; - -export function useIsClient() { - const [isClient, setIsClient] = React.useState(false); - - React.useEffect(() => { - setIsClient(true); - }, []); - - return isClient; -} +import React from "react"; + +export function useIsClient() { + const [isClient, setIsClient] = React.useState(false); + + React.useEffect(() => { + setIsClient(true); + }, []); + + return isClient; +} diff --git a/www/src/registry/hooks/use-list.ts b/www/src/registry/hooks/use-list.ts index 2fc24edb..a12ca18b 100644 --- a/www/src/registry/hooks/use-list.ts +++ b/www/src/registry/hooks/use-list.ts @@ -1,38 +1,38 @@ -import React from "react"; - -type CustomList = { - set: (l: T[]) => void; - push: (element: T) => void; - removeAt: (index: number) => void; - insertAt: (index: number, element: T) => void; - updateAt: (index: number, element: T) => void; - clear: () => void; -}; - -export function useList(defaultList: T[] = []): [T[], CustomList] { - const [list, setList] = React.useState(defaultList); - - const set = React.useCallback((l: T[]) => { - setList(l); - }, []); - - const push = React.useCallback((element: T) => { - setList((l) => [...l, element]); - }, []); - - const removeAt = React.useCallback((index: number) => { - setList((l) => [...l.slice(0, index), ...l.slice(index + 1)]); - }, []); - - const insertAt = React.useCallback((index: number, element: T) => { - setList((l) => [...l.slice(0, index), element, ...l.slice(index)]); - }, []); - - const updateAt = React.useCallback((index: number, element: T) => { - setList((l) => l.map((e, i) => (i === index ? element : e))); - }, []); - - const clear = React.useCallback(() => setList([]), []); - - return [list, { set, push, removeAt, insertAt, updateAt, clear }]; -} +import React from "react"; + +type CustomList = { + set: (l: T[]) => void; + push: (element: T) => void; + removeAt: (index: number) => void; + insertAt: (index: number, element: T) => void; + updateAt: (index: number, element: T) => void; + clear: () => void; +}; + +export function useList(defaultList: T[] = []): [T[], CustomList] { + const [list, setList] = React.useState(defaultList); + + const set = React.useCallback((l: T[]) => { + setList(l); + }, []); + + const push = React.useCallback((element: T) => { + setList((l) => [...l, element]); + }, []); + + const removeAt = React.useCallback((index: number) => { + setList((l) => [...l.slice(0, index), ...l.slice(index + 1)]); + }, []); + + const insertAt = React.useCallback((index: number, element: T) => { + setList((l) => [...l.slice(0, index), element, ...l.slice(index)]); + }, []); + + const updateAt = React.useCallback((index: number, element: T) => { + setList((l) => l.map((e, i) => (i === index ? element : e))); + }, []); + + const clear = React.useCallback(() => setList([]), []); + + return [list, { set, push, removeAt, insertAt, updateAt, clear }]; +} diff --git a/www/src/registry/hooks/use-local-storage.ts b/www/src/registry/hooks/use-local-storage.ts index 24017387..f6c356a9 100644 --- a/www/src/registry/hooks/use-local-storage.ts +++ b/www/src/registry/hooks/use-local-storage.ts @@ -1,73 +1,73 @@ -import React from "react"; - -function dispatchStorageEvent(key: string, newValue: string | null) { - window.dispatchEvent(new StorageEvent("storage", { key, newValue })); -} - -const setLocalStorageItem = (key: string, value: T) => { - const stringifiedValue = JSON.stringify(value); - window.localStorage.setItem(key, stringifiedValue); - dispatchStorageEvent(key, stringifiedValue); -}; - -const removeLocalStorageItem = (key: string) => { - window.localStorage.removeItem(key); - dispatchStorageEvent(key, null); -}; - -const getLocalStorageItem = (key: string) => { - return window.localStorage.getItem(key); -}; - -const useLocalStorageSubscribe = (callback: (event: StorageEvent) => void) => { - window.addEventListener("storage", callback); - return () => window.removeEventListener("storage", callback); -}; - -const getLocalStorageServerSnapshot = () => { - throw Error("useLocalStorage is a client-only hook"); -}; - -export function useLocalStorage( - key: string, - initialValue: T -): [T, React.Dispatch>] { - const getSnapshot = () => getLocalStorageItem(key); - - const store = React.useSyncExternalStore( - useLocalStorageSubscribe, - getSnapshot, - getLocalStorageServerSnapshot - ); - - const setState: React.Dispatch> = React.useCallback( - (v: T | ((prevState: T) => T)) => { - try { - const nextState = - typeof v === "function" - ? (v as (prevState: T) => T)(JSON.parse(store!) as T) - : v; - - if (nextState === undefined || nextState === null) { - removeLocalStorageItem(key); - } else { - setLocalStorageItem(key, nextState); - } - } catch (e) { - console.warn(e); - } - }, - [key, store] - ); - - React.useEffect(() => { - if ( - getLocalStorageItem(key) === null && - typeof initialValue !== "undefined" - ) { - setLocalStorageItem(key, initialValue); - } - }, [key, initialValue]); - - return [store ? (JSON.parse(store) as T) : initialValue, setState]; -} +import React from "react"; + +function dispatchStorageEvent(key: string, newValue: string | null) { + window.dispatchEvent(new StorageEvent("storage", { key, newValue })); +} + +const setLocalStorageItem = (key: string, value: T) => { + const stringifiedValue = JSON.stringify(value); + window.localStorage.setItem(key, stringifiedValue); + dispatchStorageEvent(key, stringifiedValue); +}; + +const removeLocalStorageItem = (key: string) => { + window.localStorage.removeItem(key); + dispatchStorageEvent(key, null); +}; + +const getLocalStorageItem = (key: string) => { + return window.localStorage.getItem(key); +}; + +const useLocalStorageSubscribe = (callback: (event: StorageEvent) => void) => { + window.addEventListener("storage", callback); + return () => window.removeEventListener("storage", callback); +}; + +const getLocalStorageServerSnapshot = () => { + throw Error("useLocalStorage is a client-only hook"); +}; + +export function useLocalStorage( + key: string, + initialValue: T +): [T, React.Dispatch>] { + const getSnapshot = () => getLocalStorageItem(key); + + const store = React.useSyncExternalStore( + useLocalStorageSubscribe, + getSnapshot, + getLocalStorageServerSnapshot + ); + + const setState: React.Dispatch> = React.useCallback( + (v: T | ((prevState: T) => T)) => { + try { + const nextState = + typeof v === "function" + ? (v as (prevState: T) => T)(JSON.parse(store!) as T) + : v; + + if (nextState === undefined || nextState === null) { + removeLocalStorageItem(key); + } else { + setLocalStorageItem(key, nextState); + } + } catch (e) { + console.warn(e); + } + }, + [key, store] + ); + + React.useEffect(() => { + if ( + getLocalStorageItem(key) === null && + typeof initialValue !== "undefined" + ) { + setLocalStorageItem(key, initialValue); + } + }, [key, initialValue]); + + return [store ? (JSON.parse(store) as T) : initialValue, setState]; +} diff --git a/www/src/registry/hooks/use-media-query.ts b/www/src/registry/hooks/use-media-query.ts index fcaae8a3..91ebd5e9 100644 --- a/www/src/registry/hooks/use-media-query.ts +++ b/www/src/registry/hooks/use-media-query.ts @@ -1,43 +1,43 @@ -import * as React from "react"; - -export function useMediaQuery(query: string) { - const [value, setValue] = React.useState(false); - - React.useEffect(() => { - function onChange(event: MediaQueryListEvent) { - setValue(event.matches); - } - - const result = matchMedia(query); - result.addEventListener("change", onChange); - setValue(result.matches); - - return () => result.removeEventListener("change", onChange); - }, [query]); - - return value; -} -// import React from "react"; - -// export function useMediaQuery(query: string): boolean { -// const subscribe = React.useCallback( -// (callback: (ev: MediaQueryListEvent) => void) => { -// const matchMedia = window.matchMedia(query); -// matchMedia.addEventListener("change", callback); -// return () => { -// matchMedia.removeEventListener("change", callback); -// }; -// }, -// [query] -// ); - -// const getSnapshot = () => { -// return window.matchMedia(query).matches; -// }; - -// const getServerSnapshot = () => { -// throw Error("useMediaQuery is a client-only hook"); -// }; - -// return React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); -// } +import * as React from "react"; + +export function useMediaQuery(query: string) { + const [value, setValue] = React.useState(false); + + React.useEffect(() => { + function onChange(event: MediaQueryListEvent) { + setValue(event.matches); + } + + const result = matchMedia(query); + result.addEventListener("change", onChange); + setValue(result.matches); + + return () => result.removeEventListener("change", onChange); + }, [query]); + + return value; +} +// import React from "react"; + +// export function useMediaQuery(query: string): boolean { +// const subscribe = React.useCallback( +// (callback: (ev: MediaQueryListEvent) => void) => { +// const matchMedia = window.matchMedia(query); +// matchMedia.addEventListener("change", callback); +// return () => { +// matchMedia.removeEventListener("change", callback); +// }; +// }, +// [query] +// ); + +// const getSnapshot = () => { +// return window.matchMedia(query).matches; +// }; + +// const getServerSnapshot = () => { +// throw Error("useMediaQuery is a client-only hook"); +// }; + +// return React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); +// } diff --git a/www/src/registry/hooks/use-mounted.ts b/www/src/registry/hooks/use-mounted.ts index e415a498..1a83589b 100644 --- a/www/src/registry/hooks/use-mounted.ts +++ b/www/src/registry/hooks/use-mounted.ts @@ -1,11 +1,11 @@ -import React from "react"; - -export function useMounted() { - const [isMounted, setIsMounted] = React.useState(false); - - React.useEffect(() => { - setIsMounted(true); - }, []); - - return isMounted; -} +import React from "react"; + +export function useMounted() { + const [isMounted, setIsMounted] = React.useState(false); + + React.useEffect(() => { + setIsMounted(true); + }, []); + + return isMounted; +} diff --git a/www/src/registry/hooks/use-mouse.ts b/www/src/registry/hooks/use-mouse.ts index 14bf5943..101ae8ce 100644 --- a/www/src/registry/hooks/use-mouse.ts +++ b/www/src/registry/hooks/use-mouse.ts @@ -1,63 +1,63 @@ -import React from "react"; - -type MousePosition = { - x: number; - y: number; - elementX: number; - elementY: number; - elementPositionX: number; - elementPositionY: number; -}; - -export function useMouse(): [ - MousePosition, - React.MutableRefObject, -] { - const [state, setState] = React.useState({ - x: 0, - y: 0, - elementX: 0, - elementY: 0, - elementPositionX: 0, - elementPositionY: 0, - }); - - const ref = React.useRef(null); - - React.useLayoutEffect(() => { - const handleMouseMove = (event: MouseEvent) => { - const newState: Partial = { - x: event.pageX, - y: event.pageY, - }; - - if (ref.current?.nodeType === Node.ELEMENT_NODE) { - const { left, top } = (ref.current as Element).getBoundingClientRect(); - const elementPositionX = left + window.scrollX; - const elementPositionY = top + window.scrollY; - const elementX = event.pageX - elementPositionX; - const elementY = event.pageY - elementPositionY; - - newState.elementX = elementX; - newState.elementY = elementY; - newState.elementPositionX = elementPositionX; - newState.elementPositionY = elementPositionY; - } - - setState((s) => { - return { - ...s, - ...newState, - }; - }); - }; - - document.addEventListener("mousemove", handleMouseMove); - - return () => { - document.removeEventListener("mousemove", handleMouseMove); - }; - }, []); - - return [state, ref]; -} +import React from "react"; + +type MousePosition = { + x: number; + y: number; + elementX: number; + elementY: number; + elementPositionX: number; + elementPositionY: number; +}; + +export function useMouse(): [ + MousePosition, + React.MutableRefObject, +] { + const [state, setState] = React.useState({ + x: 0, + y: 0, + elementX: 0, + elementY: 0, + elementPositionX: 0, + elementPositionY: 0, + }); + + const ref = React.useRef(null); + + React.useLayoutEffect(() => { + const handleMouseMove = (event: MouseEvent) => { + const newState: Partial = { + x: event.pageX, + y: event.pageY, + }; + + if (ref.current?.nodeType === Node.ELEMENT_NODE) { + const { left, top } = (ref.current as Element).getBoundingClientRect(); + const elementPositionX = left + window.scrollX; + const elementPositionY = top + window.scrollY; + const elementX = event.pageX - elementPositionX; + const elementY = event.pageY - elementPositionY; + + newState.elementX = elementX; + newState.elementY = elementY; + newState.elementPositionX = elementPositionX; + newState.elementPositionY = elementPositionY; + } + + setState((s) => { + return { + ...s, + ...newState, + }; + }); + }; + + document.addEventListener("mousemove", handleMouseMove); + + return () => { + document.removeEventListener("mousemove", handleMouseMove); + }; + }, []); + + return [state, ref]; +} diff --git a/www/src/registry/hooks/use-network-state.ts b/www/src/registry/hooks/use-network-state.ts index 7cf2aaa1..089cca77 100644 --- a/www/src/registry/hooks/use-network-state.ts +++ b/www/src/registry/hooks/use-network-state.ts @@ -1,84 +1,84 @@ -// import React from "react"; - -// type NetworkState = { -// online: boolean; -// downlink: number | null; -// downlinkMax: number | null; -// effectiveType: string | null; -// rtt: number | null; -// saveData: boolean | null; -// type: string | null; -// }; - -// function isShallowEqual(object1: any, object2: any) { -// const keys1 = Object.keys(object1); -// const keys2 = Object.keys(object2); - -// if (keys1.length !== keys2.length) { -// return false; -// } - -// for (let key of keys1) { -// if (object1[key] !== object2[key]) { -// return false; -// } -// } - -// return true; -// } - -// const getConnection = () => { -// return navigator?.connection || navigator?.mozConnection || navigator?.webkitConnection; -// }; - -// const useNetworkStateSubscribe = (callback: () => void) => { -// window.addEventListener("online", callback, { passive: true }); -// window.addEventListener("offline", callback, { passive: true }); - -// const connection = getConnection(); - -// if (connection) { -// connection.addEventListener("change", callback, { passive: true }); -// } - -// return () => { -// window.removeEventListener("online", callback); -// window.removeEventListener("offline", callback); - -// if (connection) { -// connection.removeEventListener("change", callback); -// } -// }; -// }; - -// const getNetworkStateServerSnapshot = () => { -// throw Error("useNetworkState is a client-only hook"); -// }; - -export function useNetworkState() { - // const cache = React.useRef({}); - // const getSnapshot = (): NetworkState => { - // const online = navigator.onLine; - // const connection = getConnection(); - // const nextState = { - // online, - // downlink: connection?.downlink, - // downlinkMax: connection?.downlinkMax, - // effectiveType: connection?.effectiveType, - // rtt: connection?.rtt, - // saveData: connection?.saveData, - // type: connection?.type, - // }; - // if (isShallowEqual(cache.current, nextState)) { - // return cache.current; - // } else { - // cache.current = nextState; - // return nextState; - // } - // }; - // return React.useSyncExternalStore( - // useNetworkStateSubscribe, - // getSnapshot, - // getNetworkStateServerSnapshot - // ); -} +// import React from "react"; + +// type NetworkState = { +// online: boolean; +// downlink: number | null; +// downlinkMax: number | null; +// effectiveType: string | null; +// rtt: number | null; +// saveData: boolean | null; +// type: string | null; +// }; + +// function isShallowEqual(object1: any, object2: any) { +// const keys1 = Object.keys(object1); +// const keys2 = Object.keys(object2); + +// if (keys1.length !== keys2.length) { +// return false; +// } + +// for (let key of keys1) { +// if (object1[key] !== object2[key]) { +// return false; +// } +// } + +// return true; +// } + +// const getConnection = () => { +// return navigator?.connection || navigator?.mozConnection || navigator?.webkitConnection; +// }; + +// const useNetworkStateSubscribe = (callback: () => void) => { +// window.addEventListener("online", callback, { passive: true }); +// window.addEventListener("offline", callback, { passive: true }); + +// const connection = getConnection(); + +// if (connection) { +// connection.addEventListener("change", callback, { passive: true }); +// } + +// return () => { +// window.removeEventListener("online", callback); +// window.removeEventListener("offline", callback); + +// if (connection) { +// connection.removeEventListener("change", callback); +// } +// }; +// }; + +// const getNetworkStateServerSnapshot = () => { +// throw Error("useNetworkState is a client-only hook"); +// }; + +export function useNetworkState() { + // const cache = React.useRef({}); + // const getSnapshot = (): NetworkState => { + // const online = navigator.onLine; + // const connection = getConnection(); + // const nextState = { + // online, + // downlink: connection?.downlink, + // downlinkMax: connection?.downlinkMax, + // effectiveType: connection?.effectiveType, + // rtt: connection?.rtt, + // saveData: connection?.saveData, + // type: connection?.type, + // }; + // if (isShallowEqual(cache.current, nextState)) { + // return cache.current; + // } else { + // cache.current = nextState; + // return nextState; + // } + // }; + // return React.useSyncExternalStore( + // useNetworkStateSubscribe, + // getSnapshot, + // getNetworkStateServerSnapshot + // ); +} diff --git a/www/src/registry/hooks/use-orientation.ts b/www/src/registry/hooks/use-orientation.ts index 519d8698..c6eb82e8 100644 --- a/www/src/registry/hooks/use-orientation.ts +++ b/www/src/registry/hooks/use-orientation.ts @@ -1,46 +1,46 @@ -import React from "react"; - -export function useOrientation() { - const [orientation, setOrientation] = React.useState({ - angle: 0, - type: "landscape-primary", - }); - - React.useLayoutEffect(() => { - const handleChange = () => { - const { angle, type } = window.screen.orientation; - setOrientation({ - angle, - type, - }); - }; - - const handleOrientationChange = () => { - setOrientation({ - type: "UNKNOWN", - angle: window.orientation, - }); - }; - - if (window.screen?.orientation) { - handleChange(); - window.screen.orientation.addEventListener("change", handleChange); - } else { - handleOrientationChange(); - window.addEventListener("orientationchange", handleOrientationChange); - } - - return () => { - if (window.screen?.orientation) { - window.screen.orientation.removeEventListener("change", handleChange); - } else { - window.removeEventListener( - "orientationchange", - handleOrientationChange - ); - } - }; - }, []); - - return orientation; -} +import React from "react"; + +export function useOrientation() { + const [orientation, setOrientation] = React.useState({ + angle: 0, + type: "landscape-primary", + }); + + React.useLayoutEffect(() => { + const handleChange = () => { + const { angle, type } = window.screen.orientation; + setOrientation({ + angle, + type, + }); + }; + + const handleOrientationChange = () => { + setOrientation({ + type: "UNKNOWN", + angle: window.orientation, + }); + }; + + if (window.screen?.orientation) { + handleChange(); + window.screen.orientation.addEventListener("change", handleChange); + } else { + handleOrientationChange(); + window.addEventListener("orientationchange", handleOrientationChange); + } + + return () => { + if (window.screen?.orientation) { + window.screen.orientation.removeEventListener("change", handleChange); + } else { + window.removeEventListener( + "orientationchange", + handleOrientationChange + ); + } + }; + }, []); + + return orientation; +} diff --git a/www/src/registry/hooks/use-previous.ts b/www/src/registry/hooks/use-previous.ts index 7e6e176a..7dbf6846 100644 --- a/www/src/registry/hooks/use-previous.ts +++ b/www/src/registry/hooks/use-previous.ts @@ -1,13 +1,13 @@ -import React from "react"; - -export function usePrevious(value: T) { - const [current, setCurrent] = React.useState(value); - const [previous, setPrevious] = React.useState(null); - - if (value !== current) { - setPrevious(current); - setCurrent(value); - } - - return previous; -} +import React from "react"; + +export function usePrevious(value: T) { + const [current, setCurrent] = React.useState(value); + const [previous, setPrevious] = React.useState(null); + + if (value !== current) { + setPrevious(current); + setCurrent(value); + } + + return previous; +} diff --git a/www/src/registry/hooks/use-scrolled.ts b/www/src/registry/hooks/use-scrolled.ts index 31167e7f..c7bfd180 100644 --- a/www/src/registry/hooks/use-scrolled.ts +++ b/www/src/registry/hooks/use-scrolled.ts @@ -1,27 +1,27 @@ -import React from "react"; - -export const useScrolled = ({ threshold = 0, initial = false }) => { - const [scrolled, setScrolled] = React.useState(initial); - const [mounted, setMounted] = React.useState(false); - - React.useEffect(() => { - // Function to handle scroll events - setMounted(true); - setScrolled(window.scrollY > threshold); - function handleScroll() { - // Check if the user has scrolled beyond the top of the page (scrollY > 0) - setScrolled(window.scrollY > threshold); - } - // setScrolled(window.scrollY > threshold) - // Add the scroll event listener - window.addEventListener("scroll", handleScroll); - - // Clean up the event listener when the component unmounts - return () => { - window.removeEventListener("scroll", handleScroll); - }; - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); // Empty dependency array, so this effect runs only once - - return { scrolled, mounted }; -}; +import React from "react"; + +export const useScrolled = ({ threshold = 0, initial = false }) => { + const [scrolled, setScrolled] = React.useState(initial); + const [mounted, setMounted] = React.useState(false); + + React.useEffect(() => { + // Function to handle scroll events + setMounted(true); + setScrolled(window.scrollY > threshold); + function handleScroll() { + // Check if the user has scrolled beyond the top of the page (scrollY > 0) + setScrolled(window.scrollY > threshold); + } + // setScrolled(window.scrollY > threshold) + // Add the scroll event listener + window.addEventListener("scroll", handleScroll); + + // Clean up the event listener when the component unmounts + return () => { + window.removeEventListener("scroll", handleScroll); + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); // Empty dependency array, so this effect runs only once + + return { scrolled, mounted }; +}; diff --git a/www/src/registry/hooks/use-window-size.ts b/www/src/registry/hooks/use-window-size.ts index ac33ff4d..9fa23dc1 100644 --- a/www/src/registry/hooks/use-window-size.ts +++ b/www/src/registry/hooks/use-window-size.ts @@ -1,29 +1,29 @@ -import React from "react"; - -export function useWindowSize() { - const [size, setSize] = React.useState<{ - width: number | null; - height: number | null; - }>({ - width: null, - height: null, - }); - - React.useLayoutEffect(() => { - const handleResize = () => { - setSize({ - width: window.innerWidth, - height: window.innerHeight, - }); - }; - - handleResize(); - window.addEventListener("resize", handleResize); - - return () => { - window.removeEventListener("resize", handleResize); - }; - }, []); - - return size; -} +import React from "react"; + +export function useWindowSize() { + const [size, setSize] = React.useState<{ + width: number | null; + height: number | null; + }>({ + width: null, + height: null, + }); + + React.useLayoutEffect(() => { + const handleResize = () => { + setSize({ + width: window.innerWidth, + height: window.innerHeight, + }); + }; + + handleResize(); + window.addEventListener("resize", handleResize); + + return () => { + window.removeEventListener("resize", handleResize); + }; + }, []); + + return size; +} diff --git a/www/src/registry/icons.ts b/www/src/registry/icons.ts index 61b495aa..116871fc 100644 --- a/www/src/registry/icons.ts +++ b/www/src/registry/icons.ts @@ -1,207 +1,207 @@ -export const iconLibraries: { - name: string; - label: string; - dependency: string; - import: string; -}[] = [ - { - name: "lucide", - label: "Lucide icons", - dependency: "lucide-react", - import: "lucide-react", - }, - { - name: "remix", - label: "Remix icons", - dependency: "@remixicon/react", - import: "@remixicon/react", - }, -] as const; - -export type IconLibrary = (typeof iconLibraries)[number]["name"]; - -type Icons = { - [key: string]: { - lucide: string; - remix: string; - }; -}; - -export const icons: Icons = { - LoaderIcon: { - lucide: "Loader2Icon", - remix: "RiLoader4Line", - }, - DangerIcon: { - lucide: "AlertCircleIcon", - remix: "RiErrorWarningFill", - }, - WarningIcon: { - lucide: "AlertTriangleIcon", - remix: "RiAlertLine", - }, - SuccessIcon: { - lucide: "CheckCircle2Icon", - remix: "RiCheckboxCircleLine", - }, - InfoIcon: { - lucide: "InfoIcon", - remix: "RiInformationLine", - }, - ChevronRightIcon: { - lucide: "ChevronRightIcon", - remix: "RiArrowRightSLine", - }, - ChevronLeftIcon: { - lucide: "ChevronLeftIcon", - remix: "RiArrowLeftSLine", - }, - ChevronDownIcon: { - lucide: "ChevronDownIcon", - remix: "RiArrowDownSLine", - }, - ChevronUpIcon: { - lucide: "ChevronUpIcon", - remix: "RiArrowUpSLine", - }, - SearchIcon: { - lucide: "SearchIcon", - remix: "RiSearchLine", - }, - HelpIcon: { - lucide: "HelpCircleIcon", - remix: "RiQuestionLine", - }, - CalendarIcon: { - lucide: "CalendarIcon", - remix: "RiCalendarLine", - }, - XIcon: { - lucide: "XIcon", - remix: "RiCloseLine", - }, - AsteriskIcon: { - lucide: "AsteriskIcon", - remix: "RiAsterisk", - }, - CheckIcon: { - lucide: "CheckIcon", - remix: "RiCheckLine", - }, - MinusIcon: { - lucide: "MinusIcon", - remix: "RiSubtractLine", - }, - PlusIcon: { - lucide: "PlusIcon", - remix: "RiAddLine", - }, - WalletIcon: { - lucide: "WalletIcon", - remix: "RiWalletLine", - }, - GlobeIcon: { - lucide: "GlobeIcon", - remix: "RiGlobalLine", - }, - UserIcon: { - lucide: "User2Icon", - remix: "RiUserLine", - }, - ShieldIcon: { - lucide: "ShieldIcon", - remix: "RiShieldLine", - }, - ChevronRightCircleIcon: { - lucide: "ArrowRightCircleIcon", - remix: "RiArrowRightCircleLine", - }, - HomeIcon: { - lucide: "HomeIcon", - remix: "RiHomeLine", - }, - LogInIcon: { - lucide: "LogInIcon", - remix: "RiLoginBoxLine", - }, - UploadIcon: { - lucide: "UploadIcon", - remix: "RiUpload2Line", - }, - PaletteIcon: { - lucide: "PaletteIcon", - remix: "RiPaletteLine", - }, - UsersIcon: { - lucide: "UsersIcon", - remix: "RiGroupLine", - }, - PlaneIcon: { - lucide: "PlaneIcon", - remix: "RiPlaneLine", - }, - CameraIcon: { - lucide: "CameraIcon", - remix: "RiCameraLine", - }, - ExternalLinkIcon: { - lucide: "ExternalLinkIcon", - remix: "RiExternalLinkLine", - }, - MenuIcon: { - lucide: "MenuIcon", - remix: "RiMenuLine", - }, - CopyIcon: { - lucide: "CopyIcon", - remix: "RiFileCopyLine", - }, - PlusSquareIcon: { - lucide: "PlusSquareIcon", - remix: "RiAddBoxLine", - }, - SquarePenIcon: { - lucide: "SquarePenIcon", - remix: "RiEditLine", - }, - RotateCwIcon: { - lucide: "RotateCwIcon", - remix: "RiRestartLine", - }, - XCircleIcon: { - lucide: "XCircleIcon", - remix: "RiCloseCircleLine", - }, - BoldIcon: { - lucide: "BoldIcon", - remix: "RiBold", - }, - ItalicIcon: { - lucide: "ItalicIcon", - remix: "RiItalic", - }, - TimerIcon: { - lucide: "TimerIcon", - remix: "RiTimerLine", - }, - PinIcon: { - lucide: "PinIcon", - remix: "RiPushpinLine", - }, - ALargeSmallIcon: { - lucide: "ALargeSmallIcon", - remix: "RiFontSize", - }, - Volume1Icon: { - lucide: "Volume1Icon", - remix: "RiVolumeDownLine", - }, - Volume2Icon: { - lucide: "Volume2Icon", - remix: "RiVolumeUpLine", - }, - ChevronsUpDownIcon: { - lucide: "ChevronsUpDownIcon", - remix: "RiExpandUpDownLine", - }, -}; +export const iconLibraries: { + name: string; + label: string; + dependency: string; + import: string; +}[] = [ + { + name: "lucide", + label: "Lucide icons", + dependency: "lucide-react", + import: "lucide-react", + }, + { + name: "remix", + label: "Remix icons", + dependency: "@remixicon/react", + import: "@remixicon/react", + }, +] as const; + +export type IconLibrary = (typeof iconLibraries)[number]["name"]; + +type Icons = { + [key: string]: { + lucide: string; + remix: string; + }; +}; + +export const icons: Icons = { + LoaderIcon: { + lucide: "Loader2Icon", + remix: "RiLoader4Line", + }, + DangerIcon: { + lucide: "AlertCircleIcon", + remix: "RiErrorWarningFill", + }, + WarningIcon: { + lucide: "AlertTriangleIcon", + remix: "RiAlertLine", + }, + SuccessIcon: { + lucide: "CheckCircle2Icon", + remix: "RiCheckboxCircleLine", + }, + InfoIcon: { + lucide: "InfoIcon", + remix: "RiInformationLine", + }, + ChevronRightIcon: { + lucide: "ChevronRightIcon", + remix: "RiArrowRightSLine", + }, + ChevronLeftIcon: { + lucide: "ChevronLeftIcon", + remix: "RiArrowLeftSLine", + }, + ChevronDownIcon: { + lucide: "ChevronDownIcon", + remix: "RiArrowDownSLine", + }, + ChevronUpIcon: { + lucide: "ChevronUpIcon", + remix: "RiArrowUpSLine", + }, + SearchIcon: { + lucide: "SearchIcon", + remix: "RiSearchLine", + }, + HelpIcon: { + lucide: "HelpCircleIcon", + remix: "RiQuestionLine", + }, + CalendarIcon: { + lucide: "CalendarIcon", + remix: "RiCalendarLine", + }, + XIcon: { + lucide: "XIcon", + remix: "RiCloseLine", + }, + AsteriskIcon: { + lucide: "AsteriskIcon", + remix: "RiAsterisk", + }, + CheckIcon: { + lucide: "CheckIcon", + remix: "RiCheckLine", + }, + MinusIcon: { + lucide: "MinusIcon", + remix: "RiSubtractLine", + }, + PlusIcon: { + lucide: "PlusIcon", + remix: "RiAddLine", + }, + WalletIcon: { + lucide: "WalletIcon", + remix: "RiWalletLine", + }, + GlobeIcon: { + lucide: "GlobeIcon", + remix: "RiGlobalLine", + }, + UserIcon: { + lucide: "User2Icon", + remix: "RiUserLine", + }, + ShieldIcon: { + lucide: "ShieldIcon", + remix: "RiShieldLine", + }, + ChevronRightCircleIcon: { + lucide: "ArrowRightCircleIcon", + remix: "RiArrowRightCircleLine", + }, + HomeIcon: { + lucide: "HomeIcon", + remix: "RiHomeLine", + }, + LogInIcon: { + lucide: "LogInIcon", + remix: "RiLoginBoxLine", + }, + UploadIcon: { + lucide: "UploadIcon", + remix: "RiUpload2Line", + }, + PaletteIcon: { + lucide: "PaletteIcon", + remix: "RiPaletteLine", + }, + UsersIcon: { + lucide: "UsersIcon", + remix: "RiGroupLine", + }, + PlaneIcon: { + lucide: "PlaneIcon", + remix: "RiPlaneLine", + }, + CameraIcon: { + lucide: "CameraIcon", + remix: "RiCameraLine", + }, + ExternalLinkIcon: { + lucide: "ExternalLinkIcon", + remix: "RiExternalLinkLine", + }, + MenuIcon: { + lucide: "MenuIcon", + remix: "RiMenuLine", + }, + CopyIcon: { + lucide: "CopyIcon", + remix: "RiFileCopyLine", + }, + PlusSquareIcon: { + lucide: "PlusSquareIcon", + remix: "RiAddBoxLine", + }, + SquarePenIcon: { + lucide: "SquarePenIcon", + remix: "RiEditLine", + }, + RotateCwIcon: { + lucide: "RotateCwIcon", + remix: "RiRestartLine", + }, + XCircleIcon: { + lucide: "XCircleIcon", + remix: "RiCloseCircleLine", + }, + BoldIcon: { + lucide: "BoldIcon", + remix: "RiBold", + }, + ItalicIcon: { + lucide: "ItalicIcon", + remix: "RiItalic", + }, + TimerIcon: { + lucide: "TimerIcon", + remix: "RiTimerLine", + }, + PinIcon: { + lucide: "PinIcon", + remix: "RiPushpinLine", + }, + ALargeSmallIcon: { + lucide: "ALargeSmallIcon", + remix: "RiFontSize", + }, + Volume1Icon: { + lucide: "Volume1Icon", + remix: "RiVolumeDownLine", + }, + Volume2Icon: { + lucide: "Volume2Icon", + remix: "RiVolumeUpLine", + }, + ChevronsUpDownIcon: { + lucide: "ChevronsUpDownIcon", + remix: "RiExpandUpDownLine", + }, +}; diff --git a/www/src/registry/index.ts b/www/src/registry/index.ts index 7e4f089a..ffdb117d 100644 --- a/www/src/registry/index.ts +++ b/www/src/registry/index.ts @@ -1,7 +1,7 @@ -import { type Registry } from "@dotui/registry/types"; -import { blocks } from "@/registry/blocks"; -import { core } from "@/registry/core"; -import { hooks } from "@/registry/hooks"; -import { themes } from "@/registry/themes"; - -export const registry: Registry = [...core, ...hooks, ...themes, ...blocks]; +import { type Registry } from "@dotui/registry/types"; +import { blocks } from "@/registry/blocks"; +import { core } from "@/registry/core"; +import { hooks } from "@/registry/hooks"; +import { themes } from "@/registry/themes"; + +export const registry: Registry = [...core, ...hooks, ...themes, ...blocks]; diff --git a/www/src/registry/styles.ts b/www/src/registry/styles.ts index 53c14826..60da3e54 100644 --- a/www/src/registry/styles.ts +++ b/www/src/registry/styles.ts @@ -1,20 +1,20 @@ -import type { Registry } from "@dotui/registry/types"; - -export const styles: Registry = [ - { - name: "default", - type: "registry:style", - label: "Default", - dependencies: ["tailwindcss-animate"], - registryDependencies: ["cn", "focus-styles"], - tailwind: { - config: { - plugins: [`require("tailwindcss-animate")`], - }, - }, - cssVars: {}, - files: [], - }, -]; - -export type Style = (typeof styles)[number]; +import type { Registry } from "@dotui/registry/types"; + +export const styles: Registry = [ + { + name: "default", + type: "registry:style", + label: "Default", + dependencies: ["tailwindcss-animate"], + registryDependencies: ["cn", "focus-styles"], + tailwind: { + config: { + plugins: [`require("tailwindcss-animate")`], + }, + }, + cssVars: {}, + files: [], + }, +]; + +export type Style = (typeof styles)[number]; diff --git a/www/src/registry/themes.ts b/www/src/registry/themes.ts index c76f36e8..22fc80d5 100644 --- a/www/src/registry/themes.ts +++ b/www/src/registry/themes.ts @@ -1,4 +1,4 @@ -import type { Registry } from "@dotui/registry/types"; -import { defaultTheme } from "./themes/default"; - -export const themes: Registry = [defaultTheme]; +import type { Registry } from "@dotui/registry/types"; +import { defaultTheme } from "./themes/default"; + +export const themes: Registry = [defaultTheme]; diff --git a/www/src/registry/themes/default.ts b/www/src/registry/themes/default.ts index ed33b866..c33b0546 100644 --- a/www/src/registry/themes/default.ts +++ b/www/src/registry/themes/default.ts @@ -1,40 +1,40 @@ -import type { RegistryItem } from "@dotui/registry/types"; -import { buildDotUIColorScales } from "@/lib/build-color-scales"; - -export const defaultTheme: RegistryItem = { - name: "theme-default", - label: "Default theme", - type: "registry:theme", - tailwind: { - config: { - theme: { - extend: { - borderRadius: { - lg: "var(--radius)", - md: "calc(var(--radius) - 2px)", - sm: "calc(var(--radius) - 4px)", - }, - colors: {}, - }, - }, - }, - }, - cssVars: { - light: buildDotUIColorScales("light", { - neutral: ["#000000"], - accent: ["#0091FF"], - primary: ["#000000"], - success: ["#1A9338"], - warning: ["#E79D13"], - danger: ["#D93036"], - }), - dark: buildDotUIColorScales("dark", { - neutral: ["#FFFFFF"], - accent: ["#0091FF"], - primary: ["#000000"], - success: ["#1A9338"], - warning: ["#E79D13"], - danger: ["#D93036"], - }), - }, -}; +import type { RegistryItem } from "@dotui/registry/types"; +import { buildDotUIColorScales } from "@/lib/build-color-scales"; + +export const defaultTheme: RegistryItem = { + name: "theme-default", + label: "Default theme", + type: "registry:theme", + tailwind: { + config: { + theme: { + extend: { + borderRadius: { + lg: "var(--radius)", + md: "calc(var(--radius) - 2px)", + sm: "calc(var(--radius) - 4px)", + }, + colors: {}, + }, + }, + }, + }, + cssVars: { + light: buildDotUIColorScales("light", { + neutral: ["#000000"], + accent: ["#0091FF"], + primary: ["#000000"], + success: ["#1A9338"], + warning: ["#E79D13"], + danger: ["#D93036"], + }), + dark: buildDotUIColorScales("dark", { + neutral: ["#FFFFFF"], + accent: ["#0091FF"], + primary: ["#000000"], + success: ["#1A9338"], + warning: ["#E79D13"], + danger: ["#D93036"], + }), + }, +}; diff --git a/www/src/registry/ui-lib.ts b/www/src/registry/ui-lib.ts index 23d54974..79e7dc9c 100644 --- a/www/src/registry/ui-lib.ts +++ b/www/src/registry/ui-lib.ts @@ -1,26 +1,26 @@ -import { Registry } from "@dotui/registry/types"; - -export const lib: Registry = [ - { - name: "cn", - type: "registry:lib", - dependencies: ["clsx", "tailwind-merge"], - files: [ - { - path: "lib/cn.ts", - type: "registry:lib", - }, - ], - }, - { - name: "focus-styles", - type: "registry:lib", - dependencies: ["tailwind-variants"], - files: [ - { - path: "lib/focus-styles.ts", - type: "registry:lib", - }, - ], - }, -]; +import { Registry } from "@dotui/registry/types"; + +export const lib: Registry = [ + { + name: "cn", + type: "registry:lib", + dependencies: ["clsx", "tailwind-merge"], + files: [ + { + path: "lib/cn.ts", + type: "registry:lib", + }, + ], + }, + { + name: "focus-styles", + type: "registry:lib", + dependencies: ["tailwind-variants"], + files: [ + { + path: "lib/focus-styles.ts", + type: "registry:lib", + }, + ], + }, +]; diff --git a/www/src/registry/ui/default/core/alert/alert.tsx b/www/src/registry/ui/default/core/alert/alert.tsx index f4c11bb3..d968547c 100644 --- a/www/src/registry/ui/default/core/alert/alert.tsx +++ b/www/src/registry/ui/default/core/alert/alert.tsx @@ -1,106 +1,106 @@ -import * as React from "react"; -import { tv, type VariantProps } from "tailwind-variants"; -import { DangerIcon, InfoIcon, SuccessIcon, WarningIcon } from "@/__icons__"; - -const alertStyles = tv({ - slots: { - root: "flex items-center gap-4 rounded-lg border p-4 [&_svg]:size-4", - title: "mr-1 font-medium leading-normal tracking-tight", - content: "text-sm", - }, - variants: { - variant: { - default: { root: "text-fg border" }, - success: { root: "border-border-success text-fg-success border" }, - warning: { root: "border-border-warning text-fg-warning border" }, - danger: { root: "border-border-danger text-fg-danger border" }, - info: { root: "border-border-accent text-fg-accent border" }, - }, - fill: { - true: "", - }, - }, - compoundVariants: [ - { variant: "default", fill: true, className: { root: "bg-bg-muted" } }, - { - variant: "success", - fill: true, - className: { root: "bg-bg-success-muted" }, - }, - { - variant: "warning", - fill: true, - className: { root: "bg-bg-warning-muted" }, - }, - { - variant: "danger", - fill: true, - className: { root: "bg-bg-danger-muted" }, - }, - { variant: "info", fill: true, className: { root: "bg-bg-accent-muted" } }, - ], - defaultVariants: { - variant: "default", - fill: false, - }, -}); - -const icons = { - default: , - success: , - warning: , - danger: , - info: , -}; - -interface AlertProps extends AlertRootProps { - title?: React.ReactNode; - icon?: React.ReactNode | null; - action?: React.ReactNode; -} -const Alert = ({ - variant = "default", - title, - children, - icon, - action, - ...props -}: AlertProps) => { - return ( - - {icon || icons[variant]} -
      - {title && {title}} - {children && {children}} -
      - {action &&
      {action}
      } -
      - ); -}; - -interface AlertRootProps - extends Omit, "title">, - VariantProps {} -const AlertRoot = ({ className, variant, fill, ...props }: AlertRootProps) => { - const { root } = alertStyles({ variant, fill }); - return
      ; -}; - -interface AlertTitleProps - extends React.HTMLAttributes, - VariantProps {} // TODO VERIFY THIS -const AlertTitle = ({ className, ...props }: AlertTitleProps) => { - const { title } = alertStyles(); - return

      ; -}; - -interface AlertContentProps - extends React.HTMLAttributes, - VariantProps {} // TODO VERIFY THIS -const AlertContent = ({ className, ...props }: AlertContentProps) => { - const { content } = alertStyles(); - return
      ; -}; - -export type { AlertProps, AlertRootProps, AlertTitleProps, AlertContentProps }; -export { Alert, AlertRoot, AlertTitle, AlertContent }; +import * as React from "react"; +import { tv, type VariantProps } from "tailwind-variants"; +import { DangerIcon, InfoIcon, SuccessIcon, WarningIcon } from "@/__icons__"; + +const alertStyles = tv({ + slots: { + root: "flex items-center gap-4 rounded-lg border p-4 [&_svg]:size-4", + title: "mr-1 font-medium leading-normal tracking-tight", + content: "text-sm", + }, + variants: { + variant: { + default: { root: "text-fg border" }, + success: { root: "border-border-success text-fg-success border" }, + warning: { root: "border-border-warning text-fg-warning border" }, + danger: { root: "border-border-danger text-fg-danger border" }, + info: { root: "border-border-accent text-fg-accent border" }, + }, + fill: { + true: "", + }, + }, + compoundVariants: [ + { variant: "default", fill: true, className: { root: "bg-bg-muted" } }, + { + variant: "success", + fill: true, + className: { root: "bg-bg-success-muted" }, + }, + { + variant: "warning", + fill: true, + className: { root: "bg-bg-warning-muted" }, + }, + { + variant: "danger", + fill: true, + className: { root: "bg-bg-danger-muted" }, + }, + { variant: "info", fill: true, className: { root: "bg-bg-accent-muted" } }, + ], + defaultVariants: { + variant: "default", + fill: false, + }, +}); + +const icons = { + default: , + success: , + warning: , + danger: , + info: , +}; + +interface AlertProps extends AlertRootProps { + title?: React.ReactNode; + icon?: React.ReactNode | null; + action?: React.ReactNode; +} +const Alert = ({ + variant = "default", + title, + children, + icon, + action, + ...props +}: AlertProps) => { + return ( + + {icon || icons[variant]} +
      + {title && {title}} + {children && {children}} +
      + {action &&
      {action}
      } +
      + ); +}; + +interface AlertRootProps + extends Omit, "title">, + VariantProps {} +const AlertRoot = ({ className, variant, fill, ...props }: AlertRootProps) => { + const { root } = alertStyles({ variant, fill }); + return
      ; +}; + +interface AlertTitleProps + extends React.HTMLAttributes, + VariantProps {} // TODO VERIFY THIS +const AlertTitle = ({ className, ...props }: AlertTitleProps) => { + const { title } = alertStyles(); + return

      ; +}; + +interface AlertContentProps + extends React.HTMLAttributes, + VariantProps {} // TODO VERIFY THIS +const AlertContent = ({ className, ...props }: AlertContentProps) => { + const { content } = alertStyles(); + return
      ; +}; + +export type { AlertProps, AlertRootProps, AlertTitleProps, AlertContentProps }; +export { Alert, AlertRoot, AlertTitle, AlertContent }; diff --git a/www/src/registry/ui/default/core/alert/demos/action.tsx b/www/src/registry/ui/default/core/alert/demos/action.tsx index 9f5134dd..89496412 100644 --- a/www/src/registry/ui/default/core/alert/demos/action.tsx +++ b/www/src/registry/ui/default/core/alert/demos/action.tsx @@ -1,16 +1,16 @@ -import { Alert } from "@/registry/ui/default/core/alert"; -import { Button } from "@/registry/ui/default/core/button"; - -export default function AlertDemo() { - return ( - - Upgrade - - } - > - You are currently on the free plan. Upgrade to unlock more features. - - ); -} +import { Alert } from "@/registry/ui/default/core/alert"; +import { Button } from "@/registry/ui/default/core/button"; + +export default function AlertDemo() { + return ( + + Upgrade + + } + > + You are currently on the free plan. Upgrade to unlock more features. + + ); +} diff --git a/www/src/registry/ui/default/core/alert/demos/composition.tsx b/www/src/registry/ui/default/core/alert/demos/composition.tsx index 2dd8c824..fdeca64f 100644 --- a/www/src/registry/ui/default/core/alert/demos/composition.tsx +++ b/www/src/registry/ui/default/core/alert/demos/composition.tsx @@ -1,24 +1,24 @@ -import { - AlertContent, - AlertRoot, - AlertTitle, -} from "@/registry/ui/default/core/alert"; -import { Button } from "@/registry/ui/default/core/button"; -import { WalletIcon } from "@/__icons__"; - -export default function AlertDemo() { - return ( - - -
      - Payment Information - - Enter your payment method to complete your purchase. - -
      - -
      - ); -} +import { + AlertContent, + AlertRoot, + AlertTitle, +} from "@/registry/ui/default/core/alert"; +import { Button } from "@/registry/ui/default/core/button"; +import { WalletIcon } from "@/__icons__"; + +export default function AlertDemo() { + return ( + + +
      + Payment Information + + Enter your payment method to complete your purchase. + +
      + +
      + ); +} diff --git a/www/src/registry/ui/default/core/alert/demos/content.tsx b/www/src/registry/ui/default/core/alert/demos/content.tsx index e8e4c1cb..71c75950 100644 --- a/www/src/registry/ui/default/core/alert/demos/content.tsx +++ b/www/src/registry/ui/default/core/alert/demos/content.tsx @@ -1,9 +1,9 @@ -import { Alert } from "@/registry/ui/default/core/alert"; - -export default function AlertDemo() { - return ( - - Enter your payment method to complete your purchase. - - ); -} +import { Alert } from "@/registry/ui/default/core/alert"; + +export default function AlertDemo() { + return ( + + Enter your payment method to complete your purchase. + + ); +} diff --git a/www/src/registry/ui/default/core/alert/demos/custom-icon.tsx b/www/src/registry/ui/default/core/alert/demos/custom-icon.tsx index 252fdc83..864a3099 100644 --- a/www/src/registry/ui/default/core/alert/demos/custom-icon.tsx +++ b/www/src/registry/ui/default/core/alert/demos/custom-icon.tsx @@ -1,6 +1,6 @@ -import { Alert } from "@/registry/ui/default/core/alert"; -import { GlobeIcon } from "@/__icons__"; - -export default function AlertDemo() { - return }>Hello world!; -} +import { Alert } from "@/registry/ui/default/core/alert"; +import { GlobeIcon } from "@/__icons__"; + +export default function AlertDemo() { + return }>Hello world!; +} diff --git a/www/src/registry/ui/default/core/alert/demos/default.tsx b/www/src/registry/ui/default/core/alert/demos/default.tsx index 0816978d..c737006d 100644 --- a/www/src/registry/ui/default/core/alert/demos/default.tsx +++ b/www/src/registry/ui/default/core/alert/demos/default.tsx @@ -1,5 +1,5 @@ -import { Alert } from "@/registry/ui/default/core/alert"; - -export default function AlertDemo() { - return You can add components to your app using the cli.; -} +import { Alert } from "@/registry/ui/default/core/alert"; + +export default function AlertDemo() { + return You can add components to your app using the cli.; +} diff --git a/www/src/registry/ui/default/core/alert/demos/title.tsx b/www/src/registry/ui/default/core/alert/demos/title.tsx index adcd36cc..6935bbea 100644 --- a/www/src/registry/ui/default/core/alert/demos/title.tsx +++ b/www/src/registry/ui/default/core/alert/demos/title.tsx @@ -1,7 +1,7 @@ -import { Alert } from "@/registry/ui/default/core/alert"; - -export default function AlertDemo() { - return ( - - ); -} +import { Alert } from "@/registry/ui/default/core/alert"; + +export default function AlertDemo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/alert/demos/variants.tsx b/www/src/registry/ui/default/core/alert/demos/variants.tsx index b4861f70..badbb8de 100644 --- a/www/src/registry/ui/default/core/alert/demos/variants.tsx +++ b/www/src/registry/ui/default/core/alert/demos/variants.tsx @@ -1,35 +1,35 @@ -"use client"; - -import React from "react"; -import { Alert, type AlertProps } from "@/registry/ui/default/core/alert"; -import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; -import { Switch } from "@/registry/ui/default/core/switch"; - -type Variant = AlertProps["variant"]; - -export default function Demo() { - const [variant, setVariant] = React.useState("default"); - const [fill, setFill] = React.useState(true); - - return ( -
      - - You can add components to your app using the cli. - - - Fill - - setVariant(newVal as Variant)} - > - Default - Success - Danger - Warning - Info - -
      - ); -} +"use client"; + +import React from "react"; +import { Alert, type AlertProps } from "@/registry/ui/default/core/alert"; +import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; +import { Switch } from "@/registry/ui/default/core/switch"; + +type Variant = AlertProps["variant"]; + +export default function Demo() { + const [variant, setVariant] = React.useState("default"); + const [fill, setFill] = React.useState(true); + + return ( +
      + + You can add components to your app using the cli. + + + Fill + + setVariant(newVal as Variant)} + > + Default + Success + Danger + Warning + Info + +
      + ); +} diff --git a/www/src/registry/ui/default/core/alert/index.tsx b/www/src/registry/ui/default/core/alert/index.tsx index 6e578472..f1431627 100644 --- a/www/src/registry/ui/default/core/alert/index.tsx +++ b/www/src/registry/ui/default/core/alert/index.tsx @@ -1 +1 @@ -export * from "./alert"; +export * from "./alert"; diff --git a/www/src/registry/ui/default/core/aspect-ratio/aspect-ratio.tsx b/www/src/registry/ui/default/core/aspect-ratio/aspect-ratio.tsx index 359bc940..e7de2dd7 100644 --- a/www/src/registry/ui/default/core/aspect-ratio/aspect-ratio.tsx +++ b/www/src/registry/ui/default/core/aspect-ratio/aspect-ratio.tsx @@ -1,7 +1,7 @@ -"use client"; - -import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"; - -const AspectRatio = AspectRatioPrimitive.Root; - -export { AspectRatio }; +"use client"; + +import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"; + +const AspectRatio = AspectRatioPrimitive.Root; + +export { AspectRatio }; diff --git a/www/src/registry/ui/default/core/aspect-ratio/demos/as-child.tsx b/www/src/registry/ui/default/core/aspect-ratio/demos/as-child.tsx index a4533c36..86661c39 100644 --- a/www/src/registry/ui/default/core/aspect-ratio/demos/as-child.tsx +++ b/www/src/registry/ui/default/core/aspect-ratio/demos/as-child.tsx @@ -1,15 +1,15 @@ -import Image from "next/image"; -import { AspectRatio } from "@/registry/ui/default/core/aspect-ratio"; - -export default function AspectRatioDemo() { - return ( - - - - ); -} +import Image from "next/image"; +import { AspectRatio } from "@/registry/ui/default/core/aspect-ratio"; + +export default function AspectRatioDemo() { + return ( + + + + ); +} diff --git a/www/src/registry/ui/default/core/aspect-ratio/demos/default.tsx b/www/src/registry/ui/default/core/aspect-ratio/demos/default.tsx index ccff97bc..18cce80e 100644 --- a/www/src/registry/ui/default/core/aspect-ratio/demos/default.tsx +++ b/www/src/registry/ui/default/core/aspect-ratio/demos/default.tsx @@ -1,15 +1,15 @@ -import Image from "next/image"; -import { AspectRatio } from "@/registry/ui/default/core/aspect-ratio"; - -export default function Demo() { - return ( - - - - ); -} +import Image from "next/image"; +import { AspectRatio } from "@/registry/ui/default/core/aspect-ratio"; + +export default function Demo() { + return ( + + + + ); +} diff --git a/www/src/registry/ui/default/core/aspect-ratio/index.tsx b/www/src/registry/ui/default/core/aspect-ratio/index.tsx index 9aa0b074..fc5ea4a7 100644 --- a/www/src/registry/ui/default/core/aspect-ratio/index.tsx +++ b/www/src/registry/ui/default/core/aspect-ratio/index.tsx @@ -1 +1 @@ -export * from "./aspect-ratio"; +export * from "./aspect-ratio"; diff --git a/www/src/registry/ui/default/core/avatar/avatar.tsx b/www/src/registry/ui/default/core/avatar/avatar.tsx index b0da52ad..f2bc73c4 100644 --- a/www/src/registry/ui/default/core/avatar/avatar.tsx +++ b/www/src/registry/ui/default/core/avatar/avatar.tsx @@ -1,173 +1,173 @@ -"use client"; - -import * as React from "react"; -import { tv, type VariantProps } from "tailwind-variants"; - -const avatarStyles = tv({ - slots: { - root: "bg-bg relative inline-flex shrink-0 overflow-hidden align-middle", - image: "aspect-square size-full", - fallback: - "bg-bg-muted flex size-full select-none items-center justify-center", - placeholder: - "bg-bg-muted flex size-full h-full animate-pulse items-center justify-center", - }, - variants: { - size: { - sm: { root: "size-8" }, - md: { root: "size-10" }, - lg: { root: "size-12" }, - }, - shape: { - circle: { root: "rounded-full" }, - square: { root: "rounded-sm" }, - }, - }, - defaultVariants: { - shape: "circle", - size: "md", - }, -}); - -interface AvatarProps - extends AvatarImageProps, - VariantProps { - fallback?: React.ReactNode; -} -const Avatar = ({ - fallback, - className, - style, - size, - shape, - ...props -}: AvatarProps) => { - return ( - - - {fallback} - - - ); -}; - -interface AvatarRootProps - extends React.HTMLAttributes, - VariantProps {} -const AvatarRoot = ({ className, shape, size, ...props }: AvatarRootProps) => { - const { root } = avatarStyles({ shape, size }); - const [status, setStatus] = React.useState("idle"); - return ( - - - - ); -}; - -interface AvatarImageProps extends React.ImgHTMLAttributes { - onStatusChange?: (status: Status) => void; -} -const AvatarImage = ({ - src, - onStatusChange, - className, - ...props -}: AvatarImageProps) => { - const { image } = avatarStyles(); - const context = useAvatarContext(); - const status = useImageLoadingStatus(src); - // TODO use useCallBackRef here - const handleStatusChange = React.useCallback( - (status: Status) => { - onStatusChange?.(status); - context.onStatusChange(status); - }, - [onStatusChange, context] - ); - - React.useLayoutEffect(() => { - if (status !== "idle") { - handleStatusChange(status); - } - }, [status, handleStatusChange]); - - return status === "success" ? ( - // eslint-disable-next-line jsx-a11y/alt-text - - ) : null; -}; - -type AvatarFallbackProps = React.HTMLAttributes; -const AvatarFallback = ({ className, ...props }: AvatarFallbackProps) => { - const { fallback } = avatarStyles(); - const context = useAvatarContext(); - - return context.status === "error" ? ( - - ) : null; -}; - -type AvatarPlaceholderProps = React.HTMLAttributes; -const AvatarPlaceholder = ({ className, ...props }: AvatarPlaceholderProps) => { - const { placeholder } = avatarStyles(); - const context = useAvatarContext(); - - return ["idle", "loading"].includes(context.status) ? ( - - ) : null; -}; - -type AvatarContextValue = { - status: Status; - onStatusChange: (status: Status) => void; -}; -const AvatarContext = React.createContext(null); -const useAvatarContext = () => { - const context = React.useContext(AvatarContext); - if (!context) { - throw new Error("Avatar components must be rendered within the AvatarRoot"); - } - return context; -}; - -type Status = "idle" | "loading" | "success" | "error"; -const useImageLoadingStatus = (src?: string) => { - const [status, setStatus] = React.useState("idle"); - - React.useLayoutEffect(() => { - if (!src) { - setStatus("error"); - return; - } - let isMounted = true; - const image = new window.Image(); - const updateStatus = (status: Status) => () => { - if (!isMounted) return; - setStatus(status); - }; - setStatus("loading"); - image.onload = updateStatus("success"); - image.onerror = updateStatus("error"); - image.src = src; - return () => { - isMounted = false; - }; - }, [src]); - - return status; -}; - -export type { - AvatarProps, - AvatarRootProps, - AvatarImageProps, - AvatarFallbackProps, -}; -export { - Avatar, - AvatarRoot, - AvatarImage, - AvatarFallback, - AvatarPlaceholder, - avatarStyles, -}; +"use client"; + +import * as React from "react"; +import { tv, type VariantProps } from "tailwind-variants"; + +const avatarStyles = tv({ + slots: { + root: "bg-bg relative inline-flex shrink-0 overflow-hidden align-middle", + image: "aspect-square size-full", + fallback: + "bg-bg-muted flex size-full select-none items-center justify-center", + placeholder: + "bg-bg-muted flex size-full h-full animate-pulse items-center justify-center", + }, + variants: { + size: { + sm: { root: "size-8" }, + md: { root: "size-10" }, + lg: { root: "size-12" }, + }, + shape: { + circle: { root: "rounded-full" }, + square: { root: "rounded-sm" }, + }, + }, + defaultVariants: { + shape: "circle", + size: "md", + }, +}); + +interface AvatarProps + extends AvatarImageProps, + VariantProps { + fallback?: React.ReactNode; +} +const Avatar = ({ + fallback, + className, + style, + size, + shape, + ...props +}: AvatarProps) => { + return ( + + + {fallback} + + + ); +}; + +interface AvatarRootProps + extends React.HTMLAttributes, + VariantProps {} +const AvatarRoot = ({ className, shape, size, ...props }: AvatarRootProps) => { + const { root } = avatarStyles({ shape, size }); + const [status, setStatus] = React.useState("idle"); + return ( + + + + ); +}; + +interface AvatarImageProps extends React.ImgHTMLAttributes { + onStatusChange?: (status: Status) => void; +} +const AvatarImage = ({ + src, + onStatusChange, + className, + ...props +}: AvatarImageProps) => { + const { image } = avatarStyles(); + const context = useAvatarContext(); + const status = useImageLoadingStatus(src); + // TODO use useCallBackRef here + const handleStatusChange = React.useCallback( + (status: Status) => { + onStatusChange?.(status); + context.onStatusChange(status); + }, + [onStatusChange, context] + ); + + React.useLayoutEffect(() => { + if (status !== "idle") { + handleStatusChange(status); + } + }, [status, handleStatusChange]); + + return status === "success" ? ( + // eslint-disable-next-line jsx-a11y/alt-text + + ) : null; +}; + +type AvatarFallbackProps = React.HTMLAttributes; +const AvatarFallback = ({ className, ...props }: AvatarFallbackProps) => { + const { fallback } = avatarStyles(); + const context = useAvatarContext(); + + return context.status === "error" ? ( + + ) : null; +}; + +type AvatarPlaceholderProps = React.HTMLAttributes; +const AvatarPlaceholder = ({ className, ...props }: AvatarPlaceholderProps) => { + const { placeholder } = avatarStyles(); + const context = useAvatarContext(); + + return ["idle", "loading"].includes(context.status) ? ( + + ) : null; +}; + +type AvatarContextValue = { + status: Status; + onStatusChange: (status: Status) => void; +}; +const AvatarContext = React.createContext(null); +const useAvatarContext = () => { + const context = React.useContext(AvatarContext); + if (!context) { + throw new Error("Avatar components must be rendered within the AvatarRoot"); + } + return context; +}; + +type Status = "idle" | "loading" | "success" | "error"; +const useImageLoadingStatus = (src?: string) => { + const [status, setStatus] = React.useState("idle"); + + React.useLayoutEffect(() => { + if (!src) { + setStatus("error"); + return; + } + let isMounted = true; + const image = new window.Image(); + const updateStatus = (status: Status) => () => { + if (!isMounted) return; + setStatus(status); + }; + setStatus("loading"); + image.onload = updateStatus("success"); + image.onerror = updateStatus("error"); + image.src = src; + return () => { + isMounted = false; + }; + }, [src]); + + return status; +}; + +export type { + AvatarProps, + AvatarRootProps, + AvatarImageProps, + AvatarFallbackProps, +}; +export { + Avatar, + AvatarRoot, + AvatarImage, + AvatarFallback, + AvatarPlaceholder, + avatarStyles, +}; diff --git a/www/src/registry/ui/default/core/avatar/demos/composition.tsx b/www/src/registry/ui/default/core/avatar/demos/composition.tsx index 592b7bd9..fe520631 100644 --- a/www/src/registry/ui/default/core/avatar/demos/composition.tsx +++ b/www/src/registry/ui/default/core/avatar/demos/composition.tsx @@ -1,20 +1,20 @@ -import React from "react"; -import { - AvatarRoot, - AvatarImage, - AvatarFallback, - AvatarPlaceholder, -} from "@/registry/ui/default/core/avatar"; -import { UserIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - M - - - - - ); -} +import React from "react"; +import { + AvatarRoot, + AvatarImage, + AvatarFallback, + AvatarPlaceholder, +} from "@/registry/ui/default/core/avatar"; +import { UserIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + M + + + + + ); +} diff --git a/www/src/registry/ui/default/core/avatar/demos/default.tsx b/www/src/registry/ui/default/core/avatar/demos/default.tsx index 4a23539f..461da8f5 100644 --- a/www/src/registry/ui/default/core/avatar/demos/default.tsx +++ b/www/src/registry/ui/default/core/avatar/demos/default.tsx @@ -1,11 +1,11 @@ -import { Avatar } from "@/registry/ui/default/core/avatar"; - -export default function Demo() { - return ( - - ); -} +import { Avatar } from "@/registry/ui/default/core/avatar"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/avatar/demos/shape.tsx b/www/src/registry/ui/default/core/avatar/demos/shape.tsx index 571a0240..de0b872f 100644 --- a/www/src/registry/ui/default/core/avatar/demos/shape.tsx +++ b/www/src/registry/ui/default/core/avatar/demos/shape.tsx @@ -1,20 +1,20 @@ -import { Avatar } from "@/registry/ui/default/core/avatar"; - -export default function Demo() { - return ( -
      - - -
      - ); -} +import { Avatar } from "@/registry/ui/default/core/avatar"; + +export default function Demo() { + return ( +
      + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/avatar/demos/sizes.tsx b/www/src/registry/ui/default/core/avatar/demos/sizes.tsx index 6fb96344..f4172870 100644 --- a/www/src/registry/ui/default/core/avatar/demos/sizes.tsx +++ b/www/src/registry/ui/default/core/avatar/demos/sizes.tsx @@ -1,17 +1,17 @@ -import { Avatar } from "@/registry/ui/default/core/avatar"; - -export default function Demo() { - return ( -
      - {(["sm", "md", "lg"] as const).map((size) => ( - - ))} -
      - ); -} +import { Avatar } from "@/registry/ui/default/core/avatar"; + +export default function Demo() { + return ( +
      + {(["sm", "md", "lg"] as const).map((size) => ( + + ))} +
      + ); +} diff --git a/www/src/registry/ui/default/core/avatar/index.tsx b/www/src/registry/ui/default/core/avatar/index.tsx index 90fdb226..895fbb51 100644 --- a/www/src/registry/ui/default/core/avatar/index.tsx +++ b/www/src/registry/ui/default/core/avatar/index.tsx @@ -1 +1 @@ -export * from "./avatar"; +export * from "./avatar"; diff --git a/www/src/registry/ui/default/core/badge/badge.tsx b/www/src/registry/ui/default/core/badge/badge.tsx index acc837c4..21e629fe 100644 --- a/www/src/registry/ui/default/core/badge/badge.tsx +++ b/www/src/registry/ui/default/core/badge/badge.tsx @@ -1,63 +1,63 @@ -import * as React from "react"; -import { tv, type VariantProps } from "tailwind-variants"; -import { cn } from "@/registry/ui/default/lib/cn"; - -const badgeVariants = tv({ - base: "inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-md text-xs font-semibold transition-colors", - variants: { - variant: { - neutral: "bg-bg-muted text-fg", - outline: "text-fg border", - primary: "bg-bg-primary text-fg-onPrimary", - success: "bg-bg-success text-fg-onSuccess", - "success-subtle": "bg-bg-success-muted text-fg-success", - "success-outline": "border-border-success text-fg-success border", - danger: "bg-bg-danger text-fg-onDanger", - "danger-subtle": "bg-bg-danger-muted text-fg-danger", - "danger-outline": "border-border-danger text-fg-danger border", - warning: "bg-bg-warning text-fg-onWarning", - "warning-subtle": "bg-bg-warning-muted text-fg-warning", - "warning-outline": "border-border-warning text-fg-warning border", - accent: "bg-bg-accent text-fg-onAccent", - "accent-subtle": "bg-bg-accent-muted text-fg-accent", - "accent-outline": "border-border-accent text-fg-accent border", - }, - size: { - sm: "h-5 px-2.5 [&_svg]:size-3", - md: "h-6 px-3 [&_svg]:size-3.5", - lg: "h-7 px-4 text-sm [&_svg]:size-4", - }, - }, - defaultVariants: { - variant: "primary", - size: "sm", - }, -}); - -export interface BadgeProps - extends React.HTMLAttributes, - VariantProps { - icon?: React.ReactNode; -} - -function Badge({ - children, - className, - variant, - size, - icon, - ...props -}: BadgeProps) { - return ( - - {icon && {icon}} - {children} - - ); -} - -export { Badge, badgeVariants }; +import * as React from "react"; +import { tv, type VariantProps } from "tailwind-variants"; +import { cn } from "@/registry/ui/default/lib/cn"; + +const badgeVariants = tv({ + base: "inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-md text-xs font-semibold transition-colors", + variants: { + variant: { + neutral: "bg-bg-muted text-fg", + outline: "text-fg border", + primary: "bg-bg-primary text-fg-onPrimary", + success: "bg-bg-success text-fg-onSuccess", + "success-subtle": "bg-bg-success-muted text-fg-success", + "success-outline": "border-border-success text-fg-success border", + danger: "bg-bg-danger text-fg-onDanger", + "danger-subtle": "bg-bg-danger-muted text-fg-danger", + "danger-outline": "border-border-danger text-fg-danger border", + warning: "bg-bg-warning text-fg-onWarning", + "warning-subtle": "bg-bg-warning-muted text-fg-warning", + "warning-outline": "border-border-warning text-fg-warning border", + accent: "bg-bg-accent text-fg-onAccent", + "accent-subtle": "bg-bg-accent-muted text-fg-accent", + "accent-outline": "border-border-accent text-fg-accent border", + }, + size: { + sm: "h-5 px-2.5 [&_svg]:size-3", + md: "h-6 px-3 [&_svg]:size-3.5", + lg: "h-7 px-4 text-sm [&_svg]:size-4", + }, + }, + defaultVariants: { + variant: "primary", + size: "sm", + }, +}); + +export interface BadgeProps + extends React.HTMLAttributes, + VariantProps { + icon?: React.ReactNode; +} + +function Badge({ + children, + className, + variant, + size, + icon, + ...props +}: BadgeProps) { + return ( + + {icon && {icon}} + {children} + + ); +} + +export { Badge, badgeVariants }; diff --git a/www/src/registry/ui/default/core/badge/demos/default.tsx b/www/src/registry/ui/default/core/badge/demos/default.tsx index 330f957f..7cb67ad3 100644 --- a/www/src/registry/ui/default/core/badge/demos/default.tsx +++ b/www/src/registry/ui/default/core/badge/demos/default.tsx @@ -1,5 +1,5 @@ -import { Badge } from "@/registry/ui/default/core/badge"; - -export default function Demo() { - return Badge; -} +import { Badge } from "@/registry/ui/default/core/badge"; + +export default function Demo() { + return Badge; +} diff --git a/www/src/registry/ui/default/core/badge/demos/icon.tsx b/www/src/registry/ui/default/core/badge/demos/icon.tsx index 9dd7da80..1166a0fd 100644 --- a/www/src/registry/ui/default/core/badge/demos/icon.tsx +++ b/www/src/registry/ui/default/core/badge/demos/icon.tsx @@ -1,18 +1,18 @@ -import { Badge } from "@/registry/ui/default/core/badge"; -import { ShieldIcon } from "@/__icons__"; - -export default function Demo() { - return ( -
      - } size="sm"> - Badge - - } size="md"> - Badge - - } size="lg"> - Badge - -
      - ); -} +import { Badge } from "@/registry/ui/default/core/badge"; +import { ShieldIcon } from "@/__icons__"; + +export default function Demo() { + return ( +
      + } size="sm"> + Badge + + } size="md"> + Badge + + } size="lg"> + Badge + +
      + ); +} diff --git a/www/src/registry/ui/default/core/badge/demos/sizes.tsx b/www/src/registry/ui/default/core/badge/demos/sizes.tsx index 5d9bed2c..0e38c158 100644 --- a/www/src/registry/ui/default/core/badge/demos/sizes.tsx +++ b/www/src/registry/ui/default/core/badge/demos/sizes.tsx @@ -1,17 +1,17 @@ -import { Badge } from "@/registry/ui/default/core/badge"; - -export default function Demo() { - return ( -
      - - Small - - - Medium - - - Large - -
      - ); -} +import { Badge } from "@/registry/ui/default/core/badge"; + +export default function Demo() { + return ( +
      + + Small + + + Medium + + + Large + +
      + ); +} diff --git a/www/src/registry/ui/default/core/badge/demos/variants.tsx b/www/src/registry/ui/default/core/badge/demos/variants.tsx index 3cc354bb..50bda17e 100644 --- a/www/src/registry/ui/default/core/badge/demos/variants.tsx +++ b/www/src/registry/ui/default/core/badge/demos/variants.tsx @@ -1,37 +1,37 @@ -import { Badge } from "@/registry/ui/default/core/badge"; - -export default function Demo() { - return ( -
      - - Neutral - Outline - Primary - - - Success - Success Subtle - Success Outline - - - Danger - Danger Subtle - Danger Outline - - - Warning - Warning Subtle - Warning Outline - - - Accent - Accent Subtle - Accent Outline - -
      - ); -} - -const Flex = (props: React.HTMLAttributes) => ( -
      -); +import { Badge } from "@/registry/ui/default/core/badge"; + +export default function Demo() { + return ( +
      + + Neutral + Outline + Primary + + + Success + Success Subtle + Success Outline + + + Danger + Danger Subtle + Danger Outline + + + Warning + Warning Subtle + Warning Outline + + + Accent + Accent Subtle + Accent Outline + +
      + ); +} + +const Flex = (props: React.HTMLAttributes) => ( +
      +); diff --git a/www/src/registry/ui/default/core/badge/index.tsx b/www/src/registry/ui/default/core/badge/index.tsx index 80844a4e..58a0593e 100644 --- a/www/src/registry/ui/default/core/badge/index.tsx +++ b/www/src/registry/ui/default/core/badge/index.tsx @@ -1 +1 @@ -export * from "./badge"; +export * from "./badge"; diff --git a/www/src/registry/ui/default/core/breadcrumbs/breadcrumbs.tsx b/www/src/registry/ui/default/core/breadcrumbs/breadcrumbs.tsx index 3651e204..5918cb28 100644 --- a/www/src/registry/ui/default/core/breadcrumbs/breadcrumbs.tsx +++ b/www/src/registry/ui/default/core/breadcrumbs/breadcrumbs.tsx @@ -1,78 +1,78 @@ -"use client"; - -import { - Link as AriaLink, - Breadcrumbs as AriaBreadcrumbs, - Breadcrumb as AriaBreadcrumb, - type BreadcrumbsProps as AriaBreadcrumbsProps, - type BreadcrumbProps as AriaBreadcrumbProps, - type LinkProps as AriaLinkProps, - composeRenderProps, -} from "react-aria-components"; -import { tv } from "tailwind-variants"; -import { ChevronRightIcon } from "@/__icons__"; - -const breadcrumbsStyles = tv({ - slots: { - root: "text-fg-muted flex flex-wrap items-center gap-1.5 break-words text-sm [&_svg]:size-4", - item: "inline-flex items-center gap-1.5 [&_svg]:last:hidden", - link: "hover:text-fg current:text-fg disabled:[&:not([data-current])]:text-fg-disabled inline-flex items-center gap-1.5 transition-colors disabled:cursor-default", - }, -}); - -type BreadcrumbsProps = AriaBreadcrumbsProps; - -const Breadcrumbs = ({ - className, - ...props -}: BreadcrumbsProps) => { - const { root } = breadcrumbsStyles(); - return ; -}; - -type BreadcrumbProps = Omit & - Omit & { icon?: React.ReactNode }; -const Breadcrumb = ({ - children, - className, - style, - icon = null, - ...props -}: BreadcrumbProps) => { - return ( - - {icon} - {children} - - - ); -}; - -type BreadcrumbItemProps = AriaBreadcrumbProps; -const BreadcrumbItem = (props: BreadcrumbItemProps) => { - const { item } = breadcrumbsStyles(); - return ( - - item({ className }) - )} - /> - ); -}; - -interface BreadcrumbLinkProps extends Omit { - className?: string; -} -const BreadcrumbLink = ({ className, ...props }: BreadcrumbLinkProps) => { - const { link } = breadcrumbsStyles(); - return ; -}; - -export type { - BreadcrumbsProps, - BreadcrumbProps, - BreadcrumbItemProps, - BreadcrumbLinkProps, -}; -export { Breadcrumbs, Breadcrumb, BreadcrumbItem, BreadcrumbLink }; +"use client"; + +import { + Link as AriaLink, + Breadcrumbs as AriaBreadcrumbs, + Breadcrumb as AriaBreadcrumb, + type BreadcrumbsProps as AriaBreadcrumbsProps, + type BreadcrumbProps as AriaBreadcrumbProps, + type LinkProps as AriaLinkProps, + composeRenderProps, +} from "react-aria-components"; +import { tv } from "tailwind-variants"; +import { ChevronRightIcon } from "@/__icons__"; + +const breadcrumbsStyles = tv({ + slots: { + root: "text-fg-muted flex flex-wrap items-center gap-1.5 break-words text-sm [&_svg]:size-4", + item: "inline-flex items-center gap-1.5 [&_svg]:last:hidden", + link: "hover:text-fg current:text-fg disabled:[&:not([data-current])]:text-fg-disabled inline-flex items-center gap-1.5 transition-colors disabled:cursor-default", + }, +}); + +type BreadcrumbsProps = AriaBreadcrumbsProps; + +const Breadcrumbs = ({ + className, + ...props +}: BreadcrumbsProps) => { + const { root } = breadcrumbsStyles(); + return ; +}; + +type BreadcrumbProps = Omit & + Omit & { icon?: React.ReactNode }; +const Breadcrumb = ({ + children, + className, + style, + icon = null, + ...props +}: BreadcrumbProps) => { + return ( + + {icon} + {children} + + + ); +}; + +type BreadcrumbItemProps = AriaBreadcrumbProps; +const BreadcrumbItem = (props: BreadcrumbItemProps) => { + const { item } = breadcrumbsStyles(); + return ( + + item({ className }) + )} + /> + ); +}; + +interface BreadcrumbLinkProps extends Omit { + className?: string; +} +const BreadcrumbLink = ({ className, ...props }: BreadcrumbLinkProps) => { + const { link } = breadcrumbsStyles(); + return ; +}; + +export type { + BreadcrumbsProps, + BreadcrumbProps, + BreadcrumbItemProps, + BreadcrumbLinkProps, +}; +export { Breadcrumbs, Breadcrumb, BreadcrumbItem, BreadcrumbLink }; diff --git a/www/src/registry/ui/default/core/breadcrumbs/demos/basic.tsx b/www/src/registry/ui/default/core/breadcrumbs/demos/basic.tsx index 87f0f450..69d7ddeb 100644 --- a/www/src/registry/ui/default/core/breadcrumbs/demos/basic.tsx +++ b/www/src/registry/ui/default/core/breadcrumbs/demos/basic.tsx @@ -1,14 +1,14 @@ -import { - Breadcrumbs, - Breadcrumb, -} from "@/registry/ui/default/core/breadcrumbs"; - -export default function Demo() { - return ( - - Home - Components - Breadcrumbs - - ); -} +import { + Breadcrumbs, + Breadcrumb, +} from "@/registry/ui/default/core/breadcrumbs"; + +export default function Demo() { + return ( + + Home + Components + Breadcrumbs + + ); +} diff --git a/www/src/registry/ui/default/core/breadcrumbs/demos/composition.tsx b/www/src/registry/ui/default/core/breadcrumbs/demos/composition.tsx index 65ba74e5..80853bf6 100644 --- a/www/src/registry/ui/default/core/breadcrumbs/demos/composition.tsx +++ b/www/src/registry/ui/default/core/breadcrumbs/demos/composition.tsx @@ -1,25 +1,25 @@ -import { - Breadcrumbs, - BreadcrumbItem, - BreadcrumbLink, -} from "@/registry/ui/default/core/breadcrumbs"; -import { ChevronRightCircleIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - Home - - - - Components - - - - Breadcrumbs - - - - ); -} +import { + Breadcrumbs, + BreadcrumbItem, + BreadcrumbLink, +} from "@/registry/ui/default/core/breadcrumbs"; +import { ChevronRightCircleIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + Home + + + + Components + + + + Breadcrumbs + + + + ); +} diff --git a/www/src/registry/ui/default/core/breadcrumbs/demos/disabled.tsx b/www/src/registry/ui/default/core/breadcrumbs/demos/disabled.tsx index ceade165..5bb0e4e4 100644 --- a/www/src/registry/ui/default/core/breadcrumbs/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/breadcrumbs/demos/disabled.tsx @@ -1,14 +1,14 @@ -import { - Breadcrumbs, - Breadcrumb, -} from "@/registry/ui/default/core/breadcrumbs"; - -export default function Demo() { - return ( - - Home - Components - Breadcrumbs - - ); -} +import { + Breadcrumbs, + Breadcrumb, +} from "@/registry/ui/default/core/breadcrumbs"; + +export default function Demo() { + return ( + + Home + Components + Breadcrumbs + + ); +} diff --git a/www/src/registry/ui/default/core/breadcrumbs/demos/icon.tsx b/www/src/registry/ui/default/core/breadcrumbs/demos/icon.tsx index c717f6c7..93d6d1d2 100644 --- a/www/src/registry/ui/default/core/breadcrumbs/demos/icon.tsx +++ b/www/src/registry/ui/default/core/breadcrumbs/demos/icon.tsx @@ -1,18 +1,18 @@ -import { - Breadcrumbs, - Breadcrumb, -} from "@/registry/ui/default/core/breadcrumbs"; -import { HomeIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - Home - - Components - Breadcrumbs - - ); -} +import { + Breadcrumbs, + Breadcrumb, +} from "@/registry/ui/default/core/breadcrumbs"; +import { HomeIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + Home + + Components + Breadcrumbs + + ); +} diff --git a/www/src/registry/ui/default/core/breadcrumbs/demos/router-integration.tsx b/www/src/registry/ui/default/core/breadcrumbs/demos/router-integration.tsx index 5d416f69..9210ae7f 100644 --- a/www/src/registry/ui/default/core/breadcrumbs/demos/router-integration.tsx +++ b/www/src/registry/ui/default/core/breadcrumbs/demos/router-integration.tsx @@ -1,24 +1,24 @@ -"use client"; - -import { usePathname } from "next/navigation"; -import { - Breadcrumbs, - Breadcrumb, -} from "@/registry/ui/default/core/breadcrumbs"; - -export default function Demo() { - const pathname = usePathname(); - const pathnames = pathname.split("/").filter((x) => x); - return ( - - {pathnames.map((elem, index) => { - const href = `/${pathnames.slice(0, index + 1).join("/")}`; - return ( - - {elem} - - ); - })} - - ); -} +"use client"; + +import { usePathname } from "next/navigation"; +import { + Breadcrumbs, + Breadcrumb, +} from "@/registry/ui/default/core/breadcrumbs"; + +export default function Demo() { + const pathname = usePathname(); + const pathnames = pathname.split("/").filter((x) => x); + return ( + + {pathnames.map((elem, index) => { + const href = `/${pathnames.slice(0, index + 1).join("/")}`; + return ( + + {elem} + + ); + })} + + ); +} diff --git a/www/src/registry/ui/default/core/breadcrumbs/index.tsx b/www/src/registry/ui/default/core/breadcrumbs/index.tsx index 669f5575..d4b80fbb 100644 --- a/www/src/registry/ui/default/core/breadcrumbs/index.tsx +++ b/www/src/registry/ui/default/core/breadcrumbs/index.tsx @@ -1 +1 @@ -export * from "./breadcrumbs"; +export * from "./breadcrumbs"; diff --git a/www/src/registry/ui/default/core/button/button.tsx b/www/src/registry/ui/default/core/button/button.tsx index e28260a5..7e73c658 100644 --- a/www/src/registry/ui/default/core/button/button.tsx +++ b/www/src/registry/ui/default/core/button/button.tsx @@ -1,141 +1,141 @@ -"use client"; - -import * as React from "react"; -import { - composeRenderProps, - Button as AriaButton, - Link as AriaLink, - type ButtonProps as AriaButtonProps, - type LinkProps as AriaLinkProps, -} from "react-aria-components"; -import { tv, type VariantProps } from "tailwind-variants"; -import { focusRing } from "@/registry/ui/default/lib/focus-styles"; -import { LoaderIcon } from "@/__icons__"; - -const buttonStyles = tv( - { - extend: focusRing, - base: "ring-offset-background disabled:bg-bg-disabled disabled:text-fg-disabled inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium leading-normal transition-colors disabled:cursor-default", - variants: { - variant: { - default: - "bg-bg-neutral hover:bg-bg-neutral-hover pressed:bg-bg-neutral-active text-fg-onNeutral", - primary: - "bg-bg-primary hover:bg-bg-primary-hover pressed:bg-bg-primary-active text-fg-onPrimary", - quiet: - "hover:bg-bg-inverse/10 pressed:bg-bg-inverse/20 text-fg bg-transparent", - outline: - "border-border-field bg-bg-inverse/5 hover:bg-bg-inverse/10 pressed:bg-bg-inverse/15 text-fg disabled:border-border-disabled border disabled:bg-transparent", - accent: - "bg-bg-accent hover:bg-bg-accent-hover pressed:bg-bg-accent-active text-fg-onAccent", - success: - "bg-bg-success hover:bg-bg-success-hover pressed:bg-bg-success-active text-fg-onSuccess", - warning: - "bg-bg-warning hover:bg-bg-warning-hover pressed:bg-bg-warning-active text-fg-onWarning", - danger: - "bg-bg-danger hover:bg-bg-danger-hover pressed:bg-bg-danger-active text-fg-onDanger", - }, - size: { - sm: "h-8 px-3 [&_svg]:size-4", - md: "h-9 px-4 [&_svg]:size-4", - lg: "h-10 px-5 [&_svg]:size-5", - }, - shape: { - rectangle: "", - square: "", - circle: "rounded-full", - }, - }, - compoundVariants: [ - { - size: "sm", - shape: ["square", "circle"], - className: "w-8 px-0", - }, - { - size: "md", - shape: ["square", "circle"], - className: "w-9 px-0", - }, - { - size: "lg", - shape: ["square", "circle"], - className: "w-10 px-0", - }, - ], - defaultVariants: { - variant: "default", - size: "md", - shape: "rectangle", - }, - }, - { - responsiveVariants: ["sm", "lg"], - } -); - -interface ButtonProps - extends Omit, - Omit, - VariantProps { - className?: string; - isLoading?: boolean; - prefix?: React.ReactNode; - suffix?: React.ReactNode; -} - -const Button = React.forwardRef( - (localProps: ButtonProps, ref: React.ForwardedRef) => { - const contextProps = useButtonContext(); - const props = { ...contextProps, ...localProps }; - - const { - className, - variant, - size, - shape, - isDisabled, - isLoading, - prefix, - suffix, - ...restProps - } = props; - - const Element: React.ElementType = props.href ? AriaLink : AriaButton; - - return ( - - {composeRenderProps(props.children, (children) => ( - <> - {isLoading ? ( - - ) : ( - prefix - )} - {typeof children === "string" ? ( - {children} - ) : ( - children - )} - {suffix} - - ))} - - ); - } -); -Button.displayName = "Button"; - -type ButtonContextValue = VariantProps; -const ButtonContext = React.createContext({}); -const useButtonContext = () => { - return React.useContext(ButtonContext); -}; - -export type { ButtonProps }; -export { Button, buttonStyles, ButtonContext }; +"use client"; + +import * as React from "react"; +import { + composeRenderProps, + Button as AriaButton, + Link as AriaLink, + type ButtonProps as AriaButtonProps, + type LinkProps as AriaLinkProps, +} from "react-aria-components"; +import { tv, type VariantProps } from "tailwind-variants"; +import { focusRing } from "@/registry/ui/default/lib/focus-styles"; +import { LoaderIcon } from "@/__icons__"; + +const buttonStyles = tv( + { + extend: focusRing, + base: "ring-offset-background disabled:bg-bg-disabled disabled:text-fg-disabled inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium leading-normal transition-colors disabled:cursor-default", + variants: { + variant: { + default: + "bg-bg-neutral hover:bg-bg-neutral-hover pressed:bg-bg-neutral-active text-fg-onNeutral", + primary: + "bg-bg-primary hover:bg-bg-primary-hover pressed:bg-bg-primary-active text-fg-onPrimary", + quiet: + "hover:bg-bg-inverse/10 pressed:bg-bg-inverse/20 text-fg bg-transparent", + outline: + "border-border-field bg-bg-inverse/5 hover:bg-bg-inverse/10 pressed:bg-bg-inverse/15 text-fg disabled:border-border-disabled border disabled:bg-transparent", + accent: + "bg-bg-accent hover:bg-bg-accent-hover pressed:bg-bg-accent-active text-fg-onAccent", + success: + "bg-bg-success hover:bg-bg-success-hover pressed:bg-bg-success-active text-fg-onSuccess", + warning: + "bg-bg-warning hover:bg-bg-warning-hover pressed:bg-bg-warning-active text-fg-onWarning", + danger: + "bg-bg-danger hover:bg-bg-danger-hover pressed:bg-bg-danger-active text-fg-onDanger", + }, + size: { + sm: "h-8 px-3 [&_svg]:size-4", + md: "h-9 px-4 [&_svg]:size-4", + lg: "h-10 px-5 [&_svg]:size-5", + }, + shape: { + rectangle: "", + square: "", + circle: "rounded-full", + }, + }, + compoundVariants: [ + { + size: "sm", + shape: ["square", "circle"], + className: "w-8 px-0", + }, + { + size: "md", + shape: ["square", "circle"], + className: "w-9 px-0", + }, + { + size: "lg", + shape: ["square", "circle"], + className: "w-10 px-0", + }, + ], + defaultVariants: { + variant: "default", + size: "md", + shape: "rectangle", + }, + }, + { + responsiveVariants: ["sm", "lg"], + } +); + +interface ButtonProps + extends Omit, + Omit, + VariantProps { + className?: string; + isLoading?: boolean; + prefix?: React.ReactNode; + suffix?: React.ReactNode; +} + +const Button = React.forwardRef( + (localProps: ButtonProps, ref: React.ForwardedRef) => { + const contextProps = useButtonContext(); + const props = { ...contextProps, ...localProps }; + + const { + className, + variant, + size, + shape, + isDisabled, + isLoading, + prefix, + suffix, + ...restProps + } = props; + + const Element: React.ElementType = props.href ? AriaLink : AriaButton; + + return ( + + {composeRenderProps(props.children, (children) => ( + <> + {isLoading ? ( + + ) : ( + prefix + )} + {typeof children === "string" ? ( + {children} + ) : ( + children + )} + {suffix} + + ))} + + ); + } +); +Button.displayName = "Button"; + +type ButtonContextValue = VariantProps; +const ButtonContext = React.createContext({}); +const useButtonContext = () => { + return React.useContext(ButtonContext); +}; + +export type { ButtonProps }; +export { Button, buttonStyles, ButtonContext }; diff --git a/www/src/registry/ui/default/core/button/demos/default.tsx b/www/src/registry/ui/default/core/button/demos/default.tsx index 160f80b1..3ac23359 100644 --- a/www/src/registry/ui/default/core/button/demos/default.tsx +++ b/www/src/registry/ui/default/core/button/demos/default.tsx @@ -1,5 +1,5 @@ -import { Button } from "@/registry/ui/default/core/button"; - -export default function Demo() { - return ; -} +import { Button } from "@/registry/ui/default/core/button"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/button/demos/disabled.tsx b/www/src/registry/ui/default/core/button/demos/disabled.tsx index bab5f0c5..489de351 100644 --- a/www/src/registry/ui/default/core/button/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/button/demos/disabled.tsx @@ -1,5 +1,5 @@ -import { Button } from "@/registry/ui/default/core/button"; - -export default function Demo() { - return ; -} +import { Button } from "@/registry/ui/default/core/button"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/button/demos/link-button.tsx b/www/src/registry/ui/default/core/button/demos/link-button.tsx index 8526bc3d..cf9bed15 100644 --- a/www/src/registry/ui/default/core/button/demos/link-button.tsx +++ b/www/src/registry/ui/default/core/button/demos/link-button.tsx @@ -1,10 +1,10 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { LogInIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { LogInIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/button/demos/loading.tsx b/www/src/registry/ui/default/core/button/demos/loading.tsx index 6302d36b..d87e5aae 100644 --- a/www/src/registry/ui/default/core/button/demos/loading.tsx +++ b/www/src/registry/ui/default/core/button/demos/loading.tsx @@ -1,17 +1,17 @@ -import { Button } from "@/registry/ui/default/core/button"; - -export default function Demo() { - return ( -
      - - - -
      - ); -} +import { Button } from "@/registry/ui/default/core/button"; + +export default function Demo() { + return ( +
      + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/button/demos/prefix-and-suffix.tsx b/www/src/registry/ui/default/core/button/demos/prefix-and-suffix.tsx index 3e0ff876..9f1ba1d7 100644 --- a/www/src/registry/ui/default/core/button/demos/prefix-and-suffix.tsx +++ b/www/src/registry/ui/default/core/button/demos/prefix-and-suffix.tsx @@ -1,11 +1,11 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { UploadIcon } from "@/__icons__"; - -export default function Demo() { - return ( -
      - - -
      - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { UploadIcon } from "@/__icons__"; + +export default function Demo() { + return ( +
      + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/button/demos/shapes.tsx b/www/src/registry/ui/default/core/button/demos/shapes.tsx index 905a3f3f..493d7d74 100644 --- a/www/src/registry/ui/default/core/button/demos/shapes.tsx +++ b/www/src/registry/ui/default/core/button/demos/shapes.tsx @@ -1,27 +1,27 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { UploadIcon } from "@/__icons__"; - -export default function Demo() { - return ( -
      - - - - - - -
      - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { UploadIcon } from "@/__icons__"; + +export default function Demo() { + return ( +
      + + + + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/button/demos/sizes.tsx b/www/src/registry/ui/default/core/button/demos/sizes.tsx index 489aa748..713e49e0 100644 --- a/www/src/registry/ui/default/core/button/demos/sizes.tsx +++ b/www/src/registry/ui/default/core/button/demos/sizes.tsx @@ -1,11 +1,11 @@ -import { Button } from "@/registry/ui/default/core/button"; - -export default function Demo() { - return ( -
      - - - -
      - ); -} +import { Button } from "@/registry/ui/default/core/button"; + +export default function Demo() { + return ( +
      + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/button/demos/variants.tsx b/www/src/registry/ui/default/core/button/demos/variants.tsx index 8d9e7d1c..63e776c4 100644 --- a/www/src/registry/ui/default/core/button/demos/variants.tsx +++ b/www/src/registry/ui/default/core/button/demos/variants.tsx @@ -1,24 +1,24 @@ -import { Button } from "@/registry/ui/default/core/button"; - -const variants = [ - "default", - "primary", - "outline", - "quiet", - "success", - "warning", - "danger", - "accent", -] as const; - -export default function Demo() { - return ( -
      - {variants.map((variant) => ( - - ))} -
      - ); -} +import { Button } from "@/registry/ui/default/core/button"; + +const variants = [ + "default", + "primary", + "outline", + "quiet", + "success", + "warning", + "danger", + "accent", +] as const; + +export default function Demo() { + return ( +
      + {variants.map((variant) => ( + + ))} +
      + ); +} diff --git a/www/src/registry/ui/default/core/button/index.tsx b/www/src/registry/ui/default/core/button/index.tsx index 98d55acd..fd4663cb 100644 --- a/www/src/registry/ui/default/core/button/index.tsx +++ b/www/src/registry/ui/default/core/button/index.tsx @@ -1 +1 @@ -export * from "./button"; +export * from "./button"; diff --git a/www/src/registry/ui/default/core/calendar/calendar.tsx b/www/src/registry/ui/default/core/calendar/calendar.tsx index 1dee65eb..5b8b906d 100644 --- a/www/src/registry/ui/default/core/calendar/calendar.tsx +++ b/www/src/registry/ui/default/core/calendar/calendar.tsx @@ -1,223 +1,223 @@ -"use client"; - -import * as React from "react"; -import { - composeRenderProps, - Calendar as AriaCalendar, - CalendarCell as AriaCalendarCell, - CalendarGrid as AriaCalendarGrid, - CalendarGridHeader as AriaCalendarGridHeader, - CalendarHeaderCell as AriaCalendarHeaderCell, - CalendarGridBody as AriaCalendarGridBody, - type CalendarProps as AriaCalendarProps, - type CalendarGridProps as AriaCalendarGridProps, - type CalendarGridHeaderProps as AriaCalendarGridHeaderProps, - type CalendarHeaderCellProps as AriaCalendarHeaderCellProps, - type CalendarGridBodyProps as AriaCalendarGridBodyProps, - type CalendarCellProps as AriaCalendarCellProps, - type DateValue, - CalendarContext as AriaCalendarContext, - useSlottedContext, -} from "react-aria-components"; -import { tv } from "tailwind-variants"; -import { Button, buttonStyles } from "@/registry/ui/default/core/button"; -import { Heading } from "@/registry/ui/default/core/heading"; -import { Text } from "@/registry/ui/default/core/text"; -import { ChevronLeftIcon, ChevronRightIcon } from "@/__icons__"; - -const calendarStyles = tv({ - slots: { - root: "", - header: "mb-4 flex items-center justify-between gap-2", - grid: "w-full border-collapse", - gridHeader: "mb-4", - gridHeaderCell: "text-fg-muted text-xs font-normal", - gridBody: "[&>tr>td]:p-0", - cell: "", - }, - variants: { - standalone: { - true: { - root: "bg-bg rounded-md border p-3", - }, - false: { - root: "rounded-[inherit]", - }, - }, - range: { - false: { - cell: [ - buttonStyles({ - variant: "quiet", - shape: "square", - size: "sm", - }), - "selected:bg-bg-primary selected:text-fg-onPrimary my-1 disabled:cursor-default disabled:bg-transparent", - "selected:invalid:bg-bg-danger selected:invalid:text-fg-onDanger", - "unavailable:line-through unavailable:hover:bg-transparent unavailable:cursor-default unavailable:text-fg-muted", - "outside-month:hidden", - ], - }, - true: { - cell: [ - "disabled:text-fg-disabled relative my-1 flex size-8 items-center justify-center rounded-md text-sm font-normal leading-normal disabled:cursor-default disabled:bg-transparent", - "selected:after:bg-bg-primary/10 after:absolute after:inset-0 after:transition-colors after:content-['']", - "hover:before:bg-bg-inverse/10 before:absolute before:inset-0 before:z-10 before:rounded-[inherit] before:transition-colors before:content-['']", - "before:ring-border-focus focus-visible:before:border-border focus-visible:before:ring-offset-bg outline-none before:border before:border-transparent before:ring-0 focus-visible:z-50 focus-visible:before:ring-2 focus-visible:before:ring-offset-2", - "selection-start:after:rounded-l-[inherit] selection-end:after:rounded-r-[inherit]", - "selection-start:pressed:before:bg-primary/90 selection-start:text-fg-onPrimary selection-start:before:bg-bg-primary", - "selection-end:pressed:before:bg-primary/90 selection-end:text-fg-onPrimary selection-end:before:bg-bg-primary", - "selected:invalid:after:bg-bg-danger selected:invalid:[&:not([data-selection-start])]:[&:not([data-selection-end])]:text-fg-onDanger", - "unavailable:line-through unavailable:hover:before:bg-transparent unavailable:cursor-default unavailable:text-fg-muted", - "outside-month:hidden", - ], - }, - }, - }, - defaultVariants: { - range: false, - }, -}); - -interface CalendarProps - extends Omit, "visibleDuration"> { - visibleMonths?: number; - errorMessage?: string; -} -const Calendar = ({ - errorMessage, - visibleMonths = 1, - ...props -}: CalendarProps) => { - visibleMonths = Math.min(Math.max(visibleMonths, 1), 3); - - return ( - - {({ isInvalid }) => ( - <> - - - - - -
      - {Array.from({ length: visibleMonths }).map((_, index) => ( - - - {(day) => {day}} - - - {(date) => } - - - ))} -
      - {isInvalid && errorMessage && ( - {errorMessage} - )} - - )} -
      - ); -}; - -type CalendarRootProps = AriaCalendarProps; -const CalendarRoot = (props: CalendarRootProps) => { - const CalendarContext = useSlottedContext(AriaCalendarContext); - const standalone = Object.keys(CalendarContext ?? {}).length === 0; - const { root } = calendarStyles({ standalone }); - return ( - - root({ className }) - )} - /> - ); -}; - -type CalendarHeaderProps = React.HTMLAttributes; -const CalendarHeader = ({ className, ...props }: CalendarHeaderProps) => { - const { header } = calendarStyles(); - return
      ; -}; - -type CalendarGridProps = AriaCalendarGridProps; -const CalendarGrid = ({ className, ...props }: CalendarGridProps) => { - const { grid } = calendarStyles(); - return ; -}; - -type CalendarGridHeaderProps = AriaCalendarGridHeaderProps; -const CalendarGridHeader = ({ - className, - ...props -}: CalendarGridHeaderProps) => { - const { gridHeader } = calendarStyles(); - return ( - - ); -}; - -type CalendarHeaderCellProps = AriaCalendarHeaderCellProps; -const CalendarHeaderCell = ({ - className, - ...props -}: CalendarHeaderCellProps) => { - const { gridHeaderCell } = calendarStyles(); - return ( - - ); -}; - -type CalendarGridBodyProps = AriaCalendarGridBodyProps; -const CalendarGridBody = ({ className, ...props }: CalendarGridBodyProps) => { - const { gridBody } = calendarStyles(); - return ( - - ); -}; - -type CalendarCellProps = AriaCalendarCellProps & { range?: boolean }; -const CalendarCell = ({ range, ...props }: CalendarCellProps) => { - const { cell } = calendarStyles({ range }); - return ( - - cell({ className }) - )} - /> - ); -}; - -export type { - CalendarProps, - CalendarRootProps, - CalendarGridProps, - CalendarGridHeaderProps, - CalendarHeaderCellProps, - CalendarGridBodyProps, - CalendarCellProps, -}; -export { - Calendar, - CalendarRoot, - CalendarHeader, - CalendarGrid, - CalendarGridHeader, - CalendarHeaderCell, - CalendarGridBody, - CalendarCell, - calendarStyles, -}; +"use client"; + +import * as React from "react"; +import { + composeRenderProps, + Calendar as AriaCalendar, + CalendarCell as AriaCalendarCell, + CalendarGrid as AriaCalendarGrid, + CalendarGridHeader as AriaCalendarGridHeader, + CalendarHeaderCell as AriaCalendarHeaderCell, + CalendarGridBody as AriaCalendarGridBody, + type CalendarProps as AriaCalendarProps, + type CalendarGridProps as AriaCalendarGridProps, + type CalendarGridHeaderProps as AriaCalendarGridHeaderProps, + type CalendarHeaderCellProps as AriaCalendarHeaderCellProps, + type CalendarGridBodyProps as AriaCalendarGridBodyProps, + type CalendarCellProps as AriaCalendarCellProps, + type DateValue, + CalendarContext as AriaCalendarContext, + useSlottedContext, +} from "react-aria-components"; +import { tv } from "tailwind-variants"; +import { Button, buttonStyles } from "@/registry/ui/default/core/button"; +import { Heading } from "@/registry/ui/default/core/heading"; +import { Text } from "@/registry/ui/default/core/text"; +import { ChevronLeftIcon, ChevronRightIcon } from "@/__icons__"; + +const calendarStyles = tv({ + slots: { + root: "", + header: "mb-4 flex items-center justify-between gap-2", + grid: "w-full border-collapse", + gridHeader: "mb-4", + gridHeaderCell: "text-fg-muted text-xs font-normal", + gridBody: "[&>tr>td]:p-0", + cell: "", + }, + variants: { + standalone: { + true: { + root: "bg-bg rounded-md border p-3", + }, + false: { + root: "rounded-[inherit]", + }, + }, + range: { + false: { + cell: [ + buttonStyles({ + variant: "quiet", + shape: "square", + size: "sm", + }), + "selected:bg-bg-primary selected:text-fg-onPrimary my-1 disabled:cursor-default disabled:bg-transparent", + "selected:invalid:bg-bg-danger selected:invalid:text-fg-onDanger", + "unavailable:line-through unavailable:hover:bg-transparent unavailable:cursor-default unavailable:text-fg-muted", + "outside-month:hidden", + ], + }, + true: { + cell: [ + "disabled:text-fg-disabled relative my-1 flex size-8 items-center justify-center rounded-md text-sm font-normal leading-normal disabled:cursor-default disabled:bg-transparent", + "selected:after:bg-bg-primary/10 after:absolute after:inset-0 after:transition-colors after:content-['']", + "hover:before:bg-bg-inverse/10 before:absolute before:inset-0 before:z-10 before:rounded-[inherit] before:transition-colors before:content-['']", + "before:ring-border-focus focus-visible:before:border-border focus-visible:before:ring-offset-bg outline-none before:border before:border-transparent before:ring-0 focus-visible:z-50 focus-visible:before:ring-2 focus-visible:before:ring-offset-2", + "selection-start:after:rounded-l-[inherit] selection-end:after:rounded-r-[inherit]", + "selection-start:pressed:before:bg-primary/90 selection-start:text-fg-onPrimary selection-start:before:bg-bg-primary", + "selection-end:pressed:before:bg-primary/90 selection-end:text-fg-onPrimary selection-end:before:bg-bg-primary", + "selected:invalid:after:bg-bg-danger selected:invalid:[&:not([data-selection-start])]:[&:not([data-selection-end])]:text-fg-onDanger", + "unavailable:line-through unavailable:hover:before:bg-transparent unavailable:cursor-default unavailable:text-fg-muted", + "outside-month:hidden", + ], + }, + }, + }, + defaultVariants: { + range: false, + }, +}); + +interface CalendarProps + extends Omit, "visibleDuration"> { + visibleMonths?: number; + errorMessage?: string; +} +const Calendar = ({ + errorMessage, + visibleMonths = 1, + ...props +}: CalendarProps) => { + visibleMonths = Math.min(Math.max(visibleMonths, 1), 3); + + return ( + + {({ isInvalid }) => ( + <> + + + + + +
      + {Array.from({ length: visibleMonths }).map((_, index) => ( + + + {(day) => {day}} + + + {(date) => } + + + ))} +
      + {isInvalid && errorMessage && ( + {errorMessage} + )} + + )} +
      + ); +}; + +type CalendarRootProps = AriaCalendarProps; +const CalendarRoot = (props: CalendarRootProps) => { + const CalendarContext = useSlottedContext(AriaCalendarContext); + const standalone = Object.keys(CalendarContext ?? {}).length === 0; + const { root } = calendarStyles({ standalone }); + return ( + + root({ className }) + )} + /> + ); +}; + +type CalendarHeaderProps = React.HTMLAttributes; +const CalendarHeader = ({ className, ...props }: CalendarHeaderProps) => { + const { header } = calendarStyles(); + return
      ; +}; + +type CalendarGridProps = AriaCalendarGridProps; +const CalendarGrid = ({ className, ...props }: CalendarGridProps) => { + const { grid } = calendarStyles(); + return ; +}; + +type CalendarGridHeaderProps = AriaCalendarGridHeaderProps; +const CalendarGridHeader = ({ + className, + ...props +}: CalendarGridHeaderProps) => { + const { gridHeader } = calendarStyles(); + return ( + + ); +}; + +type CalendarHeaderCellProps = AriaCalendarHeaderCellProps; +const CalendarHeaderCell = ({ + className, + ...props +}: CalendarHeaderCellProps) => { + const { gridHeaderCell } = calendarStyles(); + return ( + + ); +}; + +type CalendarGridBodyProps = AriaCalendarGridBodyProps; +const CalendarGridBody = ({ className, ...props }: CalendarGridBodyProps) => { + const { gridBody } = calendarStyles(); + return ( + + ); +}; + +type CalendarCellProps = AriaCalendarCellProps & { range?: boolean }; +const CalendarCell = ({ range, ...props }: CalendarCellProps) => { + const { cell } = calendarStyles({ range }); + return ( + + cell({ className }) + )} + /> + ); +}; + +export type { + CalendarProps, + CalendarRootProps, + CalendarGridProps, + CalendarGridHeaderProps, + CalendarHeaderCellProps, + CalendarGridBodyProps, + CalendarCellProps, +}; +export { + Calendar, + CalendarRoot, + CalendarHeader, + CalendarGrid, + CalendarGridHeader, + CalendarHeaderCell, + CalendarGridBody, + CalendarCell, + calendarStyles, +}; diff --git a/www/src/registry/ui/default/core/calendar/demos/composition.tsx b/www/src/registry/ui/default/core/calendar/demos/composition.tsx index 8d7d78ef..195be5ad 100644 --- a/www/src/registry/ui/default/core/calendar/demos/composition.tsx +++ b/www/src/registry/ui/default/core/calendar/demos/composition.tsx @@ -1,38 +1,38 @@ -"use client"; - -import { Button } from "@/registry/ui/default/core/button"; -import { - CalendarRoot, - CalendarHeader, - CalendarGrid, - CalendarGridHeader, - CalendarHeaderCell, - CalendarGridBody, - CalendarCell, -} from "@/registry/ui/default/core/calendar"; -import { Heading } from "@/registry/ui/default/core/heading"; -import { ChevronLeftIcon, ChevronRightIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - - - - - - {(day) => {day}} - - - {(date) => } - - - - ); -} +"use client"; + +import { Button } from "@/registry/ui/default/core/button"; +import { + CalendarRoot, + CalendarHeader, + CalendarGrid, + CalendarGridHeader, + CalendarHeaderCell, + CalendarGridBody, + CalendarCell, +} from "@/registry/ui/default/core/calendar"; +import { Heading } from "@/registry/ui/default/core/heading"; +import { ChevronLeftIcon, ChevronRightIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + + + + + + {(day) => {day}} + + + {(date) => } + + + + ); +} diff --git a/www/src/registry/ui/default/core/calendar/demos/controlled.tsx b/www/src/registry/ui/default/core/calendar/demos/controlled.tsx index 15a8fc73..9281f1d0 100644 --- a/www/src/registry/ui/default/core/calendar/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/calendar/demos/controlled.tsx @@ -1,23 +1,23 @@ -"use client"; - -import React from "react"; -import { getLocalTimeZone, today } from "@internationalized/date"; -import { useDateFormatter } from "react-aria"; -import { Calendar } from "@/registry/ui/default/core/calendar"; - -export default function Demo() { - const [value, setValue] = React.useState(today(getLocalTimeZone())); - const formatter = useDateFormatter({ dateStyle: "full" }); - return ( -
      - -

      - Selected date: {formatter.format(value.toDate(getLocalTimeZone()))} -

      -
      - ); -} +"use client"; + +import React from "react"; +import { getLocalTimeZone, today } from "@internationalized/date"; +import { useDateFormatter } from "react-aria"; +import { Calendar } from "@/registry/ui/default/core/calendar"; + +export default function Demo() { + const [value, setValue] = React.useState(today(getLocalTimeZone())); + const formatter = useDateFormatter({ dateStyle: "full" }); + return ( +
      + +

      + Selected date: {formatter.format(value.toDate(getLocalTimeZone()))} +

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/calendar/demos/default.tsx b/www/src/registry/ui/default/core/calendar/demos/default.tsx index 3cbe4fe5..1b30091d 100644 --- a/www/src/registry/ui/default/core/calendar/demos/default.tsx +++ b/www/src/registry/ui/default/core/calendar/demos/default.tsx @@ -1,5 +1,5 @@ -import { Calendar } from "@/registry/ui/default/core/calendar"; - -export default function Demo() { - return ; -} +import { Calendar } from "@/registry/ui/default/core/calendar"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/calendar/demos/disabled.tsx b/www/src/registry/ui/default/core/calendar/demos/disabled.tsx index 8592e422..54ed554f 100644 --- a/www/src/registry/ui/default/core/calendar/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/calendar/demos/disabled.tsx @@ -1,5 +1,5 @@ -import { Calendar } from "@/registry/ui/default/core/calendar"; - -export default function Demo() { - return ; -} +import { Calendar } from "@/registry/ui/default/core/calendar"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/calendar/demos/error-message.tsx b/www/src/registry/ui/default/core/calendar/demos/error-message.tsx index 9d41ef0f..cb321703 100644 --- a/www/src/registry/ui/default/core/calendar/demos/error-message.tsx +++ b/www/src/registry/ui/default/core/calendar/demos/error-message.tsx @@ -1,20 +1,20 @@ -"use client"; - -import React from "react"; -import { today, isWeekend, getLocalTimeZone } from "@internationalized/date"; -import { useLocale } from "react-aria"; -import { Calendar } from "@/registry/ui/default/core/calendar"; - -export default function Demo() { - const [date, setDate] = React.useState(today(getLocalTimeZone())); - const { locale } = useLocale(); - const isInvalid = isWeekend(date, locale); - return ( - - ); -} +"use client"; + +import React from "react"; +import { today, isWeekend, getLocalTimeZone } from "@internationalized/date"; +import { useLocale } from "react-aria"; +import { Calendar } from "@/registry/ui/default/core/calendar"; + +export default function Demo() { + const [date, setDate] = React.useState(today(getLocalTimeZone())); + const { locale } = useLocale(); + const isInvalid = isWeekend(date, locale); + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/calendar/demos/label.tsx b/www/src/registry/ui/default/core/calendar/demos/label.tsx index e2daec1f..a60effe0 100644 --- a/www/src/registry/ui/default/core/calendar/demos/label.tsx +++ b/www/src/registry/ui/default/core/calendar/demos/label.tsx @@ -1,5 +1,5 @@ -import { Calendar } from "@/registry/ui/default/core/calendar"; - -export default function Demo() { - return ; -} +import { Calendar } from "@/registry/ui/default/core/calendar"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/calendar/demos/page-behaviour.tsx b/www/src/registry/ui/default/core/calendar/demos/page-behaviour.tsx index c2fcc581..e6a2994b 100644 --- a/www/src/registry/ui/default/core/calendar/demos/page-behaviour.tsx +++ b/www/src/registry/ui/default/core/calendar/demos/page-behaviour.tsx @@ -1,5 +1,5 @@ -import { Calendar } from "@/registry/ui/default/core/calendar"; - -export default function Demo() { - return ; -} +import { Calendar } from "@/registry/ui/default/core/calendar"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/calendar/demos/read-only.tsx b/www/src/registry/ui/default/core/calendar/demos/read-only.tsx index 21513cc5..c28b9596 100644 --- a/www/src/registry/ui/default/core/calendar/demos/read-only.tsx +++ b/www/src/registry/ui/default/core/calendar/demos/read-only.tsx @@ -1,14 +1,14 @@ -"use client"; - -import { getLocalTimeZone, today } from "@internationalized/date"; -import { Calendar } from "@/registry/ui/default/core/calendar"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import { getLocalTimeZone, today } from "@internationalized/date"; +import { Calendar } from "@/registry/ui/default/core/calendar"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/calendar/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/calendar/demos/uncontrolled.tsx index 58df5386..fa4d4731 100644 --- a/www/src/registry/ui/default/core/calendar/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/calendar/demos/uncontrolled.tsx @@ -1,14 +1,14 @@ -"use client"; - -import React from "react"; -import { getLocalTimeZone, today } from "@internationalized/date"; -import { Calendar } from "@/registry/ui/default/core/calendar"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import React from "react"; +import { getLocalTimeZone, today } from "@internationalized/date"; +import { Calendar } from "@/registry/ui/default/core/calendar"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/calendar/demos/unvailable-dates.tsx b/www/src/registry/ui/default/core/calendar/demos/unvailable-dates.tsx index 15b1686c..d4dbdd34 100644 --- a/www/src/registry/ui/default/core/calendar/demos/unvailable-dates.tsx +++ b/www/src/registry/ui/default/core/calendar/demos/unvailable-dates.tsx @@ -1,35 +1,35 @@ -"use client"; - -import { - type DateValue, - getLocalTimeZone, - isWeekend, - today, -} from "@internationalized/date"; -import { useLocale } from "react-aria"; -import { Calendar } from "@/registry/ui/default/core/calendar"; - -export default function Demo() { - const now = today(getLocalTimeZone()); - const disabledRanges = [ - [now, now.add({ days: 5 })], - [now.add({ days: 14 }), now.add({ days: 16 })], - [now.add({ days: 23 }), now.add({ days: 24 })], - ]; - - const { locale } = useLocale(); - const isDateUnavailable = (date: DateValue) => - isWeekend(date, locale) || - disabledRanges.some( - (interval) => - date.compare(interval[0]) >= 0 && date.compare(interval[1]) <= 0 - ); - - return ( - - ); -} +"use client"; + +import { + type DateValue, + getLocalTimeZone, + isWeekend, + today, +} from "@internationalized/date"; +import { useLocale } from "react-aria"; +import { Calendar } from "@/registry/ui/default/core/calendar"; + +export default function Demo() { + const now = today(getLocalTimeZone()); + const disabledRanges = [ + [now, now.add({ days: 5 })], + [now.add({ days: 14 }), now.add({ days: 16 })], + [now.add({ days: 23 }), now.add({ days: 24 })], + ]; + + const { locale } = useLocale(); + const isDateUnavailable = (date: DateValue) => + isWeekend(date, locale) || + disabledRanges.some( + (interval) => + date.compare(interval[0]) >= 0 && date.compare(interval[1]) <= 0 + ); + + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/calendar/demos/validation.tsx b/www/src/registry/ui/default/core/calendar/demos/validation.tsx index 5cdb6e71..b602bb25 100644 --- a/www/src/registry/ui/default/core/calendar/demos/validation.tsx +++ b/www/src/registry/ui/default/core/calendar/demos/validation.tsx @@ -1,13 +1,13 @@ -"use client"; - -import { getLocalTimeZone, today } from "@internationalized/date"; -import { Calendar } from "@/registry/ui/default/core/calendar"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import { getLocalTimeZone, today } from "@internationalized/date"; +import { Calendar } from "@/registry/ui/default/core/calendar"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/calendar/demos/visible-months.tsx b/www/src/registry/ui/default/core/calendar/demos/visible-months.tsx index 1db1b6e7..98fa6f14 100644 --- a/www/src/registry/ui/default/core/calendar/demos/visible-months.tsx +++ b/www/src/registry/ui/default/core/calendar/demos/visible-months.tsx @@ -1,5 +1,5 @@ -import { Calendar } from "@/registry/ui/default/core/calendar"; - -export default function Demo() { - return ; -} +import { Calendar } from "@/registry/ui/default/core/calendar"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/calendar/index.tsx b/www/src/registry/ui/default/core/calendar/index.tsx index 90fe453b..c35dbf23 100644 --- a/www/src/registry/ui/default/core/calendar/index.tsx +++ b/www/src/registry/ui/default/core/calendar/index.tsx @@ -1 +1 @@ -export * from "./calendar"; +export * from "./calendar"; diff --git a/www/src/registry/ui/default/core/checkbox-group/checkbox-group.tsx b/www/src/registry/ui/default/core/checkbox-group/checkbox-group.tsx index ce249b92..7a90bf8f 100644 --- a/www/src/registry/ui/default/core/checkbox-group/checkbox-group.tsx +++ b/www/src/registry/ui/default/core/checkbox-group/checkbox-group.tsx @@ -1,92 +1,92 @@ -"use client"; - -import * as React from "react"; -import { - CheckboxGroup as AriaCheckboxGroup, - composeRenderProps, - type CheckboxGroupProps as AriaCheckboxGroupProps, -} from "react-aria-components"; -import { tv, type VariantProps } from "tailwind-variants"; -import { CheckboxContext } from "@/registry/ui/default/core/checkbox"; -import { Field, type FieldProps } from "@/registry/ui/default/core/field"; - -const checkboxGroupStyles = tv({ - slots: { - root: "flex flex-col items-start gap-2", - wrapper: "flex", - }, - variants: { - variant: { - default: { - wrapper: "flex-col gap-0.5", - }, - card: { - wrapper: "flex gap-2", - }, - }, - }, - defaultVariants: { - variant: "default", - }, -}); - -interface CheckboxGroupProps - extends CheckboxGroupRootProps, - Omit {} -const CheckboxGroup = React.forwardRef< - React.ElementRef, - CheckboxGroupProps ->( - ( - { - label, - description, - errorMessage, - necessityIndicator, - contextualHelp, - variant, - ...props - }, - ref - ) => { - const { wrapper } = checkboxGroupStyles({ variant }); - return ( - - {composeRenderProps(props.children, (children, { isRequired }) => ( - -
      {children}
      -
      - ))} -
      - ); - } -); -CheckboxGroup.displayName = "CheckboxGroup"; - -interface CheckboxGroupRootProps - extends Omit, - VariantProps { - className?: string; -} -const CheckboxGroupRoot = React.forwardRef< - React.ElementRef, - CheckboxGroupRootProps ->(({ className, variant, ...props }, ref) => { - const { root } = checkboxGroupStyles({ variant }); - return ( - - - - ); -}); -CheckboxGroupRoot.displayName = "CheckboxGroupRoot"; - -export type { CheckboxGroupProps, CheckboxGroupRootProps }; -export { CheckboxGroup, CheckboxGroupRoot }; +"use client"; + +import * as React from "react"; +import { + CheckboxGroup as AriaCheckboxGroup, + composeRenderProps, + type CheckboxGroupProps as AriaCheckboxGroupProps, +} from "react-aria-components"; +import { tv, type VariantProps } from "tailwind-variants"; +import { CheckboxContext } from "@/registry/ui/default/core/checkbox"; +import { Field, type FieldProps } from "@/registry/ui/default/core/field"; + +const checkboxGroupStyles = tv({ + slots: { + root: "flex flex-col items-start gap-2", + wrapper: "flex", + }, + variants: { + variant: { + default: { + wrapper: "flex-col gap-0.5", + }, + card: { + wrapper: "flex gap-2", + }, + }, + }, + defaultVariants: { + variant: "default", + }, +}); + +interface CheckboxGroupProps + extends CheckboxGroupRootProps, + Omit {} +const CheckboxGroup = React.forwardRef< + React.ElementRef, + CheckboxGroupProps +>( + ( + { + label, + description, + errorMessage, + necessityIndicator, + contextualHelp, + variant, + ...props + }, + ref + ) => { + const { wrapper } = checkboxGroupStyles({ variant }); + return ( + + {composeRenderProps(props.children, (children, { isRequired }) => ( + +
      {children}
      +
      + ))} +
      + ); + } +); +CheckboxGroup.displayName = "CheckboxGroup"; + +interface CheckboxGroupRootProps + extends Omit, + VariantProps { + className?: string; +} +const CheckboxGroupRoot = React.forwardRef< + React.ElementRef, + CheckboxGroupRootProps +>(({ className, variant, ...props }, ref) => { + const { root } = checkboxGroupStyles({ variant }); + return ( + + + + ); +}); +CheckboxGroupRoot.displayName = "CheckboxGroupRoot"; + +export type { CheckboxGroupProps, CheckboxGroupRootProps }; +export { CheckboxGroup, CheckboxGroupRoot }; diff --git a/www/src/registry/ui/default/core/checkbox-group/demos/cards.tsx b/www/src/registry/ui/default/core/checkbox-group/demos/cards.tsx index bdaf753f..8ea0307b 100644 --- a/www/src/registry/ui/default/core/checkbox-group/demos/cards.tsx +++ b/www/src/registry/ui/default/core/checkbox-group/demos/cards.tsx @@ -1,16 +1,16 @@ -import { Checkbox } from "@/registry/ui/default/core/checkbox"; -import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; - -export default function Demo() { - return ( - - Next.js - Remix - Gatsby - - ); -} +import { Checkbox } from "@/registry/ui/default/core/checkbox"; +import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; + +export default function Demo() { + return ( + + Next.js + Remix + Gatsby + + ); +} diff --git a/www/src/registry/ui/default/core/checkbox-group/demos/composition.tsx b/www/src/registry/ui/default/core/checkbox-group/demos/composition.tsx index 7801877a..f8d3605b 100644 --- a/www/src/registry/ui/default/core/checkbox-group/demos/composition.tsx +++ b/www/src/registry/ui/default/core/checkbox-group/demos/composition.tsx @@ -1,22 +1,22 @@ -import { Checkbox } from "@/registry/ui/default/core/checkbox"; -import { CheckboxGroupRoot } from "@/registry/ui/default/core/checkbox-group"; -import { - Description, - FieldError, - Label, -} from "@/registry/ui/default/core/field"; - -export default function Demo() { - return ( - - - You can pick any frameworks. -
      - Next.js - Remix - Gatsby -
      - -
      - ); -} +import { Checkbox } from "@/registry/ui/default/core/checkbox"; +import { CheckboxGroupRoot } from "@/registry/ui/default/core/checkbox-group"; +import { + Description, + FieldError, + Label, +} from "@/registry/ui/default/core/field"; + +export default function Demo() { + return ( + + + You can pick any frameworks. +
      + Next.js + Remix + Gatsby +
      + +
      + ); +} diff --git a/www/src/registry/ui/default/core/checkbox-group/demos/contextual-help.tsx b/www/src/registry/ui/default/core/checkbox-group/demos/contextual-help.tsx index 356336d9..d1de4439 100644 --- a/www/src/registry/ui/default/core/checkbox-group/demos/contextual-help.tsx +++ b/www/src/registry/ui/default/core/checkbox-group/demos/contextual-help.tsx @@ -1,22 +1,22 @@ -import { Checkbox } from "@/registry/ui/default/core/checkbox"; -import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; -import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; - -export default function Demo() { - return ( - - } - > - Next.js - Remix - Gatsby - - ); -} +import { Checkbox } from "@/registry/ui/default/core/checkbox"; +import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; +import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; + +export default function Demo() { + return ( + + } + > + Next.js + Remix + Gatsby + + ); +} diff --git a/www/src/registry/ui/default/core/checkbox-group/demos/controlled.tsx b/www/src/registry/ui/default/core/checkbox-group/demos/controlled.tsx index e734ed5b..40b352bc 100644 --- a/www/src/registry/ui/default/core/checkbox-group/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/checkbox-group/demos/controlled.tsx @@ -1,27 +1,27 @@ -"use client"; - -import React from "react"; -import { Checkbox } from "@/registry/ui/default/core/checkbox"; -import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; - -export default function Demo() { - const [frameworks, setFrameworks] = React.useState(["nextjs"]); - return ( -
      - setFrameworks(value)} - > - Next.js - Remix - Gatsby - -

      - {frameworks.length === 0 - ? "You haven't selected any frameworks." - : `You selected ${frameworks.join(", ")}.`} -

      -
      - ); -} +"use client"; + +import React from "react"; +import { Checkbox } from "@/registry/ui/default/core/checkbox"; +import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; + +export default function Demo() { + const [frameworks, setFrameworks] = React.useState(["nextjs"]); + return ( +
      + setFrameworks(value)} + > + Next.js + Remix + Gatsby + +

      + {frameworks.length === 0 + ? "You haven't selected any frameworks." + : `You selected ${frameworks.join(", ")}.`} +

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/checkbox-group/demos/default.tsx b/www/src/registry/ui/default/core/checkbox-group/demos/default.tsx index b17fec5a..93005760 100644 --- a/www/src/registry/ui/default/core/checkbox-group/demos/default.tsx +++ b/www/src/registry/ui/default/core/checkbox-group/demos/default.tsx @@ -1,12 +1,12 @@ -import { Checkbox } from "@/registry/ui/default/core/checkbox"; -import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; - -export default function Demo() { - return ( - - Next.js - Remix - Gatsby - - ); -} +import { Checkbox } from "@/registry/ui/default/core/checkbox"; +import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; + +export default function Demo() { + return ( + + Next.js + Remix + Gatsby + + ); +} diff --git a/www/src/registry/ui/default/core/checkbox-group/demos/description.tsx b/www/src/registry/ui/default/core/checkbox-group/demos/description.tsx index 80f6d3a1..2fd9e73d 100644 --- a/www/src/registry/ui/default/core/checkbox-group/demos/description.tsx +++ b/www/src/registry/ui/default/core/checkbox-group/demos/description.tsx @@ -1,16 +1,16 @@ -import { Checkbox } from "@/registry/ui/default/core/checkbox"; -import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; - -export default function Demo() { - return ( - - Next.js - Remix - Gatsby - - ); -} +import { Checkbox } from "@/registry/ui/default/core/checkbox"; +import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; + +export default function Demo() { + return ( + + Next.js + Remix + Gatsby + + ); +} diff --git a/www/src/registry/ui/default/core/checkbox-group/demos/disabled.tsx b/www/src/registry/ui/default/core/checkbox-group/demos/disabled.tsx index 3f0ad873..c279da89 100644 --- a/www/src/registry/ui/default/core/checkbox-group/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/checkbox-group/demos/disabled.tsx @@ -1,16 +1,16 @@ -import { Checkbox } from "@/registry/ui/default/core/checkbox"; -import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; - -export default function Demo() { - return ( - - Next.js - Remix - Gatsby - - ); -} +import { Checkbox } from "@/registry/ui/default/core/checkbox"; +import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; + +export default function Demo() { + return ( + + Next.js + Remix + Gatsby + + ); +} diff --git a/www/src/registry/ui/default/core/checkbox-group/demos/error-message.tsx b/www/src/registry/ui/default/core/checkbox-group/demos/error-message.tsx index c7c6a5d9..af5407c2 100644 --- a/www/src/registry/ui/default/core/checkbox-group/demos/error-message.tsx +++ b/www/src/registry/ui/default/core/checkbox-group/demos/error-message.tsx @@ -1,16 +1,16 @@ -import { Checkbox } from "@/registry/ui/default/core/checkbox"; -import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; - -export default function Demo() { - return ( - - Next.js - Remix - Gatsby - - ); -} +import { Checkbox } from "@/registry/ui/default/core/checkbox"; +import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; + +export default function Demo() { + return ( + + Next.js + Remix + Gatsby + + ); +} diff --git a/www/src/registry/ui/default/core/checkbox-group/demos/label.tsx b/www/src/registry/ui/default/core/checkbox-group/demos/label.tsx index 7d94da5e..7538d67b 100644 --- a/www/src/registry/ui/default/core/checkbox-group/demos/label.tsx +++ b/www/src/registry/ui/default/core/checkbox-group/demos/label.tsx @@ -1,17 +1,17 @@ -import { Checkbox } from "@/registry/ui/default/core/checkbox"; -import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; - -export default function Demo() { - return ( -
      - - Next.js - Remix - - - Next.js - Remix - -
      - ); -} +import { Checkbox } from "@/registry/ui/default/core/checkbox"; +import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; + +export default function Demo() { + return ( +
      + + Next.js + Remix + + + Next.js + Remix + +
      + ); +} diff --git a/www/src/registry/ui/default/core/checkbox-group/demos/read-only.tsx b/www/src/registry/ui/default/core/checkbox-group/demos/read-only.tsx index 8140665e..a7c222e8 100644 --- a/www/src/registry/ui/default/core/checkbox-group/demos/read-only.tsx +++ b/www/src/registry/ui/default/core/checkbox-group/demos/read-only.tsx @@ -1,16 +1,16 @@ -import { Checkbox } from "@/registry/ui/default/core/checkbox"; -import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; - -export default function Demo() { - return ( - - Next.js - Remix - Gatsby - - ); -} +import { Checkbox } from "@/registry/ui/default/core/checkbox"; +import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; + +export default function Demo() { + return ( + + Next.js + Remix + Gatsby + + ); +} diff --git a/www/src/registry/ui/default/core/checkbox-group/demos/required.tsx b/www/src/registry/ui/default/core/checkbox-group/demos/required.tsx index 528c90c3..2d0eb395 100644 --- a/www/src/registry/ui/default/core/checkbox-group/demos/required.tsx +++ b/www/src/registry/ui/default/core/checkbox-group/demos/required.tsx @@ -1,34 +1,34 @@ -import React from "react"; -import { Checkbox } from "@/registry/ui/default/core/checkbox"; -import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; - -export default function Demo() { - return ( -
      - - Next.js - Remix - - - Next.js - Remix - - - Next.js - Remix - - - Next.js - Remix - -
      - ); -} +import React from "react"; +import { Checkbox } from "@/registry/ui/default/core/checkbox"; +import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; + +export default function Demo() { + return ( +
      + + Next.js + Remix + + + Next.js + Remix + + + Next.js + Remix + + + Next.js + Remix + +
      + ); +} diff --git a/www/src/registry/ui/default/core/checkbox-group/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/checkbox-group/demos/uncontrolled.tsx index b17fec5a..93005760 100644 --- a/www/src/registry/ui/default/core/checkbox-group/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/checkbox-group/demos/uncontrolled.tsx @@ -1,12 +1,12 @@ -import { Checkbox } from "@/registry/ui/default/core/checkbox"; -import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; - -export default function Demo() { - return ( - - Next.js - Remix - Gatsby - - ); -} +import { Checkbox } from "@/registry/ui/default/core/checkbox"; +import { CheckboxGroup } from "@/registry/ui/default/core/checkbox-group"; + +export default function Demo() { + return ( + + Next.js + Remix + Gatsby + + ); +} diff --git a/www/src/registry/ui/default/core/checkbox-group/index.tsx b/www/src/registry/ui/default/core/checkbox-group/index.tsx index 28b3e41b..1c90b645 100644 --- a/www/src/registry/ui/default/core/checkbox-group/index.tsx +++ b/www/src/registry/ui/default/core/checkbox-group/index.tsx @@ -1 +1 @@ -export * from "./checkbox-group"; +export * from "./checkbox-group"; diff --git a/www/src/registry/ui/default/core/checkbox/checkbox.tsx b/www/src/registry/ui/default/core/checkbox/checkbox.tsx index 2c58f23c..175e8d81 100644 --- a/www/src/registry/ui/default/core/checkbox/checkbox.tsx +++ b/www/src/registry/ui/default/core/checkbox/checkbox.tsx @@ -1,85 +1,85 @@ -"use client"; - -import * as React from "react"; -import { - Checkbox as AriaCheckbox, - composeRenderProps, - type CheckboxProps as AriaCheckboxProps, -} from "react-aria-components"; -import { tv, type VariantProps } from "tailwind-variants"; -import { - focusRing, - focusRingGroup, -} from "@/registry/ui/default/lib/focus-styles"; -import { CheckIcon, MinusIcon } from "@/__icons__"; - -const checkboxStyles = tv({ - slots: { - root: "invalid:text-fg-danger disabled:text-fg-disabled group flex cursor-pointer flex-row items-center gap-2 disabled:cursor-default", - indicator: [ - "border-border-control flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-sm border", - "group-selected:bg-bg-primary group-selected:text-fg-onPrimary group-selected:border-transparent bg-transparent text-transparent transition-colors duration-75", - "group-indeterminate:bg-bg-primary group-indeterminate:text-fg-onPrimary", - "group-read-only:cursor-default", - "group-disabled:border-border-disabled group-disabled:group-selected:text-fg-disabled group-disabled:group-selected:bg-bg-disabled group-disabled:group-indeterminate:bg-bg-disabled group-disabled:cursor-not-allowed", - "group-invalid:border-border-danger group-invalid:group-selected:bg-bg-danger-muted group-invalid:group-selected:text-fg-onMutedDanger", - ], - }, - variants: { - variant: { - default: { - indicator: focusRingGroup(), - }, - card: { - root: [ - focusRing(), - "selected:bg-bg-muted disabled:selected:bg-bg-disabled disabled:border-border-disabled flex-row-reverse gap-4 rounded-md border p-4 transition-colors", - ], - }, - }, - }, - defaultVariants: { - variant: "default", - }, -}); - -interface CheckboxProps - extends Omit, - VariantProps { - className?: string; -} -const Checkbox = React.forwardRef< - React.ElementRef, - CheckboxProps ->((localProps, ref) => { - const contextProps = useCheckboxContext(); - const props = { ...contextProps, ...localProps }; - const { className, variant, ...restProps } = props; - const { root, indicator } = checkboxStyles({ variant }); - return ( - - {composeRenderProps(props.children, (children, { isIndeterminate }) => ( - <> -
      - {isIndeterminate ? ( - - ) : ( - - )} -
      - {children} - - ))} -
      - ); -}); -Checkbox.displayName = "Checkbox"; - -type CheckboxContextValue = VariantProps; -const CheckboxContext = React.createContext({}); -const useCheckboxContext = () => { - return React.useContext(CheckboxContext); -}; - -export type { CheckboxProps }; -export { Checkbox, CheckboxContext }; +"use client"; + +import * as React from "react"; +import { + Checkbox as AriaCheckbox, + composeRenderProps, + type CheckboxProps as AriaCheckboxProps, +} from "react-aria-components"; +import { tv, type VariantProps } from "tailwind-variants"; +import { + focusRing, + focusRingGroup, +} from "@/registry/ui/default/lib/focus-styles"; +import { CheckIcon, MinusIcon } from "@/__icons__"; + +const checkboxStyles = tv({ + slots: { + root: "invalid:text-fg-danger disabled:text-fg-disabled group flex cursor-pointer flex-row items-center gap-2 disabled:cursor-default", + indicator: [ + "border-border-control flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-sm border", + "group-selected:bg-bg-primary group-selected:text-fg-onPrimary group-selected:border-transparent bg-transparent text-transparent transition-colors duration-75", + "group-indeterminate:bg-bg-primary group-indeterminate:text-fg-onPrimary", + "group-read-only:cursor-default", + "group-disabled:border-border-disabled group-disabled:group-selected:text-fg-disabled group-disabled:group-selected:bg-bg-disabled group-disabled:group-indeterminate:bg-bg-disabled group-disabled:cursor-not-allowed", + "group-invalid:border-border-danger group-invalid:group-selected:bg-bg-danger-muted group-invalid:group-selected:text-fg-onMutedDanger", + ], + }, + variants: { + variant: { + default: { + indicator: focusRingGroup(), + }, + card: { + root: [ + focusRing(), + "selected:bg-bg-muted disabled:selected:bg-bg-disabled disabled:border-border-disabled flex-row-reverse gap-4 rounded-md border p-4 transition-colors", + ], + }, + }, + }, + defaultVariants: { + variant: "default", + }, +}); + +interface CheckboxProps + extends Omit, + VariantProps { + className?: string; +} +const Checkbox = React.forwardRef< + React.ElementRef, + CheckboxProps +>((localProps, ref) => { + const contextProps = useCheckboxContext(); + const props = { ...contextProps, ...localProps }; + const { className, variant, ...restProps } = props; + const { root, indicator } = checkboxStyles({ variant }); + return ( + + {composeRenderProps(props.children, (children, { isIndeterminate }) => ( + <> +
      + {isIndeterminate ? ( + + ) : ( + + )} +
      + {children} + + ))} +
      + ); +}); +Checkbox.displayName = "Checkbox"; + +type CheckboxContextValue = VariantProps; +const CheckboxContext = React.createContext({}); +const useCheckboxContext = () => { + return React.useContext(CheckboxContext); +}; + +export type { CheckboxProps }; +export { Checkbox, CheckboxContext }; diff --git a/www/src/registry/ui/default/core/checkbox/demos/card.tsx b/www/src/registry/ui/default/core/checkbox/demos/card.tsx index 94c54ca6..1172d542 100644 --- a/www/src/registry/ui/default/core/checkbox/demos/card.tsx +++ b/www/src/registry/ui/default/core/checkbox/demos/card.tsx @@ -1,7 +1,7 @@ -import { Checkbox } from "@/registry/ui/default/core/checkbox"; - -export default function Demo() { - return ( - I agree to the terms and conditions - ); -} +import { Checkbox } from "@/registry/ui/default/core/checkbox"; + +export default function Demo() { + return ( + I agree to the terms and conditions + ); +} diff --git a/www/src/registry/ui/default/core/checkbox/demos/controlled.tsx b/www/src/registry/ui/default/core/checkbox/demos/controlled.tsx index 3fa180d8..d3a80d82 100644 --- a/www/src/registry/ui/default/core/checkbox/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/checkbox/demos/controlled.tsx @@ -1,18 +1,18 @@ -"use client"; - -import React from "react"; -import { Checkbox } from "@/registry/ui/default/core/checkbox"; - -export default function Demo() { - const [checked, setChecked] = React.useState(false); - return ( -
      - - I accept the terms and conditions - -

      - Checked: {checked ? "true" : "false"} -

      -
      - ); -} +"use client"; + +import React from "react"; +import { Checkbox } from "@/registry/ui/default/core/checkbox"; + +export default function Demo() { + const [checked, setChecked] = React.useState(false); + return ( +
      + + I accept the terms and conditions + +

      + Checked: {checked ? "true" : "false"} +

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/checkbox/demos/default.tsx b/www/src/registry/ui/default/core/checkbox/demos/default.tsx index 43495e3c..7bf14e86 100644 --- a/www/src/registry/ui/default/core/checkbox/demos/default.tsx +++ b/www/src/registry/ui/default/core/checkbox/demos/default.tsx @@ -1,15 +1,15 @@ -"use client"; - -import { Checkbox } from "@/registry/ui/default/core/checkbox"; -import { Link } from "@/registry/ui/default/core/link"; - -export default function Demo() { - return ( - - I accept the{" "} - - terms and conditions - - - ); -} +"use client"; + +import { Checkbox } from "@/registry/ui/default/core/checkbox"; +import { Link } from "@/registry/ui/default/core/link"; + +export default function Demo() { + return ( + + I accept the{" "} + + terms and conditions + + + ); +} diff --git a/www/src/registry/ui/default/core/checkbox/demos/disabled.tsx b/www/src/registry/ui/default/core/checkbox/demos/disabled.tsx index a8428ea3..28426d7f 100644 --- a/www/src/registry/ui/default/core/checkbox/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/checkbox/demos/disabled.tsx @@ -1,7 +1,7 @@ -"use client"; - -import { Checkbox } from "@/registry/ui/default/core/checkbox"; - -export default function Demo() { - return I accept the terms and conditions; -} +"use client"; + +import { Checkbox } from "@/registry/ui/default/core/checkbox"; + +export default function Demo() { + return I accept the terms and conditions; +} diff --git a/www/src/registry/ui/default/core/checkbox/demos/indeterminate.tsx b/www/src/registry/ui/default/core/checkbox/demos/indeterminate.tsx index 5657966d..eb69b6c3 100644 --- a/www/src/registry/ui/default/core/checkbox/demos/indeterminate.tsx +++ b/www/src/registry/ui/default/core/checkbox/demos/indeterminate.tsx @@ -1,7 +1,7 @@ -"use client"; - -import { Checkbox } from "@/registry/ui/default/core/checkbox"; - -export default function Demo() { - return Select all; -} +"use client"; + +import { Checkbox } from "@/registry/ui/default/core/checkbox"; + +export default function Demo() { + return Select all; +} diff --git a/www/src/registry/ui/default/core/checkbox/demos/read-only.tsx b/www/src/registry/ui/default/core/checkbox/demos/read-only.tsx index 1ad502a5..4fc8e46e 100644 --- a/www/src/registry/ui/default/core/checkbox/demos/read-only.tsx +++ b/www/src/registry/ui/default/core/checkbox/demos/read-only.tsx @@ -1,9 +1,9 @@ -import { Checkbox } from "@/registry/ui/default/core/checkbox"; - -export default function Demo() { - return ( - - I accept the terms and conditions - - ); -} +import { Checkbox } from "@/registry/ui/default/core/checkbox"; + +export default function Demo() { + return ( + + I accept the terms and conditions + + ); +} diff --git a/www/src/registry/ui/default/core/checkbox/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/checkbox/demos/uncontrolled.tsx index fe354a0d..977a628c 100644 --- a/www/src/registry/ui/default/core/checkbox/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/checkbox/demos/uncontrolled.tsx @@ -1,5 +1,5 @@ -import { Checkbox } from "@/registry/ui/default/core/checkbox"; - -export default function Demo() { - return I accept the terms and conditions; -} +import { Checkbox } from "@/registry/ui/default/core/checkbox"; + +export default function Demo() { + return I accept the terms and conditions; +} diff --git a/www/src/registry/ui/default/core/checkbox/index.tsx b/www/src/registry/ui/default/core/checkbox/index.tsx index 057f1678..649e9274 100644 --- a/www/src/registry/ui/default/core/checkbox/index.tsx +++ b/www/src/registry/ui/default/core/checkbox/index.tsx @@ -1 +1 @@ -export * from "./checkbox"; +export * from "./checkbox"; diff --git a/www/src/registry/ui/default/core/collapsible/collapsible.tsx b/www/src/registry/ui/default/core/collapsible/collapsible.tsx index e8d92889..7e5348ee 100644 --- a/www/src/registry/ui/default/core/collapsible/collapsible.tsx +++ b/www/src/registry/ui/default/core/collapsible/collapsible.tsx @@ -1,32 +1,32 @@ -"use client"; - -import React from "react"; -import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"; -import { cn } from "@/registry/ui/default/lib/cn"; - -const CollapsibleRoot = CollapsiblePrimitive.Root; - -const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger; - -const CollapsibleContent = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( - -)); - -CollapsibleContent.displayName = "CollapsibleContent"; - -export { - CollapsibleRoot, - CollapsibleRoot as Collapsible, - CollapsibleTrigger, - CollapsibleContent, -}; +"use client"; + +import React from "react"; +import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"; +import { cn } from "@/registry/ui/default/lib/cn"; + +const CollapsibleRoot = CollapsiblePrimitive.Root; + +const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger; + +const CollapsibleContent = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); + +CollapsibleContent.displayName = "CollapsibleContent"; + +export { + CollapsibleRoot, + CollapsibleRoot as Collapsible, + CollapsibleTrigger, + CollapsibleContent, +}; diff --git a/www/src/registry/ui/default/core/collapsible/index.tsx b/www/src/registry/ui/default/core/collapsible/index.tsx index dbd92623..da5840df 100644 --- a/www/src/registry/ui/default/core/collapsible/index.tsx +++ b/www/src/registry/ui/default/core/collapsible/index.tsx @@ -1 +1 @@ -export * from "./collapsible"; +export * from "./collapsible"; diff --git a/www/src/registry/ui/default/core/color-area/color-area.tsx b/www/src/registry/ui/default/core/color-area/color-area.tsx index ad24e8dd..1f66d20c 100644 --- a/www/src/registry/ui/default/core/color-area/color-area.tsx +++ b/www/src/registry/ui/default/core/color-area/color-area.tsx @@ -1,40 +1,40 @@ -"use client"; - -import { - ColorArea as AriaColorArea, - composeRenderProps, - type ColorAreaProps as AriaColorAreaProps, -} from "react-aria-components"; -import { tv } from "tailwind-variants"; -import { ColorThumb } from "@/registry/ui/default/core/color-thumb"; - -const colorAreaStyles = tv({ - base: "disabled:!bg-bg-disabled inline-block size-48 min-w-20 rounded-md", -}); - -type ColorAreaProps = Omit; -const ColorArea = (props: ColorAreaProps) => { - return ( - - - - ); -}; - -interface ColorAreaRootProps extends Omit { - className?: string; -} -const ColorAreaRoot = ({ className, ...props }: ColorAreaRootProps) => { - return ( - ({ - ...style, - ...(isDisabled ? { background: "none" } : {}), - }))} - /> - ); -}; - -export { ColorArea, ColorAreaRoot }; +"use client"; + +import { + ColorArea as AriaColorArea, + composeRenderProps, + type ColorAreaProps as AriaColorAreaProps, +} from "react-aria-components"; +import { tv } from "tailwind-variants"; +import { ColorThumb } from "@/registry/ui/default/core/color-thumb"; + +const colorAreaStyles = tv({ + base: "disabled:!bg-bg-disabled inline-block size-48 min-w-20 rounded-md", +}); + +type ColorAreaProps = Omit; +const ColorArea = (props: ColorAreaProps) => { + return ( + + + + ); +}; + +interface ColorAreaRootProps extends Omit { + className?: string; +} +const ColorAreaRoot = ({ className, ...props }: ColorAreaRootProps) => { + return ( + ({ + ...style, + ...(isDisabled ? { background: "none" } : {}), + }))} + /> + ); +}; + +export { ColorArea, ColorAreaRoot }; diff --git a/www/src/registry/ui/default/core/color-area/demos/channels.tsx b/www/src/registry/ui/default/core/color-area/demos/channels.tsx index c117896b..26cafa4a 100644 --- a/www/src/registry/ui/default/core/color-area/demos/channels.tsx +++ b/www/src/registry/ui/default/core/color-area/demos/channels.tsx @@ -1,5 +1,5 @@ -import { ColorArea } from "@/registry/ui/default/core/color-area"; - -export default function Demo() { - return ; -} +import { ColorArea } from "@/registry/ui/default/core/color-area"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/color-area/demos/composition.tsx b/www/src/registry/ui/default/core/color-area/demos/composition.tsx index d2ed9c13..c1c0d6b4 100644 --- a/www/src/registry/ui/default/core/color-area/demos/composition.tsx +++ b/www/src/registry/ui/default/core/color-area/demos/composition.tsx @@ -1,10 +1,10 @@ -import { ColorAreaRoot } from "@/registry/ui/default/core/color-area"; -import { ColorThumb } from "@/registry/ui/default/core/color-thumb"; - -export default function Demo() { - return ( - - - - ); -} +import { ColorAreaRoot } from "@/registry/ui/default/core/color-area"; +import { ColorThumb } from "@/registry/ui/default/core/color-thumb"; + +export default function Demo() { + return ( + + + + ); +} diff --git a/www/src/registry/ui/default/core/color-area/demos/controlled.tsx b/www/src/registry/ui/default/core/color-area/demos/controlled.tsx index 1e3a53e3..82bc8f7f 100644 --- a/www/src/registry/ui/default/core/color-area/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/color-area/demos/controlled.tsx @@ -1,22 +1,22 @@ -"use client"; - -import React from "react"; -import { parseColor } from "react-aria-components"; -import { ColorArea } from "@/registry/ui/default/core/color-area"; - -export default function Demo() { - const [value, setValue] = React.useState(parseColor("hsl(0, 100%, 50%)")); - return ( -
      - -

      - Selected color : {value.toString()} -

      -
      - ); -} +"use client"; + +import React from "react"; +import { parseColor } from "react-aria-components"; +import { ColorArea } from "@/registry/ui/default/core/color-area"; + +export default function Demo() { + const [value, setValue] = React.useState(parseColor("hsl(0, 100%, 50%)")); + return ( +
      + +

      + Selected color : {value.toString()} +

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/color-area/demos/default.tsx b/www/src/registry/ui/default/core/color-area/demos/default.tsx index beb8b440..7ec7907c 100644 --- a/www/src/registry/ui/default/core/color-area/demos/default.tsx +++ b/www/src/registry/ui/default/core/color-area/demos/default.tsx @@ -1,5 +1,5 @@ -import { ColorArea } from "@/registry/ui/default/core/color-area"; - -export default function Demo() { - return ; -} +import { ColorArea } from "@/registry/ui/default/core/color-area"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/color-area/demos/disabled.tsx b/www/src/registry/ui/default/core/color-area/demos/disabled.tsx index b90ba1e4..5820dca8 100644 --- a/www/src/registry/ui/default/core/color-area/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/color-area/demos/disabled.tsx @@ -1,5 +1,5 @@ -import { ColorArea } from "@/registry/ui/default/core/color-area"; - -export default function Demo() { - return ; -} +import { ColorArea } from "@/registry/ui/default/core/color-area"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/color-area/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/color-area/demos/uncontrolled.tsx index dd954b30..7b4b9c6d 100644 --- a/www/src/registry/ui/default/core/color-area/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/color-area/demos/uncontrolled.tsx @@ -1,5 +1,5 @@ -import { ColorArea } from "@/registry/ui/default/core/color-area"; - -export default function Demo() { - return ; -} +import { ColorArea } from "@/registry/ui/default/core/color-area"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/color-area/index.ts b/www/src/registry/ui/default/core/color-area/index.ts index 5ed0daff..ebd6d9a6 100644 --- a/www/src/registry/ui/default/core/color-area/index.ts +++ b/www/src/registry/ui/default/core/color-area/index.ts @@ -1 +1 @@ -export * from "./color-area"; +export * from "./color-area"; diff --git a/www/src/registry/ui/default/core/color-field/color-field.tsx b/www/src/registry/ui/default/core/color-field/color-field.tsx index ec61972e..4ac1373e 100644 --- a/www/src/registry/ui/default/core/color-field/color-field.tsx +++ b/www/src/registry/ui/default/core/color-field/color-field.tsx @@ -1,93 +1,93 @@ -"use client"; - -import * as React from "react"; -import { - ColorField as AriaColorField, - type ColorFieldProps as AriaColorFieldProps, -} from "react-aria-components"; -import { tv, type VariantProps } from "tailwind-variants"; -import { Field, type FieldProps } from "@/registry/ui/default/core/field"; -import { - InputRoot, - Input, - type inputStyles, -} from "@/registry/ui/default/core/input"; - -const colorFieldStyles = tv({ - base: "flex w-48 flex-col items-start gap-2", -}); - -type ColorFieldProps = ColorFieldRootProps & - Omit & - VariantProps & { - prefix?: React.ReactNode; - suffix?: React.ReactNode; - isLoading?: boolean; - loaderPosition?: "prefix" | "suffix"; - placeholder?: string; - }; -const ColorField = React.forwardRef( - ( - { - className, - size, - placeholder, - label, - description, - errorMessage, - prefix, - suffix, - isLoading, - loaderPosition = "suffix", - isRequired, - necessityIndicator, - contextualHelp, - ...props - }, - ref - ) => { - return ( - - - - - - - - ); - } -); -ColorField.displayName = "ColorField"; - -type ColorFieldRootProps = Omit & { - className?: string; -}; -const ColorFieldRoot = React.forwardRef< - React.ElementRef, - ColorFieldRootProps ->(({ className, ...props }, ref) => { - return ( - - ); -}); -ColorFieldRoot.displayName = "ColorFieldRoot"; - -export type { ColorFieldProps, ColorFieldRootProps }; -export { ColorField, ColorFieldRoot }; +"use client"; + +import * as React from "react"; +import { + ColorField as AriaColorField, + type ColorFieldProps as AriaColorFieldProps, +} from "react-aria-components"; +import { tv, type VariantProps } from "tailwind-variants"; +import { Field, type FieldProps } from "@/registry/ui/default/core/field"; +import { + InputRoot, + Input, + type inputStyles, +} from "@/registry/ui/default/core/input"; + +const colorFieldStyles = tv({ + base: "flex w-48 flex-col items-start gap-2", +}); + +type ColorFieldProps = ColorFieldRootProps & + Omit & + VariantProps & { + prefix?: React.ReactNode; + suffix?: React.ReactNode; + isLoading?: boolean; + loaderPosition?: "prefix" | "suffix"; + placeholder?: string; + }; +const ColorField = React.forwardRef( + ( + { + className, + size, + placeholder, + label, + description, + errorMessage, + prefix, + suffix, + isLoading, + loaderPosition = "suffix", + isRequired, + necessityIndicator, + contextualHelp, + ...props + }, + ref + ) => { + return ( + + + + + + + + ); + } +); +ColorField.displayName = "ColorField"; + +type ColorFieldRootProps = Omit & { + className?: string; +}; +const ColorFieldRoot = React.forwardRef< + React.ElementRef, + ColorFieldRootProps +>(({ className, ...props }, ref) => { + return ( + + ); +}); +ColorFieldRoot.displayName = "ColorFieldRoot"; + +export type { ColorFieldProps, ColorFieldRootProps }; +export { ColorField, ColorFieldRoot }; diff --git a/www/src/registry/ui/default/core/color-field/demos/composition.tsx b/www/src/registry/ui/default/core/color-field/demos/composition.tsx index fcc5f1a6..a7c6b403 100644 --- a/www/src/registry/ui/default/core/color-field/demos/composition.tsx +++ b/www/src/registry/ui/default/core/color-field/demos/composition.tsx @@ -1,23 +1,23 @@ -"use client"; - -import React from "react"; -import { ColorFieldRoot } from "@/registry/ui/default/core/color-field"; -import { - Description, - FieldError, - Label, -} from "@/registry/ui/default/core/field"; -import { Input, InputRoot } from "@/registry/ui/default/core/input"; - -export default function Demo() { - return ( - - - - - - Enter a background color. - - - ); -} +"use client"; + +import React from "react"; +import { ColorFieldRoot } from "@/registry/ui/default/core/color-field"; +import { + Description, + FieldError, + Label, +} from "@/registry/ui/default/core/field"; +import { Input, InputRoot } from "@/registry/ui/default/core/input"; + +export default function Demo() { + return ( + + + + + + Enter a background color. + + + ); +} diff --git a/www/src/registry/ui/default/core/color-field/demos/contextual-help.tsx b/www/src/registry/ui/default/core/color-field/demos/contextual-help.tsx index 69447373..09dc643f 100644 --- a/www/src/registry/ui/default/core/color-field/demos/contextual-help.tsx +++ b/www/src/registry/ui/default/core/color-field/demos/contextual-help.tsx @@ -1,18 +1,18 @@ -import React from "react"; -import { ColorField } from "@/registry/ui/default/core/color-field"; -import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; - -export default function Demo() { - return ( - - } - /> - ); -} +import React from "react"; +import { ColorField } from "@/registry/ui/default/core/color-field"; +import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; + +export default function Demo() { + return ( + + } + /> + ); +} diff --git a/www/src/registry/ui/default/core/color-field/demos/controlled.tsx b/www/src/registry/ui/default/core/color-field/demos/controlled.tsx index 77adc789..6e8eb90e 100644 --- a/www/src/registry/ui/default/core/color-field/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/color-field/demos/controlled.tsx @@ -1,17 +1,17 @@ -"use client"; - -import React from "react"; -import { type Color, parseColor } from "react-aria-components"; -import { ColorField } from "@/registry/ui/default/core/color-field"; - -export default function Demo() { - const [color, setColor] = React.useState(parseColor("#7f007f")); - return ( -
      - -

      - Current color value: {color?.toString("hex")} -

      -
      - ); -} +"use client"; + +import React from "react"; +import { type Color, parseColor } from "react-aria-components"; +import { ColorField } from "@/registry/ui/default/core/color-field"; + +export default function Demo() { + const [color, setColor] = React.useState(parseColor("#7f007f")); + return ( +
      + +

      + Current color value: {color?.toString("hex")} +

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/color-field/demos/default.tsx b/www/src/registry/ui/default/core/color-field/demos/default.tsx index f207e51c..dde7fc77 100644 --- a/www/src/registry/ui/default/core/color-field/demos/default.tsx +++ b/www/src/registry/ui/default/core/color-field/demos/default.tsx @@ -1,8 +1,8 @@ -"use client"; - -import React from "react"; -import { ColorField } from "@/registry/ui/default/core/color-field"; - -export default function Demo() { - return ; -} +"use client"; + +import React from "react"; +import { ColorField } from "@/registry/ui/default/core/color-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/color-field/demos/description.tsx b/www/src/registry/ui/default/core/color-field/demos/description.tsx index 798cb27d..4d796957 100644 --- a/www/src/registry/ui/default/core/color-field/demos/description.tsx +++ b/www/src/registry/ui/default/core/color-field/demos/description.tsx @@ -1,8 +1,8 @@ -"use client"; - -import React from "react"; -import { ColorField } from "@/registry/ui/default/core/color-field"; - -export default function Demo() { - return ; -} +"use client"; + +import React from "react"; +import { ColorField } from "@/registry/ui/default/core/color-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/color-field/demos/disabled.tsx b/www/src/registry/ui/default/core/color-field/demos/disabled.tsx index 3cad69ae..0f803bc4 100644 --- a/www/src/registry/ui/default/core/color-field/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/color-field/demos/disabled.tsx @@ -1,8 +1,8 @@ -"use client"; - -import { parseColor } from "react-aria-components"; -import { ColorField } from "@/registry/ui/default/core/color-field"; - -export default function Demo() { - return ; -} +"use client"; + +import { parseColor } from "react-aria-components"; +import { ColorField } from "@/registry/ui/default/core/color-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/color-field/demos/error-message.tsx b/www/src/registry/ui/default/core/color-field/demos/error-message.tsx index 83f18498..c4bf1af4 100644 --- a/www/src/registry/ui/default/core/color-field/demos/error-message.tsx +++ b/www/src/registry/ui/default/core/color-field/demos/error-message.tsx @@ -1,14 +1,14 @@ -"use client"; - -import React from "react"; -import { ColorField } from "@/registry/ui/default/core/color-field"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import React from "react"; +import { ColorField } from "@/registry/ui/default/core/color-field"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/color-field/demos/form.tsx b/www/src/registry/ui/default/core/color-field/demos/form.tsx index 2671023e..b8762ced 100644 --- a/www/src/registry/ui/default/core/color-field/demos/form.tsx +++ b/www/src/registry/ui/default/core/color-field/demos/form.tsx @@ -1,8 +1,8 @@ -"use client"; - -import React from "react"; -import { ColorField } from "@/registry/ui/default/core/color-field"; - -export default function Demo() { - return ; -} +"use client"; + +import React from "react"; +import { ColorField } from "@/registry/ui/default/core/color-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/color-field/demos/label.tsx b/www/src/registry/ui/default/core/color-field/demos/label.tsx index 72a099e8..c2e50100 100644 --- a/www/src/registry/ui/default/core/color-field/demos/label.tsx +++ b/www/src/registry/ui/default/core/color-field/demos/label.tsx @@ -1,10 +1,10 @@ -import { ColorField } from "@/registry/ui/default/core/color-field"; - -export default function Demo() { - return ( -
      - - -
      - ); -} +import { ColorField } from "@/registry/ui/default/core/color-field"; + +export default function Demo() { + return ( +
      + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/color-field/demos/loading.tsx b/www/src/registry/ui/default/core/color-field/demos/loading.tsx index 68858cd5..0a61e0f2 100644 --- a/www/src/registry/ui/default/core/color-field/demos/loading.tsx +++ b/www/src/registry/ui/default/core/color-field/demos/loading.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import { ColorField } from "@/registry/ui/default/core/color-field"; - -export default function Demo() { - return ( -
      - - -
      - ); -} +import React from "react"; +import { ColorField } from "@/registry/ui/default/core/color-field"; + +export default function Demo() { + return ( +
      + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/color-field/demos/prefix-and-suffix.tsx b/www/src/registry/ui/default/core/color-field/demos/prefix-and-suffix.tsx index dc096ea9..0da72d5b 100644 --- a/www/src/registry/ui/default/core/color-field/demos/prefix-and-suffix.tsx +++ b/www/src/registry/ui/default/core/color-field/demos/prefix-and-suffix.tsx @@ -1,11 +1,11 @@ -import { ColorField } from "@/registry/ui/default/core/color-field"; -import { PaletteIcon } from "@/__icons__"; - -export default function Demo() { - return ( -
      - } /> - } /> -
      - ); -} +import { ColorField } from "@/registry/ui/default/core/color-field"; +import { PaletteIcon } from "@/__icons__"; + +export default function Demo() { + return ( +
      + } /> + } /> +
      + ); +} diff --git a/www/src/registry/ui/default/core/color-field/demos/read-only.tsx b/www/src/registry/ui/default/core/color-field/demos/read-only.tsx index 77b59047..4acc4315 100644 --- a/www/src/registry/ui/default/core/color-field/demos/read-only.tsx +++ b/www/src/registry/ui/default/core/color-field/demos/read-only.tsx @@ -1,6 +1,6 @@ -import React from "react"; -import { ColorField } from "@/registry/ui/default/core/color-field"; - -export default function Demo() { - return ; -} +import React from "react"; +import { ColorField } from "@/registry/ui/default/core/color-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/color-field/demos/required.tsx b/www/src/registry/ui/default/core/color-field/demos/required.tsx index f2f2d04d..37786733 100644 --- a/www/src/registry/ui/default/core/color-field/demos/required.tsx +++ b/www/src/registry/ui/default/core/color-field/demos/required.tsx @@ -1,15 +1,15 @@ -"use client"; - -import React from "react"; -import { ColorField } from "@/registry/ui/default/core/color-field"; - -export default function Demo() { - return ( -
      - - - - -
      - ); -} +"use client"; + +import React from "react"; +import { ColorField } from "@/registry/ui/default/core/color-field"; + +export default function Demo() { + return ( +
      + + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/color-field/demos/sizes.tsx b/www/src/registry/ui/default/core/color-field/demos/sizes.tsx index 20ec05f9..85229ab3 100644 --- a/www/src/registry/ui/default/core/color-field/demos/sizes.tsx +++ b/www/src/registry/ui/default/core/color-field/demos/sizes.tsx @@ -1,11 +1,11 @@ -import { ColorField } from "@/registry/ui/default/core/color-field"; - -export default function Demo() { - return ( -
      - - - -
      - ); -} +import { ColorField } from "@/registry/ui/default/core/color-field"; + +export default function Demo() { + return ( +
      + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/color-field/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/color-field/demos/uncontrolled.tsx index 5db796f8..1e18173f 100644 --- a/www/src/registry/ui/default/core/color-field/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/color-field/demos/uncontrolled.tsx @@ -1,6 +1,6 @@ -import React from "react"; -import { ColorField } from "@/registry/ui/default/core/color-field"; - -export default function Demo() { - return ; -} +import React from "react"; +import { ColorField } from "@/registry/ui/default/core/color-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/color-field/index.ts b/www/src/registry/ui/default/core/color-field/index.ts index d1c0dff4..2dac98ed 100644 --- a/www/src/registry/ui/default/core/color-field/index.ts +++ b/www/src/registry/ui/default/core/color-field/index.ts @@ -1 +1 @@ -export * from "./color-field"; +export * from "./color-field"; diff --git a/www/src/registry/ui/default/core/color-picker/color-picker.tsx b/www/src/registry/ui/default/core/color-picker/color-picker.tsx index efaedc2c..788fdee6 100644 --- a/www/src/registry/ui/default/core/color-picker/color-picker.tsx +++ b/www/src/registry/ui/default/core/color-picker/color-picker.tsx @@ -1,115 +1,115 @@ -"use client"; - -import React from "react"; -import { - getColorChannels, - ColorPicker as AriaColorPicker, - type ColorPickerProps as AriaColorPickerProps, - type ColorSpace, - composeRenderProps, -} from "react-aria-components"; -import { Button, type ButtonProps } from "@/registry/ui/default/core/button"; -import { ColorArea } from "@/registry/ui/default/core/color-area"; -import { ColorField } from "@/registry/ui/default/core/color-field"; -import { ColorSlider } from "@/registry/ui/default/core/color-slider"; -import { ColorSwatch } from "@/registry/ui/default/core/color-swatch"; -import { Dialog, DialogRoot } from "@/registry/ui/default/core/dialog"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Select } from "@/registry/ui/default/core/select"; -import { cn } from "@/registry/ui/default/lib/cn"; - -type ColorPickerProps = ColorPickerRootProps & Omit; -const ColorPicker = ({ - slot, - value, - defaultValue, - onChange, - shape = "square", - ...props -}: ColorPickerProps) => { - return ( - - {composeRenderProps(props.children, (children) => ( - - - - - - - ))} - - ); -}; - -type ColorPickerRootProps = AriaColorPickerProps; -const ColorPickerRoot = (props: ColorPickerRootProps) => { - return ; -}; - -type ColorEditorProps = React.HTMLAttributes; -const ColorEditor = ({ className, ...props }: ColorEditorProps) => { - const [space, setSpace] = React.useState("hex"); - return ( -
      -
      - - - -
      -
      - - {space === "hex" ? ( - - ) : ( - getColorChannels(space).map((channel) => ( - - )) - )} -
      -
      - ); -}; - -export type { ColorPickerProps, ColorPickerRootProps }; -export { ColorPicker, ColorPickerRoot, ColorEditor }; +"use client"; + +import React from "react"; +import { + getColorChannels, + ColorPicker as AriaColorPicker, + type ColorPickerProps as AriaColorPickerProps, + type ColorSpace, + composeRenderProps, +} from "react-aria-components"; +import { Button, type ButtonProps } from "@/registry/ui/default/core/button"; +import { ColorArea } from "@/registry/ui/default/core/color-area"; +import { ColorField } from "@/registry/ui/default/core/color-field"; +import { ColorSlider } from "@/registry/ui/default/core/color-slider"; +import { ColorSwatch } from "@/registry/ui/default/core/color-swatch"; +import { Dialog, DialogRoot } from "@/registry/ui/default/core/dialog"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Select } from "@/registry/ui/default/core/select"; +import { cn } from "@/registry/ui/default/lib/cn"; + +type ColorPickerProps = ColorPickerRootProps & Omit; +const ColorPicker = ({ + slot, + value, + defaultValue, + onChange, + shape = "square", + ...props +}: ColorPickerProps) => { + return ( + + {composeRenderProps(props.children, (children) => ( + + + + + + + ))} + + ); +}; + +type ColorPickerRootProps = AriaColorPickerProps; +const ColorPickerRoot = (props: ColorPickerRootProps) => { + return ; +}; + +type ColorEditorProps = React.HTMLAttributes; +const ColorEditor = ({ className, ...props }: ColorEditorProps) => { + const [space, setSpace] = React.useState("hex"); + return ( +
      +
      + + + +
      +
      + + {space === "hex" ? ( + + ) : ( + getColorChannels(space).map((channel) => ( + + )) + )} +
      +
      + ); +}; + +export type { ColorPickerProps, ColorPickerRootProps }; +export { ColorPicker, ColorPickerRoot, ColorEditor }; diff --git a/www/src/registry/ui/default/core/color-picker/demos/composition.tsx b/www/src/registry/ui/default/core/color-picker/demos/composition.tsx index c7edb60e..cf30f609 100644 --- a/www/src/registry/ui/default/core/color-picker/demos/composition.tsx +++ b/www/src/registry/ui/default/core/color-picker/demos/composition.tsx @@ -1,22 +1,22 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { - ColorEditor, - ColorPickerRoot, -} from "@/registry/ui/default/core/color-picker"; -import { ColorSwatch } from "@/registry/ui/default/core/color-swatch"; -import { Dialog, DialogRoot } from "@/registry/ui/default/core/dialog"; - -export default function Demo() { - return ( - - - - - - - - - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { + ColorEditor, + ColorPickerRoot, +} from "@/registry/ui/default/core/color-picker"; +import { ColorSwatch } from "@/registry/ui/default/core/color-swatch"; +import { Dialog, DialogRoot } from "@/registry/ui/default/core/dialog"; + +export default function Demo() { + return ( + + + + + + + + + ); +} diff --git a/www/src/registry/ui/default/core/color-picker/demos/controlled.tsx b/www/src/registry/ui/default/core/color-picker/demos/controlled.tsx index bc8416e7..e9cf3c83 100644 --- a/www/src/registry/ui/default/core/color-picker/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/color-picker/demos/controlled.tsx @@ -1,11 +1,11 @@ -"use client"; - -import React from "react"; -import { type Color, parseColor } from "react-aria-components"; -import { ColorPicker } from "@/registry/ui/default/core/color-picker"; - -export default function Demo() { - const [value, setValue] = React.useState(parseColor("hsl(26, 33%, 78%)")); - // React aria components should fix this type issue (normally its Color not Color & string) - return ; -} +"use client"; + +import React from "react"; +import { type Color, parseColor } from "react-aria-components"; +import { ColorPicker } from "@/registry/ui/default/core/color-picker"; + +export default function Demo() { + const [value, setValue] = React.useState(parseColor("hsl(26, 33%, 78%)")); + // React aria components should fix this type issue (normally its Color not Color & string) + return ; +} diff --git a/www/src/registry/ui/default/core/color-picker/demos/default.tsx b/www/src/registry/ui/default/core/color-picker/demos/default.tsx index 1134e3b3..10a02f4f 100644 --- a/www/src/registry/ui/default/core/color-picker/demos/default.tsx +++ b/www/src/registry/ui/default/core/color-picker/demos/default.tsx @@ -1,5 +1,5 @@ -import { ColorPicker } from "@/registry/ui/default/core/color-picker"; - -export default function Demo() { - return ; -} +import { ColorPicker } from "@/registry/ui/default/core/color-picker"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/color-picker/demos/options.tsx b/www/src/registry/ui/default/core/color-picker/demos/options.tsx index 9d9ec08d..dd2a49d1 100644 --- a/www/src/registry/ui/default/core/color-picker/demos/options.tsx +++ b/www/src/registry/ui/default/core/color-picker/demos/options.tsx @@ -1,9 +1,9 @@ -import { ColorPicker } from "@/registry/ui/default/core/color-picker"; - -export default function Demo() { - return ( - - Fill color - - ); -} +import { ColorPicker } from "@/registry/ui/default/core/color-picker"; + +export default function Demo() { + return ( + + Fill color + + ); +} diff --git a/www/src/registry/ui/default/core/color-picker/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/color-picker/demos/uncontrolled.tsx index 1134e3b3..10a02f4f 100644 --- a/www/src/registry/ui/default/core/color-picker/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/color-picker/demos/uncontrolled.tsx @@ -1,5 +1,5 @@ -import { ColorPicker } from "@/registry/ui/default/core/color-picker"; - -export default function Demo() { - return ; -} +import { ColorPicker } from "@/registry/ui/default/core/color-picker"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/color-picker/index.ts b/www/src/registry/ui/default/core/color-picker/index.ts index 6bad1d67..d5ce51f6 100644 --- a/www/src/registry/ui/default/core/color-picker/index.ts +++ b/www/src/registry/ui/default/core/color-picker/index.ts @@ -1 +1 @@ -export * from "./color-picker"; +export * from "./color-picker"; diff --git a/www/src/registry/ui/default/core/color-slider/color-slider.tsx b/www/src/registry/ui/default/core/color-slider/color-slider.tsx index 036f971f..f4d9d814 100644 --- a/www/src/registry/ui/default/core/color-slider/color-slider.tsx +++ b/www/src/registry/ui/default/core/color-slider/color-slider.tsx @@ -1,113 +1,113 @@ -"use client"; - -import { - composeRenderProps, - ColorSlider as AriaColorSlider, - SliderOutput as AriaSliderOutput, - SliderTrack as AriaSliderTrack, - type ColorSliderProps as AriaColorSliderProps, - type SliderOutputProps as AriaSliderOutputProps, - type SliderTrackProps as AriaSliderTrackProps, -} from "react-aria-components"; -import { tv } from "tailwind-variants"; -import { ColorThumb } from "@/registry/ui/default/core/color-thumb"; -import { Label } from "@/registry/ui/default/core/field"; -import { cn } from "@/registry/ui/default/lib/cn"; - -const colorSliderStyles = tv({ - slots: { - root: "group/color-slider orientation-horizontal:w-48 orientation-vertical:h-48 orientation-vertical:items-center flex flex-col gap-2", - output: "text-fg-muted text-sm", - track: [ - "orientation-horizontal:w-48 orientation-horizontal:h-6 orientation-vertical:w-6 orientation-vertical:h-48 disabled:!bg-bg-disabled rounded-md", - "relative before:absolute before:inset-0 before:z-[-1] before:rounded-[inherit] before:bg-[repeating-conic-gradient(#e6e6e6_0%_25%,_#fff_0%_50%)] before:bg-[length:16px_16px] before:bg-center before:content-['']", - ], - }, -}); - -interface ColorSliderProps extends ColorSliderRootProps { - showValueLabel?: boolean; - label?: string; -} -const ColorSlider = ({ - label, - channel, - showValueLabel = true, - ...props -}: ColorSliderProps) => { - return ( - - {(label || showValueLabel) && ( -
      - {label && } - {showValueLabel && } -
      - )} - - - -
      - ); -}; - -type ColorSliderRootProps = AriaColorSliderProps; -const ColorSliderRoot = (props: ColorSliderRootProps) => { - const { root } = colorSliderStyles(); - return ( - - root({ className }) - )} - /> - ); -}; - -type ColorSliderTrackProps = AriaSliderTrackProps; -const ColorSliderTrack = (props: ColorSliderTrackProps) => { - const { track } = colorSliderStyles(); - return ( - ({ - ...style, - ...(isDisabled ? { background: "none" } : {}), - }))} - className={composeRenderProps(props.className, (className) => - track({ className }) - )} - /> - ); -}; - -type ColorSliderOutputProps = AriaSliderOutputProps; -const ColorSliderOutput = (props: ColorSliderOutputProps) => { - const { output } = colorSliderStyles(); - return ( - - output({ className }) - )} - /> - ); -}; - -export type { - ColorSliderProps, - ColorSliderRootProps, - ColorSliderTrackProps, - ColorSliderOutputProps, -}; -export { - ColorSlider, - ColorSliderRoot, - ColorSliderOutput, - ColorSliderTrack, - colorSliderStyles, -}; +"use client"; + +import { + composeRenderProps, + ColorSlider as AriaColorSlider, + SliderOutput as AriaSliderOutput, + SliderTrack as AriaSliderTrack, + type ColorSliderProps as AriaColorSliderProps, + type SliderOutputProps as AriaSliderOutputProps, + type SliderTrackProps as AriaSliderTrackProps, +} from "react-aria-components"; +import { tv } from "tailwind-variants"; +import { ColorThumb } from "@/registry/ui/default/core/color-thumb"; +import { Label } from "@/registry/ui/default/core/field"; +import { cn } from "@/registry/ui/default/lib/cn"; + +const colorSliderStyles = tv({ + slots: { + root: "group/color-slider orientation-horizontal:w-48 orientation-vertical:h-48 orientation-vertical:items-center flex flex-col gap-2", + output: "text-fg-muted text-sm", + track: [ + "orientation-horizontal:w-48 orientation-horizontal:h-6 orientation-vertical:w-6 orientation-vertical:h-48 disabled:!bg-bg-disabled rounded-md", + "relative before:absolute before:inset-0 before:z-[-1] before:rounded-[inherit] before:bg-[repeating-conic-gradient(#e6e6e6_0%_25%,_#fff_0%_50%)] before:bg-[length:16px_16px] before:bg-center before:content-['']", + ], + }, +}); + +interface ColorSliderProps extends ColorSliderRootProps { + showValueLabel?: boolean; + label?: string; +} +const ColorSlider = ({ + label, + channel, + showValueLabel = true, + ...props +}: ColorSliderProps) => { + return ( + + {(label || showValueLabel) && ( +
      + {label && } + {showValueLabel && } +
      + )} + + + +
      + ); +}; + +type ColorSliderRootProps = AriaColorSliderProps; +const ColorSliderRoot = (props: ColorSliderRootProps) => { + const { root } = colorSliderStyles(); + return ( + + root({ className }) + )} + /> + ); +}; + +type ColorSliderTrackProps = AriaSliderTrackProps; +const ColorSliderTrack = (props: ColorSliderTrackProps) => { + const { track } = colorSliderStyles(); + return ( + ({ + ...style, + ...(isDisabled ? { background: "none" } : {}), + }))} + className={composeRenderProps(props.className, (className) => + track({ className }) + )} + /> + ); +}; + +type ColorSliderOutputProps = AriaSliderOutputProps; +const ColorSliderOutput = (props: ColorSliderOutputProps) => { + const { output } = colorSliderStyles(); + return ( + + output({ className }) + )} + /> + ); +}; + +export type { + ColorSliderProps, + ColorSliderRootProps, + ColorSliderTrackProps, + ColorSliderOutputProps, +}; +export { + ColorSlider, + ColorSliderRoot, + ColorSliderOutput, + ColorSliderTrack, + colorSliderStyles, +}; diff --git a/www/src/registry/ui/default/core/color-slider/demos/channel.tsx b/www/src/registry/ui/default/core/color-slider/demos/channel.tsx index aea47abf..837e9dba 100644 --- a/www/src/registry/ui/default/core/color-slider/demos/channel.tsx +++ b/www/src/registry/ui/default/core/color-slider/demos/channel.tsx @@ -1,5 +1,5 @@ -import { ColorSlider } from "@/registry/ui/default/core/color-slider"; - -export default function Demo() { - return ; -} +import { ColorSlider } from "@/registry/ui/default/core/color-slider"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/color-slider/demos/composition.tsx b/www/src/registry/ui/default/core/color-slider/demos/composition.tsx index bbfcbbaf..8ccc195f 100644 --- a/www/src/registry/ui/default/core/color-slider/demos/composition.tsx +++ b/www/src/registry/ui/default/core/color-slider/demos/composition.tsx @@ -1,21 +1,21 @@ -import { - ColorSliderOutput, - ColorSliderRoot, - ColorSliderTrack, -} from "@/registry/ui/default/core/color-slider"; -import { ColorThumb } from "@/registry/ui/default/core/color-thumb"; -import { Label } from "@/registry/ui/default/core/field"; - -export default function Demo() { - return ( - -
      - - -
      - - - -
      - ); -} +import { + ColorSliderOutput, + ColorSliderRoot, + ColorSliderTrack, +} from "@/registry/ui/default/core/color-slider"; +import { ColorThumb } from "@/registry/ui/default/core/color-thumb"; +import { Label } from "@/registry/ui/default/core/field"; + +export default function Demo() { + return ( + +
      + + +
      + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/color-slider/demos/controlled.tsx b/www/src/registry/ui/default/core/color-slider/demos/controlled.tsx index 58fcbbcb..c025ce8c 100644 --- a/www/src/registry/ui/default/core/color-slider/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/color-slider/demos/controlled.tsx @@ -1,15 +1,15 @@ -"use client"; - -import React from "react"; -import { parseColor } from "react-aria-components"; -import { ColorSlider } from "@/registry/ui/default/core/color-slider"; - -export default function Demo() { - const [value, setValue] = React.useState(parseColor("hsl(0, 100%, 50%)")); - return ( -
      - -

      Value: {value.toString("hex")}

      -
      - ); -} +"use client"; + +import React from "react"; +import { parseColor } from "react-aria-components"; +import { ColorSlider } from "@/registry/ui/default/core/color-slider"; + +export default function Demo() { + const [value, setValue] = React.useState(parseColor("hsl(0, 100%, 50%)")); + return ( +
      + +

      Value: {value.toString("hex")}

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/color-slider/demos/default.tsx b/www/src/registry/ui/default/core/color-slider/demos/default.tsx index 29307aed..32fc68ea 100644 --- a/www/src/registry/ui/default/core/color-slider/demos/default.tsx +++ b/www/src/registry/ui/default/core/color-slider/demos/default.tsx @@ -1,5 +1,5 @@ -import { ColorSlider } from "@/registry/ui/default/core/color-slider"; - -export default function Demo() { - return ; -} +import { ColorSlider } from "@/registry/ui/default/core/color-slider"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/color-slider/demos/disabled.tsx b/www/src/registry/ui/default/core/color-slider/demos/disabled.tsx index 1a8f6a51..78a66cfb 100644 --- a/www/src/registry/ui/default/core/color-slider/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/color-slider/demos/disabled.tsx @@ -1,12 +1,12 @@ -import { ColorSlider } from "@/registry/ui/default/core/color-slider"; - -export default function Demo() { - return ( - - ); -} +import { ColorSlider } from "@/registry/ui/default/core/color-slider"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/color-slider/demos/label.tsx b/www/src/registry/ui/default/core/color-slider/demos/label.tsx index 9f717694..73f370ee 100644 --- a/www/src/registry/ui/default/core/color-slider/demos/label.tsx +++ b/www/src/registry/ui/default/core/color-slider/demos/label.tsx @@ -1,7 +1,7 @@ -import { ColorSlider } from "@/registry/ui/default/core/color-slider"; - -export default function Demo() { - return ( - - ); -} +import { ColorSlider } from "@/registry/ui/default/core/color-slider"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/color-slider/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/color-slider/demos/uncontrolled.tsx index 86e62664..d190ae89 100644 --- a/www/src/registry/ui/default/core/color-slider/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/color-slider/demos/uncontrolled.tsx @@ -1,5 +1,5 @@ -import { ColorSlider } from "@/registry/ui/default/core/color-slider"; - -export default function Demo() { - return ; -} +import { ColorSlider } from "@/registry/ui/default/core/color-slider"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/color-slider/demos/vertical.tsx b/www/src/registry/ui/default/core/color-slider/demos/vertical.tsx index de78b712..107117d2 100644 --- a/www/src/registry/ui/default/core/color-slider/demos/vertical.tsx +++ b/www/src/registry/ui/default/core/color-slider/demos/vertical.tsx @@ -1,11 +1,11 @@ -import { ColorSlider } from "@/registry/ui/default/core/color-slider"; - -export default function Demo() { - return ( - - ); -} +import { ColorSlider } from "@/registry/ui/default/core/color-slider"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/color-slider/index.ts b/www/src/registry/ui/default/core/color-slider/index.ts index a0566ea5..5af8bfc7 100644 --- a/www/src/registry/ui/default/core/color-slider/index.ts +++ b/www/src/registry/ui/default/core/color-slider/index.ts @@ -1 +1 @@ -export * from "./color-slider"; +export * from "./color-slider"; diff --git a/www/src/registry/ui/default/core/color-swatch/color-swatch.tsx b/www/src/registry/ui/default/core/color-swatch/color-swatch.tsx index 9183a75e..a72b20fc 100644 --- a/www/src/registry/ui/default/core/color-swatch/color-swatch.tsx +++ b/www/src/registry/ui/default/core/color-swatch/color-swatch.tsx @@ -1,23 +1,23 @@ -"use client"; - -import { - ColorSwatch as AriaColorSwatch, - type ColorSwatchProps as AriaColorSwatchProps, -} from "react-aria-components"; -import { tv } from "tailwind-variants"; - -const colorSwatchStyles = tv({ - base: "size-5 rounded-sm border", -}); - -interface ColorSwatchProps extends Omit { - className?: string; -} -const ColorSwatch = ({ className, ...props }: ColorSwatchProps) => { - return ( - - ); -}; - -export type { ColorSwatchProps }; -export { ColorSwatch }; +"use client"; + +import { + ColorSwatch as AriaColorSwatch, + type ColorSwatchProps as AriaColorSwatchProps, +} from "react-aria-components"; +import { tv } from "tailwind-variants"; + +const colorSwatchStyles = tv({ + base: "size-5 rounded-sm border", +}); + +interface ColorSwatchProps extends Omit { + className?: string; +} +const ColorSwatch = ({ className, ...props }: ColorSwatchProps) => { + return ( + + ); +}; + +export type { ColorSwatchProps }; +export { ColorSwatch }; diff --git a/www/src/registry/ui/default/core/color-swatch/demos/default.tsx b/www/src/registry/ui/default/core/color-swatch/demos/default.tsx index c5cb6864..f00444e3 100644 --- a/www/src/registry/ui/default/core/color-swatch/demos/default.tsx +++ b/www/src/registry/ui/default/core/color-swatch/demos/default.tsx @@ -1,5 +1,5 @@ -import { ColorSwatch } from "@/registry/ui/default/core/color-swatch"; - -export default function Demo() { - return ; -} +import { ColorSwatch } from "@/registry/ui/default/core/color-swatch"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/color-swatch/index.ts b/www/src/registry/ui/default/core/color-swatch/index.ts index d2c16630..2b40643b 100644 --- a/www/src/registry/ui/default/core/color-swatch/index.ts +++ b/www/src/registry/ui/default/core/color-swatch/index.ts @@ -1 +1 @@ -export * from "./color-swatch"; +export * from "./color-swatch"; diff --git a/www/src/registry/ui/default/core/color-thumb/color-thumb.tsx b/www/src/registry/ui/default/core/color-thumb/color-thumb.tsx index eddbba70..bd608940 100644 --- a/www/src/registry/ui/default/core/color-thumb/color-thumb.tsx +++ b/www/src/registry/ui/default/core/color-thumb/color-thumb.tsx @@ -1,28 +1,28 @@ -"use client"; - -import { - ColorThumb as AriaColorThumb, - type ColorThumbProps as AriaColorThumbProps, -} from "react-aria-components"; -import { tv } from "tailwind-variants"; -import { focusRing } from "@/registry/ui/default/lib/focus-styles"; - -const colorThumbStyles = tv({ - extend: focusRing, - base: [ - "disabled:!bg-bg-disabled disabled:border-border-disabled z-30 size-6 rounded-full border-2 border-white ring-1 ring-black/40", - "group-orientation-horizontal/color-slider:top-1/2 group-orientation-vertical/color-slider:left-1/2", - ], -}); - -interface ColorThumbProps extends Omit { - className?: string; -} -const ColorThumb = ({ className, ...props }: ColorThumbProps) => { - return ( - - ); -}; - -export type { ColorThumbProps }; -export { ColorThumb }; +"use client"; + +import { + ColorThumb as AriaColorThumb, + type ColorThumbProps as AriaColorThumbProps, +} from "react-aria-components"; +import { tv } from "tailwind-variants"; +import { focusRing } from "@/registry/ui/default/lib/focus-styles"; + +const colorThumbStyles = tv({ + extend: focusRing, + base: [ + "disabled:!bg-bg-disabled disabled:border-border-disabled z-30 size-6 rounded-full border-2 border-white ring-1 ring-black/40", + "group-orientation-horizontal/color-slider:top-1/2 group-orientation-vertical/color-slider:left-1/2", + ], +}); + +interface ColorThumbProps extends Omit { + className?: string; +} +const ColorThumb = ({ className, ...props }: ColorThumbProps) => { + return ( + + ); +}; + +export type { ColorThumbProps }; +export { ColorThumb }; diff --git a/www/src/registry/ui/default/core/color-thumb/index.ts b/www/src/registry/ui/default/core/color-thumb/index.ts index fd62c167..0c101f44 100644 --- a/www/src/registry/ui/default/core/color-thumb/index.ts +++ b/www/src/registry/ui/default/core/color-thumb/index.ts @@ -1 +1 @@ -export * from "./color-thumb"; +export * from "./color-thumb"; diff --git a/www/src/registry/ui/default/core/combobox/combobox.tsx b/www/src/registry/ui/default/core/combobox/combobox.tsx index 6beac8d8..85b4c5a8 100644 --- a/www/src/registry/ui/default/core/combobox/combobox.tsx +++ b/www/src/registry/ui/default/core/combobox/combobox.tsx @@ -1,89 +1,89 @@ -"use client"; - -import * as React from "react"; -import { - ComboBox as AriaCombobox, - type ComboBoxProps as AriaComboboxProps, -} from "react-aria-components"; -import { tv } from "tailwind-variants"; -import { Button } from "@/registry/ui/default/core/button"; -import { Field, type FieldProps } from "@/registry/ui/default/core/field"; -import { Input, InputRoot } from "@/registry/ui/default/core/input"; -import { ListBox } from "@/registry/ui/default/core/list-box"; -import { Overlay } from "@/registry/ui/default/core/overlay"; -import { ChevronDownIcon } from "@/__icons__"; - -const comboboxStyles = tv({ - slots: { - root: "flex w-48 flex-col items-start gap-2", - }, -}); - -interface ComboboxProps - extends Omit, "children">, - Omit { - isLoading?: boolean; - children: React.ReactNode | ((item: T) => React.ReactNode); - items?: Iterable; -} -const Combobox = ({ - label, - description, - errorMessage, - necessityIndicator, - contextualHelp, - children, - items, - isLoading, - ...props -}: ComboboxProps) => { - return ( - - {({ isRequired }) => ( - <> - - - - - - {children} - - - - )} - - ); -}; - -const ComboboxTrigger = () => { - return ( - - - - - ); -}; - -interface ComboboxRootProps - extends Omit, "className"> { - className?: string; -} -const ComboboxRoot = ({ - className, - ...props -}: ComboboxRootProps) => { - const { root } = comboboxStyles(); - return ; -}; - -export type { ComboboxProps, ComboboxRootProps }; -export { Combobox, ComboboxRoot, ComboboxTrigger }; +"use client"; + +import * as React from "react"; +import { + ComboBox as AriaCombobox, + type ComboBoxProps as AriaComboboxProps, +} from "react-aria-components"; +import { tv } from "tailwind-variants"; +import { Button } from "@/registry/ui/default/core/button"; +import { Field, type FieldProps } from "@/registry/ui/default/core/field"; +import { Input, InputRoot } from "@/registry/ui/default/core/input"; +import { ListBox } from "@/registry/ui/default/core/list-box"; +import { Overlay } from "@/registry/ui/default/core/overlay"; +import { ChevronDownIcon } from "@/__icons__"; + +const comboboxStyles = tv({ + slots: { + root: "flex w-48 flex-col items-start gap-2", + }, +}); + +interface ComboboxProps + extends Omit, "children">, + Omit { + isLoading?: boolean; + children: React.ReactNode | ((item: T) => React.ReactNode); + items?: Iterable; +} +const Combobox = ({ + label, + description, + errorMessage, + necessityIndicator, + contextualHelp, + children, + items, + isLoading, + ...props +}: ComboboxProps) => { + return ( + + {({ isRequired }) => ( + <> + + + + + + {children} + + + + )} + + ); +}; + +const ComboboxTrigger = () => { + return ( + + + + + ); +}; + +interface ComboboxRootProps + extends Omit, "className"> { + className?: string; +} +const ComboboxRoot = ({ + className, + ...props +}: ComboboxRootProps) => { + const { root } = comboboxStyles(); + return ; +}; + +export type { ComboboxProps, ComboboxRootProps }; +export { Combobox, ComboboxRoot, ComboboxTrigger }; diff --git a/www/src/registry/ui/default/core/combobox/demos/async-loading.tsx b/www/src/registry/ui/default/core/combobox/demos/async-loading.tsx index f632292c..36e4c2d9 100644 --- a/www/src/registry/ui/default/core/combobox/demos/async-loading.tsx +++ b/www/src/registry/ui/default/core/combobox/demos/async-loading.tsx @@ -1,27 +1,27 @@ -"use client"; - -import { useAsyncList } from "react-stately"; -import { Combobox } from "@/registry/ui/default/core/combobox"; -import { Item } from "@/registry/ui/default/core/list-box"; - -interface Character { - name: string; -} - -export default function Demo() { - const list = useAsyncList({ - async load({ signal }) { - const res = await fetch(`https://pokeapi.co/api/v2/pokemon`, { signal }); - const json = (await res.json()) as { results: Character[] }; - return { - items: json.results, - }; - }, - }); - - return ( - - {(item) => {item.name}} - - ); -} +"use client"; + +import { useAsyncList } from "react-stately"; +import { Combobox } from "@/registry/ui/default/core/combobox"; +import { Item } from "@/registry/ui/default/core/list-box"; + +interface Character { + name: string; +} + +export default function Demo() { + const list = useAsyncList({ + async load({ signal }) { + const res = await fetch(`https://pokeapi.co/api/v2/pokemon`, { signal }); + const json = (await res.json()) as { results: Character[] }; + return { + items: json.results, + }; + }, + }); + + return ( + + {(item) => {item.name}} + + ); +} diff --git a/www/src/registry/ui/default/core/combobox/demos/basic.tsx b/www/src/registry/ui/default/core/combobox/demos/basic.tsx index d2dabebb..c9967fcd 100644 --- a/www/src/registry/ui/default/core/combobox/demos/basic.tsx +++ b/www/src/registry/ui/default/core/combobox/demos/basic.tsx @@ -1,17 +1,17 @@ -import React from "react"; -import { Combobox } from "@/registry/ui/default/core/combobox"; -import { Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - Canada - France - Germany - Spain - Tunisia - United states - United Kingdom - - ); -} +import React from "react"; +import { Combobox } from "@/registry/ui/default/core/combobox"; +import { Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + Canada + France + Germany + Spain + Tunisia + United states + United Kingdom + + ); +} diff --git a/www/src/registry/ui/default/core/combobox/demos/composition.tsx b/www/src/registry/ui/default/core/combobox/demos/composition.tsx index 4fa86b8c..90debc10 100644 --- a/www/src/registry/ui/default/core/combobox/demos/composition.tsx +++ b/www/src/registry/ui/default/core/combobox/demos/composition.tsx @@ -1,31 +1,31 @@ -import React from "react"; -import { - ComboboxRoot, - ComboboxTrigger, -} from "@/registry/ui/default/core/combobox"; -import { - Description, - FieldError, - Label, -} from "@/registry/ui/default/core/field"; -import { Item, ListBox } from "@/registry/ui/default/core/list-box"; -import { Overlay } from "@/registry/ui/default/core/overlay"; - -export default function Demo() { - return ( - - - - Please choose a framework. - - - - Next.js - Remix - Gatsby - - - - - ); -} +import React from "react"; +import { + ComboboxRoot, + ComboboxTrigger, +} from "@/registry/ui/default/core/combobox"; +import { + Description, + FieldError, + Label, +} from "@/registry/ui/default/core/field"; +import { Item, ListBox } from "@/registry/ui/default/core/list-box"; +import { Overlay } from "@/registry/ui/default/core/overlay"; + +export default function Demo() { + return ( + + + + Please choose a framework. + + + + Next.js + Remix + Gatsby + + + + + ); +} diff --git a/www/src/registry/ui/default/core/combobox/demos/contextual-help.tsx b/www/src/registry/ui/default/core/combobox/demos/contextual-help.tsx index a65d7b3c..de6e7961 100644 --- a/www/src/registry/ui/default/core/combobox/demos/contextual-help.tsx +++ b/www/src/registry/ui/default/core/combobox/demos/contextual-help.tsx @@ -1,26 +1,26 @@ -import React from "react"; -import { Combobox } from "@/registry/ui/default/core/combobox"; -import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; -import { Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - } - > - Canada - France - Germany - Spain - Tunisia - United states - United Kingdom - - ); -} +import React from "react"; +import { Combobox } from "@/registry/ui/default/core/combobox"; +import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; +import { Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + } + > + Canada + France + Germany + Spain + Tunisia + United states + United Kingdom + + ); +} diff --git a/www/src/registry/ui/default/core/combobox/demos/controlled.tsx b/www/src/registry/ui/default/core/combobox/demos/controlled.tsx index 695958db..e28abf01 100644 --- a/www/src/registry/ui/default/core/combobox/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/combobox/demos/controlled.tsx @@ -1,36 +1,36 @@ -"use client"; - -import React from "react"; -import type { Key } from "react-aria-components"; -import { Combobox } from "@/registry/ui/default/core/combobox"; -import { Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - const [country, setCountry] = React.useState("tn"); - return ( -
      - - Canada - France - Germany - Spain - Tunisia - United States - United Kingdom - -

      - {country ? ( - <> - You selected: {country} - - ) : ( - "Select a country." - )} -

      -
      - ); -} +"use client"; + +import React from "react"; +import type { Key } from "react-aria-components"; +import { Combobox } from "@/registry/ui/default/core/combobox"; +import { Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + const [country, setCountry] = React.useState("tn"); + return ( +
      + + Canada + France + Germany + Spain + Tunisia + United States + United Kingdom + +

      + {country ? ( + <> + You selected: {country} + + ) : ( + "Select a country." + )} +

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/combobox/demos/custom-value.tsx b/www/src/registry/ui/default/core/combobox/demos/custom-value.tsx index 823ca5f5..31c659e8 100644 --- a/www/src/registry/ui/default/core/combobox/demos/custom-value.tsx +++ b/www/src/registry/ui/default/core/combobox/demos/custom-value.tsx @@ -1,17 +1,17 @@ -import React from "react"; -import { Combobox } from "@/registry/ui/default/core/combobox"; -import { Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - Canada - France - Germany - Spain - Tunisia - United states - United Kingdom - - ); -} +import React from "react"; +import { Combobox } from "@/registry/ui/default/core/combobox"; +import { Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + Canada + France + Germany + Spain + Tunisia + United states + United Kingdom + + ); +} diff --git a/www/src/registry/ui/default/core/combobox/demos/description.tsx b/www/src/registry/ui/default/core/combobox/demos/description.tsx index 98d58af7..007efc21 100644 --- a/www/src/registry/ui/default/core/combobox/demos/description.tsx +++ b/www/src/registry/ui/default/core/combobox/demos/description.tsx @@ -1,17 +1,17 @@ -import React from "react"; -import { Combobox } from "@/registry/ui/default/core/combobox"; -import { Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - Canada - France - Germany - Spain - Tunisia - United states - United Kingdom - - ); -} +import React from "react"; +import { Combobox } from "@/registry/ui/default/core/combobox"; +import { Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + Canada + France + Germany + Spain + Tunisia + United states + United Kingdom + + ); +} diff --git a/www/src/registry/ui/default/core/combobox/demos/disabled.tsx b/www/src/registry/ui/default/core/combobox/demos/disabled.tsx index 4119848e..e5b936d7 100644 --- a/www/src/registry/ui/default/core/combobox/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/combobox/demos/disabled.tsx @@ -1,16 +1,16 @@ -import React from "react"; -import { Combobox } from "@/registry/ui/default/core/combobox"; -import { Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - Red Panda - Cat - Dog - Aardvark - Kangaroo - Snake - - ); -} +import React from "react"; +import { Combobox } from "@/registry/ui/default/core/combobox"; +import { Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + Red Panda + Cat + Dog + Aardvark + Kangaroo + Snake + + ); +} diff --git a/www/src/registry/ui/default/core/combobox/demos/label.tsx b/www/src/registry/ui/default/core/combobox/demos/label.tsx index 11e0e7c0..331c1529 100644 --- a/www/src/registry/ui/default/core/combobox/demos/label.tsx +++ b/www/src/registry/ui/default/core/combobox/demos/label.tsx @@ -1,17 +1,17 @@ -import React from "react"; -import { Combobox } from "@/registry/ui/default/core/combobox"; -import { Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - Canada - France - Germany - Spain - Tunisia - United states - United Kingdom - - ); -} +import React from "react"; +import { Combobox } from "@/registry/ui/default/core/combobox"; +import { Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + Canada + France + Germany + Spain + Tunisia + United states + United Kingdom + + ); +} diff --git a/www/src/registry/ui/default/core/combobox/demos/loading.tsx b/www/src/registry/ui/default/core/combobox/demos/loading.tsx index 6e3fe31e..965c3c78 100644 --- a/www/src/registry/ui/default/core/combobox/demos/loading.tsx +++ b/www/src/registry/ui/default/core/combobox/demos/loading.tsx @@ -1,16 +1,16 @@ -import React from "react"; -import { Combobox } from "@/registry/ui/default/core/combobox"; -import { Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - Red Panda - Cat - Dog - Aardvark - Kangaroo - Snake - - ); -} +import React from "react"; +import { Combobox } from "@/registry/ui/default/core/combobox"; +import { Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + Red Panda + Cat + Dog + Aardvark + Kangaroo + Snake + + ); +} diff --git a/www/src/registry/ui/default/core/combobox/demos/required.tsx b/www/src/registry/ui/default/core/combobox/demos/required.tsx index 0c9425a5..952b10ca 100644 --- a/www/src/registry/ui/default/core/combobox/demos/required.tsx +++ b/www/src/registry/ui/default/core/combobox/demos/required.tsx @@ -1,17 +1,17 @@ -import React from "react"; -import { Combobox } from "@/registry/ui/default/core/combobox"; -import { Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - Canada - France - Germany - Spain - Tunisia - United states - United Kingdom - - ); -} +import React from "react"; +import { Combobox } from "@/registry/ui/default/core/combobox"; +import { Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + Canada + France + Germany + Spain + Tunisia + United states + United Kingdom + + ); +} diff --git a/www/src/registry/ui/default/core/combobox/demos/sections.tsx b/www/src/registry/ui/default/core/combobox/demos/sections.tsx index 39cbfa6a..ac929282 100644 --- a/www/src/registry/ui/default/core/combobox/demos/sections.tsx +++ b/www/src/registry/ui/default/core/combobox/demos/sections.tsx @@ -1,31 +1,31 @@ -import React from "react"; -import { Combobox } from "@/registry/ui/default/core/combobox"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Section } from "@/registry/ui/default/core/section"; - -export default function Demo() { - return ( - -
      - Tunisia - Algeria - Morocco -
      -
      - Canada - United states -
      -
      - India - Japan - Korea -
      -
      - France - Germany - Spain - United Kingdom -
      -
      - ); -} +import React from "react"; +import { Combobox } from "@/registry/ui/default/core/combobox"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Section } from "@/registry/ui/default/core/section"; + +export default function Demo() { + return ( + +
      + Tunisia + Algeria + Morocco +
      +
      + Canada + United states +
      +
      + India + Japan + Korea +
      +
      + France + Germany + Spain + United Kingdom +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/combobox/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/combobox/demos/uncontrolled.tsx index 8a27e812..66283195 100644 --- a/www/src/registry/ui/default/core/combobox/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/combobox/demos/uncontrolled.tsx @@ -1,17 +1,17 @@ -import React from "react"; -import { Combobox } from "@/registry/ui/default/core/combobox"; -import { Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - Canada - France - Germany - Spain - Tunisia - United States - United Kingdom - - ); -} +import React from "react"; +import { Combobox } from "@/registry/ui/default/core/combobox"; +import { Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + Canada + France + Germany + Spain + Tunisia + United States + United Kingdom + + ); +} diff --git a/www/src/registry/ui/default/core/combobox/demos/validation.tsx b/www/src/registry/ui/default/core/combobox/demos/validation.tsx index d4862e7f..5e612ad5 100644 --- a/www/src/registry/ui/default/core/combobox/demos/validation.tsx +++ b/www/src/registry/ui/default/core/combobox/demos/validation.tsx @@ -1,21 +1,21 @@ -import React from "react"; -import { Combobox } from "@/registry/ui/default/core/combobox"; -import { Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - Canada - France - Germany - Spain - Tunisia - United states - United Kingdom - - ); -} +import React from "react"; +import { Combobox } from "@/registry/ui/default/core/combobox"; +import { Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + Canada + France + Germany + Spain + Tunisia + United states + United Kingdom + + ); +} diff --git a/www/src/registry/ui/default/core/combobox/index.ts b/www/src/registry/ui/default/core/combobox/index.ts index 1be314de..7cba5b51 100644 --- a/www/src/registry/ui/default/core/combobox/index.ts +++ b/www/src/registry/ui/default/core/combobox/index.ts @@ -1 +1 @@ -export * from "./combobox"; +export * from "./combobox"; diff --git a/www/src/registry/ui/default/core/command/command.tsx b/www/src/registry/ui/default/core/command/command.tsx index 5a04239a..0942c3ff 100644 --- a/www/src/registry/ui/default/core/command/command.tsx +++ b/www/src/registry/ui/default/core/command/command.tsx @@ -1,167 +1,167 @@ -"use client"; - -import * as React from "react"; -import { Command as CommandPrimitive } from "cmdk"; -import { cn } from "@/registry/ui/default/lib/cn"; -import { SearchIcon } from "@/__icons__"; - -type CommandRootProps = React.ComponentPropsWithoutRef; -const CommandRoot = React.forwardRef< - React.ElementRef, - CommandRootProps ->(({ className, ...props }, ref) => ( - -)); -CommandRoot.displayName = CommandPrimitive.displayName; - -type CommandInputProps = React.ComponentPropsWithoutRef< - typeof CommandPrimitive.Input -> & { - wrapperClassName?: string; - icon?: React.ReactNode; -}; -const CommandInput = React.forwardRef< - React.ElementRef, - CommandInputProps ->(({ className, wrapperClassName, icon, ...props }, ref) => ( -
      - {icon || } - -
      -)); -CommandInput.displayName = CommandPrimitive.Input.displayName; - -type CommandListProps = React.ComponentPropsWithoutRef< - typeof CommandPrimitive.List ->; -const CommandList = React.forwardRef< - React.ElementRef, - CommandListProps ->(({ className, ...props }, ref) => ( - -)); -CommandList.displayName = CommandPrimitive.List.displayName; - -type CommandEmptyProps = React.ComponentPropsWithoutRef< - typeof CommandPrimitive.Empty ->; -const CommandEmpty = React.forwardRef< - React.ElementRef, - CommandEmptyProps ->((props, ref) => ( - -)); -CommandEmpty.displayName = CommandPrimitive.Empty.displayName; - -type CommandGroupProps = React.ComponentPropsWithoutRef< - typeof CommandPrimitive.Group ->; -const CommandGroup = React.forwardRef< - React.ElementRef, - CommandGroupProps ->(({ className, ...props }, ref) => ( - -)); -CommandGroup.displayName = CommandPrimitive.Group.displayName; - -type CommandSeparatorProps = React.ComponentPropsWithoutRef< - typeof CommandPrimitive.Separator ->; -const CommandSeparator = React.forwardRef< - React.ElementRef, - CommandSeparatorProps ->(({ className, ...props }, ref) => ( - -)); -CommandSeparator.displayName = CommandPrimitive.Separator.displayName; - -type CommandItemProps = React.ComponentPropsWithoutRef< - typeof CommandPrimitive.Item ->; -const CommandItem = React.forwardRef< - React.ElementRef, - CommandItemProps ->(({ className, ...props }, ref) => ( - -)); -CommandItem.displayName = CommandPrimitive.Item.displayName; - -type CommandShortcutProps = React.HTMLAttributes; -const CommandShortcut = ({ className, ...props }: CommandShortcutProps) => { - return ( - - ); -}; -CommandShortcut.displayName = "CommandShortcut"; - -export { - CommandRoot, - CommandInput, - CommandList, - CommandEmpty, - CommandGroup, - CommandItem, - CommandShortcut, - CommandSeparator, -}; - -export type { - CommandRootProps, - CommandInputProps, - CommandListProps, - CommandEmptyProps, - CommandGroupProps, - CommandSeparatorProps, - CommandItemProps, - CommandShortcutProps, -}; +"use client"; + +import * as React from "react"; +import { Command as CommandPrimitive } from "cmdk"; +import { cn } from "@/registry/ui/default/lib/cn"; +import { SearchIcon } from "@/__icons__"; + +type CommandRootProps = React.ComponentPropsWithoutRef; +const CommandRoot = React.forwardRef< + React.ElementRef, + CommandRootProps +>(({ className, ...props }, ref) => ( + +)); +CommandRoot.displayName = CommandPrimitive.displayName; + +type CommandInputProps = React.ComponentPropsWithoutRef< + typeof CommandPrimitive.Input +> & { + wrapperClassName?: string; + icon?: React.ReactNode; +}; +const CommandInput = React.forwardRef< + React.ElementRef, + CommandInputProps +>(({ className, wrapperClassName, icon, ...props }, ref) => ( +
      + {icon || } + +
      +)); +CommandInput.displayName = CommandPrimitive.Input.displayName; + +type CommandListProps = React.ComponentPropsWithoutRef< + typeof CommandPrimitive.List +>; +const CommandList = React.forwardRef< + React.ElementRef, + CommandListProps +>(({ className, ...props }, ref) => ( + +)); +CommandList.displayName = CommandPrimitive.List.displayName; + +type CommandEmptyProps = React.ComponentPropsWithoutRef< + typeof CommandPrimitive.Empty +>; +const CommandEmpty = React.forwardRef< + React.ElementRef, + CommandEmptyProps +>((props, ref) => ( + +)); +CommandEmpty.displayName = CommandPrimitive.Empty.displayName; + +type CommandGroupProps = React.ComponentPropsWithoutRef< + typeof CommandPrimitive.Group +>; +const CommandGroup = React.forwardRef< + React.ElementRef, + CommandGroupProps +>(({ className, ...props }, ref) => ( + +)); +CommandGroup.displayName = CommandPrimitive.Group.displayName; + +type CommandSeparatorProps = React.ComponentPropsWithoutRef< + typeof CommandPrimitive.Separator +>; +const CommandSeparator = React.forwardRef< + React.ElementRef, + CommandSeparatorProps +>(({ className, ...props }, ref) => ( + +)); +CommandSeparator.displayName = CommandPrimitive.Separator.displayName; + +type CommandItemProps = React.ComponentPropsWithoutRef< + typeof CommandPrimitive.Item +>; +const CommandItem = React.forwardRef< + React.ElementRef, + CommandItemProps +>(({ className, ...props }, ref) => ( + +)); +CommandItem.displayName = CommandPrimitive.Item.displayName; + +type CommandShortcutProps = React.HTMLAttributes; +const CommandShortcut = ({ className, ...props }: CommandShortcutProps) => { + return ( + + ); +}; +CommandShortcut.displayName = "CommandShortcut"; + +export { + CommandRoot, + CommandInput, + CommandList, + CommandEmpty, + CommandGroup, + CommandItem, + CommandShortcut, + CommandSeparator, +}; + +export type { + CommandRootProps, + CommandInputProps, + CommandListProps, + CommandEmptyProps, + CommandGroupProps, + CommandSeparatorProps, + CommandItemProps, + CommandShortcutProps, +}; diff --git a/www/src/registry/ui/default/core/command/index.ts b/www/src/registry/ui/default/core/command/index.ts index f4c8ea9e..e9122c65 100644 --- a/www/src/registry/ui/default/core/command/index.ts +++ b/www/src/registry/ui/default/core/command/index.ts @@ -1 +1 @@ -export * from "./command"; +export * from "./command"; diff --git a/www/src/registry/ui/default/core/contextual-help/contextual-help.tsx b/www/src/registry/ui/default/core/contextual-help/contextual-help.tsx index 9276523b..6f878daa 100644 --- a/www/src/registry/ui/default/core/contextual-help/contextual-help.tsx +++ b/www/src/registry/ui/default/core/contextual-help/contextual-help.tsx @@ -1,39 +1,39 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { DialogRoot, Dialog } from "@/registry/ui/default/core/dialog"; -import { InfoIcon, HelpIcon } from "@/__icons__"; - -interface ContextualHelpProps { - title?: string; - description?: string; - variant?: "info" | "help"; -} - -const ContextualHelp = ({ - title, - description, - variant, -}: ContextualHelpProps) => { - const icon = variant === "info" ? : ; - return ( - - - - - ); -}; - -export { ContextualHelp }; +import { Button } from "@/registry/ui/default/core/button"; +import { DialogRoot, Dialog } from "@/registry/ui/default/core/dialog"; +import { InfoIcon, HelpIcon } from "@/__icons__"; + +interface ContextualHelpProps { + title?: string; + description?: string; + variant?: "info" | "help"; +} + +const ContextualHelp = ({ + title, + description, + variant, +}: ContextualHelpProps) => { + const icon = variant === "info" ? : ; + return ( + + + + + ); +}; + +export { ContextualHelp }; diff --git a/www/src/registry/ui/default/core/contextual-help/index.ts b/www/src/registry/ui/default/core/contextual-help/index.ts index a4eae45b..5476b21a 100644 --- a/www/src/registry/ui/default/core/contextual-help/index.ts +++ b/www/src/registry/ui/default/core/contextual-help/index.ts @@ -1 +1 @@ -export * from "./contextual-help"; +export * from "./contextual-help"; diff --git a/www/src/registry/ui/default/core/date-field/date-field.tsx b/www/src/registry/ui/default/core/date-field/date-field.tsx index 4c8a4337..f0a5c0c7 100644 --- a/www/src/registry/ui/default/core/date-field/date-field.tsx +++ b/www/src/registry/ui/default/core/date-field/date-field.tsx @@ -1,96 +1,96 @@ -"use client"; - -import * as React from "react"; -import { - DateField as AriaDateField, - type DateFieldProps as AriaDateFieldProps, - type DateValue, -} from "react-aria-components"; -import { tv, type VariantProps } from "tailwind-variants"; -import { DateInput, DateSegment } from "@/registry/ui/default/core/date-input"; -import { Field, type FieldProps } from "@/registry/ui/default/core/field"; -import { - InputRoot, - type InputRootProps, - type inputStyles, -} from "@/registry/ui/default/core/input"; - -const dateFieldStyles = tv({ - slots: { - root: "flex flex-col items-start gap-2", - }, -}); - -interface DateFieldProps - extends DateFieldRootProps, - Omit, - VariantProps { - prefix?: React.ReactNode; - suffix?: React.ReactNode; - isLoading?: boolean; - loaderPosition?: "prefix" | "suffix"; -} - -const DateField = ({ - className, - size, - label, - description, - errorMessage, - prefix, - suffix, - isLoading, - loaderPosition = "suffix", - isRequired, - isDisabled, - necessityIndicator, - contextualHelp, - ...props -}: DateFieldProps) => { - return ( - - - - - - ); -}; - -interface DateFieldRootProps - extends Omit, "className"> { - className?: string; -} -const DateFieldRoot = ({ - className, - ...props -}: DateFieldRootProps) => { - const { root } = dateFieldStyles(); - return ; -}; - -const DateFieldInput = (props: InputRootProps) => ( - - {(segment) => } - -); - -export type { DateFieldProps, DateFieldRootProps }; -export { DateField, DateFieldRoot }; +"use client"; + +import * as React from "react"; +import { + DateField as AriaDateField, + type DateFieldProps as AriaDateFieldProps, + type DateValue, +} from "react-aria-components"; +import { tv, type VariantProps } from "tailwind-variants"; +import { DateInput, DateSegment } from "@/registry/ui/default/core/date-input"; +import { Field, type FieldProps } from "@/registry/ui/default/core/field"; +import { + InputRoot, + type InputRootProps, + type inputStyles, +} from "@/registry/ui/default/core/input"; + +const dateFieldStyles = tv({ + slots: { + root: "flex flex-col items-start gap-2", + }, +}); + +interface DateFieldProps + extends DateFieldRootProps, + Omit, + VariantProps { + prefix?: React.ReactNode; + suffix?: React.ReactNode; + isLoading?: boolean; + loaderPosition?: "prefix" | "suffix"; +} + +const DateField = ({ + className, + size, + label, + description, + errorMessage, + prefix, + suffix, + isLoading, + loaderPosition = "suffix", + isRequired, + isDisabled, + necessityIndicator, + contextualHelp, + ...props +}: DateFieldProps) => { + return ( + + + + + + ); +}; + +interface DateFieldRootProps + extends Omit, "className"> { + className?: string; +} +const DateFieldRoot = ({ + className, + ...props +}: DateFieldRootProps) => { + const { root } = dateFieldStyles(); + return ; +}; + +const DateFieldInput = (props: InputRootProps) => ( + + {(segment) => } + +); + +export type { DateFieldProps, DateFieldRootProps }; +export { DateField, DateFieldRoot }; diff --git a/www/src/registry/ui/default/core/date-field/demos/composition.tsx b/www/src/registry/ui/default/core/date-field/demos/composition.tsx index aa973dba..1d05e3ab 100644 --- a/www/src/registry/ui/default/core/date-field/demos/composition.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/composition.tsx @@ -1,19 +1,19 @@ -"use client"; - -import React from "react"; -import { DateFieldRoot } from "@/registry/ui/default/core/date-field"; -import { DateInput, DateSegment } from "@/registry/ui/default/core/date-input"; -import { Description, Label } from "@/registry/ui/default/core/field"; -import { InputRoot } from "@/registry/ui/default/core/input"; - -export default function Demo() { - return ( - - - - {(segment) => } - - Please select a time between 9 AM and 5 PM. - - ); -} +"use client"; + +import React from "react"; +import { DateFieldRoot } from "@/registry/ui/default/core/date-field"; +import { DateInput, DateSegment } from "@/registry/ui/default/core/date-input"; +import { Description, Label } from "@/registry/ui/default/core/field"; +import { InputRoot } from "@/registry/ui/default/core/input"; + +export default function Demo() { + return ( + + + + {(segment) => } + + Please select a time between 9 AM and 5 PM. + + ); +} diff --git a/www/src/registry/ui/default/core/date-field/demos/contextual-help.tsx b/www/src/registry/ui/default/core/date-field/demos/contextual-help.tsx index b03a86db..898e136d 100644 --- a/www/src/registry/ui/default/core/date-field/demos/contextual-help.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/contextual-help.tsx @@ -1,20 +1,20 @@ -"use client"; - -import React from "react"; -import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - return ( - - } - /> - ); -} +"use client"; + +import React from "react"; +import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + return ( + + } + /> + ); +} diff --git a/www/src/registry/ui/default/core/date-field/demos/controlled.tsx b/www/src/registry/ui/default/core/date-field/demos/controlled.tsx index 4fdb94f7..c4da2d32 100644 --- a/www/src/registry/ui/default/core/date-field/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/controlled.tsx @@ -1,15 +1,15 @@ -"use client"; - -import React from "react"; -import { parseDate } from "@internationalized/date"; -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - const [value, setValue] = React.useState(parseDate("2020-02-03")); - return ( -
      - -

      selected date: {value.toString()}

      -
      - ); -} +"use client"; + +import React from "react"; +import { parseDate } from "@internationalized/date"; +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + const [value, setValue] = React.useState(parseDate("2020-02-03")); + return ( +
      + +

      selected date: {value.toString()}

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-field/demos/default.tsx b/www/src/registry/ui/default/core/date-field/demos/default.tsx index 899fbdc0..7601228e 100644 --- a/www/src/registry/ui/default/core/date-field/demos/default.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/default.tsx @@ -1,5 +1,5 @@ -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - return ; -} +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/date-field/demos/description.tsx b/www/src/registry/ui/default/core/date-field/demos/description.tsx index 531e3198..02f3057a 100644 --- a/www/src/registry/ui/default/core/date-field/demos/description.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/description.tsx @@ -1,8 +1,8 @@ -"use client"; - -import React from "react"; -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - return ; -} +"use client"; + +import React from "react"; +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/date-field/demos/disabled.tsx b/www/src/registry/ui/default/core/date-field/demos/disabled.tsx index 77735f95..b8278230 100644 --- a/www/src/registry/ui/default/core/date-field/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/disabled.tsx @@ -1,5 +1,5 @@ -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - return ; -} +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/date-field/demos/error-message.tsx b/www/src/registry/ui/default/core/date-field/demos/error-message.tsx index 36784404..2667b536 100644 --- a/www/src/registry/ui/default/core/date-field/demos/error-message.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/error-message.tsx @@ -1,14 +1,14 @@ -"use client"; - -import React from "react"; -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import React from "react"; +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-field/demos/granularity.tsx b/www/src/registry/ui/default/core/date-field/demos/granularity.tsx index 455c0348..731a2f90 100644 --- a/www/src/registry/ui/default/core/date-field/demos/granularity.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/granularity.tsx @@ -1,26 +1,26 @@ -"use client"; - -import { parseAbsoluteToLocal } from "@internationalized/date"; -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - return ( -
      - - - -
      - ); -} +"use client"; + +import { parseAbsoluteToLocal } from "@internationalized/date"; +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + return ( +
      + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-field/demos/hide-time-zone.tsx b/www/src/registry/ui/default/core/date-field/demos/hide-time-zone.tsx index a4d9b6d5..6c115ebc 100644 --- a/www/src/registry/ui/default/core/date-field/demos/hide-time-zone.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/hide-time-zone.tsx @@ -1,15 +1,15 @@ -"use client"; - -import { parseZonedDateTime } from "@internationalized/date"; -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import { parseZonedDateTime } from "@internationalized/date"; +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-field/demos/hour-cycle.tsx b/www/src/registry/ui/default/core/date-field/demos/hour-cycle.tsx index e6651c97..e62e8813 100644 --- a/www/src/registry/ui/default/core/date-field/demos/hour-cycle.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/hour-cycle.tsx @@ -1,13 +1,13 @@ -"use client"; - -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-field/demos/label.tsx b/www/src/registry/ui/default/core/date-field/demos/label.tsx index fd2a0c66..dc0f6812 100644 --- a/www/src/registry/ui/default/core/date-field/demos/label.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/label.tsx @@ -1,10 +1,10 @@ -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - return ( -
      - - -
      - ); -} +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + return ( +
      + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-field/demos/loading.tsx b/www/src/registry/ui/default/core/date-field/demos/loading.tsx index 8f5d4060..d4459fb3 100644 --- a/www/src/registry/ui/default/core/date-field/demos/loading.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/loading.tsx @@ -1,13 +1,13 @@ -"use client"; - -import React from "react"; -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - return ( -
      - - -
      - ); -} +"use client"; + +import React from "react"; +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + return ( +
      + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-field/demos/placeholder.tsx b/www/src/registry/ui/default/core/date-field/demos/placeholder.tsx index d7478c33..887ba30b 100644 --- a/www/src/registry/ui/default/core/date-field/demos/placeholder.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/placeholder.tsx @@ -1,13 +1,13 @@ -"use client"; - -import { CalendarDate } from "@internationalized/date"; -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import { CalendarDate } from "@internationalized/date"; +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-field/demos/prefix-and-suffix.tsx b/www/src/registry/ui/default/core/date-field/demos/prefix-and-suffix.tsx index 1cb2d412..12a13acf 100644 --- a/www/src/registry/ui/default/core/date-field/demos/prefix-and-suffix.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/prefix-and-suffix.tsx @@ -1,11 +1,11 @@ -import { DateField } from "@/registry/ui/default/core/date-field"; -import { CalendarIcon } from "@/__icons__"; - -export default function Demo() { - return ( -
      - } /> - } /> -
      - ); -} +import { DateField } from "@/registry/ui/default/core/date-field"; +import { CalendarIcon } from "@/__icons__"; + +export default function Demo() { + return ( +
      + } /> + } /> +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-field/demos/read-only.tsx b/www/src/registry/ui/default/core/date-field/demos/read-only.tsx index b1ffa756..ed1080a1 100644 --- a/www/src/registry/ui/default/core/date-field/demos/read-only.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/read-only.tsx @@ -1,15 +1,15 @@ -"use client"; - -import React from "react"; -import { CalendarDate } from "@internationalized/date"; -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import React from "react"; +import { CalendarDate } from "@internationalized/date"; +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-field/demos/required.tsx b/www/src/registry/ui/default/core/date-field/demos/required.tsx index 285caee8..6a3db921 100644 --- a/www/src/registry/ui/default/core/date-field/demos/required.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/required.tsx @@ -1,15 +1,15 @@ -"use client"; - -import React from "react"; -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - return ( -
      - - - - -
      - ); -} +"use client"; + +import React from "react"; +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + return ( +
      + + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-field/demos/sizes.tsx b/www/src/registry/ui/default/core/date-field/demos/sizes.tsx index 9e61e425..593969a5 100644 --- a/www/src/registry/ui/default/core/date-field/demos/sizes.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/sizes.tsx @@ -1,11 +1,11 @@ -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - return ( -
      - - - -
      - ); -} +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + return ( +
      + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-field/demos/time-zones.tsx b/www/src/registry/ui/default/core/date-field/demos/time-zones.tsx index 5e46c3d8..71319a7c 100644 --- a/www/src/registry/ui/default/core/date-field/demos/time-zones.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/time-zones.tsx @@ -1,10 +1,10 @@ -"use client"; - -import { parseAbsoluteToLocal } from "@internationalized/date"; -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import { parseAbsoluteToLocal } from "@internationalized/date"; +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-field/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/date-field/demos/uncontrolled.tsx index 7fea27cb..7921a895 100644 --- a/www/src/registry/ui/default/core/date-field/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/date-field/demos/uncontrolled.tsx @@ -1,11 +1,11 @@ -"use client"; - -import React from "react"; -import { parseDate } from "@internationalized/date"; -import { DateField } from "@/registry/ui/default/core/date-field"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import React from "react"; +import { parseDate } from "@internationalized/date"; +import { DateField } from "@/registry/ui/default/core/date-field"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-field/index.ts b/www/src/registry/ui/default/core/date-field/index.ts index e1d5415a..ec4c5b01 100644 --- a/www/src/registry/ui/default/core/date-field/index.ts +++ b/www/src/registry/ui/default/core/date-field/index.ts @@ -1 +1 @@ -export * from "./date-field"; +export * from "./date-field"; diff --git a/www/src/registry/ui/default/core/date-input/date-input.tsx b/www/src/registry/ui/default/core/date-input/date-input.tsx index db6759a8..27409019 100644 --- a/www/src/registry/ui/default/core/date-input/date-input.tsx +++ b/www/src/registry/ui/default/core/date-input/date-input.tsx @@ -1,53 +1,53 @@ -"use client"; - -import React from "react"; -import { - DateInput as AriaDateInput, - DateSegment as AriaDateSegment, - type DateSegmentProps as AriaDateSegmentProps, - type DateInputProps as AriaDateInputProps, -} from "react-aria-components"; -import { tv } from "tailwind-variants"; - -const dateInputStyles = tv({ - slots: { - input: [ - "text-fg placeholder:text-fg-muted disabled:text-fg-disabled flex items-center justify-start disabled:cursor-default", - ], - segment: - "focus:bg-bg-accent focus:text-fg-onAccent type-literal:px-0 placeholder-shown:[&:not([data-disabled])]:[&:not([data-focused])]:text-fg-muted disabled:text-fg-disabled select-none rounded px-0.5 outline-none focus:caret-transparent", - }, -}); - -interface DateInputProps extends Omit { - className?: string; -} -const DateInput = React.forwardRef( - ({ className, ...props }, ref) => { - const { input } = dateInputStyles(); - return ( - - ); - } -); -DateInput.displayName = "Input"; - -interface DateSegmentProps extends Omit { - className?: string; -} -const DateSegment = React.forwardRef( - ({ className, ...props }, ref) => { - const { segment } = dateInputStyles(); - return ( - - ); - } -); -DateSegment.displayName = "Segment"; - -export type { DateInputProps, DateSegmentProps }; -export { DateInput, DateSegment }; +"use client"; + +import React from "react"; +import { + DateInput as AriaDateInput, + DateSegment as AriaDateSegment, + type DateSegmentProps as AriaDateSegmentProps, + type DateInputProps as AriaDateInputProps, +} from "react-aria-components"; +import { tv } from "tailwind-variants"; + +const dateInputStyles = tv({ + slots: { + input: [ + "text-fg placeholder:text-fg-muted disabled:text-fg-disabled flex items-center justify-start disabled:cursor-default", + ], + segment: + "focus:bg-bg-accent focus:text-fg-onAccent type-literal:px-0 placeholder-shown:[&:not([data-disabled])]:[&:not([data-focused])]:text-fg-muted disabled:text-fg-disabled select-none rounded px-0.5 outline-none focus:caret-transparent", + }, +}); + +interface DateInputProps extends Omit { + className?: string; +} +const DateInput = React.forwardRef( + ({ className, ...props }, ref) => { + const { input } = dateInputStyles(); + return ( + + ); + } +); +DateInput.displayName = "Input"; + +interface DateSegmentProps extends Omit { + className?: string; +} +const DateSegment = React.forwardRef( + ({ className, ...props }, ref) => { + const { segment } = dateInputStyles(); + return ( + + ); + } +); +DateSegment.displayName = "Segment"; + +export type { DateInputProps, DateSegmentProps }; +export { DateInput, DateSegment }; diff --git a/www/src/registry/ui/default/core/date-input/index.ts b/www/src/registry/ui/default/core/date-input/index.ts index c88a5824..5b3079de 100644 --- a/www/src/registry/ui/default/core/date-input/index.ts +++ b/www/src/registry/ui/default/core/date-input/index.ts @@ -1 +1 @@ -export * from "./date-input"; +export * from "./date-input"; diff --git a/www/src/registry/ui/default/core/date-picker/date-picker.tsx b/www/src/registry/ui/default/core/date-picker/date-picker.tsx index 53dc631b..8f52d099 100644 --- a/www/src/registry/ui/default/core/date-picker/date-picker.tsx +++ b/www/src/registry/ui/default/core/date-picker/date-picker.tsx @@ -1,99 +1,99 @@ -"use client"; - -import * as React from "react"; -import { - DatePicker as AriaDatePicker, - type DatePickerProps as AriaDatePickerProps, - type DateValue, -} from "react-aria-components"; -import { type VariantProps } from "tailwind-variants"; -import { Button } from "@/registry/ui/default/core/button"; -import { Calendar } from "@/registry/ui/default/core/calendar"; -import { DateInput, DateSegment } from "@/registry/ui/default/core/date-input"; -import { Dialog } from "@/registry/ui/default/core/dialog"; -import { - Field, - fieldStyles, - type FieldProps, -} from "@/registry/ui/default/core/field"; -import { InputRoot, type inputStyles } from "@/registry/ui/default/core/input"; -import { CalendarIcon } from "@/__icons__"; - -interface DatePickerProps - extends DatePickerRootProps, - Omit, - VariantProps { - prefix?: React.ReactNode; - isLoading?: boolean; -} - -const DatePicker = ({ - className, - size, - label, - description, - errorMessage, - prefix, - isLoading, - isRequired, - isDisabled, - necessityIndicator, - contextualHelp, - ...props -}: DatePickerProps) => { - return ( - - - - - {(segment) => } - - - - - - - - - ); -}; - -interface DatePickerRootProps - extends Omit, "className"> { - className?: string; -} -const DatePickerRoot = ({ - className, - ...props -}: DatePickerRootProps) => { - const { root } = fieldStyles(); - return ; -}; - -export type { DatePickerProps, DatePickerRootProps }; -export { DatePicker, DatePickerRoot }; +"use client"; + +import * as React from "react"; +import { + DatePicker as AriaDatePicker, + type DatePickerProps as AriaDatePickerProps, + type DateValue, +} from "react-aria-components"; +import { type VariantProps } from "tailwind-variants"; +import { Button } from "@/registry/ui/default/core/button"; +import { Calendar } from "@/registry/ui/default/core/calendar"; +import { DateInput, DateSegment } from "@/registry/ui/default/core/date-input"; +import { Dialog } from "@/registry/ui/default/core/dialog"; +import { + Field, + fieldStyles, + type FieldProps, +} from "@/registry/ui/default/core/field"; +import { InputRoot, type inputStyles } from "@/registry/ui/default/core/input"; +import { CalendarIcon } from "@/__icons__"; + +interface DatePickerProps + extends DatePickerRootProps, + Omit, + VariantProps { + prefix?: React.ReactNode; + isLoading?: boolean; +} + +const DatePicker = ({ + className, + size, + label, + description, + errorMessage, + prefix, + isLoading, + isRequired, + isDisabled, + necessityIndicator, + contextualHelp, + ...props +}: DatePickerProps) => { + return ( + + + + + {(segment) => } + + + + + + + + + ); +}; + +interface DatePickerRootProps + extends Omit, "className"> { + className?: string; +} +const DatePickerRoot = ({ + className, + ...props +}: DatePickerRootProps) => { + const { root } = fieldStyles(); + return ; +}; + +export type { DatePickerProps, DatePickerRootProps }; +export { DatePicker, DatePickerRoot }; diff --git a/www/src/registry/ui/default/core/date-picker/demos/composition.tsx b/www/src/registry/ui/default/core/date-picker/demos/composition.tsx index 994e2c2e..386430c5 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/composition.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/composition.tsx @@ -1,41 +1,41 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { Calendar } from "@/registry/ui/default/core/calendar"; -import { DateInput, DateSegment } from "@/registry/ui/default/core/date-input"; -import { DatePickerRoot } from "@/registry/ui/default/core/date-picker"; -import { DialogContent } from "@/registry/ui/default/core/dialog"; -import { - Description, - FieldError, - Label, -} from "@/registry/ui/default/core/field"; -import { InputRoot } from "@/registry/ui/default/core/input"; -import { Overlay } from "@/registry/ui/default/core/overlay"; -import { CalendarIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - - - } - className="pr-1" - > - {(segment) => } - - Please select a date. - - - - - - - - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { Calendar } from "@/registry/ui/default/core/calendar"; +import { DateInput, DateSegment } from "@/registry/ui/default/core/date-input"; +import { DatePickerRoot } from "@/registry/ui/default/core/date-picker"; +import { DialogContent } from "@/registry/ui/default/core/dialog"; +import { + Description, + FieldError, + Label, +} from "@/registry/ui/default/core/field"; +import { InputRoot } from "@/registry/ui/default/core/input"; +import { Overlay } from "@/registry/ui/default/core/overlay"; +import { CalendarIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + + + } + className="pr-1" + > + {(segment) => } + + Please select a date. + + + + + + + + ); +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/contextual-help.tsx b/www/src/registry/ui/default/core/date-picker/demos/contextual-help.tsx index 4ecc719d..bd8415b6 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/contextual-help.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/contextual-help.tsx @@ -1,20 +1,20 @@ -"use client"; - -import React from "react"; -import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - return ( - - } - /> - ); -} +"use client"; + +import React from "react"; +import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + return ( + + } + /> + ); +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/controlled.tsx b/www/src/registry/ui/default/core/date-picker/demos/controlled.tsx index 0d902e18..1adede8c 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/controlled.tsx @@ -1,15 +1,15 @@ -"use client"; - -import React from "react"; -import { parseDate } from "@internationalized/date"; -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - const [value, setValue] = React.useState(parseDate("2020-02-03")); - return ( -
      - -

      selected date: {value.toString()}

      -
      - ); -} +"use client"; + +import React from "react"; +import { parseDate } from "@internationalized/date"; +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + const [value, setValue] = React.useState(parseDate("2020-02-03")); + return ( +
      + +

      selected date: {value.toString()}

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/default.tsx b/www/src/registry/ui/default/core/date-picker/demos/default.tsx index 390960da..3300d713 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/default.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/default.tsx @@ -1,5 +1,5 @@ -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - return ; -} +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/description.tsx b/www/src/registry/ui/default/core/date-picker/demos/description.tsx index aa2033b2..56edf4af 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/description.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/description.tsx @@ -1,8 +1,8 @@ -"use client"; - -import React from "react"; -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - return ; -} +"use client"; + +import React from "react"; +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/disabled.tsx b/www/src/registry/ui/default/core/date-picker/demos/disabled.tsx index de415b0f..9155445c 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/disabled.tsx @@ -1,5 +1,5 @@ -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - return ; -} +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/error-message.tsx b/www/src/registry/ui/default/core/date-picker/demos/error-message.tsx index f1d09e76..2ce422ae 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/error-message.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/error-message.tsx @@ -1,14 +1,14 @@ -"use client"; - -import React from "react"; -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import React from "react"; +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/granularity.tsx b/www/src/registry/ui/default/core/date-picker/demos/granularity.tsx index 5d1ce78f..b065a559 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/granularity.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/granularity.tsx @@ -1,26 +1,26 @@ -"use client"; - -import { parseAbsoluteToLocal } from "@internationalized/date"; -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - return ( -
      - - - -
      - ); -} +"use client"; + +import { parseAbsoluteToLocal } from "@internationalized/date"; +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + return ( +
      + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/hide-time-zone.tsx b/www/src/registry/ui/default/core/date-picker/demos/hide-time-zone.tsx index 79e4de90..cd629a2c 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/hide-time-zone.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/hide-time-zone.tsx @@ -1,15 +1,15 @@ -"use client"; - -import { parseZonedDateTime } from "@internationalized/date"; -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import { parseZonedDateTime } from "@internationalized/date"; +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/hour-cycle.tsx b/www/src/registry/ui/default/core/date-picker/demos/hour-cycle.tsx index 339f8a0b..b26041f9 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/hour-cycle.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/hour-cycle.tsx @@ -1,13 +1,13 @@ -"use client"; - -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/label.tsx b/www/src/registry/ui/default/core/date-picker/demos/label.tsx index bb30a0bf..72586ec1 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/label.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/label.tsx @@ -1,10 +1,10 @@ -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - return ( -
      - - -
      - ); -} +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + return ( +
      + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/loading.tsx b/www/src/registry/ui/default/core/date-picker/demos/loading.tsx index f9a67668..148bd4aa 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/loading.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/loading.tsx @@ -1,8 +1,8 @@ -"use client"; - -import React from "react"; -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - return ; -} +"use client"; + +import React from "react"; +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/placeholder.tsx b/www/src/registry/ui/default/core/date-picker/demos/placeholder.tsx index c4975e13..b09ab0fb 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/placeholder.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/placeholder.tsx @@ -1,13 +1,13 @@ -"use client"; - -import { CalendarDate } from "@internationalized/date"; -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import { CalendarDate } from "@internationalized/date"; +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/prefix.tsx b/www/src/registry/ui/default/core/date-picker/demos/prefix.tsx index 0020f4aa..149a8396 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/prefix.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/prefix.tsx @@ -1,6 +1,6 @@ -import { DatePicker } from "@/registry/ui/default/core/date-picker"; -import { UsersIcon } from "@/__icons__"; - -export default function Demo() { - return } />; -} +import { DatePicker } from "@/registry/ui/default/core/date-picker"; +import { UsersIcon } from "@/__icons__"; + +export default function Demo() { + return } />; +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/read-only.tsx b/www/src/registry/ui/default/core/date-picker/demos/read-only.tsx index 3ec23ab0..da0e348b 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/read-only.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/read-only.tsx @@ -1,15 +1,15 @@ -"use client"; - -import React from "react"; -import { CalendarDate } from "@internationalized/date"; -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import React from "react"; +import { CalendarDate } from "@internationalized/date"; +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/required.tsx b/www/src/registry/ui/default/core/date-picker/demos/required.tsx index 8fe8a9fc..3488053a 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/required.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/required.tsx @@ -1,15 +1,15 @@ -"use client"; - -import React from "react"; -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - return ( -
      - - - - -
      - ); -} +"use client"; + +import React from "react"; +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + return ( +
      + + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/sizes.tsx b/www/src/registry/ui/default/core/date-picker/demos/sizes.tsx index 8b9aca32..920697fe 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/sizes.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/sizes.tsx @@ -1,11 +1,11 @@ -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - return ( -
      - - - -
      - ); -} +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + return ( +
      + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/time-zones.tsx b/www/src/registry/ui/default/core/date-picker/demos/time-zones.tsx index 2848f542..ea48c00f 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/time-zones.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/time-zones.tsx @@ -1,10 +1,10 @@ -"use client"; - -import { parseAbsoluteToLocal } from "@internationalized/date"; -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import { parseAbsoluteToLocal } from "@internationalized/date"; +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-picker/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/date-picker/demos/uncontrolled.tsx index 2ecaae46..57d11b05 100644 --- a/www/src/registry/ui/default/core/date-picker/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/date-picker/demos/uncontrolled.tsx @@ -1,14 +1,14 @@ -"use client"; - -import React from "react"; -import { parseDate } from "@internationalized/date"; -import { DatePicker } from "@/registry/ui/default/core/date-picker"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import React from "react"; +import { parseDate } from "@internationalized/date"; +import { DatePicker } from "@/registry/ui/default/core/date-picker"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-picker/index.ts b/www/src/registry/ui/default/core/date-picker/index.ts index d48d7573..ddc0e60a 100644 --- a/www/src/registry/ui/default/core/date-picker/index.ts +++ b/www/src/registry/ui/default/core/date-picker/index.ts @@ -1 +1 @@ -export * from "./date-picker"; +export * from "./date-picker"; diff --git a/www/src/registry/ui/default/core/date-range-picker/date-range-picker.tsx b/www/src/registry/ui/default/core/date-range-picker/date-range-picker.tsx index 8ac62444..61c84ee2 100644 --- a/www/src/registry/ui/default/core/date-range-picker/date-range-picker.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/date-range-picker.tsx @@ -1,103 +1,103 @@ -"use client"; - -import * as React from "react"; -import { - DateRangePicker as AriaDateRangePicker, - type DateRangePickerProps as AriaDateRangePickerProps, - type DateValue, -} from "react-aria-components"; -import { type VariantProps } from "tailwind-variants"; -import { Button } from "@/registry/ui/default/core/button"; -import { DateInput, DateSegment } from "@/registry/ui/default/core/date-input"; -import { Dialog } from "@/registry/ui/default/core/dialog"; -import { - Field, - type FieldProps, - fieldStyles, -} from "@/registry/ui/default/core/field"; -import { InputRoot, type inputStyles } from "@/registry/ui/default/core/input"; -import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; -import { CalendarIcon } from "@/__icons__"; - -interface DateRangePickerProps - extends DateRangePickerRootProps, - Omit, - VariantProps { - prefix?: React.ReactNode; - isLoading?: boolean; -} - -const DateRangePicker = ({ - className, - size, - label, - description, - errorMessage, - prefix, - isLoading, - isRequired, - isDisabled, - necessityIndicator, - contextualHelp, - ...props -}: DateRangePickerProps) => { - return ( - - - - - {(segment) => } - - - - {(segment) => } - - - - - - - - - ); -}; - -interface DateRangePickerRootProps - extends Omit, "className"> { - className?: string; -} -const DateRangePickerRoot = ({ - className, - ...props -}: DateRangePickerRootProps) => { - const { root } = fieldStyles(); - return ; -}; - -export type { DateRangePickerProps, DateRangePickerRootProps }; -export { DateRangePicker, DateRangePickerRoot }; +"use client"; + +import * as React from "react"; +import { + DateRangePicker as AriaDateRangePicker, + type DateRangePickerProps as AriaDateRangePickerProps, + type DateValue, +} from "react-aria-components"; +import { type VariantProps } from "tailwind-variants"; +import { Button } from "@/registry/ui/default/core/button"; +import { DateInput, DateSegment } from "@/registry/ui/default/core/date-input"; +import { Dialog } from "@/registry/ui/default/core/dialog"; +import { + Field, + type FieldProps, + fieldStyles, +} from "@/registry/ui/default/core/field"; +import { InputRoot, type inputStyles } from "@/registry/ui/default/core/input"; +import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; +import { CalendarIcon } from "@/__icons__"; + +interface DateRangePickerProps + extends DateRangePickerRootProps, + Omit, + VariantProps { + prefix?: React.ReactNode; + isLoading?: boolean; +} + +const DateRangePicker = ({ + className, + size, + label, + description, + errorMessage, + prefix, + isLoading, + isRequired, + isDisabled, + necessityIndicator, + contextualHelp, + ...props +}: DateRangePickerProps) => { + return ( + + + + + {(segment) => } + + + + {(segment) => } + + + + + + + + + ); +}; + +interface DateRangePickerRootProps + extends Omit, "className"> { + className?: string; +} +const DateRangePickerRoot = ({ + className, + ...props +}: DateRangePickerRootProps) => { + const { root } = fieldStyles(); + return ; +}; + +export type { DateRangePickerProps, DateRangePickerRootProps }; +export { DateRangePicker, DateRangePickerRoot }; diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/composition.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/composition.tsx index 359e23f0..8415866f 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/composition.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/composition.tsx @@ -1,47 +1,47 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { DateInput, DateSegment } from "@/registry/ui/default/core/date-input"; -import { DatePickerRoot } from "@/registry/ui/default/core/date-picker"; -import { DialogContent } from "@/registry/ui/default/core/dialog"; -import { - Description, - FieldError, - Label, -} from "@/registry/ui/default/core/field"; -import { InputRoot } from "@/registry/ui/default/core/input"; -import { Overlay } from "@/registry/ui/default/core/overlay"; -import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; -import { CalendarIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - - - } - className="pr-1" - > - - {(segment) => } - - - - {(segment) => } - - - Please select a date. - - - - - - - - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { DateInput, DateSegment } from "@/registry/ui/default/core/date-input"; +import { DatePickerRoot } from "@/registry/ui/default/core/date-picker"; +import { DialogContent } from "@/registry/ui/default/core/dialog"; +import { + Description, + FieldError, + Label, +} from "@/registry/ui/default/core/field"; +import { InputRoot } from "@/registry/ui/default/core/input"; +import { Overlay } from "@/registry/ui/default/core/overlay"; +import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; +import { CalendarIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + + + } + className="pr-1" + > + + {(segment) => } + + + + {(segment) => } + + + Please select a date. + + + + + + + + ); +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/contextual-help.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/contextual-help.tsx index eb09acac..80d30d6c 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/contextual-help.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/contextual-help.tsx @@ -1,20 +1,20 @@ -"use client"; - -import React from "react"; -import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - return ( - - } - /> - ); -} +"use client"; + +import React from "react"; +import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + return ( + + } + /> + ); +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/controlled.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/controlled.tsx index 5bef7817..608eac49 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/controlled.tsx @@ -1,29 +1,29 @@ -"use client"; - -import React from "react"; -import { getLocalTimeZone, parseDate } from "@internationalized/date"; -import { useDateFormatter } from "react-aria"; -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - const [value, setValue] = React.useState({ - start: parseDate("2024-02-03"), - end: parseDate("2024-02-08"), - }); - const formatter = useDateFormatter({ dateStyle: "long" }); - - return ( -
      - -

      - Selected date:{" "} - {value - ? formatter.formatRange( - value.start.toDate(getLocalTimeZone()), - value.end.toDate(getLocalTimeZone()) - ) - : "--"} -

      -
      - ); -} +"use client"; + +import React from "react"; +import { getLocalTimeZone, parseDate } from "@internationalized/date"; +import { useDateFormatter } from "react-aria"; +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + const [value, setValue] = React.useState({ + start: parseDate("2024-02-03"), + end: parseDate("2024-02-08"), + }); + const formatter = useDateFormatter({ dateStyle: "long" }); + + return ( +
      + +

      + Selected date:{" "} + {value + ? formatter.formatRange( + value.start.toDate(getLocalTimeZone()), + value.end.toDate(getLocalTimeZone()) + ) + : "--"} +

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/default.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/default.tsx index a3b2b136..65a62d7d 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/default.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/default.tsx @@ -1,5 +1,5 @@ -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - return ; -} +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/description.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/description.tsx index 7da70a21..36f066e4 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/description.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/description.tsx @@ -1,10 +1,10 @@ -"use client"; - -import React from "react"; -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import React from "react"; +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/disabled.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/disabled.tsx index 52e7abd7..4e145b4a 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/disabled.tsx @@ -1,5 +1,5 @@ -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - return ; -} +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/error-message.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/error-message.tsx index 52dd2e39..bce6a695 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/error-message.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/error-message.tsx @@ -1,14 +1,14 @@ -"use client"; - -import React from "react"; -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import React from "react"; +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/granularity.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/granularity.tsx index c87fdf4f..bcd96169 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/granularity.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/granularity.tsx @@ -1,26 +1,26 @@ -"use client"; - -import { parseAbsoluteToLocal } from "@internationalized/date"; -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - const dates = { - start: parseAbsoluteToLocal("2021-04-07T18:45:22Z"), - end: parseAbsoluteToLocal("2021-04-08T20:00:00Z"), - }; - return ( -
      - - - -
      - ); -} +"use client"; + +import { parseAbsoluteToLocal } from "@internationalized/date"; +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + const dates = { + start: parseAbsoluteToLocal("2021-04-07T18:45:22Z"), + end: parseAbsoluteToLocal("2021-04-08T20:00:00Z"), + }; + return ( +
      + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/hide-time-zone.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/hide-time-zone.tsx index 1be00f1d..6eab1c1c 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/hide-time-zone.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/hide-time-zone.tsx @@ -1,18 +1,18 @@ -"use client"; - -import { parseAbsoluteToLocal } from "@internationalized/date"; -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import { parseAbsoluteToLocal } from "@internationalized/date"; +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/hour-cycle.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/hour-cycle.tsx index 9383c96a..d7bbe91f 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/hour-cycle.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/hour-cycle.tsx @@ -1,13 +1,13 @@ -"use client"; - -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/label.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/label.tsx index 7c88f92d..c3cdcc6f 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/label.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/label.tsx @@ -1,10 +1,10 @@ -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - return ( -
      - - -
      - ); -} +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + return ( +
      + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/loading.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/loading.tsx index 3e1af2e5..598eb25c 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/loading.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/loading.tsx @@ -1,8 +1,8 @@ -"use client"; - -import React from "react"; -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - return ; -} +"use client"; + +import React from "react"; +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/placeholder.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/placeholder.tsx index dfc0f972..69af1b02 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/placeholder.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/placeholder.tsx @@ -1,13 +1,13 @@ -"use client"; - -import { CalendarDate } from "@internationalized/date"; -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import { CalendarDate } from "@internationalized/date"; +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/prefix.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/prefix.tsx index 521d1776..85e0f7ed 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/prefix.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/prefix.tsx @@ -1,6 +1,6 @@ -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; -import { PlaneIcon } from "@/__icons__"; - -export default function Demo() { - return } />; -} +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; +import { PlaneIcon } from "@/__icons__"; + +export default function Demo() { + return } />; +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/read-only.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/read-only.tsx index b6c3a69b..ff616adc 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/read-only.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/read-only.tsx @@ -1,18 +1,18 @@ -"use client"; - -import React from "react"; -import { parseAbsoluteToLocal } from "@internationalized/date"; -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import React from "react"; +import { parseAbsoluteToLocal } from "@internationalized/date"; +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/required.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/required.tsx index 52dda116..ce84e838 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/required.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/required.tsx @@ -1,23 +1,23 @@ -"use client"; - -import React from "react"; -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - return ( -
      - - - - -
      - ); -} +"use client"; + +import React from "react"; +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + return ( +
      + + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/sizes.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/sizes.tsx index cdd38136..55b241ef 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/sizes.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/sizes.tsx @@ -1,11 +1,11 @@ -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - return ( -
      - - - -
      - ); -} +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + return ( +
      + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/time-zones.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/time-zones.tsx index 337fa419..f10cb627 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/time-zones.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/time-zones.tsx @@ -1,15 +1,15 @@ -"use client"; - -import { parseAbsoluteToLocal } from "@internationalized/date"; -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import { parseAbsoluteToLocal } from "@internationalized/date"; +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-range-picker/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/date-range-picker/demos/uncontrolled.tsx index cf8ccead..de6aa196 100644 --- a/www/src/registry/ui/default/core/date-range-picker/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/date-range-picker/demos/uncontrolled.tsx @@ -1,17 +1,17 @@ -"use client"; - -import React from "react"; -import { parseDate } from "@internationalized/date"; -import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import React from "react"; +import { parseDate } from "@internationalized/date"; +import { DateRangePicker } from "@/registry/ui/default/core/date-range-picker"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/date-range-picker/index.ts b/www/src/registry/ui/default/core/date-range-picker/index.ts index 3569876c..77120a3b 100644 --- a/www/src/registry/ui/default/core/date-range-picker/index.ts +++ b/www/src/registry/ui/default/core/date-range-picker/index.ts @@ -1 +1 @@ -export * from "./date-range-picker"; +export * from "./date-range-picker"; diff --git a/www/src/registry/ui/default/core/dialog/demos/alert-dialog.tsx b/www/src/registry/ui/default/core/dialog/demos/alert-dialog.tsx index 16e5b1ff..69dccd20 100644 --- a/www/src/registry/ui/default/core/dialog/demos/alert-dialog.tsx +++ b/www/src/registry/ui/default/core/dialog/demos/alert-dialog.tsx @@ -1,44 +1,44 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { - DialogRoot, - Dialog, - DialogFooter, -} from "@/registry/ui/default/core/dialog"; - -export default function Demo() { - return ( - - - - {({ close }) => ( - <> - - - - - - )} - - - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { + DialogRoot, + Dialog, + DialogFooter, +} from "@/registry/ui/default/core/dialog"; + +export default function Demo() { + return ( + + + + {({ close }) => ( + <> + + + + + + )} + + + ); +} diff --git a/www/src/registry/ui/default/core/dialog/demos/async-form-submission.tsx b/www/src/registry/ui/default/core/dialog/demos/async-form-submission.tsx index d41f617e..4a3c1c8b 100644 --- a/www/src/registry/ui/default/core/dialog/demos/async-form-submission.tsx +++ b/www/src/registry/ui/default/core/dialog/demos/async-form-submission.tsx @@ -1,59 +1,59 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { - DialogRoot, - Dialog, - DialogFooter, -} from "@/registry/ui/default/core/dialog"; -import { TextField } from "@/registry/ui/default/core/text-field"; - -export default function DialogDemo() { - const [isLoading, setIsLoading] = React.useState(false); - const handleSubmit = async () => { - setIsLoading(true); - await new Promise((resolve) => setTimeout(resolve, 1000)); - setIsLoading(false); - }; - return ( - - - - {({ close }) => ( - <> -
      - - -
      - - - - - - )} -
      -
      - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { + DialogRoot, + Dialog, + DialogFooter, +} from "@/registry/ui/default/core/dialog"; +import { TextField } from "@/registry/ui/default/core/text-field"; + +export default function DialogDemo() { + const [isLoading, setIsLoading] = React.useState(false); + const handleSubmit = async () => { + setIsLoading(true); + await new Promise((resolve) => setTimeout(resolve, 1000)); + setIsLoading(false); + }; + return ( + + + + {({ close }) => ( + <> +
      + + +
      + + + + + + )} +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/dialog/demos/basic.tsx b/www/src/registry/ui/default/core/dialog/demos/basic.tsx index 574a5b8c..2a2d5627 100644 --- a/www/src/registry/ui/default/core/dialog/demos/basic.tsx +++ b/www/src/registry/ui/default/core/dialog/demos/basic.tsx @@ -1,53 +1,53 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { - DialogRoot, - Dialog, - DialogFooter, -} from "@/registry/ui/default/core/dialog"; -import { TextField } from "@/registry/ui/default/core/text-field"; - -export default function Demo() { - return ( - - - - {({ close }) => ( - <> -
      - - -
      - - - - - - )} -
      -
      - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { + DialogRoot, + Dialog, + DialogFooter, +} from "@/registry/ui/default/core/dialog"; +import { TextField } from "@/registry/ui/default/core/text-field"; + +export default function Demo() { + return ( + + + + {({ close }) => ( + <> +
      + + +
      + + + + + + )} +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/dialog/demos/composition.tsx b/www/src/registry/ui/default/core/dialog/demos/composition.tsx index 536abf65..37499413 100644 --- a/www/src/registry/ui/default/core/dialog/demos/composition.tsx +++ b/www/src/registry/ui/default/core/dialog/demos/composition.tsx @@ -1,15 +1,15 @@ -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { DialogRoot, Dialog } from "@/registry/ui/default/core/dialog"; -import { TextField } from "@/registry/ui/default/core/text-field"; - -export default function Demo() { - return ( - - - - - - - ); -} +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { DialogRoot, Dialog } from "@/registry/ui/default/core/dialog"; +import { TextField } from "@/registry/ui/default/core/text-field"; + +export default function Demo() { + return ( + + + + + + + ); +} diff --git a/www/src/registry/ui/default/core/dialog/demos/controlled.tsx b/www/src/registry/ui/default/core/dialog/demos/controlled.tsx index 6a5b4e4e..5efafd40 100644 --- a/www/src/registry/ui/default/core/dialog/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/dialog/demos/controlled.tsx @@ -1,44 +1,44 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { - DialogRoot, - Dialog, - DialogFooter, -} from "@/registry/ui/default/core/dialog"; -import { TextField } from "@/registry/ui/default/core/text-field"; - -export default function Demo() { - return ( - - - - {({ close }) => ( - <> -
      - - -
      - - - - - - )} -
      -
      - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { + DialogRoot, + Dialog, + DialogFooter, +} from "@/registry/ui/default/core/dialog"; +import { TextField } from "@/registry/ui/default/core/text-field"; + +export default function Demo() { + return ( + + + + {({ close }) => ( + <> +
      + + +
      + + + + + + )} +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/dialog/demos/description.tsx b/www/src/registry/ui/default/core/dialog/demos/description.tsx index f84fc230..0e1a24f7 100644 --- a/www/src/registry/ui/default/core/dialog/demos/description.tsx +++ b/www/src/registry/ui/default/core/dialog/demos/description.tsx @@ -1,22 +1,22 @@ -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { DialogRoot, Dialog } from "@/registry/ui/default/core/dialog"; -import { TextField } from "@/registry/ui/default/core/text-field"; - -export default function Demo() { - return ( - - - - - - - ); -} +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { DialogRoot, Dialog } from "@/registry/ui/default/core/dialog"; +import { TextField } from "@/registry/ui/default/core/text-field"; + +export default function Demo() { + return ( + + + + + + + ); +} diff --git a/www/src/registry/ui/default/core/dialog/demos/dismiss-button.tsx b/www/src/registry/ui/default/core/dialog/demos/dismiss-button.tsx index 1e01f9e9..aa727620 100644 --- a/www/src/registry/ui/default/core/dialog/demos/dismiss-button.tsx +++ b/www/src/registry/ui/default/core/dialog/demos/dismiss-button.tsx @@ -1,57 +1,57 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { - DialogRoot, - Dialog, - DialogFooter, -} from "@/registry/ui/default/core/dialog"; -import { TextField } from "@/registry/ui/default/core/text-field"; - -export default function Demo() { - return ( - - - - {({ close }) => ( - <> -
      - - -
      - - - - - - )} -
      -
      - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { + DialogRoot, + Dialog, + DialogFooter, +} from "@/registry/ui/default/core/dialog"; +import { TextField } from "@/registry/ui/default/core/text-field"; + +export default function Demo() { + return ( + + + + {({ close }) => ( + <> +
      + + +
      + + + + + + )} +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/dialog/demos/dismissable.tsx b/www/src/registry/ui/default/core/dialog/demos/dismissable.tsx index 7a90f137..e98a3b86 100644 --- a/www/src/registry/ui/default/core/dialog/demos/dismissable.tsx +++ b/www/src/registry/ui/default/core/dialog/demos/dismissable.tsx @@ -1,57 +1,57 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { - DialogRoot, - Dialog, - DialogFooter, -} from "@/registry/ui/default/core/dialog"; -import { TextField } from "@/registry/ui/default/core/text-field"; - -export default function Demo() { - return ( - - - - {({ close }) => ( - <> -
      - - -
      - - - - - - )} -
      -
      - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { + DialogRoot, + Dialog, + DialogFooter, +} from "@/registry/ui/default/core/dialog"; +import { TextField } from "@/registry/ui/default/core/text-field"; + +export default function Demo() { + return ( + + + + {({ close }) => ( + <> +
      + + +
      + + + + + + )} +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/dialog/demos/drawer.tsx b/www/src/registry/ui/default/core/dialog/demos/drawer.tsx index 79e27b1d..97d7d94f 100644 --- a/www/src/registry/ui/default/core/dialog/demos/drawer.tsx +++ b/www/src/registry/ui/default/core/dialog/demos/drawer.tsx @@ -1,41 +1,41 @@ -"use client"; - -import React from "react"; -import type { Key } from "react-aria-components"; -import { Button } from "@/registry/ui/default/core/button"; -import { DialogRoot, Dialog } from "@/registry/ui/default/core/dialog"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Select } from "@/registry/ui/default/core/select"; -import { Switch } from "@/registry/ui/default/core/switch"; - -export default function Demo() { - const [placement, setPlacement] = React.useState("top"); - const [swipeable, setSwipeable] = React.useState(true); - return ( -
      -
      - - - - -
      -
      - - - Swipeable - -
      -
      - ); -} +"use client"; + +import React from "react"; +import type { Key } from "react-aria-components"; +import { Button } from "@/registry/ui/default/core/button"; +import { DialogRoot, Dialog } from "@/registry/ui/default/core/dialog"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Select } from "@/registry/ui/default/core/select"; +import { Switch } from "@/registry/ui/default/core/switch"; + +export default function Demo() { + const [placement, setPlacement] = React.useState("top"); + const [swipeable, setSwipeable] = React.useState(true); + return ( +
      +
      + + + + +
      +
      + + + Swipeable + +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/dialog/demos/inset-content.tsx b/www/src/registry/ui/default/core/dialog/demos/inset-content.tsx index 58077435..c5e45a16 100644 --- a/www/src/registry/ui/default/core/dialog/demos/inset-content.tsx +++ b/www/src/registry/ui/default/core/dialog/demos/inset-content.tsx @@ -1,57 +1,57 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { - DialogRoot, - Dialog, - DialogFooter, - DialogInset, -} from "@/registry/ui/default/core/dialog"; -import { TextField } from "@/registry/ui/default/core/text-field"; - -export default function Demo() { - return ( - - - - {({ close }) => ( - <> - - Content within the inset. - -
      - - -
      - - - - - - )} -
      -
      - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { + DialogRoot, + Dialog, + DialogFooter, + DialogInset, +} from "@/registry/ui/default/core/dialog"; +import { TextField } from "@/registry/ui/default/core/text-field"; + +export default function Demo() { + return ( + + + + {({ close }) => ( + <> + + Content within the inset. + +
      + + +
      + + + + + + )} +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/dialog/demos/nested.tsx b/www/src/registry/ui/default/core/dialog/demos/nested.tsx index 9b86e5c1..1181d83c 100644 --- a/www/src/registry/ui/default/core/dialog/demos/nested.tsx +++ b/www/src/registry/ui/default/core/dialog/demos/nested.tsx @@ -1,38 +1,38 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { DialogRoot, Dialog } from "@/registry/ui/default/core/dialog"; -import { Radio, RadioGroup } from "@/registry/ui/default/core/radio-group"; - -type Type = "modal" | "drawer" | "popover"; - -export default function Demo() { - const [type, setType] = React.useState("modal"); - return ( -
      -
      - - - - - - - - - -
      -
      - setType(value as Type)} - > - Modal - Drawer - Popover - -
      -
      - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { DialogRoot, Dialog } from "@/registry/ui/default/core/dialog"; +import { Radio, RadioGroup } from "@/registry/ui/default/core/radio-group"; + +type Type = "modal" | "drawer" | "popover"; + +export default function Demo() { + const [type, setType] = React.useState("modal"); + return ( +
      +
      + + + + + + + + + +
      +
      + setType(value as Type)} + > + Modal + Drawer + Popover + +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/dialog/demos/popover.tsx b/www/src/registry/ui/default/core/dialog/demos/popover.tsx index e524394d..657f3a16 100644 --- a/www/src/registry/ui/default/core/dialog/demos/popover.tsx +++ b/www/src/registry/ui/default/core/dialog/demos/popover.tsx @@ -1,59 +1,59 @@ -"use client"; - -import React from "react"; -import type { Key } from "react-aria-components"; -import { Button } from "@/registry/ui/default/core/button"; -import { DialogRoot, Dialog } from "@/registry/ui/default/core/dialog"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { NumberField } from "@/registry/ui/default/core/number-field"; -import { Select } from "@/registry/ui/default/core/select"; -import { Switch } from "@/registry/ui/default/core/switch"; -import { InfoIcon } from "@/__icons__"; - -export default function Demo() { - const [placement, setPlacement] = React.useState("top"); - const [offset, setOffset] = React.useState(0); - const [crossOffset, setCrossOffset] = React.useState(0); - const [containerPadding, setContainerPadding] = React.useState(0); - const [showArrow, setShowArrow] = React.useState(true); - return ( -
      -
      - - - - -
      -
      - - - - - - Arrow - -
      -
      - ); -} +"use client"; + +import React from "react"; +import type { Key } from "react-aria-components"; +import { Button } from "@/registry/ui/default/core/button"; +import { DialogRoot, Dialog } from "@/registry/ui/default/core/dialog"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { NumberField } from "@/registry/ui/default/core/number-field"; +import { Select } from "@/registry/ui/default/core/select"; +import { Switch } from "@/registry/ui/default/core/switch"; +import { InfoIcon } from "@/__icons__"; + +export default function Demo() { + const [placement, setPlacement] = React.useState("top"); + const [offset, setOffset] = React.useState(0); + const [crossOffset, setCrossOffset] = React.useState(0); + const [containerPadding, setContainerPadding] = React.useState(0); + const [showArrow, setShowArrow] = React.useState(true); + return ( +
      +
      + + + + +
      +
      + + + + + + Arrow + +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/dialog/demos/title.tsx b/www/src/registry/ui/default/core/dialog/demos/title.tsx index c58ca2c4..2cefc883 100644 --- a/www/src/registry/ui/default/core/dialog/demos/title.tsx +++ b/www/src/registry/ui/default/core/dialog/demos/title.tsx @@ -1,19 +1,19 @@ -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { DialogRoot, Dialog } from "@/registry/ui/default/core/dialog"; -import { TextField } from "@/registry/ui/default/core/text-field"; - -export default function Demo() { - return ( - - - - - - - ); -} +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { DialogRoot, Dialog } from "@/registry/ui/default/core/dialog"; +import { TextField } from "@/registry/ui/default/core/text-field"; + +export default function Demo() { + return ( + + + + + + + ); +} diff --git a/www/src/registry/ui/default/core/dialog/demos/types.tsx b/www/src/registry/ui/default/core/dialog/demos/types.tsx index 92516b21..deef4244 100644 --- a/www/src/registry/ui/default/core/dialog/demos/types.tsx +++ b/www/src/registry/ui/default/core/dialog/demos/types.tsx @@ -1,82 +1,82 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { - DialogRoot, - Dialog, - DialogFooter, -} from "@/registry/ui/default/core/dialog"; -import { Radio, RadioGroup } from "@/registry/ui/default/core/radio-group"; -import { TextField } from "@/registry/ui/default/core/text-field"; - -type Type = "modal" | "drawer" | "popover"; - -export default function Demo() { - const [type, setType] = React.useState("modal"); - const [mobileType, setMobileType] = React.useState("drawer"); - return ( -
      -
      - - - - {({ close }) => ( - <> -
      - - -
      - - - - - - )} -
      -
      -
      -
      - setType(value as Type)} - > - Modal - Drawer - Popover - - setMobileType(value as Type)} - > - Modal - Drawer - Popover - -
      -
      - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { + DialogRoot, + Dialog, + DialogFooter, +} from "@/registry/ui/default/core/dialog"; +import { Radio, RadioGroup } from "@/registry/ui/default/core/radio-group"; +import { TextField } from "@/registry/ui/default/core/text-field"; + +type Type = "modal" | "drawer" | "popover"; + +export default function Demo() { + const [type, setType] = React.useState("modal"); + const [mobileType, setMobileType] = React.useState("drawer"); + return ( +
      +
      + + + + {({ close }) => ( + <> +
      + + +
      + + + + + + )} +
      +
      +
      +
      + setType(value as Type)} + > + Modal + Drawer + Popover + + setMobileType(value as Type)} + > + Modal + Drawer + Popover + +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/dialog/dialog.tsx b/www/src/registry/ui/default/core/dialog/dialog.tsx index 57dc0d2d..b1541f19 100644 --- a/www/src/registry/ui/default/core/dialog/dialog.tsx +++ b/www/src/registry/ui/default/core/dialog/dialog.tsx @@ -1,149 +1,149 @@ -"use client"; - -import * as React from "react"; -import { useSlotId } from "@react-aria/utils"; -import { - composeRenderProps, - DialogContext as AriaDialogContext, - DialogTrigger as AriaDialogTrigger, - Dialog as AriaDialog, - type DialogProps as AriaDialogProps, - type DialogTriggerProps as AriaDialogTriggerProps, - TextContext, -} from "react-aria-components"; -import { Provider } from "react-aria-components"; -import { tv } from "tailwind-variants"; -import { Heading } from "@/registry/ui/default/core/heading"; -import { Overlay, type OverlayProps } from "@/registry/ui/default/core/overlay"; -import { Text } from "@/registry/ui/default/core/text"; - -const dialogStyles = tv({ - slots: { - content: [ - "relative flex max-w-full flex-col rounded-[inherit] p-4 outline-none", - "group-data-[type=modal]/overlay:p-6", - "group-data-[type=drawer]/overlay:pt-0", - ], - header: "mb-4", - footer: "flex flex-col-reverse gap-2 pt-4 sm:flex-row sm:justify-end", - inset: - "-mx-4 px-4 py-4 group-data-[type=modal]/overlay:-mx-6 group-data-[type=modal]/overlay:px-6", - }, -}); - -type DialogRootProps = AriaDialogTriggerProps; -const DialogRoot = (props: DialogRootProps) => { - const descriptionId = useSlotId(); - return ( - - - - ); -}; - -interface DialogProps extends DialogContentProps { - title?: string; - description?: string; - type?: OverlayProps["type"]; - showDismissButton?: OverlayProps["showDismissButton"]; - mobileType?: OverlayProps["mobileType"]; - mediaQuery?: OverlayProps["mediaQuery"]; - isDismissable?: boolean; - placement?: OverlayProps["placement"]; -} -const Dialog = ({ - title, - description, - type = "modal", - mobileType = "drawer", - mediaQuery, - isDismissable: isDismissableProp, - showDismissButton, - placement, - ...props -}: DialogProps) => { - const isDismissable = - isDismissableProp ?? (props.role === "alertdialog" ? false : true); - return ( - - - {composeRenderProps(props.children, (children) => ( - <> - {(title || description) && ( - - {title && {title}} - {description && {description}} - - )} - {children} - - ))} - - - ); -}; - -type DialogContentProps = AriaDialogProps; -const DialogContent = ({ - children, - className, - ...props -}: DialogContentProps) => { - const { content } = dialogStyles(); - return ( - - {children} - - ); -}; - -type DialogHeaderProps = React.ComponentProps<"header">; -const DialogHeader = ({ children, className, ...props }: DialogHeaderProps) => { - const { header } = dialogStyles(); - return ( -
      - {children} -
      - ); -}; - -type DialogFooterProps = React.ComponentProps<"footer">; -const DialogFooter = ({ className, ...props }: DialogFooterProps) => { - const { footer } = dialogStyles(); - return
      ; -}; - -type DialogInsetProps = React.ComponentProps<"div">; -const DialogInset = ({ className, ...props }: DialogInsetProps) => { - const { inset } = dialogStyles(); - return
      ; -}; - -export type { - DialogRootProps, - DialogProps, - DialogContentProps, - DialogHeaderProps, - DialogFooterProps, - DialogInsetProps, -}; -export { - DialogRoot, - DialogContent, - Dialog, - DialogHeader, - DialogFooter, - DialogInset, -}; +"use client"; + +import * as React from "react"; +import { useSlotId } from "@react-aria/utils"; +import { + composeRenderProps, + DialogContext as AriaDialogContext, + DialogTrigger as AriaDialogTrigger, + Dialog as AriaDialog, + type DialogProps as AriaDialogProps, + type DialogTriggerProps as AriaDialogTriggerProps, + TextContext, +} from "react-aria-components"; +import { Provider } from "react-aria-components"; +import { tv } from "tailwind-variants"; +import { Heading } from "@/registry/ui/default/core/heading"; +import { Overlay, type OverlayProps } from "@/registry/ui/default/core/overlay"; +import { Text } from "@/registry/ui/default/core/text"; + +const dialogStyles = tv({ + slots: { + content: [ + "relative flex max-w-full flex-col rounded-[inherit] p-4 outline-none", + "group-data-[type=modal]/overlay:p-6", + "group-data-[type=drawer]/overlay:pt-0", + ], + header: "mb-4", + footer: "flex flex-col-reverse gap-2 pt-4 sm:flex-row sm:justify-end", + inset: + "-mx-4 px-4 py-4 group-data-[type=modal]/overlay:-mx-6 group-data-[type=modal]/overlay:px-6", + }, +}); + +type DialogRootProps = AriaDialogTriggerProps; +const DialogRoot = (props: DialogRootProps) => { + const descriptionId = useSlotId(); + return ( + + + + ); +}; + +interface DialogProps extends DialogContentProps { + title?: string; + description?: string; + type?: OverlayProps["type"]; + showDismissButton?: OverlayProps["showDismissButton"]; + mobileType?: OverlayProps["mobileType"]; + mediaQuery?: OverlayProps["mediaQuery"]; + isDismissable?: boolean; + placement?: OverlayProps["placement"]; +} +const Dialog = ({ + title, + description, + type = "modal", + mobileType = "drawer", + mediaQuery, + isDismissable: isDismissableProp, + showDismissButton, + placement, + ...props +}: DialogProps) => { + const isDismissable = + isDismissableProp ?? (props.role === "alertdialog" ? false : true); + return ( + + + {composeRenderProps(props.children, (children) => ( + <> + {(title || description) && ( + + {title && {title}} + {description && {description}} + + )} + {children} + + ))} + + + ); +}; + +type DialogContentProps = AriaDialogProps; +const DialogContent = ({ + children, + className, + ...props +}: DialogContentProps) => { + const { content } = dialogStyles(); + return ( + + {children} + + ); +}; + +type DialogHeaderProps = React.ComponentProps<"header">; +const DialogHeader = ({ children, className, ...props }: DialogHeaderProps) => { + const { header } = dialogStyles(); + return ( +
      + {children} +
      + ); +}; + +type DialogFooterProps = React.ComponentProps<"footer">; +const DialogFooter = ({ className, ...props }: DialogFooterProps) => { + const { footer } = dialogStyles(); + return
      ; +}; + +type DialogInsetProps = React.ComponentProps<"div">; +const DialogInset = ({ className, ...props }: DialogInsetProps) => { + const { inset } = dialogStyles(); + return
      ; +}; + +export type { + DialogRootProps, + DialogProps, + DialogContentProps, + DialogHeaderProps, + DialogFooterProps, + DialogInsetProps, +}; +export { + DialogRoot, + DialogContent, + Dialog, + DialogHeader, + DialogFooter, + DialogInset, +}; diff --git a/www/src/registry/ui/default/core/dialog/index.ts b/www/src/registry/ui/default/core/dialog/index.ts index e5c28748..c46c044f 100644 --- a/www/src/registry/ui/default/core/dialog/index.ts +++ b/www/src/registry/ui/default/core/dialog/index.ts @@ -1 +1 @@ -export * from "./dialog"; +export * from "./dialog"; diff --git a/www/src/registry/ui/default/core/drop-zone/demos/default.tsx b/www/src/registry/ui/default/core/drop-zone/demos/default.tsx index c26779f5..32625f9c 100644 --- a/www/src/registry/ui/default/core/drop-zone/demos/default.tsx +++ b/www/src/registry/ui/default/core/drop-zone/demos/default.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import { DropZone } from "@/registry/ui/default/core/drop-zone"; -import { UploadIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - ); -} +import React from "react"; +import { DropZone } from "@/registry/ui/default/core/drop-zone"; +import { UploadIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + ); +} diff --git a/www/src/registry/ui/default/core/drop-zone/demos/disabled.tsx b/www/src/registry/ui/default/core/drop-zone/demos/disabled.tsx index 1e4af2c3..a9668731 100644 --- a/www/src/registry/ui/default/core/drop-zone/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/drop-zone/demos/disabled.tsx @@ -1,13 +1,13 @@ -import React from "react"; -import { DropZone } from "@/registry/ui/default/core/drop-zone"; -import { Text } from "@/registry/ui/default/core/text"; -import { UploadIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - Drag and drop files here - - ); -} +import React from "react"; +import { DropZone } from "@/registry/ui/default/core/drop-zone"; +import { Text } from "@/registry/ui/default/core/text"; +import { UploadIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + Drag and drop files here + + ); +} diff --git a/www/src/registry/ui/default/core/drop-zone/demos/file-trigger.tsx b/www/src/registry/ui/default/core/drop-zone/demos/file-trigger.tsx index 786a52cd..61a01a5c 100644 --- a/www/src/registry/ui/default/core/drop-zone/demos/file-trigger.tsx +++ b/www/src/registry/ui/default/core/drop-zone/demos/file-trigger.tsx @@ -1,18 +1,18 @@ -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { DropZone } from "@/registry/ui/default/core/drop-zone"; -import { FileTrigger } from "@/registry/ui/default/core/file-trigger"; -import { Text } from "@/registry/ui/default/core/text"; -import { UploadIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - Drag and drop files here - - - - - ); -} +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { DropZone } from "@/registry/ui/default/core/drop-zone"; +import { FileTrigger } from "@/registry/ui/default/core/file-trigger"; +import { Text } from "@/registry/ui/default/core/text"; +import { UploadIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + Drag and drop files here + + + + + ); +} diff --git a/www/src/registry/ui/default/core/drop-zone/demos/label.tsx b/www/src/registry/ui/default/core/drop-zone/demos/label.tsx index 521b756b..75e83b8b 100644 --- a/www/src/registry/ui/default/core/drop-zone/demos/label.tsx +++ b/www/src/registry/ui/default/core/drop-zone/demos/label.tsx @@ -1,20 +1,20 @@ -"use client"; - -import React from "react"; -import { DropZone } from "@/registry/ui/default/core/drop-zone"; -import { Text } from "@/registry/ui/default/core/text"; -import { UploadIcon } from "@/__icons__"; - -export default function Demo() { - return ( -
      - - - - - - Drag and drop files here - -
      - ); -} +"use client"; + +import React from "react"; +import { DropZone } from "@/registry/ui/default/core/drop-zone"; +import { Text } from "@/registry/ui/default/core/text"; +import { UploadIcon } from "@/__icons__"; + +export default function Demo() { + return ( +
      + + + + + + Drag and drop files here + +
      + ); +} diff --git a/www/src/registry/ui/default/core/drop-zone/drop-zone.tsx b/www/src/registry/ui/default/core/drop-zone/drop-zone.tsx index ed977a03..41515a1e 100644 --- a/www/src/registry/ui/default/core/drop-zone/drop-zone.tsx +++ b/www/src/registry/ui/default/core/drop-zone/drop-zone.tsx @@ -1,32 +1,32 @@ -"use client"; - -import * as React from "react"; -import { - composeRenderProps, - DropZone as AriaDropZone, - type DropZoneProps as AriaDropZoneProps, -} from "react-aria-components"; -import { tv } from "tailwind-variants"; - -const dropZoneStyles = tv({ - slots: { - root: "drop-target:border-border-focus focus-visible:border-border-focus drop-target:bg-bg-accent-muted disabled:text-fg-disabled disabled:border-border-disabled flex w-60 flex-col items-center justify-center gap-2 rounded-md border-2 border-dashed p-6 text-sm", - label: "text-md font-semibold", - }, -}); - -type DropZoneProps = AriaDropZoneProps; -const DropZone = (props: DropZoneProps) => { - const { root } = dropZoneStyles(); - return ( - - root({ className }) - )} - /> - ); -}; - -export type { DropZoneProps }; -export { DropZone }; +"use client"; + +import * as React from "react"; +import { + composeRenderProps, + DropZone as AriaDropZone, + type DropZoneProps as AriaDropZoneProps, +} from "react-aria-components"; +import { tv } from "tailwind-variants"; + +const dropZoneStyles = tv({ + slots: { + root: "drop-target:border-border-focus focus-visible:border-border-focus drop-target:bg-bg-accent-muted disabled:text-fg-disabled disabled:border-border-disabled flex w-60 flex-col items-center justify-center gap-2 rounded-md border-2 border-dashed p-6 text-sm", + label: "text-md font-semibold", + }, +}); + +type DropZoneProps = AriaDropZoneProps; +const DropZone = (props: DropZoneProps) => { + const { root } = dropZoneStyles(); + return ( + + root({ className }) + )} + /> + ); +}; + +export type { DropZoneProps }; +export { DropZone }; diff --git a/www/src/registry/ui/default/core/drop-zone/index.ts b/www/src/registry/ui/default/core/drop-zone/index.ts index 58528423..d2be61e2 100644 --- a/www/src/registry/ui/default/core/drop-zone/index.ts +++ b/www/src/registry/ui/default/core/drop-zone/index.ts @@ -1 +1 @@ -export * from "./drop-zone"; +export * from "./drop-zone"; diff --git a/www/src/registry/ui/default/core/field/field.tsx b/www/src/registry/ui/default/core/field/field.tsx index 949ea729..dfe34d16 100644 --- a/www/src/registry/ui/default/core/field/field.tsx +++ b/www/src/registry/ui/default/core/field/field.tsx @@ -1,145 +1,145 @@ -"use client"; - -import * as React from "react"; -import { - Label as AriaLabel, - Text as AriaText, - FieldError as AriaFieldError, - FieldErrorContext as AriaFieldErrorContext, - type TextProps as AriaTextProps, - type LabelProps as AriaLabelProps, - type FieldErrorProps as AriaFieldErrorProps, -} from "react-aria-components"; -import { tv } from "tailwind-variants"; -import { AsteriskIcon } from "@/__icons__"; - -const fieldStyles = tv({ - slots: { - root: "flex flex-col items-start gap-2", - label: - "peer-disabled:text-fg-disabled inline-flex items-center gap-px text-sm font-medium leading-none peer-disabled:cursor-not-allowed [&_svg]:size-3", - description: "text-fg-muted text-xs", - fieldError: "text-fg-danger text-xs", - }, -}); - -type LabelProps = AriaLabelProps & { - isRequired?: boolean; - necessityIndicator?: "label" | "icon"; -}; -const Label = ({ - className, - children, - isRequired, - necessityIndicator, - ...props -}: LabelProps) => { - const { label } = fieldStyles(); - const necessityLabel = isRequired ? "(required)" : "(optional)"; - return ( - - {children} - {isRequired && ( - {necessityIndicator === "icon" ? <> : <>} - )} - {(necessityIndicator === "label" || - (necessityIndicator === "icon" && isRequired)) && - " \u200b"} - {necessityIndicator === "label" && ( - {necessityLabel} - )} - {necessityIndicator === "icon" && isRequired && } - - ); -}; - -type DescriptionProps = AriaTextProps; -const Description = ({ className, ...props }: DescriptionProps) => { - const { description } = fieldStyles(); - return ( - - ); -}; - -type FieldErrorProps = Omit & { - className?: string; -}; -const FieldError = ({ className, ...props }: FieldErrorProps) => { - const { fieldError } = fieldStyles(); - return ; -}; - -interface HelpTextProps { - errorMessage?: FieldErrorProps["children"]; - description?: DescriptionProps["children"]; -} -const HelpText = (props: HelpTextProps) => { - const { errorMessage, description } = props; - const validation = React.useContext(AriaFieldErrorContext); - const isErrorMessage = - validation?.isInvalid && - (!!errorMessage || validation.validationErrors.length > 0); - const hasHelpText = !!description || isErrorMessage; - - if (!hasHelpText) return null; - - return isErrorMessage ? ( - {errorMessage} - ) : ( - {description} - ); -}; - -interface FieldProps extends HelpTextProps { - label?: LabelProps["children"]; - isRequired?: LabelProps["isRequired"]; - necessityIndicator?: LabelProps["necessityIndicator"]; - contextualHelp?: React.ReactNode; - children?: React.ReactNode; -} -const Field = (props: FieldProps) => { - const { - children, - label, - isRequired, - necessityIndicator, - contextualHelp, - ...helpTextProps - } = props; - return ( - <> - {label && contextualHelp && ( - - - {contextualHelp} - - )} - {label && !contextualHelp && ( - - )} - {children} - - - ); -}; -Field.displayName = "Field"; - -export type { - LabelProps, - DescriptionProps, - FieldErrorProps, - HelpTextProps, - FieldProps, -}; -export { Label, Description, FieldError, HelpText, Field, fieldStyles }; +"use client"; + +import * as React from "react"; +import { + Label as AriaLabel, + Text as AriaText, + FieldError as AriaFieldError, + FieldErrorContext as AriaFieldErrorContext, + type TextProps as AriaTextProps, + type LabelProps as AriaLabelProps, + type FieldErrorProps as AriaFieldErrorProps, +} from "react-aria-components"; +import { tv } from "tailwind-variants"; +import { AsteriskIcon } from "@/__icons__"; + +const fieldStyles = tv({ + slots: { + root: "flex flex-col items-start gap-2", + label: + "peer-disabled:text-fg-disabled inline-flex items-center gap-px text-sm font-medium leading-none peer-disabled:cursor-not-allowed [&_svg]:size-3", + description: "text-fg-muted text-xs", + fieldError: "text-fg-danger text-xs", + }, +}); + +type LabelProps = AriaLabelProps & { + isRequired?: boolean; + necessityIndicator?: "label" | "icon"; +}; +const Label = ({ + className, + children, + isRequired, + necessityIndicator, + ...props +}: LabelProps) => { + const { label } = fieldStyles(); + const necessityLabel = isRequired ? "(required)" : "(optional)"; + return ( + + {children} + {isRequired && ( + {necessityIndicator === "icon" ? <> : <>} + )} + {(necessityIndicator === "label" || + (necessityIndicator === "icon" && isRequired)) && + " \u200b"} + {necessityIndicator === "label" && ( + {necessityLabel} + )} + {necessityIndicator === "icon" && isRequired && } + + ); +}; + +type DescriptionProps = AriaTextProps; +const Description = ({ className, ...props }: DescriptionProps) => { + const { description } = fieldStyles(); + return ( + + ); +}; + +type FieldErrorProps = Omit & { + className?: string; +}; +const FieldError = ({ className, ...props }: FieldErrorProps) => { + const { fieldError } = fieldStyles(); + return ; +}; + +interface HelpTextProps { + errorMessage?: FieldErrorProps["children"]; + description?: DescriptionProps["children"]; +} +const HelpText = (props: HelpTextProps) => { + const { errorMessage, description } = props; + const validation = React.useContext(AriaFieldErrorContext); + const isErrorMessage = + validation?.isInvalid && + (!!errorMessage || validation.validationErrors.length > 0); + const hasHelpText = !!description || isErrorMessage; + + if (!hasHelpText) return null; + + return isErrorMessage ? ( + {errorMessage} + ) : ( + {description} + ); +}; + +interface FieldProps extends HelpTextProps { + label?: LabelProps["children"]; + isRequired?: LabelProps["isRequired"]; + necessityIndicator?: LabelProps["necessityIndicator"]; + contextualHelp?: React.ReactNode; + children?: React.ReactNode; +} +const Field = (props: FieldProps) => { + const { + children, + label, + isRequired, + necessityIndicator, + contextualHelp, + ...helpTextProps + } = props; + return ( + <> + {label && contextualHelp && ( + + + {contextualHelp} + + )} + {label && !contextualHelp && ( + + )} + {children} + + + ); +}; +Field.displayName = "Field"; + +export type { + LabelProps, + DescriptionProps, + FieldErrorProps, + HelpTextProps, + FieldProps, +}; +export { Label, Description, FieldError, HelpText, Field, fieldStyles }; diff --git a/www/src/registry/ui/default/core/field/index.ts b/www/src/registry/ui/default/core/field/index.ts index 6ef9f38e..bd0f31e2 100644 --- a/www/src/registry/ui/default/core/field/index.ts +++ b/www/src/registry/ui/default/core/field/index.ts @@ -1 +1 @@ -export * from "./field"; +export * from "./field"; diff --git a/www/src/registry/ui/default/core/file-trigger/demos/default.tsx b/www/src/registry/ui/default/core/file-trigger/demos/default.tsx index ee8976a4..f323e0f0 100644 --- a/www/src/registry/ui/default/core/file-trigger/demos/default.tsx +++ b/www/src/registry/ui/default/core/file-trigger/demos/default.tsx @@ -1,30 +1,30 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { FileTrigger } from "@/registry/ui/default/core/file-trigger"; -import { UploadIcon } from "@/__icons__"; - -export default function FileTriggerDemo() { - const [file, setFile] = React.useState(null); - return ( -
      - { - if (e) { - const files = Array.from(e); - setFile(files[0].name); - } - }} - allowsMultiple - > - - - {file && ( -

      - You selected {file} -

      - )} -
      - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { FileTrigger } from "@/registry/ui/default/core/file-trigger"; +import { UploadIcon } from "@/__icons__"; + +export default function FileTriggerDemo() { + const [file, setFile] = React.useState(null); + return ( +
      + { + if (e) { + const files = Array.from(e); + setFile(files[0].name); + } + }} + allowsMultiple + > + + + {file && ( +

      + You selected {file} +

      + )} +
      + ); +} diff --git a/www/src/registry/ui/default/core/file-trigger/demos/directory-selection.tsx b/www/src/registry/ui/default/core/file-trigger/demos/directory-selection.tsx index 30207d23..d0dfaa8f 100644 --- a/www/src/registry/ui/default/core/file-trigger/demos/directory-selection.tsx +++ b/www/src/registry/ui/default/core/file-trigger/demos/directory-selection.tsx @@ -1,33 +1,33 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { FileTrigger } from "@/registry/ui/default/core/file-trigger"; -import { UploadIcon } from "@/__icons__"; - -export default function FileTriggerDemo() { - const [files, setFiles] = React.useState(null); - return ( -
      - { - if (e) { - const files = Array.from(e); - const filenames = files.map((file) => file.name); - setFiles(filenames); - } - }} - > - - - {files && ( -
        - {files.map((file, index) => ( -
      • {file}
      • - ))} -
      - )} -
      - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { FileTrigger } from "@/registry/ui/default/core/file-trigger"; +import { UploadIcon } from "@/__icons__"; + +export default function FileTriggerDemo() { + const [files, setFiles] = React.useState(null); + return ( +
      + { + if (e) { + const files = Array.from(e); + const filenames = files.map((file) => file.name); + setFiles(filenames); + } + }} + > + + + {files && ( +
        + {files.map((file, index) => ( +
      • {file}
      • + ))} +
      + )} +
      + ); +} diff --git a/www/src/registry/ui/default/core/file-trigger/demos/file-types.tsx b/www/src/registry/ui/default/core/file-trigger/demos/file-types.tsx index 1ee6b42c..b60a3431 100644 --- a/www/src/registry/ui/default/core/file-trigger/demos/file-types.tsx +++ b/www/src/registry/ui/default/core/file-trigger/demos/file-types.tsx @@ -1,12 +1,12 @@ -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { FileTrigger } from "@/registry/ui/default/core/file-trigger"; -import { UploadIcon } from "@/__icons__"; - -export default function FileTriggerDemo() { - return ( - - - - ); -} +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { FileTrigger } from "@/registry/ui/default/core/file-trigger"; +import { UploadIcon } from "@/__icons__"; + +export default function FileTriggerDemo() { + return ( + + + + ); +} diff --git a/www/src/registry/ui/default/core/file-trigger/demos/media-capture.tsx b/www/src/registry/ui/default/core/file-trigger/demos/media-capture.tsx index dc4c33a9..edde76cd 100644 --- a/www/src/registry/ui/default/core/file-trigger/demos/media-capture.tsx +++ b/www/src/registry/ui/default/core/file-trigger/demos/media-capture.tsx @@ -1,12 +1,12 @@ -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { FileTrigger } from "@/registry/ui/default/core/file-trigger"; -import { CameraIcon } from "@/__icons__"; - -export default function FileTriggerDemo() { - return ( - - - - ); -} +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { FileTrigger } from "@/registry/ui/default/core/file-trigger"; +import { CameraIcon } from "@/__icons__"; + +export default function FileTriggerDemo() { + return ( + + + + ); +} diff --git a/www/src/registry/ui/default/core/file-trigger/demos/multiple-files.tsx b/www/src/registry/ui/default/core/file-trigger/demos/multiple-files.tsx index a986f60f..d87bd369 100644 --- a/www/src/registry/ui/default/core/file-trigger/demos/multiple-files.tsx +++ b/www/src/registry/ui/default/core/file-trigger/demos/multiple-files.tsx @@ -1,31 +1,31 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { FileTrigger } from "@/registry/ui/default/core/file-trigger"; -import { UploadIcon } from "@/__icons__"; - -export default function FileTriggerDemo() { - const [files, setFiles] = React.useState(null); - return ( -
      - { - if (e) { - const files = Array.from(e); - const filenames = files.map((file) => file.name); - setFiles(filenames); - } - }} - allowsMultiple - > - - - {files && ( -

      - You selected {files.join(", ")} -

      - )} -
      - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { FileTrigger } from "@/registry/ui/default/core/file-trigger"; +import { UploadIcon } from "@/__icons__"; + +export default function FileTriggerDemo() { + const [files, setFiles] = React.useState(null); + return ( +
      + { + if (e) { + const files = Array.from(e); + const filenames = files.map((file) => file.name); + setFiles(filenames); + } + }} + allowsMultiple + > + + + {files && ( +

      + You selected {files.join(", ")} +

      + )} +
      + ); +} diff --git a/www/src/registry/ui/default/core/file-trigger/file-trigger.tsx b/www/src/registry/ui/default/core/file-trigger/file-trigger.tsx index 829a08f3..8cfe1bf2 100644 --- a/www/src/registry/ui/default/core/file-trigger/file-trigger.tsx +++ b/www/src/registry/ui/default/core/file-trigger/file-trigger.tsx @@ -1,6 +1,6 @@ -"use client"; - -import { FileTrigger, type FileTriggerProps } from "react-aria-components"; - -export type { FileTriggerProps }; -export { FileTrigger }; +"use client"; + +import { FileTrigger, type FileTriggerProps } from "react-aria-components"; + +export type { FileTriggerProps }; +export { FileTrigger }; diff --git a/www/src/registry/ui/default/core/file-trigger/index.ts b/www/src/registry/ui/default/core/file-trigger/index.ts index 49fda3a2..dd60bff2 100644 --- a/www/src/registry/ui/default/core/file-trigger/index.ts +++ b/www/src/registry/ui/default/core/file-trigger/index.ts @@ -1 +1 @@ -export * from "./file-trigger"; +export * from "./file-trigger"; diff --git a/www/src/registry/ui/default/core/group/group.tsx b/www/src/registry/ui/default/core/group/group.tsx index 4c29fbb6..9737ea7a 100644 --- a/www/src/registry/ui/default/core/group/group.tsx +++ b/www/src/registry/ui/default/core/group/group.tsx @@ -1,6 +1,6 @@ -"use client"; - -import { Group, type GroupProps } from "react-aria-components"; - -export type { GroupProps }; -export { Group }; +"use client"; + +import { Group, type GroupProps } from "react-aria-components"; + +export type { GroupProps }; +export { Group }; diff --git a/www/src/registry/ui/default/core/group/index.ts b/www/src/registry/ui/default/core/group/index.ts index 7cd52db8..407d03ab 100644 --- a/www/src/registry/ui/default/core/group/index.ts +++ b/www/src/registry/ui/default/core/group/index.ts @@ -1 +1 @@ -export * from "./group"; +export * from "./group"; diff --git a/www/src/registry/ui/default/core/heading/heading.tsx b/www/src/registry/ui/default/core/heading/heading.tsx index 7e00867c..308453eb 100644 --- a/www/src/registry/ui/default/core/heading/heading.tsx +++ b/www/src/registry/ui/default/core/heading/heading.tsx @@ -1,19 +1,19 @@ -"use client"; - -import { - Heading as AriaHeading, - type HeadingProps as AriaHeadingProps, -} from "react-aria-components"; -import { tv } from "tailwind-variants"; - -const headingStyles = tv({ - base: "text-lg font-medium", -}); - -type HeadingProps = AriaHeadingProps; -const Heading = ({ className, ...props }: HeadingProps) => { - return ; -}; - -export type { HeadingProps }; -export { Heading }; +"use client"; + +import { + Heading as AriaHeading, + type HeadingProps as AriaHeadingProps, +} from "react-aria-components"; +import { tv } from "tailwind-variants"; + +const headingStyles = tv({ + base: "text-lg font-medium", +}); + +type HeadingProps = AriaHeadingProps; +const Heading = ({ className, ...props }: HeadingProps) => { + return ; +}; + +export type { HeadingProps }; +export { Heading }; diff --git a/www/src/registry/ui/default/core/heading/index.ts b/www/src/registry/ui/default/core/heading/index.ts index ec9f8471..0ae5089d 100644 --- a/www/src/registry/ui/default/core/heading/index.ts +++ b/www/src/registry/ui/default/core/heading/index.ts @@ -1 +1 @@ -export * from "./heading"; +export * from "./heading"; diff --git a/www/src/registry/ui/default/core/input/index.ts b/www/src/registry/ui/default/core/input/index.ts index 4ce4a889..2838d4c4 100644 --- a/www/src/registry/ui/default/core/input/index.ts +++ b/www/src/registry/ui/default/core/input/index.ts @@ -1 +1 @@ -export * from "./input"; +export * from "./input"; diff --git a/www/src/registry/ui/default/core/input/input.tsx b/www/src/registry/ui/default/core/input/input.tsx index 63065b09..82fdd50c 100644 --- a/www/src/registry/ui/default/core/input/input.tsx +++ b/www/src/registry/ui/default/core/input/input.tsx @@ -1,212 +1,212 @@ -"use client"; - -import * as React from "react"; -import { mergeRefs, chain } from "@react-aria/utils"; -import { useControlledState } from "@react-stately/utils"; -import { - Provider, - composeRenderProps, - Input as AriaInput, - Group as AriaGroup, - TextArea as AriaTextArea, - InputContext as AriaInputContext, - TextAreaContext as AriaTextAreaContext, - type TextAreaProps as AriaTextAreaProps, - type GroupProps as AriaGroupProps, - type InputProps as AriaInputProps, - useSlottedContext, -} from "react-aria-components"; -import { tv, type VariantProps } from "tailwind-variants"; -import { focusInput } from "@/registry/ui/default/lib/focus-styles"; -import { LoaderIcon } from "@/__icons__"; - -const inputStyles = tv({ - slots: { - root: [ - focusInput(), - "border-border-field bg-bg text-fg-muted inline-flex w-full cursor-text items-center justify-start gap-2 rounded-md border px-2 text-base shadow-sm transition-colors sm:text-sm [&_svg]:size-4", - "disabled:border-border-disabled disabled:bg-bg-disabled disabled:text-fg-disabled disabled:cursor-default", - "invalid:border-border-danger focus-within:invalid:border-border", - ], - input: [ - "text-fg placeholder:text-fg-muted disabled:text-fg-disabled h-full w-full bg-transparent outline-none disabled:cursor-default", - ], - }, - variants: { - size: { - sm: { root: "h-8" }, - md: { root: "h-9" }, - lg: { root: "h-10" }, - }, - multiline: { - true: { - root: "h-auto flex-col items-stretch p-2", - input: "min-h-14 resize-none overflow-auto", - }, - false: { - input: "flex-1", - }, - }, - }, - defaultVariants: { - size: "md", - multiline: false, - }, -}); - -interface TextAreaInputProps extends Omit { - className?: string; -} -const TextAreaInput = React.forwardRef( - ({ className, onChange, rows = 1, ...props }, forwardedRef) => { - const { input } = inputStyles({ multiline: true }); - const [inputValue, setInputValue] = useControlledState( - props.value, - props.defaultValue ?? "", - () => { - // Do nothing - } - ); - const inputRef = React.useRef(null); - - const onHeightChange = React.useCallback(() => { - if (inputRef.current) { - const input = inputRef.current; - const prevAlignment = input.style.alignSelf; - const prevOverflow = input.style.overflow; - const isFirefox = "MozAppearance" in input.style; - if (!isFirefox) { - input.style.overflow = "hidden"; - } - input.style.alignSelf = "start"; - input.style.height = "auto"; - input.style.height = `${ - input.scrollHeight + (input.offsetHeight - input.clientHeight) - }px`; - input.style.overflow = prevOverflow; - input.style.alignSelf = prevAlignment; - } - }, [inputRef]); - - React.useLayoutEffect(() => { - if (inputRef.current) { - onHeightChange(); - } - }, [onHeightChange, inputValue, inputRef]); - - return ( - - ); - } -); -TextAreaInput.displayName = "TextAreaInput"; - -interface InputProps - extends Omit { - className?: string; -} -const Input = React.forwardRef( - ({ className, ...props }, ref) => { - const { input } = inputStyles(); - return ; - } -); -Input.displayName = "Input"; - -interface InputRootProps - extends Omit, - VariantProps { - prefix?: React.ReactNode; - suffix?: React.ReactNode; - isLoading?: boolean; - loaderPosition?: "prefix" | "suffix"; - className?: string; -} -const InputRoot = ({ - className, - prefix, - suffix, - isLoading, - loaderPosition, - size, - multiline, - ...props -}: InputRootProps) => { - const { root } = inputStyles({ size, multiline }); - const inputContext = useSlottedContext(AriaInputContext); - const textAreaContext = useSlottedContext(AriaTextAreaContext); - const inputRef = React.useRef(null); - const isDisabled = - props.isDisabled || inputContext?.disabled || textAreaContext?.disabled; - const isInvalid = - props.isInvalid || - (!!inputContext?.["aria-invalid"] && - inputContext["aria-invalid"] !== "false") || - (!!textAreaContext?.["aria-invalid"] && - textAreaContext["aria-invalid"] !== "false"); - - const handlePointerDown = (event: React.PointerEvent) => { - const target = event.target as HTMLElement; - if (target.closest("input, button, a")) return; - const input = ( - inputRef as React.RefObject - ).current; - if (!input) return; - requestAnimationFrame(() => { - input.focus(); - }); - }; - - return ( - - {composeRenderProps(props.children, (children) => ( - - {isLoading && loaderPosition === "prefix" ? ( - - ) : ( - prefix - )} - {children} - {isLoading && loaderPosition === "suffix" ? ( - - ) : ( - suffix - )} - - ))} - - ); -}; - -export type { InputProps, InputRootProps, TextAreaInputProps }; -export { Input, TextAreaInput, InputRoot, inputStyles }; +"use client"; + +import * as React from "react"; +import { mergeRefs, chain } from "@react-aria/utils"; +import { useControlledState } from "@react-stately/utils"; +import { + Provider, + composeRenderProps, + Input as AriaInput, + Group as AriaGroup, + TextArea as AriaTextArea, + InputContext as AriaInputContext, + TextAreaContext as AriaTextAreaContext, + type TextAreaProps as AriaTextAreaProps, + type GroupProps as AriaGroupProps, + type InputProps as AriaInputProps, + useSlottedContext, +} from "react-aria-components"; +import { tv, type VariantProps } from "tailwind-variants"; +import { focusInput } from "@/registry/ui/default/lib/focus-styles"; +import { LoaderIcon } from "@/__icons__"; + +const inputStyles = tv({ + slots: { + root: [ + focusInput(), + "border-border-field bg-bg text-fg-muted inline-flex w-full cursor-text items-center justify-start gap-2 rounded-md border px-2 text-base shadow-sm transition-colors sm:text-sm [&_svg]:size-4", + "disabled:border-border-disabled disabled:bg-bg-disabled disabled:text-fg-disabled disabled:cursor-default", + "invalid:border-border-danger focus-within:invalid:border-border", + ], + input: [ + "text-fg placeholder:text-fg-muted disabled:text-fg-disabled h-full w-full bg-transparent outline-none disabled:cursor-default", + ], + }, + variants: { + size: { + sm: { root: "h-8" }, + md: { root: "h-9" }, + lg: { root: "h-10" }, + }, + multiline: { + true: { + root: "h-auto flex-col items-stretch p-2", + input: "min-h-14 resize-none overflow-auto", + }, + false: { + input: "flex-1", + }, + }, + }, + defaultVariants: { + size: "md", + multiline: false, + }, +}); + +interface TextAreaInputProps extends Omit { + className?: string; +} +const TextAreaInput = React.forwardRef( + ({ className, onChange, rows = 1, ...props }, forwardedRef) => { + const { input } = inputStyles({ multiline: true }); + const [inputValue, setInputValue] = useControlledState( + props.value, + props.defaultValue ?? "", + () => { + // Do nothing + } + ); + const inputRef = React.useRef(null); + + const onHeightChange = React.useCallback(() => { + if (inputRef.current) { + const input = inputRef.current; + const prevAlignment = input.style.alignSelf; + const prevOverflow = input.style.overflow; + const isFirefox = "MozAppearance" in input.style; + if (!isFirefox) { + input.style.overflow = "hidden"; + } + input.style.alignSelf = "start"; + input.style.height = "auto"; + input.style.height = `${ + input.scrollHeight + (input.offsetHeight - input.clientHeight) + }px`; + input.style.overflow = prevOverflow; + input.style.alignSelf = prevAlignment; + } + }, [inputRef]); + + React.useLayoutEffect(() => { + if (inputRef.current) { + onHeightChange(); + } + }, [onHeightChange, inputValue, inputRef]); + + return ( + + ); + } +); +TextAreaInput.displayName = "TextAreaInput"; + +interface InputProps + extends Omit { + className?: string; +} +const Input = React.forwardRef( + ({ className, ...props }, ref) => { + const { input } = inputStyles(); + return ; + } +); +Input.displayName = "Input"; + +interface InputRootProps + extends Omit, + VariantProps { + prefix?: React.ReactNode; + suffix?: React.ReactNode; + isLoading?: boolean; + loaderPosition?: "prefix" | "suffix"; + className?: string; +} +const InputRoot = ({ + className, + prefix, + suffix, + isLoading, + loaderPosition, + size, + multiline, + ...props +}: InputRootProps) => { + const { root } = inputStyles({ size, multiline }); + const inputContext = useSlottedContext(AriaInputContext); + const textAreaContext = useSlottedContext(AriaTextAreaContext); + const inputRef = React.useRef(null); + const isDisabled = + props.isDisabled || inputContext?.disabled || textAreaContext?.disabled; + const isInvalid = + props.isInvalid || + (!!inputContext?.["aria-invalid"] && + inputContext["aria-invalid"] !== "false") || + (!!textAreaContext?.["aria-invalid"] && + textAreaContext["aria-invalid"] !== "false"); + + const handlePointerDown = (event: React.PointerEvent) => { + const target = event.target as HTMLElement; + if (target.closest("input, button, a")) return; + const input = ( + inputRef as React.RefObject + ).current; + if (!input) return; + requestAnimationFrame(() => { + input.focus(); + }); + }; + + return ( + + {composeRenderProps(props.children, (children) => ( + + {isLoading && loaderPosition === "prefix" ? ( + + ) : ( + prefix + )} + {children} + {isLoading && loaderPosition === "suffix" ? ( + + ) : ( + suffix + )} + + ))} + + ); +}; + +export type { InputProps, InputRootProps, TextAreaInputProps }; +export { Input, TextAreaInput, InputRoot, inputStyles }; diff --git a/www/src/registry/ui/default/core/kbd/index.ts b/www/src/registry/ui/default/core/kbd/index.ts index 064cd1f8..02bd0a38 100644 --- a/www/src/registry/ui/default/core/kbd/index.ts +++ b/www/src/registry/ui/default/core/kbd/index.ts @@ -1 +1 @@ -export * from "./kbd"; +export * from "./kbd"; diff --git a/www/src/registry/ui/default/core/kbd/kbd.tsx b/www/src/registry/ui/default/core/kbd/kbd.tsx index ef02589d..68b05f2f 100644 --- a/www/src/registry/ui/default/core/kbd/kbd.tsx +++ b/www/src/registry/ui/default/core/kbd/kbd.tsx @@ -1,16 +1,16 @@ -"use client"; - -import { Keyboard } from "react-aria-components"; -import { tv } from "tailwind-variants"; - -const KbdStyles = tv({ - base: "text-fg-muted bg-bg border-border-active rounded-md border px-1.5 py-0.5 text-sm tracking-widest", -}); - -type KbdProps = React.HTMLAttributes; -const Kbd = ({ className, ...props }: KbdProps) => { - return ; -}; - -export type { KbdProps }; -export { Kbd, KbdStyles }; +"use client"; + +import { Keyboard } from "react-aria-components"; +import { tv } from "tailwind-variants"; + +const KbdStyles = tv({ + base: "text-fg-muted bg-bg border-border-active rounded-md border px-1.5 py-0.5 text-sm tracking-widest", +}); + +type KbdProps = React.HTMLAttributes; +const Kbd = ({ className, ...props }: KbdProps) => { + return ; +}; + +export type { KbdProps }; +export { Kbd, KbdStyles }; diff --git a/www/src/registry/ui/default/core/link/demos/default.tsx b/www/src/registry/ui/default/core/link/demos/default.tsx index 5a05334b..b813698a 100644 --- a/www/src/registry/ui/default/core/link/demos/default.tsx +++ b/www/src/registry/ui/default/core/link/demos/default.tsx @@ -1,9 +1,9 @@ -import { Link } from "@/registry/ui/default/core/link"; - -export default function Demo() { - return ( - - @mehdibha_ - - ); -} +import { Link } from "@/registry/ui/default/core/link"; + +export default function Demo() { + return ( + + @mehdibha_ + + ); +} diff --git a/www/src/registry/ui/default/core/link/demos/disabled.tsx b/www/src/registry/ui/default/core/link/demos/disabled.tsx index 5083dd59..1d725a24 100644 --- a/www/src/registry/ui/default/core/link/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/link/demos/disabled.tsx @@ -1,9 +1,9 @@ -import { Link } from "@/registry/ui/default/core/link"; - -export default function Demo() { - return ( - - @mehdibha_ - - ); -} +import { Link } from "@/registry/ui/default/core/link"; + +export default function Demo() { + return ( + + @mehdibha_ + + ); +} diff --git a/www/src/registry/ui/default/core/link/demos/icon.tsx b/www/src/registry/ui/default/core/link/demos/icon.tsx index 7e309cdf..f8664d69 100644 --- a/www/src/registry/ui/default/core/link/demos/icon.tsx +++ b/www/src/registry/ui/default/core/link/demos/icon.tsx @@ -1,13 +1,13 @@ -import { Link } from "@/registry/ui/default/core/link"; -import { ExternalLinkIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - Docs{" "} - - - - - ); -} +import { Link } from "@/registry/ui/default/core/link"; +import { ExternalLinkIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + Docs{" "} + + + + + ); +} diff --git a/www/src/registry/ui/default/core/link/demos/variants.tsx b/www/src/registry/ui/default/core/link/demos/variants.tsx index 0e767c24..636994e4 100644 --- a/www/src/registry/ui/default/core/link/demos/variants.tsx +++ b/www/src/registry/ui/default/core/link/demos/variants.tsx @@ -1,21 +1,21 @@ -import { Link } from "@/registry/ui/default/core/link"; - -export default function Demo() { - return ( -
      - {(["accent", "quiet"] as const).map((variant, index) => ( -

      - Follow{" "} - - @mehdibha_ - {" "} - to stay updated on dotUI latest releases. -

      - ))} -
      - ); -} +import { Link } from "@/registry/ui/default/core/link"; + +export default function Demo() { + return ( +
      + {(["accent", "quiet"] as const).map((variant, index) => ( +

      + Follow{" "} + + @mehdibha_ + {" "} + to stay updated on dotUI latest releases. +

      + ))} +
      + ); +} diff --git a/www/src/registry/ui/default/core/link/index.ts b/www/src/registry/ui/default/core/link/index.ts index 6fc151af..eec6e484 100644 --- a/www/src/registry/ui/default/core/link/index.ts +++ b/www/src/registry/ui/default/core/link/index.ts @@ -1 +1 @@ -export * from "./link"; +export * from "./link"; diff --git a/www/src/registry/ui/default/core/link/link.tsx b/www/src/registry/ui/default/core/link/link.tsx index e5443e07..c5ca3d06 100644 --- a/www/src/registry/ui/default/core/link/link.tsx +++ b/www/src/registry/ui/default/core/link/link.tsx @@ -1,40 +1,40 @@ -"use client"; - -import * as React from "react"; -import { - Link as AriaLink, - composeRenderProps, - type LinkProps as AriaLinkProps, -} from "react-aria-components"; -import { tv, type VariantProps } from "tailwind-variants"; -import { focusRing } from "@/registry/ui/default/lib/focus-styles"; - -const linkVariants = tv({ - extend: focusRing, - base: "disabled:text-fg-disabled inline-flex items-center gap-1 transition-colors", - variants: { - variant: { - accent: "text-fg-accent hover:text-[#5e9fe0]", - quiet: "underline underline-offset-2", - }, - }, - defaultVariants: { - variant: "accent", - }, -}); - -interface LinkProps extends AriaLinkProps, VariantProps {} - -const Link = ({ variant, ...props }: LinkProps) => { - return ( - - linkVariants({ variant, className }) - )} - /> - ); -}; - -export type { LinkProps }; -export { Link, linkVariants }; +"use client"; + +import * as React from "react"; +import { + Link as AriaLink, + composeRenderProps, + type LinkProps as AriaLinkProps, +} from "react-aria-components"; +import { tv, type VariantProps } from "tailwind-variants"; +import { focusRing } from "@/registry/ui/default/lib/focus-styles"; + +const linkVariants = tv({ + extend: focusRing, + base: "disabled:text-fg-disabled inline-flex items-center gap-1 transition-colors", + variants: { + variant: { + accent: "text-fg-accent hover:text-[#5e9fe0]", + quiet: "underline underline-offset-2", + }, + }, + defaultVariants: { + variant: "accent", + }, +}); + +interface LinkProps extends AriaLinkProps, VariantProps {} + +const Link = ({ variant, ...props }: LinkProps) => { + return ( + + linkVariants({ variant, className }) + )} + /> + ); +}; + +export type { LinkProps }; +export { Link, linkVariants }; diff --git a/www/src/registry/ui/default/core/list-box/demos/async-loading.tsx b/www/src/registry/ui/default/core/list-box/demos/async-loading.tsx index 8b3eae60..f28086eb 100644 --- a/www/src/registry/ui/default/core/list-box/demos/async-loading.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/async-loading.tsx @@ -1,31 +1,31 @@ -"use client"; - -import { useAsyncList } from "react-stately"; -import { ListBox, Item } from "@/registry/ui/default/core/list-box"; - -interface Character { - name: string; -} - -export default function Demo() { - const list = useAsyncList({ - async load({ signal }) { - const res = await fetch(`https://pokeapi.co/api/v2/pokemon`, { signal }); - const json = (await res.json()) as { results: Character[] }; - return { - items: json.results, - }; - }, - }); - - return ( - - {(item) => {item.name}} - - ); -} +"use client"; + +import { useAsyncList } from "react-stately"; +import { ListBox, Item } from "@/registry/ui/default/core/list-box"; + +interface Character { + name: string; +} + +export default function Demo() { + const list = useAsyncList({ + async load({ signal }) { + const res = await fetch(`https://pokeapi.co/api/v2/pokemon`, { signal }); + const json = (await res.json()) as { results: Character[] }; + return { + items: json.results, + }; + }, + }); + + return ( + + {(item) => {item.name}} + + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/basic.tsx b/www/src/registry/ui/default/core/list-box/demos/basic.tsx index f8939459..93b3b0ee 100644 --- a/www/src/registry/ui/default/core/list-box/demos/basic.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/basic.tsx @@ -1,12 +1,12 @@ -import { ListBox, Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - Next.js - Remix - Astro - Gatsby - - ); -} +import { ListBox, Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + Next.js + Remix + Astro + Gatsby + + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/composition.tsx b/www/src/registry/ui/default/core/list-box/demos/composition.tsx index c32821f8..7e5c0bbc 100644 --- a/www/src/registry/ui/default/core/list-box/demos/composition.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/composition.tsx @@ -1,27 +1,27 @@ -import { ListBox, Item } from "@/registry/ui/default/core/list-box"; -import { Text } from "@/registry/ui/default/core/text"; - -export default function Demo() { - return ( - - - Next.js - - React-based SSR and static site framework. - - - - Remix - - Full-stack framework with efficient data loading. - - - - Astro - - Lightweight static site builder for performance. - - - - ); -} +import { ListBox, Item } from "@/registry/ui/default/core/list-box"; +import { Text } from "@/registry/ui/default/core/text"; + +export default function Demo() { + return ( + + + Next.js + + React-based SSR and static site framework. + + + + Remix + + Full-stack framework with efficient data loading. + + + + Astro + + Lightweight static site builder for performance. + + + + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/contact-list.tsx b/www/src/registry/ui/default/core/list-box/demos/contact-list.tsx index fd8cee81..212605de 100644 --- a/www/src/registry/ui/default/core/list-box/demos/contact-list.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/contact-list.tsx @@ -1,3 +1,3 @@ -export default function Demo() { - return

      demo

      ; -} +export default function Demo() { + return

      demo

      ; +} diff --git a/www/src/registry/ui/default/core/list-box/demos/controlled.tsx b/www/src/registry/ui/default/core/list-box/demos/controlled.tsx index 549bdbd2..549e7f76 100644 --- a/www/src/registry/ui/default/core/list-box/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/controlled.tsx @@ -1,32 +1,32 @@ -"use client"; - -import React from "react"; -import type { Selection } from "react-aria-components"; -import { ListBox, Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - const [selected, setSelected] = React.useState( - new Set(["nextjs", "remix", "astro"]) - ); - return ( -
      - - Next.js - Remix - Astro - Gatsby - -

      - Selected items:{" "} - - {selected === "all" ? "all" : Array.from(selected).join(", ")} - -

      -
      - ); -} +"use client"; + +import React from "react"; +import type { Selection } from "react-aria-components"; +import { ListBox, Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + const [selected, setSelected] = React.useState( + new Set(["nextjs", "remix", "astro"]) + ); + return ( +
      + + Next.js + Remix + Astro + Gatsby + +

      + Selected items:{" "} + + {selected === "all" ? "all" : Array.from(selected).join(", ")} + +

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/disabled-items.tsx b/www/src/registry/ui/default/core/list-box/demos/disabled-items.tsx index ce69403f..2de06fc2 100644 --- a/www/src/registry/ui/default/core/list-box/demos/disabled-items.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/disabled-items.tsx @@ -1,12 +1,12 @@ -import { ListBox, Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - Next.js - Remix - Gatsby - Astro - - ); -} +import { ListBox, Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + Next.js + Remix + Gatsby + Astro + + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/empty-state.tsx b/www/src/registry/ui/default/core/list-box/demos/empty-state.tsx index 92c4092b..1b96cfc6 100644 --- a/www/src/registry/ui/default/core/list-box/demos/empty-state.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/empty-state.tsx @@ -1,12 +1,12 @@ -"use client"; - -import { ListBox } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - "No results found."} - > - ); -} +"use client"; + +import { ListBox } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + "No results found."} + > + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/grid.tsx b/www/src/registry/ui/default/core/list-box/demos/grid.tsx index 64b8ae63..a750950f 100644 --- a/www/src/registry/ui/default/core/list-box/demos/grid.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/grid.tsx @@ -1,12 +1,12 @@ -import { ListBox, Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - Next.js - Remix - Astro - Gatsby - - ); -} +import { ListBox, Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + Next.js + Remix + Astro + Gatsby + + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/horizontal.tsx b/www/src/registry/ui/default/core/list-box/demos/horizontal.tsx index ada8af83..2f429864 100644 --- a/www/src/registry/ui/default/core/list-box/demos/horizontal.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/horizontal.tsx @@ -1,15 +1,15 @@ -import { ListBox, Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - - - - - ); -} +import { ListBox, Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + + + + + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/image-grid.tsx b/www/src/registry/ui/default/core/list-box/demos/image-grid.tsx index fd8cee81..212605de 100644 --- a/www/src/registry/ui/default/core/list-box/demos/image-grid.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/image-grid.tsx @@ -1,3 +1,3 @@ -export default function Demo() { - return

      demo

      ; -} +export default function Demo() { + return

      demo

      ; +} diff --git a/www/src/registry/ui/default/core/list-box/demos/item-variant.tsx b/www/src/registry/ui/default/core/list-box/demos/item-variant.tsx index a59027be..8f6a5d42 100644 --- a/www/src/registry/ui/default/core/list-box/demos/item-variant.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/item-variant.tsx @@ -1,12 +1,12 @@ -import { Item, ListBox } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - View logs - Manage domains - Transfer project - Delete project - - ); -} +import { Item, ListBox } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + View logs + Manage domains + Transfer project + Delete project + + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/label-and-description.tsx b/www/src/registry/ui/default/core/list-box/demos/label-and-description.tsx index f2701a78..3dea25a7 100644 --- a/www/src/registry/ui/default/core/list-box/demos/label-and-description.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/label-and-description.tsx @@ -1,18 +1,18 @@ -import { ListBox, Item } from "@/registry/ui/default/core/list-box"; -import { Section } from "@/registry/ui/default/core/section"; - -export default function Demo() { - return ( - -
      - - - -
      -
      - ); -} +import { ListBox, Item } from "@/registry/ui/default/core/list-box"; +import { Section } from "@/registry/ui/default/core/section"; + +export default function Demo() { + return ( + +
      + + + +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/links.tsx b/www/src/registry/ui/default/core/list-box/demos/links.tsx index baf69cd6..e949093c 100644 --- a/www/src/registry/ui/default/core/list-box/demos/links.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/links.tsx @@ -1,30 +1,30 @@ -import { DiscordIcon, GitHubIcon, TwitterIcon } from "@/components/icons"; -import { ListBox, Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - } - > - GitHub - - } - > - Discord - - } - > - X - - - ); -} +import { DiscordIcon, GitHubIcon, TwitterIcon } from "@/components/icons"; +import { ListBox, Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + } + > + GitHub + + } + > + Discord + + } + > + X + + + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/loading.tsx b/www/src/registry/ui/default/core/list-box/demos/loading.tsx index f8f1318e..9529b160 100644 --- a/www/src/registry/ui/default/core/list-box/demos/loading.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/loading.tsx @@ -1,11 +1,11 @@ -import { ListBox, Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - User 1 - User 2 - User 3 - - ); -} +import { ListBox, Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + User 1 + User 2 + User 3 + + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/prefix-and-suffix.tsx b/www/src/registry/ui/default/core/list-box/demos/prefix-and-suffix.tsx index 36fbfcab..53ab3842 100644 --- a/www/src/registry/ui/default/core/list-box/demos/prefix-and-suffix.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/prefix-and-suffix.tsx @@ -1,24 +1,24 @@ -import { ListBox, Item } from "@/registry/ui/default/core/list-box"; -import { SquarePenIcon, PlusSquareIcon, CopyIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - } - /> - } - /> - } - /> - - ); -} +import { ListBox, Item } from "@/registry/ui/default/core/list-box"; +import { SquarePenIcon, PlusSquareIcon, CopyIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + } + /> + } + /> + } + /> + + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/sections.tsx b/www/src/registry/ui/default/core/list-box/demos/sections.tsx index 8aed7646..83919a21 100644 --- a/www/src/registry/ui/default/core/list-box/demos/sections.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/sections.tsx @@ -1,25 +1,25 @@ -import { ListBox, Item } from "@/registry/ui/default/core/list-box"; -import { Section } from "@/registry/ui/default/core/section"; - -export default function Demo() { - return ( - -
      - Signature sauce - BBQ sauce - Honey mustard - Tartar sauce -
      -
      - Pepperjack - Mozzarella - Blue cheese -
      -
      - Bacon - Sauteed onions - Green pepper -
      -
      - ); -} +import { ListBox, Item } from "@/registry/ui/default/core/list-box"; +import { Section } from "@/registry/ui/default/core/section"; + +export default function Demo() { + return ( + +
      + Signature sauce + BBQ sauce + Honey mustard + Tartar sauce +
      +
      + Pepperjack + Mozzarella + Blue cheese +
      +
      + Bacon + Sauteed onions + Green pepper +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/selection-behavior.tsx b/www/src/registry/ui/default/core/list-box/demos/selection-behavior.tsx index 0cb78c62..54635f8f 100644 --- a/www/src/registry/ui/default/core/list-box/demos/selection-behavior.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/selection-behavior.tsx @@ -1,16 +1,16 @@ -import { ListBox, Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - Next.js - Remix - Astro - Gatsby - - ); -} +import { ListBox, Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + Next.js + Remix + Astro + Gatsby + + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/selection-mode.tsx b/www/src/registry/ui/default/core/list-box/demos/selection-mode.tsx index 36ffd58d..7223da5c 100644 --- a/www/src/registry/ui/default/core/list-box/demos/selection-mode.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/selection-mode.tsx @@ -1,20 +1,20 @@ -import { ListBox, Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( -
      - - Next.js - Remix - Astro - Gatsby - - - Next.js - Remix - Astro - Gatsby - -
      - ); -} +import { ListBox, Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( +
      + + Next.js + Remix + Astro + Gatsby + + + Next.js + Remix + Astro + Gatsby + +
      + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/separator.tsx b/www/src/registry/ui/default/core/list-box/demos/separator.tsx index bbfd47f0..88a8c1aa 100644 --- a/www/src/registry/ui/default/core/list-box/demos/separator.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/separator.tsx @@ -1,18 +1,18 @@ -import { ListBox, Item } from "@/registry/ui/default/core/list-box"; -import { Separator } from "@/registry/ui/default/core/separator"; - -export default function Demo() { - return ( - - New... - Badges - - Save - Save as... - Rename... - - Page setup… - Print… - - ); -} +import { ListBox, Item } from "@/registry/ui/default/core/list-box"; +import { Separator } from "@/registry/ui/default/core/separator"; + +export default function Demo() { + return ( + + New... + Badges + + Save + Save as... + Rename... + + Page setup… + Print… + + ); +} diff --git a/www/src/registry/ui/default/core/list-box/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/list-box/demos/uncontrolled.tsx index df9c1583..877a07e3 100644 --- a/www/src/registry/ui/default/core/list-box/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/list-box/demos/uncontrolled.tsx @@ -1,16 +1,16 @@ -import { ListBox, Item } from "@/registry/ui/default/core/list-box"; - -export default function Demo() { - return ( - - Next.js - Remix - Astro - Gatsby - - ); -} +import { ListBox, Item } from "@/registry/ui/default/core/list-box"; + +export default function Demo() { + return ( + + Next.js + Remix + Astro + Gatsby + + ); +} diff --git a/www/src/registry/ui/default/core/list-box/index.ts b/www/src/registry/ui/default/core/list-box/index.ts index 6f202035..97ed4aa4 100644 --- a/www/src/registry/ui/default/core/list-box/index.ts +++ b/www/src/registry/ui/default/core/list-box/index.ts @@ -1 +1 @@ -export * from "./list-box"; +export * from "./list-box"; diff --git a/www/src/registry/ui/default/core/list-box/list-box.tsx b/www/src/registry/ui/default/core/list-box/list-box.tsx index 77437481..87cf1efb 100644 --- a/www/src/registry/ui/default/core/list-box/list-box.tsx +++ b/www/src/registry/ui/default/core/list-box/list-box.tsx @@ -1,137 +1,137 @@ -"use client"; - -import React from "react"; -import { - composeRenderProps, - ListBox as AriaListBox, - ListBoxItem as AriaListBoxItem, - Collection as AriaCollection, - type ListBoxProps as AriaListBoxProps, - type ListBoxItemProps as AriaListBoxItemProps, - ListStateContext, -} from "react-aria-components"; -import { tv, type VariantProps } from "tailwind-variants"; -import { Text } from "@/registry/ui/default/core/text"; -import { focusRing } from "@/registry/ui/default/lib/focus-styles"; -import { CheckIcon, LoaderIcon } from "@/__icons__"; - -const listBoxStyles = tv({ - base: [ - focusRing(), - "orientation-horizontal:flex-row orientation-horizontal:w-auto layout-grid:grid layout-grid:grid-cols-2 layout-grid:w-auto empty:text-fg-muted flex flex-col overflow-auto p-1 outline-none empty:min-h-24 empty:items-center empty:justify-center empty:text-sm empty:italic", - "[&_.separator]:-mx-1 [&_.separator]:my-1 [&_.separator]:w-auto", - ], - variants: { - standalone: { - true: "bg-bg max-h-60 w-48 overflow-y-auto rounded-md border", - false: "max-h-[inherit] rounded-[inherit]", - }, - }, -}); - -const listBoxItemStyles = tv({ - base: [ - "disabled:pointer-default hover:bg-bg-inverse/10 focus:bg-bg-inverse/10 pressed:bg-bg-inverse/15 disabled:text-fg-disabled flex cursor-pointer items-center rounded-sm px-3 py-1.5 text-sm outline-none transition-colors disabled:cursor-default", - "selection-single:pl-0 selection-multiple:pl-0", - "[&_svg]:size-4", - ], - variants: { - variant: { - default: "text-fg", - success: "text-fg-success", - warning: "text-fg-warning", - accent: "text-fg-accent", - danger: "text-fg-danger", - }, - }, - defaultVariants: { - variant: "default", - }, -}); - -interface ListBoxProps extends AriaListBoxProps { - isLoading?: boolean; -} -const ListBox = ({ - children, - isLoading, - ...props -}: ListBoxProps) => { - const state = React.useContext(ListStateContext); - const standalone = !state; - return ( - - listBoxStyles({ standalone, className }) - )} - > - {children} - {isLoading && ( - - - - )} - - ); -}; - -interface ItemProps - extends AriaListBoxItemProps, - VariantProps { - label?: string; - description?: string; - prefix?: React.ReactNode; - suffix?: React.ReactNode; -} -const Item = ({ - variant, - label, - description, - prefix, - suffix, - ...props -}: ItemProps) => { - const textValue = - props.textValue || - (typeof props.children === "string" ? props.children : undefined); - return ( - - listBoxItemStyles({ variant, className }) - )} - > - {composeRenderProps( - props.children, - (children, { isSelected, selectionMode }) => ( - <> - {selectionMode !== "none" && ( - - {isSelected && ( - - )} - - )} - - {prefix} - - {label && {label}} - {description && {description}} - {children} - - {suffix} - - - ) - )} - - ); -}; - -export type { ListBoxProps, ItemProps }; -export { ListBox, Item }; +"use client"; + +import React from "react"; +import { + composeRenderProps, + ListBox as AriaListBox, + ListBoxItem as AriaListBoxItem, + Collection as AriaCollection, + type ListBoxProps as AriaListBoxProps, + type ListBoxItemProps as AriaListBoxItemProps, + ListStateContext, +} from "react-aria-components"; +import { tv, type VariantProps } from "tailwind-variants"; +import { Text } from "@/registry/ui/default/core/text"; +import { focusRing } from "@/registry/ui/default/lib/focus-styles"; +import { CheckIcon, LoaderIcon } from "@/__icons__"; + +const listBoxStyles = tv({ + base: [ + focusRing(), + "orientation-horizontal:flex-row orientation-horizontal:w-auto layout-grid:grid layout-grid:grid-cols-2 layout-grid:w-auto empty:text-fg-muted flex flex-col overflow-auto p-1 outline-none empty:min-h-24 empty:items-center empty:justify-center empty:text-sm empty:italic", + "[&_.separator]:-mx-1 [&_.separator]:my-1 [&_.separator]:w-auto", + ], + variants: { + standalone: { + true: "bg-bg max-h-60 w-48 overflow-y-auto rounded-md border", + false: "max-h-[inherit] rounded-[inherit]", + }, + }, +}); + +const listBoxItemStyles = tv({ + base: [ + "disabled:pointer-default hover:bg-bg-inverse/10 focus:bg-bg-inverse/10 pressed:bg-bg-inverse/15 disabled:text-fg-disabled flex cursor-pointer items-center rounded-sm px-3 py-1.5 text-sm outline-none transition-colors disabled:cursor-default", + "selection-single:pl-0 selection-multiple:pl-0", + "[&_svg]:size-4", + ], + variants: { + variant: { + default: "text-fg", + success: "text-fg-success", + warning: "text-fg-warning", + accent: "text-fg-accent", + danger: "text-fg-danger", + }, + }, + defaultVariants: { + variant: "default", + }, +}); + +interface ListBoxProps extends AriaListBoxProps { + isLoading?: boolean; +} +const ListBox = ({ + children, + isLoading, + ...props +}: ListBoxProps) => { + const state = React.useContext(ListStateContext); + const standalone = !state; + return ( + + listBoxStyles({ standalone, className }) + )} + > + {children} + {isLoading && ( + + + + )} + + ); +}; + +interface ItemProps + extends AriaListBoxItemProps, + VariantProps { + label?: string; + description?: string; + prefix?: React.ReactNode; + suffix?: React.ReactNode; +} +const Item = ({ + variant, + label, + description, + prefix, + suffix, + ...props +}: ItemProps) => { + const textValue = + props.textValue || + (typeof props.children === "string" ? props.children : undefined); + return ( + + listBoxItemStyles({ variant, className }) + )} + > + {composeRenderProps( + props.children, + (children, { isSelected, selectionMode }) => ( + <> + {selectionMode !== "none" && ( + + {isSelected && ( + + )} + + )} + + {prefix} + + {label && {label}} + {description && {description}} + {children} + + {suffix} + + + ) + )} + + ); +}; + +export type { ListBoxProps, ItemProps }; +export { ListBox, Item }; diff --git a/www/src/registry/ui/default/core/menu/demos/basic.tsx b/www/src/registry/ui/default/core/menu/demos/basic.tsx index 56367534..93ac0394 100644 --- a/www/src/registry/ui/default/core/menu/demos/basic.tsx +++ b/www/src/registry/ui/default/core/menu/demos/basic.tsx @@ -1,19 +1,19 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; -import { MenuIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - Account settings - Create team - Command menu - Log out - - - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; +import { MenuIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + Account settings + Create team + Command menu + Log out + + + ); +} diff --git a/www/src/registry/ui/default/core/menu/demos/composition.tsx b/www/src/registry/ui/default/core/menu/demos/composition.tsx index d7e6a527..2811a83f 100644 --- a/www/src/registry/ui/default/core/menu/demos/composition.tsx +++ b/www/src/registry/ui/default/core/menu/demos/composition.tsx @@ -1,26 +1,26 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { - MenuContent, - MenuItem, - MenuRoot, -} from "@/registry/ui/default/core/menu"; -import { Overlay } from "@/registry/ui/default/core/overlay"; -import { MenuIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - - Account settings - Create team - Command menu - Log out - - - - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { + MenuContent, + MenuItem, + MenuRoot, +} from "@/registry/ui/default/core/menu"; +import { Overlay } from "@/registry/ui/default/core/overlay"; +import { MenuIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + + Account settings + Create team + Command menu + Log out + + + + ); +} diff --git a/www/src/registry/ui/default/core/menu/demos/controlled.tsx b/www/src/registry/ui/default/core/menu/demos/controlled.tsx index 27d29e7c..92192e78 100644 --- a/www/src/registry/ui/default/core/menu/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/menu/demos/controlled.tsx @@ -1,27 +1,27 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; -import { MenuIcon } from "@/__icons__"; - -export default function Demo() { - const [isOpen, setOpen] = React.useState(false); - return ( -
      - - - - Account settings - Create team - Log out - - -

      - state: {isOpen ? "open" : "closed"} -

      -
      - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; +import { MenuIcon } from "@/__icons__"; + +export default function Demo() { + const [isOpen, setOpen] = React.useState(false); + return ( +
      + + + + Account settings + Create team + Log out + + +

      + state: {isOpen ? "open" : "closed"} +

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/menu/demos/disabled-items.tsx b/www/src/registry/ui/default/core/menu/demos/disabled-items.tsx index e3350ac6..4a10093a 100644 --- a/www/src/registry/ui/default/core/menu/demos/disabled-items.tsx +++ b/www/src/registry/ui/default/core/menu/demos/disabled-items.tsx @@ -1,20 +1,20 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; -import { MenuIcon, PlusSquareIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - Account settings - } isDisabled> - Create team - - Log out - - - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; +import { MenuIcon, PlusSquareIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + Account settings + } isDisabled> + Create team + + Log out + + + ); +} diff --git a/www/src/registry/ui/default/core/menu/demos/item-variant.tsx b/www/src/registry/ui/default/core/menu/demos/item-variant.tsx index caef6d17..0cc7834a 100644 --- a/www/src/registry/ui/default/core/menu/demos/item-variant.tsx +++ b/www/src/registry/ui/default/core/menu/demos/item-variant.tsx @@ -1,19 +1,19 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; -import { MenuIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - Account settings - Create team - Command menu - Delete - - - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; +import { MenuIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + Account settings + Create team + Command menu + Delete + + + ); +} diff --git a/www/src/registry/ui/default/core/menu/demos/label-and-description.tsx b/www/src/registry/ui/default/core/menu/demos/label-and-description.tsx index c23b7ab0..d8cd5380 100644 --- a/www/src/registry/ui/default/core/menu/demos/label-and-description.tsx +++ b/www/src/registry/ui/default/core/menu/demos/label-and-description.tsx @@ -1,18 +1,18 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; -import { MenuIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - - - - - - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; +import { MenuIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + + + + + + ); +} diff --git a/www/src/registry/ui/default/core/menu/demos/link-items.tsx b/www/src/registry/ui/default/core/menu/demos/link-items.tsx index 7b8fa3ba..44f2f729 100644 --- a/www/src/registry/ui/default/core/menu/demos/link-items.tsx +++ b/www/src/registry/ui/default/core/menu/demos/link-items.tsx @@ -1,36 +1,36 @@ -import { DiscordIcon, GitHubIcon, TwitterIcon } from "@/components/icons"; -import { Button } from "@/registry/ui/default/core/button"; -import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; - -export default function Demo() { - return ( - - - - } - href="https://github.com/mehdibha/dotUI" - target="_blank" - > - Github - - } - href="https://twitter.com/mehdibha_" - target="_blank" - > - X - - } - href="https://discord.com/invite/DXpj5V2fU8" - target="_blank" - > - Discord - - - - ); -} +import { DiscordIcon, GitHubIcon, TwitterIcon } from "@/components/icons"; +import { Button } from "@/registry/ui/default/core/button"; +import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; + +export default function Demo() { + return ( + + + + } + href="https://github.com/mehdibha/dotUI" + target="_blank" + > + Github + + } + href="https://twitter.com/mehdibha_" + target="_blank" + > + X + + } + href="https://discord.com/invite/DXpj5V2fU8" + target="_blank" + > + Discord + + + + ); +} diff --git a/www/src/registry/ui/default/core/menu/demos/long-press.tsx b/www/src/registry/ui/default/core/menu/demos/long-press.tsx index d565e355..b7e9463c 100644 --- a/www/src/registry/ui/default/core/menu/demos/long-press.tsx +++ b/www/src/registry/ui/default/core/menu/demos/long-press.tsx @@ -1,18 +1,18 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; -import { MenuIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - Account settings - Create team - Log out - - - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; +import { MenuIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + Account settings + Create team + Log out + + + ); +} diff --git a/www/src/registry/ui/default/core/menu/demos/multiple-selection.tsx b/www/src/registry/ui/default/core/menu/demos/multiple-selection.tsx index 36360e11..17663e99 100644 --- a/www/src/registry/ui/default/core/menu/demos/multiple-selection.tsx +++ b/www/src/registry/ui/default/core/menu/demos/multiple-selection.tsx @@ -1,22 +1,22 @@ -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; - -export default function Demo() { - return ( - - - - Sidebar - Searchbar - Tools - Console - - - ); -} +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; + +export default function Demo() { + return ( + + + + Sidebar + Searchbar + Tools + Console + + + ); +} diff --git a/www/src/registry/ui/default/core/menu/demos/overlay-type.tsx b/www/src/registry/ui/default/core/menu/demos/overlay-type.tsx index 6fddc942..350d9635 100644 --- a/www/src/registry/ui/default/core/menu/demos/overlay-type.tsx +++ b/www/src/registry/ui/default/core/menu/demos/overlay-type.tsx @@ -1,47 +1,47 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; -import { type OverlayProps } from "@/registry/ui/default/core/overlay"; -import { Radio, RadioGroup } from "@/registry/ui/default/core/radio-group"; -import { MenuIcon } from "@/__icons__"; - -export default function Demo() { - const [type, setType] = React.useState("popover"); - const [mobileType, setMobileType] = React.useState("drawer"); - return ( -
      - - - - Account settings - Create team - Command menu - Log out - - -
      - - Popover - Modal - Drawer - - - Popover - Modal - Drawer - -
      -
      - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; +import { type OverlayProps } from "@/registry/ui/default/core/overlay"; +import { Radio, RadioGroup } from "@/registry/ui/default/core/radio-group"; +import { MenuIcon } from "@/__icons__"; + +export default function Demo() { + const [type, setType] = React.useState("popover"); + const [mobileType, setMobileType] = React.useState("drawer"); + return ( +
      + + + + Account settings + Create team + Command menu + Log out + + +
      + + Popover + Modal + Drawer + + + Popover + Modal + Drawer + +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/menu/demos/placement.tsx b/www/src/registry/ui/default/core/menu/demos/placement.tsx index 42d0015e..7076fccd 100644 --- a/www/src/registry/ui/default/core/menu/demos/placement.tsx +++ b/www/src/registry/ui/default/core/menu/demos/placement.tsx @@ -1,69 +1,69 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { - Menu, - MenuItem, - MenuRoot, - type MenuProps, -} from "@/registry/ui/default/core/menu"; -import { Select } from "@/registry/ui/default/core/select"; -import { MenuIcon } from "@/__icons__"; - -type Placement = MenuProps["placement"]; - -export default function Demo() { - const [placement, setPlacement] = React.useState("top"); - return ( -
      - - - - Account settings - Create team - Log out - - - -
      - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { + Menu, + MenuItem, + MenuRoot, + type MenuProps, +} from "@/registry/ui/default/core/menu"; +import { Select } from "@/registry/ui/default/core/select"; +import { MenuIcon } from "@/__icons__"; + +type Placement = MenuProps["placement"]; + +export default function Demo() { + const [placement, setPlacement] = React.useState("top"); + return ( +
      + + + + Account settings + Create team + Log out + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/menu/demos/prefix-and-suffix.tsx b/www/src/registry/ui/default/core/menu/demos/prefix-and-suffix.tsx index 18cb3b15..00636efe 100644 --- a/www/src/registry/ui/default/core/menu/demos/prefix-and-suffix.tsx +++ b/www/src/registry/ui/default/core/menu/demos/prefix-and-suffix.tsx @@ -1,30 +1,30 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; -import { CopyIcon, MenuIcon, PlusSquareIcon, SquarePenIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - } - /> - } - /> - } - /> - - - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; +import { CopyIcon, MenuIcon, PlusSquareIcon, SquarePenIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + } + /> + } + /> + } + /> + + + ); +} diff --git a/www/src/registry/ui/default/core/menu/demos/section.tsx b/www/src/registry/ui/default/core/menu/demos/section.tsx index 72878062..4a2b6cd4 100644 --- a/www/src/registry/ui/default/core/menu/demos/section.tsx +++ b/www/src/registry/ui/default/core/menu/demos/section.tsx @@ -1,24 +1,24 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; -import { Section } from "@/registry/ui/default/core/section"; -import { MenuIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - -
      - Push notifications - Badges -
      -
      - Console - Search -
      -
      -
      - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; +import { Section } from "@/registry/ui/default/core/section"; +import { MenuIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + +
      + Push notifications + Badges +
      +
      + Console + Search +
      +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/menu/demos/separator.tsx b/www/src/registry/ui/default/core/menu/demos/separator.tsx index ee147c09..ec59ab21 100644 --- a/www/src/registry/ui/default/core/menu/demos/separator.tsx +++ b/www/src/registry/ui/default/core/menu/demos/separator.tsx @@ -1,22 +1,22 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; -import { Separator } from "@/registry/ui/default/core/separator"; - -export default function Demo() { - return ( - - - - New... - Badges - - Save - Save as... - Rename... - - Page setup… - Print… - - - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; +import { Separator } from "@/registry/ui/default/core/separator"; + +export default function Demo() { + return ( + + + + New... + Badges + + Save + Save as... + Rename... + + Page setup… + Print… + + + ); +} diff --git a/www/src/registry/ui/default/core/menu/demos/shortcut.tsx b/www/src/registry/ui/default/core/menu/demos/shortcut.tsx index 9fcb7e73..ca1f6fb2 100644 --- a/www/src/registry/ui/default/core/menu/demos/shortcut.tsx +++ b/www/src/registry/ui/default/core/menu/demos/shortcut.tsx @@ -1,18 +1,18 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; -import { MenuIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - New file - Copy link - Edit file - - - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; +import { MenuIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + New file + Copy link + Edit file + + + ); +} diff --git a/www/src/registry/ui/default/core/menu/demos/single-selection.tsx b/www/src/registry/ui/default/core/menu/demos/single-selection.tsx index c9117c08..3109ef49 100644 --- a/www/src/registry/ui/default/core/menu/demos/single-selection.tsx +++ b/www/src/registry/ui/default/core/menu/demos/single-selection.tsx @@ -1,28 +1,28 @@ -"use client"; - -import React from "react"; -import type { Selection } from "react-aria-components"; -import { Button } from "@/registry/ui/default/core/button"; -import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; - -export default function Demo() { - const [selected, setSelected] = React.useState( - new Set(["center"]) - ); - return ( - - - - Start - Center - End - - - ); -} +"use client"; + +import React from "react"; +import type { Selection } from "react-aria-components"; +import { Button } from "@/registry/ui/default/core/button"; +import { Menu, MenuItem, MenuRoot } from "@/registry/ui/default/core/menu"; + +export default function Demo() { + const [selected, setSelected] = React.useState( + new Set(["center"]) + ); + return ( + + + + Start + Center + End + + + ); +} diff --git a/www/src/registry/ui/default/core/menu/demos/submenus.tsx b/www/src/registry/ui/default/core/menu/demos/submenus.tsx index 6d5bf5e0..87e4fa6d 100644 --- a/www/src/registry/ui/default/core/menu/demos/submenus.tsx +++ b/www/src/registry/ui/default/core/menu/demos/submenus.tsx @@ -1,35 +1,35 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { - Menu, - MenuItem, - MenuRoot, - MenuSub, -} from "@/registry/ui/default/core/menu"; -import { MenuIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - Account settings - - Invite users - - SMS - Twitter - - Email - - Work - Personal - - - - - - - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { + Menu, + MenuItem, + MenuRoot, + MenuSub, +} from "@/registry/ui/default/core/menu"; +import { MenuIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + Account settings + + Invite users + + SMS + Twitter + + Email + + Work + Personal + + + + + + + ); +} diff --git a/www/src/registry/ui/default/core/menu/index.ts b/www/src/registry/ui/default/core/menu/index.ts index 4fbc74d7..862d3f1e 100644 --- a/www/src/registry/ui/default/core/menu/index.ts +++ b/www/src/registry/ui/default/core/menu/index.ts @@ -1 +1 @@ -export * from "./menu"; +export * from "./menu"; diff --git a/www/src/registry/ui/default/core/menu/menu.tsx b/www/src/registry/ui/default/core/menu/menu.tsx index 73ae8817..8a54d4b9 100644 --- a/www/src/registry/ui/default/core/menu/menu.tsx +++ b/www/src/registry/ui/default/core/menu/menu.tsx @@ -1,144 +1,144 @@ -"use client"; - -import * as React from "react"; -import { - composeRenderProps, - Menu as AriaMenu, - MenuTrigger as AriaMenuTrigger, - MenuItem as AriaMenuItem, - SubmenuTrigger as AriaSubmenuTrigger, - type MenuItemProps as AriaMenuItemProps, - type MenuProps as AriaMenuProps, - type MenuTriggerProps as AriaMenuTriggerProps, -} from "react-aria-components"; -import { tv, type VariantProps } from "tailwind-variants"; -import { Kbd } from "@/registry/ui/default/core/kbd"; -import { Overlay, type OverlayProps } from "@/registry/ui/default/core/overlay"; -import { Text } from "@/registry/ui/default/core/text"; -import { CheckIcon, ChevronRightIcon } from "@/__icons__"; - -const menuStyles = tv({ - base: [ - "max-h[inherit] rounded-[inherit] p-1 outline-none", - "group-data-[type=drawer]/overlay:p-2", - "[&_.separator]:-mx-1 [&_.separator]:my-1 [&_.separator]:w-auto", - ], -}); - -const menuItemStyles = tv({ - base: [ - "focus:bg-bg-inverse/10 disabled:text-fg-disabled flex cursor-pointer items-center rounded-sm px-3 py-1.5 text-sm outline-none transition-colors disabled:pointer-events-none", - "selection-single:pl-0 selection-multiple:pl-0", - "group-data-[type=drawer]/overlay:text-md group-data-[type=drawer]/overlay:py-3", - "group-data-[type=modal]/overlay:text-md group-data-[type=modal]/overlay:py-2", - "[&_svg]:size-4", - ], - variants: { - variant: { - default: "text-fg", - success: "text-fg-success", - warning: "text-fg-warning", - accent: "text-fg-accent", - danger: "text-fg-danger", - }, - }, - defaultVariants: { - variant: "default", - }, -}); - -type MenuRootProps = AriaMenuTriggerProps; -const MenuRoot = (props: MenuRootProps) => { - return ; -}; - -type MenuProps = MenuContentProps & { - type?: OverlayProps["type"]; - mobileType?: OverlayProps["mobileType"]; - mediaQuery?: OverlayProps["mediaQuery"]; - placement?: OverlayProps["placement"]; -}; -const Menu = ({ - placement, - type = "popover", - mobileType = "drawer", - mediaQuery, - ...props -}: MenuProps) => { - return ( - - - - ); -}; - -type MenuContentProps = AriaMenuProps; -const MenuContent = ({ - className, - ...props -}: MenuContentProps) => { - return ; -}; - -const MenuSub = AriaSubmenuTrigger; - -interface MenuItemProps - extends Omit, "className">, - VariantProps { - prefix?: React.ReactNode; - suffix?: React.ReactNode; - label?: string; - description?: string; - shortcut?: string; - className?: string; -} -const MenuItem = ({ - className, - label, - description, - prefix, - suffix, - shortcut, - variant, - ...props -}: MenuItemProps) => { - return ( - - {composeRenderProps( - props.children, - (children, { selectionMode, isSelected, hasSubmenu }) => ( - <> - {selectionMode !== "none" && ( - - {isSelected && ( - - )} - - )} - {prefix} - - - {label && {label}} - {description && {description}} - {children} - - {suffix} - {shortcut && {shortcut}} - {hasSubmenu && ( - - )} - - - ) - )} - - ); -}; - -export type { MenuRootProps, MenuProps }; -export { MenuRoot, Menu, MenuItem, MenuContent, MenuSub }; +"use client"; + +import * as React from "react"; +import { + composeRenderProps, + Menu as AriaMenu, + MenuTrigger as AriaMenuTrigger, + MenuItem as AriaMenuItem, + SubmenuTrigger as AriaSubmenuTrigger, + type MenuItemProps as AriaMenuItemProps, + type MenuProps as AriaMenuProps, + type MenuTriggerProps as AriaMenuTriggerProps, +} from "react-aria-components"; +import { tv, type VariantProps } from "tailwind-variants"; +import { Kbd } from "@/registry/ui/default/core/kbd"; +import { Overlay, type OverlayProps } from "@/registry/ui/default/core/overlay"; +import { Text } from "@/registry/ui/default/core/text"; +import { CheckIcon, ChevronRightIcon } from "@/__icons__"; + +const menuStyles = tv({ + base: [ + "max-h[inherit] rounded-[inherit] p-1 outline-none", + "group-data-[type=drawer]/overlay:p-2", + "[&_.separator]:-mx-1 [&_.separator]:my-1 [&_.separator]:w-auto", + ], +}); + +const menuItemStyles = tv({ + base: [ + "focus:bg-bg-inverse/10 disabled:text-fg-disabled flex cursor-pointer items-center rounded-sm px-3 py-1.5 text-sm outline-none transition-colors disabled:pointer-events-none", + "selection-single:pl-0 selection-multiple:pl-0", + "group-data-[type=drawer]/overlay:text-md group-data-[type=drawer]/overlay:py-3", + "group-data-[type=modal]/overlay:text-md group-data-[type=modal]/overlay:py-2", + "[&_svg]:size-4", + ], + variants: { + variant: { + default: "text-fg", + success: "text-fg-success", + warning: "text-fg-warning", + accent: "text-fg-accent", + danger: "text-fg-danger", + }, + }, + defaultVariants: { + variant: "default", + }, +}); + +type MenuRootProps = AriaMenuTriggerProps; +const MenuRoot = (props: MenuRootProps) => { + return ; +}; + +type MenuProps = MenuContentProps & { + type?: OverlayProps["type"]; + mobileType?: OverlayProps["mobileType"]; + mediaQuery?: OverlayProps["mediaQuery"]; + placement?: OverlayProps["placement"]; +}; +const Menu = ({ + placement, + type = "popover", + mobileType = "drawer", + mediaQuery, + ...props +}: MenuProps) => { + return ( + + + + ); +}; + +type MenuContentProps = AriaMenuProps; +const MenuContent = ({ + className, + ...props +}: MenuContentProps) => { + return ; +}; + +const MenuSub = AriaSubmenuTrigger; + +interface MenuItemProps + extends Omit, "className">, + VariantProps { + prefix?: React.ReactNode; + suffix?: React.ReactNode; + label?: string; + description?: string; + shortcut?: string; + className?: string; +} +const MenuItem = ({ + className, + label, + description, + prefix, + suffix, + shortcut, + variant, + ...props +}: MenuItemProps) => { + return ( + + {composeRenderProps( + props.children, + (children, { selectionMode, isSelected, hasSubmenu }) => ( + <> + {selectionMode !== "none" && ( + + {isSelected && ( + + )} + + )} + {prefix} + + + {label && {label}} + {description && {description}} + {children} + + {suffix} + {shortcut && {shortcut}} + {hasSubmenu && ( + + )} + + + ) + )} + + ); +}; + +export type { MenuRootProps, MenuProps }; +export { MenuRoot, Menu, MenuItem, MenuContent, MenuSub }; diff --git a/www/src/registry/ui/default/core/number-field/demos/composition.tsx b/www/src/registry/ui/default/core/number-field/demos/composition.tsx index f0b5d7c6..711b2252 100644 --- a/www/src/registry/ui/default/core/number-field/demos/composition.tsx +++ b/www/src/registry/ui/default/core/number-field/demos/composition.tsx @@ -1,27 +1,27 @@ -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { Description, Label } from "@/registry/ui/default/core/field"; -import { Group } from "@/registry/ui/default/core/group"; -import { Input, InputRoot } from "@/registry/ui/default/core/input"; -import { NumberFieldRoot } from "@/registry/ui/default/core/number-field"; -import { MinusIcon, PlusIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - - - - - - - Enter the disired quantity. - - ); -} +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { Description, Label } from "@/registry/ui/default/core/field"; +import { Group } from "@/registry/ui/default/core/group"; +import { Input, InputRoot } from "@/registry/ui/default/core/input"; +import { NumberFieldRoot } from "@/registry/ui/default/core/number-field"; +import { MinusIcon, PlusIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + + + + + + + Enter the disired quantity. + + ); +} diff --git a/www/src/registry/ui/default/core/number-field/demos/contextual-help.tsx b/www/src/registry/ui/default/core/number-field/demos/contextual-help.tsx index e44ef0e2..9e1292af 100644 --- a/www/src/registry/ui/default/core/number-field/demos/contextual-help.tsx +++ b/www/src/registry/ui/default/core/number-field/demos/contextual-help.tsx @@ -1,18 +1,18 @@ -import React from "react"; -import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; -import { NumberField } from "@/registry/ui/default/core/number-field"; - -export default function Demo() { - return ( - - } - /> - ); -} +import React from "react"; +import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; +import { NumberField } from "@/registry/ui/default/core/number-field"; + +export default function Demo() { + return ( + + } + /> + ); +} diff --git a/www/src/registry/ui/default/core/number-field/demos/controlled.tsx b/www/src/registry/ui/default/core/number-field/demos/controlled.tsx index 6e66018f..590e48ad 100644 --- a/www/src/registry/ui/default/core/number-field/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/number-field/demos/controlled.tsx @@ -1,20 +1,20 @@ -"use client"; - -import React from "react"; -import { NumberField } from "@/registry/ui/default/core/number-field"; - -export default function Demo() { - const [inputValue, setInputValue] = React.useState(69); - return ( -
      - { - setInputValue(value); - }} - /> -

      mirrored number: {inputValue}

      -
      - ); -} +"use client"; + +import React from "react"; +import { NumberField } from "@/registry/ui/default/core/number-field"; + +export default function Demo() { + const [inputValue, setInputValue] = React.useState(69); + return ( +
      + { + setInputValue(value); + }} + /> +

      mirrored number: {inputValue}

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/number-field/demos/default.tsx b/www/src/registry/ui/default/core/number-field/demos/default.tsx index ce5a53ef..7e5e6da3 100644 --- a/www/src/registry/ui/default/core/number-field/demos/default.tsx +++ b/www/src/registry/ui/default/core/number-field/demos/default.tsx @@ -1,6 +1,6 @@ -import React from "react"; -import { NumberField } from "@/registry/ui/default/core/number-field"; - -export default function Demo() { - return ; -} +import React from "react"; +import { NumberField } from "@/registry/ui/default/core/number-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/number-field/demos/description.tsx b/www/src/registry/ui/default/core/number-field/demos/description.tsx index b3078e41..9167b168 100644 --- a/www/src/registry/ui/default/core/number-field/demos/description.tsx +++ b/www/src/registry/ui/default/core/number-field/demos/description.tsx @@ -1,6 +1,6 @@ -import React from "react"; -import { NumberField } from "@/registry/ui/default/core/number-field"; - -export default function Demo() { - return ; -} +import React from "react"; +import { NumberField } from "@/registry/ui/default/core/number-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/number-field/demos/disabled.tsx b/www/src/registry/ui/default/core/number-field/demos/disabled.tsx index 298d9a93..86b867b4 100644 --- a/www/src/registry/ui/default/core/number-field/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/number-field/demos/disabled.tsx @@ -1,5 +1,5 @@ -import { NumberField } from "@/registry/ui/default/core/number-field"; - -export default function Demo() { - return ; -} +import { NumberField } from "@/registry/ui/default/core/number-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/number-field/demos/error-message.tsx b/www/src/registry/ui/default/core/number-field/demos/error-message.tsx index 611a0dd5..d04fde5d 100644 --- a/www/src/registry/ui/default/core/number-field/demos/error-message.tsx +++ b/www/src/registry/ui/default/core/number-field/demos/error-message.tsx @@ -1,12 +1,12 @@ -import React from "react"; -import { NumberField } from "@/registry/ui/default/core/number-field"; - -export default function Demo() { - return ( - - ); -} +import React from "react"; +import { NumberField } from "@/registry/ui/default/core/number-field"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/number-field/demos/format-options.tsx b/www/src/registry/ui/default/core/number-field/demos/format-options.tsx index b5900db7..731b50dc 100644 --- a/www/src/registry/ui/default/core/number-field/demos/format-options.tsx +++ b/www/src/registry/ui/default/core/number-field/demos/format-options.tsx @@ -1,44 +1,44 @@ -import React from "react"; -import { NumberField } from "@/registry/ui/default/core/number-field"; - -export default function Demo() { - return ( -
      - - - - -
      - ); -} +import React from "react"; +import { NumberField } from "@/registry/ui/default/core/number-field"; + +export default function Demo() { + return ( +
      + + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/number-field/demos/label.tsx b/www/src/registry/ui/default/core/number-field/demos/label.tsx index 878e060e..82950992 100644 --- a/www/src/registry/ui/default/core/number-field/demos/label.tsx +++ b/www/src/registry/ui/default/core/number-field/demos/label.tsx @@ -1,10 +1,10 @@ -import { NumberField } from "@/registry/ui/default/core/number-field"; - -export default function Demo() { - return ( -
      - - -
      - ); -} +import { NumberField } from "@/registry/ui/default/core/number-field"; + +export default function Demo() { + return ( +
      + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/number-field/demos/read-only.tsx b/www/src/registry/ui/default/core/number-field/demos/read-only.tsx index 5d3b7702..2fcb538a 100644 --- a/www/src/registry/ui/default/core/number-field/demos/read-only.tsx +++ b/www/src/registry/ui/default/core/number-field/demos/read-only.tsx @@ -1,6 +1,6 @@ -import React from "react"; -import { NumberField } from "@/registry/ui/default/core/number-field"; - -export default function Demo() { - return ; -} +import React from "react"; +import { NumberField } from "@/registry/ui/default/core/number-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/number-field/demos/required.tsx b/www/src/registry/ui/default/core/number-field/demos/required.tsx index 47e69de8..4a486a71 100644 --- a/www/src/registry/ui/default/core/number-field/demos/required.tsx +++ b/www/src/registry/ui/default/core/number-field/demos/required.tsx @@ -1,13 +1,13 @@ -import React from "react"; -import { NumberField } from "@/registry/ui/default/core/number-field"; - -export default function Demo() { - return ( -
      - - - - -
      - ); -} +import React from "react"; +import { NumberField } from "@/registry/ui/default/core/number-field"; + +export default function Demo() { + return ( +
      + + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/number-field/demos/sizes.tsx b/www/src/registry/ui/default/core/number-field/demos/sizes.tsx index 153ca631..94311862 100644 --- a/www/src/registry/ui/default/core/number-field/demos/sizes.tsx +++ b/www/src/registry/ui/default/core/number-field/demos/sizes.tsx @@ -1,11 +1,11 @@ -import { NumberField } from "@/registry/ui/default/core/number-field"; - -export default function Demo() { - return ( -
      - - - -
      - ); -} +import { NumberField } from "@/registry/ui/default/core/number-field"; + +export default function Demo() { + return ( +
      + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/number-field/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/number-field/demos/uncontrolled.tsx index 85edaec3..47c9ec10 100644 --- a/www/src/registry/ui/default/core/number-field/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/number-field/demos/uncontrolled.tsx @@ -1,6 +1,6 @@ -import React from "react"; -import { NumberField } from "@/registry/ui/default/core/number-field"; - -export default function Demo() { - return ; -} +import React from "react"; +import { NumberField } from "@/registry/ui/default/core/number-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/number-field/index.ts b/www/src/registry/ui/default/core/number-field/index.ts index b0d46c72..4162908b 100644 --- a/www/src/registry/ui/default/core/number-field/index.ts +++ b/www/src/registry/ui/default/core/number-field/index.ts @@ -1 +1 @@ -export * from "./number-field"; +export * from "./number-field"; diff --git a/www/src/registry/ui/default/core/number-field/number-field.tsx b/www/src/registry/ui/default/core/number-field/number-field.tsx index f713c176..2e38c09f 100644 --- a/www/src/registry/ui/default/core/number-field/number-field.tsx +++ b/www/src/registry/ui/default/core/number-field/number-field.tsx @@ -1,146 +1,146 @@ -"use client"; - -import * as React from "react"; -import { - NumberField as AriaNumberField, - type NumberFieldProps as AriaNumberFieldProps, -} from "react-aria-components"; -import { tv, type VariantProps } from "tailwind-variants"; -import { useMediaQuery } from "@/registry/hooks/use-media-query"; -import { Button, type ButtonProps } from "@/registry/ui/default/core/button"; -import { Field, type FieldProps } from "@/registry/ui/default/core/field"; -import { - InputRoot, - Input, - type inputStyles, -} from "@/registry/ui/default/core/input"; -import { - ChevronDownIcon, - ChevronUpIcon, - MinusIcon, - PlusIcon, -} from "@/__icons__"; - -const numberFieldStyles = tv({ - base: "flex w-48 flex-col items-start gap-2", -}); - -type NumberFieldProps = NumberFieldRootProps & - Omit & - VariantProps & { - placeholder?: string; - }; -const NumberField = React.forwardRef( - ( - { - className, - size, - placeholder, - label, - description, - errorMessage, - isRequired, - necessityIndicator, - contextualHelp, - ...props - }, - ref - ) => { - const isMobile = useMediaQuery("(max-width: 768px)"); - const prefix = isMobile ? ( - - ) : null; - const suffix = isMobile ? ( - - ) : ( -
      - - -
      - ); - return ( - - - - {prefix} - - {suffix} - - - - ); - } -); -NumberField.displayName = "NumberField"; - -type NumberFieldRootProps = Omit & { - className?: string; -}; -const NumberFieldRoot = React.forwardRef< - React.ElementRef, - NumberFieldRootProps ->(({ className, ...props }, ref) => { - return ( - - ); -}); -NumberFieldRoot.displayName = "NumberFieldRoot"; - -interface NumberFieldButtonProps extends ButtonProps { - slot: "increment" | "decrement"; - iconType?: "chevron" | "default"; -} -const NumberFieldButton = ({ - slot, - iconType = "default", - ...props -}: NumberFieldButtonProps) => { - const icon = - iconType === "chevron" ? ( - slot === "increment" ? ( - - ) : ( - - ) - ) : slot === "increment" ? ( - - ) : ( - - ); - return ( - - ); -}; - -export type { NumberFieldProps, NumberFieldRootProps }; -export { NumberField, NumberFieldRoot, NumberFieldButton }; +"use client"; + +import * as React from "react"; +import { + NumberField as AriaNumberField, + type NumberFieldProps as AriaNumberFieldProps, +} from "react-aria-components"; +import { tv, type VariantProps } from "tailwind-variants"; +import { useMediaQuery } from "@/registry/hooks/use-media-query"; +import { Button, type ButtonProps } from "@/registry/ui/default/core/button"; +import { Field, type FieldProps } from "@/registry/ui/default/core/field"; +import { + InputRoot, + Input, + type inputStyles, +} from "@/registry/ui/default/core/input"; +import { + ChevronDownIcon, + ChevronUpIcon, + MinusIcon, + PlusIcon, +} from "@/__icons__"; + +const numberFieldStyles = tv({ + base: "flex w-48 flex-col items-start gap-2", +}); + +type NumberFieldProps = NumberFieldRootProps & + Omit & + VariantProps & { + placeholder?: string; + }; +const NumberField = React.forwardRef( + ( + { + className, + size, + placeholder, + label, + description, + errorMessage, + isRequired, + necessityIndicator, + contextualHelp, + ...props + }, + ref + ) => { + const isMobile = useMediaQuery("(max-width: 768px)"); + const prefix = isMobile ? ( + + ) : null; + const suffix = isMobile ? ( + + ) : ( +
      + + +
      + ); + return ( + + + + {prefix} + + {suffix} + + + + ); + } +); +NumberField.displayName = "NumberField"; + +type NumberFieldRootProps = Omit & { + className?: string; +}; +const NumberFieldRoot = React.forwardRef< + React.ElementRef, + NumberFieldRootProps +>(({ className, ...props }, ref) => { + return ( + + ); +}); +NumberFieldRoot.displayName = "NumberFieldRoot"; + +interface NumberFieldButtonProps extends ButtonProps { + slot: "increment" | "decrement"; + iconType?: "chevron" | "default"; +} +const NumberFieldButton = ({ + slot, + iconType = "default", + ...props +}: NumberFieldButtonProps) => { + const icon = + iconType === "chevron" ? ( + slot === "increment" ? ( + + ) : ( + + ) + ) : slot === "increment" ? ( + + ) : ( + + ); + return ( + + ); +}; + +export type { NumberFieldProps, NumberFieldRootProps }; +export { NumberField, NumberFieldRoot, NumberFieldButton }; diff --git a/www/src/registry/ui/default/core/overlay/index.ts b/www/src/registry/ui/default/core/overlay/index.ts index c4ba7dda..2c118c53 100644 --- a/www/src/registry/ui/default/core/overlay/index.ts +++ b/www/src/registry/ui/default/core/overlay/index.ts @@ -1 +1 @@ -export * from "./overlay"; +export * from "./overlay"; diff --git a/www/src/registry/ui/default/core/overlay/overlay.tsx b/www/src/registry/ui/default/core/overlay/overlay.tsx index 65970716..f41321f2 100644 --- a/www/src/registry/ui/default/core/overlay/overlay.tsx +++ b/www/src/registry/ui/default/core/overlay/overlay.tsx @@ -1,316 +1,316 @@ -"use client"; - -import React from "react"; -import { - composeRenderProps, - Popover as AriaPopover, - OverlayArrow as AriaOverlayArrow, - Modal as AriaModal, - ModalOverlay as AriaModalOverlay, - OverlayTriggerStateContext as AriaOverlayTriggerStateContext, - type PopoverProps as AriaPopoverProps, - type ModalOverlayProps as AriaModalOverlayProps, -} from "react-aria-components"; -import { tv } from "tailwind-variants"; -import { useMediaQuery } from "@/registry/hooks/use-media-query"; -import { Button, type ButtonProps } from "@/registry/ui/default/core/button"; -import { cn } from "@/registry/ui/default/lib/cn"; -import { XIcon } from "@/__icons__"; -import { MotionDrawerRoot, useMotionDrawer } from "./use-motion-drawer"; - -type OverlayType = "modal" | "drawer" | "popover"; - -type OverlayProps = { - type?: OverlayType; - mobileType?: OverlayProps["type"]; - showDismissButton?: boolean; - mediaQuery?: string; - children: React.ReactNode; - classNames?: ModalOverlayClassNames & - DrawerOverlayClassNames & - PopoverOverlayClassNames; -} & Omit & - Omit; - -const Overlay = React.forwardRef( - ( - { - type: typeProp = "modal", - mobileType, - mediaQuery = "(max-width: 640px)", - isDismissable = true, - ...props - }, - ref - ) => { - const isMobile = useMediaQuery(mediaQuery); - const type = mobileType ? (isMobile ? mobileType : typeProp) : typeProp; - switch (type) { - case "modal": - return ( - } - isDismissable={isDismissable} - {...props} - /> - ); - case "drawer": - return ( - // @ts-expect-error TODO FIX THIS SAME ORIENTATION PROP AS POPOVER :'( - } - isDismissable={isDismissable} - {...props} - /> - ); - case "popover": - return ( - } - {...props} - /> - ); - } - } -); -Overlay.displayName = "Overlay"; - -const modalVariants = tv({ - slots: { - backdrop: [ - "fixed inset-0 z-50 bg-black/80", - "data-[entering]:animate-in data-[exiting]:animate-out data-[entering]:fade-in-0 data-[exiting]:fade-out-0 data-[exiting]:duration-300", - ], - overlay: [ - "group/overlay fixed left-[50%] top-[50%] z-50 w-full max-w-lg translate-x-[-50%] translate-y-[-50%]", - "bg-bg border shadow-lg sm:rounded-lg md:w-full", - "data-[entering]:animate-in data-[exiting]:animate-out data-[entering]:fade-in-0 data-[exiting]:fade-out-0 data-[entering]:zoom-in-95 data-[exiting]:zoom-out-95 data-[entering]:slide-in-from-left-1/2 data-[entering]:slide-in-from-top-[48%] data-[exiting]:slide-out-to-left-1/2 data-[exiting]:slide-out-to-top-[48%] duration-200 data-[exiting]:duration-300", - ], - }, -}); - -type ModalOverlaySlots = keyof ReturnType; -type ModalOverlayClassNames = { - [key in ModalOverlaySlots]?: string; -}; - -interface ModalOverlayProps extends AriaModalOverlayProps { - showDismissButton?: boolean; - classNames?: ModalOverlayClassNames; -} - -const ModalOverlay = React.forwardRef< - React.ElementRef, - ModalOverlayProps ->( - ( - { classNames, className, isDismissable, showDismissButton, ...props }, - ref - ) => { - const { overlay, backdrop } = modalVariants({}); - return ( - - - {composeRenderProps(props.children, (children) => ( - <> - {(showDismissButton ?? isDismissable) && } - {children} - - ))} - - - ); - } -); -ModalOverlay.displayName = "ModalOverlay"; - -const popoverOverlayVariants = tv({ - slots: { - overlay: - "group/overlay bg-bg text-fg z-50 rounded-md border shadow-md data-[trigger=ComboBox]:min-w-[--trigger-width] data-[trigger=Select]:min-w-[--trigger-width]", - arrow: [ - "fill-bg stroke-border block stroke-1", - "group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180", - ], - }, -}); - -type PopoverOverlaySlots = keyof ReturnType; -type PopoverOverlayClassNames = { - [key in PopoverOverlaySlots]?: string; -}; - -interface PopoverOverlayProps extends AriaPopoverProps { - arrow?: boolean; - classNames?: PopoverOverlayClassNames; - showDismissButton?: boolean; -} - -const PopoverOverlay = React.forwardRef< - React.ElementRef, - PopoverOverlayProps ->( - ( - { arrow = false, className, showDismissButton, classNames, ...props }, - ref - ) => { - const { overlay, arrow: arrowStyle } = popoverOverlayVariants({}); - return ( - - {composeRenderProps(props.children, (children, {}) => ( - <> - {showDismissButton && } - {arrow && ( - - - - - - )} - {children} - - ))} - - ); - } -); -PopoverOverlay.displayName = "PopoverOverlay"; - -const drawerVariants = tv({ - slots: { - backdrop: ["fixed inset-0 z-50 bg-black/60", "opacity-0"], - overlay: [ - "group/overlay bg-bg fixed z-50 flex flex-col outline-none", - "inset-0", - "placement-bottom:top-auto placement-top:bottom-auto placement-left:right-auto placement-right:left-auto", - "placement-bottom:mt-24 placement-bottom:rounded-t-[10px] placement-bottom:border-t", - "placement-top:mb-24 placement-top:rounded-b-[10px] placement-top:border-b", - "placement-right:ml-24 placement-right:rounded-l-[10px] placement-right:border-l", - "placement-left:mr-24 placement-left:rounded-r-[10px] placement-left:border-r", - "touch-none will-change-transform", - "placement-bottom:translate-y-full placement-top:-translate-y-full placement-left:-translate-x-full placement-right:translate-x-full", // required - "placement-bottom:max-h-[90%] placement-top:max-h-[90%]", - ], - }, -}); - -type DrawerOverlaySlots = keyof ReturnType; -type DrawerOverlayClassNames = { - [key in DrawerOverlaySlots]?: string; -}; - -interface DrawerOverlayProps extends Omit { - placement?: "top" | "bottom" | "left" | "right"; - showDismissButton?: boolean; - children?: React.ReactNode; - classNames?: DrawerOverlayClassNames; -} - -const DrawerOverlay = React.forwardRef< - React.ElementRef, - DrawerOverlayProps ->( - ( - { - children, - classNames, - className, - isDismissable, - showDismissButton = false, - placement = "bottom", - ...props - }, - ref - ) => { - const { rootProps, modalProps, backdropProps, drawerProps } = - useMotionDrawer({ - isDismissable, - placement, - scaleBackground: false, - }); - const { overlay, backdrop } = drawerVariants(); - - return ( - - -
      - -
      - {showDismissButton && ( - Done - )} - {/*
      */} - {children} -
      - - - - ); - } -); -DrawerOverlay.displayName = "DrawerOverlay"; - -const DismissButton = (props: ButtonProps) => { - const state = React.useContext(AriaOverlayTriggerStateContext); - return ( - - ); -}; - -export type { - OverlayProps, - ModalOverlayProps, - DrawerOverlayProps, - PopoverOverlayProps, -}; -export { - Overlay, - PopoverOverlay, - DrawerOverlay, - ModalOverlay, - DismissButton, - drawerVariants, - modalVariants, - popoverOverlayVariants, -}; +"use client"; + +import React from "react"; +import { + composeRenderProps, + Popover as AriaPopover, + OverlayArrow as AriaOverlayArrow, + Modal as AriaModal, + ModalOverlay as AriaModalOverlay, + OverlayTriggerStateContext as AriaOverlayTriggerStateContext, + type PopoverProps as AriaPopoverProps, + type ModalOverlayProps as AriaModalOverlayProps, +} from "react-aria-components"; +import { tv } from "tailwind-variants"; +import { useMediaQuery } from "@/registry/hooks/use-media-query"; +import { Button, type ButtonProps } from "@/registry/ui/default/core/button"; +import { cn } from "@/registry/ui/default/lib/cn"; +import { XIcon } from "@/__icons__"; +import { MotionDrawerRoot, useMotionDrawer } from "./use-motion-drawer"; + +type OverlayType = "modal" | "drawer" | "popover"; + +type OverlayProps = { + type?: OverlayType; + mobileType?: OverlayProps["type"]; + showDismissButton?: boolean; + mediaQuery?: string; + children: React.ReactNode; + classNames?: ModalOverlayClassNames & + DrawerOverlayClassNames & + PopoverOverlayClassNames; +} & Omit & + Omit; + +const Overlay = React.forwardRef( + ( + { + type: typeProp = "modal", + mobileType, + mediaQuery = "(max-width: 640px)", + isDismissable = true, + ...props + }, + ref + ) => { + const isMobile = useMediaQuery(mediaQuery); + const type = mobileType ? (isMobile ? mobileType : typeProp) : typeProp; + switch (type) { + case "modal": + return ( + } + isDismissable={isDismissable} + {...props} + /> + ); + case "drawer": + return ( + // @ts-expect-error TODO FIX THIS SAME ORIENTATION PROP AS POPOVER :'( + } + isDismissable={isDismissable} + {...props} + /> + ); + case "popover": + return ( + } + {...props} + /> + ); + } + } +); +Overlay.displayName = "Overlay"; + +const modalVariants = tv({ + slots: { + backdrop: [ + "fixed inset-0 z-50 bg-black/80", + "data-[entering]:animate-in data-[exiting]:animate-out data-[entering]:fade-in-0 data-[exiting]:fade-out-0 data-[exiting]:duration-300", + ], + overlay: [ + "group/overlay fixed left-[50%] top-[50%] z-50 w-full max-w-lg translate-x-[-50%] translate-y-[-50%]", + "bg-bg border shadow-lg sm:rounded-lg md:w-full", + "data-[entering]:animate-in data-[exiting]:animate-out data-[entering]:fade-in-0 data-[exiting]:fade-out-0 data-[entering]:zoom-in-95 data-[exiting]:zoom-out-95 data-[entering]:slide-in-from-left-1/2 data-[entering]:slide-in-from-top-[48%] data-[exiting]:slide-out-to-left-1/2 data-[exiting]:slide-out-to-top-[48%] duration-200 data-[exiting]:duration-300", + ], + }, +}); + +type ModalOverlaySlots = keyof ReturnType; +type ModalOverlayClassNames = { + [key in ModalOverlaySlots]?: string; +}; + +interface ModalOverlayProps extends AriaModalOverlayProps { + showDismissButton?: boolean; + classNames?: ModalOverlayClassNames; +} + +const ModalOverlay = React.forwardRef< + React.ElementRef, + ModalOverlayProps +>( + ( + { classNames, className, isDismissable, showDismissButton, ...props }, + ref + ) => { + const { overlay, backdrop } = modalVariants({}); + return ( + + + {composeRenderProps(props.children, (children) => ( + <> + {(showDismissButton ?? isDismissable) && } + {children} + + ))} + + + ); + } +); +ModalOverlay.displayName = "ModalOverlay"; + +const popoverOverlayVariants = tv({ + slots: { + overlay: + "group/overlay bg-bg text-fg z-50 rounded-md border shadow-md data-[trigger=ComboBox]:min-w-[--trigger-width] data-[trigger=Select]:min-w-[--trigger-width]", + arrow: [ + "fill-bg stroke-border block stroke-1", + "group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180", + ], + }, +}); + +type PopoverOverlaySlots = keyof ReturnType; +type PopoverOverlayClassNames = { + [key in PopoverOverlaySlots]?: string; +}; + +interface PopoverOverlayProps extends AriaPopoverProps { + arrow?: boolean; + classNames?: PopoverOverlayClassNames; + showDismissButton?: boolean; +} + +const PopoverOverlay = React.forwardRef< + React.ElementRef, + PopoverOverlayProps +>( + ( + { arrow = false, className, showDismissButton, classNames, ...props }, + ref + ) => { + const { overlay, arrow: arrowStyle } = popoverOverlayVariants({}); + return ( + + {composeRenderProps(props.children, (children, {}) => ( + <> + {showDismissButton && } + {arrow && ( + + + + + + )} + {children} + + ))} + + ); + } +); +PopoverOverlay.displayName = "PopoverOverlay"; + +const drawerVariants = tv({ + slots: { + backdrop: ["fixed inset-0 z-50 bg-black/60", "opacity-0"], + overlay: [ + "group/overlay bg-bg fixed z-50 flex flex-col outline-none", + "inset-0", + "placement-bottom:top-auto placement-top:bottom-auto placement-left:right-auto placement-right:left-auto", + "placement-bottom:mt-24 placement-bottom:rounded-t-[10px] placement-bottom:border-t", + "placement-top:mb-24 placement-top:rounded-b-[10px] placement-top:border-b", + "placement-right:ml-24 placement-right:rounded-l-[10px] placement-right:border-l", + "placement-left:mr-24 placement-left:rounded-r-[10px] placement-left:border-r", + "touch-none will-change-transform", + "placement-bottom:translate-y-full placement-top:-translate-y-full placement-left:-translate-x-full placement-right:translate-x-full", // required + "placement-bottom:max-h-[90%] placement-top:max-h-[90%]", + ], + }, +}); + +type DrawerOverlaySlots = keyof ReturnType; +type DrawerOverlayClassNames = { + [key in DrawerOverlaySlots]?: string; +}; + +interface DrawerOverlayProps extends Omit { + placement?: "top" | "bottom" | "left" | "right"; + showDismissButton?: boolean; + children?: React.ReactNode; + classNames?: DrawerOverlayClassNames; +} + +const DrawerOverlay = React.forwardRef< + React.ElementRef, + DrawerOverlayProps +>( + ( + { + children, + classNames, + className, + isDismissable, + showDismissButton = false, + placement = "bottom", + ...props + }, + ref + ) => { + const { rootProps, modalProps, backdropProps, drawerProps } = + useMotionDrawer({ + isDismissable, + placement, + scaleBackground: false, + }); + const { overlay, backdrop } = drawerVariants(); + + return ( + + +
      + +
      + {showDismissButton && ( + Done + )} + {/*
      */} + {children} +
      + + + + ); + } +); +DrawerOverlay.displayName = "DrawerOverlay"; + +const DismissButton = (props: ButtonProps) => { + const state = React.useContext(AriaOverlayTriggerStateContext); + return ( + + ); +}; + +export type { + OverlayProps, + ModalOverlayProps, + DrawerOverlayProps, + PopoverOverlayProps, +}; +export { + Overlay, + PopoverOverlay, + DrawerOverlay, + ModalOverlay, + DismissButton, + drawerVariants, + modalVariants, + popoverOverlayVariants, +}; diff --git a/www/src/registry/ui/default/core/overlay/use-motion-drawer.tsx b/www/src/registry/ui/default/core/overlay/use-motion-drawer.tsx index 41b28478..67165675 100644 --- a/www/src/registry/ui/default/core/overlay/use-motion-drawer.tsx +++ b/www/src/registry/ui/default/core/overlay/use-motion-drawer.tsx @@ -1,688 +1,687 @@ -/* eslint-disable */ - -/* This hook is in progress */ -import React from "react"; -import { OverlayTriggerStateContext } from "react-aria-components"; - -interface useMotionDrawerProps { - open?: boolean; - onOpenChange?: (open: boolean) => void; - scaleBackground?: boolean; - closeThreshold?: number; - scrollLockTimeout?: number; - isDismissable?: boolean; - placement?: "top" | "bottom" | "left" | "right"; -} - -type AnimationState = "unmounted" | "hidden" | "visible"; - -export const useMotionDrawer = (props: useMotionDrawerProps) => { - const { - scaleBackground = true, - closeThreshold = CLOSE_THRESHOLD, - scrollLockTimeout = SCROLL_LOCK_TIMEOUT, - isDismissable = true, - placement = "bottom", - } = props; - const contextState = React.useContext(OverlayTriggerStateContext); - const context = React.useContext(DrawerInternalContext); - const state = contextState; - const [animation, setAnimation] = React.useState("unmounted"); - const isEntering = animation === "visible"; - const isExiting = animation === "hidden"; - const nested = !!context; - - const drawerRef = React.useRef(null); - const backdropRef = React.useRef(null); - const dragStartTime = React.useRef(null); - const dragEndTime = React.useRef(null); - - const [isDragging, setDragging] = React.useState(false); - const drawerHeightRef = React.useRef( - drawerRef.current?.getBoundingClientRect().height || 0 - ); - const pointerStartRef = React.useRef<{ x: number; y: number } | null>(null); - const pointerStart = React.useRef(0); - const keyboardIsOpen = React.useRef(false); - const initialDrawerHeight = React.useRef(0); - const previousDiffFromInitial = React.useRef(0); - - function shouldDrag(el: EventTarget) { - // TODO: add more conditions (scrollLockTimeout / when animating / placement right and left / swipe amout? / scrollable element / ...) - const selectedText = window.getSelection()?.toString(); - if (selectedText && selectedText.length > 0) return false; - if (!isVertical(placement)) return true; - // TODO: Disallow drag when entering or exiting - const swipeAmount = drawerRef.current - ? getTranslate(drawerRef.current, placement) - : null; - if ( - swipeAmount !== null && - (placement === "bottom" ? swipeAmount > 0 : swipeAmount < 0) - ) - return true; - // TODO: SCROLLLOCKTIMEOUT - // TODO: DRAG IN placement - let element = el as HTMLElement; - while (element) { - if (element.scrollHeight > element.clientHeight) { - if (element.scrollTop !== 0) { - return false; - } - if (element.getAttribute("role") === "dialog") { - return true; - } - } - element = element.parentNode as HTMLElement; - } - return true; - } - - function resetDrawer() { - if (!drawerRef.current) return; - const wrapper = document.querySelector("[drawer-wrapper]"); - const currentSwipeAmount = getTranslate(drawerRef.current, placement); - set(drawerRef.current, { - transform: "translate3d(0, 0, 0)", - transition: `transform ${ - TRANSITIONS.DURATION - }s cubic-bezier(${TRANSITIONS.EASE.join(",")})`, - }); - set(backdropRef.current, { - transition: `opacity ${ - TRANSITIONS.DURATION - }s cubic-bezier(${TRANSITIONS.EASE.join(",")})`, - opacity: "1", - }); - // TODO: put this in a function (resetBody) - if ( - scaleBackground && - currentSwipeAmount && - currentSwipeAmount > 0 && - state.isOpen && - !nested - ) { - set( - wrapper, - { - borderRadius: `${BORDER_RADIUS}px`, - ...(isVertical(placement) - ? { - transform: `scale(${getScale()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`, - transformOrigin: "top", - } - : { - transform: `scale(${getScale()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`, - transformOrigin: "left", - }), - transitionProperty: "transform, border-radius", - transitionDuration: `${TRANSITIONS.DURATION}s`, - transitionTimingFunction: `cubic-bezier(${TRANSITIONS.EASE.join( - "," - )})`, - }, - true - ); - } - } - - function onPress(event: React.PointerEvent) { - if (drawerRef.current && !drawerRef.current.contains(event.target as Node)) - return; - drawerHeightRef.current = - drawerRef.current?.getBoundingClientRect().height || 0; - setDragging(true); - dragStartTime.current = new Date(); - // if (isIOS()) { - // window.addEventListener('touchend', () => (isAllowedToDrag.current = false), { once: true }); - // } - (event.target as HTMLElement).setPointerCapture(event.pointerId); - pointerStart.current = isVertical(placement) - ? event.clientY - : event.clientX; - } - - function onDrag(event: React.PointerEvent) { - if (!drawerRef.current || !isDragging || !shouldDrag(event.target)) return; - const placementMultiplier = - placement === "bottom" || placement === "right" ? 1 : -1; - const draggedDistance = - (pointerStart.current - - (isVertical(placement) ? event.clientY : event.clientX)) * - placementMultiplier; - const isDraggingInDirection = draggedDistance > 0; - const absDraggedDistance = Math.abs(draggedDistance); - const wrapper = document.querySelector("[drawer-wrapper]"); - const percentageDragged = absDraggedDistance / drawerHeightRef.current; - if (nested) context.onNestedDrag(percentageDragged); - set(drawerRef.current, { transition: "none" }); // WHY? - set(backdropRef.current, { transition: "none" }); // WHY? - if (isDraggingInDirection) { - const dampenedDraggedDistance = dampenValue(draggedDistance); - const translateValue = - Math.min(dampenedDraggedDistance * -1, 0) * placementMultiplier; - set(drawerRef.current, { - transform: isVertical(placement) - ? `translate3d(0, ${translateValue}px, 0)` - : `translate3d(${translateValue}px, 0, 0)`, - }); - return; - } - const opacityValue = 1 - percentageDragged; - set( - backdropRef.current, - { opacity: `${opacityValue}`, transition: "none" }, - true - ); - if (wrapper && backdropRef.current && scaleBackground && !nested) { - // Calculate percentageDragged as a fraction (0 to 1) - const scaleValue = Math.min( - getScale() + percentageDragged * (1 - getScale()), - 1 - ); - const borderRadiusValue = 8 - percentageDragged * 8; - const translateValue = Math.max(0, 14 - percentageDragged * 14); - set( - wrapper, - { - borderRadius: `${borderRadiusValue}px`, - transform: isVertical(placement) - ? `scale(${scaleValue}) translate3d(0, ${translateValue}px, 0)` - : `scale(${scaleValue}) translate3d(${translateValue}px, 0, 0)`, - transition: "none", - }, - true - ); - } - const translateValue = absDraggedDistance * placementMultiplier; - set(drawerRef.current, { - transform: isVertical(placement) - ? `translate3d(0, ${translateValue}px, 0)` - : `translate3d(${translateValue}px, 0, 0)`, - }); - - // TODO: transform body - } - - function onRelease(event: React.PointerEvent) { - if (!isDragging || !drawerRef.current) return; - if (nested) context.onNestedRelease(true); - setDragging(false); - dragEndTime.current = new Date(); - const swipeAmount = getTranslate(drawerRef.current, placement); - if (!shouldDrag(event.target) || !swipeAmount || isNaN(swipeAmount)) return; - if (dragStartTime.current === null) return; - // TODO: check for justReleased (to not focus on an element on drag end) - const timeTaken = - dragEndTime.current.getTime() - dragStartTime.current.getTime(); - const distMoved = - pointerStart.current - - (isVertical(placement) ? event.clientY : event.clientX); - const velocity = Math.abs(distMoved) / timeTaken; - if ( - placement === "bottom" || placement === "right" - ? distMoved > 0 - : distMoved < 0 - ) { - resetDrawer(); - return; - } - if (velocity > VELOCITY_THRESHOLD) { - closeDrawer(); - return; - } - const visibleDrawerHeight = Math.min( - drawerRef.current.getBoundingClientRect().height ?? 0, - window.innerHeight - ); - if (swipeAmount >= visibleDrawerHeight * closeThreshold) { - closeDrawer(); - return; - } - resetDrawer(); - } - - function onPointerDown(event: React.PointerEvent) { - pointerStartRef.current = { x: event.clientX, y: event.clientY }; - onPress(event); - } - - function onPointerMove(event: React.PointerEvent) { - if (!pointerStartRef.current) return; - // TODO: Is allowed to swipe check? - onDrag(event); - } - - function onPointerUp(event: React.PointerEvent) { - pointerStartRef.current = null; - onRelease(event); - } - - function getScale() { - return (window.innerWidth - WINDOW_TOP_OFFSET) / window.innerWidth; - } - - function animateBody() { - if (nested) return; - const wrapper = document.querySelector("[drawer-wrapper]"); - if (!wrapper || !scaleBackground) return; - set(document.body, { - background: - document.body.style.backgroundColor || document.body.style.background, - }); - set(document.body, { background: "black" }, true); - set(wrapper, { - borderRadius: `${BORDER_RADIUS}px`, - ...(isVertical(placement) - ? { - transform: `scale(${getScale()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`, - transformOrigin: "top", - } - : { - transform: `scale(${getScale()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`, - transformOrigin: "left", - }), - transitionProperty: "transform, border-radius", - transitionDuration: `${TRANSITIONS.DURATION}s`, - transitionTimingFunction: `cubic-bezier(${TRANSITIONS.EASE.join(",")})`, - }); - } - - function resetBody() { - if (nested) return; - const wrapper = document.querySelector("[drawer-wrapper]"); - if (!wrapper || !scaleBackground) return; - reset(wrapper, "overflow"); - reset(wrapper, "transform"); - reset(wrapper, "borderRadius"); - set(wrapper, { - transitionProperty: "transform, border-radius", - transitionDuration: `${TRANSITIONS.DURATION}s`, - transitionTimingFunction: `cubic-bezier(${TRANSITIONS.EASE.join(",")})`, - }); - } - - function openDrawer() { - if (!drawerRef.current) return; - if (nested) context.onNestedOpenChange(true); - setAnimation("visible"); - animateBody(); - set(drawerRef.current, { - transform: `translate3d(0, 0, 0)`, - transition: `transform ${ - TRANSITIONS.DURATION - }s cubic-bezier(${TRANSITIONS.EASE.join(",")})`, - }); - set(backdropRef.current, { - opacity: "1", - transition: `opacity ${ - TRANSITIONS.DURATION - }s cubic-bezier(${TRANSITIONS.EASE.join(",")})`, - }); - } - - function closeDrawer() { - if (!drawerRef.current) return; - if (nested) context.onNestedOpenChange(false); - setAnimation("hidden"); - resetBody(); - set(drawerRef.current, { - transform: isVertical(placement) - ? `translate3d(0, ${placement === "bottom" ? "100%" : "-100%"}, 0)` - : `translate3d(${placement === "right" ? "100%" : "-100%"}, 0, 0)`, - transition: `transform ${ - TRANSITIONS.DURATION - }s cubic-bezier(${TRANSITIONS.EASE.join(",")})`, - }); - set(backdropRef.current, { - opacity: "0", - transition: `opacity ${ - TRANSITIONS.DURATION - }s cubic-bezier(${TRANSITIONS.EASE.join(",")})`, - }); - } - - function handleTransitionEnd() { - if (isExiting) { - setAnimation("unmounted"); - reset(document.body); - state.close(); - } - } - - function handleOpenChange(isOpen: boolean) { - if (!isOpen) { - closeDrawer(); - } - } - - function handleNestedOpenChange(isOpen: boolean) { - const scale = isOpen - ? (window.innerWidth - NESTED_DISPLACEMENT) / window.innerWidth - : 1; - const y = isOpen ? -NESTED_DISPLACEMENT : 0; - set(drawerRef.current, { - transition: `transform ${ - TRANSITIONS.DURATION - }s cubic-bezier(${TRANSITIONS.EASE.join(",")})`, - transform: `scale(${scale}) translate3d(0, ${y}px, 0)`, - }); - } - - function handleNestedDrag(percentageDragged: number) { - if (percentageDragged < 0) return; - const initialDim = isVertical(placement) - ? window.innerHeight - : window.innerWidth; - const initialScale = (initialDim - NESTED_DISPLACEMENT) / initialDim; - const newScale = initialScale + percentageDragged * (1 - initialScale); - const newTranslate = - -NESTED_DISPLACEMENT + percentageDragged * NESTED_DISPLACEMENT; - set(drawerRef.current, { - transform: isVertical(placement) - ? `scale(${newScale}) translate3d(0, ${newTranslate}px, 0)` - : `scale(${newScale}) translate3d(${newTranslate}px, 0, 0)`, - transition: "none", - }); - } - - function handleNestedRelease(isOpen: boolean) { - const dim = isVertical(placement) ? window.innerHeight : window.innerWidth; - const scale = isOpen ? (dim - NESTED_DISPLACEMENT) / dim : 1; - const translate = isOpen ? -NESTED_DISPLACEMENT : 0; - if (isOpen) { - set(drawerRef.current, { - transition: `transform ${ - TRANSITIONS.DURATION - }s cubic-bezier(${TRANSITIONS.EASE.join(",")})`, - transform: isVertical(placement) - ? `scale(${scale}) translate3d(0, ${translate}px, 0)` - : `scale(${scale}) translate3d(${translate}px, 0, 0)`, - }); - } - } - - // TODO: ADD LOGIC FOR INPUT KEYBOARD OPEN ON MOBILE - - React.useEffect(() => { - function onVisualViewportChange() { - if (!drawerRef.current) return; - const focusedElement = document.activeElement as HTMLElement; - if (isInput(focusedElement) || keyboardIsOpen.current) { - const visualViewportHeight = window.visualViewport?.height || 0; - const diffFromInitial = window.innerHeight - visualViewportHeight; - const drawerHeight = - drawerRef.current.getBoundingClientRect().height || 0; - if (!initialDrawerHeight.current) { - initialDrawerHeight.current = drawerHeight; - } - const offsetFromTop = drawerRef.current.getBoundingClientRect().top; - if (Math.abs(previousDiffFromInitial.current - diffFromInitial) > 60) { - keyboardIsOpen.current = !keyboardIsOpen.current; - } - previousDiffFromInitial.current = diffFromInitial; - if (drawerHeight > visualViewportHeight || keyboardIsOpen.current) { - const height = drawerRef.current.getBoundingClientRect().height; - let newDrawerHeight = height; - if (height > visualViewportHeight) { - newDrawerHeight = visualViewportHeight - WINDOW_TOP_OFFSET; - } - drawerRef.current.style.height = `${Math.max( - newDrawerHeight, - visualViewportHeight - offsetFromTop - )}px`; - } else { - drawerRef.current.style.height = `${initialDrawerHeight.current}px`; - } - drawerRef.current.style.bottom = `${Math.max(diffFromInitial, 0)}px`; - } - } - window.visualViewport?.addEventListener("resize", onVisualViewportChange); - return () => - window.visualViewport?.removeEventListener( - "resize", - onVisualViewportChange - ); - }, []); - - React.useEffect(() => { - if (state.isOpen) { - openDrawer(); - } else { - if (!nested) { - resetBody(); // to ensure that always the body is reset. - } - } - return () => { - resetBody(); - }; - }, [state.isOpen]); - - const rootProps = { - value: { - onNestedOpenChange: handleNestedOpenChange, - onNestedDrag: handleNestedDrag, - onNestedRelease: handleNestedRelease, - }, - }; - - const drawerProps = { - ref: drawerRef, - "data-rac": "", - "data-drawer": "", - "data-placement": placement, - "data-open": state.isOpen || undefined, - onTransitionEnd: handleTransitionEnd, - onPointerUp, - onPointerDown, - onPointerMove, - }; - - const modalProps = { - isOpen: state.isOpen, - onOpenChange: handleOpenChange, - isExiting, - }; - - const backdropProps = { ref: backdropRef }; - - return { - rootProps, - modalProps, - drawerProps, - backdropProps, - }; -}; - -export const MotionDrawerRoot = ({ - children, - value, -}: { - children: React.ReactNode; - value: DrawerInternalContextValue; -}) => { - return ( - - {children} - - ); -}; - -interface DrawerInternalContextValue { - onNestedOpenChange: (isOpen: boolean) => void; - onNestedDrag: (percentageDragged: number) => void; - onNestedRelease: (isOpen: boolean) => void; -} - -export const DrawerInternalContext = - React.createContext(null); - -export const useDrawerInternalContext = () => { - const context = React.useContext(DrawerInternalContext); - return context; -}; - -// Constants - -const CLOSE_THRESHOLD = 0.25; -const SCROLL_LOCK_TIMEOUT = 100; -const BORDER_RADIUS = 8; -const WINDOW_TOP_OFFSET = 26; -const TRANSITIONS = { - DURATION: 0.5, - EASE: [0.32, 0.72, 0, 1], -}; -const VELOCITY_THRESHOLD = 0.4; -const NESTED_DISPLACEMENT = 16; - -// Types - -type DrawerPlacement = "top" | "bottom" | "left" | "right"; - -// Helpers - -type Style = Record; - -const cache = new WeakMap(); - -export function isInView(el: HTMLElement): boolean { - const rect = el.getBoundingClientRect(); - - if (!window.visualViewport) return false; - - return ( - rect.top >= 0 && - rect.left >= 0 && - // Need + 40 for safari detection - rect.bottom <= window.visualViewport.height - 40 && - rect.right <= window.visualViewport.width - ); -} - -export function set( - el: Element | HTMLElement | null | undefined, - styles: Style, - ignoreCache = false -) { - if (!el || !(el instanceof HTMLElement)) return; - const originalStyles: Style = {}; - - Object.entries(styles).forEach(([key, value]: [string, string]) => { - if (key.startsWith("--")) { - el.style.setProperty(key, value); - return; - } - - originalStyles[key] = (el.style as any)[key]; - (el.style as any)[key] = value; - }); - - if (ignoreCache) return; - - cache.set(el, originalStyles); -} - -export function reset(el: Element | HTMLElement | null, prop?: string) { - if (!el || !(el instanceof HTMLElement)) return; - const originalStyles = cache.get(el); - - if (!originalStyles) { - return; - } - - if (prop) { - (el.style as any)[prop] = originalStyles[prop]; - } else { - Object.entries(originalStyles).forEach(([key, value]) => { - (el.style as any)[key] = value; - }); - } -} - -export const isVertical = (placement: DrawerPlacement) => { - switch (placement) { - case "top": - case "bottom": - return true; - case "left": - case "right": - return false; - default: - return placement satisfies never; - } -}; - -export function getTranslate( - element: HTMLElement, - placement: DrawerPlacement -): number | null { - if (!element) { - return null; - } - const style = window.getComputedStyle(element); - const transform = - // @ts-ignore - style.transform || style.webkitTransform || style.mozTransform; - let mat = transform.match(/^matrix3d\((.+)\)$/); - if (mat) { - // https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d - return parseFloat(mat[1].split(", ")[isVertical(placement) ? 13 : 12]); - } - // https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix - mat = transform.match(/^matrix\((.+)\)$/); - return mat - ? parseFloat(mat[1].split(", ")[isVertical(placement) ? 5 : 4]) - : null; -} - -export function dampenValue(v: number) { - return 8 * (Math.log(v + 1) - 2); -} - -// Additional helpers - -function testPlatform(re: RegExp): boolean | undefined { - return window?.navigator != null - ? re.test(window.navigator.platform) - : undefined; -} - -function isMac(): boolean | undefined { - return testPlatform(/^Mac/); -} - -function isIPhone(): boolean | undefined { - return testPlatform(/^iPhone/); -} - -function isIPad(): boolean | undefined { - return ( - testPlatform(/^iPad/) || - // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support. - (isMac() && navigator.maxTouchPoints > 1) - ); -} - -function isIOS(): boolean | undefined { - return isIPhone() || isIPad(); -} - -const nonTextInputTypes = new Set([ - "checkbox", - "radio", - "range", - "color", - "file", - "image", - "button", - "submit", - "reset", -]); -function isInput(target: Element) { - return ( - (target instanceof HTMLInputElement && - !nonTextInputTypes.has(target.type)) || - target instanceof HTMLTextAreaElement || - (target instanceof HTMLElement && target.isContentEditable) - ); -} +/* eslint-disable */ + +/* This hook is in progress */ +import React from "react"; +import { OverlayTriggerStateContext } from "react-aria-components"; + +interface useMotionDrawerProps { + open?: boolean; + onOpenChange?: (open: boolean) => void; + scaleBackground?: boolean; + closeThreshold?: number; + scrollLockTimeout?: number; + isDismissable?: boolean; + placement?: "top" | "bottom" | "left" | "right"; +} + +type AnimationState = "unmounted" | "hidden" | "visible"; + +export const useMotionDrawer = (props: useMotionDrawerProps) => { + const { + scaleBackground = true, + closeThreshold = CLOSE_THRESHOLD, + scrollLockTimeout = SCROLL_LOCK_TIMEOUT, + isDismissable = true, + placement = "bottom", + } = props; + const contextState = React.useContext(OverlayTriggerStateContext); + const context = React.useContext(DrawerInternalContext); + const state = contextState; + const [animation, setAnimation] = React.useState("unmounted"); + const isEntering = animation === "visible"; + const isExiting = animation === "hidden"; + const nested = !!context; + + const drawerRef = React.useRef(null); + const backdropRef = React.useRef(null); + const dragStartTime = React.useRef(null); + const dragEndTime = React.useRef(null); + + const [isDragging, setDragging] = React.useState(false); + const drawerHeightRef = React.useRef( + drawerRef.current?.getBoundingClientRect().height || 0 + ); + const pointerStartRef = React.useRef<{ x: number; y: number } | null>(null); + const pointerStart = React.useRef(0); + const keyboardIsOpen = React.useRef(false); + const initialDrawerHeight = React.useRef(0); + const previousDiffFromInitial = React.useRef(0); + + function shouldDrag(el: EventTarget) { + // TODO: add more conditions (scrollLockTimeout / when animating / placement right and left / swipe amout? / scrollable element / ...) + const selectedText = window.getSelection()?.toString(); + if (selectedText && selectedText.length > 0) return false; + if (!isVertical(placement)) return true; + // TODO: Disallow drag when entering or exiting + const swipeAmount = drawerRef.current + ? getTranslate(drawerRef.current, placement) + : null; + if ( + swipeAmount !== null && + (placement === "bottom" ? swipeAmount > 0 : swipeAmount < 0) + ) + return true; + // TODO: SCROLLLOCKTIMEOUT + // TODO: DRAG IN placement + let element = el as HTMLElement; + while (element) { + if (element.scrollHeight > element.clientHeight) { + if (element.scrollTop !== 0) { + return false; + } + if (element.getAttribute("role") === "dialog") { + return true; + } + } + element = element.parentNode as HTMLElement; + } + return true; + } + + function resetDrawer() { + if (!drawerRef.current) return; + const wrapper = document.querySelector("[drawer-wrapper]"); + const currentSwipeAmount = getTranslate(drawerRef.current, placement); + set(drawerRef.current, { + transform: "translate3d(0, 0, 0)", + transition: `transform ${ + TRANSITIONS.DURATION + }s cubic-bezier(${TRANSITIONS.EASE.join(",")})`, + }); + set(backdropRef.current, { + transition: `opacity ${ + TRANSITIONS.DURATION + }s cubic-bezier(${TRANSITIONS.EASE.join(",")})`, + opacity: "1", + }); + // TODO: put this in a function (resetBody) + if ( + scaleBackground && + currentSwipeAmount && + currentSwipeAmount > 0 && + state.isOpen && + !nested + ) { + set( + wrapper, + { + borderRadius: `${BORDER_RADIUS}px`, + ...(isVertical(placement) + ? { + transform: `scale(${getScale()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`, + transformOrigin: "top", + } + : { + transform: `scale(${getScale()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`, + transformOrigin: "left", + }), + transitionProperty: "transform, border-radius", + transitionDuration: `${TRANSITIONS.DURATION}s`, + transitionTimingFunction: `cubic-bezier(${TRANSITIONS.EASE.join( + "," + )})`, + }, + true + ); + } + } + + function onPress(event: React.PointerEvent) { + if (drawerRef.current && !drawerRef.current.contains(event.target as Node)) + return; + drawerHeightRef.current = + drawerRef.current?.getBoundingClientRect().height || 0; + setDragging(true); + dragStartTime.current = new Date(); + // if (isIOS()) { + // window.addEventListener('touchend', () => (isAllowedToDrag.current = false), { once: true }); + // } + (event.target as HTMLElement).setPointerCapture(event.pointerId); + pointerStart.current = isVertical(placement) + ? event.clientY + : event.clientX; + } + + function onDrag(event: React.PointerEvent) { + if (!drawerRef.current || !isDragging || !shouldDrag(event.target)) return; + const placementMultiplier = + placement === "bottom" || placement === "right" ? 1 : -1; + const draggedDistance = + (pointerStart.current - + (isVertical(placement) ? event.clientY : event.clientX)) * + placementMultiplier; + const isDraggingInDirection = draggedDistance > 0; + const absDraggedDistance = Math.abs(draggedDistance); + const wrapper = document.querySelector("[drawer-wrapper]"); + const percentageDragged = absDraggedDistance / drawerHeightRef.current; + if (nested) context.onNestedDrag(percentageDragged); + set(drawerRef.current, { transition: "none" }); // WHY? + set(backdropRef.current, { transition: "none" }); // WHY? + if (isDraggingInDirection) { + const dampenedDraggedDistance = dampenValue(draggedDistance); + const translateValue = + Math.min(dampenedDraggedDistance * -1, 0) * placementMultiplier; + set(drawerRef.current, { + transform: isVertical(placement) + ? `translate3d(0, ${translateValue}px, 0)` + : `translate3d(${translateValue}px, 0, 0)`, + }); + return; + } + const opacityValue = 1 - percentageDragged; + set( + backdropRef.current, + { opacity: `${opacityValue}`, transition: "none" }, + true + ); + if (wrapper && backdropRef.current && scaleBackground && !nested) { + // Calculate percentageDragged as a fraction (0 to 1) + const scaleValue = Math.min( + getScale() + percentageDragged * (1 - getScale()), + 1 + ); + const borderRadiusValue = 8 - percentageDragged * 8; + const translateValue = Math.max(0, 14 - percentageDragged * 14); + set( + wrapper, + { + borderRadius: `${borderRadiusValue}px`, + transform: isVertical(placement) + ? `scale(${scaleValue}) translate3d(0, ${translateValue}px, 0)` + : `scale(${scaleValue}) translate3d(${translateValue}px, 0, 0)`, + transition: "none", + }, + true + ); + } + const translateValue = absDraggedDistance * placementMultiplier; + set(drawerRef.current, { + transform: isVertical(placement) + ? `translate3d(0, ${translateValue}px, 0)` + : `translate3d(${translateValue}px, 0, 0)`, + }); + + // TODO: transform body + } + + function onRelease(event: React.PointerEvent) { + if (!isDragging || !drawerRef.current) return; + if (nested) context.onNestedRelease(true); + setDragging(false); + dragEndTime.current = new Date(); + const swipeAmount = getTranslate(drawerRef.current, placement); + if (!shouldDrag(event.target) || !swipeAmount || isNaN(swipeAmount)) return; + if (dragStartTime.current === null) return; + // TODO: check for justReleased (to not focus on an element on drag end) + const timeTaken = + dragEndTime.current.getTime() - dragStartTime.current.getTime(); + const distMoved = + pointerStart.current - + (isVertical(placement) ? event.clientY : event.clientX); + const velocity = Math.abs(distMoved) / timeTaken; + if ( + placement === "bottom" || placement === "right" + ? distMoved > 0 + : distMoved < 0 + ) { + resetDrawer(); + return; + } + if (velocity > VELOCITY_THRESHOLD) { + closeDrawer(); + return; + } + const visibleDrawerHeight = Math.min( + drawerRef.current.getBoundingClientRect().height ?? 0, + window.innerHeight + ); + if (swipeAmount >= visibleDrawerHeight * closeThreshold) { + closeDrawer(); + return; + } + resetDrawer(); + } + + function onPointerDown(event: React.PointerEvent) { + pointerStartRef.current = { x: event.clientX, y: event.clientY }; + onPress(event); + } + + function onPointerMove(event: React.PointerEvent) { + if (!pointerStartRef.current) return; + // TODO: Is allowed to swipe check? + onDrag(event); + } + + function onPointerUp(event: React.PointerEvent) { + pointerStartRef.current = null; + onRelease(event); + } + + function getScale() { + return (window.innerWidth - WINDOW_TOP_OFFSET) / window.innerWidth; + } + + function animateBody() { + if (nested) return; + const wrapper = document.querySelector("[drawer-wrapper]"); + if (!wrapper || !scaleBackground) return; + set(document.body, { + background: + document.body.style.backgroundColor || document.body.style.background, + }); + set(document.body, { background: "black" }, true); + set(wrapper, { + borderRadius: `${BORDER_RADIUS}px`, + ...(isVertical(placement) + ? { + transform: `scale(${getScale()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`, + transformOrigin: "top", + } + : { + transform: `scale(${getScale()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`, + transformOrigin: "left", + }), + transitionProperty: "transform, border-radius", + transitionDuration: `${TRANSITIONS.DURATION}s`, + transitionTimingFunction: `cubic-bezier(${TRANSITIONS.EASE.join(",")})`, + }); + } + + function resetBody() { + if (nested) return; + const wrapper = document.querySelector("[drawer-wrapper]"); + if (!wrapper || !scaleBackground) return; + reset(wrapper, "overflow"); + reset(wrapper, "transform"); + reset(wrapper, "borderRadius"); + set(wrapper, { + transitionProperty: "transform, border-radius", + transitionDuration: `${TRANSITIONS.DURATION}s`, + transitionTimingFunction: `cubic-bezier(${TRANSITIONS.EASE.join(",")})`, + }); + } + + function openDrawer() { + if (!drawerRef.current) return; + if (nested) context.onNestedOpenChange(true); + setAnimation("visible"); + animateBody(); + set(drawerRef.current, { + transform: `translate3d(0, 0, 0)`, + transition: `transform ${ + TRANSITIONS.DURATION + }s cubic-bezier(${TRANSITIONS.EASE.join(",")})`, + }); + set(backdropRef.current, { + opacity: "1", + transition: `opacity ${ + TRANSITIONS.DURATION + }s cubic-bezier(${TRANSITIONS.EASE.join(",")})`, + }); + } + + function closeDrawer() { + if (!drawerRef.current) return; + if (nested) context.onNestedOpenChange(false); + setAnimation("hidden"); + resetBody(); + set(drawerRef.current, { + transform: isVertical(placement) + ? `translate3d(0, ${placement === "bottom" ? "100%" : "-100%"}, 0)` + : `translate3d(${placement === "right" ? "100%" : "-100%"}, 0, 0)`, + transition: `transform ${ + TRANSITIONS.DURATION + }s cubic-bezier(${TRANSITIONS.EASE.join(",")})`, + }); + set(backdropRef.current, { + opacity: "0", + transition: `opacity ${ + TRANSITIONS.DURATION + }s cubic-bezier(${TRANSITIONS.EASE.join(",")})`, + }); + } + + function handleTransitionEnd() { + if (isExiting) { + setAnimation("unmounted"); + reset(document.body); + state.close(); + } + } + + function handleOpenChange(isOpen: boolean) { + if (!isOpen) { + closeDrawer(); + } + } + + function handleNestedOpenChange(isOpen: boolean) { + const scale = isOpen + ? (window.innerWidth - NESTED_DISPLACEMENT) / window.innerWidth + : 1; + const y = isOpen ? -NESTED_DISPLACEMENT : 0; + set(drawerRef.current, { + transition: `transform ${ + TRANSITIONS.DURATION + }s cubic-bezier(${TRANSITIONS.EASE.join(",")})`, + transform: `scale(${scale}) translate3d(0, ${y}px, 0)`, + }); + } + + function handleNestedDrag(percentageDragged: number) { + if (percentageDragged < 0) return; + const initialDim = isVertical(placement) + ? window.innerHeight + : window.innerWidth; + const initialScale = (initialDim - NESTED_DISPLACEMENT) / initialDim; + const newScale = initialScale + percentageDragged * (1 - initialScale); + const newTranslate = + -NESTED_DISPLACEMENT + percentageDragged * NESTED_DISPLACEMENT; + set(drawerRef.current, { + transform: isVertical(placement) + ? `scale(${newScale}) translate3d(0, ${newTranslate}px, 0)` + : `scale(${newScale}) translate3d(${newTranslate}px, 0, 0)`, + transition: "none", + }); + } + + function handleNestedRelease(isOpen: boolean) { + const dim = isVertical(placement) ? window.innerHeight : window.innerWidth; + const scale = isOpen ? (dim - NESTED_DISPLACEMENT) / dim : 1; + const translate = isOpen ? -NESTED_DISPLACEMENT : 0; + if (isOpen) { + set(drawerRef.current, { + transition: `transform ${ + TRANSITIONS.DURATION + }s cubic-bezier(${TRANSITIONS.EASE.join(",")})`, + transform: isVertical(placement) + ? `scale(${scale}) translate3d(0, ${translate}px, 0)` + : `scale(${scale}) translate3d(${translate}px, 0, 0)`, + }); + } + } + + // TODO: ADD LOGIC FOR INPUT KEYBOARD OPEN ON MOBILE + + React.useEffect(() => { + function onVisualViewportChange() { + if (!drawerRef.current) return; + const focusedElement = document.activeElement as HTMLElement; + if (isInput(focusedElement) || keyboardIsOpen.current) { + const visualViewportHeight = window.visualViewport?.height || 0; + const diffFromInitial = window.innerHeight - visualViewportHeight; + const drawerHeight = + drawerRef.current.getBoundingClientRect().height || 0; + if (!initialDrawerHeight.current) { + initialDrawerHeight.current = drawerHeight; + } + const offsetFromTop = drawerRef.current.getBoundingClientRect().top; + if (Math.abs(previousDiffFromInitial.current - diffFromInitial) > 60) { + keyboardIsOpen.current = !keyboardIsOpen.current; + } + previousDiffFromInitial.current = diffFromInitial; + if (drawerHeight > visualViewportHeight || keyboardIsOpen.current) { + const height = drawerRef.current.getBoundingClientRect().height; + let newDrawerHeight = height; + if (height > visualViewportHeight) { + newDrawerHeight = visualViewportHeight - WINDOW_TOP_OFFSET; + } + drawerRef.current.style.height = `${Math.max( + newDrawerHeight, + visualViewportHeight - offsetFromTop + )}px`; + } else { + drawerRef.current.style.height = `${initialDrawerHeight.current}px`; + } + drawerRef.current.style.bottom = `${Math.max(diffFromInitial, 0)}px`; + } + } + window.visualViewport?.addEventListener("resize", onVisualViewportChange); + return () => + window.visualViewport?.removeEventListener( + "resize", + onVisualViewportChange + ); + }, []); + + React.useEffect(() => { + if (state.isOpen) { + openDrawer(); + } else { + if (!nested) { + resetBody(); // to ensure that always the body is reset. + } + } + return () => { + resetBody(); + }; + }, [state.isOpen]); + + const rootProps = { + value: { + onNestedOpenChange: handleNestedOpenChange, + onNestedDrag: handleNestedDrag, + onNestedRelease: handleNestedRelease, + }, + }; + + const drawerProps = { + ref: drawerRef, + "data-rac": "", + "data-drawer": "", + "data-placement": placement, + "data-open": state.isOpen || undefined, + onTransitionEnd: handleTransitionEnd, + onPointerUp, + onPointerDown, + onPointerMove, + }; + + const modalProps = { + isOpen: state.isOpen, + onOpenChange: handleOpenChange, + isExiting, + }; + + const backdropProps = { ref: backdropRef }; + + return { + rootProps, + modalProps, + drawerProps, + backdropProps, + }; +}; + +export const MotionDrawerRoot = ({ + children, + value, +}: { + children: React.ReactNode; + value: DrawerInternalContextValue; +}) => { + return ( + + {children} + + ); +}; + +interface DrawerInternalContextValue { + onNestedOpenChange: (isOpen: boolean) => void; + onNestedDrag: (percentageDragged: number) => void; + onNestedRelease: (isOpen: boolean) => void; +} + +export const DrawerInternalContext = + React.createContext(null); + +export const useDrawerInternalContext = () => { + const context = React.useContext(DrawerInternalContext); + return context; +}; + +// Constants + +const CLOSE_THRESHOLD = 0.25; +const SCROLL_LOCK_TIMEOUT = 100; +const BORDER_RADIUS = 8; +const WINDOW_TOP_OFFSET = 26; +const TRANSITIONS = { + DURATION: 0.5, + EASE: [0.32, 0.72, 0, 1], +}; +const VELOCITY_THRESHOLD = 0.4; +const NESTED_DISPLACEMENT = 16; + +// Types + +type DrawerPlacement = "top" | "bottom" | "left" | "right"; + +// Helpers + +type Style = Record; + +const cache = new WeakMap(); + +export function isInView(el: HTMLElement): boolean { + const rect = el.getBoundingClientRect(); + + if (!window.visualViewport) return false; + + return ( + rect.top >= 0 && + rect.left >= 0 && + // Need + 40 for safari detection + rect.bottom <= window.visualViewport.height - 40 && + rect.right <= window.visualViewport.width + ); +} + +export function set( + el: Element | HTMLElement | null | undefined, + styles: Style, + ignoreCache = false +) { + if (!el || !(el instanceof HTMLElement)) return; + const originalStyles: Style = {}; + + Object.entries(styles).forEach(([key, value]: [string, string]) => { + if (key.startsWith("--")) { + el.style.setProperty(key, value); + return; + } + + originalStyles[key] = (el.style as any)[key]; + (el.style as any)[key] = value; + }); + + if (ignoreCache) return; + + cache.set(el, originalStyles); +} + +export function reset(el: Element | HTMLElement | null, prop?: string) { + if (!el || !(el instanceof HTMLElement)) return; + const originalStyles = cache.get(el); + + if (!originalStyles) { + return; + } + + if (prop) { + (el.style as any)[prop] = originalStyles[prop]; + } else { + Object.entries(originalStyles).forEach(([key, value]) => { + (el.style as any)[key] = value; + }); + } +} + +export const isVertical = (placement: DrawerPlacement) => { + switch (placement) { + case "top": + case "bottom": + return true; + case "left": + case "right": + return false; + default: + return placement satisfies never; + } +}; + +export function getTranslate( + element: HTMLElement, + placement: DrawerPlacement +): number | null { + if (!element) { + return null; + } + const style = window.getComputedStyle(element); + const transform = + // @ts-ignore + style.transform || style.webkitTransform || style.mozTransform; + let mat = transform.match(/^matrix3d\((.+)\)$/); + if (mat) { + // https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d + return parseFloat(mat[1].split(", ")[isVertical(placement) ? 13 : 12]); + } + // https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix + mat = transform.match(/^matrix\((.+)\)$/); + return mat + ? parseFloat(mat[1].split(", ")[isVertical(placement) ? 5 : 4]) + : null; +} + +export function dampenValue(v: number) { + return 8 * (Math.log(v + 1) - 2); +} + +// Additional helpers + +function testPlatform(re: RegExp): boolean | undefined { + return window?.navigator != null + ? re.test(window.navigator.platform) + : undefined; +} + +function isMac(): boolean | undefined { + return testPlatform(/^Mac/); +} + +function isIPhone(): boolean | undefined { + return testPlatform(/^iPhone/); +} + +function isIPad(): boolean | undefined { + return ( + // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support. + testPlatform(/^iPad/) || (isMac() && navigator.maxTouchPoints > 1) + ); +} + +function isIOS(): boolean | undefined { + return isIPhone() || isIPad(); +} + +const nonTextInputTypes = new Set([ + "checkbox", + "radio", + "range", + "color", + "file", + "image", + "button", + "submit", + "reset", +]); +function isInput(target: Element) { + return ( + (target instanceof HTMLInputElement && + !nonTextInputTypes.has(target.type)) || + target instanceof HTMLTextAreaElement || + (target instanceof HTMLElement && target.isContentEditable) + ); +} diff --git a/www/src/registry/ui/default/core/progress/demos/composition.tsx b/www/src/registry/ui/default/core/progress/demos/composition.tsx index 7c43517c..2674d291 100644 --- a/www/src/registry/ui/default/core/progress/demos/composition.tsx +++ b/www/src/registry/ui/default/core/progress/demos/composition.tsx @@ -1,19 +1,19 @@ -"use client"; - -import * as React from "react"; -import { Label } from "react-aria-components"; -import { - ProgressIndicator, - ProgressRoot, - ProgressValueLabel, -} from "@/registry/ui/default/core/progress"; - -export default function Demo() { - return ( - - - - - - ); -} +"use client"; + +import * as React from "react"; +import { Label } from "react-aria-components"; +import { + ProgressIndicator, + ProgressRoot, + ProgressValueLabel, +} from "@/registry/ui/default/core/progress"; + +export default function Demo() { + return ( + + + + + + ); +} diff --git a/www/src/registry/ui/default/core/progress/demos/custom-color.tsx b/www/src/registry/ui/default/core/progress/demos/custom-color.tsx index 62979e25..299b983e 100644 --- a/www/src/registry/ui/default/core/progress/demos/custom-color.tsx +++ b/www/src/registry/ui/default/core/progress/demos/custom-color.tsx @@ -1,17 +1,17 @@ -"use client"; - -import * as React from "react"; -import { Progress } from "@/registry/ui/default/core/progress"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import * as React from "react"; +import { Progress } from "@/registry/ui/default/core/progress"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/progress/demos/custom-value-label.tsx b/www/src/registry/ui/default/core/progress/demos/custom-value-label.tsx index 501e4a31..1f56fb4b 100644 --- a/www/src/registry/ui/default/core/progress/demos/custom-value-label.tsx +++ b/www/src/registry/ui/default/core/progress/demos/custom-value-label.tsx @@ -1,15 +1,15 @@ -"use client"; - -import * as React from "react"; -import { Progress } from "@/registry/ui/default/core/progress"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import * as React from "react"; +import { Progress } from "@/registry/ui/default/core/progress"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/progress/demos/default.tsx b/www/src/registry/ui/default/core/progress/demos/default.tsx index 47726ede..00bafd9e 100644 --- a/www/src/registry/ui/default/core/progress/demos/default.tsx +++ b/www/src/registry/ui/default/core/progress/demos/default.tsx @@ -1,8 +1,8 @@ -"use client"; - -import * as React from "react"; -import { Progress } from "@/registry/ui/default/core/progress"; - -export default function Demo() { - return ; -} +"use client"; + +import * as React from "react"; +import { Progress } from "@/registry/ui/default/core/progress"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/progress/demos/duration.tsx b/www/src/registry/ui/default/core/progress/demos/duration.tsx index 7bc189f2..85668506 100644 --- a/www/src/registry/ui/default/core/progress/demos/duration.tsx +++ b/www/src/registry/ui/default/core/progress/demos/duration.tsx @@ -1,19 +1,19 @@ -"use client"; - -import * as React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { Progress } from "@/registry/ui/default/core/progress"; -import { RotateCwIcon } from "@/__icons__"; - -export default function Demo() { - const [key, setKey] = React.useState(0); - const restart = () => setKey((prev) => prev + 1); - return ( -
      - - -
      - ); -} +"use client"; + +import * as React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { Progress } from "@/registry/ui/default/core/progress"; +import { RotateCwIcon } from "@/__icons__"; + +export default function Demo() { + const [key, setKey] = React.useState(0); + const restart = () => setKey((prev) => prev + 1); + return ( +
      + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/progress/demos/format-options.tsx b/www/src/registry/ui/default/core/progress/demos/format-options.tsx index 5133b62e..7ab4d47c 100644 --- a/www/src/registry/ui/default/core/progress/demos/format-options.tsx +++ b/www/src/registry/ui/default/core/progress/demos/format-options.tsx @@ -1,15 +1,15 @@ -"use client"; - -import * as React from "react"; -import { Progress } from "@/registry/ui/default/core/progress"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import * as React from "react"; +import { Progress } from "@/registry/ui/default/core/progress"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/progress/demos/indeterminate.tsx b/www/src/registry/ui/default/core/progress/demos/indeterminate.tsx index f4e81fce..e8cf9cf2 100644 --- a/www/src/registry/ui/default/core/progress/demos/indeterminate.tsx +++ b/www/src/registry/ui/default/core/progress/demos/indeterminate.tsx @@ -1,8 +1,8 @@ -"use client"; - -import * as React from "react"; -import { Progress } from "@/registry/ui/default/core/progress"; - -export default function Demo() { - return ; -} +"use client"; + +import * as React from "react"; +import { Progress } from "@/registry/ui/default/core/progress"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/progress/demos/label.tsx b/www/src/registry/ui/default/core/progress/demos/label.tsx index 9781540d..06802a3f 100644 --- a/www/src/registry/ui/default/core/progress/demos/label.tsx +++ b/www/src/registry/ui/default/core/progress/demos/label.tsx @@ -1,13 +1,13 @@ -"use client"; - -import * as React from "react"; -import { Progress } from "@/registry/ui/default/core/progress"; - -export default function Demo() { - return ( -
      - - -
      - ); -} +"use client"; + +import * as React from "react"; +import { Progress } from "@/registry/ui/default/core/progress"; + +export default function Demo() { + return ( +
      + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/progress/demos/min-max-values.tsx b/www/src/registry/ui/default/core/progress/demos/min-max-values.tsx index 9fe8308c..d02312c4 100644 --- a/www/src/registry/ui/default/core/progress/demos/min-max-values.tsx +++ b/www/src/registry/ui/default/core/progress/demos/min-max-values.tsx @@ -1,15 +1,15 @@ -"use client"; - -import * as React from "react"; -import { Progress } from "@/registry/ui/default/core/progress"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import * as React from "react"; +import { Progress } from "@/registry/ui/default/core/progress"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/progress/demos/shape.tsx b/www/src/registry/ui/default/core/progress/demos/shape.tsx index 933f45a4..e7aa9905 100644 --- a/www/src/registry/ui/default/core/progress/demos/shape.tsx +++ b/www/src/registry/ui/default/core/progress/demos/shape.tsx @@ -1,8 +1,8 @@ -"use client"; - -import * as React from "react"; -import { Progress } from "@/registry/ui/default/core/progress"; - -export default function Demo() { - return ; -} +"use client"; + +import * as React from "react"; +import { Progress } from "@/registry/ui/default/core/progress"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/progress/demos/sizes.tsx b/www/src/registry/ui/default/core/progress/demos/sizes.tsx index a89c15f5..3cb2e656 100644 --- a/www/src/registry/ui/default/core/progress/demos/sizes.tsx +++ b/www/src/registry/ui/default/core/progress/demos/sizes.tsx @@ -1,22 +1,22 @@ -"use client"; - -import * as React from "react"; -import { Progress } from "@/registry/ui/default/core/progress"; - -const sizes = ["sm", "md", "lg"] as const; - -export default function Demo() { - return ( -
      - {sizes.map((size) => ( - - ))} -
      - ); -} +"use client"; + +import * as React from "react"; +import { Progress } from "@/registry/ui/default/core/progress"; + +const sizes = ["sm", "md", "lg"] as const; + +export default function Demo() { + return ( +
      + {sizes.map((size) => ( + + ))} +
      + ); +} diff --git a/www/src/registry/ui/default/core/progress/demos/toolbar.tsx b/www/src/registry/ui/default/core/progress/demos/toolbar.tsx index 4d8ee2ae..28813d52 100644 --- a/www/src/registry/ui/default/core/progress/demos/toolbar.tsx +++ b/www/src/registry/ui/default/core/progress/demos/toolbar.tsx @@ -1,47 +1,47 @@ -"use client"; - -import * as React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { Input, InputRoot } from "@/registry/ui/default/core/input"; -import { Progress } from "@/registry/ui/default/core/progress"; -import { TextFieldRoot } from "@/registry/ui/default/core/text-field"; -import { ALargeSmallIcon, RotateCwIcon } from "@/__icons__"; - -export default function Demo() { - const [key, setKey] = React.useState(0); - const refresh = () => setKey((key) => key + 1); - return ( - - - - - - - - - ); -} +"use client"; + +import * as React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { Input, InputRoot } from "@/registry/ui/default/core/input"; +import { Progress } from "@/registry/ui/default/core/progress"; +import { TextFieldRoot } from "@/registry/ui/default/core/text-field"; +import { ALargeSmallIcon, RotateCwIcon } from "@/__icons__"; + +export default function Demo() { + const [key, setKey] = React.useState(0); + const refresh = () => setKey((key) => key + 1); + return ( + + + + + + + + + ); +} diff --git a/www/src/registry/ui/default/core/progress/demos/value-label.tsx b/www/src/registry/ui/default/core/progress/demos/value-label.tsx index f47a8c20..2b2eb171 100644 --- a/www/src/registry/ui/default/core/progress/demos/value-label.tsx +++ b/www/src/registry/ui/default/core/progress/demos/value-label.tsx @@ -1,8 +1,8 @@ -"use client"; - -import * as React from "react"; -import { Progress } from "@/registry/ui/default/core/progress"; - -export default function Demo() { - return ; -} +"use client"; + +import * as React from "react"; +import { Progress } from "@/registry/ui/default/core/progress"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/progress/demos/variants.tsx b/www/src/registry/ui/default/core/progress/demos/variants.tsx index fa60650e..02ce6951 100644 --- a/www/src/registry/ui/default/core/progress/demos/variants.tsx +++ b/www/src/registry/ui/default/core/progress/demos/variants.tsx @@ -1,14 +1,14 @@ -import * as React from "react"; -import { Progress } from "@/registry/ui/default/core/progress"; - -const variants = ["default", "success", "accent", "danger", "warning"] as const; - -export default function Demo() { - return ( -
      - {variants.map((variant) => ( - - ))} -
      - ); -} +import * as React from "react"; +import { Progress } from "@/registry/ui/default/core/progress"; + +const variants = ["default", "success", "accent", "danger", "warning"] as const; + +export default function Demo() { + return ( +
      + {variants.map((variant) => ( + + ))} +
      + ); +} diff --git a/www/src/registry/ui/default/core/progress/index.ts b/www/src/registry/ui/default/core/progress/index.ts index 148e9591..1a638afa 100644 --- a/www/src/registry/ui/default/core/progress/index.ts +++ b/www/src/registry/ui/default/core/progress/index.ts @@ -1 +1 @@ -export * from "./progress"; +export * from "./progress"; diff --git a/www/src/registry/ui/default/core/progress/progress.tsx b/www/src/registry/ui/default/core/progress/progress.tsx index e03b1ea5..a6f64f21 100644 --- a/www/src/registry/ui/default/core/progress/progress.tsx +++ b/www/src/registry/ui/default/core/progress/progress.tsx @@ -1,232 +1,232 @@ -"use client"; - -import * as React from "react"; -import { - ProgressBar as AriaProgress, - composeRenderProps, - type ProgressBarProps as AriaProgressProps, -} from "react-aria-components"; -import { tv, type VariantProps } from "tailwind-variants"; -import { Label } from "@/registry/ui/default/core/field"; -import { cn } from "@/registry/ui/default/lib/cn"; - -const progressStyles = tv({ - slots: { - root: "flex w-60 flex-col gap-2", - indicator: "relative h-2.5 w-full overflow-hidden rounded-full", - filler: - "animate-progress-grow bg-fg h-full w-full min-w-14 flex-1 origin-left transition-transform", - valueLabel: "text-sm", - }, - variants: { - variant: { - default: { - indicator: "bg-bg-muted", - filler: "bg-bg-primary", - }, - accent: { - indicator: "bg-bg-accent-muted", - filler: "bg-bg-accent", - }, - warning: { - indicator: "bg-bg-warning-muted", - filler: "bg-bg-warning", - }, - danger: { - indicator: "bg-bg-danger-muted", - filler: "bg-bg-danger", - }, - success: { - indicator: "bg-bg-success-muted", - filler: "bg-bg-success", - }, - }, - size: { - sm: { - indicator: "h-1", - }, - md: { - indicator: "h-2.5", - }, - lg: { - indicator: "h-4", - }, - }, - }, - defaultVariants: { - variant: "default", - shape: "bar", - size: "md", - }, -}); - -type ProgressSlots = keyof ReturnType; -type ProgressClassNames = { - [key in ProgressSlots]?: string; -}; - -interface ProgressProps - extends ProgressRootProps, - VariantProps { - label?: string; - showValueLabel?: boolean; - duration?: string; - classNames?: ProgressClassNames; -} -const Progress = ({ - label, - showValueLabel = false, - variant, - size, - duration, - className, - classNames, - ...props -}: ProgressProps) => { - return ( - - {(label || showValueLabel) && ( -
      - {label && } - {showValueLabel && } -
      - )} - -
      - ); -}; - -interface ProgressRootProps extends Omit { - duration?: string; - className?: string; -} -const ProgressRoot = ({ - className, - isIndeterminate, - duration, - ...props -}: ProgressRootProps) => { - const { root } = progressStyles(); - return ( - - {composeRenderProps( - props.children, - (children, { percentage, isIndeterminate, valueText }) => ( - - {children} - - ) - )} - - ); -}; - -interface ProgressIndicatorProps - extends React.HTMLAttributes, - VariantProps { - duration?: string; - classNames?: { - indicator?: string; - filler?: string; - }; -} -const ProgressIndicator = ({ - duration, - className, - variant, - size, - classNames, - ...props -}: ProgressIndicatorProps) => { - const { indicator, filler } = progressStyles({ variant, size }); - const { isIndeterminate, percentage } = useProgressContext(); - return ( -
      -
      -
      - ); -}; - -type ProgressValueLabelProps = React.HTMLAttributes; -const ProgressValueLabel = ({ - children, - className, - ...props -}: ProgressValueLabelProps) => { - const { valueLabel } = progressStyles(); - const { valueText } = useProgressContext(); - return ( - - {children ?? valueText} - - ); -}; - -type ProgressContextValue = { - percentage?: number; - isIndeterminate: boolean; - valueText?: string; -}; -const ProgressContext = React.createContext(null); -const useProgressContext = () => { - const context = React.useContext(ProgressContext); - if (!context) { - throw new Error( - "useProgressContext must be used within a ProgressProvider" - ); - } - return context; -}; - -export type { - ProgressProps, - ProgressRootProps, - ProgressIndicatorProps, - ProgressValueLabelProps, -}; -export { Progress, ProgressRoot, ProgressIndicator, ProgressValueLabel }; +"use client"; + +import * as React from "react"; +import { + ProgressBar as AriaProgress, + composeRenderProps, + type ProgressBarProps as AriaProgressProps, +} from "react-aria-components"; +import { tv, type VariantProps } from "tailwind-variants"; +import { Label } from "@/registry/ui/default/core/field"; +import { cn } from "@/registry/ui/default/lib/cn"; + +const progressStyles = tv({ + slots: { + root: "flex w-60 flex-col gap-2", + indicator: "relative h-2.5 w-full overflow-hidden rounded-full", + filler: + "animate-progress-grow bg-fg h-full w-full min-w-14 flex-1 origin-left transition-transform", + valueLabel: "text-sm", + }, + variants: { + variant: { + default: { + indicator: "bg-bg-muted", + filler: "bg-bg-primary", + }, + accent: { + indicator: "bg-bg-accent-muted", + filler: "bg-bg-accent", + }, + warning: { + indicator: "bg-bg-warning-muted", + filler: "bg-bg-warning", + }, + danger: { + indicator: "bg-bg-danger-muted", + filler: "bg-bg-danger", + }, + success: { + indicator: "bg-bg-success-muted", + filler: "bg-bg-success", + }, + }, + size: { + sm: { + indicator: "h-1", + }, + md: { + indicator: "h-2.5", + }, + lg: { + indicator: "h-4", + }, + }, + }, + defaultVariants: { + variant: "default", + shape: "bar", + size: "md", + }, +}); + +type ProgressSlots = keyof ReturnType; +type ProgressClassNames = { + [key in ProgressSlots]?: string; +}; + +interface ProgressProps + extends ProgressRootProps, + VariantProps { + label?: string; + showValueLabel?: boolean; + duration?: string; + classNames?: ProgressClassNames; +} +const Progress = ({ + label, + showValueLabel = false, + variant, + size, + duration, + className, + classNames, + ...props +}: ProgressProps) => { + return ( + + {(label || showValueLabel) && ( +
      + {label && } + {showValueLabel && } +
      + )} + +
      + ); +}; + +interface ProgressRootProps extends Omit { + duration?: string; + className?: string; +} +const ProgressRoot = ({ + className, + isIndeterminate, + duration, + ...props +}: ProgressRootProps) => { + const { root } = progressStyles(); + return ( + + {composeRenderProps( + props.children, + (children, { percentage, isIndeterminate, valueText }) => ( + + {children} + + ) + )} + + ); +}; + +interface ProgressIndicatorProps + extends React.HTMLAttributes, + VariantProps { + duration?: string; + classNames?: { + indicator?: string; + filler?: string; + }; +} +const ProgressIndicator = ({ + duration, + className, + variant, + size, + classNames, + ...props +}: ProgressIndicatorProps) => { + const { indicator, filler } = progressStyles({ variant, size }); + const { isIndeterminate, percentage } = useProgressContext(); + return ( +
      +
      +
      + ); +}; + +type ProgressValueLabelProps = React.HTMLAttributes; +const ProgressValueLabel = ({ + children, + className, + ...props +}: ProgressValueLabelProps) => { + const { valueLabel } = progressStyles(); + const { valueText } = useProgressContext(); + return ( + + {children ?? valueText} + + ); +}; + +type ProgressContextValue = { + percentage?: number; + isIndeterminate: boolean; + valueText?: string; +}; +const ProgressContext = React.createContext(null); +const useProgressContext = () => { + const context = React.useContext(ProgressContext); + if (!context) { + throw new Error( + "useProgressContext must be used within a ProgressProvider" + ); + } + return context; +}; + +export type { + ProgressProps, + ProgressRootProps, + ProgressIndicatorProps, + ProgressValueLabelProps, +}; +export { Progress, ProgressRoot, ProgressIndicator, ProgressValueLabel }; diff --git a/www/src/registry/ui/default/core/radio-group/demos/cards.tsx b/www/src/registry/ui/default/core/radio-group/demos/cards.tsx index b2cc195e..75a5f252 100644 --- a/www/src/registry/ui/default/core/radio-group/demos/cards.tsx +++ b/www/src/registry/ui/default/core/radio-group/demos/cards.tsx @@ -1,31 +1,31 @@ -import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; - -export default function Demo() { - return ( - - -
      - Small - Dimension: 128 x 128 -
      -
      - -
      - Medium - Dimension: 256 x 256 -
      -
      - -
      - Large - Dimension: 512 x 512 -
      -
      -
      - ); -} +import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; + +export default function Demo() { + return ( + + +
      + Small + Dimension: 128 x 128 +
      +
      + +
      + Medium + Dimension: 256 x 256 +
      +
      + +
      + Large + Dimension: 512 x 512 +
      +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/radio-group/demos/composition.tsx b/www/src/registry/ui/default/core/radio-group/demos/composition.tsx index db9f291c..e69dc8fa 100644 --- a/www/src/registry/ui/default/core/radio-group/demos/composition.tsx +++ b/www/src/registry/ui/default/core/radio-group/demos/composition.tsx @@ -1,21 +1,21 @@ -import { - Description, - FieldError, - Label, -} from "@/registry/ui/default/core/field"; -import { RadioGroupRoot, Radio } from "@/registry/ui/default/core/radio-group"; - -export default function Demo() { - return ( - - - Please select a size. -
      - Small - Medium - Large -
      - -
      - ); -} +import { + Description, + FieldError, + Label, +} from "@/registry/ui/default/core/field"; +import { RadioGroupRoot, Radio } from "@/registry/ui/default/core/radio-group"; + +export default function Demo() { + return ( + + + Please select a size. +
      + Small + Medium + Large +
      + +
      + ); +} diff --git a/www/src/registry/ui/default/core/radio-group/demos/contextual-help.tsx b/www/src/registry/ui/default/core/radio-group/demos/contextual-help.tsx index 74d0c0ee..1ee36aed 100644 --- a/www/src/registry/ui/default/core/radio-group/demos/contextual-help.tsx +++ b/www/src/registry/ui/default/core/radio-group/demos/contextual-help.tsx @@ -1,21 +1,21 @@ -import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; -import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; - -export default function Demo() { - return ( - - } - > - Small - Medium - Large - - ); -} +import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; +import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; + +export default function Demo() { + return ( + + } + > + Small + Medium + Large + + ); +} diff --git a/www/src/registry/ui/default/core/radio-group/demos/controlled.tsx b/www/src/registry/ui/default/core/radio-group/demos/controlled.tsx index 3d4705e8..3973ebd2 100644 --- a/www/src/registry/ui/default/core/radio-group/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/radio-group/demos/controlled.tsx @@ -1,22 +1,22 @@ -"use client"; - -import React from "react"; -import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; - -export default function Demo() { - const [size, setSize] = React.useState("sm"); - return ( -
      - setSize(value)} - > - Small - Medium - Large - -

      {`You selected: ${size}`}

      -
      - ); -} +"use client"; + +import React from "react"; +import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; + +export default function Demo() { + const [size, setSize] = React.useState("sm"); + return ( +
      + setSize(value)} + > + Small + Medium + Large + +

      {`You selected: ${size}`}

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/radio-group/demos/default.tsx b/www/src/registry/ui/default/core/radio-group/demos/default.tsx index 54f79faf..bff61130 100644 --- a/www/src/registry/ui/default/core/radio-group/demos/default.tsx +++ b/www/src/registry/ui/default/core/radio-group/demos/default.tsx @@ -1,11 +1,11 @@ -import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; - -export default function Demo() { - return ( - - Small - Medium - Large - - ); -} +import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; + +export default function Demo() { + return ( + + Small + Medium + Large + + ); +} diff --git a/www/src/registry/ui/default/core/radio-group/demos/description.tsx b/www/src/registry/ui/default/core/radio-group/demos/description.tsx index 4986daff..dde7ea84 100644 --- a/www/src/registry/ui/default/core/radio-group/demos/description.tsx +++ b/www/src/registry/ui/default/core/radio-group/demos/description.tsx @@ -1,15 +1,15 @@ -import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; - -export default function Demo() { - return ( - - Small - Medium - Large - - ); -} +import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; + +export default function Demo() { + return ( + + Small + Medium + Large + + ); +} diff --git a/www/src/registry/ui/default/core/radio-group/demos/disabled.tsx b/www/src/registry/ui/default/core/radio-group/demos/disabled.tsx index 1816b184..dc10b344 100644 --- a/www/src/registry/ui/default/core/radio-group/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/radio-group/demos/disabled.tsx @@ -1,20 +1,20 @@ -import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; - -export default function Demo() { - return ( -
      - - Small - Medium - Large - - - Small - - Medium - - Large - -
      - ); -} +import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; + +export default function Demo() { + return ( +
      + + Small + Medium + Large + + + Small + + Medium + + Large + +
      + ); +} diff --git a/www/src/registry/ui/default/core/radio-group/demos/error-message.tsx b/www/src/registry/ui/default/core/radio-group/demos/error-message.tsx index bca3f59e..06fb291d 100644 --- a/www/src/registry/ui/default/core/radio-group/demos/error-message.tsx +++ b/www/src/registry/ui/default/core/radio-group/demos/error-message.tsx @@ -1,16 +1,16 @@ -import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; - -export default function Demo() { - return ( - - Small - Medium - Large - - ); -} +import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; + +export default function Demo() { + return ( + + Small + Medium + Large + + ); +} diff --git a/www/src/registry/ui/default/core/radio-group/demos/label.tsx b/www/src/registry/ui/default/core/radio-group/demos/label.tsx index 8aa9201c..c5324e93 100644 --- a/www/src/registry/ui/default/core/radio-group/demos/label.tsx +++ b/www/src/registry/ui/default/core/radio-group/demos/label.tsx @@ -1,18 +1,18 @@ -import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; - -export default function Demo() { - return ( -
      - - Small - Medium - Large - - - Small - Medium - Large - -
      - ); -} +import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; + +export default function Demo() { + return ( +
      + + Small + Medium + Large + + + Small + Medium + Large + +
      + ); +} diff --git a/www/src/registry/ui/default/core/radio-group/demos/orientation.tsx b/www/src/registry/ui/default/core/radio-group/demos/orientation.tsx index 8ab2f54b..7c0e35fe 100644 --- a/www/src/registry/ui/default/core/radio-group/demos/orientation.tsx +++ b/www/src/registry/ui/default/core/radio-group/demos/orientation.tsx @@ -1,11 +1,11 @@ -import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; - -export default function Demo() { - return ( - - Small - Medium - Large - - ); -} +import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; + +export default function Demo() { + return ( + + Small + Medium + Large + + ); +} diff --git a/www/src/registry/ui/default/core/radio-group/demos/read-only.tsx b/www/src/registry/ui/default/core/radio-group/demos/read-only.tsx index 9f12fc94..7ee8d224 100644 --- a/www/src/registry/ui/default/core/radio-group/demos/read-only.tsx +++ b/www/src/registry/ui/default/core/radio-group/demos/read-only.tsx @@ -1,11 +1,11 @@ -import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; - -export default function Demo() { - return ( - - Small - Medium - Large - - ); -} +import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; + +export default function Demo() { + return ( + + Small + Medium + Large + + ); +} diff --git a/www/src/registry/ui/default/core/radio-group/demos/required.tsx b/www/src/registry/ui/default/core/radio-group/demos/required.tsx index df5c847d..71d24a36 100644 --- a/www/src/registry/ui/default/core/radio-group/demos/required.tsx +++ b/www/src/registry/ui/default/core/radio-group/demos/required.tsx @@ -1,35 +1,35 @@ -import React from "react"; -import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; - -export default function Demo() { - return ( -
      - - Small - Large - - - Small - Large - - - Small - Large - - - Small - Large - -
      - ); -} +import React from "react"; +import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; + +export default function Demo() { + return ( +
      + + Small + Large + + + Small + Large + + + Small + Large + + + Small + Large + +
      + ); +} diff --git a/www/src/registry/ui/default/core/radio-group/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/radio-group/demos/uncontrolled.tsx index ffd5a959..b5fce238 100644 --- a/www/src/registry/ui/default/core/radio-group/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/radio-group/demos/uncontrolled.tsx @@ -1,12 +1,12 @@ -import React from "react"; -import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; - -export default function Demo() { - return ( - - Small - Medium - Large - - ); -} +import React from "react"; +import { RadioGroup, Radio } from "@/registry/ui/default/core/radio-group"; + +export default function Demo() { + return ( + + Small + Medium + Large + + ); +} diff --git a/www/src/registry/ui/default/core/radio-group/index.ts b/www/src/registry/ui/default/core/radio-group/index.ts index ffd376c1..187faf8b 100644 --- a/www/src/registry/ui/default/core/radio-group/index.ts +++ b/www/src/registry/ui/default/core/radio-group/index.ts @@ -1 +1 @@ -export * from "./radio-group"; +export * from "./radio-group"; diff --git a/www/src/registry/ui/default/core/radio-group/radio-group.tsx b/www/src/registry/ui/default/core/radio-group/radio-group.tsx index 940a3d42..4ac29d1b 100644 --- a/www/src/registry/ui/default/core/radio-group/radio-group.tsx +++ b/www/src/registry/ui/default/core/radio-group/radio-group.tsx @@ -1,146 +1,146 @@ -"use client"; - -import * as React from "react"; -import { - composeRenderProps, - Radio as AriaRadio, - RadioGroup as AriaRadioGroup, - type RadioGroupProps as AriaRadioGroupProps, - type RadioProps as AriaRadioProps, -} from "react-aria-components"; -import { tv, type VariantProps } from "tailwind-variants"; -import { Field, type FieldProps } from "@/registry/ui/default/core/field"; -import { - focusRing, - focusRingGroup, -} from "@/registry/ui/default/lib/focus-styles"; - -const radioGroupStyles = tv({ - slots: { - root: "group/radio-group flex flex-col gap-2", - wrapper: - "group-orientation-horizontal/radio-group:flex-row group-orientation-horizontal/radio-group:gap-3 flex flex-col gap-1", - }, -}); - -const radioStyles = tv({ - slots: { - root: "disabled:text-fg-disabled invalid:text-fg-danger group flex cursor-pointer flex-row items-center gap-2 disabled:cursor-default", - indicator: [ - focusRing(), - "border-border-control group-selected:border-bg-primary group-selected:border-4 relative size-4 shrink-0 rounded-full border transition-all duration-100", - "group-disabled:border-border-disabled group-disabled:selected:bg-bg-disabled group-disabled:indeterminate:bg-bg-disabled", - "group-invalid:border-border-danger group-invalid:selected:border-bg-danger", - ], - }, - variants: { - variant: { - default: { - indicator: focusRingGroup(), - }, - card: { - root: [ - focusRing(), - "selected:bg-bg-muted disabled:selected:bg-bg-disabled disabled:border-border-disabled flex-row-reverse gap-4 rounded-md border p-4 transition-colors", - ], - }, - }, - }, - defaultVariants: { - variant: "default", - }, -}); - -interface RadioGroupProps - extends RadioGroupRootProps, - VariantProps, - Omit { - className?: string; -} -const RadioGroup = React.forwardRef< - React.ElementRef, - RadioGroupProps ->( - ( - { - label, - description, - errorMessage, - necessityIndicator, - contextualHelp, - ...props - }, - ref - ) => { - const { wrapper } = radioGroupStyles(); - return ( - - {composeRenderProps(props.children, (children, { isRequired }) => ( - -
      {children}
      -
      - ))} -
      - ); - } -); -RadioGroup.displayName = "RadioGroup"; - -interface RadioGroupRootProps - extends Omit, - VariantProps { - className?: string; -} -const RadioGroupRoot = React.forwardRef< - React.ElementRef, - RadioGroupRootProps ->(({ className, variant, ...props }, ref) => { - const { root } = radioGroupStyles(); - return ( - - - - ); -}); -RadioGroupRoot.displayName = "RadioGroupRoot"; - -interface RadioProps - extends Omit, - VariantProps { - className?: string; -} -const Radio = React.forwardRef, RadioProps>( - (localProps, ref) => { - const contextProps = useRadioContext(); - const props = { ...contextProps, ...localProps }; - const { className, variant, ...restProps } = props; - const { root, indicator } = radioStyles({ variant }); - return ( - - {composeRenderProps(props.children, (children) => ( - <> -
      - {children} - - ))} - - ); - } -); -Radio.displayName = "Radio"; - -type RadioContextValue = VariantProps; -const RadioContext = React.createContext({}); -const useRadioContext = () => { - return React.useContext(RadioContext); -}; - -export type { RadioGroupRootProps, RadioGroupProps, RadioProps }; -export { RadioGroupRoot, RadioGroup, Radio }; +"use client"; + +import * as React from "react"; +import { + composeRenderProps, + Radio as AriaRadio, + RadioGroup as AriaRadioGroup, + type RadioGroupProps as AriaRadioGroupProps, + type RadioProps as AriaRadioProps, +} from "react-aria-components"; +import { tv, type VariantProps } from "tailwind-variants"; +import { Field, type FieldProps } from "@/registry/ui/default/core/field"; +import { + focusRing, + focusRingGroup, +} from "@/registry/ui/default/lib/focus-styles"; + +const radioGroupStyles = tv({ + slots: { + root: "group/radio-group flex flex-col gap-2", + wrapper: + "group-orientation-horizontal/radio-group:flex-row group-orientation-horizontal/radio-group:gap-3 flex flex-col gap-1", + }, +}); + +const radioStyles = tv({ + slots: { + root: "disabled:text-fg-disabled invalid:text-fg-danger group flex cursor-pointer flex-row items-center gap-2 disabled:cursor-default", + indicator: [ + focusRing(), + "border-border-control group-selected:border-bg-primary group-selected:border-4 relative size-4 shrink-0 rounded-full border transition-all duration-100", + "group-disabled:border-border-disabled group-disabled:selected:bg-bg-disabled group-disabled:indeterminate:bg-bg-disabled", + "group-invalid:border-border-danger group-invalid:selected:border-bg-danger", + ], + }, + variants: { + variant: { + default: { + indicator: focusRingGroup(), + }, + card: { + root: [ + focusRing(), + "selected:bg-bg-muted disabled:selected:bg-bg-disabled disabled:border-border-disabled flex-row-reverse gap-4 rounded-md border p-4 transition-colors", + ], + }, + }, + }, + defaultVariants: { + variant: "default", + }, +}); + +interface RadioGroupProps + extends RadioGroupRootProps, + VariantProps, + Omit { + className?: string; +} +const RadioGroup = React.forwardRef< + React.ElementRef, + RadioGroupProps +>( + ( + { + label, + description, + errorMessage, + necessityIndicator, + contextualHelp, + ...props + }, + ref + ) => { + const { wrapper } = radioGroupStyles(); + return ( + + {composeRenderProps(props.children, (children, { isRequired }) => ( + +
      {children}
      +
      + ))} +
      + ); + } +); +RadioGroup.displayName = "RadioGroup"; + +interface RadioGroupRootProps + extends Omit, + VariantProps { + className?: string; +} +const RadioGroupRoot = React.forwardRef< + React.ElementRef, + RadioGroupRootProps +>(({ className, variant, ...props }, ref) => { + const { root } = radioGroupStyles(); + return ( + + + + ); +}); +RadioGroupRoot.displayName = "RadioGroupRoot"; + +interface RadioProps + extends Omit, + VariantProps { + className?: string; +} +const Radio = React.forwardRef, RadioProps>( + (localProps, ref) => { + const contextProps = useRadioContext(); + const props = { ...contextProps, ...localProps }; + const { className, variant, ...restProps } = props; + const { root, indicator } = radioStyles({ variant }); + return ( + + {composeRenderProps(props.children, (children) => ( + <> +
      + {children} + + ))} + + ); + } +); +Radio.displayName = "Radio"; + +type RadioContextValue = VariantProps; +const RadioContext = React.createContext({}); +const useRadioContext = () => { + return React.useContext(RadioContext); +}; + +export type { RadioGroupRootProps, RadioGroupProps, RadioProps }; +export { RadioGroupRoot, RadioGroup, Radio }; diff --git a/www/src/registry/ui/default/core/range-calendar/demos/composition.tsx b/www/src/registry/ui/default/core/range-calendar/demos/composition.tsx index 27b92d8d..d8368692 100644 --- a/www/src/registry/ui/default/core/range-calendar/demos/composition.tsx +++ b/www/src/registry/ui/default/core/range-calendar/demos/composition.tsx @@ -1,44 +1,44 @@ -"use client"; - -import { Button } from "@/registry/ui/default/core/button"; -import { - CalendarHeader, - CalendarGrid, - CalendarGridHeader, - CalendarHeaderCell, - CalendarGridBody, - CalendarCell, -} from "@/registry/ui/default/core/calendar"; -import { Heading } from "@/registry/ui/default/core/heading"; -import { RangeCalendarRoot } from "@/registry/ui/default/core/range-calendar"; -import { ChevronLeftIcon, ChevronRightIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - - - - - - {(day) => {day}} - - - {(date) => ( - - {({ formattedDate }) => ( - {formattedDate} - )} - - )} - - - - ); -} +"use client"; + +import { Button } from "@/registry/ui/default/core/button"; +import { + CalendarHeader, + CalendarGrid, + CalendarGridHeader, + CalendarHeaderCell, + CalendarGridBody, + CalendarCell, +} from "@/registry/ui/default/core/calendar"; +import { Heading } from "@/registry/ui/default/core/heading"; +import { RangeCalendarRoot } from "@/registry/ui/default/core/range-calendar"; +import { ChevronLeftIcon, ChevronRightIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + + + + + + {(day) => {day}} + + + {(date) => ( + + {({ formattedDate }) => ( + {formattedDate} + )} + + )} + + + + ); +} diff --git a/www/src/registry/ui/default/core/range-calendar/demos/controlled.tsx b/www/src/registry/ui/default/core/range-calendar/demos/controlled.tsx index 4468a995..3ff56875 100644 --- a/www/src/registry/ui/default/core/range-calendar/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/range-calendar/demos/controlled.tsx @@ -1,27 +1,27 @@ -"use client"; - -import React from "react"; -import { getLocalTimeZone, today } from "@internationalized/date"; -import { type DateRange } from "react-aria-components"; -import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; - -export default function Demo() { - const [range, setRange] = React.useState({ - start: today(getLocalTimeZone()), - end: today(getLocalTimeZone()).add({ weeks: 1 }), - }); - return ( -
      - -

      - Start date: {range?.start.toString()} -
      - End date: {range?.end.toString()} -

      -
      - ); -} +"use client"; + +import React from "react"; +import { getLocalTimeZone, today } from "@internationalized/date"; +import { type DateRange } from "react-aria-components"; +import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; + +export default function Demo() { + const [range, setRange] = React.useState({ + start: today(getLocalTimeZone()), + end: today(getLocalTimeZone()).add({ weeks: 1 }), + }); + return ( +
      + +

      + Start date: {range?.start.toString()} +
      + End date: {range?.end.toString()} +

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/range-calendar/demos/default.tsx b/www/src/registry/ui/default/core/range-calendar/demos/default.tsx index 23a40da5..d3c7c334 100644 --- a/www/src/registry/ui/default/core/range-calendar/demos/default.tsx +++ b/www/src/registry/ui/default/core/range-calendar/demos/default.tsx @@ -1,5 +1,5 @@ -import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; - -export default function Demo() { - return ; -} +import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/range-calendar/demos/disabled.tsx b/www/src/registry/ui/default/core/range-calendar/demos/disabled.tsx index b459a529..ad264c27 100644 --- a/www/src/registry/ui/default/core/range-calendar/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/range-calendar/demos/disabled.tsx @@ -1,5 +1,5 @@ -import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; - -export default function Demo() { - return ; -} +import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/range-calendar/demos/error-message.tsx b/www/src/registry/ui/default/core/range-calendar/demos/error-message.tsx index 3283b5ce..e87ea489 100644 --- a/www/src/registry/ui/default/core/range-calendar/demos/error-message.tsx +++ b/www/src/registry/ui/default/core/range-calendar/demos/error-message.tsx @@ -1,23 +1,23 @@ -"use client"; - -import React from "react"; -import { today, getLocalTimeZone } from "@internationalized/date"; -import { type DateRange } from "react-aria-components"; -import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; - -export default function Demo() { - const [range, setRange] = React.useState({ - start: today(getLocalTimeZone()), - end: today(getLocalTimeZone()).add({ weeks: 1, days: 3 }), - }); - const isInvalid = range ? range.end.compare(range.start) > 7 : false; - return ( - - ); -} +"use client"; + +import React from "react"; +import { today, getLocalTimeZone } from "@internationalized/date"; +import { type DateRange } from "react-aria-components"; +import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; + +export default function Demo() { + const [range, setRange] = React.useState({ + start: today(getLocalTimeZone()), + end: today(getLocalTimeZone()).add({ weeks: 1, days: 3 }), + }); + const isInvalid = range ? range.end.compare(range.start) > 7 : false; + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/range-calendar/demos/label.tsx b/www/src/registry/ui/default/core/range-calendar/demos/label.tsx index 09b0c9fc..8f0f24e1 100644 --- a/www/src/registry/ui/default/core/range-calendar/demos/label.tsx +++ b/www/src/registry/ui/default/core/range-calendar/demos/label.tsx @@ -1,5 +1,5 @@ -import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; - -export default function Demo() { - return ; -} +import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/range-calendar/demos/non-contiguous-ranges.tsx b/www/src/registry/ui/default/core/range-calendar/demos/non-contiguous-ranges.tsx index 9618db89..4e7e414d 100644 --- a/www/src/registry/ui/default/core/range-calendar/demos/non-contiguous-ranges.tsx +++ b/www/src/registry/ui/default/core/range-calendar/demos/non-contiguous-ranges.tsx @@ -1,32 +1,32 @@ -"use client"; - -import { - type DateValue, - getLocalTimeZone, - today, -} from "@internationalized/date"; -import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; - -export default function Demo() { - const now = today(getLocalTimeZone()); - const disabledRanges = [ - [now, now.add({ days: 5 })], - [now.add({ days: 14 }), now.add({ days: 16 })], - [now.add({ days: 23 }), now.add({ days: 24 })], - ]; - - const isDateUnavailable = (date: DateValue) => - disabledRanges.some( - (interval) => - date.compare(interval[0]) >= 0 && date.compare(interval[1]) <= 0 - ); - - return ( - - ); -} +"use client"; + +import { + type DateValue, + getLocalTimeZone, + today, +} from "@internationalized/date"; +import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; + +export default function Demo() { + const now = today(getLocalTimeZone()); + const disabledRanges = [ + [now, now.add({ days: 5 })], + [now.add({ days: 14 }), now.add({ days: 16 })], + [now.add({ days: 23 }), now.add({ days: 24 })], + ]; + + const isDateUnavailable = (date: DateValue) => + disabledRanges.some( + (interval) => + date.compare(interval[0]) >= 0 && date.compare(interval[1]) <= 0 + ); + + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/range-calendar/demos/page-behaviour.tsx b/www/src/registry/ui/default/core/range-calendar/demos/page-behaviour.tsx index 9bd99dd0..a1b5f861 100644 --- a/www/src/registry/ui/default/core/range-calendar/demos/page-behaviour.tsx +++ b/www/src/registry/ui/default/core/range-calendar/demos/page-behaviour.tsx @@ -1,5 +1,5 @@ -import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; - -export default function Demo() { - return ; -} +import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/range-calendar/demos/read-only.tsx b/www/src/registry/ui/default/core/range-calendar/demos/read-only.tsx index 041e9be2..62a58eb6 100644 --- a/www/src/registry/ui/default/core/range-calendar/demos/read-only.tsx +++ b/www/src/registry/ui/default/core/range-calendar/demos/read-only.tsx @@ -1,17 +1,17 @@ -"use client"; - -import { getLocalTimeZone, today } from "@internationalized/date"; -import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import { getLocalTimeZone, today } from "@internationalized/date"; +import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/range-calendar/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/range-calendar/demos/uncontrolled.tsx index 9fb5637a..aa23d34b 100644 --- a/www/src/registry/ui/default/core/range-calendar/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/range-calendar/demos/uncontrolled.tsx @@ -1,17 +1,17 @@ -"use client"; - -import React from "react"; -import { getLocalTimeZone, today } from "@internationalized/date"; -import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import React from "react"; +import { getLocalTimeZone, today } from "@internationalized/date"; +import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/range-calendar/demos/unvailable-dates.tsx b/www/src/registry/ui/default/core/range-calendar/demos/unvailable-dates.tsx index 2345ba08..ef28ac19 100644 --- a/www/src/registry/ui/default/core/range-calendar/demos/unvailable-dates.tsx +++ b/www/src/registry/ui/default/core/range-calendar/demos/unvailable-dates.tsx @@ -1,31 +1,31 @@ -"use client"; - -import { - type DateValue, - getLocalTimeZone, - today, -} from "@internationalized/date"; -import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; - -export default function Demo() { - const now = today(getLocalTimeZone()); - const disabledRanges = [ - [now, now.add({ days: 5 })], - [now.add({ days: 14 }), now.add({ days: 16 })], - [now.add({ days: 23 }), now.add({ days: 24 })], - ]; - - const isDateUnavailable = (date: DateValue) => - disabledRanges.some( - (interval) => - date.compare(interval[0]) >= 0 && date.compare(interval[1]) <= 0 - ); - - return ( - - ); -} +"use client"; + +import { + type DateValue, + getLocalTimeZone, + today, +} from "@internationalized/date"; +import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; + +export default function Demo() { + const now = today(getLocalTimeZone()); + const disabledRanges = [ + [now, now.add({ days: 5 })], + [now.add({ days: 14 }), now.add({ days: 16 })], + [now.add({ days: 23 }), now.add({ days: 24 })], + ]; + + const isDateUnavailable = (date: DateValue) => + disabledRanges.some( + (interval) => + date.compare(interval[0]) >= 0 && date.compare(interval[1]) <= 0 + ); + + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/range-calendar/demos/validation.tsx b/www/src/registry/ui/default/core/range-calendar/demos/validation.tsx index d9bb7977..9f466d50 100644 --- a/www/src/registry/ui/default/core/range-calendar/demos/validation.tsx +++ b/www/src/registry/ui/default/core/range-calendar/demos/validation.tsx @@ -1,13 +1,13 @@ -"use client"; - -import { getLocalTimeZone, today } from "@internationalized/date"; -import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; - -export default function Demo() { - return ( - - ); -} +"use client"; + +import { getLocalTimeZone, today } from "@internationalized/date"; +import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/range-calendar/demos/visible-months.tsx b/www/src/registry/ui/default/core/range-calendar/demos/visible-months.tsx index 6693480e..d60211fe 100644 --- a/www/src/registry/ui/default/core/range-calendar/demos/visible-months.tsx +++ b/www/src/registry/ui/default/core/range-calendar/demos/visible-months.tsx @@ -1,5 +1,5 @@ -import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; - -export default function Demo() { - return ; -} +import { RangeCalendar } from "@/registry/ui/default/core/range-calendar"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/range-calendar/index.ts b/www/src/registry/ui/default/core/range-calendar/index.ts index a56de42b..8fda7ff1 100644 --- a/www/src/registry/ui/default/core/range-calendar/index.ts +++ b/www/src/registry/ui/default/core/range-calendar/index.ts @@ -1 +1 @@ -export * from "./range-calendar"; +export * from "./range-calendar"; diff --git a/www/src/registry/ui/default/core/range-calendar/range-calendar.tsx b/www/src/registry/ui/default/core/range-calendar/range-calendar.tsx index 15a328ee..5feeb1d8 100644 --- a/www/src/registry/ui/default/core/range-calendar/range-calendar.tsx +++ b/www/src/registry/ui/default/core/range-calendar/range-calendar.tsx @@ -1,98 +1,98 @@ -"use client"; - -import * as React from "react"; -import { - composeRenderProps, - RangeCalendar as AriaRangeCalendar, - type RangeCalendarProps as AriaRangeCalendarProps, - type DateValue, - RangeCalendarContext as AriaRangeCalendarContext, - useSlottedContext, -} from "react-aria-components"; -import { Button } from "@/registry/ui/default/core/button"; -import { - CalendarHeader, - CalendarGrid, - CalendarGridHeader, - CalendarHeaderCell, - CalendarGridBody, - CalendarCell, - calendarStyles, -} from "@/registry/ui/default/core/calendar"; -import { Heading } from "@/registry/ui/default/core/heading"; -import { Text } from "@/registry/ui/default/core/text"; -import { ChevronLeftIcon, ChevronRightIcon } from "@/__icons__"; - -interface RangeCalendarProps - extends Omit, "visibleDuration"> { - visibleMonths?: number; - errorMessage?: string; -} -const RangeCalendar = ({ - visibleMonths = 1, - errorMessage, - ...props -}: RangeCalendarProps) => { - visibleMonths = Math.min(Math.max(visibleMonths, 1), 3); - return ( - - {({ isInvalid }) => ( - <> - - - - - -
      - {Array.from({ length: visibleMonths }).map((_, index) => ( - - - {(day) => {day}} - - - {(date) => ( - - {({ formattedDate }) => ( - {formattedDate} - )} - - )} - - - ))} -
      - {isInvalid && errorMessage && ( - {errorMessage} - )} - - )} -
      - ); -}; - -type RangeCalendarRootProps = AriaRangeCalendarProps; -const RangeCalendarRoot = ( - props: RangeCalendarRootProps -) => { - const CalendarContext = useSlottedContext(AriaRangeCalendarContext); - const standalone = Object.keys(CalendarContext ?? {}).length === 0; - const { root } = calendarStyles({ standalone }); - return ( - - root({ className }) - )} - {...props} - /> - ); -}; - -export type { RangeCalendarProps, RangeCalendarRootProps }; -export { RangeCalendar, RangeCalendarRoot }; +"use client"; + +import * as React from "react"; +import { + composeRenderProps, + RangeCalendar as AriaRangeCalendar, + type RangeCalendarProps as AriaRangeCalendarProps, + type DateValue, + RangeCalendarContext as AriaRangeCalendarContext, + useSlottedContext, +} from "react-aria-components"; +import { Button } from "@/registry/ui/default/core/button"; +import { + CalendarHeader, + CalendarGrid, + CalendarGridHeader, + CalendarHeaderCell, + CalendarGridBody, + CalendarCell, + calendarStyles, +} from "@/registry/ui/default/core/calendar"; +import { Heading } from "@/registry/ui/default/core/heading"; +import { Text } from "@/registry/ui/default/core/text"; +import { ChevronLeftIcon, ChevronRightIcon } from "@/__icons__"; + +interface RangeCalendarProps + extends Omit, "visibleDuration"> { + visibleMonths?: number; + errorMessage?: string; +} +const RangeCalendar = ({ + visibleMonths = 1, + errorMessage, + ...props +}: RangeCalendarProps) => { + visibleMonths = Math.min(Math.max(visibleMonths, 1), 3); + return ( + + {({ isInvalid }) => ( + <> + + + + + +
      + {Array.from({ length: visibleMonths }).map((_, index) => ( + + + {(day) => {day}} + + + {(date) => ( + + {({ formattedDate }) => ( + {formattedDate} + )} + + )} + + + ))} +
      + {isInvalid && errorMessage && ( + {errorMessage} + )} + + )} +
      + ); +}; + +type RangeCalendarRootProps = AriaRangeCalendarProps; +const RangeCalendarRoot = ( + props: RangeCalendarRootProps +) => { + const CalendarContext = useSlottedContext(AriaRangeCalendarContext); + const standalone = Object.keys(CalendarContext ?? {}).length === 0; + const { root } = calendarStyles({ standalone }); + return ( + + root({ className }) + )} + {...props} + /> + ); +}; + +export type { RangeCalendarProps, RangeCalendarRootProps }; +export { RangeCalendar, RangeCalendarRoot }; diff --git a/www/src/registry/ui/default/core/resizable/index.ts b/www/src/registry/ui/default/core/resizable/index.ts index 806a2d56..78398f96 100644 --- a/www/src/registry/ui/default/core/resizable/index.ts +++ b/www/src/registry/ui/default/core/resizable/index.ts @@ -1 +1 @@ -export * from "./resizable"; +export * from "./resizable"; diff --git a/www/src/registry/ui/default/core/resizable/resizable.tsx b/www/src/registry/ui/default/core/resizable/resizable.tsx index 2fcd21d7..c076a363 100644 --- a/www/src/registry/ui/default/core/resizable/resizable.tsx +++ b/www/src/registry/ui/default/core/resizable/resizable.tsx @@ -1,65 +1,65 @@ -"use client"; - -import React from "react"; -import * as ResizablePrimitive from "react-resizable-panels"; -import type { - ImperativePanelHandle, - ImperativePanelGroupHandle, -} from "react-resizable-panels"; -import { tv } from "tailwind-variants"; - -const resizableStyles = tv({ - slots: { - group: - "flex h-full w-full flex-row overflow-hidden data-[panel-group-direction=vertical]:flex-col", - panel: "", - handle: - "bg-border data-[resize-handle-state=drag]:bg-border-active relative flex flex-[0_0_1px] items-stretch justify-stretch transition-colors", - }, -}); - -type ResizableGroupProps = React.ComponentProps< - typeof ResizablePrimitive.PanelGroup ->; -const ResizableGroup = ({ className, ...props }: ResizableGroupProps) => { - const { group } = resizableStyles(); - return ( - - ); -}; - -type ResizablePanelProps = React.ComponentProps< - typeof ResizablePrimitive.Panel ->; -const ResizablePanel = ({ className, ...props }: ResizablePanelProps) => { - const { panel } = resizableStyles(); - return ( - - ); -}; - -interface ResizableHandleProps - extends React.ComponentProps { - withHandle?: boolean; -} -const ResizableHandle = ({ className, ...props }: ResizableHandleProps) => { - const { handle } = resizableStyles(); - return ( - - ); -}; - -export type { - ResizablePanelProps, - ResizableGroupProps, - ResizableHandleProps, - ImperativePanelHandle, - ImperativePanelGroupHandle, -}; -export { ResizableGroup, ResizablePanel, ResizableHandle }; +"use client"; + +import React from "react"; +import * as ResizablePrimitive from "react-resizable-panels"; +import type { + ImperativePanelHandle, + ImperativePanelGroupHandle, +} from "react-resizable-panels"; +import { tv } from "tailwind-variants"; + +const resizableStyles = tv({ + slots: { + group: + "flex h-full w-full flex-row overflow-hidden data-[panel-group-direction=vertical]:flex-col", + panel: "", + handle: + "bg-border data-[resize-handle-state=drag]:bg-border-active relative flex flex-[0_0_1px] items-stretch justify-stretch transition-colors", + }, +}); + +type ResizableGroupProps = React.ComponentProps< + typeof ResizablePrimitive.PanelGroup +>; +const ResizableGroup = ({ className, ...props }: ResizableGroupProps) => { + const { group } = resizableStyles(); + return ( + + ); +}; + +type ResizablePanelProps = React.ComponentProps< + typeof ResizablePrimitive.Panel +>; +const ResizablePanel = ({ className, ...props }: ResizablePanelProps) => { + const { panel } = resizableStyles(); + return ( + + ); +}; + +interface ResizableHandleProps + extends React.ComponentProps { + withHandle?: boolean; +} +const ResizableHandle = ({ className, ...props }: ResizableHandleProps) => { + const { handle } = resizableStyles(); + return ( + + ); +}; + +export type { + ResizablePanelProps, + ResizableGroupProps, + ResizableHandleProps, + ImperativePanelHandle, + ImperativePanelGroupHandle, +}; +export { ResizableGroup, ResizablePanel, ResizableHandle }; diff --git a/www/src/registry/ui/default/core/scroll-area/demos/default.tsx b/www/src/registry/ui/default/core/scroll-area/demos/default.tsx index 1bacb76d..2bb5d966 100644 --- a/www/src/registry/ui/default/core/scroll-area/demos/default.tsx +++ b/www/src/registry/ui/default/core/scroll-area/demos/default.tsx @@ -1,37 +1,37 @@ -import * as React from "react"; -import { ScrollArea } from "@/registry/ui/default/core/scroll-area"; - -export default function Demo() { - return ( -
      - -
      -

      - Principles of the typographic craft -

      -

      - Three fundamental aspects of typography are legibility, readability, - and aesthetics. Although in a non-technical sense “legible” and - “readable” are often used synonymously, typographically they are - separate but related concepts. -

      -

      - Legibility describes how easily individual characters can be - distinguished from one another. It is described by Walter Tracy as - “the quality of being decipherable and recognisable”. For instance, - if a “b” and an “h”, or a “3” and an “8”, are difficult to - distinguish at small sizes, this is a problem of legibility. -

      -

      - Typographers are concerned with legibility insofar as it is their - job to select the correct font to use. Brush Script is an example of - a font containing many characters that might be difficult to - distinguish. The selection of cases influences the legibility of - typography because using only uppercase letters (all-caps) reduces - legibility. -

      -
      -
      -
      - ); -} +import * as React from "react"; +import { ScrollArea } from "@/registry/ui/default/core/scroll-area"; + +export default function Demo() { + return ( +
      + +
      +

      + Principles of the typographic craft +

      +

      + Three fundamental aspects of typography are legibility, readability, + and aesthetics. Although in a non-technical sense “legible” and + “readable” are often used synonymously, typographically they are + separate but related concepts. +

      +

      + Legibility describes how easily individual characters can be + distinguished from one another. It is described by Walter Tracy as + “the quality of being decipherable and recognisable”. For instance, + if a “b” and an “h”, or a “3” and an “8”, are difficult to + distinguish at small sizes, this is a problem of legibility. +

      +

      + Typographers are concerned with legibility insofar as it is their + job to select the correct font to use. Brush Script is an example of + a font containing many characters that might be difficult to + distinguish. The selection of cases influences the legibility of + typography because using only uppercase letters (all-caps) reduces + legibility. +

      +
      +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/scroll-area/demos/scrollbars.tsx b/www/src/registry/ui/default/core/scroll-area/demos/scrollbars.tsx index 9fa20563..a53a3b6f 100644 --- a/www/src/registry/ui/default/core/scroll-area/demos/scrollbars.tsx +++ b/www/src/registry/ui/default/core/scroll-area/demos/scrollbars.tsx @@ -1,89 +1,89 @@ -"use client"; - -import * as React from "react"; -import { Radio, RadioGroup } from "@/registry/ui/default/core/radio-group"; -import { - ScrollArea, - type ScrollAreaProps, -} from "@/registry/ui/default/core/scroll-area"; - -export default function Demo() { - const [scrollbars, setScrollbars] = React.useState("vertical"); - return ( -
      -
      - -
      -
      -

      - Principles of the typographic craft -

      -

      - Three fundamental aspects of typography are legibility, - readability, and aesthetics. Although in a non-technical sense - “legible” and “readable” are often used synonymously, - typographically they are separate but related concepts. -

      -

      - Legibility describes how easily individual characters can be - distinguished from one another. It is described by Walter Tracy - as “the quality of being decipherable and recognisable”. For - instance, if a “b” and an “h”, or a “3” and an “8”, are - difficult to distinguish at small sizes, this is a problem of - legibility. -

      -

      - Typographers are concerned with legibility insofar as it is - their job to select the correct font to use. Brush Script is an - example of a font containing many characters that might be - difficult to distinguish. The selection of cases influences the - legibility of typography because using only uppercase letters - (all-caps) reduces legibility. -

      -
      -
      -

      - Principles of the typographic craft -

      -

      - Three fundamental aspects of typography are legibility, - readability, and aesthetics. Although in a non-technical sense - “legible” and “readable” are often used synonymously, - typographically they are separate but related concepts. -

      -

      - Legibility describes how easily individual characters can be - distinguished from one another. It is described by Walter Tracy - as “the quality of being decipherable and recognisable”. For - instance, if a “b” and an “h”, or a “3” and an “8”, are - difficult to distinguish at small sizes, this is a problem of - legibility. -

      -

      - Typographers are concerned with legibility insofar as it is - their job to select the correct font to use. Brush Script is an - example of a font containing many characters that might be - difficult to distinguish. The selection of cases influences the - legibility of typography because using only uppercase letters - (all-caps) reduces legibility. -

      -
      -
      -
      -
      - - Vertical - Horizontal - Both - -
      - ); -} +"use client"; + +import * as React from "react"; +import { Radio, RadioGroup } from "@/registry/ui/default/core/radio-group"; +import { + ScrollArea, + type ScrollAreaProps, +} from "@/registry/ui/default/core/scroll-area"; + +export default function Demo() { + const [scrollbars, setScrollbars] = React.useState("vertical"); + return ( +
      +
      + +
      +
      +

      + Principles of the typographic craft +

      +

      + Three fundamental aspects of typography are legibility, + readability, and aesthetics. Although in a non-technical sense + “legible” and “readable” are often used synonymously, + typographically they are separate but related concepts. +

      +

      + Legibility describes how easily individual characters can be + distinguished from one another. It is described by Walter Tracy + as “the quality of being decipherable and recognisable”. For + instance, if a “b” and an “h”, or a “3” and an “8”, are + difficult to distinguish at small sizes, this is a problem of + legibility. +

      +

      + Typographers are concerned with legibility insofar as it is + their job to select the correct font to use. Brush Script is an + example of a font containing many characters that might be + difficult to distinguish. The selection of cases influences the + legibility of typography because using only uppercase letters + (all-caps) reduces legibility. +

      +
      +
      +

      + Principles of the typographic craft +

      +

      + Three fundamental aspects of typography are legibility, + readability, and aesthetics. Although in a non-technical sense + “legible” and “readable” are often used synonymously, + typographically they are separate but related concepts. +

      +

      + Legibility describes how easily individual characters can be + distinguished from one another. It is described by Walter Tracy + as “the quality of being decipherable and recognisable”. For + instance, if a “b” and an “h”, or a “3” and an “8”, are + difficult to distinguish at small sizes, this is a problem of + legibility. +

      +

      + Typographers are concerned with legibility insofar as it is + their job to select the correct font to use. Brush Script is an + example of a font containing many characters that might be + difficult to distinguish. The selection of cases influences the + legibility of typography because using only uppercase letters + (all-caps) reduces legibility. +

      +
      +
      +
      +
      + + Vertical + Horizontal + Both + +
      + ); +} diff --git a/www/src/registry/ui/default/core/scroll-area/demos/sizes.tsx b/www/src/registry/ui/default/core/scroll-area/demos/sizes.tsx index 98645f87..c0bcb880 100644 --- a/www/src/registry/ui/default/core/scroll-area/demos/sizes.tsx +++ b/www/src/registry/ui/default/core/scroll-area/demos/sizes.tsx @@ -1,44 +1,44 @@ -import * as React from "react"; -import { ScrollArea } from "@/registry/ui/default/core/scroll-area"; - -const sizes = ["sm", "md", "lg"] as const; - -export default function Demo() { - return ( -
      - {sizes.map((size) => ( -
      - -
      -

      - Principles of the typographic craft -

      -

      - Three fundamental aspects of typography are legibility, - readability, and aesthetics. Although in a non-technical sense - “legible” and “readable” are often used synonymously, - typographically they are separate but related concepts. -

      -

      - Legibility describes how easily individual characters can be - distinguished from one another. It is described by Walter Tracy - as “the quality of being decipherable and recognisable”. For - instance, if a “b” and an “h”, or a “3” and an “8”, are - difficult to distinguish at small sizes, this is a problem of - legibility. -

      -

      - Typographers are concerned with legibility insofar as it is - their job to select the correct font to use. Brush Script is an - example of a font containing many characters that might be - difficult to distinguish. The selection of cases influences the - legibility of typography because using only uppercase letters - (all-caps) reduces legibility. -

      -
      -
      -
      - ))} -
      - ); -} +import * as React from "react"; +import { ScrollArea } from "@/registry/ui/default/core/scroll-area"; + +const sizes = ["sm", "md", "lg"] as const; + +export default function Demo() { + return ( +
      + {sizes.map((size) => ( +
      + +
      +

      + Principles of the typographic craft +

      +

      + Three fundamental aspects of typography are legibility, + readability, and aesthetics. Although in a non-technical sense + “legible” and “readable” are often used synonymously, + typographically they are separate but related concepts. +

      +

      + Legibility describes how easily individual characters can be + distinguished from one another. It is described by Walter Tracy + as “the quality of being decipherable and recognisable”. For + instance, if a “b” and an “h”, or a “3” and an “8”, are + difficult to distinguish at small sizes, this is a problem of + legibility. +

      +

      + Typographers are concerned with legibility insofar as it is + their job to select the correct font to use. Brush Script is an + example of a font containing many characters that might be + difficult to distinguish. The selection of cases influences the + legibility of typography because using only uppercase letters + (all-caps) reduces legibility. +

      +
      +
      +
      + ))} +
      + ); +} diff --git a/www/src/registry/ui/default/core/scroll-area/index.ts b/www/src/registry/ui/default/core/scroll-area/index.ts index e368a812..d32525cd 100644 --- a/www/src/registry/ui/default/core/scroll-area/index.ts +++ b/www/src/registry/ui/default/core/scroll-area/index.ts @@ -1 +1 @@ -export * from "./scroll-area"; +export * from "./scroll-area"; diff --git a/www/src/registry/ui/default/core/scroll-area/scroll-area.tsx b/www/src/registry/ui/default/core/scroll-area/scroll-area.tsx index 39a89737..820a0e1a 100644 --- a/www/src/registry/ui/default/core/scroll-area/scroll-area.tsx +++ b/www/src/registry/ui/default/core/scroll-area/scroll-area.tsx @@ -1,144 +1,144 @@ -"use client"; - -import * as React from "react"; -import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"; -import { type VariantProps, tv } from "tailwind-variants"; - -const scrollAreaStyles = tv({ - slots: { - root: "flex h-full w-full flex-col overflow-hidden", - viewport: "flex h-full w-full flex-col [&>*]:!block [&>*]:w-fit [&>*]:grow", - scrollbar: - "my-0 flex touch-none select-none flex-col rounded-full bg-gray-800 data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col", // TODO: remove my-0, it was my-1 - thumb: - "before:-translate-y-1/2] relative h-full w-full rounded-[inherit] bg-gray-500 transition-colors before:absolute before:left-1/2 before:top-1/2 before:min-h-4 before:min-w-4 before:-translate-x-1/2 before:content-[''] hover:bg-gray-400", - }, - variants: { - size: { - sm: { - scrollbar: - "data-[orientation=horizontal]:h-1 data-[orientation=vertical]:w-1", - }, - md: { - scrollbar: - "data-[orientation=horizontal]:h-2 data-[orientation=vertical]:w-2", - }, - lg: { - scrollbar: - "data-[orientation=horizontal]:h-3 data-[orientation=vertical]:w-3", - }, - }, - }, - defaultVariants: { - size: "md", - }, -}); - -interface ScrollAreaProps - extends ScrollAreaRootProps, - Omit, - VariantProps { - scrollbars?: "vertical" | "horizontal" | "both"; -} - -const ScrollArea = React.forwardRef< - HTMLDivElement, - ScrollAreaProps & { containerClassName?: string } ->( - ( - { - children, - scrollbars = "vertical", - size, - asChild, - type, - scrollHideDelay = 0, - dir, - containerClassName, - ...viewportProps - }, - ref - ) => { - return ( - - - {children} - - {scrollbars !== "vertical" && ( - - )} - {scrollbars !== "horizontal" && ( - - )} - {scrollbars === "both" && } - - ); - } -); - -ScrollArea.displayName = "ScrollArea"; - -type ScrollAreaRootProps = ScrollAreaPrimitive.ScrollAreaProps; -const ScrollAreaRoot = ({ className, ...props }: ScrollAreaRootProps) => { - const { root } = scrollAreaStyles(); - return ( - - ); -}; - -type ScrollAreaViewPortProps = ScrollAreaPrimitive.ScrollAreaViewportProps; -const ScrollAreaViewPort = React.forwardRef< - HTMLDivElement, - ScrollAreaViewPortProps ->(({ className, ...props }, ref) => { - const { viewport } = scrollAreaStyles(); - return ( - - ); -}); -ScrollAreaViewPort.displayName = "ScrollAreaViewPort"; - -interface ScrollAreaScrollbarProps - extends ScrollAreaPrimitive.ScrollAreaScrollbarProps, - VariantProps {} -const ScrollAreaScrollbar = ({ - className, - size, - ...props -}: ScrollAreaScrollbarProps) => { - const { scrollbar, thumb } = scrollAreaStyles({ size }); - return ( - - - - ); -}; - -const ScrollAreaCorner = ScrollAreaPrimitive.Corner; - -export type { - ScrollAreaProps, - ScrollAreaRootProps, - ScrollAreaViewPortProps, - ScrollAreaScrollbarProps, -}; -export { - ScrollArea, - ScrollAreaRoot, - ScrollAreaViewPort, - ScrollAreaScrollbar, - ScrollAreaCorner, -}; +"use client"; + +import * as React from "react"; +import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area"; +import { type VariantProps, tv } from "tailwind-variants"; + +const scrollAreaStyles = tv({ + slots: { + root: "flex h-full w-full flex-col overflow-hidden", + viewport: "flex h-full w-full flex-col [&>*]:!block [&>*]:w-fit [&>*]:grow", + scrollbar: + "my-0 flex touch-none select-none flex-col rounded-full bg-gray-800 data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col", // TODO: remove my-0, it was my-1 + thumb: + "before:-translate-y-1/2] relative h-full w-full rounded-[inherit] bg-gray-500 transition-colors before:absolute before:left-1/2 before:top-1/2 before:min-h-4 before:min-w-4 before:-translate-x-1/2 before:content-[''] hover:bg-gray-400", + }, + variants: { + size: { + sm: { + scrollbar: + "data-[orientation=horizontal]:h-1 data-[orientation=vertical]:w-1", + }, + md: { + scrollbar: + "data-[orientation=horizontal]:h-2 data-[orientation=vertical]:w-2", + }, + lg: { + scrollbar: + "data-[orientation=horizontal]:h-3 data-[orientation=vertical]:w-3", + }, + }, + }, + defaultVariants: { + size: "md", + }, +}); + +interface ScrollAreaProps + extends ScrollAreaRootProps, + Omit, + VariantProps { + scrollbars?: "vertical" | "horizontal" | "both"; +} + +const ScrollArea = React.forwardRef< + HTMLDivElement, + ScrollAreaProps & { containerClassName?: string } +>( + ( + { + children, + scrollbars = "vertical", + size, + asChild, + type, + scrollHideDelay = 0, + dir, + containerClassName, + ...viewportProps + }, + ref + ) => { + return ( + + + {children} + + {scrollbars !== "vertical" && ( + + )} + {scrollbars !== "horizontal" && ( + + )} + {scrollbars === "both" && } + + ); + } +); + +ScrollArea.displayName = "ScrollArea"; + +type ScrollAreaRootProps = ScrollAreaPrimitive.ScrollAreaProps; +const ScrollAreaRoot = ({ className, ...props }: ScrollAreaRootProps) => { + const { root } = scrollAreaStyles(); + return ( + + ); +}; + +type ScrollAreaViewPortProps = ScrollAreaPrimitive.ScrollAreaViewportProps; +const ScrollAreaViewPort = React.forwardRef< + HTMLDivElement, + ScrollAreaViewPortProps +>(({ className, ...props }, ref) => { + const { viewport } = scrollAreaStyles(); + return ( + + ); +}); +ScrollAreaViewPort.displayName = "ScrollAreaViewPort"; + +interface ScrollAreaScrollbarProps + extends ScrollAreaPrimitive.ScrollAreaScrollbarProps, + VariantProps {} +const ScrollAreaScrollbar = ({ + className, + size, + ...props +}: ScrollAreaScrollbarProps) => { + const { scrollbar, thumb } = scrollAreaStyles({ size }); + return ( + + + + ); +}; + +const ScrollAreaCorner = ScrollAreaPrimitive.Corner; + +export type { + ScrollAreaProps, + ScrollAreaRootProps, + ScrollAreaViewPortProps, + ScrollAreaScrollbarProps, +}; +export { + ScrollArea, + ScrollAreaRoot, + ScrollAreaViewPort, + ScrollAreaScrollbar, + ScrollAreaCorner, +}; diff --git a/www/src/registry/ui/default/core/search-field/demos/composition.tsx b/www/src/registry/ui/default/core/search-field/demos/composition.tsx index 9d10cb4f..dc98b231 100644 --- a/www/src/registry/ui/default/core/search-field/demos/composition.tsx +++ b/www/src/registry/ui/default/core/search-field/demos/composition.tsx @@ -1,17 +1,17 @@ -import React from "react"; -import { Description, Label } from "@/registry/ui/default/core/field"; -import { Input, InputRoot } from "@/registry/ui/default/core/input"; -import { SearchFieldRoot } from "@/registry/ui/default/core/search-field"; -import { SearchIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - }> - - - Enter your search query. - - ); -} +import React from "react"; +import { Description, Label } from "@/registry/ui/default/core/field"; +import { Input, InputRoot } from "@/registry/ui/default/core/input"; +import { SearchFieldRoot } from "@/registry/ui/default/core/search-field"; +import { SearchIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + }> + + + Enter your search query. + + ); +} diff --git a/www/src/registry/ui/default/core/search-field/demos/contextual-help.tsx b/www/src/registry/ui/default/core/search-field/demos/contextual-help.tsx index 3dc658a4..c521dfac 100644 --- a/www/src/registry/ui/default/core/search-field/demos/contextual-help.tsx +++ b/www/src/registry/ui/default/core/search-field/demos/contextual-help.tsx @@ -1,17 +1,17 @@ -import React from "react"; -import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; -import { SearchField } from "@/registry/ui/default/core/search-field"; - -export default function Demo() { - return ( - - } - /> - ); -} +import React from "react"; +import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; +import { SearchField } from "@/registry/ui/default/core/search-field"; + +export default function Demo() { + return ( + + } + /> + ); +} diff --git a/www/src/registry/ui/default/core/search-field/demos/controlled.tsx b/www/src/registry/ui/default/core/search-field/demos/controlled.tsx index 91c61b52..e431bd3f 100644 --- a/www/src/registry/ui/default/core/search-field/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/search-field/demos/controlled.tsx @@ -1,18 +1,18 @@ -"use client"; - -import React from "react"; -import { SearchField } from "@/registry/ui/default/core/search-field"; - -export default function Demo() { - const [inputValue, setInputValue] = React.useState( - "Is dotUI the next-gen ui lib?" - ); - return ( -
      - -

      - mirrored search text: {inputValue} -

      -
      - ); -} +"use client"; + +import React from "react"; +import { SearchField } from "@/registry/ui/default/core/search-field"; + +export default function Demo() { + const [inputValue, setInputValue] = React.useState( + "Is dotUI the next-gen ui lib?" + ); + return ( +
      + +

      + mirrored search text: {inputValue} +

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/search-field/demos/default.tsx b/www/src/registry/ui/default/core/search-field/demos/default.tsx index 698bacd0..336b00f2 100644 --- a/www/src/registry/ui/default/core/search-field/demos/default.tsx +++ b/www/src/registry/ui/default/core/search-field/demos/default.tsx @@ -1,6 +1,6 @@ -import React from "react"; -import { SearchField } from "@/registry/ui/default/core/search-field"; - -export default function Demo() { - return ; -} +import React from "react"; +import { SearchField } from "@/registry/ui/default/core/search-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/search-field/demos/description.tsx b/www/src/registry/ui/default/core/search-field/demos/description.tsx index 89ceb077..7a05a1f2 100644 --- a/www/src/registry/ui/default/core/search-field/demos/description.tsx +++ b/www/src/registry/ui/default/core/search-field/demos/description.tsx @@ -1,6 +1,6 @@ -import React from "react"; -import { SearchField } from "@/registry/ui/default/core/search-field"; - -export default function Demo() { - return ; -} +import React from "react"; +import { SearchField } from "@/registry/ui/default/core/search-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/search-field/demos/disabled.tsx b/www/src/registry/ui/default/core/search-field/demos/disabled.tsx index 9ac36ded..dbc3c837 100644 --- a/www/src/registry/ui/default/core/search-field/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/search-field/demos/disabled.tsx @@ -1,7 +1,7 @@ -import { SearchField } from "@/registry/ui/default/core/search-field"; - -export default function Demo() { - return ( - - ); -} +import { SearchField } from "@/registry/ui/default/core/search-field"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/search-field/demos/error-message.tsx b/www/src/registry/ui/default/core/search-field/demos/error-message.tsx index de3eee9b..deb88822 100644 --- a/www/src/registry/ui/default/core/search-field/demos/error-message.tsx +++ b/www/src/registry/ui/default/core/search-field/demos/error-message.tsx @@ -1,12 +1,12 @@ -import React from "react"; -import { SearchField } from "@/registry/ui/default/core/search-field"; - -export default function Demo() { - return ( - - ); -} +import React from "react"; +import { SearchField } from "@/registry/ui/default/core/search-field"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/search-field/demos/form.tsx b/www/src/registry/ui/default/core/search-field/demos/form.tsx index cade43bc..f6906ba1 100644 --- a/www/src/registry/ui/default/core/search-field/demos/form.tsx +++ b/www/src/registry/ui/default/core/search-field/demos/form.tsx @@ -1,6 +1,6 @@ -import React from "react"; -import { SearchField } from "@/registry/ui/default/core/search-field"; - -export default function Demo() { - return ; -} +import React from "react"; +import { SearchField } from "@/registry/ui/default/core/search-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/search-field/demos/label.tsx b/www/src/registry/ui/default/core/search-field/demos/label.tsx index a6e92b2c..d4e0939e 100644 --- a/www/src/registry/ui/default/core/search-field/demos/label.tsx +++ b/www/src/registry/ui/default/core/search-field/demos/label.tsx @@ -1,10 +1,10 @@ -import { SearchField } from "@/registry/ui/default/core/search-field"; - -export default function Demo() { - return ( -
      - - -
      - ); -} +import { SearchField } from "@/registry/ui/default/core/search-field"; + +export default function Demo() { + return ( +
      + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/search-field/demos/loading.tsx b/www/src/registry/ui/default/core/search-field/demos/loading.tsx index a800d20e..1b56935a 100644 --- a/www/src/registry/ui/default/core/search-field/demos/loading.tsx +++ b/www/src/registry/ui/default/core/search-field/demos/loading.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import { SearchField } from "@/registry/ui/default/core/search-field"; - -export default function Demo() { - return ( -
      - - -
      - ); -} +import React from "react"; +import { SearchField } from "@/registry/ui/default/core/search-field"; + +export default function Demo() { + return ( +
      + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/search-field/demos/prefix-and-suffix.tsx b/www/src/registry/ui/default/core/search-field/demos/prefix-and-suffix.tsx index 5de171e9..afbb61c0 100644 --- a/www/src/registry/ui/default/core/search-field/demos/prefix-and-suffix.tsx +++ b/www/src/registry/ui/default/core/search-field/demos/prefix-and-suffix.tsx @@ -1,25 +1,25 @@ -"use client"; - -import { Button } from "@/registry/ui/default/core/button"; -import { SearchField } from "@/registry/ui/default/core/search-field"; -import { Tooltip } from "@/registry/ui/default/core/tooltip"; -import { XCircleIcon } from "@/__icons__"; - -export default function Demo() { - return ( - { - if (isEmpty || isDisabled) return null; - return ( - - - - ); - }} - /> - ); -} +"use client"; + +import { Button } from "@/registry/ui/default/core/button"; +import { SearchField } from "@/registry/ui/default/core/search-field"; +import { Tooltip } from "@/registry/ui/default/core/tooltip"; +import { XCircleIcon } from "@/__icons__"; + +export default function Demo() { + return ( + { + if (isEmpty || isDisabled) return null; + return ( + + + + ); + }} + /> + ); +} diff --git a/www/src/registry/ui/default/core/search-field/demos/read-only.tsx b/www/src/registry/ui/default/core/search-field/demos/read-only.tsx index ee0438e1..9ad73925 100644 --- a/www/src/registry/ui/default/core/search-field/demos/read-only.tsx +++ b/www/src/registry/ui/default/core/search-field/demos/read-only.tsx @@ -1,6 +1,6 @@ -import React from "react"; -import { SearchField } from "@/registry/ui/default/core/search-field"; - -export default function Demo() { - return ; -} +import React from "react"; +import { SearchField } from "@/registry/ui/default/core/search-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/search-field/demos/required.tsx b/www/src/registry/ui/default/core/search-field/demos/required.tsx index 7dd6ffd7..329996ba 100644 --- a/www/src/registry/ui/default/core/search-field/demos/required.tsx +++ b/www/src/registry/ui/default/core/search-field/demos/required.tsx @@ -1,13 +1,13 @@ -import React from "react"; -import { SearchField } from "@/registry/ui/default/core/search-field"; - -export default function Demo() { - return ( -
      - - - - -
      - ); -} +import React from "react"; +import { SearchField } from "@/registry/ui/default/core/search-field"; + +export default function Demo() { + return ( +
      + + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/search-field/demos/sizes.tsx b/www/src/registry/ui/default/core/search-field/demos/sizes.tsx index 69986b5c..c1ea6b12 100644 --- a/www/src/registry/ui/default/core/search-field/demos/sizes.tsx +++ b/www/src/registry/ui/default/core/search-field/demos/sizes.tsx @@ -1,11 +1,11 @@ -import { SearchField } from "@/registry/ui/default/core/search-field"; - -export default function Demo() { - return ( -
      - - - -
      - ); -} +import { SearchField } from "@/registry/ui/default/core/search-field"; + +export default function Demo() { + return ( +
      + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/search-field/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/search-field/demos/uncontrolled.tsx index 4010d0bb..714b24ba 100644 --- a/www/src/registry/ui/default/core/search-field/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/search-field/demos/uncontrolled.tsx @@ -1,6 +1,6 @@ -import React from "react"; -import { SearchField } from "@/registry/ui/default/core/search-field"; - -export default function Demo() { - return ; -} +import React from "react"; +import { SearchField } from "@/registry/ui/default/core/search-field"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/search-field/index.ts b/www/src/registry/ui/default/core/search-field/index.ts index afe844b1..c1047992 100644 --- a/www/src/registry/ui/default/core/search-field/index.ts +++ b/www/src/registry/ui/default/core/search-field/index.ts @@ -1 +1 @@ -export * from "./search-field"; +export * from "./search-field"; diff --git a/www/src/registry/ui/default/core/search-field/search-field.tsx b/www/src/registry/ui/default/core/search-field/search-field.tsx index 01a20ab0..b4df6e36 100644 --- a/www/src/registry/ui/default/core/search-field/search-field.tsx +++ b/www/src/registry/ui/default/core/search-field/search-field.tsx @@ -1,122 +1,122 @@ -"use client"; - -import * as React from "react"; -import { - SearchField as AriaSearchField, - type SearchFieldProps as AriaSearchFieldProps, -} from "react-aria-components"; -import { tv, type VariantProps } from "tailwind-variants"; -import { Button } from "@/registry/ui/default/core/button"; -import { Field, type FieldProps } from "@/registry/ui/default/core/field"; -import { - InputRoot, - Input, - type inputStyles, -} from "@/registry/ui/default/core/input"; -import { SearchIcon, XIcon } from "@/__icons__"; - -const searchFieldStyles = tv({ - base: "flex w-48 flex-col items-start gap-2", -}); - -type SearchFieldProps = SearchFieldRootProps & - Omit & - VariantProps & { - prefix?: React.ReactNode; - suffix?: - | React.ReactNode - | (({ - isEmpty, - isDisabled, - }: { - isEmpty?: boolean; - isDisabled?: boolean; - }) => React.ReactNode); - isLoading?: boolean; - loaderPosition?: "prefix" | "suffix"; - placeholder?: string; - }; -const SearchField = React.forwardRef( - ( - { - className, - size, - placeholder, - label, - description, - errorMessage, - prefix = , - suffix = ({ isEmpty, isDisabled }) => { - if (isEmpty || isDisabled) return null; - return ( - - ); - }, - isLoading, - loaderPosition = "prefix", - isRequired, - necessityIndicator, - contextualHelp, - ...props - }, - ref - ) => { - return ( - - {({ isEmpty, isDisabled }) => ( - <> - - - - - - - )} - - ); - } -); -SearchField.displayName = "SearchField"; - -type SearchFieldRootProps = Omit & { - className?: string; -}; -const SearchFieldRoot = React.forwardRef< - React.ElementRef, - SearchFieldRootProps ->(({ className, ...props }, ref) => { - return ( - - ); -}); -SearchFieldRoot.displayName = "SearchFieldRoot"; - -export type { SearchFieldProps, SearchFieldRootProps }; -export { SearchField, SearchFieldRoot }; +"use client"; + +import * as React from "react"; +import { + SearchField as AriaSearchField, + type SearchFieldProps as AriaSearchFieldProps, +} from "react-aria-components"; +import { tv, type VariantProps } from "tailwind-variants"; +import { Button } from "@/registry/ui/default/core/button"; +import { Field, type FieldProps } from "@/registry/ui/default/core/field"; +import { + InputRoot, + Input, + type inputStyles, +} from "@/registry/ui/default/core/input"; +import { SearchIcon, XIcon } from "@/__icons__"; + +const searchFieldStyles = tv({ + base: "flex w-48 flex-col items-start gap-2", +}); + +type SearchFieldProps = SearchFieldRootProps & + Omit & + VariantProps & { + prefix?: React.ReactNode; + suffix?: + | React.ReactNode + | (({ + isEmpty, + isDisabled, + }: { + isEmpty?: boolean; + isDisabled?: boolean; + }) => React.ReactNode); + isLoading?: boolean; + loaderPosition?: "prefix" | "suffix"; + placeholder?: string; + }; +const SearchField = React.forwardRef( + ( + { + className, + size, + placeholder, + label, + description, + errorMessage, + prefix = , + suffix = ({ isEmpty, isDisabled }) => { + if (isEmpty || isDisabled) return null; + return ( + + ); + }, + isLoading, + loaderPosition = "prefix", + isRequired, + necessityIndicator, + contextualHelp, + ...props + }, + ref + ) => { + return ( + + {({ isEmpty, isDisabled }) => ( + <> + + + + + + + )} + + ); + } +); +SearchField.displayName = "SearchField"; + +type SearchFieldRootProps = Omit & { + className?: string; +}; +const SearchFieldRoot = React.forwardRef< + React.ElementRef, + SearchFieldRootProps +>(({ className, ...props }, ref) => { + return ( + + ); +}); +SearchFieldRoot.displayName = "SearchFieldRoot"; + +export type { SearchFieldProps, SearchFieldRootProps }; +export { SearchField, SearchFieldRoot }; diff --git a/www/src/registry/ui/default/core/section/index.ts b/www/src/registry/ui/default/core/section/index.ts index d4898871..89a372d1 100644 --- a/www/src/registry/ui/default/core/section/index.ts +++ b/www/src/registry/ui/default/core/section/index.ts @@ -1 +1 @@ -export * from "./section"; +export * from "./section"; diff --git a/www/src/registry/ui/default/core/section/section.tsx b/www/src/registry/ui/default/core/section/section.tsx index e11a6dce..f0d6f240 100644 --- a/www/src/registry/ui/default/core/section/section.tsx +++ b/www/src/registry/ui/default/core/section/section.tsx @@ -1,45 +1,45 @@ -"use client"; - -import { - Section as AriaSection, - Header as AriaHeader, - type SectionProps as AriaSectionProps, - Collection as AriaCollection, -} from "react-aria-components"; -import { tv } from "tailwind-variants"; - -const SectionStyles = tv({ - slots: { - root: "mt-2 space-y-px first:mt-1", - title: "mb-1 pl-3 text-sm font-bold", - }, -}); - -interface SectionProps extends AriaSectionProps { - title?: string; -} -const Section = ({ title, ...props }: SectionProps) => { - return ( - - {title && {title}} - {props.children} - - ); -}; - -type SectionRootProps = AriaSectionProps; -const SectionRoot = ({ - className, - ...props -}: SectionRootProps) => { - const { root } = SectionStyles(); - return ; -}; - -type SectionTitleProps = React.HTMLAttributes; -const SectionTitle = ({ className, ...props }: SectionTitleProps) => { - const { title } = SectionStyles(); - return ; -}; - -export { Section, SectionTitle }; +"use client"; + +import { + Section as AriaSection, + Header as AriaHeader, + type SectionProps as AriaSectionProps, + Collection as AriaCollection, +} from "react-aria-components"; +import { tv } from "tailwind-variants"; + +const SectionStyles = tv({ + slots: { + root: "mt-2 space-y-px first:mt-1", + title: "mb-1 pl-3 text-sm font-bold", + }, +}); + +interface SectionProps extends AriaSectionProps { + title?: string; +} +const Section = ({ title, ...props }: SectionProps) => { + return ( + + {title && {title}} + {props.children} + + ); +}; + +type SectionRootProps = AriaSectionProps; +const SectionRoot = ({ + className, + ...props +}: SectionRootProps) => { + const { root } = SectionStyles(); + return ; +}; + +type SectionTitleProps = React.HTMLAttributes; +const SectionTitle = ({ className, ...props }: SectionTitleProps) => { + const { title } = SectionStyles(); + return ; +}; + +export { Section, SectionTitle }; diff --git a/www/src/registry/ui/default/core/select/demos/async-loading.tsx b/www/src/registry/ui/default/core/select/demos/async-loading.tsx index 229d15d0..801df9a4 100644 --- a/www/src/registry/ui/default/core/select/demos/async-loading.tsx +++ b/www/src/registry/ui/default/core/select/demos/async-loading.tsx @@ -1,28 +1,28 @@ -"use client"; - -import React from "react"; -import { useAsyncList } from "react-stately"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Select } from "@/registry/ui/default/core/select"; - -interface Character { - name: string; -} - -export default function Demo() { - const list = useAsyncList({ - async load({ signal }) { - const res = await fetch(`https://pokeapi.co/api/v2/pokemon`, { signal }); - const json = (await res.json()) as { results: Character[] }; - - return { - items: json.results, - }; - }, - }); - return ( - - ); -} +"use client"; + +import React from "react"; +import { useAsyncList } from "react-stately"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Select } from "@/registry/ui/default/core/select"; + +interface Character { + name: string; +} + +export default function Demo() { + const list = useAsyncList({ + async load({ signal }) { + const res = await fetch(`https://pokeapi.co/api/v2/pokemon`, { signal }); + const json = (await res.json()) as { results: Character[] }; + + return { + items: json.results, + }; + }, + }); + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/select/demos/basic.tsx b/www/src/registry/ui/default/core/select/demos/basic.tsx index 6dbc549e..702e9054 100644 --- a/www/src/registry/ui/default/core/select/demos/basic.tsx +++ b/www/src/registry/ui/default/core/select/demos/basic.tsx @@ -1,14 +1,14 @@ -import React from "react"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Select } from "@/registry/ui/default/core/select"; - -export default function Demo() { - return ( - - ); -} +import React from "react"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Select } from "@/registry/ui/default/core/select"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/select/demos/composition.tsx b/www/src/registry/ui/default/core/select/demos/composition.tsx index a41a271f..51852883 100644 --- a/www/src/registry/ui/default/core/select/demos/composition.tsx +++ b/www/src/registry/ui/default/core/select/demos/composition.tsx @@ -1,27 +1,27 @@ -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { Item, ListBox } from "@/registry/ui/default/core/list-box"; -import { Overlay } from "@/registry/ui/default/core/overlay"; -import { SelectRoot, SelectValue } from "@/registry/ui/default/core/select"; -import { ChevronsUpDownIcon } from "@/__icons__"; - -export default function Demo() { - return ( - - - - - Perplexity - Replicate - Together AI - ElevenLabs - - - - ); -} +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { Item, ListBox } from "@/registry/ui/default/core/list-box"; +import { Overlay } from "@/registry/ui/default/core/overlay"; +import { SelectRoot, SelectValue } from "@/registry/ui/default/core/select"; +import { ChevronsUpDownIcon } from "@/__icons__"; + +export default function Demo() { + return ( + + + + + Perplexity + Replicate + Together AI + ElevenLabs + + + + ); +} diff --git a/www/src/registry/ui/default/core/select/demos/contextual-help.tsx b/www/src/registry/ui/default/core/select/demos/contextual-help.tsx index 59bb07e8..3292e0ea 100644 --- a/www/src/registry/ui/default/core/select/demos/contextual-help.tsx +++ b/www/src/registry/ui/default/core/select/demos/contextual-help.tsx @@ -1,23 +1,23 @@ -import React from "react"; -import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Select } from "@/registry/ui/default/core/select"; - -export default function SelectDemo() { - return ( - - ); -} +import React from "react"; +import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Select } from "@/registry/ui/default/core/select"; + +export default function SelectDemo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/select/demos/controlled.tsx b/www/src/registry/ui/default/core/select/demos/controlled.tsx index 5dd0129f..f99223c3 100644 --- a/www/src/registry/ui/default/core/select/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/select/demos/controlled.tsx @@ -1,23 +1,23 @@ -"use client"; - -import React from "react"; -import type { Key } from "react-aria-components"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Select } from "@/registry/ui/default/core/select"; - -export default function Demo() { - const [provider, setProvider] = React.useState("eleven-labs"); - return ( -
      - -

      - Selected provider: {provider} -

      -
      - ); -} +"use client"; + +import React from "react"; +import type { Key } from "react-aria-components"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Select } from "@/registry/ui/default/core/select"; + +export default function Demo() { + const [provider, setProvider] = React.useState("eleven-labs"); + return ( +
      + +

      + Selected provider: {provider} +

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/select/demos/description.tsx b/www/src/registry/ui/default/core/select/demos/description.tsx index a50a3024..974adf1a 100644 --- a/www/src/registry/ui/default/core/select/demos/description.tsx +++ b/www/src/registry/ui/default/core/select/demos/description.tsx @@ -1,14 +1,14 @@ -import React from "react"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Select } from "@/registry/ui/default/core/select"; - -export default function Demo() { - return ( - - ); -} +import React from "react"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Select } from "@/registry/ui/default/core/select"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/select/demos/disabled.tsx b/www/src/registry/ui/default/core/select/demos/disabled.tsx index c530b56a..f5e88c67 100644 --- a/www/src/registry/ui/default/core/select/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/select/demos/disabled.tsx @@ -1,14 +1,14 @@ -import React from "react"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Select } from "@/registry/ui/default/core/select"; - -export default function Demo() { - return ( - - ); -} +import React from "react"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Select } from "@/registry/ui/default/core/select"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/select/demos/label.tsx b/www/src/registry/ui/default/core/select/demos/label.tsx index 42e3d56d..4b8bcb16 100644 --- a/www/src/registry/ui/default/core/select/demos/label.tsx +++ b/www/src/registry/ui/default/core/select/demos/label.tsx @@ -1,14 +1,14 @@ -import React from "react"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Select } from "@/registry/ui/default/core/select"; - -export default function Demo() { - return ( - - ); -} +import React from "react"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Select } from "@/registry/ui/default/core/select"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/select/demos/links.tsx b/www/src/registry/ui/default/core/select/demos/links.tsx index 42214c5b..9a461d0d 100644 --- a/www/src/registry/ui/default/core/select/demos/links.tsx +++ b/www/src/registry/ui/default/core/select/demos/links.tsx @@ -1,16 +1,16 @@ -import React from "react"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Select } from "@/registry/ui/default/core/select"; - -export default function Demo() { - return ( - - ); -} +import React from "react"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Select } from "@/registry/ui/default/core/select"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/select/demos/loading.tsx b/www/src/registry/ui/default/core/select/demos/loading.tsx index ed50ac51..f9f5a01b 100644 --- a/www/src/registry/ui/default/core/select/demos/loading.tsx +++ b/www/src/registry/ui/default/core/select/demos/loading.tsx @@ -1,14 +1,14 @@ -import React from "react"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Select } from "@/registry/ui/default/core/select"; - -export default function Demo() { - return ( - - ); -} +import React from "react"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Select } from "@/registry/ui/default/core/select"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/select/demos/placeholder.tsx b/www/src/registry/ui/default/core/select/demos/placeholder.tsx index c6a5c899..5f6f329e 100644 --- a/www/src/registry/ui/default/core/select/demos/placeholder.tsx +++ b/www/src/registry/ui/default/core/select/demos/placeholder.tsx @@ -1,14 +1,14 @@ -import React from "react"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Select } from "@/registry/ui/default/core/select"; - -export default function Demo() { - return ( - - ); -} +import React from "react"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Select } from "@/registry/ui/default/core/select"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/select/demos/required.tsx b/www/src/registry/ui/default/core/select/demos/required.tsx index f921e8ed..b662ea30 100644 --- a/www/src/registry/ui/default/core/select/demos/required.tsx +++ b/www/src/registry/ui/default/core/select/demos/required.tsx @@ -1,14 +1,14 @@ -import React from "react"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Select } from "@/registry/ui/default/core/select"; - -export default function Demo() { - return ( - - ); -} +import React from "react"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Select } from "@/registry/ui/default/core/select"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/select/demos/sections.tsx b/www/src/registry/ui/default/core/select/demos/sections.tsx index c62e6510..a92e8350 100644 --- a/www/src/registry/ui/default/core/select/demos/sections.tsx +++ b/www/src/registry/ui/default/core/select/demos/sections.tsx @@ -1,32 +1,32 @@ -import React from "react"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Section } from "@/registry/ui/default/core/section"; -import { Select } from "@/registry/ui/default/core/select"; - -export default function Demo() { - return ( - - ); -} +import React from "react"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Section } from "@/registry/ui/default/core/section"; +import { Select } from "@/registry/ui/default/core/select"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/select/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/select/demos/uncontrolled.tsx index fc436712..a1077a99 100644 --- a/www/src/registry/ui/default/core/select/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/select/demos/uncontrolled.tsx @@ -1,14 +1,14 @@ -import React from "react"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Select } from "@/registry/ui/default/core/select"; - -export default function Demo() { - return ( - - ); -} +import React from "react"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Select } from "@/registry/ui/default/core/select"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/select/demos/validation.tsx b/www/src/registry/ui/default/core/select/demos/validation.tsx index cebf3355..71a83011 100644 --- a/www/src/registry/ui/default/core/select/demos/validation.tsx +++ b/www/src/registry/ui/default/core/select/demos/validation.tsx @@ -1,18 +1,18 @@ -import React from "react"; -import { Item } from "@/registry/ui/default/core/list-box"; -import { Select } from "@/registry/ui/default/core/select"; - -export default function Demo() { - return ( - - ); -} +import React from "react"; +import { Item } from "@/registry/ui/default/core/list-box"; +import { Select } from "@/registry/ui/default/core/select"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/select/index.ts b/www/src/registry/ui/default/core/select/index.ts index e1856bb3..62606f7b 100644 --- a/www/src/registry/ui/default/core/select/index.ts +++ b/www/src/registry/ui/default/core/select/index.ts @@ -1 +1 @@ -export * from "./select"; +export * from "./select"; diff --git a/www/src/registry/ui/default/core/select/select.tsx b/www/src/registry/ui/default/core/select/select.tsx index 421e4f2f..1f4637e1 100644 --- a/www/src/registry/ui/default/core/select/select.tsx +++ b/www/src/registry/ui/default/core/select/select.tsx @@ -1,109 +1,109 @@ -"use client"; - -import * as React from "react"; -import { - composeRenderProps, - Select as AriaSelect, - SelectValue as AriaSelectValue, - type SelectProps as AriaSelectProps, - type SelectValueProps as AriaSelectValueProps, -} from "react-aria-components"; -import { tv } from "tailwind-variants"; -import { Button, type ButtonProps } from "@/registry/ui/default/core/button"; -import { Field, type FieldProps } from "@/registry/ui/default/core/field"; -import { - ListBox, - type ListBoxProps, -} from "@/registry/ui/default/core/list-box"; -import { Overlay } from "@/registry/ui/default/core/overlay"; -import { ChevronDownIcon } from "@/__icons__"; - -const selectStyles = tv({ - slots: { - root: "flex flex-col items-start gap-2", - selectValue: "flex-1 text-left", - }, -}); - -interface SelectProps - extends Omit, "children">, - Omit { - children?: ListBoxProps["children"]; - dependencies?: ListBoxProps["dependencies"]; - items?: ListBoxProps["items"]; - isLoading?: ListBoxProps["isLoading"]; - variant?: ButtonProps["variant"]; - size?: ButtonProps["size"]; -} -const Select = ({ - variant = "outline", - size, - label, - description, - errorMessage, - necessityIndicator, - contextualHelp, - children, - dependencies, - items, - isLoading, - ...props -}: SelectProps) => { - return ( - - {({ isRequired }) => ( - <> - - - - - - {children} - - - - )} - - ); -}; - -type SelectValueProps = AriaSelectValueProps; -const SelectValue = (props: SelectValueProps) => { - const { selectValue } = selectStyles(); - return ( - - selectValue({ className }) - )} - /> - ); -}; - -interface SelectRootProps - extends Omit, "className"> { - className?: string; -} -const SelectRoot = ({ - className, - ...props -}: SelectRootProps) => { - const { root } = selectStyles(); - return ; -}; - -export type { SelectProps, SelectRootProps, SelectValueProps }; -export { Select, SelectRoot, SelectValue }; +"use client"; + +import * as React from "react"; +import { + composeRenderProps, + Select as AriaSelect, + SelectValue as AriaSelectValue, + type SelectProps as AriaSelectProps, + type SelectValueProps as AriaSelectValueProps, +} from "react-aria-components"; +import { tv } from "tailwind-variants"; +import { Button, type ButtonProps } from "@/registry/ui/default/core/button"; +import { Field, type FieldProps } from "@/registry/ui/default/core/field"; +import { + ListBox, + type ListBoxProps, +} from "@/registry/ui/default/core/list-box"; +import { Overlay } from "@/registry/ui/default/core/overlay"; +import { ChevronDownIcon } from "@/__icons__"; + +const selectStyles = tv({ + slots: { + root: "flex flex-col items-start gap-2", + selectValue: "flex-1 text-left", + }, +}); + +interface SelectProps + extends Omit, "children">, + Omit { + children?: ListBoxProps["children"]; + dependencies?: ListBoxProps["dependencies"]; + items?: ListBoxProps["items"]; + isLoading?: ListBoxProps["isLoading"]; + variant?: ButtonProps["variant"]; + size?: ButtonProps["size"]; +} +const Select = ({ + variant = "outline", + size, + label, + description, + errorMessage, + necessityIndicator, + contextualHelp, + children, + dependencies, + items, + isLoading, + ...props +}: SelectProps) => { + return ( + + {({ isRequired }) => ( + <> + + + + + + {children} + + + + )} + + ); +}; + +type SelectValueProps = AriaSelectValueProps; +const SelectValue = (props: SelectValueProps) => { + const { selectValue } = selectStyles(); + return ( + + selectValue({ className }) + )} + /> + ); +}; + +interface SelectRootProps + extends Omit, "className"> { + className?: string; +} +const SelectRoot = ({ + className, + ...props +}: SelectRootProps) => { + const { root } = selectStyles(); + return ; +}; + +export type { SelectProps, SelectRootProps, SelectValueProps }; +export { Select, SelectRoot, SelectValue }; diff --git a/www/src/registry/ui/default/core/separator/demos/card.tsx b/www/src/registry/ui/default/core/separator/demos/card.tsx index f344aa26..05ce4dca 100644 --- a/www/src/registry/ui/default/core/separator/demos/card.tsx +++ b/www/src/registry/ui/default/core/separator/demos/card.tsx @@ -1,24 +1,24 @@ -import { Separator } from "@/registry/ui/default/core/separator"; - -export default function Demo() { - return ( -
      -
      -

      dotUI

      -

      - Tools for building high-quality, accessible UI. -

      -
      - -
      -
      Docs
      - -
      Components
      - -
      Hooks
      - -
      Themes
      -
      -
      - ); -} +import { Separator } from "@/registry/ui/default/core/separator"; + +export default function Demo() { + return ( +
      +
      +

      dotUI

      +

      + Tools for building high-quality, accessible UI. +

      +
      + +
      +
      Docs
      + +
      Components
      + +
      Hooks
      + +
      Themes
      +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/separator/demos/orientation.tsx b/www/src/registry/ui/default/core/separator/demos/orientation.tsx index 6a2fd9a0..b109a807 100644 --- a/www/src/registry/ui/default/core/separator/demos/orientation.tsx +++ b/www/src/registry/ui/default/core/separator/demos/orientation.tsx @@ -1,18 +1,18 @@ -import { Separator } from "@/registry/ui/default/core/separator"; - -export default function Demo() { - return ( -
      -
      -
      Components
      - -
      Hooks
      -
      -
      -
      Components
      - -
      Hooks
      -
      -
      - ); -} +import { Separator } from "@/registry/ui/default/core/separator"; + +export default function Demo() { + return ( +
      +
      +
      Components
      + +
      Hooks
      +
      +
      +
      Components
      + +
      Hooks
      +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/separator/index.ts b/www/src/registry/ui/default/core/separator/index.ts index 8cb65e02..ade77604 100644 --- a/www/src/registry/ui/default/core/separator/index.ts +++ b/www/src/registry/ui/default/core/separator/index.ts @@ -1 +1 @@ -export * from "./separator"; +export * from "./separator"; diff --git a/www/src/registry/ui/default/core/separator/separator.tsx b/www/src/registry/ui/default/core/separator/separator.tsx index 1846c0ce..27c1b731 100644 --- a/www/src/registry/ui/default/core/separator/separator.tsx +++ b/www/src/registry/ui/default/core/separator/separator.tsx @@ -1,33 +1,33 @@ -"use client"; - -import * as React from "react"; -import { - Separator as AriaSeparator, - type SeparatorProps as AriaSeparatorProps, -} from "react-aria-components"; -import { tv } from "tailwind-variants"; - -const separatorStyles = tv({ - base: "bg-border separator shrink-0 border-0", - variants: { - orientation: { - horizontal: "h-[1px] w-full", - vertical: "h-full w-[1px]", - }, - }, - defaultVariants: { - orientation: "horizontal", - }, -}); - -type SeparatorProps = AriaSeparatorProps; -const Separator = ({ orientation, className, ...props }: SeparatorProps) => { - return ( - - ); -}; - -export { Separator }; +"use client"; + +import * as React from "react"; +import { + Separator as AriaSeparator, + type SeparatorProps as AriaSeparatorProps, +} from "react-aria-components"; +import { tv } from "tailwind-variants"; + +const separatorStyles = tv({ + base: "bg-border separator shrink-0 border-0", + variants: { + orientation: { + horizontal: "h-[1px] w-full", + vertical: "h-full w-[1px]", + }, + }, + defaultVariants: { + orientation: "horizontal", + }, +}); + +type SeparatorProps = AriaSeparatorProps; +const Separator = ({ orientation, className, ...props }: SeparatorProps) => { + return ( + + ); +}; + +export { Separator }; diff --git a/www/src/registry/ui/default/core/skeleton/demos/api-simulation.tsx b/www/src/registry/ui/default/core/skeleton/demos/api-simulation.tsx index 4838c695..0ec58d13 100644 --- a/www/src/registry/ui/default/core/skeleton/demos/api-simulation.tsx +++ b/www/src/registry/ui/default/core/skeleton/demos/api-simulation.tsx @@ -1,27 +1,27 @@ -"use client"; - -import React from "react"; -import { Button } from "@/registry/ui/default/core/button"; -import { Skeleton } from "@/registry/ui/default/core/skeleton"; - -export default function Demo() { - const [status, setStatus] = React.useState< - "idle" | "loading" | "error" | "success" - >("idle"); - const apiCall = () => { - setStatus("loading"); - setTimeout(() => { - setStatus("success"); - }, 4000); - }; - return ( -
      - - -

      Some text loaded from API.

      -
      -
      - ); -} +"use client"; + +import React from "react"; +import { Button } from "@/registry/ui/default/core/button"; +import { Skeleton } from "@/registry/ui/default/core/skeleton"; + +export default function Demo() { + const [status, setStatus] = React.useState< + "idle" | "loading" | "error" | "success" + >("idle"); + const apiCall = () => { + setStatus("loading"); + setTimeout(() => { + setStatus("success"); + }, 4000); + }; + return ( +
      + + +

      Some text loaded from API.

      +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/skeleton/demos/card.tsx b/www/src/registry/ui/default/core/skeleton/demos/card.tsx index a614518c..c28c32ac 100644 --- a/www/src/registry/ui/default/core/skeleton/demos/card.tsx +++ b/www/src/registry/ui/default/core/skeleton/demos/card.tsx @@ -1,16 +1,16 @@ -import { Skeleton } from "@/registry/ui/default/core/skeleton"; - -export default function Demo() { - return ( -
      - -
      - -
      - - -
      -
      -
      - ); -} +import { Skeleton } from "@/registry/ui/default/core/skeleton"; + +export default function Demo() { + return ( +
      + +
      + +
      + + +
      +
      +
      + ); +} diff --git a/www/src/registry/ui/default/core/skeleton/demos/children.tsx b/www/src/registry/ui/default/core/skeleton/demos/children.tsx index 77efc5ba..1eff8bde 100644 --- a/www/src/registry/ui/default/core/skeleton/demos/children.tsx +++ b/www/src/registry/ui/default/core/skeleton/demos/children.tsx @@ -1,10 +1,10 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { Skeleton } from "@/registry/ui/default/core/skeleton"; - -export default function Demo() { - return ( - - - - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { Skeleton } from "@/registry/ui/default/core/skeleton"; + +export default function Demo() { + return ( + + + + ); +} diff --git a/www/src/registry/ui/default/core/skeleton/demos/fixed-size-children.tsx b/www/src/registry/ui/default/core/skeleton/demos/fixed-size-children.tsx index 3216b14b..ecb20458 100644 --- a/www/src/registry/ui/default/core/skeleton/demos/fixed-size-children.tsx +++ b/www/src/registry/ui/default/core/skeleton/demos/fixed-size-children.tsx @@ -1,10 +1,10 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { Skeleton } from "@/registry/ui/default/core/skeleton"; - -export default function Demo() { - return ( - - - - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { Skeleton } from "@/registry/ui/default/core/skeleton"; + +export default function Demo() { + return ( + + + + ); +} diff --git a/www/src/registry/ui/default/core/skeleton/demos/show.tsx b/www/src/registry/ui/default/core/skeleton/demos/show.tsx index fbc5367e..8355f7eb 100644 --- a/www/src/registry/ui/default/core/skeleton/demos/show.tsx +++ b/www/src/registry/ui/default/core/skeleton/demos/show.tsx @@ -1,15 +1,15 @@ -import { Button } from "@/registry/ui/default/core/button"; -import { Skeleton } from "@/registry/ui/default/core/skeleton"; - -export default function Demo() { - return ( -
      - - - - - - -
      - ); -} +import { Button } from "@/registry/ui/default/core/button"; +import { Skeleton } from "@/registry/ui/default/core/skeleton"; + +export default function Demo() { + return ( +
      + + + + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/skeleton/index.ts b/www/src/registry/ui/default/core/skeleton/index.ts index 8e713ba5..d6de05b5 100644 --- a/www/src/registry/ui/default/core/skeleton/index.ts +++ b/www/src/registry/ui/default/core/skeleton/index.ts @@ -1 +1 @@ -export * from "./skeleton"; +export * from "./skeleton"; diff --git a/www/src/registry/ui/default/core/skeleton/skeleton.tsx b/www/src/registry/ui/default/core/skeleton/skeleton.tsx index 53ff7ca2..fe485813 100644 --- a/www/src/registry/ui/default/core/skeleton/skeleton.tsx +++ b/www/src/registry/ui/default/core/skeleton/skeleton.tsx @@ -1,23 +1,23 @@ -import { cn } from "@/registry/ui/default/lib/cn"; - -function Skeleton({ - className, - show = true, - ...props -}: React.HTMLAttributes & { - show?: boolean; -}) { - if (!show) return props.children; - return ( - - ); -} - -export { Skeleton }; +import { cn } from "@/registry/ui/default/lib/cn"; + +function Skeleton({ + className, + show = true, + ...props +}: React.HTMLAttributes & { + show?: boolean; +}) { + if (!show) return props.children; + return ( + + ); +} + +export { Skeleton }; diff --git a/www/src/registry/ui/default/core/slider/demos/advanced-composition.tsx b/www/src/registry/ui/default/core/slider/demos/advanced-composition.tsx index 7ca3ae06..78a9000a 100644 --- a/www/src/registry/ui/default/core/slider/demos/advanced-composition.tsx +++ b/www/src/registry/ui/default/core/slider/demos/advanced-composition.tsx @@ -1,29 +1,29 @@ -import { Label, Description } from "@/registry/ui/default/core/field"; -import { - SliderFiller, - SliderRoot, - SliderThumb, - SliderTrack, - SliderValueLabel, -} from "@/registry/ui/default/core/slider"; -import { Volume1Icon, Volume2Icon } from "@/__icons__"; - -export default function Demo() { - return ( - -
      - - -
      -
      - - - - - - -
      - Adjust the volume. -
      - ); -} +import { Label, Description } from "@/registry/ui/default/core/field"; +import { + SliderFiller, + SliderRoot, + SliderThumb, + SliderTrack, + SliderValueLabel, +} from "@/registry/ui/default/core/slider"; +import { Volume1Icon, Volume2Icon } from "@/__icons__"; + +export default function Demo() { + return ( + +
      + + +
      +
      + + + + + + +
      + Adjust the volume. +
      + ); +} diff --git a/www/src/registry/ui/default/core/slider/demos/composition.tsx b/www/src/registry/ui/default/core/slider/demos/composition.tsx index 1d00a664..b64bb8d8 100644 --- a/www/src/registry/ui/default/core/slider/demos/composition.tsx +++ b/www/src/registry/ui/default/core/slider/demos/composition.tsx @@ -1,19 +1,19 @@ -import { Description, Label } from "@/registry/ui/default/core/field"; -import { - SliderControls, - SliderRoot, - SliderValueLabel, -} from "@/registry/ui/default/core/slider"; - -export default function Demo() { - return ( - -
      - - -
      - - Adjust the volume. -
      - ); -} +import { Description, Label } from "@/registry/ui/default/core/field"; +import { + SliderControls, + SliderRoot, + SliderValueLabel, +} from "@/registry/ui/default/core/slider"; + +export default function Demo() { + return ( + +
      + + +
      + + Adjust the volume. +
      + ); +} diff --git a/www/src/registry/ui/default/core/slider/demos/controlled.tsx b/www/src/registry/ui/default/core/slider/demos/controlled.tsx index b7c5dc0d..cef52768 100644 --- a/www/src/registry/ui/default/core/slider/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/slider/demos/controlled.tsx @@ -1,20 +1,20 @@ -"use client"; - -import React from "react"; -import { Slider } from "@/registry/ui/default/core/slider"; - -export default function Demo() { - const [value, setValue] = React.useState(50); - return ( -
      - setValue(value as number)} - /> - - Value: {value} - -
      - ); -} +"use client"; + +import React from "react"; +import { Slider } from "@/registry/ui/default/core/slider"; + +export default function Demo() { + const [value, setValue] = React.useState(50); + return ( +
      + setValue(value as number)} + /> + + Value: {value} + +
      + ); +} diff --git a/www/src/registry/ui/default/core/slider/demos/default.tsx b/www/src/registry/ui/default/core/slider/demos/default.tsx index 2544522d..ca9eb626 100644 --- a/www/src/registry/ui/default/core/slider/demos/default.tsx +++ b/www/src/registry/ui/default/core/slider/demos/default.tsx @@ -1,5 +1,5 @@ -import { Slider } from "@/registry/ui/default/core/slider"; - -export default function Demo() { - return ; -} +import { Slider } from "@/registry/ui/default/core/slider"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/slider/demos/description.tsx b/www/src/registry/ui/default/core/slider/demos/description.tsx index f5e168c7..1b29e0ec 100644 --- a/www/src/registry/ui/default/core/slider/demos/description.tsx +++ b/www/src/registry/ui/default/core/slider/demos/description.tsx @@ -1,11 +1,11 @@ -import { Slider } from "@/registry/ui/default/core/slider"; - -export default function Demo() { - return ( - - ); -} +import { Slider } from "@/registry/ui/default/core/slider"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/slider/demos/disabled.tsx b/www/src/registry/ui/default/core/slider/demos/disabled.tsx index d4ef82f5..01554180 100644 --- a/www/src/registry/ui/default/core/slider/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/slider/demos/disabled.tsx @@ -1,5 +1,5 @@ -import { Slider } from "@/registry/ui/default/core/slider"; - -export default function Demo() { - return ; -} +import { Slider } from "@/registry/ui/default/core/slider"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/slider/demos/format-options.tsx b/www/src/registry/ui/default/core/slider/demos/format-options.tsx index 6028dace..76e4826b 100644 --- a/www/src/registry/ui/default/core/slider/demos/format-options.tsx +++ b/www/src/registry/ui/default/core/slider/demos/format-options.tsx @@ -1,12 +1,12 @@ -import { Slider } from "@/registry/ui/default/core/slider"; - -export default function Demo() { - return ( - - ); -} +import { Slider } from "@/registry/ui/default/core/slider"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/slider/demos/label.tsx b/www/src/registry/ui/default/core/slider/demos/label.tsx index 10b026f5..0e25a832 100644 --- a/www/src/registry/ui/default/core/slider/demos/label.tsx +++ b/www/src/registry/ui/default/core/slider/demos/label.tsx @@ -1,10 +1,10 @@ -import { Slider } from "@/registry/ui/default/core/slider"; - -export default function Demo() { - return ( -
      - - -
      - ); -} +import { Slider } from "@/registry/ui/default/core/slider"; + +export default function Demo() { + return ( +
      + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/slider/demos/range.tsx b/www/src/registry/ui/default/core/slider/demos/range.tsx index dfe3ead9..cfb07df8 100644 --- a/www/src/registry/ui/default/core/slider/demos/range.tsx +++ b/www/src/registry/ui/default/core/slider/demos/range.tsx @@ -1,13 +1,13 @@ -import { Slider } from "@/registry/ui/default/core/slider"; - -export default function Demo() { - return ( - - ); -} +import { Slider } from "@/registry/ui/default/core/slider"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/slider/demos/sizes.tsx b/www/src/registry/ui/default/core/slider/demos/sizes.tsx index 8c523ac8..f1b39ff9 100644 --- a/www/src/registry/ui/default/core/slider/demos/sizes.tsx +++ b/www/src/registry/ui/default/core/slider/demos/sizes.tsx @@ -1,11 +1,11 @@ -import { Slider } from "@/registry/ui/default/core/slider"; - -export default function Demo() { - return ( -
      - - - -
      - ); -} +import { Slider } from "@/registry/ui/default/core/slider"; + +export default function Demo() { + return ( +
      + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/slider/demos/step.tsx b/www/src/registry/ui/default/core/slider/demos/step.tsx index d2824947..e3885e3c 100644 --- a/www/src/registry/ui/default/core/slider/demos/step.tsx +++ b/www/src/registry/ui/default/core/slider/demos/step.tsx @@ -1,7 +1,7 @@ -import { Slider } from "@/registry/ui/default/core/slider"; - -export default function Demo() { - return ( - - ); -} +import { Slider } from "@/registry/ui/default/core/slider"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/slider/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/slider/demos/uncontrolled.tsx index 2544522d..ca9eb626 100644 --- a/www/src/registry/ui/default/core/slider/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/slider/demos/uncontrolled.tsx @@ -1,5 +1,5 @@ -import { Slider } from "@/registry/ui/default/core/slider"; - -export default function Demo() { - return ; -} +import { Slider } from "@/registry/ui/default/core/slider"; + +export default function Demo() { + return ; +} diff --git a/www/src/registry/ui/default/core/slider/demos/value-label.tsx b/www/src/registry/ui/default/core/slider/demos/value-label.tsx index c9ad9678..220c5bb8 100644 --- a/www/src/registry/ui/default/core/slider/demos/value-label.tsx +++ b/www/src/registry/ui/default/core/slider/demos/value-label.tsx @@ -1,22 +1,22 @@ -"use client"; - -import { Slider } from "@/registry/ui/default/core/slider"; - -export default function Demo() { - return ( -
      - - `${donuts[0]} of 100 Donuts`} - className="!w-60" - /> -
      - ); -} +"use client"; + +import { Slider } from "@/registry/ui/default/core/slider"; + +export default function Demo() { + return ( +
      + + `${donuts[0]} of 100 Donuts`} + className="!w-60" + /> +
      + ); +} diff --git a/www/src/registry/ui/default/core/slider/demos/value-scale.tsx b/www/src/registry/ui/default/core/slider/demos/value-scale.tsx index fbc68146..32c40b08 100644 --- a/www/src/registry/ui/default/core/slider/demos/value-scale.tsx +++ b/www/src/registry/ui/default/core/slider/demos/value-scale.tsx @@ -1,13 +1,13 @@ -import { Slider } from "@/registry/ui/default/core/slider"; - -export default function Demo() { - return ( - - ); -} +import { Slider } from "@/registry/ui/default/core/slider"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/slider/demos/vertical.tsx b/www/src/registry/ui/default/core/slider/demos/vertical.tsx index dbbac1d0..3fa0d51f 100644 --- a/www/src/registry/ui/default/core/slider/demos/vertical.tsx +++ b/www/src/registry/ui/default/core/slider/demos/vertical.tsx @@ -1,7 +1,7 @@ -import { Slider } from "@/registry/ui/default/core/slider"; - -export default function Demo() { - return ( - - ); -} +import { Slider } from "@/registry/ui/default/core/slider"; + +export default function Demo() { + return ( + + ); +} diff --git a/www/src/registry/ui/default/core/slider/index.ts b/www/src/registry/ui/default/core/slider/index.ts index 67c45bb0..70fa68fc 100644 --- a/www/src/registry/ui/default/core/slider/index.ts +++ b/www/src/registry/ui/default/core/slider/index.ts @@ -1 +1 @@ -export * from "./slider"; +export * from "./slider"; diff --git a/www/src/registry/ui/default/core/slider/slider.tsx b/www/src/registry/ui/default/core/slider/slider.tsx index acc450ac..b714b7a6 100644 --- a/www/src/registry/ui/default/core/slider/slider.tsx +++ b/www/src/registry/ui/default/core/slider/slider.tsx @@ -1,231 +1,231 @@ -"use client"; - -import * as React from "react"; -import { useSlotId } from "@react-aria/utils"; -import { - composeRenderProps, - Slider as AriaSlider, - SliderOutput as AriaSliderOutput, - SliderThumb as AriaSliderThumb, - SliderTrack as AriaSliderTrack, - type SliderThumbProps as AriaSliderThumbProps, - type SliderOutputProps as AriaSliderOutputProps, - type SliderTrackProps as AriaSliderTrackProps, - type SliderProps as AriaSliderProps, - SliderStateContext as AriaSliderStateContext, - TextContext as AriaTextContext, -} from "react-aria-components"; -import { tv, type VariantProps } from "tailwind-variants"; -import { - Description, - Label, - type FieldProps, -} from "@/registry/ui/default/core/field"; -import { cn } from "@/registry/ui/default/lib/cn"; -import { focusRing } from "@/registry/ui/default/lib/focus-styles"; - -const sliderStyles = tv({ - slots: { - root: "orientation-horizontal:w-48 orientation-vertical:h-48 orientation-vertical:items-center flex flex-col gap-2", - track: [ - "group/track bg-bg-neutral disabled:bg-bg-disabled relative cursor-pointer rounded-full disabled:cursor-default", - "orientation-vertical:flex-1 orientation-vertical:w-2 orientation-horizontal:w-full orientation-horizontal:h-2 grow", - ], - filler: [ - "bg-border-focus group-disabled/track:bg-bg-disabled rounded-full", - "group-orientation-horizontal/top-0 group-orientation-vertical/track:w-full group-orientation-vertical/track:bottom-0 group-orientation-horizontal/track:h-full pointer-events-none absolute", - ], - thumb: [ - focusRing(), - "rounded-full bg-white shadow-md transition-[width,height]", - "absolute left-[50%] top-[50%] block !-translate-x-1/2 !-translate-y-1/2", - "disabled:bg-bg-disabled disabled:border-bg disabled:border", - ], - valueLabel: "text-fg-muted text-sm", - }, - variants: { - size: { - sm: { - thumb: "dragging:size-4 size-3", - track: "orientation-vertical:w-1 orientation-horizontal:h-1", - }, - md: { - thumb: "dragging:size-5 size-4", - track: "orientation-vertical:w-2 orientation-horizontal:h-2", - }, - lg: { - thumb: "dragging:size-6 size-5", - track: "orientation-vertical:w-3 orientation-horizontal:h-3", - }, - }, - }, - defaultVariants: { - size: "md", - }, -}); - -interface SliderProps - extends SliderRootProps, - VariantProps { - label?: FieldProps["label"]; - description?: FieldProps["description"]; - valueLabel?: boolean | ((value: number[]) => string); -} -const Slider = React.forwardRef< - React.ElementRef, - SliderProps ->(({ label, description, valueLabel = false, size, ...props }, ref) => ( - - {(label || !!valueLabel) && ( -
      - {label && } - {!!valueLabel && ( - - {({ state }) => - typeof valueLabel === "function" - ? valueLabel(state.values) - : undefined - } - - )} -
      - )} - - {description && {description}} -
      -)); -Slider.displayName = "Slider"; - -type SliderRootProps = AriaSliderProps; -const SliderRoot = React.forwardRef( - (props: SliderRootProps, ref: React.Ref) => { - const { root } = sliderStyles(); - const descriptionId = useSlotId(); - return ( - - - root({ className }) - )} - /> - - ); - } -); -SliderRoot.displayName = "SliderRoot"; - -type SliderControlsProps = SliderTrackProps & VariantProps; -const SliderControls = (props: SliderControlsProps) => { - const { values } = React.useContext(AriaSliderStateContext); - return ( - - - {values.map((_, i) => ( - - ))} - - ); -}; - -type SliderTrackProps = AriaSliderTrackProps & - VariantProps; -const SliderTrack = ({ size, ...props }: SliderTrackProps) => { - const { track } = sliderStyles({ size }); - return ( - - track({ className }) - )} - /> - ); -}; - -type SliderFillerProps = React.HTMLAttributes; -const SliderFiller = (props: SliderFillerProps) => { - const { filler } = sliderStyles(); - const { orientation, getThumbPercent, values } = React.useContext( - AriaSliderStateContext - ); - return ( -
      - ); -}; - -type SliderThumbProps = AriaSliderThumbProps & - VariantProps; -const SliderThumb = ({ size, ...props }: SliderThumbProps) => { - const { thumb } = sliderStyles({ size }); - return ( - - thumb({ className }) - )} - /> - ); -}; - -type SliderValueLabelProps = AriaSliderOutputProps; -const SliderValueLabel = (props: SliderValueLabelProps) => { - const { valueLabel } = sliderStyles(); - return ( - - valueLabel({ className }) - )} - > - {composeRenderProps( - props.children, - (children, { state }) => - children ?? - state.values.map((_, i) => state.getThumbValueLabel(i)).join(" - ") - )} - - ); -}; - -export { - Slider, - SliderRoot, - SliderControls, - SliderTrack, - SliderFiller, - SliderThumb, - SliderValueLabel, -}; +"use client"; + +import * as React from "react"; +import { useSlotId } from "@react-aria/utils"; +import { + composeRenderProps, + Slider as AriaSlider, + SliderOutput as AriaSliderOutput, + SliderThumb as AriaSliderThumb, + SliderTrack as AriaSliderTrack, + type SliderThumbProps as AriaSliderThumbProps, + type SliderOutputProps as AriaSliderOutputProps, + type SliderTrackProps as AriaSliderTrackProps, + type SliderProps as AriaSliderProps, + SliderStateContext as AriaSliderStateContext, + TextContext as AriaTextContext, +} from "react-aria-components"; +import { tv, type VariantProps } from "tailwind-variants"; +import { + Description, + Label, + type FieldProps, +} from "@/registry/ui/default/core/field"; +import { cn } from "@/registry/ui/default/lib/cn"; +import { focusRing } from "@/registry/ui/default/lib/focus-styles"; + +const sliderStyles = tv({ + slots: { + root: "orientation-horizontal:w-48 orientation-vertical:h-48 orientation-vertical:items-center flex flex-col gap-2", + track: [ + "group/track bg-bg-neutral disabled:bg-bg-disabled relative cursor-pointer rounded-full disabled:cursor-default", + "orientation-vertical:flex-1 orientation-vertical:w-2 orientation-horizontal:w-full orientation-horizontal:h-2 grow", + ], + filler: [ + "bg-border-focus group-disabled/track:bg-bg-disabled rounded-full", + "group-orientation-horizontal/top-0 group-orientation-vertical/track:w-full group-orientation-vertical/track:bottom-0 group-orientation-horizontal/track:h-full pointer-events-none absolute", + ], + thumb: [ + focusRing(), + "rounded-full bg-white shadow-md transition-[width,height]", + "absolute left-[50%] top-[50%] block !-translate-x-1/2 !-translate-y-1/2", + "disabled:bg-bg-disabled disabled:border-bg disabled:border", + ], + valueLabel: "text-fg-muted text-sm", + }, + variants: { + size: { + sm: { + thumb: "dragging:size-4 size-3", + track: "orientation-vertical:w-1 orientation-horizontal:h-1", + }, + md: { + thumb: "dragging:size-5 size-4", + track: "orientation-vertical:w-2 orientation-horizontal:h-2", + }, + lg: { + thumb: "dragging:size-6 size-5", + track: "orientation-vertical:w-3 orientation-horizontal:h-3", + }, + }, + }, + defaultVariants: { + size: "md", + }, +}); + +interface SliderProps + extends SliderRootProps, + VariantProps { + label?: FieldProps["label"]; + description?: FieldProps["description"]; + valueLabel?: boolean | ((value: number[]) => string); +} +const Slider = React.forwardRef< + React.ElementRef, + SliderProps +>(({ label, description, valueLabel = false, size, ...props }, ref) => ( + + {(label || !!valueLabel) && ( +
      + {label && } + {!!valueLabel && ( + + {({ state }) => + typeof valueLabel === "function" + ? valueLabel(state.values) + : undefined + } + + )} +
      + )} + + {description && {description}} +
      +)); +Slider.displayName = "Slider"; + +type SliderRootProps = AriaSliderProps; +const SliderRoot = React.forwardRef( + (props: SliderRootProps, ref: React.Ref) => { + const { root } = sliderStyles(); + const descriptionId = useSlotId(); + return ( + + + root({ className }) + )} + /> + + ); + } +); +SliderRoot.displayName = "SliderRoot"; + +type SliderControlsProps = SliderTrackProps & VariantProps; +const SliderControls = (props: SliderControlsProps) => { + const { values } = React.useContext(AriaSliderStateContext); + return ( + + + {values.map((_, i) => ( + + ))} + + ); +}; + +type SliderTrackProps = AriaSliderTrackProps & + VariantProps; +const SliderTrack = ({ size, ...props }: SliderTrackProps) => { + const { track } = sliderStyles({ size }); + return ( + + track({ className }) + )} + /> + ); +}; + +type SliderFillerProps = React.HTMLAttributes; +const SliderFiller = (props: SliderFillerProps) => { + const { filler } = sliderStyles(); + const { orientation, getThumbPercent, values } = React.useContext( + AriaSliderStateContext + ); + return ( +
      + ); +}; + +type SliderThumbProps = AriaSliderThumbProps & + VariantProps; +const SliderThumb = ({ size, ...props }: SliderThumbProps) => { + const { thumb } = sliderStyles({ size }); + return ( + + thumb({ className }) + )} + /> + ); +}; + +type SliderValueLabelProps = AriaSliderOutputProps; +const SliderValueLabel = (props: SliderValueLabelProps) => { + const { valueLabel } = sliderStyles(); + return ( + + valueLabel({ className }) + )} + > + {composeRenderProps( + props.children, + (children, { state }) => + children ?? + state.values.map((_, i) => state.getThumbValueLabel(i)).join(" - ") + )} + + ); +}; + +export { + Slider, + SliderRoot, + SliderControls, + SliderTrack, + SliderFiller, + SliderThumb, + SliderValueLabel, +}; diff --git a/www/src/registry/ui/default/core/switch/demos/controlled.tsx b/www/src/registry/ui/default/core/switch/demos/controlled.tsx index b7f1c1b0..93e64253 100644 --- a/www/src/registry/ui/default/core/switch/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/switch/demos/controlled.tsx @@ -1,19 +1,19 @@ -"use client"; - -import React from "react"; -import { Switch } from "@/registry/ui/default/core/switch"; - -export default function Demo() { - const [isSelected, setSelected] = React.useState(true); - return ( -
      - - Airplane Mode - -

      - You are {isSelected && "not"} on{" "} - focus mode. -

      -
      - ); -} +"use client"; + +import React from "react"; +import { Switch } from "@/registry/ui/default/core/switch"; + +export default function Demo() { + const [isSelected, setSelected] = React.useState(true); + return ( +
      + + Airplane Mode + +

      + You are {isSelected && "not"} on{" "} + focus mode. +

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/switch/demos/default.tsx b/www/src/registry/ui/default/core/switch/demos/default.tsx index 229fd47a..16a10538 100644 --- a/www/src/registry/ui/default/core/switch/demos/default.tsx +++ b/www/src/registry/ui/default/core/switch/demos/default.tsx @@ -1,6 +1,6 @@ -import React from "react"; -import { Switch } from "@/registry/ui/default/core/switch"; - -export default function Demo() { - return Focus mode; -} +import React from "react"; +import { Switch } from "@/registry/ui/default/core/switch"; + +export default function Demo() { + return Focus mode; +} diff --git a/www/src/registry/ui/default/core/switch/demos/disabled.tsx b/www/src/registry/ui/default/core/switch/demos/disabled.tsx index 1d82fa42..6fbb89f6 100644 --- a/www/src/registry/ui/default/core/switch/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/switch/demos/disabled.tsx @@ -1,12 +1,12 @@ -import { Switch } from "@/registry/ui/default/core/switch"; - -export default function Demo() { - return ( -
      - - Focus Mode - - Focus Mode -
      - ); -} +import { Switch } from "@/registry/ui/default/core/switch"; + +export default function Demo() { + return ( +
      + + Focus Mode + + Focus Mode +
      + ); +} diff --git a/www/src/registry/ui/default/core/switch/demos/label.tsx b/www/src/registry/ui/default/core/switch/demos/label.tsx index fa4c4554..a7c3e631 100644 --- a/www/src/registry/ui/default/core/switch/demos/label.tsx +++ b/www/src/registry/ui/default/core/switch/demos/label.tsx @@ -1,11 +1,11 @@ -import React from "react"; -import { Switch } from "@/registry/ui/default/core/switch"; - -export default function Demo() { - return ( -
      - Focus mode - -
      - ); -} +import React from "react"; +import { Switch } from "@/registry/ui/default/core/switch"; + +export default function Demo() { + return ( +
      + Focus mode + +
      + ); +} diff --git a/www/src/registry/ui/default/core/switch/demos/sizes.tsx b/www/src/registry/ui/default/core/switch/demos/sizes.tsx index 933f3cea..05a2555b 100644 --- a/www/src/registry/ui/default/core/switch/demos/sizes.tsx +++ b/www/src/registry/ui/default/core/switch/demos/sizes.tsx @@ -1,11 +1,11 @@ -import { Switch } from "@/registry/ui/default/core/switch"; - -export default function Demo() { - return ( -
      - - - -
      - ); -} +import { Switch } from "@/registry/ui/default/core/switch"; + +export default function Demo() { + return ( +
      + + + +
      + ); +} diff --git a/www/src/registry/ui/default/core/switch/demos/uncontrolled.tsx b/www/src/registry/ui/default/core/switch/demos/uncontrolled.tsx index b74e111f..edcbff7c 100644 --- a/www/src/registry/ui/default/core/switch/demos/uncontrolled.tsx +++ b/www/src/registry/ui/default/core/switch/demos/uncontrolled.tsx @@ -1,6 +1,6 @@ -import React from "react"; -import { Switch } from "@/registry/ui/default/core/switch"; - -export default function Demo() { - return Airplane Mode; -} +import React from "react"; +import { Switch } from "@/registry/ui/default/core/switch"; + +export default function Demo() { + return Airplane Mode; +} diff --git a/www/src/registry/ui/default/core/switch/index.ts b/www/src/registry/ui/default/core/switch/index.ts index 7c69fd95..48067a0b 100644 --- a/www/src/registry/ui/default/core/switch/index.ts +++ b/www/src/registry/ui/default/core/switch/index.ts @@ -1 +1 @@ -export * from "./switch"; +export * from "./switch"; diff --git a/www/src/registry/ui/default/core/switch/switch.tsx b/www/src/registry/ui/default/core/switch/switch.tsx index def154eb..e77523eb 100644 --- a/www/src/registry/ui/default/core/switch/switch.tsx +++ b/www/src/registry/ui/default/core/switch/switch.tsx @@ -1,70 +1,70 @@ -"use client"; - -import * as React from "react"; -import { - Switch as AriaSwitch, - composeRenderProps, - type SwitchProps as AriaSwitchProps, -} from "react-aria-components"; -import { tv, type VariantProps } from "tailwind-variants"; -import { focusRing } from "@/registry/ui/default/lib/focus-styles"; - -const switchStyles = tv({ - slots: { - root: "group/switch disabled:text-fg-disabled flex items-center gap-3", - wrapper: [ - focusRing(), - "inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors", - "group-disabled/switch:border-border-disabled group-disabled/switch:group-selected/switch:border-none group-disabled/switch:group-selected/switch:bg-bg-disabled group-selected/switch:bg-border-focus bg-bg-neutral group-disabled/switch:cursor-not-allowed group-disabled/switch:border group-disabled/switch:bg-transparent", - ], - indicator: - "group-disabled/switch:bg-fg-disabled pointer-events-none block origin-right rounded-full bg-white shadow-lg ring-0 transition-all duration-200", - label: "", - }, - variants: { - size: { - sm: { - wrapper: "h-5 w-9", - indicator: - "group-pressed/switch:w-5 group-selected/switch:ml-4 group-selected/switch:group-pressed/switch:ml-3 size-4", - }, - md: { - wrapper: "h-6 w-11", - indicator: - "group-pressed/switch:w-6 group-selected/switch:ml-5 group-selected/switch:group-pressed/switch:ml-4 size-5", - }, - lg: { - wrapper: "h-7 w-12", - indicator: - "group-pressed/switch:w-7 group-selected/switch:ml-6 group-selected/switch:group-pressed/switch:ml-5 size-6", - }, - }, - }, - defaultVariants: { - size: "md", - }, -}); - -interface SwitchProps - extends Omit, - VariantProps { - className?: string; -} -const Switch = ({ className, size, ...props }: SwitchProps) => { - const { root, wrapper, indicator, label } = switchStyles({ size }); - - return ( - - {composeRenderProps(props.children, (children) => ( - <> - - - - {children && {children}} - - ))} - - ); -}; - -export { Switch }; +"use client"; + +import * as React from "react"; +import { + Switch as AriaSwitch, + composeRenderProps, + type SwitchProps as AriaSwitchProps, +} from "react-aria-components"; +import { tv, type VariantProps } from "tailwind-variants"; +import { focusRing } from "@/registry/ui/default/lib/focus-styles"; + +const switchStyles = tv({ + slots: { + root: "group/switch disabled:text-fg-disabled flex items-center gap-3", + wrapper: [ + focusRing(), + "inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors", + "group-disabled/switch:border-border-disabled group-disabled/switch:group-selected/switch:border-none group-disabled/switch:group-selected/switch:bg-bg-disabled group-selected/switch:bg-border-focus bg-bg-neutral group-disabled/switch:cursor-not-allowed group-disabled/switch:border group-disabled/switch:bg-transparent", + ], + indicator: + "group-disabled/switch:bg-fg-disabled pointer-events-none block origin-right rounded-full bg-white shadow-lg ring-0 transition-all duration-200", + label: "", + }, + variants: { + size: { + sm: { + wrapper: "h-5 w-9", + indicator: + "group-pressed/switch:w-5 group-selected/switch:ml-4 group-selected/switch:group-pressed/switch:ml-3 size-4", + }, + md: { + wrapper: "h-6 w-11", + indicator: + "group-pressed/switch:w-6 group-selected/switch:ml-5 group-selected/switch:group-pressed/switch:ml-4 size-5", + }, + lg: { + wrapper: "h-7 w-12", + indicator: + "group-pressed/switch:w-7 group-selected/switch:ml-6 group-selected/switch:group-pressed/switch:ml-5 size-6", + }, + }, + }, + defaultVariants: { + size: "md", + }, +}); + +interface SwitchProps + extends Omit, + VariantProps { + className?: string; +} +const Switch = ({ className, size, ...props }: SwitchProps) => { + const { root, wrapper, indicator, label } = switchStyles({ size }); + + return ( + + {composeRenderProps(props.children, (children) => ( + <> + + + + {children && {children}} + + ))} + + ); +}; + +export { Switch }; diff --git a/www/src/registry/ui/default/core/table/index.ts b/www/src/registry/ui/default/core/table/index.ts index 0e948df9..3fee7baf 100644 --- a/www/src/registry/ui/default/core/table/index.ts +++ b/www/src/registry/ui/default/core/table/index.ts @@ -1 +1 @@ -export * from "./table"; +export * from "./table"; diff --git a/www/src/registry/ui/default/core/table/table.tsx b/www/src/registry/ui/default/core/table/table.tsx index 55914616..ef0eb8ca 100644 --- a/www/src/registry/ui/default/core/table/table.tsx +++ b/www/src/registry/ui/default/core/table/table.tsx @@ -1,116 +1,116 @@ -import * as React from "react"; -import { cn } from "@/registry/ui/default/lib/cn"; - -const Table = React.forwardRef< - HTMLTableElement, - React.HTMLAttributes ->(({ className, ...props }, ref) => ( -
      -

      + ), + td: ({ className, children, ...props }) => ( + +
      {children}
      +
      - -)); -Table.displayName = "Table"; - -const TableHeader = React.forwardRef< - HTMLTableSectionElement, - React.HTMLAttributes ->(({ className, ...props }, ref) => ( - -)); -TableHeader.displayName = "TableHeader"; - -const TableBody = React.forwardRef< - HTMLTableSectionElement, - React.HTMLAttributes ->(({ className, ...props }, ref) => ( - -)); -TableBody.displayName = "TableBody"; - -const TableFooter = React.forwardRef< - HTMLTableSectionElement, - React.HTMLAttributes ->(({ className, ...props }, ref) => ( - tr]:last:border-b-0", - className - )} - {...props} - /> -)); -TableFooter.displayName = "TableFooter"; - -const TableRow = React.forwardRef< - HTMLTableRowElement, - React.HTMLAttributes ->(({ className, ...props }, ref) => ( - -)); -TableRow.displayName = "TableRow"; - -const TableHead = React.forwardRef< - HTMLTableCellElement, - React.ThHTMLAttributes ->(({ className, ...props }, ref) => ( -
      -)); -TableHead.displayName = "TableHead"; - -const TableCell = React.forwardRef< - HTMLTableCellElement, - React.TdHTMLAttributes ->(({ className, ...props }, ref) => ( - -)); -TableCell.displayName = "TableCell"; - -const TableCaption = React.forwardRef< - HTMLTableCaptionElement, - React.HTMLAttributes ->(({ className, ...props }, ref) => ( -
      -)); -TableCaption.displayName = "TableCaption"; - -export { - Table, - TableHeader, - TableBody, - TableFooter, - TableHead, - TableRow, - TableCell, - TableCaption, -}; +import * as React from "react"; +import { cn } from "@/registry/ui/default/lib/cn"; + +const Table = React.forwardRef< + HTMLTableElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
      + + +)); +Table.displayName = "Table"; + +const TableHeader = React.forwardRef< + HTMLTableSectionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + +)); +TableHeader.displayName = "TableHeader"; + +const TableBody = React.forwardRef< + HTMLTableSectionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + +)); +TableBody.displayName = "TableBody"; + +const TableFooter = React.forwardRef< + HTMLTableSectionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + tr]:last:border-b-0", + className + )} + {...props} + /> +)); +TableFooter.displayName = "TableFooter"; + +const TableRow = React.forwardRef< + HTMLTableRowElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( + +)); +TableRow.displayName = "TableRow"; + +const TableHead = React.forwardRef< + HTMLTableCellElement, + React.ThHTMLAttributes +>(({ className, ...props }, ref) => ( +
      +)); +TableHead.displayName = "TableHead"; + +const TableCell = React.forwardRef< + HTMLTableCellElement, + React.TdHTMLAttributes +>(({ className, ...props }, ref) => ( + +)); +TableCell.displayName = "TableCell"; + +const TableCaption = React.forwardRef< + HTMLTableCaptionElement, + React.HTMLAttributes +>(({ className, ...props }, ref) => ( +
      +)); +TableCaption.displayName = "TableCaption"; + +export { + Table, + TableHeader, + TableBody, + TableFooter, + TableHead, + TableRow, + TableCell, + TableCaption, +}; diff --git a/www/src/registry/ui/default/core/tabs/demos/basic.tsx b/www/src/registry/ui/default/core/tabs/demos/basic.tsx index 552cdecd..a5b17b54 100644 --- a/www/src/registry/ui/default/core/tabs/demos/basic.tsx +++ b/www/src/registry/ui/default/core/tabs/demos/basic.tsx @@ -1,16 +1,16 @@ -import { Tabs, TabList, TabPanel, Tab } from "@/registry/ui/default/core/tabs"; - -export default function Demo() { - return ( - - - Overview - Usage - Settings - - You can view all your projects here. - You can view your usage here. - You can view your settings here. - - ); -} +import { Tabs, TabList, TabPanel, Tab } from "@/registry/ui/default/core/tabs"; + +export default function Demo() { + return ( + + + Overview + Usage + Settings + + You can view all your projects here. + You can view your usage here. + You can view your settings here. + + ); +} diff --git a/www/src/registry/ui/default/core/tabs/demos/controlled.tsx b/www/src/registry/ui/default/core/tabs/demos/controlled.tsx index 154ac432..9bb2210d 100644 --- a/www/src/registry/ui/default/core/tabs/demos/controlled.tsx +++ b/www/src/registry/ui/default/core/tabs/demos/controlled.tsx @@ -1,29 +1,29 @@ -"use client"; - -import React from "react"; -import type { Key } from "react-aria-components"; -import { Tabs, TabList, TabPanel, Tab } from "@/registry/ui/default/core/tabs"; - -export default function Demo() { - const [selectedTab, setSelectedTab] = React.useState("overview"); - return ( -
      - - - Overview - Usage - Settings - - - {" "} - You can view all your projects here.{" "} - - You can view your usage here. - You can view your settings here. - -

      - Selected tab: {selectedTab} -

      -
      - ); -} +"use client"; + +import React from "react"; +import type { Key } from "react-aria-components"; +import { Tabs, TabList, TabPanel, Tab } from "@/registry/ui/default/core/tabs"; + +export default function Demo() { + const [selectedTab, setSelectedTab] = React.useState("overview"); + return ( +
      + + + Overview + Usage + Settings + + + {" "} + You can view all your projects here.{" "} + + You can view your usage here. + You can view your settings here. + +

      + Selected tab: {selectedTab} +

      +
      + ); +} diff --git a/www/src/registry/ui/default/core/tabs/demos/disabled-item.tsx b/www/src/registry/ui/default/core/tabs/demos/disabled-item.tsx index 6e00a4a3..2fa99742 100644 --- a/www/src/registry/ui/default/core/tabs/demos/disabled-item.tsx +++ b/www/src/registry/ui/default/core/tabs/demos/disabled-item.tsx @@ -1,18 +1,18 @@ -import { Tabs, TabList, TabPanel, Tab } from "@/registry/ui/default/core/tabs"; - -export default function Demo() { - return ( - - - Overview - Usage - - Settings - - - You can view all your projects here. - You can view your usage here. - You can view your settings here. - - ); -} +import { Tabs, TabList, TabPanel, Tab } from "@/registry/ui/default/core/tabs"; + +export default function Demo() { + return ( + + + Overview + Usage + + Settings + + + You can view all your projects here. + You can view your usage here. + You can view your settings here. + + ); +} diff --git a/www/src/registry/ui/default/core/tabs/demos/disabled.tsx b/www/src/registry/ui/default/core/tabs/demos/disabled.tsx index 7c2572f9..6a6f1f7c 100644 --- a/www/src/registry/ui/default/core/tabs/demos/disabled.tsx +++ b/www/src/registry/ui/default/core/tabs/demos/disabled.tsx @@ -1,16 +1,16 @@ -import { Tabs, TabList, TabPanel, Tab } from "@/registry/ui/default/core/tabs"; - -export default function Demo() { - return ( - - - Overview - Usage - Settings - - You can view all your projects here. - You can view your usage here. - You can view your settings here. - - ); -} +import { Tabs, TabList, TabPanel, Tab } from "@/registry/ui/default/core/tabs"; + +export default function Demo() { + return ( + + + Overview + Usage + Settings + + You can view all your projects here. + You can view your usage here. + You can view your settings here. + + ); +} diff --git a/www/src/registry/ui/default/core/tabs/demos/keyboard-activation.tsx b/www/src/registry/ui/default/core/tabs/demos/keyboard-activation.tsx index 1f40ef6b..1d3d009e 100644 --- a/www/src/registry/ui/default/core/tabs/demos/keyboard-activation.tsx +++ b/www/src/registry/ui/default/core/tabs/demos/keyboard-activation.tsx @@ -1,16 +1,16 @@ -import { Tabs, TabList, TabPanel, Tab } from "@/registry/ui/default/core/tabs"; - -export default function Demo() { - return ( - - - Overview - Usage - Settings - - You can view all your projects here. - You can view your usage here. - You can view your settings here. - - ); -} +import { Tabs, TabList, TabPanel, Tab } from "@/registry/ui/default/core/tabs"; + +export default function Demo() { + return ( + + + Overview + Usage + Settings + + You can view all your projects here. + You can view your usage here. + You can view your settings here. + + ); +} diff --git a/www/src/registry/ui/default/core/tabs/demos/vertical.tsx b/www/src/registry/ui/default/core/tabs/demos/vertical.tsx index 40f7d628..7ba1c698 100644 --- a/www/src/registry/ui/default/core/tabs/demos/vertical.tsx +++ b/www/src/registry/ui/default/core/tabs/demos/vertical.tsx @@ -1,16 +1,16 @@ -import { Tabs, TabList, TabPanel, Tab } from "@/registry/ui/default/core/tabs"; - -export default function Demo() { - return ( - - - Overview - Usage - Settings - - You can view all your projects here. - You can view your usage here. - You can view your settings here. - - ); -} +import { Tabs, TabList, TabPanel, Tab } from "@/registry/ui/default/core/tabs"; + +export default function Demo() { + return ( + + + Overview + Usage + Settings + + You can view all your projects here. + You can view your usage here. + You can view your settings here. + + ); +} diff --git a/www/src/registry/ui/default/core/tabs/index.ts b/www/src/registry/ui/default/core/tabs/index.ts index 811d3d4a..d7dfa903 100644 --- a/www/src/registry/ui/default/core/tabs/index.ts +++ b/www/src/registry/ui/default/core/tabs/index.ts @@ -1 +1 @@ -export * from "./tabs"; +export * from "./tabs"; diff --git a/www/src/registry/ui/default/core/tabs/tabs.tsx b/www/src/registry/ui/default/core/tabs/tabs.tsx index 413e3824..98438aba 100644 --- a/www/src/registry/ui/default/core/tabs/tabs.tsx +++ b/www/src/registry/ui/default/core/tabs/tabs.tsx @@ -1,78 +1,78 @@ -"use client"; - -import * as React from "react"; -import { - Tabs as AriaTabs, - TabList as AriaTabList, - Tab as AriaTab, - TabPanel as AriaTabPanel, - type TabsProps as AriaTabsProps, - type TabListProps as AriaTabListProps, - type TabProps as AriaTabProps, - type TabPanelProps as AriaTabPanelProps, - composeRenderProps, -} from "react-aria-components"; -import { tv } from "tailwind-variants"; -import { focusRing } from "@/registry/ui/default/lib/focus-styles"; - -const tabsStyles = tv({ - slots: { - root: "orientation-vertical:flex-row flex flex-col", - list: "orientation-horizontal:overflow-x-auto orientation-horizontal:whitespace-nowrap orientation-horizontal:items-center orientation-horizontal:border-b orientation-vertical:flex-col orientation-vertical:border-r [&_[role=tab]]:orientation-horizontal:border-b-[3px] [&_[role=tab]]:orientation-vertical:border-r-[3px] flex", - tab: [ - "text-fg-muted selected:border-border-focus selected:text-fg disabled:text-fg-disabled disabled:selected:border-border-disabled -mb-px cursor-pointer border-transparent px-2 py-2 text-center text-sm font-medium outline-none transition-colors disabled:cursor-default", - "[&>span]:focus-visible:border-border-focus [&>span]:rounded-md [&>span]:border-2 [&>span]:border-transparent [&>span]:px-1.5 [&>span]:py-1", - ], - panel: [focusRing(), "rounded"], - }, -}); - -interface TabsProps extends Omit { - className?: string; -} -const Tabs = ({ className, ...props }: TabsProps) => { - const { root } = tabsStyles(); - return ; -}; - -interface TabListProps extends Omit, "className"> { - className?: string; -} -const TabList = ({ - className, - ...props -}: TabListProps) => { - const { list } = tabsStyles(); - return ( - - ); -}; - -interface TabProps extends Omit { - className?: string; -} -const Tab = ({ className, ...props }: TabProps) => { - const { tab } = tabsStyles(); - return ( - - {composeRenderProps(props.children, (children) => ( - {children} - ))} - - ); -}; - -interface TabPanelProps extends Omit { - className?: string; -} -const TabPanel = ({ className, ...props }: TabPanelProps) => { - const { panel } = tabsStyles(); - return ; -}; - -export type { TabsProps, TabListProps, TabProps, TabPanelProps }; -export { Tabs, TabList, Tab, TabPanel }; +"use client"; + +import * as React from "react"; +import { + Tabs as AriaTabs, + TabList as AriaTabList, + Tab as AriaTab, + TabPanel as AriaTabPanel, + type TabsProps as AriaTabsProps, + type TabListProps as AriaTabListProps, + type TabProps as AriaTabProps, + type TabPanelProps as AriaTabPanelProps, + composeRenderProps, +} from "react-aria-components"; +import { tv } from "tailwind-variants"; +import { focusRing } from "@/registry/ui/default/lib/focus-styles"; + +const tabsStyles = tv({ + slots: { + root: "orientation-vertical:flex-row flex flex-col", + list: "orientation-horizontal:overflow-x-auto orientation-horizontal:whitespace-nowrap orientation-horizontal:items-center orientation-horizontal:border-b orientation-vertical:flex-col orientation-vertical:border-r [&_[role=tab]]:orientation-horizontal:border-b-[3px] [&_[role=tab]]:orientation-vertical:border-r-[3px] flex", + tab: [ + "text-fg-muted selected:border-border-focus selected:text-fg disabled:text-fg-disabled disabled:selected:border-border-disabled -mb-px cursor-pointer border-transparent px-2 py-2 text-center text-sm font-medium outline-none transition-colors disabled:cursor-default", + "[&>span]:focus-visible:border-border-focus [&>span]:rounded-md [&>span]:border-2 [&>span]:border-transparent [&>span]:px-1.5 [&>span]:py-1", + ], + panel: [focusRing(), "rounded"], + }, +}); + +interface TabsProps extends Omit { + className?: string; +} +const Tabs = ({ className, ...props }: TabsProps) => { + const { root } = tabsStyles(); + return ; +}; + +interface TabListProps extends Omit, "className"> { + className?: string; +} +const TabList = ({ + className, + ...props +}: TabListProps) => { + const { list } = tabsStyles(); + return ( + + ); +}; + +interface TabProps extends Omit { + className?: string; +} +const Tab = ({ className, ...props }: TabProps) => { + const { tab } = tabsStyles(); + return ( + + {composeRenderProps(props.children, (children) => ( + {children} + ))} + + ); +}; + +interface TabPanelProps extends Omit { + className?: string; +} +const TabPanel = ({ className, ...props }: TabPanelProps) => { + const { panel } = tabsStyles(); + return ; +}; + +export type { TabsProps, TabListProps, TabProps, TabPanelProps }; +export { Tabs, TabList, Tab, TabPanel }; diff --git a/www/src/registry/ui/default/core/text-area/demos/composition.tsx b/www/src/registry/ui/default/core/text-area/demos/composition.tsx index 00ebd671..9d627f3d 100644 --- a/www/src/registry/ui/default/core/text-area/demos/composition.tsx +++ b/www/src/registry/ui/default/core/text-area/demos/composition.tsx @@ -1,16 +1,16 @@ -import React from "react"; -import { Description, Label } from "@/registry/ui/default/core/field"; -import { TextAreaInput, InputRoot } from "@/registry/ui/default/core/input"; -import { TextFieldRoot } from "@/registry/ui/default/core/text-field"; - -export default function Demo() { - return ( - - - - - - Enter your comment. - - ); -} +import React from "react"; +import { Description, Label } from "@/registry/ui/default/core/field"; +import { TextAreaInput, InputRoot } from "@/registry/ui/default/core/input"; +import { TextFieldRoot } from "@/registry/ui/default/core/text-field"; + +export default function Demo() { + return ( + + + + + + Enter your comment. + + ); +} diff --git a/www/src/registry/ui/default/core/text-area/demos/contextual-help.tsx b/www/src/registry/ui/default/core/text-area/demos/contextual-help.tsx index 468961e0..c789f90a 100644 --- a/www/src/registry/ui/default/core/text-area/demos/contextual-help.tsx +++ b/www/src/registry/ui/default/core/text-area/demos/contextual-help.tsx @@ -1,17 +1,17 @@ -import React from "react"; -import { ContextualHelp } from "@/registry/ui/default/core/contextual-help"; -import { TextArea } from "@/registry/ui/default/core/text-area"; - -export default function Demo() { - return ( -