@thalavaisankar/atoms 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +24 -0
- package/README.md +196 -2
- package/THIRD_PARTY_NOTICES.md +275 -0
- package/dist/blocks/index.d.mts +2 -0
- package/dist/blocks/index.mjs +1 -0
- package/dist/blocks/index.mjs.map +1 -0
- package/dist/components/ui/accordion/accordion.mjs +194 -0
- package/dist/components/ui/accordion/accordion.mjs.map +1 -0
- package/dist/components/ui/accordion/index.mjs +15 -0
- package/dist/components/ui/accordion/index.mjs.map +1 -0
- package/dist/components/ui/activity-feed/activity-feed.mjs +287 -0
- package/dist/components/ui/activity-feed/activity-feed.mjs.map +1 -0
- package/dist/components/ui/activity-feed/index.mjs +39 -0
- package/dist/components/ui/activity-feed/index.mjs.map +1 -0
- package/dist/components/ui/alert/alert.mjs +128 -0
- package/dist/components/ui/alert/alert.mjs.map +1 -0
- package/dist/components/ui/alert/index.mjs +17 -0
- package/dist/components/ui/alert/index.mjs.map +1 -0
- package/dist/components/ui/animated-label/animated-label.mjs +89 -0
- package/dist/components/ui/animated-label/animated-label.mjs.map +1 -0
- package/dist/components/ui/animated-label/index.mjs +9 -0
- package/dist/components/ui/animated-label/index.mjs.map +1 -0
- package/dist/components/ui/animated-number/animated-number.mjs +101 -0
- package/dist/components/ui/animated-number/animated-number.mjs.map +1 -0
- package/dist/components/ui/animated-number/index.mjs +5 -0
- package/dist/components/ui/animated-number/index.mjs.map +1 -0
- package/dist/components/ui/avatar/avatar.mjs +130 -0
- package/dist/components/ui/avatar/avatar.mjs.map +1 -0
- package/dist/components/ui/avatar/index.mjs +17 -0
- package/dist/components/ui/avatar/index.mjs.map +1 -0
- package/dist/components/ui/avatar-group/avatar-group.mjs +49 -0
- package/dist/components/ui/avatar-group/avatar-group.mjs.map +1 -0
- package/dist/components/ui/avatar-group/index.mjs +5 -0
- package/dist/components/ui/avatar-group/index.mjs.map +1 -0
- package/dist/components/ui/badge/badge-motion.mjs +108 -0
- package/dist/components/ui/badge/badge-motion.mjs.map +1 -0
- package/dist/components/ui/badge/badge.mjs +314 -0
- package/dist/components/ui/badge/badge.mjs.map +1 -0
- package/dist/components/ui/badge/index.mjs +27 -0
- package/dist/components/ui/badge/index.mjs.map +1 -0
- package/dist/components/ui/badge/readable-ink.mjs +36 -0
- package/dist/components/ui/badge/readable-ink.mjs.map +1 -0
- package/dist/components/ui/badge-group/badge-group.mjs +132 -0
- package/dist/components/ui/badge-group/badge-group.mjs.map +1 -0
- package/dist/components/ui/badge-group/index.mjs +5 -0
- package/dist/components/ui/badge-group/index.mjs.map +1 -0
- package/dist/components/ui/breadcrumb/breadcrumb.mjs +108 -0
- package/dist/components/ui/breadcrumb/breadcrumb.mjs.map +1 -0
- package/dist/components/ui/breadcrumb/index.mjs +19 -0
- package/dist/components/ui/breadcrumb/index.mjs.map +1 -0
- package/dist/components/ui/button/button-variants.mjs +80 -0
- package/dist/components/ui/button/button-variants.mjs.map +1 -0
- package/dist/components/ui/button/button.mjs +74 -0
- package/dist/components/ui/button/button.mjs.map +1 -0
- package/dist/components/ui/button/index.mjs +17 -0
- package/dist/components/ui/button/index.mjs.map +1 -0
- package/dist/components/ui/button/social-button.mjs +45 -0
- package/dist/components/ui/button/social-button.mjs.map +1 -0
- package/dist/components/ui/button/social-logos.mjs +179 -0
- package/dist/components/ui/button/social-logos.mjs.map +1 -0
- package/dist/components/ui/button/split-button.mjs +72 -0
- package/dist/components/ui/button/split-button.mjs.map +1 -0
- package/dist/components/ui/button-group/button-group.mjs +58 -0
- package/dist/components/ui/button-group/button-group.mjs.map +1 -0
- package/dist/components/ui/button-group/index.mjs +11 -0
- package/dist/components/ui/button-group/index.mjs.map +1 -0
- package/dist/components/ui/card/card.mjs +131 -0
- package/dist/components/ui/card/card.mjs.map +1 -0
- package/dist/components/ui/card/index.mjs +23 -0
- package/dist/components/ui/card/index.mjs.map +1 -0
- package/dist/components/ui/chart/bar-list.mjs +87 -0
- package/dist/components/ui/chart/bar-list.mjs.map +1 -0
- package/dist/components/ui/chart/chart-colors.mjs +68 -0
- package/dist/components/ui/chart/chart-colors.mjs.map +1 -0
- package/dist/components/ui/chart/chart-geometry.mjs +152 -0
- package/dist/components/ui/chart/chart-geometry.mjs.map +1 -0
- package/dist/components/ui/chart/chart-specialized.mjs +194 -0
- package/dist/components/ui/chart/chart-specialized.mjs.map +1 -0
- package/dist/components/ui/chart/chart.mjs +648 -0
- package/dist/components/ui/chart/chart.mjs.map +1 -0
- package/dist/components/ui/chart/index.mjs +88 -0
- package/dist/components/ui/chart/index.mjs.map +1 -0
- package/dist/components/ui/chart/radial-meter.mjs +142 -0
- package/dist/components/ui/chart/radial-meter.mjs.map +1 -0
- package/dist/components/ui/chart/types.mjs +1 -0
- package/dist/components/ui/chart/types.mjs.map +1 -0
- package/dist/components/ui/checkbox/checkbox.mjs +183 -0
- package/dist/components/ui/checkbox/checkbox.mjs.map +1 -0
- package/dist/components/ui/checkbox/index.mjs +11 -0
- package/dist/components/ui/checkbox/index.mjs.map +1 -0
- package/dist/components/ui/checklist/checklist.mjs +353 -0
- package/dist/components/ui/checklist/checklist.mjs.map +1 -0
- package/dist/components/ui/checklist/index.mjs +33 -0
- package/dist/components/ui/checklist/index.mjs.map +1 -0
- package/dist/components/ui/chip/chip.mjs +202 -0
- package/dist/components/ui/chip/chip.mjs.map +1 -0
- package/dist/components/ui/chip/index.mjs +13 -0
- package/dist/components/ui/chip/index.mjs.map +1 -0
- package/dist/components/ui/chip-group/chip-group.mjs +204 -0
- package/dist/components/ui/chip-group/chip-group.mjs.map +1 -0
- package/dist/components/ui/chip-group/index.mjs +11 -0
- package/dist/components/ui/chip-group/index.mjs.map +1 -0
- package/dist/components/ui/code-snippet/code-highlighter.mjs +16 -0
- package/dist/components/ui/code-snippet/code-highlighter.mjs.map +1 -0
- package/dist/components/ui/code-snippet/code-snippet.mjs +437 -0
- package/dist/components/ui/code-snippet/code-snippet.mjs.map +1 -0
- package/dist/components/ui/code-snippet/index.mjs +17 -0
- package/dist/components/ui/code-snippet/index.mjs.map +1 -0
- package/dist/components/ui/code-snippet/labels.mjs +16 -0
- package/dist/components/ui/code-snippet/labels.mjs.map +1 -0
- package/dist/components/ui/code-snippet/tokenize.mjs +715 -0
- package/dist/components/ui/code-snippet/tokenize.mjs.map +1 -0
- package/dist/components/ui/code-snippet/types.mjs +1 -0
- package/dist/components/ui/code-snippet/types.mjs.map +1 -0
- package/dist/components/ui/collapsible/collapsible.mjs +85 -0
- package/dist/components/ui/collapsible/collapsible.mjs.map +1 -0
- package/dist/components/ui/collapsible/index.mjs +15 -0
- package/dist/components/ui/collapsible/index.mjs.map +1 -0
- package/dist/components/ui/color-picker/color-picker.mjs +852 -0
- package/dist/components/ui/color-picker/color-picker.mjs.map +1 -0
- package/dist/components/ui/color-picker/index.mjs +47 -0
- package/dist/components/ui/color-picker/index.mjs.map +1 -0
- package/dist/components/ui/combobox/combobox.mjs +745 -0
- package/dist/components/ui/combobox/combobox.mjs.map +1 -0
- package/dist/components/ui/combobox/index.mjs +27 -0
- package/dist/components/ui/combobox/index.mjs.map +1 -0
- package/dist/components/ui/command/command.mjs +439 -0
- package/dist/components/ui/command/command.mjs.map +1 -0
- package/dist/components/ui/command/index.mjs +31 -0
- package/dist/components/ui/command/index.mjs.map +1 -0
- package/dist/components/ui/compare-slider/compare-slider.mjs +335 -0
- package/dist/components/ui/compare-slider/compare-slider.mjs.map +1 -0
- package/dist/components/ui/compare-slider/index.mjs +17 -0
- package/dist/components/ui/compare-slider/index.mjs.map +1 -0
- package/dist/components/ui/context-menu/context-menu.mjs +184 -0
- package/dist/components/ui/context-menu/context-menu.mjs.map +1 -0
- package/dist/components/ui/context-menu/index.mjs +37 -0
- package/dist/components/ui/context-menu/index.mjs.map +1 -0
- package/dist/components/ui/data-table/active-filters.mjs +69 -0
- package/dist/components/ui/data-table/active-filters.mjs.map +1 -0
- package/dist/components/ui/data-table/body-row.mjs +118 -0
- package/dist/components/ui/data-table/body-row.mjs.map +1 -0
- package/dist/components/ui/data-table/cards.mjs +76 -0
- package/dist/components/ui/data-table/cards.mjs.map +1 -0
- package/dist/components/ui/data-table/data-table.mjs +680 -0
- package/dist/components/ui/data-table/data-table.mjs.map +1 -0
- package/dist/components/ui/data-table/empty.mjs +26 -0
- package/dist/components/ui/data-table/empty.mjs.map +1 -0
- package/dist/components/ui/data-table/expand.mjs +70 -0
- package/dist/components/ui/data-table/expand.mjs.map +1 -0
- package/dist/components/ui/data-table/faceted-filter.mjs +112 -0
- package/dist/components/ui/data-table/faceted-filter.mjs.map +1 -0
- package/dist/components/ui/data-table/features.mjs +96 -0
- package/dist/components/ui/data-table/features.mjs.map +1 -0
- package/dist/components/ui/data-table/grip.mjs +37 -0
- package/dist/components/ui/data-table/grip.mjs.map +1 -0
- package/dist/components/ui/data-table/header-cell.mjs +85 -0
- package/dist/components/ui/data-table/header-cell.mjs.map +1 -0
- package/dist/components/ui/data-table/index.mjs +55 -0
- package/dist/components/ui/data-table/index.mjs.map +1 -0
- package/dist/components/ui/data-table/labels.mjs +55 -0
- package/dist/components/ui/data-table/labels.mjs.map +1 -0
- package/dist/components/ui/data-table/load-more.mjs +56 -0
- package/dist/components/ui/data-table/load-more.mjs.map +1 -0
- package/dist/components/ui/data-table/move-item.mjs +11 -0
- package/dist/components/ui/data-table/move-item.mjs.map +1 -0
- package/dist/components/ui/data-table/persist.mjs +65 -0
- package/dist/components/ui/data-table/persist.mjs.map +1 -0
- package/dist/components/ui/data-table/selection-bar.mjs +51 -0
- package/dist/components/ui/data-table/selection-bar.mjs.map +1 -0
- package/dist/components/ui/data-table/tabs.mjs +48 -0
- package/dist/components/ui/data-table/tabs.mjs.map +1 -0
- package/dist/components/ui/data-table/toolbar.mjs +92 -0
- package/dist/components/ui/data-table/toolbar.mjs.map +1 -0
- package/dist/components/ui/data-table/use-reorder.mjs +239 -0
- package/dist/components/ui/data-table/use-reorder.mjs.map +1 -0
- package/dist/components/ui/data-table/use-reveal.mjs +24 -0
- package/dist/components/ui/data-table/use-reveal.mjs.map +1 -0
- package/dist/components/ui/data-table/use-table-state.mjs +38 -0
- package/dist/components/ui/data-table/use-table-state.mjs.map +1 -0
- package/dist/components/ui/data-table/view-options.mjs +66 -0
- package/dist/components/ui/data-table/view-options.mjs.map +1 -0
- package/dist/components/ui/date-picker/calendar.mjs +466 -0
- package/dist/components/ui/date-picker/calendar.mjs.map +1 -0
- package/dist/components/ui/date-picker/date-picker.mjs +366 -0
- package/dist/components/ui/date-picker/date-picker.mjs.map +1 -0
- package/dist/components/ui/date-picker/index.mjs +17 -0
- package/dist/components/ui/date-picker/index.mjs.map +1 -0
- package/dist/components/ui/date-picker/presets.mjs +49 -0
- package/dist/components/ui/date-picker/presets.mjs.map +1 -0
- package/dist/components/ui/description-list/description-list.mjs +40 -0
- package/dist/components/ui/description-list/description-list.mjs.map +1 -0
- package/dist/components/ui/description-list/index.mjs +15 -0
- package/dist/components/ui/description-list/index.mjs.map +1 -0
- package/dist/components/ui/dialog/dialog-stepper.mjs +23 -0
- package/dist/components/ui/dialog/dialog-stepper.mjs.map +1 -0
- package/dist/components/ui/dialog/dialog.mjs +343 -0
- package/dist/components/ui/dialog/dialog.mjs.map +1 -0
- package/dist/components/ui/dialog/focus-return.mjs +21 -0
- package/dist/components/ui/dialog/focus-return.mjs.map +1 -0
- package/dist/components/ui/dialog/index.mjs +33 -0
- package/dist/components/ui/dialog/index.mjs.map +1 -0
- package/dist/components/ui/divider/divider.mjs +130 -0
- package/dist/components/ui/divider/divider.mjs.map +1 -0
- package/dist/components/ui/divider/index.mjs +6 -0
- package/dist/components/ui/divider/index.mjs.map +1 -0
- package/dist/components/ui/dock/dock.mjs +444 -0
- package/dist/components/ui/dock/dock.mjs.map +1 -0
- package/dist/components/ui/dock/index.mjs +19 -0
- package/dist/components/ui/dock/index.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-actions.mjs +118 -0
- package/dist/components/ui/document-editor/block-actions.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-commands.mjs +182 -0
- package/dist/components/ui/document-editor/block-commands.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-handle.mjs +387 -0
- package/dist/components/ui/document-editor/block-handle.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-morph.mjs +95 -0
- package/dist/components/ui/document-editor/block-morph.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-selection.mjs +81 -0
- package/dist/components/ui/document-editor/block-selection.mjs.map +1 -0
- package/dist/components/ui/document-editor/blocks.mjs +30 -0
- package/dist/components/ui/document-editor/blocks.mjs.map +1 -0
- package/dist/components/ui/document-editor/bubble-menu.mjs +120 -0
- package/dist/components/ui/document-editor/bubble-menu.mjs.map +1 -0
- package/dist/components/ui/document-editor/code-block.mjs +89 -0
- package/dist/components/ui/document-editor/code-block.mjs.map +1 -0
- package/dist/components/ui/document-editor/collaboration-types.mjs +9 -0
- package/dist/components/ui/document-editor/collaboration-types.mjs.map +1 -0
- package/dist/components/ui/document-editor/collaboration.mjs +198 -0
- package/dist/components/ui/document-editor/collaboration.mjs.map +1 -0
- package/dist/components/ui/document-editor/columns.mjs +52 -0
- package/dist/components/ui/document-editor/columns.mjs.map +1 -0
- package/dist/components/ui/document-editor/contents.mjs +60 -0
- package/dist/components/ui/document-editor/contents.mjs.map +1 -0
- package/dist/components/ui/document-editor/date-chip.mjs +115 -0
- package/dist/components/ui/document-editor/date-chip.mjs.map +1 -0
- package/dist/components/ui/document-editor/date-words.mjs +101 -0
- package/dist/components/ui/document-editor/date-words.mjs.map +1 -0
- package/dist/components/ui/document-editor/doc-labels.mjs +19 -0
- package/dist/components/ui/document-editor/doc-labels.mjs.map +1 -0
- package/dist/components/ui/document-editor/document-editor.mjs +496 -0
- package/dist/components/ui/document-editor/document-editor.mjs.map +1 -0
- package/dist/components/ui/document-editor/emoji-suggest.mjs +81 -0
- package/dist/components/ui/document-editor/emoji-suggest.mjs.map +1 -0
- package/dist/components/ui/document-editor/focus-mode.mjs +32 -0
- package/dist/components/ui/document-editor/focus-mode.mjs.map +1 -0
- package/dist/components/ui/document-editor/geometry.mjs +35 -0
- package/dist/components/ui/document-editor/geometry.mjs.map +1 -0
- package/dist/components/ui/document-editor/ghost-text.mjs +154 -0
- package/dist/components/ui/document-editor/ghost-text.mjs.map +1 -0
- package/dist/components/ui/document-editor/gliding-caret.mjs +118 -0
- package/dist/components/ui/document-editor/gliding-caret.mjs.map +1 -0
- package/dist/components/ui/document-editor/headings.mjs +64 -0
- package/dist/components/ui/document-editor/headings.mjs.map +1 -0
- package/dist/components/ui/document-editor/image.mjs +318 -0
- package/dist/components/ui/document-editor/image.mjs.map +1 -0
- package/dist/components/ui/document-editor/index.mjs +131 -0
- package/dist/components/ui/document-editor/index.mjs.map +1 -0
- package/dist/components/ui/document-editor/labels.mjs +96 -0
- package/dist/components/ui/document-editor/labels.mjs.map +1 -0
- package/dist/components/ui/document-editor/link-card.mjs +138 -0
- package/dist/components/ui/document-editor/link-card.mjs.map +1 -0
- package/dist/components/ui/document-editor/mentions.mjs +105 -0
- package/dist/components/ui/document-editor/mentions.mjs.map +1 -0
- package/dist/components/ui/document-editor/outline.mjs +138 -0
- package/dist/components/ui/document-editor/outline.mjs.map +1 -0
- package/dist/components/ui/document-editor/section-fold.mjs +124 -0
- package/dist/components/ui/document-editor/section-fold.mjs.map +1 -0
- package/dist/components/ui/document-editor/slash-command.mjs +210 -0
- package/dist/components/ui/document-editor/slash-command.mjs.map +1 -0
- package/dist/components/ui/document-editor/suggest-list.mjs +187 -0
- package/dist/components/ui/document-editor/suggest-list.mjs.map +1 -0
- package/dist/components/ui/document-editor/table.mjs +242 -0
- package/dist/components/ui/document-editor/table.mjs.map +1 -0
- package/dist/components/ui/document-editor/templates.mjs +66 -0
- package/dist/components/ui/document-editor/templates.mjs.map +1 -0
- package/dist/components/ui/document-editor/toggle.mjs +176 -0
- package/dist/components/ui/document-editor/toggle.mjs.map +1 -0
- package/dist/components/ui/document-editor/typography-rules.mjs +8 -0
- package/dist/components/ui/document-editor/typography-rules.mjs.map +1 -0
- package/dist/components/ui/document-editor/use-editor-value.mjs +34 -0
- package/dist/components/ui/document-editor/use-editor-value.mjs.map +1 -0
- package/dist/components/ui/drawer/drawer-nav.mjs +153 -0
- package/dist/components/ui/drawer/drawer-nav.mjs.map +1 -0
- package/dist/components/ui/drawer/drawer.mjs +334 -0
- package/dist/components/ui/drawer/drawer.mjs.map +1 -0
- package/dist/components/ui/drawer/index.mjs +37 -0
- package/dist/components/ui/drawer/index.mjs.map +1 -0
- package/dist/components/ui/drawer/use-swipe-to-close.mjs +77 -0
- package/dist/components/ui/drawer/use-swipe-to-close.mjs.map +1 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.mjs +567 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.mjs.map +1 -0
- package/dist/components/ui/dropdown-menu/index.mjs +43 -0
- package/dist/components/ui/dropdown-menu/index.mjs.map +1 -0
- package/dist/components/ui/editable-text/editable-text.mjs +148 -0
- package/dist/components/ui/editable-text/editable-text.mjs.map +1 -0
- package/dist/components/ui/editable-text/index.mjs +6 -0
- package/dist/components/ui/editable-text/index.mjs.map +1 -0
- package/dist/components/ui/emoji-picker/emoji-data.mjs +469 -0
- package/dist/components/ui/emoji-picker/emoji-data.mjs.map +1 -0
- package/dist/components/ui/emoji-picker/emoji-picker.mjs +464 -0
- package/dist/components/ui/emoji-picker/emoji-picker.mjs.map +1 -0
- package/dist/components/ui/emoji-picker/index.mjs +19 -0
- package/dist/components/ui/emoji-picker/index.mjs.map +1 -0
- package/dist/components/ui/empty-state/empty-state.mjs +110 -0
- package/dist/components/ui/empty-state/empty-state.mjs.map +1 -0
- package/dist/components/ui/empty-state/index.mjs +17 -0
- package/dist/components/ui/empty-state/index.mjs.map +1 -0
- package/dist/components/ui/event-calendar/calendar-math.mjs +256 -0
- package/dist/components/ui/event-calendar/calendar-math.mjs.map +1 -0
- package/dist/components/ui/event-calendar/context.mjs +51 -0
- package/dist/components/ui/event-calendar/context.mjs.map +1 -0
- package/dist/components/ui/event-calendar/editor.mjs +292 -0
- package/dist/components/ui/event-calendar/editor.mjs.map +1 -0
- package/dist/components/ui/event-calendar/event-block.mjs +55 -0
- package/dist/components/ui/event-calendar/event-block.mjs.map +1 -0
- package/dist/components/ui/event-calendar/event-calendar.mjs +438 -0
- package/dist/components/ui/event-calendar/event-calendar.mjs.map +1 -0
- package/dist/components/ui/event-calendar/event-keys.mjs +41 -0
- package/dist/components/ui/event-calendar/event-keys.mjs.map +1 -0
- package/dist/components/ui/event-calendar/index.mjs +37 -0
- package/dist/components/ui/event-calendar/index.mjs.map +1 -0
- package/dist/components/ui/event-calendar/month-grid.mjs +207 -0
- package/dist/components/ui/event-calendar/month-grid.mjs.map +1 -0
- package/dist/components/ui/event-calendar/narrow.mjs +193 -0
- package/dist/components/ui/event-calendar/narrow.mjs.map +1 -0
- package/dist/components/ui/event-calendar/time-grid.mjs +534 -0
- package/dist/components/ui/event-calendar/time-grid.mjs.map +1 -0
- package/dist/components/ui/expandable-search/expandable-search.mjs +174 -0
- package/dist/components/ui/expandable-search/expandable-search.mjs.map +1 -0
- package/dist/components/ui/expandable-search/index.mjs +6 -0
- package/dist/components/ui/expandable-search/index.mjs.map +1 -0
- package/dist/components/ui/field/field.mjs +444 -0
- package/dist/components/ui/field/field.mjs.map +1 -0
- package/dist/components/ui/field/index.mjs +21 -0
- package/dist/components/ui/field/index.mjs.map +1 -0
- package/dist/components/ui/file-card/file-card.mjs +198 -0
- package/dist/components/ui/file-card/file-card.mjs.map +1 -0
- package/dist/components/ui/file-card/file-icon.mjs +66 -0
- package/dist/components/ui/file-card/file-icon.mjs.map +1 -0
- package/dist/components/ui/file-card/file-types.mjs +70 -0
- package/dist/components/ui/file-card/file-types.mjs.map +1 -0
- package/dist/components/ui/file-card/index.mjs +32 -0
- package/dist/components/ui/file-card/index.mjs.map +1 -0
- package/dist/components/ui/file-preview/context.mjs +77 -0
- package/dist/components/ui/file-preview/context.mjs.map +1 -0
- package/dist/components/ui/file-preview/file-preview.mjs +865 -0
- package/dist/components/ui/file-preview/file-preview.mjs.map +1 -0
- package/dist/components/ui/file-preview/index.mjs +56 -0
- package/dist/components/ui/file-preview/index.mjs.map +1 -0
- package/dist/components/ui/file-preview/pdf.mjs +250 -0
- package/dist/components/ui/file-preview/pdf.mjs.map +1 -0
- package/dist/components/ui/file-preview/renderers.mjs +257 -0
- package/dist/components/ui/file-preview/renderers.mjs.map +1 -0
- package/dist/components/ui/file-upload/file-upload.mjs +633 -0
- package/dist/components/ui/file-upload/file-upload.mjs.map +1 -0
- package/dist/components/ui/file-upload/index.mjs +42 -0
- package/dist/components/ui/file-upload/index.mjs.map +1 -0
- package/dist/components/ui/file-upload/validate.mjs +111 -0
- package/dist/components/ui/file-upload/validate.mjs.map +1 -0
- package/dist/components/ui/flag/flag.mjs +39 -0
- package/dist/components/ui/flag/flag.mjs.map +1 -0
- package/dist/components/ui/flag/index.mjs +7 -0
- package/dist/components/ui/flag/index.mjs.map +1 -0
- package/dist/components/ui/floating-window/floating-window.mjs +255 -0
- package/dist/components/ui/floating-window/floating-window.mjs.map +1 -0
- package/dist/components/ui/floating-window/index.mjs +11 -0
- package/dist/components/ui/floating-window/index.mjs.map +1 -0
- package/dist/components/ui/form/form-section.mjs +87 -0
- package/dist/components/ui/form/form-section.mjs.map +1 -0
- package/dist/components/ui/form/form.mjs +205 -0
- package/dist/components/ui/form/form.mjs.map +1 -0
- package/dist/components/ui/form/index.mjs +29 -0
- package/dist/components/ui/form/index.mjs.map +1 -0
- package/dist/components/ui/globe/globe-data.mjs +9 -0
- package/dist/components/ui/globe/globe-data.mjs.map +1 -0
- package/dist/components/ui/globe/globe-math.mjs +269 -0
- package/dist/components/ui/globe/globe-math.mjs.map +1 -0
- package/dist/components/ui/globe/globe.mjs +719 -0
- package/dist/components/ui/globe/globe.mjs.map +1 -0
- package/dist/components/ui/globe/index.mjs +13 -0
- package/dist/components/ui/globe/index.mjs.map +1 -0
- package/dist/components/ui/highlight-match/highlight-children.mjs +13 -0
- package/dist/components/ui/highlight-match/highlight-children.mjs.map +1 -0
- package/dist/components/ui/highlight-match/highlight-match-variants.mjs +17 -0
- package/dist/components/ui/highlight-match/highlight-match-variants.mjs.map +1 -0
- package/dist/components/ui/highlight-match/highlight-match.mjs +37 -0
- package/dist/components/ui/highlight-match/highlight-match.mjs.map +1 -0
- package/dist/components/ui/highlight-match/index.mjs +15 -0
- package/dist/components/ui/highlight-match/index.mjs.map +1 -0
- package/dist/components/ui/highlight-match/match-ranges.mjs +50 -0
- package/dist/components/ui/highlight-match/match-ranges.mjs.map +1 -0
- package/dist/components/ui/histogram-slider/histogram-slider.mjs +83 -0
- package/dist/components/ui/histogram-slider/histogram-slider.mjs.map +1 -0
- package/dist/components/ui/histogram-slider/index.mjs +6 -0
- package/dist/components/ui/histogram-slider/index.mjs.map +1 -0
- package/dist/components/ui/hold-button/hold-button.mjs +258 -0
- package/dist/components/ui/hold-button/hold-button.mjs.map +1 -0
- package/dist/components/ui/hold-button/index.mjs +6 -0
- package/dist/components/ui/hold-button/index.mjs.map +1 -0
- package/dist/components/ui/hover-card/hover-card.mjs +111 -0
- package/dist/components/ui/hover-card/hover-card.mjs.map +1 -0
- package/dist/components/ui/hover-card/index.mjs +21 -0
- package/dist/components/ui/hover-card/index.mjs.map +1 -0
- package/dist/components/ui/ink-tray/index.mjs +29 -0
- package/dist/components/ui/ink-tray/index.mjs.map +1 -0
- package/dist/components/ui/ink-tray/ink-tray-art.mjs +68 -0
- package/dist/components/ui/ink-tray/ink-tray-art.mjs.map +1 -0
- package/dist/components/ui/ink-tray/ink-tray.mjs +350 -0
- package/dist/components/ui/ink-tray/ink-tray.mjs.map +1 -0
- package/dist/components/ui/input/index.mjs +41 -0
- package/dist/components/ui/input/index.mjs.map +1 -0
- package/dist/components/ui/input/input.mjs +268 -0
- package/dist/components/ui/input/input.mjs.map +1 -0
- package/dist/components/ui/input/number-input.mjs +272 -0
- package/dist/components/ui/input/number-input.mjs.map +1 -0
- package/dist/components/ui/input/password-input.mjs +49 -0
- package/dist/components/ui/input/password-input.mjs.map +1 -0
- package/dist/components/ui/input/phone-input-countries.mjs +216 -0
- package/dist/components/ui/input/phone-input-countries.mjs.map +1 -0
- package/dist/components/ui/input/phone-input.mjs +326 -0
- package/dist/components/ui/input/phone-input.mjs.map +1 -0
- package/dist/components/ui/input/use-controllable-state.mjs +24 -0
- package/dist/components/ui/input/use-controllable-state.mjs.map +1 -0
- package/dist/components/ui/input/use-hold-repeat.mjs +35 -0
- package/dist/components/ui/input/use-hold-repeat.mjs.map +1 -0
- package/dist/components/ui/input-group/index.mjs +11 -0
- package/dist/components/ui/input-group/index.mjs.map +1 -0
- package/dist/components/ui/input-group/input-group.mjs +78 -0
- package/dist/components/ui/input-group/input-group.mjs.map +1 -0
- package/dist/components/ui/island/index.mjs +23 -0
- package/dist/components/ui/island/index.mjs.map +1 -0
- package/dist/components/ui/island/island.mjs +328 -0
- package/dist/components/ui/island/island.mjs.map +1 -0
- package/dist/components/ui/kbd/index.mjs +6 -0
- package/dist/components/ui/kbd/index.mjs.map +1 -0
- package/dist/components/ui/kbd/kbd.mjs +73 -0
- package/dist/components/ui/kbd/kbd.mjs.map +1 -0
- package/dist/components/ui/keypad/index.mjs +23 -0
- package/dist/components/ui/keypad/index.mjs.map +1 -0
- package/dist/components/ui/keypad/keypad.mjs +345 -0
- package/dist/components/ui/keypad/keypad.mjs.map +1 -0
- package/dist/components/ui/label/index.mjs +7 -0
- package/dist/components/ui/label/index.mjs.map +1 -0
- package/dist/components/ui/label/label.mjs +117 -0
- package/dist/components/ui/label/label.mjs.map +1 -0
- package/dist/components/ui/lightbox/index.mjs +47 -0
- package/dist/components/ui/lightbox/index.mjs.map +1 -0
- package/dist/components/ui/lightbox/labels.mjs +23 -0
- package/dist/components/ui/lightbox/labels.mjs.map +1 -0
- package/dist/components/ui/lightbox/lightbox.mjs +1359 -0
- package/dist/components/ui/lightbox/lightbox.mjs.map +1 -0
- package/dist/components/ui/link/index.mjs +6 -0
- package/dist/components/ui/link/index.mjs.map +1 -0
- package/dist/components/ui/link/link.mjs +64 -0
- package/dist/components/ui/link/link.mjs.map +1 -0
- package/dist/components/ui/list/index.mjs +35 -0
- package/dist/components/ui/list/index.mjs.map +1 -0
- package/dist/components/ui/list/list.mjs +505 -0
- package/dist/components/ui/list/list.mjs.map +1 -0
- package/dist/components/ui/load-more/index.mjs +23 -0
- package/dist/components/ui/load-more/index.mjs.map +1 -0
- package/dist/components/ui/load-more/load-more.mjs +409 -0
- package/dist/components/ui/load-more/load-more.mjs.map +1 -0
- package/dist/components/ui/map/index.mjs +27 -0
- package/dist/components/ui/map/index.mjs.map +1 -0
- package/dist/components/ui/map/map-style.mjs +169 -0
- package/dist/components/ui/map/map-style.mjs.map +1 -0
- package/dist/components/ui/map/map.mjs +624 -0
- package/dist/components/ui/map/map.mjs.map +1 -0
- package/dist/components/ui/map-pin/index.mjs +6 -0
- package/dist/components/ui/map-pin/index.mjs.map +1 -0
- package/dist/components/ui/map-pin/map-pin.mjs +55 -0
- package/dist/components/ui/map-pin/map-pin.mjs.map +1 -0
- package/dist/components/ui/mention/index.mjs +29 -0
- package/dist/components/ui/mention/index.mjs.map +1 -0
- package/dist/components/ui/mention/mention.mjs +262 -0
- package/dist/components/ui/mention/mention.mjs.map +1 -0
- package/dist/components/ui/mention/split-mentions.mjs +24 -0
- package/dist/components/ui/mention/split-mentions.mjs.map +1 -0
- package/dist/components/ui/menubar/index.mjs +39 -0
- package/dist/components/ui/menubar/index.mjs.map +1 -0
- package/dist/components/ui/menubar/menubar.mjs +222 -0
- package/dist/components/ui/menubar/menubar.mjs.map +1 -0
- package/dist/components/ui/meter/index.mjs +21 -0
- package/dist/components/ui/meter/index.mjs.map +1 -0
- package/dist/components/ui/meter/meter.mjs +167 -0
- package/dist/components/ui/meter/meter.mjs.map +1 -0
- package/dist/components/ui/multi-select/index.mjs +25 -0
- package/dist/components/ui/multi-select/index.mjs.map +1 -0
- package/dist/components/ui/multi-select/multi-select.mjs +285 -0
- package/dist/components/ui/multi-select/multi-select.mjs.map +1 -0
- package/dist/components/ui/navigation-menu/index.mjs +41 -0
- package/dist/components/ui/navigation-menu/index.mjs.map +1 -0
- package/dist/components/ui/navigation-menu/navigation-menu.mjs +396 -0
- package/dist/components/ui/navigation-menu/navigation-menu.mjs.map +1 -0
- package/dist/components/ui/notebook-page/index.mjs +15 -0
- package/dist/components/ui/notebook-page/index.mjs.map +1 -0
- package/dist/components/ui/notebook-page/notebook-page.mjs +162 -0
- package/dist/components/ui/notebook-page/notebook-page.mjs.map +1 -0
- package/dist/components/ui/notification-inbox/index.mjs +47 -0
- package/dist/components/ui/notification-inbox/index.mjs.map +1 -0
- package/dist/components/ui/notification-inbox/notification-inbox.mjs +422 -0
- package/dist/components/ui/notification-inbox/notification-inbox.mjs.map +1 -0
- package/dist/components/ui/number-field/index.mjs +24 -0
- package/dist/components/ui/number-field/index.mjs.map +1 -0
- package/dist/components/ui/number-field/number-field.mjs +460 -0
- package/dist/components/ui/number-field/number-field.mjs.map +1 -0
- package/dist/components/ui/number-field/number-format.mjs +48 -0
- package/dist/components/ui/number-field/number-format.mjs.map +1 -0
- package/dist/components/ui/otp-input/index.mjs +9 -0
- package/dist/components/ui/otp-input/index.mjs.map +1 -0
- package/dist/components/ui/otp-input/otp-input.mjs +285 -0
- package/dist/components/ui/otp-input/otp-input.mjs.map +1 -0
- package/dist/components/ui/pager/index.mjs +7 -0
- package/dist/components/ui/pager/index.mjs.map +1 -0
- package/dist/components/ui/pager/pager.mjs +86 -0
- package/dist/components/ui/pager/pager.mjs.map +1 -0
- package/dist/components/ui/pagination/index.mjs +23 -0
- package/dist/components/ui/pagination/index.mjs.map +1 -0
- package/dist/components/ui/pagination/pagination.mjs +210 -0
- package/dist/components/ui/pagination/pagination.mjs.map +1 -0
- package/dist/components/ui/password-strength/index.mjs +21 -0
- package/dist/components/ui/password-strength/index.mjs.map +1 -0
- package/dist/components/ui/password-strength/password-rules.mjs +25 -0
- package/dist/components/ui/password-strength/password-rules.mjs.map +1 -0
- package/dist/components/ui/password-strength/password-strength.mjs +125 -0
- package/dist/components/ui/password-strength/password-strength.mjs.map +1 -0
- package/dist/components/ui/popover/index.mjs +31 -0
- package/dist/components/ui/popover/index.mjs.map +1 -0
- package/dist/components/ui/popover/popover.mjs +574 -0
- package/dist/components/ui/popover/popover.mjs.map +1 -0
- package/dist/components/ui/progress/index.mjs +15 -0
- package/dist/components/ui/progress/index.mjs.map +1 -0
- package/dist/components/ui/progress/progress.mjs +224 -0
- package/dist/components/ui/progress/progress.mjs.map +1 -0
- package/dist/components/ui/prose/index.mjs +6 -0
- package/dist/components/ui/prose/index.mjs.map +1 -0
- package/dist/components/ui/prose/prose.mjs +89 -0
- package/dist/components/ui/prose/prose.mjs.map +1 -0
- package/dist/components/ui/radio-group/index.mjs +15 -0
- package/dist/components/ui/radio-group/index.mjs.map +1 -0
- package/dist/components/ui/radio-group/radio-group.mjs +88 -0
- package/dist/components/ui/radio-group/radio-group.mjs.map +1 -0
- package/dist/components/ui/rating/index.mjs +6 -0
- package/dist/components/ui/rating/index.mjs.map +1 -0
- package/dist/components/ui/rating/rating.mjs +119 -0
- package/dist/components/ui/rating/rating.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/bubble-menu.mjs +120 -0
- package/dist/components/ui/rich-text-editor/bubble-menu.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/image-links.mjs +63 -0
- package/dist/components/ui/rich-text-editor/image-links.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/index.mjs +37 -0
- package/dist/components/ui/rich-text-editor/index.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/labels.mjs +27 -0
- package/dist/components/ui/rich-text-editor/labels.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/rich-text-editor.mjs +149 -0
- package/dist/components/ui/rich-text-editor/rich-text-editor.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/toolbar.mjs +325 -0
- package/dist/components/ui/rich-text-editor/toolbar.mjs.map +1 -0
- package/dist/components/ui/save-bar/index.mjs +13 -0
- package/dist/components/ui/save-bar/index.mjs.map +1 -0
- package/dist/components/ui/save-bar/save-bar.mjs +59 -0
- package/dist/components/ui/save-bar/save-bar.mjs.map +1 -0
- package/dist/components/ui/scroll-area/index.mjs +6 -0
- package/dist/components/ui/scroll-area/index.mjs.map +1 -0
- package/dist/components/ui/scroll-area/scroll-area.mjs +148 -0
- package/dist/components/ui/scroll-area/scroll-area.mjs.map +1 -0
- package/dist/components/ui/scroll-area/use-drag-scroll.mjs +134 -0
- package/dist/components/ui/scroll-area/use-drag-scroll.mjs.map +1 -0
- package/dist/components/ui/select/index.mjs +23 -0
- package/dist/components/ui/select/index.mjs.map +1 -0
- package/dist/components/ui/select/select.mjs +216 -0
- package/dist/components/ui/select/select.mjs.map +1 -0
- package/dist/components/ui/sheet/index.mjs +23 -0
- package/dist/components/ui/sheet/index.mjs.map +1 -0
- package/dist/components/ui/sheet/sheet.mjs +292 -0
- package/dist/components/ui/sheet/sheet.mjs.map +1 -0
- package/dist/components/ui/sidebar/index.mjs +122 -0
- package/dist/components/ui/sidebar/index.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-group.mjs +75 -0
- package/dist/components/ui/sidebar/sidebar-group.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-item.mjs +199 -0
- package/dist/components/ui/sidebar/sidebar-item.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-panels.mjs +182 -0
- package/dist/components/ui/sidebar/sidebar-panels.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-peek.mjs +324 -0
- package/dist/components/ui/sidebar/sidebar-peek.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-rich.mjs +65 -0
- package/dist/components/ui/sidebar/sidebar-rich.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-tree.mjs +224 -0
- package/dist/components/ui/sidebar/sidebar-tree.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar.mjs +205 -0
- package/dist/components/ui/sidebar/sidebar.mjs.map +1 -0
- package/dist/components/ui/sidebar/variants.mjs +396 -0
- package/dist/components/ui/sidebar/variants.mjs.map +1 -0
- package/dist/components/ui/signature/index.mjs +6 -0
- package/dist/components/ui/signature/index.mjs.map +1 -0
- package/dist/components/ui/signature/signature.mjs +145 -0
- package/dist/components/ui/signature/signature.mjs.map +1 -0
- package/dist/components/ui/signature-pad/index.mjs +19 -0
- package/dist/components/ui/signature-pad/index.mjs.map +1 -0
- package/dist/components/ui/signature-pad/signature-pad.mjs +210 -0
- package/dist/components/ui/signature-pad/signature-pad.mjs.map +1 -0
- package/dist/components/ui/signature-pad/strokes.mjs +68 -0
- package/dist/components/ui/signature-pad/strokes.mjs.map +1 -0
- package/dist/components/ui/skeleton/index.mjs +9 -0
- package/dist/components/ui/skeleton/index.mjs.map +1 -0
- package/dist/components/ui/skeleton/skeleton.mjs +58 -0
- package/dist/components/ui/skeleton/skeleton.mjs.map +1 -0
- package/dist/components/ui/slide/index.mjs +25 -0
- package/dist/components/ui/slide/index.mjs.map +1 -0
- package/dist/components/ui/slide/slide.mjs +159 -0
- package/dist/components/ui/slide/slide.mjs.map +1 -0
- package/dist/components/ui/slider/index.mjs +21 -0
- package/dist/components/ui/slider/index.mjs.map +1 -0
- package/dist/components/ui/slider/slider-input.mjs +449 -0
- package/dist/components/ui/slider/slider-input.mjs.map +1 -0
- package/dist/components/ui/slider/slider.mjs +235 -0
- package/dist/components/ui/slider/slider.mjs.map +1 -0
- package/dist/components/ui/slides/index.mjs +31 -0
- package/dist/components/ui/slides/index.mjs.map +1 -0
- package/dist/components/ui/slides/slides.mjs +890 -0
- package/dist/components/ui/slides/slides.mjs.map +1 -0
- package/dist/components/ui/smooth-anchors/index.mjs +17 -0
- package/dist/components/ui/smooth-anchors/index.mjs.map +1 -0
- package/dist/components/ui/smooth-anchors/smooth-anchors.mjs +75 -0
- package/dist/components/ui/smooth-anchors/smooth-anchors.mjs.map +1 -0
- package/dist/components/ui/smooth-anchors/smooth-scroll.mjs +87 -0
- package/dist/components/ui/smooth-anchors/smooth-scroll.mjs.map +1 -0
- package/dist/components/ui/spinner/index.mjs +6 -0
- package/dist/components/ui/spinner/index.mjs.map +1 -0
- package/dist/components/ui/spinner/spinner.mjs +49 -0
- package/dist/components/ui/spinner/spinner.mjs.map +1 -0
- package/dist/components/ui/stat/index.mjs +29 -0
- package/dist/components/ui/stat/index.mjs.map +1 -0
- package/dist/components/ui/stat/stat.mjs +226 -0
- package/dist/components/ui/stat/stat.mjs.map +1 -0
- package/dist/components/ui/status-bar/index.mjs +17 -0
- package/dist/components/ui/status-bar/index.mjs.map +1 -0
- package/dist/components/ui/status-bar/status-bar.mjs +96 -0
- package/dist/components/ui/status-bar/status-bar.mjs.map +1 -0
- package/dist/components/ui/stepper/index.mjs +25 -0
- package/dist/components/ui/stepper/index.mjs.map +1 -0
- package/dist/components/ui/stepper/stepper.mjs +235 -0
- package/dist/components/ui/stepper/stepper.mjs.map +1 -0
- package/dist/components/ui/steps/index.mjs +9 -0
- package/dist/components/ui/steps/index.mjs.map +1 -0
- package/dist/components/ui/steps/steps.mjs +70 -0
- package/dist/components/ui/steps/steps.mjs.map +1 -0
- package/dist/components/ui/swatch-grid/index.mjs +7 -0
- package/dist/components/ui/swatch-grid/index.mjs.map +1 -0
- package/dist/components/ui/swatch-grid/swatch-grid.mjs +110 -0
- package/dist/components/ui/swatch-grid/swatch-grid.mjs.map +1 -0
- package/dist/components/ui/switch/index.mjs +7 -0
- package/dist/components/ui/switch/index.mjs.map +1 -0
- package/dist/components/ui/switch/switch.mjs +79 -0
- package/dist/components/ui/switch/switch.mjs.map +1 -0
- package/dist/components/ui/tab-strip/index.mjs +13 -0
- package/dist/components/ui/tab-strip/index.mjs.map +1 -0
- package/dist/components/ui/tab-strip/tab-strip.mjs +244 -0
- package/dist/components/ui/tab-strip/tab-strip.mjs.map +1 -0
- package/dist/components/ui/table/index.mjs +27 -0
- package/dist/components/ui/table/index.mjs.map +1 -0
- package/dist/components/ui/table/table.mjs +290 -0
- package/dist/components/ui/table/table.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/index.mjs +20 -0
- package/dist/components/ui/table-of-contents/index.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/scroll-spy.mjs +60 -0
- package/dist/components/ui/table-of-contents/scroll-spy.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/table-of-contents.mjs +371 -0
- package/dist/components/ui/table-of-contents/table-of-contents.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/use-headings.mjs +40 -0
- package/dist/components/ui/table-of-contents/use-headings.mjs.map +1 -0
- package/dist/components/ui/tablet-frame/index.mjs +7 -0
- package/dist/components/ui/tablet-frame/index.mjs.map +1 -0
- package/dist/components/ui/tablet-frame/tablet-frame.mjs +48 -0
- package/dist/components/ui/tablet-frame/tablet-frame.mjs.map +1 -0
- package/dist/components/ui/tabs/index.mjs +25 -0
- package/dist/components/ui/tabs/index.mjs.map +1 -0
- package/dist/components/ui/tabs/tabs.mjs +382 -0
- package/dist/components/ui/tabs/tabs.mjs.map +1 -0
- package/dist/components/ui/tabs/use-tabs-indicator.mjs +90 -0
- package/dist/components/ui/tabs/use-tabs-indicator.mjs.map +1 -0
- package/dist/components/ui/tags-input/index.mjs +9 -0
- package/dist/components/ui/tags-input/index.mjs.map +1 -0
- package/dist/components/ui/tags-input/split.mjs +38 -0
- package/dist/components/ui/tags-input/split.mjs.map +1 -0
- package/dist/components/ui/tags-input/tags-input.mjs +328 -0
- package/dist/components/ui/tags-input/tags-input.mjs.map +1 -0
- package/dist/components/ui/terminal/index.mjs +41 -0
- package/dist/components/ui/terminal/index.mjs.map +1 -0
- package/dist/components/ui/terminal/terminal.mjs +287 -0
- package/dist/components/ui/terminal/terminal.mjs.map +1 -0
- package/dist/components/ui/textarea/index.mjs +21 -0
- package/dist/components/ui/textarea/index.mjs.map +1 -0
- package/dist/components/ui/textarea/textarea.mjs +244 -0
- package/dist/components/ui/textarea/textarea.mjs.map +1 -0
- package/dist/components/ui/theme-provider/index.mjs +6 -0
- package/dist/components/ui/theme-provider/index.mjs.map +1 -0
- package/dist/components/ui/theme-provider/theme-provider.mjs +70 -0
- package/dist/components/ui/theme-provider/theme-provider.mjs.map +1 -0
- package/dist/components/ui/toast/index.mjs +19 -0
- package/dist/components/ui/toast/index.mjs.map +1 -0
- package/dist/components/ui/toast/store.mjs +96 -0
- package/dist/components/ui/toast/store.mjs.map +1 -0
- package/dist/components/ui/toast/toast.mjs +395 -0
- package/dist/components/ui/toast/toast.mjs.map +1 -0
- package/dist/components/ui/toggle/index.mjs +13 -0
- package/dist/components/ui/toggle/index.mjs.map +1 -0
- package/dist/components/ui/toggle/toggle.mjs +123 -0
- package/dist/components/ui/toggle/toggle.mjs.map +1 -0
- package/dist/components/ui/toggle-group/index.mjs +11 -0
- package/dist/components/ui/toggle-group/index.mjs.map +1 -0
- package/dist/components/ui/toggle-group/toggle-group.mjs +243 -0
- package/dist/components/ui/toggle-group/toggle-group.mjs.map +1 -0
- package/dist/components/ui/toggletip/index.mjs +6 -0
- package/dist/components/ui/toggletip/index.mjs.map +1 -0
- package/dist/components/ui/toggletip/toggletip.mjs +95 -0
- package/dist/components/ui/toggletip/toggletip.mjs.map +1 -0
- package/dist/components/ui/toolbar/index.mjs +21 -0
- package/dist/components/ui/toolbar/index.mjs.map +1 -0
- package/dist/components/ui/toolbar/toolbar.mjs +130 -0
- package/dist/components/ui/toolbar/toolbar.mjs.map +1 -0
- package/dist/components/ui/tooltip/index.mjs +29 -0
- package/dist/components/ui/tooltip/index.mjs.map +1 -0
- package/dist/components/ui/tooltip/tooltip.mjs +640 -0
- package/dist/components/ui/tooltip/tooltip.mjs.map +1 -0
- package/dist/components/ui/tree/index.mjs +11 -0
- package/dist/components/ui/tree/index.mjs.map +1 -0
- package/dist/components/ui/tree/tree.mjs +450 -0
- package/dist/components/ui/tree/tree.mjs.map +1 -0
- package/dist/index.d.mts +19397 -0
- package/dist/index.mjs +157 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/color.mjs +78 -0
- package/dist/lib/color.mjs.map +1 -0
- package/dist/lib/create-context.mjs +31 -0
- package/dist/lib/create-context.mjs.map +1 -0
- package/dist/lib/date.mjs +116 -0
- package/dist/lib/date.mjs.map +1 -0
- package/dist/lib/density.mjs +79 -0
- package/dist/lib/density.mjs.map +1 -0
- package/dist/lib/field-context.mjs +13 -0
- package/dist/lib/field-context.mjs.map +1 -0
- package/dist/lib/filter.mjs +28 -0
- package/dist/lib/filter.mjs.map +1 -0
- package/dist/lib/gesture.mjs +38 -0
- package/dist/lib/gesture.mjs.map +1 -0
- package/dist/lib/hit-area.mjs +14 -0
- package/dist/lib/hit-area.mjs.map +1 -0
- package/dist/lib/labels.mjs +27 -0
- package/dist/lib/labels.mjs.map +1 -0
- package/dist/lib/morph-box.mjs +56 -0
- package/dist/lib/morph-box.mjs.map +1 -0
- package/dist/lib/motion.mjs +70 -0
- package/dist/lib/motion.mjs.map +1 -0
- package/dist/lib/pulse.mjs +69 -0
- package/dist/lib/pulse.mjs.map +1 -0
- package/dist/lib/roving-focus.mjs +74 -0
- package/dist/lib/roving-focus.mjs.map +1 -0
- package/dist/lib/theme.mjs +67 -0
- package/dist/lib/theme.mjs.map +1 -0
- package/dist/lib/tv.mjs +11 -0
- package/dist/lib/tv.mjs.map +1 -0
- package/dist/lib/utils.mjs +82 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/dist/styles.css +2 -0
- package/package.json +133 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/combobox/combobox.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport { Popover as PopoverPrimitive } from \"radix-ui\";\r\nimport { CaretDown, Check, X } from \"atoms-icons\";\r\n\r\nimport {\r\n useControlSize,\r\n useDensity,\r\n type ControlSize,\r\n type Density,\r\n} from \"../../../lib/density.mjs\";\r\nimport { useFieldContext } from \"../../../lib/field-context.mjs\";\r\nimport { containsFilter, textOf, type FilterFn } from \"../../../lib/filter.mjs\";\r\nimport { tv } from \"../../../lib/tv.mjs\";\r\nimport { HighlightMatch } from \"../highlight-match/index.mjs\";\r\nimport { Spinner } from \"../spinner/index.mjs\";\r\n\r\n/* ─── Styles ────────────────────────────────────────────────────────────── */\r\n\r\nconst suffixButton = [\r\n \"flex shrink-0 cursor-pointer items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent\",\r\n \"transition-[color,background-color,scale] duration-fast ease-out\",\r\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-inset\",\r\n \"pointer-coarse:h-auto pointer-coarse:w-10 pointer-coarse:self-stretch pointer-coarse:not-last:mr-0\",\r\n];\r\n\r\nexport const comboboxVariants = tv({\r\n slots: {\r\n root: [\r\n \"flex items-center overflow-hidden border bg-[var(--surface,var(--background))] transition-[border-color,box-shadow] duration-fast ease-out focus-within:outline-none autofill-tint\",\r\n \"group w-64\",\r\n ],\r\n input: [\r\n \"flex-1 min-w-0 bg-transparent outline-none autofill-clear text-foreground placeholder:text-placeholder disabled:cursor-not-allowed\",\r\n \"file:border-0 file:bg-transparent file:font-medium py-0 text-sm pointer-coarse:text-base\",\r\n ],\r\n prefix:\r\n \"flex shrink-0 items-center text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-[15px]\",\r\n clear: suffixButton,\r\n trigger: suffixButton,\r\n caret:\r\n \"size-4 shrink-0 text-muted-foreground caret-turn-fast group-data-[state=open]:rotate-180\",\r\n content: [\r\n \"relative z-50 min-w-[var(--radix-select-trigger-width)] overflow-hidden pointer-coarse:has-[[data-slot=select-item-hint]]:min-w-[max(var(--radix-select-trigger-width),--spacing(56))]\",\r\n \"rounded-lg border border-border bg-popover text-popover-foreground shadow-lg [--surface:var(--popover)]\",\r\n \"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0\",\r\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-[side=bottom]:slide-out-to-top-2 data-[side=top]:slide-out-to-bottom-2\",\r\n \"data-[state=open]:duration-fast data-[state=closed]:duration-[100ms] ease-out w-[var(--radix-popover-trigger-width)]\",\r\n ],\r\n list: \"group/select-search-list p-1 max-h-[min(18rem,var(--radix-popover-content-available-height,18rem))] overflow-y-auto overscroll-contain scroll-fade scroll-py-10 relative\",\r\n item: [\r\n \"relative flex w-full cursor-pointer select-none items-center gap-2 pl-2 pr-7 text-sm font-normal outline-none transition-colors duration-fast ease-out\",\r\n \"focus:bg-accent focus:text-accent-foreground data-[active=true]:bg-accent data-[active=true]:text-accent-foreground\",\r\n \"data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\r\n \"[&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-5\",\r\n \"[&>span:last-child:not([data-slot=select-item-hint])]:flex [&>span:last-child:not([data-slot=select-item-hint])]:min-w-0 [&>span:last-child:not([data-slot=select-item-hint])]:items-center [&>span:last-child:not([data-slot=select-item-hint])]:gap-2\",\r\n \"[&>[data-slot=select-item-text]_svg]:text-muted-foreground [&>[data-slot=combobox-item-text]_svg]:text-muted-foreground\",\r\n \"rounded-md\",\r\n ],\r\n check:\r\n \"absolute right-2 flex size-4 items-center justify-center text-foreground\",\r\n mark: \"-mx-px rounded-sm bg-foreground/12 px-px text-foreground\",\r\n group: \"not-has-[[data-slot=combobox-item]]:hidden\",\r\n label: \"px-2 font-medium text-muted-foreground text-xs\",\r\n separator: \"-mx-0.75 h-px bg-border my-1\",\r\n empty:\r\n \"px-3 py-6 text-center text-sm text-muted-foreground group-has-[[data-slot=select-search-item]]/select-search-list:hidden group-has-[[data-slot=combobox-item]]/select-search-list:hidden\",\r\n status:\r\n \"flex items-center justify-center gap-2 px-3 py-6 text-sm text-muted-foreground\",\r\n },\r\n variants: {\r\n size: {\r\n sm: {\r\n trigger: \"size-6 -mr-1.5 rounded-sm pointer-coarse:-mr-2.5\",\r\n clear: \"size-6 rounded-sm pointer-coarse:-mr-2.5 -mr-1\",\r\n root: \"h-control-sm rounded-md gap-1.5 px-2.5 has-[>[data-slot=input-field]:first-child]:pl-3 has-[>[data-slot=input-floating]]:h-11 has-[>[data-slot=input-floating]:first-child]:pl-3\",\r\n },\r\n md: {\r\n trigger: \"size-7 -mr-2 rounded-[calc(var(--radius)*0.625)] pointer-coarse:-mr-3\",\r\n clear: \"size-7 rounded-[calc(var(--radius)*0.625)] pointer-coarse:-mr-3 -mr-1.5\",\r\n root: \"h-control-md rounded-[calc(var(--radius)*0.875)] gap-2 px-3 has-[>[data-slot=input-field]:first-child]:pl-3.5 has-[>[data-slot=input-floating]]:h-12 has-[>[data-slot=input-floating]:first-child]:pl-3.5\",\r\n },\r\n lg: {\r\n trigger: \"size-8 -mr-2 rounded-md pointer-coarse:-mr-3.5\",\r\n clear: \"size-8 rounded-md pointer-coarse:-mr-3.5 -mr-1.5\",\r\n root: \"h-control-lg rounded-lg gap-2 px-3.5 has-[>[data-slot=input-field]:first-child]:pl-4 has-[>[data-slot=input-floating]]:h-14 has-[>[data-slot=input-floating]:first-child]:pl-4\",\r\n },\r\n },\r\n hasError: {\r\n true: {\r\n root: \"border-destructive focus-within:border-destructive focus-within:destructive-ring\",\r\n },\r\n false: {\r\n root: \"border-input focus-within:border-focus focus-within:focus-ring\",\r\n },\r\n },\r\n disabled: {\r\n true: { root: \"opacity-50 pointer-events-none select-none\" },\r\n false: {},\r\n },\r\n density: {\r\n compact: { item: \"min-h-control-sm py-1\", label: \"py-1\" },\r\n comfortable: { item: \"min-h-control-md py-1.5\", label: \"py-1.5\" },\r\n },\r\n long: {\r\n // Long lists skip painting the rows that are scrolled out of view.\r\n true: {\r\n item: \"[content-visibility:auto] [contain-intrinsic-size:auto_1.25rem]\",\r\n },\r\n false: {},\r\n },\r\n },\r\n defaultVariants: {\r\n size: \"sm\",\r\n hasError: false,\r\n disabled: false,\r\n density: \"compact\",\r\n long: false,\r\n },\r\n});\r\n\r\n/* ─── Context ───────────────────────────────────────────────────────────── */\r\n\r\ntype Mode = \"combobox\" | \"autocomplete\";\r\ntype OpenIntent = \"first\" | \"last\" | \"selected\" | null;\r\n\r\ninterface ComboboxContextValue {\r\n mode: Mode;\r\n value: string;\r\n inputValue: string;\r\n query: string;\r\n open: boolean;\r\n filter: FilterFn | null;\r\n autoHighlight: boolean;\r\n openOnInputClick: boolean;\r\n size: ControlSize;\r\n density: Density;\r\n disabled: boolean;\r\n name: string | undefined;\r\n listId: string;\r\n active: string | null;\r\n setActive: (value: string | null) => void;\r\n openList: (intent: OpenIntent) => void;\r\n close: () => void;\r\n type: (text: string) => void;\r\n pick: (value: string, text: string) => void;\r\n revert: () => void;\r\n clear: () => void;\r\n hasTyped: boolean;\r\n registerText: (value: string, text: string) => void;\r\n textFor: (value: string) => string | undefined;\r\n takeIntent: () => OpenIntent;\r\n}\r\n\r\nconst ComboboxContext = React.createContext<ComboboxContextValue | null>(null);\r\nComboboxContext.displayName = \"ComboboxContext\";\r\n\r\n/** The DOM nodes, read only in handlers and effects, kept apart from what renders. */\r\ninterface ComboboxRefs {\r\n inputRef: React.RefObject<HTMLInputElement | null>;\r\n frameRef: React.RefObject<HTMLDivElement | null>;\r\n listRef: React.RefObject<HTMLDivElement | null>;\r\n}\r\n\r\nconst ComboboxRefsContext = React.createContext<ComboboxRefs | null>(null);\r\n\r\nfunction useComboboxRefs() {\r\n return React.useContext(ComboboxRefsContext) as ComboboxRefs;\r\n}\r\n\r\nfunction useCombobox(part: string) {\r\n const context = React.useContext(ComboboxContext);\r\n if (!context)\r\n throw new Error(`${part} must be used inside <Combobox> or <Autocomplete>`);\r\n return context;\r\n}\r\n\r\n/** The DOM id of a row, from its value, so the input can point at it. */\r\nfunction optionId(listId: string, value: string) {\r\n return `${listId}-option-${encodeURIComponent(value).replace(/[^a-zA-Z0-9_-]/g, \"_\")}`;\r\n}\r\n\r\nfunction useControllable<T>(\r\n prop: T | undefined,\r\n initial: T,\r\n onChange?: (next: T) => void,\r\n) {\r\n const [state, setState] = React.useState(initial);\r\n const controlled = prop !== undefined;\r\n const current = controlled ? prop : state;\r\n const set = React.useCallback(\r\n (next: T) => {\r\n if (!controlled) setState(next);\r\n onChange?.(next);\r\n },\r\n [controlled, onChange],\r\n );\r\n return [current, set] as const;\r\n}\r\n\r\n/* ─── Roots ─────────────────────────────────────────────────────────────── */\r\n\r\ninterface RootSharedProps {\r\n /** Highlight the first match while typing, so Enter picks it. */\r\n autoHighlight?: boolean;\r\n /** Open the list when the field is clicked. */\r\n openOnInputClick?: boolean;\r\n /** Field height: 32, 36 or 40px. Defaults from density. */\r\n size?: ControlSize;\r\n /** Row spacing in the list. Also picks the default size. */\r\n density?: Density;\r\n /** Controlled open state. */\r\n open?: boolean;\r\n defaultOpen?: boolean;\r\n onOpenChange?: (open: boolean) => void;\r\n /** Return 0 to hide a row. Case and accent blind by default. `null` shows every row. */\r\n filter?: FilterFn | null;\r\n /** Posts the value with a native form submit. */\r\n name?: string;\r\n /** Disables the field. Inherited from a surrounding Field. */\r\n disabled?: boolean;\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport interface ComboboxProps extends RootSharedProps {\r\n /** The selected value. `\"\"` means nothing is selected. */\r\n value?: string;\r\n defaultValue?: string;\r\n onValueChange?: (value: string) => void;\r\n /** The text in the field, e.g. to drive a search request. */\r\n inputValue?: string;\r\n defaultInputValue?: string;\r\n onInputValueChange?: (inputValue: string) => void;\r\n /** The label for a value seeded from outside, before the list has rendered. */\r\n itemToString?: (value: string) => string;\r\n}\r\n\r\nexport function Combobox(props: ComboboxProps) {\r\n return <ComboboxRoot mode=\"combobox\" {...props} />;\r\n}\r\n\r\nexport interface AutocompleteProps extends RootSharedProps {\r\n /** The text: anything typed is valid, and a suggestion only fills it in. */\r\n value?: string;\r\n defaultValue?: string;\r\n onValueChange?: (value: string) => void;\r\n}\r\n\r\nexport function Autocomplete({\r\n autoHighlight = false,\r\n openOnInputClick = false,\r\n ...props\r\n}: AutocompleteProps) {\r\n return (\r\n <ComboboxRoot\r\n mode=\"autocomplete\"\r\n autoHighlight={autoHighlight}\r\n openOnInputClick={openOnInputClick}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction ComboboxRoot({\r\n mode,\r\n value: valueProp,\r\n defaultValue = \"\",\r\n onValueChange,\r\n inputValue: inputValueProp,\r\n defaultInputValue,\r\n onInputValueChange,\r\n itemToString,\r\n autoHighlight = true,\r\n openOnInputClick = true,\r\n size,\r\n density,\r\n open: openProp,\r\n defaultOpen = false,\r\n onOpenChange,\r\n filter = containsFilter,\r\n name,\r\n disabled,\r\n children,\r\n}: ComboboxProps & { mode: Mode }) {\r\n const field = useFieldContext();\r\n const resolvedDensity = useDensity(density);\r\n const resolvedSize = useControlSize(size, density);\r\n const listId = React.useId();\r\n\r\n const [value, setValue] = useControllable(\r\n valueProp,\r\n defaultValue,\r\n onValueChange,\r\n );\r\n const texts = React.useRef(new Map<string, string>());\r\n const textFor = React.useCallback(\r\n (item: string) =>\r\n item ? (texts.current.get(item) ?? itemToString?.(item) ?? item) : \"\",\r\n [itemToString],\r\n );\r\n const [ownInput, setOwnInput] = useControllable(\r\n inputValueProp,\r\n defaultInputValue ??\r\n (mode === \"combobox\" && (valueProp ?? defaultValue)\r\n ? (itemToString?.(valueProp ?? defaultValue) ?? valueProp ?? defaultValue)\r\n : (valueProp ?? defaultValue)),\r\n onInputValueChange,\r\n );\r\n // In Autocomplete the text is the value.\r\n const inputValue = mode === \"autocomplete\" ? value : ownInput;\r\n const setInput = React.useCallback(\r\n (text: string) =>\r\n mode === \"autocomplete\" ? setValue(text) : setOwnInput(text),\r\n [mode, setValue, setOwnInput],\r\n );\r\n\r\n const [open, setOpenState] = useControllable(\r\n openProp,\r\n defaultOpen,\r\n onOpenChange,\r\n );\r\n const [typed, setTyped] = React.useState(false);\r\n const [active, setActive] = React.useState<string | null>(null);\r\n const intent = React.useRef<OpenIntent>(null);\r\n\r\n const inputRef = React.useRef<HTMLInputElement | null>(null);\r\n const frameRef = React.useRef<HTMLDivElement | null>(null);\r\n const listRef = React.useRef<HTMLDivElement | null>(null);\r\n const [refs] = React.useState<ComboboxRefs>(() => ({\r\n inputRef,\r\n frameRef,\r\n listRef,\r\n }));\r\n\r\n const isDisabled = disabled ?? field?.disabled ?? false;\r\n const hasTyped = mode === \"autocomplete\" ? inputValue !== \"\" : typed;\r\n const query = hasTyped ? inputValue : \"\";\r\n\r\n const context = React.useMemo<ComboboxContextValue>(\r\n () => ({\r\n mode,\r\n value,\r\n inputValue,\r\n query,\r\n open,\r\n filter,\r\n autoHighlight,\r\n openOnInputClick,\r\n size: resolvedSize,\r\n density: resolvedDensity,\r\n disabled: isDisabled,\r\n name,\r\n listId,\r\n active,\r\n setActive,\r\n openList(next) {\r\n if (isDisabled) return;\r\n intent.current = next;\r\n setOpenState(true);\r\n },\r\n close() {\r\n setOpenState(false);\r\n setActive(null);\r\n },\r\n type(text) {\r\n setInput(text);\r\n setTyped(true);\r\n if (!open) {\r\n intent.current = null;\r\n setOpenState(true);\r\n }\r\n },\r\n pick(next, text) {\r\n if (mode === \"combobox\") {\r\n texts.current.set(next, text);\r\n setValue(next);\r\n setOwnInput(text);\r\n } else {\r\n setValue(text);\r\n }\r\n setTyped(false);\r\n setOpenState(false);\r\n setActive(null);\r\n },\r\n revert() {\r\n if (mode === \"combobox\") setOwnInput(textFor(value));\r\n setTyped(false);\r\n },\r\n clear() {\r\n if (mode === \"combobox\") {\r\n setValue(\"\");\r\n setOwnInput(\"\");\r\n } else {\r\n setValue(\"\");\r\n }\r\n setTyped(false);\r\n setActive(null);\r\n },\r\n hasTyped,\r\n registerText(item, text) {\r\n texts.current.set(item, text);\r\n },\r\n textFor,\r\n takeIntent() {\r\n const next = intent.current;\r\n intent.current = null;\r\n return next;\r\n },\r\n }),\r\n [\r\n mode,\r\n value,\r\n inputValue,\r\n query,\r\n open,\r\n filter,\r\n autoHighlight,\r\n openOnInputClick,\r\n resolvedSize,\r\n resolvedDensity,\r\n isDisabled,\r\n name,\r\n listId,\r\n active,\r\n setOpenState,\r\n setInput,\r\n setValue,\r\n setOwnInput,\r\n textFor,\r\n hasTyped,\r\n ],\r\n );\r\n\r\n return (\r\n <ComboboxContext.Provider value={context}>\r\n <ComboboxRefsContext.Provider value={refs}>\r\n <PopoverPrimitive.Root\r\n open={open}\r\n onOpenChange={(next) => {\r\n if (!next) context.close();\r\n }}\r\n >\r\n {children}\r\n </PopoverPrimitive.Root>\r\n </ComboboxRefsContext.Provider>\r\n </ComboboxContext.Provider>\r\n );\r\n}\r\n\r\n/* ─── Keyboard helpers ──────────────────────────────────────────────────── */\r\n\r\nfunction rows(list: HTMLElement | null) {\r\n return [\r\n ...(list?.querySelectorAll<HTMLElement>(\r\n \"[data-slot=combobox-item]:not([data-disabled])\",\r\n ) ?? []),\r\n ];\r\n}\r\n\r\n/* ─── ComboboxInput ─────────────────────────────────────────────────────── */\r\n\r\nexport interface ComboboxInputProps extends Omit<\r\n React.ComponentProps<\"input\">,\r\n \"value\" | \"defaultValue\" | \"size\" | \"prefix\"\r\n> {\r\n /** A leading glyph: a search icon, the picked option's flag. */\r\n prefix?: React.ReactNode;\r\n /** Show the clear button while the field holds text. */\r\n showClear?: boolean;\r\n /** Show the chevron that opens the list. Defaults on for Combobox, off for Autocomplete. */\r\n showTrigger?: boolean;\r\n /** Styles the text input; `className` styles the frame. */\r\n inputClassName?: string;\r\n}\r\n\r\nexport function ComboboxInput({\r\n className,\r\n inputClassName,\r\n prefix,\r\n showClear = true,\r\n showTrigger,\r\n id,\r\n onKeyDown,\r\n onBlur,\r\n onClick,\r\n \"aria-describedby\": ariaDescribedBy,\r\n \"aria-invalid\": ariaInvalid,\r\n required,\r\n ...props\r\n}: ComboboxInputProps) {\r\n const ctx = useCombobox(\"ComboboxInput\");\r\n const { inputRef, frameRef, listRef } = useComboboxRefs();\r\n const field = useFieldContext();\r\n const hasError = field?.hasError ?? false;\r\n const slots = comboboxVariants({\r\n size: ctx.size,\r\n hasError,\r\n disabled: ctx.disabled,\r\n });\r\n const trigger = showTrigger ?? ctx.mode === \"combobox\";\r\n\r\n function move(by: 1 | -1) {\r\n const list = rows(listRef.current);\r\n if (list.length === 0) return;\r\n const index = list.findIndex((row) => row.dataset.value === ctx.active);\r\n const next =\r\n index === -1\r\n ? by === 1\r\n ? 0\r\n : list.length - 1\r\n : Math.min(Math.max(index + by, 0), list.length - 1);\r\n ctx.setActive(list[next].dataset.value ?? null);\r\n }\r\n\r\n function handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {\r\n onKeyDown?.(event);\r\n // Radix's dismiss layer marks Escape as handled before it gets here; the field owns Escape.\r\n if (event.defaultPrevented && event.key !== \"Escape\") return;\r\n switch (event.key) {\r\n case \"ArrowDown\":\r\n case \"ArrowUp\": {\r\n event.preventDefault();\r\n if (!ctx.open)\r\n ctx.openList(\r\n event.key === \"ArrowDown\"\r\n ? ctx.mode === \"combobox\"\r\n ? \"selected\"\r\n : \"first\"\r\n : \"last\",\r\n );\r\n else move(event.key === \"ArrowDown\" ? 1 : -1);\r\n break;\r\n }\r\n case \"Home\":\r\n case \"End\": {\r\n if (!ctx.open) break;\r\n event.preventDefault();\r\n const list = rows(listRef.current);\r\n const row = event.key === \"Home\" ? list[0] : list[list.length - 1];\r\n if (row) ctx.setActive(row.dataset.value ?? null);\r\n break;\r\n }\r\n case \"Enter\": {\r\n if (!ctx.open) break;\r\n const row = ctx.active\r\n ? rows(listRef.current).find(\r\n (item) => item.dataset.value === ctx.active,\r\n )\r\n : null;\r\n if (row) {\r\n event.preventDefault();\r\n row.click();\r\n } else if (ctx.mode === \"autocomplete\") {\r\n ctx.close();\r\n }\r\n break;\r\n }\r\n case \"Escape\": {\r\n // First what you typed, then the list, then the value.\r\n if (\r\n ctx.mode === \"combobox\" &&\r\n ctx.hasTyped &&\r\n ctx.inputValue !== ctx.textFor(ctx.value)\r\n ) {\r\n event.preventDefault();\r\n ctx.revert();\r\n } else if (ctx.open) {\r\n event.preventDefault();\r\n ctx.close();\r\n } else if (ctx.inputValue || ctx.value) {\r\n event.preventDefault();\r\n ctx.clear();\r\n }\r\n break;\r\n }\r\n case \"Tab\":\r\n if (ctx.open) ctx.close();\r\n break;\r\n }\r\n }\r\n\r\n function handleBlur(event: React.FocusEvent<HTMLInputElement>) {\r\n onBlur?.(event);\r\n const next = event.relatedTarget as Node | null;\r\n if (\r\n next &&\r\n (frameRef.current?.contains(next) ||\r\n listRef.current?.contains(next))\r\n )\r\n return;\r\n if (ctx.open) ctx.close();\r\n if (ctx.mode !== \"combobox\" || !ctx.hasTyped) return;\r\n // Leaving with exactly an option's text picks it; anything else reverts.\r\n const typed = ctx.inputValue.trim().toLowerCase();\r\n const match = rows(listRef.current).find(\r\n (row) => (row.dataset.text ?? \"\").toLowerCase() === typed,\r\n );\r\n if (match && typed)\r\n ctx.pick(match.dataset.value ?? \"\", match.dataset.text ?? \"\");\r\n else ctx.revert();\r\n }\r\n\r\n return (\r\n <>\r\n <PopoverPrimitive.Anchor asChild>\r\n <div\r\n ref={frameRef}\r\n data-slot=\"combobox\"\r\n data-state={ctx.open ? \"open\" : \"closed\"}\r\n data-disabled={ctx.disabled || undefined}\r\n className={slots.root({ className })}\r\n >\r\n {prefix ? (\r\n <span\r\n data-slot=\"input-prefix\"\r\n aria-hidden=\"true\"\r\n className={slots.prefix()}\r\n >\r\n {prefix}\r\n </span>\r\n ) : null}\r\n <input\r\n ref={inputRef}\r\n data-slot=\"combobox-input\"\r\n className={slots.input({ className: inputClassName })}\r\n id={id ?? field?.id}\r\n role=\"combobox\"\r\n aria-expanded={ctx.open}\r\n aria-autocomplete=\"list\"\r\n aria-haspopup=\"listbox\"\r\n aria-controls={ctx.open ? ctx.listId : undefined}\r\n aria-activedescendant={\r\n ctx.open && ctx.active\r\n ? optionId(ctx.listId, ctx.active)\r\n : undefined\r\n }\r\n aria-describedby={ariaDescribedBy ?? field?.describedBy}\r\n aria-invalid={ariaInvalid ?? (hasError || undefined)}\r\n required={required ?? (field?.required || undefined)}\r\n autoComplete=\"off\"\r\n autoCorrect=\"off\"\r\n spellCheck={false}\r\n disabled={ctx.disabled}\r\n value={ctx.inputValue}\r\n onChange={(event) => ctx.type(event.target.value)}\r\n onKeyDown={handleKeyDown}\r\n onBlur={handleBlur}\r\n onClick={(event) => {\r\n onClick?.(event);\r\n if (ctx.openOnInputClick && !ctx.open) ctx.openList(\"selected\");\r\n }}\r\n {...props}\r\n />\r\n {showClear && ctx.inputValue && !ctx.disabled ? (\r\n <button\r\n data-slot=\"combobox-clear\"\r\n type=\"button\"\r\n className={slots.clear()}\r\n aria-label=\"Clear\"\r\n tabIndex={-1}\r\n onMouseDown={(event) => event.preventDefault()}\r\n onClick={() => {\r\n ctx.clear();\r\n inputRef.current?.focus();\r\n }}\r\n >\r\n <X />\r\n </button>\r\n ) : null}\r\n {trigger ? (\r\n <button\r\n data-slot=\"combobox-trigger\"\r\n type=\"button\"\r\n className={slots.trigger()}\r\n aria-label={ctx.open ? \"Hide options\" : \"Show options\"}\r\n tabIndex={-1}\r\n disabled={ctx.disabled || undefined}\r\n onMouseDown={(event) => event.preventDefault()}\r\n onClick={() => {\r\n if (ctx.open) ctx.close();\r\n else ctx.openList(\"selected\");\r\n inputRef.current?.focus();\r\n }}\r\n >\r\n <CaretDown className={slots.caret()} />\r\n </button>\r\n ) : null}\r\n </div>\r\n </PopoverPrimitive.Anchor>\r\n {ctx.name ? (\r\n <input type=\"hidden\" name={ctx.name} value={ctx.value} />\r\n ) : null}\r\n </>\r\n );\r\n}\r\n\r\n/* ─── ComboboxContent ───────────────────────────────────────────────────── */\r\n\r\nconst ContentContext = React.createContext<{ long: boolean }>({ long: false });\r\n\r\nexport interface ComboboxContentProps extends Omit<\r\n React.ComponentProps<typeof PopoverPrimitive.Content>,\r\n \"children\"\r\n> {\r\n /** The list's accessible name, when there's no Field label to borrow. */\r\n label?: string;\r\n /** Renders in place instead of in a portal (for a scene that has to contain it). */\r\n portal?: boolean;\r\n children?: React.ReactNode;\r\n}\r\n\r\nexport function ComboboxContent({\r\n className,\r\n label,\r\n portal = true,\r\n align = \"start\",\r\n sideOffset = 6,\r\n children,\r\n ...props\r\n}: ComboboxContentProps) {\r\n const ctx = useCombobox(\"ComboboxContent\");\r\n const { frameRef } = useComboboxRefs();\r\n const field = useFieldContext();\r\n const slots = comboboxVariants({ density: ctx.density });\r\n const long = React.Children.toArray(children).length > 40;\r\n\r\n\r\n const content = (\r\n <PopoverPrimitive.Content\r\n role=\"listbox\"\r\n id={ctx.listId}\r\n data-slot=\"combobox-content\"\r\n aria-label={field?.labelledBy ? undefined : (label ?? \"Options\")}\r\n aria-labelledby={field?.labelledBy}\r\n align={align}\r\n sideOffset={sideOffset}\r\n className={slots.content({ className })}\r\n onOpenAutoFocus={(event) => event.preventDefault()}\r\n onCloseAutoFocus={(event) => event.preventDefault()}\r\n // The field handles Escape in steps; a press on the field isn't \"outside\".\r\n onEscapeKeyDown={(event) => event.preventDefault()}\r\n onInteractOutside={(event) => {\r\n if (frameRef.current?.contains(event.target as Node))\r\n event.preventDefault();\r\n }}\r\n {...props}\r\n >\r\n <ContentContext.Provider value={{ long }}>\r\n <ComboboxList className={slots.list()}>{children}</ComboboxList>\r\n </ContentContext.Provider>\r\n </PopoverPrimitive.Content>\r\n );\r\n\r\n return portal ? (\r\n <PopoverPrimitive.Portal>{content}</PopoverPrimitive.Portal>\r\n ) : (\r\n content\r\n );\r\n}\r\n\r\n/**\r\n * The scrolling list. It also places the highlight once the rows are in the DOM: where the opening\r\n * asked for, or on the first match while typing. It owns the list element, so its ref is set by\r\n * the time its layout effect runs.\r\n */\r\nfunction ComboboxList({ className, children }: { className: string; children: React.ReactNode }) {\r\n const ctx = useCombobox(\"ComboboxContent\")\r\n const { listRef } = useComboboxRefs()\r\n const { query, takeIntent, setActive, value, hasTyped, autoHighlight } = ctx\r\n const activeRef = React.useRef(ctx.active)\r\n React.useEffect(() => {\r\n activeRef.current = ctx.active\r\n })\r\n\r\n React.useLayoutEffect(() => {\r\n const list = rows(listRef.current)\r\n const intent = takeIntent()\r\n if (intent) {\r\n const selected = list.find((row) => row.dataset.value === value)\r\n const row =\r\n intent === \"last\" ? list[list.length - 1] : intent === \"selected\" && selected ? selected : list[0]\r\n setActive(row?.dataset.value ?? null)\r\n return\r\n }\r\n if (hasTyped && autoHighlight) {\r\n setActive(list[0]?.dataset.value ?? null)\r\n } else if (activeRef.current && !list.some((row) => row.dataset.value === activeRef.current)) {\r\n setActive(null)\r\n }\r\n // Runs on mount (the list opening) and whenever the query changes.\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [query])\r\n\r\n return (\r\n <div ref={listRef} data-slot=\"combobox-list\" className={className}>\r\n {children}\r\n </div>\r\n )\r\n}\r\n\r\n/* ─── ComboboxItem ──────────────────────────────────────────────────────── */\r\n\r\nexport interface ComboboxItemProps extends Omit<\r\n React.ComponentProps<\"div\">,\r\n \"onSelect\"\r\n> {\r\n /** The value this row commits. */\r\n value: string;\r\n /** What the filter matches and what the field shows once picked. Defaults to the row's text. */\r\n textValue?: string;\r\n /** Extra terms that also match: a code, a synonym. */\r\n keywords?: string[];\r\n /** Skipped by the keyboard and not pickable. */\r\n disabled?: boolean;\r\n /** Fires when the row is picked. */\r\n onSelect?: (value: string) => void;\r\n}\r\n\r\nfunction highlightRow(\r\n children: React.ReactNode,\r\n query: string,\r\n markClassName: string,\r\n) {\r\n return React.Children.map(children, (child) =>\r\n typeof child === \"string\" || typeof child === \"number\" ? (\r\n <span data-slot=\"highlight-match-text\">\r\n <HighlightMatch query={query} className={markClassName}>\r\n {child}\r\n </HighlightMatch>\r\n </span>\r\n ) : (\r\n child\r\n ),\r\n );\r\n}\r\n\r\nexport function ComboboxItem({\r\n className,\r\n value,\r\n textValue,\r\n keywords,\r\n disabled,\r\n onSelect,\r\n children,\r\n ...props\r\n}: ComboboxItemProps) {\r\n const ctx = useCombobox(\"ComboboxItem\");\r\n const { long } = React.useContext(ContentContext);\r\n const ref = React.useRef<HTMLDivElement>(null);\r\n const text = (textValue ?? textOf(children)).trim();\r\n const { registerText } = ctx;\r\n const isActive = ctx.active === value;\r\n\r\n React.useEffect(() => registerText(value, text), [registerText, value, text]);\r\n\r\n React.useEffect(() => {\r\n if (isActive) ref.current?.scrollIntoView({ block: \"nearest\" });\r\n }, [isActive]);\r\n\r\n const score =\r\n !ctx.query || ctx.filter === null\r\n ? 1\r\n : ctx.filter(ctx.query, text, keywords);\r\n if (score <= 0) return null;\r\n\r\n const selected = ctx.mode === \"combobox\" && ctx.value === value;\r\n const slots = comboboxVariants({ density: ctx.density, long });\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n id={optionId(ctx.listId, value)}\r\n data-slot=\"combobox-item\"\r\n data-value={value}\r\n data-text={text}\r\n data-state={selected ? \"checked\" : \"unchecked\"}\r\n data-active={isActive ? \"true\" : undefined}\r\n data-disabled={disabled || undefined}\r\n role=\"option\"\r\n aria-selected={selected}\r\n aria-disabled={disabled || undefined}\r\n className={slots.item({ className })}\r\n onMouseDown={(event) => event.preventDefault()}\r\n onMouseMove={() => {\r\n if (!disabled && !isActive) ctx.setActive(value);\r\n }}\r\n onClick={() => {\r\n if (disabled) return;\r\n ctx.pick(value, text);\r\n onSelect?.(value);\r\n }}\r\n {...props}\r\n >\r\n {ctx.mode === \"combobox\" ? (\r\n <span className={slots.check()}>\r\n {selected ? <Check className=\"size-4\" /> : null}\r\n </span>\r\n ) : null}\r\n <span data-slot=\"combobox-item-text\">\r\n {highlightRow(children, ctx.query, slots.mark())}\r\n </span>\r\n </div>\r\n );\r\n}\r\n\r\n/* ─── Group, label, separator, empty, status ────────────────────────────── */\r\n\r\n/** A group of rows. Hides itself when every row in it filters out. */\r\nexport function ComboboxGroup({\r\n className,\r\n ...props\r\n}: React.ComponentProps<\"div\">) {\r\n return (\r\n <div\r\n data-slot=\"combobox-group\"\r\n role=\"group\"\r\n className={comboboxVariants().group({ className })}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\n/** A group heading, muted. */\r\nexport function ComboboxLabel({\r\n className,\r\n ...props\r\n}: React.ComponentProps<\"div\">) {\r\n const ctx = useCombobox(\"ComboboxLabel\");\r\n return (\r\n <div\r\n data-slot=\"combobox-label\"\r\n className={comboboxVariants({ density: ctx.density }).label({\r\n className,\r\n })}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\n/** A hairline between groups. Hidden while filtering, so no orphan rules are left. */\r\nexport function ComboboxSeparator({\r\n className,\r\n ...props\r\n}: React.ComponentProps<\"div\">) {\r\n const ctx = useCombobox(\"ComboboxSeparator\");\r\n if (ctx.query) return null;\r\n return (\r\n <div\r\n data-slot=\"combobox-separator\"\r\n role=\"separator\"\r\n className={comboboxVariants().separator({ className })}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\n/** Shown only while the list has no rows. */\r\nexport function ComboboxEmpty({\r\n className,\r\n children,\r\n ...props\r\n}: React.ComponentProps<\"div\">) {\r\n return (\r\n <div\r\n data-slot=\"combobox-empty\"\r\n role=\"presentation\"\r\n className={comboboxVariants().empty({ className })}\r\n {...props}\r\n >\r\n {children ?? \"No results found.\"}\r\n </div>\r\n );\r\n}\r\n\r\nexport interface ComboboxStatusProps extends React.ComponentProps<\"div\"> {\r\n /** Lead with the Spinner. */\r\n loading?: boolean;\r\n}\r\n\r\n/** A polite live message in the list: searching, an error, a hint. */\r\nexport function ComboboxStatus({\r\n className,\r\n loading,\r\n children,\r\n ...props\r\n}: ComboboxStatusProps) {\r\n return (\r\n <div\r\n data-slot=\"combobox-status\"\r\n aria-live=\"polite\"\r\n aria-atomic=\"true\"\r\n className={comboboxVariants().status({ className })}\r\n {...props}\r\n >\r\n {loading ? <Spinner aria-hidden /> : null}\r\n {children}\r\n </div>\r\n );\r\n}\r\n"],"mappings":";AA+OS,SA6WL,UA7WK,KA+WD,YA/WC;AA7OT,YAAY,WAAW;AACvB,SAAS,WAAW,wBA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AiB,EAAE,OAAO,EAAE,UAAU,CAAC;AAAA,MACjD,GAAG;AAAA,MAEH;AAAA,kBAAU,oBAAC,WAAQ,eAAW,MAAC,IAAK;AAAA,QACpC;AAAA;AAAA;AAAA,EACH;AAEJ;","names":["row"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Combobox,
|
|
3
|
+
Autocomplete,
|
|
4
|
+
ComboboxInput,
|
|
5
|
+
ComboboxContent,
|
|
6
|
+
ComboboxItem,
|
|
7
|
+
ComboboxGroup,
|
|
8
|
+
ComboboxLabel,
|
|
9
|
+
ComboboxSeparator,
|
|
10
|
+
ComboboxEmpty,
|
|
11
|
+
ComboboxStatus,
|
|
12
|
+
comboboxVariants
|
|
13
|
+
} from "./combobox.mjs";
|
|
14
|
+
export {
|
|
15
|
+
Autocomplete,
|
|
16
|
+
Combobox,
|
|
17
|
+
ComboboxContent,
|
|
18
|
+
ComboboxEmpty,
|
|
19
|
+
ComboboxGroup,
|
|
20
|
+
ComboboxInput,
|
|
21
|
+
ComboboxItem,
|
|
22
|
+
ComboboxLabel,
|
|
23
|
+
ComboboxSeparator,
|
|
24
|
+
ComboboxStatus,
|
|
25
|
+
comboboxVariants
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/combobox/index.ts"],"sourcesContent":["export {\n Combobox,\n Autocomplete,\n ComboboxInput,\n ComboboxContent,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxSeparator,\n ComboboxEmpty,\n ComboboxStatus,\n comboboxVariants,\n type ComboboxProps,\n type AutocompleteProps,\n type ComboboxInputProps,\n type ComboboxContentProps,\n type ComboboxItemProps,\n type ComboboxStatusProps,\n} from \"./combobox.mjs\"\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAOK;","names":[]}
|
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Dialog as DialogPrimitive, VisuallyHidden } from "radix-ui";
|
|
5
|
+
import { MagnifyingGlass } from "atoms-icons";
|
|
6
|
+
import { useDensity } from "../../../lib/density.mjs";
|
|
7
|
+
import { containsFilter, textOf } from "../../../lib/filter.mjs";
|
|
8
|
+
import { tv } from "../../../lib/tv.mjs";
|
|
9
|
+
import { HighlightMatch } from "../highlight-match/index.mjs";
|
|
10
|
+
import { Kbd } from "../kbd/index.mjs";
|
|
11
|
+
const commandVariants = tv({
|
|
12
|
+
slots: {
|
|
13
|
+
root: "flex w-full flex-col overflow-hidden rounded-xl border border-border-soft bg-popover text-popover-foreground shadow-md [--surface:var(--popover)]",
|
|
14
|
+
inputWrapper: "flex shrink-0 items-center gap-3 border-b border-border",
|
|
15
|
+
inputIcon: "size-4 shrink-0 text-muted-foreground",
|
|
16
|
+
input: "flex-1 min-w-0 bg-transparent text-foreground placeholder:text-placeholder outline-none disabled:cursor-not-allowed text-sm pointer-coarse:text-base",
|
|
17
|
+
escape: "group/escape relative shrink-0 cursor-pointer rounded-[6px] outline-none after:absolute after:-inset-2 after:content-['']",
|
|
18
|
+
list: [
|
|
19
|
+
"group/command-list relative min-h-0 max-h-[var(--command-list-max,min(28rem,64dvh))] overflow-y-auto overscroll-contain scroll-fade scroll-py-10",
|
|
20
|
+
"transition-[height] duration-fast ease-out motion-reduce-fade p-1.5"
|
|
21
|
+
],
|
|
22
|
+
highlight: [
|
|
23
|
+
"pointer-events-none absolute left-0 top-0 rounded-md bg-accent opacity-0 data-[visible=true]:opacity-100",
|
|
24
|
+
"transition-[transform,height,width,opacity] duration-fast ease-out motion-reduce-fade"
|
|
25
|
+
],
|
|
26
|
+
empty: "py-12 text-center text-sm text-muted-foreground group-has-[[data-slot=command-item]:not([hidden])]/command-list:hidden",
|
|
27
|
+
group: "not-has-[[data-slot=command-item]:not([hidden])]:hidden",
|
|
28
|
+
heading: "relative select-none font-medium tracking-wide text-muted-foreground",
|
|
29
|
+
item: [
|
|
30
|
+
"relative flex cursor-pointer select-none items-center gap-2.5 font-normal text-foreground outline-none",
|
|
31
|
+
"data-[active=true]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
32
|
+
"[&_svg]:shrink-0 [&_svg]:text-muted-foreground [&_svg:not([class*='size-'])]:size-5 data-[active=true]:[&_svg]:text-accent-foreground",
|
|
33
|
+
"text-sm rounded-md"
|
|
34
|
+
],
|
|
35
|
+
mark: "-mx-px rounded-sm bg-foreground/12 px-px text-foreground",
|
|
36
|
+
separator: "relative -mx-1 my-1 h-px bg-border",
|
|
37
|
+
shortcut: "ml-auto flex shrink-0 items-center gap-1 tabular-nums",
|
|
38
|
+
footer: "flex shrink-0 select-none items-center gap-4 border-t border-border text-xs text-muted-foreground",
|
|
39
|
+
footerHint: "inline-flex items-center gap-1.5 font-medium [&>[data-slot=kbd]+[data-slot=kbd]]:-ml-1",
|
|
40
|
+
overlay: [
|
|
41
|
+
"fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
42
|
+
"duration-fast ease-out data-instant:animate-none!"
|
|
43
|
+
],
|
|
44
|
+
// The dialog hangs from its search field: centred as if the list were full height, so the
|
|
45
|
+
// field stays put while results shrink beneath it.
|
|
46
|
+
positioner: [
|
|
47
|
+
"fixed inset-0 z-50 flex items-start justify-center overflow-y-auto p-4 [--command-list-max:min(28rem,64dvh)]",
|
|
48
|
+
"pt-[max(1rem,calc((100dvh-var(--command-list-max)-3.5rem-2px)/2))]",
|
|
49
|
+
"has-[[data-slot=command-dialog][data-state=closed]]:animate-out duration-fast data-instant:animate-none!"
|
|
50
|
+
],
|
|
51
|
+
dialog: [
|
|
52
|
+
"relative w-full max-w-2xl origin-top outline-none [&>[data-slot=command]]:shadow-none",
|
|
53
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-97",
|
|
54
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-98",
|
|
55
|
+
"motion-reduce:data-[state=open]:zoom-in-100 motion-reduce:data-[state=closed]:zoom-out-100 duration-fast ease-out data-instant:animate-none!"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
variants: {
|
|
59
|
+
density: {
|
|
60
|
+
compact: {
|
|
61
|
+
inputWrapper: "h-13 px-4",
|
|
62
|
+
heading: "px-2.5 pb-1 pt-2 text-xs",
|
|
63
|
+
item: "px-2.5 py-2.5",
|
|
64
|
+
footer: "h-10 px-4"
|
|
65
|
+
},
|
|
66
|
+
comfortable: {
|
|
67
|
+
inputWrapper: "h-14 px-4",
|
|
68
|
+
heading: "px-3 pb-1.5 pt-2.5 text-xs",
|
|
69
|
+
item: "px-3 py-3",
|
|
70
|
+
footer: "h-11 px-4"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
defaultVariants: {
|
|
75
|
+
density: "compact"
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
const CommandContext = React.createContext(null);
|
|
79
|
+
CommandContext.displayName = "CommandContext";
|
|
80
|
+
function useCommand(part) {
|
|
81
|
+
const context = React.useContext(CommandContext);
|
|
82
|
+
if (!context) throw new Error(`${part} must be used inside <Command>`);
|
|
83
|
+
return context;
|
|
84
|
+
}
|
|
85
|
+
const DialogCloseContext = React.createContext(null);
|
|
86
|
+
function itemId(listId, value) {
|
|
87
|
+
return `${listId}-item-${encodeURIComponent(value).replace(/[^a-zA-Z0-9_-]/g, "_")}`;
|
|
88
|
+
}
|
|
89
|
+
function enabledRows(list) {
|
|
90
|
+
return [...list?.querySelectorAll("[data-slot=command-item]:not([data-disabled])") ?? []];
|
|
91
|
+
}
|
|
92
|
+
function Command({
|
|
93
|
+
className,
|
|
94
|
+
search: searchProp,
|
|
95
|
+
defaultSearch = "",
|
|
96
|
+
onSearchChange,
|
|
97
|
+
filter = containsFilter,
|
|
98
|
+
onSelect,
|
|
99
|
+
label = "Commands",
|
|
100
|
+
density,
|
|
101
|
+
children,
|
|
102
|
+
...props
|
|
103
|
+
}) {
|
|
104
|
+
const dialog = React.useContext(DialogCloseContext);
|
|
105
|
+
const resolvedDensity = useDensity(density);
|
|
106
|
+
const id = React.useId();
|
|
107
|
+
const [ownSearch, setOwnSearch] = React.useState(defaultSearch);
|
|
108
|
+
const search = searchProp ?? ownSearch;
|
|
109
|
+
const [active, setActiveState] = React.useState(null);
|
|
110
|
+
const listRef = React.useRef(null);
|
|
111
|
+
const context = React.useMemo(
|
|
112
|
+
() => ({
|
|
113
|
+
search,
|
|
114
|
+
setSearch(next) {
|
|
115
|
+
if (searchProp === void 0) setOwnSearch(next);
|
|
116
|
+
onSearchChange?.(next);
|
|
117
|
+
},
|
|
118
|
+
filter,
|
|
119
|
+
active,
|
|
120
|
+
setActive: (value) => setActiveState(value),
|
|
121
|
+
run(value, own) {
|
|
122
|
+
own?.(value);
|
|
123
|
+
onSelect?.(value);
|
|
124
|
+
if (dialog?.closeOnSelect) dialog.close();
|
|
125
|
+
},
|
|
126
|
+
label,
|
|
127
|
+
density: resolvedDensity,
|
|
128
|
+
inputId: `${id}-input`,
|
|
129
|
+
listId: `${id}-list`,
|
|
130
|
+
dialog,
|
|
131
|
+
getList: () => listRef.current,
|
|
132
|
+
setList: (node) => {
|
|
133
|
+
listRef.current = node;
|
|
134
|
+
}
|
|
135
|
+
}),
|
|
136
|
+
[search, searchProp, onSearchChange, filter, active, onSelect, label, resolvedDensity, id, dialog]
|
|
137
|
+
);
|
|
138
|
+
return /* @__PURE__ */ jsx(CommandContext.Provider, { value: context, children: /* @__PURE__ */ jsx("div", { "data-slot": "command", className: commandVariants().root({ className }), ...props, children }) });
|
|
139
|
+
}
|
|
140
|
+
function CommandInput({
|
|
141
|
+
className,
|
|
142
|
+
icon = false,
|
|
143
|
+
placeholder = "Type a command or search\u2026",
|
|
144
|
+
onKeyDown,
|
|
145
|
+
...props
|
|
146
|
+
}) {
|
|
147
|
+
const ctx = useCommand("CommandInput");
|
|
148
|
+
const slots = commandVariants({ density: ctx.density });
|
|
149
|
+
function move(by) {
|
|
150
|
+
const rows = enabledRows(ctx.getList());
|
|
151
|
+
if (rows.length === 0) return;
|
|
152
|
+
const index = rows.findIndex((row) => row.dataset.value === ctx.active);
|
|
153
|
+
const next = index === -1 ? 0 : (index + by + rows.length) % rows.length;
|
|
154
|
+
ctx.setActive(rows[next].dataset.value ?? null, "keyboard");
|
|
155
|
+
}
|
|
156
|
+
function handleKeyDown(event) {
|
|
157
|
+
onKeyDown?.(event);
|
|
158
|
+
if (event.defaultPrevented) return;
|
|
159
|
+
const rows = enabledRows(ctx.getList());
|
|
160
|
+
switch (event.key) {
|
|
161
|
+
case "ArrowDown":
|
|
162
|
+
event.preventDefault();
|
|
163
|
+
move(1);
|
|
164
|
+
break;
|
|
165
|
+
case "ArrowUp":
|
|
166
|
+
event.preventDefault();
|
|
167
|
+
move(-1);
|
|
168
|
+
break;
|
|
169
|
+
case "Home":
|
|
170
|
+
event.preventDefault();
|
|
171
|
+
if (rows[0]) ctx.setActive(rows[0].dataset.value ?? null, "keyboard");
|
|
172
|
+
break;
|
|
173
|
+
case "End":
|
|
174
|
+
event.preventDefault();
|
|
175
|
+
if (rows.length) ctx.setActive(rows[rows.length - 1].dataset.value ?? null, "keyboard");
|
|
176
|
+
break;
|
|
177
|
+
case "Enter": {
|
|
178
|
+
const row = rows.find((item) => item.dataset.value === ctx.active);
|
|
179
|
+
if (row) {
|
|
180
|
+
event.preventDefault();
|
|
181
|
+
row.click();
|
|
182
|
+
}
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "command-input-wrapper", className: slots.inputWrapper(), children: [
|
|
188
|
+
icon === true ? /* @__PURE__ */ jsx(MagnifyingGlass, { className: slots.inputIcon() }) : icon || null,
|
|
189
|
+
/* @__PURE__ */ jsx(
|
|
190
|
+
"input",
|
|
191
|
+
{
|
|
192
|
+
"data-slot": "command-input",
|
|
193
|
+
id: ctx.inputId,
|
|
194
|
+
role: "combobox",
|
|
195
|
+
"aria-label": ctx.label,
|
|
196
|
+
"aria-expanded": true,
|
|
197
|
+
"aria-controls": ctx.listId,
|
|
198
|
+
"aria-autocomplete": "list",
|
|
199
|
+
"aria-activedescendant": ctx.active ? itemId(ctx.listId, ctx.active) : void 0,
|
|
200
|
+
autoComplete: "off",
|
|
201
|
+
autoCorrect: "off",
|
|
202
|
+
spellCheck: false,
|
|
203
|
+
className: slots.input({ className }),
|
|
204
|
+
placeholder,
|
|
205
|
+
value: ctx.search,
|
|
206
|
+
onChange: (event) => ctx.setSearch(event.target.value),
|
|
207
|
+
onKeyDown: handleKeyDown,
|
|
208
|
+
...props
|
|
209
|
+
}
|
|
210
|
+
),
|
|
211
|
+
ctx.dialog ? /* @__PURE__ */ jsx(
|
|
212
|
+
"button",
|
|
213
|
+
{
|
|
214
|
+
type: "button",
|
|
215
|
+
"data-slot": "command-escape",
|
|
216
|
+
tabIndex: -1,
|
|
217
|
+
"aria-label": "Close",
|
|
218
|
+
className: slots.escape(),
|
|
219
|
+
onClick: () => ctx.dialog?.close(),
|
|
220
|
+
children: /* @__PURE__ */ jsx(Kbd, { className: "group-hover/escape:text-foreground", children: "Esc" })
|
|
221
|
+
}
|
|
222
|
+
) : null
|
|
223
|
+
] });
|
|
224
|
+
}
|
|
225
|
+
function CommandList({ className, children, style, ...props }) {
|
|
226
|
+
const ctx = useCommand("CommandList");
|
|
227
|
+
const listRef = React.useRef(null);
|
|
228
|
+
const { setList } = ctx;
|
|
229
|
+
const sizerRef = React.useRef(null);
|
|
230
|
+
const highlightRef = React.useRef(null);
|
|
231
|
+
const instant = React.useRef(true);
|
|
232
|
+
const lastSearch = React.useRef(ctx.search);
|
|
233
|
+
const slots = commandVariants();
|
|
234
|
+
const { search, active, setActive, listId } = ctx;
|
|
235
|
+
React.useLayoutEffect(() => {
|
|
236
|
+
setList(listRef.current);
|
|
237
|
+
return () => setList(null);
|
|
238
|
+
}, [setList]);
|
|
239
|
+
React.useLayoutEffect(() => {
|
|
240
|
+
const rows = enabledRows(ctx.getList());
|
|
241
|
+
const changed = lastSearch.current !== search;
|
|
242
|
+
lastSearch.current = search;
|
|
243
|
+
if (changed || !active || !rows.some((row) => row.dataset.value === active)) {
|
|
244
|
+
if (changed) instant.current = true;
|
|
245
|
+
setActive(rows[0]?.dataset.value ?? null);
|
|
246
|
+
}
|
|
247
|
+
}, [search]);
|
|
248
|
+
React.useLayoutEffect(() => {
|
|
249
|
+
const list = listRef.current;
|
|
250
|
+
const highlight = highlightRef.current;
|
|
251
|
+
if (!list || !highlight) return;
|
|
252
|
+
const row = active ? document.getElementById(itemId(listId, active)) : null;
|
|
253
|
+
if (!row) {
|
|
254
|
+
highlight.dataset.visible = "false";
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
if (instant.current) highlight.style.transition = "none";
|
|
258
|
+
highlight.style.transform = `translate3d(${row.offsetLeft}px, ${row.offsetTop}px, 0px)`;
|
|
259
|
+
highlight.style.width = `${row.offsetWidth}px`;
|
|
260
|
+
highlight.style.height = `${row.offsetHeight}px`;
|
|
261
|
+
highlight.style.borderRadius = getComputedStyle(row).borderRadius;
|
|
262
|
+
highlight.dataset.visible = "true";
|
|
263
|
+
row.scrollIntoView({ block: "nearest" });
|
|
264
|
+
if (instant.current) {
|
|
265
|
+
instant.current = false;
|
|
266
|
+
requestAnimationFrame(() => {
|
|
267
|
+
highlight.style.transition = "";
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
React.useLayoutEffect(() => {
|
|
272
|
+
const list = listRef.current;
|
|
273
|
+
const sizer = sizerRef.current;
|
|
274
|
+
if (!list || !sizer) return;
|
|
275
|
+
let first = true;
|
|
276
|
+
const fit = () => {
|
|
277
|
+
const padding = parseFloat(getComputedStyle(list).paddingTop) + parseFloat(getComputedStyle(list).paddingBottom);
|
|
278
|
+
if (first) list.style.transition = "none";
|
|
279
|
+
list.style.height = `${sizer.offsetHeight + padding}px`;
|
|
280
|
+
if (first) {
|
|
281
|
+
first = false;
|
|
282
|
+
requestAnimationFrame(() => {
|
|
283
|
+
list.style.transition = "";
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
fit();
|
|
288
|
+
const observer = new ResizeObserver(fit);
|
|
289
|
+
observer.observe(sizer);
|
|
290
|
+
return () => observer.disconnect();
|
|
291
|
+
}, []);
|
|
292
|
+
return /* @__PURE__ */ jsxs(
|
|
293
|
+
"div",
|
|
294
|
+
{
|
|
295
|
+
ref: listRef,
|
|
296
|
+
"data-slot": "command-list",
|
|
297
|
+
id: listId,
|
|
298
|
+
role: "listbox",
|
|
299
|
+
"aria-label": ctx.label,
|
|
300
|
+
className: slots.list({ className }),
|
|
301
|
+
style,
|
|
302
|
+
...props,
|
|
303
|
+
children: [
|
|
304
|
+
/* @__PURE__ */ jsx("div", { ref: highlightRef, "data-slot": "command-highlight", "aria-hidden": "true", className: slots.highlight() }),
|
|
305
|
+
/* @__PURE__ */ jsx("div", { ref: sizerRef, "data-slot": "command-list-sizer", role: "presentation", children })
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
function CommandEmpty({ className, children, ...props }) {
|
|
311
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "command-empty", role: "presentation", className: commandVariants().empty({ className }), ...props, children: children ?? "No results found." });
|
|
312
|
+
}
|
|
313
|
+
function CommandGroup({ className, heading, children, ...props }) {
|
|
314
|
+
const ctx = useCommand("CommandGroup");
|
|
315
|
+
const headingId = React.useId();
|
|
316
|
+
const slots = commandVariants({ density: ctx.density });
|
|
317
|
+
return /* @__PURE__ */ jsxs(
|
|
318
|
+
"div",
|
|
319
|
+
{
|
|
320
|
+
"data-slot": "command-group",
|
|
321
|
+
role: "group",
|
|
322
|
+
"aria-labelledby": heading ? headingId : void 0,
|
|
323
|
+
className: slots.group({ className }),
|
|
324
|
+
...props,
|
|
325
|
+
children: [
|
|
326
|
+
heading ? /* @__PURE__ */ jsx("div", { id: headingId, "data-slot": "command-group-heading", className: slots.heading(), children: heading }) : null,
|
|
327
|
+
/* @__PURE__ */ jsx("div", { "data-slot": "command-group-items", role: "presentation", children })
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
);
|
|
331
|
+
}
|
|
332
|
+
function highlightRow(children, query, markClassName) {
|
|
333
|
+
return React.Children.map(
|
|
334
|
+
children,
|
|
335
|
+
(child) => typeof child === "string" || typeof child === "number" ? /* @__PURE__ */ jsx("span", { "data-slot": "highlight-match-text", children: /* @__PURE__ */ jsx(HighlightMatch, { query, className: markClassName, children: child }) }) : child
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
function CommandItem({ className, value, keywords, disabled, onSelect, children, ...props }) {
|
|
339
|
+
const ctx = useCommand("CommandItem");
|
|
340
|
+
const slots = commandVariants({ density: ctx.density });
|
|
341
|
+
const text = textOf(children);
|
|
342
|
+
if (ctx.search && ctx.filter(ctx.search, value, [text, ...keywords ?? []]) <= 0) return null;
|
|
343
|
+
const isActive = ctx.active === value;
|
|
344
|
+
return /* @__PURE__ */ jsx(
|
|
345
|
+
"div",
|
|
346
|
+
{
|
|
347
|
+
id: itemId(ctx.listId, value),
|
|
348
|
+
role: "option",
|
|
349
|
+
"data-slot": "command-item",
|
|
350
|
+
"data-value": value,
|
|
351
|
+
"data-active": isActive ? "true" : void 0,
|
|
352
|
+
"data-disabled": disabled ? "true" : void 0,
|
|
353
|
+
"aria-selected": isActive,
|
|
354
|
+
"aria-disabled": disabled || void 0,
|
|
355
|
+
className: slots.item({ className }),
|
|
356
|
+
onMouseDown: (event) => event.preventDefault(),
|
|
357
|
+
onPointerMove: () => {
|
|
358
|
+
if (!disabled && !isActive) ctx.setActive(value, "pointer");
|
|
359
|
+
},
|
|
360
|
+
onClick: () => {
|
|
361
|
+
if (disabled) return;
|
|
362
|
+
if (!isActive) ctx.setActive(value, "pointer");
|
|
363
|
+
ctx.run(value, onSelect);
|
|
364
|
+
},
|
|
365
|
+
...props,
|
|
366
|
+
children: highlightRow(children, ctx.search, slots.mark())
|
|
367
|
+
}
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
function CommandSeparator({ className, ...props }) {
|
|
371
|
+
const ctx = useCommand("CommandSeparator");
|
|
372
|
+
if (ctx.search) return null;
|
|
373
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "command-separator", role: "separator", className: commandVariants().separator({ className }), ...props });
|
|
374
|
+
}
|
|
375
|
+
function CommandShortcut({ className, ...props }) {
|
|
376
|
+
return /* @__PURE__ */ jsx("span", { "data-slot": "command-shortcut", className: commandVariants().shortcut({ className }), ...props });
|
|
377
|
+
}
|
|
378
|
+
function CommandFooter({ className, ...props }) {
|
|
379
|
+
const ctx = useCommand("CommandFooter");
|
|
380
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "command-footer", className: commandVariants({ density: ctx.density }).footer({ className }), ...props });
|
|
381
|
+
}
|
|
382
|
+
function CommandFooterHint({ className, keys, children, ...props }) {
|
|
383
|
+
return /* @__PURE__ */ jsxs("span", { "data-slot": "command-footer-hint", className: commandVariants().footerHint({ className }), ...props, children: [
|
|
384
|
+
keys.map((key, index) => /* @__PURE__ */ jsx(Kbd, { size: "sm", children: key }, index)),
|
|
385
|
+
children
|
|
386
|
+
] });
|
|
387
|
+
}
|
|
388
|
+
function CommandKey({ className, ...props }) {
|
|
389
|
+
return /* @__PURE__ */ jsx(Kbd, { size: "sm", className, ...props });
|
|
390
|
+
}
|
|
391
|
+
function CommandDialog({
|
|
392
|
+
open: openProp,
|
|
393
|
+
defaultOpen = false,
|
|
394
|
+
onOpenChange,
|
|
395
|
+
closeOnSelect = true,
|
|
396
|
+
title = "Command palette",
|
|
397
|
+
description = "Search for a command to run.",
|
|
398
|
+
className,
|
|
399
|
+
children,
|
|
400
|
+
...props
|
|
401
|
+
}) {
|
|
402
|
+
const [ownOpen, setOwnOpen] = React.useState(defaultOpen);
|
|
403
|
+
const open = openProp ?? ownOpen;
|
|
404
|
+
const setOpen = React.useCallback(
|
|
405
|
+
(next) => {
|
|
406
|
+
if (openProp === void 0) setOwnOpen(next);
|
|
407
|
+
onOpenChange?.(next);
|
|
408
|
+
},
|
|
409
|
+
[openProp, onOpenChange]
|
|
410
|
+
);
|
|
411
|
+
const close = React.useMemo(() => ({ close: () => setOpen(false), closeOnSelect }), [setOpen, closeOnSelect]);
|
|
412
|
+
const slots = commandVariants();
|
|
413
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [
|
|
414
|
+
/* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: slots.overlay() }),
|
|
415
|
+
/* @__PURE__ */ jsx("div", { className: slots.positioner(), children: /* @__PURE__ */ jsxs(DialogPrimitive.Content, { "data-slot": "command-dialog", className: slots.dialog({ className }), children: [
|
|
416
|
+
/* @__PURE__ */ jsxs(VisuallyHidden.Root, { children: [
|
|
417
|
+
/* @__PURE__ */ jsx(DialogPrimitive.Title, { children: title }),
|
|
418
|
+
/* @__PURE__ */ jsx(DialogPrimitive.Description, { children: description })
|
|
419
|
+
] }),
|
|
420
|
+
/* @__PURE__ */ jsx(DialogCloseContext.Provider, { value: close, children: /* @__PURE__ */ jsx(Command, { ...props, children }) })
|
|
421
|
+
] }) })
|
|
422
|
+
] }) });
|
|
423
|
+
}
|
|
424
|
+
export {
|
|
425
|
+
Command,
|
|
426
|
+
CommandDialog,
|
|
427
|
+
CommandEmpty,
|
|
428
|
+
CommandFooter,
|
|
429
|
+
CommandFooterHint,
|
|
430
|
+
CommandGroup,
|
|
431
|
+
CommandInput,
|
|
432
|
+
CommandItem,
|
|
433
|
+
CommandKey,
|
|
434
|
+
CommandList,
|
|
435
|
+
CommandSeparator,
|
|
436
|
+
CommandShortcut,
|
|
437
|
+
commandVariants
|
|
438
|
+
};
|
|
439
|
+
//# sourceMappingURL=command.mjs.map
|