@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,12 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
3
|
+
declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): import("react").JSX.Element;
|
|
4
|
+
declare const buttonGroupVariants: (props?: ({
|
|
5
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): import("react").JSX.Element;
|
|
8
|
+
declare function ButtonGroupText({ className, asChild, ...props }: React.ComponentProps<"div"> & {
|
|
9
|
+
asChild?: boolean;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
declare function ButtonGroupSeparator({ className, orientation, ...props }: React.ComponentProps<typeof Separator>): import("react").JSX.Element;
|
|
12
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { Separator as SeparatorPrimitive, Slot } from "radix-ui";
|
|
4
|
+
import { cn } from "../lib/cn.js";
|
|
5
|
+
function Separator({ className, orientation = "horizontal", decorative = true, ...props }) {
|
|
6
|
+
return (_jsx(SeparatorPrimitive.Root, { "data-slot": "separator", decorative: decorative, orientation: orientation, className: cn("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch", className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
const buttonGroupVariants = cva("group/button-group flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
9
|
+
variants: {
|
|
10
|
+
orientation: {
|
|
11
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none! [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none! [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg!",
|
|
12
|
+
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none! [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none! [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg!",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
orientation: "horizontal",
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
function ButtonGroup({ className, orientation, ...props }) {
|
|
20
|
+
return (_jsx("div", { role: "group", "data-slot": "button-group", "data-orientation": orientation, className: cn(buttonGroupVariants({ orientation }), className), ...props }));
|
|
21
|
+
}
|
|
22
|
+
function ButtonGroupText({ className, asChild = false, ...props }) {
|
|
23
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
24
|
+
return (_jsx(Comp, { className: cn("flex items-center gap-2 rounded-lg border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
25
|
+
}
|
|
26
|
+
function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
|
|
27
|
+
return (_jsx(Separator, { "data-slot": "button-group-separator", orientation: orientation, className: cn("relative self-stretch bg-input data-[orientation=horizontal]:mx-px data-[orientation=horizontal]:w-auto data-[orientation=vertical]:my-px data-[orientation=vertical]:h-auto", className), ...props }));
|
|
28
|
+
}
|
|
29
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "default" | "outline" | "dashed" | "secondary" | "ghost" | "destructive" | "success" | "link-underlined" | null | undefined;
|
|
5
|
+
size?: "sm" | "default" | "xs" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
5
|
+
import { cn } from '../lib/cn.js';
|
|
6
|
+
const buttonVariants = cva("group/button inline-flex shrink-0 cursor-pointer items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
10
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
11
|
+
dashed: "border-border border-dashed bg-transparent hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:hover:bg-muted/50",
|
|
12
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
13
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
14
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
15
|
+
success: "bg-success-9/10 text-success-11 hover:bg-success-9/20 focus-visible:border-success-9/40 focus-visible:ring-success-9/20 dark:bg-success-9/20 dark:text-success-9 dark:hover:bg-success-9/30 dark:focus-visible:ring-success-9/40",
|
|
16
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
17
|
+
// `link` only underlines on hover, so at rest it reads as prose — fine inline, wrong
|
|
18
|
+
// where the link is the sole affordance in its container and has to look like one
|
|
19
|
+
// before you touch it (a tile whose action is blocked, an empty state's next step).
|
|
20
|
+
"link-underlined": "text-primary underline underline-offset-4",
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
24
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
25
|
+
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
26
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
27
|
+
icon: "size-8",
|
|
28
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
29
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
30
|
+
"icon-lg": "size-9",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
variant: "default",
|
|
35
|
+
size: "default",
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
function Button({ className, variant = "default", size = "default", asChild = false, ...props }) {
|
|
39
|
+
const Comp = asChild ? Slot : "button";
|
|
40
|
+
return (_jsx(Comp, { "data-slot": "button", "data-variant": variant, "data-size": size, className: cn(buttonVariants({ variant, size, className })), ...props }));
|
|
41
|
+
}
|
|
42
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type FormatDateTime } from '../lib/date-time-format.js';
|
|
2
|
+
export interface CalendarLabels {
|
|
3
|
+
aria: string;
|
|
4
|
+
typedPlaceholder: string;
|
|
5
|
+
typedAria: string;
|
|
6
|
+
previousMonth: string;
|
|
7
|
+
nextMonth: string;
|
|
8
|
+
today: string;
|
|
9
|
+
tomorrow: string;
|
|
10
|
+
nextWeek: string;
|
|
11
|
+
clear: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CalendarProps {
|
|
14
|
+
value: string | null;
|
|
15
|
+
onSelect: (date: string | null) => void;
|
|
16
|
+
selectionMode?: 'day' | 'week';
|
|
17
|
+
locale?: string;
|
|
18
|
+
format?: FormatDateTime;
|
|
19
|
+
className?: string;
|
|
20
|
+
typeable?: boolean;
|
|
21
|
+
autoFocusInput?: boolean;
|
|
22
|
+
minDate?: string;
|
|
23
|
+
quickActions?: boolean;
|
|
24
|
+
labels?: Partial<CalendarLabels>;
|
|
25
|
+
}
|
|
26
|
+
export declare function Calendar({ value, onSelect, selectionMode, locale, format, className, typeable, autoFocusInput, minDate, quickActions, labels, }: CalendarProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId, useMemo, useState } from 'react';
|
|
4
|
+
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
5
|
+
import { LayoutGroup, motion, useReducedMotion } from 'motion/react';
|
|
6
|
+
import { Button } from './button.js';
|
|
7
|
+
import { cn } from '../lib/cn.js';
|
|
8
|
+
import { parseLooseDate } from "../lib/parse-loose.js";
|
|
9
|
+
import { resolveDateTimeFormat } from '../lib/date-time-format.js';
|
|
10
|
+
const DEFAULT_LABELS = {
|
|
11
|
+
aria: 'Date picker',
|
|
12
|
+
typedPlaceholder: 'Type a date…',
|
|
13
|
+
typedAria: 'Type a date',
|
|
14
|
+
previousMonth: 'Previous month',
|
|
15
|
+
nextMonth: 'Next month',
|
|
16
|
+
today: 'Today',
|
|
17
|
+
tomorrow: 'Tomorrow',
|
|
18
|
+
nextWeek: 'Next week',
|
|
19
|
+
clear: 'Clear',
|
|
20
|
+
};
|
|
21
|
+
function ymd(d) {
|
|
22
|
+
const y = d.getFullYear();
|
|
23
|
+
const m = String(d.getMonth() + 1).padStart(2, '0');
|
|
24
|
+
const day = String(d.getDate()).padStart(2, '0');
|
|
25
|
+
return `${y}-${m}-${day}`;
|
|
26
|
+
}
|
|
27
|
+
function fromYmd(value) {
|
|
28
|
+
if (!value)
|
|
29
|
+
return null;
|
|
30
|
+
const [y, m, d] = value.split('-').map(Number);
|
|
31
|
+
if (!y || !m || !d)
|
|
32
|
+
return null;
|
|
33
|
+
return new Date(y, m - 1, d);
|
|
34
|
+
}
|
|
35
|
+
function startOfMonth(d) {
|
|
36
|
+
return new Date(d.getFullYear(), d.getMonth(), 1);
|
|
37
|
+
}
|
|
38
|
+
function addMonths(d, n) {
|
|
39
|
+
return new Date(d.getFullYear(), d.getMonth() + n, 1);
|
|
40
|
+
}
|
|
41
|
+
function sameDay(a, b) {
|
|
42
|
+
return (a.getFullYear() === b.getFullYear() &&
|
|
43
|
+
a.getMonth() === b.getMonth() &&
|
|
44
|
+
a.getDate() === b.getDate());
|
|
45
|
+
}
|
|
46
|
+
function startOfWeek(d) {
|
|
47
|
+
const dow = d.getDay();
|
|
48
|
+
const offset = (dow + 6) % 7;
|
|
49
|
+
return new Date(d.getFullYear(), d.getMonth(), d.getDate() - offset);
|
|
50
|
+
}
|
|
51
|
+
function sameWeek(a, b) {
|
|
52
|
+
return sameDay(startOfWeek(a), startOfWeek(b));
|
|
53
|
+
}
|
|
54
|
+
function buildMonthGrid(visibleMonth) {
|
|
55
|
+
const first = startOfMonth(visibleMonth);
|
|
56
|
+
const dow = first.getDay();
|
|
57
|
+
const offset = (dow + 6) % 7;
|
|
58
|
+
const start = new Date(first);
|
|
59
|
+
start.setDate(first.getDate() - offset);
|
|
60
|
+
const cells = [];
|
|
61
|
+
for (let i = 0; i < 42; i++) {
|
|
62
|
+
cells.push(new Date(start.getFullYear(), start.getMonth(), start.getDate() + i));
|
|
63
|
+
}
|
|
64
|
+
return cells;
|
|
65
|
+
}
|
|
66
|
+
export function Calendar({ value, onSelect, selectionMode = 'day', locale, format, className, typeable = true, autoFocusInput = false, minDate, quickActions = true, labels, }) {
|
|
67
|
+
const t = { ...DEFAULT_LABELS, ...labels };
|
|
68
|
+
const resolvedLocale = locale ?? 'en';
|
|
69
|
+
const today = useMemo(() => {
|
|
70
|
+
const d = new Date();
|
|
71
|
+
return new Date(d.getFullYear(), d.getMonth(), d.getDate());
|
|
72
|
+
}, []);
|
|
73
|
+
const selected = fromYmd(value);
|
|
74
|
+
const [visibleMonth, setVisibleMonth] = useState(() => startOfMonth(selected ?? today));
|
|
75
|
+
const [syncedValue, setSyncedValue] = useState(value);
|
|
76
|
+
if (value !== syncedValue) {
|
|
77
|
+
setSyncedValue(value);
|
|
78
|
+
const next = fromYmd(value);
|
|
79
|
+
if (next)
|
|
80
|
+
setVisibleMonth(startOfMonth(next));
|
|
81
|
+
}
|
|
82
|
+
const reduceMotion = useReducedMotion();
|
|
83
|
+
const selectionLayoutId = useId();
|
|
84
|
+
const selectionTransition = reduceMotion
|
|
85
|
+
? { duration: 0 }
|
|
86
|
+
: { type: 'spring', stiffness: 520, damping: 36 };
|
|
87
|
+
const [typed, setTyped] = useState('');
|
|
88
|
+
const previewDate = useMemo(() => (typed ? parseLooseDate(typed, today) : null), [typed, today]);
|
|
89
|
+
const handleTypedChange = (val) => {
|
|
90
|
+
setTyped(val);
|
|
91
|
+
const parsed = val ? parseLooseDate(val, today) : null;
|
|
92
|
+
if (parsed)
|
|
93
|
+
setVisibleMonth(startOfMonth(parsed));
|
|
94
|
+
};
|
|
95
|
+
const cells = useMemo(() => buildMonthGrid(visibleMonth), [visibleMonth]);
|
|
96
|
+
const fmt = useMemo(() => resolveDateTimeFormat(format, resolvedLocale), [format, resolvedLocale]);
|
|
97
|
+
const monthFormatter = useMemo(() => ({ format: (d) => fmt(d, { month: 'long', year: 'numeric' }) }), [fmt]);
|
|
98
|
+
const weekdayLabels = useMemo(() => {
|
|
99
|
+
const mondayAnchor = new Date(2024, 0, 1);
|
|
100
|
+
return Array.from({ length: 7 }, (_, i) => fmt(new Date(mondayAnchor.getFullYear(), 0, mondayAnchor.getDate() + i), {
|
|
101
|
+
weekday: 'short',
|
|
102
|
+
}).replace(/\.$/, ''));
|
|
103
|
+
}, [fmt]);
|
|
104
|
+
const isBeforeMin = (d) => (minDate ? ymd(d) < minDate : false);
|
|
105
|
+
const handlePick = (d) => {
|
|
106
|
+
if (isBeforeMin(d))
|
|
107
|
+
return;
|
|
108
|
+
setTyped('');
|
|
109
|
+
onSelect(ymd(d));
|
|
110
|
+
};
|
|
111
|
+
const handleTypedKeyDown = (e) => {
|
|
112
|
+
if (e.key === 'Enter') {
|
|
113
|
+
e.preventDefault();
|
|
114
|
+
if (!typed.trim()) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (previewDate && !isBeforeMin(previewDate)) {
|
|
118
|
+
setTyped('');
|
|
119
|
+
onSelect(ymd(previewDate));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
const monthIdx = visibleMonth.getMonth();
|
|
124
|
+
return (_jsxs("div", { className: cn('w-[260px] select-none', className), "data-testid": "calendar", role: "application", "aria-label": t.aria, children: [typeable ? (_jsx("div", { className: "mb-2 px-0.5", children: _jsx("input", { type: "text", value: typed, placeholder: t.typedPlaceholder, "aria-label": t.typedAria,
|
|
125
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus -- explicit opt-in restores focus when the picker opens
|
|
126
|
+
autoFocus: autoFocusInput, onChange: (e) => handleTypedChange(e.target.value), onKeyDown: handleTypedKeyDown, "data-testid": "calendar-typed-input", "data-parse-state": typed ? (previewDate ? 'ok' : 'unparseable') : 'empty', className: cn('w-full rounded-md bg-transparent px-2 py-1.5 text-[12.5px] outline-none', 'border-border/50 focus:border-ring/60 border', 'placeholder:text-muted-foreground/60', typed && !previewDate && 'border-destructive/40') }) })) : null, _jsxs("div", { className: "flex items-center justify-between gap-1 px-1", children: [_jsx(Button, { type: "button", variant: "ghost", size: "icon-xs", "aria-label": t.previousMonth, onClick: () => setVisibleMonth((m) => addMonths(m, -1)), children: _jsx(ChevronLeft, { className: "size-3.5", strokeWidth: 1.8 }) }), _jsx("div", { className: "text-foreground text-[12.5px] font-medium tracking-tight tabular-nums", children: monthFormatter.format(visibleMonth) }), _jsx(Button, { type: "button", variant: "ghost", size: "icon-xs", "aria-label": t.nextMonth, onClick: () => setVisibleMonth((m) => addMonths(m, 1)), children: _jsx(ChevronRight, { className: "size-3.5", strokeWidth: 1.8 }) })] }), _jsx("div", { className: "text-muted-foreground/70 mt-2 grid grid-cols-7 gap-0.5 px-0.5 text-center text-[10.5px] font-medium", children: weekdayLabels.map((w) => (_jsx("div", { className: "py-1", children: w }, w))) }), _jsx(LayoutGroup, { id: selectionLayoutId, children: _jsx("div", { className: cn('grid grid-cols-7 px-0.5', selectionMode === 'week' ? 'gap-y-0.5' : 'gap-0.5'), children: cells.map((d) => {
|
|
127
|
+
const inMonth = d.getMonth() === monthIdx;
|
|
128
|
+
const mondayFirstDayIndex = (d.getDay() + 6) % 7;
|
|
129
|
+
const isWeekStart = selectionMode === 'week' && mondayFirstDayIndex === 0;
|
|
130
|
+
const isWeekEnd = selectionMode === 'week' && mondayFirstDayIndex === 6;
|
|
131
|
+
const isToday = sameDay(d, today);
|
|
132
|
+
const isSelected = selected !== null &&
|
|
133
|
+
(selectionMode === 'week' ? sameWeek(d, selected) : sameDay(d, selected));
|
|
134
|
+
const isPreview = previewDate !== null &&
|
|
135
|
+
!isSelected &&
|
|
136
|
+
(selectionMode === 'week' ? sameWeek(d, previewDate) : sameDay(d, previewDate));
|
|
137
|
+
const hostsSelection = isSelected && (selectionMode === 'week' ? isWeekStart : true);
|
|
138
|
+
const isDisabled = isBeforeMin(d);
|
|
139
|
+
return (_jsxs("button", { type: "button", onClick: () => handlePick(d), disabled: isDisabled, "aria-disabled": isDisabled || undefined, "aria-pressed": isSelected || undefined, "aria-label": d.toDateString(), className: cn('relative h-7 rounded-md text-[12px] tabular-nums transition-colors', 'hover:bg-accent hover:text-accent-foreground cursor-pointer', 'focus-visible:ring-ring/40 focus-visible:ring-2 focus-visible:outline-none', isToday && 'rounded-lg ring-1 ring-foreground/40', inMonth ? 'text-foreground/90' : 'text-muted-foreground/45', isPreview && 'bg-primary/10', isSelected &&
|
|
140
|
+
(selectionMode === 'week'
|
|
141
|
+
? 'text-foreground hover:bg-transparent hover:text-foreground'
|
|
142
|
+
: 'text-primary-foreground hover:text-primary-foreground'), selectionMode === 'week' && (isSelected || isPreview) && 'rounded-none', (isSelected || isPreview) && isWeekStart && 'rounded-l-md', (isSelected || isPreview) && isWeekEnd && 'rounded-r-md', isDisabled && 'pointer-events-none cursor-default opacity-30 hover:bg-transparent'), children: [hostsSelection ? (_jsx(motion.div, { layoutId: "calendar-selection", "aria-hidden": true, "data-testid": "calendar-selection", transition: selectionTransition, className: cn('pointer-events-none absolute rounded-md', selectionMode === 'week'
|
|
143
|
+
? 'bg-primary/15 inset-y-0 left-0 w-[700%]'
|
|
144
|
+
: 'bg-primary inset-0') })) : null, _jsx("span", { className: "relative z-10", children: d.getDate() })] }, d.toISOString()));
|
|
145
|
+
}) }) }), quickActions ? (_jsxs("div", { className: "mt-2 flex items-center gap-1 px-0.5", children: [_jsx(Button, { type: "button", size: "xs", variant: "ghost", onClick: () => onSelect(ymd(today)), children: t.today }), _jsx(Button, { type: "button", size: "xs", variant: "ghost", onClick: () => {
|
|
146
|
+
const tomorrow = new Date(today);
|
|
147
|
+
tomorrow.setDate(today.getDate() + 1);
|
|
148
|
+
onSelect(ymd(tomorrow));
|
|
149
|
+
}, children: t.tomorrow }), _jsx(Button, { type: "button", size: "xs", variant: "ghost", onClick: () => {
|
|
150
|
+
const nextWeek = new Date(today);
|
|
151
|
+
nextWeek.setDate(today.getDate() + 7);
|
|
152
|
+
onSelect(ymd(nextWeek));
|
|
153
|
+
}, children: t.nextWeek }), value ? (_jsx(Button, { type: "button", size: "xs", variant: "ghost", className: "text-muted-foreground ml-auto", onClick: () => onSelect(null), children: t.clear })) : null] })) : null] }));
|
|
154
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type AriaAttributes, type ComponentProps, type ReactNode } from 'react';
|
|
2
|
+
import { type LucideIcon } from 'lucide-react';
|
|
3
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
+
export type ChannelKind = 'web' | 'voice' | 'email' | 'fax';
|
|
5
|
+
export declare function channelIcon(channel: ChannelKind | null | undefined): LucideIcon;
|
|
6
|
+
export interface ChannelBadgeProps extends ComponentProps<'span'> {
|
|
7
|
+
channel: ChannelKind | null | undefined;
|
|
8
|
+
label: string;
|
|
9
|
+
variant?: 'icon' | 'full';
|
|
10
|
+
}
|
|
11
|
+
export declare function ChannelBadge({ channel, label, variant, className, ...props }: ChannelBadgeProps): import("react").JSX.Element;
|
|
12
|
+
declare const channelListRowVariants: (props?: ({
|
|
13
|
+
density?: "compact" | "roomy" | null | undefined;
|
|
14
|
+
active?: boolean | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
export interface ChannelListRowProps extends VariantProps<typeof channelListRowVariants> {
|
|
17
|
+
title: string;
|
|
18
|
+
subtitle?: string;
|
|
19
|
+
subtitleMuted?: boolean;
|
|
20
|
+
timestamp?: string | null;
|
|
21
|
+
timestampTitle?: string;
|
|
22
|
+
avatar: ReactNode;
|
|
23
|
+
unread?: boolean;
|
|
24
|
+
unreadCount?: number;
|
|
25
|
+
unreadCountLabel?: string;
|
|
26
|
+
onClick?: () => void;
|
|
27
|
+
testId?: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
monoClassName?: string;
|
|
30
|
+
'aria-current'?: AriaAttributes['aria-current'];
|
|
31
|
+
}
|
|
32
|
+
export declare function ChannelListRow({ title, subtitle, subtitleMuted, timestamp, timestampTitle, avatar, unread, unreadCount, unreadCountLabel, active, density, onClick, testId, className, monoClassName, ...rest }: ChannelListRowProps): import("react").JSX.Element;
|
|
33
|
+
export { channelListRowVariants };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { createElement } from 'react';
|
|
4
|
+
import { Globe, Inbox, Mail, Phone, Printer } from 'lucide-react';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { cn } from '../lib/cn.js';
|
|
7
|
+
const channelIcons = {
|
|
8
|
+
web: Globe,
|
|
9
|
+
voice: Phone,
|
|
10
|
+
email: Mail,
|
|
11
|
+
fax: Printer,
|
|
12
|
+
};
|
|
13
|
+
export function channelIcon(channel) {
|
|
14
|
+
return channel ? (channelIcons[channel] ?? Inbox) : Inbox;
|
|
15
|
+
}
|
|
16
|
+
export function ChannelBadge({ channel, label, variant = 'full', className, ...props }) {
|
|
17
|
+
const icon = createElement(channelIcon(channel), {
|
|
18
|
+
className: variant === 'icon' ? 'size-3' : 'size-3 shrink-0',
|
|
19
|
+
strokeWidth: 1.5,
|
|
20
|
+
'aria-hidden': true,
|
|
21
|
+
});
|
|
22
|
+
if (variant === 'icon') {
|
|
23
|
+
return _jsx("span", { "data-slot": "channel-badge", "data-channel": channel ?? 'unknown', "data-variant": "icon", role: "img", "aria-label": label, title: label, className: cn('inline-flex size-5 shrink-0 items-center justify-center rounded-md border border-border/60 bg-muted/40 text-muted-foreground', className), ...props, children: icon });
|
|
24
|
+
}
|
|
25
|
+
return _jsxs("span", { "data-slot": "channel-badge", "data-channel": channel ?? 'unknown', "data-variant": "full", className: cn('inline-flex h-5 shrink-0 items-center gap-1 rounded-md border border-border/60 bg-muted/40 px-1.5 text-[11px] font-medium text-muted-foreground', className), ...props, children: [icon, _jsx("span", { children: label })] });
|
|
26
|
+
}
|
|
27
|
+
const channelListRowVariants = cva(['group relative flex w-full cursor-pointer items-center gap-2.5 rounded-md text-left', 'pr-2 pl-1.5 transition-colors outline-none', 'focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-0', 'hover:bg-muted/60'], {
|
|
28
|
+
variants: {
|
|
29
|
+
density: { roomy: 'h-12', compact: 'py-1.5' },
|
|
30
|
+
active: { true: 'bg-muted text-foreground', false: 'text-foreground/90' },
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: { density: 'roomy', active: false },
|
|
33
|
+
});
|
|
34
|
+
export function ChannelListRow({ title, subtitle, subtitleMuted = false, timestamp, timestampTitle, avatar, unread = false, unreadCount = 0, unreadCountLabel, active = false, density, onClick, testId, className, monoClassName, ...rest }) {
|
|
35
|
+
const showCount = unread && unreadCount > 0;
|
|
36
|
+
const showDot = unread && unreadCount <= 0;
|
|
37
|
+
const showRightColumn = Boolean(timestamp) || showCount || showDot;
|
|
38
|
+
return (_jsxs("button", { type: "button", "data-slot": "channel-list-row", "data-testid": testId, "data-unread": unread || undefined, "data-active": active || undefined, "aria-current": rest['aria-current'], onClick: onClick, className: cn(channelListRowVariants({ density, active }), className), children: [avatar, _jsxs("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-tight", children: [_jsx("span", { className: cn('min-w-0 truncate text-[12.5px]', unread ? 'font-semibold text-foreground' : 'text-foreground/90'), children: title }), subtitle ? _jsx("span", { className: cn('truncate text-[11px]', unread ? 'text-foreground/80' : subtitleMuted ? 'italic text-muted-foreground/55' : 'text-muted-foreground/85'), children: subtitle }) : null] }), showRightColumn ? _jsxs("span", { className: "flex shrink-0 flex-col items-end justify-center gap-1 self-stretch py-0.5", children: [timestamp ? _jsx("span", { title: timestampTitle, className: cn('text-[10px] tabular-nums', unread ? 'font-medium text-foreground/75' : 'text-muted-foreground/70', monoClassName), children: timestamp }) : null, showCount ? _jsx("span", { "aria-label": unreadCountLabel, className: cn('flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[10px] font-medium tabular-nums text-primary-foreground', monoClassName), children: unreadCount > 99 ? '99+' : unreadCount }) : showDot ? _jsx("span", { role: "img", "aria-label": unreadCountLabel, className: "size-2 rounded-full bg-primary" }) : null] }) : null] }));
|
|
39
|
+
}
|
|
40
|
+
export { channelListRowVariants };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../../lib/cn.js';
|
|
3
|
+
import { chartColor } from './colors.js';
|
|
4
|
+
import { ChartTooltip, useCartesianHover } from './hover.js';
|
|
5
|
+
import { CartesianGrid, cartesianMetrics } from './layout.js';
|
|
6
|
+
export function BarChart(props) {
|
|
7
|
+
const { data, xKey = 'label', yKeys = ['value'], stacked = false, colors, className } = props;
|
|
8
|
+
const metrics = cartesianMetrics(props, stacked);
|
|
9
|
+
const groupW = metrics.innerW / Math.max(1, data.length);
|
|
10
|
+
const format = props.valueFormatter ?? ((value) => String(value));
|
|
11
|
+
const barW = stacked
|
|
12
|
+
? Math.max(7, Math.min(36, groupW * 0.54))
|
|
13
|
+
: Math.max(5, Math.min(28, groupW / Math.max(1, yKeys.length) - 5));
|
|
14
|
+
const cornerRadius = Math.min(8, barW / 2);
|
|
15
|
+
const { state: hoverState, move, clear } = useCartesianHover(metrics, data.length, true);
|
|
16
|
+
const hoveredRow = hoverState ? data[hoverState.index] : undefined;
|
|
17
|
+
return (_jsxs("div", { className: "relative h-full w-full", children: [_jsxs("svg", { viewBox: `0 0 ${metrics.w} ${metrics.h}`, className: cn('h-full w-full overflow-visible', className), role: "img", "aria-label": props.ariaLabel, onPointerMove: move, onPointerLeave: clear, children: [_jsx(CartesianGrid, { ...metrics, data: data, xKey: xKey, banded: true }), hoverState ? (_jsx("rect", { x: metrics.pad.l + hoverState.index * groupW, y: metrics.pad.t, width: groupW, height: metrics.innerH, fill: "currentColor", opacity: 0.05, "aria-hidden": true })) : null, data.map((row, rowIndex) => {
|
|
18
|
+
let stackBase = 0;
|
|
19
|
+
const topStackIndex = stacked ? topPositiveStackIndex(row, yKeys) : -1;
|
|
20
|
+
return yKeys.map((key, keyIndex) => {
|
|
21
|
+
const value = Math.max(0, Number(row[key] ?? 0));
|
|
22
|
+
const barX = stacked
|
|
23
|
+
? metrics.pad.l + rowIndex * groupW + (groupW - barW) / 2
|
|
24
|
+
: metrics.pad.l + rowIndex * groupW + keyIndex * (barW + 4) + 6;
|
|
25
|
+
const barY = stacked ? metrics.y(stackBase + value) : metrics.y(value);
|
|
26
|
+
const barHeight = stacked
|
|
27
|
+
? metrics.y(stackBase) - metrics.y(stackBase + value)
|
|
28
|
+
: metrics.pad.t + metrics.innerH - barY;
|
|
29
|
+
const height = Math.max(0, barHeight);
|
|
30
|
+
const color = chartColor(colors, keyIndex);
|
|
31
|
+
const opacity = keyIndex === 0 ? 0.96 : 0.78;
|
|
32
|
+
stackBase += value;
|
|
33
|
+
if (stacked && keyIndex === topStackIndex && height > 0) {
|
|
34
|
+
return (_jsx("path", { d: topRoundedRectPath(barX, barY, barW, height, cornerRadius), fill: color, opacity: opacity, className: "animate-in fade-in slide-in-from-bottom-1 duration-300 hover:opacity-90" }, `${rowIndex}:${key}`));
|
|
35
|
+
}
|
|
36
|
+
return (_jsx("rect", { x: barX, y: barY, width: barW, height: height, rx: stacked ? 0 : cornerRadius, fill: color, opacity: opacity, className: "animate-in fade-in slide-in-from-bottom-1 duration-300 hover:opacity-90" }, `${rowIndex}:${key}`));
|
|
37
|
+
});
|
|
38
|
+
})] }), hoverState && hoveredRow ? (_jsx(ChartTooltip, { state: hoverState, row: hoveredRow, xKey: xKey, yKeys: yKeys, colors: colors, format: format })) : null] }));
|
|
39
|
+
}
|
|
40
|
+
function topPositiveStackIndex(row, yKeys) {
|
|
41
|
+
for (let index = yKeys.length - 1; index >= 0; index -= 1) {
|
|
42
|
+
if (Math.max(0, Number(row[yKeys[index] ?? ''] ?? 0)) > 0)
|
|
43
|
+
return index;
|
|
44
|
+
}
|
|
45
|
+
return -1;
|
|
46
|
+
}
|
|
47
|
+
function topRoundedRectPath(x, y, width, height, radius) {
|
|
48
|
+
const r = Math.min(radius, width / 2, height);
|
|
49
|
+
return [
|
|
50
|
+
`M ${x} ${y + height}`,
|
|
51
|
+
`L ${x} ${y + r}`,
|
|
52
|
+
`Q ${x} ${y} ${x + r} ${y}`,
|
|
53
|
+
`L ${x + width - r} ${y}`,
|
|
54
|
+
`Q ${x + width} ${y} ${x + width} ${y + r}`,
|
|
55
|
+
`L ${x + width} ${y + height}`,
|
|
56
|
+
'Z',
|
|
57
|
+
].join(' ');
|
|
58
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* The categorical series ramp is a token, not a literal, so a chart follows the theme
|
|
2
|
+
the way every other surface does — including inside an MCP App frame, which is
|
|
3
|
+
handed the resolved `--category-*` values along with the rest of the palette. */
|
|
4
|
+
export const CHART_COLORS = [
|
|
5
|
+
'var(--category-1)',
|
|
6
|
+
'var(--category-2)',
|
|
7
|
+
'var(--category-3)',
|
|
8
|
+
'var(--category-4)',
|
|
9
|
+
'var(--category-5)',
|
|
10
|
+
'var(--category-6)',
|
|
11
|
+
];
|
|
12
|
+
export function chartColor(colors, index) {
|
|
13
|
+
const custom = safeChartColor(colors?.[index]);
|
|
14
|
+
if (custom)
|
|
15
|
+
return custom;
|
|
16
|
+
return CHART_COLORS[index % CHART_COLORS.length] ?? 'var(--primary)';
|
|
17
|
+
}
|
|
18
|
+
const SAFE_CSS_COLOR_FUNCTION = /^(?:rgb|rgba|hsl|hsla|oklab|oklch)\([\d\s.,%/+-]+\)$/i;
|
|
19
|
+
const SAFE_HEX_COLOR = /^#[\da-f]{3,8}$/i;
|
|
20
|
+
const SAFE_COLOR_KEYWORD = /^(?:black|white|transparent|currentColor)$/i;
|
|
21
|
+
const SAFE_INTERNAL_COLOR_TOKEN = /^var\(--(?:primary|foreground|muted-foreground|border|ring|destructive|background|category-[1-6]|(?:success|warning|danger|info)-(?:3|9|11))\)$/i;
|
|
22
|
+
function safeChartColor(color) {
|
|
23
|
+
const value = color?.trim();
|
|
24
|
+
if (!value || value.length > 96 || hasControlCharacter(value))
|
|
25
|
+
return undefined;
|
|
26
|
+
if (/[;{}]/.test(value) || /\b(?:url|image-set|paint|expression|import)\s*\(/i.test(value)) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
if (SAFE_HEX_COLOR.test(value) ||
|
|
30
|
+
SAFE_COLOR_KEYWORD.test(value) ||
|
|
31
|
+
SAFE_INTERNAL_COLOR_TOKEN.test(value) ||
|
|
32
|
+
SAFE_CSS_COLOR_FUNCTION.test(value)) {
|
|
33
|
+
return value;
|
|
34
|
+
}
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
function hasControlCharacter(value) {
|
|
38
|
+
return Array.from(value).some((char) => {
|
|
39
|
+
const code = char.charCodeAt(0);
|
|
40
|
+
return code <= 31 || code === 127;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CartesianMetrics } from './layout.js';
|
|
2
|
+
import type { ChartDatum } from './types.js';
|
|
3
|
+
export interface ChartHoverState {
|
|
4
|
+
index: number;
|
|
5
|
+
left: number;
|
|
6
|
+
top: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function useCartesianHover(metrics: CartesianMetrics, count: number, banded: boolean): {
|
|
9
|
+
state: ChartHoverState | null;
|
|
10
|
+
move: (event: React.PointerEvent<SVGSVGElement>) => void;
|
|
11
|
+
clear: () => void;
|
|
12
|
+
};
|
|
13
|
+
export declare function ChartTooltip({ state, row, xKey, yKeys, colors, format, }: {
|
|
14
|
+
state: ChartHoverState;
|
|
15
|
+
row: ChartDatum;
|
|
16
|
+
xKey: string;
|
|
17
|
+
yKeys: string[];
|
|
18
|
+
colors?: string[];
|
|
19
|
+
format: (value: number) => string;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useState } from 'react';
|
|
4
|
+
import { chartColor } from './colors.js';
|
|
5
|
+
const TOOLTIP_EDGE_PX = 64;
|
|
6
|
+
export function useCartesianHover(metrics, count, banded) {
|
|
7
|
+
const [state, setState] = useState(null);
|
|
8
|
+
const clear = useCallback(() => setState(null), []);
|
|
9
|
+
const move = useCallback((event) => {
|
|
10
|
+
const svg = event.currentTarget;
|
|
11
|
+
const frame = svg.parentElement;
|
|
12
|
+
const ctm = svg.getScreenCTM?.();
|
|
13
|
+
if (!frame || !ctm || count === 0)
|
|
14
|
+
return;
|
|
15
|
+
const local = new DOMPoint(event.clientX, event.clientY).matrixTransform(ctm.inverse());
|
|
16
|
+
const step = metrics.innerW / Math.max(1, banded ? count : count - 1);
|
|
17
|
+
const rawIndex = banded
|
|
18
|
+
? Math.floor((local.x - metrics.pad.l) / step)
|
|
19
|
+
: Math.round((local.x - metrics.pad.l) / step);
|
|
20
|
+
const index = Math.max(0, Math.min(count - 1, rawIndex));
|
|
21
|
+
const anchorX = banded ? metrics.pad.l + step * (index + 0.5) : metrics.x(index);
|
|
22
|
+
const anchor = new DOMPoint(anchorX, metrics.pad.t).matrixTransform(ctm);
|
|
23
|
+
const frameRect = frame.getBoundingClientRect();
|
|
24
|
+
const left = Math.max(TOOLTIP_EDGE_PX, Math.min(frameRect.width - TOOLTIP_EDGE_PX, anchor.x - frameRect.left));
|
|
25
|
+
setState({ index, left, top: anchor.y - frameRect.top });
|
|
26
|
+
}, [banded, count, metrics]);
|
|
27
|
+
return { state, move, clear };
|
|
28
|
+
}
|
|
29
|
+
export function ChartTooltip({ state, row, xKey, yKeys, colors, format, }) {
|
|
30
|
+
return (_jsxs("div", { className: "bg-popover text-popover-foreground pointer-events-none absolute z-10 min-w-28 -translate-x-1/2 rounded-lg border px-2.5 py-1.5 text-xs shadow-md", style: { left: state.left, top: state.top + 4 }, role: "status", children: [_jsx("p", { className: "text-muted-foreground font-medium", children: String(row[xKey] ?? '') }), yKeys.map((key, index) => row[key] == null ? null : (_jsxs("p", { className: "mt-1 flex items-center gap-1.5 tabular-nums", children: [_jsx("span", { className: "size-2 shrink-0 rounded-[2px]", style: { background: chartColor(colors, index) }, "aria-hidden": true }), _jsx("span", { className: "text-muted-foreground", children: key }), _jsx("span", { className: "ml-auto pl-3 font-medium", children: format(Number(row[key])) })] }, key)))] }));
|
|
31
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { AreaChart } from './area-chart.js';
|
|
2
|
+
export { BarChart } from './bar-chart.js';
|
|
3
|
+
export { ChartLegend } from './legend.js';
|
|
4
|
+
export { LineChart } from './line-chart.js';
|
|
5
|
+
export { PieChart } from './pie-chart.js';
|
|
6
|
+
export { RadarChart } from './radar-chart.js';
|
|
7
|
+
export { RadialChart } from './radial-chart.js';
|
|
8
|
+
export { ScatterChart } from './scatter-chart.js';
|
|
9
|
+
export { chartColor } from './colors.js';
|
|
10
|
+
export type { BarChartProps, CartesianChartProps, CategoricalChartProps, ChartAxisOptions, ChartDatum, ChartLegendItem, ScatterChartProps, } from './types.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { AreaChart } from './area-chart.js';
|
|
2
|
+
export { BarChart } from './bar-chart.js';
|
|
3
|
+
export { ChartLegend } from './legend.js';
|
|
4
|
+
export { LineChart } from './line-chart.js';
|
|
5
|
+
export { PieChart } from './pie-chart.js';
|
|
6
|
+
export { RadarChart } from './radar-chart.js';
|
|
7
|
+
export { RadialChart } from './radial-chart.js';
|
|
8
|
+
export { ScatterChart } from './scatter-chart.js';
|
|
9
|
+
export { chartColor } from './colors.js';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { CartesianChartProps, ChartDatum } from './types.js';
|
|
2
|
+
export interface CartesianMetrics {
|
|
3
|
+
w: number;
|
|
4
|
+
h: number;
|
|
5
|
+
pad: {
|
|
6
|
+
l: number;
|
|
7
|
+
r: number;
|
|
8
|
+
t: number;
|
|
9
|
+
b: number;
|
|
10
|
+
};
|
|
11
|
+
innerW: number;
|
|
12
|
+
innerH: number;
|
|
13
|
+
max: number;
|
|
14
|
+
axis: CartesianChartProps['axis'];
|
|
15
|
+
showXAxis: boolean;
|
|
16
|
+
showYAxis: boolean;
|
|
17
|
+
y: (value: number) => number;
|
|
18
|
+
x: (index: number) => number;
|
|
19
|
+
valueFormatter?: (value: number) => string;
|
|
20
|
+
}
|
|
21
|
+
export declare function cartesianMetrics(props: CartesianChartProps, stacked: boolean): CartesianMetrics;
|
|
22
|
+
export declare function CartesianGrid({ data, xKey, w, h, pad, innerW, innerH, max, axis, showXAxis, showYAxis, valueFormatter, banded, }: CartesianMetrics & {
|
|
23
|
+
data: ChartDatum[];
|
|
24
|
+
xKey: string;
|
|
25
|
+
banded?: boolean;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
export declare function categoricalMetrics(height: number): {
|
|
28
|
+
w: number;
|
|
29
|
+
h: number;
|
|
30
|
+
cx: number;
|
|
31
|
+
cy: number;
|
|
32
|
+
r: number;
|
|
33
|
+
};
|
|
34
|
+
export declare function piePath(cx: number, cy: number, r: number, start: number, end: number): string;
|
|
35
|
+
export declare function ringArcPath(cx: number, cy: number, r: number, start: number, end: number): string;
|