@thalavaisankar/atoms 0.0.0-stage → 0.1.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 +142 -2
- package/THIRD_PARTY_NOTICES.md +246 -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/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 +19332 -0
- package/dist/index.mjs +155 -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/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,153 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Slot } from "radix-ui";
|
|
5
|
+
import { CaretLeft } from "atoms-icons";
|
|
6
|
+
import { cn } from "../../../lib/utils.mjs";
|
|
7
|
+
import { duration, easing, prefersReducedMotion } from "../../../lib/motion.mjs";
|
|
8
|
+
import { Button } from "../button/index.mjs";
|
|
9
|
+
import { assignRef } from "../dialog/dialog.mjs";
|
|
10
|
+
const DrawerNavContext = React.createContext(null);
|
|
11
|
+
DrawerNavContext.displayName = "DrawerNavContext";
|
|
12
|
+
function useDrawerNavContext(consumerName) {
|
|
13
|
+
const context = React.useContext(DrawerNavContext);
|
|
14
|
+
if (!context) throw new Error(`\`${consumerName}\` must be used within \`DrawerNav\``);
|
|
15
|
+
return context;
|
|
16
|
+
}
|
|
17
|
+
function useDrawerNav() {
|
|
18
|
+
const { activeView, canGoBack, navigate, back } = useDrawerNavContext("useDrawerNav");
|
|
19
|
+
return { activeView, canGoBack, navigate, back };
|
|
20
|
+
}
|
|
21
|
+
const PUSH_DISTANCE = 24;
|
|
22
|
+
function DrawerNav({ defaultView, onViewChange, className, ref, ...props }) {
|
|
23
|
+
const [stack, setStack] = React.useState([defaultView]);
|
|
24
|
+
const [direction, setDirection] = React.useState();
|
|
25
|
+
const navRef = React.useRef(null);
|
|
26
|
+
const fromHeight = React.useRef(null);
|
|
27
|
+
const setRefs = React.useCallback(
|
|
28
|
+
(node) => {
|
|
29
|
+
navRef.current = node;
|
|
30
|
+
assignRef(ref, node);
|
|
31
|
+
},
|
|
32
|
+
[ref]
|
|
33
|
+
);
|
|
34
|
+
const panel = () => navRef.current?.closest('[data-slot="drawer-content"]') ?? null;
|
|
35
|
+
const navigate = (view) => {
|
|
36
|
+
fromHeight.current = panel()?.offsetHeight ?? null;
|
|
37
|
+
setStack((current) => [...current, view]);
|
|
38
|
+
setDirection("forward");
|
|
39
|
+
onViewChange?.(view);
|
|
40
|
+
};
|
|
41
|
+
const back = () => {
|
|
42
|
+
if (stack.length < 2) return;
|
|
43
|
+
fromHeight.current = panel()?.offsetHeight ?? null;
|
|
44
|
+
setStack((current) => current.slice(0, -1));
|
|
45
|
+
setDirection("back");
|
|
46
|
+
onViewChange?.(stack[stack.length - 2]);
|
|
47
|
+
};
|
|
48
|
+
const activeView = stack[stack.length - 1];
|
|
49
|
+
React.useLayoutEffect(() => {
|
|
50
|
+
const from = fromHeight.current;
|
|
51
|
+
fromHeight.current = null;
|
|
52
|
+
if (from === null || !direction) return;
|
|
53
|
+
const nav = navRef.current;
|
|
54
|
+
const content = nav?.closest('[data-slot="drawer-content"]');
|
|
55
|
+
const view = nav?.querySelector('[data-slot="drawer-view"]');
|
|
56
|
+
view?.focus({ preventScroll: true });
|
|
57
|
+
if (!content || !view || typeof content.animate !== "function" || prefersReducedMotion()) return;
|
|
58
|
+
const to = content.offsetHeight;
|
|
59
|
+
if (Math.abs(to - from) > 1) {
|
|
60
|
+
content.animate([{ height: `${from}px` }, { height: `${to}px` }], {
|
|
61
|
+
duration: duration.base,
|
|
62
|
+
easing: easing.drawer
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
const rtl = getComputedStyle(view).direction === "rtl" ? -1 : 1;
|
|
66
|
+
const shift = (direction === "forward" ? PUSH_DISTANCE : -PUSH_DISTANCE) * rtl;
|
|
67
|
+
view.animate(
|
|
68
|
+
[
|
|
69
|
+
{ opacity: 0, transform: `translateX(${shift}px)` },
|
|
70
|
+
{ opacity: 1, transform: "none" }
|
|
71
|
+
],
|
|
72
|
+
{ duration: duration.base, easing: easing.out }
|
|
73
|
+
);
|
|
74
|
+
}, [activeView, direction]);
|
|
75
|
+
const value = {
|
|
76
|
+
activeView,
|
|
77
|
+
direction,
|
|
78
|
+
canGoBack: stack.length > 1,
|
|
79
|
+
navigate,
|
|
80
|
+
back
|
|
81
|
+
};
|
|
82
|
+
return /* @__PURE__ */ jsx(DrawerNavContext.Provider, { value, children: /* @__PURE__ */ jsx(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
"data-slot": "drawer-nav",
|
|
86
|
+
ref: setRefs,
|
|
87
|
+
className: cn("flex min-h-0 flex-1 flex-col", className),
|
|
88
|
+
...props
|
|
89
|
+
}
|
|
90
|
+
) });
|
|
91
|
+
}
|
|
92
|
+
function DrawerView({ view, className, ...props }) {
|
|
93
|
+
const { activeView, direction } = useDrawerNavContext("DrawerView");
|
|
94
|
+
if (view !== activeView) return null;
|
|
95
|
+
return /* @__PURE__ */ jsx(
|
|
96
|
+
"div",
|
|
97
|
+
{
|
|
98
|
+
"data-slot": "drawer-view",
|
|
99
|
+
"data-view": view,
|
|
100
|
+
"data-direction": direction,
|
|
101
|
+
tabIndex: -1,
|
|
102
|
+
className: cn("flex min-h-0 flex-1 flex-col outline-none", className),
|
|
103
|
+
...props
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
function DrawerNavTrigger({ view, asChild = false, className, onClick, ...props }) {
|
|
108
|
+
const { navigate } = useDrawerNavContext("DrawerNavTrigger");
|
|
109
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
110
|
+
return /* @__PURE__ */ jsx(
|
|
111
|
+
Comp,
|
|
112
|
+
{
|
|
113
|
+
"data-slot": "drawer-nav-trigger",
|
|
114
|
+
type: asChild ? void 0 : "button",
|
|
115
|
+
className: cn("cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-focus", className),
|
|
116
|
+
onClick: (event) => {
|
|
117
|
+
onClick?.(event);
|
|
118
|
+
if (!event.defaultPrevented) navigate(view);
|
|
119
|
+
},
|
|
120
|
+
...props
|
|
121
|
+
}
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
function DrawerNavBack({ label = "Back", className, children, onClick, ...props }) {
|
|
125
|
+
const { canGoBack, back } = useDrawerNavContext("DrawerNavBack");
|
|
126
|
+
if (!canGoBack) return null;
|
|
127
|
+
return /* @__PURE__ */ jsx(
|
|
128
|
+
Button,
|
|
129
|
+
{
|
|
130
|
+
"data-slot": "drawer-nav-back",
|
|
131
|
+
variant: "ghost",
|
|
132
|
+
size: "sm",
|
|
133
|
+
iconOnly: true,
|
|
134
|
+
tooltip: false,
|
|
135
|
+
"aria-label": label,
|
|
136
|
+
className: cn("-ms-2", className),
|
|
137
|
+
onClick: (event) => {
|
|
138
|
+
onClick?.(event);
|
|
139
|
+
if (!event.defaultPrevented) back();
|
|
140
|
+
},
|
|
141
|
+
...props,
|
|
142
|
+
children: children ?? /* @__PURE__ */ jsx(CaretLeft, { "aria-hidden": true, className: "rtl:-scale-x-100" })
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
export {
|
|
147
|
+
DrawerNav,
|
|
148
|
+
DrawerNavBack,
|
|
149
|
+
DrawerNavTrigger,
|
|
150
|
+
DrawerView,
|
|
151
|
+
useDrawerNav
|
|
152
|
+
};
|
|
153
|
+
//# sourceMappingURL=drawer-nav.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/drawer/drawer-nav.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Slot } from \"radix-ui\"\nimport { CaretLeft } from \"atoms-icons\"\n\nimport { cn } from \"../../../lib/utils.mjs\"\nimport { duration, easing, prefersReducedMotion } from \"../../../lib/motion.mjs\"\nimport { Button } from \"../button/index.mjs\"\nimport { assignRef } from \"../dialog/dialog.mjs\"\n\ntype Direction = \"forward\" | \"back\"\n\ninterface DrawerNavContextValue {\n activeView: string\n direction: Direction | undefined\n canGoBack: boolean\n navigate: (view: string) => void\n back: () => void\n}\n\nconst DrawerNavContext = React.createContext<DrawerNavContextValue | null>(null)\nDrawerNavContext.displayName = \"DrawerNavContext\"\n\nfunction useDrawerNavContext(consumerName: string) {\n const context = React.useContext(DrawerNavContext)\n if (!context) throw new Error(`\\`${consumerName}\\` must be used within \\`DrawerNav\\``)\n return context\n}\n\n/** Drive the stack from anywhere inside a `DrawerNav`, e.g. after an async action. */\nexport function useDrawerNav() {\n const { activeView, canGoBack, navigate, back } = useDrawerNavContext(\"useDrawerNav\")\n return { activeView, canGoBack, navigate, back }\n}\n\nconst PUSH_DISTANCE = 24\n\nexport interface DrawerNavProps extends Omit<React.ComponentProps<\"div\">, \"onChange\"> {\n defaultView: string\n onViewChange?: (view: string) => void\n}\n\n/**\n * An in-sheet navigation stack. Only the active `DrawerView` renders; the panel's height eases to\n * the new view and the view pushes in from the side you moved. The stack lives in this component,\n * which unmounts with the closed drawer, so it starts over at `defaultView` on every open.\n */\nexport function DrawerNav({ defaultView, onViewChange, className, ref, ...props }: DrawerNavProps) {\n const [stack, setStack] = React.useState<string[]>([defaultView])\n const [direction, setDirection] = React.useState<Direction>()\n const navRef = React.useRef<HTMLDivElement | null>(null)\n const fromHeight = React.useRef<number | null>(null)\n\n const setRefs = React.useCallback(\n (node: HTMLDivElement | null) => {\n navRef.current = node\n assignRef(ref, node)\n },\n [ref],\n )\n\n const panel = () => navRef.current?.closest<HTMLElement>('[data-slot=\"drawer-content\"]') ?? null\n\n const navigate = (view: string) => {\n fromHeight.current = panel()?.offsetHeight ?? null\n setStack((current) => [...current, view])\n setDirection(\"forward\")\n onViewChange?.(view)\n }\n\n const back = () => {\n if (stack.length < 2) return\n fromHeight.current = panel()?.offsetHeight ?? null\n setStack((current) => current.slice(0, -1))\n setDirection(\"back\")\n onViewChange?.(stack[stack.length - 2])\n }\n\n const activeView = stack[stack.length - 1]\n\n React.useLayoutEffect(() => {\n const from = fromHeight.current\n fromHeight.current = null\n if (from === null || !direction) return\n const nav = navRef.current\n const content = nav?.closest<HTMLElement>('[data-slot=\"drawer-content\"]')\n const view = nav?.querySelector<HTMLElement>('[data-slot=\"drawer-view\"]')\n // The trigger that was pressed is gone with its view: keep focus inside, at the new page.\n view?.focus({ preventScroll: true })\n if (!content || !view || typeof content.animate !== \"function\" || prefersReducedMotion()) return\n\n const to = content.offsetHeight\n if (Math.abs(to - from) > 1) {\n content.animate([{ height: `${from}px` }, { height: `${to}px` }], {\n duration: duration.base,\n easing: easing.drawer,\n })\n }\n const rtl = getComputedStyle(view).direction === \"rtl\" ? -1 : 1\n const shift = (direction === \"forward\" ? PUSH_DISTANCE : -PUSH_DISTANCE) * rtl\n view.animate(\n [\n { opacity: 0, transform: `translateX(${shift}px)` },\n { opacity: 1, transform: \"none\" },\n ],\n { duration: duration.base, easing: easing.out },\n )\n }, [activeView, direction])\n\n const value: DrawerNavContextValue = {\n activeView,\n direction,\n canGoBack: stack.length > 1,\n navigate,\n back,\n }\n\n return (\n <DrawerNavContext.Provider value={value}>\n <div\n data-slot=\"drawer-nav\"\n ref={setRefs}\n className={cn(\"flex min-h-0 flex-1 flex-col\", className)}\n {...props}\n />\n </DrawerNavContext.Provider>\n )\n}\n\nexport interface DrawerViewProps extends React.ComponentProps<\"div\"> {\n view: string\n}\n\nexport function DrawerView({ view, className, ...props }: DrawerViewProps) {\n const { activeView, direction } = useDrawerNavContext(\"DrawerView\")\n if (view !== activeView) return null\n return (\n <div\n data-slot=\"drawer-view\"\n data-view={view}\n data-direction={direction}\n tabIndex={-1}\n className={cn(\"flex min-h-0 flex-1 flex-col outline-none\", className)}\n {...props}\n />\n )\n}\n\nexport interface DrawerNavTriggerProps extends React.ComponentProps<\"button\"> {\n view: string\n asChild?: boolean\n}\n\nexport function DrawerNavTrigger({ view, asChild = false, className, onClick, ...props }: DrawerNavTriggerProps) {\n const { navigate } = useDrawerNavContext(\"DrawerNavTrigger\")\n const Comp: React.ElementType = asChild ? Slot.Root : \"button\"\n return (\n <Comp\n data-slot=\"drawer-nav-trigger\"\n type={asChild ? undefined : \"button\"}\n className={cn(\"cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-focus\", className)}\n onClick={(event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (!event.defaultPrevented) navigate(view)\n }}\n {...props}\n />\n )\n}\n\nexport interface DrawerNavBackProps extends React.ComponentProps<\"button\"> {\n label?: string\n}\n\n/** Pops the stack. Renders nothing at the root view, so it can sit in a header every view shares. */\nexport function DrawerNavBack({ label = \"Back\", className, children, onClick, ...props }: DrawerNavBackProps) {\n const { canGoBack, back } = useDrawerNavContext(\"DrawerNavBack\")\n if (!canGoBack) return null\n return (\n <Button\n data-slot=\"drawer-nav-back\"\n variant=\"ghost\"\n size=\"sm\"\n iconOnly\n tooltip={false}\n aria-label={label}\n className={cn(\"-ms-2\", className)}\n onClick={(event) => {\n onClick?.(event)\n if (!event.defaultPrevented) back()\n }}\n {...props}\n >\n {children ?? <CaretLeft aria-hidden className=\"rtl:-scale-x-100\" />}\n </Button>\n )\n}\n"],"mappings":";AAwHM;AAtHN,YAAY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AS;AAAA,MAChC,SAAS,CAAC,UAAU;AAClB,kBAAU,KAAK;AACf,YAAI,CAAC,MAAM,iBAAkB,MAAK;AAAA,MACpC;AAAA,MACC,GAAG;AAAA,MAEH,sBAAY,oBAAC,aAAU,eAAW,MAAC,WAAU,oBAAmB;AAAA;AAAA,EACnE;AAEJ;","names":[]}
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { flushSync } from "react-dom";
|
|
5
|
+
import { Dialog as DialogPrimitive, Slot } from "radix-ui";
|
|
6
|
+
import { X } from "atoms-icons";
|
|
7
|
+
import { tv } from "../../../lib/tv.mjs";
|
|
8
|
+
import { DensityProvider, useDensity } from "../../../lib/density.mjs";
|
|
9
|
+
import { Button } from "../button/index.mjs";
|
|
10
|
+
import {
|
|
11
|
+
Dialog,
|
|
12
|
+
DialogClose,
|
|
13
|
+
DialogContent,
|
|
14
|
+
DialogDescription,
|
|
15
|
+
DialogFooter,
|
|
16
|
+
DialogHeader,
|
|
17
|
+
DialogTitle,
|
|
18
|
+
DialogTrigger
|
|
19
|
+
} from "../dialog/index.mjs";
|
|
20
|
+
import {
|
|
21
|
+
DialogStackProvider,
|
|
22
|
+
useCloseAutoFocus,
|
|
23
|
+
useDialogRootContext,
|
|
24
|
+
useDialogStackLevel
|
|
25
|
+
} from "../dialog/dialog.mjs";
|
|
26
|
+
import { useSwipeToClose } from "./use-swipe-to-close.mjs";
|
|
27
|
+
const drawerVariants = tv({
|
|
28
|
+
slots: {
|
|
29
|
+
overlay: [
|
|
30
|
+
"inset-0 z-50 bg-black/50",
|
|
31
|
+
"transition-opacity duration-slow ease-drawer motion-reduce:transition-none",
|
|
32
|
+
"starting:opacity-0",
|
|
33
|
+
"data-[state=closed]:pointer-events-none data-[state=closed]:opacity-0",
|
|
34
|
+
"data-[state=closed]:[animation:presence-hold_var(--duration-slow)_linear]",
|
|
35
|
+
"data-stacked:bg-black/25"
|
|
36
|
+
],
|
|
37
|
+
content: [
|
|
38
|
+
"z-50 flex flex-col overflow-hidden border-border-soft outline-none",
|
|
39
|
+
"bg-popover text-popover-foreground shadow-xl [--surface:var(--popover)]",
|
|
40
|
+
"transition-[translate] duration-slow ease-drawer motion-reduce:transition-none",
|
|
41
|
+
"data-dragging:transition-none data-dragging:select-none",
|
|
42
|
+
"data-[state=closed]:pointer-events-none data-[state=closed]:[animation:presence-hold_var(--duration-slow)_linear]",
|
|
43
|
+
// Leave the title clear of the built-in close button.
|
|
44
|
+
"[&:has(>[data-slot=drawer-close-button])_[data-slot=drawer-header]]:pe-12"
|
|
45
|
+
],
|
|
46
|
+
handle: "flex shrink-0 justify-center py-2 [[data-swipe]_&]:touch-none",
|
|
47
|
+
handleBar: "h-1.5 w-10 rounded-pill bg-border",
|
|
48
|
+
header: [
|
|
49
|
+
"flex shrink-0 flex-col gap-1 px-[var(--drawer-inset)] pt-[var(--drawer-inset)] pb-3 text-left",
|
|
50
|
+
"[[data-handle]_&]:pt-1 [[data-swipe]_&]:touch-none"
|
|
51
|
+
],
|
|
52
|
+
title: "font-semibold leading-6 tracking-tight text-foreground",
|
|
53
|
+
description: "text-sm text-pretty text-muted-foreground",
|
|
54
|
+
body: [
|
|
55
|
+
"min-h-0 flex-1 overflow-y-auto overscroll-contain px-[var(--drawer-inset)] py-1 scroll-py-10 scroll-fade",
|
|
56
|
+
"[&:not([data-slot=drawer-header]~*)]:pt-[var(--drawer-inset)] [&:not(:has(~[data-slot=drawer-footer]))]:pb-[var(--drawer-inset)]",
|
|
57
|
+
"outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-inset"
|
|
58
|
+
],
|
|
59
|
+
footer: [
|
|
60
|
+
"mt-auto flex shrink-0 flex-col-reverse gap-2 px-[var(--drawer-inset)] pt-3 pb-[var(--drawer-inset)]",
|
|
61
|
+
"sm:flex-row sm:items-center sm:justify-end"
|
|
62
|
+
],
|
|
63
|
+
close: "absolute [[data-handle]>&]:top-6"
|
|
64
|
+
},
|
|
65
|
+
variants: {
|
|
66
|
+
side: {
|
|
67
|
+
top: { content: "inset-x-0 top-0 border-b pt-[env(safe-area-inset-top)] starting:-translate-y-full data-[state=closed]:-translate-y-full" },
|
|
68
|
+
bottom: { content: "inset-x-0 bottom-0 border-t pb-[env(safe-area-inset-bottom)] starting:translate-y-full data-[state=closed]:translate-y-full" },
|
|
69
|
+
left: { content: "left-0" },
|
|
70
|
+
right: { content: "right-0" }
|
|
71
|
+
},
|
|
72
|
+
size: { sm: {}, md: {}, lg: {}, xl: {} },
|
|
73
|
+
floating: { true: {}, false: {} },
|
|
74
|
+
density: {
|
|
75
|
+
compact: {
|
|
76
|
+
content: "[--drawer-inset:--spacing(4)]",
|
|
77
|
+
title: "text-base",
|
|
78
|
+
close: "top-3.5 right-3.5"
|
|
79
|
+
},
|
|
80
|
+
comfortable: {
|
|
81
|
+
content: "[--drawer-inset:--spacing(6)]",
|
|
82
|
+
title: "text-lg",
|
|
83
|
+
close: "top-5.5 right-5.5"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
contained: {
|
|
87
|
+
true: { overlay: "absolute", content: "absolute" },
|
|
88
|
+
false: { overlay: "fixed", content: "fixed" }
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
compoundVariants: [
|
|
92
|
+
// Side panels: floating inset from the edges, or docked flush and full height.
|
|
93
|
+
{
|
|
94
|
+
side: ["left", "right"],
|
|
95
|
+
floating: true,
|
|
96
|
+
class: {
|
|
97
|
+
content: "inset-y-2 w-[calc(100%-var(--spacing)*4)] rounded-xl border sm:inset-y-3 sm:w-[calc(100%-var(--spacing)*6)]"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{ side: "right", floating: true, class: { content: "right-2 sm:right-3 starting:translate-x-[calc(100%+var(--spacing)*4)] data-[state=closed]:translate-x-[calc(100%+var(--spacing)*4)]" } },
|
|
101
|
+
{ side: "left", floating: true, class: { content: "left-2 sm:left-3 starting:-translate-x-[calc(100%+var(--spacing)*4)] data-[state=closed]:-translate-x-[calc(100%+var(--spacing)*4)]" } },
|
|
102
|
+
{ side: ["left", "right"], floating: false, class: { content: "inset-y-0 w-full" } },
|
|
103
|
+
{ side: "right", floating: false, class: { content: "border-l starting:translate-x-full data-[state=closed]:translate-x-full" } },
|
|
104
|
+
{ side: "left", floating: false, class: { content: "border-r starting:-translate-x-full data-[state=closed]:-translate-x-full" } },
|
|
105
|
+
// Sheets: always edge to edge; floating rounds the inner corners.
|
|
106
|
+
{ side: "bottom", floating: true, class: { content: "rounded-t-2xl" } },
|
|
107
|
+
{ side: "top", floating: true, class: { content: "rounded-b-2xl" } },
|
|
108
|
+
// Size caps the cross axis: the width of a side panel, the height of a sheet.
|
|
109
|
+
{ side: ["left", "right"], size: "sm", class: { content: "max-w-sm" } },
|
|
110
|
+
{ side: ["left", "right"], size: "md", class: { content: "max-w-md" } },
|
|
111
|
+
{ side: ["left", "right"], size: "lg", class: { content: "max-w-lg" } },
|
|
112
|
+
{ side: ["left", "right"], size: "xl", class: { content: "max-w-xl" } },
|
|
113
|
+
{ side: ["top", "bottom"], size: "sm", class: { content: "max-h-[40dvh]" } },
|
|
114
|
+
{ side: ["top", "bottom"], size: "md", class: { content: "max-h-[60dvh]" } },
|
|
115
|
+
{ side: ["top", "bottom"], size: "lg", class: { content: "max-h-[80dvh]" } },
|
|
116
|
+
{ side: ["top", "bottom"], size: "xl", class: { content: "max-h-[92dvh]" } }
|
|
117
|
+
],
|
|
118
|
+
defaultVariants: {
|
|
119
|
+
side: "right",
|
|
120
|
+
size: "md",
|
|
121
|
+
floating: true,
|
|
122
|
+
density: "compact",
|
|
123
|
+
contained: false
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
const DrawerContext = React.createContext(null);
|
|
127
|
+
DrawerContext.displayName = "DrawerContext";
|
|
128
|
+
const defaultSlots = drawerVariants();
|
|
129
|
+
function useDrawerSlots() {
|
|
130
|
+
return React.useContext(DrawerContext)?.slots ?? defaultSlots;
|
|
131
|
+
}
|
|
132
|
+
function Drawer(props) {
|
|
133
|
+
return /* @__PURE__ */ jsx(Dialog, { ...props });
|
|
134
|
+
}
|
|
135
|
+
function DrawerTrigger(props) {
|
|
136
|
+
return /* @__PURE__ */ jsx(DialogTrigger, { "data-slot": "drawer-trigger", ...props });
|
|
137
|
+
}
|
|
138
|
+
function DrawerClose({ skipConfirm = false, asChild = false, onClick, ...props }) {
|
|
139
|
+
const drawer = React.useContext(DrawerContext);
|
|
140
|
+
if (drawer?.guarded && !skipConfirm) {
|
|
141
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
142
|
+
return /* @__PURE__ */ jsx(
|
|
143
|
+
Comp,
|
|
144
|
+
{
|
|
145
|
+
"data-slot": "drawer-close",
|
|
146
|
+
type: asChild ? void 0 : "button",
|
|
147
|
+
...props,
|
|
148
|
+
onClick: (event) => {
|
|
149
|
+
onClick?.(event);
|
|
150
|
+
if (!event.defaultPrevented) drawer.requestClose();
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "drawer-close", asChild, onClick, ...props });
|
|
156
|
+
}
|
|
157
|
+
function DrawerContent({
|
|
158
|
+
side = "right",
|
|
159
|
+
size = "md",
|
|
160
|
+
density: densityProp,
|
|
161
|
+
swipeToClose = true,
|
|
162
|
+
floating = true,
|
|
163
|
+
confirmClose = false,
|
|
164
|
+
showHandle = true,
|
|
165
|
+
showClose = true,
|
|
166
|
+
closeLabel = "Close",
|
|
167
|
+
container,
|
|
168
|
+
forceMount,
|
|
169
|
+
className,
|
|
170
|
+
children,
|
|
171
|
+
onCloseAutoFocus,
|
|
172
|
+
onEscapeKeyDown,
|
|
173
|
+
onInteractOutside,
|
|
174
|
+
onPointerDown,
|
|
175
|
+
...props
|
|
176
|
+
}) {
|
|
177
|
+
const density = useDensity(densityProp);
|
|
178
|
+
const slots = drawerVariants({ side, size, density, floating, contained: Boolean(container) });
|
|
179
|
+
const root = useDialogRootContext();
|
|
180
|
+
const stack = useDialogStackLevel(root?.open ?? false);
|
|
181
|
+
const handleCloseAutoFocus = useCloseAutoFocus(onCloseAutoFocus);
|
|
182
|
+
const guarded = confirmClose !== false;
|
|
183
|
+
const [confirming, setConfirming] = React.useState(false);
|
|
184
|
+
const setOpen = root?.setOpen;
|
|
185
|
+
const close = React.useCallback(() => setOpen?.(false), [setOpen]);
|
|
186
|
+
const requestClose = React.useCallback(() => {
|
|
187
|
+
if (guarded) setConfirming(true);
|
|
188
|
+
else close();
|
|
189
|
+
}, [guarded, close, setConfirming]);
|
|
190
|
+
const swipePointerDown = useSwipeToClose({
|
|
191
|
+
side,
|
|
192
|
+
enabled: swipeToClose && Boolean(setOpen),
|
|
193
|
+
onSwipeClose: (release) => {
|
|
194
|
+
if (guarded) {
|
|
195
|
+
release();
|
|
196
|
+
setConfirming(true);
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
flushSync(close);
|
|
200
|
+
release();
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
const sheet = side === "top" || side === "bottom";
|
|
204
|
+
const withHandle = sheet && showHandle;
|
|
205
|
+
const handle = withHandle ? /* @__PURE__ */ jsx("div", { "data-slot": "drawer-handle", "aria-hidden": true, className: slots.handle(), children: /* @__PURE__ */ jsx("span", { className: slots.handleBar() }) }) : null;
|
|
206
|
+
const drawerContext = React.useMemo(() => ({ slots, guarded, requestClose }), [slots, guarded, requestClose]);
|
|
207
|
+
const copy = typeof confirmClose === "object" ? confirmClose : {};
|
|
208
|
+
const closeButton = /* @__PURE__ */ jsx(
|
|
209
|
+
Button,
|
|
210
|
+
{
|
|
211
|
+
"data-slot": "drawer-close-button",
|
|
212
|
+
variant: "ghost",
|
|
213
|
+
size: "xs",
|
|
214
|
+
iconOnly: true,
|
|
215
|
+
tooltip: false,
|
|
216
|
+
"aria-label": closeLabel,
|
|
217
|
+
className: slots.close(),
|
|
218
|
+
onClick: guarded ? requestClose : void 0,
|
|
219
|
+
children: /* @__PURE__ */ jsx(X, { "aria-hidden": true })
|
|
220
|
+
}
|
|
221
|
+
);
|
|
222
|
+
const portal = /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { container: container ?? void 0, forceMount, children: [
|
|
223
|
+
/* @__PURE__ */ jsx(
|
|
224
|
+
DialogPrimitive.Overlay,
|
|
225
|
+
{
|
|
226
|
+
"data-slot": "drawer-overlay",
|
|
227
|
+
"data-stacked": stack.depth > 0 ? "" : void 0,
|
|
228
|
+
forceMount,
|
|
229
|
+
className: slots.overlay()
|
|
230
|
+
}
|
|
231
|
+
),
|
|
232
|
+
/* @__PURE__ */ jsxs(
|
|
233
|
+
DialogPrimitive.Content,
|
|
234
|
+
{
|
|
235
|
+
"data-slot": "drawer-content",
|
|
236
|
+
"data-side": side,
|
|
237
|
+
"data-handle": withHandle ? "" : void 0,
|
|
238
|
+
"data-swipe": swipeToClose ? "" : void 0,
|
|
239
|
+
forceMount,
|
|
240
|
+
className: slots.content({ className }),
|
|
241
|
+
onCloseAutoFocus: handleCloseAutoFocus,
|
|
242
|
+
onEscapeKeyDown: (event) => {
|
|
243
|
+
onEscapeKeyDown?.(event);
|
|
244
|
+
if (event.defaultPrevented || !guarded) return;
|
|
245
|
+
event.preventDefault();
|
|
246
|
+
setConfirming(true);
|
|
247
|
+
},
|
|
248
|
+
onInteractOutside: (event) => {
|
|
249
|
+
onInteractOutside?.(event);
|
|
250
|
+
if (event.defaultPrevented || !guarded) return;
|
|
251
|
+
event.preventDefault();
|
|
252
|
+
setConfirming(true);
|
|
253
|
+
},
|
|
254
|
+
onPointerDown: (event) => {
|
|
255
|
+
onPointerDown?.(event);
|
|
256
|
+
if (!event.defaultPrevented) swipePointerDown(event);
|
|
257
|
+
},
|
|
258
|
+
...props,
|
|
259
|
+
children: [
|
|
260
|
+
side !== "top" ? handle : null,
|
|
261
|
+
/* @__PURE__ */ jsx(DrawerContext.Provider, { value: drawerContext, children: /* @__PURE__ */ jsxs(DialogStackProvider, { value: stack.value, children: [
|
|
262
|
+
children,
|
|
263
|
+
guarded ? /* @__PURE__ */ jsx(Dialog, { open: confirming, onOpenChange: setConfirming, children: /* @__PURE__ */ jsxs(DialogContent, { size: "sm", showClose: false, children: [
|
|
264
|
+
/* @__PURE__ */ jsxs(DialogHeader, { children: [
|
|
265
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: copy.title ?? "Discard changes?" }),
|
|
266
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: copy.description ?? "Your edits will be lost." })
|
|
267
|
+
] }),
|
|
268
|
+
/* @__PURE__ */ jsxs(DialogFooter, { children: [
|
|
269
|
+
/* @__PURE__ */ jsx(DialogClose, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", children: copy.cancelLabel ?? "Keep editing" }) }),
|
|
270
|
+
/* @__PURE__ */ jsx(
|
|
271
|
+
Button,
|
|
272
|
+
{
|
|
273
|
+
variant: "destructive",
|
|
274
|
+
onClick: () => {
|
|
275
|
+
setConfirming(false);
|
|
276
|
+
close();
|
|
277
|
+
},
|
|
278
|
+
children: copy.confirmLabel ?? "Discard"
|
|
279
|
+
}
|
|
280
|
+
)
|
|
281
|
+
] })
|
|
282
|
+
] }) }) : null
|
|
283
|
+
] }) }),
|
|
284
|
+
side === "top" ? handle : null,
|
|
285
|
+
showClose ? guarded ? closeButton : /* @__PURE__ */ jsx(DialogPrimitive.Close, { asChild: true, children: closeButton }) : null
|
|
286
|
+
]
|
|
287
|
+
}
|
|
288
|
+
)
|
|
289
|
+
] });
|
|
290
|
+
return densityProp ? /* @__PURE__ */ jsx(DensityProvider, { density: densityProp, children: portal }) : portal;
|
|
291
|
+
}
|
|
292
|
+
function DrawerHeader({ className, ...props }) {
|
|
293
|
+
const slots = useDrawerSlots();
|
|
294
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "drawer-header", className: slots.header({ className }), ...props });
|
|
295
|
+
}
|
|
296
|
+
function DrawerTitle({ className, ...props }) {
|
|
297
|
+
const slots = useDrawerSlots();
|
|
298
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Title, { "data-slot": "drawer-title", className: slots.title({ className }), ...props });
|
|
299
|
+
}
|
|
300
|
+
function DrawerDescription({
|
|
301
|
+
className,
|
|
302
|
+
...props
|
|
303
|
+
}) {
|
|
304
|
+
const slots = useDrawerSlots();
|
|
305
|
+
return /* @__PURE__ */ jsx(
|
|
306
|
+
DialogPrimitive.Description,
|
|
307
|
+
{
|
|
308
|
+
"data-slot": "drawer-description",
|
|
309
|
+
className: slots.description({ className }),
|
|
310
|
+
...props
|
|
311
|
+
}
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
function DrawerBody({ className, ...props }) {
|
|
315
|
+
const slots = useDrawerSlots();
|
|
316
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "drawer-body", className: slots.body({ className }), ...props });
|
|
317
|
+
}
|
|
318
|
+
function DrawerFooter({ className, ...props }) {
|
|
319
|
+
const slots = useDrawerSlots();
|
|
320
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "drawer-footer", className: slots.footer({ className }), ...props });
|
|
321
|
+
}
|
|
322
|
+
export {
|
|
323
|
+
Drawer,
|
|
324
|
+
DrawerBody,
|
|
325
|
+
DrawerClose,
|
|
326
|
+
DrawerContent,
|
|
327
|
+
DrawerDescription,
|
|
328
|
+
DrawerFooter,
|
|
329
|
+
DrawerHeader,
|
|
330
|
+
DrawerTitle,
|
|
331
|
+
DrawerTrigger,
|
|
332
|
+
drawerVariants
|
|
333
|
+
};
|
|
334
|
+
//# sourceMappingURL=drawer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/drawer/drawer.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { flushSync } from \"react-dom\"\nimport { Dialog as DialogPrimitive, Slot } from \"radix-ui\"\nimport { X } from \"atoms-icons\"\n\nimport { tv } from \"../../../lib/tv.mjs\"\nimport { DensityProvider, useDensity, type Density } from \"../../../lib/density.mjs\"\nimport { Button } from \"../button/index.mjs\"\nimport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n DialogTrigger,\n type DialogProps,\n} from \"../dialog/index.mjs\"\nimport {\n DialogStackProvider,\n useCloseAutoFocus,\n useDialogRootContext,\n useDialogStackLevel,\n} from \"../dialog/dialog.mjs\"\n\nimport { useSwipeToClose } from \"./use-swipe-to-close.mjs\"\n\n/*\n * Like Dialog, enter and exit are transitions (interruptible), held mounted through the exit by a\n * presence-hold that lasts as long as the slide (`--duration-slow`, on the drawer curve).\n */\nexport const drawerVariants = tv({\n slots: {\n overlay: [\n \"inset-0 z-50 bg-black/50\",\n \"transition-opacity duration-slow ease-drawer motion-reduce:transition-none\",\n \"starting:opacity-0\",\n \"data-[state=closed]:pointer-events-none data-[state=closed]:opacity-0\",\n \"data-[state=closed]:[animation:presence-hold_var(--duration-slow)_linear]\",\n \"data-stacked:bg-black/25\",\n ],\n content: [\n \"z-50 flex flex-col overflow-hidden border-border-soft outline-none\",\n \"bg-popover text-popover-foreground shadow-xl [--surface:var(--popover)]\",\n \"transition-[translate] duration-slow ease-drawer motion-reduce:transition-none\",\n \"data-dragging:transition-none data-dragging:select-none\",\n \"data-[state=closed]:pointer-events-none data-[state=closed]:[animation:presence-hold_var(--duration-slow)_linear]\",\n // Leave the title clear of the built-in close button.\n \"[&:has(>[data-slot=drawer-close-button])_[data-slot=drawer-header]]:pe-12\",\n ],\n handle: \"flex shrink-0 justify-center py-2 [[data-swipe]_&]:touch-none\",\n handleBar: \"h-1.5 w-10 rounded-pill bg-border\",\n header: [\n \"flex shrink-0 flex-col gap-1 px-[var(--drawer-inset)] pt-[var(--drawer-inset)] pb-3 text-left\",\n \"[[data-handle]_&]:pt-1 [[data-swipe]_&]:touch-none\",\n ],\n title: \"font-semibold leading-6 tracking-tight text-foreground\",\n description: \"text-sm text-pretty text-muted-foreground\",\n body: [\n \"min-h-0 flex-1 overflow-y-auto overscroll-contain px-[var(--drawer-inset)] py-1 scroll-py-10 scroll-fade\",\n \"[&:not([data-slot=drawer-header]~*)]:pt-[var(--drawer-inset)] [&:not(:has(~[data-slot=drawer-footer]))]:pb-[var(--drawer-inset)]\",\n \"outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-inset\",\n ],\n footer: [\n \"mt-auto flex shrink-0 flex-col-reverse gap-2 px-[var(--drawer-inset)] pt-3 pb-[var(--drawer-inset)]\",\n \"sm:flex-row sm:items-center sm:justify-end\",\n ],\n close: \"absolute [[data-handle]>&]:top-6\",\n },\n variants: {\n side: {\n top: { content: \"inset-x-0 top-0 border-b pt-[env(safe-area-inset-top)] starting:-translate-y-full data-[state=closed]:-translate-y-full\" },\n bottom: { content: \"inset-x-0 bottom-0 border-t pb-[env(safe-area-inset-bottom)] starting:translate-y-full data-[state=closed]:translate-y-full\" },\n left: { content: \"left-0\" },\n right: { content: \"right-0\" },\n },\n size: { sm: {}, md: {}, lg: {}, xl: {} },\n floating: { true: {}, false: {} },\n density: {\n compact: {\n content: \"[--drawer-inset:--spacing(4)]\",\n title: \"text-base\",\n close: \"top-3.5 right-3.5\",\n },\n comfortable: {\n content: \"[--drawer-inset:--spacing(6)]\",\n title: \"text-lg\",\n close: \"top-5.5 right-5.5\",\n },\n },\n contained: {\n true: { overlay: \"absolute\", content: \"absolute\" },\n false: { overlay: \"fixed\", content: \"fixed\" },\n },\n },\n compoundVariants: [\n // Side panels: floating inset from the edges, or docked flush and full height.\n {\n side: [\"left\", \"right\"],\n floating: true,\n class: {\n content: \"inset-y-2 w-[calc(100%-var(--spacing)*4)] rounded-xl border sm:inset-y-3 sm:w-[calc(100%-var(--spacing)*6)]\",\n },\n },\n { side: \"right\", floating: true, class: { content: \"right-2 sm:right-3 starting:translate-x-[calc(100%+var(--spacing)*4)] data-[state=closed]:translate-x-[calc(100%+var(--spacing)*4)]\" } },\n { side: \"left\", floating: true, class: { content: \"left-2 sm:left-3 starting:-translate-x-[calc(100%+var(--spacing)*4)] data-[state=closed]:-translate-x-[calc(100%+var(--spacing)*4)]\" } },\n { side: [\"left\", \"right\"], floating: false, class: { content: \"inset-y-0 w-full\" } },\n { side: \"right\", floating: false, class: { content: \"border-l starting:translate-x-full data-[state=closed]:translate-x-full\" } },\n { side: \"left\", floating: false, class: { content: \"border-r starting:-translate-x-full data-[state=closed]:-translate-x-full\" } },\n // Sheets: always edge to edge; floating rounds the inner corners.\n { side: \"bottom\", floating: true, class: { content: \"rounded-t-2xl\" } },\n { side: \"top\", floating: true, class: { content: \"rounded-b-2xl\" } },\n // Size caps the cross axis: the width of a side panel, the height of a sheet.\n { side: [\"left\", \"right\"], size: \"sm\", class: { content: \"max-w-sm\" } },\n { side: [\"left\", \"right\"], size: \"md\", class: { content: \"max-w-md\" } },\n { side: [\"left\", \"right\"], size: \"lg\", class: { content: \"max-w-lg\" } },\n { side: [\"left\", \"right\"], size: \"xl\", class: { content: \"max-w-xl\" } },\n { side: [\"top\", \"bottom\"], size: \"sm\", class: { content: \"max-h-[40dvh]\" } },\n { side: [\"top\", \"bottom\"], size: \"md\", class: { content: \"max-h-[60dvh]\" } },\n { side: [\"top\", \"bottom\"], size: \"lg\", class: { content: \"max-h-[80dvh]\" } },\n { side: [\"top\", \"bottom\"], size: \"xl\", class: { content: \"max-h-[92dvh]\" } },\n ],\n defaultVariants: {\n side: \"right\",\n size: \"md\",\n floating: true,\n density: \"compact\",\n contained: false,\n },\n})\n\ntype DrawerSlots = ReturnType<typeof drawerVariants>\n\nexport type DrawerSide = \"top\" | \"right\" | \"bottom\" | \"left\"\n\nexport type DrawerConfirmClose =\n | boolean\n | {\n title?: React.ReactNode\n description?: React.ReactNode\n confirmLabel?: React.ReactNode\n cancelLabel?: React.ReactNode\n }\n\ninterface DrawerContextValue {\n slots: DrawerSlots\n guarded: boolean\n requestClose: () => void\n}\n\nconst DrawerContext = React.createContext<DrawerContextValue | null>(null)\nDrawerContext.displayName = \"DrawerContext\"\n\nconst defaultSlots = drawerVariants()\nfunction useDrawerSlots() {\n return React.useContext(DrawerContext)?.slots ?? defaultSlots\n}\n\n/* ─── Root ────────────────────────────────────────────────────────────────── */\n\nexport type DrawerProps = DialogProps\n\nexport function Drawer(props: DrawerProps) {\n return <Dialog {...props} />\n}\n\nexport function DrawerTrigger(props: React.ComponentProps<typeof DialogTrigger>) {\n return <DialogTrigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nexport interface DrawerCloseProps extends React.ComponentProps<typeof DialogPrimitive.Close> {\n skipConfirm?: boolean\n}\n\nexport function DrawerClose({ skipConfirm = false, asChild = false, onClick, ...props }: DrawerCloseProps) {\n const drawer = React.useContext(DrawerContext)\n if (drawer?.guarded && !skipConfirm) {\n const Comp: React.ElementType = asChild ? Slot.Root : \"button\"\n return (\n <Comp\n data-slot=\"drawer-close\"\n type={asChild ? undefined : \"button\"}\n {...props}\n onClick={(event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event)\n if (!event.defaultPrevented) drawer.requestClose()\n }}\n />\n )\n }\n return <DialogPrimitive.Close data-slot=\"drawer-close\" asChild={asChild} onClick={onClick} {...props} />\n}\n\n/* ─── Content ─────────────────────────────────────────────────────────────── */\n\nexport interface DrawerContentProps extends React.ComponentProps<typeof DialogPrimitive.Content> {\n side?: DrawerSide\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\"\n density?: Density\n swipeToClose?: boolean\n floating?: boolean\n confirmClose?: DrawerConfirmClose\n showHandle?: boolean\n showClose?: boolean\n closeLabel?: string\n container?: HTMLElement | null\n}\n\nexport function DrawerContent({\n side = \"right\",\n size = \"md\",\n density: densityProp,\n swipeToClose = true,\n floating = true,\n confirmClose = false,\n showHandle = true,\n showClose = true,\n closeLabel = \"Close\",\n container,\n forceMount,\n className,\n children,\n onCloseAutoFocus,\n onEscapeKeyDown,\n onInteractOutside,\n onPointerDown,\n ...props\n}: DrawerContentProps) {\n const density = useDensity(densityProp)\n const slots = drawerVariants({ side, size, density, floating, contained: Boolean(container) })\n const root = useDialogRootContext()\n const stack = useDialogStackLevel(root?.open ?? false)\n const handleCloseAutoFocus = useCloseAutoFocus(onCloseAutoFocus)\n\n const guarded = confirmClose !== false\n const [confirming, setConfirming] = React.useState(false)\n const setOpen = root?.setOpen\n const close = React.useCallback(() => setOpen?.(false), [setOpen])\n const requestClose = React.useCallback(() => {\n if (guarded) setConfirming(true)\n else close()\n }, [guarded, close, setConfirming])\n\n const swipePointerDown = useSwipeToClose({\n side,\n enabled: swipeToClose && Boolean(setOpen),\n onSwipeClose: (release) => {\n if (guarded) {\n release()\n setConfirming(true)\n return\n }\n // Commit the closed state first, then hand the panel back, so the exit runs from the finger.\n flushSync(close)\n release()\n },\n })\n\n const sheet = side === \"top\" || side === \"bottom\"\n const withHandle = sheet && showHandle\n const handle = withHandle ? (\n <div data-slot=\"drawer-handle\" aria-hidden className={slots.handle()}>\n <span className={slots.handleBar()} />\n </div>\n ) : null\n\n const drawerContext = React.useMemo(() => ({ slots, guarded, requestClose }), [slots, guarded, requestClose])\n const copy = typeof confirmClose === \"object\" ? confirmClose : {}\n\n const closeButton = (\n <Button\n data-slot=\"drawer-close-button\"\n variant=\"ghost\"\n size=\"xs\"\n iconOnly\n tooltip={false}\n aria-label={closeLabel}\n className={slots.close()}\n onClick={guarded ? requestClose : undefined}\n >\n <X aria-hidden />\n </Button>\n )\n\n const portal = (\n <DialogPrimitive.Portal container={container ?? undefined} forceMount={forceMount}>\n <DialogPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n data-stacked={stack.depth > 0 ? \"\" : undefined}\n forceMount={forceMount}\n className={slots.overlay()}\n />\n <DialogPrimitive.Content\n data-slot=\"drawer-content\"\n data-side={side}\n data-handle={withHandle ? \"\" : undefined}\n data-swipe={swipeToClose ? \"\" : undefined}\n forceMount={forceMount}\n className={slots.content({ className })}\n onCloseAutoFocus={handleCloseAutoFocus}\n onEscapeKeyDown={(event) => {\n onEscapeKeyDown?.(event)\n if (event.defaultPrevented || !guarded) return\n event.preventDefault()\n setConfirming(true)\n }}\n onInteractOutside={(event) => {\n onInteractOutside?.(event)\n if (event.defaultPrevented || !guarded) return\n event.preventDefault()\n setConfirming(true)\n }}\n onPointerDown={(event) => {\n onPointerDown?.(event)\n if (!event.defaultPrevented) swipePointerDown(event)\n }}\n {...props}\n >\n {side !== \"top\" ? handle : null}\n <DrawerContext.Provider value={drawerContext}>\n <DialogStackProvider value={stack.value}>\n {children}\n {guarded ? (\n <Dialog open={confirming} onOpenChange={setConfirming}>\n <DialogContent size=\"sm\" showClose={false}>\n <DialogHeader>\n <DialogTitle>{copy.title ?? \"Discard changes?\"}</DialogTitle>\n <DialogDescription>{copy.description ?? \"Your edits will be lost.\"}</DialogDescription>\n </DialogHeader>\n <DialogFooter>\n <DialogClose asChild>\n <Button variant=\"ghost\">{copy.cancelLabel ?? \"Keep editing\"}</Button>\n </DialogClose>\n <Button\n variant=\"destructive\"\n onClick={() => {\n setConfirming(false)\n close()\n }}\n >\n {copy.confirmLabel ?? \"Discard\"}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n ) : null}\n </DialogStackProvider>\n </DrawerContext.Provider>\n {side === \"top\" ? handle : null}\n {showClose ? guarded ? closeButton : <DialogPrimitive.Close asChild>{closeButton}</DialogPrimitive.Close> : null}\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n )\n\n // Re-provide an explicit density so Buttons and fields inside follow the drawer, not the page.\n return densityProp ? <DensityProvider density={densityProp}>{portal}</DensityProvider> : portal\n}\n\n/* ─── Parts ───────────────────────────────────────────────────────────────── */\n\nexport function DrawerHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n const slots = useDrawerSlots()\n return <div data-slot=\"drawer-header\" className={slots.header({ className })} {...props} />\n}\n\nexport function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n const slots = useDrawerSlots()\n return <DialogPrimitive.Title data-slot=\"drawer-title\" className={slots.title({ className })} {...props} />\n}\n\nexport function DrawerDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n const slots = useDrawerSlots()\n return (\n <DialogPrimitive.Description\n data-slot=\"drawer-description\"\n className={slots.description({ className })}\n {...props}\n />\n )\n}\n\nexport function DrawerBody({ className, ...props }: React.ComponentProps<\"div\">) {\n const slots = useDrawerSlots()\n return <div data-slot=\"drawer-body\" className={slots.body({ className })} {...props} />\n}\n\nexport function DrawerFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n const slots = useDrawerSlots()\n return <div data-slot=\"drawer-footer\" className={slots.footer({ className })} {...props} />\n}\n"],"mappings":";AAsKS,cAkKS,YAlKT;AApKT,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAC1B,SAAS,UAAU,iBAAiB,YAAY;AAChD,SAAS,SAAS;AAElB,SAAS,UAAU;AACnB,SAAS,iBAAiB,kBAAgC;AAC1D,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,uBAAuB;AAMzB,MAAM,iBAAiB,GAAG;AAAA,EAC/B,OAAO;AAAA,IACL,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,MAEA;AAAA,IACF;AAAA,IACA,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,QAAQ;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,IACA,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA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AAG,MAAM,GAAgC;AACjF,QAAM,QAAQ,eAAe;AAC7B,SAAO,oBAAC,SAAI,aAAU,iBAAgB,WAAW,MAAM,OAAO,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAC3F;","names":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Drawer,
|
|
3
|
+
DrawerTrigger,
|
|
4
|
+
DrawerClose,
|
|
5
|
+
DrawerContent,
|
|
6
|
+
DrawerHeader,
|
|
7
|
+
DrawerBody,
|
|
8
|
+
DrawerFooter,
|
|
9
|
+
DrawerTitle,
|
|
10
|
+
DrawerDescription,
|
|
11
|
+
drawerVariants
|
|
12
|
+
} from "./drawer.mjs";
|
|
13
|
+
import {
|
|
14
|
+
DrawerNav,
|
|
15
|
+
DrawerView,
|
|
16
|
+
DrawerNavTrigger,
|
|
17
|
+
DrawerNavBack,
|
|
18
|
+
useDrawerNav
|
|
19
|
+
} from "./drawer-nav.mjs";
|
|
20
|
+
export {
|
|
21
|
+
Drawer,
|
|
22
|
+
DrawerBody,
|
|
23
|
+
DrawerClose,
|
|
24
|
+
DrawerContent,
|
|
25
|
+
DrawerDescription,
|
|
26
|
+
DrawerFooter,
|
|
27
|
+
DrawerHeader,
|
|
28
|
+
DrawerNav,
|
|
29
|
+
DrawerNavBack,
|
|
30
|
+
DrawerNavTrigger,
|
|
31
|
+
DrawerTitle,
|
|
32
|
+
DrawerTrigger,
|
|
33
|
+
DrawerView,
|
|
34
|
+
drawerVariants,
|
|
35
|
+
useDrawerNav
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/drawer/index.ts"],"sourcesContent":["export {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerBody,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n drawerVariants,\n type DrawerProps,\n type DrawerSide,\n type DrawerContentProps,\n type DrawerCloseProps,\n type DrawerConfirmClose,\n} from \"./drawer.mjs\"\nexport {\n DrawerNav,\n DrawerView,\n DrawerNavTrigger,\n DrawerNavBack,\n useDrawerNav,\n type DrawerNavProps,\n type DrawerViewProps,\n type DrawerNavTriggerProps,\n type DrawerNavBackProps,\n} from \"./drawer-nav.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,OAMK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;","names":[]}
|