@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/notebook-page/notebook-page.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"radix-ui\"\nimport type { VariantProps } from \"tailwind-variants\"\n\nimport { tv } from \"../../../lib/tv.mjs\"\nimport { cn } from \"../../../lib/utils.mjs\"\n\n/*\n * Notebook paper behind what someone writes. One length, `--notebook-line`, is the line height of\n * everything inside and the period of the printed pattern, so a line of text always rests on a\n * rule. The pattern is a local background that starts at the content box's first line (padding\n * never knocks it off the text) and still paints through the padding.\n *\n * The margin red and the spiral's rings are the `--notebook-*` tokens in atoms.css, declared on\n * the parts so they re-theme with the page.\n */\nexport const notebookPageVariants = tv({\n slots: {\n page: [\n \"relative text-foreground bg-local\",\n \"[background-image:var(--notebook-margin-image),var(--notebook-pattern)]\",\n \"[background-size:100%_100%,var(--notebook-tile)]\",\n \"[background-position:0_0,var(--notebook-offset)]\",\n \"[background-origin:border-box,var(--notebook-origin)]\",\n \"min-h-[calc(var(--notebook-rows,0)*var(--notebook-line))]\",\n ],\n field: [\n \"block w-full min-w-0 resize-none appearance-none rounded-none border-0 bg-transparent p-0 shadow-none\",\n \"text-inherit leading-(--notebook-line) outline-none caret-foreground placeholder:text-placeholder\",\n \"disabled:cursor-not-allowed disabled:opacity-50 [input&]:h-(--notebook-line) autofill-clear\",\n ],\n title: [\n \"block h-(--notebook-line) w-full min-w-0 truncate rounded-none border-0 bg-transparent p-0\",\n \"text-[1.375em]/(--notebook-line) font-semibold text-foreground outline-none caret-foreground\",\n \"placeholder:font-normal placeholder:text-placeholder autofill-clear\",\n ],\n binding:\n \"flex items-center gap-2 px-3 pt-2 pb-1.5 [background-image:linear-gradient(to_bottom,var(--notebook-binding-shade),transparent)]\",\n bindingEdge: \"flex shrink-0 items-center gap-1.5 text-muted-foreground\",\n rings: \"flex min-w-0 flex-1 items-center\",\n ring: \"size-2 shrink-0 rounded-full bg-(--notebook-ring) shadow-[inset_0_1px_0_var(--notebook-ring-highlight),0_1px_0_var(--notebook-ring-shadow)]\",\n },\n variants: {\n size: {\n sm: { page: \"text-sm/(--notebook-line) [--notebook-line:--spacing(6)]\" },\n md: { page: \"text-base/(--notebook-line) [--notebook-line:--spacing(7)]\" },\n lg: { page: \"text-lg/(--notebook-line) [--notebook-line:--spacing(8)]\" },\n },\n lines: {\n ruled: {\n page: [\n \"[--notebook-pattern:linear-gradient(to_bottom,transparent_calc(var(--notebook-line)_-_1px),var(--border-soft)_calc(var(--notebook-line)_-_1px))]\",\n \"[--notebook-tile:100%_var(--notebook-line)] [--notebook-offset:0_0] [--notebook-origin:content-box]\",\n ],\n },\n // A dot on every line's foot at every line-width step: the bullet journal's grid.\n dotted: {\n page: [\n \"[--notebook-pattern:radial-gradient(circle_at_center,var(--muted-foreground)_0.5px,transparent_1px)]\",\n \"[--notebook-tile:var(--notebook-line)_var(--notebook-line)]\",\n \"[--notebook-offset:calc(var(--notebook-line)/-2)_calc(var(--notebook-line)/2)] [--notebook-origin:content-box]\",\n ],\n },\n grid: {\n page: [\n \"[--notebook-pattern:linear-gradient(to_bottom,transparent_calc(var(--notebook-line)_-_1px),var(--border-soft)_calc(var(--notebook-line)_-_1px)),linear-gradient(to_right,transparent_calc(var(--notebook-line)_-_1px),var(--border-soft)_calc(var(--notebook-line)_-_1px))]\",\n \"[--notebook-tile:var(--notebook-line)_var(--notebook-line),var(--notebook-line)_var(--notebook-line)]\",\n \"[--notebook-offset:0_0,0_0] [--notebook-origin:content-box,content-box]\",\n ],\n },\n plain: {\n page: \"[--notebook-pattern:none] [--notebook-tile:100%_var(--notebook-line)] [--notebook-offset:0_0] [--notebook-origin:content-box]\",\n },\n },\n margin: {\n none: { page: \"[--notebook-margin-image:none]\" },\n // The school notebook's red rule, 1.5 lines in; the writing starts a quarter line past it.\n // The inset is a data variant so it outranks a plain px-* on the page.\n left: {\n page: [\n \"[--notebook-margin-x:calc(var(--notebook-line)*1.5)]\",\n \"[--notebook-margin-image:linear-gradient(to_right,transparent_var(--notebook-margin-x),var(--notebook-margin)_var(--notebook-margin-x),var(--notebook-margin)_calc(var(--notebook-margin-x)_+_1px),transparent_calc(var(--notebook-margin-x)_+_1px))]\",\n \"data-[margin=left]:pl-[calc(var(--notebook-margin-x)+var(--notebook-line)/4)]\",\n ],\n },\n },\n focusTint: {\n true: {\n field: \"transition-[background-color] duration-fast ease-out focus-visible:bg-foreground/5\",\n title: \"transition-[background-color] duration-fast ease-out focus-visible:bg-foreground/5\",\n },\n },\n fill: {\n // As many whole rings as fit, spread evenly by background-repeat: space. Nothing is measured.\n true: {\n rings: [\n \"h-2.5\",\n \"[background-image:radial-gradient(circle_at_50%_35%,var(--notebook-ring-highlight)_0.5px,transparent_1.5px),radial-gradient(circle_at_50%_50%,var(--notebook-ring)_3.5px,var(--notebook-ring-shadow)_4px,transparent_4.5px)]\",\n \"[background-size:0.9375rem_100%] [background-repeat:space_no-repeat] [background-position:center]\",\n ],\n },\n false: { rings: \"justify-center gap-[0.4375rem]\" },\n },\n },\n defaultVariants: {\n size: \"md\",\n lines: \"ruled\",\n margin: \"none\",\n focusTint: false,\n fill: true,\n },\n})\n\ntype NotebookVariants = VariantProps<typeof notebookPageVariants>\nexport type NotebookPageSize = NonNullable<NotebookVariants[\"size\"]>\nexport type NotebookPageLines = NonNullable<NotebookVariants[\"lines\"]>\n\nexport interface NotebookPageProps extends React.ComponentProps<\"div\"> {\n /** The pattern: hairline rules, a dot grid, squared paper, or nothing on the same rhythm. */\n lines?: NotebookPageLines\n /** The line (24, 28 or 32px) and the type size that reads well on it. */\n size?: NotebookPageSize\n /** `left` prints the red margin rule and insets the writing past it. */\n margin?: \"none\" | \"left\"\n /** The minimum height in lines, empty or not. Unset, the page hugs its content. */\n rows?: number\n /** Puts the paper onto the child element (an article, a section). */\n asChild?: boolean\n}\n\nexport function NotebookPage({\n lines = \"ruled\",\n size = \"md\",\n margin = \"none\",\n rows,\n asChild = false,\n className,\n style,\n ...props\n}: NotebookPageProps) {\n const Comp = asChild ? Slot.Root : \"div\"\n return (\n <Comp\n data-slot=\"notebook-page\"\n data-lines={lines}\n data-margin={margin}\n style={rows === undefined ? style : ({ \"--notebook-rows\": rows, ...style } as React.CSSProperties)}\n className={notebookPageVariants({ lines, size, margin }).page({ className })}\n {...props}\n />\n )\n}\n\nexport interface NotebookPageFieldProps extends React.ComponentProps<\"textarea\"> {\n /** A faint ink wash while focused, for a page that holds several fields. */\n focusTint?: boolean\n /** Styles the child field instead (an input, a third-party textarea). */\n asChild?: boolean\n}\n\n/** A textarea written straight on the rules: no frame, no fill, the caret as the focus cue. */\nexport function NotebookPageField({ focusTint = false, asChild = false, className, ...props }: NotebookPageFieldProps) {\n const Comp = asChild ? Slot.Root : \"textarea\"\n return (\n <Comp\n data-slot=\"notebook-page-field\"\n className={notebookPageVariants({ focusTint }).field({ className })}\n {...(props as React.ComponentProps<\"textarea\">)}\n />\n )\n}\n\nexport interface NotebookPageTitleProps extends React.ComponentProps<\"input\"> {\n /** A faint ink wash while focused, as on the field. */\n focusTint?: boolean\n /** Puts the title style onto the child (a heading, for a page that is read). */\n asChild?: boolean\n}\n\n/** The title line: larger and bolder, still exactly one rule tall. */\nexport function NotebookPageTitle({\n focusTint = false,\n asChild = false,\n type = \"text\",\n className,\n ...props\n}: NotebookPageTitleProps) {\n const cls = notebookPageVariants({ focusTint }).title({ className })\n if (asChild) return <Slot.Root data-slot=\"notebook-page-title\" className={cls} {...(props as React.ComponentProps<\"div\">)} />\n return <input data-slot=\"notebook-page-title\" type={type} className={cls} {...props} />\n}\n\nexport interface NotebookBindingProps extends React.ComponentProps<\"div\"> {\n /** How many rings. Unset, the strip fills with as many whole rings as fit its width. */\n rings?: number\n /** A control or hint at the leading end (a close button). */\n start?: React.ReactNode\n /** A control or hint at the trailing end (a shortcut, a \"Saved\" status). */\n end?: React.ReactNode\n}\n\n/** The spiral along the top of a pocket notebook. Put it above the page, inside the frame. */\nexport function NotebookBinding({ rings, start, end, className, children, ...props }: NotebookBindingProps) {\n const fill = rings === undefined\n const slots = notebookPageVariants({ fill })\n return (\n <div data-slot=\"notebook-binding\" className={slots.binding({ className })} {...props}>\n {start != null && (\n <div data-slot=\"notebook-binding-start\" className={slots.bindingEdge()}>\n {start}\n </div>\n )}\n <div data-slot=\"notebook-binding-rings\" data-fill={fill || undefined} aria-hidden className={slots.rings()}>\n {!fill && Array.from({ length: Math.max(0, rings) }, (_, i) => <span key={i} className={slots.ring()} />)}\n </div>\n {children}\n {end != null && (\n <div data-slot=\"notebook-binding-end\" className={cn(slots.bindingEdge())}>\n {end}\n </div>\n )}\n </div>\n )\n}\n"],"mappings":"AA8II,cAgEA,YAhEA;AA7IJ,SAAS,YAAY;AAGrB,SAAS,UAAU;AACnB,SAAS,UAAU;AAWZ,MAAM,uBAAuB,GAAG;AAAA,EACrC,OAAO;AAAA,IACL,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,SACE;AAAA,IACF,aAAa;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,EACR;AAAA,EACA,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI,EAAE,MAAM,2DAA2D;AAAA,MACvE,IAAI,EAAE,MAAM,6DAA6D;AAAA,MACzE,IAAI,EAAE,MAAM,2DAA2D;AAAA,IACzE;AAAA,IACA,OAAO;AAAA,MACL,OAAO;AAAA,QACL,MAAM;AAAA,UACJ;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA;AAAA,MAEA,QAAQ;AAAA,QACN,MAAM;AAAA,UACJ;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,MACA,MAAM;AAAA,QACJ,MAAM;AAAA,UACJ;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,MACA,OAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,QAAQ;AAAA,MACN,MAAM,EAAE,MAAM,iCAAiC;AAAA;AAAA;AAAA,MAG/C,MAAM;AAAA,QACJ,MAAM;AAAA,UACJ;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,WAAW;AAAA,MACT,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,qBAAqB,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC;AACnE,MAAI,QAAS,QAAO,oBAAC,KAAK,MAAL,EAAU,aAAU,uBAAsB,WAAW,KAAM,GAAI,OAAuC;AAC3H,SAAO,oBAAC,WAAM,aAAU,uBAAsB,MAAY,WAAW,KAAM,GAAG,OAAO;AACvF;AAYO,SAAS,gBAAgB,EAAE,OAAO,OAAO,KAAK,WAAW,UAAU,GAAG,MAAM,GAAyB;AAC1G,QAAM,OAAO,UAAU;AACvB,QAAM,QAAQ,qBAAqB,EAAE,KAAK,CAAC;AAC3C,SACE,qBAAC,SAAI,aAAU,oBAAmB,WAAW,MAAM,QAAQ,EAAE,UAAU,CAAC,GAAI,GAAG,OAC5E;AAAA,aAAS,QACR,oBAAC,SAAI,aAAU,0BAAyB,WAAW,MAAM,YAAY,GAClE,iBACH;AAAA,IAEF,oBAAC,SAAI,aAAU,0BAAyB,aAAW,QAAQ,QAAW,eAAW,MAAC,WAAW,MAAM,MAAM,GACtG,WAAC,QAAQ,MAAM,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,KAAK,EAAE,GAAG,CAAC,GAAG,MAAM,oBAAC,UAAa,WAAW,MAAM,KAAK,KAAzB,CAA4B,CAAE,GAC1G;AAAA,IACC;AAAA,IACA,OAAO,QACN,oBAAC,SAAI,aAAU,wBAAuB,WAAW,GAAG,MAAM,YAAY,CAAC,GACpE,eACH;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NotificationInbox,
|
|
3
|
+
NotificationInboxList,
|
|
4
|
+
NotificationInboxBar,
|
|
5
|
+
NotificationInboxScroll,
|
|
6
|
+
NotificationInboxGroup,
|
|
7
|
+
NotificationInboxItem,
|
|
8
|
+
NotificationInboxItemMedia,
|
|
9
|
+
NotificationInboxItemContent,
|
|
10
|
+
NotificationInboxItemTitle,
|
|
11
|
+
NotificationInboxItemDescription,
|
|
12
|
+
NotificationInboxItemMeta,
|
|
13
|
+
NotificationInboxDetail,
|
|
14
|
+
NotificationInboxClose,
|
|
15
|
+
NotificationInboxPager,
|
|
16
|
+
NotificationInboxContent,
|
|
17
|
+
NotificationInboxFields,
|
|
18
|
+
NotificationInboxTitle,
|
|
19
|
+
NotificationInboxBody,
|
|
20
|
+
NotificationInboxActions,
|
|
21
|
+
notificationInboxVariants,
|
|
22
|
+
useNotificationInbox
|
|
23
|
+
} from "./notification-inbox.mjs";
|
|
24
|
+
export {
|
|
25
|
+
NotificationInbox,
|
|
26
|
+
NotificationInboxActions,
|
|
27
|
+
NotificationInboxBar,
|
|
28
|
+
NotificationInboxBody,
|
|
29
|
+
NotificationInboxClose,
|
|
30
|
+
NotificationInboxContent,
|
|
31
|
+
NotificationInboxDetail,
|
|
32
|
+
NotificationInboxFields,
|
|
33
|
+
NotificationInboxGroup,
|
|
34
|
+
NotificationInboxItem,
|
|
35
|
+
NotificationInboxItemContent,
|
|
36
|
+
NotificationInboxItemDescription,
|
|
37
|
+
NotificationInboxItemMedia,
|
|
38
|
+
NotificationInboxItemMeta,
|
|
39
|
+
NotificationInboxItemTitle,
|
|
40
|
+
NotificationInboxList,
|
|
41
|
+
NotificationInboxPager,
|
|
42
|
+
NotificationInboxScroll,
|
|
43
|
+
NotificationInboxTitle,
|
|
44
|
+
notificationInboxVariants,
|
|
45
|
+
useNotificationInbox
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/notification-inbox/index.ts"],"sourcesContent":["export {\n NotificationInbox,\n NotificationInboxList,\n NotificationInboxBar,\n NotificationInboxScroll,\n NotificationInboxGroup,\n NotificationInboxItem,\n NotificationInboxItemMedia,\n NotificationInboxItemContent,\n NotificationInboxItemTitle,\n NotificationInboxItemDescription,\n NotificationInboxItemMeta,\n NotificationInboxDetail,\n NotificationInboxClose,\n NotificationInboxPager,\n NotificationInboxContent,\n NotificationInboxFields,\n NotificationInboxTitle,\n NotificationInboxBody,\n NotificationInboxActions,\n notificationInboxVariants,\n useNotificationInbox,\n type NotificationInboxProps,\n type NotificationInboxGroupProps,\n type NotificationInboxItemProps,\n type NotificationInboxItemDescriptionProps,\n} from \"./notification-inbox.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,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAKK;","names":[]}
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { ArrowLeft, CaretDown, CaretUp, X } from "atoms-icons";
|
|
5
|
+
import { Button } from "../button/index.mjs";
|
|
6
|
+
import { DescriptionList } from "../description-list/index.mjs";
|
|
7
|
+
import { useControllableState } from "../input/use-controllable-state.mjs";
|
|
8
|
+
import { ListItemIndicator } from "../list/index.mjs";
|
|
9
|
+
import { createContext } from "../../../lib/create-context.mjs";
|
|
10
|
+
import { useRovingFocus } from "../../../lib/roving-focus.mjs";
|
|
11
|
+
import { tv } from "../../../lib/tv.mjs";
|
|
12
|
+
const notificationInboxVariants = tv({
|
|
13
|
+
slots: {
|
|
14
|
+
root: [
|
|
15
|
+
"group/notification-inbox @container/notification-inbox relative flex min-h-0 w-full min-w-0 flex-col overflow-hidden text-sm text-foreground bg-background",
|
|
16
|
+
"[--notification-inbox-stagger:calc(var(--duration-fast)/3)]"
|
|
17
|
+
],
|
|
18
|
+
frame: [
|
|
19
|
+
"relative grid min-h-0 flex-1 grid-cols-[minmax(0,1fr)_0px] motion-reduce-fade",
|
|
20
|
+
"@min-[40rem]/notification-inbox:transition-[grid-template-columns] @min-[40rem]/notification-inbox:duration-slow @min-[40rem]/notification-inbox:ease-drawer",
|
|
21
|
+
"@min-[40rem]/notification-inbox:group-data-open/notification-inbox:grid-cols-[minmax(0,1fr)_calc(100cqw-var(--notification-inbox-list))]",
|
|
22
|
+
"@max-[40rem]/notification-inbox:grid-cols-1"
|
|
23
|
+
],
|
|
24
|
+
list: [
|
|
25
|
+
"flex min-h-0 min-w-0 flex-col",
|
|
26
|
+
"@max-[40rem]/notification-inbox:group-data-open/notification-inbox:invisible @max-[40rem]/notification-inbox:group-data-open/notification-inbox:transition-[visibility] @max-[40rem]/notification-inbox:group-data-open/notification-inbox:duration-slow"
|
|
27
|
+
],
|
|
28
|
+
bar: "flex h-12 shrink-0 items-center gap-2 border-b border-edge px-3",
|
|
29
|
+
scroll: "min-h-0 flex-1 overflow-y-auto overscroll-contain",
|
|
30
|
+
group: "p-2 [&+&]:pt-0",
|
|
31
|
+
groupLabel: "px-2 pt-1 pb-1.5 text-xs font-medium text-muted-foreground",
|
|
32
|
+
item: [
|
|
33
|
+
"relative flex w-full cursor-pointer items-start gap-3 rounded-md px-2 py-2.5 text-left",
|
|
34
|
+
"transition-[background-color,box-shadow] duration-fast ease-out",
|
|
35
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus"
|
|
36
|
+
],
|
|
37
|
+
itemMedia: "flex shrink-0 items-center justify-center text-muted-foreground [&>svg]:size-5",
|
|
38
|
+
itemContent: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
39
|
+
itemTitle: "truncate text-sm text-foreground",
|
|
40
|
+
itemDescription: "text-xs text-muted-foreground [:where(&)]:text-pretty",
|
|
41
|
+
itemMeta: [
|
|
42
|
+
"ml-auto flex h-10 w-14 shrink-0 flex-col items-end justify-start gap-0 self-start text-xs tabular-nums text-muted-foreground",
|
|
43
|
+
"[&>*]:flex [&>*]:h-5 [&>*]:items-center [&>svg]:size-4"
|
|
44
|
+
],
|
|
45
|
+
detail: [
|
|
46
|
+
"flex min-h-0 min-w-0 flex-col bg-[var(--surface,var(--background))] outline-none",
|
|
47
|
+
"@min-[40rem]/notification-inbox:w-[calc(100cqw-var(--notification-inbox-list))] @min-[40rem]/notification-inbox:border-l @min-[40rem]/notification-inbox:border-edge",
|
|
48
|
+
"@min-[40rem]/notification-inbox:data-[state=closed]:invisible @min-[40rem]/notification-inbox:data-[state=closed]:transition-[visibility] @min-[40rem]/notification-inbox:data-[state=closed]:duration-slow",
|
|
49
|
+
"@max-[40rem]/notification-inbox:absolute @max-[40rem]/notification-inbox:inset-0 @max-[40rem]/notification-inbox:z-10",
|
|
50
|
+
"@max-[40rem]/notification-inbox:transition-[translate,visibility] @max-[40rem]/notification-inbox:duration-slow @max-[40rem]/notification-inbox:ease-drawer",
|
|
51
|
+
"@max-[40rem]/notification-inbox:data-[state=closed]:invisible @max-[40rem]/notification-inbox:data-[state=closed]:translate-x-full",
|
|
52
|
+
"motion-reduce:transition-[opacity,visibility] motion-reduce:duration-fast motion-reduce:data-[state=closed]:opacity-0",
|
|
53
|
+
"@max-[40rem]/notification-inbox:motion-reduce:data-[state=closed]:translate-x-0"
|
|
54
|
+
],
|
|
55
|
+
close: "@min-[40rem]/notification-inbox:order-last",
|
|
56
|
+
pager: "ml-auto flex items-center gap-0.5",
|
|
57
|
+
pagerText: "px-1.5 text-xs tabular-nums text-muted-foreground",
|
|
58
|
+
content: "flex min-h-0 flex-1 flex-col gap-5 overflow-y-auto overscroll-contain p-5",
|
|
59
|
+
fields: "flex-row flex-wrap gap-x-8 gap-y-4 *:py-0",
|
|
60
|
+
title: "text-lg/7 font-semibold tracking-tight text-balance",
|
|
61
|
+
body: "flex max-w-prose flex-col gap-3 text-sm text-pretty text-body",
|
|
62
|
+
actions: "flex flex-wrap items-center gap-2",
|
|
63
|
+
stagger: "animate-stagger-in motion-reduce:animate-none data-[stagger-done]:animate-none"
|
|
64
|
+
},
|
|
65
|
+
variants: {
|
|
66
|
+
selected: {
|
|
67
|
+
true: {
|
|
68
|
+
item: "bg-card shadow-sm hover:bg-card active:bg-card dark:bg-popover dark:shadow-xs dark:ring-1 dark:ring-edge dark:ring-inset dark:hover:bg-popover dark:active:bg-popover"
|
|
69
|
+
},
|
|
70
|
+
false: { item: "hover:bg-row-hover active:bg-row-hover" }
|
|
71
|
+
},
|
|
72
|
+
unread: {
|
|
73
|
+
true: { itemTitle: "font-medium" },
|
|
74
|
+
false: { itemTitle: "font-normal" }
|
|
75
|
+
},
|
|
76
|
+
lines: {
|
|
77
|
+
1: { itemDescription: "truncate" },
|
|
78
|
+
2: { itemDescription: "line-clamp-2" },
|
|
79
|
+
3: { itemDescription: "line-clamp-3" },
|
|
80
|
+
none: { itemDescription: "" }
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
defaultVariants: { selected: false, unread: false, lines: 1 }
|
|
84
|
+
});
|
|
85
|
+
const slots = notificationInboxVariants();
|
|
86
|
+
const [InboxProvider, useInbox] = createContext("NotificationInbox");
|
|
87
|
+
const [ItemProvider, useItem] = createContext("NotificationInboxItem");
|
|
88
|
+
function useNotificationInbox() {
|
|
89
|
+
const { value, shown, open, close } = useInbox("useNotificationInbox");
|
|
90
|
+
return { value, shown, open, close };
|
|
91
|
+
}
|
|
92
|
+
const ROW = "[data-notification-value]";
|
|
93
|
+
const rowSelector = (value) => `[data-notification-value="${CSS.escape(value)}"]`;
|
|
94
|
+
function NotificationInbox({
|
|
95
|
+
value: valueProp,
|
|
96
|
+
defaultValue = null,
|
|
97
|
+
onValueChange,
|
|
98
|
+
listWidth = "22rem",
|
|
99
|
+
className,
|
|
100
|
+
style,
|
|
101
|
+
children,
|
|
102
|
+
...props
|
|
103
|
+
}) {
|
|
104
|
+
const [value, setValue] = useControllableState({
|
|
105
|
+
prop: valueProp,
|
|
106
|
+
defaultProp: defaultValue,
|
|
107
|
+
onChange: onValueChange
|
|
108
|
+
});
|
|
109
|
+
const [shown, setShown] = React.useState(value);
|
|
110
|
+
if (value !== null && value !== shown) setShown(value);
|
|
111
|
+
const rootRef = React.useRef(null);
|
|
112
|
+
const listRef = React.useRef(null);
|
|
113
|
+
const detailRef = React.useRef(null);
|
|
114
|
+
const pending = React.useRef(null);
|
|
115
|
+
const isNarrow = React.useCallback(() => {
|
|
116
|
+
const root = rootRef.current;
|
|
117
|
+
if (!root) return false;
|
|
118
|
+
const rem = Number.parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
|
|
119
|
+
return root.getBoundingClientRect().width < 40 * rem;
|
|
120
|
+
}, []);
|
|
121
|
+
const open = React.useCallback(
|
|
122
|
+
(next, options) => {
|
|
123
|
+
pending.current = options?.focusDetail ? { to: "detail" } : null;
|
|
124
|
+
setValue(next);
|
|
125
|
+
},
|
|
126
|
+
[setValue]
|
|
127
|
+
);
|
|
128
|
+
const close = React.useCallback(
|
|
129
|
+
(options) => {
|
|
130
|
+
if (value === null) return;
|
|
131
|
+
pending.current = options?.returnFocus === false ? null : { to: "row", value };
|
|
132
|
+
setValue(null);
|
|
133
|
+
},
|
|
134
|
+
[setValue, value]
|
|
135
|
+
);
|
|
136
|
+
React.useEffect(() => {
|
|
137
|
+
const move = pending.current;
|
|
138
|
+
pending.current = null;
|
|
139
|
+
if (!move) return;
|
|
140
|
+
if (move.to === "detail" && value !== null) detailRef.current?.focus({ preventScroll: true });
|
|
141
|
+
if (move.to === "row" && value === null) listRef.current?.querySelector(rowSelector(move.value))?.focus();
|
|
142
|
+
}, [value]);
|
|
143
|
+
return /* @__PURE__ */ jsx(
|
|
144
|
+
InboxProvider,
|
|
145
|
+
{
|
|
146
|
+
value,
|
|
147
|
+
shown,
|
|
148
|
+
open,
|
|
149
|
+
close,
|
|
150
|
+
isNarrow,
|
|
151
|
+
listRef,
|
|
152
|
+
detailRef,
|
|
153
|
+
children: /* @__PURE__ */ jsx(
|
|
154
|
+
"div",
|
|
155
|
+
{
|
|
156
|
+
ref: rootRef,
|
|
157
|
+
"data-slot": "notification-inbox",
|
|
158
|
+
"data-open": value !== null || void 0,
|
|
159
|
+
style: { "--notification-inbox-list": listWidth, ...style },
|
|
160
|
+
className: slots.root({ className }),
|
|
161
|
+
...props,
|
|
162
|
+
children: /* @__PURE__ */ jsx("div", { "data-slot": "notification-inbox-frame", className: slots.frame(), children })
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
function NotificationInboxList({
|
|
169
|
+
className,
|
|
170
|
+
"aria-label": ariaLabel = "Notifications",
|
|
171
|
+
onFocus,
|
|
172
|
+
onKeyDown,
|
|
173
|
+
...props
|
|
174
|
+
}) {
|
|
175
|
+
const { listRef } = useInbox("NotificationInboxList");
|
|
176
|
+
const roving = useRovingFocus({
|
|
177
|
+
item: ROW,
|
|
178
|
+
ref: listRef,
|
|
179
|
+
initial: (rows) => rows.find((row) => row.getAttribute("aria-selected") === "true")
|
|
180
|
+
});
|
|
181
|
+
return /* @__PURE__ */ jsx(
|
|
182
|
+
"div",
|
|
183
|
+
{
|
|
184
|
+
ref: listRef,
|
|
185
|
+
role: "region",
|
|
186
|
+
"aria-label": ariaLabel,
|
|
187
|
+
"data-slot": "notification-inbox-list",
|
|
188
|
+
className: slots.list({ className }),
|
|
189
|
+
onFocus: (event) => {
|
|
190
|
+
onFocus?.(event);
|
|
191
|
+
roving.onFocus(event);
|
|
192
|
+
},
|
|
193
|
+
onKeyDown: (event) => {
|
|
194
|
+
onKeyDown?.(event);
|
|
195
|
+
roving.onKeyDown(event);
|
|
196
|
+
},
|
|
197
|
+
...props
|
|
198
|
+
}
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
function NotificationInboxBar({ className, ...props }) {
|
|
202
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "notification-inbox-bar", className: slots.bar({ className }), ...props });
|
|
203
|
+
}
|
|
204
|
+
function NotificationInboxScroll({ className, ...props }) {
|
|
205
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "notification-inbox-scroll", className: slots.scroll({ className }), ...props });
|
|
206
|
+
}
|
|
207
|
+
function NotificationInboxGroup({ label, className, children, ...props }) {
|
|
208
|
+
const id = React.useId();
|
|
209
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "notification-inbox-group", className: slots.group({ className }), ...props, children: [
|
|
210
|
+
label != null && /* @__PURE__ */ jsx("div", { id, "data-slot": "notification-inbox-group-label", className: slots.groupLabel(), children: label }),
|
|
211
|
+
/* @__PURE__ */ jsx("div", { role: "listbox", "aria-labelledby": label != null ? id : void 0, className: "flex flex-col gap-px", children })
|
|
212
|
+
] });
|
|
213
|
+
}
|
|
214
|
+
function NotificationInboxItem({ value, unread = false, className, children, onClick, ...props }) {
|
|
215
|
+
const inbox = useInbox("NotificationInboxItem");
|
|
216
|
+
const selected = inbox.value === value;
|
|
217
|
+
return /* @__PURE__ */ jsx(ItemProvider, { unread, children: /* @__PURE__ */ jsxs(
|
|
218
|
+
"button",
|
|
219
|
+
{
|
|
220
|
+
type: "button",
|
|
221
|
+
role: "option",
|
|
222
|
+
"aria-selected": selected,
|
|
223
|
+
"data-slot": "notification-inbox-item",
|
|
224
|
+
"data-notification-value": value,
|
|
225
|
+
"data-unread": unread,
|
|
226
|
+
"data-list-surface": "",
|
|
227
|
+
className: notificationInboxVariants({ selected }).item({ className }),
|
|
228
|
+
onClick: (event) => {
|
|
229
|
+
onClick?.(event);
|
|
230
|
+
if (!event.defaultPrevented) inbox.open(value, { focusDetail: inbox.isNarrow() });
|
|
231
|
+
},
|
|
232
|
+
...props,
|
|
233
|
+
children: [
|
|
234
|
+
unread && /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Unread, " }),
|
|
235
|
+
children
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
) });
|
|
239
|
+
}
|
|
240
|
+
function NotificationInboxItemMedia({ className, ...props }) {
|
|
241
|
+
return /* @__PURE__ */ jsx("span", { "data-slot": "notification-inbox-item-media", className: slots.itemMedia({ className }), ...props });
|
|
242
|
+
}
|
|
243
|
+
function NotificationInboxItemContent({ className, ...props }) {
|
|
244
|
+
return /* @__PURE__ */ jsx("span", { "data-slot": "notification-inbox-item-content", className: slots.itemContent({ className }), ...props });
|
|
245
|
+
}
|
|
246
|
+
function NotificationInboxItemTitle({ className, ...props }) {
|
|
247
|
+
const { unread } = useItem("NotificationInboxItemTitle");
|
|
248
|
+
return /* @__PURE__ */ jsx(
|
|
249
|
+
"span",
|
|
250
|
+
{
|
|
251
|
+
"data-slot": "notification-inbox-item-title",
|
|
252
|
+
className: notificationInboxVariants({ unread }).itemTitle({ className }),
|
|
253
|
+
...props
|
|
254
|
+
}
|
|
255
|
+
);
|
|
256
|
+
}
|
|
257
|
+
function NotificationInboxItemDescription({ lines = 1, className, ...props }) {
|
|
258
|
+
return /* @__PURE__ */ jsx(
|
|
259
|
+
"span",
|
|
260
|
+
{
|
|
261
|
+
"data-slot": "notification-inbox-item-description",
|
|
262
|
+
className: notificationInboxVariants({ lines }).itemDescription({ className }),
|
|
263
|
+
...props
|
|
264
|
+
}
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
function NotificationInboxItemMeta({ className, children, ...props }) {
|
|
268
|
+
const { unread } = useItem("NotificationInboxItemMeta");
|
|
269
|
+
return /* @__PURE__ */ jsxs("span", { "data-slot": "notification-inbox-item-meta", className: slots.itemMeta({ className }), ...props, children: [
|
|
270
|
+
/* @__PURE__ */ jsx("span", { children }),
|
|
271
|
+
/* @__PURE__ */ jsx("span", { children: unread && /* @__PURE__ */ jsx(ListItemIndicator, {}) })
|
|
272
|
+
] });
|
|
273
|
+
}
|
|
274
|
+
function NotificationInboxDetail({
|
|
275
|
+
className,
|
|
276
|
+
"aria-label": ariaLabel = "Notification",
|
|
277
|
+
onKeyDown,
|
|
278
|
+
...props
|
|
279
|
+
}) {
|
|
280
|
+
const { value, close, detailRef } = useInbox("NotificationInboxDetail");
|
|
281
|
+
const open = value !== null;
|
|
282
|
+
return /* @__PURE__ */ jsx(
|
|
283
|
+
"section",
|
|
284
|
+
{
|
|
285
|
+
ref: detailRef,
|
|
286
|
+
tabIndex: -1,
|
|
287
|
+
"aria-label": ariaLabel,
|
|
288
|
+
"data-slot": "notification-inbox-detail",
|
|
289
|
+
"data-state": open ? "open" : "closed",
|
|
290
|
+
inert: !open,
|
|
291
|
+
className: slots.detail({ className }),
|
|
292
|
+
onKeyDown: (event) => {
|
|
293
|
+
onKeyDown?.(event);
|
|
294
|
+
if (event.key === "Escape" && !event.defaultPrevented) {
|
|
295
|
+
event.preventDefault();
|
|
296
|
+
close();
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
...props
|
|
300
|
+
}
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
function NotificationInboxClose({ className, ...props }) {
|
|
304
|
+
const { close } = useInbox("NotificationInboxClose");
|
|
305
|
+
return /* @__PURE__ */ jsxs(
|
|
306
|
+
Button,
|
|
307
|
+
{
|
|
308
|
+
variant: "ghost",
|
|
309
|
+
size: "sm",
|
|
310
|
+
iconOnly: true,
|
|
311
|
+
"aria-label": "Close notification",
|
|
312
|
+
"data-slot": "notification-inbox-close",
|
|
313
|
+
className: slots.close({ className }),
|
|
314
|
+
onClick: () => close(),
|
|
315
|
+
...props,
|
|
316
|
+
children: [
|
|
317
|
+
/* @__PURE__ */ jsx(X, { className: "@max-[40rem]/notification-inbox:hidden" }),
|
|
318
|
+
/* @__PURE__ */ jsx(ArrowLeft, { className: "@min-[40rem]/notification-inbox:hidden" })
|
|
319
|
+
]
|
|
320
|
+
}
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
function NotificationInboxPager({ className, ...props }) {
|
|
324
|
+
const { value, open, listRef } = useInbox("NotificationInboxPager");
|
|
325
|
+
const [rows, setRows] = React.useState([]);
|
|
326
|
+
React.useEffect(() => {
|
|
327
|
+
const list = listRef.current;
|
|
328
|
+
if (!list) return;
|
|
329
|
+
const read = () => {
|
|
330
|
+
const next = Array.from(list.querySelectorAll(ROW)).filter((row) => !row.hidden).map((row) => row.dataset.notificationValue ?? "");
|
|
331
|
+
setRows((prev) => prev.length === next.length && prev.every((v, i) => v === next[i]) ? prev : next);
|
|
332
|
+
};
|
|
333
|
+
queueMicrotask(read);
|
|
334
|
+
const observer = new MutationObserver(read);
|
|
335
|
+
observer.observe(list, { childList: true, subtree: true, attributes: true, attributeFilter: ["hidden"] });
|
|
336
|
+
return () => observer.disconnect();
|
|
337
|
+
}, [listRef]);
|
|
338
|
+
const index = value === null ? -1 : rows.indexOf(value);
|
|
339
|
+
if (index < 0) return null;
|
|
340
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "notification-inbox-pager", className: slots.pager({ className }), ...props, children: [
|
|
341
|
+
/* @__PURE__ */ jsxs("span", { "aria-live": "polite", className: slots.pagerText(), children: [
|
|
342
|
+
index + 1,
|
|
343
|
+
" of ",
|
|
344
|
+
rows.length
|
|
345
|
+
] }),
|
|
346
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", iconOnly: true, "aria-label": "Previous notification", disabled: index === 0, onClick: () => open(rows[index - 1]), children: /* @__PURE__ */ jsx(CaretUp, {}) }),
|
|
347
|
+
/* @__PURE__ */ jsx(
|
|
348
|
+
Button,
|
|
349
|
+
{
|
|
350
|
+
variant: "ghost",
|
|
351
|
+
size: "sm",
|
|
352
|
+
iconOnly: true,
|
|
353
|
+
"aria-label": "Next notification",
|
|
354
|
+
disabled: index === rows.length - 1,
|
|
355
|
+
onClick: () => open(rows[index + 1]),
|
|
356
|
+
children: /* @__PURE__ */ jsx(CaretDown, {})
|
|
357
|
+
}
|
|
358
|
+
)
|
|
359
|
+
] });
|
|
360
|
+
}
|
|
361
|
+
function NotificationInboxContent({ className, ...props }) {
|
|
362
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "notification-inbox-content", className: slots.content({ className }), ...props });
|
|
363
|
+
}
|
|
364
|
+
function useStagger(order) {
|
|
365
|
+
const { shown } = useInbox("NotificationInboxContent");
|
|
366
|
+
const [done, setDone] = React.useState(null);
|
|
367
|
+
return {
|
|
368
|
+
"data-stagger-done": done !== null && done === shown ? "" : void 0,
|
|
369
|
+
style: { animationDelay: `calc(var(--notification-inbox-stagger) * ${order})` },
|
|
370
|
+
onAnimationEnd: (event) => {
|
|
371
|
+
if (event.target === event.currentTarget) setDone(shown);
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
function NotificationInboxFields({ className, ...props }) {
|
|
376
|
+
const stagger = useStagger(0);
|
|
377
|
+
return /* @__PURE__ */ jsx(
|
|
378
|
+
DescriptionList,
|
|
379
|
+
{
|
|
380
|
+
"data-slot": "notification-inbox-fields",
|
|
381
|
+
className: slots.fields({ className: [slots.stagger(), className] }),
|
|
382
|
+
...stagger,
|
|
383
|
+
...props
|
|
384
|
+
}
|
|
385
|
+
);
|
|
386
|
+
}
|
|
387
|
+
function NotificationInboxTitle({ className, ...props }) {
|
|
388
|
+
const stagger = useStagger(1);
|
|
389
|
+
return /* @__PURE__ */ jsx("h2", { "data-slot": "notification-inbox-title", className: slots.title({ className: [slots.stagger(), className] }), ...stagger, ...props });
|
|
390
|
+
}
|
|
391
|
+
function NotificationInboxBody({ className, ...props }) {
|
|
392
|
+
const stagger = useStagger(2);
|
|
393
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "notification-inbox-body", className: slots.body({ className: [slots.stagger(), className] }), ...stagger, ...props });
|
|
394
|
+
}
|
|
395
|
+
function NotificationInboxActions({ className, ...props }) {
|
|
396
|
+
const stagger = useStagger(3);
|
|
397
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "notification-inbox-actions", className: slots.actions({ className: [slots.stagger(), className] }), ...stagger, ...props });
|
|
398
|
+
}
|
|
399
|
+
export {
|
|
400
|
+
NotificationInbox,
|
|
401
|
+
NotificationInboxActions,
|
|
402
|
+
NotificationInboxBar,
|
|
403
|
+
NotificationInboxBody,
|
|
404
|
+
NotificationInboxClose,
|
|
405
|
+
NotificationInboxContent,
|
|
406
|
+
NotificationInboxDetail,
|
|
407
|
+
NotificationInboxFields,
|
|
408
|
+
NotificationInboxGroup,
|
|
409
|
+
NotificationInboxItem,
|
|
410
|
+
NotificationInboxItemContent,
|
|
411
|
+
NotificationInboxItemDescription,
|
|
412
|
+
NotificationInboxItemMedia,
|
|
413
|
+
NotificationInboxItemMeta,
|
|
414
|
+
NotificationInboxItemTitle,
|
|
415
|
+
NotificationInboxList,
|
|
416
|
+
NotificationInboxPager,
|
|
417
|
+
NotificationInboxScroll,
|
|
418
|
+
NotificationInboxTitle,
|
|
419
|
+
notificationInboxVariants,
|
|
420
|
+
useNotificationInbox
|
|
421
|
+
};
|
|
422
|
+
//# sourceMappingURL=notification-inbox.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/notification-inbox/notification-inbox.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { ArrowLeft, CaretDown, CaretUp, X } from \"atoms-icons\"\n\nimport { Button } from \"../button/index.mjs\"\nimport { DescriptionList } from \"../description-list/index.mjs\"\nimport { useControllableState } from \"../input/use-controllable-state.mjs\"\nimport { ListItemIndicator } from \"../list/index.mjs\"\nimport { createContext } from \"../../../lib/create-context.mjs\"\nimport { useRovingFocus } from \"../../../lib/roving-focus.mjs\"\nimport { tv } from \"../../../lib/tv.mjs\"\n\n/*\n * Notifications as a split layout. Nothing is open at first and the list fills the inbox; a row\n * opens its notification beside the list (from a 40rem-wide inbox up) or over it (below that).\n * The split is the inbox's own container query, not the window's, so the same inbox splits in a\n * wide dialog and stacks in a narrow panel.\n *\n * The data stays the caller's: they render the rows (filtered however they like) and the detail\n * for `useNotificationInbox().shown`, the last opened notification, which stays on screen while\n * the detail closes.\n */\nexport const notificationInboxVariants = tv({\n slots: {\n root: [\n \"group/notification-inbox @container/notification-inbox relative flex min-h-0 w-full min-w-0 flex-col overflow-hidden text-sm text-foreground bg-background\",\n \"[--notification-inbox-stagger:calc(var(--duration-fast)/3)]\",\n ],\n frame: [\n \"relative grid min-h-0 flex-1 grid-cols-[minmax(0,1fr)_0px] motion-reduce-fade\",\n \"@min-[40rem]/notification-inbox:transition-[grid-template-columns] @min-[40rem]/notification-inbox:duration-slow @min-[40rem]/notification-inbox:ease-drawer\",\n \"@min-[40rem]/notification-inbox:group-data-open/notification-inbox:grid-cols-[minmax(0,1fr)_calc(100cqw-var(--notification-inbox-list))]\",\n \"@max-[40rem]/notification-inbox:grid-cols-1\",\n ],\n list: [\n \"flex min-h-0 min-w-0 flex-col\",\n \"@max-[40rem]/notification-inbox:group-data-open/notification-inbox:invisible @max-[40rem]/notification-inbox:group-data-open/notification-inbox:transition-[visibility] @max-[40rem]/notification-inbox:group-data-open/notification-inbox:duration-slow\",\n ],\n bar: \"flex h-12 shrink-0 items-center gap-2 border-b border-edge px-3\",\n scroll: \"min-h-0 flex-1 overflow-y-auto overscroll-contain\",\n group: \"p-2 [&+&]:pt-0\",\n groupLabel: \"px-2 pt-1 pb-1.5 text-xs font-medium text-muted-foreground\",\n item: [\n \"relative flex w-full cursor-pointer items-start gap-3 rounded-md px-2 py-2.5 text-left\",\n \"transition-[background-color,box-shadow] duration-fast ease-out\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus\",\n ],\n itemMedia: \"flex shrink-0 items-center justify-center text-muted-foreground [&>svg]:size-5\",\n itemContent: \"flex min-w-0 flex-1 flex-col gap-0.5\",\n itemTitle: \"truncate text-sm text-foreground\",\n itemDescription: \"text-xs text-muted-foreground [:where(&)]:text-pretty\",\n itemMeta: [\n \"ml-auto flex h-10 w-14 shrink-0 flex-col items-end justify-start gap-0 self-start text-xs tabular-nums text-muted-foreground\",\n \"[&>*]:flex [&>*]:h-5 [&>*]:items-center [&>svg]:size-4\",\n ],\n detail: [\n \"flex min-h-0 min-w-0 flex-col bg-[var(--surface,var(--background))] outline-none\",\n \"@min-[40rem]/notification-inbox:w-[calc(100cqw-var(--notification-inbox-list))] @min-[40rem]/notification-inbox:border-l @min-[40rem]/notification-inbox:border-edge\",\n \"@min-[40rem]/notification-inbox:data-[state=closed]:invisible @min-[40rem]/notification-inbox:data-[state=closed]:transition-[visibility] @min-[40rem]/notification-inbox:data-[state=closed]:duration-slow\",\n \"@max-[40rem]/notification-inbox:absolute @max-[40rem]/notification-inbox:inset-0 @max-[40rem]/notification-inbox:z-10\",\n \"@max-[40rem]/notification-inbox:transition-[translate,visibility] @max-[40rem]/notification-inbox:duration-slow @max-[40rem]/notification-inbox:ease-drawer\",\n \"@max-[40rem]/notification-inbox:data-[state=closed]:invisible @max-[40rem]/notification-inbox:data-[state=closed]:translate-x-full\",\n \"motion-reduce:transition-[opacity,visibility] motion-reduce:duration-fast motion-reduce:data-[state=closed]:opacity-0\",\n \"@max-[40rem]/notification-inbox:motion-reduce:data-[state=closed]:translate-x-0\",\n ],\n close: \"@min-[40rem]/notification-inbox:order-last\",\n pager: \"ml-auto flex items-center gap-0.5\",\n pagerText: \"px-1.5 text-xs tabular-nums text-muted-foreground\",\n content: \"flex min-h-0 flex-1 flex-col gap-5 overflow-y-auto overscroll-contain p-5\",\n fields: \"flex-row flex-wrap gap-x-8 gap-y-4 *:py-0\",\n title: \"text-lg/7 font-semibold tracking-tight text-balance\",\n body: \"flex max-w-prose flex-col gap-3 text-sm text-pretty text-body\",\n actions: \"flex flex-wrap items-center gap-2\",\n stagger: \"animate-stagger-in motion-reduce:animate-none data-[stagger-done]:animate-none\",\n },\n variants: {\n selected: {\n true: {\n item: \"bg-card shadow-sm hover:bg-card active:bg-card dark:bg-popover dark:shadow-xs dark:ring-1 dark:ring-edge dark:ring-inset dark:hover:bg-popover dark:active:bg-popover\",\n },\n false: { item: \"hover:bg-row-hover active:bg-row-hover\" },\n },\n unread: {\n true: { itemTitle: \"font-medium\" },\n false: { itemTitle: \"font-normal\" },\n },\n lines: {\n 1: { itemDescription: \"truncate\" },\n 2: { itemDescription: \"line-clamp-2\" },\n 3: { itemDescription: \"line-clamp-3\" },\n none: { itemDescription: \"\" },\n },\n },\n defaultVariants: { selected: false, unread: false, lines: 1 },\n})\n\nconst slots = notificationInboxVariants()\n\ninterface InboxContextValue {\n value: string | null\n shown: string | null\n open: (value: string, options?: { focusDetail?: boolean }) => void\n close: (options?: { returnFocus?: boolean }) => void\n isNarrow: () => boolean\n listRef: React.RefObject<HTMLDivElement | null>\n detailRef: React.RefObject<HTMLElement | null>\n}\n\nconst [InboxProvider, useInbox] = createContext<InboxContextValue>(\"NotificationInbox\")\nconst [ItemProvider, useItem] = createContext<{ unread: boolean }>(\"NotificationInboxItem\")\n\n/** The open notification, and `shown`: the last one opened, kept while the detail closes. */\nexport function useNotificationInbox() {\n const { value, shown, open, close } = useInbox(\"useNotificationInbox\")\n return { value, shown, open, close }\n}\n\nconst ROW = \"[data-notification-value]\"\nconst rowSelector = (value: string) => `[data-notification-value=\"${CSS.escape(value)}\"]`\n\nexport interface NotificationInboxProps extends Omit<React.ComponentProps<\"div\">, \"defaultValue\"> {\n /** Controlled. The open notification's value. */\n value?: string | null\n /** Initial open notification when uncontrolled. */\n defaultValue?: string | null\n /** Called when a row, the pager or the back button changes the open notification. Mark it read here. */\n onValueChange?: (value: string | null) => void\n /** Width the list narrows to while a notification is open beside it. */\n listWidth?: string\n}\n\nexport function NotificationInbox({\n value: valueProp,\n defaultValue = null,\n onValueChange,\n listWidth = \"22rem\",\n className,\n style,\n children,\n ...props\n}: NotificationInboxProps) {\n const [value, setValue] = useControllableState<string | null>({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange,\n })\n\n // The last notification opened stays in the detail while it closes.\n const [shown, setShown] = React.useState(value)\n if (value !== null && value !== shown) setShown(value)\n\n const rootRef = React.useRef<HTMLDivElement>(null)\n const listRef = React.useRef<HTMLDivElement>(null)\n const detailRef = React.useRef<HTMLElement>(null)\n const pending = React.useRef<{ to: \"detail\" } | { to: \"row\"; value: string } | null>(null)\n\n const isNarrow = React.useCallback(() => {\n const root = rootRef.current\n if (!root) return false\n const rem = Number.parseFloat(getComputedStyle(document.documentElement).fontSize) || 16\n return root.getBoundingClientRect().width < 40 * rem\n }, [])\n\n const open = React.useCallback(\n (next: string, options?: { focusDetail?: boolean }) => {\n pending.current = options?.focusDetail ? { to: \"detail\" } : null\n setValue(next)\n },\n [setValue],\n )\n\n const close = React.useCallback(\n (options?: { returnFocus?: boolean }) => {\n if (value === null) return\n pending.current = options?.returnFocus === false ? null : { to: \"row\", value }\n setValue(null)\n },\n [setValue, value],\n )\n\n // Focus follows what the reader did: into the detail when it covers the list, back to the row on close.\n React.useEffect(() => {\n const move = pending.current\n pending.current = null\n if (!move) return\n if (move.to === \"detail\" && value !== null) detailRef.current?.focus({ preventScroll: true })\n if (move.to === \"row\" && value === null) listRef.current?.querySelector<HTMLElement>(rowSelector(move.value))?.focus()\n }, [value])\n\n return (\n <InboxProvider\n value={value}\n shown={shown}\n open={open}\n close={close}\n isNarrow={isNarrow}\n listRef={listRef}\n detailRef={detailRef}\n >\n <div\n ref={rootRef}\n data-slot=\"notification-inbox\"\n data-open={value !== null || undefined}\n style={{ \"--notification-inbox-list\": listWidth, ...style } as React.CSSProperties}\n className={slots.root({ className })}\n {...props}\n >\n <div data-slot=\"notification-inbox-frame\" className={slots.frame()}>\n {children}\n </div>\n </div>\n </InboxProvider>\n )\n}\n\n/** The list column, a labelled region. Its rows share one tab stop; the arrows move between them. */\nexport function NotificationInboxList({\n className,\n \"aria-label\": ariaLabel = \"Notifications\",\n onFocus,\n onKeyDown,\n ...props\n}: React.ComponentProps<\"div\">) {\n const { listRef } = useInbox(\"NotificationInboxList\")\n const roving = useRovingFocus<HTMLDivElement>({\n item: ROW,\n ref: listRef,\n initial: (rows) => rows.find((row) => row.getAttribute(\"aria-selected\") === \"true\"),\n })\n return (\n <div\n ref={listRef}\n role=\"region\"\n aria-label={ariaLabel}\n data-slot=\"notification-inbox-list\"\n className={slots.list({ className })}\n onFocus={(event) => {\n onFocus?.(event)\n roving.onFocus(event)\n }}\n onKeyDown={(event) => {\n onKeyDown?.(event)\n roving.onKeyDown(event)\n }}\n {...props}\n />\n )\n}\n\n/** A 48px bar with a hairline under it: the search on the list side, the actions on the detail side. */\nexport function NotificationInboxBar({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"notification-inbox-bar\" className={slots.bar({ className })} {...props} />\n}\n\n/** The scrolling area under the list's bar. */\nexport function NotificationInboxScroll({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"notification-inbox-scroll\" className={slots.scroll({ className })} {...props} />\n}\n\nexport interface NotificationInboxGroupProps extends React.ComponentProps<\"div\"> {\n /** The heading above the rows, and the listbox's name. */\n label?: React.ReactNode\n}\n\n/** A run of rows under a day or a section label: a single-select listbox. */\nexport function NotificationInboxGroup({ label, className, children, ...props }: NotificationInboxGroupProps) {\n const id = React.useId()\n return (\n <div data-slot=\"notification-inbox-group\" className={slots.group({ className })} {...props}>\n {label != null && (\n <div id={id} data-slot=\"notification-inbox-group-label\" className={slots.groupLabel()}>\n {label}\n </div>\n )}\n <div role=\"listbox\" aria-labelledby={label != null ? id : undefined} className=\"flex flex-col gap-px\">\n {children}\n </div>\n </div>\n )\n}\n\nexport interface NotificationInboxItemProps extends Omit<React.ComponentProps<\"button\">, \"value\"> {\n /** Identifies the notification. */\n value: string\n /** Medium-weight title, a dot under the time and an \"Unread\" prefix for screen readers. */\n unread?: boolean\n}\n\n/** One row. Opens its notification; moves focus to the detail when the detail covers the list. */\nexport function NotificationInboxItem({ value, unread = false, className, children, onClick, ...props }: NotificationInboxItemProps) {\n const inbox = useInbox(\"NotificationInboxItem\")\n const selected = inbox.value === value\n return (\n <ItemProvider unread={unread}>\n <button\n type=\"button\"\n role=\"option\"\n aria-selected={selected}\n data-slot=\"notification-inbox-item\"\n data-notification-value={value}\n data-unread={unread}\n data-list-surface=\"\"\n className={notificationInboxVariants({ selected }).item({ className })}\n onClick={(event) => {\n onClick?.(event)\n if (!event.defaultPrevented) inbox.open(value, { focusDetail: inbox.isNarrow() })\n }}\n {...props}\n >\n {unread && <span className=\"sr-only\">Unread, </span>}\n {children}\n </button>\n </ItemProvider>\n )\n}\n\n/** The leading avatar or icon. Put the type glyph in an AvatarBadge. */\nexport function NotificationInboxItemMedia({ className, ...props }: React.ComponentProps<\"span\">) {\n return <span data-slot=\"notification-inbox-item-media\" className={slots.itemMedia({ className })} {...props} />\n}\n\n/** The column for the title and the description. */\nexport function NotificationInboxItemContent({ className, ...props }: React.ComponentProps<\"span\">) {\n return <span data-slot=\"notification-inbox-item-content\" className={slots.itemContent({ className })} {...props} />\n}\n\n/** One line, truncated; medium weight while unread. */\nexport function NotificationInboxItemTitle({ className, ...props }: React.ComponentProps<\"span\">) {\n const { unread } = useItem(\"NotificationInboxItemTitle\")\n return (\n <span\n data-slot=\"notification-inbox-item-title\"\n className={notificationInboxVariants({ unread }).itemTitle({ className })}\n {...props}\n />\n )\n}\n\nexport interface NotificationInboxItemDescriptionProps extends React.ComponentProps<\"span\"> {\n /** How many lines before it truncates. */\n lines?: 1 | 2 | 3 | \"none\"\n}\n\nexport function NotificationInboxItemDescription({ lines = 1, className, ...props }: NotificationInboxItemDescriptionProps) {\n return (\n <span\n data-slot=\"notification-inbox-item-description\"\n className={notificationInboxVariants({ lines }).itemDescription({ className })}\n {...props}\n />\n )\n}\n\n/** The time, with the unread dot under it when the row is unread. */\nexport function NotificationInboxItemMeta({ className, children, ...props }: React.ComponentProps<\"span\">) {\n const { unread } = useItem(\"NotificationInboxItemMeta\")\n return (\n <span data-slot=\"notification-inbox-item-meta\" className={slots.itemMeta({ className })} {...props}>\n <span>{children}</span>\n <span>{unread && <ListItemIndicator />}</span>\n </span>\n )\n}\n\n/** The detail side, a labelled section, hidden until a notification is open. Escape closes it. */\nexport function NotificationInboxDetail({\n className,\n \"aria-label\": ariaLabel = \"Notification\",\n onKeyDown,\n ...props\n}: React.ComponentProps<\"section\">) {\n const { value, close, detailRef } = useInbox(\"NotificationInboxDetail\")\n const open = value !== null\n return (\n <section\n ref={detailRef}\n tabIndex={-1}\n aria-label={ariaLabel}\n data-slot=\"notification-inbox-detail\"\n data-state={open ? \"open\" : \"closed\"}\n inert={!open}\n className={slots.detail({ className })}\n onKeyDown={(event) => {\n onKeyDown?.(event)\n if (event.key === \"Escape\" && !event.defaultPrevented) {\n event.preventDefault()\n close()\n }\n }}\n {...props}\n />\n )\n}\n\n/** Closes the detail and returns focus to its row: a cross beside the list, a back arrow over it. */\nexport function NotificationInboxClose({ className, ...props }: Omit<React.ComponentProps<typeof Button>, \"children\">) {\n const { close } = useInbox(\"NotificationInboxClose\")\n return (\n <Button\n variant=\"ghost\"\n size=\"sm\"\n iconOnly\n aria-label=\"Close notification\"\n data-slot=\"notification-inbox-close\"\n className={slots.close({ className })}\n onClick={() => close()}\n {...props}\n >\n <X className=\"@max-[40rem]/notification-inbox:hidden\" />\n <ArrowLeft className=\"@min-[40rem]/notification-inbox:hidden\" />\n </Button>\n )\n}\n\n/** \"2 of 6\" with previous and next, in the order the rows are on screen right now. */\nexport function NotificationInboxPager({ className, ...props }: React.ComponentProps<\"div\">) {\n const { value, open, listRef } = useInbox(\"NotificationInboxPager\")\n const [rows, setRows] = React.useState<string[]>([])\n\n // The rows on screen, read from the list whenever it changes (a search, a tab).\n React.useEffect(() => {\n const list = listRef.current\n if (!list) return\n const read = () => {\n const next = Array.from(list.querySelectorAll<HTMLElement>(ROW))\n .filter((row) => !row.hidden)\n .map((row) => row.dataset.notificationValue ?? \"\")\n setRows((prev) => (prev.length === next.length && prev.every((v, i) => v === next[i]) ? prev : next))\n }\n queueMicrotask(read)\n const observer = new MutationObserver(read)\n observer.observe(list, { childList: true, subtree: true, attributes: true, attributeFilter: [\"hidden\"] })\n return () => observer.disconnect()\n }, [listRef])\n\n const index = value === null ? -1 : rows.indexOf(value)\n if (index < 0) return null\n return (\n <div data-slot=\"notification-inbox-pager\" className={slots.pager({ className })} {...props}>\n <span aria-live=\"polite\" className={slots.pagerText()}>\n {index + 1} of {rows.length}\n </span>\n <Button variant=\"ghost\" size=\"sm\" iconOnly aria-label=\"Previous notification\" disabled={index === 0} onClick={() => open(rows[index - 1])}>\n <CaretUp />\n </Button>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n iconOnly\n aria-label=\"Next notification\"\n disabled={index === rows.length - 1}\n onClick={() => open(rows[index + 1])}\n >\n <CaretDown />\n </Button>\n </div>\n )\n}\n\n/** The scrolling body of the detail. */\nexport function NotificationInboxContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"notification-inbox-content\" className={slots.content({ className })} {...props} />\n}\n\n/** Each part of a notification rises in once per notification, a step after the one before. */\nfunction useStagger(order: number) {\n const { shown } = useInbox(\"NotificationInboxContent\")\n const [done, setDone] = React.useState<string | null>(null)\n return {\n \"data-stagger-done\": done !== null && done === shown ? \"\" : undefined,\n style: { animationDelay: `calc(var(--notification-inbox-stagger) * ${order})` } as React.CSSProperties,\n onAnimationEnd: (event: React.AnimationEvent) => {\n if (event.target === event.currentTarget) setDone(shown)\n },\n }\n}\n\n/** A DescriptionList laid out as wrapping columns, term over value: From, Folder, Received, Type. */\nexport function NotificationInboxFields({ className, ...props }: React.ComponentProps<typeof DescriptionList>) {\n const stagger = useStagger(0)\n return (\n <DescriptionList\n data-slot=\"notification-inbox-fields\"\n className={slots.fields({ className: [slots.stagger(), className] })}\n {...stagger}\n {...props}\n />\n )\n}\n\n/** The notification's heading. */\nexport function NotificationInboxTitle({ className, ...props }: React.ComponentProps<\"h2\">) {\n const stagger = useStagger(1)\n return (\n <h2 data-slot=\"notification-inbox-title\" className={slots.title({ className: [slots.stagger(), className] })} {...stagger} {...props} />\n )\n}\n\n/** The message, at reading measure. */\nexport function NotificationInboxBody({ className, ...props }: React.ComponentProps<\"div\">) {\n const stagger = useStagger(2)\n return (\n <div data-slot=\"notification-inbox-body\" className={slots.body({ className: [slots.stagger(), className] })} {...stagger} {...props} />\n )\n}\n\n/** A row for what to do next, usually one primary button. */\nexport function NotificationInboxActions({ className, ...props }: React.ComponentProps<\"div\">) {\n const stagger = useStagger(3)\n return (\n <div data-slot=\"notification-inbox-actions\" className={slots.actions({ className: [slots.stagger(), className] })} {...stagger} {...props} />\n )\n}\n"],"mappings":";AAgNQ,cA6DJ,YA7DI;AA9MR,YAAY,WAAW;AACvB,SAAS,WAAW,WAAW,SAAS,SAAS;AAEjD,SAAS,cAAc;AACvB,SAAS,uBAAuB;AAChC,SAAS,4BAA4B;AACrC,SAAS,yBAAyB;AAClC,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB;AAC/B,SAAS,UAAU;AAYZ,MAAM,4BAA4B,GAAG;AAAA,EAC1C,OAAO;AAAA,IACL,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,IACF;AAAA,IACA,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,WAAW;AAAA,IACX,aAAa;AAAA,IACb,WAAW;AAAA,IACX,iBAAiB;AAAA,IACjB,UAAU;AAAA,MACR;AAAA,MACA;AAAA,IACF;AAAA,IACA,QAAQ;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,OAAO;AAAA,IACP,OAAO;AAAA,IACP,WAAW;AAAA,IACX,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA,UAAU;AAAA,IACR,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,MAAM;AAAA,MACR;AAAA,MACA,OAAO,EAAE,MAAM,yCAAyC;AAAA,IAC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ieldDecrement,
|
|
7
|
+
NumberFieldScrubArea,
|
|
8
|
+
NumberFieldScrubAreaCursor,
|
|
9
|
+
numberFieldVariants
|
|
10
|
+
} from "./number-field.mjs";
|
|
11
|
+
import { createFormatter, parseNumber } from "./number-format.mjs";
|
|
12
|
+
export {
|
|
13
|
+
NumberField,
|
|
14
|
+
NumberFieldDecrement,
|
|
15
|
+
NumberFieldGroup,
|
|
16
|
+
NumberFieldIncrement,
|
|
17
|
+
NumberFieldInput,
|
|
18
|
+
NumberFieldScrubArea,
|
|
19
|
+
NumberFieldScrubAreaCursor,
|
|
20
|
+
createFormatter,
|
|
21
|
+
numberFieldVariants,
|
|
22
|
+
parseNumber
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/number-field/index.ts"],"sourcesContent":["export {\n NumberField,\n NumberFieldGroup,\n NumberFieldInput,\n NumberFieldIncrement,\n NumberFieldDecrement,\n NumberFieldScrubArea,\n NumberFieldScrubAreaCursor,\n numberFieldVariants,\n type NumberFieldProps,\n type NumberFieldGroupProps,\n type NumberFieldInputProps,\n type NumberFieldStepperProps,\n type NumberFieldScrubAreaProps,\n type NumberFieldScrubAreaCursorProps,\n} from \"./number-field.mjs\"\nexport { createFormatter, parseNumber } from \"./number-format.mjs\"\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAOK;AACP,SAAS,iBAAiB,mBAAmB;","names":[]}
|