@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,226 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Minus, TrendDown, TrendUp } from "atoms-icons";
|
|
5
|
+
import { Slot } from "radix-ui";
|
|
6
|
+
import { Chart, ChartArea, ChartLine, ChartTooltip } from "../chart/index.mjs";
|
|
7
|
+
import { cubicBezier, easingPoints, countUpDuration, prefersReducedMotion } from "../../../lib/motion.mjs";
|
|
8
|
+
import { useDensity } from "../../../lib/density.mjs";
|
|
9
|
+
import { inFlowFill, inFlowSurface, tv } from "../../../lib/tv.mjs";
|
|
10
|
+
import { cn } from "../../../lib/utils.mjs";
|
|
11
|
+
const statVariants = tv({
|
|
12
|
+
slots: {
|
|
13
|
+
root: "relative flex min-w-0 flex-col overflow-hidden rounded-xl text-foreground",
|
|
14
|
+
header: "flex min-w-0 items-start justify-between gap-3",
|
|
15
|
+
body: "contents",
|
|
16
|
+
label: "min-w-0 truncate text-sm font-medium text-muted-foreground",
|
|
17
|
+
icon: "grid shrink-0 place-items-center rounded-md bg-muted text-muted-foreground [&>svg]:size-4",
|
|
18
|
+
value: "font-heading font-semibold tracking-tight tabular-nums text-foreground",
|
|
19
|
+
footer: "flex min-w-0 items-center gap-2",
|
|
20
|
+
trend: "inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-pill px-1.5 py-0.5 text-xs font-medium tabular-nums [&>svg]:size-3.5",
|
|
21
|
+
caption: "min-w-0 truncate text-sm text-muted-foreground",
|
|
22
|
+
sparkline: "relative mt-auto"
|
|
23
|
+
},
|
|
24
|
+
variants: {
|
|
25
|
+
variant: {
|
|
26
|
+
default: { root: ["shadow-xs ring-1 ring-edge", inFlowFill] },
|
|
27
|
+
outline: { root: ["ring-1 ring-edge", inFlowFill] },
|
|
28
|
+
elevated: { root: "bg-card shadow-lg ring-1 ring-edge [--surface:var(--card)]" },
|
|
29
|
+
plain: { root: "rounded-none" },
|
|
30
|
+
inset: { root: "bg-muted", body: "flex min-h-0 flex-1 flex-col gap-3 rounded-md bg-background p-4" }
|
|
31
|
+
},
|
|
32
|
+
density: {
|
|
33
|
+
compact: { root: "gap-3 p-4", value: "text-3xl", icon: "size-8" },
|
|
34
|
+
comfortable: { root: "gap-4 p-6", value: "text-4xl", icon: "size-10" }
|
|
35
|
+
},
|
|
36
|
+
interactive: {
|
|
37
|
+
true: { root: "cursor-pointer outline-none transition-[box-shadow] duration-fast ease-out hover:shadow-md focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-background" },
|
|
38
|
+
false: {}
|
|
39
|
+
},
|
|
40
|
+
grouped: {
|
|
41
|
+
true: { root: "rounded-none bg-(--stat-ground,var(--background)) shadow-none ring-0" },
|
|
42
|
+
false: {}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
compoundVariants: [
|
|
46
|
+
{ variant: "plain", density: "compact", grouped: false, class: { root: "gap-2 p-0" } },
|
|
47
|
+
{ variant: "plain", density: "comfortable", grouped: false, class: { root: "gap-3 p-0" } },
|
|
48
|
+
{ variant: "inset", density: "compact", class: { root: "gap-2 p-2" } },
|
|
49
|
+
{ variant: "inset", density: "comfortable", class: { root: "gap-2 p-2" } },
|
|
50
|
+
{ variant: "inset", grouped: true, class: { root: "rounded-lg bg-muted p-0" } }
|
|
51
|
+
],
|
|
52
|
+
defaultVariants: { variant: "default", density: "compact", interactive: false, grouped: false }
|
|
53
|
+
});
|
|
54
|
+
const StatContext = React.createContext(null);
|
|
55
|
+
const StatGroupContext = React.createContext(null);
|
|
56
|
+
function useStatSlots() {
|
|
57
|
+
const context = React.useContext(StatContext);
|
|
58
|
+
const density = useDensity();
|
|
59
|
+
return context ?? { slots: statVariants({ density, variant: "plain" }), variant: "plain" };
|
|
60
|
+
}
|
|
61
|
+
const columnClass = {
|
|
62
|
+
2: "sm:grid-cols-2",
|
|
63
|
+
3: "sm:grid-cols-2 lg:grid-cols-3",
|
|
64
|
+
4: "sm:grid-cols-2 lg:grid-cols-4",
|
|
65
|
+
5: "sm:grid-cols-2 lg:grid-cols-5",
|
|
66
|
+
6: "sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6"
|
|
67
|
+
};
|
|
68
|
+
function StatGroup({ variant = "default", columns = 4, asChild = false, className, ...props }) {
|
|
69
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
70
|
+
return /* @__PURE__ */ jsx(StatGroupContext.Provider, { value: { variant }, children: /* @__PURE__ */ jsx(
|
|
71
|
+
Comp,
|
|
72
|
+
{
|
|
73
|
+
"data-slot": "stat-group",
|
|
74
|
+
"data-variant": variant,
|
|
75
|
+
className: cn(
|
|
76
|
+
"grid grid-cols-1 overflow-hidden",
|
|
77
|
+
columnClass[columns],
|
|
78
|
+
variant === "default" && ["gap-px rounded-xl bg-border shadow-xs ring-1 ring-edge", inFlowSurface],
|
|
79
|
+
variant === "outline" && ["gap-px rounded-xl bg-border ring-1 ring-edge", inFlowSurface],
|
|
80
|
+
variant === "elevated" && "gap-px rounded-xl bg-border shadow-lg ring-1 ring-edge [--stat-ground:var(--card)]",
|
|
81
|
+
variant === "plain" && "gap-px bg-border",
|
|
82
|
+
variant === "inset" && "gap-2 rounded-xl bg-muted p-2",
|
|
83
|
+
className
|
|
84
|
+
),
|
|
85
|
+
...props
|
|
86
|
+
}
|
|
87
|
+
) });
|
|
88
|
+
}
|
|
89
|
+
function Stat({ variant: variantProp, density, interactive = false, asChild = false, className, ...props }) {
|
|
90
|
+
const group = React.useContext(StatGroupContext);
|
|
91
|
+
const variant = variantProp ?? group?.variant ?? "default";
|
|
92
|
+
const grouped = Boolean(group);
|
|
93
|
+
const slots = statVariants({ variant, density: useDensity(density), interactive, grouped });
|
|
94
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
95
|
+
return /* @__PURE__ */ jsx(StatContext.Provider, { value: { slots, variant }, children: /* @__PURE__ */ jsx(Comp, { "data-slot": "stat", "data-variant": variant, "data-grouped": grouped ? "" : void 0, className: slots.root({ className }), ...props }) });
|
|
96
|
+
}
|
|
97
|
+
function StatHeader({ className, ...props }) {
|
|
98
|
+
const { slots } = useStatSlots();
|
|
99
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "stat-header", className: slots.header({ className }), ...props });
|
|
100
|
+
}
|
|
101
|
+
function StatBody({ className, ...props }) {
|
|
102
|
+
const { slots, variant } = useStatSlots();
|
|
103
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "stat-body", className: slots.body({ className: cn(variant !== "inset" && "contents", className) }), ...props });
|
|
104
|
+
}
|
|
105
|
+
function StatLabel({ className, ...props }) {
|
|
106
|
+
const { slots } = useStatSlots();
|
|
107
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "stat-label", className: slots.label({ className }), ...props });
|
|
108
|
+
}
|
|
109
|
+
function StatIcon({ className, ...props }) {
|
|
110
|
+
const { slots } = useStatSlots();
|
|
111
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "stat-icon", "aria-hidden": "true", className: slots.icon({ className }), ...props });
|
|
112
|
+
}
|
|
113
|
+
function parseFigure(children) {
|
|
114
|
+
if (typeof children !== "string" && typeof children !== "number") return null;
|
|
115
|
+
const text = String(children);
|
|
116
|
+
const match = text.match(/-?[\d,.]+/);
|
|
117
|
+
if (!match || match.index === void 0) return null;
|
|
118
|
+
const raw = match[0];
|
|
119
|
+
const value = Number(raw.replaceAll(",", ""));
|
|
120
|
+
if (!Number.isFinite(value)) return null;
|
|
121
|
+
return {
|
|
122
|
+
value,
|
|
123
|
+
prefix: text.slice(0, match.index),
|
|
124
|
+
suffix: text.slice(match.index + raw.length),
|
|
125
|
+
decimals: raw.includes(".") ? raw.split(".")[1].length : 0,
|
|
126
|
+
grouped: raw.includes(",")
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function StatValue({ countUp = false, className, children, ref, ...props }) {
|
|
130
|
+
const { slots } = useStatSlots();
|
|
131
|
+
const parsed = React.useMemo(() => parseFigure(children), [children]);
|
|
132
|
+
const [animated, setAnimated] = React.useState(null);
|
|
133
|
+
const nodeRef = React.useRef(null);
|
|
134
|
+
const mergedRef = React.useCallback((node) => {
|
|
135
|
+
nodeRef.current = node;
|
|
136
|
+
if (typeof ref === "function") ref(node);
|
|
137
|
+
else if (ref) ref.current = node;
|
|
138
|
+
}, [ref]);
|
|
139
|
+
React.useEffect(() => {
|
|
140
|
+
const node = nodeRef.current;
|
|
141
|
+
if (!countUp || !parsed || !node || prefersReducedMotion()) return;
|
|
142
|
+
let frame = 0;
|
|
143
|
+
let running = false;
|
|
144
|
+
const ease = cubicBezier(easingPoints.out);
|
|
145
|
+
const format = (value) => {
|
|
146
|
+
const number = parsed.grouped ? new Intl.NumberFormat("en-US", { minimumFractionDigits: parsed.decimals, maximumFractionDigits: parsed.decimals }).format(value) : value.toFixed(parsed.decimals);
|
|
147
|
+
return `${parsed.prefix}${number}${parsed.suffix}`;
|
|
148
|
+
};
|
|
149
|
+
const observer = new IntersectionObserver(([entry]) => {
|
|
150
|
+
if (!entry.isIntersecting) {
|
|
151
|
+
running = false;
|
|
152
|
+
cancelAnimationFrame(frame);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
if (running) return;
|
|
156
|
+
running = true;
|
|
157
|
+
const started = performance.now();
|
|
158
|
+
const tick = (now) => {
|
|
159
|
+
const progress = Math.min(1, (now - started) / countUpDuration);
|
|
160
|
+
setAnimated({ source: children, value: format(parsed.value * ease(progress)) });
|
|
161
|
+
if (progress < 1) frame = requestAnimationFrame(tick);
|
|
162
|
+
};
|
|
163
|
+
frame = requestAnimationFrame(tick);
|
|
164
|
+
}, { threshold: 0.2 });
|
|
165
|
+
observer.observe(node);
|
|
166
|
+
return () => {
|
|
167
|
+
observer.disconnect();
|
|
168
|
+
cancelAnimationFrame(frame);
|
|
169
|
+
};
|
|
170
|
+
}, [children, countUp, parsed]);
|
|
171
|
+
const display = countUp && animated && animated.source === children ? animated.value : children;
|
|
172
|
+
return /* @__PURE__ */ jsx("div", { ref: mergedRef, "data-slot": "stat-value", className: slots.value({ className }), ...props, children: display });
|
|
173
|
+
}
|
|
174
|
+
function StatFooter({ className, ...props }) {
|
|
175
|
+
const { slots } = useStatSlots();
|
|
176
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "stat-footer", className: slots.footer({ className }), ...props });
|
|
177
|
+
}
|
|
178
|
+
function StatTrend({ direction = "up", inverted = false, className, children, ...props }) {
|
|
179
|
+
const { slots } = useStatSlots();
|
|
180
|
+
const good = direction === "up" ? !inverted : direction === "down" ? inverted : false;
|
|
181
|
+
const tone = direction === "neutral" ? "bg-muted text-muted-foreground" : good ? "bg-success/10 text-success-strong" : "bg-destructive/10 text-destructive-strong";
|
|
182
|
+
const Icon = direction === "up" ? TrendUp : direction === "down" ? TrendDown : Minus;
|
|
183
|
+
return /* @__PURE__ */ jsxs("span", { "data-slot": "stat-trend", "data-direction": direction, className: slots.trend({ className: cn(tone, className) }), ...props, children: [
|
|
184
|
+
/* @__PURE__ */ jsx(Icon, { "aria-hidden": true }),
|
|
185
|
+
children
|
|
186
|
+
] });
|
|
187
|
+
}
|
|
188
|
+
function StatCaption({ className, ...props }) {
|
|
189
|
+
const { slots } = useStatSlots();
|
|
190
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "stat-caption", className: slots.caption({ className }), ...props });
|
|
191
|
+
}
|
|
192
|
+
function StatSparkline({ data, strokeWidth = 2, tooltip = false, valueFormatter, className, ...props }) {
|
|
193
|
+
const context = React.useContext(StatContext);
|
|
194
|
+
if (!context) throw new Error("`StatSparkline` must be used within `Stat`");
|
|
195
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "stat-sparkline", className: context.slots.sparkline({ className }), ...props, children: /* @__PURE__ */ jsxs(
|
|
196
|
+
Chart,
|
|
197
|
+
{
|
|
198
|
+
data,
|
|
199
|
+
sparkline: true,
|
|
200
|
+
label: "Trend",
|
|
201
|
+
config: { value: { color: "current", format: valueFormatter } },
|
|
202
|
+
domain: "fit",
|
|
203
|
+
className: "h-16 text-current",
|
|
204
|
+
children: [
|
|
205
|
+
/* @__PURE__ */ jsx(ChartArea, { dataKey: "value" }),
|
|
206
|
+
/* @__PURE__ */ jsx(ChartLine, { dataKey: "value", strokeWidth, hideActiveDot: !tooltip }),
|
|
207
|
+
tooltip ? /* @__PURE__ */ jsx(ChartTooltip, { valueFormatter: (value) => valueFormatter?.(value) ?? value.toLocaleString() }) : null
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
) });
|
|
211
|
+
}
|
|
212
|
+
export {
|
|
213
|
+
Stat,
|
|
214
|
+
StatBody,
|
|
215
|
+
StatCaption,
|
|
216
|
+
StatFooter,
|
|
217
|
+
StatGroup,
|
|
218
|
+
StatHeader,
|
|
219
|
+
StatIcon,
|
|
220
|
+
StatLabel,
|
|
221
|
+
StatSparkline,
|
|
222
|
+
StatTrend,
|
|
223
|
+
StatValue,
|
|
224
|
+
statVariants
|
|
225
|
+
};
|
|
226
|
+
//# sourceMappingURL=stat.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/stat/stat.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Minus, TrendDown, TrendUp } from \"atoms-icons\"\nimport { Slot } from \"radix-ui\"\n\nimport { Chart, ChartArea, ChartLine, ChartTooltip } from \"../chart/index.mjs\"\nimport { cubicBezier, easingPoints, countUpDuration, prefersReducedMotion } from \"../../../lib/motion.mjs\"\nimport { useDensity, type Density } from \"../../../lib/density.mjs\"\nimport { inFlowFill, inFlowSurface, tv, type VariantProps } from \"../../../lib/tv.mjs\"\nimport { cn } from \"../../../lib/utils.mjs\"\n\nexport const statVariants = tv({\n slots: {\n root: \"relative flex min-w-0 flex-col overflow-hidden rounded-xl text-foreground\",\n header: \"flex min-w-0 items-start justify-between gap-3\",\n body: \"contents\",\n label: \"min-w-0 truncate text-sm font-medium text-muted-foreground\",\n icon: \"grid shrink-0 place-items-center rounded-md bg-muted text-muted-foreground [&>svg]:size-4\",\n value: \"font-heading font-semibold tracking-tight tabular-nums text-foreground\",\n footer: \"flex min-w-0 items-center gap-2\",\n trend: \"inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-pill px-1.5 py-0.5 text-xs font-medium tabular-nums [&>svg]:size-3.5\",\n caption: \"min-w-0 truncate text-sm text-muted-foreground\",\n sparkline: \"relative mt-auto\",\n },\n variants: {\n variant: {\n default: { root: [\"shadow-xs ring-1 ring-edge\", inFlowFill] },\n outline: { root: [\"ring-1 ring-edge\", inFlowFill] },\n elevated: { root: \"bg-card shadow-lg ring-1 ring-edge [--surface:var(--card)]\" },\n plain: { root: \"rounded-none\" },\n inset: { root: \"bg-muted\" , body: \"flex min-h-0 flex-1 flex-col gap-3 rounded-md bg-background p-4\" },\n },\n density: {\n compact: { root: \"gap-3 p-4\", value: \"text-3xl\", icon: \"size-8\" },\n comfortable: { root: \"gap-4 p-6\", value: \"text-4xl\", icon: \"size-10\" },\n },\n interactive: {\n true: { root: \"cursor-pointer outline-none transition-[box-shadow] duration-fast ease-out hover:shadow-md focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-background\" },\n false: {},\n },\n grouped: {\n true: { root: \"rounded-none bg-(--stat-ground,var(--background)) shadow-none ring-0\" },\n false: {},\n },\n },\n compoundVariants: [\n { variant: \"plain\", density: \"compact\", grouped: false, class: { root: \"gap-2 p-0\" } },\n { variant: \"plain\", density: \"comfortable\", grouped: false, class: { root: \"gap-3 p-0\" } },\n { variant: \"inset\", density: \"compact\", class: { root: \"gap-2 p-2\" } },\n { variant: \"inset\", density: \"comfortable\", class: { root: \"gap-2 p-2\" } },\n { variant: \"inset\", grouped: true, class: { root: \"rounded-lg bg-muted p-0\" } },\n ],\n defaultVariants: { variant: \"default\", density: \"compact\", interactive: false, grouped: false },\n})\n\ntype StatSlots = ReturnType<typeof statVariants>\ntype StatVariant = NonNullable<VariantProps<typeof statVariants>[\"variant\"]>\n\nconst StatContext = React.createContext<{ slots: StatSlots; variant: StatVariant } | null>(null)\nconst StatGroupContext = React.createContext<{ variant: StatVariant } | null>(null)\n\nfunction useStatSlots() {\n const context = React.useContext(StatContext)\n const density = useDensity()\n return context ?? { slots: statVariants({ density, variant: \"plain\" }), variant: \"plain\" as const }\n}\n\nconst columnClass: Record<2 | 3 | 4 | 5 | 6, string> = {\n 2: \"sm:grid-cols-2\",\n 3: \"sm:grid-cols-2 lg:grid-cols-3\",\n 4: \"sm:grid-cols-2 lg:grid-cols-4\",\n 5: \"sm:grid-cols-2 lg:grid-cols-5\",\n 6: \"sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6\",\n}\n\nexport interface StatGroupProps extends React.ComponentProps<\"div\"> {\n variant?: StatVariant\n columns?: 2 | 3 | 4 | 5 | 6\n asChild?: boolean\n}\n\nexport function StatGroup({ variant = \"default\", columns = 4, asChild = false, className, ...props }: StatGroupProps) {\n const Comp = asChild ? Slot.Root : \"div\"\n return (\n <StatGroupContext.Provider value={{ variant }}>\n <Comp\n data-slot=\"stat-group\"\n data-variant={variant}\n className={cn(\n \"grid grid-cols-1 overflow-hidden\",\n columnClass[columns],\n variant === \"default\" && [\"gap-px rounded-xl bg-border shadow-xs ring-1 ring-edge\", inFlowSurface],\n variant === \"outline\" && [\"gap-px rounded-xl bg-border ring-1 ring-edge\", inFlowSurface],\n variant === \"elevated\" && \"gap-px rounded-xl bg-border shadow-lg ring-1 ring-edge [--stat-ground:var(--card)]\",\n variant === \"plain\" && \"gap-px bg-border\",\n variant === \"inset\" && \"gap-2 rounded-xl bg-muted p-2\",\n className,\n )}\n {...props}\n />\n </StatGroupContext.Provider>\n )\n}\n\nexport interface StatProps extends React.ComponentProps<\"div\">, VariantProps<typeof statVariants> {\n asChild?: boolean\n}\n\nexport function Stat({ variant: variantProp, density, interactive = false, asChild = false, className, ...props }: StatProps) {\n const group = React.useContext(StatGroupContext)\n const variant = variantProp ?? group?.variant ?? \"default\"\n const grouped = Boolean(group)\n const slots = statVariants({ variant, density: useDensity(density as Density | undefined), interactive, grouped })\n const Comp = asChild ? Slot.Root : \"div\"\n return (\n <StatContext.Provider value={{ slots, variant }}>\n <Comp data-slot=\"stat\" data-variant={variant} data-grouped={grouped ? \"\" : undefined} className={slots.root({ className })} {...props} />\n </StatContext.Provider>\n )\n}\n\nexport function StatHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n const { slots } = useStatSlots()\n return <div data-slot=\"stat-header\" className={slots.header({ className })} {...props} />\n}\n\nexport function StatBody({ className, ...props }: React.ComponentProps<\"div\">) {\n const { slots, variant } = useStatSlots()\n return <div data-slot=\"stat-body\" className={slots.body({ className: cn(variant !== \"inset\" && \"contents\", className) })} {...props} />\n}\n\nexport function StatLabel({ className, ...props }: React.ComponentProps<\"div\">) {\n const { slots } = useStatSlots()\n return <div data-slot=\"stat-label\" className={slots.label({ className })} {...props} />\n}\n\nexport function StatIcon({ className, ...props }: React.ComponentProps<\"div\">) {\n const { slots } = useStatSlots()\n return <div data-slot=\"stat-icon\" aria-hidden=\"true\" className={slots.icon({ className })} {...props} />\n}\n\nfunction parseFigure(children: React.ReactNode) {\n if (typeof children !== \"string\" && typeof children !== \"number\") return null\n const text = String(children)\n const match = text.match(/-?[\\d,.]+/)\n if (!match || match.index === undefined) return null\n const raw = match[0]\n const value = Number(raw.replaceAll(\",\", \"\"))\n if (!Number.isFinite(value)) return null\n return {\n value,\n prefix: text.slice(0, match.index),\n suffix: text.slice(match.index + raw.length),\n decimals: raw.includes(\".\") ? raw.split(\".\")[1].length : 0,\n grouped: raw.includes(\",\"),\n }\n}\n\nexport interface StatValueProps extends React.ComponentProps<\"div\"> {\n countUp?: boolean\n}\n\nexport function StatValue({ countUp = false, className, children, ref, ...props }: StatValueProps) {\n const { slots } = useStatSlots()\n const parsed = React.useMemo(() => parseFigure(children), [children])\n const [animated, setAnimated] = React.useState<{ source: React.ReactNode; value: React.ReactNode } | null>(null)\n const nodeRef = React.useRef<HTMLDivElement | null>(null)\n const mergedRef = React.useCallback((node: HTMLDivElement | null) => {\n nodeRef.current = node\n if (typeof ref === \"function\") ref(node)\n else if (ref) ref.current = node\n }, [ref])\n\n React.useEffect(() => {\n const node = nodeRef.current\n if (!countUp || !parsed || !node || prefersReducedMotion()) return\n let frame = 0\n let running = false\n const ease = cubicBezier(easingPoints.out)\n const format = (value: number) => {\n const number = parsed.grouped\n ? new Intl.NumberFormat(\"en-US\", { minimumFractionDigits: parsed.decimals, maximumFractionDigits: parsed.decimals }).format(value)\n : value.toFixed(parsed.decimals)\n return `${parsed.prefix}${number}${parsed.suffix}`\n }\n const observer = new IntersectionObserver(([entry]) => {\n if (!entry.isIntersecting) {\n running = false\n cancelAnimationFrame(frame)\n return\n }\n if (running) return\n running = true\n const started = performance.now()\n const tick = (now: number) => {\n const progress = Math.min(1, (now - started) / countUpDuration)\n setAnimated({ source: children, value: format(parsed.value * ease(progress)) })\n if (progress < 1) frame = requestAnimationFrame(tick)\n }\n frame = requestAnimationFrame(tick)\n }, { threshold: 0.2 })\n observer.observe(node)\n return () => { observer.disconnect(); cancelAnimationFrame(frame) }\n }, [children, countUp, parsed])\n\n const display = countUp && animated && animated.source === children ? animated.value : children\n return <div ref={mergedRef} data-slot=\"stat-value\" className={slots.value({ className })} {...props}>{display}</div>\n}\n\nexport function StatFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n const { slots } = useStatSlots()\n return <div data-slot=\"stat-footer\" className={slots.footer({ className })} {...props} />\n}\n\nexport interface StatTrendProps extends React.ComponentProps<\"span\"> {\n direction?: \"up\" | \"down\" | \"neutral\"\n inverted?: boolean\n}\n\nexport function StatTrend({ direction = \"up\", inverted = false, className, children, ...props }: StatTrendProps) {\n const { slots } = useStatSlots()\n const good = direction === \"up\" ? !inverted : direction === \"down\" ? inverted : false\n const tone = direction === \"neutral\" ? \"bg-muted text-muted-foreground\" : good ? \"bg-success/10 text-success-strong\" : \"bg-destructive/10 text-destructive-strong\"\n const Icon = direction === \"up\" ? TrendUp : direction === \"down\" ? TrendDown : Minus\n return (\n <span data-slot=\"stat-trend\" data-direction={direction} className={slots.trend({ className: cn(tone, className) })} {...props}>\n <Icon aria-hidden />{children}\n </span>\n )\n}\n\nexport function StatCaption({ className, ...props }: React.ComponentProps<\"div\">) {\n const { slots } = useStatSlots()\n return <div data-slot=\"stat-caption\" className={slots.caption({ className })} {...props} />\n}\n\nexport interface StatSparklineProps extends Omit<React.ComponentProps<\"div\">, \"children\"> {\n data: number[]\n strokeWidth?: number\n tooltip?: boolean\n valueFormatter?: (value: number) => string\n}\n\nexport function StatSparkline({ data, strokeWidth = 2, tooltip = false, valueFormatter, className, ...props }: StatSparklineProps) {\n const context = React.useContext(StatContext)\n if (!context) throw new Error(\"`StatSparkline` must be used within `Stat`\")\n return (\n <div data-slot=\"stat-sparkline\" className={context.slots.sparkline({ className })} {...props}>\n <Chart\n data={data}\n sparkline\n label=\"Trend\"\n config={{ value: { color: \"current\", format: valueFormatter } }}\n domain=\"fit\"\n className=\"h-16 text-current\"\n >\n <ChartArea dataKey=\"value\" />\n <ChartLine dataKey=\"value\" strokeWidth={strokeWidth} hideActiveDot={!tooltip} />\n {tooltip ? <ChartTooltip valueFormatter={(value) => valueFormatter?.(value) ?? value.toLocaleString()} /> : null}\n </Chart>\n </div>\n )\n}\n"],"mappings":";AAsFM,cA4IF,YA5IE;AApFN,YAAY,WAAW;AACvB,SAAS,OAAO,WAAW,eAAe;AAC1C,SAAS,YAAY;AAErB,SAAS,OAAO,WAAW,WAAW,oBAAoB;AAC1D,SAAS,aAAa,cAAc,iBAAiB,4BAA4B;AACjF,SAAS,kBAAgC;AACzC,SAAS,YAAY,eAAe,UAA6B;AACjE,SAAS,UAAU;AAEZ,MAAM,eAAe,GAAG;AAAA,EAC7B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,SAAS;AAAA,IACT,WAAW;AAAA,EACb;AAAA,EACA,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS,EAAE,MAAM,CAAC,8BAA8B,UAAU,EAAE;AAAA,MAC5D,SAAS,EAAE,MAAM,CAAC,oBAAoB,UAAU,EAAE;AAAA,MAClD,UAAU,EAAE,MAAM,6DAA6D;AAAA,MAC/E,OAAO,EAAE,MAAM,eAA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EAAE,MAAM,IAAI,aAAa;AAC/B,SAAO,oBAAC,SAAI,aAAU,gBAAe,WAAW,MAAM,QAAQ,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAC3F;AASO,SAAS,cAAc,EAAE,MAAM,cAAc,GAAG,UAAU,OAAO,gBAAgB,WAAW,GAAG,MAAM,GAAuB;AACjI,QAAM,UAAU,MAAM,WAAW,WAAW;AAC5C,MAAI,CAAC,QAAS,OAAM,IAAI,MAAM,4CAA4C;AAC1E,SACE,oBAAC,SAAI,aAAU,kBAAiB,WAAW,QAAQ,MAAM,UAAU,EAAE,UAAU,CAAC,GAAI,GAAG,OACrF;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAS;AAAA,MACT,OAAM;AAAA,MACN,QAAQ,EAAE,OAAO,EAAE,OAAO,WAAW,QAAQ,eAAe,EAAE;AAAA,MAC9D,QAAO;AAAA,MACP,WAAU;AAAA,MAEV;AAAA,4BAAC,aAAU,SAAQ,SAAQ;AAAA,QAC3B,oBAAC,aAAU,SAAQ,SAAQ,aAA0B,eAAe,CAAC,SAAS;AAAA,QAC7E,UAAU,oBAAC,gBAAa,gBAAgB,CAAC,UAAU,iBAAiB,KAAK,KAAK,MAAM,eAAe,GAAG,IAAK;AAAA;AAAA;AAAA,EAC9G,GACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
StatusBar,
|
|
3
|
+
StatusBarSection,
|
|
4
|
+
StatusBarItem,
|
|
5
|
+
StatusBarSeparator,
|
|
6
|
+
StatusBarSignal,
|
|
7
|
+
statusBarVariants
|
|
8
|
+
} from "./status-bar.mjs";
|
|
9
|
+
export {
|
|
10
|
+
StatusBar,
|
|
11
|
+
StatusBarItem,
|
|
12
|
+
StatusBarSection,
|
|
13
|
+
StatusBarSeparator,
|
|
14
|
+
StatusBarSignal,
|
|
15
|
+
statusBarVariants
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/status-bar/index.ts"],"sourcesContent":["export {\n StatusBar,\n StatusBarSection,\n StatusBarItem,\n StatusBarSeparator,\n StatusBarSignal,\n statusBarVariants,\n type StatusBarSectionProps,\n type StatusBarItemProps,\n type StatusBarSignalProps,\n} from \"./status-bar.mjs\"\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;","names":[]}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { tv } from "../../../lib/tv.mjs";
|
|
4
|
+
const statusBarVariants = tv({
|
|
5
|
+
slots: {
|
|
6
|
+
root: [
|
|
7
|
+
"grid h-6 shrink-0 select-none grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-4 px-4",
|
|
8
|
+
"font-mono text-[0.625rem] uppercase tracking-[0.2em] text-muted-foreground tabular-nums"
|
|
9
|
+
],
|
|
10
|
+
section: "row-start-1 flex min-w-0 items-center gap-3 only:col-span-full",
|
|
11
|
+
item: "inline-flex min-w-0 items-center gap-1.5 overflow-hidden whitespace-nowrap [&>:not([data-slot=status-bar-item-text])]:shrink-0",
|
|
12
|
+
itemText: "min-w-0 truncate",
|
|
13
|
+
separator: "h-3 w-px shrink-0 bg-border",
|
|
14
|
+
signal: "inline-flex h-2.5 shrink-0 items-end gap-0.5",
|
|
15
|
+
signalBar: "w-0.75 bg-foreground opacity-15 data-lit:opacity-80 transition-opacity duration-base ease-out motion-reduce-fade"
|
|
16
|
+
},
|
|
17
|
+
variants: {
|
|
18
|
+
align: {
|
|
19
|
+
start: { section: "col-start-1 justify-start" },
|
|
20
|
+
center: { section: "col-start-2 justify-center" },
|
|
21
|
+
end: { section: "col-start-3 justify-end" }
|
|
22
|
+
},
|
|
23
|
+
tone: {
|
|
24
|
+
default: { item: "" },
|
|
25
|
+
muted: { item: "text-muted-foreground/70" },
|
|
26
|
+
strong: { item: "text-foreground" },
|
|
27
|
+
success: { item: "text-success" }
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: { align: "start", tone: "default" }
|
|
31
|
+
});
|
|
32
|
+
const slots = statusBarVariants();
|
|
33
|
+
function StatusBar({ className, ...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "status-bar", className: slots.root({ className }), ...props });
|
|
35
|
+
}
|
|
36
|
+
function StatusBarSection({ align = "start", className, ...props }) {
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
"data-slot": "status-bar-section",
|
|
41
|
+
"data-align": align,
|
|
42
|
+
className: statusBarVariants({ align }).section({ className }),
|
|
43
|
+
...props
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
function wrapText(children) {
|
|
48
|
+
return React.Children.map(
|
|
49
|
+
children,
|
|
50
|
+
(child) => typeof child === "string" || typeof child === "number" ? /* @__PURE__ */ jsx("span", { "data-slot": "status-bar-item-text", className: slots.itemText(), children: child }) : child
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
function StatusBarItem({ tone = "default", className, children, ...props }) {
|
|
54
|
+
return /* @__PURE__ */ jsx("span", { "data-slot": "status-bar-item", className: statusBarVariants({ tone }).item({ className }), ...props, children: wrapText(children) });
|
|
55
|
+
}
|
|
56
|
+
function StatusBarSeparator({ className, ...props }) {
|
|
57
|
+
return /* @__PURE__ */ jsx("span", { "data-slot": "status-bar-separator", "aria-hidden": true, className: slots.separator({ className }), ...props });
|
|
58
|
+
}
|
|
59
|
+
const BAR_HEIGHTS = ["h-0.75", "h-1.25", "h-1.75", "h-2.25"];
|
|
60
|
+
function StatusBarSignal({ level, label = "Signal", className, ...props }) {
|
|
61
|
+
const value = Math.min(Math.max(Math.round(level), 0), 4);
|
|
62
|
+
return /* @__PURE__ */ jsx(
|
|
63
|
+
"span",
|
|
64
|
+
{
|
|
65
|
+
role: "meter",
|
|
66
|
+
"aria-label": label,
|
|
67
|
+
"aria-valuemin": 0,
|
|
68
|
+
"aria-valuemax": 4,
|
|
69
|
+
"aria-valuenow": value,
|
|
70
|
+
"aria-valuetext": `${value} of 4`,
|
|
71
|
+
"data-slot": "status-bar-signal",
|
|
72
|
+
"data-level": value,
|
|
73
|
+
className: slots.signal({ className }),
|
|
74
|
+
...props,
|
|
75
|
+
children: BAR_HEIGHTS.map((height, index) => /* @__PURE__ */ jsx(
|
|
76
|
+
"span",
|
|
77
|
+
{
|
|
78
|
+
"aria-hidden": true,
|
|
79
|
+
"data-slot": "status-bar-signal-bar",
|
|
80
|
+
"data-lit": index < value || void 0,
|
|
81
|
+
className: slots.signalBar({ className: height })
|
|
82
|
+
},
|
|
83
|
+
height
|
|
84
|
+
))
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
export {
|
|
89
|
+
StatusBar,
|
|
90
|
+
StatusBarItem,
|
|
91
|
+
StatusBarSection,
|
|
92
|
+
StatusBarSeparator,
|
|
93
|
+
StatusBarSignal,
|
|
94
|
+
statusBarVariants
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=status-bar.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/status-bar/status-bar.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { tv, type VariantProps } from \"../../../lib/tv.mjs\"\n\n/*\n * The thin instrument strip along the edge of an app shell: small mono read-outs in a start, a\n * center and an end region, divided by hairlines, with figures that tick in place. Read-only, and\n * not a live region: an item that deserves an announcement opts in with aria-live on its own.\n */\nexport const statusBarVariants = tv({\n slots: {\n root: [\n \"grid h-6 shrink-0 select-none grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-4 px-4\",\n \"font-mono text-[0.625rem] uppercase tracking-[0.2em] text-muted-foreground tabular-nums\",\n ],\n section: \"row-start-1 flex min-w-0 items-center gap-3 only:col-span-full\",\n item: \"inline-flex min-w-0 items-center gap-1.5 overflow-hidden whitespace-nowrap [&>:not([data-slot=status-bar-item-text])]:shrink-0\",\n itemText: \"min-w-0 truncate\",\n separator: \"h-3 w-px shrink-0 bg-border\",\n signal: \"inline-flex h-2.5 shrink-0 items-end gap-0.5\",\n signalBar: \"w-0.75 bg-foreground opacity-15 data-lit:opacity-80 transition-opacity duration-base ease-out motion-reduce-fade\",\n },\n variants: {\n align: {\n start: { section: \"col-start-1 justify-start\" },\n center: { section: \"col-start-2 justify-center\" },\n end: { section: \"col-start-3 justify-end\" },\n },\n tone: {\n default: { item: \"\" },\n muted: { item: \"text-muted-foreground/70\" },\n strong: { item: \"text-foreground\" },\n success: { item: \"text-success\" },\n },\n },\n defaultVariants: { align: \"start\", tone: \"default\" },\n})\n\nconst slots = statusBarVariants()\n\n/** A 24px, three-column grid (1fr auto 1fr) in small uppercase mono with tabular figures. */\nexport function StatusBar({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"status-bar\" className={slots.root({ className })} {...props} />\n}\n\nexport interface StatusBarSectionProps extends React.ComponentProps<\"div\"> {\n /** The section's column. A section on its own spans the whole bar. */\n align?: \"start\" | \"center\" | \"end\"\n}\n\n/** A row of read-outs; its align picks its column, so every section can be left out. */\nexport function StatusBarSection({ align = \"start\", className, ...props }: StatusBarSectionProps) {\n return (\n <div\n data-slot=\"status-bar-section\"\n data-align={align}\n className={statusBarVariants({ align }).section({ className })}\n {...props}\n />\n )\n}\n\nexport interface StatusBarItemProps extends React.ComponentProps<\"span\">, Pick<VariantProps<typeof statusBarVariants>, \"tone\"> {}\n\n/** Wraps each run of text so it truncates, while glyphs beside it (a dot, a Kbd) hold their size. */\nfunction wrapText(children: React.ReactNode): React.ReactNode {\n return React.Children.map(children, (child) =>\n typeof child === \"string\" || typeof child === \"number\" ? (\n <span data-slot=\"status-bar-item-text\" className={slots.itemText()}>\n {child}\n </span>\n ) : (\n child\n ),\n )\n}\n\n/** One read-out: runs of text end in an ellipsis, glyphs keep their size. */\nexport function StatusBarItem({ tone = \"default\", className, children, ...props }: StatusBarItemProps) {\n return (\n <span data-slot=\"status-bar-item\" className={statusBarVariants({ tone }).item({ className })} {...props}>\n {wrapText(children)}\n </span>\n )\n}\n\n/** A 12px hairline between read-outs, hidden from assistive tech. */\nexport function StatusBarSeparator({ className, ...props }: React.ComponentProps<\"span\">) {\n return <span data-slot=\"status-bar-separator\" aria-hidden className={slots.separator({ className })} {...props} />\n}\n\nconst BAR_HEIGHTS = [\"h-0.75\", \"h-1.25\", \"h-1.75\", \"h-2.25\"]\n\nexport interface StatusBarSignalProps extends Omit<React.ComponentProps<\"span\">, \"children\"> {\n /** How many of the four bars are lit, 0 to 4. Rounded and clamped. */\n level: number\n /** The meter's accessible name. */\n label?: string\n}\n\n/** A four-step meter: \"Signal, 3 of 4\". A change eases between steps. */\nexport function StatusBarSignal({ level, label = \"Signal\", className, ...props }: StatusBarSignalProps) {\n const value = Math.min(Math.max(Math.round(level), 0), 4)\n return (\n <span\n role=\"meter\"\n aria-label={label}\n aria-valuemin={0}\n aria-valuemax={4}\n aria-valuenow={value}\n aria-valuetext={`${value} of 4`}\n data-slot=\"status-bar-signal\"\n data-level={value}\n className={slots.signal({ className })}\n {...props}\n >\n {BAR_HEIGHTS.map((height, index) => (\n <span\n key={height}\n aria-hidden\n data-slot=\"status-bar-signal-bar\"\n data-lit={index < value || undefined}\n className={slots.signalBar({ className: height })}\n />\n ))}\n </span>\n )\n}\n"],"mappings":"AA0CS;AA1CT,YAAY,WAAW;AAEvB,SAAS,UAA6B;AAO/B,MAAM,oBAAoB,GAAG;AAAA,EAClC,OAAO;AAAA,IACL,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,IACF;AAAA,IACA,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,QAAQ;AAAA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AAC,GAAI,GAAG,OAC/F,mBAAS,QAAQ,GACpB;AAEJ;AAGO,SAAS,mBAAmB,EAAE,WAAW,GAAG,MAAM,GAAiC;AACxF,SAAO,oBAAC,UAAK,aAAU,wBAAuB,eAAW,MAAC,WAAW,MAAM,UAAU,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAClH;AAEA,MAAM,cAAc,CAAC,UAAU,UAAU,UAAU,QAAQ;AAUpD,SAAS,gBAAgB,EAAE,OAAO,QAAQ,UAAU,WAAW,GAAG,MAAM,GAAyB;AACtG,QAAM,QAAQ,KAAK,IAAI,KAAK,IAAI,KAAK,MAAM,KAAK,GAAG,CAAC,GAAG,CAAC;AACxD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAY;AAAA,MACZ,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,kBAAgB,GAAG,KAAK;AAAA,MACxB,aAAU;AAAA,MACV,cAAY;AAAA,MACZ,WAAW,MAAM,OAAO,EAAE,UAAU,CAAC;AAAA,MACpC,GAAG;AAAA,MAEH,sBAAY,IAAI,CAAC,QAAQ,UACxB;AAAA,QAAC;AAAA;AAAA,UAEC,eAAW;AAAA,UACX,aAAU;AAAA,UACV,YAAU,QAAQ,SAAS;AAAA,UAC3B,WAAW,MAAM,UAAU,EAAE,WAAW,OAAO,CAAC;AAAA;AAAA,QAJ3C;AAAA,MAKP,CACD;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Stepper,
|
|
3
|
+
StepperItem,
|
|
4
|
+
StepperTrigger,
|
|
5
|
+
StepperIndicator,
|
|
6
|
+
StepperTitle,
|
|
7
|
+
StepperDescription,
|
|
8
|
+
StepperSeparator,
|
|
9
|
+
StepperPanels,
|
|
10
|
+
StepperPanel,
|
|
11
|
+
stepperVariants
|
|
12
|
+
} from "./stepper.mjs";
|
|
13
|
+
export {
|
|
14
|
+
Stepper,
|
|
15
|
+
StepperDescription,
|
|
16
|
+
StepperIndicator,
|
|
17
|
+
StepperItem,
|
|
18
|
+
StepperPanel,
|
|
19
|
+
StepperPanels,
|
|
20
|
+
StepperSeparator,
|
|
21
|
+
StepperTitle,
|
|
22
|
+
StepperTrigger,
|
|
23
|
+
stepperVariants
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/stepper/index.ts"],"sourcesContent":["export {\n Stepper,\n StepperItem,\n StepperTrigger,\n StepperIndicator,\n StepperTitle,\n StepperDescription,\n StepperSeparator,\n StepperPanels,\n StepperPanel,\n stepperVariants,\n type StepperProps,\n type StepperItemProps,\n type StepperTriggerProps,\n type StepperPanelsProps,\n type StepperPanelProps,\n type StepperVariant,\n type StepperOrientation,\n} from \"./stepper.mjs\"\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAQK;","names":[]}
|