@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,466 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { CaretLeft, CaretRight } from "atoms-icons";
|
|
5
|
+
import { AnimatedLabel } from "../animated-label/index.mjs";
|
|
6
|
+
import { useControllableState } from "../input/use-controllable-state.mjs";
|
|
7
|
+
import {
|
|
8
|
+
addDays,
|
|
9
|
+
addMonths,
|
|
10
|
+
addYears,
|
|
11
|
+
compareDay,
|
|
12
|
+
endOfMonth,
|
|
13
|
+
endOfWeek,
|
|
14
|
+
getFormatter,
|
|
15
|
+
isBetween,
|
|
16
|
+
isSameDay,
|
|
17
|
+
isSameMonth,
|
|
18
|
+
monthGrid,
|
|
19
|
+
startOfDay,
|
|
20
|
+
startOfMonth,
|
|
21
|
+
startOfWeek,
|
|
22
|
+
useDateLocale,
|
|
23
|
+
useHydrated
|
|
24
|
+
} from "../../../lib/date.mjs";
|
|
25
|
+
import { useDensity } from "../../../lib/density.mjs";
|
|
26
|
+
import { hitBox } from "../../../lib/hit-area.mjs";
|
|
27
|
+
import { tv } from "../../../lib/tv.mjs";
|
|
28
|
+
const focusRing = "outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-1 focus-visible:ring-offset-background";
|
|
29
|
+
const press = "cursor-pointer transition-[background-color,color,scale] duration-fast ease-out";
|
|
30
|
+
const calendarVariants = tv({
|
|
31
|
+
slots: {
|
|
32
|
+
root: "select-none text-foreground",
|
|
33
|
+
months: "flex flex-wrap gap-4 max-sm:flex-col",
|
|
34
|
+
month: "w-fit space-y-2 max-sm:mx-auto",
|
|
35
|
+
caption: "relative flex items-center justify-center pt-0.5",
|
|
36
|
+
nav: [
|
|
37
|
+
"inline-flex items-center justify-center rounded-md text-muted-foreground",
|
|
38
|
+
press,
|
|
39
|
+
hitBox.replace("relative ", ""),
|
|
40
|
+
"hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-40 [&_svg]:size-4 [&_svg]:shrink-0 size-7 absolute rtl:[&_svg]:-scale-x-100",
|
|
41
|
+
focusRing
|
|
42
|
+
],
|
|
43
|
+
captionButton: [
|
|
44
|
+
"inline-flex items-center justify-center rounded-md px-2 font-medium text-sm tabular-nums h-7",
|
|
45
|
+
press,
|
|
46
|
+
"hover:bg-accent hover:text-foreground",
|
|
47
|
+
focusRing
|
|
48
|
+
],
|
|
49
|
+
weekdays: "grid grid-cols-7",
|
|
50
|
+
weekday: "flex items-center justify-center text-xs font-normal text-muted-foreground",
|
|
51
|
+
grid: "grid grid-cols-7",
|
|
52
|
+
cell: "relative flex items-center justify-center p-0",
|
|
53
|
+
day: [
|
|
54
|
+
"relative inline-flex items-center justify-center rounded-md font-normal text-sm tabular-nums",
|
|
55
|
+
press,
|
|
56
|
+
"hover:bg-accent focus-visible:z-10",
|
|
57
|
+
focusRing,
|
|
58
|
+
"data-[today]:font-semibold data-[today]:text-foreground",
|
|
59
|
+
"data-[today]:after:absolute data-[today]:after:bottom-1 data-[today]:after:size-1 data-[today]:after:rounded-full data-[today]:after:bg-primary",
|
|
60
|
+
"data-[outside]:text-muted-foreground data-[outside]:data-[today]:text-muted-foreground data-[outside]:after:hidden",
|
|
61
|
+
"data-[disabled]:pointer-events-none data-[disabled]:text-muted-foreground/30 data-[disabled]:line-through data-[disabled]:after:hidden",
|
|
62
|
+
"data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:font-medium data-[selected]:hover:bg-primary data-[selected]:after:hidden data-[selected]:data-[today]:text-primary-foreground"
|
|
63
|
+
],
|
|
64
|
+
picker: "grid grid-cols-3 gap-2 pt-2",
|
|
65
|
+
pickerButton: [
|
|
66
|
+
"inline-flex h-9 items-center justify-center rounded-md text-sm tabular-nums",
|
|
67
|
+
press,
|
|
68
|
+
"hover:bg-accent",
|
|
69
|
+
focusRing,
|
|
70
|
+
"data-[current]:font-semibold",
|
|
71
|
+
"data-[disabled]:pointer-events-none data-[disabled]:text-muted-foreground/30",
|
|
72
|
+
"data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:font-medium data-[selected]:hover:bg-primary"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
variants: {
|
|
76
|
+
density: {
|
|
77
|
+
compact: { weekday: "h-8 w-8", cell: "h-8 w-8", day: "size-8" },
|
|
78
|
+
comfortable: { weekday: "h-9 w-9", cell: "h-9 w-9", day: "size-9" }
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
defaultVariants: { density: "compact" }
|
|
82
|
+
});
|
|
83
|
+
function dayKey(date) {
|
|
84
|
+
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
|
|
85
|
+
}
|
|
86
|
+
function Calendar(props) {
|
|
87
|
+
const {
|
|
88
|
+
mode = "single",
|
|
89
|
+
selected: selectedProp,
|
|
90
|
+
defaultSelected,
|
|
91
|
+
onSelect,
|
|
92
|
+
month: monthProp,
|
|
93
|
+
defaultMonth,
|
|
94
|
+
onMonthChange,
|
|
95
|
+
min,
|
|
96
|
+
max,
|
|
97
|
+
isDateDisabled,
|
|
98
|
+
weekStartsOn = 1,
|
|
99
|
+
locale: localeProp,
|
|
100
|
+
numberOfMonths = 1,
|
|
101
|
+
density,
|
|
102
|
+
className,
|
|
103
|
+
...rest
|
|
104
|
+
} = props;
|
|
105
|
+
const slots = calendarVariants({ density: useDensity(density) });
|
|
106
|
+
const locale = useDateLocale(localeProp);
|
|
107
|
+
const hydrated = useHydrated();
|
|
108
|
+
const today = hydrated ? startOfDay(/* @__PURE__ */ new Date()) : void 0;
|
|
109
|
+
const [selected, setSelected] = useControllableState({
|
|
110
|
+
prop: selectedProp,
|
|
111
|
+
defaultProp: defaultSelected,
|
|
112
|
+
onChange: (value) => {
|
|
113
|
+
if (value) onSelect?.(value);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
const single = mode === "single" ? selected : void 0;
|
|
117
|
+
const range = mode === "range" ? selected : void 0;
|
|
118
|
+
const anchor = single ?? range?.from;
|
|
119
|
+
const initialMonth = defaultMonth ?? anchor;
|
|
120
|
+
const [monthState, setMonthState] = useControllableState({
|
|
121
|
+
prop: monthProp && startOfMonth(monthProp),
|
|
122
|
+
defaultProp: initialMonth && startOfMonth(initialMonth),
|
|
123
|
+
onChange: (next) => {
|
|
124
|
+
if (next) onMonthChange?.(next);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
const month = monthState ?? (today ? startOfMonth(today) : void 0);
|
|
128
|
+
const [view, setView] = React.useState("day");
|
|
129
|
+
const [focusedState, setFocused] = React.useState(() => anchor ? startOfDay(anchor) : void 0);
|
|
130
|
+
const [hover, setHover] = React.useState(null);
|
|
131
|
+
if (!month) return /* @__PURE__ */ jsx(CalendarShell, { slots, count: Math.max(1, numberOfMonths), className, ...rest });
|
|
132
|
+
return /* @__PURE__ */ jsx(
|
|
133
|
+
CalendarBody,
|
|
134
|
+
{
|
|
135
|
+
...{ mode, single, range, anchor, month, setMonthState, today, locale, slots, view, setView, focusedState, setFocused, hover, setHover, min, max, isDateDisabled, weekStartsOn, numberOfMonths, setSelected, className, rest }
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
function CalendarBody({
|
|
140
|
+
mode,
|
|
141
|
+
single,
|
|
142
|
+
range,
|
|
143
|
+
anchor,
|
|
144
|
+
month,
|
|
145
|
+
setMonthState,
|
|
146
|
+
today,
|
|
147
|
+
locale,
|
|
148
|
+
slots,
|
|
149
|
+
view,
|
|
150
|
+
setView,
|
|
151
|
+
focusedState,
|
|
152
|
+
setFocused,
|
|
153
|
+
hover,
|
|
154
|
+
setHover,
|
|
155
|
+
min,
|
|
156
|
+
max,
|
|
157
|
+
isDateDisabled,
|
|
158
|
+
weekStartsOn,
|
|
159
|
+
numberOfMonths,
|
|
160
|
+
setSelected,
|
|
161
|
+
className,
|
|
162
|
+
rest
|
|
163
|
+
}) {
|
|
164
|
+
const pendingFocus = React.useRef(false);
|
|
165
|
+
const rootRef = React.useRef(null);
|
|
166
|
+
const setMonth = (next) => {
|
|
167
|
+
if (!isSameMonth(next, month)) setMonthState(startOfMonth(next));
|
|
168
|
+
};
|
|
169
|
+
const months = Array.from({ length: Math.max(1, numberOfMonths) }, (_, i) => addMonths(month, i));
|
|
170
|
+
const lastMonth = months[months.length - 1];
|
|
171
|
+
const isVisible = (day) => months.some((m) => isSameMonth(m, day));
|
|
172
|
+
const isDisabled = (day) => min !== void 0 && compareDay(day, min) < 0 || max !== void 0 && compareDay(day, max) > 0 || (isDateDisabled?.(day) ?? false);
|
|
173
|
+
const stop = focusedState && isVisible(focusedState) ? focusedState : anchor && isVisible(anchor) ? anchor : today && isVisible(today) ? today : month;
|
|
174
|
+
const focused = focusedState && isVisible(focusedState) ? focusedState : stop;
|
|
175
|
+
React.useLayoutEffect(() => {
|
|
176
|
+
if (!pendingFocus.current) return;
|
|
177
|
+
pendingFocus.current = false;
|
|
178
|
+
rootRef.current?.querySelector(`[data-day="${dayKey(focused)}"]:not([data-outside]), [data-picker-focus="true"]`)?.focus();
|
|
179
|
+
});
|
|
180
|
+
const select = (day) => {
|
|
181
|
+
if (isDisabled(day)) return;
|
|
182
|
+
setFocused(day);
|
|
183
|
+
if (!isVisible(day)) setMonth(compareDay(day, month) < 0 ? day : addMonths(day, -(months.length - 1)));
|
|
184
|
+
if (mode === "single") return setSelected(day);
|
|
185
|
+
const from = range?.from;
|
|
186
|
+
if (!from || range?.to) setSelected({ from: day, to: void 0 });
|
|
187
|
+
else if (compareDay(day, from) < 0) setSelected({ from: day, to: from });
|
|
188
|
+
else setSelected({ from, to: day });
|
|
189
|
+
setHover(null);
|
|
190
|
+
};
|
|
191
|
+
const moveFocus = (day) => {
|
|
192
|
+
pendingFocus.current = true;
|
|
193
|
+
setFocused(day);
|
|
194
|
+
if (compareDay(day, month) < 0) setMonth(day);
|
|
195
|
+
else if (compareDay(day, endOfMonth(lastMonth)) > 0) setMonth(addMonths(startOfMonth(day), -(months.length - 1)));
|
|
196
|
+
if (mode === "range" && range?.from && !range.to) setHover(day);
|
|
197
|
+
};
|
|
198
|
+
const onGridKeyDown = (event) => {
|
|
199
|
+
const rtl = getComputedStyle(event.currentTarget).direction === "rtl";
|
|
200
|
+
const next = rtl ? -1 : 1;
|
|
201
|
+
let target = null;
|
|
202
|
+
switch (event.key) {
|
|
203
|
+
case "ArrowRight":
|
|
204
|
+
target = addDays(focused, next);
|
|
205
|
+
break;
|
|
206
|
+
case "ArrowLeft":
|
|
207
|
+
target = addDays(focused, -next);
|
|
208
|
+
break;
|
|
209
|
+
case "ArrowDown":
|
|
210
|
+
target = addDays(focused, 7);
|
|
211
|
+
break;
|
|
212
|
+
case "ArrowUp":
|
|
213
|
+
target = addDays(focused, -7);
|
|
214
|
+
break;
|
|
215
|
+
case "PageDown":
|
|
216
|
+
target = event.shiftKey ? addYears(focused, 1) : addMonths(focused, 1);
|
|
217
|
+
break;
|
|
218
|
+
case "PageUp":
|
|
219
|
+
target = event.shiftKey ? addYears(focused, -1) : addMonths(focused, -1);
|
|
220
|
+
break;
|
|
221
|
+
case "Home":
|
|
222
|
+
target = startOfWeek(focused, weekStartsOn);
|
|
223
|
+
break;
|
|
224
|
+
case "End":
|
|
225
|
+
target = endOfWeek(focused, weekStartsOn);
|
|
226
|
+
break;
|
|
227
|
+
default:
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
event.preventDefault();
|
|
231
|
+
moveFocus(target);
|
|
232
|
+
};
|
|
233
|
+
const step = view === "day" ? 1 : view === "month" ? 12 : 144;
|
|
234
|
+
const prevDisabled = min !== void 0 && (view === "day" ? compareDay(addDays(month, -1), min) < 0 : view === "month" ? month.getFullYear() - 1 < min.getFullYear() : decadeStart(month) - 1 < min.getFullYear());
|
|
235
|
+
const nextDisabled = max !== void 0 && (view === "day" ? compareDay(addMonths(lastMonth, 1), max) > 0 : view === "month" ? month.getFullYear() + 1 > max.getFullYear() : decadeStart(month) + 12 > max.getFullYear());
|
|
236
|
+
const page = (direction) => {
|
|
237
|
+
const next = addMonths(month, direction * step);
|
|
238
|
+
setMonth(next);
|
|
239
|
+
if (view === "day") setFocused(new Date(next.getFullYear(), next.getMonth(), Math.min((focusedState ?? focused).getDate(), endOfMonth(next).getDate())));
|
|
240
|
+
};
|
|
241
|
+
const captionFormatter = getFormatter(locale, { month: "long", year: "numeric" });
|
|
242
|
+
const announce = months.map((m) => captionFormatter.format(m)).join(", ");
|
|
243
|
+
const navButton = (direction) => /* @__PURE__ */ jsx(
|
|
244
|
+
"button",
|
|
245
|
+
{
|
|
246
|
+
type: "button",
|
|
247
|
+
"aria-label": view === "day" ? direction < 0 ? "Previous month" : "Next month" : direction < 0 ? "Previous" : "Next",
|
|
248
|
+
disabled: direction < 0 ? prevDisabled : nextDisabled,
|
|
249
|
+
onClick: () => page(direction),
|
|
250
|
+
className: slots.nav({ className: direction < 0 ? "left-1" : "right-1" }),
|
|
251
|
+
children: direction < 0 ? /* @__PURE__ */ jsx(CaretLeft, {}) : /* @__PURE__ */ jsx(CaretRight, {})
|
|
252
|
+
}
|
|
253
|
+
);
|
|
254
|
+
const cycleView = () => {
|
|
255
|
+
pendingFocus.current = true;
|
|
256
|
+
setView((v) => v === "day" ? "month" : v === "month" ? "year" : "day");
|
|
257
|
+
};
|
|
258
|
+
return /* @__PURE__ */ jsxs("div", { ref: rootRef, "data-slot": "calendar", className: slots.root({ className }), ...rest, children: [
|
|
259
|
+
/* @__PURE__ */ jsx("div", { role: "status", "aria-live": "polite", className: "sr-only", children: announce }),
|
|
260
|
+
view === "day" ? /* @__PURE__ */ jsx("div", { className: slots.months(), children: months.map((m, index) => /* @__PURE__ */ jsx(
|
|
261
|
+
MonthView,
|
|
262
|
+
{
|
|
263
|
+
month: m,
|
|
264
|
+
first: index === 0,
|
|
265
|
+
last: index === months.length - 1,
|
|
266
|
+
slots,
|
|
267
|
+
locale,
|
|
268
|
+
weekStartsOn,
|
|
269
|
+
navButton,
|
|
270
|
+
onCaption: cycleView,
|
|
271
|
+
renderDay: (day) => {
|
|
272
|
+
const outside = !isSameMonth(day, m);
|
|
273
|
+
const disabled = isDisabled(day);
|
|
274
|
+
const end = range?.to ?? (range?.from && hover ? hover : void 0);
|
|
275
|
+
const inBand = !!(range?.from && end && !isSameDay(range.from, end) && isBetween(day, range.from, end));
|
|
276
|
+
const isSelected = mode === "single" ? isSameDay(day, single) : isSameDay(day, range?.from) || isSameDay(day, range?.to);
|
|
277
|
+
const col = (day.getDay() - weekStartsOn + 7) % 7;
|
|
278
|
+
const lo = range?.from && end ? compareDay(range.from, end) <= 0 ? range.from : end : void 0;
|
|
279
|
+
const hi = range?.from && end ? compareDay(range.from, end) <= 0 ? end : range.from : void 0;
|
|
280
|
+
const bandClass = inBand ? [
|
|
281
|
+
"bg-accent",
|
|
282
|
+
isSameDay(day, lo) || col === 0 ? "rounded-l-md" : "",
|
|
283
|
+
isSameDay(day, hi) || col === 6 ? "rounded-r-md" : "",
|
|
284
|
+
!(isSameDay(day, lo) || col === 0) && !(isSameDay(day, hi) || col === 6) ? "rounded-none" : ""
|
|
285
|
+
].join(" ") : void 0;
|
|
286
|
+
const holdsStop = !outside && isSameDay(day, stop);
|
|
287
|
+
return /* @__PURE__ */ jsx(
|
|
288
|
+
"div",
|
|
289
|
+
{
|
|
290
|
+
role: "gridcell",
|
|
291
|
+
"aria-selected": isSelected || inBand || void 0,
|
|
292
|
+
className: slots.cell({ className: bandClass }),
|
|
293
|
+
children: /* @__PURE__ */ jsx(
|
|
294
|
+
"button",
|
|
295
|
+
{
|
|
296
|
+
type: "button",
|
|
297
|
+
tabIndex: holdsStop ? 0 : -1,
|
|
298
|
+
"data-day": dayKey(day),
|
|
299
|
+
"aria-label": getFormatter(locale, { weekday: "long", month: "long", day: "numeric", year: "numeric" }).format(day),
|
|
300
|
+
"aria-disabled": disabled || void 0,
|
|
301
|
+
"data-today": today && isSameDay(day, today) ? "true" : void 0,
|
|
302
|
+
"data-outside": outside ? "true" : void 0,
|
|
303
|
+
"data-disabled": disabled ? "true" : void 0,
|
|
304
|
+
"data-selected": isSelected ? "true" : void 0,
|
|
305
|
+
className: slots.day(),
|
|
306
|
+
onClick: () => select(day),
|
|
307
|
+
onFocus: () => {
|
|
308
|
+
if (!isSameDay(day, focused)) setFocused(day);
|
|
309
|
+
},
|
|
310
|
+
onPointerEnter: mode === "range" ? () => setHover(day) : void 0,
|
|
311
|
+
children: day.getDate()
|
|
312
|
+
}
|
|
313
|
+
)
|
|
314
|
+
},
|
|
315
|
+
dayKey(day)
|
|
316
|
+
);
|
|
317
|
+
},
|
|
318
|
+
onGridKeyDown,
|
|
319
|
+
onGridLeave: mode === "range" ? () => setHover(null) : void 0
|
|
320
|
+
},
|
|
321
|
+
dayKey(m)
|
|
322
|
+
)) }) : /* @__PURE__ */ jsx(
|
|
323
|
+
PickerView,
|
|
324
|
+
{
|
|
325
|
+
view,
|
|
326
|
+
month,
|
|
327
|
+
slots,
|
|
328
|
+
locale,
|
|
329
|
+
today,
|
|
330
|
+
min,
|
|
331
|
+
max,
|
|
332
|
+
navButton,
|
|
333
|
+
onCaption: cycleView,
|
|
334
|
+
onPick: (picked) => {
|
|
335
|
+
pendingFocus.current = true;
|
|
336
|
+
setMonth(picked);
|
|
337
|
+
if (view === "month") {
|
|
338
|
+
setFocused(new Date(picked.getFullYear(), picked.getMonth(), Math.min((focusedState ?? focused).getDate(), endOfMonth(picked).getDate())));
|
|
339
|
+
setView("day");
|
|
340
|
+
} else setView("month");
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
)
|
|
344
|
+
] });
|
|
345
|
+
}
|
|
346
|
+
function CalendarShell({
|
|
347
|
+
slots,
|
|
348
|
+
count,
|
|
349
|
+
className,
|
|
350
|
+
...props
|
|
351
|
+
}) {
|
|
352
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "calendar", "aria-busy": "true", className: slots.root({ className }), ...props, children: /* @__PURE__ */ jsx("div", { className: slots.months(), children: Array.from({ length: count }, (_, m) => /* @__PURE__ */ jsxs("div", { className: slots.month(), children: [
|
|
353
|
+
/* @__PURE__ */ jsx("div", { className: slots.caption(), children: /* @__PURE__ */ jsx("span", { className: "h-7" }) }),
|
|
354
|
+
/* @__PURE__ */ jsx("div", { className: slots.weekdays(), "aria-hidden": "true", children: Array.from({ length: 7 }, (_2, i) => /* @__PURE__ */ jsx("span", { className: slots.weekday() }, i)) }),
|
|
355
|
+
/* @__PURE__ */ jsx("div", { className: slots.grid(), children: Array.from({ length: 42 }, (_2, i) => /* @__PURE__ */ jsx("span", { className: slots.cell() }, i)) })
|
|
356
|
+
] }, m)) }) });
|
|
357
|
+
}
|
|
358
|
+
function decadeStart(date) {
|
|
359
|
+
return Math.floor(date.getFullYear() / 12) * 12;
|
|
360
|
+
}
|
|
361
|
+
function MonthView({
|
|
362
|
+
month,
|
|
363
|
+
first,
|
|
364
|
+
last,
|
|
365
|
+
slots,
|
|
366
|
+
locale,
|
|
367
|
+
weekStartsOn,
|
|
368
|
+
navButton,
|
|
369
|
+
onCaption,
|
|
370
|
+
renderDay,
|
|
371
|
+
onGridKeyDown,
|
|
372
|
+
onGridLeave
|
|
373
|
+
}) {
|
|
374
|
+
const days = monthGrid(month, weekStartsOn);
|
|
375
|
+
const caption = getFormatter(locale, { month: "long", year: "numeric" }).format(month);
|
|
376
|
+
const weekday = getFormatter(locale, { weekday: "short" });
|
|
377
|
+
const weeks = Array.from({ length: 6 }, (_, w) => days.slice(w * 7, w * 7 + 7));
|
|
378
|
+
return /* @__PURE__ */ jsxs("div", { className: slots.month(), children: [
|
|
379
|
+
/* @__PURE__ */ jsxs("div", { className: slots.caption(), children: [
|
|
380
|
+
first ? navButton(-1) : null,
|
|
381
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: slots.captionButton(), onClick: onCaption, "aria-label": `${caption}, choose a month`, children: /* @__PURE__ */ jsx(AnimatedLabel, { swapKey: caption, children: caption }) }),
|
|
382
|
+
last ? navButton(1) : null
|
|
383
|
+
] }),
|
|
384
|
+
/* @__PURE__ */ jsx("div", { className: slots.weekdays(), "aria-hidden": "true", children: days.slice(0, 7).map((day) => /* @__PURE__ */ jsx("span", { className: slots.weekday(), children: weekday.format(day) }, day.getDay())) }),
|
|
385
|
+
/* @__PURE__ */ jsx("div", { role: "grid", "aria-label": caption, className: slots.grid(), onKeyDown: onGridKeyDown, onPointerLeave: onGridLeave, children: weeks.map((week) => /* @__PURE__ */ jsx("div", { role: "row", className: "contents", children: week.map(renderDay) }, dayKey(week[0]))) })
|
|
386
|
+
] });
|
|
387
|
+
}
|
|
388
|
+
function PickerView({
|
|
389
|
+
view,
|
|
390
|
+
month,
|
|
391
|
+
slots,
|
|
392
|
+
locale,
|
|
393
|
+
today,
|
|
394
|
+
min,
|
|
395
|
+
max,
|
|
396
|
+
navButton,
|
|
397
|
+
onCaption,
|
|
398
|
+
onPick
|
|
399
|
+
}) {
|
|
400
|
+
const year = month.getFullYear();
|
|
401
|
+
const start = decadeStart(month);
|
|
402
|
+
const options = view === "month" ? Array.from({ length: 12 }, (_, i) => new Date(year, i, 1)) : Array.from({ length: 12 }, (_, i) => new Date(start + i, month.getMonth(), 1));
|
|
403
|
+
const caption = view === "month" ? String(year) : `${start} \u2013 ${start + 11}`;
|
|
404
|
+
const label = getFormatter(locale, view === "month" ? { month: "short" } : { year: "numeric" });
|
|
405
|
+
const outOfRange = (date) => view === "month" ? min !== void 0 && compareDay(endOfMonth(date), min) < 0 || max !== void 0 && compareDay(date, max) > 0 : min !== void 0 && date.getFullYear() < min.getFullYear() || max !== void 0 && date.getFullYear() > max.getFullYear();
|
|
406
|
+
const isCurrent = (date) => view === "month" ? isSameMonth(date, month) : date.getFullYear() === year;
|
|
407
|
+
const onKeyDown = (event) => {
|
|
408
|
+
const buttons = Array.from(event.currentTarget.querySelectorAll("button"));
|
|
409
|
+
const index = buttons.indexOf(event.target);
|
|
410
|
+
if (index < 0) return;
|
|
411
|
+
const rtl = getComputedStyle(event.currentTarget).direction === "rtl";
|
|
412
|
+
const moves = { ArrowRight: rtl ? -1 : 1, ArrowLeft: rtl ? 1 : -1, ArrowDown: 3, ArrowUp: -3 };
|
|
413
|
+
let to = index;
|
|
414
|
+
if (event.key in moves) to = index + moves[event.key];
|
|
415
|
+
else if (event.key === "Home") to = 0;
|
|
416
|
+
else if (event.key === "End") to = buttons.length - 1;
|
|
417
|
+
else return;
|
|
418
|
+
event.preventDefault();
|
|
419
|
+
const target = buttons[Math.max(0, Math.min(buttons.length - 1, to))];
|
|
420
|
+
for (const b of buttons) b.tabIndex = b === target ? 0 : -1;
|
|
421
|
+
target.focus();
|
|
422
|
+
};
|
|
423
|
+
return /* @__PURE__ */ jsxs("div", { className: slots.month(), children: [
|
|
424
|
+
/* @__PURE__ */ jsxs("div", { className: slots.caption(), children: [
|
|
425
|
+
navButton(-1),
|
|
426
|
+
/* @__PURE__ */ jsx(
|
|
427
|
+
"button",
|
|
428
|
+
{
|
|
429
|
+
type: "button",
|
|
430
|
+
className: slots.captionButton(),
|
|
431
|
+
onClick: onCaption,
|
|
432
|
+
"aria-label": view === "month" ? `${caption}, choose a year` : `${caption}, back to days`,
|
|
433
|
+
children: /* @__PURE__ */ jsx(AnimatedLabel, { swapKey: caption, children: caption })
|
|
434
|
+
}
|
|
435
|
+
),
|
|
436
|
+
navButton(1)
|
|
437
|
+
] }),
|
|
438
|
+
/* @__PURE__ */ jsx("div", { className: slots.picker(), onKeyDown, children: options.map((date) => {
|
|
439
|
+
const current = isCurrent(date);
|
|
440
|
+
const disabled = outOfRange(date);
|
|
441
|
+
const isToday = today && (view === "month" ? isSameMonth(date, today) : date.getFullYear() === today.getFullYear());
|
|
442
|
+
return /* @__PURE__ */ jsx(
|
|
443
|
+
"button",
|
|
444
|
+
{
|
|
445
|
+
type: "button",
|
|
446
|
+
tabIndex: current ? 0 : -1,
|
|
447
|
+
"data-picker-focus": current ? "true" : void 0,
|
|
448
|
+
"data-selected": current ? "true" : void 0,
|
|
449
|
+
"data-current": isToday ? "true" : void 0,
|
|
450
|
+
"data-disabled": disabled ? "true" : void 0,
|
|
451
|
+
"aria-disabled": disabled || void 0,
|
|
452
|
+
"aria-pressed": current,
|
|
453
|
+
className: slots.pickerButton(),
|
|
454
|
+
onClick: () => !disabled && onPick(date),
|
|
455
|
+
children: label.format(date)
|
|
456
|
+
},
|
|
457
|
+
date.getTime()
|
|
458
|
+
);
|
|
459
|
+
}) })
|
|
460
|
+
] });
|
|
461
|
+
}
|
|
462
|
+
export {
|
|
463
|
+
Calendar,
|
|
464
|
+
calendarVariants
|
|
465
|
+
};
|
|
466
|
+
//# sourceMappingURL=calendar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/date-picker/calendar.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { CaretLeft, CaretRight } from \"atoms-icons\"\n\nimport { AnimatedLabel } from \"../animated-label/index.mjs\"\nimport { useControllableState } from \"../input/use-controllable-state.mjs\"\nimport {\n addDays,\n addMonths,\n addYears,\n compareDay,\n endOfMonth,\n endOfWeek,\n getFormatter,\n isBetween,\n isSameDay,\n isSameMonth,\n monthGrid,\n startOfDay,\n startOfMonth,\n startOfWeek,\n useDateLocale,\n useHydrated,\n type DateRange,\n type WeekDay,\n} from \"../../../lib/date.mjs\"\nimport { useDensity, type Density } from \"../../../lib/density.mjs\"\nimport { hitBox } from \"../../../lib/hit-area.mjs\"\nimport { tv } from \"../../../lib/tv.mjs\"\n\n/*\n * An always-open month grid: role=grid with one roving tab stop, a caption that cycles the day,\n * month and year views, single or range selection, and min/max plus custom disabled rules. Disabled\n * days stay focusable (aria-disabled) so the arrows can travel past them; they just can't be picked.\n */\n\nconst focusRing = \"outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-1 focus-visible:ring-offset-background\"\nconst press = \"cursor-pointer transition-[background-color,color,scale] duration-fast ease-out\"\n\nexport const calendarVariants = tv({\n slots: {\n root: \"select-none text-foreground\",\n months: \"flex flex-wrap gap-4 max-sm:flex-col\",\n month: \"w-fit space-y-2 max-sm:mx-auto\",\n caption: \"relative flex items-center justify-center pt-0.5\",\n nav: [\n \"inline-flex items-center justify-center rounded-md text-muted-foreground\",\n press,\n hitBox.replace(\"relative \", \"\"),\n \"hover:bg-accent hover:text-foreground disabled:pointer-events-none disabled:opacity-40 [&_svg]:size-4 [&_svg]:shrink-0 size-7 absolute rtl:[&_svg]:-scale-x-100\",\n focusRing,\n ],\n captionButton: [\n \"inline-flex items-center justify-center rounded-md px-2 font-medium text-sm tabular-nums h-7\",\n press,\n \"hover:bg-accent hover:text-foreground\",\n focusRing,\n ],\n weekdays: \"grid grid-cols-7\",\n weekday: \"flex items-center justify-center text-xs font-normal text-muted-foreground\",\n grid: \"grid grid-cols-7\",\n cell: \"relative flex items-center justify-center p-0\",\n day: [\n \"relative inline-flex items-center justify-center rounded-md font-normal text-sm tabular-nums\",\n press,\n \"hover:bg-accent focus-visible:z-10\",\n focusRing,\n \"data-[today]:font-semibold data-[today]:text-foreground\",\n \"data-[today]:after:absolute data-[today]:after:bottom-1 data-[today]:after:size-1 data-[today]:after:rounded-full data-[today]:after:bg-primary\",\n \"data-[outside]:text-muted-foreground data-[outside]:data-[today]:text-muted-foreground data-[outside]:after:hidden\",\n \"data-[disabled]:pointer-events-none data-[disabled]:text-muted-foreground/30 data-[disabled]:line-through data-[disabled]:after:hidden\",\n \"data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:font-medium data-[selected]:hover:bg-primary data-[selected]:after:hidden data-[selected]:data-[today]:text-primary-foreground\",\n ],\n picker: \"grid grid-cols-3 gap-2 pt-2\",\n pickerButton: [\n \"inline-flex h-9 items-center justify-center rounded-md text-sm tabular-nums\",\n press,\n \"hover:bg-accent\",\n focusRing,\n \"data-[current]:font-semibold\",\n \"data-[disabled]:pointer-events-none data-[disabled]:text-muted-foreground/30\",\n \"data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:font-medium data-[selected]:hover:bg-primary\",\n ],\n },\n variants: {\n density: {\n compact: { weekday: \"h-8 w-8\", cell: \"h-8 w-8\", day: \"size-8\" },\n comfortable: { weekday: \"h-9 w-9\", cell: \"h-9 w-9\", day: \"size-9\" },\n },\n },\n defaultVariants: { density: \"compact\" },\n})\n\ntype View = \"day\" | \"month\" | \"year\"\n\ninterface CalendarBaseProps extends Omit<React.ComponentProps<\"div\">, \"onSelect\" | \"defaultValue\"> {\n /** The first visible month (controlled). */\n month?: Date\n /** The first visible month at first render. Defaults to the selection, else today. */\n defaultMonth?: Date\n /** Fires when the visible month changes. */\n onMonthChange?: (month: Date) => void\n /** The earliest selectable day, inclusive. */\n min?: Date\n /** The latest selectable day, inclusive. */\n max?: Date\n /** Disables arbitrary days, e.g. weekends. Disabled days render struck through. */\n isDateDisabled?: (date: Date) => boolean\n /** 0 = Sunday … 6 = Saturday. */\n weekStartsOn?: WeekDay\n /** Pins the formatting locale. Unset: en-US on the server and during hydration, then the visitor's. */\n locale?: string\n /** Months shown side by side. */\n numberOfMonths?: number\n /** Cell size: compact 32px, comfortable 36px. Falls back to the nearest DensityProvider. */\n density?: Density\n}\n\nexport interface CalendarSingleProps extends CalendarBaseProps {\n mode?: \"single\"\n selected?: Date\n defaultSelected?: Date\n onSelect?: (date: Date) => void\n}\n\nexport interface CalendarRangeProps extends CalendarBaseProps {\n mode: \"range\"\n selected?: DateRange\n defaultSelected?: DateRange\n onSelect?: (range: DateRange) => void\n}\n\nexport type CalendarProps = CalendarSingleProps | CalendarRangeProps\n\nfunction dayKey(date: Date) {\n return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, \"0\")}-${String(date.getDate()).padStart(2, \"0\")}`\n}\n\nexport function Calendar(props: CalendarProps) {\n const {\n mode = \"single\",\n selected: selectedProp,\n defaultSelected,\n onSelect,\n month: monthProp,\n defaultMonth,\n onMonthChange,\n min,\n max,\n isDateDisabled,\n weekStartsOn = 1,\n locale: localeProp,\n numberOfMonths = 1,\n density,\n className,\n ...rest\n } = props as CalendarBaseProps & {\n mode?: \"single\" | \"range\"\n selected?: Date | DateRange\n defaultSelected?: Date | DateRange\n onSelect?: (value: Date | DateRange) => void\n }\n\n const slots = calendarVariants({ density: useDensity(density) })\n const locale = useDateLocale(localeProp)\n // The clock is read only after hydration: a prerender must not capture \"now\" (Cache Components\n // rejects it), and the server's today may not be the visitor's.\n const hydrated = useHydrated()\n const today = hydrated ? startOfDay(new Date()) : undefined\n\n const [selected, setSelected] = useControllableState<Date | DateRange | undefined>({\n prop: selectedProp,\n defaultProp: defaultSelected,\n onChange: (value) => {\n if (value) onSelect?.(value)\n },\n })\n const single = mode === \"single\" ? (selected as Date | undefined) : undefined\n const range = mode === \"range\" ? (selected as DateRange | undefined) : undefined\n const anchor = single ?? range?.from\n\n const initialMonth = defaultMonth ?? anchor\n const [monthState, setMonthState] = useControllableState<Date | undefined>({\n prop: monthProp && startOfMonth(monthProp),\n defaultProp: initialMonth && startOfMonth(initialMonth),\n onChange: (next) => {\n if (next) onMonthChange?.(next)\n },\n })\n // With nothing to anchor on, the grid waits for hydration to learn which month \"now\" is.\n const month = monthState ?? (today ? startOfMonth(today) : undefined)\n\n const [view, setView] = React.useState<View>(\"day\")\n const [focusedState, setFocused] = React.useState<Date | undefined>(() => (anchor ? startOfDay(anchor) : undefined))\n const [hover, setHover] = React.useState<Date | null>(null)\n\n if (!month) return <CalendarShell slots={slots} count={Math.max(1, numberOfMonths)} className={className} {...rest} />\n return (\n <CalendarBody\n {...{ mode, single, range, anchor, month, setMonthState, today, locale, slots, view, setView, focusedState, setFocused, hover, setHover, min, max, isDateDisabled, weekStartsOn, numberOfMonths, setSelected, className, rest }}\n />\n )\n}\n\ninterface BodyProps {\n mode: \"single\" | \"range\"\n single: Date | undefined\n range: DateRange | undefined\n anchor: Date | undefined\n month: Date\n setMonthState: (month: Date) => void\n today: Date | undefined\n locale: string\n slots: Slots\n view: View\n setView: React.Dispatch<React.SetStateAction<View>>\n focusedState: Date | undefined\n setFocused: (day: Date) => void\n hover: Date | null\n setHover: (day: Date | null) => void\n min?: Date\n max?: Date\n isDateDisabled?: (date: Date) => boolean\n weekStartsOn: WeekDay\n numberOfMonths: number\n setSelected: (value: Date | DateRange) => void\n className?: string\n rest: React.ComponentProps<\"div\">\n}\n\nfunction CalendarBody({\n mode,\n single,\n range,\n anchor,\n month,\n setMonthState,\n today,\n locale,\n slots,\n view,\n setView,\n focusedState,\n setFocused,\n hover,\n setHover,\n min,\n max,\n isDateDisabled,\n weekStartsOn,\n numberOfMonths,\n setSelected,\n className,\n rest,\n}: BodyProps) {\n const pendingFocus = React.useRef(false)\n const rootRef = React.useRef<HTMLDivElement>(null)\n const setMonth = (next: Date) => {\n if (!isSameMonth(next, month)) setMonthState(startOfMonth(next))\n }\n const months = Array.from({ length: Math.max(1, numberOfMonths) }, (_, i) => addMonths(month, i))\n const lastMonth = months[months.length - 1]\n const isVisible = (day: Date) => months.some((m) => isSameMonth(m, day))\n\n const isDisabled = (day: Date) =>\n (min !== undefined && compareDay(day, min) < 0) ||\n (max !== undefined && compareDay(day, max) > 0) ||\n (isDateDisabled?.(day) ?? false)\n\n // The day holding the tab stop: the focused day while visible, else the selection, today, the 1st.\n const stop = focusedState && isVisible(focusedState)\n ? focusedState\n : anchor && isVisible(anchor)\n ? anchor\n : today && isVisible(today)\n ? today\n : month\n const focused = focusedState && isVisible(focusedState) ? focusedState : stop\n\n React.useLayoutEffect(() => {\n if (!pendingFocus.current) return\n pendingFocus.current = false\n rootRef.current\n ?.querySelector<HTMLElement>(`[data-day=\"${dayKey(focused)}\"]:not([data-outside]), [data-picker-focus=\"true\"]`)\n ?.focus()\n })\n\n const select = (day: Date) => {\n if (isDisabled(day)) return\n setFocused(day)\n if (!isVisible(day)) setMonth(compareDay(day, month) < 0 ? day : addMonths(day, -(months.length - 1)))\n if (mode === \"single\") return setSelected(day)\n const from = range?.from\n if (!from || range?.to) setSelected({ from: day, to: undefined })\n else if (compareDay(day, from) < 0) setSelected({ from: day, to: from })\n else setSelected({ from, to: day })\n setHover(null)\n }\n\n const moveFocus = (day: Date) => {\n pendingFocus.current = true\n setFocused(day)\n if (compareDay(day, month) < 0) setMonth(day)\n else if (compareDay(day, endOfMonth(lastMonth)) > 0) setMonth(addMonths(startOfMonth(day), -(months.length - 1)))\n if (mode === \"range\" && range?.from && !range.to) setHover(day)\n }\n\n const onGridKeyDown = (event: React.KeyboardEvent) => {\n const rtl = getComputedStyle(event.currentTarget).direction === \"rtl\"\n const next = rtl ? -1 : 1\n let target: Date | null = null\n switch (event.key) {\n case \"ArrowRight\":\n target = addDays(focused, next)\n break\n case \"ArrowLeft\":\n target = addDays(focused, -next)\n break\n case \"ArrowDown\":\n target = addDays(focused, 7)\n break\n case \"ArrowUp\":\n target = addDays(focused, -7)\n break\n case \"PageDown\":\n target = event.shiftKey ? addYears(focused, 1) : addMonths(focused, 1)\n break\n case \"PageUp\":\n target = event.shiftKey ? addYears(focused, -1) : addMonths(focused, -1)\n break\n case \"Home\":\n target = startOfWeek(focused, weekStartsOn)\n break\n case \"End\":\n target = endOfWeek(focused, weekStartsOn)\n break\n default:\n return\n }\n event.preventDefault()\n moveFocus(target)\n }\n\n /* ─── Navigation ─── */\n\n const step = view === \"day\" ? 1 : view === \"month\" ? 12 : 144\n const prevDisabled =\n min !== undefined &&\n (view === \"day\"\n ? compareDay(addDays(month, -1), min) < 0\n : view === \"month\"\n ? month.getFullYear() - 1 < min.getFullYear()\n : decadeStart(month) - 1 < min.getFullYear())\n const nextDisabled =\n max !== undefined &&\n (view === \"day\"\n ? compareDay(addMonths(lastMonth, 1), max) > 0\n : view === \"month\"\n ? month.getFullYear() + 1 > max.getFullYear()\n : decadeStart(month) + 12 > max.getFullYear())\n\n const page = (direction: 1 | -1) => {\n const next = addMonths(month, direction * step)\n setMonth(next)\n if (view === \"day\") setFocused(new Date(next.getFullYear(), next.getMonth(), Math.min((focusedState ?? focused).getDate(), endOfMonth(next).getDate())))\n }\n\n const captionFormatter = getFormatter(locale, { month: \"long\", year: \"numeric\" })\n const announce = months.map((m) => captionFormatter.format(m)).join(\", \")\n\n const navButton = (direction: 1 | -1) => (\n <button\n type=\"button\"\n aria-label={view === \"day\" ? (direction < 0 ? \"Previous month\" : \"Next month\") : direction < 0 ? \"Previous\" : \"Next\"}\n disabled={direction < 0 ? prevDisabled : nextDisabled}\n onClick={() => page(direction)}\n className={slots.nav({ className: direction < 0 ? \"left-1\" : \"right-1\" })}\n >\n {direction < 0 ? <CaretLeft /> : <CaretRight />}\n </button>\n )\n\n const cycleView = () => {\n pendingFocus.current = true\n setView((v) => (v === \"day\" ? \"month\" : v === \"month\" ? \"year\" : \"day\"))\n }\n\n /* ─── Render ─── */\n\n return (\n <div ref={rootRef} data-slot=\"calendar\" className={slots.root({ className })} {...rest}>\n <div role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n {announce}\n </div>\n {view === \"day\" ? (\n <div className={slots.months()}>\n {months.map((m, index) => (\n <MonthView\n key={dayKey(m)}\n month={m}\n first={index === 0}\n last={index === months.length - 1}\n slots={slots}\n locale={locale}\n weekStartsOn={weekStartsOn}\n navButton={navButton}\n onCaption={cycleView}\n renderDay={(day) => {\n const outside = !isSameMonth(day, m)\n const disabled = isDisabled(day)\n const end = range?.to ?? (range?.from && hover ? hover : undefined)\n const inBand = !!(range?.from && end && !isSameDay(range.from, end) && isBetween(day, range.from, end))\n const isSelected =\n mode === \"single\" ? isSameDay(day, single) : isSameDay(day, range?.from) || isSameDay(day, range?.to)\n const col = (day.getDay() - weekStartsOn + 7) % 7\n const lo = range?.from && end ? (compareDay(range.from, end) <= 0 ? range.from : end) : undefined\n const hi = range?.from && end ? (compareDay(range.from, end) <= 0 ? end : range.from) : undefined\n const bandClass = inBand\n ? [\n \"bg-accent\",\n isSameDay(day, lo) || col === 0 ? \"rounded-l-md\" : \"\",\n isSameDay(day, hi) || col === 6 ? \"rounded-r-md\" : \"\",\n !(isSameDay(day, lo) || col === 0) && !(isSameDay(day, hi) || col === 6) ? \"rounded-none\" : \"\",\n ].join(\" \")\n : undefined\n const holdsStop = !outside && isSameDay(day, stop)\n return (\n <div\n key={dayKey(day)}\n role=\"gridcell\"\n aria-selected={isSelected || inBand || undefined}\n className={slots.cell({ className: bandClass })}\n >\n <button\n type=\"button\"\n tabIndex={holdsStop ? 0 : -1}\n data-day={dayKey(day)}\n aria-label={getFormatter(locale, { weekday: \"long\", month: \"long\", day: \"numeric\", year: \"numeric\" }).format(day)}\n aria-disabled={disabled || undefined}\n data-today={today && isSameDay(day, today) ? \"true\" : undefined}\n data-outside={outside ? \"true\" : undefined}\n data-disabled={disabled ? \"true\" : undefined}\n data-selected={isSelected ? \"true\" : undefined}\n className={slots.day()}\n onClick={() => select(day)}\n onFocus={() => {\n if (!isSameDay(day, focused)) setFocused(day)\n }}\n onPointerEnter={mode === \"range\" ? () => setHover(day) : undefined}\n >\n {day.getDate()}\n </button>\n </div>\n )\n }}\n onGridKeyDown={onGridKeyDown}\n onGridLeave={mode === \"range\" ? () => setHover(null) : undefined}\n />\n ))}\n </div>\n ) : (\n <PickerView\n view={view}\n month={month}\n slots={slots}\n locale={locale}\n today={today}\n min={min}\n max={max}\n navButton={navButton}\n onCaption={cycleView}\n onPick={(picked) => {\n pendingFocus.current = true\n setMonth(picked)\n if (view === \"month\") {\n setFocused(new Date(picked.getFullYear(), picked.getMonth(), Math.min((focusedState ?? focused).getDate(), endOfMonth(picked).getDate())))\n setView(\"day\")\n } else setView(\"month\")\n }}\n />\n )}\n </div>\n )\n}\n\n/** The grid's footprint before hydration, when no selection says which month to show. */\nfunction CalendarShell({\n slots,\n count,\n className,\n ...props\n}: { slots: Slots; count: number } & React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"calendar\" aria-busy=\"true\" className={slots.root({ className })} {...props}>\n <div className={slots.months()}>\n {Array.from({ length: count }, (_, m) => (\n <div key={m} className={slots.month()}>\n <div className={slots.caption()}>\n <span className=\"h-7\" />\n </div>\n <div className={slots.weekdays()} aria-hidden=\"true\">\n {Array.from({ length: 7 }, (_, i) => (\n <span key={i} className={slots.weekday()} />\n ))}\n </div>\n <div className={slots.grid()}>\n {Array.from({ length: 42 }, (_, i) => (\n <span key={i} className={slots.cell()} />\n ))}\n </div>\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nfunction decadeStart(date: Date) {\n return Math.floor(date.getFullYear() / 12) * 12\n}\n\ntype Slots = ReturnType<typeof calendarVariants>\n\nfunction MonthView({\n month,\n first,\n last,\n slots,\n locale,\n weekStartsOn,\n navButton,\n onCaption,\n renderDay,\n onGridKeyDown,\n onGridLeave,\n}: {\n month: Date\n first: boolean\n last: boolean\n slots: Slots\n locale: string\n weekStartsOn: WeekDay\n navButton: (direction: 1 | -1) => React.ReactNode\n onCaption: () => void\n renderDay: (day: Date) => React.ReactNode\n onGridKeyDown: (event: React.KeyboardEvent) => void\n onGridLeave?: () => void\n}) {\n const days = monthGrid(month, weekStartsOn)\n const caption = getFormatter(locale, { month: \"long\", year: \"numeric\" }).format(month)\n const weekday = getFormatter(locale, { weekday: \"short\" })\n const weeks = Array.from({ length: 6 }, (_, w) => days.slice(w * 7, w * 7 + 7))\n return (\n <div className={slots.month()}>\n <div className={slots.caption()}>\n {first ? navButton(-1) : null}\n <button type=\"button\" className={slots.captionButton()} onClick={onCaption} aria-label={`${caption}, choose a month`}>\n <AnimatedLabel swapKey={caption}>{caption}</AnimatedLabel>\n </button>\n {last ? navButton(1) : null}\n </div>\n <div className={slots.weekdays()} aria-hidden=\"true\">\n {days.slice(0, 7).map((day) => (\n <span key={day.getDay()} className={slots.weekday()}>\n {weekday.format(day)}\n </span>\n ))}\n </div>\n <div role=\"grid\" aria-label={caption} className={slots.grid()} onKeyDown={onGridKeyDown} onPointerLeave={onGridLeave}>\n {weeks.map((week) => (\n <div key={dayKey(week[0])} role=\"row\" className=\"contents\">\n {week.map(renderDay)}\n </div>\n ))}\n </div>\n </div>\n )\n}\n\nfunction PickerView({\n view,\n month,\n slots,\n locale,\n today,\n min,\n max,\n navButton,\n onCaption,\n onPick,\n}: {\n view: \"month\" | \"year\"\n month: Date\n slots: Slots\n locale: string\n today: Date | undefined\n min?: Date\n max?: Date\n navButton: (direction: 1 | -1) => React.ReactNode\n onCaption: () => void\n onPick: (date: Date) => void\n}) {\n const year = month.getFullYear()\n const start = decadeStart(month)\n const options =\n view === \"month\"\n ? Array.from({ length: 12 }, (_, i) => new Date(year, i, 1))\n : Array.from({ length: 12 }, (_, i) => new Date(start + i, month.getMonth(), 1))\n const caption = view === \"month\" ? String(year) : `${start} – ${start + 11}`\n const label = getFormatter(locale, view === \"month\" ? { month: \"short\" } : { year: \"numeric\" })\n\n const outOfRange = (date: Date) =>\n view === \"month\"\n ? (min !== undefined && compareDay(endOfMonth(date), min) < 0) || (max !== undefined && compareDay(date, max) > 0)\n : (min !== undefined && date.getFullYear() < min.getFullYear()) || (max !== undefined && date.getFullYear() > max.getFullYear())\n const isCurrent = (date: Date) =>\n view === \"month\" ? isSameMonth(date, month) : date.getFullYear() === year\n\n const onKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n const buttons = Array.from(event.currentTarget.querySelectorAll<HTMLButtonElement>(\"button\"))\n const index = buttons.indexOf(event.target as HTMLButtonElement)\n if (index < 0) return\n const rtl = getComputedStyle(event.currentTarget).direction === \"rtl\"\n const moves: Record<string, number> = { ArrowRight: rtl ? -1 : 1, ArrowLeft: rtl ? 1 : -1, ArrowDown: 3, ArrowUp: -3 }\n let to = index\n if (event.key in moves) to = index + moves[event.key]\n else if (event.key === \"Home\") to = 0\n else if (event.key === \"End\") to = buttons.length - 1\n else return\n event.preventDefault()\n const target = buttons[Math.max(0, Math.min(buttons.length - 1, to))]\n for (const b of buttons) b.tabIndex = b === target ? 0 : -1\n target.focus()\n }\n\n return (\n <div className={slots.month()}>\n <div className={slots.caption()}>\n {navButton(-1)}\n <button\n type=\"button\"\n className={slots.captionButton()}\n onClick={onCaption}\n aria-label={view === \"month\" ? `${caption}, choose a year` : `${caption}, back to days`}\n >\n <AnimatedLabel swapKey={caption}>{caption}</AnimatedLabel>\n </button>\n {navButton(1)}\n </div>\n <div className={slots.picker()} onKeyDown={onKeyDown}>\n {options.map((date) => {\n const current = isCurrent(date)\n const disabled = outOfRange(date)\n const isToday =\n today && (view === \"month\" ? isSameMonth(date, today) : date.getFullYear() === today.getFullYear())\n return (\n <button\n key={date.getTime()}\n type=\"button\"\n tabIndex={current ? 0 : -1}\n data-picker-focus={current ? \"true\" : undefined}\n data-selected={current ? \"true\" : undefined}\n data-current={isToday ? \"true\" : undefined}\n data-disabled={disabled ? \"true\" : undefined}\n aria-disabled={disabled || undefined}\n aria-pressed={current}\n className={slots.pickerButton()}\n onClick={() => !disabled && onPick(date)}\n >\n {label.format(date)}\n </button>\n )\n })}\n </div>\n </div>\n )\n}\n"],"mappings":";AAqMqB,cAkMjB,YAlMiB;AAnMrB,YAAY,WAAW;AACvB,SAAS,WAAW,kBAAkB;AAEtC,SAAS,qBAAqB;AAC9B,SAAS,4BAA4B;AACrC;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,OAGK;AACP,SAAS,kBAAgC;AACzC,SAAS,cAAc;AACvB,SAAS,UAAU;AAQnB,MAAM,YAAY;AAClB,MAAM,QAAQ;AAEP,MAAM,mBAAmB,GAAG;AAAA,EACjC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,SAAS;AAAA,IACT,KAAK;AAAA,MACH;AAAA,MACA;AAAA,MACA,OAAO,QAAQ,aAAa,EAAE;AAAA,MAC9B;AAAA,MACA;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,UAAU;AAAA,IACV,SAAS;AAAA,IACT,MAAM;AAAA,IACN,MAAM;AAAA,IACN,KAAK;AAAA,MACH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,QAAQ;AAAA,IACR,cAAc;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA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