@thalavaisankar/atoms 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +24 -0
- package/README.md +142 -2
- package/THIRD_PARTY_NOTICES.md +246 -0
- package/dist/blocks/index.d.mts +2 -0
- package/dist/blocks/index.mjs +1 -0
- package/dist/blocks/index.mjs.map +1 -0
- package/dist/components/ui/accordion/accordion.mjs +194 -0
- package/dist/components/ui/accordion/accordion.mjs.map +1 -0
- package/dist/components/ui/accordion/index.mjs +15 -0
- package/dist/components/ui/accordion/index.mjs.map +1 -0
- package/dist/components/ui/activity-feed/activity-feed.mjs +287 -0
- package/dist/components/ui/activity-feed/activity-feed.mjs.map +1 -0
- package/dist/components/ui/activity-feed/index.mjs +39 -0
- package/dist/components/ui/activity-feed/index.mjs.map +1 -0
- package/dist/components/ui/alert/alert.mjs +128 -0
- package/dist/components/ui/alert/alert.mjs.map +1 -0
- package/dist/components/ui/alert/index.mjs +17 -0
- package/dist/components/ui/alert/index.mjs.map +1 -0
- package/dist/components/ui/animated-label/animated-label.mjs +89 -0
- package/dist/components/ui/animated-label/animated-label.mjs.map +1 -0
- package/dist/components/ui/animated-label/index.mjs +9 -0
- package/dist/components/ui/animated-label/index.mjs.map +1 -0
- package/dist/components/ui/animated-number/animated-number.mjs +101 -0
- package/dist/components/ui/animated-number/animated-number.mjs.map +1 -0
- package/dist/components/ui/animated-number/index.mjs +5 -0
- package/dist/components/ui/animated-number/index.mjs.map +1 -0
- package/dist/components/ui/avatar/avatar.mjs +130 -0
- package/dist/components/ui/avatar/avatar.mjs.map +1 -0
- package/dist/components/ui/avatar/index.mjs +17 -0
- package/dist/components/ui/avatar/index.mjs.map +1 -0
- package/dist/components/ui/avatar-group/avatar-group.mjs +49 -0
- package/dist/components/ui/avatar-group/avatar-group.mjs.map +1 -0
- package/dist/components/ui/avatar-group/index.mjs +5 -0
- package/dist/components/ui/avatar-group/index.mjs.map +1 -0
- package/dist/components/ui/badge/badge-motion.mjs +108 -0
- package/dist/components/ui/badge/badge-motion.mjs.map +1 -0
- package/dist/components/ui/badge/badge.mjs +314 -0
- package/dist/components/ui/badge/badge.mjs.map +1 -0
- package/dist/components/ui/badge/index.mjs +27 -0
- package/dist/components/ui/badge/index.mjs.map +1 -0
- package/dist/components/ui/badge/readable-ink.mjs +36 -0
- package/dist/components/ui/badge/readable-ink.mjs.map +1 -0
- package/dist/components/ui/badge-group/badge-group.mjs +132 -0
- package/dist/components/ui/badge-group/badge-group.mjs.map +1 -0
- package/dist/components/ui/badge-group/index.mjs +5 -0
- package/dist/components/ui/badge-group/index.mjs.map +1 -0
- package/dist/components/ui/breadcrumb/breadcrumb.mjs +108 -0
- package/dist/components/ui/breadcrumb/breadcrumb.mjs.map +1 -0
- package/dist/components/ui/breadcrumb/index.mjs +19 -0
- package/dist/components/ui/breadcrumb/index.mjs.map +1 -0
- package/dist/components/ui/button/button-variants.mjs +80 -0
- package/dist/components/ui/button/button-variants.mjs.map +1 -0
- package/dist/components/ui/button/button.mjs +74 -0
- package/dist/components/ui/button/button.mjs.map +1 -0
- package/dist/components/ui/button/index.mjs +17 -0
- package/dist/components/ui/button/index.mjs.map +1 -0
- package/dist/components/ui/button/social-button.mjs +45 -0
- package/dist/components/ui/button/social-button.mjs.map +1 -0
- package/dist/components/ui/button/social-logos.mjs +179 -0
- package/dist/components/ui/button/social-logos.mjs.map +1 -0
- package/dist/components/ui/button/split-button.mjs +72 -0
- package/dist/components/ui/button/split-button.mjs.map +1 -0
- package/dist/components/ui/button-group/button-group.mjs +58 -0
- package/dist/components/ui/button-group/button-group.mjs.map +1 -0
- package/dist/components/ui/button-group/index.mjs +11 -0
- package/dist/components/ui/button-group/index.mjs.map +1 -0
- package/dist/components/ui/card/card.mjs +131 -0
- package/dist/components/ui/card/card.mjs.map +1 -0
- package/dist/components/ui/card/index.mjs +23 -0
- package/dist/components/ui/card/index.mjs.map +1 -0
- package/dist/components/ui/chart/bar-list.mjs +87 -0
- package/dist/components/ui/chart/bar-list.mjs.map +1 -0
- package/dist/components/ui/chart/chart-colors.mjs +68 -0
- package/dist/components/ui/chart/chart-colors.mjs.map +1 -0
- package/dist/components/ui/chart/chart-geometry.mjs +152 -0
- package/dist/components/ui/chart/chart-geometry.mjs.map +1 -0
- package/dist/components/ui/chart/chart-specialized.mjs +194 -0
- package/dist/components/ui/chart/chart-specialized.mjs.map +1 -0
- package/dist/components/ui/chart/chart.mjs +648 -0
- package/dist/components/ui/chart/chart.mjs.map +1 -0
- package/dist/components/ui/chart/index.mjs +88 -0
- package/dist/components/ui/chart/index.mjs.map +1 -0
- package/dist/components/ui/chart/radial-meter.mjs +142 -0
- package/dist/components/ui/chart/radial-meter.mjs.map +1 -0
- package/dist/components/ui/chart/types.mjs +1 -0
- package/dist/components/ui/chart/types.mjs.map +1 -0
- package/dist/components/ui/checkbox/checkbox.mjs +183 -0
- package/dist/components/ui/checkbox/checkbox.mjs.map +1 -0
- package/dist/components/ui/checkbox/index.mjs +11 -0
- package/dist/components/ui/checkbox/index.mjs.map +1 -0
- package/dist/components/ui/checklist/checklist.mjs +353 -0
- package/dist/components/ui/checklist/checklist.mjs.map +1 -0
- package/dist/components/ui/checklist/index.mjs +33 -0
- package/dist/components/ui/checklist/index.mjs.map +1 -0
- package/dist/components/ui/chip/chip.mjs +202 -0
- package/dist/components/ui/chip/chip.mjs.map +1 -0
- package/dist/components/ui/chip/index.mjs +13 -0
- package/dist/components/ui/chip/index.mjs.map +1 -0
- package/dist/components/ui/chip-group/chip-group.mjs +204 -0
- package/dist/components/ui/chip-group/chip-group.mjs.map +1 -0
- package/dist/components/ui/chip-group/index.mjs +11 -0
- package/dist/components/ui/chip-group/index.mjs.map +1 -0
- package/dist/components/ui/code-snippet/code-highlighter.mjs +16 -0
- package/dist/components/ui/code-snippet/code-highlighter.mjs.map +1 -0
- package/dist/components/ui/code-snippet/code-snippet.mjs +437 -0
- package/dist/components/ui/code-snippet/code-snippet.mjs.map +1 -0
- package/dist/components/ui/code-snippet/index.mjs +17 -0
- package/dist/components/ui/code-snippet/index.mjs.map +1 -0
- package/dist/components/ui/code-snippet/labels.mjs +16 -0
- package/dist/components/ui/code-snippet/labels.mjs.map +1 -0
- package/dist/components/ui/code-snippet/tokenize.mjs +715 -0
- package/dist/components/ui/code-snippet/tokenize.mjs.map +1 -0
- package/dist/components/ui/code-snippet/types.mjs +1 -0
- package/dist/components/ui/code-snippet/types.mjs.map +1 -0
- package/dist/components/ui/collapsible/collapsible.mjs +85 -0
- package/dist/components/ui/collapsible/collapsible.mjs.map +1 -0
- package/dist/components/ui/collapsible/index.mjs +15 -0
- package/dist/components/ui/collapsible/index.mjs.map +1 -0
- package/dist/components/ui/color-picker/color-picker.mjs +852 -0
- package/dist/components/ui/color-picker/color-picker.mjs.map +1 -0
- package/dist/components/ui/color-picker/index.mjs +47 -0
- package/dist/components/ui/color-picker/index.mjs.map +1 -0
- package/dist/components/ui/combobox/combobox.mjs +745 -0
- package/dist/components/ui/combobox/combobox.mjs.map +1 -0
- package/dist/components/ui/combobox/index.mjs +27 -0
- package/dist/components/ui/combobox/index.mjs.map +1 -0
- package/dist/components/ui/command/command.mjs +439 -0
- package/dist/components/ui/command/command.mjs.map +1 -0
- package/dist/components/ui/command/index.mjs +31 -0
- package/dist/components/ui/command/index.mjs.map +1 -0
- package/dist/components/ui/compare-slider/compare-slider.mjs +335 -0
- package/dist/components/ui/compare-slider/compare-slider.mjs.map +1 -0
- package/dist/components/ui/compare-slider/index.mjs +17 -0
- package/dist/components/ui/compare-slider/index.mjs.map +1 -0
- package/dist/components/ui/context-menu/context-menu.mjs +184 -0
- package/dist/components/ui/context-menu/context-menu.mjs.map +1 -0
- package/dist/components/ui/context-menu/index.mjs +37 -0
- package/dist/components/ui/context-menu/index.mjs.map +1 -0
- package/dist/components/ui/data-table/active-filters.mjs +69 -0
- package/dist/components/ui/data-table/active-filters.mjs.map +1 -0
- package/dist/components/ui/data-table/body-row.mjs +118 -0
- package/dist/components/ui/data-table/body-row.mjs.map +1 -0
- package/dist/components/ui/data-table/cards.mjs +76 -0
- package/dist/components/ui/data-table/cards.mjs.map +1 -0
- package/dist/components/ui/data-table/data-table.mjs +680 -0
- package/dist/components/ui/data-table/data-table.mjs.map +1 -0
- package/dist/components/ui/data-table/empty.mjs +26 -0
- package/dist/components/ui/data-table/empty.mjs.map +1 -0
- package/dist/components/ui/data-table/expand.mjs +70 -0
- package/dist/components/ui/data-table/expand.mjs.map +1 -0
- package/dist/components/ui/data-table/faceted-filter.mjs +112 -0
- package/dist/components/ui/data-table/faceted-filter.mjs.map +1 -0
- package/dist/components/ui/data-table/features.mjs +96 -0
- package/dist/components/ui/data-table/features.mjs.map +1 -0
- package/dist/components/ui/data-table/grip.mjs +37 -0
- package/dist/components/ui/data-table/grip.mjs.map +1 -0
- package/dist/components/ui/data-table/header-cell.mjs +85 -0
- package/dist/components/ui/data-table/header-cell.mjs.map +1 -0
- package/dist/components/ui/data-table/index.mjs +55 -0
- package/dist/components/ui/data-table/index.mjs.map +1 -0
- package/dist/components/ui/data-table/labels.mjs +55 -0
- package/dist/components/ui/data-table/labels.mjs.map +1 -0
- package/dist/components/ui/data-table/load-more.mjs +56 -0
- package/dist/components/ui/data-table/load-more.mjs.map +1 -0
- package/dist/components/ui/data-table/move-item.mjs +11 -0
- package/dist/components/ui/data-table/move-item.mjs.map +1 -0
- package/dist/components/ui/data-table/persist.mjs +65 -0
- package/dist/components/ui/data-table/persist.mjs.map +1 -0
- package/dist/components/ui/data-table/selection-bar.mjs +51 -0
- package/dist/components/ui/data-table/selection-bar.mjs.map +1 -0
- package/dist/components/ui/data-table/tabs.mjs +48 -0
- package/dist/components/ui/data-table/tabs.mjs.map +1 -0
- package/dist/components/ui/data-table/toolbar.mjs +92 -0
- package/dist/components/ui/data-table/toolbar.mjs.map +1 -0
- package/dist/components/ui/data-table/use-reorder.mjs +239 -0
- package/dist/components/ui/data-table/use-reorder.mjs.map +1 -0
- package/dist/components/ui/data-table/use-reveal.mjs +24 -0
- package/dist/components/ui/data-table/use-reveal.mjs.map +1 -0
- package/dist/components/ui/data-table/use-table-state.mjs +38 -0
- package/dist/components/ui/data-table/use-table-state.mjs.map +1 -0
- package/dist/components/ui/data-table/view-options.mjs +66 -0
- package/dist/components/ui/data-table/view-options.mjs.map +1 -0
- package/dist/components/ui/date-picker/calendar.mjs +466 -0
- package/dist/components/ui/date-picker/calendar.mjs.map +1 -0
- package/dist/components/ui/date-picker/date-picker.mjs +366 -0
- package/dist/components/ui/date-picker/date-picker.mjs.map +1 -0
- package/dist/components/ui/date-picker/index.mjs +17 -0
- package/dist/components/ui/date-picker/index.mjs.map +1 -0
- package/dist/components/ui/date-picker/presets.mjs +49 -0
- package/dist/components/ui/date-picker/presets.mjs.map +1 -0
- package/dist/components/ui/description-list/description-list.mjs +40 -0
- package/dist/components/ui/description-list/description-list.mjs.map +1 -0
- package/dist/components/ui/description-list/index.mjs +15 -0
- package/dist/components/ui/description-list/index.mjs.map +1 -0
- package/dist/components/ui/dialog/dialog-stepper.mjs +23 -0
- package/dist/components/ui/dialog/dialog-stepper.mjs.map +1 -0
- package/dist/components/ui/dialog/dialog.mjs +343 -0
- package/dist/components/ui/dialog/dialog.mjs.map +1 -0
- package/dist/components/ui/dialog/focus-return.mjs +21 -0
- package/dist/components/ui/dialog/focus-return.mjs.map +1 -0
- package/dist/components/ui/dialog/index.mjs +33 -0
- package/dist/components/ui/dialog/index.mjs.map +1 -0
- package/dist/components/ui/divider/divider.mjs +130 -0
- package/dist/components/ui/divider/divider.mjs.map +1 -0
- package/dist/components/ui/divider/index.mjs +6 -0
- package/dist/components/ui/divider/index.mjs.map +1 -0
- package/dist/components/ui/dock/dock.mjs +444 -0
- package/dist/components/ui/dock/dock.mjs.map +1 -0
- package/dist/components/ui/dock/index.mjs +19 -0
- package/dist/components/ui/dock/index.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-actions.mjs +118 -0
- package/dist/components/ui/document-editor/block-actions.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-commands.mjs +182 -0
- package/dist/components/ui/document-editor/block-commands.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-handle.mjs +387 -0
- package/dist/components/ui/document-editor/block-handle.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-morph.mjs +95 -0
- package/dist/components/ui/document-editor/block-morph.mjs.map +1 -0
- package/dist/components/ui/document-editor/block-selection.mjs +81 -0
- package/dist/components/ui/document-editor/block-selection.mjs.map +1 -0
- package/dist/components/ui/document-editor/blocks.mjs +30 -0
- package/dist/components/ui/document-editor/blocks.mjs.map +1 -0
- package/dist/components/ui/document-editor/bubble-menu.mjs +120 -0
- package/dist/components/ui/document-editor/bubble-menu.mjs.map +1 -0
- package/dist/components/ui/document-editor/code-block.mjs +89 -0
- package/dist/components/ui/document-editor/code-block.mjs.map +1 -0
- package/dist/components/ui/document-editor/collaboration-types.mjs +9 -0
- package/dist/components/ui/document-editor/collaboration-types.mjs.map +1 -0
- package/dist/components/ui/document-editor/collaboration.mjs +198 -0
- package/dist/components/ui/document-editor/collaboration.mjs.map +1 -0
- package/dist/components/ui/document-editor/columns.mjs +52 -0
- package/dist/components/ui/document-editor/columns.mjs.map +1 -0
- package/dist/components/ui/document-editor/contents.mjs +60 -0
- package/dist/components/ui/document-editor/contents.mjs.map +1 -0
- package/dist/components/ui/document-editor/date-chip.mjs +115 -0
- package/dist/components/ui/document-editor/date-chip.mjs.map +1 -0
- package/dist/components/ui/document-editor/date-words.mjs +101 -0
- package/dist/components/ui/document-editor/date-words.mjs.map +1 -0
- package/dist/components/ui/document-editor/doc-labels.mjs +19 -0
- package/dist/components/ui/document-editor/doc-labels.mjs.map +1 -0
- package/dist/components/ui/document-editor/document-editor.mjs +496 -0
- package/dist/components/ui/document-editor/document-editor.mjs.map +1 -0
- package/dist/components/ui/document-editor/emoji-suggest.mjs +81 -0
- package/dist/components/ui/document-editor/emoji-suggest.mjs.map +1 -0
- package/dist/components/ui/document-editor/focus-mode.mjs +32 -0
- package/dist/components/ui/document-editor/focus-mode.mjs.map +1 -0
- package/dist/components/ui/document-editor/geometry.mjs +35 -0
- package/dist/components/ui/document-editor/geometry.mjs.map +1 -0
- package/dist/components/ui/document-editor/ghost-text.mjs +154 -0
- package/dist/components/ui/document-editor/ghost-text.mjs.map +1 -0
- package/dist/components/ui/document-editor/gliding-caret.mjs +118 -0
- package/dist/components/ui/document-editor/gliding-caret.mjs.map +1 -0
- package/dist/components/ui/document-editor/headings.mjs +64 -0
- package/dist/components/ui/document-editor/headings.mjs.map +1 -0
- package/dist/components/ui/document-editor/image.mjs +318 -0
- package/dist/components/ui/document-editor/image.mjs.map +1 -0
- package/dist/components/ui/document-editor/index.mjs +131 -0
- package/dist/components/ui/document-editor/index.mjs.map +1 -0
- package/dist/components/ui/document-editor/labels.mjs +96 -0
- package/dist/components/ui/document-editor/labels.mjs.map +1 -0
- package/dist/components/ui/document-editor/link-card.mjs +138 -0
- package/dist/components/ui/document-editor/link-card.mjs.map +1 -0
- package/dist/components/ui/document-editor/mentions.mjs +105 -0
- package/dist/components/ui/document-editor/mentions.mjs.map +1 -0
- package/dist/components/ui/document-editor/outline.mjs +138 -0
- package/dist/components/ui/document-editor/outline.mjs.map +1 -0
- package/dist/components/ui/document-editor/section-fold.mjs +124 -0
- package/dist/components/ui/document-editor/section-fold.mjs.map +1 -0
- package/dist/components/ui/document-editor/slash-command.mjs +210 -0
- package/dist/components/ui/document-editor/slash-command.mjs.map +1 -0
- package/dist/components/ui/document-editor/suggest-list.mjs +187 -0
- package/dist/components/ui/document-editor/suggest-list.mjs.map +1 -0
- package/dist/components/ui/document-editor/table.mjs +242 -0
- package/dist/components/ui/document-editor/table.mjs.map +1 -0
- package/dist/components/ui/document-editor/templates.mjs +66 -0
- package/dist/components/ui/document-editor/templates.mjs.map +1 -0
- package/dist/components/ui/document-editor/toggle.mjs +176 -0
- package/dist/components/ui/document-editor/toggle.mjs.map +1 -0
- package/dist/components/ui/document-editor/typography-rules.mjs +8 -0
- package/dist/components/ui/document-editor/typography-rules.mjs.map +1 -0
- package/dist/components/ui/document-editor/use-editor-value.mjs +34 -0
- package/dist/components/ui/document-editor/use-editor-value.mjs.map +1 -0
- package/dist/components/ui/drawer/drawer-nav.mjs +153 -0
- package/dist/components/ui/drawer/drawer-nav.mjs.map +1 -0
- package/dist/components/ui/drawer/drawer.mjs +334 -0
- package/dist/components/ui/drawer/drawer.mjs.map +1 -0
- package/dist/components/ui/drawer/index.mjs +37 -0
- package/dist/components/ui/drawer/index.mjs.map +1 -0
- package/dist/components/ui/drawer/use-swipe-to-close.mjs +77 -0
- package/dist/components/ui/drawer/use-swipe-to-close.mjs.map +1 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.mjs +567 -0
- package/dist/components/ui/dropdown-menu/dropdown-menu.mjs.map +1 -0
- package/dist/components/ui/dropdown-menu/index.mjs +43 -0
- package/dist/components/ui/dropdown-menu/index.mjs.map +1 -0
- package/dist/components/ui/editable-text/editable-text.mjs +148 -0
- package/dist/components/ui/editable-text/editable-text.mjs.map +1 -0
- package/dist/components/ui/editable-text/index.mjs +6 -0
- package/dist/components/ui/editable-text/index.mjs.map +1 -0
- package/dist/components/ui/emoji-picker/emoji-data.mjs +469 -0
- package/dist/components/ui/emoji-picker/emoji-data.mjs.map +1 -0
- package/dist/components/ui/emoji-picker/emoji-picker.mjs +464 -0
- package/dist/components/ui/emoji-picker/emoji-picker.mjs.map +1 -0
- package/dist/components/ui/emoji-picker/index.mjs +19 -0
- package/dist/components/ui/emoji-picker/index.mjs.map +1 -0
- package/dist/components/ui/empty-state/empty-state.mjs +110 -0
- package/dist/components/ui/empty-state/empty-state.mjs.map +1 -0
- package/dist/components/ui/empty-state/index.mjs +17 -0
- package/dist/components/ui/empty-state/index.mjs.map +1 -0
- package/dist/components/ui/event-calendar/calendar-math.mjs +256 -0
- package/dist/components/ui/event-calendar/calendar-math.mjs.map +1 -0
- package/dist/components/ui/event-calendar/context.mjs +51 -0
- package/dist/components/ui/event-calendar/context.mjs.map +1 -0
- package/dist/components/ui/event-calendar/editor.mjs +292 -0
- package/dist/components/ui/event-calendar/editor.mjs.map +1 -0
- package/dist/components/ui/event-calendar/event-block.mjs +55 -0
- package/dist/components/ui/event-calendar/event-block.mjs.map +1 -0
- package/dist/components/ui/event-calendar/event-calendar.mjs +438 -0
- package/dist/components/ui/event-calendar/event-calendar.mjs.map +1 -0
- package/dist/components/ui/event-calendar/event-keys.mjs +41 -0
- package/dist/components/ui/event-calendar/event-keys.mjs.map +1 -0
- package/dist/components/ui/event-calendar/index.mjs +37 -0
- package/dist/components/ui/event-calendar/index.mjs.map +1 -0
- package/dist/components/ui/event-calendar/month-grid.mjs +207 -0
- package/dist/components/ui/event-calendar/month-grid.mjs.map +1 -0
- package/dist/components/ui/event-calendar/narrow.mjs +193 -0
- package/dist/components/ui/event-calendar/narrow.mjs.map +1 -0
- package/dist/components/ui/event-calendar/time-grid.mjs +534 -0
- package/dist/components/ui/event-calendar/time-grid.mjs.map +1 -0
- package/dist/components/ui/expandable-search/expandable-search.mjs +174 -0
- package/dist/components/ui/expandable-search/expandable-search.mjs.map +1 -0
- package/dist/components/ui/expandable-search/index.mjs +6 -0
- package/dist/components/ui/expandable-search/index.mjs.map +1 -0
- package/dist/components/ui/field/field.mjs +444 -0
- package/dist/components/ui/field/field.mjs.map +1 -0
- package/dist/components/ui/field/index.mjs +21 -0
- package/dist/components/ui/field/index.mjs.map +1 -0
- package/dist/components/ui/file-card/file-card.mjs +198 -0
- package/dist/components/ui/file-card/file-card.mjs.map +1 -0
- package/dist/components/ui/file-card/file-icon.mjs +66 -0
- package/dist/components/ui/file-card/file-icon.mjs.map +1 -0
- package/dist/components/ui/file-card/file-types.mjs +70 -0
- package/dist/components/ui/file-card/file-types.mjs.map +1 -0
- package/dist/components/ui/file-card/index.mjs +32 -0
- package/dist/components/ui/file-card/index.mjs.map +1 -0
- package/dist/components/ui/file-preview/context.mjs +77 -0
- package/dist/components/ui/file-preview/context.mjs.map +1 -0
- package/dist/components/ui/file-preview/file-preview.mjs +865 -0
- package/dist/components/ui/file-preview/file-preview.mjs.map +1 -0
- package/dist/components/ui/file-preview/index.mjs +56 -0
- package/dist/components/ui/file-preview/index.mjs.map +1 -0
- package/dist/components/ui/file-preview/pdf.mjs +250 -0
- package/dist/components/ui/file-preview/pdf.mjs.map +1 -0
- package/dist/components/ui/file-preview/renderers.mjs +257 -0
- package/dist/components/ui/file-preview/renderers.mjs.map +1 -0
- package/dist/components/ui/file-upload/file-upload.mjs +633 -0
- package/dist/components/ui/file-upload/file-upload.mjs.map +1 -0
- package/dist/components/ui/file-upload/index.mjs +42 -0
- package/dist/components/ui/file-upload/index.mjs.map +1 -0
- package/dist/components/ui/file-upload/validate.mjs +111 -0
- package/dist/components/ui/file-upload/validate.mjs.map +1 -0
- package/dist/components/ui/flag/flag.mjs +39 -0
- package/dist/components/ui/flag/flag.mjs.map +1 -0
- package/dist/components/ui/flag/index.mjs +7 -0
- package/dist/components/ui/flag/index.mjs.map +1 -0
- package/dist/components/ui/floating-window/floating-window.mjs +255 -0
- package/dist/components/ui/floating-window/floating-window.mjs.map +1 -0
- package/dist/components/ui/floating-window/index.mjs +11 -0
- package/dist/components/ui/floating-window/index.mjs.map +1 -0
- package/dist/components/ui/form/form-section.mjs +87 -0
- package/dist/components/ui/form/form-section.mjs.map +1 -0
- package/dist/components/ui/form/form.mjs +205 -0
- package/dist/components/ui/form/form.mjs.map +1 -0
- package/dist/components/ui/form/index.mjs +29 -0
- package/dist/components/ui/form/index.mjs.map +1 -0
- package/dist/components/ui/globe/globe-data.mjs +9 -0
- package/dist/components/ui/globe/globe-data.mjs.map +1 -0
- package/dist/components/ui/globe/globe-math.mjs +269 -0
- package/dist/components/ui/globe/globe-math.mjs.map +1 -0
- package/dist/components/ui/globe/globe.mjs +719 -0
- package/dist/components/ui/globe/globe.mjs.map +1 -0
- package/dist/components/ui/globe/index.mjs +13 -0
- package/dist/components/ui/globe/index.mjs.map +1 -0
- package/dist/components/ui/highlight-match/highlight-children.mjs +13 -0
- package/dist/components/ui/highlight-match/highlight-children.mjs.map +1 -0
- package/dist/components/ui/highlight-match/highlight-match-variants.mjs +17 -0
- package/dist/components/ui/highlight-match/highlight-match-variants.mjs.map +1 -0
- package/dist/components/ui/highlight-match/highlight-match.mjs +37 -0
- package/dist/components/ui/highlight-match/highlight-match.mjs.map +1 -0
- package/dist/components/ui/highlight-match/index.mjs +15 -0
- package/dist/components/ui/highlight-match/index.mjs.map +1 -0
- package/dist/components/ui/highlight-match/match-ranges.mjs +50 -0
- package/dist/components/ui/highlight-match/match-ranges.mjs.map +1 -0
- package/dist/components/ui/histogram-slider/histogram-slider.mjs +83 -0
- package/dist/components/ui/histogram-slider/histogram-slider.mjs.map +1 -0
- package/dist/components/ui/histogram-slider/index.mjs +6 -0
- package/dist/components/ui/histogram-slider/index.mjs.map +1 -0
- package/dist/components/ui/hold-button/hold-button.mjs +258 -0
- package/dist/components/ui/hold-button/hold-button.mjs.map +1 -0
- package/dist/components/ui/hold-button/index.mjs +6 -0
- package/dist/components/ui/hold-button/index.mjs.map +1 -0
- package/dist/components/ui/hover-card/hover-card.mjs +111 -0
- package/dist/components/ui/hover-card/hover-card.mjs.map +1 -0
- package/dist/components/ui/hover-card/index.mjs +21 -0
- package/dist/components/ui/hover-card/index.mjs.map +1 -0
- package/dist/components/ui/ink-tray/index.mjs +29 -0
- package/dist/components/ui/ink-tray/index.mjs.map +1 -0
- package/dist/components/ui/ink-tray/ink-tray-art.mjs +68 -0
- package/dist/components/ui/ink-tray/ink-tray-art.mjs.map +1 -0
- package/dist/components/ui/ink-tray/ink-tray.mjs +350 -0
- package/dist/components/ui/ink-tray/ink-tray.mjs.map +1 -0
- package/dist/components/ui/input/index.mjs +41 -0
- package/dist/components/ui/input/index.mjs.map +1 -0
- package/dist/components/ui/input/input.mjs +268 -0
- package/dist/components/ui/input/input.mjs.map +1 -0
- package/dist/components/ui/input/number-input.mjs +272 -0
- package/dist/components/ui/input/number-input.mjs.map +1 -0
- package/dist/components/ui/input/password-input.mjs +49 -0
- package/dist/components/ui/input/password-input.mjs.map +1 -0
- package/dist/components/ui/input/phone-input-countries.mjs +216 -0
- package/dist/components/ui/input/phone-input-countries.mjs.map +1 -0
- package/dist/components/ui/input/phone-input.mjs +326 -0
- package/dist/components/ui/input/phone-input.mjs.map +1 -0
- package/dist/components/ui/input/use-controllable-state.mjs +24 -0
- package/dist/components/ui/input/use-controllable-state.mjs.map +1 -0
- package/dist/components/ui/input/use-hold-repeat.mjs +35 -0
- package/dist/components/ui/input/use-hold-repeat.mjs.map +1 -0
- package/dist/components/ui/input-group/index.mjs +11 -0
- package/dist/components/ui/input-group/index.mjs.map +1 -0
- package/dist/components/ui/input-group/input-group.mjs +78 -0
- package/dist/components/ui/input-group/input-group.mjs.map +1 -0
- package/dist/components/ui/island/index.mjs +23 -0
- package/dist/components/ui/island/index.mjs.map +1 -0
- package/dist/components/ui/island/island.mjs +328 -0
- package/dist/components/ui/island/island.mjs.map +1 -0
- package/dist/components/ui/kbd/index.mjs +6 -0
- package/dist/components/ui/kbd/index.mjs.map +1 -0
- package/dist/components/ui/kbd/kbd.mjs +73 -0
- package/dist/components/ui/kbd/kbd.mjs.map +1 -0
- package/dist/components/ui/keypad/index.mjs +23 -0
- package/dist/components/ui/keypad/index.mjs.map +1 -0
- package/dist/components/ui/keypad/keypad.mjs +345 -0
- package/dist/components/ui/keypad/keypad.mjs.map +1 -0
- package/dist/components/ui/label/index.mjs +7 -0
- package/dist/components/ui/label/index.mjs.map +1 -0
- package/dist/components/ui/label/label.mjs +117 -0
- package/dist/components/ui/label/label.mjs.map +1 -0
- package/dist/components/ui/lightbox/index.mjs +47 -0
- package/dist/components/ui/lightbox/index.mjs.map +1 -0
- package/dist/components/ui/lightbox/labels.mjs +23 -0
- package/dist/components/ui/lightbox/labels.mjs.map +1 -0
- package/dist/components/ui/lightbox/lightbox.mjs +1359 -0
- package/dist/components/ui/lightbox/lightbox.mjs.map +1 -0
- package/dist/components/ui/link/index.mjs +6 -0
- package/dist/components/ui/link/index.mjs.map +1 -0
- package/dist/components/ui/link/link.mjs +64 -0
- package/dist/components/ui/link/link.mjs.map +1 -0
- package/dist/components/ui/list/index.mjs +35 -0
- package/dist/components/ui/list/index.mjs.map +1 -0
- package/dist/components/ui/list/list.mjs +505 -0
- package/dist/components/ui/list/list.mjs.map +1 -0
- package/dist/components/ui/load-more/index.mjs +23 -0
- package/dist/components/ui/load-more/index.mjs.map +1 -0
- package/dist/components/ui/load-more/load-more.mjs +409 -0
- package/dist/components/ui/load-more/load-more.mjs.map +1 -0
- package/dist/components/ui/map/index.mjs +27 -0
- package/dist/components/ui/map/index.mjs.map +1 -0
- package/dist/components/ui/map/map-style.mjs +169 -0
- package/dist/components/ui/map/map-style.mjs.map +1 -0
- package/dist/components/ui/map/map.mjs +624 -0
- package/dist/components/ui/map/map.mjs.map +1 -0
- package/dist/components/ui/map-pin/index.mjs +6 -0
- package/dist/components/ui/map-pin/index.mjs.map +1 -0
- package/dist/components/ui/map-pin/map-pin.mjs +55 -0
- package/dist/components/ui/map-pin/map-pin.mjs.map +1 -0
- package/dist/components/ui/mention/index.mjs +29 -0
- package/dist/components/ui/mention/index.mjs.map +1 -0
- package/dist/components/ui/mention/mention.mjs +262 -0
- package/dist/components/ui/mention/mention.mjs.map +1 -0
- package/dist/components/ui/mention/split-mentions.mjs +24 -0
- package/dist/components/ui/mention/split-mentions.mjs.map +1 -0
- package/dist/components/ui/menubar/index.mjs +39 -0
- package/dist/components/ui/menubar/index.mjs.map +1 -0
- package/dist/components/ui/menubar/menubar.mjs +222 -0
- package/dist/components/ui/menubar/menubar.mjs.map +1 -0
- package/dist/components/ui/meter/index.mjs +21 -0
- package/dist/components/ui/meter/index.mjs.map +1 -0
- package/dist/components/ui/meter/meter.mjs +167 -0
- package/dist/components/ui/meter/meter.mjs.map +1 -0
- package/dist/components/ui/multi-select/index.mjs +25 -0
- package/dist/components/ui/multi-select/index.mjs.map +1 -0
- package/dist/components/ui/multi-select/multi-select.mjs +285 -0
- package/dist/components/ui/multi-select/multi-select.mjs.map +1 -0
- package/dist/components/ui/navigation-menu/index.mjs +41 -0
- package/dist/components/ui/navigation-menu/index.mjs.map +1 -0
- package/dist/components/ui/navigation-menu/navigation-menu.mjs +396 -0
- package/dist/components/ui/navigation-menu/navigation-menu.mjs.map +1 -0
- package/dist/components/ui/notebook-page/index.mjs +15 -0
- package/dist/components/ui/notebook-page/index.mjs.map +1 -0
- package/dist/components/ui/notebook-page/notebook-page.mjs +162 -0
- package/dist/components/ui/notebook-page/notebook-page.mjs.map +1 -0
- package/dist/components/ui/notification-inbox/index.mjs +47 -0
- package/dist/components/ui/notification-inbox/index.mjs.map +1 -0
- package/dist/components/ui/notification-inbox/notification-inbox.mjs +422 -0
- package/dist/components/ui/notification-inbox/notification-inbox.mjs.map +1 -0
- package/dist/components/ui/number-field/index.mjs +24 -0
- package/dist/components/ui/number-field/index.mjs.map +1 -0
- package/dist/components/ui/number-field/number-field.mjs +460 -0
- package/dist/components/ui/number-field/number-field.mjs.map +1 -0
- package/dist/components/ui/number-field/number-format.mjs +48 -0
- package/dist/components/ui/number-field/number-format.mjs.map +1 -0
- package/dist/components/ui/otp-input/index.mjs +9 -0
- package/dist/components/ui/otp-input/index.mjs.map +1 -0
- package/dist/components/ui/otp-input/otp-input.mjs +285 -0
- package/dist/components/ui/otp-input/otp-input.mjs.map +1 -0
- package/dist/components/ui/pager/index.mjs +7 -0
- package/dist/components/ui/pager/index.mjs.map +1 -0
- package/dist/components/ui/pager/pager.mjs +86 -0
- package/dist/components/ui/pager/pager.mjs.map +1 -0
- package/dist/components/ui/pagination/index.mjs +23 -0
- package/dist/components/ui/pagination/index.mjs.map +1 -0
- package/dist/components/ui/pagination/pagination.mjs +210 -0
- package/dist/components/ui/pagination/pagination.mjs.map +1 -0
- package/dist/components/ui/password-strength/index.mjs +21 -0
- package/dist/components/ui/password-strength/index.mjs.map +1 -0
- package/dist/components/ui/password-strength/password-rules.mjs +25 -0
- package/dist/components/ui/password-strength/password-rules.mjs.map +1 -0
- package/dist/components/ui/password-strength/password-strength.mjs +125 -0
- package/dist/components/ui/password-strength/password-strength.mjs.map +1 -0
- package/dist/components/ui/popover/index.mjs +31 -0
- package/dist/components/ui/popover/index.mjs.map +1 -0
- package/dist/components/ui/popover/popover.mjs +574 -0
- package/dist/components/ui/popover/popover.mjs.map +1 -0
- package/dist/components/ui/progress/index.mjs +15 -0
- package/dist/components/ui/progress/index.mjs.map +1 -0
- package/dist/components/ui/progress/progress.mjs +224 -0
- package/dist/components/ui/progress/progress.mjs.map +1 -0
- package/dist/components/ui/prose/index.mjs +6 -0
- package/dist/components/ui/prose/index.mjs.map +1 -0
- package/dist/components/ui/prose/prose.mjs +89 -0
- package/dist/components/ui/prose/prose.mjs.map +1 -0
- package/dist/components/ui/radio-group/index.mjs +15 -0
- package/dist/components/ui/radio-group/index.mjs.map +1 -0
- package/dist/components/ui/radio-group/radio-group.mjs +88 -0
- package/dist/components/ui/radio-group/radio-group.mjs.map +1 -0
- package/dist/components/ui/rating/index.mjs +6 -0
- package/dist/components/ui/rating/index.mjs.map +1 -0
- package/dist/components/ui/rating/rating.mjs +119 -0
- package/dist/components/ui/rating/rating.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/bubble-menu.mjs +120 -0
- package/dist/components/ui/rich-text-editor/bubble-menu.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/image-links.mjs +63 -0
- package/dist/components/ui/rich-text-editor/image-links.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/index.mjs +37 -0
- package/dist/components/ui/rich-text-editor/index.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/labels.mjs +27 -0
- package/dist/components/ui/rich-text-editor/labels.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/rich-text-editor.mjs +149 -0
- package/dist/components/ui/rich-text-editor/rich-text-editor.mjs.map +1 -0
- package/dist/components/ui/rich-text-editor/toolbar.mjs +325 -0
- package/dist/components/ui/rich-text-editor/toolbar.mjs.map +1 -0
- package/dist/components/ui/save-bar/index.mjs +13 -0
- package/dist/components/ui/save-bar/index.mjs.map +1 -0
- package/dist/components/ui/save-bar/save-bar.mjs +59 -0
- package/dist/components/ui/save-bar/save-bar.mjs.map +1 -0
- package/dist/components/ui/scroll-area/index.mjs +6 -0
- package/dist/components/ui/scroll-area/index.mjs.map +1 -0
- package/dist/components/ui/scroll-area/scroll-area.mjs +148 -0
- package/dist/components/ui/scroll-area/scroll-area.mjs.map +1 -0
- package/dist/components/ui/scroll-area/use-drag-scroll.mjs +134 -0
- package/dist/components/ui/scroll-area/use-drag-scroll.mjs.map +1 -0
- package/dist/components/ui/select/index.mjs +23 -0
- package/dist/components/ui/select/index.mjs.map +1 -0
- package/dist/components/ui/select/select.mjs +216 -0
- package/dist/components/ui/select/select.mjs.map +1 -0
- package/dist/components/ui/sheet/index.mjs +23 -0
- package/dist/components/ui/sheet/index.mjs.map +1 -0
- package/dist/components/ui/sheet/sheet.mjs +292 -0
- package/dist/components/ui/sheet/sheet.mjs.map +1 -0
- package/dist/components/ui/sidebar/index.mjs +122 -0
- package/dist/components/ui/sidebar/index.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-group.mjs +75 -0
- package/dist/components/ui/sidebar/sidebar-group.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-item.mjs +199 -0
- package/dist/components/ui/sidebar/sidebar-item.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-panels.mjs +182 -0
- package/dist/components/ui/sidebar/sidebar-panels.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-peek.mjs +324 -0
- package/dist/components/ui/sidebar/sidebar-peek.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-rich.mjs +65 -0
- package/dist/components/ui/sidebar/sidebar-rich.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar-tree.mjs +224 -0
- package/dist/components/ui/sidebar/sidebar-tree.mjs.map +1 -0
- package/dist/components/ui/sidebar/sidebar.mjs +205 -0
- package/dist/components/ui/sidebar/sidebar.mjs.map +1 -0
- package/dist/components/ui/sidebar/variants.mjs +396 -0
- package/dist/components/ui/sidebar/variants.mjs.map +1 -0
- package/dist/components/ui/signature/index.mjs +6 -0
- package/dist/components/ui/signature/index.mjs.map +1 -0
- package/dist/components/ui/signature/signature.mjs +145 -0
- package/dist/components/ui/signature/signature.mjs.map +1 -0
- package/dist/components/ui/signature-pad/index.mjs +19 -0
- package/dist/components/ui/signature-pad/index.mjs.map +1 -0
- package/dist/components/ui/signature-pad/signature-pad.mjs +210 -0
- package/dist/components/ui/signature-pad/signature-pad.mjs.map +1 -0
- package/dist/components/ui/signature-pad/strokes.mjs +68 -0
- package/dist/components/ui/signature-pad/strokes.mjs.map +1 -0
- package/dist/components/ui/skeleton/index.mjs +9 -0
- package/dist/components/ui/skeleton/index.mjs.map +1 -0
- package/dist/components/ui/skeleton/skeleton.mjs +58 -0
- package/dist/components/ui/skeleton/skeleton.mjs.map +1 -0
- package/dist/components/ui/slide/index.mjs +25 -0
- package/dist/components/ui/slide/index.mjs.map +1 -0
- package/dist/components/ui/slide/slide.mjs +159 -0
- package/dist/components/ui/slide/slide.mjs.map +1 -0
- package/dist/components/ui/slider/index.mjs +21 -0
- package/dist/components/ui/slider/index.mjs.map +1 -0
- package/dist/components/ui/slider/slider-input.mjs +449 -0
- package/dist/components/ui/slider/slider-input.mjs.map +1 -0
- package/dist/components/ui/slider/slider.mjs +235 -0
- package/dist/components/ui/slider/slider.mjs.map +1 -0
- package/dist/components/ui/slides/index.mjs +31 -0
- package/dist/components/ui/slides/index.mjs.map +1 -0
- package/dist/components/ui/slides/slides.mjs +890 -0
- package/dist/components/ui/slides/slides.mjs.map +1 -0
- package/dist/components/ui/smooth-anchors/index.mjs +17 -0
- package/dist/components/ui/smooth-anchors/index.mjs.map +1 -0
- package/dist/components/ui/smooth-anchors/smooth-anchors.mjs +75 -0
- package/dist/components/ui/smooth-anchors/smooth-anchors.mjs.map +1 -0
- package/dist/components/ui/smooth-anchors/smooth-scroll.mjs +87 -0
- package/dist/components/ui/smooth-anchors/smooth-scroll.mjs.map +1 -0
- package/dist/components/ui/spinner/index.mjs +6 -0
- package/dist/components/ui/spinner/index.mjs.map +1 -0
- package/dist/components/ui/spinner/spinner.mjs +49 -0
- package/dist/components/ui/spinner/spinner.mjs.map +1 -0
- package/dist/components/ui/stat/index.mjs +29 -0
- package/dist/components/ui/stat/index.mjs.map +1 -0
- package/dist/components/ui/stat/stat.mjs +226 -0
- package/dist/components/ui/stat/stat.mjs.map +1 -0
- package/dist/components/ui/status-bar/index.mjs +17 -0
- package/dist/components/ui/status-bar/index.mjs.map +1 -0
- package/dist/components/ui/status-bar/status-bar.mjs +96 -0
- package/dist/components/ui/status-bar/status-bar.mjs.map +1 -0
- package/dist/components/ui/stepper/index.mjs +25 -0
- package/dist/components/ui/stepper/index.mjs.map +1 -0
- package/dist/components/ui/stepper/stepper.mjs +235 -0
- package/dist/components/ui/stepper/stepper.mjs.map +1 -0
- package/dist/components/ui/steps/index.mjs +9 -0
- package/dist/components/ui/steps/index.mjs.map +1 -0
- package/dist/components/ui/steps/steps.mjs +70 -0
- package/dist/components/ui/steps/steps.mjs.map +1 -0
- package/dist/components/ui/swatch-grid/index.mjs +7 -0
- package/dist/components/ui/swatch-grid/index.mjs.map +1 -0
- package/dist/components/ui/swatch-grid/swatch-grid.mjs +110 -0
- package/dist/components/ui/swatch-grid/swatch-grid.mjs.map +1 -0
- package/dist/components/ui/switch/index.mjs +7 -0
- package/dist/components/ui/switch/index.mjs.map +1 -0
- package/dist/components/ui/switch/switch.mjs +79 -0
- package/dist/components/ui/switch/switch.mjs.map +1 -0
- package/dist/components/ui/tab-strip/index.mjs +13 -0
- package/dist/components/ui/tab-strip/index.mjs.map +1 -0
- package/dist/components/ui/tab-strip/tab-strip.mjs +244 -0
- package/dist/components/ui/tab-strip/tab-strip.mjs.map +1 -0
- package/dist/components/ui/table/index.mjs +27 -0
- package/dist/components/ui/table/index.mjs.map +1 -0
- package/dist/components/ui/table/table.mjs +290 -0
- package/dist/components/ui/table/table.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/index.mjs +20 -0
- package/dist/components/ui/table-of-contents/index.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/scroll-spy.mjs +60 -0
- package/dist/components/ui/table-of-contents/scroll-spy.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/table-of-contents.mjs +371 -0
- package/dist/components/ui/table-of-contents/table-of-contents.mjs.map +1 -0
- package/dist/components/ui/table-of-contents/use-headings.mjs +40 -0
- package/dist/components/ui/table-of-contents/use-headings.mjs.map +1 -0
- package/dist/components/ui/tablet-frame/index.mjs +7 -0
- package/dist/components/ui/tablet-frame/index.mjs.map +1 -0
- package/dist/components/ui/tablet-frame/tablet-frame.mjs +48 -0
- package/dist/components/ui/tablet-frame/tablet-frame.mjs.map +1 -0
- package/dist/components/ui/tabs/index.mjs +25 -0
- package/dist/components/ui/tabs/index.mjs.map +1 -0
- package/dist/components/ui/tabs/tabs.mjs +382 -0
- package/dist/components/ui/tabs/tabs.mjs.map +1 -0
- package/dist/components/ui/tabs/use-tabs-indicator.mjs +90 -0
- package/dist/components/ui/tabs/use-tabs-indicator.mjs.map +1 -0
- package/dist/components/ui/tags-input/index.mjs +9 -0
- package/dist/components/ui/tags-input/index.mjs.map +1 -0
- package/dist/components/ui/tags-input/split.mjs +38 -0
- package/dist/components/ui/tags-input/split.mjs.map +1 -0
- package/dist/components/ui/tags-input/tags-input.mjs +328 -0
- package/dist/components/ui/tags-input/tags-input.mjs.map +1 -0
- package/dist/components/ui/terminal/index.mjs +41 -0
- package/dist/components/ui/terminal/index.mjs.map +1 -0
- package/dist/components/ui/terminal/terminal.mjs +287 -0
- package/dist/components/ui/terminal/terminal.mjs.map +1 -0
- package/dist/components/ui/textarea/index.mjs +21 -0
- package/dist/components/ui/textarea/index.mjs.map +1 -0
- package/dist/components/ui/textarea/textarea.mjs +244 -0
- package/dist/components/ui/textarea/textarea.mjs.map +1 -0
- package/dist/components/ui/toast/index.mjs +19 -0
- package/dist/components/ui/toast/index.mjs.map +1 -0
- package/dist/components/ui/toast/store.mjs +96 -0
- package/dist/components/ui/toast/store.mjs.map +1 -0
- package/dist/components/ui/toast/toast.mjs +395 -0
- package/dist/components/ui/toast/toast.mjs.map +1 -0
- package/dist/components/ui/toggle/index.mjs +13 -0
- package/dist/components/ui/toggle/index.mjs.map +1 -0
- package/dist/components/ui/toggle/toggle.mjs +123 -0
- package/dist/components/ui/toggle/toggle.mjs.map +1 -0
- package/dist/components/ui/toggle-group/index.mjs +11 -0
- package/dist/components/ui/toggle-group/index.mjs.map +1 -0
- package/dist/components/ui/toggle-group/toggle-group.mjs +243 -0
- package/dist/components/ui/toggle-group/toggle-group.mjs.map +1 -0
- package/dist/components/ui/toggletip/index.mjs +6 -0
- package/dist/components/ui/toggletip/index.mjs.map +1 -0
- package/dist/components/ui/toggletip/toggletip.mjs +95 -0
- package/dist/components/ui/toggletip/toggletip.mjs.map +1 -0
- package/dist/components/ui/toolbar/index.mjs +21 -0
- package/dist/components/ui/toolbar/index.mjs.map +1 -0
- package/dist/components/ui/toolbar/toolbar.mjs +130 -0
- package/dist/components/ui/toolbar/toolbar.mjs.map +1 -0
- package/dist/components/ui/tooltip/index.mjs +29 -0
- package/dist/components/ui/tooltip/index.mjs.map +1 -0
- package/dist/components/ui/tooltip/tooltip.mjs +640 -0
- package/dist/components/ui/tooltip/tooltip.mjs.map +1 -0
- package/dist/components/ui/tree/index.mjs +11 -0
- package/dist/components/ui/tree/index.mjs.map +1 -0
- package/dist/components/ui/tree/tree.mjs +450 -0
- package/dist/components/ui/tree/tree.mjs.map +1 -0
- package/dist/index.d.mts +19332 -0
- package/dist/index.mjs +155 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/color.mjs +78 -0
- package/dist/lib/color.mjs.map +1 -0
- package/dist/lib/create-context.mjs +31 -0
- package/dist/lib/create-context.mjs.map +1 -0
- package/dist/lib/date.mjs +116 -0
- package/dist/lib/date.mjs.map +1 -0
- package/dist/lib/density.mjs +79 -0
- package/dist/lib/density.mjs.map +1 -0
- package/dist/lib/field-context.mjs +13 -0
- package/dist/lib/field-context.mjs.map +1 -0
- package/dist/lib/filter.mjs +28 -0
- package/dist/lib/filter.mjs.map +1 -0
- package/dist/lib/gesture.mjs +38 -0
- package/dist/lib/gesture.mjs.map +1 -0
- package/dist/lib/hit-area.mjs +14 -0
- package/dist/lib/hit-area.mjs.map +1 -0
- package/dist/lib/labels.mjs +27 -0
- package/dist/lib/labels.mjs.map +1 -0
- package/dist/lib/morph-box.mjs +56 -0
- package/dist/lib/morph-box.mjs.map +1 -0
- package/dist/lib/motion.mjs +70 -0
- package/dist/lib/motion.mjs.map +1 -0
- package/dist/lib/pulse.mjs +69 -0
- package/dist/lib/pulse.mjs.map +1 -0
- package/dist/lib/roving-focus.mjs +74 -0
- package/dist/lib/roving-focus.mjs.map +1 -0
- package/dist/lib/tv.mjs +11 -0
- package/dist/lib/tv.mjs.map +1 -0
- package/dist/lib/utils.mjs +82 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/dist/styles.css +2 -0
- package/package.json +133 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/input/use-hold-repeat.ts"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\n\nimport { duration } from \"../../../lib/motion.mjs\"\n\n/** Press-and-hold: the first repeat waits a slow beat, then the action ticks on a third of a fast one. */\nconst HOLD_DELAY = duration.slow\nconst HOLD_REPEAT = Math.round(duration.fast / 3)\n\n/**\n * The repeat behind a stepper button. `start(direction)` runs the action once at once, then again\n * after a slow beat and on every short tick until `stop()`. Each tick calls the latest action, so it\n * steps from the fresh value. Timers are cleared on unmount.\n */\nexport function useHoldRepeat(action: (direction: 1 | -1) => void) {\n const latest = React.useRef(action)\n React.useEffect(() => {\n latest.current = action\n })\n const timer = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n\n const stop = React.useCallback(() => {\n if (timer.current !== null) {\n clearTimeout(timer.current)\n clearInterval(timer.current)\n timer.current = null\n }\n }, [])\n React.useEffect(() => stop, [stop])\n\n const start = React.useCallback(\n (direction: 1 | -1) => {\n stop()\n latest.current(direction)\n timer.current = setTimeout(() => {\n timer.current = setInterval(() => latest.current(direction), HOLD_REPEAT)\n }, HOLD_DELAY)\n },\n [stop],\n )\n\n return { start, stop }\n}\n"],"mappings":";AAEA,YAAY,WAAW;AAEvB,SAAS,gBAAgB;AAGzB,MAAM,aAAa,SAAS;AAC5B,MAAM,cAAc,KAAK,MAAM,SAAS,OAAO,CAAC;AAOzC,SAAS,cAAc,QAAqC;AACjE,QAAM,SAAS,MAAM,OAAO,MAAM;AAClC,QAAM,UAAU,MAAM;AACpB,WAAO,UAAU;AAAA,EACnB,CAAC;AACD,QAAM,QAAQ,MAAM,OAA6C,IAAI;AAErE,QAAM,OAAO,MAAM,YAAY,MAAM;AACnC,QAAI,MAAM,YAAY,MAAM;AAC1B,mBAAa,MAAM,OAAO;AAC1B,oBAAc,MAAM,OAAO;AAC3B,YAAM,UAAU;AAAA,IAClB;AAAA,EACF,GAAG,CAAC,CAAC;AACL,QAAM,UAAU,MAAM,MAAM,CAAC,IAAI,CAAC;AAElC,QAAM,QAAQ,MAAM;AAAA,IAClB,CAAC,cAAsB;AACrB,WAAK;AACL,aAAO,QAAQ,SAAS;AACxB,YAAM,UAAU,WAAW,MAAM;AAC/B,cAAM,UAAU,YAAY,MAAM,OAAO,QAAQ,SAAS,GAAG,WAAW;AAAA,MAC1E,GAAG,UAAU;AAAA,IACf;AAAA,IACA,CAAC,IAAI;AAAA,EACP;AAEA,SAAO,EAAE,OAAO,KAAK;AACvB;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/input-group/index.ts"],"sourcesContent":["export {\n InputGroup,\n InputGroupAddon,\n inputGroupVariants,\n type InputGroupProps,\n type InputGroupAddonProps,\n} from \"./input-group.mjs\"\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;","names":[]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { createContext } from "../../../lib/create-context.mjs";
|
|
4
|
+
import { ControlSizeProvider, useControlSize } from "../../../lib/density.mjs";
|
|
5
|
+
import { useFieldContext } from "../../../lib/field-context.mjs";
|
|
6
|
+
import { tv } from "../../../lib/tv.mjs";
|
|
7
|
+
const inputGroupVariants = tv({
|
|
8
|
+
slots: {
|
|
9
|
+
root: [
|
|
10
|
+
"flex w-full items-stretch overflow-hidden border bg-[var(--surface,var(--background))] transition-[border-color,box-shadow] duration-fast ease-out",
|
|
11
|
+
"[&_[data-slot=input-root]]:h-auto [&_[data-slot=input-root]]:min-w-0 [&_[data-slot=input-root]]:w-auto [&_[data-slot=input-root]]:flex-1 [&_[data-slot=input-root]]:rounded-none [&_[data-slot=input-root]]:border-0 [&_[data-slot=input-root]]:bg-transparent [&_[data-slot=input-root]:focus-within]:[box-shadow:none]",
|
|
12
|
+
"[&_[data-slot=select-trigger]]:h-auto [&_[data-slot=select-trigger]]:w-auto [&_[data-slot=select-trigger]]:shrink-0 [&_[data-slot=select-trigger]]:rounded-none [&_[data-slot=select-trigger]]:border-0 [&_[data-slot=select-trigger]]:bg-transparent [&_[data-slot=select-trigger]]:shadow-none [&_[data-slot=select-trigger]]:focus:ring-0 [&_[data-slot=select-trigger]]:focus:border-transparent [&_[data-slot=select-trigger]]:active:scale-100",
|
|
13
|
+
"[&_[data-slot=button]]:h-auto [&_[data-slot=button]]:rounded-none [&_[data-slot=button]]:shadow-none [&_[data-slot=button]]:focus-visible:ring-0 [&_[data-slot=button]]:focus-visible:ring-offset-0 [&_[data-slot=button]]:active:scale-100",
|
|
14
|
+
"[&>*:not(:first-child)]:!border-l [&>*:not(:first-child)]:border-input"
|
|
15
|
+
],
|
|
16
|
+
addon: [
|
|
17
|
+
"flex shrink-0 items-center self-stretch bg-[var(--surface,var(--background))] text-muted-foreground select-none whitespace-nowrap font-medium",
|
|
18
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
variants: {
|
|
22
|
+
size: {
|
|
23
|
+
sm: {
|
|
24
|
+
root: "h-control-sm rounded-md text-sm",
|
|
25
|
+
addon: "gap-1 px-2.5 text-xs [&_svg:not([class*='size-'])]:size-[15px]"
|
|
26
|
+
},
|
|
27
|
+
md: {
|
|
28
|
+
root: "h-control-md rounded-[calc(var(--radius)*0.875)] text-sm",
|
|
29
|
+
addon: "gap-1.5 px-3 text-xs [&_svg:not([class*='size-'])]:size-4"
|
|
30
|
+
},
|
|
31
|
+
lg: {
|
|
32
|
+
root: "h-control-lg rounded-lg text-sm pointer-coarse:text-base",
|
|
33
|
+
addon: "gap-1.5 px-3.5 text-sm [&_svg:not([class*='size-'])]:size-[18px]"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
hasError: {
|
|
37
|
+
true: { root: "border-destructive focus-within:border-destructive focus-within:destructive-ring" },
|
|
38
|
+
false: { root: "border-input focus-within:border-focus focus-within:focus-ring" }
|
|
39
|
+
},
|
|
40
|
+
disabled: {
|
|
41
|
+
true: { root: "opacity-50 pointer-events-none select-none" },
|
|
42
|
+
false: {}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
defaultVariants: { size: "sm", hasError: false, disabled: false }
|
|
46
|
+
});
|
|
47
|
+
const [InputGroupProvider, useInputGroupContext] = createContext("InputGroup");
|
|
48
|
+
function InputGroup({ className, size, density, hasError, disabled, children, ...props }) {
|
|
49
|
+
const field = useFieldContext();
|
|
50
|
+
const resolvedSize = useControlSize(size, density);
|
|
51
|
+
const isError = hasError ?? field?.hasError ?? false;
|
|
52
|
+
const isDisabled = disabled ?? field?.disabled ?? false;
|
|
53
|
+
const slots = inputGroupVariants({ size: resolvedSize, hasError: isError, disabled: isDisabled });
|
|
54
|
+
return /* @__PURE__ */ jsx(InputGroupProvider, { size: resolvedSize, children: /* @__PURE__ */ jsx(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
role: "group",
|
|
58
|
+
"data-slot": "input-group",
|
|
59
|
+
"data-control-size": resolvedSize,
|
|
60
|
+
"data-error": isError || void 0,
|
|
61
|
+
"data-disabled": isDisabled || void 0,
|
|
62
|
+
className: slots.root({ className }),
|
|
63
|
+
...props,
|
|
64
|
+
children: /* @__PURE__ */ jsx(ControlSizeProvider, { size: resolvedSize, children })
|
|
65
|
+
}
|
|
66
|
+
) });
|
|
67
|
+
}
|
|
68
|
+
function InputGroupAddon({ className, ...props }) {
|
|
69
|
+
const { size } = useInputGroupContext("InputGroupAddon");
|
|
70
|
+
const slots = inputGroupVariants({ size });
|
|
71
|
+
return /* @__PURE__ */ jsx("span", { "data-slot": "input-group-addon", className: slots.addon({ className }), ...props });
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
InputGroup,
|
|
75
|
+
InputGroupAddon,
|
|
76
|
+
inputGroupVariants
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=input-group.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/input-group/input-group.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\n\nimport { createContext } from \"../../../lib/create-context.mjs\"\nimport { ControlSizeProvider, useControlSize, type ControlSize, type Density } from \"../../../lib/density.mjs\"\nimport { useFieldContext } from \"../../../lib/field-context.mjs\"\nimport { tv } from \"../../../lib/tv.mjs\"\n\n/**\n * One bordered row that joins several controls. The group owns the border, corners, fill and the\n * single focus ring; each known segment (an InputRoot, a Select trigger, a fused icon Button) is\n * stripped of its own frame, and every seam is redrawn as one 1px divider.\n */\nexport const inputGroupVariants = tv({\n slots: {\n root: [\n \"flex w-full items-stretch overflow-hidden border bg-[var(--surface,var(--background))] transition-[border-color,box-shadow] duration-fast ease-out\",\n \"[&_[data-slot=input-root]]:h-auto [&_[data-slot=input-root]]:min-w-0 [&_[data-slot=input-root]]:w-auto [&_[data-slot=input-root]]:flex-1 [&_[data-slot=input-root]]:rounded-none [&_[data-slot=input-root]]:border-0 [&_[data-slot=input-root]]:bg-transparent [&_[data-slot=input-root]:focus-within]:[box-shadow:none]\",\n \"[&_[data-slot=select-trigger]]:h-auto [&_[data-slot=select-trigger]]:w-auto [&_[data-slot=select-trigger]]:shrink-0 [&_[data-slot=select-trigger]]:rounded-none [&_[data-slot=select-trigger]]:border-0 [&_[data-slot=select-trigger]]:bg-transparent [&_[data-slot=select-trigger]]:shadow-none [&_[data-slot=select-trigger]]:focus:ring-0 [&_[data-slot=select-trigger]]:focus:border-transparent [&_[data-slot=select-trigger]]:active:scale-100\",\n \"[&_[data-slot=button]]:h-auto [&_[data-slot=button]]:rounded-none [&_[data-slot=button]]:shadow-none [&_[data-slot=button]]:focus-visible:ring-0 [&_[data-slot=button]]:focus-visible:ring-offset-0 [&_[data-slot=button]]:active:scale-100\",\n \"[&>*:not(:first-child)]:!border-l [&>*:not(:first-child)]:border-input\",\n ],\n addon: [\n \"flex shrink-0 items-center self-stretch bg-[var(--surface,var(--background))] text-muted-foreground select-none whitespace-nowrap font-medium\",\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0\",\n ],\n },\n variants: {\n size: {\n sm: {\n root: \"h-control-sm rounded-md text-sm\",\n addon: \"gap-1 px-2.5 text-xs [&_svg:not([class*='size-'])]:size-[15px]\",\n },\n md: {\n root: \"h-control-md rounded-[calc(var(--radius)*0.875)] text-sm\",\n addon: \"gap-1.5 px-3 text-xs [&_svg:not([class*='size-'])]:size-4\",\n },\n lg: {\n root: \"h-control-lg rounded-lg text-sm pointer-coarse:text-base\",\n addon: \"gap-1.5 px-3.5 text-sm [&_svg:not([class*='size-'])]:size-[18px]\",\n },\n },\n hasError: {\n true: { root: \"border-destructive focus-within:border-destructive focus-within:destructive-ring\" },\n false: { root: \"border-input focus-within:border-focus focus-within:focus-ring\" },\n },\n disabled: {\n true: { root: \"opacity-50 pointer-events-none select-none\" },\n false: {},\n },\n },\n defaultVariants: { size: \"sm\", hasError: false, disabled: false },\n})\n\nconst [InputGroupProvider, useInputGroupContext] = createContext<{ size: ControlSize }>(\"InputGroup\")\n\nexport interface InputGroupProps extends React.ComponentProps<\"div\"> {\n /** Height 32, 36 or 40px, imposed on every segment. Unset, it comes from a container or density. */\n size?: ControlSize\n /** Only picks the default size: compact is sm, comfortable is md. An explicit size wins. */\n density?: Density\n /** Destructive border and ring. Inherited from a surrounding Field when unset. */\n hasError?: boolean\n /** Dims and locks the row. Inherited from a surrounding Field; also disable the inner control. */\n disabled?: boolean\n}\n\nexport function InputGroup({ className, size, density, hasError, disabled, children, ...props }: InputGroupProps) {\n const field = useFieldContext()\n const resolvedSize = useControlSize(size, density)\n const isError = hasError ?? field?.hasError ?? false\n const isDisabled = disabled ?? field?.disabled ?? false\n const slots = inputGroupVariants({ size: resolvedSize, hasError: isError, disabled: isDisabled })\n\n return (\n <InputGroupProvider size={resolvedSize}>\n <div\n role=\"group\"\n data-slot=\"input-group\"\n data-control-size={resolvedSize}\n data-error={isError || undefined}\n data-disabled={isDisabled || undefined}\n className={slots.root({ className })}\n {...props}\n >\n {/* Every segment inside takes the group's height, so none of them needs a size. */}\n <ControlSizeProvider size={resolvedSize}>{children}</ControlSizeProvider>\n </div>\n </InputGroupProvider>\n )\n}\n\nexport type InputGroupAddonProps = React.ComponentProps<\"span\">\n\n/** A static, non-interactive segment: a unit, protocol or symbol, in the shell's muted ink. */\nexport function InputGroupAddon({ className, ...props }: InputGroupAddonProps) {\n const { size } = useInputGroupContext(\"InputGroupAddon\")\n const slots = inputGroupVariants({ size })\n return <span data-slot=\"input-group-addon\" className={slots.addon({ className })} {...props} />\n}\n"],"mappings":";AAuFQ;AAnFR,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB,sBA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vB,iBAAe,cAAc;AAAA,MAC7B,WAAW,MAAM,KAAK,EAAE,UAAU,CAAC;AAAA,MAClC,GAAG;AAAA,MAGJ,8BAAC,uBAAoB,MAAM,cAAe,UAAS;AAAA;AAAA,EACrD,GACF;AAEJ;AAKO,SAAS,gBAAgB,EAAE,WAAW,GAAG,MAAM,GAAyB;AAC7E,QAAM,EAAE,KAAK,IAAI,qBAAqB,iBAAiB;AACvD,QAAM,QAAQ,mBAAmB,EAAE,KAAK,CAAC;AACzC,SAAO,oBAAC,UAAK,aAAU,qBAAoB,WAAW,MAAM,MAAM,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AAC/F;","names":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Island,
|
|
3
|
+
IslandView,
|
|
4
|
+
IslandSwap,
|
|
5
|
+
IslandButton,
|
|
6
|
+
IslandIcon,
|
|
7
|
+
IslandSeparator,
|
|
8
|
+
IslandTitle,
|
|
9
|
+
IslandProgress,
|
|
10
|
+
islandVariants
|
|
11
|
+
} from "./island.mjs";
|
|
12
|
+
export {
|
|
13
|
+
Island,
|
|
14
|
+
IslandButton,
|
|
15
|
+
IslandIcon,
|
|
16
|
+
IslandProgress,
|
|
17
|
+
IslandSeparator,
|
|
18
|
+
IslandSwap,
|
|
19
|
+
IslandTitle,
|
|
20
|
+
IslandView,
|
|
21
|
+
islandVariants
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/island/index.ts"],"sourcesContent":["export {\n Island,\n IslandView,\n IslandSwap,\n IslandButton,\n IslandIcon,\n IslandSeparator,\n IslandTitle,\n IslandProgress,\n islandVariants,\n type IslandProps,\n type IslandViewProps,\n type IslandSwapProps,\n type IslandButtonProps,\n type IslandProgressProps,\n type IslandVariant,\n type IslandSize,\n} from \"./island.mjs\"\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAQK;","names":[]}
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Toolbar as ToolbarPrimitive } from "radix-ui";
|
|
5
|
+
import { CaretDown } from "atoms-icons";
|
|
6
|
+
import { Kbd } from "../kbd/index.mjs";
|
|
7
|
+
import { Progress } from "../progress/index.mjs";
|
|
8
|
+
import { Tooltip } from "../tooltip/index.mjs";
|
|
9
|
+
import { duration } from "../../../lib/motion.mjs";
|
|
10
|
+
import { tv } from "../../../lib/tv.mjs";
|
|
11
|
+
const islandVariants = tv({
|
|
12
|
+
slots: {
|
|
13
|
+
root: [
|
|
14
|
+
"relative overflow-hidden data-[morph-ready]:ease-out motion-reduce-fade isolate inline-flex items-center justify-center shadow-lg",
|
|
15
|
+
"rounded-[min(var(--radius-pill),calc(var(--island-height,9999px)/2),var(--radius-4xl))]",
|
|
16
|
+
"data-[morph-ready]:transition-[width,height,border-radius] data-[morph-ready]:duration-fast"
|
|
17
|
+
],
|
|
18
|
+
viewport: "relative flex w-max shrink-0 items-center",
|
|
19
|
+
view: [
|
|
20
|
+
"flex items-center",
|
|
21
|
+
"data-[state=enter]:animate-in data-[state=enter]:fade-in-0 data-[state=enter]:zoom-in-96 data-[state=enter]:blur-in-4",
|
|
22
|
+
"data-[state=exit]:pointer-events-none data-[state=exit]:absolute data-[state=exit]:top-1/2 data-[state=exit]:left-1/2 data-[state=exit]:w-max",
|
|
23
|
+
"data-[state=exit]:-translate-x-1/2 data-[state=exit]:-translate-y-1/2 data-[state=exit]:animate-out data-[state=exit]:fade-out-0",
|
|
24
|
+
"data-[state=exit]:zoom-out-98 data-[state=exit]:blur-out-4 data-[state=exit]:fill-mode-forwards",
|
|
25
|
+
"transition-none duration-fast ease-out motion-reduce:animate-none"
|
|
26
|
+
],
|
|
27
|
+
swap: [
|
|
28
|
+
"relative overflow-hidden data-[morph-ready]:transition-[width,height] data-[morph-ready]:ease-out motion-reduce-fade",
|
|
29
|
+
"-m-1 inline-flex shrink-0 items-center justify-center data-[morph-ready]:duration-fast"
|
|
30
|
+
],
|
|
31
|
+
swapInner: "relative flex w-max shrink-0 items-center p-1",
|
|
32
|
+
button: [
|
|
33
|
+
"inline-flex shrink-0 cursor-pointer select-none items-center justify-center rounded-pill font-medium whitespace-nowrap outline-none",
|
|
34
|
+
"relative before:absolute before:left-1/2 before:top-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:content-[''] before:h-10 before:w-full pointer-coarse:before:h-11",
|
|
35
|
+
"transition-[background-color,color] duration-fast ease-out motion-reduce-fade focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-1",
|
|
36
|
+
"disabled:pointer-events-none disabled:opacity-40 aria-disabled:cursor-default aria-disabled:opacity-40",
|
|
37
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 data-[state=open]:[&>[data-slot=island-button-caret]]:rotate-180"
|
|
38
|
+
],
|
|
39
|
+
caret: "size-3 caret-turn-fast",
|
|
40
|
+
icon: "inline-flex shrink-0 items-center justify-center [&_svg]:shrink-0",
|
|
41
|
+
separator: "w-px shrink-0 rounded-full mx-0.5",
|
|
42
|
+
title: "block max-w-[min(14rem,40vw)] min-w-0 truncate",
|
|
43
|
+
progress: "flex items-center gap-3",
|
|
44
|
+
progressValue: "shrink-0 text-right tabular-nums w-10"
|
|
45
|
+
},
|
|
46
|
+
variants: {
|
|
47
|
+
variant: {
|
|
48
|
+
floating: {
|
|
49
|
+
root: "bg-popover text-popover-foreground ring-1 ring-inset ring-border [--surface:var(--popover)]",
|
|
50
|
+
button: [
|
|
51
|
+
"text-muted-foreground not-aria-disabled:hover:text-foreground data-[pressed]:bg-accent data-[pressed]:text-foreground",
|
|
52
|
+
"data-[state=open]:bg-accent data-[state=open]:text-foreground focus-visible:ring-offset-popover"
|
|
53
|
+
],
|
|
54
|
+
icon: "text-muted-foreground",
|
|
55
|
+
separator: "bg-border",
|
|
56
|
+
title: "text-foreground",
|
|
57
|
+
progressValue: "text-foreground"
|
|
58
|
+
},
|
|
59
|
+
solid: {
|
|
60
|
+
root: "bg-foreground text-background [--surface:var(--foreground)]",
|
|
61
|
+
button: [
|
|
62
|
+
"text-background/65 not-aria-disabled:hover:text-background data-[pressed]:bg-background/15 data-[pressed]:text-background",
|
|
63
|
+
"data-[state=open]:bg-background/15 data-[state=open]:text-background focus-visible:ring-offset-foreground"
|
|
64
|
+
],
|
|
65
|
+
icon: "text-background/65",
|
|
66
|
+
separator: "bg-background/20",
|
|
67
|
+
title: "text-background",
|
|
68
|
+
progressValue: "text-background"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
size: {
|
|
72
|
+
sm: {
|
|
73
|
+
viewport: "gap-0.5 p-1 [--button-radius:max(0px,calc(min(var(--radius-pill),var(--island-height,9999px)/2,var(--radius-4xl))_-_var(--spacing)))]",
|
|
74
|
+
view: "gap-0.5",
|
|
75
|
+
button: "h-8 min-w-8 gap-1 px-2 text-xs [&_svg:not([class*='size-'])]:size-4",
|
|
76
|
+
icon: "size-8 [&_svg:not([class*='size-'])]:size-4",
|
|
77
|
+
separator: "h-4",
|
|
78
|
+
title: "px-2.5 text-xs",
|
|
79
|
+
progress: "px-2.5",
|
|
80
|
+
progressValue: "text-xs"
|
|
81
|
+
},
|
|
82
|
+
md: {
|
|
83
|
+
viewport: "gap-0.5 p-1 [--button-radius:max(0px,calc(min(var(--radius-pill),var(--island-height,9999px)/2,var(--radius-4xl))_-_var(--spacing)))]",
|
|
84
|
+
view: "gap-0.5",
|
|
85
|
+
button: "h-9 min-w-9 gap-1.5 px-2.5 text-sm [&_svg:not([class*='size-'])]:size-4",
|
|
86
|
+
icon: "size-9 [&_svg:not([class*='size-'])]:size-4",
|
|
87
|
+
separator: "h-5",
|
|
88
|
+
title: "px-3 text-sm",
|
|
89
|
+
progress: "px-3",
|
|
90
|
+
progressValue: "text-sm"
|
|
91
|
+
},
|
|
92
|
+
lg: {
|
|
93
|
+
viewport: "gap-1 p-1.5 [--button-radius:max(0px,calc(min(var(--radius-pill),var(--island-height,9999px)/2,var(--radius-4xl))_-_var(--spacing)*1.5))]",
|
|
94
|
+
view: "gap-1",
|
|
95
|
+
button: "h-11 min-w-11 gap-2 px-3 text-base [&_svg:not([class*='size-'])]:size-5",
|
|
96
|
+
icon: "size-11 [&_svg:not([class*='size-'])]:size-5",
|
|
97
|
+
separator: "h-6",
|
|
98
|
+
title: "px-3.5 text-base",
|
|
99
|
+
progress: "px-3.5",
|
|
100
|
+
progressValue: "text-base"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
defaultVariants: { variant: "floating", size: "md" }
|
|
105
|
+
});
|
|
106
|
+
const IslandContext = React.createContext(null);
|
|
107
|
+
function useIsland(part) {
|
|
108
|
+
const value = React.useContext(IslandContext);
|
|
109
|
+
if (!value) throw new Error(`\`${part}\` must be used within \`Island\``);
|
|
110
|
+
return value;
|
|
111
|
+
}
|
|
112
|
+
const ViewStateContext = React.createContext(void 0);
|
|
113
|
+
function useMorph(inner) {
|
|
114
|
+
const [size, setSize] = React.useState(null);
|
|
115
|
+
const [ready, setReady] = React.useState(false);
|
|
116
|
+
React.useEffect(() => {
|
|
117
|
+
const el = inner.current;
|
|
118
|
+
if (!el) return;
|
|
119
|
+
let frame = 0;
|
|
120
|
+
const measure = () => {
|
|
121
|
+
setSize({ w: el.offsetWidth, h: el.offsetHeight });
|
|
122
|
+
if (!frame) frame = requestAnimationFrame(() => setReady(true));
|
|
123
|
+
};
|
|
124
|
+
const observer = new ResizeObserver(measure);
|
|
125
|
+
observer.observe(el);
|
|
126
|
+
return () => {
|
|
127
|
+
observer.disconnect();
|
|
128
|
+
cancelAnimationFrame(frame);
|
|
129
|
+
};
|
|
130
|
+
}, [inner]);
|
|
131
|
+
return { size, ready };
|
|
132
|
+
}
|
|
133
|
+
function isView(node) {
|
|
134
|
+
return React.isValidElement(node) && node.type === IslandView;
|
|
135
|
+
}
|
|
136
|
+
function useViews(children, view, scope) {
|
|
137
|
+
const views = React.Children.toArray(children).filter(isView);
|
|
138
|
+
const byValue = new Map(views.map((v) => [v.props.value, v]));
|
|
139
|
+
const [shown, setShown] = React.useState(view);
|
|
140
|
+
const [leaving, setLeaving] = React.useState(null);
|
|
141
|
+
const [entered, setEntered] = React.useState(false);
|
|
142
|
+
if (view !== shown) {
|
|
143
|
+
setLeaving(shown !== void 0 && byValue.has(shown) ? shown : null);
|
|
144
|
+
setShown(view);
|
|
145
|
+
setEntered(true);
|
|
146
|
+
}
|
|
147
|
+
React.useEffect(() => {
|
|
148
|
+
if (leaving === null) return;
|
|
149
|
+
const reduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
150
|
+
const timer = setTimeout(() => setLeaving(null), reduced ? 0 : duration.fast + 120);
|
|
151
|
+
return () => clearTimeout(timer);
|
|
152
|
+
}, [leaving]);
|
|
153
|
+
React.useLayoutEffect(() => {
|
|
154
|
+
const root = scope.current;
|
|
155
|
+
if (!root || leaving === null) return;
|
|
156
|
+
const active = document.activeElement;
|
|
157
|
+
const old = root.querySelector('[data-slot=island-view][data-state="exit"]');
|
|
158
|
+
if (old && active && old.contains(active)) {
|
|
159
|
+
const next = [...root.querySelectorAll("[data-island-control]")].find((el) => !old.contains(el));
|
|
160
|
+
next?.focus();
|
|
161
|
+
}
|
|
162
|
+
}, [leaving, scope]);
|
|
163
|
+
if (view === void 0) return { content: children, active: true };
|
|
164
|
+
const current = byValue.get(view);
|
|
165
|
+
const leavingView = leaving !== null && leaving !== view ? byValue.get(leaving) : void 0;
|
|
166
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
167
|
+
leavingView ? /* @__PURE__ */ jsx(ViewStateContext.Provider, { value: "exit", children: leavingView }, leaving) : null,
|
|
168
|
+
current ? /* @__PURE__ */ jsx(ViewStateContext.Provider, { value: entered ? "enter" : void 0, children: current }, view) : null
|
|
169
|
+
] });
|
|
170
|
+
return { content, active: Boolean(current) };
|
|
171
|
+
}
|
|
172
|
+
function IslandView({ className, value, ...props }) {
|
|
173
|
+
const { slots } = useIsland("IslandView");
|
|
174
|
+
const state = React.useContext(ViewStateContext);
|
|
175
|
+
const exiting = state === "exit";
|
|
176
|
+
return /* @__PURE__ */ jsx(
|
|
177
|
+
"div",
|
|
178
|
+
{
|
|
179
|
+
"data-slot": "island-view",
|
|
180
|
+
"data-value": value,
|
|
181
|
+
"data-state": state,
|
|
182
|
+
inert: exiting || void 0,
|
|
183
|
+
"aria-hidden": exiting || void 0,
|
|
184
|
+
className: slots.view({ className }),
|
|
185
|
+
...props
|
|
186
|
+
}
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
function Island({
|
|
190
|
+
className,
|
|
191
|
+
view,
|
|
192
|
+
variant = "floating",
|
|
193
|
+
size = "md",
|
|
194
|
+
tooltipPlacement = "top",
|
|
195
|
+
"aria-label": ariaLabel = "Island",
|
|
196
|
+
style,
|
|
197
|
+
children,
|
|
198
|
+
...props
|
|
199
|
+
}) {
|
|
200
|
+
const slots = islandVariants({ variant, size });
|
|
201
|
+
const viewportRef = React.useRef(null);
|
|
202
|
+
const rootRef = React.useRef(null);
|
|
203
|
+
const { size: measured, ready } = useMorph(viewportRef);
|
|
204
|
+
const { content } = useViews(children, view, rootRef);
|
|
205
|
+
const context = React.useMemo(() => ({ slots, tooltipPlacement }), [slots, tooltipPlacement]);
|
|
206
|
+
return /* @__PURE__ */ jsx(IslandContext.Provider, { value: context, children: /* @__PURE__ */ jsx(
|
|
207
|
+
ToolbarPrimitive.Root,
|
|
208
|
+
{
|
|
209
|
+
ref: rootRef,
|
|
210
|
+
"data-slot": "island",
|
|
211
|
+
"data-morph-ready": ready ? "" : void 0,
|
|
212
|
+
orientation: "horizontal",
|
|
213
|
+
"aria-label": ariaLabel,
|
|
214
|
+
className: slots.root({ className }),
|
|
215
|
+
style: measured ? { width: measured.w, height: measured.h, "--island-height": `${measured.h}px`, ...style } : style,
|
|
216
|
+
...props,
|
|
217
|
+
children: /* @__PURE__ */ jsx("div", { ref: viewportRef, "data-slot": "island-viewport", className: slots.viewport(), children: content })
|
|
218
|
+
}
|
|
219
|
+
) });
|
|
220
|
+
}
|
|
221
|
+
function IslandSwap({ className, view, children, style, ...props }) {
|
|
222
|
+
const { slots } = useIsland("IslandSwap");
|
|
223
|
+
const innerRef = React.useRef(null);
|
|
224
|
+
const boxRef = React.useRef(null);
|
|
225
|
+
const { size: measured, ready } = useMorph(innerRef);
|
|
226
|
+
const { content, active } = useViews(children, view, boxRef);
|
|
227
|
+
const collapsed = !active;
|
|
228
|
+
return /* @__PURE__ */ jsx(
|
|
229
|
+
"div",
|
|
230
|
+
{
|
|
231
|
+
ref: boxRef,
|
|
232
|
+
"data-slot": "island-swap",
|
|
233
|
+
"data-morph-ready": ready ? "" : void 0,
|
|
234
|
+
className: slots.swap({ className }),
|
|
235
|
+
style: measured ? { width: collapsed ? 0 : measured.w, height: collapsed ? 0 : measured.h, ...style } : style,
|
|
236
|
+
...props,
|
|
237
|
+
children: /* @__PURE__ */ jsx("span", { ref: innerRef, className: slots.swapInner(), children: content })
|
|
238
|
+
}
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
function IslandButton({
|
|
242
|
+
className,
|
|
243
|
+
tooltip,
|
|
244
|
+
shortcut,
|
|
245
|
+
pressed,
|
|
246
|
+
caret = false,
|
|
247
|
+
disabled,
|
|
248
|
+
asChild,
|
|
249
|
+
children,
|
|
250
|
+
onClick,
|
|
251
|
+
...props
|
|
252
|
+
}) {
|
|
253
|
+
const { slots, tooltipPlacement } = useIsland("IslandButton");
|
|
254
|
+
const softDisabled = Boolean(disabled && tooltip);
|
|
255
|
+
const button = /* @__PURE__ */ jsx(
|
|
256
|
+
ToolbarPrimitive.Button,
|
|
257
|
+
{
|
|
258
|
+
"data-slot": "island-button",
|
|
259
|
+
"data-island-control": "",
|
|
260
|
+
"data-pressed": pressed ? "" : void 0,
|
|
261
|
+
"aria-pressed": pressed,
|
|
262
|
+
"aria-label": props["aria-label"] ?? (typeof tooltip === "string" ? tooltip : void 0),
|
|
263
|
+
"aria-disabled": softDisabled || void 0,
|
|
264
|
+
disabled: disabled && !softDisabled,
|
|
265
|
+
asChild,
|
|
266
|
+
className: slots.button({ className }),
|
|
267
|
+
onClick: (event) => {
|
|
268
|
+
if (softDisabled) {
|
|
269
|
+
event.preventDefault();
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
onClick?.(event);
|
|
273
|
+
},
|
|
274
|
+
...props,
|
|
275
|
+
children: asChild ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
276
|
+
children,
|
|
277
|
+
caret ? /* @__PURE__ */ jsx(CaretDown, { "aria-hidden": true, "data-slot": "island-button-caret", className: slots.caret() }) : null
|
|
278
|
+
] })
|
|
279
|
+
}
|
|
280
|
+
);
|
|
281
|
+
if (!tooltip) return button;
|
|
282
|
+
return /* @__PURE__ */ jsx(
|
|
283
|
+
Tooltip,
|
|
284
|
+
{
|
|
285
|
+
placement: tooltipPlacement,
|
|
286
|
+
content: shortcut ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
287
|
+
tooltip,
|
|
288
|
+
" ",
|
|
289
|
+
/* @__PURE__ */ jsx(Kbd, { children: shortcut })
|
|
290
|
+
] }) : tooltip,
|
|
291
|
+
children: button
|
|
292
|
+
}
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
function IslandIcon({ className, ...props }) {
|
|
296
|
+
const { slots } = useIsland("IslandIcon");
|
|
297
|
+
return /* @__PURE__ */ jsx("span", { "data-slot": "island-icon", className: slots.icon({ className }), ...props });
|
|
298
|
+
}
|
|
299
|
+
function IslandSeparator({ className, ...props }) {
|
|
300
|
+
const { slots } = useIsland("IslandSeparator");
|
|
301
|
+
return /* @__PURE__ */ jsx(ToolbarPrimitive.Separator, { "data-slot": "island-separator", className: slots.separator({ className }), ...props });
|
|
302
|
+
}
|
|
303
|
+
function IslandTitle({ className, ...props }) {
|
|
304
|
+
const { slots } = useIsland("IslandTitle");
|
|
305
|
+
return /* @__PURE__ */ jsx("span", { "data-slot": "island-title", className: slots.title({ className }), ...props });
|
|
306
|
+
}
|
|
307
|
+
function IslandProgress({ className, value, transition = "smooth", "aria-label": ariaLabel = "Progress", ...props }) {
|
|
308
|
+
const { slots } = useIsland("IslandProgress");
|
|
309
|
+
return /* @__PURE__ */ jsxs("div", { "data-slot": "island-progress", className: slots.progress({ className }), ...props, children: [
|
|
310
|
+
value === null ? null : /* @__PURE__ */ jsxs("span", { "aria-hidden": true, "data-slot": "island-progress-value", className: slots.progressValue(), children: [
|
|
311
|
+
Math.round(value),
|
|
312
|
+
"%"
|
|
313
|
+
] }),
|
|
314
|
+
/* @__PURE__ */ jsx(Progress, { value, transition, "aria-label": ariaLabel, className: "w-20 sm:w-32" })
|
|
315
|
+
] });
|
|
316
|
+
}
|
|
317
|
+
export {
|
|
318
|
+
Island,
|
|
319
|
+
IslandButton,
|
|
320
|
+
IslandIcon,
|
|
321
|
+
IslandProgress,
|
|
322
|
+
IslandSeparator,
|
|
323
|
+
IslandSwap,
|
|
324
|
+
IslandTitle,
|
|
325
|
+
IslandView,
|
|
326
|
+
islandVariants
|
|
327
|
+
};
|
|
328
|
+
//# sourceMappingURL=island.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/island/island.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Toolbar as ToolbarPrimitive } from \"radix-ui\"\nimport { CaretDown } from \"atoms-icons\"\n\nimport { Kbd } from \"../kbd/index.mjs\"\nimport { Progress } from \"../progress/index.mjs\"\nimport { Tooltip, type TooltipProps } from \"../tooltip/index.mjs\"\nimport { duration } from \"../../../lib/motion.mjs\"\nimport { tv } from \"../../../lib/tv.mjs\"\n\n/*\n * A floating pill that changes with what the viewer is doing. Each state is a view; switching views\n * morphs the pill to the new view's size while the old contents blur out and the new ones blur in.\n * The pill measures an inner viewport that is free to be its natural size, so mid-change it already\n * knows where it is going, and CSS tweens the width, height and corner to it. The corner is half the\n * height while the island is one row, capped at the card radius once a view grows taller.\n */\nexport const islandVariants = tv({\n slots: {\n root: [\n \"relative overflow-hidden data-[morph-ready]:ease-out motion-reduce-fade isolate inline-flex items-center justify-center shadow-lg\",\n \"rounded-[min(var(--radius-pill),calc(var(--island-height,9999px)/2),var(--radius-4xl))]\",\n \"data-[morph-ready]:transition-[width,height,border-radius] data-[morph-ready]:duration-fast\",\n ],\n viewport: \"relative flex w-max shrink-0 items-center\",\n view: [\n \"flex items-center\",\n \"data-[state=enter]:animate-in data-[state=enter]:fade-in-0 data-[state=enter]:zoom-in-96 data-[state=enter]:blur-in-4\",\n \"data-[state=exit]:pointer-events-none data-[state=exit]:absolute data-[state=exit]:top-1/2 data-[state=exit]:left-1/2 data-[state=exit]:w-max\",\n \"data-[state=exit]:-translate-x-1/2 data-[state=exit]:-translate-y-1/2 data-[state=exit]:animate-out data-[state=exit]:fade-out-0\",\n \"data-[state=exit]:zoom-out-98 data-[state=exit]:blur-out-4 data-[state=exit]:fill-mode-forwards\",\n \"transition-none duration-fast ease-out motion-reduce:animate-none\",\n ],\n swap: [\n \"relative overflow-hidden data-[morph-ready]:transition-[width,height] data-[morph-ready]:ease-out motion-reduce-fade\",\n \"-m-1 inline-flex shrink-0 items-center justify-center data-[morph-ready]:duration-fast\",\n ],\n swapInner: \"relative flex w-max shrink-0 items-center p-1\",\n button: [\n \"inline-flex shrink-0 cursor-pointer select-none items-center justify-center rounded-pill font-medium whitespace-nowrap outline-none\",\n \"relative before:absolute before:left-1/2 before:top-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:content-[''] before:h-10 before:w-full pointer-coarse:before:h-11\",\n \"transition-[background-color,color] duration-fast ease-out motion-reduce-fade focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-1\",\n \"disabled:pointer-events-none disabled:opacity-40 aria-disabled:cursor-default aria-disabled:opacity-40\",\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 data-[state=open]:[&>[data-slot=island-button-caret]]:rotate-180\",\n ],\n caret: \"size-3 caret-turn-fast\",\n icon: \"inline-flex shrink-0 items-center justify-center [&_svg]:shrink-0\",\n separator: \"w-px shrink-0 rounded-full mx-0.5\",\n title: \"block max-w-[min(14rem,40vw)] min-w-0 truncate\",\n progress: \"flex items-center gap-3\",\n progressValue: \"shrink-0 text-right tabular-nums w-10\",\n },\n variants: {\n variant: {\n floating: {\n root: \"bg-popover text-popover-foreground ring-1 ring-inset ring-border [--surface:var(--popover)]\",\n button: [\n \"text-muted-foreground not-aria-disabled:hover:text-foreground data-[pressed]:bg-accent data-[pressed]:text-foreground\",\n \"data-[state=open]:bg-accent data-[state=open]:text-foreground focus-visible:ring-offset-popover\",\n ],\n icon: \"text-muted-foreground\",\n separator: \"bg-border\",\n title: \"text-foreground\",\n progressValue: \"text-foreground\",\n },\n solid: {\n root: \"bg-foreground text-background [--surface:var(--foreground)]\",\n button: [\n \"text-background/65 not-aria-disabled:hover:text-background data-[pressed]:bg-background/15 data-[pressed]:text-background\",\n \"data-[state=open]:bg-background/15 data-[state=open]:text-background focus-visible:ring-offset-foreground\",\n ],\n icon: \"text-background/65\",\n separator: \"bg-background/20\",\n title: \"text-background\",\n progressValue: \"text-background\",\n },\n },\n size: {\n sm: {\n viewport: \"gap-0.5 p-1 [--button-radius:max(0px,calc(min(var(--radius-pill),var(--island-height,9999px)/2,var(--radius-4xl))_-_var(--spacing)))]\",\n view: \"gap-0.5\",\n button: \"h-8 min-w-8 gap-1 px-2 text-xs [&_svg:not([class*='size-'])]:size-4\",\n icon: \"size-8 [&_svg:not([class*='size-'])]:size-4\",\n separator: \"h-4\",\n title: \"px-2.5 text-xs\",\n progress: \"px-2.5\",\n progressValue: \"text-xs\",\n },\n md: {\n viewport: \"gap-0.5 p-1 [--button-radius:max(0px,calc(min(var(--radius-pill),var(--island-height,9999px)/2,var(--radius-4xl))_-_var(--spacing)))]\",\n view: \"gap-0.5\",\n button: \"h-9 min-w-9 gap-1.5 px-2.5 text-sm [&_svg:not([class*='size-'])]:size-4\",\n icon: \"size-9 [&_svg:not([class*='size-'])]:size-4\",\n separator: \"h-5\",\n title: \"px-3 text-sm\",\n progress: \"px-3\",\n progressValue: \"text-sm\",\n },\n lg: {\n viewport: \"gap-1 p-1.5 [--button-radius:max(0px,calc(min(var(--radius-pill),var(--island-height,9999px)/2,var(--radius-4xl))_-_var(--spacing)*1.5))]\",\n view: \"gap-1\",\n button: \"h-11 min-w-11 gap-2 px-3 text-base [&_svg:not([class*='size-'])]:size-5\",\n icon: \"size-11 [&_svg:not([class*='size-'])]:size-5\",\n separator: \"h-6\",\n title: \"px-3.5 text-base\",\n progress: \"px-3.5\",\n progressValue: \"text-base\",\n },\n },\n },\n defaultVariants: { variant: \"floating\", size: \"md\" },\n})\n\nexport type IslandVariant = \"floating\" | \"solid\"\nexport type IslandSize = \"sm\" | \"md\" | \"lg\"\n\ntype IslandContextValue = {\n slots: ReturnType<typeof islandVariants>\n tooltipPlacement: TooltipProps[\"placement\"]\n}\nconst IslandContext = React.createContext<IslandContextValue | null>(null)\n\nfunction useIsland(part: string) {\n const value = React.useContext(IslandContext)\n if (!value) throw new Error(`\\`${part}\\` must be used within \\`Island\\``)\n return value\n}\n\n/** Which state a view is in while it is mounted: entering, leaving, or simply on screen. */\nconst ViewStateContext = React.createContext<\"enter\" | \"exit\" | undefined>(undefined)\n\n/* ─── The morph ───────────────────────────────────────────────────────────── */\n\n/**\n * Measures the natural size of `inner` and writes it onto the outer box. The transition is armed\n * only after the first measure (`data-morph-ready`), so the first paint never animates.\n */\nfunction useMorph(inner: React.RefObject<HTMLElement | null>) {\n const [size, setSize] = React.useState<{ w: number; h: number } | null>(null)\n const [ready, setReady] = React.useState(false)\n React.useEffect(() => {\n const el = inner.current\n if (!el) return\n let frame = 0\n const measure = () => {\n setSize({ w: el.offsetWidth, h: el.offsetHeight })\n if (!frame) frame = requestAnimationFrame(() => setReady(true))\n }\n const observer = new ResizeObserver(measure)\n observer.observe(el)\n return () => {\n observer.disconnect()\n cancelAnimationFrame(frame)\n }\n }, [inner])\n return { size, ready }\n}\n\n/* ─── Views ───────────────────────────────────────────────────────────────── */\n\nfunction isView(node: React.ReactNode): node is React.ReactElement<IslandViewProps> {\n return React.isValidElement(node) && node.type === IslandView\n}\n\n/**\n * Renders the view named by `view`, and for one beat the one leaving. Only those two are mounted;\n * the leaving one is the same instance that was on screen, with its state, until its fade ends.\n */\nfunction useViews(children: React.ReactNode, view: string | undefined, scope: React.RefObject<HTMLElement | null>) {\n const views = React.Children.toArray(children).filter(isView)\n const byValue = new Map(views.map((v) => [v.props.value, v]))\n const [shown, setShown] = React.useState(view)\n const [leaving, setLeaving] = React.useState<string | null>(null)\n const [entered, setEntered] = React.useState(false)\n if (view !== shown) {\n setLeaving(shown !== undefined && byValue.has(shown) ? shown : null)\n setShown(view)\n setEntered(true)\n }\n\n // Under reduced motion there is no fade to wait for; otherwise a fallback timer covers a fade\n // that never reports its end (a hidden tab).\n React.useEffect(() => {\n if (leaving === null) return\n const reduced = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches\n const timer = setTimeout(() => setLeaving(null), reduced ? 0 : duration.fast + 120)\n return () => clearTimeout(timer)\n }, [leaving])\n\n // Focus never falls onto the page: if it sat in the view that left, it moves to the first\n // control still on screen.\n React.useLayoutEffect(() => {\n const root = scope.current\n if (!root || leaving === null) return\n const active = document.activeElement\n const old = root.querySelector('[data-slot=island-view][data-state=\"exit\"]')\n if (old && active && old.contains(active)) {\n const next = [...root.querySelectorAll<HTMLElement>(\"[data-island-control]\")].find((el) => !old.contains(el))\n next?.focus()\n }\n }, [leaving, scope])\n\n if (view === undefined) return { content: children, active: true }\n const current = byValue.get(view)\n const leavingView = leaving !== null && leaving !== view ? byValue.get(leaving) : undefined\n const content = (\n <>\n {leavingView ? (\n <ViewStateContext.Provider key={leaving!} value=\"exit\">\n {leavingView}\n </ViewStateContext.Provider>\n ) : null}\n {current ? (\n <ViewStateContext.Provider key={view} value={entered ? \"enter\" : undefined}>\n {current}\n </ViewStateContext.Provider>\n ) : null}\n </>\n )\n return { content, active: Boolean(current) }\n}\n\nexport interface IslandViewProps extends React.ComponentProps<\"div\"> {\n /** The name the nearest Island or IslandSwap shows with `view={value}`. */\n value: string\n}\n\n/** One state of the island. A row by default; `flex-col` turns the pill into a card. */\nexport function IslandView({ className, value, ...props }: IslandViewProps) {\n const { slots } = useIsland(\"IslandView\")\n const state = React.useContext(ViewStateContext)\n const exiting = state === \"exit\"\n return (\n <div\n data-slot=\"island-view\"\n data-value={value}\n data-state={state}\n inert={exiting || undefined}\n aria-hidden={exiting || undefined}\n className={slots.view({ className })}\n {...props}\n />\n )\n}\n\n/* ─── Root ────────────────────────────────────────────────────────────────── */\n\nexport interface IslandProps extends Omit<React.ComponentProps<typeof ToolbarPrimitive.Root>, \"orientation\"> {\n /** The value of the IslandView on screen. Unset, the children are simply the contents. */\n view?: string\n /** floating is the popover surface; solid inverts to the foreground ink. */\n variant?: IslandVariant\n /** Control height 32, 36 or 44px; the island's own axis, not the page density. */\n size?: IslandSize\n /** Where every control's tooltip opens. */\n tooltipPlacement?: TooltipProps[\"placement\"]\n}\n\nexport function Island({\n className,\n view,\n variant = \"floating\",\n size = \"md\",\n tooltipPlacement = \"top\",\n \"aria-label\": ariaLabel = \"Island\",\n style,\n children,\n ...props\n}: IslandProps) {\n const slots = islandVariants({ variant, size })\n const viewportRef = React.useRef<HTMLDivElement>(null)\n const rootRef = React.useRef<HTMLDivElement>(null)\n const { size: measured, ready } = useMorph(viewportRef)\n const { content } = useViews(children, view, rootRef)\n const context = React.useMemo(() => ({ slots, tooltipPlacement }), [slots, tooltipPlacement])\n return (\n <IslandContext.Provider value={context}>\n <ToolbarPrimitive.Root\n ref={rootRef}\n data-slot=\"island\"\n data-morph-ready={ready ? \"\" : undefined}\n orientation=\"horizontal\"\n aria-label={ariaLabel}\n className={slots.root({ className })}\n style={\n measured\n ? ({ width: measured.w, height: measured.h, \"--island-height\": `${measured.h}px`, ...style } as React.CSSProperties)\n : style\n }\n {...props}\n >\n <div ref={viewportRef} data-slot=\"island-viewport\" className={slots.viewport()}>\n {content}\n </div>\n </ToolbarPrimitive.Root>\n </IslandContext.Provider>\n )\n}\n\n/* ─── Swap ────────────────────────────────────────────────────────────────── */\n\nexport interface IslandSwapProps extends React.ComponentProps<\"div\"> {\n /** The IslandView on screen in this region. A value no child answers to collapses it. */\n view?: string\n}\n\n/** A region inside a view that swaps on its own, with its own crossfade and morph. */\nexport function IslandSwap({ className, view, children, style, ...props }: IslandSwapProps) {\n const { slots } = useIsland(\"IslandSwap\")\n const innerRef = React.useRef<HTMLSpanElement>(null)\n const boxRef = React.useRef<HTMLDivElement>(null)\n const { size: measured, ready } = useMorph(innerRef)\n const { content, active } = useViews(children, view, boxRef)\n // An empty region collapses to nothing, gap and all.\n const collapsed = !active\n return (\n <div\n ref={boxRef}\n data-slot=\"island-swap\"\n data-morph-ready={ready ? \"\" : undefined}\n className={slots.swap({ className })}\n style={\n measured\n ? ({ width: collapsed ? 0 : measured.w, height: collapsed ? 0 : measured.h, ...style } as React.CSSProperties)\n : style\n }\n {...props}\n >\n <span ref={innerRef} className={slots.swapInner()}>\n {content}\n </span>\n </div>\n )\n}\n\n/* ─── Parts ───────────────────────────────────────────────────────────────── */\n\nexport interface IslandButtonProps extends React.ComponentProps<typeof ToolbarPrimitive.Button> {\n /** Hover and focus hint. A string also becomes the aria-label when none is set. */\n tooltip?: React.ReactNode\n /** A keycap shown in the tooltip, e.g. \"L\". Display only. */\n shortcut?: string\n /** A toggle that is on: sets aria-pressed and lights the chip. */\n pressed?: boolean\n /** A trailing caret that turns while its menu is open. */\n caret?: boolean\n}\n\n/** A control: one glyph makes a circle, a word makes a pill. */\nexport function IslandButton({\n className,\n tooltip,\n shortcut,\n pressed,\n caret = false,\n disabled,\n asChild,\n children,\n onClick,\n ...props\n}: IslandButtonProps) {\n const { slots, tooltipPlacement } = useIsland(\"IslandButton\")\n // Disabled with a reason: still hoverable and focusable, so the tooltip can be read.\n const softDisabled = Boolean(disabled && tooltip)\n const button = (\n <ToolbarPrimitive.Button\n data-slot=\"island-button\"\n data-island-control=\"\"\n data-pressed={pressed ? \"\" : undefined}\n aria-pressed={pressed}\n aria-label={props[\"aria-label\"] ?? (typeof tooltip === \"string\" ? tooltip : undefined)}\n aria-disabled={softDisabled || undefined}\n disabled={disabled && !softDisabled}\n asChild={asChild}\n className={slots.button({ className })}\n onClick={(event) => {\n if (softDisabled) {\n event.preventDefault()\n return\n }\n onClick?.(event)\n }}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {children}\n {caret ? <CaretDown aria-hidden data-slot=\"island-button-caret\" className={slots.caret()} /> : null}\n </>\n )}\n </ToolbarPrimitive.Button>\n )\n if (!tooltip) return button\n return (\n <Tooltip\n placement={tooltipPlacement}\n content={\n shortcut ? (\n <>\n {tooltip} <Kbd>{shortcut}</Kbd>\n </>\n ) : (\n tooltip\n )\n }\n >\n {button}\n </Tooltip>\n )\n}\n\n/** A status glyph (a spinner, a check, a live dot) on a control's square. */\nexport function IslandIcon({ className, ...props }: React.ComponentProps<\"span\">) {\n const { slots } = useIsland(\"IslandIcon\")\n return <span data-slot=\"island-icon\" className={slots.icon({ className })} {...props} />\n}\n\n/** A hairline between clusters of controls. */\nexport function IslandSeparator({ className, ...props }: React.ComponentProps<typeof ToolbarPrimitive.Separator>) {\n const { slots } = useIsland(\"IslandSeparator\")\n return <ToolbarPrimitive.Separator data-slot=\"island-separator\" className={slots.separator({ className })} {...props} />\n}\n\n/** What you are looking at, on one line that truncates before it stretches the pill. */\nexport function IslandTitle({ className, ...props }: React.ComponentProps<\"span\">) {\n const { slots } = useIsland(\"IslandTitle\")\n return <span data-slot=\"island-title\" className={slots.title({ className })} {...props} />\n}\n\nexport interface IslandProgressProps extends Omit<React.ComponentProps<\"div\">, \"children\"> {\n /** 0 to 100, or null for an unknown length: the readout goes and the bar sweeps. */\n value: number | null\n /** The fill's easing; none when the value follows the scroll. */\n transition?: \"smooth\" | \"none\"\n}\n\n/** A tabular readout and a thin Progress bar for a task that is running. */\nexport function IslandProgress({ className, value, transition = \"smooth\", \"aria-label\": ariaLabel = \"Progress\", ...props }: IslandProgressProps) {\n const { slots } = useIsland(\"IslandProgress\")\n return (\n <div data-slot=\"island-progress\" className={slots.progress({ className })} {...props}>\n {value === null ? null : (\n <span aria-hidden data-slot=\"island-progress-value\" className={slots.progressValue()}>\n {Math.round(value)}%\n </span>\n )}\n <Progress value={value} transition={transition} aria-label={ariaLabel} className=\"w-20 sm:w-32\" />\n </div>\n )\n}\n"],"mappings":";AAgNI,mBAEI,KAFJ;AA9MJ,YAAY,WAAW;AACvB,SAAS,WAAW,wBAAwB;AAC5C,SAAS,iBAAiB;AAE1B,SAAS,WAAW;AACpB,SAAS,gBAAgB;AACzB,SAAS,eAAkC;AAC3C,SAAS,gBAAgB;AACzB,SAAS,UAAU;AASZ,MAAM,iBAAiB,GAAG;AAAA,EAC/B,OAAO;AAAA,IACL,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,UAAU;AAAA,IACV,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,IACF;AAAA,IACA,WAAW;AAAA,IACX,QAAQ;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,OAAO;AAAA,IACP,MAAM;AAAA,IACN,WAAW;AAAA,IACX,OAAO;AAAA,IACP,UAAU;AAAA,IACV,eAAe;AAAA,EACjB;AAAA,EACA,UAAU;AAAA,IACR,SAAS;AAAA,MACP,UAAU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AAK,MAAM,KAAK;AAAA,MAAE;AAAA,OACrB;AAAA,IAEF,oBAAC,YAAS,OAAc,YAAwB,cAAY,WAAW,WAAU,gBAAe;AAAA,KAClG;AAEJ;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/kbd/index.ts"],"sourcesContent":["export { Kbd, kbdVariants, type KbdProps } from \"./kbd.mjs\"\n"],"mappings":"AAAA,SAAS,KAAK,mBAAkC;","names":[]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Slot } from "radix-ui";
|
|
4
|
+
import { tv } from "../../../lib/tv.mjs";
|
|
5
|
+
const kbdVariants = tv({
|
|
6
|
+
base: [
|
|
7
|
+
"inline-flex items-center justify-center shrink-0 whitespace-nowrap select-none",
|
|
8
|
+
"border font-mono font-medium tabular-nums",
|
|
9
|
+
"transition duration-fast ease-out"
|
|
10
|
+
],
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: [
|
|
14
|
+
"border-transparent bg-foreground/8 text-muted-foreground",
|
|
15
|
+
"[[data-slot=tooltip][data-variant=text]_&]:bg-background/15 [[data-slot=tooltip][data-variant=text]_&]:text-background/80"
|
|
16
|
+
],
|
|
17
|
+
soft: [
|
|
18
|
+
"border-transparent bg-foreground/8 text-muted-foreground",
|
|
19
|
+
"[[data-slot=tooltip][data-variant=text]_&]:bg-background/15 [[data-slot=tooltip][data-variant=text]_&]:text-background/80"
|
|
20
|
+
],
|
|
21
|
+
outline: [
|
|
22
|
+
"border-input bg-transparent text-muted-foreground",
|
|
23
|
+
"[[data-slot=tooltip][data-variant=text]_&]:border-background/25 [[data-slot=tooltip][data-variant=text]_&]:text-background/80"
|
|
24
|
+
],
|
|
25
|
+
solid: [
|
|
26
|
+
"border-transparent bg-foreground text-background shadow-xs",
|
|
27
|
+
"[[data-slot=tooltip][data-variant=text]_&]:bg-background [[data-slot=tooltip][data-variant=text]_&]:text-foreground"
|
|
28
|
+
],
|
|
29
|
+
ghost: [
|
|
30
|
+
"border-transparent bg-transparent text-muted-foreground shadow-none",
|
|
31
|
+
"[[data-slot=tooltip][data-variant=text]_&]:text-background/70"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
size: {
|
|
35
|
+
sm: "h-5 min-w-5 gap-0.5 px-1 text-xs rounded-[5px] [&>svg]:size-3",
|
|
36
|
+
md: "h-6 min-w-6 gap-1 px-1.5 text-xs rounded-[6px] [&>svg]:size-3.5",
|
|
37
|
+
lg: "h-7 min-w-7 gap-1 px-2 text-sm rounded-[7px] [&>svg]:size-4"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
compoundVariants: [
|
|
41
|
+
{
|
|
42
|
+
variant: "ghost",
|
|
43
|
+
size: ["sm", "md", "lg"],
|
|
44
|
+
class: "h-auto min-w-0 px-0"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
defaultVariants: {
|
|
48
|
+
variant: "default",
|
|
49
|
+
size: "md"
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
function Kbd({
|
|
53
|
+
className,
|
|
54
|
+
variant,
|
|
55
|
+
size,
|
|
56
|
+
asChild = false,
|
|
57
|
+
...props
|
|
58
|
+
}) {
|
|
59
|
+
const Comp = asChild ? Slot.Root : "kbd";
|
|
60
|
+
return /* @__PURE__ */ jsx(
|
|
61
|
+
Comp,
|
|
62
|
+
{
|
|
63
|
+
"data-slot": "kbd",
|
|
64
|
+
className: kbdVariants({ variant, size, className }),
|
|
65
|
+
...props
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
Kbd,
|
|
71
|
+
kbdVariants
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=kbd.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/kbd/kbd.tsx"],"sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport { Slot } from \"radix-ui\"\r\n\r\nimport { tv, type VariantProps } from \"../../../lib/tv.mjs\"\r\n\r\nexport const kbdVariants = tv({\r\n base: [\r\n \"inline-flex items-center justify-center shrink-0 whitespace-nowrap select-none\",\r\n \"border font-mono font-medium tabular-nums\",\r\n \"transition duration-fast ease-out\",\r\n ],\r\n variants: {\r\n variant: {\r\n default: [\r\n \"border-transparent bg-foreground/8 text-muted-foreground\",\r\n \"[[data-slot=tooltip][data-variant=text]_&]:bg-background/15 [[data-slot=tooltip][data-variant=text]_&]:text-background/80\",\r\n ],\r\n soft: [\r\n \"border-transparent bg-foreground/8 text-muted-foreground\",\r\n \"[[data-slot=tooltip][data-variant=text]_&]:bg-background/15 [[data-slot=tooltip][data-variant=text]_&]:text-background/80\",\r\n ],\r\n outline: [\r\n \"border-input bg-transparent text-muted-foreground\",\r\n \"[[data-slot=tooltip][data-variant=text]_&]:border-background/25 [[data-slot=tooltip][data-variant=text]_&]:text-background/80\",\r\n ],\r\n solid: [\r\n \"border-transparent bg-foreground text-background shadow-xs\",\r\n \"[[data-slot=tooltip][data-variant=text]_&]:bg-background [[data-slot=tooltip][data-variant=text]_&]:text-foreground\",\r\n ],\r\n ghost: [\r\n \"border-transparent bg-transparent text-muted-foreground shadow-none\",\r\n \"[[data-slot=tooltip][data-variant=text]_&]:text-background/70\",\r\n ],\r\n },\r\n size: {\r\n sm: \"h-5 min-w-5 gap-0.5 px-1 text-xs rounded-[5px] [&>svg]:size-3\",\r\n md: \"h-6 min-w-6 gap-1 px-1.5 text-xs rounded-[6px] [&>svg]:size-3.5\",\r\n lg: \"h-7 min-w-7 gap-1 px-2 text-sm rounded-[7px] [&>svg]:size-4\",\r\n },\r\n },\r\n compoundVariants: [\r\n {\r\n variant: \"ghost\",\r\n size: [\"sm\", \"md\", \"lg\"],\r\n class: \"h-auto min-w-0 px-0\",\r\n },\r\n ],\r\n defaultVariants: {\r\n variant: \"default\",\r\n size: \"md\",\r\n },\r\n})\r\n\r\nexport interface KbdProps\r\n extends React.ComponentProps<\"kbd\">,\r\n VariantProps<typeof kbdVariants> {\r\n asChild?: boolean\r\n}\r\n\r\nexport function Kbd({\r\n className,\r\n variant,\r\n size,\r\n asChild = false,\r\n ...props\r\n}: KbdProps) {\r\n const Comp = asChild ? Slot.Root : \"kbd\"\r\n\r\n return (\r\n <Comp\r\n data-slot=\"kbd\"\r\n className={kbdVariants({ variant, size, className })}\r\n {...props}\r\n />\r\n )\r\n}\r\n"],"mappings":";AAuEI;AApEJ,SAAS,YAAY;AAErB,SAAS,UAA6B;AAE/B,MAAM,cAAc,GAAG;AAAA,EAC5B,MAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,QACP;AAAA,QACA;AAAA,MACF;AAAA,MACA,MAAM;AAAA,QACJ;AAAA,QACA;AAAA,MACF;AAAA,MACA,SAAS;AAAA,QACP;AAAA,QACA;AAAA,MACF;AAAA,MACA,OAAO;AAAA,QACL;AAAA,QACA;AAAA,MACF;AAAA,MACA,OAAO;AAAA,QACL;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,EACF;AAAA,EACA,kBAAkB;AAAA,IAChB;AAAA,MACE,SAAS;AAAA,MACT,MAAM,CAAC,MAAM,MAAM,IAAI;AAAA,MACvB,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,SAAS;AAAA,IACT,MAAM;AAAA,EACR;AACF,CAAC;AAQM,SAAS,IAAI;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,GAAG;AACL,GAAa;AACX,QAAM,OAAO,UAAU,KAAK,OAAO;AAEnC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,YAAY,EAAE,SAAS,MAAM,UAAU,CAAC;AAAA,MAClD,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
|