@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,648 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { createPortal } from "react-dom";
|
|
5
|
+
import { Skeleton } from "../skeleton/index.mjs";
|
|
6
|
+
import { useControllableState } from "../input/use-controllable-state.mjs";
|
|
7
|
+
import { cn } from "../../../lib/utils.mjs";
|
|
8
|
+
import { categoricalColors, chartColorClass, chartPaletteColor } from "./chart-colors.mjs";
|
|
9
|
+
import {
|
|
10
|
+
categoryBand,
|
|
11
|
+
categoryPosition,
|
|
12
|
+
chartAreaPath,
|
|
13
|
+
chartDomain,
|
|
14
|
+
chartLinePath,
|
|
15
|
+
chartTicks,
|
|
16
|
+
compactNumber,
|
|
17
|
+
finiteNumber,
|
|
18
|
+
linearScale,
|
|
19
|
+
normalizeChartData,
|
|
20
|
+
seriesKeys,
|
|
21
|
+
splitPointSegments
|
|
22
|
+
} from "./chart-geometry.mjs";
|
|
23
|
+
const ChartContext = React.createContext(null);
|
|
24
|
+
function useChart(part) {
|
|
25
|
+
const context = React.useContext(ChartContext);
|
|
26
|
+
if (!context) throw new Error(`\`${part}\` must be used within \`Chart\``);
|
|
27
|
+
return context;
|
|
28
|
+
}
|
|
29
|
+
function assignRef(ref, value) {
|
|
30
|
+
if (typeof ref === "function") ref(value);
|
|
31
|
+
else if (ref) ref.current = value;
|
|
32
|
+
}
|
|
33
|
+
function useMeasuredNode(ref) {
|
|
34
|
+
const [node, setNode] = React.useState(null);
|
|
35
|
+
const [size, setSize] = React.useState({ width: 0, height: 0 });
|
|
36
|
+
const callback = React.useCallback((value) => {
|
|
37
|
+
setNode(value);
|
|
38
|
+
assignRef(ref, value);
|
|
39
|
+
}, [ref]);
|
|
40
|
+
React.useEffect(() => {
|
|
41
|
+
if (!node) return;
|
|
42
|
+
const read = () => {
|
|
43
|
+
const next = { width: node.clientWidth, height: node.clientHeight };
|
|
44
|
+
setSize((current) => current.width === next.width && current.height === next.height ? current : next);
|
|
45
|
+
};
|
|
46
|
+
read();
|
|
47
|
+
const observer = new ResizeObserver(read);
|
|
48
|
+
observer.observe(node);
|
|
49
|
+
return () => observer.disconnect();
|
|
50
|
+
}, [node]);
|
|
51
|
+
return [callback, size];
|
|
52
|
+
}
|
|
53
|
+
const defaultPadding = { top: 12, right: 12, bottom: 28, left: 40 };
|
|
54
|
+
function Chart({
|
|
55
|
+
data,
|
|
56
|
+
index,
|
|
57
|
+
config = {},
|
|
58
|
+
domain: domainProp = "auto",
|
|
59
|
+
sparkline = false,
|
|
60
|
+
palette = "categorical",
|
|
61
|
+
stacked = false,
|
|
62
|
+
padding,
|
|
63
|
+
animate = true,
|
|
64
|
+
crosshair = !sparkline,
|
|
65
|
+
activeIndex: activeIndexProp,
|
|
66
|
+
onActiveIndexChange,
|
|
67
|
+
hiddenSeries: hiddenSeriesProp,
|
|
68
|
+
defaultHiddenSeries = [],
|
|
69
|
+
onHiddenSeriesChange,
|
|
70
|
+
focusedSeries: focusedSeriesProp,
|
|
71
|
+
onFocusedSeriesChange,
|
|
72
|
+
loading = false,
|
|
73
|
+
empty = "No data",
|
|
74
|
+
label,
|
|
75
|
+
children,
|
|
76
|
+
className,
|
|
77
|
+
ref,
|
|
78
|
+
onPointerMove,
|
|
79
|
+
onPointerLeave,
|
|
80
|
+
onKeyDown,
|
|
81
|
+
...props
|
|
82
|
+
}) {
|
|
83
|
+
const rows = React.useMemo(() => normalizeChartData(data), [data]);
|
|
84
|
+
const keys = React.useMemo(() => seriesKeys(rows, index, Object.keys(config)), [rows, index, config]);
|
|
85
|
+
const [hiddenSeries, setHiddenSeries] = useControllableState({
|
|
86
|
+
prop: hiddenSeriesProp,
|
|
87
|
+
defaultProp: defaultHiddenSeries,
|
|
88
|
+
onChange: onHiddenSeriesChange
|
|
89
|
+
});
|
|
90
|
+
const [focusedSeries, setFocusedSeries] = useControllableState({
|
|
91
|
+
prop: focusedSeriesProp,
|
|
92
|
+
defaultProp: null,
|
|
93
|
+
onChange: onFocusedSeriesChange
|
|
94
|
+
});
|
|
95
|
+
const [activeIndex, setActiveIndex] = useControllableState({
|
|
96
|
+
prop: activeIndexProp,
|
|
97
|
+
defaultProp: null,
|
|
98
|
+
onChange: onActiveIndexChange
|
|
99
|
+
});
|
|
100
|
+
const visibleKeys = React.useMemo(() => keys.filter((key) => !hiddenSeries.includes(key)), [keys, hiddenSeries]);
|
|
101
|
+
const [rootRef, size] = useMeasuredNode(ref);
|
|
102
|
+
const [svgNode, setSvgNode] = React.useState(null);
|
|
103
|
+
const resolvedPadding = React.useMemo(() => sparkline ? { top: 0, right: 0, bottom: 0, left: 0 } : { ...defaultPadding, ...padding }, [sparkline, padding]);
|
|
104
|
+
const plot = React.useMemo(() => ({
|
|
105
|
+
x: resolvedPadding.left,
|
|
106
|
+
y: resolvedPadding.top,
|
|
107
|
+
width: Math.max(0, size.width - resolvedPadding.left - resolvedPadding.right),
|
|
108
|
+
height: Math.max(0, size.height - resolvedPadding.top - resolvedPadding.bottom)
|
|
109
|
+
}), [resolvedPadding, size]);
|
|
110
|
+
const domainRows = React.useMemo(() => stacked ? rows.map((row) => {
|
|
111
|
+
let positive = 0;
|
|
112
|
+
let negative = 0;
|
|
113
|
+
for (const key of visibleKeys) {
|
|
114
|
+
const value = finiteNumber(row[key]);
|
|
115
|
+
if (value === null) continue;
|
|
116
|
+
if (value >= 0) positive += value;
|
|
117
|
+
else negative += value;
|
|
118
|
+
}
|
|
119
|
+
return { positive, negative };
|
|
120
|
+
}) : rows, [rows, stacked, visibleKeys]);
|
|
121
|
+
const domainKeys = React.useMemo(() => stacked ? ["positive", "negative"] : visibleKeys, [stacked, visibleKeys]);
|
|
122
|
+
const domain = React.useMemo(() => chartDomain(domainRows, domainKeys, domainProp), [domainRows, domainKeys, domainProp]);
|
|
123
|
+
const ticks = React.useMemo(() => chartTicks(domain), [domain]);
|
|
124
|
+
const x = React.useCallback((rowIndex) => categoryPosition(rowIndex, rows.length, plot.x, plot.width), [rows.length, plot]);
|
|
125
|
+
const y = React.useMemo(() => linearScale(domain, [plot.y + plot.height, plot.y]), [domain, plot]);
|
|
126
|
+
const valueAt = React.useCallback((key, rowIndex) => finiteNumber(rows[rowIndex]?.[key]), [rows]);
|
|
127
|
+
const points = React.useCallback((key) => rows.map((row, rowIndex) => {
|
|
128
|
+
const value = finiteNumber(row[key]);
|
|
129
|
+
return value === null ? null : { x: x(rowIndex), y: y(value), value, index: rowIndex };
|
|
130
|
+
}), [rows, x, y]);
|
|
131
|
+
const labelAt = React.useCallback((rowIndex) => {
|
|
132
|
+
const row = rows[rowIndex];
|
|
133
|
+
return index ? row?.[index] : rowIndex + 1;
|
|
134
|
+
}, [rows, index]);
|
|
135
|
+
const formatValue = React.useCallback((key, value) => config[key]?.format?.(value) ?? value.toLocaleString(), [config]);
|
|
136
|
+
const colorFor = React.useCallback((key) => {
|
|
137
|
+
const position = keys.indexOf(key);
|
|
138
|
+
return config[key]?.color ?? chartPaletteColor(Math.max(0, position), palette);
|
|
139
|
+
}, [config, keys, palette]);
|
|
140
|
+
const context = React.useMemo(() => ({
|
|
141
|
+
rows,
|
|
142
|
+
indexKey: index,
|
|
143
|
+
config,
|
|
144
|
+
keys,
|
|
145
|
+
visibleKeys,
|
|
146
|
+
width: size.width,
|
|
147
|
+
height: size.height,
|
|
148
|
+
plot,
|
|
149
|
+
domain,
|
|
150
|
+
ticks,
|
|
151
|
+
svgNode,
|
|
152
|
+
animate,
|
|
153
|
+
activeIndex,
|
|
154
|
+
setActiveIndex,
|
|
155
|
+
hiddenSeries,
|
|
156
|
+
setHiddenSeries,
|
|
157
|
+
focusedSeries,
|
|
158
|
+
setFocusedSeries,
|
|
159
|
+
x,
|
|
160
|
+
y,
|
|
161
|
+
points,
|
|
162
|
+
labelAt,
|
|
163
|
+
valueAt,
|
|
164
|
+
formatValue,
|
|
165
|
+
colorFor
|
|
166
|
+
}), [
|
|
167
|
+
rows,
|
|
168
|
+
index,
|
|
169
|
+
config,
|
|
170
|
+
keys,
|
|
171
|
+
visibleKeys,
|
|
172
|
+
size,
|
|
173
|
+
plot,
|
|
174
|
+
domain,
|
|
175
|
+
ticks,
|
|
176
|
+
svgNode,
|
|
177
|
+
animate,
|
|
178
|
+
activeIndex,
|
|
179
|
+
setActiveIndex,
|
|
180
|
+
hiddenSeries,
|
|
181
|
+
setHiddenSeries,
|
|
182
|
+
focusedSeries,
|
|
183
|
+
setFocusedSeries,
|
|
184
|
+
x,
|
|
185
|
+
y,
|
|
186
|
+
points,
|
|
187
|
+
labelAt,
|
|
188
|
+
valueAt,
|
|
189
|
+
formatValue,
|
|
190
|
+
colorFor
|
|
191
|
+
]);
|
|
192
|
+
const move = (event) => {
|
|
193
|
+
onPointerMove?.(event);
|
|
194
|
+
if (event.defaultPrevented || !rows.length || plot.width <= 0) return;
|
|
195
|
+
const rect = event.currentTarget.getBoundingClientRect();
|
|
196
|
+
const px = event.clientX - rect.left;
|
|
197
|
+
const ratio = (px - plot.x) / Math.max(1, plot.width);
|
|
198
|
+
setActiveIndex(Math.max(0, Math.min(rows.length - 1, Math.round(ratio * Math.max(0, rows.length - 1)))));
|
|
199
|
+
};
|
|
200
|
+
const leave = (event) => {
|
|
201
|
+
onPointerLeave?.(event);
|
|
202
|
+
if (!event.defaultPrevented) setActiveIndex(null);
|
|
203
|
+
};
|
|
204
|
+
const keysHandler = (event) => {
|
|
205
|
+
onKeyDown?.(event);
|
|
206
|
+
if (event.defaultPrevented || !rows.length || !["ArrowLeft", "ArrowRight", "Home", "End", "Escape"].includes(event.key)) return;
|
|
207
|
+
event.preventDefault();
|
|
208
|
+
if (event.key === "Escape") setActiveIndex(null);
|
|
209
|
+
else if (event.key === "Home") setActiveIndex(0);
|
|
210
|
+
else if (event.key === "End") setActiveIndex(rows.length - 1);
|
|
211
|
+
else setActiveIndex(Math.max(0, Math.min(rows.length - 1, (activeIndex ?? (event.key === "ArrowRight" ? -1 : rows.length)) + (event.key === "ArrowRight" ? 1 : -1))));
|
|
212
|
+
};
|
|
213
|
+
const hasData = rows.length > 0 && keys.length > 0;
|
|
214
|
+
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: context, children: /* @__PURE__ */ jsxs(
|
|
215
|
+
"div",
|
|
216
|
+
{
|
|
217
|
+
ref: rootRef,
|
|
218
|
+
"data-slot": "chart",
|
|
219
|
+
"data-sparkline": sparkline ? "" : void 0,
|
|
220
|
+
role: label ? "group" : void 0,
|
|
221
|
+
"aria-label": label,
|
|
222
|
+
"aria-busy": loading || void 0,
|
|
223
|
+
tabIndex: hasData && !loading ? 0 : void 0,
|
|
224
|
+
className: cn(
|
|
225
|
+
"relative h-64 w-full min-w-0 outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
226
|
+
sparkline && "h-16",
|
|
227
|
+
className
|
|
228
|
+
),
|
|
229
|
+
onPointerMove: move,
|
|
230
|
+
onPointerLeave: leave,
|
|
231
|
+
onKeyDown: keysHandler,
|
|
232
|
+
...props,
|
|
233
|
+
children: [
|
|
234
|
+
/* @__PURE__ */ jsx(
|
|
235
|
+
"svg",
|
|
236
|
+
{
|
|
237
|
+
ref: setSvgNode,
|
|
238
|
+
"data-slot": "chart-svg",
|
|
239
|
+
"aria-hidden": "true",
|
|
240
|
+
className: "absolute inset-0 size-full overflow-visible",
|
|
241
|
+
viewBox: `0 0 ${Math.max(1, size.width)} ${Math.max(1, size.height)}`,
|
|
242
|
+
preserveAspectRatio: "none"
|
|
243
|
+
}
|
|
244
|
+
),
|
|
245
|
+
loading ? /* @__PURE__ */ jsx(Skeleton, { className: "absolute inset-0 size-full" }) : hasData ? children : /* @__PURE__ */ jsx("div", { "data-slot": "chart-empty", className: "absolute inset-0 grid place-items-center text-sm text-muted-foreground", children: empty }),
|
|
246
|
+
!sparkline && hasData ? /* @__PURE__ */ jsxs("table", { className: "sr-only", children: [
|
|
247
|
+
/* @__PURE__ */ jsx("caption", { children: label ?? "Chart data" }),
|
|
248
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
249
|
+
/* @__PURE__ */ jsx("th", { scope: "col", children: index ?? "Index" }),
|
|
250
|
+
keys.map((key) => /* @__PURE__ */ jsx("th", { scope: "col", children: config[key]?.label ?? key }, key))
|
|
251
|
+
] }) }),
|
|
252
|
+
/* @__PURE__ */ jsx("tbody", { children: rows.map((row, rowIndex) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
253
|
+
/* @__PURE__ */ jsx("th", { scope: "row", children: labelAt(rowIndex) }),
|
|
254
|
+
keys.map((key) => /* @__PURE__ */ jsx("td", { children: finiteNumber(row[key]) === null ? "Unavailable" : formatValue(key, row[key]) }, key))
|
|
255
|
+
] }, rowIndex)) })
|
|
256
|
+
] }) : null,
|
|
257
|
+
crosshair && activeIndex !== null && svgNode && plot.width > 0 ? createPortal(
|
|
258
|
+
/* @__PURE__ */ jsx(
|
|
259
|
+
"line",
|
|
260
|
+
{
|
|
261
|
+
"data-slot": "chart-crosshair",
|
|
262
|
+
x1: x(activeIndex),
|
|
263
|
+
x2: x(activeIndex),
|
|
264
|
+
y1: plot.y,
|
|
265
|
+
y2: plot.y + plot.height,
|
|
266
|
+
className: "stroke-border",
|
|
267
|
+
strokeDasharray: "3 3"
|
|
268
|
+
}
|
|
269
|
+
),
|
|
270
|
+
svgNode
|
|
271
|
+
) : null
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
) });
|
|
275
|
+
}
|
|
276
|
+
function ChartLine({
|
|
277
|
+
dataKey = "value",
|
|
278
|
+
color,
|
|
279
|
+
curve = "linear",
|
|
280
|
+
connectNulls = false,
|
|
281
|
+
dashed = false,
|
|
282
|
+
markEnd = false,
|
|
283
|
+
variant = "default",
|
|
284
|
+
hideActiveDot = false,
|
|
285
|
+
strokeWidth = 2,
|
|
286
|
+
className,
|
|
287
|
+
...props
|
|
288
|
+
}) {
|
|
289
|
+
const chart = useChart("ChartLine");
|
|
290
|
+
if (!chart.svgNode || chart.width <= 0 || chart.hiddenSeries.includes(dataKey)) return null;
|
|
291
|
+
const segments = splitPointSegments(chart.points(dataKey), connectNulls).filter((segment) => segment.length);
|
|
292
|
+
const tone = color ?? chart.colorFor(dataKey);
|
|
293
|
+
const active = chart.activeIndex === null ? null : chart.points(dataKey)[chart.activeIndex];
|
|
294
|
+
const last = segments.at(-1)?.at(-1);
|
|
295
|
+
const dimmed = chart.focusedSeries !== null && chart.focusedSeries !== dataKey;
|
|
296
|
+
return createPortal(
|
|
297
|
+
/* @__PURE__ */ jsxs("g", { "data-slot": "chart-line", "data-series": dataKey, className: cn(chartColorClass[tone], dimmed && "opacity-25", className), children: [
|
|
298
|
+
segments.map((segment, segmentIndex) => /* @__PURE__ */ jsx(
|
|
299
|
+
"path",
|
|
300
|
+
{
|
|
301
|
+
d: chartLinePath(segment, curve),
|
|
302
|
+
fill: "none",
|
|
303
|
+
stroke: "currentColor",
|
|
304
|
+
strokeWidth: variant === "comparison" ? Math.max(1, Number(strokeWidth) - 0.5) : strokeWidth,
|
|
305
|
+
strokeLinecap: "round",
|
|
306
|
+
strokeLinejoin: "round",
|
|
307
|
+
strokeDasharray: dashed || variant === "comparison" ? "5 5" : void 0,
|
|
308
|
+
pathLength: 1,
|
|
309
|
+
className: cn(variant === "comparison" && "opacity-45", chart.animate && !dashed && "animate-chart-line"),
|
|
310
|
+
...props
|
|
311
|
+
},
|
|
312
|
+
segmentIndex
|
|
313
|
+
)),
|
|
314
|
+
markEnd && last ? /* @__PURE__ */ jsx("circle", { cx: last.x, cy: last.y, r: 3.5, fill: "currentColor" }) : null,
|
|
315
|
+
!hideActiveDot && active ? /* @__PURE__ */ jsx("circle", { cx: active.x, cy: active.y, r: 4, fill: "currentColor", stroke: "var(--background)", strokeWidth: 2 }) : null
|
|
316
|
+
] }),
|
|
317
|
+
chart.svgNode
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
function ChartArea({ dataKey = "value", color, curve = "linear", connectNulls = false, className, ...props }) {
|
|
321
|
+
const chart = useChart("ChartArea");
|
|
322
|
+
if (!chart.svgNode || chart.width <= 0 || chart.hiddenSeries.includes(dataKey)) return null;
|
|
323
|
+
const baseline = chart.y(Math.max(chart.domain[0], Math.min(chart.domain[1], 0)));
|
|
324
|
+
const segments = splitPointSegments(chart.points(dataKey), connectNulls).filter((segment) => segment.length);
|
|
325
|
+
const tone = color ?? chart.colorFor(dataKey);
|
|
326
|
+
const dimmed = chart.focusedSeries !== null && chart.focusedSeries !== dataKey;
|
|
327
|
+
return createPortal(
|
|
328
|
+
/* @__PURE__ */ jsx("g", { "data-slot": "chart-area", "data-series": dataKey, className: cn(chartColorClass[tone], dimmed && "opacity-20", className), children: segments.map((segment, segmentIndex) => /* @__PURE__ */ jsx(
|
|
329
|
+
"path",
|
|
330
|
+
{
|
|
331
|
+
d: chartAreaPath(segment, baseline, curve),
|
|
332
|
+
fill: "currentColor",
|
|
333
|
+
className: cn("opacity-15", chart.animate && "animate-chart-area"),
|
|
334
|
+
...props
|
|
335
|
+
},
|
|
336
|
+
segmentIndex
|
|
337
|
+
)) }),
|
|
338
|
+
chart.svgNode
|
|
339
|
+
);
|
|
340
|
+
}
|
|
341
|
+
function isHighlighted(highlight, datum, index, activeIndex) {
|
|
342
|
+
if (highlight === "active") return activeIndex === index;
|
|
343
|
+
if (typeof highlight === "number") return index === highlight;
|
|
344
|
+
if (Array.isArray(highlight)) return highlight.includes(index);
|
|
345
|
+
if (typeof highlight === "function") return highlight(datum, index, activeIndex === index);
|
|
346
|
+
return false;
|
|
347
|
+
}
|
|
348
|
+
function matchesIndex(value, datum, index) {
|
|
349
|
+
if (typeof value === "number") return value === index;
|
|
350
|
+
if (Array.isArray(value)) return value.includes(index);
|
|
351
|
+
if (typeof value === "function") return value(datum, index);
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
function ChartPattern({ id, texture }) {
|
|
355
|
+
return /* @__PURE__ */ jsxs("pattern", { id, width: 6, height: 6, patternUnits: "userSpaceOnUse", children: [
|
|
356
|
+
/* @__PURE__ */ jsx("rect", { width: 6, height: 6, fill: "currentColor", opacity: 0.16 }),
|
|
357
|
+
texture === "diagonal" ? /* @__PURE__ */ jsx("path", { d: "M-1,1 L1,-1 M0,6 L6,0 M5,7 L7,5", stroke: "currentColor", strokeWidth: 1.25 }) : /* @__PURE__ */ jsx("circle", { cx: 3, cy: 3, r: 1.25, fill: "currentColor" })
|
|
358
|
+
] });
|
|
359
|
+
}
|
|
360
|
+
function ChartBar({
|
|
361
|
+
dataKey = "value",
|
|
362
|
+
color,
|
|
363
|
+
barRatio = 0.62,
|
|
364
|
+
radius = 8,
|
|
365
|
+
label,
|
|
366
|
+
highlight,
|
|
367
|
+
highlightColor = "brand",
|
|
368
|
+
partial,
|
|
369
|
+
texture = "solid",
|
|
370
|
+
className,
|
|
371
|
+
...props
|
|
372
|
+
}) {
|
|
373
|
+
const chart = useChart("ChartBar");
|
|
374
|
+
const patternId = React.useId().replaceAll(":", "");
|
|
375
|
+
if (!chart.svgNode || chart.width <= 0 || chart.hiddenSeries.includes(dataKey)) return null;
|
|
376
|
+
const baseTone = color ?? chart.colorFor(dataKey);
|
|
377
|
+
const baseline = chart.y(Math.max(chart.domain[0], Math.min(chart.domain[1], 0)));
|
|
378
|
+
const dimmedSeries = chart.focusedSeries !== null && chart.focusedSeries !== dataKey;
|
|
379
|
+
return createPortal(
|
|
380
|
+
/* @__PURE__ */ jsx("g", { "data-slot": "chart-bar", "data-series": dataKey, className: cn(dimmedSeries && "opacity-25", className), children: chart.rows.map((row, index) => {
|
|
381
|
+
const value = finiteNumber(row[dataKey]);
|
|
382
|
+
if (value === null) return null;
|
|
383
|
+
const band = categoryBand(index, chart.rows.length, chart.plot.x, chart.plot.width, barRatio);
|
|
384
|
+
const valueY = chart.y(value);
|
|
385
|
+
const y = Math.min(valueY, baseline);
|
|
386
|
+
const height = Math.max(0, Math.abs(valueY - baseline));
|
|
387
|
+
const highlighted = isHighlighted(highlight, row, index, chart.activeIndex);
|
|
388
|
+
const incomplete = matchesIndex(partial, row, index);
|
|
389
|
+
const tone = highlighted ? highlightColor : baseTone;
|
|
390
|
+
const fillId = `${patternId}-${index}`;
|
|
391
|
+
return /* @__PURE__ */ jsxs("g", { className: chartColorClass[tone], children: [
|
|
392
|
+
texture !== "solid" ? /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(ChartPattern, { id: fillId, texture }) }) : null,
|
|
393
|
+
/* @__PURE__ */ jsx(
|
|
394
|
+
"rect",
|
|
395
|
+
{
|
|
396
|
+
"data-highlighted": highlighted ? "" : void 0,
|
|
397
|
+
"data-partial": incomplete ? "" : void 0,
|
|
398
|
+
x: band.x,
|
|
399
|
+
y,
|
|
400
|
+
width: band.width,
|
|
401
|
+
height,
|
|
402
|
+
rx: Math.min(radius, band.width / 2, height / 2),
|
|
403
|
+
fill: texture === "solid" ? "currentColor" : `url(#${fillId})`,
|
|
404
|
+
stroke: incomplete ? "currentColor" : void 0,
|
|
405
|
+
strokeWidth: incomplete ? 1.5 : void 0,
|
|
406
|
+
strokeDasharray: incomplete ? "3 3" : void 0,
|
|
407
|
+
className: cn(incomplete && "opacity-65", chart.animate && "animate-chart-bar"),
|
|
408
|
+
style: { transformOrigin: `${band.x + band.width / 2}px ${baseline}px`, animationDelay: `calc(var(--chart-stagger) * ${index})` },
|
|
409
|
+
...props
|
|
410
|
+
}
|
|
411
|
+
),
|
|
412
|
+
label ? /* @__PURE__ */ jsx("text", { x: band.x + band.width / 2, y: value >= 0 ? y - 6 : y + height + 14, textAnchor: "middle", className: "fill-foreground text-xs tabular-nums", children: label(value, index) }) : null
|
|
413
|
+
] }, index);
|
|
414
|
+
}) }),
|
|
415
|
+
chart.svgNode
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
function ChartBars({ dataKeys, mode = "grouped", barRatio = 0.72, radius = 6, texture = "solid", className, ...props }) {
|
|
419
|
+
const chart = useChart("ChartBars");
|
|
420
|
+
const patternId = React.useId().replaceAll(":", "");
|
|
421
|
+
if (!chart.svgNode || chart.width <= 0) return null;
|
|
422
|
+
const keys = (dataKeys ?? chart.visibleKeys).filter((key) => !chart.hiddenSeries.includes(key));
|
|
423
|
+
return createPortal(
|
|
424
|
+
/* @__PURE__ */ jsxs("g", { "data-slot": "chart-bars", "data-mode": mode, className, ...props, children: [
|
|
425
|
+
texture !== "solid" ? /* @__PURE__ */ jsx("defs", { children: keys.map((key, index) => /* @__PURE__ */ jsx("g", { className: chartColorClass[chart.colorFor(key)], children: /* @__PURE__ */ jsx(ChartPattern, { id: `${patternId}-${index}`, texture }) }, key)) }) : null,
|
|
426
|
+
chart.rows.map((row, rowIndex) => {
|
|
427
|
+
const band = categoryBand(rowIndex, chart.rows.length, chart.plot.x, chart.plot.width, barRatio);
|
|
428
|
+
let positive = 0;
|
|
429
|
+
let negative = 0;
|
|
430
|
+
return keys.map((key, keyIndex) => {
|
|
431
|
+
const value = finiteNumber(row[key]);
|
|
432
|
+
if (value === null) return null;
|
|
433
|
+
const start = mode === "stacked" ? value >= 0 ? positive : negative : 0;
|
|
434
|
+
const end = start + value;
|
|
435
|
+
if (mode === "stacked") {
|
|
436
|
+
if (value >= 0) positive = end;
|
|
437
|
+
else negative = end;
|
|
438
|
+
}
|
|
439
|
+
const width = mode === "grouped" ? band.width / Math.max(1, keys.length) : band.width;
|
|
440
|
+
const x = mode === "grouped" ? band.x + keyIndex * width : band.x;
|
|
441
|
+
const startY = chart.y(start);
|
|
442
|
+
const endY = chart.y(end);
|
|
443
|
+
const dimmed = chart.focusedSeries !== null && chart.focusedSeries !== key;
|
|
444
|
+
return /* @__PURE__ */ jsx(
|
|
445
|
+
"rect",
|
|
446
|
+
{
|
|
447
|
+
"data-series": key,
|
|
448
|
+
x,
|
|
449
|
+
y: Math.min(startY, endY),
|
|
450
|
+
width: Math.max(1, width - (mode === "grouped" ? 2 : 0)),
|
|
451
|
+
height: Math.abs(startY - endY),
|
|
452
|
+
rx: Math.min(radius, width / 2),
|
|
453
|
+
fill: texture === "solid" ? "currentColor" : `url(#${patternId}-${keyIndex})`,
|
|
454
|
+
className: cn(chartColorClass[chart.colorFor(key)], dimmed && "opacity-25", chart.animate && "animate-chart-bar"),
|
|
455
|
+
style: { transformOrigin: `${x + width / 2}px ${startY}px`, animationDelay: `calc(var(--chart-stagger) * ${rowIndex})` }
|
|
456
|
+
},
|
|
457
|
+
key
|
|
458
|
+
);
|
|
459
|
+
});
|
|
460
|
+
})
|
|
461
|
+
] }),
|
|
462
|
+
chart.svgNode
|
|
463
|
+
);
|
|
464
|
+
}
|
|
465
|
+
function ChartAreas({ dataKeys, mode = "overlap", texture = "solid", className, ...props }) {
|
|
466
|
+
const chart = useChart("ChartAreas");
|
|
467
|
+
const patternId = React.useId().replaceAll(":", "");
|
|
468
|
+
if (!chart.svgNode || chart.width <= 0) return null;
|
|
469
|
+
const keys = (dataKeys ?? chart.visibleKeys).filter((key) => !chart.hiddenSeries.includes(key));
|
|
470
|
+
const positive = chart.rows.map(() => 0);
|
|
471
|
+
const negative = chart.rows.map(() => 0);
|
|
472
|
+
return createPortal(
|
|
473
|
+
/* @__PURE__ */ jsxs("g", { "data-slot": "chart-areas", "data-mode": mode, className, ...props, children: [
|
|
474
|
+
texture !== "solid" ? /* @__PURE__ */ jsx("defs", { children: keys.map((key, index) => /* @__PURE__ */ jsx("g", { className: chartColorClass[chart.colorFor(key)], children: /* @__PURE__ */ jsx(ChartPattern, { id: `${patternId}-${index}`, texture }) }, key)) }) : null,
|
|
475
|
+
keys.map((key, keyIndex) => {
|
|
476
|
+
const top = [];
|
|
477
|
+
const bottom = [];
|
|
478
|
+
chart.rows.forEach((row, index) => {
|
|
479
|
+
const value = finiteNumber(row[key]) ?? 0;
|
|
480
|
+
const base = mode === "stacked" ? value >= 0 ? positive[index] : negative[index] : 0;
|
|
481
|
+
const end = base + value;
|
|
482
|
+
if (mode === "stacked") {
|
|
483
|
+
if (value >= 0) positive[index] = end;
|
|
484
|
+
else negative[index] = end;
|
|
485
|
+
}
|
|
486
|
+
top.push({ x: chart.x(index), y: chart.y(end), value: end, index });
|
|
487
|
+
bottom.push({ x: chart.x(index), y: chart.y(base), value: base, index });
|
|
488
|
+
});
|
|
489
|
+
if (!top.length) return null;
|
|
490
|
+
const d = `${chartLinePath(top)} ${[...bottom].reverse().map((point) => `L${point.x},${point.y}`).join(" ")} Z`;
|
|
491
|
+
const dimmed = chart.focusedSeries !== null && chart.focusedSeries !== key;
|
|
492
|
+
return /* @__PURE__ */ jsx("path", { "data-series": key, d, fill: texture === "solid" ? "currentColor" : `url(#${patternId}-${keyIndex})`, className: cn(chartColorClass[chart.colorFor(key)], texture === "solid" && "opacity-20", dimmed && "opacity-5", chart.animate && "animate-chart-area") }, key);
|
|
493
|
+
})
|
|
494
|
+
] }),
|
|
495
|
+
chart.svgNode
|
|
496
|
+
);
|
|
497
|
+
}
|
|
498
|
+
function ChartReferenceLine({ value, label, className, ...props }) {
|
|
499
|
+
const chart = useChart("ChartReferenceLine");
|
|
500
|
+
if (!chart.svgNode || chart.width <= 0 || !Number.isFinite(value)) return null;
|
|
501
|
+
const y = chart.y(value);
|
|
502
|
+
return createPortal(
|
|
503
|
+
/* @__PURE__ */ jsxs("g", { "data-slot": "chart-reference-line", className: cn("stroke-muted-foreground fill-muted-foreground text-xs", className), children: [
|
|
504
|
+
/* @__PURE__ */ jsx("line", { x1: chart.plot.x, x2: chart.plot.x + chart.plot.width, y1: y, y2: y, stroke: "currentColor", strokeDasharray: "4 4", ...props }),
|
|
505
|
+
label ? /* @__PURE__ */ jsx("text", { x: chart.plot.x + chart.plot.width, y: y - 6, textAnchor: "end", children: label }) : null
|
|
506
|
+
] }),
|
|
507
|
+
chart.svgNode
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
function ChartAnnotation({ index, value, label, className, ...props }) {
|
|
511
|
+
const chart = useChart("ChartAnnotation");
|
|
512
|
+
if (!chart.svgNode || chart.width <= 0 || index < 0 || index >= chart.rows.length || !Number.isFinite(value)) return null;
|
|
513
|
+
const x = chart.x(index);
|
|
514
|
+
const y = chart.y(value);
|
|
515
|
+
return createPortal(
|
|
516
|
+
/* @__PURE__ */ jsxs("g", { "data-slot": "chart-annotation", transform: `translate(${x} ${y})`, className: cn("fill-foreground text-xs", className), ...props, children: [
|
|
517
|
+
/* @__PURE__ */ jsx("circle", { r: 4, fill: "currentColor" }),
|
|
518
|
+
/* @__PURE__ */ jsx("line", { x1: 0, x2: 0, y1: -5, y2: -20, stroke: "currentColor" }),
|
|
519
|
+
/* @__PURE__ */ jsx("text", { y: -25, textAnchor: "middle", children: label })
|
|
520
|
+
] }),
|
|
521
|
+
chart.svgNode
|
|
522
|
+
);
|
|
523
|
+
}
|
|
524
|
+
function ChartGrid({ rows = 4, showVertical = false, baseline = true, className, ...props }) {
|
|
525
|
+
const chart = useChart("ChartGrid");
|
|
526
|
+
if (!chart.svgNode || chart.width <= 0) return null;
|
|
527
|
+
const ticks = chartTicks(chart.domain, rows);
|
|
528
|
+
const zeroY = chart.y(0);
|
|
529
|
+
return createPortal(
|
|
530
|
+
/* @__PURE__ */ jsxs("g", { "data-slot": "chart-grid", className: cn("stroke-border", className), ...props, children: [
|
|
531
|
+
ticks.map((tick) => /* @__PURE__ */ jsx("line", { x1: chart.plot.x, x2: chart.plot.x + chart.plot.width, y1: chart.y(tick), y2: chart.y(tick), className: cn(baseline && tick === 0 ? "opacity-100" : "opacity-60") }, tick)),
|
|
532
|
+
showVertical ? chart.rows.map((_, index) => /* @__PURE__ */ jsx("line", { x1: chart.x(index), x2: chart.x(index), y1: chart.plot.y, y2: chart.plot.y + chart.plot.height, className: "opacity-40" }, index)) : null,
|
|
533
|
+
baseline && chart.domain[0] < 0 && chart.domain[1] > 0 && !ticks.includes(0) ? /* @__PURE__ */ jsx("line", { x1: chart.plot.x, x2: chart.plot.x + chart.plot.width, y1: zeroY, y2: zeroY }) : null
|
|
534
|
+
] }),
|
|
535
|
+
chart.svgNode
|
|
536
|
+
);
|
|
537
|
+
}
|
|
538
|
+
function ChartXAxis({ tickFormatter = String, interval = 1, minTickGap = 12, minInterval = 1, label, className, ...props }) {
|
|
539
|
+
const chart = useChart("ChartXAxis");
|
|
540
|
+
if (!chart.svgNode || chart.width <= 0) return null;
|
|
541
|
+
const approx = 56 + minTickGap;
|
|
542
|
+
const stride = interval === "auto" ? Math.max(minInterval, Math.ceil(chart.rows.length * approx / Math.max(1, chart.plot.width))) : Math.max(1, interval);
|
|
543
|
+
return createPortal(
|
|
544
|
+
/* @__PURE__ */ jsxs("g", { "data-slot": "chart-x-axis", className: cn("fill-muted-foreground text-xs", className), ...props, children: [
|
|
545
|
+
chart.rows.map((_, index) => index % stride === 0 || index === chart.rows.length - 1 ? /* @__PURE__ */ jsx("text", { x: chart.x(index), y: chart.plot.y + chart.plot.height + 18, textAnchor: "middle", children: tickFormatter(String(chart.labelAt(index)), index) }, index) : null),
|
|
546
|
+
label ? /* @__PURE__ */ jsx("text", { x: chart.plot.x + chart.plot.width / 2, y: chart.height - 2, textAnchor: "middle", className: "fill-foreground font-medium", children: label }) : null
|
|
547
|
+
] }),
|
|
548
|
+
chart.svgNode
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
function ChartYAxis({ count = 4, tickFormatter = compactNumber, side = "left", label, className, ...props }) {
|
|
552
|
+
const chart = useChart("ChartYAxis");
|
|
553
|
+
if (!chart.svgNode || chart.width <= 0) return null;
|
|
554
|
+
const x = side === "left" ? chart.plot.x - 8 : chart.plot.x + chart.plot.width + 8;
|
|
555
|
+
return createPortal(
|
|
556
|
+
/* @__PURE__ */ jsxs("g", { "data-slot": "chart-y-axis", className: cn("fill-muted-foreground text-xs tabular-nums", className), ...props, children: [
|
|
557
|
+
chartTicks(chart.domain, count).map((tick) => /* @__PURE__ */ jsx("text", { x, y: chart.y(tick) + 4, textAnchor: side === "left" ? "end" : "start", children: tickFormatter(tick) }, tick)),
|
|
558
|
+
label ? /* @__PURE__ */ jsx("text", { transform: `translate(${side === "left" ? 10 : chart.width - 10} ${chart.plot.y + chart.plot.height / 2}) rotate(-90)`, textAnchor: "middle", className: "fill-foreground font-medium", children: label }) : null
|
|
559
|
+
] }),
|
|
560
|
+
chart.svgNode
|
|
561
|
+
);
|
|
562
|
+
}
|
|
563
|
+
function ChartTooltip({ valueFormatter, labelFormatter, footer, sort = "none", total = false, maxItems, className }) {
|
|
564
|
+
const chart = useChart("ChartTooltip");
|
|
565
|
+
if (chart.activeIndex === null) return null;
|
|
566
|
+
const activeIndex = chart.activeIndex;
|
|
567
|
+
const datum = chart.rows[activeIndex];
|
|
568
|
+
let items = chart.visibleKeys.map((key) => ({ key, value: chart.valueAt(key, activeIndex) })).filter((item) => item.value !== null);
|
|
569
|
+
if (sort !== "none") items = [...items].sort((a, b) => sort === "desc" ? b.value - a.value : a.value - b.value);
|
|
570
|
+
const hiddenCount = maxItems && items.length > maxItems ? items.length - maxItems : 0;
|
|
571
|
+
const visibleItems = maxItems ? items.slice(0, maxItems) : items;
|
|
572
|
+
const totalValue = items.reduce((sum, item) => sum + item.value, 0);
|
|
573
|
+
const left = Math.max(88, Math.min(chart.width - 88, chart.x(activeIndex)));
|
|
574
|
+
const label = labelFormatter?.(chart.labelAt(activeIndex), datum, activeIndex) ?? chart.labelAt(activeIndex);
|
|
575
|
+
return /* @__PURE__ */ jsxs(
|
|
576
|
+
"div",
|
|
577
|
+
{
|
|
578
|
+
"data-slot": "chart-tooltip",
|
|
579
|
+
className: cn("pointer-events-none absolute z-20 min-w-40 -translate-x-1/2 -translate-y-full rounded-md bg-popover p-3 text-sm text-popover-foreground shadow-lg ring-1 ring-edge", className),
|
|
580
|
+
style: { left, top: Math.max(42, chart.plot.y + chart.plot.height * 0.42) },
|
|
581
|
+
children: [
|
|
582
|
+
/* @__PURE__ */ jsx("div", { className: "mb-2 font-medium", children: label }),
|
|
583
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-1.5", children: [
|
|
584
|
+
visibleItems.map((item) => /* @__PURE__ */ jsx(ChartTooltipItem, { color: chart.colorFor(item.key), label: chart.config[item.key]?.label ?? item.key, value: valueFormatter?.(item.value, item.key) ?? chart.formatValue(item.key, item.value) }, item.key)),
|
|
585
|
+
hiddenCount ? /* @__PURE__ */ jsxs("div", { className: "text-xs text-muted-foreground", children: [
|
|
586
|
+
"+",
|
|
587
|
+
hiddenCount,
|
|
588
|
+
" more"
|
|
589
|
+
] }) : null,
|
|
590
|
+
total ? /* @__PURE__ */ jsx(ChartTooltipItem, { label: typeof total === "string" ? total : "Total", value: valueFormatter?.(totalValue, "total") ?? totalValue.toLocaleString() }) : null
|
|
591
|
+
] }),
|
|
592
|
+
footer ? /* @__PURE__ */ jsx("div", { className: "mt-2 border-t border-border pt-2", children: footer(datum, activeIndex) }) : null
|
|
593
|
+
]
|
|
594
|
+
}
|
|
595
|
+
);
|
|
596
|
+
}
|
|
597
|
+
function ChartTooltipItem({ label, value, color, dimmed = false, className, ...props }) {
|
|
598
|
+
return /* @__PURE__ */ jsxs("span", { "data-slot": "chart-tooltip-item", className: cn("flex items-center gap-2", dimmed && "opacity-50", className), ...props, children: [
|
|
599
|
+
color ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cn("size-2 rounded-sm bg-current", chartColorClass[color]) }) : null,
|
|
600
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-muted-foreground", children: label }),
|
|
601
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0 font-medium tabular-nums", children: value })
|
|
602
|
+
] });
|
|
603
|
+
}
|
|
604
|
+
function ChartLegend({ align = "start", placement = "top", interactive = true, className, ...props }) {
|
|
605
|
+
const chart = useChart("ChartLegend");
|
|
606
|
+
const alignment = align === "start" ? "justify-start" : align === "end" ? "justify-end" : "justify-center";
|
|
607
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "chart-legend", className: cn("absolute inset-x-0 z-10 flex flex-wrap gap-1 px-2", placement === "top" ? "top-0" : "bottom-0", alignment, className), ...props, children: chart.keys.map((key) => {
|
|
608
|
+
const hidden = chart.hiddenSeries.includes(key);
|
|
609
|
+
return /* @__PURE__ */ jsxs(
|
|
610
|
+
"button",
|
|
611
|
+
{
|
|
612
|
+
type: "button",
|
|
613
|
+
"aria-pressed": !hidden,
|
|
614
|
+
disabled: !interactive,
|
|
615
|
+
"data-hidden": hidden ? "" : void 0,
|
|
616
|
+
className: "flex min-h-10 cursor-pointer items-center gap-1.5 rounded-sm px-2 text-xs text-muted-foreground outline-none transition-colors duration-fast hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-focus disabled:cursor-default disabled:hover:bg-transparent data-hidden:opacity-45",
|
|
617
|
+
onPointerEnter: () => interactive && chart.setFocusedSeries(key),
|
|
618
|
+
onPointerLeave: () => interactive && chart.setFocusedSeries(null),
|
|
619
|
+
onFocus: () => interactive && chart.setFocusedSeries(key),
|
|
620
|
+
onBlur: () => interactive && chart.setFocusedSeries(null),
|
|
621
|
+
onClick: () => interactive && chart.setHiddenSeries(hidden ? chart.hiddenSeries.filter((item) => item !== key) : [...chart.hiddenSeries, key]),
|
|
622
|
+
children: [
|
|
623
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cn("size-2 rounded-sm bg-current", chartColorClass[chart.colorFor(key)]) }),
|
|
624
|
+
/* @__PURE__ */ jsx("span", { children: chart.config[key]?.label ?? key })
|
|
625
|
+
]
|
|
626
|
+
},
|
|
627
|
+
key
|
|
628
|
+
);
|
|
629
|
+
}) });
|
|
630
|
+
}
|
|
631
|
+
export {
|
|
632
|
+
Chart,
|
|
633
|
+
ChartAnnotation,
|
|
634
|
+
ChartArea,
|
|
635
|
+
ChartAreas,
|
|
636
|
+
ChartBar,
|
|
637
|
+
ChartBars,
|
|
638
|
+
ChartGrid,
|
|
639
|
+
ChartLegend,
|
|
640
|
+
ChartLine,
|
|
641
|
+
ChartReferenceLine,
|
|
642
|
+
ChartTooltip,
|
|
643
|
+
ChartTooltipItem,
|
|
644
|
+
ChartXAxis,
|
|
645
|
+
ChartYAxis,
|
|
646
|
+
categoricalColors
|
|
647
|
+
};
|
|
648
|
+
//# sourceMappingURL=chart.mjs.map
|