@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,287 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { ScrollArea } from "../scroll-area/index.mjs";
|
|
5
|
+
import { ControlSizeProvider } from "../../../lib/density.mjs";
|
|
6
|
+
import { tv } from "../../../lib/tv.mjs";
|
|
7
|
+
const terminalVariants = tv({
|
|
8
|
+
slots: {
|
|
9
|
+
root: "relative isolate flex flex-col overflow-hidden rounded-sm border border-border-soft bg-popover text-popover-foreground shadow-lg outline-none [--surface:var(--popover)]",
|
|
10
|
+
bar: "@container flex h-10 shrink-0 select-none items-center gap-2 border-b border-border bg-muted/40 pl-3 [--surface:color-mix(in_oklab,var(--muted)_40%,var(--popover))]",
|
|
11
|
+
tab: [
|
|
12
|
+
"relative -mb-px flex h-8 min-w-0 max-w-60 shrink items-center gap-2 self-end rounded-t-xs border border-b-0 px-3 text-xs first:-ml-1 @max-3xs:px-1.5",
|
|
13
|
+
"data-[active=true]:border-border data-[active=true]:bg-popover data-[active=true]:[--surface:var(--popover)]",
|
|
14
|
+
"data-[active=false]:border-transparent data-[active=false]:[&_[data-slot=terminal-title]]:text-muted-foreground"
|
|
15
|
+
],
|
|
16
|
+
indicator: "size-2 shrink-0 rounded-full bg-primary",
|
|
17
|
+
title: "min-w-0 flex-1 truncate text-xs text-foreground",
|
|
18
|
+
titleTag: "text-muted-foreground before:mx-1.5 before:text-muted-foreground/50 before:content-['\xB7']",
|
|
19
|
+
controls: "ml-auto flex shrink-0 items-center gap-2 last:pr-1",
|
|
20
|
+
caption: "ml-auto flex shrink-0 self-stretch [[data-slot=terminal-controls]+&]:ml-0",
|
|
21
|
+
captionButton: [
|
|
22
|
+
"inline-flex w-11.5 cursor-pointer items-center justify-center text-foreground/75 outline-none @max-sm:w-10",
|
|
23
|
+
"transition-colors duration-fast ease-out",
|
|
24
|
+
"focus-visible:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus",
|
|
25
|
+
"[&_svg]:size-2.5 [&_svg]:shrink-0"
|
|
26
|
+
],
|
|
27
|
+
screenArea: "min-h-0 flex-1 font-mono text-[0.8125rem] leading-normal pointer-coarse:text-base",
|
|
28
|
+
screen: "px-3 py-2",
|
|
29
|
+
inputLine: "flex items-baseline",
|
|
30
|
+
prompt: "shrink-0 whitespace-pre",
|
|
31
|
+
promptPrefix: "font-semibold text-foreground",
|
|
32
|
+
promptMark: "text-muted-foreground",
|
|
33
|
+
field: "group/terminal-field relative min-w-0 flex-1 whitespace-pre-wrap break-all",
|
|
34
|
+
input: "absolute inset-0 size-full border-0 bg-transparent p-0 text-transparent caret-transparent outline-none placeholder:text-transparent selection:bg-foreground/15",
|
|
35
|
+
typed: "text-foreground",
|
|
36
|
+
ghost: "text-muted-foreground/60",
|
|
37
|
+
cursor: [
|
|
38
|
+
"ring-1 ring-inset ring-foreground/40 group-focus-within/terminal-field:ring-0",
|
|
39
|
+
"group-focus-within/terminal-field:data-[visible=true]:bg-foreground/80 group-focus-within/terminal-field:data-[visible=true]:text-[color:var(--surface,var(--background))]"
|
|
40
|
+
],
|
|
41
|
+
tray: "flex shrink-0 border-t border-border bg-muted/30 px-3 [--surface:color-mix(in_oklab,var(--muted)_30%,var(--popover))]",
|
|
42
|
+
watermark: "pointer-events-none absolute inset-0 -z-10 m-auto w-[min(20rem,42%)] select-none rounded-4xl grayscale invert dark:invert-0"
|
|
43
|
+
},
|
|
44
|
+
variants: {
|
|
45
|
+
movable: {
|
|
46
|
+
true: { bar: "cursor-grab" },
|
|
47
|
+
false: {}
|
|
48
|
+
},
|
|
49
|
+
dragging: {
|
|
50
|
+
true: { root: "select-none", bar: "cursor-grabbing" },
|
|
51
|
+
false: {}
|
|
52
|
+
},
|
|
53
|
+
action: {
|
|
54
|
+
minimize: { captionButton: "hover:bg-foreground/8 hover:text-foreground active:bg-foreground/12" },
|
|
55
|
+
maximize: { captionButton: "hover:bg-foreground/8 hover:text-foreground active:bg-foreground/12" },
|
|
56
|
+
restore: { captionButton: "hover:bg-foreground/8 hover:text-foreground active:bg-foreground/12" },
|
|
57
|
+
close: { captionButton: "hover:bg-destructive hover:text-destructive-foreground active:bg-destructive/85" }
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
defaultVariants: { movable: false, dragging: false }
|
|
61
|
+
});
|
|
62
|
+
const terminalLineVariants = tv({
|
|
63
|
+
base: "whitespace-pre-wrap break-words empty:before:content-['_']",
|
|
64
|
+
variants: {
|
|
65
|
+
tone: {
|
|
66
|
+
in: "text-foreground",
|
|
67
|
+
out: "text-body",
|
|
68
|
+
raw: "text-body",
|
|
69
|
+
dim: "text-muted-foreground",
|
|
70
|
+
err: "text-destructive-strong",
|
|
71
|
+
ok: "text-success-strong"
|
|
72
|
+
},
|
|
73
|
+
interactive: {
|
|
74
|
+
// The highlight bleeds past the text, so the text keeps its column.
|
|
75
|
+
true: "-mx-1.5 cursor-pointer px-1.5 outline-none pointer-coarse:py-1 transition-colors duration-fast ease-out relative hover:bg-accent focus-visible:z-10 focus-visible:bg-accent focus-visible:ring-2 focus-visible:ring-focus",
|
|
76
|
+
false: ""
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
defaultVariants: { tone: "out", interactive: false }
|
|
80
|
+
});
|
|
81
|
+
const TerminalContext = React.createContext({ movable: false, dragging: false });
|
|
82
|
+
function Terminal({ className, movable = false, dragging = false, ...props }) {
|
|
83
|
+
const context = React.useMemo(() => ({ movable, dragging }), [movable, dragging]);
|
|
84
|
+
return /* @__PURE__ */ jsx(TerminalContext.Provider, { value: context, children: /* @__PURE__ */ jsx(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
"data-slot": "terminal",
|
|
88
|
+
"data-movable": movable || void 0,
|
|
89
|
+
"data-dragging": dragging || void 0,
|
|
90
|
+
className: terminalVariants({ dragging }).root({ className }),
|
|
91
|
+
...props
|
|
92
|
+
}
|
|
93
|
+
) });
|
|
94
|
+
}
|
|
95
|
+
function TerminalBar({ className, ...props }) {
|
|
96
|
+
const { movable, dragging } = React.useContext(TerminalContext);
|
|
97
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "terminal-bar", className: terminalVariants({ movable, dragging }).bar({ className }), ...props });
|
|
98
|
+
}
|
|
99
|
+
function TerminalTab({ className, active = true, ...props }) {
|
|
100
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "terminal-tab", "data-active": active, className: terminalVariants().tab({ className }), ...props });
|
|
101
|
+
}
|
|
102
|
+
function TerminalIndicator({ className, ...props }) {
|
|
103
|
+
return /* @__PURE__ */ jsx("span", { "aria-hidden": "true", "data-slot": "terminal-indicator", className: terminalVariants().indicator({ className }), ...props });
|
|
104
|
+
}
|
|
105
|
+
function TerminalTitle({ className, ...props }) {
|
|
106
|
+
return /* @__PURE__ */ jsx("span", { "data-slot": "terminal-title", className: terminalVariants().title({ className }), ...props });
|
|
107
|
+
}
|
|
108
|
+
function TerminalTitleTag({ className, ...props }) {
|
|
109
|
+
return /* @__PURE__ */ jsx("span", { "data-slot": "terminal-title-tag", className: terminalVariants().titleTag({ className }), ...props });
|
|
110
|
+
}
|
|
111
|
+
function TerminalControls({ className, children, ...props }) {
|
|
112
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "terminal-controls", "data-control-size": "sm", className: terminalVariants().controls({ className }), ...props, children: /* @__PURE__ */ jsx(ControlSizeProvider, { size: "sm", children }) });
|
|
113
|
+
}
|
|
114
|
+
function TerminalCaption({ className, ...props }) {
|
|
115
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "terminal-caption", className: terminalVariants().caption({ className }), ...props });
|
|
116
|
+
}
|
|
117
|
+
const captionGlyph = {
|
|
118
|
+
minimize: /* @__PURE__ */ jsx("path", { d: "M0 5.5h10" }),
|
|
119
|
+
maximize: /* @__PURE__ */ jsx("rect", { x: "0.5", y: "0.5", width: "9", height: "9", rx: "1" }),
|
|
120
|
+
restore: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
121
|
+
/* @__PURE__ */ jsx("rect", { x: "0.5", y: "2.5", width: "7", height: "7", rx: "1" }),
|
|
122
|
+
/* @__PURE__ */ jsx("path", { d: "M2.5 2.5V1.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-1" })
|
|
123
|
+
] }),
|
|
124
|
+
close: /* @__PURE__ */ jsx("path", { d: "M0.5 0.5l9 9M9.5 0.5l-9 9" })
|
|
125
|
+
};
|
|
126
|
+
const captionLabel = {
|
|
127
|
+
minimize: "Minimize",
|
|
128
|
+
maximize: "Maximize",
|
|
129
|
+
restore: "Restore",
|
|
130
|
+
close: "Close"
|
|
131
|
+
};
|
|
132
|
+
function TerminalCaptionButton({ className, action, children, "aria-label": ariaLabel, ...props }) {
|
|
133
|
+
return /* @__PURE__ */ jsx(
|
|
134
|
+
"button",
|
|
135
|
+
{
|
|
136
|
+
type: "button",
|
|
137
|
+
"aria-label": ariaLabel ?? captionLabel[action],
|
|
138
|
+
"data-slot": "terminal-caption-button",
|
|
139
|
+
"data-action": action,
|
|
140
|
+
className: terminalVariants({ action }).captionButton({ className }),
|
|
141
|
+
...props,
|
|
142
|
+
children: children ?? /* @__PURE__ */ jsx("svg", { viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "1", "aria-hidden": "true", children: captionGlyph[action] })
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
function TerminalScreen({ className, children, type = "hover", ...props }) {
|
|
147
|
+
const slots = terminalVariants();
|
|
148
|
+
return /* @__PURE__ */ jsx(ScrollArea, { type, className: slots.screenArea({ className }), ...props, children: /* @__PURE__ */ jsx("div", { role: "log", "data-slot": "terminal-screen", className: slots.screen(), children }) });
|
|
149
|
+
}
|
|
150
|
+
function TerminalWatermark({ className, alt = "", ...props }) {
|
|
151
|
+
return (
|
|
152
|
+
// eslint-disable-next-line @next/next/no-img-element -- a decorative stamp, any source
|
|
153
|
+
/* @__PURE__ */ jsx(
|
|
154
|
+
"img",
|
|
155
|
+
{
|
|
156
|
+
alt,
|
|
157
|
+
"aria-hidden": "true",
|
|
158
|
+
draggable: false,
|
|
159
|
+
"data-slot": "terminal-watermark",
|
|
160
|
+
className: terminalVariants().watermark({ className }),
|
|
161
|
+
...props
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
function TerminalLine({ className, tone = "out", onClick, onKeyDown, ...props }) {
|
|
167
|
+
const interactive = onClick !== void 0;
|
|
168
|
+
return /* @__PURE__ */ jsx(
|
|
169
|
+
"div",
|
|
170
|
+
{
|
|
171
|
+
"data-slot": "terminal-line",
|
|
172
|
+
"data-tone": tone,
|
|
173
|
+
role: interactive ? "button" : void 0,
|
|
174
|
+
tabIndex: interactive ? 0 : void 0,
|
|
175
|
+
className: terminalLineVariants({ tone, interactive, className }),
|
|
176
|
+
onClick,
|
|
177
|
+
onKeyDown: (event) => {
|
|
178
|
+
onKeyDown?.(event);
|
|
179
|
+
if (!interactive || event.defaultPrevented) return;
|
|
180
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
181
|
+
event.preventDefault();
|
|
182
|
+
onClick(event);
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
...props
|
|
186
|
+
}
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
function TerminalInputLine({ className, ...props }) {
|
|
190
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "terminal-input-line", className: terminalVariants().inputLine({ className }), ...props });
|
|
191
|
+
}
|
|
192
|
+
function TerminalPrompt({ className, prefix, mark = "> ", ...props }) {
|
|
193
|
+
const slots = terminalVariants();
|
|
194
|
+
return /* @__PURE__ */ jsxs("span", { "data-slot": "terminal-prompt", className: slots.prompt({ className }), ...props, children: [
|
|
195
|
+
/* @__PURE__ */ jsx("span", { "data-slot": "terminal-prompt-prefix", className: slots.promptPrefix(), children: prefix }),
|
|
196
|
+
/* @__PURE__ */ jsx("span", { "data-slot": "terminal-prompt-mark", className: slots.promptMark(), children: mark })
|
|
197
|
+
] });
|
|
198
|
+
}
|
|
199
|
+
function TerminalField({
|
|
200
|
+
className,
|
|
201
|
+
value,
|
|
202
|
+
ghost,
|
|
203
|
+
cursorVisible = true,
|
|
204
|
+
placeholder,
|
|
205
|
+
spellCheck = false,
|
|
206
|
+
autoComplete = "off",
|
|
207
|
+
autoCapitalize = "off",
|
|
208
|
+
autoCorrect = "off",
|
|
209
|
+
onSelect,
|
|
210
|
+
onKeyUp,
|
|
211
|
+
onInput,
|
|
212
|
+
onPointerUp,
|
|
213
|
+
...props
|
|
214
|
+
}) {
|
|
215
|
+
const slots = terminalVariants();
|
|
216
|
+
const [caret, setCaret] = React.useState(null);
|
|
217
|
+
const at = Math.min(caret ?? value.length, value.length);
|
|
218
|
+
const track = (event) => setCaret(event.currentTarget.selectionStart);
|
|
219
|
+
const cursor = (char) => /* @__PURE__ */ jsx("span", { "data-slot": "terminal-cursor", "data-visible": cursorVisible, className: slots.cursor(), children: char });
|
|
220
|
+
const atEnd = at >= value.length;
|
|
221
|
+
const tail = ghost && atEnd ? ghost : !value && placeholder && atEnd ? placeholder : "";
|
|
222
|
+
return /* @__PURE__ */ jsxs("span", { "data-slot": "terminal-field", className: slots.field(), children: [
|
|
223
|
+
/* @__PURE__ */ jsx(
|
|
224
|
+
"input",
|
|
225
|
+
{
|
|
226
|
+
"data-slot": "terminal-input",
|
|
227
|
+
value,
|
|
228
|
+
placeholder,
|
|
229
|
+
spellCheck,
|
|
230
|
+
autoComplete,
|
|
231
|
+
autoCapitalize,
|
|
232
|
+
autoCorrect,
|
|
233
|
+
className: slots.input({ className }),
|
|
234
|
+
onSelect: (event) => {
|
|
235
|
+
onSelect?.(event);
|
|
236
|
+
track(event);
|
|
237
|
+
},
|
|
238
|
+
onKeyUp: (event) => {
|
|
239
|
+
onKeyUp?.(event);
|
|
240
|
+
track(event);
|
|
241
|
+
},
|
|
242
|
+
onInput: (event) => {
|
|
243
|
+
onInput?.(event);
|
|
244
|
+
track(event);
|
|
245
|
+
},
|
|
246
|
+
onPointerUp: (event) => {
|
|
247
|
+
onPointerUp?.(event);
|
|
248
|
+
track(event);
|
|
249
|
+
},
|
|
250
|
+
...props
|
|
251
|
+
}
|
|
252
|
+
),
|
|
253
|
+
/* @__PURE__ */ jsxs("span", { "aria-hidden": "true", "data-slot": "terminal-typed", className: slots.typed(), children: [
|
|
254
|
+
value.slice(0, at),
|
|
255
|
+
atEnd ? tail ? null : cursor("\xA0") : cursor(value[at]),
|
|
256
|
+
atEnd ? null : value.slice(at + 1)
|
|
257
|
+
] }),
|
|
258
|
+
tail ? /* @__PURE__ */ jsxs("span", { "aria-hidden": "true", "data-slot": "terminal-ghost", className: slots.ghost(), children: [
|
|
259
|
+
cursor(tail[0]),
|
|
260
|
+
tail.slice(1)
|
|
261
|
+
] }) : null
|
|
262
|
+
] });
|
|
263
|
+
}
|
|
264
|
+
function TerminalTray({ className, ...props }) {
|
|
265
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "terminal-tray", className: terminalVariants().tray({ className }), ...props });
|
|
266
|
+
}
|
|
267
|
+
export {
|
|
268
|
+
Terminal,
|
|
269
|
+
TerminalBar,
|
|
270
|
+
TerminalCaption,
|
|
271
|
+
TerminalCaptionButton,
|
|
272
|
+
TerminalControls,
|
|
273
|
+
TerminalField,
|
|
274
|
+
TerminalIndicator,
|
|
275
|
+
TerminalInputLine,
|
|
276
|
+
TerminalLine,
|
|
277
|
+
TerminalPrompt,
|
|
278
|
+
TerminalScreen,
|
|
279
|
+
TerminalTab,
|
|
280
|
+
TerminalTitle,
|
|
281
|
+
TerminalTitleTag,
|
|
282
|
+
TerminalTray,
|
|
283
|
+
TerminalWatermark,
|
|
284
|
+
terminalLineVariants,
|
|
285
|
+
terminalVariants
|
|
286
|
+
};
|
|
287
|
+
//# sourceMappingURL=terminal.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/terminal/terminal.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\n\nimport { ScrollArea, type ScrollAreaProps } from \"../scroll-area/index.mjs\"\nimport { ControlSizeProvider } from \"../../../lib/density.mjs\"\nimport { tv, type VariantProps } from \"../../../lib/tv.mjs\"\n\n/*\n * A command line for an app: a title bar, a monospace scrollback and a prompt with ghost\n * completion and a block cursor. The parts only paint. The app holds the lines and decides what\n * Enter, Tab and the arrows do, so the same parts serve a dev console, a search console or a REPL.\n */\nexport const terminalVariants = tv({\n slots: {\n root: \"relative isolate flex flex-col overflow-hidden rounded-sm border border-border-soft bg-popover text-popover-foreground shadow-lg outline-none [--surface:var(--popover)]\",\n bar: \"@container flex h-10 shrink-0 select-none items-center gap-2 border-b border-border bg-muted/40 pl-3 [--surface:color-mix(in_oklab,var(--muted)_40%,var(--popover))]\",\n tab: [\n \"relative -mb-px flex h-8 min-w-0 max-w-60 shrink items-center gap-2 self-end rounded-t-xs border border-b-0 px-3 text-xs first:-ml-1 @max-3xs:px-1.5\",\n \"data-[active=true]:border-border data-[active=true]:bg-popover data-[active=true]:[--surface:var(--popover)]\",\n \"data-[active=false]:border-transparent data-[active=false]:[&_[data-slot=terminal-title]]:text-muted-foreground\",\n ],\n indicator: \"size-2 shrink-0 rounded-full bg-primary\",\n title: \"min-w-0 flex-1 truncate text-xs text-foreground\",\n titleTag: \"text-muted-foreground before:mx-1.5 before:text-muted-foreground/50 before:content-['·']\",\n controls: \"ml-auto flex shrink-0 items-center gap-2 last:pr-1\",\n caption: \"ml-auto flex shrink-0 self-stretch [[data-slot=terminal-controls]+&]:ml-0\",\n captionButton: [\n \"inline-flex w-11.5 cursor-pointer items-center justify-center text-foreground/75 outline-none @max-sm:w-10\",\n \"transition-colors duration-fast ease-out\",\n \"focus-visible:text-foreground focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus\",\n \"[&_svg]:size-2.5 [&_svg]:shrink-0\",\n ],\n screenArea: \"min-h-0 flex-1 font-mono text-[0.8125rem] leading-normal pointer-coarse:text-base\",\n screen: \"px-3 py-2\",\n inputLine: \"flex items-baseline\",\n prompt: \"shrink-0 whitespace-pre\",\n promptPrefix: \"font-semibold text-foreground\",\n promptMark: \"text-muted-foreground\",\n field: \"group/terminal-field relative min-w-0 flex-1 whitespace-pre-wrap break-all\",\n input:\n \"absolute inset-0 size-full border-0 bg-transparent p-0 text-transparent caret-transparent outline-none placeholder:text-transparent selection:bg-foreground/15\",\n typed: \"text-foreground\",\n ghost: \"text-muted-foreground/60\",\n cursor: [\n \"ring-1 ring-inset ring-foreground/40 group-focus-within/terminal-field:ring-0\",\n \"group-focus-within/terminal-field:data-[visible=true]:bg-foreground/80 group-focus-within/terminal-field:data-[visible=true]:text-[color:var(--surface,var(--background))]\",\n ],\n tray: \"flex shrink-0 border-t border-border bg-muted/30 px-3 [--surface:color-mix(in_oklab,var(--muted)_30%,var(--popover))]\",\n watermark:\n \"pointer-events-none absolute inset-0 -z-10 m-auto w-[min(20rem,42%)] select-none rounded-4xl grayscale invert dark:invert-0\",\n },\n variants: {\n movable: {\n true: { bar: \"cursor-grab\" },\n false: {},\n },\n dragging: {\n true: { root: \"select-none\", bar: \"cursor-grabbing\" },\n false: {},\n },\n action: {\n minimize: { captionButton: \"hover:bg-foreground/8 hover:text-foreground active:bg-foreground/12\" },\n maximize: { captionButton: \"hover:bg-foreground/8 hover:text-foreground active:bg-foreground/12\" },\n restore: { captionButton: \"hover:bg-foreground/8 hover:text-foreground active:bg-foreground/12\" },\n close: { captionButton: \"hover:bg-destructive hover:text-destructive-foreground active:bg-destructive/85\" },\n },\n },\n defaultVariants: { movable: false, dragging: false },\n})\n\nexport const terminalLineVariants = tv({\n base: \"whitespace-pre-wrap break-words empty:before:content-['_']\",\n variants: {\n tone: {\n in: \"text-foreground\",\n out: \"text-body\",\n raw: \"text-body\",\n dim: \"text-muted-foreground\",\n err: \"text-destructive-strong\",\n ok: \"text-success-strong\",\n },\n interactive: {\n // The highlight bleeds past the text, so the text keeps its column.\n true: \"-mx-1.5 cursor-pointer px-1.5 outline-none pointer-coarse:py-1 transition-colors duration-fast ease-out relative hover:bg-accent focus-visible:z-10 focus-visible:bg-accent focus-visible:ring-2 focus-visible:ring-focus\",\n false: \"\",\n },\n },\n defaultVariants: { tone: \"out\", interactive: false },\n})\n\nexport type TerminalTone = NonNullable<VariantProps<typeof terminalLineVariants>[\"tone\"]>\nexport type TerminalCaptionAction = \"minimize\" | \"maximize\" | \"restore\" | \"close\"\n\n/* ─── Window ───────────────────────────────────────────────────────────────────────────── */\n\nexport interface TerminalProps extends React.ComponentProps<\"div\"> {\n /** The bar shows a grab cursor. Moving the window is your pointer handler on TerminalBar. */\n movable?: boolean\n /** The grabbing cursor, and no text selection while it lasts. */\n dragging?: boolean\n}\n\nconst TerminalContext = React.createContext({ movable: false, dragging: false })\n\nexport function Terminal({ className, movable = false, dragging = false, ...props }: TerminalProps) {\n const context = React.useMemo(() => ({ movable, dragging }), [movable, dragging])\n return (\n <TerminalContext.Provider value={context}>\n <div\n data-slot=\"terminal\"\n data-movable={movable || undefined}\n data-dragging={dragging || undefined}\n className={terminalVariants({ dragging }).root({ className })}\n {...props}\n />\n </TerminalContext.Provider>\n )\n}\n\nexport function TerminalBar({ className, ...props }: React.ComponentProps<\"div\">) {\n const { movable, dragging } = React.useContext(TerminalContext)\n return <div data-slot=\"terminal-bar\" className={terminalVariants({ movable, dragging }).bar({ className })} {...props} />\n}\n\nexport interface TerminalTabProps extends React.ComponentProps<\"div\"> {\n /** The open tab: the screen's fill and a hairline frame. */\n active?: boolean\n}\n\nexport function TerminalTab({ className, active = true, ...props }: TerminalTabProps) {\n return <div data-slot=\"terminal-tab\" data-active={active} className={terminalVariants().tab({ className })} {...props} />\n}\n\nexport function TerminalIndicator({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span aria-hidden=\"true\" data-slot=\"terminal-indicator\" className={terminalVariants().indicator({ className })} {...props} />\n )\n}\n\nexport function TerminalTitle({ className, ...props }: React.ComponentProps<\"span\">) {\n return <span data-slot=\"terminal-title\" className={terminalVariants().title({ className })} {...props} />\n}\n\nexport function TerminalTitleTag({ className, ...props }: React.ComponentProps<\"span\">) {\n return <span data-slot=\"terminal-title-tag\" className={terminalVariants().titleTag({ className })} {...props} />\n}\n\n/** Your own window buttons at the end of the bar. Controls inside default to the 32px tier. */\nexport function TerminalControls({ className, children, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div data-slot=\"terminal-controls\" data-control-size=\"sm\" className={terminalVariants().controls({ className })} {...props}>\n <ControlSizeProvider size=\"sm\">{children}</ControlSizeProvider>\n </div>\n )\n}\n\nexport function TerminalCaption({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"terminal-caption\" className={terminalVariants().caption({ className })} {...props} />\n}\n\nconst captionGlyph: Record<TerminalCaptionAction, React.ReactNode> = {\n minimize: <path d=\"M0 5.5h10\" />,\n maximize: <rect x=\"0.5\" y=\"0.5\" width=\"9\" height=\"9\" rx=\"1\" />,\n restore: (\n <>\n <rect x=\"0.5\" y=\"2.5\" width=\"7\" height=\"7\" rx=\"1\" />\n <path d=\"M2.5 2.5V1.5a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-1\" />\n </>\n ),\n close: <path d=\"M0.5 0.5l9 9M9.5 0.5l-9 9\" />,\n}\n\nconst captionLabel: Record<TerminalCaptionAction, string> = {\n minimize: \"Minimize\",\n maximize: \"Maximize\",\n restore: \"Restore\",\n close: \"Close\",\n}\n\nexport interface TerminalCaptionButtonProps extends React.ComponentProps<\"button\"> {\n /** Which button: its glyph and its label. close fills red on hover. */\n action: TerminalCaptionAction\n}\n\n/** A 46 by 40 window button with a hairline glyph. What it does is your app's to wire. */\nexport function TerminalCaptionButton({ className, action, children, \"aria-label\": ariaLabel, ...props }: TerminalCaptionButtonProps) {\n return (\n <button\n type=\"button\"\n aria-label={ariaLabel ?? captionLabel[action]}\n data-slot=\"terminal-caption-button\"\n data-action={action}\n className={terminalVariants({ action }).captionButton({ className })}\n {...props}\n >\n {children ?? (\n <svg viewBox=\"0 0 10 10\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1\" aria-hidden=\"true\">\n {captionGlyph[action]}\n </svg>\n )}\n </button>\n )\n}\n\n/* ─── Screen ───────────────────────────────────────────────────────────────────────────── */\n\nexport interface TerminalScreenProps extends Omit<ScrollAreaProps, \"orientation\" | \"draggable\"> {\n /** Fades the edge that still has content beyond it. */\n fade?: boolean\n}\n\n/** The scrollback, on ScrollArea. Its content is a role=\"log\", so new lines are announced. */\nexport function TerminalScreen({ className, children, type = \"hover\", ...props }: TerminalScreenProps) {\n const slots = terminalVariants()\n return (\n <ScrollArea type={type} className={slots.screenArea({ className })} {...props}>\n <div role=\"log\" data-slot=\"terminal-screen\" className={slots.screen()}>\n {children}\n </div>\n </ScrollArea>\n )\n}\n\nexport function TerminalWatermark({ className, alt = \"\", ...props }: React.ComponentProps<\"img\">) {\n return (\n // eslint-disable-next-line @next/next/no-img-element -- a decorative stamp, any source\n <img\n alt={alt}\n aria-hidden=\"true\"\n draggable={false}\n data-slot=\"terminal-watermark\"\n className={terminalVariants().watermark({ className })}\n {...props}\n />\n )\n}\n\nexport interface TerminalLineProps extends Omit<React.ComponentProps<\"div\">, \"onClick\"> {\n /** The line's ink. */\n tone?: TerminalTone\n /** Makes the line a button in the tab order, run by a click, Enter or Space. */\n onClick?: (event: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void\n}\n\nexport function TerminalLine({ className, tone = \"out\", onClick, onKeyDown, ...props }: TerminalLineProps) {\n const interactive = onClick !== undefined\n return (\n <div\n data-slot=\"terminal-line\"\n data-tone={tone}\n role={interactive ? \"button\" : undefined}\n tabIndex={interactive ? 0 : undefined}\n className={terminalLineVariants({ tone, interactive, className })}\n onClick={onClick}\n onKeyDown={(event) => {\n onKeyDown?.(event)\n if (!interactive || event.defaultPrevented) return\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault()\n onClick(event)\n }\n }}\n {...props}\n />\n )\n}\n\nexport function TerminalInputLine({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"terminal-input-line\" className={terminalVariants().inputLine({ className })} {...props} />\n}\n\nexport interface TerminalPromptProps extends Omit<React.ComponentProps<\"span\">, \"prefix\"> {\n /** What comes before the mark: the system, the host, the folder. */\n prefix: React.ReactNode\n /** The prompt mark. Keep its trailing space. */\n mark?: React.ReactNode\n}\n\nexport function TerminalPrompt({ className, prefix, mark = \"> \", ...props }: TerminalPromptProps) {\n const slots = terminalVariants()\n return (\n <span data-slot=\"terminal-prompt\" className={slots.prompt({ className })} {...props}>\n <span data-slot=\"terminal-prompt-prefix\" className={slots.promptPrefix()}>\n {prefix}\n </span>\n <span data-slot=\"terminal-prompt-mark\" className={slots.promptMark()}>\n {mark}\n </span>\n </span>\n )\n}\n\n/* ─── Field ────────────────────────────────────────────────────────────────────────────── */\n\nexport interface TerminalFieldProps extends Omit<React.ComponentProps<\"input\">, \"value\"> {\n /** The controlled text. */\n value: string\n /** The grey completion painted after the caret when it's at the end. */\n ghost?: string\n /** The blink beat while focused. Drive it from a timer to blink; leave it true for a steady cursor. */\n cursorVisible?: boolean\n}\n\n/**\n * Painted text with a block cursor at the caret, under a transparent input that takes the\n * keyboard. The cursor follows the caret on every input, selection change and key.\n */\nexport function TerminalField({\n className,\n value,\n ghost,\n cursorVisible = true,\n placeholder,\n spellCheck = false,\n autoComplete = \"off\",\n autoCapitalize = \"off\",\n autoCorrect = \"off\",\n onSelect,\n onKeyUp,\n onInput,\n onPointerUp,\n ...props\n}: TerminalFieldProps) {\n const slots = terminalVariants()\n const [caret, setCaret] = React.useState<number | null>(null)\n const at = Math.min(caret ?? value.length, value.length)\n const track = (event: React.SyntheticEvent<HTMLInputElement>) => setCaret(event.currentTarget.selectionStart)\n\n const cursor = (char: string) => (\n <span data-slot=\"terminal-cursor\" data-visible={cursorVisible} className={slots.cursor()}>\n {char}\n </span>\n )\n const atEnd = at >= value.length\n const tail = ghost && atEnd ? ghost : !value && placeholder && atEnd ? placeholder : \"\"\n\n return (\n <span data-slot=\"terminal-field\" className={slots.field()}>\n <input\n data-slot=\"terminal-input\"\n value={value}\n placeholder={placeholder}\n spellCheck={spellCheck}\n autoComplete={autoComplete}\n autoCapitalize={autoCapitalize}\n autoCorrect={autoCorrect}\n className={slots.input({ className })}\n onSelect={(event) => {\n onSelect?.(event)\n track(event)\n }}\n onKeyUp={(event) => {\n onKeyUp?.(event)\n track(event)\n }}\n onInput={(event) => {\n onInput?.(event)\n track(event)\n }}\n onPointerUp={(event) => {\n onPointerUp?.(event)\n track(event)\n }}\n {...props}\n />\n <span aria-hidden=\"true\" data-slot=\"terminal-typed\" className={slots.typed()}>\n {value.slice(0, at)}\n {atEnd ? (tail ? null : cursor(\" \")) : cursor(value[at])}\n {atEnd ? null : value.slice(at + 1)}\n </span>\n {tail ? (\n <span aria-hidden=\"true\" data-slot=\"terminal-ghost\" className={slots.ghost()}>\n {cursor(tail[0])}\n {tail.slice(1)}\n </span>\n ) : null}\n </span>\n )\n}\n\nexport function TerminalTray({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"terminal-tray\" className={terminalVariants().tray({ className })} {...props} />\n}\n"],"mappings":";AA6GI,SAwDA,UAxDA,KAwDA,YAxDA;AA3GJ,YAAY,WAAW;AAEvB,SAAS,kBAAwC;AACjD,SAAS,2BAA2B;AACpC,SAAS,UAA6B;AAO/B,MAAM,mBAAmB,GAAG;AAAA,EACjC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,KAAK;AAAA,IACL,KAAK;AAAA,MACH;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,WAAW;AAAA,IACX,OAAO;AAAA,IACP,UAAU;AAAA,IACV,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,MACb;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,OACE;AAAA,IACF,OAAO;AAAA,IACP,OAAO;AAAA,IACP,QAAQ;AAAA,MACN;AAAA,MACA;AAAA,IACF;AAAA,IACA,MAAM;AAAA,IACN,WACE;AAAA,EACJ;AAAA,EACA,UAAU;AAAA,IACR,SAAS;AAAA,MACP,MAAM,EAAE,KAAK,cAAc;AAAA,MAC3B,OAAO,CAAC;AAAA,IACV;AAAA,IACA,UAAU;AAAA,MACR,MAAM,EAAE,MAAM,eAAe,KAAK,kBAAkB;AAAA,MACpD,OAAO,CAAC;AAAA,IACV;AAAA,IACA,QAAQ;AAAA,MACN,UAAU,EAA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MACtD,QAAQ,OAAO,MAAM,MAAM,KAAK,CAAC;AAAA,OACpC;AAAA,IACC,OACC,qBAAC,UAAK,eAAY,QAAO,aAAU,kBAAiB,WAAW,MAAM,MAAM,GACxE;AAAA,aAAO,KAAK,CAAC,CAAC;AAAA,MACd,KAAK,MAAM,CAAC;AAAA,OACf,IACE;AAAA,KACN;AAEJ;AAEO,SAAS,aAAa,EAAE,WAAW,GAAG,MAAM,GAAgC;AACjF,SAAO,oBAAC,SAAI,aAAU,iBAAgB,WAAW,iBAAiB,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OAAO;AACtG;","names":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Textarea,
|
|
3
|
+
TextareaRoot,
|
|
4
|
+
TextareaField,
|
|
5
|
+
TextareaFooter,
|
|
6
|
+
TextareaCount,
|
|
7
|
+
TextareaLabel,
|
|
8
|
+
TextareaHint,
|
|
9
|
+
textareaVariants
|
|
10
|
+
} from "./textarea.mjs";
|
|
11
|
+
export {
|
|
12
|
+
Textarea,
|
|
13
|
+
TextareaCount,
|
|
14
|
+
TextareaField,
|
|
15
|
+
TextareaFooter,
|
|
16
|
+
TextareaHint,
|
|
17
|
+
TextareaLabel,
|
|
18
|
+
TextareaRoot,
|
|
19
|
+
textareaVariants
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/textarea/index.ts"],"sourcesContent":["export {\n Textarea,\n TextareaRoot,\n TextareaField,\n TextareaFooter,\n TextareaCount,\n TextareaLabel,\n TextareaHint,\n textareaVariants,\n type TextareaProps,\n type TextareaRootProps,\n type TextareaFieldProps,\n type TextareaCountProps,\n type TextareaLabelProps,\n type TextareaHintProps,\n type TextareaResize,\n} from \"./textarea.mjs\"\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAQK;","names":[]}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Notches } from "atoms-icons";
|
|
5
|
+
import { Hint, Label } from "../label/index.mjs";
|
|
6
|
+
import { useControlSize } from "../../../lib/density.mjs";
|
|
7
|
+
import { useFieldContext } from "../../../lib/field-context.mjs";
|
|
8
|
+
import { tv } from "../../../lib/tv.mjs";
|
|
9
|
+
const textareaVariants = tv({
|
|
10
|
+
slots: {
|
|
11
|
+
root: [
|
|
12
|
+
"group/textarea relative flex flex-col w-full overflow-hidden rounded-lg border bg-[var(--surface,var(--background))]",
|
|
13
|
+
"transition-[border-color,box-shadow] duration-fast ease-out focus-within:outline-none autofill-tint"
|
|
14
|
+
],
|
|
15
|
+
field: [
|
|
16
|
+
"w-full resize-none bg-transparent outline-none text-foreground placeholder:text-placeholder disabled:cursor-not-allowed",
|
|
17
|
+
"autofill-clear"
|
|
18
|
+
],
|
|
19
|
+
fieldText: "text-sm pointer-coarse:text-base",
|
|
20
|
+
grip: [
|
|
21
|
+
"absolute right-1.5 bottom-1.5 z-10 flex size-4 items-center justify-center touch-none text-muted-foreground/70",
|
|
22
|
+
"transition-colors duration-fast ease-out hover:text-foreground",
|
|
23
|
+
"before:absolute before:-inset-2 before:content-[''] group-has-[[data-auto-resize]]/textarea:hidden"
|
|
24
|
+
],
|
|
25
|
+
footer: "flex shrink-0 items-center justify-between gap-2 text-muted-foreground px-3 pb-2 text-xs",
|
|
26
|
+
count: "shrink-0 whitespace-nowrap tabular-nums select-none text-xs"
|
|
27
|
+
},
|
|
28
|
+
variants: {
|
|
29
|
+
hasError: {
|
|
30
|
+
true: { root: "border-destructive focus-within:border-destructive focus-within:destructive-ring" },
|
|
31
|
+
false: { root: "border-input focus-within:border-focus focus-within:focus-ring" }
|
|
32
|
+
},
|
|
33
|
+
disabled: {
|
|
34
|
+
true: { root: "opacity-50 pointer-events-none select-none" },
|
|
35
|
+
false: {}
|
|
36
|
+
},
|
|
37
|
+
size: {
|
|
38
|
+
sm: { field: "min-h-16 px-3 py-2" },
|
|
39
|
+
md: { field: "min-h-20 px-3 py-2.5" },
|
|
40
|
+
lg: { field: "min-h-24 px-3.5 py-3" }
|
|
41
|
+
},
|
|
42
|
+
resize: {
|
|
43
|
+
none: {},
|
|
44
|
+
vertical: { grip: "cursor-ns-resize" },
|
|
45
|
+
horizontal: { grip: "cursor-ew-resize" },
|
|
46
|
+
both: { grip: "cursor-nwse-resize" }
|
|
47
|
+
},
|
|
48
|
+
over: {
|
|
49
|
+
true: { count: "text-destructive" },
|
|
50
|
+
false: {}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
defaultVariants: { hasError: false, disabled: false, size: "sm", resize: "vertical", over: false }
|
|
54
|
+
});
|
|
55
|
+
const TextareaContext = React.createContext(null);
|
|
56
|
+
function TextareaRoot({
|
|
57
|
+
className,
|
|
58
|
+
size: sizeProp,
|
|
59
|
+
density,
|
|
60
|
+
resize = "vertical",
|
|
61
|
+
hasError,
|
|
62
|
+
disabled,
|
|
63
|
+
children,
|
|
64
|
+
...props
|
|
65
|
+
}) {
|
|
66
|
+
const field = useFieldContext();
|
|
67
|
+
const size = useControlSize(sizeProp, density);
|
|
68
|
+
const isError = hasError ?? field?.hasError ?? false;
|
|
69
|
+
const isDisabled = disabled ?? field?.disabled ?? false;
|
|
70
|
+
const fieldRef = React.useRef(null);
|
|
71
|
+
const setField = React.useCallback((node) => {
|
|
72
|
+
fieldRef.current = node;
|
|
73
|
+
}, []);
|
|
74
|
+
const rootRef = React.useRef(null);
|
|
75
|
+
const slots = textareaVariants({ hasError: isError, disabled: isDisabled, resize });
|
|
76
|
+
const context = React.useMemo(
|
|
77
|
+
() => ({ size, resize, hasError: isError, disabled: isDisabled, setField }),
|
|
78
|
+
[size, resize, isError, isDisabled, setField]
|
|
79
|
+
);
|
|
80
|
+
const startDrag = (event) => {
|
|
81
|
+
const fieldEl = fieldRef.current;
|
|
82
|
+
if (!fieldEl || event.button !== 0) return;
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
const root = rootRef.current;
|
|
85
|
+
const start = { x: event.clientX, y: event.clientY, h: fieldEl.offsetHeight, w: root?.offsetWidth ?? 0 };
|
|
86
|
+
const grip = event.currentTarget;
|
|
87
|
+
try {
|
|
88
|
+
grip.setPointerCapture(event.pointerId);
|
|
89
|
+
} catch {
|
|
90
|
+
}
|
|
91
|
+
const move = (e) => {
|
|
92
|
+
if (resize === "vertical" || resize === "both") fieldEl.style.height = `${Math.max(0, start.h + e.clientY - start.y)}px`;
|
|
93
|
+
if ((resize === "horizontal" || resize === "both") && root) {
|
|
94
|
+
root.style.width = `${Math.max(0, start.w + e.clientX - start.x)}px`;
|
|
95
|
+
root.style.maxWidth = "100%";
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
const end = () => {
|
|
99
|
+
window.removeEventListener("pointermove", move);
|
|
100
|
+
window.removeEventListener("pointerup", end);
|
|
101
|
+
window.removeEventListener("pointercancel", end);
|
|
102
|
+
};
|
|
103
|
+
window.addEventListener("pointermove", move);
|
|
104
|
+
window.addEventListener("pointerup", end);
|
|
105
|
+
window.addEventListener("pointercancel", end);
|
|
106
|
+
};
|
|
107
|
+
return /* @__PURE__ */ jsx(TextareaContext.Provider, { value: context, children: /* @__PURE__ */ jsxs(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
ref: rootRef,
|
|
111
|
+
"data-slot": "textarea-root",
|
|
112
|
+
"data-error": isError || void 0,
|
|
113
|
+
"data-disabled": isDisabled || void 0,
|
|
114
|
+
className: slots.root({ className }),
|
|
115
|
+
...props,
|
|
116
|
+
children: [
|
|
117
|
+
children,
|
|
118
|
+
resize === "none" ? null : /* @__PURE__ */ jsx(
|
|
119
|
+
"span",
|
|
120
|
+
{
|
|
121
|
+
"aria-hidden": "true",
|
|
122
|
+
"data-slot": "textarea-grip",
|
|
123
|
+
className: slots.grip(),
|
|
124
|
+
onPointerDown: startDrag,
|
|
125
|
+
onDoubleClick: () => {
|
|
126
|
+
if (fieldRef.current) fieldRef.current.style.height = "";
|
|
127
|
+
if (rootRef.current) rootRef.current.style.width = "";
|
|
128
|
+
},
|
|
129
|
+
children: /* @__PURE__ */ jsx(Notches, { className: "size-3.5" })
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
) });
|
|
135
|
+
}
|
|
136
|
+
const supportsFieldSizing = () => typeof CSS !== "undefined" && typeof CSS.supports === "function" && CSS.supports("field-sizing", "content");
|
|
137
|
+
function TextareaField({
|
|
138
|
+
className,
|
|
139
|
+
autoResize = false,
|
|
140
|
+
showCount = false,
|
|
141
|
+
id,
|
|
142
|
+
disabled,
|
|
143
|
+
required,
|
|
144
|
+
value,
|
|
145
|
+
defaultValue,
|
|
146
|
+
maxLength,
|
|
147
|
+
onChange,
|
|
148
|
+
"aria-invalid": ariaInvalid,
|
|
149
|
+
"aria-describedby": ariaDescribedBy,
|
|
150
|
+
ref,
|
|
151
|
+
...props
|
|
152
|
+
}) {
|
|
153
|
+
const root = React.useContext(TextareaContext);
|
|
154
|
+
const field = useFieldContext();
|
|
155
|
+
const size = useControlSize(root?.size);
|
|
156
|
+
const isError = root?.hasError ?? field?.hasError ?? false;
|
|
157
|
+
const isDisabled = disabled ?? root?.disabled ?? field?.disabled ?? false;
|
|
158
|
+
const slots = textareaVariants({ size });
|
|
159
|
+
const elRef = React.useRef(null);
|
|
160
|
+
const [ownLength, setOwnLength] = React.useState(() => String(defaultValue ?? "").length);
|
|
161
|
+
const length = value !== void 0 ? String(value).length : ownLength;
|
|
162
|
+
const setRoot = root?.setField;
|
|
163
|
+
const setRef = React.useCallback(
|
|
164
|
+
(node) => {
|
|
165
|
+
elRef.current = node;
|
|
166
|
+
setRoot?.(node);
|
|
167
|
+
if (typeof ref === "function") ref(node);
|
|
168
|
+
else if (ref) ref.current = node;
|
|
169
|
+
},
|
|
170
|
+
[ref, setRoot]
|
|
171
|
+
);
|
|
172
|
+
const fit = React.useCallback(() => {
|
|
173
|
+
const el = elRef.current;
|
|
174
|
+
if (!autoResize || !el || supportsFieldSizing()) return;
|
|
175
|
+
el.style.height = "auto";
|
|
176
|
+
el.style.height = `${el.scrollHeight}px`;
|
|
177
|
+
}, [autoResize]);
|
|
178
|
+
React.useLayoutEffect(() => {
|
|
179
|
+
fit();
|
|
180
|
+
}, [fit, value]);
|
|
181
|
+
const textarea = /* @__PURE__ */ jsx(
|
|
182
|
+
"textarea",
|
|
183
|
+
{
|
|
184
|
+
ref: setRef,
|
|
185
|
+
"data-slot": "textarea-field",
|
|
186
|
+
"data-auto-resize": autoResize || void 0,
|
|
187
|
+
id: id ?? field?.id,
|
|
188
|
+
disabled: isDisabled,
|
|
189
|
+
required: required ?? (field?.required || void 0),
|
|
190
|
+
"aria-invalid": ariaInvalid ?? (isError || void 0),
|
|
191
|
+
"aria-describedby": ariaDescribedBy ?? field?.describedBy,
|
|
192
|
+
value,
|
|
193
|
+
defaultValue,
|
|
194
|
+
maxLength,
|
|
195
|
+
className: slots.field({
|
|
196
|
+
className: [slots.fieldText(), autoResize && "field-sizing-content resize-none", className]
|
|
197
|
+
}),
|
|
198
|
+
onChange: (event) => {
|
|
199
|
+
onChange?.(event);
|
|
200
|
+
if (value === void 0) setOwnLength(event.target.value.length);
|
|
201
|
+
fit();
|
|
202
|
+
},
|
|
203
|
+
...props
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
if (!showCount) return textarea;
|
|
207
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
208
|
+
textarea,
|
|
209
|
+
/* @__PURE__ */ jsx(TextareaFooter, { children: /* @__PURE__ */ jsx(TextareaCount, { current: length, max: maxLength }) })
|
|
210
|
+
] });
|
|
211
|
+
}
|
|
212
|
+
function TextareaFooter({ className, ...props }) {
|
|
213
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "textarea-footer", className: textareaVariants().footer({ className }), ...props });
|
|
214
|
+
}
|
|
215
|
+
function TextareaCount({ className, current, max, ...props }) {
|
|
216
|
+
const over = max !== void 0 && current > max;
|
|
217
|
+
return /* @__PURE__ */ jsx(
|
|
218
|
+
"span",
|
|
219
|
+
{
|
|
220
|
+
"data-slot": "textarea-count",
|
|
221
|
+
"data-over": over || void 0,
|
|
222
|
+
"aria-live": "polite",
|
|
223
|
+
className: textareaVariants({ over }).count({ className }),
|
|
224
|
+
...props,
|
|
225
|
+
children: max !== void 0 ? `${current} / ${max}` : current
|
|
226
|
+
}
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
const TextareaLabel = Label;
|
|
230
|
+
const TextareaHint = Hint;
|
|
231
|
+
function Textarea({ rootClassName, hasError, disabled, size, resize, rows = 3, ...props }) {
|
|
232
|
+
return /* @__PURE__ */ jsx(TextareaRoot, { className: rootClassName, hasError, disabled, size, resize, children: /* @__PURE__ */ jsx(TextareaField, { rows, ...props }) });
|
|
233
|
+
}
|
|
234
|
+
export {
|
|
235
|
+
Textarea,
|
|
236
|
+
TextareaCount,
|
|
237
|
+
TextareaField,
|
|
238
|
+
TextareaFooter,
|
|
239
|
+
TextareaHint,
|
|
240
|
+
TextareaLabel,
|
|
241
|
+
TextareaRoot,
|
|
242
|
+
textareaVariants
|
|
243
|
+
};
|
|
244
|
+
//# sourceMappingURL=textarea.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/ui/textarea/textarea.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Notches } from \"atoms-icons\"\n\nimport { Hint, Label, type HintProps, type LabelProps } from \"../label/index.mjs\"\nimport { 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 * A multi-line text field in the Input frame: the same border, focus ring, error tone and autofill\n * wash, with the text on a 16px floor on touch screens. The root owns the frame, the size, the\n * resize axis and the error state and shares them through context; the field is the <textarea>,\n * so a footer and a counter can sit inside the same border. The native resize corner is off: a\n * grip drawn in the corner drags the height instead, so it sits level with the counter.\n */\n\nexport const textareaVariants = tv({\n slots: {\n root: [\n \"group/textarea relative flex flex-col w-full overflow-hidden rounded-lg border bg-[var(--surface,var(--background))]\",\n \"transition-[border-color,box-shadow] duration-fast ease-out focus-within:outline-none autofill-tint\",\n ],\n field: [\n \"w-full resize-none bg-transparent outline-none text-foreground placeholder:text-placeholder disabled:cursor-not-allowed\",\n \"autofill-clear\",\n ],\n fieldText: \"text-sm pointer-coarse:text-base\",\n grip: [\n \"absolute right-1.5 bottom-1.5 z-10 flex size-4 items-center justify-center touch-none text-muted-foreground/70\",\n \"transition-colors duration-fast ease-out hover:text-foreground\",\n \"before:absolute before:-inset-2 before:content-[''] group-has-[[data-auto-resize]]/textarea:hidden\",\n ],\n footer: \"flex shrink-0 items-center justify-between gap-2 text-muted-foreground px-3 pb-2 text-xs\",\n count: \"shrink-0 whitespace-nowrap tabular-nums select-none text-xs\",\n },\n variants: {\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 size: {\n sm: { field: \"min-h-16 px-3 py-2\" },\n md: { field: \"min-h-20 px-3 py-2.5\" },\n lg: { field: \"min-h-24 px-3.5 py-3\" },\n },\n resize: {\n none: {},\n vertical: { grip: \"cursor-ns-resize\" },\n horizontal: { grip: \"cursor-ew-resize\" },\n both: { grip: \"cursor-nwse-resize\" },\n },\n over: {\n true: { count: \"text-destructive\" },\n false: {},\n },\n },\n defaultVariants: { hasError: false, disabled: false, size: \"sm\", resize: \"vertical\", over: false },\n})\n\nexport type TextareaResize = \"none\" | \"vertical\" | \"horizontal\" | \"both\"\n\ninterface TextareaContextValue {\n size: ControlSize\n resize: TextareaResize\n hasError: boolean\n disabled: boolean\n /** The field registers its element, so the grip can size it. */\n setField: (node: HTMLTextAreaElement | null) => void\n}\n\nconst TextareaContext = React.createContext<TextareaContextValue | null>(null)\n\n/* ─── TextareaRoot ─────────────────────────────────────────────────────────────────────── */\n\nexport interface TextareaRootProps extends React.ComponentProps<\"div\"> {\n /** Padding, text and minimum height. Unset, it follows a Form, then the ambient density. */\n size?: ControlSize\n /** Picks the default size: compact to sm, comfortable to md. An explicit size wins. */\n density?: Density\n /** The corner drag handle and the axis it resizes. */\n resize?: TextareaResize\n /** Destructive border and focus ring, and aria-invalid on the field. Inherited from a Field. */\n hasError?: boolean\n /** Dims the root and disables the field. Inherited from a Field. */\n disabled?: boolean\n}\n\nexport function TextareaRoot({\n className,\n size: sizeProp,\n density,\n resize = \"vertical\",\n hasError,\n disabled,\n children,\n ...props\n}: TextareaRootProps) {\n const field = useFieldContext()\n const size = useControlSize(sizeProp, density)\n const isError = hasError ?? field?.hasError ?? false\n const isDisabled = disabled ?? field?.disabled ?? false\n const fieldRef = React.useRef<HTMLTextAreaElement | null>(null)\n const setField = React.useCallback((node: HTMLTextAreaElement | null) => {\n fieldRef.current = node\n }, [])\n const rootRef = React.useRef<HTMLDivElement | null>(null)\n const slots = textareaVariants({ hasError: isError, disabled: isDisabled, resize })\n\n const context = React.useMemo<TextareaContextValue>(\n () => ({ size, resize, hasError: isError, disabled: isDisabled, setField }),\n [size, resize, isError, isDisabled, setField],\n )\n\n // The grip drags the field's height (and the root's width for a horizontal axis), never below\n // the size's minimum: the field's own min-height holds that floor.\n const startDrag = (event: React.PointerEvent<HTMLSpanElement>) => {\n const fieldEl = fieldRef.current\n if (!fieldEl || event.button !== 0) return\n event.preventDefault()\n const root = rootRef.current\n const start = { x: event.clientX, y: event.clientY, h: fieldEl.offsetHeight, w: root?.offsetWidth ?? 0 }\n const grip = event.currentTarget\n try {\n grip.setPointerCapture(event.pointerId)\n } catch {\n // Synthetic pointers can't be captured; the window listeners below still follow them.\n }\n const move = (e: PointerEvent) => {\n if (resize === \"vertical\" || resize === \"both\") fieldEl.style.height = `${Math.max(0, start.h + e.clientY - start.y)}px`\n if ((resize === \"horizontal\" || resize === \"both\") && root) {\n root.style.width = `${Math.max(0, start.w + e.clientX - start.x)}px`\n root.style.maxWidth = \"100%\"\n }\n }\n const end = () => {\n window.removeEventListener(\"pointermove\", move)\n window.removeEventListener(\"pointerup\", end)\n window.removeEventListener(\"pointercancel\", end)\n }\n window.addEventListener(\"pointermove\", move)\n window.addEventListener(\"pointerup\", end)\n window.addEventListener(\"pointercancel\", end)\n }\n\n return (\n <TextareaContext.Provider value={context}>\n <div\n ref={rootRef}\n data-slot=\"textarea-root\"\n data-error={isError || undefined}\n data-disabled={isDisabled || undefined}\n className={slots.root({ className })}\n {...props}\n >\n {children}\n {resize === \"none\" ? null : (\n <span\n aria-hidden=\"true\"\n data-slot=\"textarea-grip\"\n className={slots.grip()}\n onPointerDown={startDrag}\n onDoubleClick={() => {\n if (fieldRef.current) fieldRef.current.style.height = \"\"\n if (rootRef.current) rootRef.current.style.width = \"\"\n }}\n >\n <Notches className=\"size-3.5\" />\n </span>\n )}\n </div>\n </TextareaContext.Provider>\n )\n}\n\n/* ─── TextareaField ────────────────────────────────────────────────────────────────────── */\n\nexport interface TextareaFieldProps extends React.ComponentProps<\"textarea\"> {\n /** Grows to fit the content (CSS field-sizing, with a scrollHeight fallback); hides the grip. */\n autoResize?: boolean\n /** Renders a footer with a counter below the field. Add maxLength to show current / max. */\n showCount?: boolean\n}\n\nconst supportsFieldSizing = () =>\n typeof CSS !== \"undefined\" && typeof CSS.supports === \"function\" && CSS.supports(\"field-sizing\", \"content\")\n\nexport function TextareaField({\n className,\n autoResize = false,\n showCount = false,\n id,\n disabled,\n required,\n value,\n defaultValue,\n maxLength,\n onChange,\n \"aria-invalid\": ariaInvalid,\n \"aria-describedby\": ariaDescribedBy,\n ref,\n ...props\n}: TextareaFieldProps) {\n const root = React.useContext(TextareaContext)\n const field = useFieldContext()\n const size = useControlSize(root?.size)\n const isError = root?.hasError ?? field?.hasError ?? false\n const isDisabled = disabled ?? root?.disabled ?? field?.disabled ?? false\n const slots = textareaVariants({ size })\n const elRef = React.useRef<HTMLTextAreaElement | null>(null)\n const [ownLength, setOwnLength] = React.useState(() => String(defaultValue ?? \"\").length)\n const length = value !== undefined ? String(value).length : ownLength\n const setRoot = root?.setField\n\n const setRef = React.useCallback(\n (node: HTMLTextAreaElement | null) => {\n elRef.current = node\n setRoot?.(node)\n if (typeof ref === \"function\") ref(node)\n else if (ref) ref.current = node\n },\n [ref, setRoot],\n )\n\n // The fallback for browsers without field-sizing: measure the content on every change.\n const fit = React.useCallback(() => {\n const el = elRef.current\n if (!autoResize || !el || supportsFieldSizing()) return\n el.style.height = \"auto\"\n el.style.height = `${el.scrollHeight}px`\n }, [autoResize])\n React.useLayoutEffect(() => {\n fit()\n }, [fit, value])\n\n const textarea = (\n <textarea\n ref={setRef}\n data-slot=\"textarea-field\"\n data-auto-resize={autoResize || undefined}\n id={id ?? field?.id}\n disabled={isDisabled}\n required={required ?? (field?.required || undefined)}\n aria-invalid={ariaInvalid ?? (isError || undefined)}\n aria-describedby={ariaDescribedBy ?? field?.describedBy}\n value={value}\n defaultValue={defaultValue}\n maxLength={maxLength}\n className={slots.field({\n className: [slots.fieldText(), autoResize && \"field-sizing-content resize-none\", className],\n })}\n onChange={(event) => {\n onChange?.(event)\n if (value === undefined) setOwnLength(event.target.value.length)\n fit()\n }}\n {...props}\n />\n )\n\n if (!showCount) return textarea\n return (\n <>\n {textarea}\n <TextareaFooter>\n <TextareaCount current={length} max={maxLength} />\n </TextareaFooter>\n </>\n )\n}\n\n/* ─── Footer, count, label, hint ───────────────────────────────────────────────────────── */\n\nexport function TextareaFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return <div data-slot=\"textarea-footer\" className={textareaVariants().footer({ className })} {...props} />\n}\n\nexport interface TextareaCountProps extends Omit<React.ComponentProps<\"span\">, \"children\"> {\n /** The current character count. */\n current: number\n /** Optional limit, shown as current / max; the count turns destructive past it. */\n max?: number\n}\n\nexport function TextareaCount({ className, current, max, ...props }: TextareaCountProps) {\n const over = max !== undefined && current > max\n return (\n <span\n data-slot=\"textarea-count\"\n data-over={over || undefined}\n aria-live=\"polite\"\n className={textareaVariants({ over }).count({ className })}\n {...props}\n >\n {max !== undefined ? `${current} / ${max}` : current}\n </span>\n )\n}\n\nexport type TextareaLabelProps = LabelProps\nexport const TextareaLabel = Label\n\nexport type TextareaHintProps = HintProps\nexport const TextareaHint = Hint\n\n/* ─── Textarea: the frame and the field in one ─────────────────────────────────────────── */\n\nexport interface TextareaProps extends React.ComponentProps<\"textarea\"> {\n /** Destructive border and ring, and `aria-invalid`. Inherited from a `Field`. */\n hasError?: boolean\n /** Merged onto the frame; `className` goes to the `<textarea>`. */\n rootClassName?: string\n size?: ControlSize\n resize?: TextareaResize\n}\n\n/** TextareaRoot and TextareaField in one, for a plain multi-line field. */\nexport function Textarea({ rootClassName, hasError, disabled, size, resize, rows = 3, ...props }: TextareaProps) {\n return (\n <TextareaRoot className={rootClassName} hasError={hasError} disabled={disabled} size={size} resize={resize}>\n <TextareaField rows={rows} {...props} />\n </TextareaRoot>\n )\n}\n"],"mappings":";AAwJM,SAmHF,UA/FQ,KApBN;AAtJN,YAAY,WAAW;AACvB,SAAS,eAAe;AAExB,SAAS,MAAM,aAA8C;AAC7D,SAAS,sBAAsD;AAC/D,SAAS,uBAAuB;AAChC,SAAS,UAAU;AAUZ,MAAM,mBAAmB,GAAG;AAAA,EACjC,OAAO;AAAA,IACL,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,IACA,WAAW;AAAA,IACX,MAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,QAAQ;AAAA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