@thalavaisankar/atoms 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +24 -0
- package/README.md +196 -2
- package/THIRD_PARTY_NOTICES.md +275 -0
- package/dist/blocks/index.d.mts +2 -0
- package/dist/blocks/index.mjs +1 -0
- package/dist/blocks/index.mjs.map +1 -0
- package/dist/components/ui/accordion/accordion.mjs +194 -0
- package/dist/components/ui/accordion/accordion.mjs.map +1 -0
- package/dist/components/ui/accordion/index.mjs +15 -0
- package/dist/components/ui/accordion/index.mjs.map +1 -0
- package/dist/components/ui/activity-feed/activity-feed.mjs +287 -0
- package/dist/components/ui/activity-feed/activity-feed.mjs.map +1 -0
- package/dist/components/ui/activity-feed/index.mjs +39 -0
- package/dist/components/ui/activity-feed/index.mjs.map +1 -0
- package/dist/components/ui/alert/alert.mjs +128 -0
- package/dist/components/ui/alert/alert.mjs.map +1 -0
- package/dist/components/ui/alert/index.mjs +17 -0
- package/dist/components/ui/alert/index.mjs.map +1 -0
- package/dist/components/ui/animated-label/animated-label.mjs +89 -0
- package/dist/components/ui/animated-label/animated-label.mjs.map +1 -0
- package/dist/components/ui/animated-label/index.mjs +9 -0
- package/dist/components/ui/animated-label/index.mjs.map +1 -0
- package/dist/components/ui/animated-number/animated-number.mjs +101 -0
- package/dist/components/ui/animated-number/animated-number.mjs.map +1 -0
- package/dist/components/ui/animated-number/index.mjs +5 -0
- package/dist/components/ui/animated-number/index.mjs.map +1 -0
- package/dist/components/ui/avatar/avatar.mjs +130 -0
- package/dist/components/ui/avatar/avatar.mjs.map +1 -0
- package/dist/components/ui/avatar/index.mjs +17 -0
- package/dist/components/ui/avatar/index.mjs.map +1 -0
- package/dist/components/ui/avatar-group/avatar-group.mjs +49 -0
- package/dist/components/ui/avatar-group/avatar-group.mjs.map +1 -0
- package/dist/components/ui/avatar-group/index.mjs +5 -0
- package/dist/components/ui/avatar-group/index.mjs.map +1 -0
- package/dist/components/ui/badge/badge-motion.mjs +108 -0
- package/dist/components/ui/badge/badge-motion.mjs.map +1 -0
- package/dist/components/ui/badge/badge.mjs +314 -0
- package/dist/components/ui/badge/badge.mjs.map +1 -0
- package/dist/components/ui/badge/index.mjs +27 -0
- package/dist/components/ui/badge/index.mjs.map +1 -0
- package/dist/components/ui/badge/readable-ink.mjs +36 -0
- package/dist/components/ui/badge/readable-ink.mjs.map +1 -0
- package/dist/components/ui/badge-group/badge-group.mjs +132 -0
- package/dist/components/ui/badge-group/badge-group.mjs.map +1 -0
- package/dist/components/ui/badge-group/index.mjs +5 -0
- package/dist/components/ui/badge-group/index.mjs.map +1 -0
- package/dist/components/ui/breadcrumb/breadcrumb.mjs +108 -0
- package/dist/components/ui/breadcrumb/breadcrumb.mjs.map +1 -0
- package/dist/components/ui/breadcrumb/index.mjs +19 -0
- package/dist/components/ui/breadcrumb/index.mjs.map +1 -0
- package/dist/components/ui/button/button-variants.mjs +80 -0
- package/dist/components/ui/button/button-variants.mjs.map +1 -0
- package/dist/components/ui/button/button.mjs +74 -0
- package/dist/components/ui/button/button.mjs.map +1 -0
- package/dist/components/ui/button/index.mjs +17 -0
- package/dist/components/ui/button/index.mjs.map +1 -0
- package/dist/components/ui/button/social-button.mjs +45 -0
- package/dist/components/ui/button/social-button.mjs.map +1 -0
- package/dist/components/ui/button/social-logos.mjs +179 -0
- package/dist/components/ui/button/social-logos.mjs.map +1 -0
- package/dist/components/ui/button/split-button.mjs +72 -0
- package/dist/components/ui/button/split-button.mjs.map +1 -0
- package/dist/components/ui/button-group/button-group.mjs +58 -0
- package/dist/components/ui/button-group/button-group.mjs.map +1 -0
- package/dist/components/ui/button-group/index.mjs +11 -0
- package/dist/components/ui/button-group/index.mjs.map +1 -0
- package/dist/components/ui/card/card.mjs +131 -0
- package/dist/components/ui/card/card.mjs.map +1 -0
- package/dist/components/ui/card/index.mjs +23 -0
- package/dist/components/ui/card/index.mjs.map +1 -0
- package/dist/components/ui/chart/bar-list.mjs +87 -0
- package/dist/components/ui/chart/bar-list.mjs.map +1 -0
- package/dist/components/ui/chart/chart-colors.mjs +68 -0
- package/dist/components/ui/chart/chart-colors.mjs.map +1 -0
- package/dist/components/ui/chart/chart-geometry.mjs +152 -0
- package/dist/components/ui/chart/chart-geometry.mjs.map +1 -0
- package/dist/components/ui/chart/chart-specialized.mjs +194 -0
- package/dist/components/ui/chart/chart-specialized.mjs.map +1 -0
- package/dist/components/ui/chart/chart.mjs +648 -0
- package/dist/components/ui/chart/chart.mjs.map +1 -0
- package/dist/components/ui/chart/index.mjs +88 -0
- package/dist/components/ui/chart/index.mjs.map +1 -0
- package/dist/components/ui/chart/radial-meter.mjs +142 -0
- package/dist/components/ui/chart/radial-meter.mjs.map +1 -0
- package/dist/components/ui/chart/types.mjs +1 -0
- package/dist/components/ui/chart/types.mjs.map +1 -0
- package/dist/components/ui/checkbox/checkbox.mjs +183 -0
- package/dist/components/ui/checkbox/checkbox.mjs.map +1 -0
- package/dist/components/ui/checkbox/index.mjs +11 -0
- package/dist/components/ui/checkbox/index.mjs.map +1 -0
- package/dist/components/ui/checklist/checklist.mjs +353 -0
- package/dist/components/ui/checklist/checklist.mjs.map +1 -0
- package/dist/components/ui/checklist/index.mjs +33 -0
- package/dist/components/ui/checklist/index.mjs.map +1 -0
- package/dist/components/ui/chip/chip.mjs +202 -0
- package/dist/components/ui/chip/chip.mjs.map +1 -0
- package/dist/components/ui/chip/index.mjs +13 -0
- package/dist/components/ui/chip/index.mjs.map +1 -0
- package/dist/components/ui/chip-group/chip-group.mjs +204 -0
- package/dist/components/ui/chip-group/chip-group.mjs.map +1 -0
- package/dist/components/ui/chip-group/index.mjs +11 -0
- package/dist/components/ui/chip-group/index.mjs.map +1 -0
- package/dist/components/ui/code-snippet/code-highlighter.mjs +16 -0
- package/dist/components/ui/code-snippet/code-highlighter.mjs.map +1 -0
- package/dist/components/ui/code-snippet/code-snippet.mjs +437 -0
- package/dist/components/ui/code-snippet/code-snippet.mjs.map +1 -0
- package/dist/components/ui/code-snippet/index.mjs +17 -0
- package/dist/components/ui/code-snippet/index.mjs.map +1 -0
- package/dist/components/ui/code-snippet/labels.mjs +16 -0
- package/dist/components/ui/code-snippet/labels.mjs.map +1 -0
- package/dist/components/ui/code-snippet/tokenize.mjs +715 -0
- package/dist/components/ui/code-snippet/tokenize.mjs.map +1 -0
- package/dist/components/ui/code-snippet/types.mjs +1 -0
- package/dist/components/ui/code-snippet/types.mjs.map +1 -0
- package/dist/components/ui/collapsible/collapsible.mjs +85 -0
- package/dist/components/ui/collapsible/collapsible.mjs.map +1 -0
- package/dist/components/ui/collapsible/index.mjs +15 -0
- package/dist/components/ui/collapsible/index.mjs.map +1 -0
- package/dist/components/ui/color-picker/color-picker.mjs +852 -0
- package/dist/components/ui/color-picker/color-picker.mjs.map +1 -0
- package/dist/components/ui/color-picker/index.mjs +47 -0
- package/dist/components/ui/color-picker/index.mjs.map +1 -0
- package/dist/components/ui/combobox/combobox.mjs +745 -0
- package/dist/components/ui/combobox/combobox.mjs.map +1 -0
- package/dist/components/ui/combobox/index.mjs +27 -0
- package/dist/components/ui/combobox/index.mjs.map +1 -0
- package/dist/components/ui/command/command.mjs +439 -0
- package/dist/components/ui/command/command.mjs.map +1 -0
- package/dist/components/ui/command/index.mjs +31 -0
- package/dist/components/ui/command/index.mjs.map +1 -0
- package/dist/components/ui/compare-slider/compare-slider.mjs +335 -0
- package/dist/components/ui/compare-slider/compare-slider.mjs.map +1 -0
- package/dist/components/ui/compare-slider/index.mjs +17 -0
- package/dist/components/ui/compare-slider/index.mjs.map +1 -0
- package/dist/components/ui/context-menu/context-menu.mjs +184 -0
- package/dist/components/ui/context-menu/context-menu.mjs.map +1 -0
- package/dist/components/ui/context-menu/index.mjs +37 -0
- package/dist/components/ui/context-menu/index.mjs.map +1 -0
- package/dist/components/ui/data-table/active-filters.mjs +69 -0
- package/dist/components/ui/data-table/active-filters.mjs.map +1 -0
- package/dist/components/ui/data-table/body-row.mjs +118 -0
- package/dist/components/ui/data-table/body-row.mjs.map +1 -0
- package/dist/components/ui/data-table/cards.mjs +76 -0
- package/dist/components/ui/data-table/cards.mjs.map +1 -0
- package/dist/components/ui/data-table/data-table.mjs +680 -0
- package/dist/components/ui/data-table/data-table.mjs.map +1 -0
- package/dist/components/ui/data-table/empty.mjs +26 -0
- package/dist/components/ui/data-table/empty.mjs.map +1 -0
- package/dist/components/ui/data-table/expand.mjs +70 -0
- package/dist/components/ui/data-table/expand.mjs.map +1 -0
- package/dist/components/ui/data-table/faceted-filter.mjs +112 -0
- package/dist/components/ui/data-table/faceted-filter.mjs.map +1 -0
- package/dist/components/ui/data-table/features.mjs +96 -0
- package/dist/components/ui/data-table/features.mjs.map +1 -0
- package/dist/components/ui/data-table/grip.mjs +37 -0
- package/dist/components/ui/data-table/grip.mjs.map +1 -0
- package/dist/components/ui/data-table/header-cell.mjs +85 -0
- package/dist/components/ui/data-table/header-cell.mjs.map +1 -0
- package/dist/components/ui/data-table/index.mjs +55 -0
- package/dist/components/ui/data-table/index.mjs.map +1 -0
- package/dist/components/ui/data-table/labels.mjs +55 -0
- package/dist/components/ui/data-table/labels.mjs.map +1 -0
- package/dist/components/ui/data-table/load-more.mjs +56 -0
- package/dist/components/ui/data-table/load-more.mjs.map +1 -0
- package/dist/components/ui/data-table/move-item.mjs +11 -0
- package/dist/components/ui/data-table/move-item.mjs.map +1 -0
- package/dist/components/ui/data-table/persist.mjs +65 -0
- package/dist/components/ui/data-table/persist.mjs.map +1 -0
- package/dist/components/ui/data-table/selection-bar.mjs +51 -0
- package/dist/components/ui/data-table/selection-bar.mjs.map +1 -0
- package/dist/components/ui/data-table/tabs.mjs +48 -0
- package/dist/components/ui/data-table/tabs.mjs.map +1 -0
- package/dist/components/ui/data-table/toolbar.mjs +92 -0
- package/dist/components/ui/data-table/toolbar.mjs.map +1 -0
- package/dist/components/ui/data-table/use-reorder.mjs +239 -0
- package/dist/components/ui/data-table/use-reorder.mjs.map +1 -0
- package/dist/components/ui/data-table/use-reveal.mjs +24 -0
- package/dist/components/ui/data-table/use-reveal.mjs.map +1 -0
- package/dist/components/ui/data-table/use-table-state.mjs +38 -0
- package/dist/components/ui/data-table/use-table-state.mjs.map +1 -0
- package/dist/components/ui/data-table/view-options.mjs +66 -0
- package/dist/components/ui/data-table/view-options.mjs.map +1 -0
- package/dist/components/ui/date-picker/calendar.mjs +466 -0
- package/dist/components/ui/date-picker/calendar.mjs.map +1 -0
- package/dist/components/ui/date-picker/date-picker.mjs +366 -0
- package/dist/components/ui/date-picker/date-picker.mjs.map +1 -0
- package/dist/components/ui/date-picker/index.mjs +17 -0
- package/dist/components/ui/date-picker/index.mjs.map +1 -0
- package/dist/components/ui/date-picker/presets.mjs +49 -0
- package/dist/components/ui/date-picker/presets.mjs.map +1 -0
- package/dist/components/ui/description-list/description-list.mjs +40 -0
- package/dist/components/ui/description-list/description-list.mjs.map +1 -0
- package/dist/components/ui/description-list/index.mjs +15 -0
- package/dist/components/ui/description-list/index.mjs.map +1 -0
- package/dist/components/ui/dialog/dialog-stepper.mjs +23 -0
- package/dist/components/ui/dialog/dialog-stepper.mjs.map +1 -0
- package/dist/components/ui/dialog/dialog.mjs +343 -0
- package/dist/components/ui/dialog/dialog.mjs.map +1 -0
- package/dist/components/ui/dialog/focus-return.mjs +21 -0
- package/dist/components/ui/dialog/focus-return.mjs.map +1 -0
- package/dist/components/ui/dialog/index.mjs +33 -0
- package/dist/components/ui/dialog/index.mjs.map +1 -0
- package/dist/components/ui/divider/divider.mjs +130 -0
- package/dist/components/ui/divider/divider.mjs.map +1 -0
- package/dist/components/ui/divider/index.mjs +6 -0
- package/dist/components/ui/divider/index.mjs.map +1 -0
- package/dist/components/ui/dock/dock.mjs +444 -0
- package/dist/components/ui/dock/dock.mjs.map +1 -0
- package/dist/components/ui/dock/index.mjs +19 -0
- package/dist/components/ui/dock/index.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-actions.mjs +118 -0
- package/dist/components/ui/document-editor/block-actions.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-commands.mjs +182 -0
- package/dist/components/ui/document-editor/block-commands.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-handle.mjs +387 -0
- package/dist/components/ui/document-editor/block-handle.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-morph.mjs +95 -0
- package/dist/components/ui/document-editor/block-morph.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-selection.mjs +81 -0
- package/dist/components/ui/document-editor/block-selection.mjs.map +1 -0
- package/dist/components/ui/document-editor/blocks.mjs +30 -0
- package/dist/components/ui/document-editor/blocks.mjs.map +1 -0
- package/dist/components/ui/document-editor/bubble-menu.mjs +120 -0
- package/dist/components/ui/document-editor/bubble-menu.mjs.map +1 -0
- package/dist/components/ui/document-editor/code-block.mjs +89 -0
- package/dist/components/ui/document-editor/code-block.mjs.map +1 -0
- package/dist/components/ui/document-editor/collaboration-types.mjs +9 -0
- package/dist/components/ui/document-editor/collaboration-types.mjs.map +1 -0
- package/dist/components/ui/document-editor/collaboration.mjs +198 -0
- package/dist/components/ui/document-editor/collaboration.mjs.map +1 -0
- package/dist/components/ui/document-editor/columns.mjs +52 -0
- package/dist/components/ui/document-editor/columns.mjs.map +1 -0
- package/dist/components/ui/document-editor/contents.mjs +60 -0
- package/dist/components/ui/document-editor/contents.mjs.map +1 -0
- package/dist/components/ui/document-editor/date-chip.mjs +115 -0
- package/dist/components/ui/document-editor/date-chip.mjs.map +1 -0
- package/dist/components/ui/document-editor/date-words.mjs +101 -0
- package/dist/components/ui/document-editor/date-words.mjs.map +1 -0
- package/dist/components/ui/document-editor/doc-labels.mjs +19 -0
- package/dist/components/ui/document-editor/doc-labels.mjs.map +1 -0
- package/dist/components/ui/document-editor/document-editor.mjs +496 -0
- package/dist/components/ui/document-editor/document-editor.mjs.map +1 -0
- package/dist/components/ui/document-editor/emoji-suggest.mjs +81 -0
- package/dist/components/ui/document-editor/emoji-suggest.mjs.map +1 -0
- package/dist/components/ui/document-editor/focus-mode.mjs +32 -0
- package/dist/components/ui/document-editor/focus-mode.mjs.map +1 -0
- package/dist/components/ui/document-editor/geometry.mjs +35 -0
- package/dist/components/ui/document-editor/geometry.mjs.map +1 -0
- package/dist/components/ui/document-editor/ghost-text.mjs +154 -0
- package/dist/components/ui/document-editor/ghost-text.mjs.map +1 -0
- package/dist/components/ui/document-editor/gliding-caret.mjs +118 -0
- package/dist/components/ui/document-editor/gliding-caret.mjs.map +1 -0
- package/dist/components/ui/document-editor/headings.mjs +64 -0
- package/dist/components/ui/document-editor/headings.mjs.map +1 -0
- package/dist/components/ui/document-editor/image.mjs +318 -0
- package/dist/components/ui/document-editor/image.mjs.map +1 -0
- package/dist/components/ui/document-editor/index.mjs +131 -0
- package/dist/components/ui/document-editor/index.mjs.map +1 -0
- package/dist/components/ui/document-editor/labels.mjs +96 -0
- package/dist/components/ui/document-editor/labels.mjs.map +1 -0
- package/dist/components/ui/document-editor/link-card.mjs +138 -0
- package/dist/components/ui/document-editor/link-card.mjs.map +1 -0
- package/dist/components/ui/document-editor/mentions.mjs +105 -0
- package/dist/components/ui/document-editor/mentions.mjs.map +1 -0
- package/dist/components/ui/document-editor/outline.mjs +138 -0
- package/dist/components/ui/document-editor/outline.mjs.map +1 -0
- package/dist/components/ui/document-editor/section-fold.mjs +124 -0
- package/dist/components/ui/document-editor/section-fold.mjs.map +1 -0
- package/dist/components/ui/document-editor/slash-command.mjs +210 -0
- package/dist/components/ui/document-editor/slash-command.mjs.map +1 -0
- package/dist/components/ui/document-editor/suggest-list.mjs +187 -0
- package/dist/components/ui/document-editor/suggest-list.mjs.map +1 -0
- package/dist/components/ui/document-editor/table.mjs +242 -0
- package/dist/components/ui/document-editor/table.mjs.map +1 -0
- package/dist/components/ui/document-editor/templates.mjs +66 -0
- package/dist/components/ui/document-editor/templates.mjs.map +1 -0
- package/dist/components/ui/document-editor/toggle.mjs +176 -0
- package/dist/components/ui/document-editor/toggle.mjs.map +1 -0
- package/dist/components/ui/document-editor/typography-rules.mjs +8 -0
- package/dist/components/ui/document-editor/typography-rules.mjs.map +1 -0
- package/dist/components/ui/document-editor/use-editor-value.mjs +34 -0
- package/dist/components/ui/document-editor/use-editor-value.mjs.map +1 -0
- package/dist/components/ui/drawer/drawer-nav.mjs +153 -0
- package/dist/components/ui/drawer/drawer-nav.mjs.map +1 -0
- package/dist/components/ui/drawer/drawer.mjs +334 -0
- package/dist/components/ui/drawer/drawer.mjs.map +1 -0
- package/dist/components/ui/drawer/index.mjs +37 -0
- package/dist/components/ui/drawer/index.mjs.map +1 -0
- package/dist/components/ui/drawer/use-swipe-to-close.mjs +77 -0
- package/dist/components/ui/drawer/use-swipe-to-close.mjs.map +1 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.mjs +567 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.mjs.map +1 -0
- package/dist/components/ui/dropdown-menu/index.mjs +43 -0
- package/dist/components/ui/dropdown-menu/index.mjs.map +1 -0
- package/dist/components/ui/editable-text/editable-text.mjs +148 -0
- package/dist/components/ui/editable-text/editable-text.mjs.map +1 -0
- package/dist/components/ui/editable-text/index.mjs +6 -0
- package/dist/components/ui/editable-text/index.mjs.map +1 -0
- package/dist/components/ui/emoji-picker/emoji-data.mjs +469 -0
- package/dist/components/ui/emoji-picker/emoji-data.mjs.map +1 -0
- package/dist/components/ui/emoji-picker/emoji-picker.mjs +464 -0
- package/dist/components/ui/emoji-picker/emoji-picker.mjs.map +1 -0
- package/dist/components/ui/emoji-picker/index.mjs +19 -0
- package/dist/components/ui/emoji-picker/index.mjs.map +1 -0
- package/dist/components/ui/empty-state/empty-state.mjs +110 -0
- package/dist/components/ui/empty-state/empty-state.mjs.map +1 -0
- package/dist/components/ui/empty-state/index.mjs +17 -0
- package/dist/components/ui/empty-state/index.mjs.map +1 -0
- package/dist/components/ui/event-calendar/calendar-math.mjs +256 -0
- package/dist/components/ui/event-calendar/calendar-math.mjs.map +1 -0
- package/dist/components/ui/event-calendar/context.mjs +51 -0
- package/dist/components/ui/event-calendar/context.mjs.map +1 -0
- package/dist/components/ui/event-calendar/editor.mjs +292 -0
- package/dist/components/ui/event-calendar/editor.mjs.map +1 -0
- package/dist/components/ui/event-calendar/event-block.mjs +55 -0
- package/dist/components/ui/event-calendar/event-block.mjs.map +1 -0
- package/dist/components/ui/event-calendar/event-calendar.mjs +438 -0
- package/dist/components/ui/event-calendar/event-calendar.mjs.map +1 -0
- package/dist/components/ui/event-calendar/event-keys.mjs +41 -0
- package/dist/components/ui/event-calendar/event-keys.mjs.map +1 -0
- package/dist/components/ui/event-calendar/index.mjs +37 -0
- package/dist/components/ui/event-calendar/index.mjs.map +1 -0
- package/dist/components/ui/event-calendar/month-grid.mjs +207 -0
- package/dist/components/ui/event-calendar/month-grid.mjs.map +1 -0
- package/dist/components/ui/event-calendar/narrow.mjs +193 -0
- package/dist/components/ui/event-calendar/narrow.mjs.map +1 -0
- package/dist/components/ui/event-calendar/time-grid.mjs +534 -0
- package/dist/components/ui/event-calendar/time-grid.mjs.map +1 -0
- package/dist/components/ui/expandable-search/expandable-search.mjs +174 -0
- package/dist/components/ui/expandable-search/expandable-search.mjs.map +1 -0
- package/dist/components/ui/expandable-search/index.mjs +6 -0
- package/dist/components/ui/expandable-search/index.mjs.map +1 -0
- package/dist/components/ui/field/field.mjs +444 -0
- package/dist/components/ui/field/field.mjs.map +1 -0
- package/dist/components/ui/field/index.mjs +21 -0
- package/dist/components/ui/field/index.mjs.map +1 -0
- package/dist/components/ui/file-card/file-card.mjs +198 -0
- package/dist/components/ui/file-card/file-card.mjs.map +1 -0
- package/dist/components/ui/file-card/file-icon.mjs +66 -0
- package/dist/components/ui/file-card/file-icon.mjs.map +1 -0
- package/dist/components/ui/file-card/file-types.mjs +70 -0
- package/dist/components/ui/file-card/file-types.mjs.map +1 -0
- package/dist/components/ui/file-card/index.mjs +32 -0
- package/dist/components/ui/file-card/index.mjs.map +1 -0
- package/dist/components/ui/file-preview/context.mjs +77 -0
- package/dist/components/ui/file-preview/context.mjs.map +1 -0
- package/dist/components/ui/file-preview/file-preview.mjs +865 -0
- package/dist/components/ui/file-preview/file-preview.mjs.map +1 -0
- package/dist/components/ui/file-preview/index.mjs +56 -0
- package/dist/components/ui/file-preview/index.mjs.map +1 -0
- package/dist/components/ui/file-preview/pdf.mjs +250 -0
- package/dist/components/ui/file-preview/pdf.mjs.map +1 -0
- package/dist/components/ui/file-preview/renderers.mjs +257 -0
- package/dist/components/ui/file-preview/renderers.mjs.map +1 -0
- package/dist/components/ui/file-upload/file-upload.mjs +633 -0
- package/dist/components/ui/file-upload/file-upload.mjs.map +1 -0
- package/dist/components/ui/file-upload/index.mjs +42 -0
- package/dist/components/ui/file-upload/index.mjs.map +1 -0
- package/dist/components/ui/file-upload/validate.mjs +111 -0
- package/dist/components/ui/file-upload/validate.mjs.map +1 -0
- package/dist/components/ui/flag/flag.mjs +39 -0
- package/dist/components/ui/flag/flag.mjs.map +1 -0
- package/dist/components/ui/flag/index.mjs +7 -0
- package/dist/components/ui/flag/index.mjs.map +1 -0
- package/dist/components/ui/floating-window/floating-window.mjs +255 -0
- package/dist/components/ui/floating-window/floating-window.mjs.map +1 -0
- package/dist/components/ui/floating-window/index.mjs +11 -0
- package/dist/components/ui/floating-window/index.mjs.map +1 -0
- package/dist/components/ui/form/form-section.mjs +87 -0
- package/dist/components/ui/form/form-section.mjs.map +1 -0
- package/dist/components/ui/form/form.mjs +205 -0
- package/dist/components/ui/form/form.mjs.map +1 -0
- package/dist/components/ui/form/index.mjs +29 -0
- package/dist/components/ui/form/index.mjs.map +1 -0
- package/dist/components/ui/globe/globe-data.mjs +9 -0
- package/dist/components/ui/globe/globe-data.mjs.map +1 -0
- package/dist/components/ui/globe/globe-math.mjs +269 -0
- package/dist/components/ui/globe/globe-math.mjs.map +1 -0
- package/dist/components/ui/globe/globe.mjs +719 -0
- package/dist/components/ui/globe/globe.mjs.map +1 -0
- package/dist/components/ui/globe/index.mjs +13 -0
- package/dist/components/ui/globe/index.mjs.map +1 -0
- package/dist/components/ui/highlight-match/highlight-children.mjs +13 -0
- package/dist/components/ui/highlight-match/highlight-children.mjs.map +1 -0
- package/dist/components/ui/highlight-match/highlight-match-variants.mjs +17 -0
- package/dist/components/ui/highlight-match/highlight-match-variants.mjs.map +1 -0
- package/dist/components/ui/highlight-match/highlight-match.mjs +37 -0
- package/dist/components/ui/highlight-match/highlight-match.mjs.map +1 -0
- package/dist/components/ui/highlight-match/index.mjs +15 -0
- package/dist/components/ui/highlight-match/index.mjs.map +1 -0
- package/dist/components/ui/highlight-match/match-ranges.mjs +50 -0
- package/dist/components/ui/highlight-match/match-ranges.mjs.map +1 -0
- package/dist/components/ui/histogram-slider/histogram-slider.mjs +83 -0
- package/dist/components/ui/histogram-slider/histogram-slider.mjs.map +1 -0
- package/dist/components/ui/histogram-slider/index.mjs +6 -0
- package/dist/components/ui/histogram-slider/index.mjs.map +1 -0
- package/dist/components/ui/hold-button/hold-button.mjs +258 -0
- package/dist/components/ui/hold-button/hold-button.mjs.map +1 -0
- package/dist/components/ui/hold-button/index.mjs +6 -0
- package/dist/components/ui/hold-button/index.mjs.map +1 -0
- package/dist/components/ui/hover-card/hover-card.mjs +111 -0
- package/dist/components/ui/hover-card/hover-card.mjs.map +1 -0
- package/dist/components/ui/hover-card/index.mjs +21 -0
- package/dist/components/ui/hover-card/index.mjs.map +1 -0
- package/dist/components/ui/ink-tray/index.mjs +29 -0
- package/dist/components/ui/ink-tray/index.mjs.map +1 -0
- package/dist/components/ui/ink-tray/ink-tray-art.mjs +68 -0
- package/dist/components/ui/ink-tray/ink-tray-art.mjs.map +1 -0
- package/dist/components/ui/ink-tray/ink-tray.mjs +350 -0
- package/dist/components/ui/ink-tray/ink-tray.mjs.map +1 -0
- package/dist/components/ui/input/index.mjs +41 -0
- package/dist/components/ui/input/index.mjs.map +1 -0
- package/dist/components/ui/input/input.mjs +268 -0
- package/dist/components/ui/input/input.mjs.map +1 -0
- package/dist/components/ui/input/number-input.mjs +272 -0
- package/dist/components/ui/input/number-input.mjs.map +1 -0
- package/dist/components/ui/input/password-input.mjs +49 -0
- package/dist/components/ui/input/password-input.mjs.map +1 -0
- package/dist/components/ui/input/phone-input-countries.mjs +216 -0
- package/dist/components/ui/input/phone-input-countries.mjs.map +1 -0
- package/dist/components/ui/input/phone-input.mjs +326 -0
- package/dist/components/ui/input/phone-input.mjs.map +1 -0
- package/dist/components/ui/input/use-controllable-state.mjs +24 -0
- package/dist/components/ui/input/use-controllable-state.mjs.map +1 -0
- package/dist/components/ui/input/use-hold-repeat.mjs +35 -0
- package/dist/components/ui/input/use-hold-repeat.mjs.map +1 -0
- package/dist/components/ui/input-group/index.mjs +11 -0
- package/dist/components/ui/input-group/index.mjs.map +1 -0
- package/dist/components/ui/input-group/input-group.mjs +78 -0
- package/dist/components/ui/input-group/input-group.mjs.map +1 -0
- package/dist/components/ui/island/index.mjs +23 -0
- package/dist/components/ui/island/index.mjs.map +1 -0
- package/dist/components/ui/island/island.mjs +328 -0
- package/dist/components/ui/island/island.mjs.map +1 -0
- package/dist/components/ui/kbd/index.mjs +6 -0
- package/dist/components/ui/kbd/index.mjs.map +1 -0
- package/dist/components/ui/kbd/kbd.mjs +73 -0
- package/dist/components/ui/kbd/kbd.mjs.map +1 -0
- package/dist/components/ui/keypad/index.mjs +23 -0
- package/dist/components/ui/keypad/index.mjs.map +1 -0
- package/dist/components/ui/keypad/keypad.mjs +345 -0
- package/dist/components/ui/keypad/keypad.mjs.map +1 -0
- package/dist/components/ui/label/index.mjs +7 -0
- package/dist/components/ui/label/index.mjs.map +1 -0
- package/dist/components/ui/label/label.mjs +117 -0
- package/dist/components/ui/label/label.mjs.map +1 -0
- package/dist/components/ui/lightbox/index.mjs +47 -0
- package/dist/components/ui/lightbox/index.mjs.map +1 -0
- package/dist/components/ui/lightbox/labels.mjs +23 -0
- package/dist/components/ui/lightbox/labels.mjs.map +1 -0
- package/dist/components/ui/lightbox/lightbox.mjs +1359 -0
- package/dist/components/ui/lightbox/lightbox.mjs.map +1 -0
- package/dist/components/ui/link/index.mjs +6 -0
- package/dist/components/ui/link/index.mjs.map +1 -0
- package/dist/components/ui/link/link.mjs +64 -0
- package/dist/components/ui/link/link.mjs.map +1 -0
- package/dist/components/ui/list/index.mjs +35 -0
- package/dist/components/ui/list/index.mjs.map +1 -0
- package/dist/components/ui/list/list.mjs +505 -0
- package/dist/components/ui/list/list.mjs.map +1 -0
- package/dist/components/ui/load-more/index.mjs +23 -0
- package/dist/components/ui/load-more/index.mjs.map +1 -0
- package/dist/components/ui/load-more/load-more.mjs +409 -0
- package/dist/components/ui/load-more/load-more.mjs.map +1 -0
- package/dist/components/ui/map/index.mjs +27 -0
- package/dist/components/ui/map/index.mjs.map +1 -0
- package/dist/components/ui/map/map-style.mjs +169 -0
- package/dist/components/ui/map/map-style.mjs.map +1 -0
- package/dist/components/ui/map/map.mjs +624 -0
- package/dist/components/ui/map/map.mjs.map +1 -0
- package/dist/components/ui/map-pin/index.mjs +6 -0
- package/dist/components/ui/map-pin/index.mjs.map +1 -0
- package/dist/components/ui/map-pin/map-pin.mjs +55 -0
- package/dist/components/ui/map-pin/map-pin.mjs.map +1 -0
- package/dist/components/ui/mention/index.mjs +29 -0
- package/dist/components/ui/mention/index.mjs.map +1 -0
- package/dist/components/ui/mention/mention.mjs +262 -0
- package/dist/components/ui/mention/mention.mjs.map +1 -0
- package/dist/components/ui/mention/split-mentions.mjs +24 -0
- package/dist/components/ui/mention/split-mentions.mjs.map +1 -0
- package/dist/components/ui/menubar/index.mjs +39 -0
- package/dist/components/ui/menubar/index.mjs.map +1 -0
- package/dist/components/ui/menubar/menubar.mjs +222 -0
- package/dist/components/ui/menubar/menubar.mjs.map +1 -0
- package/dist/components/ui/meter/index.mjs +21 -0
- package/dist/components/ui/meter/index.mjs.map +1 -0
- package/dist/components/ui/meter/meter.mjs +167 -0
- package/dist/components/ui/meter/meter.mjs.map +1 -0
- package/dist/components/ui/multi-select/index.mjs +25 -0
- package/dist/components/ui/multi-select/index.mjs.map +1 -0
- package/dist/components/ui/multi-select/multi-select.mjs +285 -0
- package/dist/components/ui/multi-select/multi-select.mjs.map +1 -0
- package/dist/components/ui/navigation-menu/index.mjs +41 -0
- package/dist/components/ui/navigation-menu/index.mjs.map +1 -0
- package/dist/components/ui/navigation-menu/navigation-menu.mjs +396 -0
- package/dist/components/ui/navigation-menu/navigation-menu.mjs.map +1 -0
- package/dist/components/ui/notebook-page/index.mjs +15 -0
- package/dist/components/ui/notebook-page/index.mjs.map +1 -0
- package/dist/components/ui/notebook-page/notebook-page.mjs +162 -0
- package/dist/components/ui/notebook-page/notebook-page.mjs.map +1 -0
- package/dist/components/ui/notification-inbox/index.mjs +47 -0
- package/dist/components/ui/notification-inbox/index.mjs.map +1 -0
- package/dist/components/ui/notification-inbox/notification-inbox.mjs +422 -0
- package/dist/components/ui/notification-inbox/notification-inbox.mjs.map +1 -0
- package/dist/components/ui/number-field/index.mjs +24 -0
- package/dist/components/ui/number-field/index.mjs.map +1 -0
- package/dist/components/ui/number-field/number-field.mjs +460 -0
- package/dist/components/ui/number-field/number-field.mjs.map +1 -0
- package/dist/components/ui/number-field/number-format.mjs +48 -0
- package/dist/components/ui/number-field/number-format.mjs.map +1 -0
- package/dist/components/ui/otp-input/index.mjs +9 -0
- package/dist/components/ui/otp-input/index.mjs.map +1 -0
- package/dist/components/ui/otp-input/otp-input.mjs +285 -0
- package/dist/components/ui/otp-input/otp-input.mjs.map +1 -0
- package/dist/components/ui/pager/index.mjs +7 -0
- package/dist/components/ui/pager/index.mjs.map +1 -0
- package/dist/components/ui/pager/pager.mjs +86 -0
- package/dist/components/ui/pager/pager.mjs.map +1 -0
- package/dist/components/ui/pagination/index.mjs +23 -0
- package/dist/components/ui/pagination/index.mjs.map +1 -0
- package/dist/components/ui/pagination/pagination.mjs +210 -0
- package/dist/components/ui/pagination/pagination.mjs.map +1 -0
- package/dist/components/ui/password-strength/index.mjs +21 -0
- package/dist/components/ui/password-strength/index.mjs.map +1 -0
- package/dist/components/ui/password-strength/password-rules.mjs +25 -0
- package/dist/components/ui/password-strength/password-rules.mjs.map +1 -0
- package/dist/components/ui/password-strength/password-strength.mjs +125 -0
- package/dist/components/ui/password-strength/password-strength.mjs.map +1 -0
- package/dist/components/ui/popover/index.mjs +31 -0
- package/dist/components/ui/popover/index.mjs.map +1 -0
- package/dist/components/ui/popover/popover.mjs +574 -0
- package/dist/components/ui/popover/popover.mjs.map +1 -0
- package/dist/components/ui/progress/index.mjs +15 -0
- package/dist/components/ui/progress/index.mjs.map +1 -0
- package/dist/components/ui/progress/progress.mjs +224 -0
- package/dist/components/ui/progress/progress.mjs.map +1 -0
- package/dist/components/ui/prose/index.mjs +6 -0
- package/dist/components/ui/prose/index.mjs.map +1 -0
- package/dist/components/ui/prose/prose.mjs +89 -0
- package/dist/components/ui/prose/prose.mjs.map +1 -0
- package/dist/components/ui/radio-group/index.mjs +15 -0
- package/dist/components/ui/radio-group/index.mjs.map +1 -0
- package/dist/components/ui/radio-group/radio-group.mjs +88 -0
- package/dist/components/ui/radio-group/radio-group.mjs.map +1 -0
- package/dist/components/ui/rating/index.mjs +6 -0
- package/dist/components/ui/rating/index.mjs.map +1 -0
- package/dist/components/ui/rating/rating.mjs +119 -0
- package/dist/components/ui/rating/rating.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/bubble-menu.mjs +120 -0
- package/dist/components/ui/rich-text-editor/bubble-menu.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/image-links.mjs +63 -0
- package/dist/components/ui/rich-text-editor/image-links.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/index.mjs +37 -0
- package/dist/components/ui/rich-text-editor/index.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/labels.mjs +27 -0
- package/dist/components/ui/rich-text-editor/labels.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/rich-text-editor.mjs +149 -0
- package/dist/components/ui/rich-text-editor/rich-text-editor.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/toolbar.mjs +325 -0
- package/dist/components/ui/rich-text-editor/toolbar.mjs.map +1 -0
- package/dist/components/ui/save-bar/index.mjs +13 -0
- package/dist/components/ui/save-bar/index.mjs.map +1 -0
- package/dist/components/ui/save-bar/save-bar.mjs +59 -0
- package/dist/components/ui/save-bar/save-bar.mjs.map +1 -0
- package/dist/components/ui/scroll-area/index.mjs +6 -0
- package/dist/components/ui/scroll-area/index.mjs.map +1 -0
- package/dist/components/ui/scroll-area/scroll-area.mjs +148 -0
- package/dist/components/ui/scroll-area/scroll-area.mjs.map +1 -0
- package/dist/components/ui/scroll-area/use-drag-scroll.mjs +134 -0
- package/dist/components/ui/scroll-area/use-drag-scroll.mjs.map +1 -0
- package/dist/components/ui/select/index.mjs +23 -0
- package/dist/components/ui/select/index.mjs.map +1 -0
- package/dist/components/ui/select/select.mjs +216 -0
- package/dist/components/ui/select/select.mjs.map +1 -0
- package/dist/components/ui/sheet/index.mjs +23 -0
- package/dist/components/ui/sheet/index.mjs.map +1 -0
- package/dist/components/ui/sheet/sheet.mjs +292 -0
- package/dist/components/ui/sheet/sheet.mjs.map +1 -0
- package/dist/components/ui/sidebar/index.mjs +122 -0
- package/dist/components/ui/sidebar/index.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-group.mjs +75 -0
- package/dist/components/ui/sidebar/sidebar-group.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-item.mjs +199 -0
- package/dist/components/ui/sidebar/sidebar-item.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-panels.mjs +182 -0
- package/dist/components/ui/sidebar/sidebar-panels.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-peek.mjs +324 -0
- package/dist/components/ui/sidebar/sidebar-peek.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-rich.mjs +65 -0
- package/dist/components/ui/sidebar/sidebar-rich.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-tree.mjs +224 -0
- package/dist/components/ui/sidebar/sidebar-tree.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar.mjs +205 -0
- package/dist/components/ui/sidebar/sidebar.mjs.map +1 -0
- package/dist/components/ui/sidebar/variants.mjs +396 -0
- package/dist/components/ui/sidebar/variants.mjs.map +1 -0
- package/dist/components/ui/signature/index.mjs +6 -0
- package/dist/components/ui/signature/index.mjs.map +1 -0
- package/dist/components/ui/signature/signature.mjs +145 -0
- package/dist/components/ui/signature/signature.mjs.map +1 -0
- package/dist/components/ui/signature-pad/index.mjs +19 -0
- package/dist/components/ui/signature-pad/index.mjs.map +1 -0
- package/dist/components/ui/signature-pad/signature-pad.mjs +210 -0
- package/dist/components/ui/signature-pad/signature-pad.mjs.map +1 -0
- package/dist/components/ui/signature-pad/strokes.mjs +68 -0
- package/dist/components/ui/signature-pad/strokes.mjs.map +1 -0
- package/dist/components/ui/skeleton/index.mjs +9 -0
- package/dist/components/ui/skeleton/index.mjs.map +1 -0
- package/dist/components/ui/skeleton/skeleton.mjs +58 -0
- package/dist/components/ui/skeleton/skeleton.mjs.map +1 -0
- package/dist/components/ui/slide/index.mjs +25 -0
- package/dist/components/ui/slide/index.mjs.map +1 -0
- package/dist/components/ui/slide/slide.mjs +159 -0
- package/dist/components/ui/slide/slide.mjs.map +1 -0
- package/dist/components/ui/slider/index.mjs +21 -0
- package/dist/components/ui/slider/index.mjs.map +1 -0
- package/dist/components/ui/slider/slider-input.mjs +449 -0
- package/dist/components/ui/slider/slider-input.mjs.map +1 -0
- package/dist/components/ui/slider/slider.mjs +235 -0
- package/dist/components/ui/slider/slider.mjs.map +1 -0
- package/dist/components/ui/slides/index.mjs +31 -0
- package/dist/components/ui/slides/index.mjs.map +1 -0
- package/dist/components/ui/slides/slides.mjs +890 -0
- package/dist/components/ui/slides/slides.mjs.map +1 -0
- package/dist/components/ui/smooth-anchors/index.mjs +17 -0
- package/dist/components/ui/smooth-anchors/index.mjs.map +1 -0
- package/dist/components/ui/smooth-anchors/smooth-anchors.mjs +75 -0
- package/dist/components/ui/smooth-anchors/smooth-anchors.mjs.map +1 -0
- package/dist/components/ui/smooth-anchors/smooth-scroll.mjs +87 -0
- package/dist/components/ui/smooth-anchors/smooth-scroll.mjs.map +1 -0
- package/dist/components/ui/spinner/index.mjs +6 -0
- package/dist/components/ui/spinner/index.mjs.map +1 -0
- package/dist/components/ui/spinner/spinner.mjs +49 -0
- package/dist/components/ui/spinner/spinner.mjs.map +1 -0
- package/dist/components/ui/stat/index.mjs +29 -0
- package/dist/components/ui/stat/index.mjs.map +1 -0
- package/dist/components/ui/stat/stat.mjs +226 -0
- package/dist/components/ui/stat/stat.mjs.map +1 -0
- package/dist/components/ui/status-bar/index.mjs +17 -0
- package/dist/components/ui/status-bar/index.mjs.map +1 -0
- package/dist/components/ui/status-bar/status-bar.mjs +96 -0
- package/dist/components/ui/status-bar/status-bar.mjs.map +1 -0
- package/dist/components/ui/stepper/index.mjs +25 -0
- package/dist/components/ui/stepper/index.mjs.map +1 -0
- package/dist/components/ui/stepper/stepper.mjs +235 -0
- package/dist/components/ui/stepper/stepper.mjs.map +1 -0
- package/dist/components/ui/steps/index.mjs +9 -0
- package/dist/components/ui/steps/index.mjs.map +1 -0
- package/dist/components/ui/steps/steps.mjs +70 -0
- package/dist/components/ui/steps/steps.mjs.map +1 -0
- package/dist/components/ui/swatch-grid/index.mjs +7 -0
- package/dist/components/ui/swatch-grid/index.mjs.map +1 -0
- package/dist/components/ui/swatch-grid/swatch-grid.mjs +110 -0
- package/dist/components/ui/swatch-grid/swatch-grid.mjs.map +1 -0
- package/dist/components/ui/switch/index.mjs +7 -0
- package/dist/components/ui/switch/index.mjs.map +1 -0
- package/dist/components/ui/switch/switch.mjs +79 -0
- package/dist/components/ui/switch/switch.mjs.map +1 -0
- package/dist/components/ui/tab-strip/index.mjs +13 -0
- package/dist/components/ui/tab-strip/index.mjs.map +1 -0
- package/dist/components/ui/tab-strip/tab-strip.mjs +244 -0
- package/dist/components/ui/tab-strip/tab-strip.mjs.map +1 -0
- package/dist/components/ui/table/index.mjs +27 -0
- package/dist/components/ui/table/index.mjs.map +1 -0
- package/dist/components/ui/table/table.mjs +290 -0
- package/dist/components/ui/table/table.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/index.mjs +20 -0
- package/dist/components/ui/table-of-contents/index.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/scroll-spy.mjs +60 -0
- package/dist/components/ui/table-of-contents/scroll-spy.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/table-of-contents.mjs +371 -0
- package/dist/components/ui/table-of-contents/table-of-contents.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/use-headings.mjs +40 -0
- package/dist/components/ui/table-of-contents/use-headings.mjs.map +1 -0
- package/dist/components/ui/tablet-frame/index.mjs +7 -0
- package/dist/components/ui/tablet-frame/index.mjs.map +1 -0
- package/dist/components/ui/tablet-frame/tablet-frame.mjs +48 -0
- package/dist/components/ui/tablet-frame/tablet-frame.mjs.map +1 -0
- package/dist/components/ui/tabs/index.mjs +25 -0
- package/dist/components/ui/tabs/index.mjs.map +1 -0
- package/dist/components/ui/tabs/tabs.mjs +382 -0
- package/dist/components/ui/tabs/tabs.mjs.map +1 -0
- package/dist/components/ui/tabs/use-tabs-indicator.mjs +90 -0
- package/dist/components/ui/tabs/use-tabs-indicator.mjs.map +1 -0
- package/dist/components/ui/tags-input/index.mjs +9 -0
- package/dist/components/ui/tags-input/index.mjs.map +1 -0
- package/dist/components/ui/tags-input/split.mjs +38 -0
- package/dist/components/ui/tags-input/split.mjs.map +1 -0
- package/dist/components/ui/tags-input/tags-input.mjs +328 -0
- package/dist/components/ui/tags-input/tags-input.mjs.map +1 -0
- package/dist/components/ui/terminal/index.mjs +41 -0
- package/dist/components/ui/terminal/index.mjs.map +1 -0
- package/dist/components/ui/terminal/terminal.mjs +287 -0
- package/dist/components/ui/terminal/terminal.mjs.map +1 -0
- package/dist/components/ui/textarea/index.mjs +21 -0
- package/dist/components/ui/textarea/index.mjs.map +1 -0
- package/dist/components/ui/textarea/textarea.mjs +244 -0
- package/dist/components/ui/textarea/textarea.mjs.map +1 -0
- package/dist/components/ui/theme-provider/index.mjs +6 -0
- package/dist/components/ui/theme-provider/index.mjs.map +1 -0
- package/dist/components/ui/theme-provider/theme-provider.mjs +70 -0
- package/dist/components/ui/theme-provider/theme-provider.mjs.map +1 -0
- package/dist/components/ui/toast/index.mjs +19 -0
- package/dist/components/ui/toast/index.mjs.map +1 -0
- package/dist/components/ui/toast/store.mjs +96 -0
- package/dist/components/ui/toast/store.mjs.map +1 -0
- package/dist/components/ui/toast/toast.mjs +395 -0
- package/dist/components/ui/toast/toast.mjs.map +1 -0
- package/dist/components/ui/toggle/index.mjs +13 -0
- package/dist/components/ui/toggle/index.mjs.map +1 -0
- package/dist/components/ui/toggle/toggle.mjs +123 -0
- package/dist/components/ui/toggle/toggle.mjs.map +1 -0
- package/dist/components/ui/toggle-group/index.mjs +11 -0
- package/dist/components/ui/toggle-group/index.mjs.map +1 -0
- package/dist/components/ui/toggle-group/toggle-group.mjs +243 -0
- package/dist/components/ui/toggle-group/toggle-group.mjs.map +1 -0
- package/dist/components/ui/toggletip/index.mjs +6 -0
- package/dist/components/ui/toggletip/index.mjs.map +1 -0
- package/dist/components/ui/toggletip/toggletip.mjs +95 -0
- package/dist/components/ui/toggletip/toggletip.mjs.map +1 -0
- package/dist/components/ui/toolbar/index.mjs +21 -0
- package/dist/components/ui/toolbar/index.mjs.map +1 -0
- package/dist/components/ui/toolbar/toolbar.mjs +130 -0
- package/dist/components/ui/toolbar/toolbar.mjs.map +1 -0
- package/dist/components/ui/tooltip/index.mjs +29 -0
- package/dist/components/ui/tooltip/index.mjs.map +1 -0
- package/dist/components/ui/tooltip/tooltip.mjs +640 -0
- package/dist/components/ui/tooltip/tooltip.mjs.map +1 -0
- package/dist/components/ui/tree/index.mjs +11 -0
- package/dist/components/ui/tree/index.mjs.map +1 -0
- package/dist/components/ui/tree/tree.mjs +450 -0
- package/dist/components/ui/tree/tree.mjs.map +1 -0
- package/dist/index.d.mts +19397 -0
- package/dist/index.mjs +157 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/color.mjs +78 -0
- package/dist/lib/color.mjs.map +1 -0
- package/dist/lib/create-context.mjs +31 -0
- package/dist/lib/create-context.mjs.map +1 -0
- package/dist/lib/date.mjs +116 -0
- package/dist/lib/date.mjs.map +1 -0
- package/dist/lib/density.mjs +79 -0
- package/dist/lib/density.mjs.map +1 -0
- package/dist/lib/field-context.mjs +13 -0
- package/dist/lib/field-context.mjs.map +1 -0
- package/dist/lib/filter.mjs +28 -0
- package/dist/lib/filter.mjs.map +1 -0
- package/dist/lib/gesture.mjs +38 -0
- package/dist/lib/gesture.mjs.map +1 -0
- package/dist/lib/hit-area.mjs +14 -0
- package/dist/lib/hit-area.mjs.map +1 -0
- package/dist/lib/labels.mjs +27 -0
- package/dist/lib/labels.mjs.map +1 -0
- package/dist/lib/morph-box.mjs +56 -0
- package/dist/lib/morph-box.mjs.map +1 -0
- package/dist/lib/motion.mjs +70 -0
- package/dist/lib/motion.mjs.map +1 -0
- package/dist/lib/pulse.mjs +69 -0
- package/dist/lib/pulse.mjs.map +1 -0
- package/dist/lib/roving-focus.mjs +74 -0
- package/dist/lib/roving-focus.mjs.map +1 -0
- package/dist/lib/theme.mjs +67 -0
- package/dist/lib/theme.mjs.map +1 -0
- package/dist/lib/tv.mjs +11 -0
- package/dist/lib/tv.mjs.map +1 -0
- package/dist/lib/utils.mjs +82 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/dist/styles.css +2 -0
- package/package.json +133 -4
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
import { tv } from "../../../lib/tv.mjs";
|
|
2
|
+
const actionsSlot = "[data-slot=sidebar-actions]";
|
|
3
|
+
const sidebarVariants = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: [
|
|
6
|
+
"flex max-w-full shrink-0 flex-col overflow-hidden max-sm:min-w-0 bg-card text-card-foreground [--surface:var(--card)]",
|
|
7
|
+
"[--sidebar-item-gap:--spacing(3)] [&_[data-slot=sidebar-collapsible]]:[--sidebar-sub-icon:--spacing(5)]"
|
|
8
|
+
],
|
|
9
|
+
header: [
|
|
10
|
+
"flex shrink-0 flex-col gap-1 border-b border-border",
|
|
11
|
+
`has-[>${actionsSlot}]:flex-row has-[>${actionsSlot}]:items-center`
|
|
12
|
+
],
|
|
13
|
+
content: "relative flex min-h-0 flex-1 flex-col overflow-y-auto scroll-py-2",
|
|
14
|
+
footer: [
|
|
15
|
+
"flex shrink-0 flex-col gap-1 border-t border-border [[data-slot=sidebar-header]+&]:border-t-0",
|
|
16
|
+
`has-[>${actionsSlot}]:items-center`
|
|
17
|
+
],
|
|
18
|
+
actions: "flex shrink-0 items-center text-muted-foreground",
|
|
19
|
+
switcher: [
|
|
20
|
+
"group/switcher relative flex min-w-0 cursor-pointer items-center text-left rounded-md outline-none transition duration-fast ease-out",
|
|
21
|
+
"focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-1 focus-visible:ring-offset-card data-[state=open]:bg-accent hover:bg-accent"
|
|
22
|
+
],
|
|
23
|
+
switcherText: "min-w-0 flex-col",
|
|
24
|
+
switcherTitle: "truncate text-sm text-foreground",
|
|
25
|
+
switcherSubtitle: "truncate text-xs text-muted-foreground",
|
|
26
|
+
switcherCaret: [
|
|
27
|
+
"ms-auto shrink-0 text-muted-foreground opacity-0 transition-opacity duration-fast ease-out motion-reduce-fade",
|
|
28
|
+
"group-hover/switcher:opacity-100 group-focus-visible/switcher:opacity-100 group-data-[state=open]/switcher:opacity-100 pointer-coarse:opacity-100"
|
|
29
|
+
],
|
|
30
|
+
separator: "mx-2.5 h-px shrink-0 bg-border"
|
|
31
|
+
},
|
|
32
|
+
variants: {
|
|
33
|
+
collapsed: {
|
|
34
|
+
false: {
|
|
35
|
+
root: "w-64 max-sm:shrink",
|
|
36
|
+
header: `[&:has(>${actionsSlot})>[data-slot=sidebar-switcher]]:w-auto [&>[data-slot=sidebar-switcher]~[data-slot=input-root]]:bg-accent [&>[data-slot=sidebar-switcher]~[data-slot=input-root]:not(:focus-within)]:border-transparent`,
|
|
37
|
+
footer: `has-[>${actionsSlot}]:flex-row [&:has(>${actionsSlot})>[data-slot=sidebar-switcher]]:w-auto`,
|
|
38
|
+
actions: "ml-auto gap-0.5",
|
|
39
|
+
switcher: "w-full px-(--sidebar-item-px)",
|
|
40
|
+
switcherText: "flex"
|
|
41
|
+
},
|
|
42
|
+
true: {
|
|
43
|
+
root: "w-12 max-sm:shrink-0",
|
|
44
|
+
header: [
|
|
45
|
+
`items-center p-1 has-[>${actionsSlot}]:grid has-[>${actionsSlot}]:place-items-center has-[>${actionsSlot}]:border-b-0`,
|
|
46
|
+
`[&:has(>${actionsSlot})>[data-slot=sidebar-switcher]]:w-10 [&:has(>${actionsSlot})>[data-slot=sidebar-switcher]]:flex-none`,
|
|
47
|
+
`[&:has(>${actionsSlot})>*]:[grid-area:1/1] [&:has(>${actionsSlot})>*]:transition-opacity [&:has(>${actionsSlot})>*]:duration-fast [&:has(>${actionsSlot})>*]:ease-out`,
|
|
48
|
+
`[&>${actionsSlot}]:m-0 [&>${actionsSlot}]:opacity-0 [&>${actionsSlot}>*]:size-10 hover:[&>${actionsSlot}]:opacity-100 [&>${actionsSlot}:has(:focus-visible)]:opacity-100`,
|
|
49
|
+
`hover:[&:has(>${actionsSlot})>[data-slot=sidebar-switcher]]:opacity-0 [&:has(>${actionsSlot}_:focus-visible)>[data-slot=sidebar-switcher]]:opacity-0`
|
|
50
|
+
],
|
|
51
|
+
content: "items-center gap-2 p-[max(4px,--spacing(1))] [--sidebar-edge:max(4px,--spacing(1))]",
|
|
52
|
+
footer: `items-center p-1 has-[>${actionsSlot}]:flex-col [&:has(>${actionsSlot})>[data-slot=sidebar-switcher]]:w-10 [&:has(>${actionsSlot})>[data-slot=sidebar-switcher]]:flex-none`,
|
|
53
|
+
actions: "ml-0 flex-col gap-2",
|
|
54
|
+
switcher: "mx-auto size-10 justify-center gap-0 p-0",
|
|
55
|
+
switcherText: "hidden",
|
|
56
|
+
switcherCaret: "hidden"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
density: {
|
|
60
|
+
compact: {
|
|
61
|
+
root: "[--sidebar-item-px:--spacing(2.5)] [&_[data-slot=sidebar-collapsible]:has(>button>[data-slot=sidebar-item-icon])]:[--sidebar-sub-icon:--spacing(6)]"
|
|
62
|
+
},
|
|
63
|
+
comfortable: {
|
|
64
|
+
root: "[--sidebar-item-px:--spacing(3)] [&_[data-slot=sidebar-collapsible]:has(>button>[data-slot=sidebar-item-icon])]:[--sidebar-sub-icon:--spacing(7)]"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
switcherVariant: {
|
|
68
|
+
default: { switcherTitle: "font-medium", switcherCaret: "size-3.5" },
|
|
69
|
+
full: { switcher: "gap-3 py-1.5", switcherText: "gap-0.5", switcherTitle: "font-semibold", switcherCaret: "size-4" }
|
|
70
|
+
},
|
|
71
|
+
side: {
|
|
72
|
+
left: { root: "border-r border-border" },
|
|
73
|
+
right: { root: "border-l border-border" }
|
|
74
|
+
},
|
|
75
|
+
floating: {
|
|
76
|
+
// A detached card: a full outline and a lift, instead of one edge hairline.
|
|
77
|
+
true: { root: "rounded-xl border border-border shadow-lg" },
|
|
78
|
+
false: {}
|
|
79
|
+
},
|
|
80
|
+
stacked: {
|
|
81
|
+
// The labeled icon rail: the icon rail's zones, 64px wide, without the zone hairlines.
|
|
82
|
+
true: {
|
|
83
|
+
root: "w-16",
|
|
84
|
+
header: "border-b-0",
|
|
85
|
+
content: "gap-2 px-1 py-2 [--sidebar-edge:--spacing(1)]",
|
|
86
|
+
footer: "border-t-0",
|
|
87
|
+
switcher: "size-9 rounded-lg"
|
|
88
|
+
},
|
|
89
|
+
false: {}
|
|
90
|
+
},
|
|
91
|
+
docked: {
|
|
92
|
+
// In an app shell the shell owns the surface: no fill, no hairline, the column's width.
|
|
93
|
+
true: { root: "bg-transparent border-0 [--surface:var(--background)]" },
|
|
94
|
+
false: {}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
compoundVariants: [
|
|
98
|
+
// Zone padding steps with density while the rail is open.
|
|
99
|
+
{ collapsed: false, density: "compact", class: { header: `p-2 has-[>${actionsSlot}]:pe-2.5 has-[>[data-slot=sidebar-switcher]+:not(${actionsSlot})]:pt-1`, content: "gap-4 p-2 [--sidebar-edge:--spacing(2)]", footer: `p-2 has-[>${actionsSlot}]:pe-2.5` } },
|
|
100
|
+
{ collapsed: false, density: "comfortable", class: { header: `p-3 has-[>${actionsSlot}]:pe-4 has-[>[data-slot=sidebar-switcher]+:not(${actionsSlot})]:pt-1.5`, content: "gap-5 p-3 [--sidebar-edge:--spacing(3)]", footer: `p-3 has-[>${actionsSlot}]:pe-4` } },
|
|
101
|
+
{ collapsed: false, switcherVariant: "default", density: "compact", class: { switcher: "gap-2 py-1" } },
|
|
102
|
+
{ collapsed: false, switcherVariant: "default", density: "comfortable", class: { switcher: "gap-2 py-1.5" } }
|
|
103
|
+
],
|
|
104
|
+
defaultVariants: { collapsed: false, density: "compact", switcherVariant: "default", side: "left", floating: false, docked: false, stacked: false }
|
|
105
|
+
});
|
|
106
|
+
const sidebarGroupVariants = tv({
|
|
107
|
+
slots: {
|
|
108
|
+
group: "group/section relative flex flex-col gap-0.5",
|
|
109
|
+
label: "flex items-center eyebrow",
|
|
110
|
+
labelButton: [
|
|
111
|
+
"group/grouplabel w-full cursor-pointer rounded-md outline-none transition-colors duration-fast ease-out py-1 hover:bg-accent",
|
|
112
|
+
"focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-1 focus-visible:ring-offset-card"
|
|
113
|
+
],
|
|
114
|
+
caret: "ms-auto size-3.5 shrink-0 text-muted-foreground caret-turn group-data-[state=open]/grouplabel:rotate-90",
|
|
115
|
+
content: "flex flex-col gap-0.5 data-[state=open]:animate-disclosure-open data-[state=closed]:animate-disclosure-close",
|
|
116
|
+
action: [
|
|
117
|
+
"absolute z-10 grid size-5 cursor-pointer place-items-center rounded-sm text-muted-foreground outline-none pointer-events-none opacity-0",
|
|
118
|
+
"transition-[opacity,color,background-color] duration-fast ease-out motion-reduce-fade",
|
|
119
|
+
"group-hover/section:pointer-events-auto group-hover/section:opacity-100 group-has-focus-visible/section:pointer-events-auto group-has-focus-visible/section:opacity-100",
|
|
120
|
+
"pointer-coarse:pointer-events-auto pointer-coarse:opacity-100",
|
|
121
|
+
"data-[state=open]:pointer-events-auto data-[state=open]:opacity-100 data-[state=open]:bg-foreground/8 data-[state=open]:text-foreground",
|
|
122
|
+
"hover:bg-foreground/8 hover:text-foreground focus-visible:ring-2 focus-visible:ring-focus",
|
|
123
|
+
"after:absolute after:-inset-2.5 after:content-[''] [&>svg]:size-3.5 [&>svg]:shrink-0",
|
|
124
|
+
"end-1.75 top-0 group-data-[state]/section:end-7 group-data-[state]/section:top-0.5"
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
variants: {
|
|
128
|
+
collapsed: {
|
|
129
|
+
// In the icon rail sections split on a short rule and their headings go to screen readers.
|
|
130
|
+
true: {
|
|
131
|
+
group: "[&:not(:first-child)]:border-t [&:not(:first-child)]:border-border [&:not(:first-child)]:pt-2",
|
|
132
|
+
label: "sr-only"
|
|
133
|
+
},
|
|
134
|
+
false: {}
|
|
135
|
+
},
|
|
136
|
+
stacked: {
|
|
137
|
+
true: { group: "gap-1 self-stretch" },
|
|
138
|
+
false: {}
|
|
139
|
+
},
|
|
140
|
+
density: {
|
|
141
|
+
compact: { label: "px-2.5 pb-1 pt-0.5" },
|
|
142
|
+
comfortable: { label: "px-3 pb-1.5 pt-1" }
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
defaultVariants: { collapsed: false, density: "compact", stacked: false }
|
|
146
|
+
});
|
|
147
|
+
const itemBase = [
|
|
148
|
+
"group/item relative flex w-full cursor-pointer select-none items-center gap-(--sidebar-item-gap) rounded-md text-sm font-medium tabular-nums text-muted-foreground outline-none",
|
|
149
|
+
"transition duration-fast ease-out hover:bg-accent hover:text-accent-foreground",
|
|
150
|
+
"focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-1 focus-visible:ring-offset-card",
|
|
151
|
+
"data-[active=true]:bg-accent data-[active=true]:font-semibold data-[active=true]:text-foreground",
|
|
152
|
+
"data-[unread=true]:font-semibold data-[unread=true]:text-foreground",
|
|
153
|
+
"data-[muted=true]:text-muted-foreground/60 data-[muted=true]:hover:text-accent-foreground data-[muted=true]:group-hover/row:text-accent-foreground data-[muted=true]:data-[active=true]:text-foreground",
|
|
154
|
+
"group-hover/row:bg-accent group-hover/row:text-accent-foreground",
|
|
155
|
+
"[&:hover_[data-slot=badge][data-variant=secondary]]:bg-foreground/8 data-[active=true]:[&_[data-slot=badge][data-variant=secondary]]:bg-foreground/8 group-hover/row:[&_[data-slot=badge][data-variant=secondary]]:bg-foreground/8",
|
|
156
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
157
|
+
// The ink edge bar of the current page, sitting in Content's padding.
|
|
158
|
+
"before:absolute before:left-[calc(var(--sidebar-edge,--spacing(2))*-1)] before:top-1/2 before:h-4 before:w-[3px] before:-translate-y-1/2 before:rounded-r-full before:bg-primary before:opacity-0",
|
|
159
|
+
"before:transition-opacity before:duration-fast before:ease-out before:content-[''] data-[active=true]:before:opacity-100",
|
|
160
|
+
"[&>svg]:size-5 [&>svg]:shrink-0 px-(--sidebar-item-px)"
|
|
161
|
+
];
|
|
162
|
+
const sidebarItemVariants = tv({
|
|
163
|
+
slots: {
|
|
164
|
+
item: itemBase,
|
|
165
|
+
label: "min-w-0 flex-1 truncate text-start",
|
|
166
|
+
unreadDot: "pointer-events-none absolute size-2 rounded-full bg-foreground ring-2 ring-card",
|
|
167
|
+
icon: "grid shrink-0 place-items-center rounded-sm",
|
|
168
|
+
swatch: "grid size-5 shrink-0 place-items-center before:size-2 before:rounded-full before:content-['']",
|
|
169
|
+
count: [
|
|
170
|
+
"ml-auto shrink-0 text-xs font-medium tabular-nums transition-opacity duration-fast ease-out motion-reduce-fade",
|
|
171
|
+
"group-hover/row:opacity-0 group-has-focus-visible/row:opacity-0 group-has-[[data-state=open]]/row:opacity-0 pointer-coarse:group-has-[[data-slot=sidebar-item-actions]]/row:opacity-0"
|
|
172
|
+
],
|
|
173
|
+
row: "group/row relative",
|
|
174
|
+
actions: [
|
|
175
|
+
"absolute end-1.5 top-1/2 flex -translate-y-1/2 items-center gap-1 pointer-events-none opacity-0 transition-opacity duration-fast ease-out motion-reduce-fade",
|
|
176
|
+
"group-hover/row:pointer-events-auto group-hover/row:opacity-100 group-has-focus-visible/row:pointer-events-auto group-has-focus-visible/row:opacity-100",
|
|
177
|
+
"has-[[data-state=open]]:pointer-events-auto has-[[data-state=open]]:opacity-100 pointer-coarse:pointer-events-auto pointer-coarse:opacity-100"
|
|
178
|
+
],
|
|
179
|
+
action: [
|
|
180
|
+
"relative grid shrink-0 cursor-pointer place-items-center rounded-sm text-muted-foreground outline-none transition-colors duration-fast ease-out motion-reduce-fade",
|
|
181
|
+
"hover:bg-foreground/8 hover:text-foreground data-[state=open]:bg-foreground/8 data-[state=open]:text-foreground focus-visible:ring-2 focus-visible:ring-focus",
|
|
182
|
+
"after:absolute after:-inset-x-0.5 after:-inset-y-2 after:content-[''] [&>svg]:size-4 [&>svg]:shrink-0 size-6"
|
|
183
|
+
],
|
|
184
|
+
collapsible: "flex flex-col gap-0.5",
|
|
185
|
+
collapsibleCaret: "ml-auto flex size-4 shrink-0 items-center justify-center text-muted-foreground caret-turn group-data-[state=open]/collapsible:rotate-90",
|
|
186
|
+
sub: [
|
|
187
|
+
"relative mt-0.5 flex flex-col gap-0.5",
|
|
188
|
+
"ms-[calc(var(--sidebar-item-px)+var(--sidebar-sub-icon)/2-0.5px)] ps-[calc(var(--sidebar-sub-icon)/2+var(--sidebar-item-gap)-var(--sidebar-item-px)+0.5px)]",
|
|
189
|
+
"data-[state=open]:animate-disclosure-open data-[state=closed]:animate-disclosure-close",
|
|
190
|
+
"before:pointer-events-none before:absolute before:inset-y-1 before:start-0 before:w-px before:bg-border before:content-[''] [&_[data-slot=sidebar-item]]:before:hidden"
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
variants: {
|
|
194
|
+
mode: {
|
|
195
|
+
list: { unreadDot: "end-1 top-1" },
|
|
196
|
+
// The icon rail: a centred 40px target whose chip is drawn by ::after, so the bar can sit outside it.
|
|
197
|
+
collapsed: {
|
|
198
|
+
item: [
|
|
199
|
+
"relative isolate mx-auto size-10 justify-center gap-0 px-0 py-0 hover:bg-transparent data-[active=true]:bg-transparent",
|
|
200
|
+
"after:absolute after:left-1/2 after:top-1/2 after:-z-10 after:size-8 after:-translate-x-1/2 after:-translate-y-1/2 after:rounded-md after:transition-colors after:duration-fast after:ease-out after:content-['']",
|
|
201
|
+
"hover:after:bg-accent data-[active=true]:after:bg-accent before:-left-1"
|
|
202
|
+
],
|
|
203
|
+
unreadDot: "end-1 top-1"
|
|
204
|
+
},
|
|
205
|
+
// The labeled rail: the glyph in a padded tile over a short label, a Badge pinned to the tile.
|
|
206
|
+
stacked: {
|
|
207
|
+
item: [
|
|
208
|
+
"flex-col justify-center gap-1 px-0.5 py-1 text-center text-xs leading-tight hover:bg-transparent data-[active=true]:bg-transparent",
|
|
209
|
+
"data-[active=true]:font-medium data-[unread=true]:font-medium [&>svg]:box-content [&>svg]:rounded-lg [&>svg]:p-2",
|
|
210
|
+
"[&>[data-slot=sidebar-item-icon]]:size-9 [&>[data-slot=sidebar-item-icon]]:rounded-lg [&>[data-slot=sidebar-item-icon]>svg]:size-5",
|
|
211
|
+
"[&>[data-slot=badge]]:absolute [&>[data-slot=badge]]:left-1/2 [&>[data-slot=badge]]:top-0.5 [&>[data-slot=badge]]:ml-2.5 [&>[data-slot=badge]]:h-4 [&>[data-slot=badge]]:min-w-4 [&>[data-slot=badge]]:justify-center [&>[data-slot=badge]]:rounded-full [&>[data-slot=badge]]:px-1 [&>[data-slot=badge]]:py-0 [&>[data-slot=badge]]:text-[0.625rem] [&>[data-slot=badge]]:font-semibold [&>[data-slot=badge]]:leading-none [&>[data-slot=badge]]:ring-2 [&>[data-slot=badge]]:ring-card",
|
|
212
|
+
"before:hidden [&>svg]:transition-colors [&>svg]:duration-fast [&>svg]:ease-out hover:[&>svg]:bg-accent data-[active=true]:[&>svg]:bg-accent"
|
|
213
|
+
],
|
|
214
|
+
unreadDot: "left-1/2 top-1.5 ml-2"
|
|
215
|
+
},
|
|
216
|
+
// The bare labeled rail: no tile; the current row carries a taller ink bar.
|
|
217
|
+
bare: {
|
|
218
|
+
item: [
|
|
219
|
+
"flex-col justify-center gap-1 px-0.5 py-1 text-center text-xs leading-tight hover:bg-transparent data-[active=true]:bg-transparent",
|
|
220
|
+
"data-[active=true]:font-medium data-[unread=true]:font-medium [&>svg]:box-content [&>svg]:rounded-lg [&>svg]:p-2",
|
|
221
|
+
"[&>[data-slot=sidebar-item-icon]]:size-9 [&>[data-slot=sidebar-item-icon]]:rounded-lg [&>[data-slot=sidebar-item-icon]>svg]:size-5",
|
|
222
|
+
"[&>[data-slot=badge]]:absolute [&>[data-slot=badge]]:left-1/2 [&>[data-slot=badge]]:top-0.5 [&>[data-slot=badge]]:ml-2.5 [&>[data-slot=badge]]:h-4 [&>[data-slot=badge]]:min-w-4 [&>[data-slot=badge]]:justify-center [&>[data-slot=badge]]:rounded-full [&>[data-slot=badge]]:px-1 [&>[data-slot=badge]]:py-0 [&>[data-slot=badge]]:text-[0.625rem] [&>[data-slot=badge]]:font-semibold [&>[data-slot=badge]]:leading-none [&>[data-slot=badge]]:ring-2 [&>[data-slot=badge]]:ring-card",
|
|
223
|
+
"before:-left-1 before:h-8"
|
|
224
|
+
],
|
|
225
|
+
unreadDot: "left-1/2 top-1.5 ml-2"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
density: {
|
|
229
|
+
compact: { item: "py-1.5" },
|
|
230
|
+
comfortable: { item: "py-2 before:-left-3" }
|
|
231
|
+
},
|
|
232
|
+
countVariant: {
|
|
233
|
+
plain: {},
|
|
234
|
+
pill: { count: "inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 font-semibold leading-none" }
|
|
235
|
+
},
|
|
236
|
+
countTone: {
|
|
237
|
+
neutral: {},
|
|
238
|
+
brand: {},
|
|
239
|
+
muted: {}
|
|
240
|
+
},
|
|
241
|
+
iconDensity: {
|
|
242
|
+
compact: { icon: "[&>svg]:size-[0.9375rem] size-6" },
|
|
243
|
+
comfortable: { icon: "[&>svg]:size-4 size-7" }
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
compoundVariants: [
|
|
247
|
+
{ countVariant: "pill", countTone: "neutral", class: { count: "bg-primary text-primary-foreground" } },
|
|
248
|
+
{ countVariant: "pill", countTone: "brand", class: { count: "bg-brand text-brand-foreground" } },
|
|
249
|
+
{ countVariant: "pill", countTone: "muted", class: { count: "bg-muted text-muted-foreground" } },
|
|
250
|
+
// Density sets the row height only while it's a list row.
|
|
251
|
+
{ mode: "collapsed", density: ["compact", "comfortable"], class: { item: "py-0 before:-left-1" } },
|
|
252
|
+
{ mode: "stacked", density: ["compact", "comfortable"], class: { item: "py-1 before:left-[calc(var(--sidebar-edge,--spacing(2))*-1)]" } },
|
|
253
|
+
{ mode: "bare", density: ["compact", "comfortable"], class: { item: "py-1 before:-left-1" } }
|
|
254
|
+
],
|
|
255
|
+
defaultVariants: { mode: "list", density: "compact", countVariant: "plain", countTone: "neutral", iconDensity: "compact" }
|
|
256
|
+
});
|
|
257
|
+
const iconTone = {
|
|
258
|
+
neutral: "bg-foreground/8 text-foreground",
|
|
259
|
+
brand: "bg-brand/10 text-brand-strong",
|
|
260
|
+
purple: "bg-purple/10 text-purple",
|
|
261
|
+
pink: "bg-pink/10 text-pink",
|
|
262
|
+
teal: "bg-teal/10 text-teal",
|
|
263
|
+
orange: "bg-orange/10 text-orange",
|
|
264
|
+
green: "bg-success/10 text-success-strong",
|
|
265
|
+
blue: "bg-info/10 text-info-strong",
|
|
266
|
+
red: "bg-destructive/10 text-destructive-strong",
|
|
267
|
+
amber: "bg-warning/10 text-warning-strong"
|
|
268
|
+
};
|
|
269
|
+
const swatchTone = {
|
|
270
|
+
neutral: "before:bg-foreground",
|
|
271
|
+
brand: "before:bg-brand",
|
|
272
|
+
purple: "before:bg-purple",
|
|
273
|
+
pink: "before:bg-pink",
|
|
274
|
+
teal: "before:bg-teal",
|
|
275
|
+
orange: "before:bg-orange",
|
|
276
|
+
green: "before:bg-success",
|
|
277
|
+
blue: "before:bg-info",
|
|
278
|
+
red: "before:bg-destructive",
|
|
279
|
+
amber: "before:bg-warning"
|
|
280
|
+
};
|
|
281
|
+
const sidebarRichVariants = tv({
|
|
282
|
+
slots: {
|
|
283
|
+
item: "text-start",
|
|
284
|
+
media: [
|
|
285
|
+
"relative isolate grid shrink-0 place-items-center",
|
|
286
|
+
"[&>[data-slot=avatar]]:size-full [&>[data-slot=avatar]]:rounded-[inherit] [&>img]:size-full [&>img]:rounded-[inherit] [&>img]:object-cover",
|
|
287
|
+
"has-[>img]:after:pointer-events-none has-[>img]:after:absolute has-[>img]:after:inset-0 has-[>img]:after:rounded-[inherit] has-[>img]:after:border has-[>img]:after:border-foreground/10 has-[>img]:after:content-['']",
|
|
288
|
+
"has-[>svg]:bg-muted has-[>svg]:text-foreground [&>svg]:size-5",
|
|
289
|
+
// The presence dot's ring follows the row's fill so it always cuts cleanly.
|
|
290
|
+
"[&_[data-slot=avatar-status]]:ring-[var(--surface,var(--background))] [&_[data-slot=avatar-status]]:transition-shadow [&_[data-slot=avatar-status]]:duration-fast [&_[data-slot=avatar-status]]:ease-out",
|
|
291
|
+
"group-hover/item:[&_[data-slot=avatar-status]]:ring-accent group-data-[active=true]/item:[&_[data-slot=avatar-status]]:ring-accent"
|
|
292
|
+
],
|
|
293
|
+
text: [
|
|
294
|
+
"grid min-w-0 flex-1 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-2 gap-y-0.5",
|
|
295
|
+
"[&>[data-slot=sidebar-item-count]]:col-start-2 [&>[data-slot=sidebar-item-count]]:row-start-2 [&>[data-slot=sidebar-item-count]]:self-center [&>[data-slot=sidebar-item-count]]:justify-self-end"
|
|
296
|
+
],
|
|
297
|
+
title: "col-start-1 row-start-1 flex min-w-0 items-center gap-1 text-sm font-medium text-foreground group-data-[unread=true]/item:font-semibold [&>svg]:size-3.5 [&>svg]:shrink-0 [&>svg]:text-muted-foreground",
|
|
298
|
+
description: "col-start-1 row-start-2 min-w-0 truncate text-sm font-normal text-muted-foreground [&>svg]:me-1 [&>svg]:inline [&>svg]:size-3.5 [&>svg]:-translate-y-px",
|
|
299
|
+
meta: "col-start-2 flex items-center justify-end gap-1 text-xs font-normal tabular-nums text-muted-foreground [&>svg]:size-4 [&>svg]:shrink-0"
|
|
300
|
+
},
|
|
301
|
+
variants: {
|
|
302
|
+
size: {
|
|
303
|
+
md: { item: "py-3", media: "size-10" },
|
|
304
|
+
lg: { item: "py-1.5", media: "size-12" }
|
|
305
|
+
},
|
|
306
|
+
shape: {
|
|
307
|
+
square: { media: "rounded-sm" },
|
|
308
|
+
circle: { media: "rounded-full" }
|
|
309
|
+
},
|
|
310
|
+
collapsed: {
|
|
311
|
+
// The rail keeps a 32px media tile in the usual 40px target.
|
|
312
|
+
true: { item: "after:size-10", media: "size-8" },
|
|
313
|
+
false: {}
|
|
314
|
+
},
|
|
315
|
+
placement: {
|
|
316
|
+
top: { meta: "row-start-1" },
|
|
317
|
+
bottom: { meta: "row-start-2 self-center" },
|
|
318
|
+
center: { meta: "row-span-2 row-start-1 self-center" }
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
compoundVariants: [{ collapsed: true, size: ["md", "lg"], class: { item: "py-0" } }],
|
|
322
|
+
defaultVariants: { size: "md", shape: "square", collapsed: false, placement: "top" }
|
|
323
|
+
});
|
|
324
|
+
const sidebarHeadingVariants = tv({
|
|
325
|
+
slots: {
|
|
326
|
+
row: "flex min-w-0 items-center gap-1",
|
|
327
|
+
title: "min-w-0 flex-1 truncate text-base font-semibold tracking-tight text-foreground",
|
|
328
|
+
filters: "flex min-w-0 overflow-x-auto overflow-y-hidden py-1 scroll-fade-x [--scroll-fade-size:1.5rem]"
|
|
329
|
+
},
|
|
330
|
+
variants: {
|
|
331
|
+
collapsed: {
|
|
332
|
+
true: { row: "flex-col justify-center", title: "sr-only" },
|
|
333
|
+
false: {}
|
|
334
|
+
},
|
|
335
|
+
density: {
|
|
336
|
+
compact: { title: "px-2.5", filters: "-mx-2 px-2" },
|
|
337
|
+
comfortable: { title: "px-3", filters: "-mx-3 px-3" }
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
defaultVariants: { collapsed: false, density: "compact" }
|
|
341
|
+
});
|
|
342
|
+
const treeRowReveal = (prop) => ["group-hover/tree-row", "group-has-focus-visible/tree-row", "group-focus-visible/tree-row", "has-[[data-state=open]]", "pointer-coarse"].map((v) => `${v}:${prop}`);
|
|
343
|
+
const sidebarTreeVariants = tv({
|
|
344
|
+
slots: {
|
|
345
|
+
tree: "flex flex-col gap-0.5",
|
|
346
|
+
item: "flex list-none flex-col gap-0.5",
|
|
347
|
+
row: [
|
|
348
|
+
"group/tree-row before:hidden data-[active=true]:bg-accent aria-disabled:pointer-events-none aria-disabled:opacity-50",
|
|
349
|
+
"ps-[calc(var(--sidebar-item-px)+var(--sidebar-tree-level,0)*(var(--spacing)*5+var(--sidebar-item-gap)))]"
|
|
350
|
+
],
|
|
351
|
+
lead: "relative z-[1] grid size-5 shrink-0 place-items-center",
|
|
352
|
+
icon: "col-start-1 row-start-1 grid size-5 place-items-center text-base leading-none [&_svg]:size-5 [&_svg]:shrink-0 transition-opacity duration-fast ease-out motion-reduce-fade",
|
|
353
|
+
caret: [
|
|
354
|
+
"relative col-start-1 row-start-1 grid size-5 cursor-pointer place-items-center rounded-sm text-muted-foreground opacity-0",
|
|
355
|
+
"transition-[opacity,color,background-color] duration-fast ease-out motion-reduce-fade",
|
|
356
|
+
"group-hover/tree-row:opacity-100 group-focus-visible/tree-row:opacity-100 pointer-coarse:opacity-100 hover:bg-foreground/8 hover:text-foreground",
|
|
357
|
+
"after:absolute after:-inset-1.5 after:content-['']"
|
|
358
|
+
],
|
|
359
|
+
caretGlyph: "size-3.5 caret-turn group-data-[expanded=true]/tree-row:rotate-90",
|
|
360
|
+
label: "min-w-0 flex-1 truncate text-start",
|
|
361
|
+
actions: [
|
|
362
|
+
"relative z-[1] -my-0.5 -me-1 -ms-3 grid grid-cols-[0fr] opacity-0 transition-opacity duration-fast ease-out motion-reduce-fade",
|
|
363
|
+
...treeRowReveal("-ms-2"),
|
|
364
|
+
...treeRowReveal("grid-cols-[1fr]"),
|
|
365
|
+
...treeRowReveal("opacity-100")
|
|
366
|
+
],
|
|
367
|
+
actionsInner: [
|
|
368
|
+
"flex min-w-0 items-center gap-1 overflow-hidden",
|
|
369
|
+
"group-hover/tree-row:overflow-visible group-has-focus-visible/tree-row:overflow-visible group-focus-visible/tree-row:overflow-visible group-has-[[data-state=open]]/tree-row:overflow-visible pointer-coarse:overflow-visible"
|
|
370
|
+
],
|
|
371
|
+
group: "flex flex-col gap-0.5 data-[state=open]:animate-disclosure-open data-[state=closed]:animate-disclosure-close motion-reduce:animate-none"
|
|
372
|
+
},
|
|
373
|
+
variants: {
|
|
374
|
+
branch: {
|
|
375
|
+
// The caret takes the icon's place on hover and focus, and always on touch.
|
|
376
|
+
true: { icon: "group-hover/tree-row:opacity-0 group-focus-visible/tree-row:opacity-0 pointer-coarse:opacity-0" },
|
|
377
|
+
false: {}
|
|
378
|
+
},
|
|
379
|
+
collapsed: {
|
|
380
|
+
true: { tree: "items-center" },
|
|
381
|
+
false: {}
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
defaultVariants: { branch: false, collapsed: false }
|
|
385
|
+
});
|
|
386
|
+
export {
|
|
387
|
+
iconTone,
|
|
388
|
+
sidebarGroupVariants,
|
|
389
|
+
sidebarHeadingVariants,
|
|
390
|
+
sidebarItemVariants,
|
|
391
|
+
sidebarRichVariants,
|
|
392
|
+
sidebarTreeVariants,
|
|
393
|
+
sidebarVariants,
|
|
394
|
+
swatchTone
|
|
395
|
+
};
|
|
396
|
+
//# sourceMappingURL=variants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/sidebar/variants.ts"],"sourcesContent":["import { tv } from \"../../../lib/tv.mjs\"\n\n/*\n * The Sidebar's recipes. Geometry travels as variables set on the root, so every part reads the\n * same row padding, glyph gap and edge inset:\n * --sidebar-item-px row padding (10px compact, 12px comfortable)\n * --sidebar-item-gap glyph-to-label gap (12px)\n * --sidebar-sub-icon the glyph a nested list aligns its guide rail to\n * --sidebar-edge Content's padding, which the active row's ink bar sits in\n */\n\nconst actionsSlot = \"[data-slot=sidebar-actions]\"\n\nexport const sidebarVariants = tv({\n slots: {\n root: [\n \"flex max-w-full shrink-0 flex-col overflow-hidden max-sm:min-w-0 bg-card text-card-foreground [--surface:var(--card)]\",\n \"[--sidebar-item-gap:--spacing(3)] [&_[data-slot=sidebar-collapsible]]:[--sidebar-sub-icon:--spacing(5)]\",\n ],\n header: [\n \"flex shrink-0 flex-col gap-1 border-b border-border\",\n `has-[>${actionsSlot}]:flex-row has-[>${actionsSlot}]:items-center`,\n ],\n content: \"relative flex min-h-0 flex-1 flex-col overflow-y-auto scroll-py-2\",\n footer: [\n \"flex shrink-0 flex-col gap-1 border-t border-border [[data-slot=sidebar-header]+&]:border-t-0\",\n `has-[>${actionsSlot}]:items-center`,\n ],\n actions: \"flex shrink-0 items-center text-muted-foreground\",\n switcher: [\n \"group/switcher relative flex min-w-0 cursor-pointer items-center text-left rounded-md outline-none transition duration-fast ease-out\",\n \"focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-1 focus-visible:ring-offset-card data-[state=open]:bg-accent hover:bg-accent\",\n ],\n switcherText: \"min-w-0 flex-col\",\n switcherTitle: \"truncate text-sm text-foreground\",\n switcherSubtitle: \"truncate text-xs text-muted-foreground\",\n switcherCaret: [\n \"ms-auto shrink-0 text-muted-foreground opacity-0 transition-opacity duration-fast ease-out motion-reduce-fade\",\n \"group-hover/switcher:opacity-100 group-focus-visible/switcher:opacity-100 group-data-[state=open]/switcher:opacity-100 pointer-coarse:opacity-100\",\n ],\n separator: \"mx-2.5 h-px shrink-0 bg-border\",\n },\n variants: {\n collapsed: {\n false: {\n root: \"w-64 max-sm:shrink\",\n header: `[&:has(>${actionsSlot})>[data-slot=sidebar-switcher]]:w-auto [&>[data-slot=sidebar-switcher]~[data-slot=input-root]]:bg-accent [&>[data-slot=sidebar-switcher]~[data-slot=input-root]:not(:focus-within)]:border-transparent`,\n footer: `has-[>${actionsSlot}]:flex-row [&:has(>${actionsSlot})>[data-slot=sidebar-switcher]]:w-auto`,\n actions: \"ml-auto gap-0.5\",\n switcher: \"w-full px-(--sidebar-item-px)\",\n switcherText: \"flex\",\n },\n true: {\n root: \"w-12 max-sm:shrink-0\",\n header: [\n `items-center p-1 has-[>${actionsSlot}]:grid has-[>${actionsSlot}]:place-items-center has-[>${actionsSlot}]:border-b-0`,\n `[&:has(>${actionsSlot})>[data-slot=sidebar-switcher]]:w-10 [&:has(>${actionsSlot})>[data-slot=sidebar-switcher]]:flex-none`,\n `[&:has(>${actionsSlot})>*]:[grid-area:1/1] [&:has(>${actionsSlot})>*]:transition-opacity [&:has(>${actionsSlot})>*]:duration-fast [&:has(>${actionsSlot})>*]:ease-out`,\n `[&>${actionsSlot}]:m-0 [&>${actionsSlot}]:opacity-0 [&>${actionsSlot}>*]:size-10 hover:[&>${actionsSlot}]:opacity-100 [&>${actionsSlot}:has(:focus-visible)]:opacity-100`,\n `hover:[&:has(>${actionsSlot})>[data-slot=sidebar-switcher]]:opacity-0 [&:has(>${actionsSlot}_:focus-visible)>[data-slot=sidebar-switcher]]:opacity-0`,\n ],\n content: \"items-center gap-2 p-[max(4px,--spacing(1))] [--sidebar-edge:max(4px,--spacing(1))]\",\n footer: `items-center p-1 has-[>${actionsSlot}]:flex-col [&:has(>${actionsSlot})>[data-slot=sidebar-switcher]]:w-10 [&:has(>${actionsSlot})>[data-slot=sidebar-switcher]]:flex-none`,\n actions: \"ml-0 flex-col gap-2\",\n switcher: \"mx-auto size-10 justify-center gap-0 p-0\",\n switcherText: \"hidden\",\n switcherCaret: \"hidden\",\n },\n },\n density: {\n compact: {\n root: \"[--sidebar-item-px:--spacing(2.5)] [&_[data-slot=sidebar-collapsible]:has(>button>[data-slot=sidebar-item-icon])]:[--sidebar-sub-icon:--spacing(6)]\",\n },\n comfortable: {\n root: \"[--sidebar-item-px:--spacing(3)] [&_[data-slot=sidebar-collapsible]:has(>button>[data-slot=sidebar-item-icon])]:[--sidebar-sub-icon:--spacing(7)]\",\n },\n },\n switcherVariant: {\n default: { switcherTitle: \"font-medium\", switcherCaret: \"size-3.5\" },\n full: { switcher: \"gap-3 py-1.5\", switcherText: \"gap-0.5\", switcherTitle: \"font-semibold\", switcherCaret: \"size-4\" },\n },\n side: {\n left: { root: \"border-r border-border\" },\n right: { root: \"border-l border-border\" },\n },\n floating: {\n // A detached card: a full outline and a lift, instead of one edge hairline.\n true: { root: \"rounded-xl border border-border shadow-lg\" },\n false: {},\n },\n stacked: {\n // The labeled icon rail: the icon rail's zones, 64px wide, without the zone hairlines.\n true: {\n root: \"w-16\",\n header: \"border-b-0\",\n content: \"gap-2 px-1 py-2 [--sidebar-edge:--spacing(1)]\",\n footer: \"border-t-0\",\n switcher: \"size-9 rounded-lg\",\n },\n false: {},\n },\n docked: {\n // In an app shell the shell owns the surface: no fill, no hairline, the column's width.\n true: { root: \"bg-transparent border-0 [--surface:var(--background)]\" },\n false: {},\n },\n },\n compoundVariants: [\n // Zone padding steps with density while the rail is open.\n { collapsed: false, density: \"compact\", class: { header: `p-2 has-[>${actionsSlot}]:pe-2.5 has-[>[data-slot=sidebar-switcher]+:not(${actionsSlot})]:pt-1`, content: \"gap-4 p-2 [--sidebar-edge:--spacing(2)]\", footer: `p-2 has-[>${actionsSlot}]:pe-2.5` } },\n { collapsed: false, density: \"comfortable\", class: { header: `p-3 has-[>${actionsSlot}]:pe-4 has-[>[data-slot=sidebar-switcher]+:not(${actionsSlot})]:pt-1.5`, content: \"gap-5 p-3 [--sidebar-edge:--spacing(3)]\", footer: `p-3 has-[>${actionsSlot}]:pe-4` } },\n { collapsed: false, switcherVariant: \"default\", density: \"compact\", class: { switcher: \"gap-2 py-1\" } },\n { collapsed: false, switcherVariant: \"default\", density: \"comfortable\", class: { switcher: \"gap-2 py-1.5\" } },\n ],\n defaultVariants: { collapsed: false, density: \"compact\", switcherVariant: \"default\", side: \"left\", floating: false, docked: false, stacked: false },\n})\n\nexport const sidebarGroupVariants = tv({\n slots: {\n group: \"group/section relative flex flex-col gap-0.5\",\n label: \"flex items-center eyebrow\",\n labelButton: [\n \"group/grouplabel w-full cursor-pointer rounded-md outline-none transition-colors duration-fast ease-out py-1 hover:bg-accent\",\n \"focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-1 focus-visible:ring-offset-card\",\n ],\n caret: \"ms-auto size-3.5 shrink-0 text-muted-foreground caret-turn group-data-[state=open]/grouplabel:rotate-90\",\n content: \"flex flex-col gap-0.5 data-[state=open]:animate-disclosure-open data-[state=closed]:animate-disclosure-close\",\n action: [\n \"absolute z-10 grid size-5 cursor-pointer place-items-center rounded-sm text-muted-foreground outline-none pointer-events-none opacity-0\",\n \"transition-[opacity,color,background-color] duration-fast ease-out motion-reduce-fade\",\n \"group-hover/section:pointer-events-auto group-hover/section:opacity-100 group-has-focus-visible/section:pointer-events-auto group-has-focus-visible/section:opacity-100\",\n \"pointer-coarse:pointer-events-auto pointer-coarse:opacity-100\",\n \"data-[state=open]:pointer-events-auto data-[state=open]:opacity-100 data-[state=open]:bg-foreground/8 data-[state=open]:text-foreground\",\n \"hover:bg-foreground/8 hover:text-foreground focus-visible:ring-2 focus-visible:ring-focus\",\n \"after:absolute after:-inset-2.5 after:content-[''] [&>svg]:size-3.5 [&>svg]:shrink-0\",\n \"end-1.75 top-0 group-data-[state]/section:end-7 group-data-[state]/section:top-0.5\",\n ],\n },\n variants: {\n collapsed: {\n // In the icon rail sections split on a short rule and their headings go to screen readers.\n true: {\n group: \"[&:not(:first-child)]:border-t [&:not(:first-child)]:border-border [&:not(:first-child)]:pt-2\",\n label: \"sr-only\",\n },\n false: {},\n },\n stacked: {\n true: { group: \"gap-1 self-stretch\" },\n false: {},\n },\n density: {\n compact: { label: \"px-2.5 pb-1 pt-0.5\" },\n comfortable: { label: \"px-3 pb-1.5 pt-1\" },\n },\n },\n defaultVariants: { collapsed: false, density: \"compact\", stacked: false },\n})\n\nconst itemBase = [\n \"group/item relative flex w-full cursor-pointer select-none items-center gap-(--sidebar-item-gap) rounded-md text-sm font-medium tabular-nums text-muted-foreground outline-none\",\n \"transition duration-fast ease-out hover:bg-accent hover:text-accent-foreground\",\n \"focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-1 focus-visible:ring-offset-card\",\n \"data-[active=true]:bg-accent data-[active=true]:font-semibold data-[active=true]:text-foreground\",\n \"data-[unread=true]:font-semibold data-[unread=true]:text-foreground\",\n \"data-[muted=true]:text-muted-foreground/60 data-[muted=true]:hover:text-accent-foreground data-[muted=true]:group-hover/row:text-accent-foreground data-[muted=true]:data-[active=true]:text-foreground\",\n \"group-hover/row:bg-accent group-hover/row:text-accent-foreground\",\n \"[&:hover_[data-slot=badge][data-variant=secondary]]:bg-foreground/8 data-[active=true]:[&_[data-slot=badge][data-variant=secondary]]:bg-foreground/8 group-hover/row:[&_[data-slot=badge][data-variant=secondary]]:bg-foreground/8\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n // The ink edge bar of the current page, sitting in Content's padding.\n \"before:absolute before:left-[calc(var(--sidebar-edge,--spacing(2))*-1)] before:top-1/2 before:h-4 before:w-[3px] before:-translate-y-1/2 before:rounded-r-full before:bg-primary before:opacity-0\",\n \"before:transition-opacity before:duration-fast before:ease-out before:content-[''] data-[active=true]:before:opacity-100\",\n \"[&>svg]:size-5 [&>svg]:shrink-0 px-(--sidebar-item-px)\",\n]\n\nexport const sidebarItemVariants = tv({\n slots: {\n item: itemBase,\n label: \"min-w-0 flex-1 truncate text-start\",\n unreadDot: \"pointer-events-none absolute size-2 rounded-full bg-foreground ring-2 ring-card\",\n icon: \"grid shrink-0 place-items-center rounded-sm\",\n swatch: \"grid size-5 shrink-0 place-items-center before:size-2 before:rounded-full before:content-['']\",\n count: [\n \"ml-auto shrink-0 text-xs font-medium tabular-nums transition-opacity duration-fast ease-out motion-reduce-fade\",\n \"group-hover/row:opacity-0 group-has-focus-visible/row:opacity-0 group-has-[[data-state=open]]/row:opacity-0 pointer-coarse:group-has-[[data-slot=sidebar-item-actions]]/row:opacity-0\",\n ],\n row: \"group/row relative\",\n actions: [\n \"absolute end-1.5 top-1/2 flex -translate-y-1/2 items-center gap-1 pointer-events-none opacity-0 transition-opacity duration-fast ease-out motion-reduce-fade\",\n \"group-hover/row:pointer-events-auto group-hover/row:opacity-100 group-has-focus-visible/row:pointer-events-auto group-has-focus-visible/row:opacity-100\",\n \"has-[[data-state=open]]:pointer-events-auto has-[[data-state=open]]:opacity-100 pointer-coarse:pointer-events-auto pointer-coarse:opacity-100\",\n ],\n action: [\n \"relative grid shrink-0 cursor-pointer place-items-center rounded-sm text-muted-foreground outline-none transition-colors duration-fast ease-out motion-reduce-fade\",\n \"hover:bg-foreground/8 hover:text-foreground data-[state=open]:bg-foreground/8 data-[state=open]:text-foreground focus-visible:ring-2 focus-visible:ring-focus\",\n \"after:absolute after:-inset-x-0.5 after:-inset-y-2 after:content-[''] [&>svg]:size-4 [&>svg]:shrink-0 size-6\",\n ],\n collapsible: \"flex flex-col gap-0.5\",\n collapsibleCaret: \"ml-auto flex size-4 shrink-0 items-center justify-center text-muted-foreground caret-turn group-data-[state=open]/collapsible:rotate-90\",\n sub: [\n \"relative mt-0.5 flex flex-col gap-0.5\",\n \"ms-[calc(var(--sidebar-item-px)+var(--sidebar-sub-icon)/2-0.5px)] ps-[calc(var(--sidebar-sub-icon)/2+var(--sidebar-item-gap)-var(--sidebar-item-px)+0.5px)]\",\n \"data-[state=open]:animate-disclosure-open data-[state=closed]:animate-disclosure-close\",\n \"before:pointer-events-none before:absolute before:inset-y-1 before:start-0 before:w-px before:bg-border before:content-[''] [&_[data-slot=sidebar-item]]:before:hidden\",\n ],\n },\n variants: {\n mode: {\n list: { unreadDot: \"end-1 top-1\" },\n // The icon rail: a centred 40px target whose chip is drawn by ::after, so the bar can sit outside it.\n collapsed: {\n item: [\n \"relative isolate mx-auto size-10 justify-center gap-0 px-0 py-0 hover:bg-transparent data-[active=true]:bg-transparent\",\n \"after:absolute after:left-1/2 after:top-1/2 after:-z-10 after:size-8 after:-translate-x-1/2 after:-translate-y-1/2 after:rounded-md after:transition-colors after:duration-fast after:ease-out after:content-['']\",\n \"hover:after:bg-accent data-[active=true]:after:bg-accent before:-left-1\",\n ],\n unreadDot: \"end-1 top-1\",\n },\n // The labeled rail: the glyph in a padded tile over a short label, a Badge pinned to the tile.\n stacked: {\n item: [\n \"flex-col justify-center gap-1 px-0.5 py-1 text-center text-xs leading-tight hover:bg-transparent data-[active=true]:bg-transparent\",\n \"data-[active=true]:font-medium data-[unread=true]:font-medium [&>svg]:box-content [&>svg]:rounded-lg [&>svg]:p-2\",\n \"[&>[data-slot=sidebar-item-icon]]:size-9 [&>[data-slot=sidebar-item-icon]]:rounded-lg [&>[data-slot=sidebar-item-icon]>svg]:size-5\",\n \"[&>[data-slot=badge]]:absolute [&>[data-slot=badge]]:left-1/2 [&>[data-slot=badge]]:top-0.5 [&>[data-slot=badge]]:ml-2.5 [&>[data-slot=badge]]:h-4 [&>[data-slot=badge]]:min-w-4 [&>[data-slot=badge]]:justify-center [&>[data-slot=badge]]:rounded-full [&>[data-slot=badge]]:px-1 [&>[data-slot=badge]]:py-0 [&>[data-slot=badge]]:text-[0.625rem] [&>[data-slot=badge]]:font-semibold [&>[data-slot=badge]]:leading-none [&>[data-slot=badge]]:ring-2 [&>[data-slot=badge]]:ring-card\",\n \"before:hidden [&>svg]:transition-colors [&>svg]:duration-fast [&>svg]:ease-out hover:[&>svg]:bg-accent data-[active=true]:[&>svg]:bg-accent\",\n ],\n unreadDot: \"left-1/2 top-1.5 ml-2\",\n },\n // The bare labeled rail: no tile; the current row carries a taller ink bar.\n bare: {\n item: [\n \"flex-col justify-center gap-1 px-0.5 py-1 text-center text-xs leading-tight hover:bg-transparent data-[active=true]:bg-transparent\",\n \"data-[active=true]:font-medium data-[unread=true]:font-medium [&>svg]:box-content [&>svg]:rounded-lg [&>svg]:p-2\",\n \"[&>[data-slot=sidebar-item-icon]]:size-9 [&>[data-slot=sidebar-item-icon]]:rounded-lg [&>[data-slot=sidebar-item-icon]>svg]:size-5\",\n \"[&>[data-slot=badge]]:absolute [&>[data-slot=badge]]:left-1/2 [&>[data-slot=badge]]:top-0.5 [&>[data-slot=badge]]:ml-2.5 [&>[data-slot=badge]]:h-4 [&>[data-slot=badge]]:min-w-4 [&>[data-slot=badge]]:justify-center [&>[data-slot=badge]]:rounded-full [&>[data-slot=badge]]:px-1 [&>[data-slot=badge]]:py-0 [&>[data-slot=badge]]:text-[0.625rem] [&>[data-slot=badge]]:font-semibold [&>[data-slot=badge]]:leading-none [&>[data-slot=badge]]:ring-2 [&>[data-slot=badge]]:ring-card\",\n \"before:-left-1 before:h-8\",\n ],\n unreadDot: \"left-1/2 top-1.5 ml-2\",\n },\n },\n density: {\n compact: { item: \"py-1.5\" },\n comfortable: { item: \"py-2 before:-left-3\" },\n },\n countVariant: {\n plain: {},\n pill: { count: \"inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1.5 font-semibold leading-none\" },\n },\n countTone: {\n neutral: {},\n brand: {},\n muted: {},\n },\n iconDensity: {\n compact: { icon: \"[&>svg]:size-[0.9375rem] size-6\" },\n comfortable: { icon: \"[&>svg]:size-4 size-7\" },\n },\n },\n compoundVariants: [\n { countVariant: \"pill\", countTone: \"neutral\", class: { count: \"bg-primary text-primary-foreground\" } },\n { countVariant: \"pill\", countTone: \"brand\", class: { count: \"bg-brand text-brand-foreground\" } },\n { countVariant: \"pill\", countTone: \"muted\", class: { count: \"bg-muted text-muted-foreground\" } },\n // Density sets the row height only while it's a list row.\n { mode: \"collapsed\", density: [\"compact\", \"comfortable\"], class: { item: \"py-0 before:-left-1\" } },\n { mode: \"stacked\", density: [\"compact\", \"comfortable\"], class: { item: \"py-1 before:left-[calc(var(--sidebar-edge,--spacing(2))*-1)]\" } },\n { mode: \"bare\", density: [\"compact\", \"comfortable\"], class: { item: \"py-1 before:-left-1\" } },\n ],\n defaultVariants: { mode: \"list\", density: \"compact\", countVariant: \"plain\", countTone: \"neutral\", iconDensity: \"compact\" },\n})\n\nexport type SidebarTone = \"neutral\" | \"brand\" | \"purple\" | \"pink\" | \"teal\" | \"orange\" | \"green\" | \"blue\" | \"red\" | \"amber\"\n\n// Static maps, so Tailwind sees every class.\nexport const iconTone: Record<SidebarTone, string> = {\n neutral: \"bg-foreground/8 text-foreground\",\n brand: \"bg-brand/10 text-brand-strong\",\n purple: \"bg-purple/10 text-purple\",\n pink: \"bg-pink/10 text-pink\",\n teal: \"bg-teal/10 text-teal\",\n orange: \"bg-orange/10 text-orange\",\n green: \"bg-success/10 text-success-strong\",\n blue: \"bg-info/10 text-info-strong\",\n red: \"bg-destructive/10 text-destructive-strong\",\n amber: \"bg-warning/10 text-warning-strong\",\n}\n\nexport const swatchTone: Record<SidebarTone, string> = {\n neutral: \"before:bg-foreground\",\n brand: \"before:bg-brand\",\n purple: \"before:bg-purple\",\n pink: \"before:bg-pink\",\n teal: \"before:bg-teal\",\n orange: \"before:bg-orange\",\n green: \"before:bg-success\",\n blue: \"before:bg-info\",\n red: \"before:bg-destructive\",\n amber: \"before:bg-warning\",\n}\n\n/*\n * Rich rows: a media tile beside a two-line text grid (title and meta on top, description and a\n * count below). md suits conversations, lg covers and artwork. In the icon rail only the media stays.\n */\nexport const sidebarRichVariants = tv({\n slots: {\n item: \"text-start\",\n media: [\n \"relative isolate grid shrink-0 place-items-center\",\n \"[&>[data-slot=avatar]]:size-full [&>[data-slot=avatar]]:rounded-[inherit] [&>img]:size-full [&>img]:rounded-[inherit] [&>img]:object-cover\",\n \"has-[>img]:after:pointer-events-none has-[>img]:after:absolute has-[>img]:after:inset-0 has-[>img]:after:rounded-[inherit] has-[>img]:after:border has-[>img]:after:border-foreground/10 has-[>img]:after:content-['']\",\n \"has-[>svg]:bg-muted has-[>svg]:text-foreground [&>svg]:size-5\",\n // The presence dot's ring follows the row's fill so it always cuts cleanly.\n \"[&_[data-slot=avatar-status]]:ring-[var(--surface,var(--background))] [&_[data-slot=avatar-status]]:transition-shadow [&_[data-slot=avatar-status]]:duration-fast [&_[data-slot=avatar-status]]:ease-out\",\n \"group-hover/item:[&_[data-slot=avatar-status]]:ring-accent group-data-[active=true]/item:[&_[data-slot=avatar-status]]:ring-accent\",\n ],\n text: [\n \"grid min-w-0 flex-1 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-2 gap-y-0.5\",\n \"[&>[data-slot=sidebar-item-count]]:col-start-2 [&>[data-slot=sidebar-item-count]]:row-start-2 [&>[data-slot=sidebar-item-count]]:self-center [&>[data-slot=sidebar-item-count]]:justify-self-end\",\n ],\n title: \"col-start-1 row-start-1 flex min-w-0 items-center gap-1 text-sm font-medium text-foreground group-data-[unread=true]/item:font-semibold [&>svg]:size-3.5 [&>svg]:shrink-0 [&>svg]:text-muted-foreground\",\n description: \"col-start-1 row-start-2 min-w-0 truncate text-sm font-normal text-muted-foreground [&>svg]:me-1 [&>svg]:inline [&>svg]:size-3.5 [&>svg]:-translate-y-px\",\n meta: \"col-start-2 flex items-center justify-end gap-1 text-xs font-normal tabular-nums text-muted-foreground [&>svg]:size-4 [&>svg]:shrink-0\",\n },\n variants: {\n size: {\n md: { item: \"py-3\", media: \"size-10\" },\n lg: { item: \"py-1.5\", media: \"size-12\" },\n },\n shape: {\n square: { media: \"rounded-sm\" },\n circle: { media: \"rounded-full\" },\n },\n collapsed: {\n // The rail keeps a 32px media tile in the usual 40px target.\n true: { item: \"after:size-10\", media: \"size-8\" },\n false: {},\n },\n placement: {\n top: { meta: \"row-start-1\" },\n bottom: { meta: \"row-start-2 self-center\" },\n center: { meta: \"row-span-2 row-start-1 self-center\" },\n },\n },\n compoundVariants: [{ collapsed: true, size: [\"md\", \"lg\"], class: { item: \"py-0\" } }],\n defaultVariants: { size: \"md\", shape: \"square\", collapsed: false, placement: \"top\" },\n})\n\n/** A sidebar's own heading block: a title row, filters and tools above the list. */\nexport const sidebarHeadingVariants = tv({\n slots: {\n row: \"flex min-w-0 items-center gap-1\",\n title: \"min-w-0 flex-1 truncate text-base font-semibold tracking-tight text-foreground\",\n filters: \"flex min-w-0 overflow-x-auto overflow-y-hidden py-1 scroll-fade-x [--scroll-fade-size:1.5rem]\",\n },\n variants: {\n collapsed: {\n true: { row: \"flex-col justify-center\", title: \"sr-only\" },\n false: {},\n },\n density: {\n compact: { title: \"px-2.5\", filters: \"-mx-2 px-2\" },\n comfortable: { title: \"px-3\", filters: \"-mx-3 px-3\" },\n },\n },\n defaultVariants: { collapsed: false, density: \"compact\" },\n})\n\n/*\n * The page tree: nested pages stepped in by one glyph and gap per level (--sidebar-tree-level is set\n * per row). A branch's icon gives way to its caret under the pointer or focus; row actions slide in.\n */\nconst treeRowReveal = (prop: string) =>\n [\"group-hover/tree-row\", \"group-has-focus-visible/tree-row\", \"group-focus-visible/tree-row\", \"has-[[data-state=open]]\", \"pointer-coarse\"].map((v) => `${v}:${prop}`)\n\nexport const sidebarTreeVariants = tv({\n slots: {\n tree: \"flex flex-col gap-0.5\",\n item: \"flex list-none flex-col gap-0.5\",\n row: [\n \"group/tree-row before:hidden data-[active=true]:bg-accent aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n \"ps-[calc(var(--sidebar-item-px)+var(--sidebar-tree-level,0)*(var(--spacing)*5+var(--sidebar-item-gap)))]\",\n ],\n lead: \"relative z-[1] grid size-5 shrink-0 place-items-center\",\n icon: \"col-start-1 row-start-1 grid size-5 place-items-center text-base leading-none [&_svg]:size-5 [&_svg]:shrink-0 transition-opacity duration-fast ease-out motion-reduce-fade\",\n caret: [\n \"relative col-start-1 row-start-1 grid size-5 cursor-pointer place-items-center rounded-sm text-muted-foreground opacity-0\",\n \"transition-[opacity,color,background-color] duration-fast ease-out motion-reduce-fade\",\n \"group-hover/tree-row:opacity-100 group-focus-visible/tree-row:opacity-100 pointer-coarse:opacity-100 hover:bg-foreground/8 hover:text-foreground\",\n \"after:absolute after:-inset-1.5 after:content-['']\",\n ],\n caretGlyph: \"size-3.5 caret-turn group-data-[expanded=true]/tree-row:rotate-90\",\n label: \"min-w-0 flex-1 truncate text-start\",\n actions: [\n \"relative z-[1] -my-0.5 -me-1 -ms-3 grid grid-cols-[0fr] opacity-0 transition-opacity duration-fast ease-out motion-reduce-fade\",\n ...treeRowReveal(\"-ms-2\"),\n ...treeRowReveal(\"grid-cols-[1fr]\"),\n ...treeRowReveal(\"opacity-100\"),\n ],\n actionsInner: [\n \"flex min-w-0 items-center gap-1 overflow-hidden\",\n \"group-hover/tree-row:overflow-visible group-has-focus-visible/tree-row:overflow-visible group-focus-visible/tree-row:overflow-visible group-has-[[data-state=open]]/tree-row:overflow-visible pointer-coarse:overflow-visible\",\n ],\n group: \"flex flex-col gap-0.5 data-[state=open]:animate-disclosure-open data-[state=closed]:animate-disclosure-close motion-reduce:animate-none\",\n },\n variants: {\n branch: {\n // The caret takes the icon's place on hover and focus, and always on touch.\n true: { icon: \"group-hover/tree-row:opacity-0 group-focus-visible/tree-row:opacity-0 pointer-coarse:opacity-0\" },\n false: {},\n },\n collapsed: {\n true: { tree: \"items-center\" },\n false: {},\n },\n },\n defaultVariants: { branch: false, collapsed: false },\n})\n"],"mappings":"AAAA,SAAS,UAAU;AAWnB,MAAM,cAAc;AAEb,MAAM,kBAAkB,GAAG;AAAA,EAChC,OAAO;AAAA,IACL,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,IACF;AAAA,IACA,QAAQ;AAA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AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,SAAS;AAAA,MACP;AAAA,MACA,GAAG,cAAc,OAAO;AAAA,MACxB,GAAG,cAAc,iBAAiB;AAAA,MAClC,GAAG,cAAc,aAAa;AAAA,IAChC;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,MACA;AAAA,IACF;AAAA,IACA,OAAO;AAAA,EACT;AAAA,EACA,UAAU;AAAA,IACR,QAAQ;AAAA;AAAA,MAEN,MAAM,EAAE,MAAM,iGAAiG;AAAA,MAC/G,OAAO,CAAC;AAAA,IACV;AAAA,IACA,WAAW;AAAA,MACT,MAAM,EAAE,MAAM,eAAe;AAAA,MAC7B,OAAO,CAAC;AAAA,IACV;AAAA,EACF;AAAA,EACA,iBAAiB,EAAE,QAAQ,OAAO,WAAW,MAAM;AACrD,CAAC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/signature/index.ts"],"sourcesContent":["export { Signature, signatureVariants, type SignatureProps } from \"./signature.mjs\"\n"],"mappings":"AAAA,SAAS,WAAW,yBAA8C;","names":[]}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cubicBezier, easingPoints, prefersReducedMotion, signatureDraw } from "../../../lib/motion.mjs";
|
|
5
|
+
import { tv } from "../../../lib/tv.mjs";
|
|
6
|
+
const signatureVariants = tv({
|
|
7
|
+
base: [
|
|
8
|
+
"block w-fit shrink-0 overflow-visible text-foreground fill-none stroke-current",
|
|
9
|
+
"[stroke-linecap:round] [stroke-linejoin:round]",
|
|
10
|
+
// The nib keeps its on-screen weight however far the drawing is scaled: the weight in screen
|
|
11
|
+
// pixels, divided by the screen pixels per drawing unit (measured on the client).
|
|
12
|
+
"[stroke-width:calc(var(--signature-weight)/var(--signature-scale,1))]",
|
|
13
|
+
"[&_*]:fill-none [&_*]:stroke-current [&_*]:[stroke-width:inherit]",
|
|
14
|
+
"opacity-0 data-ready:opacity-100"
|
|
15
|
+
],
|
|
16
|
+
variants: {
|
|
17
|
+
size: {
|
|
18
|
+
sm: "h-10 [--signature-weight:1.25px]",
|
|
19
|
+
md: "h-14 [--signature-weight:1.6px]",
|
|
20
|
+
lg: "h-20 [--signature-weight:2px]"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
defaultVariants: { size: "md" }
|
|
24
|
+
});
|
|
25
|
+
const easeStroke = cubicBezier(easingPoints.sine);
|
|
26
|
+
function Signature({
|
|
27
|
+
size,
|
|
28
|
+
speed = "base",
|
|
29
|
+
delay = 0,
|
|
30
|
+
static: isStatic = false,
|
|
31
|
+
viewBox,
|
|
32
|
+
className,
|
|
33
|
+
children,
|
|
34
|
+
ref,
|
|
35
|
+
...props
|
|
36
|
+
}) {
|
|
37
|
+
const svgRef = React.useRef(null);
|
|
38
|
+
const [fitted, setFitted] = React.useState(null);
|
|
39
|
+
const [ready, setReady] = React.useState(false);
|
|
40
|
+
const box = viewBox ?? fitted ?? void 0;
|
|
41
|
+
const strokesKey = React.Children.toArray(children).map((child) => React.isValidElement(child) ? child.props.d ?? "" : "").join("|");
|
|
42
|
+
const setRef = React.useCallback(
|
|
43
|
+
(node) => {
|
|
44
|
+
svgRef.current = node;
|
|
45
|
+
if (typeof ref === "function") ref(node);
|
|
46
|
+
else if (ref) ref.current = node;
|
|
47
|
+
},
|
|
48
|
+
[ref]
|
|
49
|
+
);
|
|
50
|
+
React.useLayoutEffect(() => {
|
|
51
|
+
const svg = svgRef.current;
|
|
52
|
+
if (!svg || viewBox) return;
|
|
53
|
+
const ink = svg.getBBox();
|
|
54
|
+
const pad = 4;
|
|
55
|
+
setFitted(
|
|
56
|
+
[ink.x - pad, ink.y - pad, ink.width + pad * 2, ink.height + pad * 2].map((n) => Math.round(n * 10) / 10).join(" ")
|
|
57
|
+
);
|
|
58
|
+
}, [viewBox, strokesKey]);
|
|
59
|
+
React.useLayoutEffect(() => {
|
|
60
|
+
const svg = svgRef.current;
|
|
61
|
+
if (!svg || !box) return;
|
|
62
|
+
const height = Number(box.split(/[\s,]+/)[3]);
|
|
63
|
+
if (!height) return;
|
|
64
|
+
const measure = () => {
|
|
65
|
+
const scale = svg.getBoundingClientRect().height / height;
|
|
66
|
+
if (scale > 0) svg.style.setProperty("--signature-scale", String(scale));
|
|
67
|
+
};
|
|
68
|
+
measure();
|
|
69
|
+
const observer = new ResizeObserver(measure);
|
|
70
|
+
observer.observe(svg);
|
|
71
|
+
return () => observer.disconnect();
|
|
72
|
+
}, [box]);
|
|
73
|
+
React.useLayoutEffect(() => {
|
|
74
|
+
const svg = svgRef.current;
|
|
75
|
+
if (!svg || !box) return;
|
|
76
|
+
const paths = Array.from(svg.querySelectorAll("path"));
|
|
77
|
+
const lengths = paths.map((path) => path.getTotalLength());
|
|
78
|
+
const finished = isStatic || prefersReducedMotion();
|
|
79
|
+
paths.forEach((path, index) => {
|
|
80
|
+
const length = lengths[index];
|
|
81
|
+
path.style.strokeDasharray = finished ? "" : String(length);
|
|
82
|
+
path.style.strokeDashoffset = finished ? "" : String(length);
|
|
83
|
+
});
|
|
84
|
+
setReady(true);
|
|
85
|
+
if (finished || paths.length === 0) return;
|
|
86
|
+
const { duration, lift } = signatureDraw[speed];
|
|
87
|
+
const lifts = lift * (paths.length - 1);
|
|
88
|
+
const drawTime = Math.max(duration - lifts, duration * 0.5);
|
|
89
|
+
const total = lengths.reduce((sum, length) => sum + length, 0) || 1;
|
|
90
|
+
let cursor = 0;
|
|
91
|
+
const slots = lengths.map((length) => {
|
|
92
|
+
const start = cursor;
|
|
93
|
+
const span = length / total * drawTime;
|
|
94
|
+
cursor += span + lift;
|
|
95
|
+
return { start, span };
|
|
96
|
+
});
|
|
97
|
+
let frame = 0;
|
|
98
|
+
let timer = 0;
|
|
99
|
+
let started = 0;
|
|
100
|
+
const tick = (now) => {
|
|
101
|
+
if (!started) started = now;
|
|
102
|
+
const elapsed = now - started;
|
|
103
|
+
paths.forEach((path, index) => {
|
|
104
|
+
const { start, span } = slots[index];
|
|
105
|
+
const progress = span ? Math.min(Math.max((elapsed - start) / span, 0), 1) : elapsed >= start ? 1 : 0;
|
|
106
|
+
path.style.strokeDashoffset = String(lengths[index] * (1 - easeStroke(progress)));
|
|
107
|
+
});
|
|
108
|
+
if (elapsed < cursor) frame = requestAnimationFrame(tick);
|
|
109
|
+
};
|
|
110
|
+
const observer = new IntersectionObserver(
|
|
111
|
+
([entry]) => {
|
|
112
|
+
if (!entry.isIntersecting) return;
|
|
113
|
+
observer.disconnect();
|
|
114
|
+
timer = window.setTimeout(() => {
|
|
115
|
+
frame = requestAnimationFrame(tick);
|
|
116
|
+
}, delay);
|
|
117
|
+
},
|
|
118
|
+
{ threshold: 0.1 }
|
|
119
|
+
);
|
|
120
|
+
observer.observe(svg);
|
|
121
|
+
return () => {
|
|
122
|
+
observer.disconnect();
|
|
123
|
+
window.clearTimeout(timer);
|
|
124
|
+
cancelAnimationFrame(frame);
|
|
125
|
+
};
|
|
126
|
+
}, [box, speed, delay, isStatic, strokesKey]);
|
|
127
|
+
return /* @__PURE__ */ jsx(
|
|
128
|
+
"svg",
|
|
129
|
+
{
|
|
130
|
+
ref: setRef,
|
|
131
|
+
role: "img",
|
|
132
|
+
viewBox: box,
|
|
133
|
+
"data-slot": "signature",
|
|
134
|
+
"data-ready": ready || void 0,
|
|
135
|
+
className: signatureVariants({ size, className }),
|
|
136
|
+
...props,
|
|
137
|
+
children
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
export {
|
|
142
|
+
Signature,
|
|
143
|
+
signatureVariants
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=signature.mjs.map
|