@thalavaisankar/atoms 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +24 -0
- package/README.md +142 -2
- package/THIRD_PARTY_NOTICES.md +246 -0
- package/dist/blocks/index.d.mts +2 -0
- package/dist/blocks/index.mjs +1 -0
- package/dist/blocks/index.mjs.map +1 -0
- package/dist/components/ui/accordion/accordion.mjs +194 -0
- package/dist/components/ui/accordion/accordion.mjs.map +1 -0
- package/dist/components/ui/accordion/index.mjs +15 -0
- package/dist/components/ui/accordion/index.mjs.map +1 -0
- package/dist/components/ui/activity-feed/activity-feed.mjs +287 -0
- package/dist/components/ui/activity-feed/activity-feed.mjs.map +1 -0
- package/dist/components/ui/activity-feed/index.mjs +39 -0
- package/dist/components/ui/activity-feed/index.mjs.map +1 -0
- package/dist/components/ui/alert/alert.mjs +128 -0
- package/dist/components/ui/alert/alert.mjs.map +1 -0
- package/dist/components/ui/alert/index.mjs +17 -0
- package/dist/components/ui/alert/index.mjs.map +1 -0
- package/dist/components/ui/animated-label/animated-label.mjs +89 -0
- package/dist/components/ui/animated-label/animated-label.mjs.map +1 -0
- package/dist/components/ui/animated-label/index.mjs +9 -0
- package/dist/components/ui/animated-label/index.mjs.map +1 -0
- package/dist/components/ui/animated-number/animated-number.mjs +101 -0
- package/dist/components/ui/animated-number/animated-number.mjs.map +1 -0
- package/dist/components/ui/animated-number/index.mjs +5 -0
- package/dist/components/ui/animated-number/index.mjs.map +1 -0
- package/dist/components/ui/avatar/avatar.mjs +130 -0
- package/dist/components/ui/avatar/avatar.mjs.map +1 -0
- package/dist/components/ui/avatar/index.mjs +17 -0
- package/dist/components/ui/avatar/index.mjs.map +1 -0
- package/dist/components/ui/avatar-group/avatar-group.mjs +49 -0
- package/dist/components/ui/avatar-group/avatar-group.mjs.map +1 -0
- package/dist/components/ui/avatar-group/index.mjs +5 -0
- package/dist/components/ui/avatar-group/index.mjs.map +1 -0
- package/dist/components/ui/badge/badge-motion.mjs +108 -0
- package/dist/components/ui/badge/badge-motion.mjs.map +1 -0
- package/dist/components/ui/badge/badge.mjs +314 -0
- package/dist/components/ui/badge/badge.mjs.map +1 -0
- package/dist/components/ui/badge/index.mjs +27 -0
- package/dist/components/ui/badge/index.mjs.map +1 -0
- package/dist/components/ui/badge/readable-ink.mjs +36 -0
- package/dist/components/ui/badge/readable-ink.mjs.map +1 -0
- package/dist/components/ui/badge-group/badge-group.mjs +132 -0
- package/dist/components/ui/badge-group/badge-group.mjs.map +1 -0
- package/dist/components/ui/badge-group/index.mjs +5 -0
- package/dist/components/ui/badge-group/index.mjs.map +1 -0
- package/dist/components/ui/breadcrumb/breadcrumb.mjs +108 -0
- package/dist/components/ui/breadcrumb/breadcrumb.mjs.map +1 -0
- package/dist/components/ui/breadcrumb/index.mjs +19 -0
- package/dist/components/ui/breadcrumb/index.mjs.map +1 -0
- package/dist/components/ui/button/button-variants.mjs +80 -0
- package/dist/components/ui/button/button-variants.mjs.map +1 -0
- package/dist/components/ui/button/button.mjs +74 -0
- package/dist/components/ui/button/button.mjs.map +1 -0
- package/dist/components/ui/button/index.mjs +17 -0
- package/dist/components/ui/button/index.mjs.map +1 -0
- package/dist/components/ui/button/social-button.mjs +45 -0
- package/dist/components/ui/button/social-button.mjs.map +1 -0
- package/dist/components/ui/button/social-logos.mjs +179 -0
- package/dist/components/ui/button/social-logos.mjs.map +1 -0
- package/dist/components/ui/button/split-button.mjs +72 -0
- package/dist/components/ui/button/split-button.mjs.map +1 -0
- package/dist/components/ui/button-group/button-group.mjs +58 -0
- package/dist/components/ui/button-group/button-group.mjs.map +1 -0
- package/dist/components/ui/button-group/index.mjs +11 -0
- package/dist/components/ui/button-group/index.mjs.map +1 -0
- package/dist/components/ui/card/card.mjs +131 -0
- package/dist/components/ui/card/card.mjs.map +1 -0
- package/dist/components/ui/card/index.mjs +23 -0
- package/dist/components/ui/card/index.mjs.map +1 -0
- package/dist/components/ui/chart/bar-list.mjs +87 -0
- package/dist/components/ui/chart/bar-list.mjs.map +1 -0
- package/dist/components/ui/chart/chart-colors.mjs +68 -0
- package/dist/components/ui/chart/chart-colors.mjs.map +1 -0
- package/dist/components/ui/chart/chart-geometry.mjs +152 -0
- package/dist/components/ui/chart/chart-geometry.mjs.map +1 -0
- package/dist/components/ui/chart/chart-specialized.mjs +194 -0
- package/dist/components/ui/chart/chart-specialized.mjs.map +1 -0
- package/dist/components/ui/chart/chart.mjs +648 -0
- package/dist/components/ui/chart/chart.mjs.map +1 -0
- package/dist/components/ui/chart/index.mjs +88 -0
- package/dist/components/ui/chart/index.mjs.map +1 -0
- package/dist/components/ui/chart/radial-meter.mjs +142 -0
- package/dist/components/ui/chart/radial-meter.mjs.map +1 -0
- package/dist/components/ui/chart/types.mjs +1 -0
- package/dist/components/ui/chart/types.mjs.map +1 -0
- package/dist/components/ui/checkbox/checkbox.mjs +183 -0
- package/dist/components/ui/checkbox/checkbox.mjs.map +1 -0
- package/dist/components/ui/checkbox/index.mjs +11 -0
- package/dist/components/ui/checkbox/index.mjs.map +1 -0
- package/dist/components/ui/checklist/checklist.mjs +353 -0
- package/dist/components/ui/checklist/checklist.mjs.map +1 -0
- package/dist/components/ui/checklist/index.mjs +33 -0
- package/dist/components/ui/checklist/index.mjs.map +1 -0
- package/dist/components/ui/chip/chip.mjs +202 -0
- package/dist/components/ui/chip/chip.mjs.map +1 -0
- package/dist/components/ui/chip/index.mjs +13 -0
- package/dist/components/ui/chip/index.mjs.map +1 -0
- package/dist/components/ui/chip-group/chip-group.mjs +204 -0
- package/dist/components/ui/chip-group/chip-group.mjs.map +1 -0
- package/dist/components/ui/chip-group/index.mjs +11 -0
- package/dist/components/ui/chip-group/index.mjs.map +1 -0
- package/dist/components/ui/code-snippet/code-highlighter.mjs +16 -0
- package/dist/components/ui/code-snippet/code-highlighter.mjs.map +1 -0
- package/dist/components/ui/code-snippet/code-snippet.mjs +437 -0
- package/dist/components/ui/code-snippet/code-snippet.mjs.map +1 -0
- package/dist/components/ui/code-snippet/index.mjs +17 -0
- package/dist/components/ui/code-snippet/index.mjs.map +1 -0
- package/dist/components/ui/code-snippet/labels.mjs +16 -0
- package/dist/components/ui/code-snippet/labels.mjs.map +1 -0
- package/dist/components/ui/code-snippet/tokenize.mjs +715 -0
- package/dist/components/ui/code-snippet/tokenize.mjs.map +1 -0
- package/dist/components/ui/code-snippet/types.mjs +1 -0
- package/dist/components/ui/code-snippet/types.mjs.map +1 -0
- package/dist/components/ui/collapsible/collapsible.mjs +85 -0
- package/dist/components/ui/collapsible/collapsible.mjs.map +1 -0
- package/dist/components/ui/collapsible/index.mjs +15 -0
- package/dist/components/ui/collapsible/index.mjs.map +1 -0
- package/dist/components/ui/color-picker/color-picker.mjs +852 -0
- package/dist/components/ui/color-picker/color-picker.mjs.map +1 -0
- package/dist/components/ui/color-picker/index.mjs +47 -0
- package/dist/components/ui/color-picker/index.mjs.map +1 -0
- package/dist/components/ui/combobox/combobox.mjs +745 -0
- package/dist/components/ui/combobox/combobox.mjs.map +1 -0
- package/dist/components/ui/combobox/index.mjs +27 -0
- package/dist/components/ui/combobox/index.mjs.map +1 -0
- package/dist/components/ui/command/command.mjs +439 -0
- package/dist/components/ui/command/command.mjs.map +1 -0
- package/dist/components/ui/command/index.mjs +31 -0
- package/dist/components/ui/command/index.mjs.map +1 -0
- package/dist/components/ui/compare-slider/compare-slider.mjs +335 -0
- package/dist/components/ui/compare-slider/compare-slider.mjs.map +1 -0
- package/dist/components/ui/compare-slider/index.mjs +17 -0
- package/dist/components/ui/compare-slider/index.mjs.map +1 -0
- package/dist/components/ui/context-menu/context-menu.mjs +184 -0
- package/dist/components/ui/context-menu/context-menu.mjs.map +1 -0
- package/dist/components/ui/context-menu/index.mjs +37 -0
- package/dist/components/ui/context-menu/index.mjs.map +1 -0
- package/dist/components/ui/data-table/active-filters.mjs +69 -0
- package/dist/components/ui/data-table/active-filters.mjs.map +1 -0
- package/dist/components/ui/data-table/body-row.mjs +118 -0
- package/dist/components/ui/data-table/body-row.mjs.map +1 -0
- package/dist/components/ui/data-table/cards.mjs +76 -0
- package/dist/components/ui/data-table/cards.mjs.map +1 -0
- package/dist/components/ui/data-table/data-table.mjs +680 -0
- package/dist/components/ui/data-table/data-table.mjs.map +1 -0
- package/dist/components/ui/data-table/empty.mjs +26 -0
- package/dist/components/ui/data-table/empty.mjs.map +1 -0
- package/dist/components/ui/data-table/expand.mjs +70 -0
- package/dist/components/ui/data-table/expand.mjs.map +1 -0
- package/dist/components/ui/data-table/faceted-filter.mjs +112 -0
- package/dist/components/ui/data-table/faceted-filter.mjs.map +1 -0
- package/dist/components/ui/data-table/features.mjs +96 -0
- package/dist/components/ui/data-table/features.mjs.map +1 -0
- package/dist/components/ui/data-table/grip.mjs +37 -0
- package/dist/components/ui/data-table/grip.mjs.map +1 -0
- package/dist/components/ui/data-table/header-cell.mjs +85 -0
- package/dist/components/ui/data-table/header-cell.mjs.map +1 -0
- package/dist/components/ui/data-table/index.mjs +55 -0
- package/dist/components/ui/data-table/index.mjs.map +1 -0
- package/dist/components/ui/data-table/labels.mjs +55 -0
- package/dist/components/ui/data-table/labels.mjs.map +1 -0
- package/dist/components/ui/data-table/load-more.mjs +56 -0
- package/dist/components/ui/data-table/load-more.mjs.map +1 -0
- package/dist/components/ui/data-table/move-item.mjs +11 -0
- package/dist/components/ui/data-table/move-item.mjs.map +1 -0
- package/dist/components/ui/data-table/persist.mjs +65 -0
- package/dist/components/ui/data-table/persist.mjs.map +1 -0
- package/dist/components/ui/data-table/selection-bar.mjs +51 -0
- package/dist/components/ui/data-table/selection-bar.mjs.map +1 -0
- package/dist/components/ui/data-table/tabs.mjs +48 -0
- package/dist/components/ui/data-table/tabs.mjs.map +1 -0
- package/dist/components/ui/data-table/toolbar.mjs +92 -0
- package/dist/components/ui/data-table/toolbar.mjs.map +1 -0
- package/dist/components/ui/data-table/use-reorder.mjs +239 -0
- package/dist/components/ui/data-table/use-reorder.mjs.map +1 -0
- package/dist/components/ui/data-table/use-reveal.mjs +24 -0
- package/dist/components/ui/data-table/use-reveal.mjs.map +1 -0
- package/dist/components/ui/data-table/use-table-state.mjs +38 -0
- package/dist/components/ui/data-table/use-table-state.mjs.map +1 -0
- package/dist/components/ui/data-table/view-options.mjs +66 -0
- package/dist/components/ui/data-table/view-options.mjs.map +1 -0
- package/dist/components/ui/date-picker/calendar.mjs +466 -0
- package/dist/components/ui/date-picker/calendar.mjs.map +1 -0
- package/dist/components/ui/date-picker/date-picker.mjs +366 -0
- package/dist/components/ui/date-picker/date-picker.mjs.map +1 -0
- package/dist/components/ui/date-picker/index.mjs +17 -0
- package/dist/components/ui/date-picker/index.mjs.map +1 -0
- package/dist/components/ui/date-picker/presets.mjs +49 -0
- package/dist/components/ui/date-picker/presets.mjs.map +1 -0
- package/dist/components/ui/description-list/description-list.mjs +40 -0
- package/dist/components/ui/description-list/description-list.mjs.map +1 -0
- package/dist/components/ui/description-list/index.mjs +15 -0
- package/dist/components/ui/description-list/index.mjs.map +1 -0
- package/dist/components/ui/dialog/dialog-stepper.mjs +23 -0
- package/dist/components/ui/dialog/dialog-stepper.mjs.map +1 -0
- package/dist/components/ui/dialog/dialog.mjs +343 -0
- package/dist/components/ui/dialog/dialog.mjs.map +1 -0
- package/dist/components/ui/dialog/focus-return.mjs +21 -0
- package/dist/components/ui/dialog/focus-return.mjs.map +1 -0
- package/dist/components/ui/dialog/index.mjs +33 -0
- package/dist/components/ui/dialog/index.mjs.map +1 -0
- package/dist/components/ui/divider/divider.mjs +130 -0
- package/dist/components/ui/divider/divider.mjs.map +1 -0
- package/dist/components/ui/divider/index.mjs +6 -0
- package/dist/components/ui/divider/index.mjs.map +1 -0
- package/dist/components/ui/dock/dock.mjs +444 -0
- package/dist/components/ui/dock/dock.mjs.map +1 -0
- package/dist/components/ui/dock/index.mjs +19 -0
- package/dist/components/ui/dock/index.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-actions.mjs +118 -0
- package/dist/components/ui/document-editor/block-actions.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-commands.mjs +182 -0
- package/dist/components/ui/document-editor/block-commands.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-handle.mjs +387 -0
- package/dist/components/ui/document-editor/block-handle.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-morph.mjs +95 -0
- package/dist/components/ui/document-editor/block-morph.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-selection.mjs +81 -0
- package/dist/components/ui/document-editor/block-selection.mjs.map +1 -0
- package/dist/components/ui/document-editor/blocks.mjs +30 -0
- package/dist/components/ui/document-editor/blocks.mjs.map +1 -0
- package/dist/components/ui/document-editor/bubble-menu.mjs +120 -0
- package/dist/components/ui/document-editor/bubble-menu.mjs.map +1 -0
- package/dist/components/ui/document-editor/code-block.mjs +89 -0
- package/dist/components/ui/document-editor/code-block.mjs.map +1 -0
- package/dist/components/ui/document-editor/collaboration-types.mjs +9 -0
- package/dist/components/ui/document-editor/collaboration-types.mjs.map +1 -0
- package/dist/components/ui/document-editor/collaboration.mjs +198 -0
- package/dist/components/ui/document-editor/collaboration.mjs.map +1 -0
- package/dist/components/ui/document-editor/columns.mjs +52 -0
- package/dist/components/ui/document-editor/columns.mjs.map +1 -0
- package/dist/components/ui/document-editor/contents.mjs +60 -0
- package/dist/components/ui/document-editor/contents.mjs.map +1 -0
- package/dist/components/ui/document-editor/date-chip.mjs +115 -0
- package/dist/components/ui/document-editor/date-chip.mjs.map +1 -0
- package/dist/components/ui/document-editor/date-words.mjs +101 -0
- package/dist/components/ui/document-editor/date-words.mjs.map +1 -0
- package/dist/components/ui/document-editor/doc-labels.mjs +19 -0
- package/dist/components/ui/document-editor/doc-labels.mjs.map +1 -0
- package/dist/components/ui/document-editor/document-editor.mjs +496 -0
- package/dist/components/ui/document-editor/document-editor.mjs.map +1 -0
- package/dist/components/ui/document-editor/emoji-suggest.mjs +81 -0
- package/dist/components/ui/document-editor/emoji-suggest.mjs.map +1 -0
- package/dist/components/ui/document-editor/focus-mode.mjs +32 -0
- package/dist/components/ui/document-editor/focus-mode.mjs.map +1 -0
- package/dist/components/ui/document-editor/geometry.mjs +35 -0
- package/dist/components/ui/document-editor/geometry.mjs.map +1 -0
- package/dist/components/ui/document-editor/ghost-text.mjs +154 -0
- package/dist/components/ui/document-editor/ghost-text.mjs.map +1 -0
- package/dist/components/ui/document-editor/gliding-caret.mjs +118 -0
- package/dist/components/ui/document-editor/gliding-caret.mjs.map +1 -0
- package/dist/components/ui/document-editor/headings.mjs +64 -0
- package/dist/components/ui/document-editor/headings.mjs.map +1 -0
- package/dist/components/ui/document-editor/image.mjs +318 -0
- package/dist/components/ui/document-editor/image.mjs.map +1 -0
- package/dist/components/ui/document-editor/index.mjs +131 -0
- package/dist/components/ui/document-editor/index.mjs.map +1 -0
- package/dist/components/ui/document-editor/labels.mjs +96 -0
- package/dist/components/ui/document-editor/labels.mjs.map +1 -0
- package/dist/components/ui/document-editor/link-card.mjs +138 -0
- package/dist/components/ui/document-editor/link-card.mjs.map +1 -0
- package/dist/components/ui/document-editor/mentions.mjs +105 -0
- package/dist/components/ui/document-editor/mentions.mjs.map +1 -0
- package/dist/components/ui/document-editor/outline.mjs +138 -0
- package/dist/components/ui/document-editor/outline.mjs.map +1 -0
- package/dist/components/ui/document-editor/section-fold.mjs +124 -0
- package/dist/components/ui/document-editor/section-fold.mjs.map +1 -0
- package/dist/components/ui/document-editor/slash-command.mjs +210 -0
- package/dist/components/ui/document-editor/slash-command.mjs.map +1 -0
- package/dist/components/ui/document-editor/suggest-list.mjs +187 -0
- package/dist/components/ui/document-editor/suggest-list.mjs.map +1 -0
- package/dist/components/ui/document-editor/table.mjs +242 -0
- package/dist/components/ui/document-editor/table.mjs.map +1 -0
- package/dist/components/ui/document-editor/templates.mjs +66 -0
- package/dist/components/ui/document-editor/templates.mjs.map +1 -0
- package/dist/components/ui/document-editor/toggle.mjs +176 -0
- package/dist/components/ui/document-editor/toggle.mjs.map +1 -0
- package/dist/components/ui/document-editor/typography-rules.mjs +8 -0
- package/dist/components/ui/document-editor/typography-rules.mjs.map +1 -0
- package/dist/components/ui/document-editor/use-editor-value.mjs +34 -0
- package/dist/components/ui/document-editor/use-editor-value.mjs.map +1 -0
- package/dist/components/ui/drawer/drawer-nav.mjs +153 -0
- package/dist/components/ui/drawer/drawer-nav.mjs.map +1 -0
- package/dist/components/ui/drawer/drawer.mjs +334 -0
- package/dist/components/ui/drawer/drawer.mjs.map +1 -0
- package/dist/components/ui/drawer/index.mjs +37 -0
- package/dist/components/ui/drawer/index.mjs.map +1 -0
- package/dist/components/ui/drawer/use-swipe-to-close.mjs +77 -0
- package/dist/components/ui/drawer/use-swipe-to-close.mjs.map +1 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.mjs +567 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.mjs.map +1 -0
- package/dist/components/ui/dropdown-menu/index.mjs +43 -0
- package/dist/components/ui/dropdown-menu/index.mjs.map +1 -0
- package/dist/components/ui/editable-text/editable-text.mjs +148 -0
- package/dist/components/ui/editable-text/editable-text.mjs.map +1 -0
- package/dist/components/ui/editable-text/index.mjs +6 -0
- package/dist/components/ui/editable-text/index.mjs.map +1 -0
- package/dist/components/ui/emoji-picker/emoji-data.mjs +469 -0
- package/dist/components/ui/emoji-picker/emoji-data.mjs.map +1 -0
- package/dist/components/ui/emoji-picker/emoji-picker.mjs +464 -0
- package/dist/components/ui/emoji-picker/emoji-picker.mjs.map +1 -0
- package/dist/components/ui/emoji-picker/index.mjs +19 -0
- package/dist/components/ui/emoji-picker/index.mjs.map +1 -0
- package/dist/components/ui/empty-state/empty-state.mjs +110 -0
- package/dist/components/ui/empty-state/empty-state.mjs.map +1 -0
- package/dist/components/ui/empty-state/index.mjs +17 -0
- package/dist/components/ui/empty-state/index.mjs.map +1 -0
- package/dist/components/ui/event-calendar/calendar-math.mjs +256 -0
- package/dist/components/ui/event-calendar/calendar-math.mjs.map +1 -0
- package/dist/components/ui/event-calendar/context.mjs +51 -0
- package/dist/components/ui/event-calendar/context.mjs.map +1 -0
- package/dist/components/ui/event-calendar/editor.mjs +292 -0
- package/dist/components/ui/event-calendar/editor.mjs.map +1 -0
- package/dist/components/ui/event-calendar/event-block.mjs +55 -0
- package/dist/components/ui/event-calendar/event-block.mjs.map +1 -0
- package/dist/components/ui/event-calendar/event-calendar.mjs +438 -0
- package/dist/components/ui/event-calendar/event-calendar.mjs.map +1 -0
- package/dist/components/ui/event-calendar/event-keys.mjs +41 -0
- package/dist/components/ui/event-calendar/event-keys.mjs.map +1 -0
- package/dist/components/ui/event-calendar/index.mjs +37 -0
- package/dist/components/ui/event-calendar/index.mjs.map +1 -0
- package/dist/components/ui/event-calendar/month-grid.mjs +207 -0
- package/dist/components/ui/event-calendar/month-grid.mjs.map +1 -0
- package/dist/components/ui/event-calendar/narrow.mjs +193 -0
- package/dist/components/ui/event-calendar/narrow.mjs.map +1 -0
- package/dist/components/ui/event-calendar/time-grid.mjs +534 -0
- package/dist/components/ui/event-calendar/time-grid.mjs.map +1 -0
- package/dist/components/ui/expandable-search/expandable-search.mjs +174 -0
- package/dist/components/ui/expandable-search/expandable-search.mjs.map +1 -0
- package/dist/components/ui/expandable-search/index.mjs +6 -0
- package/dist/components/ui/expandable-search/index.mjs.map +1 -0
- package/dist/components/ui/field/field.mjs +444 -0
- package/dist/components/ui/field/field.mjs.map +1 -0
- package/dist/components/ui/field/index.mjs +21 -0
- package/dist/components/ui/field/index.mjs.map +1 -0
- package/dist/components/ui/file-card/file-card.mjs +198 -0
- package/dist/components/ui/file-card/file-card.mjs.map +1 -0
- package/dist/components/ui/file-card/file-icon.mjs +66 -0
- package/dist/components/ui/file-card/file-icon.mjs.map +1 -0
- package/dist/components/ui/file-card/file-types.mjs +70 -0
- package/dist/components/ui/file-card/file-types.mjs.map +1 -0
- package/dist/components/ui/file-card/index.mjs +32 -0
- package/dist/components/ui/file-card/index.mjs.map +1 -0
- package/dist/components/ui/file-preview/context.mjs +77 -0
- package/dist/components/ui/file-preview/context.mjs.map +1 -0
- package/dist/components/ui/file-preview/file-preview.mjs +865 -0
- package/dist/components/ui/file-preview/file-preview.mjs.map +1 -0
- package/dist/components/ui/file-preview/index.mjs +56 -0
- package/dist/components/ui/file-preview/index.mjs.map +1 -0
- package/dist/components/ui/file-preview/pdf.mjs +250 -0
- package/dist/components/ui/file-preview/pdf.mjs.map +1 -0
- package/dist/components/ui/file-preview/renderers.mjs +257 -0
- package/dist/components/ui/file-preview/renderers.mjs.map +1 -0
- package/dist/components/ui/file-upload/file-upload.mjs +633 -0
- package/dist/components/ui/file-upload/file-upload.mjs.map +1 -0
- package/dist/components/ui/file-upload/index.mjs +42 -0
- package/dist/components/ui/file-upload/index.mjs.map +1 -0
- package/dist/components/ui/file-upload/validate.mjs +111 -0
- package/dist/components/ui/file-upload/validate.mjs.map +1 -0
- package/dist/components/ui/flag/flag.mjs +39 -0
- package/dist/components/ui/flag/flag.mjs.map +1 -0
- package/dist/components/ui/flag/index.mjs +7 -0
- package/dist/components/ui/flag/index.mjs.map +1 -0
- package/dist/components/ui/floating-window/floating-window.mjs +255 -0
- package/dist/components/ui/floating-window/floating-window.mjs.map +1 -0
- package/dist/components/ui/floating-window/index.mjs +11 -0
- package/dist/components/ui/floating-window/index.mjs.map +1 -0
- package/dist/components/ui/form/form-section.mjs +87 -0
- package/dist/components/ui/form/form-section.mjs.map +1 -0
- package/dist/components/ui/form/form.mjs +205 -0
- package/dist/components/ui/form/form.mjs.map +1 -0
- package/dist/components/ui/form/index.mjs +29 -0
- package/dist/components/ui/form/index.mjs.map +1 -0
- package/dist/components/ui/globe/globe-data.mjs +9 -0
- package/dist/components/ui/globe/globe-data.mjs.map +1 -0
- package/dist/components/ui/globe/globe-math.mjs +269 -0
- package/dist/components/ui/globe/globe-math.mjs.map +1 -0
- package/dist/components/ui/globe/globe.mjs +719 -0
- package/dist/components/ui/globe/globe.mjs.map +1 -0
- package/dist/components/ui/globe/index.mjs +13 -0
- package/dist/components/ui/globe/index.mjs.map +1 -0
- package/dist/components/ui/highlight-match/highlight-children.mjs +13 -0
- package/dist/components/ui/highlight-match/highlight-children.mjs.map +1 -0
- package/dist/components/ui/highlight-match/highlight-match-variants.mjs +17 -0
- package/dist/components/ui/highlight-match/highlight-match-variants.mjs.map +1 -0
- package/dist/components/ui/highlight-match/highlight-match.mjs +37 -0
- package/dist/components/ui/highlight-match/highlight-match.mjs.map +1 -0
- package/dist/components/ui/highlight-match/index.mjs +15 -0
- package/dist/components/ui/highlight-match/index.mjs.map +1 -0
- package/dist/components/ui/highlight-match/match-ranges.mjs +50 -0
- package/dist/components/ui/highlight-match/match-ranges.mjs.map +1 -0
- package/dist/components/ui/histogram-slider/histogram-slider.mjs +83 -0
- package/dist/components/ui/histogram-slider/histogram-slider.mjs.map +1 -0
- package/dist/components/ui/histogram-slider/index.mjs +6 -0
- package/dist/components/ui/histogram-slider/index.mjs.map +1 -0
- package/dist/components/ui/hold-button/hold-button.mjs +258 -0
- package/dist/components/ui/hold-button/hold-button.mjs.map +1 -0
- package/dist/components/ui/hold-button/index.mjs +6 -0
- package/dist/components/ui/hold-button/index.mjs.map +1 -0
- package/dist/components/ui/hover-card/hover-card.mjs +111 -0
- package/dist/components/ui/hover-card/hover-card.mjs.map +1 -0
- package/dist/components/ui/hover-card/index.mjs +21 -0
- package/dist/components/ui/hover-card/index.mjs.map +1 -0
- package/dist/components/ui/ink-tray/index.mjs +29 -0
- package/dist/components/ui/ink-tray/index.mjs.map +1 -0
- package/dist/components/ui/ink-tray/ink-tray-art.mjs +68 -0
- package/dist/components/ui/ink-tray/ink-tray-art.mjs.map +1 -0
- package/dist/components/ui/ink-tray/ink-tray.mjs +350 -0
- package/dist/components/ui/ink-tray/ink-tray.mjs.map +1 -0
- package/dist/components/ui/input/index.mjs +41 -0
- package/dist/components/ui/input/index.mjs.map +1 -0
- package/dist/components/ui/input/input.mjs +268 -0
- package/dist/components/ui/input/input.mjs.map +1 -0
- package/dist/components/ui/input/number-input.mjs +272 -0
- package/dist/components/ui/input/number-input.mjs.map +1 -0
- package/dist/components/ui/input/password-input.mjs +49 -0
- package/dist/components/ui/input/password-input.mjs.map +1 -0
- package/dist/components/ui/input/phone-input-countries.mjs +216 -0
- package/dist/components/ui/input/phone-input-countries.mjs.map +1 -0
- package/dist/components/ui/input/phone-input.mjs +326 -0
- package/dist/components/ui/input/phone-input.mjs.map +1 -0
- package/dist/components/ui/input/use-controllable-state.mjs +24 -0
- package/dist/components/ui/input/use-controllable-state.mjs.map +1 -0
- package/dist/components/ui/input/use-hold-repeat.mjs +35 -0
- package/dist/components/ui/input/use-hold-repeat.mjs.map +1 -0
- package/dist/components/ui/input-group/index.mjs +11 -0
- package/dist/components/ui/input-group/index.mjs.map +1 -0
- package/dist/components/ui/input-group/input-group.mjs +78 -0
- package/dist/components/ui/input-group/input-group.mjs.map +1 -0
- package/dist/components/ui/island/index.mjs +23 -0
- package/dist/components/ui/island/index.mjs.map +1 -0
- package/dist/components/ui/island/island.mjs +328 -0
- package/dist/components/ui/island/island.mjs.map +1 -0
- package/dist/components/ui/kbd/index.mjs +6 -0
- package/dist/components/ui/kbd/index.mjs.map +1 -0
- package/dist/components/ui/kbd/kbd.mjs +73 -0
- package/dist/components/ui/kbd/kbd.mjs.map +1 -0
- package/dist/components/ui/keypad/index.mjs +23 -0
- package/dist/components/ui/keypad/index.mjs.map +1 -0
- package/dist/components/ui/keypad/keypad.mjs +345 -0
- package/dist/components/ui/keypad/keypad.mjs.map +1 -0
- package/dist/components/ui/label/index.mjs +7 -0
- package/dist/components/ui/label/index.mjs.map +1 -0
- package/dist/components/ui/label/label.mjs +117 -0
- package/dist/components/ui/label/label.mjs.map +1 -0
- package/dist/components/ui/lightbox/index.mjs +47 -0
- package/dist/components/ui/lightbox/index.mjs.map +1 -0
- package/dist/components/ui/lightbox/labels.mjs +23 -0
- package/dist/components/ui/lightbox/labels.mjs.map +1 -0
- package/dist/components/ui/lightbox/lightbox.mjs +1359 -0
- package/dist/components/ui/lightbox/lightbox.mjs.map +1 -0
- package/dist/components/ui/link/index.mjs +6 -0
- package/dist/components/ui/link/index.mjs.map +1 -0
- package/dist/components/ui/link/link.mjs +64 -0
- package/dist/components/ui/link/link.mjs.map +1 -0
- package/dist/components/ui/list/index.mjs +35 -0
- package/dist/components/ui/list/index.mjs.map +1 -0
- package/dist/components/ui/list/list.mjs +505 -0
- package/dist/components/ui/list/list.mjs.map +1 -0
- package/dist/components/ui/load-more/index.mjs +23 -0
- package/dist/components/ui/load-more/index.mjs.map +1 -0
- package/dist/components/ui/load-more/load-more.mjs +409 -0
- package/dist/components/ui/load-more/load-more.mjs.map +1 -0
- package/dist/components/ui/map/index.mjs +27 -0
- package/dist/components/ui/map/index.mjs.map +1 -0
- package/dist/components/ui/map/map-style.mjs +169 -0
- package/dist/components/ui/map/map-style.mjs.map +1 -0
- package/dist/components/ui/map/map.mjs +624 -0
- package/dist/components/ui/map/map.mjs.map +1 -0
- package/dist/components/ui/map-pin/index.mjs +6 -0
- package/dist/components/ui/map-pin/index.mjs.map +1 -0
- package/dist/components/ui/map-pin/map-pin.mjs +55 -0
- package/dist/components/ui/map-pin/map-pin.mjs.map +1 -0
- package/dist/components/ui/mention/index.mjs +29 -0
- package/dist/components/ui/mention/index.mjs.map +1 -0
- package/dist/components/ui/mention/mention.mjs +262 -0
- package/dist/components/ui/mention/mention.mjs.map +1 -0
- package/dist/components/ui/mention/split-mentions.mjs +24 -0
- package/dist/components/ui/mention/split-mentions.mjs.map +1 -0
- package/dist/components/ui/menubar/index.mjs +39 -0
- package/dist/components/ui/menubar/index.mjs.map +1 -0
- package/dist/components/ui/menubar/menubar.mjs +222 -0
- package/dist/components/ui/menubar/menubar.mjs.map +1 -0
- package/dist/components/ui/meter/index.mjs +21 -0
- package/dist/components/ui/meter/index.mjs.map +1 -0
- package/dist/components/ui/meter/meter.mjs +167 -0
- package/dist/components/ui/meter/meter.mjs.map +1 -0
- package/dist/components/ui/multi-select/index.mjs +25 -0
- package/dist/components/ui/multi-select/index.mjs.map +1 -0
- package/dist/components/ui/multi-select/multi-select.mjs +285 -0
- package/dist/components/ui/multi-select/multi-select.mjs.map +1 -0
- package/dist/components/ui/navigation-menu/index.mjs +41 -0
- package/dist/components/ui/navigation-menu/index.mjs.map +1 -0
- package/dist/components/ui/navigation-menu/navigation-menu.mjs +396 -0
- package/dist/components/ui/navigation-menu/navigation-menu.mjs.map +1 -0
- package/dist/components/ui/notebook-page/index.mjs +15 -0
- package/dist/components/ui/notebook-page/index.mjs.map +1 -0
- package/dist/components/ui/notebook-page/notebook-page.mjs +162 -0
- package/dist/components/ui/notebook-page/notebook-page.mjs.map +1 -0
- package/dist/components/ui/notification-inbox/index.mjs +47 -0
- package/dist/components/ui/notification-inbox/index.mjs.map +1 -0
- package/dist/components/ui/notification-inbox/notification-inbox.mjs +422 -0
- package/dist/components/ui/notification-inbox/notification-inbox.mjs.map +1 -0
- package/dist/components/ui/number-field/index.mjs +24 -0
- package/dist/components/ui/number-field/index.mjs.map +1 -0
- package/dist/components/ui/number-field/number-field.mjs +460 -0
- package/dist/components/ui/number-field/number-field.mjs.map +1 -0
- package/dist/components/ui/number-field/number-format.mjs +48 -0
- package/dist/components/ui/number-field/number-format.mjs.map +1 -0
- package/dist/components/ui/otp-input/index.mjs +9 -0
- package/dist/components/ui/otp-input/index.mjs.map +1 -0
- package/dist/components/ui/otp-input/otp-input.mjs +285 -0
- package/dist/components/ui/otp-input/otp-input.mjs.map +1 -0
- package/dist/components/ui/pager/index.mjs +7 -0
- package/dist/components/ui/pager/index.mjs.map +1 -0
- package/dist/components/ui/pager/pager.mjs +86 -0
- package/dist/components/ui/pager/pager.mjs.map +1 -0
- package/dist/components/ui/pagination/index.mjs +23 -0
- package/dist/components/ui/pagination/index.mjs.map +1 -0
- package/dist/components/ui/pagination/pagination.mjs +210 -0
- package/dist/components/ui/pagination/pagination.mjs.map +1 -0
- package/dist/components/ui/password-strength/index.mjs +21 -0
- package/dist/components/ui/password-strength/index.mjs.map +1 -0
- package/dist/components/ui/password-strength/password-rules.mjs +25 -0
- package/dist/components/ui/password-strength/password-rules.mjs.map +1 -0
- package/dist/components/ui/password-strength/password-strength.mjs +125 -0
- package/dist/components/ui/password-strength/password-strength.mjs.map +1 -0
- package/dist/components/ui/popover/index.mjs +31 -0
- package/dist/components/ui/popover/index.mjs.map +1 -0
- package/dist/components/ui/popover/popover.mjs +574 -0
- package/dist/components/ui/popover/popover.mjs.map +1 -0
- package/dist/components/ui/progress/index.mjs +15 -0
- package/dist/components/ui/progress/index.mjs.map +1 -0
- package/dist/components/ui/progress/progress.mjs +224 -0
- package/dist/components/ui/progress/progress.mjs.map +1 -0
- package/dist/components/ui/prose/index.mjs +6 -0
- package/dist/components/ui/prose/index.mjs.map +1 -0
- package/dist/components/ui/prose/prose.mjs +89 -0
- package/dist/components/ui/prose/prose.mjs.map +1 -0
- package/dist/components/ui/radio-group/index.mjs +15 -0
- package/dist/components/ui/radio-group/index.mjs.map +1 -0
- package/dist/components/ui/radio-group/radio-group.mjs +88 -0
- package/dist/components/ui/radio-group/radio-group.mjs.map +1 -0
- package/dist/components/ui/rating/index.mjs +6 -0
- package/dist/components/ui/rating/index.mjs.map +1 -0
- package/dist/components/ui/rating/rating.mjs +119 -0
- package/dist/components/ui/rating/rating.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/bubble-menu.mjs +120 -0
- package/dist/components/ui/rich-text-editor/bubble-menu.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/image-links.mjs +63 -0
- package/dist/components/ui/rich-text-editor/image-links.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/index.mjs +37 -0
- package/dist/components/ui/rich-text-editor/index.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/labels.mjs +27 -0
- package/dist/components/ui/rich-text-editor/labels.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/rich-text-editor.mjs +149 -0
- package/dist/components/ui/rich-text-editor/rich-text-editor.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/toolbar.mjs +325 -0
- package/dist/components/ui/rich-text-editor/toolbar.mjs.map +1 -0
- package/dist/components/ui/save-bar/index.mjs +13 -0
- package/dist/components/ui/save-bar/index.mjs.map +1 -0
- package/dist/components/ui/save-bar/save-bar.mjs +59 -0
- package/dist/components/ui/save-bar/save-bar.mjs.map +1 -0
- package/dist/components/ui/scroll-area/index.mjs +6 -0
- package/dist/components/ui/scroll-area/index.mjs.map +1 -0
- package/dist/components/ui/scroll-area/scroll-area.mjs +148 -0
- package/dist/components/ui/scroll-area/scroll-area.mjs.map +1 -0
- package/dist/components/ui/scroll-area/use-drag-scroll.mjs +134 -0
- package/dist/components/ui/scroll-area/use-drag-scroll.mjs.map +1 -0
- package/dist/components/ui/select/index.mjs +23 -0
- package/dist/components/ui/select/index.mjs.map +1 -0
- package/dist/components/ui/select/select.mjs +216 -0
- package/dist/components/ui/select/select.mjs.map +1 -0
- package/dist/components/ui/sheet/index.mjs +23 -0
- package/dist/components/ui/sheet/index.mjs.map +1 -0
- package/dist/components/ui/sheet/sheet.mjs +292 -0
- package/dist/components/ui/sheet/sheet.mjs.map +1 -0
- package/dist/components/ui/sidebar/index.mjs +122 -0
- package/dist/components/ui/sidebar/index.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-group.mjs +75 -0
- package/dist/components/ui/sidebar/sidebar-group.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-item.mjs +199 -0
- package/dist/components/ui/sidebar/sidebar-item.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-panels.mjs +182 -0
- package/dist/components/ui/sidebar/sidebar-panels.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-peek.mjs +324 -0
- package/dist/components/ui/sidebar/sidebar-peek.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-rich.mjs +65 -0
- package/dist/components/ui/sidebar/sidebar-rich.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-tree.mjs +224 -0
- package/dist/components/ui/sidebar/sidebar-tree.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar.mjs +205 -0
- package/dist/components/ui/sidebar/sidebar.mjs.map +1 -0
- package/dist/components/ui/sidebar/variants.mjs +396 -0
- package/dist/components/ui/sidebar/variants.mjs.map +1 -0
- package/dist/components/ui/signature/index.mjs +6 -0
- package/dist/components/ui/signature/index.mjs.map +1 -0
- package/dist/components/ui/signature/signature.mjs +145 -0
- package/dist/components/ui/signature/signature.mjs.map +1 -0
- package/dist/components/ui/signature-pad/index.mjs +19 -0
- package/dist/components/ui/signature-pad/index.mjs.map +1 -0
- package/dist/components/ui/signature-pad/signature-pad.mjs +210 -0
- package/dist/components/ui/signature-pad/signature-pad.mjs.map +1 -0
- package/dist/components/ui/signature-pad/strokes.mjs +68 -0
- package/dist/components/ui/signature-pad/strokes.mjs.map +1 -0
- package/dist/components/ui/skeleton/index.mjs +9 -0
- package/dist/components/ui/skeleton/index.mjs.map +1 -0
- package/dist/components/ui/skeleton/skeleton.mjs +58 -0
- package/dist/components/ui/skeleton/skeleton.mjs.map +1 -0
- package/dist/components/ui/slide/index.mjs +25 -0
- package/dist/components/ui/slide/index.mjs.map +1 -0
- package/dist/components/ui/slide/slide.mjs +159 -0
- package/dist/components/ui/slide/slide.mjs.map +1 -0
- package/dist/components/ui/slider/index.mjs +21 -0
- package/dist/components/ui/slider/index.mjs.map +1 -0
- package/dist/components/ui/slider/slider-input.mjs +449 -0
- package/dist/components/ui/slider/slider-input.mjs.map +1 -0
- package/dist/components/ui/slider/slider.mjs +235 -0
- package/dist/components/ui/slider/slider.mjs.map +1 -0
- package/dist/components/ui/slides/index.mjs +31 -0
- package/dist/components/ui/slides/index.mjs.map +1 -0
- package/dist/components/ui/slides/slides.mjs +890 -0
- package/dist/components/ui/slides/slides.mjs.map +1 -0
- package/dist/components/ui/smooth-anchors/index.mjs +17 -0
- package/dist/components/ui/smooth-anchors/index.mjs.map +1 -0
- package/dist/components/ui/smooth-anchors/smooth-anchors.mjs +75 -0
- package/dist/components/ui/smooth-anchors/smooth-anchors.mjs.map +1 -0
- package/dist/components/ui/smooth-anchors/smooth-scroll.mjs +87 -0
- package/dist/components/ui/smooth-anchors/smooth-scroll.mjs.map +1 -0
- package/dist/components/ui/spinner/index.mjs +6 -0
- package/dist/components/ui/spinner/index.mjs.map +1 -0
- package/dist/components/ui/spinner/spinner.mjs +49 -0
- package/dist/components/ui/spinner/spinner.mjs.map +1 -0
- package/dist/components/ui/stat/index.mjs +29 -0
- package/dist/components/ui/stat/index.mjs.map +1 -0
- package/dist/components/ui/stat/stat.mjs +226 -0
- package/dist/components/ui/stat/stat.mjs.map +1 -0
- package/dist/components/ui/status-bar/index.mjs +17 -0
- package/dist/components/ui/status-bar/index.mjs.map +1 -0
- package/dist/components/ui/status-bar/status-bar.mjs +96 -0
- package/dist/components/ui/status-bar/status-bar.mjs.map +1 -0
- package/dist/components/ui/stepper/index.mjs +25 -0
- package/dist/components/ui/stepper/index.mjs.map +1 -0
- package/dist/components/ui/stepper/stepper.mjs +235 -0
- package/dist/components/ui/stepper/stepper.mjs.map +1 -0
- package/dist/components/ui/steps/index.mjs +9 -0
- package/dist/components/ui/steps/index.mjs.map +1 -0
- package/dist/components/ui/steps/steps.mjs +70 -0
- package/dist/components/ui/steps/steps.mjs.map +1 -0
- package/dist/components/ui/swatch-grid/index.mjs +7 -0
- package/dist/components/ui/swatch-grid/index.mjs.map +1 -0
- package/dist/components/ui/swatch-grid/swatch-grid.mjs +110 -0
- package/dist/components/ui/swatch-grid/swatch-grid.mjs.map +1 -0
- package/dist/components/ui/switch/index.mjs +7 -0
- package/dist/components/ui/switch/index.mjs.map +1 -0
- package/dist/components/ui/switch/switch.mjs +79 -0
- package/dist/components/ui/switch/switch.mjs.map +1 -0
- package/dist/components/ui/tab-strip/index.mjs +13 -0
- package/dist/components/ui/tab-strip/index.mjs.map +1 -0
- package/dist/components/ui/tab-strip/tab-strip.mjs +244 -0
- package/dist/components/ui/tab-strip/tab-strip.mjs.map +1 -0
- package/dist/components/ui/table/index.mjs +27 -0
- package/dist/components/ui/table/index.mjs.map +1 -0
- package/dist/components/ui/table/table.mjs +290 -0
- package/dist/components/ui/table/table.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/index.mjs +20 -0
- package/dist/components/ui/table-of-contents/index.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/scroll-spy.mjs +60 -0
- package/dist/components/ui/table-of-contents/scroll-spy.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/table-of-contents.mjs +371 -0
- package/dist/components/ui/table-of-contents/table-of-contents.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/use-headings.mjs +40 -0
- package/dist/components/ui/table-of-contents/use-headings.mjs.map +1 -0
- package/dist/components/ui/tablet-frame/index.mjs +7 -0
- package/dist/components/ui/tablet-frame/index.mjs.map +1 -0
- package/dist/components/ui/tablet-frame/tablet-frame.mjs +48 -0
- package/dist/components/ui/tablet-frame/tablet-frame.mjs.map +1 -0
- package/dist/components/ui/tabs/index.mjs +25 -0
- package/dist/components/ui/tabs/index.mjs.map +1 -0
- package/dist/components/ui/tabs/tabs.mjs +382 -0
- package/dist/components/ui/tabs/tabs.mjs.map +1 -0
- package/dist/components/ui/tabs/use-tabs-indicator.mjs +90 -0
- package/dist/components/ui/tabs/use-tabs-indicator.mjs.map +1 -0
- package/dist/components/ui/tags-input/index.mjs +9 -0
- package/dist/components/ui/tags-input/index.mjs.map +1 -0
- package/dist/components/ui/tags-input/split.mjs +38 -0
- package/dist/components/ui/tags-input/split.mjs.map +1 -0
- package/dist/components/ui/tags-input/tags-input.mjs +328 -0
- package/dist/components/ui/tags-input/tags-input.mjs.map +1 -0
- package/dist/components/ui/terminal/index.mjs +41 -0
- package/dist/components/ui/terminal/index.mjs.map +1 -0
- package/dist/components/ui/terminal/terminal.mjs +287 -0
- package/dist/components/ui/terminal/terminal.mjs.map +1 -0
- package/dist/components/ui/textarea/index.mjs +21 -0
- package/dist/components/ui/textarea/index.mjs.map +1 -0
- package/dist/components/ui/textarea/textarea.mjs +244 -0
- package/dist/components/ui/textarea/textarea.mjs.map +1 -0
- package/dist/components/ui/toast/index.mjs +19 -0
- package/dist/components/ui/toast/index.mjs.map +1 -0
- package/dist/components/ui/toast/store.mjs +96 -0
- package/dist/components/ui/toast/store.mjs.map +1 -0
- package/dist/components/ui/toast/toast.mjs +395 -0
- package/dist/components/ui/toast/toast.mjs.map +1 -0
- package/dist/components/ui/toggle/index.mjs +13 -0
- package/dist/components/ui/toggle/index.mjs.map +1 -0
- package/dist/components/ui/toggle/toggle.mjs +123 -0
- package/dist/components/ui/toggle/toggle.mjs.map +1 -0
- package/dist/components/ui/toggle-group/index.mjs +11 -0
- package/dist/components/ui/toggle-group/index.mjs.map +1 -0
- package/dist/components/ui/toggle-group/toggle-group.mjs +243 -0
- package/dist/components/ui/toggle-group/toggle-group.mjs.map +1 -0
- package/dist/components/ui/toggletip/index.mjs +6 -0
- package/dist/components/ui/toggletip/index.mjs.map +1 -0
- package/dist/components/ui/toggletip/toggletip.mjs +95 -0
- package/dist/components/ui/toggletip/toggletip.mjs.map +1 -0
- package/dist/components/ui/toolbar/index.mjs +21 -0
- package/dist/components/ui/toolbar/index.mjs.map +1 -0
- package/dist/components/ui/toolbar/toolbar.mjs +130 -0
- package/dist/components/ui/toolbar/toolbar.mjs.map +1 -0
- package/dist/components/ui/tooltip/index.mjs +29 -0
- package/dist/components/ui/tooltip/index.mjs.map +1 -0
- package/dist/components/ui/tooltip/tooltip.mjs +640 -0
- package/dist/components/ui/tooltip/tooltip.mjs.map +1 -0
- package/dist/components/ui/tree/index.mjs +11 -0
- package/dist/components/ui/tree/index.mjs.map +1 -0
- package/dist/components/ui/tree/tree.mjs +450 -0
- package/dist/components/ui/tree/tree.mjs.map +1 -0
- package/dist/index.d.mts +19332 -0
- package/dist/index.mjs +155 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/color.mjs +78 -0
- package/dist/lib/color.mjs.map +1 -0
- package/dist/lib/create-context.mjs +31 -0
- package/dist/lib/create-context.mjs.map +1 -0
- package/dist/lib/date.mjs +116 -0
- package/dist/lib/date.mjs.map +1 -0
- package/dist/lib/density.mjs +79 -0
- package/dist/lib/density.mjs.map +1 -0
- package/dist/lib/field-context.mjs +13 -0
- package/dist/lib/field-context.mjs.map +1 -0
- package/dist/lib/filter.mjs +28 -0
- package/dist/lib/filter.mjs.map +1 -0
- package/dist/lib/gesture.mjs +38 -0
- package/dist/lib/gesture.mjs.map +1 -0
- package/dist/lib/hit-area.mjs +14 -0
- package/dist/lib/hit-area.mjs.map +1 -0
- package/dist/lib/labels.mjs +27 -0
- package/dist/lib/labels.mjs.map +1 -0
- package/dist/lib/morph-box.mjs +56 -0
- package/dist/lib/morph-box.mjs.map +1 -0
- package/dist/lib/motion.mjs +70 -0
- package/dist/lib/motion.mjs.map +1 -0
- package/dist/lib/pulse.mjs +69 -0
- package/dist/lib/pulse.mjs.map +1 -0
- package/dist/lib/roving-focus.mjs +74 -0
- package/dist/lib/roving-focus.mjs.map +1 -0
- package/dist/lib/tv.mjs +11 -0
- package/dist/lib/tv.mjs.map +1 -0
- package/dist/lib/utils.mjs +82 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/dist/styles.css +2 -0
- package/package.json +133 -4
|
@@ -0,0 +1,680 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import {
|
|
5
|
+
useTable
|
|
6
|
+
} from "@tanstack/react-table";
|
|
7
|
+
import { Checkbox } from "../checkbox/index.mjs";
|
|
8
|
+
import { Pagination } from "../pagination/index.mjs";
|
|
9
|
+
import { Skeleton } from "../skeleton/index.mjs";
|
|
10
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../table/index.mjs";
|
|
11
|
+
import { useDensity } from "../../../lib/density.mjs";
|
|
12
|
+
import { duration } from "../../../lib/motion.mjs";
|
|
13
|
+
import { cn } from "../../../lib/utils.mjs";
|
|
14
|
+
import { DataTableActiveFilters } from "./active-filters.mjs";
|
|
15
|
+
import { BodyRow, openProps } from "./body-row.mjs";
|
|
16
|
+
import { DataTableCards, DataTableCardSkeletons } from "./cards.mjs";
|
|
17
|
+
import { DataTableEmpty } from "./empty.mjs";
|
|
18
|
+
import { ExpandButton, RevealBox, SubRow } from "./expand.mjs";
|
|
19
|
+
import { DataTableFacetedFilter } from "./faceted-filter.mjs";
|
|
20
|
+
import {
|
|
21
|
+
columnAlign,
|
|
22
|
+
columnLabel,
|
|
23
|
+
dataTableFeatures,
|
|
24
|
+
leafRows
|
|
25
|
+
} from "./features.mjs";
|
|
26
|
+
import { DataTableGrip } from "./grip.mjs";
|
|
27
|
+
import { HeaderCell } from "./header-cell.mjs";
|
|
28
|
+
import { useDataTableLabels } from "./labels.mjs";
|
|
29
|
+
import { moveItem } from "./move-item.mjs";
|
|
30
|
+
import { LoadMoreRows } from "./load-more.mjs";
|
|
31
|
+
import { usePersistedView } from "./persist.mjs";
|
|
32
|
+
import { DataTableSelectionBar } from "./selection-bar.mjs";
|
|
33
|
+
import { DataTableTabContext } from "./tabs.mjs";
|
|
34
|
+
import { DataTableSearch, DataTableToolbar, DataTableToolbarSection } from "./toolbar.mjs";
|
|
35
|
+
import { useReorder } from "./use-reorder.mjs";
|
|
36
|
+
import { useReveal } from "./use-reveal.mjs";
|
|
37
|
+
import { useTableSlice } from "./use-table-state.mjs";
|
|
38
|
+
import { DataTableViewOptions } from "./view-options.mjs";
|
|
39
|
+
const NO_SORTING = [];
|
|
40
|
+
const NO_SELECTION = {};
|
|
41
|
+
const NO_FILTERS = [];
|
|
42
|
+
const NO_VISIBILITY = {};
|
|
43
|
+
const NO_ORDER = [];
|
|
44
|
+
const NO_GROUPING = [];
|
|
45
|
+
const NONE_EXPANDED = {};
|
|
46
|
+
const SKELETON_WIDTHS = ["w-3/4", "w-full", "w-1/2", "w-4/5", "w-2/3"];
|
|
47
|
+
function DataTable({
|
|
48
|
+
columns,
|
|
49
|
+
data,
|
|
50
|
+
getRowId,
|
|
51
|
+
getRowLabel,
|
|
52
|
+
containerClassName,
|
|
53
|
+
labels: labelsProp,
|
|
54
|
+
density: densityProp,
|
|
55
|
+
enableSorting = false,
|
|
56
|
+
initialSorting = NO_SORTING,
|
|
57
|
+
sorting: sortingProp,
|
|
58
|
+
onSortingChange,
|
|
59
|
+
enableRowSelection = false,
|
|
60
|
+
rowSelection: rowSelectionProp,
|
|
61
|
+
onRowSelectionChange,
|
|
62
|
+
renderSelectionActions,
|
|
63
|
+
onRowClick,
|
|
64
|
+
activeRowId,
|
|
65
|
+
onDisplayedRowsChange,
|
|
66
|
+
toolbar = false,
|
|
67
|
+
searchable = false,
|
|
68
|
+
searchPlaceholder,
|
|
69
|
+
searchShortcut,
|
|
70
|
+
globalFilter: globalFilterProp,
|
|
71
|
+
onGlobalFilterChange,
|
|
72
|
+
toolbarActions,
|
|
73
|
+
filters,
|
|
74
|
+
onColumnFiltersChange,
|
|
75
|
+
viewOptions = false,
|
|
76
|
+
columnVisibility: columnVisibilityProp,
|
|
77
|
+
onColumnVisibilityChange,
|
|
78
|
+
enableCardLayout = false,
|
|
79
|
+
layout: layoutProp,
|
|
80
|
+
defaultLayout = "rows",
|
|
81
|
+
onLayoutChange,
|
|
82
|
+
renderCard,
|
|
83
|
+
enableGrouping = false,
|
|
84
|
+
initialGrouping = NO_GROUPING,
|
|
85
|
+
renderSubRow,
|
|
86
|
+
getRowCanExpand,
|
|
87
|
+
onRowReorder,
|
|
88
|
+
enableColumnOrdering = false,
|
|
89
|
+
initialColumnOrder = NO_ORDER,
|
|
90
|
+
onColumnOrderChange,
|
|
91
|
+
enablePagination: enablePaginationProp = false,
|
|
92
|
+
pageSize: initialPageSize = 8,
|
|
93
|
+
pageSizeOptions,
|
|
94
|
+
onPaginationChange,
|
|
95
|
+
onLoadMore,
|
|
96
|
+
hasMore = false,
|
|
97
|
+
loadingMore = false,
|
|
98
|
+
manualSorting = false,
|
|
99
|
+
manualFiltering = false,
|
|
100
|
+
manualPagination = false,
|
|
101
|
+
pageCount: pageCountProp,
|
|
102
|
+
rowCount,
|
|
103
|
+
loading = false,
|
|
104
|
+
loadingRows = 5,
|
|
105
|
+
emptyState,
|
|
106
|
+
persistKey,
|
|
107
|
+
className,
|
|
108
|
+
...tableProps
|
|
109
|
+
}) {
|
|
110
|
+
const density = useDensity(densityProp);
|
|
111
|
+
const labels = useDataTableLabels(labelsProp);
|
|
112
|
+
const tab = React.useContext(DataTableTabContext);
|
|
113
|
+
const enablePagination = enablePaginationProp && !onLoadMore;
|
|
114
|
+
const sorting = useTableSlice({ value: sortingProp, initial: initialSorting, onChange: onSortingChange });
|
|
115
|
+
const globalFilter = useTableSlice({ value: globalFilterProp, initial: "", onChange: onGlobalFilterChange });
|
|
116
|
+
const columnFilters = useTableSlice({ initial: NO_FILTERS, onChange: onColumnFiltersChange });
|
|
117
|
+
const columnVisibility = useTableSlice({
|
|
118
|
+
value: columnVisibilityProp,
|
|
119
|
+
initial: NO_VISIBILITY,
|
|
120
|
+
onChange: onColumnVisibilityChange
|
|
121
|
+
});
|
|
122
|
+
const columnOrder = useTableSlice({ initial: initialColumnOrder, onChange: onColumnOrderChange });
|
|
123
|
+
const grouping = enableGrouping ? initialGrouping : NO_GROUPING;
|
|
124
|
+
const grouped = grouping.length > 0;
|
|
125
|
+
const expanded = useTableSlice({ initial: NONE_EXPANDED });
|
|
126
|
+
const rowSelection = useTableSlice({ value: rowSelectionProp, initial: NO_SELECTION, onChange: onRowSelectionChange });
|
|
127
|
+
const pagination = useTableSlice({
|
|
128
|
+
initial: { pageIndex: 0, pageSize: initialPageSize },
|
|
129
|
+
onChange: onPaginationChange
|
|
130
|
+
});
|
|
131
|
+
const layout = useTableSlice({ value: layoutProp, initial: defaultLayout, onChange: onLayoutChange });
|
|
132
|
+
const view = JSON.stringify([sorting.value, globalFilter.value, columnFilters.value, tab]);
|
|
133
|
+
const [seenView, setSeenView] = React.useState(view);
|
|
134
|
+
if (seenView !== view) {
|
|
135
|
+
setSeenView(view);
|
|
136
|
+
pagination.put((was) => was.pageIndex === 0 ? was : { ...was, pageIndex: 0 });
|
|
137
|
+
}
|
|
138
|
+
const [seenData, setSeenData] = React.useState(data);
|
|
139
|
+
if (seenData !== data && !loading) {
|
|
140
|
+
setSeenData(data);
|
|
141
|
+
if (!manualPagination) {
|
|
142
|
+
const ids = new Set(data.map((row, index) => getRowId?.(row, index) ?? String(index)));
|
|
143
|
+
rowSelection.put((was) => {
|
|
144
|
+
const kept = Object.entries(was).filter(([id]) => ids.has(id));
|
|
145
|
+
return kept.length === Object.keys(was).length ? was : Object.fromEntries(kept);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
const table = useTable({
|
|
150
|
+
features: dataTableFeatures,
|
|
151
|
+
columns,
|
|
152
|
+
data,
|
|
153
|
+
...getRowId ? { getRowId: (row, index) => getRowId(row, index) } : null,
|
|
154
|
+
state: {
|
|
155
|
+
sorting: sorting.value,
|
|
156
|
+
globalFilter: globalFilter.value,
|
|
157
|
+
columnFilters: columnFilters.value,
|
|
158
|
+
columnVisibility: columnVisibility.value,
|
|
159
|
+
columnOrder: columnOrder.value,
|
|
160
|
+
rowSelection: rowSelection.value,
|
|
161
|
+
pagination: pagination.value,
|
|
162
|
+
grouping,
|
|
163
|
+
expanded: expanded.value
|
|
164
|
+
},
|
|
165
|
+
onExpandedChange: expanded.set,
|
|
166
|
+
...grouped ? null : { getRowCanExpand: (row) => renderSubRow ? getRowCanExpand?.(row) ?? true : false },
|
|
167
|
+
// Groups page whole, so opening one doesn't push others off the page.
|
|
168
|
+
paginateExpandedRows: false,
|
|
169
|
+
onSortingChange: sorting.set,
|
|
170
|
+
onGlobalFilterChange: globalFilter.set,
|
|
171
|
+
onColumnFiltersChange: columnFilters.set,
|
|
172
|
+
onColumnVisibilityChange: columnVisibility.set,
|
|
173
|
+
onColumnOrderChange: columnOrder.set,
|
|
174
|
+
onRowSelectionChange: rowSelection.set,
|
|
175
|
+
onPaginationChange: pagination.set,
|
|
176
|
+
// A sum is drawn by its column's `cell` unless it has an `aggregatedCell`.
|
|
177
|
+
defaultColumn: { filterFn: "matches", aggregatedCell: void 0 },
|
|
178
|
+
globalFilterFn: "includesString",
|
|
179
|
+
enableSorting,
|
|
180
|
+
sortDescFirst: false,
|
|
181
|
+
enableRowSelection,
|
|
182
|
+
manualSorting,
|
|
183
|
+
manualFiltering,
|
|
184
|
+
manualPagination: manualPagination || !enablePagination,
|
|
185
|
+
pageCount: pageCountProp,
|
|
186
|
+
rowCount,
|
|
187
|
+
autoResetAll: false
|
|
188
|
+
});
|
|
189
|
+
const pageCount = enablePagination ? Math.max(1, table.getPageCount()) : 1;
|
|
190
|
+
const pageIndex = pagination.value.pageIndex;
|
|
191
|
+
if (enablePagination && !loading && pageIndex > pageCount - 1) {
|
|
192
|
+
pagination.put((was) => ({ ...was, pageIndex: pageCount - 1 }));
|
|
193
|
+
}
|
|
194
|
+
const sorted = table.getSortedRowModel();
|
|
195
|
+
const displayed = React.useMemo(() => leafRows(sorted.rows), [sorted]);
|
|
196
|
+
const reportDisplayed = React.useEffectEvent((rows2) => onDisplayedRowsChange?.(rows2));
|
|
197
|
+
const shown = React.useRef(null);
|
|
198
|
+
React.useEffect(() => {
|
|
199
|
+
const originals = displayed.map((row) => row.original);
|
|
200
|
+
const was = shown.current;
|
|
201
|
+
if (was && was.length === originals.length && was.every((row, index) => row === originals[index])) return;
|
|
202
|
+
shown.current = originals;
|
|
203
|
+
reportDisplayed(displayed);
|
|
204
|
+
}, [displayed]);
|
|
205
|
+
const rows = table.getRowModel().rows.filter((row) => row.depth === 0);
|
|
206
|
+
const visibleColumns = table.getVisibleLeafColumns();
|
|
207
|
+
const selectable = Boolean(enableRowSelection);
|
|
208
|
+
const expandable = Boolean(renderSubRow) && !grouped;
|
|
209
|
+
const isCards = layout.value === "cards";
|
|
210
|
+
const sortableRows = Boolean(onRowReorder) && !isCards;
|
|
211
|
+
const colSpan = Math.max(1, visibleColumns.length + (selectable ? 1 : 0) + (expandable ? 1 : 0) + (sortableRows ? 1 : 0));
|
|
212
|
+
const filtered = globalFilter.value !== "" || columnFilters.value.length > 0;
|
|
213
|
+
const tableId = React.useId();
|
|
214
|
+
const nameColumn = columns.length > 0 ? table.getAllLeafColumns().find((column) => columnLabel(column) && column.accessorFn) : void 0;
|
|
215
|
+
const rowLabel = (row) => {
|
|
216
|
+
if (getRowLabel) return getRowLabel(row.original);
|
|
217
|
+
const value = nameColumn ? row.getValue(nameColumn.id) : void 0;
|
|
218
|
+
return value === void 0 || value === null || value === "" ? row.id : String(value);
|
|
219
|
+
};
|
|
220
|
+
const groupName = (row) => {
|
|
221
|
+
const column = row.groupingColumnId ? table.getColumn(row.groupingColumnId) : void 0;
|
|
222
|
+
const label = column ? columnLabel(column) : void 0;
|
|
223
|
+
return label ? `${label} ${String(row.groupingValue)}` : String(row.groupingValue);
|
|
224
|
+
};
|
|
225
|
+
const clearAll = () => {
|
|
226
|
+
globalFilter.set("");
|
|
227
|
+
columnFilters.set(NO_FILTERS);
|
|
228
|
+
};
|
|
229
|
+
const rootRef = React.useRef(null);
|
|
230
|
+
const anchor = React.useRef(null);
|
|
231
|
+
const pageRows = leafRows(rows).filter((row) => row.getCanSelect());
|
|
232
|
+
const pageSelected = pageRows.filter((row) => row.getIsSelected()).length;
|
|
233
|
+
const allSelected = pageRows.length > 0 && pageSelected === pageRows.length;
|
|
234
|
+
const selectRows = (targets, on) => rowSelection.set((was) => {
|
|
235
|
+
const next = { ...was };
|
|
236
|
+
for (const row of targets) {
|
|
237
|
+
if (on) next[row.id] = true;
|
|
238
|
+
else delete next[row.id];
|
|
239
|
+
}
|
|
240
|
+
return next;
|
|
241
|
+
});
|
|
242
|
+
const toggleRow = (row, on, range) => {
|
|
243
|
+
const from = range && anchor.current ? displayed.findIndex((one) => one.id === anchor.current) : -1;
|
|
244
|
+
const to = displayed.findIndex((one) => one.id === row.id);
|
|
245
|
+
const targets = from >= 0 && to >= 0 ? displayed.slice(Math.min(from, to), Math.max(from, to) + 1).filter((one) => one.getCanSelect()) : [row];
|
|
246
|
+
anchor.current = row.id;
|
|
247
|
+
selectRows(targets, on);
|
|
248
|
+
};
|
|
249
|
+
const clearSelection = () => {
|
|
250
|
+
anchor.current = null;
|
|
251
|
+
rowSelection.set(NO_SELECTION);
|
|
252
|
+
if (rootRef.current?.querySelector("[data-slot=data-table-selection-bar]")?.contains(document.activeElement)) {
|
|
253
|
+
rootRef.current.querySelector("[data-slot=data-table-select-all], [data-slot=data-table-select]")?.focus();
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
const selectedRows = selectable ? table.getCoreRowModel().flatRows.filter((row) => row.getIsSelected()) : [];
|
|
257
|
+
const selectedCount = manualPagination ? Object.values(rowSelection.value).filter(Boolean).length : selectedRows.length;
|
|
258
|
+
const selectAll = /* @__PURE__ */ jsx(
|
|
259
|
+
Checkbox,
|
|
260
|
+
{
|
|
261
|
+
"data-slot": "data-table-select-all",
|
|
262
|
+
className: "align-middle",
|
|
263
|
+
"aria-label": enablePagination && pageCount > 1 ? labels.selectPage : labels.selectAll,
|
|
264
|
+
checked: allSelected ? true : pageSelected > 0 ? "indeterminate" : false,
|
|
265
|
+
disabled: loading || pageRows.length === 0,
|
|
266
|
+
onCheckedChange: () => {
|
|
267
|
+
anchor.current = null;
|
|
268
|
+
selectRows(pageRows, !allSelected);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
);
|
|
272
|
+
const groupBox = (row) => {
|
|
273
|
+
const leaves2 = leafRows([row]).filter((one) => one.getCanSelect());
|
|
274
|
+
const on = leaves2.filter((one) => one.getIsSelected()).length;
|
|
275
|
+
return /* @__PURE__ */ jsx(
|
|
276
|
+
Checkbox,
|
|
277
|
+
{
|
|
278
|
+
"aria-label": labels.selectRow(groupName(row)),
|
|
279
|
+
className: "align-middle",
|
|
280
|
+
checked: on === 0 ? false : on === leaves2.length ? true : "indeterminate",
|
|
281
|
+
disabled: leaves2.length === 0,
|
|
282
|
+
onCheckedChange: () => {
|
|
283
|
+
anchor.current = null;
|
|
284
|
+
selectRows(leaves2, on !== leaves2.length);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
);
|
|
288
|
+
};
|
|
289
|
+
const selectBox = (row) => /* @__PURE__ */ jsx(
|
|
290
|
+
RowCheckbox,
|
|
291
|
+
{
|
|
292
|
+
label: labels.selectRow(rowLabel(row)),
|
|
293
|
+
checked: row.getIsSelected(),
|
|
294
|
+
disabled: !row.getCanSelect(),
|
|
295
|
+
onToggle: (on, range) => toggleRow(row, on, range)
|
|
296
|
+
}
|
|
297
|
+
);
|
|
298
|
+
const [moveMessage, setMoveMessage] = React.useState("");
|
|
299
|
+
const [regrip, setRegrip] = React.useState(null);
|
|
300
|
+
React.useEffect(() => {
|
|
301
|
+
if (!regrip) return;
|
|
302
|
+
const grips = rootRef.current?.querySelectorAll(`[data-slot=data-table-grip][data-axis=${regrip.axis}]`);
|
|
303
|
+
for (const grip of grips ?? []) if (grip.dataset.grip === regrip.id) grip.focus();
|
|
304
|
+
}, [regrip]);
|
|
305
|
+
const rowsLocked = sorting.value.length > 0 || filtered || grouped || loading;
|
|
306
|
+
const rowDrag = useReorder({
|
|
307
|
+
axis: "y",
|
|
308
|
+
collect: () => {
|
|
309
|
+
const trs = Array.from(rootRef.current?.querySelectorAll("tbody > tr[data-row-id]") ?? []);
|
|
310
|
+
return trs.map((tr) => {
|
|
311
|
+
const panel = tr.nextElementSibling;
|
|
312
|
+
const own = panel instanceof HTMLElement && panel.dataset.slot === "data-table-sub-row" ? [tr, panel] : [tr];
|
|
313
|
+
return { id: tr.dataset.rowId ?? "", els: own };
|
|
314
|
+
});
|
|
315
|
+
},
|
|
316
|
+
onMove: (id, toId, how) => {
|
|
317
|
+
const from = rows.find((row) => row.id === id);
|
|
318
|
+
const to = rows.find((row) => row.id === toId);
|
|
319
|
+
if (!from || !to) return;
|
|
320
|
+
onRowReorder?.({ row: from, fromIndex: from.index, toIndex: to.index });
|
|
321
|
+
setMoveMessage(labels.moved(rowLabel(from), to.index + 1, data.length));
|
|
322
|
+
if (how === "key") setRegrip({ axis: "y", id });
|
|
323
|
+
},
|
|
324
|
+
onCancel: (id) => {
|
|
325
|
+
const row = rows.find((one) => one.id === id);
|
|
326
|
+
if (row) setMoveMessage(labels.reorderCancelled(rowLabel(row)));
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
const canMoveColumn = (id) => {
|
|
330
|
+
const column = table.getColumn(id);
|
|
331
|
+
return Boolean(column && columnLabel(column) && !column.columnDef.meta?.sticky);
|
|
332
|
+
};
|
|
333
|
+
const headerDepth = table.getHeaderGroups().length;
|
|
334
|
+
const orderable = enableColumnOrdering && !grouped && headerDepth === 1 && !isCards;
|
|
335
|
+
const columnDrag = useReorder({
|
|
336
|
+
axis: "x",
|
|
337
|
+
// The unbroken run of columns around it that can move.
|
|
338
|
+
collect: (id) => {
|
|
339
|
+
const ids = visibleColumns.map((column) => column.id);
|
|
340
|
+
let first = ids.indexOf(id);
|
|
341
|
+
let last = first;
|
|
342
|
+
while (first > 0 && canMoveColumn(ids[first - 1])) first--;
|
|
343
|
+
while (last < ids.length - 1 && canMoveColumn(ids[last + 1])) last++;
|
|
344
|
+
const cells = Array.from(rootRef.current?.querySelectorAll("table [data-column-id]") ?? []);
|
|
345
|
+
return ids.slice(first, last + 1).map((one) => ({ id: one, els: cells.filter((cell) => cell.dataset.columnId === one) }));
|
|
346
|
+
},
|
|
347
|
+
onMove: (id, toId, how) => {
|
|
348
|
+
const order = table.getAllLeafColumns().map((column2) => column2.id);
|
|
349
|
+
const to = order.indexOf(toId);
|
|
350
|
+
columnOrder.set(moveItem(order, order.indexOf(id), to));
|
|
351
|
+
const column = table.getColumn(id);
|
|
352
|
+
const shownIds = visibleColumns.map((one) => one.id);
|
|
353
|
+
setMoveMessage(labels.moved((column && columnLabel(column)) ?? id, shownIds.indexOf(toId) + 1, shownIds.length));
|
|
354
|
+
if (how === "key") setRegrip({ axis: "x", id });
|
|
355
|
+
},
|
|
356
|
+
onCancel: (id) => {
|
|
357
|
+
const column = table.getColumn(id);
|
|
358
|
+
setMoveMessage(labels.reorderCancelled((column && columnLabel(column)) ?? id));
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
const { abort: abortRows } = rowDrag;
|
|
362
|
+
const { abort: abortColumns } = columnDrag;
|
|
363
|
+
React.useEffect(() => () => abortRows(), [data, pageIndex, abortRows]);
|
|
364
|
+
React.useEffect(() => () => abortColumns(), [columns, abortColumns]);
|
|
365
|
+
usePersistedView(persistKey, {
|
|
366
|
+
columnVisibility: columnVisibility.value,
|
|
367
|
+
columnOrder: columnOrder.value,
|
|
368
|
+
sorting: sorting.value,
|
|
369
|
+
layout: layout.value,
|
|
370
|
+
pageSize: pagination.value.pageSize
|
|
371
|
+
}, {
|
|
372
|
+
columnIds: () => table.getAllLeafColumns().map((column) => column.id),
|
|
373
|
+
canSort: (id) => table.getColumn(id)?.getCanSort() ?? false,
|
|
374
|
+
pageSizes: () => sizeOptions,
|
|
375
|
+
apply: (saved) => {
|
|
376
|
+
if (saved.columnVisibility) columnVisibility.set(saved.columnVisibility);
|
|
377
|
+
if (saved.columnOrder) columnOrder.set(saved.columnOrder);
|
|
378
|
+
if (saved.sorting) sorting.set(saved.sorting);
|
|
379
|
+
if (saved.layout) layout.set(saved.layout);
|
|
380
|
+
const size = saved.pageSize;
|
|
381
|
+
if (size) pagination.set((was) => was.pageSize === size ? was : { pageIndex: 0, pageSize: size });
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
const sizeOptions = Array.from(
|
|
385
|
+
/* @__PURE__ */ new Set([
|
|
386
|
+
...pageSizeOptions ?? [initialPageSize, initialPageSize * 2, initialPageSize * 3, 50, 100],
|
|
387
|
+
pagination.value.pageSize
|
|
388
|
+
])
|
|
389
|
+
).sort((a, b) => a - b);
|
|
390
|
+
const hasToolbar = toolbar === true || searchable || Boolean(filters?.length) || Boolean(toolbarActions) || viewOptions || enableCardLayout;
|
|
391
|
+
const activeFilters = (filters ?? []).flatMap((field) => {
|
|
392
|
+
const column = table.getColumn(field.column);
|
|
393
|
+
const value = column?.getFilterValue();
|
|
394
|
+
if (!column || !Array.isArray(value)) return [];
|
|
395
|
+
return value.map((one) => ({
|
|
396
|
+
key: `${field.column}:${one}`,
|
|
397
|
+
field: field.title,
|
|
398
|
+
value: field.options.find((option) => option.value === one)?.label ?? one,
|
|
399
|
+
onRemove: () => column.setFilterValue(value.filter((other) => other !== one))
|
|
400
|
+
}));
|
|
401
|
+
});
|
|
402
|
+
const toolbarNode = typeof toolbar === "function" ? toolbar(table) : hasToolbar ? /* @__PURE__ */ jsxs(DataTableToolbar, { density, children: [
|
|
403
|
+
/* @__PURE__ */ jsxs(DataTableToolbarSection, { children: [
|
|
404
|
+
searchable ? /* @__PURE__ */ jsx(
|
|
405
|
+
DataTableSearch,
|
|
406
|
+
{
|
|
407
|
+
value: globalFilter.value,
|
|
408
|
+
onValueChange: globalFilter.set,
|
|
409
|
+
placeholder: searchPlaceholder ?? labels.searchPlaceholder,
|
|
410
|
+
"aria-label": labels.search,
|
|
411
|
+
shortcut: searchShortcut
|
|
412
|
+
}
|
|
413
|
+
) : null,
|
|
414
|
+
filters?.map((field) => /* @__PURE__ */ jsx(
|
|
415
|
+
DataTableFacetedFilter,
|
|
416
|
+
{
|
|
417
|
+
title: field.title,
|
|
418
|
+
options: field.options,
|
|
419
|
+
counts: field.counts,
|
|
420
|
+
column: table.getColumn(field.column),
|
|
421
|
+
showCounts: !manualFiltering || field.counts !== void 0,
|
|
422
|
+
labels: labelsProp
|
|
423
|
+
},
|
|
424
|
+
field.column
|
|
425
|
+
))
|
|
426
|
+
] }),
|
|
427
|
+
toolbarActions || viewOptions || enableCardLayout ? /* @__PURE__ */ jsxs(DataTableToolbarSection, { children: [
|
|
428
|
+
toolbarActions,
|
|
429
|
+
viewOptions || enableCardLayout ? /* @__PURE__ */ jsx(
|
|
430
|
+
DataTableViewOptions,
|
|
431
|
+
{
|
|
432
|
+
table,
|
|
433
|
+
layout: layout.value,
|
|
434
|
+
onLayoutChange: enableCardLayout ? layout.set : void 0,
|
|
435
|
+
labels: labelsProp
|
|
436
|
+
}
|
|
437
|
+
) : null
|
|
438
|
+
] }) : null
|
|
439
|
+
] }) : null;
|
|
440
|
+
const empty = emptyState ?? /* @__PURE__ */ jsx(
|
|
441
|
+
DataTableEmpty,
|
|
442
|
+
{
|
|
443
|
+
kind: filtered ? "search" : "empty",
|
|
444
|
+
density,
|
|
445
|
+
onReset: filtered ? clearAll : void 0,
|
|
446
|
+
labels: labelsProp
|
|
447
|
+
}
|
|
448
|
+
);
|
|
449
|
+
const leaves = enablePagination && rowCount === void 0 ? displayed.length : rowCount;
|
|
450
|
+
const firstIndex = enablePagination ? pageIndex * pagination.value.pageSize : 0;
|
|
451
|
+
const counted = leaves !== void 0 && leaves > rows.length;
|
|
452
|
+
const loadMore = onLoadMore ? /* @__PURE__ */ jsx(
|
|
453
|
+
LoadMoreRows,
|
|
454
|
+
{
|
|
455
|
+
as: isCards ? "block" : "row",
|
|
456
|
+
colSpan,
|
|
457
|
+
length: data.length,
|
|
458
|
+
hasMore: hasMore && !loading,
|
|
459
|
+
loading: loadingMore,
|
|
460
|
+
onLoadMore,
|
|
461
|
+
label: labels.loadingMore
|
|
462
|
+
},
|
|
463
|
+
"load-more"
|
|
464
|
+
) : null;
|
|
465
|
+
const recordRow = (row, index, phase) => {
|
|
466
|
+
const detail = expandable && row.getCanExpand() ? `${tableId}-${row.id}` : void 0;
|
|
467
|
+
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
468
|
+
/* @__PURE__ */ jsx(
|
|
469
|
+
BodyRow,
|
|
470
|
+
{
|
|
471
|
+
table,
|
|
472
|
+
row,
|
|
473
|
+
phase,
|
|
474
|
+
columnIds: orderable,
|
|
475
|
+
"data-row-id": sortableRows ? row.id : void 0,
|
|
476
|
+
onOpen: onRowClick,
|
|
477
|
+
selected: row.getIsSelected(),
|
|
478
|
+
current: activeRowId != null && row.id === activeRowId,
|
|
479
|
+
"aria-rowindex": counted && index !== void 0 ? firstIndex + index + 2 : void 0,
|
|
480
|
+
leading: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
481
|
+
sortableRows ? /* @__PURE__ */ jsx(TableCell, { "data-row-control": "", className: "w-0 pe-0", children: /* @__PURE__ */ jsx(
|
|
482
|
+
DataTableGrip,
|
|
483
|
+
{
|
|
484
|
+
axis: "y",
|
|
485
|
+
"data-grip": row.id,
|
|
486
|
+
"aria-label": labels.reorderRow(rowLabel(row)),
|
|
487
|
+
locked: rowsLocked ? labels.reorderLocked : void 0,
|
|
488
|
+
onPointerDown: (event) => rowDrag.onPointerDown(row.id, event),
|
|
489
|
+
onKeyDown: (event) => rowDrag.onKeyDown(row.id, event)
|
|
490
|
+
}
|
|
491
|
+
) }) : null,
|
|
492
|
+
expandable ? /* @__PURE__ */ jsx(TableCell, { "data-row-control": "", className: "w-0 pe-0", children: detail ? /* @__PURE__ */ jsx(
|
|
493
|
+
ExpandButton,
|
|
494
|
+
{
|
|
495
|
+
label: row.getIsExpanded() ? labels.collapseRow(rowLabel(row)) : labels.expandRow(rowLabel(row)),
|
|
496
|
+
expanded: row.getIsExpanded(),
|
|
497
|
+
controls: detail,
|
|
498
|
+
onToggle: () => row.toggleExpanded()
|
|
499
|
+
}
|
|
500
|
+
) : null }) : null,
|
|
501
|
+
selectable ? /* @__PURE__ */ jsx(TableCell, { "data-row-control": "", className: "w-0 pe-0 text-center", children: phase ? /* @__PURE__ */ jsx(RevealBox, { phase, children: selectBox(row) }) : selectBox(row) }) : null
|
|
502
|
+
] })
|
|
503
|
+
}
|
|
504
|
+
),
|
|
505
|
+
detail && renderSubRow ? /* @__PURE__ */ jsx(SubRow, { row, id: detail, label: labels.rowDetails(rowLabel(row)), colSpan, render: renderSubRow }) : null
|
|
506
|
+
] }, row.id);
|
|
507
|
+
};
|
|
508
|
+
const groupRows = (row, phase) => {
|
|
509
|
+
if (!row.getIsGrouped()) return recordRow(row, void 0, phase);
|
|
510
|
+
const open = row.getIsExpanded();
|
|
511
|
+
const name = groupName(row);
|
|
512
|
+
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
513
|
+
/* @__PURE__ */ jsx(
|
|
514
|
+
BodyRow,
|
|
515
|
+
{
|
|
516
|
+
table,
|
|
517
|
+
row,
|
|
518
|
+
phase,
|
|
519
|
+
"data-group": "",
|
|
520
|
+
className: "font-medium",
|
|
521
|
+
leading: selectable ? /* @__PURE__ */ jsx(TableCell, { "data-row-control": "", className: "w-0 pe-0 text-center", children: phase ? /* @__PURE__ */ jsx(RevealBox, { phase, children: groupBox(row) }) : groupBox(row) }) : null,
|
|
522
|
+
renderCell: (cell) => cell.getIsGrouped() ? /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5", style: { paddingInlineStart: `calc(var(--spacing) * ${row.depth * 5})` }, children: [
|
|
523
|
+
/* @__PURE__ */ jsx(
|
|
524
|
+
ExpandButton,
|
|
525
|
+
{
|
|
526
|
+
label: open ? labels.collapseGroup(name) : labels.expandGroup(name),
|
|
527
|
+
expanded: open,
|
|
528
|
+
onToggle: () => row.toggleExpanded()
|
|
529
|
+
}
|
|
530
|
+
),
|
|
531
|
+
/* @__PURE__ */ jsx(table.FlexRender, { cell }),
|
|
532
|
+
/* @__PURE__ */ jsxs("span", { className: "font-normal text-muted-foreground tabular-nums", children: [
|
|
533
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, children: leafRows([row]).length }),
|
|
534
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: labels.groupCount(leafRows([row]).length) })
|
|
535
|
+
] })
|
|
536
|
+
] }) : void 0
|
|
537
|
+
}
|
|
538
|
+
),
|
|
539
|
+
/* @__PURE__ */ jsx(GroupRows, { open, children: (inner) => row.subRows.map((sub) => groupRows(sub, inner)) })
|
|
540
|
+
] }, row.id);
|
|
541
|
+
};
|
|
542
|
+
const body = loading ? Array.from({ length: loadingRows }, (_, index) => /* @__PURE__ */ jsxs(TableRow, { "data-static": "", "aria-hidden": true, children: [
|
|
543
|
+
sortableRows ? /* @__PURE__ */ jsx(TableCell, { className: "w-0 pe-0" }) : null,
|
|
544
|
+
expandable ? /* @__PURE__ */ jsx(TableCell, { className: "w-0 pe-0" }) : null,
|
|
545
|
+
selectable ? /* @__PURE__ */ jsx(TableCell, { className: "w-0 pe-0 text-center", children: /* @__PURE__ */ jsx(Skeleton, { className: "size-4" }) }) : null,
|
|
546
|
+
visibleColumns.map((column, at) => /* @__PURE__ */ jsx(
|
|
547
|
+
TableCell,
|
|
548
|
+
{
|
|
549
|
+
align: columnAlign(column),
|
|
550
|
+
numeric: column.columnDef.meta?.numeric,
|
|
551
|
+
sticky: column.columnDef.meta?.sticky,
|
|
552
|
+
className: column.columnDef.meta?.className,
|
|
553
|
+
children: /* @__PURE__ */ jsx(
|
|
554
|
+
Skeleton,
|
|
555
|
+
{
|
|
556
|
+
className: cn(
|
|
557
|
+
"block h-4",
|
|
558
|
+
SKELETON_WIDTHS[(index + at) % SKELETON_WIDTHS.length],
|
|
559
|
+
columnAlign(column) === "end" && "ms-auto",
|
|
560
|
+
columnAlign(column) === "center" && "mx-auto"
|
|
561
|
+
)
|
|
562
|
+
}
|
|
563
|
+
)
|
|
564
|
+
},
|
|
565
|
+
column.id
|
|
566
|
+
))
|
|
567
|
+
] }, index)) : rows.length === 0 ? /* @__PURE__ */ jsx(TableRow, { "data-static": "", children: /* @__PURE__ */ jsx(TableCell, { colSpan, className: "h-auto p-0 whitespace-normal", children: empty }) }) : rows.map((row, index) => grouped ? groupRows(row) : recordRow(row, index));
|
|
568
|
+
return /* @__PURE__ */ jsxs("div", { ref: rootRef, "data-slot": "data-table", "data-layout": layout.value, className: "flex w-full min-w-0 flex-col gap-3", children: [
|
|
569
|
+
toolbarNode,
|
|
570
|
+
/* @__PURE__ */ jsx(DataTableActiveFilters, { items: activeFilters, onReset: () => columnFilters.set(NO_FILTERS), labels: labelsProp }),
|
|
571
|
+
/* @__PURE__ */ jsxs("div", { className: "relative min-w-0", "aria-busy": loading || void 0, children: [
|
|
572
|
+
isCards ? loading ? /* @__PURE__ */ jsx(DataTableCardSkeletons, { count: loadingRows, density }) : rows.length === 0 ? empty : /* @__PURE__ */ jsx(
|
|
573
|
+
DataTableCards,
|
|
574
|
+
{
|
|
575
|
+
table,
|
|
576
|
+
rows: grouped ? leafRows(rows) : rows,
|
|
577
|
+
density,
|
|
578
|
+
label: tableProps.label,
|
|
579
|
+
onOpen: onRowClick,
|
|
580
|
+
openProps,
|
|
581
|
+
activeRowId,
|
|
582
|
+
renderCard,
|
|
583
|
+
renderSelect: selectable ? selectBox : void 0,
|
|
584
|
+
footer: loadMore
|
|
585
|
+
}
|
|
586
|
+
) : /* @__PURE__ */ jsxs(
|
|
587
|
+
Table,
|
|
588
|
+
{
|
|
589
|
+
density,
|
|
590
|
+
"aria-rowcount": counted ? leaves + 1 : void 0,
|
|
591
|
+
containerProps: { className: containerClassName },
|
|
592
|
+
className,
|
|
593
|
+
...tableProps,
|
|
594
|
+
children: [
|
|
595
|
+
/* @__PURE__ */ jsx(TableHeader, { children: table.getHeaderGroups().map((group, depth) => /* @__PURE__ */ jsxs(TableRow, { "data-static": "", "aria-rowindex": counted ? depth + 1 : void 0, children: [
|
|
596
|
+
sortableRows && depth === 0 ? /* @__PURE__ */ jsx(TableHead, { rowSpan: headerDepth, className: "w-0 pe-0", children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: labels.order }) }) : null,
|
|
597
|
+
expandable && depth === 0 ? /* @__PURE__ */ jsx(TableHead, { rowSpan: headerDepth, className: "w-0 pe-0", children: /* @__PURE__ */ jsx("span", { className: "sr-only", children: labels.details }) }) : null,
|
|
598
|
+
selectable && depth === 0 ? /* @__PURE__ */ jsx(TableHead, { rowSpan: headerDepth, className: "w-0 pe-0 text-center", children: selectAll }) : null,
|
|
599
|
+
group.headers.map((header) => /* @__PURE__ */ jsx(
|
|
600
|
+
HeaderCell,
|
|
601
|
+
{
|
|
602
|
+
table,
|
|
603
|
+
header,
|
|
604
|
+
labels,
|
|
605
|
+
"data-column-id": orderable ? header.column.id : void 0,
|
|
606
|
+
leading: orderable && canMoveColumn(header.column.id) ? /* @__PURE__ */ jsx(
|
|
607
|
+
DataTableGrip,
|
|
608
|
+
{
|
|
609
|
+
axis: "x",
|
|
610
|
+
"data-grip": header.column.id,
|
|
611
|
+
"aria-label": labels.reorderColumn(columnLabel(header.column) ?? header.column.id),
|
|
612
|
+
onPointerDown: (event) => columnDrag.onPointerDown(header.column.id, event),
|
|
613
|
+
onKeyDown: (event) => columnDrag.onKeyDown(header.column.id, event)
|
|
614
|
+
}
|
|
615
|
+
) : void 0
|
|
616
|
+
},
|
|
617
|
+
header.id
|
|
618
|
+
))
|
|
619
|
+
] }, group.id)) }),
|
|
620
|
+
/* @__PURE__ */ jsxs(TableBody, { children: [
|
|
621
|
+
body,
|
|
622
|
+
loadMore
|
|
623
|
+
] })
|
|
624
|
+
]
|
|
625
|
+
}
|
|
626
|
+
),
|
|
627
|
+
selectable && renderSelectionActions ? /* @__PURE__ */ jsx(DataTableSelectionBar, { count: selectedCount, onClear: clearSelection, labels: labelsProp, children: selectedCount > 0 ? renderSelectionActions(selectedRows, table) : null }) : null
|
|
628
|
+
] }),
|
|
629
|
+
/* @__PURE__ */ jsx("span", { role: "status", className: "sr-only", children: loading ? labels.loading : filtered ? labels.results(rowCount ?? displayed.length) : "" }),
|
|
630
|
+
sortableRows || orderable ? /* @__PURE__ */ jsx("span", { role: "status", className: "sr-only", children: moveMessage }) : null,
|
|
631
|
+
enablePagination ? /* @__PURE__ */ jsx(
|
|
632
|
+
Pagination,
|
|
633
|
+
{
|
|
634
|
+
page: pageIndex + 1,
|
|
635
|
+
pageCount,
|
|
636
|
+
onPageChange: (page) => table.setPageIndex(page - 1),
|
|
637
|
+
rowsPerPage: pagination.value.pageSize,
|
|
638
|
+
onRowsPerPageChange: (size) => table.setPageSize(size),
|
|
639
|
+
rowsPerPageOptions: sizeOptions,
|
|
640
|
+
showRowsPerPage: true,
|
|
641
|
+
disabled: loading,
|
|
642
|
+
density
|
|
643
|
+
}
|
|
644
|
+
) : null
|
|
645
|
+
] });
|
|
646
|
+
}
|
|
647
|
+
function GroupRows({ open, children }) {
|
|
648
|
+
const phase = useReveal(open, duration.base);
|
|
649
|
+
return phase === "closed" ? null : children(phase);
|
|
650
|
+
}
|
|
651
|
+
function RowCheckbox({
|
|
652
|
+
label,
|
|
653
|
+
checked,
|
|
654
|
+
disabled,
|
|
655
|
+
onToggle
|
|
656
|
+
}) {
|
|
657
|
+
const shift = React.useRef(false);
|
|
658
|
+
return /* @__PURE__ */ jsx(
|
|
659
|
+
Checkbox,
|
|
660
|
+
{
|
|
661
|
+
"data-slot": "data-table-select",
|
|
662
|
+
className: "align-middle",
|
|
663
|
+
"aria-label": label,
|
|
664
|
+
checked,
|
|
665
|
+
disabled,
|
|
666
|
+
onMouseDown: (event) => {
|
|
667
|
+
if (event.shiftKey) event.preventDefault();
|
|
668
|
+
},
|
|
669
|
+
onClick: (event) => {
|
|
670
|
+
shift.current = event.shiftKey;
|
|
671
|
+
if (event.shiftKey) event.currentTarget.focus();
|
|
672
|
+
},
|
|
673
|
+
onCheckedChange: (next) => onToggle(next === true, shift.current)
|
|
674
|
+
}
|
|
675
|
+
);
|
|
676
|
+
}
|
|
677
|
+
export {
|
|
678
|
+
DataTable
|
|
679
|
+
};
|
|
680
|
+
//# sourceMappingURL=data-table.mjs.map
|