@atmos.build/ui 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/README.md +45 -0
- package/dist/components/alert-dialog.d.ts +14 -0
- package/dist/components/alert-dialog.js +40 -0
- package/dist/components/at-search.d.ts +35 -0
- package/dist/components/at-search.js +57 -0
- package/dist/components/attachment-thumbnail-stack.d.ts +13 -0
- package/dist/components/attachment-thumbnail-stack.js +23 -0
- package/dist/components/audio-preview.d.ts +33 -0
- package/dist/components/audio-preview.js +176 -0
- package/dist/components/avatar-uploader.d.ts +29 -0
- package/dist/components/avatar-uploader.js +67 -0
- package/dist/components/avatar.d.ts +12 -0
- package/dist/components/avatar.js +38 -0
- package/dist/components/badge.d.ts +9 -0
- package/dist/components/badge.js +25 -0
- package/dist/components/button-group.d.ts +12 -0
- package/dist/components/button-group.js +29 -0
- package/dist/components/button.d.ts +10 -0
- package/dist/components/button.js +42 -0
- package/dist/components/calendar.d.ts +26 -0
- package/dist/components/calendar.js +154 -0
- package/dist/components/channel-list.d.ts +33 -0
- package/dist/components/channel-list.js +40 -0
- package/dist/components/charts/area-chart.d.ts +2 -0
- package/dist/components/charts/area-chart.js +5 -0
- package/dist/components/charts/bar-chart.d.ts +2 -0
- package/dist/components/charts/bar-chart.js +58 -0
- package/dist/components/charts/colors.d.ts +2 -0
- package/dist/components/charts/colors.js +42 -0
- package/dist/components/charts/hover.d.ts +20 -0
- package/dist/components/charts/hover.js +31 -0
- package/dist/components/charts/index.d.ts +10 -0
- package/dist/components/charts/index.js +9 -0
- package/dist/components/charts/layout.d.ts +35 -0
- package/dist/components/charts/layout.js +101 -0
- package/dist/components/charts/legend.d.ts +6 -0
- package/dist/components/charts/legend.js +7 -0
- package/dist/components/charts/line-area-chart.d.ts +4 -0
- package/dist/components/charts/line-area-chart.js +86 -0
- package/dist/components/charts/line-chart.d.ts +2 -0
- package/dist/components/charts/line-chart.js +5 -0
- package/dist/components/charts/pie-chart.d.ts +2 -0
- package/dist/components/charts/pie-chart.js +22 -0
- package/dist/components/charts/radar-chart.d.ts +2 -0
- package/dist/components/charts/radar-chart.js +29 -0
- package/dist/components/charts/radial-chart.d.ts +2 -0
- package/dist/components/charts/radial-chart.js +19 -0
- package/dist/components/charts/scatter-chart.d.ts +2 -0
- package/dist/components/charts/scatter-chart.js +16 -0
- package/dist/components/charts/story-data.d.ts +24 -0
- package/dist/components/charts/story-data.js +48 -0
- package/dist/components/charts/types.d.ts +43 -0
- package/dist/components/charts/types.js +1 -0
- package/dist/components/checkbox.d.ts +4 -0
- package/dist/components/checkbox.js +10 -0
- package/dist/components/chip.d.ts +25 -0
- package/dist/components/chip.js +36 -0
- package/dist/components/code-editor-theme.d.ts +19 -0
- package/dist/components/code-editor-theme.js +100 -0
- package/dist/components/collapsible-section-header.d.ts +82 -0
- package/dist/components/collapsible-section-header.js +82 -0
- package/dist/components/collection-view/collection-view-group-settings.d.ts +73 -0
- package/dist/components/collection-view/collection-view-group-settings.js +55 -0
- package/dist/components/collection-view/collection-view-settings.d.ts +115 -0
- package/dist/components/collection-view/collection-view-settings.js +146 -0
- package/dist/components/collection-view/collection-view.d.ts +87 -0
- package/dist/components/collection-view/collection-view.js +95 -0
- package/dist/components/collection-view/index.d.ts +6 -0
- package/dist/components/collection-view/index.js +6 -0
- package/dist/components/collection-view/use-collection-detail-navigation.d.ts +11 -0
- package/dist/components/collection-view/use-collection-detail-navigation.js +12 -0
- package/dist/components/collection-view/use-collection-escape.d.ts +9 -0
- package/dist/components/collection-view/use-collection-escape.js +20 -0
- package/dist/components/collection-view/use-collection-selection.d.ts +42 -0
- package/dist/components/collection-view/use-collection-selection.js +203 -0
- package/dist/components/color-picker.d.ts +18 -0
- package/dist/components/color-picker.js +77 -0
- package/dist/components/color-swatch-list.d.ts +16 -0
- package/dist/components/color-swatch-list.js +60 -0
- package/dist/components/combobox/combobox.d.ts +4 -0
- package/dist/components/combobox/combobox.js +70 -0
- package/dist/components/combobox/compound.d.ts +68 -0
- package/dist/components/combobox/compound.js +151 -0
- package/dist/components/combobox/context.d.ts +34 -0
- package/dist/components/combobox/context.js +123 -0
- package/dist/components/combobox/create-step.d.ts +12 -0
- package/dist/components/combobox/create-step.js +8 -0
- package/dist/components/combobox/index.d.ts +10 -0
- package/dist/components/combobox/index.js +5 -0
- package/dist/components/combobox/inline-create-form.d.ts +24 -0
- package/dist/components/combobox/inline-create-form.js +43 -0
- package/dist/components/combobox/types.d.ts +57 -0
- package/dist/components/combobox/types.js +10 -0
- package/dist/components/command.d.ts +35 -0
- package/dist/components/command.js +76 -0
- package/dist/components/comment-pin.d.ts +13 -0
- package/dist/components/comment-pin.js +33 -0
- package/dist/components/confidence-meter.d.ts +11 -0
- package/dist/components/confidence-meter.js +24 -0
- package/dist/components/context-menu.d.ts +31 -0
- package/dist/components/context-menu.js +54 -0
- package/dist/components/copy-button.d.ts +12 -0
- package/dist/components/copy-button.js +32 -0
- package/dist/components/date-picker.d.ts +29 -0
- package/dist/components/date-picker.js +86 -0
- package/dist/components/date-tile.d.ts +11 -0
- package/dist/components/date-tile.js +16 -0
- package/dist/components/date-time-picker.d.ts +25 -0
- package/dist/components/date-time-picker.js +153 -0
- package/dist/components/detail-breadcrumb-utils.d.ts +2 -0
- package/dist/components/detail-breadcrumb-utils.js +18 -0
- package/dist/components/detail-nav-bar.d.ts +28 -0
- package/dist/components/detail-nav-bar.js +28 -0
- package/dist/components/detail-top-bar.d.ts +49 -0
- package/dist/components/detail-top-bar.js +41 -0
- package/dist/components/dialog.d.ts +22 -0
- package/dist/components/dialog.js +51 -0
- package/dist/components/dropdown-menu.d.ts +29 -0
- package/dist/components/dropdown-menu.js +52 -0
- package/dist/components/editable-doc-title.d.ts +17 -0
- package/dist/components/editable-doc-title.js +147 -0
- package/dist/components/empty-state.d.ts +12 -0
- package/dist/components/empty-state.js +6 -0
- package/dist/components/filter-condition-editor.d.ts +18 -0
- package/dist/components/filter-condition-editor.js +102 -0
- package/dist/components/form-dialog.d.ts +30 -0
- package/dist/components/form-dialog.js +52 -0
- package/dist/components/formula-editor.d.ts +18 -0
- package/dist/components/formula-editor.js +154 -0
- package/dist/components/hover-card.d.ts +52 -0
- package/dist/components/hover-card.js +51 -0
- package/dist/components/icon-button.d.ts +15 -0
- package/dist/components/icon-button.js +18 -0
- package/dist/components/inline-alert.d.ts +11 -0
- package/dist/components/inline-alert.js +17 -0
- package/dist/components/input.d.ts +3 -0
- package/dist/components/input.js +7 -0
- package/dist/components/kanban-board.d.ts +27 -0
- package/dist/components/kanban-board.js +145 -0
- package/dist/components/kbd.d.ts +3 -0
- package/dist/components/kbd.js +8 -0
- package/dist/components/label.d.ts +4 -0
- package/dist/components/label.js +9 -0
- package/dist/components/markdown-editor/index.d.ts +4 -0
- package/dist/components/markdown-editor/index.js +2 -0
- package/dist/components/markdown-editor/markdown-editor.d.ts +16 -0
- package/dist/components/markdown-editor/markdown-editor.js +53 -0
- package/dist/components/markdown-editor/serialize.d.ts +12 -0
- package/dist/components/markdown-editor/serialize.js +122 -0
- package/dist/components/markdown-editor/vim.d.ts +8 -0
- package/dist/components/markdown-editor/vim.js +394 -0
- package/dist/components/metric-grid.d.ts +41 -0
- package/dist/components/metric-grid.js +39 -0
- package/dist/components/microphone-priority.d.ts +29 -0
- package/dist/components/microphone-priority.js +15 -0
- package/dist/components/middle-truncate.d.ts +6 -0
- package/dist/components/middle-truncate.js +15 -0
- package/dist/components/multi-combobox.d.ts +48 -0
- package/dist/components/multi-combobox.js +221 -0
- package/dist/components/naut-avatar-engine.d.ts +83 -0
- package/dist/components/naut-avatar-engine.js +803 -0
- package/dist/components/naut-avatar.d.ts +31 -0
- package/dist/components/naut-avatar.js +108 -0
- package/dist/components/navigable-list.d.ts +4 -0
- package/dist/components/navigable-list.js +20 -0
- package/dist/components/note-icon-picker.d.ts +20 -0
- package/dist/components/note-icon-picker.js +84 -0
- package/dist/components/note-icon.d.ts +690 -0
- package/dist/components/note-icon.js +353 -0
- package/dist/components/note-row.d.ts +33 -0
- package/dist/components/note-row.js +29 -0
- package/dist/components/overlapping-dots.d.ts +10 -0
- package/dist/components/overlapping-dots.js +13 -0
- package/dist/components/overview-card.d.ts +12 -0
- package/dist/components/overview-card.js +9 -0
- package/dist/components/panel-header.d.ts +8 -0
- package/dist/components/panel-header.js +6 -0
- package/dist/components/panel-section-states.d.ts +9 -0
- package/dist/components/panel-section-states.js +10 -0
- package/dist/components/person-avatar.d.ts +10 -0
- package/dist/components/person-avatar.js +23 -0
- package/dist/components/photo-avatar.d.ts +11 -0
- package/dist/components/photo-avatar.js +24 -0
- package/dist/components/picker-field.d.ts +23 -0
- package/dist/components/picker-field.js +24 -0
- package/dist/components/popover-stack.d.ts +26 -0
- package/dist/components/popover-stack.js +89 -0
- package/dist/components/popover.d.ts +12 -0
- package/dist/components/popover.js +31 -0
- package/dist/components/portal-login-barrier.d.ts +12 -0
- package/dist/components/portal-login-barrier.js +41 -0
- package/dist/components/presence-dot.d.ts +8 -0
- package/dist/components/presence-dot.js +15 -0
- package/dist/components/presence-overlay.d.ts +27 -0
- package/dist/components/presence-overlay.js +34 -0
- package/dist/components/property-list.d.ts +64 -0
- package/dist/components/property-list.js +313 -0
- package/dist/components/property-panel.d.ts +54 -0
- package/dist/components/property-panel.js +87 -0
- package/dist/components/property-selector.d.ts +36 -0
- package/dist/components/property-selector.js +141 -0
- package/dist/components/provenance-chip.d.ts +12 -0
- package/dist/components/provenance-chip.js +17 -0
- package/dist/components/qr-code.d.ts +13 -0
- package/dist/components/qr-code.js +42 -0
- package/dist/components/qr-encode.d.ts +2 -0
- package/dist/components/qr-encode.js +469 -0
- package/dist/components/quantity-stepper.d.ts +25 -0
- package/dist/components/quantity-stepper.js +43 -0
- package/dist/components/radio-group.d.ts +5 -0
- package/dist/components/radio-group.js +13 -0
- package/dist/components/rename-dialog.d.ts +19 -0
- package/dist/components/rename-dialog.js +35 -0
- package/dist/components/row-surface.d.ts +1 -0
- package/dist/components/row-surface.js +5 -0
- package/dist/components/row-trailing.d.ts +30 -0
- package/dist/components/row-trailing.js +59 -0
- package/dist/components/run-status-badge.d.ts +16 -0
- package/dist/components/run-status-badge.js +43 -0
- package/dist/components/scroll-area.d.ts +5 -0
- package/dist/components/scroll-area.js +12 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/select.js +39 -0
- package/dist/components/selectable-card.d.ts +33 -0
- package/dist/components/selectable-card.js +66 -0
- package/dist/components/separator.d.ts +3 -0
- package/dist/components/separator.js +8 -0
- package/dist/components/settings-dialog-shell.d.ts +46 -0
- package/dist/components/settings-dialog-shell.js +48 -0
- package/dist/components/shimmer-text.d.ts +8 -0
- package/dist/components/shimmer-text.js +26 -0
- package/dist/components/side-panel-tokens.d.ts +27 -0
- package/dist/components/side-panel-tokens.js +26 -0
- package/dist/components/side-panel.d.ts +94 -0
- package/dist/components/side-panel.js +106 -0
- package/dist/components/skeleton.d.ts +2 -0
- package/dist/components/skeleton.js +6 -0
- package/dist/components/sortable.d.ts +65 -0
- package/dist/components/sortable.js +110 -0
- package/dist/components/spec-strip.d.ts +18 -0
- package/dist/components/spec-strip.js +15 -0
- package/dist/components/speech-playback.d.ts +25 -0
- package/dist/components/speech-playback.js +35 -0
- package/dist/components/sql-editor.d.ts +13 -0
- package/dist/components/sql-editor.js +228 -0
- package/dist/components/stat-tile.d.ts +7 -0
- package/dist/components/stat-tile.js +6 -0
- package/dist/components/status-badge.d.ts +17 -0
- package/dist/components/status-badge.js +8 -0
- package/dist/components/status-tone.d.ts +9 -0
- package/dist/components/status-tone.js +10 -0
- package/dist/components/sticky-header-fade.d.ts +8 -0
- package/dist/components/sticky-header-fade.js +11 -0
- package/dist/components/swatch-button.d.ts +14 -0
- package/dist/components/swatch-button.js +25 -0
- package/dist/components/switch.d.ts +6 -0
- package/dist/components/switch.js +9 -0
- package/dist/components/system-load/index.d.ts +6 -0
- package/dist/components/system-load/index.js +6 -0
- package/dist/components/system-load/load-block.d.ts +20 -0
- package/dist/components/system-load/load-block.js +23 -0
- package/dist/components/system-load/load-grid.d.ts +16 -0
- package/dist/components/system-load/load-grid.js +23 -0
- package/dist/components/system-load/load-meter.d.ts +25 -0
- package/dist/components/system-load/load-meter.js +29 -0
- package/dist/components/system-load/load-tone.d.ts +21 -0
- package/dist/components/system-load/load-tone.js +29 -0
- package/dist/components/system-load/meter-row.d.ts +31 -0
- package/dist/components/system-load/meter-row.js +29 -0
- package/dist/components/system-load/resource-meter.d.ts +19 -0
- package/dist/components/system-load/resource-meter.js +15 -0
- package/dist/components/tab-title-bar.d.ts +12 -0
- package/dist/components/tab-title-bar.js +9 -0
- package/dist/components/table.d.ts +10 -0
- package/dist/components/table.js +29 -0
- package/dist/components/tabs.d.ts +11 -0
- package/dist/components/tabs.js +97 -0
- package/dist/components/template-chip-input.d.ts +36 -0
- package/dist/components/template-chip-input.js +271 -0
- package/dist/components/template-input.d.ts +24 -0
- package/dist/components/template-input.js +57 -0
- package/dist/components/terminal-spinner.d.ts +11 -0
- package/dist/components/terminal-spinner.js +48 -0
- package/dist/components/textarea.d.ts +3 -0
- package/dist/components/textarea.js +7 -0
- package/dist/components/time-column.d.ts +24 -0
- package/dist/components/time-column.js +60 -0
- package/dist/components/timestamped-transcript.d.ts +38 -0
- package/dist/components/timestamped-transcript.js +29 -0
- package/dist/components/timezone-picker.d.ts +22 -0
- package/dist/components/timezone-picker.js +60 -0
- package/dist/components/tooltip.d.ts +11 -0
- package/dist/components/tooltip.js +29 -0
- package/dist/components/transcription-overlay.d.ts +47 -0
- package/dist/components/transcription-overlay.js +30 -0
- package/dist/components/usage-bar.d.ts +17 -0
- package/dist/components/usage-bar.js +26 -0
- package/dist/components/view-query-bar.d.ts +13 -0
- package/dist/components/view-query-bar.js +13 -0
- package/dist/components/view-query-controls.d.ts +159 -0
- package/dist/components/view-query-controls.js +109 -0
- package/dist/components/view-save-menu.d.ts +20 -0
- package/dist/components/view-save-menu.js +13 -0
- package/dist/components/view-sort-editor.d.ts +40 -0
- package/dist/components/view-sort-editor.js +47 -0
- package/dist/components/voice-line.d.ts +37 -0
- package/dist/components/voice-line.js +293 -0
- package/dist/components/weekly-schedule-editor.d.ts +15 -0
- package/dist/components/weekly-schedule-editor.js +28 -0
- package/dist/flow/canvas/canvas-frame.d.ts +160 -0
- package/dist/flow/canvas/canvas-frame.js +521 -0
- package/dist/flow/canvas/collaborator-layer.d.ts +12 -0
- package/dist/flow/canvas/collaborator-layer.js +43 -0
- package/dist/flow/canvas/connector-edge.d.ts +22 -0
- package/dist/flow/canvas/connector-edge.js +61 -0
- package/dist/flow/canvas/editor-context.d.ts +23 -0
- package/dist/flow/canvas/editor-context.js +6 -0
- package/dist/flow/canvas/graph-core.d.ts +60 -0
- package/dist/flow/canvas/graph-core.js +296 -0
- package/dist/flow/canvas/minimap-sticky-overlay.d.ts +4 -0
- package/dist/flow/canvas/minimap-sticky-overlay.js +45 -0
- package/dist/flow/canvas/node-card.d.ts +46 -0
- package/dist/flow/canvas/node-card.js +56 -0
- package/dist/flow/canvas/node-library.d.ts +40 -0
- package/dist/flow/canvas/node-library.js +54 -0
- package/dist/flow/canvas/sticky-notes.d.ts +25 -0
- package/dist/flow/canvas/sticky-notes.js +101 -0
- package/dist/flow/collaborative-graph-presence.d.ts +28 -0
- package/dist/flow/collaborative-graph-presence.js +55 -0
- package/dist/flow/collaborative-graph-sync.d.ts +40 -0
- package/dist/flow/collaborative-graph-sync.js +127 -0
- package/dist/flow/editor/adapter.d.ts +64 -0
- package/dist/flow/editor/adapter.js +1 -0
- package/dist/flow/editor/command-registry.d.ts +10 -0
- package/dist/flow/editor/command-registry.js +35 -0
- package/dist/flow/editor/dag-canvas.d.ts +18 -0
- package/dist/flow/editor/dag-canvas.js +33 -0
- package/dist/flow/editor/flow-editor.d.ts +54 -0
- package/dist/flow/editor/flow-editor.js +199 -0
- package/dist/flow/editor/issues-popover.d.ts +11 -0
- package/dist/flow/editor/issues-popover.js +70 -0
- package/dist/flow/editor/library-rail.d.ts +19 -0
- package/dist/flow/editor/library-rail.js +25 -0
- package/dist/flow/editor/make-controller.d.ts +18 -0
- package/dist/flow/editor/make-controller.js +44 -0
- package/dist/flow/editor/node-chip.d.ts +2 -0
- package/dist/flow/editor/node-chip.js +16 -0
- package/dist/flow/editor/save-publish-bar.d.ts +27 -0
- package/dist/flow/editor/save-publish-bar.js +14 -0
- package/dist/flow/editor/settings-dialog.d.ts +11 -0
- package/dist/flow/editor/settings-dialog.js +11 -0
- package/dist/flow/editor/settings-shell.d.ts +21 -0
- package/dist/flow/editor/settings-shell.js +20 -0
- package/dist/flow/editor/side-rail.d.ts +22 -0
- package/dist/flow/editor/side-rail.js +15 -0
- package/dist/flow/editor/use-dag-editor.d.ts +94 -0
- package/dist/flow/editor/use-dag-editor.js +502 -0
- package/dist/flow/index.d.ts +25 -0
- package/dist/flow/index.js +25 -0
- package/dist/flow/presence-motion.d.ts +10 -0
- package/dist/flow/presence-motion.js +88 -0
- package/dist/flow/styles.css +1 -0
- package/dist/flow/use-collaborative-graph.d.ts +61 -0
- package/dist/flow/use-collaborative-graph.js +396 -0
- package/dist/flow/use-debounced-value.d.ts +1 -0
- package/dist/flow/use-debounced-value.js +10 -0
- package/dist/hooks/use-detail-nav.d.ts +11 -0
- package/dist/hooks/use-detail-nav.js +49 -0
- package/dist/hooks/use-flush-on-hide.d.ts +1 -0
- package/dist/hooks/use-flush-on-hide.js +21 -0
- package/dist/hooks/use-media-query.d.ts +1 -0
- package/dist/hooks/use-media-query.js +20 -0
- package/dist/hooks/use-virtualizer.d.ts +1 -0
- package/dist/hooks/use-virtualizer.js +1 -0
- package/dist/index.d.ts +139 -0
- package/dist/index.js +139 -0
- package/dist/lib/brand-style.d.ts +6 -0
- package/dist/lib/brand-style.js +16 -0
- package/dist/lib/cn.d.ts +2 -0
- package/dist/lib/cn.js +5 -0
- package/dist/lib/composited-glint.d.ts +7 -0
- package/dist/lib/composited-glint.js +98 -0
- package/dist/lib/date-time-format.d.ts +2 -0
- package/dist/lib/date-time-format.js +21 -0
- package/dist/lib/disclosure-state.d.ts +11 -0
- package/dist/lib/disclosure-state.js +22 -0
- package/dist/lib/label-swatches.d.ts +10 -0
- package/dist/lib/label-swatches.js +24 -0
- package/dist/lib/local-ui-state.d.ts +10 -0
- package/dist/lib/local-ui-state.js +95 -0
- package/dist/lib/parse-loose-datetime.d.ts +1 -0
- package/dist/lib/parse-loose-datetime.js +180 -0
- package/dist/lib/parse-loose-time.d.ts +6 -0
- package/dist/lib/parse-loose-time.js +53 -0
- package/dist/lib/parse-loose.d.ts +1 -0
- package/dist/lib/parse-loose.js +170 -0
- package/dist/lib/react-19-jsx.d.ts +8 -0
- package/dist/lib/react-19-jsx.js +1 -0
- package/dist/lib/view-chrome.d.ts +5 -0
- package/dist/lib/view-chrome.js +5 -0
- package/dist/lib/view-query/config.d.ts +26 -0
- package/dist/lib/view-query/config.js +162 -0
- package/dist/lib/view-query/evaluate.d.ts +11 -0
- package/dist/lib/view-query/evaluate.js +196 -0
- package/dist/lib/view-query/group-order.d.ts +25 -0
- package/dist/lib/view-query/group-order.js +49 -0
- package/dist/lib/view-query/index.d.ts +6 -0
- package/dist/lib/view-query/index.js +6 -0
- package/dist/lib/view-query/model.d.ts +34 -0
- package/dist/lib/view-query/model.js +88 -0
- package/dist/lib/view-query/sort.d.ts +7 -0
- package/dist/lib/view-query/sort.js +30 -0
- package/dist/lib/view-query/types.d.ts +70 -0
- package/dist/lib/view-query/types.js +12 -0
- package/dist/lib/weekly-schedule.d.ts +8 -0
- package/dist/lib/weekly-schedule.js +10 -0
- package/dist/mcp-app/index.d.ts +4 -0
- package/dist/mcp-app/index.js +3 -0
- package/dist/mcp-app/shadcn.css +629 -0
- package/dist/mcp-app/styles.css +72 -0
- package/dist/mcp-app/theme.d.ts +2 -0
- package/dist/mcp-app/theme.js +62 -0
- package/dist/mcp-app/use-atmos-mcp-app.d.ts +109 -0
- package/dist/mcp-app/use-atmos-mcp-app.js +30 -0
- package/dist/mcp-app/vite.d.ts +7 -0
- package/dist/mcp-app/vite.js +30 -0
- package/dist/tokens/index.d.ts +7 -0
- package/dist/tokens/index.js +7 -0
- package/dist/tokens/semantic.css +110 -0
- package/dist/tokens/tokens.css +195 -0
- package/package.json +98 -0
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Archive, ArrowDownUp, AtSign, BadgeCheck, Banknote, Bell, Bookmark, BookOpen, Bot, Box, Brain, Bug, Building2, Calculator, CalendarClock, BriefcaseBusiness, CalendarDays, Camera, ChartBar, ChartColumn, ChartLine, CheckCircle2, CircleDot, ClipboardList, Cloud, Cog, Code2, Cpu, CreditCard, Database, DollarSign, Download, Eye, FileArchive, FileCheck2, FileCode2, FileImage, FileJson, FilePenLine, FileSpreadsheet, FileText, FileType2, Filter, Folder, FolderKanban, Flag, FlaskConical, Gauge, GitBranch, GitCommitHorizontal, GitPullRequest, Globe, Goal, Handshake, HardDrive, Heart, HelpCircle, History, Home, Inbox, Key, Landmark, Languages, LayoutDashboard, Layers, Library, Lightbulb, Link, ListChecks, Lock, Mail, Map as MapIcon, Megaphone, MessageCircle, MessagesSquare, Mic, Monitor, Network, Newspaper, NotebookPen, Package, Paintbrush, Palette, Paperclip, PenLine, Phone, PieChart, Pin, Play, Plug, Puzzle, Receipt, RefreshCw, Route, Rocket, Search, Send, Server, ShieldCheck, ShoppingCart, SlidersHorizontal, Sparkles, Star, StickyNote, Store, Table2, Tag, Target, Terminal, Timer, Trash2, TrendingUp, Trophy, Upload, UserCheck, UserRound, Users, Video, Wallet, WandSparkles, Workflow, Wrench, Zap, } from 'lucide-react';
|
|
4
|
+
import emojiMartData from '@emoji-mart/data/sets/15/native.json' with { type: 'json' };
|
|
5
|
+
import { cn } from '../lib/cn.js';
|
|
6
|
+
export const NOTE_ICON_DEFS = [
|
|
7
|
+
{ id: 'file-text', label: 'Document', keywords: 'note doc page paper', Icon: FileText },
|
|
8
|
+
{
|
|
9
|
+
id: 'file-pen-line',
|
|
10
|
+
label: 'Draft',
|
|
11
|
+
keywords: 'draft write edit compose page',
|
|
12
|
+
Icon: FilePenLine,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
id: 'file-check-2',
|
|
16
|
+
label: 'Approved',
|
|
17
|
+
keywords: 'approved verified complete done file',
|
|
18
|
+
Icon: FileCheck2,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 'file-code-2',
|
|
22
|
+
label: 'Code file',
|
|
23
|
+
keywords: 'code developer engineering source file',
|
|
24
|
+
Icon: FileCode2,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'file-spreadsheet',
|
|
28
|
+
label: 'Sheet',
|
|
29
|
+
keywords: 'spreadsheet table grid data csv',
|
|
30
|
+
Icon: FileSpreadsheet,
|
|
31
|
+
},
|
|
32
|
+
{ id: 'file-json', label: 'Data file', keywords: 'json api data schema file', Icon: FileJson },
|
|
33
|
+
{ id: 'file-image', label: 'Image', keywords: 'image photo media asset', Icon: FileImage },
|
|
34
|
+
{
|
|
35
|
+
id: 'file-archive',
|
|
36
|
+
label: 'Archive',
|
|
37
|
+
keywords: 'archive zip package storage',
|
|
38
|
+
Icon: FileArchive,
|
|
39
|
+
},
|
|
40
|
+
{ id: 'file-type-2', label: 'Text', keywords: 'text typography copy words', Icon: FileType2 },
|
|
41
|
+
{ id: 'book-open', label: 'Book', keywords: 'wiki knowledge handbook docs', Icon: BookOpen },
|
|
42
|
+
{ id: 'library', label: 'Library', keywords: 'library knowledge collection docs', Icon: Library },
|
|
43
|
+
{ id: 'newspaper', label: 'Article', keywords: 'article post news publication', Icon: Newspaper },
|
|
44
|
+
{
|
|
45
|
+
id: 'notebook-pen',
|
|
46
|
+
label: 'Notebook',
|
|
47
|
+
keywords: 'notebook journal notes writing',
|
|
48
|
+
Icon: NotebookPen,
|
|
49
|
+
},
|
|
50
|
+
{ id: 'sticky-note', label: 'Sticky', keywords: 'sticky note reminder memo', Icon: StickyNote },
|
|
51
|
+
{
|
|
52
|
+
id: 'clipboard-list',
|
|
53
|
+
label: 'Clipboard',
|
|
54
|
+
keywords: 'clipboard list checklist operations',
|
|
55
|
+
Icon: ClipboardList,
|
|
56
|
+
},
|
|
57
|
+
{ id: 'lightbulb', label: 'Idea', keywords: 'idea insight thought brainstorm', Icon: Lightbulb },
|
|
58
|
+
{
|
|
59
|
+
id: 'list-checks',
|
|
60
|
+
label: 'Checklist',
|
|
61
|
+
keywords: 'todo tasks checklist plan',
|
|
62
|
+
Icon: ListChecks,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 'check-circle-2',
|
|
66
|
+
label: 'Complete',
|
|
67
|
+
keywords: 'complete done check success',
|
|
68
|
+
Icon: CheckCircle2,
|
|
69
|
+
},
|
|
70
|
+
{ id: 'target', label: 'Goal', keywords: 'goal target objective focus', Icon: Target },
|
|
71
|
+
{ id: 'goal', label: 'Objective', keywords: 'objective goal target outcome', Icon: Goal },
|
|
72
|
+
{ id: 'rocket', label: 'Launch', keywords: 'launch ship rocket release', Icon: Rocket },
|
|
73
|
+
{ id: 'flag', label: 'Milestone', keywords: 'flag milestone priority', Icon: Flag },
|
|
74
|
+
{ id: 'trophy', label: 'Win', keywords: 'win trophy achievement award', Icon: Trophy },
|
|
75
|
+
{ id: 'route', label: 'Path', keywords: 'route path journey roadmap', Icon: Route },
|
|
76
|
+
{ id: 'map', label: 'Map', keywords: 'map roadmap journey location', Icon: MapIcon },
|
|
77
|
+
{ id: 'calendar-days', label: 'Calendar', keywords: 'date schedule meeting', Icon: CalendarDays },
|
|
78
|
+
{
|
|
79
|
+
id: 'calendar-clock',
|
|
80
|
+
label: 'Schedule',
|
|
81
|
+
keywords: 'schedule date time calendar',
|
|
82
|
+
Icon: CalendarClock,
|
|
83
|
+
},
|
|
84
|
+
{ id: 'timer', label: 'Timer', keywords: 'timer duration time countdown', Icon: Timer },
|
|
85
|
+
{ id: 'history', label: 'History', keywords: 'history past recent audit', Icon: History },
|
|
86
|
+
{ id: 'users', label: 'People', keywords: 'team users members people', Icon: Users },
|
|
87
|
+
{ id: 'user-round', label: 'Person', keywords: 'person user human', Icon: UserRound },
|
|
88
|
+
{
|
|
89
|
+
id: 'user-check',
|
|
90
|
+
label: 'Assignee',
|
|
91
|
+
keywords: 'assignee owner user responsible',
|
|
92
|
+
Icon: UserCheck,
|
|
93
|
+
},
|
|
94
|
+
{ id: 'at-sign', label: 'Mention', keywords: 'mention email handle at', Icon: AtSign },
|
|
95
|
+
{ id: 'phone', label: 'Phone', keywords: 'phone call person', Icon: Phone },
|
|
96
|
+
{ id: 'mail', label: 'Mail', keywords: 'mail email inbox message', Icon: Mail },
|
|
97
|
+
{
|
|
98
|
+
id: 'message-circle',
|
|
99
|
+
label: 'Message',
|
|
100
|
+
keywords: 'message chat comment conversation',
|
|
101
|
+
Icon: MessageCircle,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: 'messages-square',
|
|
105
|
+
label: 'Chat',
|
|
106
|
+
keywords: 'chat messages conversation thread',
|
|
107
|
+
Icon: MessagesSquare,
|
|
108
|
+
},
|
|
109
|
+
{ id: 'mic', label: 'Voice', keywords: 'voice audio mic recording', Icon: Mic },
|
|
110
|
+
{ id: 'video', label: 'Video', keywords: 'video camera meeting recording', Icon: Video },
|
|
111
|
+
{
|
|
112
|
+
id: 'briefcase-business',
|
|
113
|
+
label: 'Work',
|
|
114
|
+
keywords: 'work business client project',
|
|
115
|
+
Icon: BriefcaseBusiness,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: 'building-2',
|
|
119
|
+
label: 'Organization',
|
|
120
|
+
keywords: 'organization account office',
|
|
121
|
+
Icon: Building2,
|
|
122
|
+
},
|
|
123
|
+
{ id: 'store', label: 'Store', keywords: 'store retail shop customer', Icon: Store },
|
|
124
|
+
{ id: 'landmark', label: 'Finance', keywords: 'finance bank institution money', Icon: Landmark },
|
|
125
|
+
{ id: 'handshake', label: 'Deal', keywords: 'deal partnership contract sales', Icon: Handshake },
|
|
126
|
+
{ id: 'receipt', label: 'Receipt', keywords: 'receipt invoice expense billing', Icon: Receipt },
|
|
127
|
+
{ id: 'wallet', label: 'Wallet', keywords: 'wallet billing payment money', Icon: Wallet },
|
|
128
|
+
{ id: 'credit-card', label: 'Card', keywords: 'card payment billing credit', Icon: CreditCard },
|
|
129
|
+
{ id: 'banknote', label: 'Budget', keywords: 'budget cash money finance', Icon: Banknote },
|
|
130
|
+
{ id: 'dollar-sign', label: 'Revenue', keywords: 'revenue money sales dollar', Icon: DollarSign },
|
|
131
|
+
{
|
|
132
|
+
id: 'shopping-cart',
|
|
133
|
+
label: 'Cart',
|
|
134
|
+
keywords: 'cart commerce purchase order',
|
|
135
|
+
Icon: ShoppingCart,
|
|
136
|
+
},
|
|
137
|
+
{ id: 'bot', label: 'Agent', keywords: 'agent ai bot', Icon: Bot },
|
|
138
|
+
{ id: 'brain', label: 'Thinking', keywords: 'thinking ai brain intelligence', Icon: Brain },
|
|
139
|
+
{
|
|
140
|
+
id: 'wand-sparkles',
|
|
141
|
+
label: 'Assist',
|
|
142
|
+
keywords: 'assist magic ai generate',
|
|
143
|
+
Icon: WandSparkles,
|
|
144
|
+
},
|
|
145
|
+
{ id: 'workflow', label: 'Workflow', keywords: 'workflow process temporal', Icon: Workflow },
|
|
146
|
+
{ id: 'git-branch', label: 'Branch', keywords: 'branch workflow git path', Icon: GitBranch },
|
|
147
|
+
{
|
|
148
|
+
id: 'git-commit-horizontal',
|
|
149
|
+
label: 'Commit',
|
|
150
|
+
keywords: 'commit change version git',
|
|
151
|
+
Icon: GitCommitHorizontal,
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
id: 'git-pull-request',
|
|
155
|
+
label: 'Review',
|
|
156
|
+
keywords: 'review pull request merge approval',
|
|
157
|
+
Icon: GitPullRequest,
|
|
158
|
+
},
|
|
159
|
+
{ id: 'play', label: 'Run', keywords: 'run play start execute', Icon: Play },
|
|
160
|
+
{ id: 'refresh-cw', label: 'Sync', keywords: 'sync refresh update repeat', Icon: RefreshCw },
|
|
161
|
+
{ id: 'send', label: 'Send', keywords: 'send deliver outbound message', Icon: Send },
|
|
162
|
+
{ id: 'code-2', label: 'Code', keywords: 'code engineering dev technical', Icon: Code2 },
|
|
163
|
+
{ id: 'terminal', label: 'Terminal', keywords: 'terminal shell cli command', Icon: Terminal },
|
|
164
|
+
{ id: 'bug', label: 'Bug', keywords: 'bug issue defect fix', Icon: Bug },
|
|
165
|
+
{ id: 'wrench', label: 'Tools', keywords: 'tools repair maintenance settings', Icon: Wrench },
|
|
166
|
+
{ id: 'cog', label: 'Settings', keywords: 'settings config preferences gear', Icon: Cog },
|
|
167
|
+
{
|
|
168
|
+
id: 'sliders-horizontal',
|
|
169
|
+
label: 'Controls',
|
|
170
|
+
keywords: 'controls sliders tuning filters',
|
|
171
|
+
Icon: SlidersHorizontal,
|
|
172
|
+
},
|
|
173
|
+
{ id: 'plug', label: 'Integration', keywords: 'integration connector plug source', Icon: Plug },
|
|
174
|
+
{ id: 'puzzle', label: 'Module', keywords: 'module puzzle component', Icon: Puzzle },
|
|
175
|
+
{ id: 'package', label: 'Package', keywords: 'package bundle release artifact', Icon: Package },
|
|
176
|
+
{ id: 'box', label: 'Box', keywords: 'box inventory storage object', Icon: Box },
|
|
177
|
+
{ id: 'server', label: 'Server', keywords: 'server backend service api', Icon: Server },
|
|
178
|
+
{ id: 'database', label: 'Database', keywords: 'database postgres data table', Icon: Database },
|
|
179
|
+
{ id: 'hard-drive', label: 'Storage', keywords: 'storage disk drive files', Icon: HardDrive },
|
|
180
|
+
{ id: 'cloud', label: 'Cloud', keywords: 'cloud remote hosted infra', Icon: Cloud },
|
|
181
|
+
{ id: 'cpu', label: 'Compute', keywords: 'compute cpu processor runtime', Icon: Cpu },
|
|
182
|
+
{ id: 'network', label: 'Network', keywords: 'network graph connected nodes', Icon: Network },
|
|
183
|
+
{ id: 'monitor', label: 'Desktop', keywords: 'desktop monitor screen app', Icon: Monitor },
|
|
184
|
+
{ id: 'globe', label: 'Web', keywords: 'web internet global public', Icon: Globe },
|
|
185
|
+
{ id: 'link', label: 'Link', keywords: 'link url connection reference', Icon: Link },
|
|
186
|
+
{
|
|
187
|
+
id: 'flask-conical',
|
|
188
|
+
label: 'Experiment',
|
|
189
|
+
keywords: 'experiment lab research test',
|
|
190
|
+
Icon: FlaskConical,
|
|
191
|
+
},
|
|
192
|
+
{ id: 'calculator', label: 'Formula', keywords: 'formula calculator math', Icon: Calculator },
|
|
193
|
+
{ id: 'gauge', label: 'Metric', keywords: 'metric gauge performance status', Icon: Gauge },
|
|
194
|
+
{ id: 'chart-line', label: 'Trend', keywords: 'trend chart line analytics', Icon: ChartLine },
|
|
195
|
+
{ id: 'chart-bar', label: 'Chart', keywords: 'chart bar analytics report', Icon: ChartBar },
|
|
196
|
+
{
|
|
197
|
+
id: 'chart-column',
|
|
198
|
+
label: 'Report',
|
|
199
|
+
keywords: 'report chart columns dashboard',
|
|
200
|
+
Icon: ChartColumn,
|
|
201
|
+
},
|
|
202
|
+
{ id: 'pie-chart', label: 'Segment', keywords: 'segment pie chart audience', Icon: PieChart },
|
|
203
|
+
{ id: 'trending-up', label: 'Growth', keywords: 'growth trend up metrics', Icon: TrendingUp },
|
|
204
|
+
{ id: 'table-2', label: 'Table', keywords: 'table grid records database', Icon: Table2 },
|
|
205
|
+
{
|
|
206
|
+
id: 'layout-dashboard',
|
|
207
|
+
label: 'Dashboard',
|
|
208
|
+
keywords: 'dashboard view analytics panels',
|
|
209
|
+
Icon: LayoutDashboard,
|
|
210
|
+
},
|
|
211
|
+
{ id: 'layers', label: 'Layers', keywords: 'layers stack segments facets', Icon: Layers },
|
|
212
|
+
{ id: 'filter', label: 'Filter', keywords: 'filter refine query conditions', Icon: Filter },
|
|
213
|
+
{ id: 'search', label: 'Search', keywords: 'search find lookup discover', Icon: Search },
|
|
214
|
+
{ id: 'eye', label: 'View', keywords: 'view visible preview watch', Icon: Eye },
|
|
215
|
+
{ id: 'download', label: 'Download', keywords: 'download import receive file', Icon: Download },
|
|
216
|
+
{ id: 'upload', label: 'Upload', keywords: 'upload export send file', Icon: Upload },
|
|
217
|
+
{
|
|
218
|
+
id: 'arrow-down-up',
|
|
219
|
+
label: 'Transfer',
|
|
220
|
+
keywords: 'transfer import export swap sync',
|
|
221
|
+
Icon: ArrowDownUp,
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
id: 'megaphone',
|
|
225
|
+
label: 'Announcement',
|
|
226
|
+
keywords: 'announcement marketing broadcast',
|
|
227
|
+
Icon: Megaphone,
|
|
228
|
+
},
|
|
229
|
+
{ id: 'bell', label: 'Alert', keywords: 'alert notification bell reminder', Icon: Bell },
|
|
230
|
+
{ id: 'inbox', label: 'Inbox', keywords: 'inbox incoming triage queue', Icon: Inbox },
|
|
231
|
+
{ id: 'paperclip', label: 'Attachment', keywords: 'attachment file clip', Icon: Paperclip },
|
|
232
|
+
{ id: 'pin', label: 'Pinned', keywords: 'pinned pin important', Icon: Pin },
|
|
233
|
+
{ id: 'bookmark', label: 'Bookmark', keywords: 'bookmark saved favorite', Icon: Bookmark },
|
|
234
|
+
{ id: 'tag', label: 'Tag', keywords: 'tag label category', Icon: Tag },
|
|
235
|
+
{ id: 'archive', label: 'Archive', keywords: 'archive stored closed', Icon: Archive },
|
|
236
|
+
{ id: 'trash-2', label: 'Trash', keywords: 'trash delete remove', Icon: Trash2 },
|
|
237
|
+
{ id: 'home', label: 'Home', keywords: 'home start overview', Icon: Home },
|
|
238
|
+
{ id: 'folder', label: 'Folder', keywords: 'folder collection group', Icon: Folder },
|
|
239
|
+
{
|
|
240
|
+
id: 'folder-kanban',
|
|
241
|
+
label: 'Board',
|
|
242
|
+
keywords: 'board kanban project folder',
|
|
243
|
+
Icon: FolderKanban,
|
|
244
|
+
},
|
|
245
|
+
{ id: 'palette', label: 'Design', keywords: 'design creative brand color', Icon: Palette },
|
|
246
|
+
{ id: 'paintbrush', label: 'Brand', keywords: 'brand paint style design', Icon: Paintbrush },
|
|
247
|
+
{ id: 'camera', label: 'Photo', keywords: 'photo camera image capture', Icon: Camera },
|
|
248
|
+
{ id: 'pen-line', label: 'Writing', keywords: 'writing pen compose edit', Icon: PenLine },
|
|
249
|
+
{ id: 'languages', label: 'Language', keywords: 'language translate locale', Icon: Languages },
|
|
250
|
+
{
|
|
251
|
+
id: 'shield-check',
|
|
252
|
+
label: 'Policy',
|
|
253
|
+
keywords: 'security policy compliance trust',
|
|
254
|
+
Icon: ShieldCheck,
|
|
255
|
+
},
|
|
256
|
+
{ id: 'lock', label: 'Private', keywords: 'private lock security restricted', Icon: Lock },
|
|
257
|
+
{ id: 'key', label: 'Access', keywords: 'access key permission auth', Icon: Key },
|
|
258
|
+
{
|
|
259
|
+
id: 'badge-check',
|
|
260
|
+
label: 'Verified',
|
|
261
|
+
keywords: 'verified trusted badge check',
|
|
262
|
+
Icon: BadgeCheck,
|
|
263
|
+
},
|
|
264
|
+
{ id: 'sparkles', label: 'Magic', keywords: 'magic sparkle polish', Icon: Sparkles },
|
|
265
|
+
{ id: 'zap', label: 'Fast', keywords: 'fast lightning quick power', Icon: Zap },
|
|
266
|
+
{ id: 'star', label: 'Star', keywords: 'favorite important star', Icon: Star },
|
|
267
|
+
{ id: 'heart', label: 'Heart', keywords: 'heart culture values care', Icon: Heart },
|
|
268
|
+
{ id: 'help-circle', label: 'Question', keywords: 'question help support', Icon: HelpCircle },
|
|
269
|
+
{ id: 'circle-dot', label: 'Dot', keywords: 'dot status marker', Icon: CircleDot },
|
|
270
|
+
];
|
|
271
|
+
export const NOTE_ICON_COLOR_DEFS = [
|
|
272
|
+
{ id: 'primary', label: 'Primary', value: 'var(--foreground)' },
|
|
273
|
+
{ id: 'slate', label: 'Slate', value: 'var(--muted-foreground)' },
|
|
274
|
+
{ id: 'red', label: 'Red', value: 'oklch(0.58 0.2 25)' },
|
|
275
|
+
{ id: 'orange', label: 'Orange', value: 'oklch(0.64 0.17 50)' },
|
|
276
|
+
{ id: 'yellow', label: 'Yellow', value: 'oklch(0.72 0.16 85)' },
|
|
277
|
+
{ id: 'green', label: 'Green', value: 'oklch(0.58 0.14 145)' },
|
|
278
|
+
{ id: 'teal', label: 'Teal', value: 'oklch(0.56 0.12 185)' },
|
|
279
|
+
{ id: 'blue', label: 'Blue', value: 'oklch(0.57 0.16 245)' },
|
|
280
|
+
{ id: 'purple', label: 'Purple', value: 'oklch(0.58 0.18 300)' },
|
|
281
|
+
{ id: 'pink', label: 'Pink', value: 'oklch(0.62 0.19 345)' },
|
|
282
|
+
];
|
|
283
|
+
const EMOJI_MART_DATA = emojiMartData;
|
|
284
|
+
function buildNoteEmojiDefs() {
|
|
285
|
+
const seen = new Set();
|
|
286
|
+
const defs = [];
|
|
287
|
+
for (const category of EMOJI_MART_DATA.categories) {
|
|
288
|
+
for (const id of category.emojis) {
|
|
289
|
+
const item = EMOJI_MART_DATA.emojis[id];
|
|
290
|
+
const native = item?.skins[0]?.native;
|
|
291
|
+
if (!item || !native || seen.has(native))
|
|
292
|
+
continue;
|
|
293
|
+
seen.add(native);
|
|
294
|
+
defs.push({
|
|
295
|
+
emoji: native,
|
|
296
|
+
label: item.name,
|
|
297
|
+
keywords: [item.id, item.name, ...item.keywords, ...(item.emoticons ?? [])]
|
|
298
|
+
.join(' ')
|
|
299
|
+
.toLowerCase(),
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return defs;
|
|
304
|
+
}
|
|
305
|
+
export const NOTE_EMOJI_DEFS = buildNoteEmojiDefs();
|
|
306
|
+
const NOTE_ICON_BY_ID = new Map(NOTE_ICON_DEFS.map((def) => [def.id, def]));
|
|
307
|
+
const NOTE_ICON_COLOR_BY_ID = new Map(NOTE_ICON_COLOR_DEFS.map((def) => [def.id, def]));
|
|
308
|
+
function isNoteIconName(value) {
|
|
309
|
+
return NOTE_ICON_BY_ID.has(value);
|
|
310
|
+
}
|
|
311
|
+
function isNoteIconColorName(value) {
|
|
312
|
+
return NOTE_ICON_COLOR_BY_ID.has(value);
|
|
313
|
+
}
|
|
314
|
+
export function parseNoteIcon(input) {
|
|
315
|
+
if (!input || typeof input !== 'object')
|
|
316
|
+
return null;
|
|
317
|
+
const directKind = input.kind;
|
|
318
|
+
const raw = directKind === 'emoji' || directKind === 'icon' ? input : input.icon;
|
|
319
|
+
if (!raw || typeof raw !== 'object')
|
|
320
|
+
return null;
|
|
321
|
+
const kind = raw.kind;
|
|
322
|
+
const value = raw.value;
|
|
323
|
+
if (kind === 'emoji' && typeof value === 'string' && value.trim()) {
|
|
324
|
+
return { kind: 'emoji', value };
|
|
325
|
+
}
|
|
326
|
+
if (kind === 'icon' && typeof value === 'string' && isNoteIconName(value)) {
|
|
327
|
+
const color = raw.color;
|
|
328
|
+
return {
|
|
329
|
+
kind: 'icon',
|
|
330
|
+
value,
|
|
331
|
+
...(typeof color === 'string' && isNoteIconColorName(color) ? { color } : {}),
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
return null;
|
|
335
|
+
}
|
|
336
|
+
export function iconFacetsPatch(facets, icon) {
|
|
337
|
+
const next = { ...(facets ?? {}) };
|
|
338
|
+
if (icon)
|
|
339
|
+
next.icon = icon;
|
|
340
|
+
else
|
|
341
|
+
delete next.icon;
|
|
342
|
+
return next;
|
|
343
|
+
}
|
|
344
|
+
export function NoteIconGlyph({ icon, fallback = 'file', fallbackIcon, className, iconClassName, }) {
|
|
345
|
+
if (icon?.kind === 'emoji') {
|
|
346
|
+
return (_jsx("span", { "aria-hidden": true, className: cn('inline-flex items-center justify-center text-[1em] leading-none', className), children: icon.value }));
|
|
347
|
+
}
|
|
348
|
+
const Icon = icon?.kind === 'icon'
|
|
349
|
+
? (NOTE_ICON_BY_ID.get(icon.value)?.Icon ?? FileText)
|
|
350
|
+
: (fallbackIcon ?? (fallback === 'folder' ? Folder : FileText));
|
|
351
|
+
const color = icon?.kind === 'icon' ? NOTE_ICON_COLOR_BY_ID.get(icon.color ?? 'primary')?.value : undefined;
|
|
352
|
+
return (_jsx("span", { className: cn('inline-flex items-center justify-center', className), children: _jsx(Icon, { className: cn(fallback === 'folder' && !icon ? 'text-muted-foreground/85' : 'text-muted-foreground/75', iconClassName), style: color ? { color } : undefined, strokeWidth: 1.65, "aria-hidden": true }) }));
|
|
353
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import '../lib/react-19-jsx.js';
|
|
2
|
+
import type { CSSProperties, MouseEvent, PointerEvent, ReactNode } from 'react';
|
|
3
|
+
import type { DraggableAttributes, DraggableSyntheticListeners } from '@dnd-kit/core';
|
|
4
|
+
export interface NoteRowDragProps {
|
|
5
|
+
setNodeRef?: (el: HTMLElement | null) => void;
|
|
6
|
+
attributes?: DraggableAttributes;
|
|
7
|
+
listeners?: DraggableSyntheticListeners;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
isDragging?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function NoteRowInsertionLine({ edge, inset }: {
|
|
12
|
+
edge: 'before' | 'after';
|
|
13
|
+
inset: number;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
export interface NoteRowProps {
|
|
16
|
+
depth: number;
|
|
17
|
+
title: string;
|
|
18
|
+
meta?: string;
|
|
19
|
+
active?: boolean;
|
|
20
|
+
dirty?: boolean;
|
|
21
|
+
chromeFont: string;
|
|
22
|
+
leadingIcon?: ReactNode;
|
|
23
|
+
iconControl?: ReactNode;
|
|
24
|
+
trailingControl?: ReactNode;
|
|
25
|
+
onClick?: (e: MouseEvent) => void;
|
|
26
|
+
onIntentSelect?: (e: PointerEvent) => void;
|
|
27
|
+
selected?: boolean;
|
|
28
|
+
onAddChild?: () => void;
|
|
29
|
+
addChildLabel?: string;
|
|
30
|
+
drag?: NoteRowDragProps;
|
|
31
|
+
noteId?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function NoteRow({ depth, title, meta, active, dirty, chromeFont, leadingIcon, iconControl, trailingControl, onClick, onIntentSelect, selected, onAddChild, addChildLabel, drag, noteId, }: NoteRowProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import '../lib/react-19-jsx.js';
|
|
4
|
+
import { FileText, Plus } from 'lucide-react';
|
|
5
|
+
import { Button } from './button.js';
|
|
6
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from './tooltip.js';
|
|
7
|
+
import { sidePanelItemClassName } from './side-panel.js';
|
|
8
|
+
import { NavigableListItem } from './navigable-list.js';
|
|
9
|
+
import { cn } from '../lib/cn.js';
|
|
10
|
+
const NOTE_PADDING_BASE = 8;
|
|
11
|
+
const DEPTH_STEP = 12;
|
|
12
|
+
export function NoteRowInsertionLine({ edge, inset }) {
|
|
13
|
+
return (_jsx("span", { "aria-hidden": true, className: cn('bg-primary pointer-events-none absolute right-2 z-10 h-[2px] rounded-full', edge === 'before' ? '-top-px' : '-bottom-px'), style: { left: inset }, children: _jsx("span", { className: "bg-primary absolute top-1/2 -left-1 size-1.5 -translate-y-1/2 rounded-full" }) }));
|
|
14
|
+
}
|
|
15
|
+
export function NoteRow({ depth, title, meta, active, dirty, chromeFont, leadingIcon, iconControl, trailingControl, onClick, onIntentSelect, selected, onAddChild, addChildLabel, drag, noteId, }) {
|
|
16
|
+
const paddingLeft = NOTE_PADDING_BASE + depth * DEPTH_STEP;
|
|
17
|
+
return (_jsxs("div", { ref: drag?.setNodeRef, style: { paddingLeft, ...drag?.style }, ...drag?.attributes, ...drag?.listeners, role: selected !== undefined ? 'treeitem' : undefined, "aria-selected": selected, "data-note-id": noteId, "data-selected": selected ? '' : undefined, className: sidePanelItemClassName({
|
|
18
|
+
active,
|
|
19
|
+
className: cn('gap-2', selected ? 'bg-primary/10' : '', drag?.isDragging ? 'bg-muted' : ''),
|
|
20
|
+
}), children: [iconControl ?? (_jsx("span", { className: "inline-flex size-4 shrink-0 items-center justify-center", children: leadingIcon ?? (_jsx(FileText, { className: cn('text-muted-foreground/65 size-3.5 shrink-0', active && 'text-muted-foreground/80'), strokeWidth: 1.6 })) })), _jsx(NavigableListItem, { active: active, children: _jsx("button", { type: "button", onPointerDown: (e) => onIntentSelect?.(e), onClick: (e) => onClick?.(e), className: "flex min-w-0 flex-1 items-center text-left outline-none", children: _jsx("span", { className: "min-w-0 truncate text-[12.5px]", children: title }) }) }), meta ? (_jsx("span", { className: cn('ml-auto shrink-0 font-mono text-[10px] tabular-nums', onAddChild ? 'group-hover/side-panel-item:hidden' : '', active ? 'text-muted-foreground/80' : 'text-muted-foreground/60', chromeFont), children: meta })) : null, dirty ? (_jsx("span", { className: cn('size-1.5 shrink-0 rounded-full', active ? 'bg-foreground/60' : 'bg-foreground/55', meta ? '' : 'ml-auto') })) : null, trailingControl ? (_jsx("span", { className: cn('shrink-0', meta || dirty ? '' : 'ml-auto'), children: trailingControl })) : null, onAddChild ? (_jsx(NoteRowAddChildButton, { onAddChild: onAddChild, label: addChildLabel ?? '', className: meta || dirty || trailingControl ? '' : 'ml-auto' })) : null] }));
|
|
21
|
+
}
|
|
22
|
+
function NoteRowAddChildButton({ onAddChild, label, className, }) {
|
|
23
|
+
const handle = (e) => {
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
e.stopPropagation();
|
|
26
|
+
onAddChild();
|
|
27
|
+
};
|
|
28
|
+
return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { type: "button", variant: "ghost", size: "icon-xs", "aria-label": label, onClick: handle, onPointerDown: (e) => e.stopPropagation(), onMouseDown: (e) => e.stopPropagation(), className: cn('text-muted-foreground/80 hover:bg-muted hover:text-foreground size-4 rounded opacity-0 group-hover/side-panel-item:opacity-100', 'focus-visible:opacity-100', className), children: _jsx(Plus, { className: "size-3", strokeWidth: 1.8 }) }) }), _jsx(TooltipContent, { variant: "compact", children: label })] }));
|
|
29
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface OverlappingDotsProps {
|
|
2
|
+
items: ReadonlyArray<{
|
|
3
|
+
key: string;
|
|
4
|
+
dotClassName: string;
|
|
5
|
+
}>;
|
|
6
|
+
max?: number;
|
|
7
|
+
size?: 'sm' | 'md';
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function OverlappingDots({ items, max, size, className }: OverlappingDotsProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from '../lib/cn.js';
|
|
4
|
+
import { rowSurfaceRingClassName } from './row-surface.js';
|
|
5
|
+
const dotSize = {
|
|
6
|
+
sm: 'size-2',
|
|
7
|
+
md: 'size-2.5',
|
|
8
|
+
};
|
|
9
|
+
export function OverlappingDots({ items, max = 4, size = 'md', className }) {
|
|
10
|
+
if (items.length === 0)
|
|
11
|
+
return null;
|
|
12
|
+
return (_jsx("span", { "aria-hidden": true, className: cn('flex shrink-0 -space-x-1', className), children: items.slice(0, max).map((item) => (_jsx("span", { className: cn('inline-block rounded-full ring-1', rowSurfaceRingClassName, dotSize[size], item.dotClassName) }, item.key))) }));
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export declare function OverviewCard({ title, count, action, chromeFont, children, className, }: {
|
|
3
|
+
title: string;
|
|
4
|
+
count?: number;
|
|
5
|
+
action?: ReactNode;
|
|
6
|
+
chromeFont: string;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
export declare function OverviewEmptyLine({ children }: {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from '../lib/cn.js';
|
|
4
|
+
export function OverviewCard({ title, count, action, chromeFont, children, className, }) {
|
|
5
|
+
return (_jsxs("section", { className: cn('space-y-1', className), children: [_jsxs("header", { className: "flex h-6 items-center gap-2 px-2", children: [_jsx("h3", { className: cn('text-muted-foreground/85 text-[11px] font-medium', chromeFont), children: title }), count !== undefined ? (_jsx("span", { className: cn('text-muted-foreground/50 font-mono text-[10px] tabular-nums', chromeFont), children: count })) : null, action ? _jsx("div", { className: "ml-auto flex items-center", children: action }) : null] }), _jsx("div", { children: children })] }));
|
|
6
|
+
}
|
|
7
|
+
export function OverviewEmptyLine({ children }) {
|
|
8
|
+
return _jsx("p", { className: "text-muted-foreground/60 px-2 py-1 text-[11.5px]", children: children });
|
|
9
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
export interface PanelHeaderProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
actions?: ReactNode;
|
|
5
|
+
titleClassName?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function PanelHeader({ title, actions, titleClassName, className, ...props }: PanelHeaderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from '../lib/cn.js';
|
|
4
|
+
export function PanelHeader({ title, actions, titleClassName, className, ...props }) {
|
|
5
|
+
return (_jsxs("div", { className: cn('flex h-10 shrink-0 items-center px-3 text-[12px] font-medium', className), ...props, children: [_jsx("span", { className: cn('truncate', titleClassName), children: title }), actions ? _jsx("div", { className: "-mr-1 ml-auto flex items-center gap-0.5", children: actions }) : null] }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function PanelEmptyState({ label, chromeFont }: {
|
|
2
|
+
label: string;
|
|
3
|
+
chromeFont: string;
|
|
4
|
+
}): import("react").JSX.Element;
|
|
5
|
+
export declare function PanelSectionSkeleton({ chromeFont, label, rows, }: {
|
|
6
|
+
chromeFont: string;
|
|
7
|
+
label: string;
|
|
8
|
+
rows?: number;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Skeleton } from './skeleton.js';
|
|
3
|
+
import { SidePanelSectionPlaceholder } from './side-panel.js';
|
|
4
|
+
import { cn } from '../lib/cn.js';
|
|
5
|
+
export function PanelEmptyState({ label, chromeFont }) {
|
|
6
|
+
return _jsx(SidePanelSectionPlaceholder, { chromeFont: chromeFont, children: label });
|
|
7
|
+
}
|
|
8
|
+
export function PanelSectionSkeleton({ chromeFont, label, rows = 3, }) {
|
|
9
|
+
return (_jsx("div", { className: cn('space-y-1 px-2 py-1.5', chromeFont), role: "status", "aria-label": label, children: Array.from({ length: rows }).map((_, index) => (_jsx(Skeleton, { className: "h-7 w-full rounded-md" }, index))) }));
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type PersonAvatarSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
2
|
+
export interface PersonAvatarProps {
|
|
3
|
+
displayName?: string | null;
|
|
4
|
+
email?: string | null;
|
|
5
|
+
src?: string | null;
|
|
6
|
+
size?: PersonAvatarSize;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function PersonAvatar({ displayName, email, src, size, className }: PersonAvatarProps): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from '../lib/cn.js';
|
|
4
|
+
const sizeClasses = {
|
|
5
|
+
xs: 'size-5 text-[8px]',
|
|
6
|
+
sm: 'size-6 text-xs',
|
|
7
|
+
md: 'size-8 text-sm',
|
|
8
|
+
lg: 'size-10 text-sm',
|
|
9
|
+
};
|
|
10
|
+
function initialsFor(displayName, email) {
|
|
11
|
+
const source = displayName?.trim() || email?.split('@')[0] || '?';
|
|
12
|
+
const tokens = source.split(/[\s._-]+/u).filter(Boolean);
|
|
13
|
+
if (tokens.length === 0)
|
|
14
|
+
return '?';
|
|
15
|
+
if (tokens.length === 1)
|
|
16
|
+
return (tokens[0]?.[0] ?? '?').toUpperCase();
|
|
17
|
+
return `${tokens[0]?.[0] ?? ''}${tokens[1]?.[0] ?? ''}`.toUpperCase();
|
|
18
|
+
}
|
|
19
|
+
export function PersonAvatar({ displayName, email, src, size = 'md', className }) {
|
|
20
|
+
const label = displayName ?? email ?? '?';
|
|
21
|
+
const initials = initialsFor(displayName, email);
|
|
22
|
+
return (_jsx("span", { "aria-label": label, className: cn('relative flex shrink-0 select-none items-center justify-center overflow-hidden rounded-full bg-muted text-muted-foreground after:absolute after:inset-0 after:rounded-full after:border after:border-border', sizeClasses[size], className), children: src ? _jsx("img", { src: src, alt: label, className: "aspect-square size-full rounded-full object-cover" }) : _jsx("span", { className: "text-center font-medium leading-none", children: initials }) }));
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Avatar as AvatarPrimitive } from "radix-ui";
|
|
3
|
+
declare function Avatar({ className, size, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root> & {
|
|
4
|
+
size?: "default" | "xs" | "sm" | "lg";
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): React.JSX.Element;
|
|
7
|
+
declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): React.JSX.Element;
|
|
8
|
+
declare function AvatarBadge({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
9
|
+
declare function AvatarGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarBadge, };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Avatar as AvatarPrimitive } from "radix-ui";
|
|
5
|
+
import { cn } from "../lib/cn.js";
|
|
6
|
+
function Avatar({ className, size = "default", ...props }) {
|
|
7
|
+
return (_jsx(AvatarPrimitive.Root, { "data-slot": "avatar", "data-size": size, className: cn("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 data-[size=xs]:size-4 dark:after:mix-blend-lighten", className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
function AvatarImage({ className, ...props }) {
|
|
10
|
+
return (_jsx(AvatarPrimitive.Image, { "data-slot": "avatar-image", className: cn("aspect-square size-full rounded-full object-cover", className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function AvatarFallback({ className, ...props }) {
|
|
13
|
+
return (_jsx(AvatarPrimitive.Fallback, { "data-slot": "avatar-fallback", className: cn("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs group-data-[size=xs]/avatar:text-[8px]", className), ...props }));
|
|
14
|
+
}
|
|
15
|
+
function AvatarBadge({ className, ...props }) {
|
|
16
|
+
return (_jsx("span", { "data-slot": "avatar-badge", className: cn("absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function AvatarGroup({ className, ...props }) {
|
|
19
|
+
return (_jsx("div", { "data-slot": "avatar-group", className: cn("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function AvatarGroupCount({ className, ...props }) {
|
|
22
|
+
return (_jsx("div", { "data-slot": "avatar-group-count", className: cn("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarBadge, };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type KeyboardEvent, type ReactNode } from 'react';
|
|
2
|
+
export type PickerParseState = 'ok' | 'unparseable' | 'empty';
|
|
3
|
+
export interface PickerFieldProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onOpenChange: (open: boolean) => void;
|
|
6
|
+
display: string;
|
|
7
|
+
typed: string | null;
|
|
8
|
+
onTypedChange: (next: string) => void;
|
|
9
|
+
onInputKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
parseState?: PickerParseState;
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
size?: 'sm' | 'default';
|
|
15
|
+
align?: 'start' | 'center' | 'end';
|
|
16
|
+
className?: string;
|
|
17
|
+
contentClassName?: string;
|
|
18
|
+
'aria-label'?: string;
|
|
19
|
+
listboxId?: string;
|
|
20
|
+
activeDescendantId?: string;
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export declare function PickerField({ open, onOpenChange, display, typed, onTypedChange, onInputKeyDown, placeholder, parseState, icon, disabled, size, align, className, contentClassName, 'aria-label': ariaLabel, listboxId, activeDescendantId, children, }: PickerFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useRef } from 'react';
|
|
4
|
+
import { Popover, PopoverAnchor, PopoverContent } from './popover.js';
|
|
5
|
+
import { cn } from '../lib/cn.js';
|
|
6
|
+
export function PickerField({ open, onOpenChange, display, typed, onTypedChange, onInputKeyDown, placeholder, parseState = 'empty', icon, disabled, size = 'default', align = 'start', className, contentClassName, 'aria-label': ariaLabel, listboxId, activeDescendantId, children, }) {
|
|
7
|
+
const inputRef = useRef(null);
|
|
8
|
+
const editing = typed !== null;
|
|
9
|
+
const value = typed ?? display;
|
|
10
|
+
const invalid = editing && parseState === 'unparseable';
|
|
11
|
+
return (_jsxs(Popover, { open: open, onOpenChange: onOpenChange, children: [_jsx(PopoverAnchor, { asChild: true, children: _jsxs("div", { "data-slot": "picker-field", "data-parse-state": editing ? parseState : undefined, "aria-disabled": disabled || undefined, className: cn('border-input dark:bg-input/30 inline-flex items-center gap-2 rounded-lg border bg-transparent transition-colors', 'focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-3', invalid &&
|
|
12
|
+
'border-destructive/60 focus-within:border-destructive/60 focus-within:ring-destructive/30', disabled && 'pointer-events-none opacity-50', size === 'sm' ? 'h-8 px-2.5 text-[12px]' : 'h-9 px-3 text-sm', className), children: [icon ? (_jsx("span", { className: "text-muted-foreground/70 flex shrink-0 items-center", children: icon })) : null, _jsx("input", { ref: inputRef, type: "text", value: value, placeholder: placeholder, "aria-label": ariaLabel, disabled: disabled, spellCheck: false, autoComplete: "off", role: listboxId ? 'combobox' : undefined, "aria-expanded": listboxId ? open : undefined, "aria-controls": listboxId && open ? listboxId : undefined, "aria-activedescendant": open ? activeDescendantId : undefined, "aria-autocomplete": listboxId ? 'list' : undefined, "data-slot": "picker-field-input", onClick: () => onOpenChange(true), onFocus: (e) => {
|
|
13
|
+
onOpenChange(true);
|
|
14
|
+
e.currentTarget.select();
|
|
15
|
+
}, onChange: (e) => {
|
|
16
|
+
onOpenChange(true);
|
|
17
|
+
onTypedChange(e.target.value);
|
|
18
|
+
}, onKeyDown: onInputKeyDown, className: cn('placeholder:text-muted-foreground/60 min-w-0 flex-1 bg-transparent tabular-nums outline-none', !editing && !display && 'text-muted-foreground') })] }) }), _jsx(PopoverContent, { align: align, sideOffset: 6, onOpenAutoFocus: (e) => e.preventDefault(), onCloseAutoFocus: (e) => e.preventDefault(), onInteractOutside: (e) => {
|
|
19
|
+
const target = e.target;
|
|
20
|
+
if (target instanceof Node && inputRef.current?.parentElement?.contains(target)) {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
}
|
|
23
|
+
}, className: cn('w-auto overflow-hidden p-0', contentClassName), "data-slot": "picker-field-content", children: children })] }));
|
|
24
|
+
}
|