@heyramzi/ui 2.24.0 → 3.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/COMPONENTS.md +13 -9
- package/README.md +5 -4
- package/dist/canvas/index.js +0 -1
- package/dist/canvas/pen/node-name.svelte.js +25 -0
- package/dist/canvas/ui/tools.js +7 -0
- package/dist/charts/chart-a11y.js +59 -0
- package/dist/charts/dashboard/index.js +0 -1
- package/dist/charts/dual-axis.js +38 -0
- package/dist/components/data-table/menu-key.js +19 -0
- package/dist/components/list-page/index.js +0 -1
- package/dist/components/theme/index.js +0 -1
- package/dist/components/toolbar/index.js +2 -4
- package/dist/components/work-parts/index.js +0 -1
- package/dist/editor/block-move.js +40 -0
- package/dist/editor/doc-blocks.js +2 -2
- package/dist/editor/extensions.js +14 -1
- package/dist/effects/border-beam/index.js +2 -0
- package/dist/effects/image-comparison/index.js +1 -0
- package/dist/effects/interactive-hover-button/index.js +1 -0
- package/dist/effects/magic-card/index.js +1 -0
- package/dist/effects/marquee/index.js +1 -0
- package/dist/effects/progressive-blur/index.js +1 -0
- package/dist/effects/spotlight/index.js +1 -0
- package/dist/effects/theme-toggle/index.js +1 -0
- package/dist/inbox/index.js +1 -1
- package/dist/lib/focus.js +15 -0
- package/dist/lib/tone.js +3 -4
- package/dist/shadcn/alert/alert-variants.js +1 -1
- package/dist/shadcn/attachment/context.js +10 -0
- package/dist/shadcn/dropdown-menu/menu-item.js +1 -1
- package/dist/shadcn/hooks/highlighter.js +58 -5
- package/dist/shadcn/sidebar/constants.js +1 -1
- package/dist/shadcn/sidebar/context.svelte.js +12 -1
- package/dist/slides/deck-controller.svelte.js +64 -34
- package/dist/slides/layout.js +3 -2
- package/dist/status/index.js +0 -1
- package/dist/work/index.js +0 -1
- package/dist/work/kanban-keyboard.js +10 -5
- package/package.json +44 -107
- package/scripts/svelte-dts.mjs +65 -0
- package/scripts/sync-shadcn.mjs +3 -1
- package/src/agents/agent-avatar.svelte +24 -12
- package/src/agents/agent-avatar.svelte.d.ts +6 -0
- package/src/agents/agent-avatar.test.ts +40 -0
- package/src/agents/agent-cast.svelte +83 -78
- package/src/agents/agent-cast.svelte.d.ts +20 -0
- package/src/agents/types.ts +1 -0
- package/src/ai/ai-button/AiButton.svelte +21 -10
- package/src/ai/ai-button/AiButton.svelte.d.ts +16 -0
- package/src/ai/ai-button/ai-button.svelte.test.ts +27 -0
- package/src/ai/confirmation/Confirmation.svelte +20 -4
- package/src/ai/confirmation/Confirmation.svelte.d.ts +12 -0
- package/src/ai/confirmation/ConfirmationAction.svelte +10 -3
- package/src/ai/confirmation/ConfirmationAction.svelte.d.ts +8 -0
- package/src/ai/confirmation/ConfirmationActions.svelte.d.ts +9 -0
- package/src/ai/confirmation/ConfirmationState.svelte.d.ts +10 -0
- package/src/ai/confirmation/ConfirmationTitle.svelte.d.ts +9 -0
- package/src/ai/confirmation/confirmation-focus.test.svelte +33 -0
- package/src/ai/confirmation/confirmation-focus.test.svelte.d.ts +8 -0
- package/src/ai/confirmation/confirmation-focus.test.ts +34 -0
- package/src/ai/confirmation/confirmation-parts.test.svelte.d.ts +7 -0
- package/src/ai/generation-progress/GenerationProgress.svelte +198 -171
- package/src/ai/generation-progress/GenerationProgress.svelte.d.ts +15 -0
- package/src/ai/generation-progress/generation-progress.test.ts +37 -0
- package/src/ai/loading-state/PixelLoader.svelte +41 -36
- package/src/ai/loading-state/PixelLoader.svelte.d.ts +13 -0
- package/src/ai/prompt-input/PromptInput.svelte +1 -1
- package/src/ai/prompt-input/PromptInput.svelte.d.ts +14 -0
- package/src/ai/prompt-input/PromptInputBody.svelte.d.ts +9 -0
- package/src/ai/prompt-input/PromptInputSubmit.svelte +3 -3
- package/src/ai/prompt-input/PromptInputSubmit.svelte.d.ts +19 -0
- package/src/ai/prompt-input/PromptInputTextarea.svelte +6 -1
- package/src/ai/prompt-input/PromptInputTextarea.svelte.d.ts +14 -0
- package/src/ai/prompt-input/PromptInputToolbar.svelte.d.ts +9 -0
- package/src/ai/prompt-input/prompt-input.test.ts +64 -0
- package/src/ai/reasoning/Reasoning.svelte.d.ts +10 -0
- package/src/ai/reasoning/ReasoningContent.svelte.d.ts +8 -0
- package/src/ai/reasoning/ReasoningTrigger.svelte +2 -1
- package/src/ai/reasoning/ReasoningTrigger.svelte.d.ts +8 -0
- package/src/ai/response/Response.css +23 -19
- package/src/ai/response/Response.svelte.d.ts +11 -0
- package/src/ai/suggestion/Suggestion.svelte.d.ts +10 -0
- package/src/ai/suggestion/Suggestions.svelte +5 -2
- package/src/ai/suggestion/Suggestions.svelte.d.ts +11 -0
- package/src/ai/typing-dots/TypingDots.css +27 -23
- package/src/ai/typing-dots/TypingDots.svelte.d.ts +12 -0
- package/src/ai/voice-waveform/VoiceWaveform.css +31 -27
- package/src/ai/voice-waveform/VoiceWaveform.svelte.d.ts +10 -0
- package/src/animations/avatar-group-hover.css +25 -21
- package/src/animations/card-tilt.css +71 -65
- package/src/animations/digit-pop-in.css +49 -40
- package/src/animations/dropdown.css +125 -107
- package/src/animations/input-clear-dissolve.css +69 -59
- package/src/animations/input-shake.css +55 -48
- package/src/animations/learn-more-hover.css +53 -43
- package/src/animations/like-button.css +74 -62
- package/src/animations/modal.css +83 -74
- package/src/animations/page-side-by-side.css +50 -42
- package/src/animations/plus-menu-morph.css +96 -87
- package/src/animations/resize.css +16 -13
- package/src/animations/shimmer-text.css +46 -40
- package/src/animations/spinning-counter.css +50 -43
- package/src/animations/success-check.css +69 -58
- package/src/animations/text-swap.css +35 -31
- package/src/animations/thinking-states.css +61 -54
- package/src/canvas/card/card-frame.svelte.d.ts +14 -0
- package/src/canvas/card/card.css +16 -10
- package/src/canvas/card/resize-handles.svelte.d.ts +11 -0
- package/src/canvas/chrome/chrome-zoom.svelte.d.ts +3 -0
- package/src/canvas/chrome/chrome.css +75 -69
- package/src/canvas/chrome/lock-badge.svelte.d.ts +8 -0
- package/src/canvas/chrome/side-handles.svelte.d.ts +6 -0
- package/src/canvas/chrome/size-chip.svelte.d.ts +3 -0
- package/src/canvas/chrome/snap-guides.svelte +16 -12
- package/src/canvas/chrome/snap-guides.svelte.d.ts +9 -0
- package/src/canvas/components/icons/ToolIcon.svelte.d.ts +8 -0
- package/src/canvas/components/shared/svg/PreviewSvg.svelte +9 -5
- package/src/canvas/components/shared/svg/PreviewSvg.svelte.d.ts +13 -0
- package/src/canvas/components/shared/svg/ShapeOutline.svelte +8 -4
- package/src/canvas/components/shared/svg/ShapeOutline.svelte.d.ts +15 -0
- package/src/canvas/components/shared/svg/StrokeNode.svelte +21 -11
- package/src/canvas/components/shared/svg/StrokeNode.svelte.d.ts +5 -0
- package/src/canvas/components/shared/svg/TextRule.svelte +8 -4
- package/src/canvas/components/shared/svg/TextRule.svelte.d.ts +9 -0
- package/src/canvas/edges/bend-handle.svelte +18 -14
- package/src/canvas/edges/bend-handle.svelte.d.ts +10 -0
- package/src/canvas/edges/edge-gradient.svelte.d.ts +16 -0
- package/src/canvas/edges/gradient-edge.svelte.d.ts +21 -0
- package/src/canvas/index.ts +0 -1
- package/src/canvas/lod/lod-switch.svelte +38 -33
- package/src/canvas/lod/lod-switch.svelte.d.ts +14 -0
- package/src/canvas/pen/PenField.svelte.d.ts +26 -0
- package/src/canvas/pen/PenOverlay.svelte +10 -6
- package/src/canvas/pen/PenOverlay.svelte.d.ts +23 -0
- package/src/canvas/pen/ShapeNode.svelte +6 -0
- package/src/canvas/pen/ShapeNode.svelte.d.ts +5 -0
- package/src/canvas/pen/TextNode.svelte +12 -2
- package/src/canvas/pen/TextNode.svelte.d.ts +5 -0
- package/src/canvas/pen/host-field.test.svelte.d.ts +6 -0
- package/src/canvas/pen/node-name.svelte.ts +32 -0
- package/src/canvas/pen/pen.css +69 -63
- package/src/canvas/screen/GlyphIcon.svelte.d.ts +9 -0
- package/src/canvas/screen/PartView.svelte +25 -25
- package/src/canvas/screen/PartView.svelte.d.ts +17 -0
- package/src/canvas/screen/ScreenBody.svelte +4 -4
- package/src/canvas/screen/ScreenBody.svelte.d.ts +11 -0
- package/src/canvas/screen/ScreenCard.svelte.d.ts +9 -0
- package/src/canvas/screen/screen.css +509 -505
- package/src/canvas/ui/CanvasToolbar.svelte.d.ts +30 -0
- package/src/canvas/ui/FrameLayer.svelte +18 -14
- package/src/canvas/ui/FrameLayer.svelte.d.ts +9 -0
- package/src/canvas/ui/PenLayer.svelte.d.ts +15 -0
- package/src/canvas/ui/StylePanel.svelte +41 -37
- package/src/canvas/ui/StylePanel.svelte.d.ts +32 -0
- package/src/canvas/ui/canvas-grid.svelte.d.ts +11 -0
- package/src/canvas/ui/canvas-ui.css +286 -277
- package/src/canvas/ui/tools.test.ts +39 -0
- package/src/canvas/ui/tools.ts +8 -0
- package/src/charts/README.md +2 -2
- package/src/charts/animated-value.css +6 -2
- package/src/charts/animated-value.svelte.d.ts +24 -0
- package/src/charts/area-chart.css +33 -21
- package/src/charts/area-chart.svelte +157 -27
- package/src/charts/area-chart.svelte.d.ts +69 -0
- package/src/charts/bar-chart.css +112 -102
- package/src/charts/bar-chart.svelte +39 -41
- package/src/charts/bar-chart.svelte.d.ts +64 -0
- package/src/charts/chart-a11y.css +23 -0
- package/src/charts/chart-a11y.test.ts +59 -0
- package/src/charts/chart-a11y.ts +92 -0
- package/src/charts/chart-plot.svelte +106 -0
- package/src/charts/chart-plot.svelte.d.ts +18 -0
- package/src/charts/chart-tokens.css +53 -51
- package/src/charts/charts.css +154 -142
- package/src/charts/crosshair.svelte.d.ts +7 -0
- package/src/charts/dashboard/dashboard-section.svelte +19 -3
- package/src/charts/dashboard/dashboard-section.svelte.d.ts +17 -0
- package/src/charts/dashboard/data-table.svelte +1 -1
- package/src/charts/dashboard/data-table.svelte.d.ts +86 -0
- package/src/charts/dashboard/index.ts +0 -1
- package/src/charts/dashboard/panel-grid.svelte +1 -1
- package/src/charts/dashboard/panel-grid.svelte.d.ts +14 -0
- package/src/charts/dashboard/period-filter.svelte.d.ts +37 -0
- package/src/charts/dashboard/rating-chip.svelte.d.ts +9 -0
- package/src/charts/dashboard/stat-band.svelte.d.ts +14 -0
- package/src/charts/dashboard/stat-tile.svelte +9 -5
- package/src/charts/dashboard/stat-tile.svelte.d.ts +62 -0
- package/src/charts/donut-chart.css +52 -46
- package/src/charts/donut-chart.svelte.d.ts +39 -0
- package/src/charts/dual-axis.test.ts +40 -0
- package/src/charts/dual-axis.ts +43 -0
- package/src/charts/edge-fade.svelte.d.ts +9 -0
- package/src/charts/figure.css +104 -91
- package/src/charts/figure.svelte.d.ts +40 -0
- package/src/charts/gauge-chart.css +74 -70
- package/src/charts/gauge-chart.svelte.d.ts +58 -0
- package/src/charts/hover-focus.svelte.d.ts +14 -0
- package/src/charts/legend.css +112 -108
- package/src/charts/legend.svelte +3 -3
- package/src/charts/legend.svelte.d.ts +30 -0
- package/src/charts/line-chart.css +27 -21
- package/src/charts/line-chart.svelte +61 -37
- package/src/charts/line-chart.svelte.d.ts +53 -0
- package/src/charts/number-chart.css +185 -163
- package/src/charts/number-chart.svelte +8 -4
- package/src/charts/number-chart.svelte.d.ts +58 -0
- package/src/charts/pop-value.svelte.d.ts +9 -0
- package/src/charts/primitives/chart-container.svelte.d.ts +9 -0
- package/src/charts/primitives/chart-style.svelte.d.ts +8 -0
- package/src/charts/primitives/chart-tooltip.svelte +1 -1
- package/src/charts/primitives/chart-tooltip.svelte.d.ts +26 -0
- package/src/charts/reference-line.css +18 -14
- package/src/charts/reference-line.svelte.d.ts +15 -0
- package/src/charts/reveal.svelte.d.ts +9 -0
- package/src/charts/ring-chart.css +82 -78
- package/src/charts/ring-chart.svelte +3 -3
- package/src/charts/ring-chart.svelte.d.ts +41 -0
- package/src/charts/sparkline.css +43 -34
- package/src/charts/sparkline.svelte +52 -8
- package/src/charts/sparkline.svelte.d.ts +51 -0
- package/src/charts/stat-card.css +110 -92
- package/src/charts/stat-card.svelte.d.ts +65 -0
- package/src/charts/time-series-chart.css +24 -19
- package/src/charts/time-series-chart.svelte +43 -10
- package/src/charts/time-series-chart.svelte.d.ts +30 -0
- package/src/charts/trend-pill.css +39 -32
- package/src/charts/trend-pill.svelte.d.ts +14 -0
- package/src/class-tokens.test.ts +34 -0
- package/src/components/chip/count-chip.svelte.d.ts +12 -0
- package/src/components/chip/tag-chip.svelte +6 -6
- package/src/components/chip/tag-chip.svelte.d.ts +20 -0
- package/src/components/copy/copy-button.svelte +22 -18
- package/src/components/copy/copy-button.svelte.d.ts +37 -0
- package/src/components/data-table/infinite-scroll.svelte.d.ts +37 -0
- package/src/components/data-table/menu-key.ts +22 -0
- package/src/components/data-table/pagination.svelte +36 -11
- package/src/components/data-table/pagination.svelte.d.ts +14 -0
- package/src/components/data-table/row-arrow.svelte.d.ts +6 -0
- package/src/components/data-table/row-context-menu.svelte +7 -6
- package/src/components/data-table/row-context-menu.svelte.d.ts +15 -0
- package/src/components/data-table/sortable-head.svelte +13 -18
- package/src/components/data-table/sortable-head.svelte.d.ts +38 -0
- package/src/components/data-table/table-skeleton.svelte.d.ts +18 -0
- package/src/components/docs/doc-page.svelte +8 -4
- package/src/components/docs/doc-page.svelte.d.ts +34 -0
- package/src/components/docs/on-this-page.svelte +109 -101
- package/src/components/docs/on-this-page.svelte.d.ts +17 -0
- package/src/components/field-row/field-row.svelte.d.ts +16 -0
- package/src/components/hold-to-confirm/hold-to-confirm.svelte +113 -66
- package/src/components/hold-to-confirm/hold-to-confirm.svelte.d.ts +22 -0
- package/src/components/hold-to-confirm/hold-to-confirm.test.ts +105 -0
- package/src/components/language-flag/language-flag.svelte +2 -1
- package/src/components/language-flag/language-flag.svelte.d.ts +11 -0
- package/src/components/list-page/detail-header.svelte.d.ts +15 -0
- package/src/components/list-page/detail-row.svelte.d.ts +9 -0
- package/src/components/list-page/detail-stack.svelte.d.ts +9 -0
- package/src/components/list-page/empty-state.svelte +16 -12
- package/src/components/list-page/empty-state.svelte.d.ts +23 -0
- package/src/components/list-page/filter-item.svelte +1 -1
- package/src/components/list-page/filter-item.svelte.d.ts +10 -0
- package/src/components/list-page/filter-popover.svelte +1 -1
- package/src/components/list-page/filter-popover.svelte.d.ts +20 -0
- package/src/components/list-page/grouped-list.svelte +1 -0
- package/src/components/list-page/grouped-list.svelte.d.ts +49 -0
- package/src/components/list-page/index.ts +0 -1
- package/src/components/list-page/list-page-shell.svelte.d.ts +31 -0
- package/src/components/list-page/master-detail-focus.test.ts +28 -0
- package/src/components/list-page/master-detail.svelte +57 -28
- package/src/components/list-page/master-detail.svelte.d.ts +18 -0
- package/src/components/list-page/master-detail.test.ts +1 -1
- package/src/components/list-page/notice-bar.svelte.d.ts +14 -0
- package/src/components/list-page/prev-next.svelte +7 -7
- package/src/components/list-page/prev-next.svelte.d.ts +14 -0
- package/src/components/list-page/rail-body.svelte.d.ts +8 -0
- package/src/components/list-page/rail-head.svelte.d.ts +10 -0
- package/src/components/list-page/rail-row.svelte.d.ts +18 -0
- package/src/components/mark/mark.svelte +2 -0
- package/src/components/mark/mark.svelte.d.ts +16 -0
- package/src/components/open-in/open-in.svelte +3 -3
- package/src/components/open-in/open-in.svelte.d.ts +35 -0
- package/src/components/picker/mark-picker.svelte +2 -2
- package/src/components/picker/mark-picker.svelte.d.ts +38 -0
- package/src/components/picker/picker.svelte +47 -3
- package/src/components/picker/picker.svelte.d.ts +59 -0
- package/src/components/picker/picker.test.ts +71 -0
- package/src/components/section-card/section-card.svelte.d.ts +13 -0
- package/src/components/section-header/section-header.svelte.d.ts +17 -0
- package/src/components/section-header/section-label.svelte.d.ts +10 -0
- package/src/components/segmented/animated-tabs.svelte.d.ts +61 -0
- package/src/components/segmented/section-runs.svelte.d.ts +23 -0
- package/src/components/segmented/segment.svelte +1 -1
- package/src/components/segmented/segment.svelte.d.ts +30 -0
- package/src/components/segmented/segmented-filter.svelte +4 -4
- package/src/components/segmented/segmented-filter.svelte.d.ts +43 -0
- package/src/components/segmented/segmented-nav.svelte.d.ts +17 -0
- package/src/components/segmented/segmented-overflow.svelte +1 -0
- package/src/components/segmented/segmented-overflow.svelte.d.ts +37 -0
- package/src/components/segmented/segmented-track.svelte +107 -103
- package/src/components/segmented/segmented-track.svelte.d.ts +19 -0
- package/src/components/star-rating-input/star-rating-input.svelte +151 -146
- package/src/components/star-rating-input/star-rating-input.svelte.d.ts +31 -0
- package/src/components/star-rating-input/star-rating-input.test.ts +90 -0
- package/src/components/svg/svg.svelte.d.ts +7 -0
- package/src/components/table-view/table-view.svelte +34 -28
- package/src/components/table-view/table-view.svelte.d.ts +96 -0
- package/src/components/table-view/table-view.test.ts +32 -6
- package/src/components/tags-input/tags-input.svelte +68 -16
- package/src/components/tags-input/tags-input.svelte.d.ts +40 -0
- package/src/components/tags-input/tags-input.test.ts +101 -0
- package/src/components/theme/index.ts +0 -1
- package/src/components/theme/theme-provider.svelte +8 -3
- package/src/components/theme/theme-provider.svelte.d.ts +19 -0
- package/src/components/theme/theme-provider.test.ts +5 -5
- package/src/components/toolbar/index.ts +2 -4
- package/src/components/toolbar/toolbar-search.svelte +4 -0
- package/src/components/toolbar/toolbar-search.svelte.d.ts +11 -0
- package/src/components/toolbar/toolbar.svelte +1 -1
- package/src/components/toolbar/toolbar.svelte.d.ts +47 -0
- package/src/components/toolbar/toolbar.test.ts +7 -0
- package/src/components/work-parts/group-head.svelte.d.ts +16 -0
- package/src/components/work-parts/index.ts +0 -1
- package/src/components/work-parts/property-row.svelte.d.ts +19 -0
- package/src/components/work-parts/work-card.svelte.d.ts +11 -0
- package/src/components/work-parts/work-well.svelte.d.ts +13 -0
- package/src/css-layers.test.ts +138 -0
- package/src/editor/README.md +1 -1
- package/src/editor/block-move.test.ts +58 -0
- package/src/editor/block-move.ts +52 -0
- package/src/editor/content.css +356 -352
- package/src/editor/doc-blocks.ts +3 -3
- package/src/editor/doc-page.css +328 -324
- package/src/editor/editor-toolbar.svelte +65 -50
- package/src/editor/editor-toolbar.svelte.d.ts +13 -0
- package/src/editor/editor.svelte +219 -158
- package/src/editor/editor.svelte.d.ts +27 -0
- package/src/editor/extensions.ts +18 -2
- package/src/editor/image-align.test.ts +35 -0
- package/src/editor/image-toolbar.svelte +73 -57
- package/src/editor/image-toolbar.svelte.d.ts +11 -0
- package/src/editor/inline-editor.svelte +27 -16
- package/src/editor/inline-editor.svelte.d.ts +40 -0
- package/src/editor/renderer.svelte.d.ts +11 -0
- package/src/editor/slash-menu.svelte +103 -88
- package/src/editor/slash-menu.svelte.d.ts +17 -0
- package/src/effects/animated-beam/AnimatedBeam.svelte.d.ts +4 -0
- package/src/effects/animated-beam/diagrams/BeamSvg.svelte.d.ts +22 -0
- package/src/effects/border-beam/BorderBeam.svelte.d.ts +4 -0
- package/src/effects/border-beam/index.ts +10 -0
- package/src/effects/image-comparison/ImageComparison.css +114 -97
- package/src/effects/image-comparison/ImageComparison.svelte.d.ts +44 -0
- package/src/effects/image-comparison/index.ts +4 -0
- package/src/effects/image-reveal/ImageReveal.css +14 -9
- package/src/effects/image-reveal/ImageReveal.svelte.d.ts +11 -0
- package/src/effects/interactive-hover-button/InteractiveHoverButton.svelte +234 -222
- package/src/effects/interactive-hover-button/InteractiveHoverButton.svelte.d.ts +16 -0
- package/src/effects/interactive-hover-button/index.ts +1 -0
- package/src/effects/magic-card/MagicCard.css +49 -45
- package/src/effects/magic-card/MagicCard.svelte.d.ts +15 -0
- package/src/effects/magic-card/index.ts +1 -0
- package/src/effects/marquee/Marquee.css +81 -62
- package/src/effects/marquee/Marquee.svelte +1 -0
- package/src/effects/marquee/Marquee.svelte.d.ts +27 -0
- package/src/effects/marquee/index.ts +1 -0
- package/src/effects/marquee/marquee.test.ts +24 -0
- package/src/effects/progressive-blur/ProgressiveBlur.css +13 -8
- package/src/effects/progressive-blur/ProgressiveBlur.svelte.d.ts +14 -0
- package/src/effects/progressive-blur/index.ts +1 -0
- package/src/effects/reveal/AnimatedGroup.svelte.d.ts +14 -0
- package/src/effects/reveal/InView.svelte.d.ts +12 -0
- package/src/effects/reveal/TextEffect.svelte.d.ts +16 -0
- package/src/effects/reveal/reveal.css +89 -73
- package/src/effects/shader-gradient/ShaderGradient.svelte.d.ts +4 -0
- package/src/effects/spotlight/Spotlight.css +8 -4
- package/src/effects/spotlight/Spotlight.svelte.d.ts +8 -0
- package/src/effects/spotlight/index.ts +1 -0
- package/src/effects/theme-toggle/ThemeToggle.css +165 -160
- package/src/effects/theme-toggle/ThemeToggle.svelte +12 -6
- package/src/effects/theme-toggle/ThemeToggle.svelte.d.ts +24 -0
- package/src/effects/theme-toggle/index.ts +1 -0
- package/src/icon-names.test.ts +88 -0
- package/src/inbox/index.ts +1 -2
- package/src/inbox/thread-inbox.svelte +1 -1
- package/src/inbox/thread-inbox.svelte.d.ts +52 -0
- package/src/lib/focus.ts +19 -0
- package/src/lib/live-region.svelte +14 -0
- package/src/lib/live-region.svelte.d.ts +5 -0
- package/src/lib/panel.svelte +2 -2
- package/src/lib/panel.svelte.d.ts +30 -0
- package/src/lib/tone.ts +3 -4
- package/src/modules.test.ts +119 -7
- package/src/onboarding/README.md +2 -2
- package/src/onboarding/onboarding-provider.svelte +1 -1
- package/src/onboarding/onboarding-provider.svelte.d.ts +17 -0
- package/src/onboarding/tour-card.svelte +10 -10
- package/src/onboarding/tour-card.svelte.d.ts +21 -0
- package/src/onboarding/tour-runner.svelte +62 -60
- package/src/onboarding/tour-runner.svelte.d.ts +11 -0
- package/src/panel/side-panel.svelte +4 -9
- package/src/panel/side-panel.svelte.d.ts +48 -0
- package/src/record/field-section.svelte.d.ts +19 -0
- package/src/record/info-list.svelte +4 -3
- package/src/record/info-list.svelte.d.ts +25 -0
- package/src/record/next-up.svelte.d.ts +14 -0
- package/src/record/project-list.svelte.d.ts +18 -0
- package/src/record/record-header.svelte.d.ts +27 -0
- package/src/record/record-rail.svelte.d.ts +23 -0
- package/src/record/record-shell.svelte.d.ts +48 -0
- package/src/record/record-stats.svelte.d.ts +10 -0
- package/src/record/record-timeline.svelte +3 -1
- package/src/record/record-timeline.svelte.d.ts +29 -0
- package/src/record/steps-rail.svelte +9 -9
- package/src/record/steps-rail.svelte.d.ts +23 -0
- package/src/record/where-we-are.svelte.d.ts +25 -0
- package/src/shadcn/accordion/accordion-content.svelte.d.ts +4 -0
- package/src/shadcn/accordion/accordion-item.svelte.d.ts +4 -0
- package/src/shadcn/accordion/accordion-trigger.svelte +1 -1
- package/src/shadcn/accordion/accordion-trigger.svelte.d.ts +12 -0
- package/src/shadcn/accordion/accordion.svelte.d.ts +4 -0
- package/src/shadcn/alert/alert-description.svelte.d.ts +5 -0
- package/src/shadcn/alert/alert-title.svelte.d.ts +5 -0
- package/src/shadcn/alert/alert-variants.ts +1 -1
- package/src/shadcn/alert/alert.svelte.d.ts +10 -0
- package/src/shadcn/alert-dialog/alert-dialog-action.svelte.d.ts +4 -0
- package/src/shadcn/alert-dialog/alert-dialog-cancel.svelte.d.ts +4 -0
- package/src/shadcn/alert-dialog/alert-dialog-content.svelte.d.ts +10 -0
- package/src/shadcn/alert-dialog/alert-dialog-description.svelte.d.ts +4 -0
- package/src/shadcn/alert-dialog/alert-dialog-footer.svelte.d.ts +9 -0
- package/src/shadcn/alert-dialog/alert-dialog-header.svelte.d.ts +5 -0
- package/src/shadcn/alert-dialog/alert-dialog-overlay.svelte.d.ts +4 -0
- package/src/shadcn/alert-dialog/alert-dialog-portal.svelte.d.ts +3 -0
- package/src/shadcn/alert-dialog/alert-dialog-title.svelte.d.ts +4 -0
- package/src/shadcn/alert-dialog/alert-dialog-trigger.svelte.d.ts +4 -0
- package/src/shadcn/alert-dialog/alert-dialog.svelte.d.ts +3 -0
- package/src/shadcn/attachment/attachment-action.svelte +7 -0
- package/src/shadcn/attachment/attachment-action.svelte.d.ts +4 -0
- package/src/shadcn/attachment/attachment-actions.svelte.d.ts +5 -0
- package/src/shadcn/attachment/attachment-content.svelte.d.ts +5 -0
- package/src/shadcn/attachment/attachment-description.svelte.d.ts +5 -0
- package/src/shadcn/attachment/attachment-group.svelte.d.ts +5 -0
- package/src/shadcn/attachment/attachment-media.svelte.d.ts +16 -0
- package/src/shadcn/attachment/attachment-title.svelte +3 -0
- package/src/shadcn/attachment/attachment-title.svelte.d.ts +5 -0
- package/src/shadcn/attachment/attachment-trigger.svelte +5 -0
- package/src/shadcn/attachment/attachment-trigger.svelte.d.ts +11 -0
- package/src/shadcn/attachment/attachment.svelte +4 -0
- package/src/shadcn/attachment/attachment.svelte.d.ts +25 -0
- package/src/shadcn/attachment/context.ts +13 -0
- package/src/shadcn/avatar/avatar-badge.svelte.d.ts +5 -0
- package/src/shadcn/avatar/avatar-fallback.svelte.d.ts +4 -0
- package/src/shadcn/avatar/avatar-group-count.svelte.d.ts +5 -0
- package/src/shadcn/avatar/avatar-group.svelte.d.ts +5 -0
- package/src/shadcn/avatar/avatar-image.svelte.d.ts +4 -0
- package/src/shadcn/avatar/avatar.svelte.d.ts +7 -0
- package/src/shadcn/badge/badge.svelte.d.ts +13 -0
- package/src/shadcn/breadcrumb/breadcrumb-ellipsis.svelte +1 -1
- package/src/shadcn/breadcrumb/breadcrumb-ellipsis.svelte.d.ts +5 -0
- package/src/shadcn/breadcrumb/breadcrumb-item.svelte.d.ts +5 -0
- package/src/shadcn/breadcrumb/breadcrumb-link.svelte.d.ts +11 -0
- package/src/shadcn/breadcrumb/breadcrumb-list.svelte.d.ts +5 -0
- package/src/shadcn/breadcrumb/breadcrumb-page.svelte.d.ts +5 -0
- package/src/shadcn/breadcrumb/breadcrumb-separator.svelte +1 -1
- package/src/shadcn/breadcrumb/breadcrumb-separator.svelte.d.ts +5 -0
- package/src/shadcn/breadcrumb/breadcrumb.svelte.d.ts +5 -0
- package/src/shadcn/bubble/bubble-content.svelte.d.ts +11 -0
- package/src/shadcn/bubble/bubble-group.svelte.d.ts +5 -0
- package/src/shadcn/bubble/bubble-reactions.svelte.d.ts +22 -0
- package/src/shadcn/bubble/bubble.svelte +1 -1
- package/src/shadcn/bubble/bubble.svelte.d.ts +22 -0
- package/src/shadcn/button/button.svelte +1 -1
- package/src/shadcn/button/button.svelte.d.ts +33 -0
- package/src/shadcn/calendar/calendar-caption.svelte.d.ts +19 -0
- package/src/shadcn/calendar/calendar-cell.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-day.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-grid-body.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-grid-head.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-grid-row.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-grid.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-head-cell.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-header.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-heading.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-month-select.svelte +1 -1
- package/src/shadcn/calendar/calendar-month-select.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar-month.svelte.d.ts +5 -0
- package/src/shadcn/calendar/calendar-months.svelte.d.ts +5 -0
- package/src/shadcn/calendar/calendar-nav.svelte.d.ts +5 -0
- package/src/shadcn/calendar/calendar-next-button.svelte +1 -1
- package/src/shadcn/calendar/calendar-next-button.svelte.d.ts +8 -0
- package/src/shadcn/calendar/calendar-prev-button.svelte +1 -1
- package/src/shadcn/calendar/calendar-prev-button.svelte.d.ts +8 -0
- package/src/shadcn/calendar/calendar-year-select.svelte +1 -1
- package/src/shadcn/calendar/calendar-year-select.svelte.d.ts +4 -0
- package/src/shadcn/calendar/calendar.svelte.d.ts +21 -0
- package/src/shadcn/card/card-action.svelte.d.ts +5 -0
- package/src/shadcn/card/card-content.svelte.d.ts +5 -0
- package/src/shadcn/card/card-description.svelte.d.ts +5 -0
- package/src/shadcn/card/card-footer.svelte.d.ts +5 -0
- package/src/shadcn/card/card-header.svelte.d.ts +5 -0
- package/src/shadcn/card/card-title.svelte.d.ts +8 -0
- package/src/shadcn/card/card.svelte.d.ts +8 -0
- package/src/shadcn/checkbox/checkbox.svelte +2 -2
- package/src/shadcn/checkbox/checkbox.svelte.d.ts +4 -0
- package/src/shadcn/code-block/code-block-actions.svelte.d.ts +5 -0
- package/src/shadcn/code-block/code-block-content.svelte +1 -1
- package/src/shadcn/code-block/code-block-content.svelte.d.ts +12 -0
- package/src/shadcn/code-block/code-block-copy-button.svelte.d.ts +3 -0
- package/src/shadcn/code-block/code-block-footer.svelte.d.ts +5 -0
- package/src/shadcn/code-block/code-block-header.svelte +1 -1
- package/src/shadcn/code-block/code-block-header.svelte.d.ts +5 -0
- package/src/shadcn/code-block/code-block-line.svelte +1 -1
- package/src/shadcn/code-block/code-block-line.svelte.d.ts +25 -0
- package/src/shadcn/code-block/code-block-title.svelte +1 -1
- package/src/shadcn/code-block/code-block-title.svelte.d.ts +5 -0
- package/src/shadcn/code-block/code-block.svelte +3 -2
- package/src/shadcn/code-block/code-block.svelte.d.ts +18 -0
- package/src/shadcn/collapsible/collapsible-content.svelte.d.ts +4 -0
- package/src/shadcn/collapsible/collapsible-trigger.svelte.d.ts +4 -0
- package/src/shadcn/collapsible/collapsible.svelte.d.ts +4 -0
- package/src/shadcn/command/command-dialog.svelte.d.ts +14 -0
- package/src/shadcn/command/command-empty.svelte.d.ts +4 -0
- package/src/shadcn/command/command-group.svelte.d.ts +7 -0
- package/src/shadcn/command/command-input.svelte +2 -2
- package/src/shadcn/command/command-input.svelte.d.ts +13 -0
- package/src/shadcn/command/command-item.svelte +1 -1
- package/src/shadcn/command/command-item.svelte.d.ts +4 -0
- package/src/shadcn/command/command-link-item.svelte.d.ts +4 -0
- package/src/shadcn/command/command-list.svelte +7 -1
- package/src/shadcn/command/command-list.svelte.d.ts +4 -0
- package/src/shadcn/command/command-loading.svelte.d.ts +4 -0
- package/src/shadcn/command/command-separator.svelte.d.ts +4 -0
- package/src/shadcn/command/command-shortcut.svelte.d.ts +5 -0
- package/src/shadcn/command/command.svelte.d.ts +8 -0
- package/src/shadcn/context-menu/context-menu-checkbox-item.svelte +1 -1
- package/src/shadcn/context-menu/context-menu-checkbox-item.svelte.d.ts +10 -0
- package/src/shadcn/context-menu/context-menu-content.svelte.d.ts +10 -0
- package/src/shadcn/context-menu/context-menu-group-heading.svelte.d.ts +7 -0
- package/src/shadcn/context-menu/context-menu-group.svelte.d.ts +4 -0
- package/src/shadcn/context-menu/context-menu-item.svelte +1 -1
- package/src/shadcn/context-menu/context-menu-item.svelte.d.ts +8 -0
- package/src/shadcn/context-menu/context-menu-label.svelte.d.ts +8 -0
- package/src/shadcn/context-menu/context-menu-portal.svelte.d.ts +3 -0
- package/src/shadcn/context-menu/context-menu-radio-group.svelte.d.ts +4 -0
- package/src/shadcn/context-menu/context-menu-radio-item.svelte +1 -1
- package/src/shadcn/context-menu/context-menu-radio-item.svelte.d.ts +8 -0
- package/src/shadcn/context-menu/context-menu-separator.svelte.d.ts +4 -0
- package/src/shadcn/context-menu/context-menu-shortcut.svelte.d.ts +5 -0
- package/src/shadcn/context-menu/context-menu-sub-content.svelte.d.ts +4 -0
- package/src/shadcn/context-menu/context-menu-sub-trigger.svelte +1 -1
- package/src/shadcn/context-menu/context-menu-sub-trigger.svelte.d.ts +8 -0
- package/src/shadcn/context-menu/context-menu-sub.svelte.d.ts +3 -0
- package/src/shadcn/context-menu/context-menu-trigger.svelte.d.ts +4 -0
- package/src/shadcn/context-menu/context-menu.svelte.d.ts +3 -0
- package/src/shadcn/dialog/dialog-body.svelte.d.ts +5 -0
- package/src/shadcn/dialog/dialog-close.svelte.d.ts +4 -0
- package/src/shadcn/dialog/dialog-content.svelte +3 -4
- package/src/shadcn/dialog/dialog-content.svelte.d.ts +16 -0
- package/src/shadcn/dialog/dialog-description.svelte.d.ts +4 -0
- package/src/shadcn/dialog/dialog-footer.svelte.d.ts +15 -0
- package/src/shadcn/dialog/dialog-header.svelte.d.ts +5 -0
- package/src/shadcn/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/src/shadcn/dialog/dialog-portal.svelte.d.ts +3 -0
- package/src/shadcn/dialog/dialog-title.svelte.d.ts +4 -0
- package/src/shadcn/dialog/dialog-trigger.svelte.d.ts +4 -0
- package/src/shadcn/dialog/dialog.svelte.d.ts +3 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-checkbox-group.svelte.d.ts +4 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-checkbox-item.svelte +2 -2
- package/src/shadcn/dropdown-menu/dropdown-menu-checkbox-item.svelte.d.ts +9 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-content.svelte.d.ts +10 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-group-heading.svelte.d.ts +8 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-group.svelte.d.ts +4 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-item.svelte.d.ts +8 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-label.svelte.d.ts +8 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-portal.svelte.d.ts +3 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-radio-group.svelte.d.ts +4 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-radio-item.svelte +1 -1
- package/src/shadcn/dropdown-menu/dropdown-menu-radio-item.svelte.d.ts +4 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-separator.svelte.d.ts +4 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-shortcut.svelte.d.ts +5 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-sub-content.svelte.d.ts +4 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-sub-trigger.svelte +1 -1
- package/src/shadcn/dropdown-menu/dropdown-menu-sub-trigger.svelte.d.ts +7 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-sub.svelte.d.ts +3 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-trigger.svelte.d.ts +4 -0
- package/src/shadcn/dropdown-menu/dropdown-menu.svelte.d.ts +3 -0
- package/src/shadcn/dropdown-menu/menu-item.ts +1 -1
- package/src/shadcn/empty/empty-content.svelte.d.ts +5 -0
- package/src/shadcn/empty/empty-description.svelte.d.ts +5 -0
- package/src/shadcn/empty/empty-header.svelte.d.ts +5 -0
- package/src/shadcn/empty/empty-media.svelte.d.ts +16 -0
- package/src/shadcn/empty/empty-title.svelte.d.ts +5 -0
- package/src/shadcn/empty/empty.svelte.d.ts +5 -0
- package/src/shadcn/field/field-content.svelte.d.ts +5 -0
- package/src/shadcn/field/field-description.svelte.d.ts +5 -0
- package/src/shadcn/field/field-error.svelte +1 -1
- package/src/shadcn/field/field-error.svelte.d.ts +12 -0
- package/src/shadcn/field/field-group.svelte.d.ts +5 -0
- package/src/shadcn/field/field-label.svelte.d.ts +10 -0
- package/src/shadcn/field/field-legend.svelte.d.ts +8 -0
- package/src/shadcn/field/field-separator.svelte.d.ts +9 -0
- package/src/shadcn/field/field-set.svelte.d.ts +5 -0
- package/src/shadcn/field/field-title.svelte.d.ts +5 -0
- package/src/shadcn/field/field.svelte +1 -1
- package/src/shadcn/field/field.svelte.d.ts +17 -0
- package/src/shadcn/field/simple-field.svelte.d.ts +15 -0
- package/src/shadcn/hooks/highlighter.ts +51 -2
- package/src/shadcn/hover-card/hover-card-content.svelte.d.ts +10 -0
- package/src/shadcn/hover-card/hover-card-portal.svelte.d.ts +3 -0
- package/src/shadcn/hover-card/hover-card-trigger.svelte.d.ts +4 -0
- package/src/shadcn/hover-card/hover-card.svelte.d.ts +3 -0
- package/src/shadcn/input/input.svelte.d.ts +13 -0
- package/src/shadcn/input/secret-input.svelte +3 -3
- package/src/shadcn/input/secret-input.svelte.d.ts +9 -0
- package/src/shadcn/input-otp/input-otp-group.svelte.d.ts +5 -0
- package/src/shadcn/input-otp/input-otp-separator.svelte.d.ts +5 -0
- package/src/shadcn/input-otp/input-otp-slot.svelte.d.ts +4 -0
- package/src/shadcn/input-otp/input-otp.svelte.d.ts +4 -0
- package/src/shadcn/kbd/kbd-group.svelte.d.ts +5 -0
- package/src/shadcn/kbd/kbd.svelte.d.ts +5 -0
- package/src/shadcn/label/label.svelte.d.ts +4 -0
- package/src/shadcn/marker/marker-content.svelte.d.ts +5 -0
- package/src/shadcn/marker/marker-icon.svelte.d.ts +5 -0
- package/src/shadcn/marker/marker.svelte.d.ts +21 -0
- package/src/shadcn/message/message-avatar.svelte.d.ts +5 -0
- package/src/shadcn/message/message-content.svelte.d.ts +5 -0
- package/src/shadcn/message/message-footer.svelte.d.ts +5 -0
- package/src/shadcn/message/message-group.svelte.d.ts +5 -0
- package/src/shadcn/message/message-header.svelte.d.ts +5 -0
- package/src/shadcn/message/message.svelte.d.ts +8 -0
- package/src/shadcn/message-scroller/message-scroller-button.svelte +13 -1
- package/src/shadcn/message-scroller/message-scroller-button.svelte.d.ts +9 -0
- package/src/shadcn/message-scroller/message-scroller-content.svelte.d.ts +4 -0
- package/src/shadcn/message-scroller/message-scroller-item.svelte.d.ts +4 -0
- package/src/shadcn/message-scroller/message-scroller-provider.svelte.d.ts +4 -0
- package/src/shadcn/message-scroller/message-scroller-viewport.svelte.d.ts +4 -0
- package/src/shadcn/message-scroller/message-scroller.svelte.d.ts +4 -0
- package/src/shadcn/popover/popover-close.svelte.d.ts +4 -0
- package/src/shadcn/popover/popover-content.svelte.d.ts +10 -0
- package/src/shadcn/popover/popover-description.svelte.d.ts +5 -0
- package/src/shadcn/popover/popover-header.svelte.d.ts +5 -0
- package/src/shadcn/popover/popover-portal.svelte.d.ts +3 -0
- package/src/shadcn/popover/popover-title.svelte.d.ts +5 -0
- package/src/shadcn/popover/popover-trigger.svelte.d.ts +4 -0
- package/src/shadcn/popover/popover.svelte.d.ts +3 -0
- package/src/shadcn/progress/progress.svelte.d.ts +10 -0
- package/src/shadcn/radio-group/radio-group-item.svelte +1 -1
- package/src/shadcn/radio-group/radio-group-item.svelte.d.ts +4 -0
- package/src/shadcn/radio-group/radio-group.svelte.d.ts +4 -0
- package/src/shadcn/scroll-area/scroll-area-scrollbar.svelte.d.ts +4 -0
- package/src/shadcn/scroll-area/scroll-area.svelte +1 -0
- package/src/shadcn/scroll-area/scroll-area.svelte.d.ts +11 -0
- package/src/shadcn/select/select-content.svelte.d.ts +11 -0
- package/src/shadcn/select/select-group-heading.svelte.d.ts +10 -0
- package/src/shadcn/select/select-group.svelte.d.ts +4 -0
- package/src/shadcn/select/select-item.svelte +1 -1
- package/src/shadcn/select/select-item.svelte.d.ts +4 -0
- package/src/shadcn/select/select-label.svelte.d.ts +6 -0
- package/src/shadcn/select/select-portal.svelte.d.ts +3 -0
- package/src/shadcn/select/select-scroll-down-button.svelte +1 -1
- package/src/shadcn/select/select-scroll-down-button.svelte.d.ts +4 -0
- package/src/shadcn/select/select-scroll-up-button.svelte +1 -1
- package/src/shadcn/select/select-scroll-up-button.svelte.d.ts +4 -0
- package/src/shadcn/select/select-separator.svelte.d.ts +4 -0
- package/src/shadcn/select/select-trigger.svelte +1 -0
- package/src/shadcn/select/select-trigger.svelte.d.ts +8 -0
- package/src/shadcn/select/select.svelte.d.ts +3 -0
- package/src/shadcn/separator/separator.svelte.d.ts +4 -0
- package/src/shadcn/sheet/sheet-body.svelte.d.ts +5 -0
- package/src/shadcn/sheet/sheet-close.svelte.d.ts +4 -0
- package/src/shadcn/sheet/sheet-content.svelte +5 -7
- package/src/shadcn/sheet/sheet-content.svelte.d.ts +21 -0
- package/src/shadcn/sheet/sheet-description.svelte.d.ts +4 -0
- package/src/shadcn/sheet/sheet-footer.svelte.d.ts +12 -0
- package/src/shadcn/sheet/sheet-header.svelte.d.ts +5 -0
- package/src/shadcn/sheet/sheet-overlay.svelte.d.ts +4 -0
- package/src/shadcn/sheet/sheet-portal.svelte.d.ts +3 -0
- package/src/shadcn/sheet/sheet-title.svelte.d.ts +4 -0
- package/src/shadcn/sheet/sheet-trigger.svelte.d.ts +4 -0
- package/src/shadcn/sheet/sheet.css +47 -43
- package/src/shadcn/sheet/sheet.svelte.d.ts +3 -0
- package/src/shadcn/sidebar/constants.ts +1 -1
- package/src/shadcn/sidebar/context.svelte.ts +16 -1
- package/src/shadcn/sidebar/sidebar-content.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-footer.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-group-action.svelte.d.ts +11 -0
- package/src/shadcn/sidebar/sidebar-group-content.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-group-label.svelte.d.ts +11 -0
- package/src/shadcn/sidebar/sidebar-group.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-header.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-input.svelte.d.ts +11 -0
- package/src/shadcn/sidebar/sidebar-inset.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-menu-action.svelte.d.ts +12 -0
- package/src/shadcn/sidebar/sidebar-menu-badge.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-menu-button.svelte.d.ts +31 -0
- package/src/shadcn/sidebar/sidebar-menu-item.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-menu-skeleton.svelte.d.ts +8 -0
- package/src/shadcn/sidebar/sidebar-menu-sub-button.svelte.d.ts +13 -0
- package/src/shadcn/sidebar/sidebar-menu-sub-item.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-menu-sub.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-menu.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-provider.svelte +3 -0
- package/src/shadcn/sidebar/sidebar-provider.svelte.d.ts +9 -0
- package/src/shadcn/sidebar/sidebar-rail.svelte.d.ts +5 -0
- package/src/shadcn/sidebar/sidebar-separator.svelte.d.ts +13 -0
- package/src/shadcn/sidebar/sidebar-trigger.svelte +3 -1
- package/src/shadcn/sidebar/sidebar-trigger.svelte.d.ts +8 -0
- package/src/shadcn/sidebar/sidebar.svelte +3 -0
- package/src/shadcn/sidebar/sidebar.svelte.d.ts +10 -0
- package/src/shadcn/sidebar/sidebar.test.ts +69 -0
- package/src/shadcn/skeleton/skeleton-delay.svelte.d.ts +20 -0
- package/src/shadcn/skeleton/skeleton.svelte.d.ts +5 -0
- package/src/shadcn/slider/slider.svelte.d.ts +11 -0
- package/src/shadcn/sonner/sonner.svelte +4 -4
- package/src/shadcn/sonner/sonner.svelte.d.ts +4 -0
- package/src/shadcn/spinner/spinner.svelte.d.ts +4 -0
- package/src/shadcn/switch/switch.svelte.d.ts +8 -0
- package/src/shadcn/table/table-body.svelte.d.ts +5 -0
- package/src/shadcn/table/table-caption.svelte.d.ts +5 -0
- package/src/shadcn/table/table-cell.svelte +16 -12
- package/src/shadcn/table/table-cell.svelte.d.ts +9 -0
- package/src/shadcn/table/table-footer.svelte.d.ts +5 -0
- package/src/shadcn/table/table-head.svelte.d.ts +5 -0
- package/src/shadcn/table/table-header.svelte.d.ts +5 -0
- package/src/shadcn/table/table-row.svelte.d.ts +5 -0
- package/src/shadcn/table/table.svelte.d.ts +5 -0
- package/src/shadcn/tabs/tabs-content.svelte.d.ts +4 -0
- package/src/shadcn/tabs/tabs-list.svelte.d.ts +8 -0
- package/src/shadcn/tabs/tabs-trigger.svelte.d.ts +4 -0
- package/src/shadcn/tabs/tabs.svelte.d.ts +4 -0
- package/src/shadcn/textarea/textarea.svelte.d.ts +5 -0
- package/src/shadcn/toggle/toggle.svelte.d.ts +10 -0
- package/src/shadcn/toggle-group/toggle-group-item.svelte.d.ts +6 -0
- package/src/shadcn/toggle-group/toggle-group.svelte.d.ts +15 -0
- package/src/shadcn/tooltip/tooltip-content.svelte.d.ts +11 -0
- package/src/shadcn/tooltip/tooltip-portal.svelte.d.ts +4 -0
- package/src/shadcn/tooltip/tooltip-provider.svelte.d.ts +4 -0
- package/src/shadcn/tooltip/tooltip-trigger.svelte.d.ts +4 -0
- package/src/shadcn/tooltip/tooltip.svelte.d.ts +4 -0
- package/src/shadcn/trace/trace-collapsible-content.svelte.d.ts +4 -0
- package/src/shadcn/trace/trace-collapsible-trigger.svelte +2 -2
- package/src/shadcn/trace/trace-collapsible-trigger.svelte.d.ts +4 -0
- package/src/shadcn/trace/trace-collapsible.svelte.d.ts +4 -0
- package/src/shadcn/trace/trace-description.svelte +1 -1
- package/src/shadcn/trace/trace-description.svelte.d.ts +5 -0
- package/src/shadcn/trace/trace-icon.svelte.d.ts +5 -0
- package/src/shadcn/trace/trace-line.svelte +1 -1
- package/src/shadcn/trace/trace-line.svelte.d.ts +9 -0
- package/src/shadcn/trace/trace-title.svelte.d.ts +5 -0
- package/src/shadcn/trace/trace.svelte.d.ts +5 -0
- package/src/slides/Controls.svelte +96 -92
- package/src/slides/Controls.svelte.d.ts +10 -0
- package/src/slides/Deck.svelte +77 -60
- package/src/slides/Deck.svelte.d.ts +5 -0
- package/src/slides/Fragment.svelte +25 -21
- package/src/slides/Fragment.svelte.d.ts +15 -0
- package/src/slides/Overview.svelte +71 -60
- package/src/slides/Overview.svelte.d.ts +8 -0
- package/src/slides/Presenter.svelte +146 -139
- package/src/slides/Presenter.svelte.d.ts +8 -0
- package/src/slides/README.md +2 -2
- package/src/slides/Slide.svelte +74 -63
- package/src/slides/Slide.svelte.d.ts +18 -0
- package/src/slides/SlideList.svelte.d.ts +9 -0
- package/src/slides/deck-controller.svelte.ts +63 -36
- package/src/slides/deck-keys.test.ts +49 -0
- package/src/slides/layout.ts +3 -2
- package/src/slides/theme.css +227 -177
- package/src/slides/types.ts +2 -1
- package/src/status/index.ts +0 -1
- package/src/status/status-badge.svelte +7 -5
- package/src/status/status-badge.svelte.d.ts +28 -0
- package/src/status/status-badge.test.ts +44 -0
- package/src/status/status-dot.svelte +54 -49
- package/src/status/status-dot.svelte.d.ts +16 -0
- package/src/status/status-icon.svelte +19 -6
- package/src/status/status-icon.svelte.d.ts +14 -0
- package/src/status/status-pill.svelte.d.ts +13 -0
- package/src/test-setup.test.ts +5 -0
- package/src/thread/thread-body.svelte.d.ts +9 -0
- package/src/thread/thread-events.svelte.d.ts +8 -0
- package/src/thread/thread-focus.svelte.test.ts +90 -0
- package/src/thread/thread.svelte +70 -15
- package/src/thread/thread.svelte.d.ts +40 -0
- package/src/tokens/base.css +47 -45
- package/src/tokens/design.css +8 -0
- package/src/tokens/index.css +3 -0
- package/src/triage/triage-plan.svelte +42 -9
- package/src/triage/triage-plan.svelte.d.ts +28 -0
- package/src/triage/triage-queue.svelte +61 -23
- package/src/triage/triage-queue.svelte.d.ts +41 -0
- package/src/triage/triage-task.svelte +11 -3
- package/src/triage/triage-task.svelte.d.ts +22 -0
- package/src/triage/triage.svelte.test.ts +130 -0
- package/src/work/README.md +8 -7
- package/src/work/detail/task-chip.svelte.d.ts +10 -0
- package/src/work/detail/task-detail.svelte.d.ts +36 -0
- package/src/work/docs/doc-editor-page.svelte +20 -16
- package/src/work/docs/doc-editor-page.svelte.d.ts +31 -0
- package/src/work/docs/doc-menu.svelte +44 -38
- package/src/work/docs/doc-menu.svelte.d.ts +35 -0
- package/src/work/docs/edited-chip.svelte +9 -9
- package/src/work/docs/edited-chip.svelte.d.ts +26 -0
- package/src/work/gantt/gantt-bar.svelte +87 -78
- package/src/work/gantt/gantt-bar.svelte.d.ts +29 -0
- package/src/work/gantt/gantt-grid.svelte +30 -26
- package/src/work/gantt/gantt-grid.svelte.d.ts +14 -0
- package/src/work/gantt/gantt-group-row.svelte +12 -8
- package/src/work/gantt/gantt-group-row.svelte.d.ts +12 -0
- package/src/work/gantt/gantt-header.svelte +2 -4
- package/src/work/gantt/gantt-header.svelte.d.ts +17 -0
- package/src/work/gantt/gantt-task-row.svelte +43 -36
- package/src/work/gantt/gantt-task-row.svelte.d.ts +53 -0
- package/src/work/gantt/gantt.css +14 -10
- package/src/work/gantt/gantt.test.ts +14 -2
- package/src/work/inbox/inbox-card.svelte +13 -16
- package/src/work/inbox/inbox-card.svelte.d.ts +22 -0
- package/src/work/inbox/inbox-draft.svelte +3 -3
- package/src/work/inbox/inbox-draft.svelte.d.ts +18 -0
- package/src/work/inbox/inbox-trace.svelte.d.ts +11 -0
- package/src/work/index.ts +0 -24
- package/src/work/kanban-board.svelte +103 -66
- package/src/work/kanban-board.svelte.d.ts +107 -0
- package/src/work/kanban-board.svelte.test.ts +89 -0
- package/src/work/kanban-column-head.svelte.d.ts +40 -0
- package/src/work/kanban-column.svelte +45 -43
- package/src/work/kanban-column.svelte.d.ts +20 -0
- package/src/work/kanban-fold-chevron.svelte +15 -11
- package/src/work/kanban-fold-chevron.svelte.d.ts +8 -0
- package/src/work/kanban-hidden-rail.svelte +2 -1
- package/src/work/kanban-hidden-rail.svelte.d.ts +39 -0
- package/src/work/kanban-keyboard.ts +8 -6
- package/src/work/task-gantt.svelte +18 -4
- package/src/work/task-gantt.svelte.d.ts +85 -0
- package/src/work/task-list.svelte +166 -116
- package/src/work/task-list.svelte.d.ts +81 -0
- package/src/work/task-list.svelte.test.ts +113 -0
- package/src/work/time/time-chip.svelte +2 -4
- package/src/work/time/time-chip.svelte.d.ts +14 -0
- package/src/work/time/time-dot.svelte +30 -25
- package/src/work/time/time-dot.svelte.d.ts +9 -0
- package/src/work/time/time-ring.svelte +15 -11
- package/src/work/time/time-ring.svelte.d.ts +18 -0
- package/src/work/time/time-tracker.svelte +49 -44
- package/src/work/time/time-tracker.svelte.d.ts +59 -0
- package/dist/ai/index.js +0 -40
- package/dist/index.js +0 -18
- package/dist/record/demo-data.js +0 -485
- package/dist/test-setup.js +0 -30
- package/src/agents/demo.svelte +0 -137
- package/src/ai/index.ts +0 -101
- package/src/design/index.css +0 -215
- package/src/design/polish.css +0 -150
- package/src/index.ts +0 -53
- package/src/onboarding/demo.svelte +0 -105
- package/src/record/demo-data.ts +0 -352
- package/src/record/record-demo.svelte +0 -342
- package/src/slides/demo-slides.svelte +0 -382
- package/src/slides/demo.svelte +0 -180
- package/src/test-setup.ts +0 -34
- package/src/work/demo.svelte +0 -561
- package/src/work/detail/detail-demo.svelte +0 -258
- package/src/work/docs/docs-demo.svelte +0 -227
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
import type { TableColumn } from "./types.js";
|
|
3
|
+
export type TableCell<Row> = {
|
|
4
|
+
row: Row;
|
|
5
|
+
column: TableColumn<Row>;
|
|
6
|
+
value: unknown;
|
|
7
|
+
text: string;
|
|
8
|
+
};
|
|
9
|
+
export type TableGroup<Row> = {
|
|
10
|
+
key: string;
|
|
11
|
+
rows: Row[];
|
|
12
|
+
};
|
|
13
|
+
export type { TableColumn };
|
|
14
|
+
import { type SortState } from "../data-table/data-table.js";
|
|
15
|
+
declare function $$render<Row extends object>(): {
|
|
16
|
+
props: {
|
|
17
|
+
columns: TableColumn<Row>[];
|
|
18
|
+
rows: Row[];
|
|
19
|
+
/** What names a row, so a filter keeps its rows in place. */
|
|
20
|
+
rowKey: (row: Row) => string;
|
|
21
|
+
/** What the table is, for a screen reader. */
|
|
22
|
+
label: string;
|
|
23
|
+
/** A totals row, drawn under the body in the same columns. */
|
|
24
|
+
footer?: Row;
|
|
25
|
+
/** Draws a cell its own way. Print `text` for the plain case. */
|
|
26
|
+
cell?: Snippet<[TableCell<Row>]>;
|
|
27
|
+
rowClass?: (row: Row) => string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Below this width the table scrolls sideways inside its frame. Defaults to the columns'
|
|
30
|
+
* own widths (8rem a text column, 5rem a number), so a phone scrolls rather than splits words.
|
|
31
|
+
* Pass "0" for a table that should squeeze.
|
|
32
|
+
*/
|
|
33
|
+
minWidth?: string;
|
|
34
|
+
class?: string;
|
|
35
|
+
/** The sorted column and its direction. Bind it; columns with `sortable` set it. */
|
|
36
|
+
sort?: SortState<Row>;
|
|
37
|
+
/** Where a row goes. Draws a real link over the row, so middle-click and cmd-click work. */
|
|
38
|
+
rowHref?: (row: Row) => string | undefined;
|
|
39
|
+
/** Runs on a plain left click of the row link. Call `event.preventDefault()` to open in place; a modified click still follows `href`. */
|
|
40
|
+
onRowLink?: (row: Row, event: MouseEvent) => void;
|
|
41
|
+
/** The link's accessible name. Defaults to the row's first column text. */
|
|
42
|
+
rowLabel?: (row: Row) => string;
|
|
43
|
+
/** Adds a checkbox column with a select-all in the head. */
|
|
44
|
+
selectable?: boolean;
|
|
45
|
+
/** The `rowKey` of every checked row. Bind it. */
|
|
46
|
+
selected?: Set<string>;
|
|
47
|
+
selectAllLabel?: string;
|
|
48
|
+
selectRowLabel?: (row: Row) => string;
|
|
49
|
+
/** The items of a row menu: `ContextMenu.Item`s. Right-click, a long press, Shift+F10 or the ContextMenu key opens it. */
|
|
50
|
+
rowMenu?: Snippet<[Row]>;
|
|
51
|
+
/** Rows that return the same key sit under one header row, and `null` rows sit with no header. Order `rows` so a group is contiguous. */
|
|
52
|
+
group?: (row: Row) => string | null;
|
|
53
|
+
/** Draws a group's header. Prints the key when left out. */
|
|
54
|
+
groupHeader?: Snippet<[TableGroup<Row>]>;
|
|
55
|
+
/** Makes each group header a button that folds its rows. */
|
|
56
|
+
collapsible?: boolean;
|
|
57
|
+
/** The keys of the folded groups. Bind it. */
|
|
58
|
+
collapsed?: Set<string>;
|
|
59
|
+
/** Draws a column head its own way, an icon or a colour. Print `column.label` for the plain case. */
|
|
60
|
+
head?: Snippet<[TableColumn<Row>]>;
|
|
61
|
+
/** The row opens in place, from a button over the row named like the row link. */
|
|
62
|
+
onRowClick?: (row: Row) => void;
|
|
63
|
+
/** Whether a row shows its `subRow`. */
|
|
64
|
+
expanded?: (row: Row) => boolean;
|
|
65
|
+
/** A full-width row under the row, for detail. */
|
|
66
|
+
subRow?: Snippet<[Row]>;
|
|
67
|
+
/** Drawn across every column when there are no rows. */
|
|
68
|
+
empty?: Snippet;
|
|
69
|
+
/** Drawn across every column under the last row: a load-more sentinel or a spinner. */
|
|
70
|
+
trailing?: Snippet;
|
|
71
|
+
/** Draws placeholder rows in the same frame instead of `rows`. */
|
|
72
|
+
loading?: boolean;
|
|
73
|
+
skeletonRows?: number;
|
|
74
|
+
};
|
|
75
|
+
exports: {};
|
|
76
|
+
bindings: "sort" | "selected" | "collapsed";
|
|
77
|
+
slots: {};
|
|
78
|
+
events: {};
|
|
79
|
+
};
|
|
80
|
+
declare class __sveltets_Render<Row extends object> {
|
|
81
|
+
props(): ReturnType<typeof $$render<Row>>['props'];
|
|
82
|
+
events(): ReturnType<typeof $$render<Row>>['events'];
|
|
83
|
+
slots(): ReturnType<typeof $$render<Row>>['slots'];
|
|
84
|
+
bindings(): "sort" | "selected" | "collapsed";
|
|
85
|
+
exports(): {};
|
|
86
|
+
}
|
|
87
|
+
interface $$IsomorphicComponent {
|
|
88
|
+
new <Row extends object>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<Row>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<Row>['props']>, ReturnType<__sveltets_Render<Row>['events']>, ReturnType<__sveltets_Render<Row>['slots']>> & {
|
|
89
|
+
$$bindings?: ReturnType<__sveltets_Render<Row>['bindings']>;
|
|
90
|
+
} & ReturnType<__sveltets_Render<Row>['exports']>;
|
|
91
|
+
<Row extends object>(internal: unknown, props: ReturnType<__sveltets_Render<Row>['props']> & {}): ReturnType<__sveltets_Render<Row>['exports']>;
|
|
92
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
93
|
+
}
|
|
94
|
+
declare const $$Component: $$IsomorphicComponent;
|
|
95
|
+
type $$Component<Row extends object> = InstanceType<typeof $$Component<Row>>;
|
|
96
|
+
export default $$Component;
|
|
@@ -64,15 +64,19 @@ describe("TableView extensions", () => {
|
|
|
64
64
|
{ key: "total", label: "Total", numeric: true, sortable: true },
|
|
65
65
|
];
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
// The 10 Nov audit: the head took focus itself with no button inside, so it wasn't announced as a control.
|
|
68
|
+
it("sorts from a button in the head and sets aria-sort on the th", () => {
|
|
68
69
|
const { target, done } = render({ columns: sortable, sort: { key: "name", direction: "asc" } });
|
|
69
70
|
const heads = target.querySelectorAll<HTMLElement>("thead th");
|
|
70
71
|
expect(heads[0].getAttribute("aria-sort")).toBe("ascending");
|
|
71
72
|
expect(heads[1].getAttribute("aria-sort")).toBe("none");
|
|
72
|
-
heads[1].
|
|
73
|
+
expect(heads[1].hasAttribute("tabindex")).toBe(false);
|
|
74
|
+
const button = heads[1].querySelector<HTMLButtonElement>("button");
|
|
75
|
+
expect(button?.textContent?.trim()).toBe("Total");
|
|
76
|
+
button?.click();
|
|
73
77
|
flushSync();
|
|
74
78
|
expect(target.querySelectorAll("thead th")[1].getAttribute("aria-sort")).toBe("ascending");
|
|
75
|
-
|
|
79
|
+
button?.click();
|
|
76
80
|
flushSync();
|
|
77
81
|
expect(target.querySelectorAll("thead th")[1].getAttribute("aria-sort")).toBe("descending");
|
|
78
82
|
done();
|
|
@@ -123,17 +127,39 @@ describe("TableView extensions", () => {
|
|
|
123
127
|
});
|
|
124
128
|
|
|
125
129
|
describe("TableView row actions", () => {
|
|
126
|
-
|
|
130
|
+
// The 10 Nov audit: a clickable row took focus as a bare tr, so a screen reader didn't call it a control.
|
|
131
|
+
it("opens a row from its own named button or a click, but leaves a nested button alone", () => {
|
|
127
132
|
const calls: string[] = [];
|
|
128
133
|
const cell = createRawSnippet<[{ text: string }]>((cellProps) => ({
|
|
129
134
|
render: () => `<span><button>${cellProps().text}</button></span>`,
|
|
130
135
|
}));
|
|
131
136
|
const { target, done } = render({ onRowClick: (row: Row) => calls.push(row.id), cell });
|
|
132
137
|
const tr = target.querySelector("tbody tr") as HTMLElement;
|
|
138
|
+
expect(tr.hasAttribute("tabindex")).toBe(false);
|
|
139
|
+
const open = tr.querySelector<HTMLButtonElement>("td:last-child > button[aria-label]");
|
|
140
|
+
expect(open?.getAttribute("aria-label")).toBe("Audit");
|
|
141
|
+
open?.click();
|
|
133
142
|
tr.click();
|
|
134
|
-
tr.
|
|
135
|
-
(tr.querySelector("button") as HTMLButtonElement).click();
|
|
143
|
+
(tr.querySelector("span > button") as HTMLButtonElement).click();
|
|
136
144
|
expect(calls).toEqual(["a", "a"]);
|
|
145
|
+
expect(target.querySelectorAll("thead th").length).toBe(3);
|
|
146
|
+
done();
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
it("opens a row menu from Shift+F10 or the ContextMenu key on a focused row", () => {
|
|
150
|
+
const rowMenu = createRawSnippet(() => ({ render: () => `<span>Rename</span>` }));
|
|
151
|
+
const { target, done } = render({ rowMenu });
|
|
152
|
+
const tr = target.querySelector("tbody tr") as HTMLElement;
|
|
153
|
+
expect(tr.tabIndex).toBe(0);
|
|
154
|
+
expect(tr.getAttribute("aria-keyshortcuts")).toBe("Shift+F10 ContextMenu");
|
|
155
|
+
for (const init of [{ key: "F10", shiftKey: true }, { key: "ContextMenu" }]) {
|
|
156
|
+
const opened: Event[] = [];
|
|
157
|
+
tr.addEventListener("contextmenu", (event) => opened.push(event), { once: true });
|
|
158
|
+
const key = new KeyboardEvent("keydown", { ...init, bubbles: true, cancelable: true });
|
|
159
|
+
tr.dispatchEvent(key);
|
|
160
|
+
expect(key.defaultPrevented).toBe(true);
|
|
161
|
+
expect(opened.length).toBe(1);
|
|
162
|
+
}
|
|
137
163
|
done();
|
|
138
164
|
});
|
|
139
165
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// =========================
|
|
3
3
|
// IMPORTS
|
|
4
4
|
// =========================
|
|
5
|
+
import { tick } from "svelte";
|
|
5
6
|
import { Plus } from "phosphor-svelte";
|
|
6
7
|
import { cn } from "../../lib/utils.js";
|
|
7
8
|
import TagChip from "../chip/tag-chip.svelte";
|
|
@@ -26,13 +27,16 @@
|
|
|
26
27
|
max: string;
|
|
27
28
|
/** Shown when what's typed matches nothing and creating isn't allowed. */
|
|
28
29
|
none: string;
|
|
30
|
+
/** Announced to a screen reader once a tag is saved, and once one is gone. */
|
|
31
|
+
added: (tag: string) => string;
|
|
32
|
+
removed: (tag: string) => string;
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
interface Props {
|
|
32
36
|
/** The tags. Order is kept. */
|
|
33
37
|
value: readonly string[];
|
|
34
38
|
/** Called with the whole next list. Throw to refuse: the list reverts. */
|
|
35
|
-
|
|
39
|
+
onValueChange: (next: string[]) => void | Promise<void>;
|
|
36
40
|
/** The labels people pick from. Picking one stores its exact spelling and case. */
|
|
37
41
|
options?: readonly string[];
|
|
38
42
|
/**
|
|
@@ -43,8 +47,8 @@
|
|
|
43
47
|
/** Most tags the list holds. Past it the input goes away. */
|
|
44
48
|
max?: number;
|
|
45
49
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
50
|
+
* Free typing, no options or menu: Enter, comma, space or Tab adds what's typed, a paste
|
|
51
|
+
* adds every part, and leaving the field keeps the text.
|
|
48
52
|
*/
|
|
49
53
|
free?: boolean;
|
|
50
54
|
/** Accessible name of the field. */
|
|
@@ -59,7 +63,7 @@
|
|
|
59
63
|
// =========================
|
|
60
64
|
let {
|
|
61
65
|
value,
|
|
62
|
-
|
|
66
|
+
onValueChange,
|
|
63
67
|
options = [],
|
|
64
68
|
allowCreate = true,
|
|
65
69
|
max,
|
|
@@ -80,6 +84,8 @@
|
|
|
80
84
|
let pending = $state<string[] | null>(null);
|
|
81
85
|
let input = $state<HTMLInputElement | null>(null);
|
|
82
86
|
let root = $state<HTMLElement | null>(null);
|
|
87
|
+
/** What the live region last said: the tags a save added or removed. */
|
|
88
|
+
let announcement = $state("");
|
|
83
89
|
const listId = $props.id();
|
|
84
90
|
|
|
85
91
|
// =========================
|
|
@@ -91,6 +97,8 @@
|
|
|
91
97
|
remove: (tag) => `Remove ${tag}`,
|
|
92
98
|
max: "Limit reached",
|
|
93
99
|
none: "No match",
|
|
100
|
+
added: (tag) => `Added ${tag}`,
|
|
101
|
+
removed: (tag) => `Removed ${tag}`,
|
|
94
102
|
...labels,
|
|
95
103
|
});
|
|
96
104
|
const tags = $derived(pending ?? [...value]);
|
|
@@ -114,9 +122,14 @@
|
|
|
114
122
|
// =========================
|
|
115
123
|
async function commit(next: readonly string[]) {
|
|
116
124
|
if (next === tags) return;
|
|
125
|
+
const before = tags;
|
|
117
126
|
pending = [...next];
|
|
118
127
|
try {
|
|
119
|
-
await
|
|
128
|
+
await onValueChange([...next]);
|
|
129
|
+
announcement = [
|
|
130
|
+
...next.filter((tag) => !before.includes(tag)).map(text.added),
|
|
131
|
+
...before.filter((tag) => !next.includes(tag)).map(text.removed),
|
|
132
|
+
].join(", ");
|
|
120
133
|
} finally {
|
|
121
134
|
pending = null;
|
|
122
135
|
}
|
|
@@ -125,7 +138,32 @@
|
|
|
125
138
|
function start() {
|
|
126
139
|
if (disabled) return;
|
|
127
140
|
editing = true;
|
|
128
|
-
|
|
141
|
+
// A full list has no box, so focus lands on the last chip instead.
|
|
142
|
+
void tick().then(() => (input ?? chipButtons().at(-1))?.focus());
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const chipButtons = () => [
|
|
146
|
+
...(root?.querySelectorAll<HTMLButtonElement>("[data-slot=tag-chip] button") ?? []),
|
|
147
|
+
];
|
|
148
|
+
|
|
149
|
+
// Arrows walk the chips and the box, Backspace or Delete removes the focused chip, Esc goes back to the box.
|
|
150
|
+
function onChipKey(event: KeyboardEvent, tag: string) {
|
|
151
|
+
const buttons = chipButtons();
|
|
152
|
+
const index = buttons.findIndex((button) => button === event.target);
|
|
153
|
+
if (index < 0) return;
|
|
154
|
+
const next = buttons[index + 1] ?? input;
|
|
155
|
+
if (event.key === "ArrowLeft") buttons[index - 1]?.focus();
|
|
156
|
+
else if (event.key === "ArrowRight") next?.focus();
|
|
157
|
+
else if (event.key === "Escape") (input ?? next)?.focus();
|
|
158
|
+
else if (["Backspace", "Delete", "Enter", " "].includes(event.key)) {
|
|
159
|
+
// Focus moves on first, so it never drops to the page. A full list's last chip waits for the box.
|
|
160
|
+
(next ?? buttons[index - 1])?.focus();
|
|
161
|
+
void commit(removeTag(tags, tag));
|
|
162
|
+
void tick().then(() => {
|
|
163
|
+
if (!root?.contains(document.activeElement)) input?.focus();
|
|
164
|
+
});
|
|
165
|
+
} else return;
|
|
166
|
+
event.preventDefault();
|
|
129
167
|
}
|
|
130
168
|
|
|
131
169
|
// Blur keeps typed text only when it's an existing label spelt another way, or the field is free.
|
|
@@ -149,7 +187,7 @@
|
|
|
149
187
|
if (free && (separator || event.key === "Enter" || (event.key === "Tab" && query.trim()))) {
|
|
150
188
|
event.preventDefault();
|
|
151
189
|
if (query.trim()) add(query);
|
|
152
|
-
else if (event.key === "Enter")
|
|
190
|
+
else if (event.key === "Enter") finish();
|
|
153
191
|
} else if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
154
192
|
if (rows.length === 0) return;
|
|
155
193
|
event.preventDefault();
|
|
@@ -158,23 +196,34 @@
|
|
|
158
196
|
} else if (event.key === "Enter") {
|
|
159
197
|
event.preventDefault();
|
|
160
198
|
// The highlighted row: a close option when there is one, else the visible Create row.
|
|
161
|
-
if (!query.trim())
|
|
199
|
+
if (!query.trim()) finish();
|
|
162
200
|
else if (rows.length > 0) add(rows[Math.min(active, last)].name);
|
|
163
201
|
} else if (event.key === "," || (event.key === "Tab" && query.trim())) {
|
|
164
202
|
event.preventDefault();
|
|
165
203
|
if (query.trim() && rows.length > 0) add(rows[Math.min(active, last)].name);
|
|
204
|
+
} else if (
|
|
205
|
+
event.key === "ArrowLeft" &&
|
|
206
|
+
tags.length > 0 &&
|
|
207
|
+
input?.selectionStart === 0 &&
|
|
208
|
+
input.selectionEnd === 0
|
|
209
|
+
) {
|
|
210
|
+
event.preventDefault();
|
|
211
|
+
chipButtons().at(-1)?.focus();
|
|
166
212
|
} else if (event.key === "Backspace" && query === "" && tags.length > 0) {
|
|
167
213
|
void commit(removeTag(tags, tags[tags.length - 1]));
|
|
168
214
|
} else if (event.key === "Escape") {
|
|
169
215
|
event.preventDefault();
|
|
170
216
|
if (query) query = "";
|
|
171
|
-
else
|
|
172
|
-
editing = false;
|
|
173
|
-
root?.querySelector("button")?.focus();
|
|
174
|
-
}
|
|
217
|
+
else finish();
|
|
175
218
|
}
|
|
176
219
|
}
|
|
177
220
|
|
|
221
|
+
// Closing from the keyboard hands focus back to the field, once it's drawn again.
|
|
222
|
+
function finish() {
|
|
223
|
+
stop();
|
|
224
|
+
void tick().then(() => root?.querySelector("button")?.focus());
|
|
225
|
+
}
|
|
226
|
+
|
|
178
227
|
// Pasted words that are existing labels are added. The rest stay in the box to be created on purpose.
|
|
179
228
|
function onPaste(event: ClipboardEvent) {
|
|
180
229
|
const pasted = event.clipboardData?.getData("text") ?? "";
|
|
@@ -201,9 +250,10 @@
|
|
|
201
250
|
);
|
|
202
251
|
}
|
|
203
252
|
|
|
204
|
-
// WHY: Chrome fires focusout from the read-state button as editing removes it, so only the
|
|
253
|
+
// WHY: Chrome fires focusout from the read-state button as editing removes it, so only the box or a chip leaving counts.
|
|
205
254
|
function onFocusOut(event: FocusEvent) {
|
|
206
|
-
|
|
255
|
+
const chipLeft = editing && (event.target as Element).closest("[data-slot=tag-chip]");
|
|
256
|
+
if (event.target !== input && !chipLeft) return;
|
|
207
257
|
const next = event.relatedTarget as Node | null;
|
|
208
258
|
if (editing && !(next && root?.contains(next))) stop();
|
|
209
259
|
}
|
|
@@ -226,7 +276,8 @@
|
|
|
226
276
|
title={tag}
|
|
227
277
|
removeLabel={text.remove(tag)}
|
|
228
278
|
removeFocusable={false}
|
|
229
|
-
|
|
279
|
+
onRemove={removable ? () => commit(removeTag(tags, tag)) : undefined}
|
|
280
|
+
onkeydown={removable ? (event: KeyboardEvent) => onChipKey(event, tag) : undefined}
|
|
230
281
|
>
|
|
231
282
|
{tag}
|
|
232
283
|
</TagChip>
|
|
@@ -309,7 +360,7 @@
|
|
|
309
360
|
class={cn(
|
|
310
361
|
"-ml-1.5 flex min-h-7 w-full flex-wrap items-center gap-1 rounded-lg px-1.5 py-1 text-left transition-colors outline-none duration-quick ease-smooth-out hover:bg-foreground/4 focus-visible:shadow-(--ring-focus) disabled:pointer-events-none motion-reduce:transition-none",
|
|
311
362
|
)}
|
|
312
|
-
aria-label={label}
|
|
363
|
+
aria-label={tags.length > 0 ? `${label}: ${tags.join(", ")}` : label}
|
|
313
364
|
{disabled}
|
|
314
365
|
onclick={start}
|
|
315
366
|
>
|
|
@@ -320,4 +371,5 @@
|
|
|
320
371
|
{/each}
|
|
321
372
|
</button>
|
|
322
373
|
{/if}
|
|
374
|
+
<span class="sr-only" role="status">{announcement}</span>
|
|
323
375
|
</div>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
interface Labels {
|
|
2
|
+
/** Shown in the empty read state and as the input's placeholder. */
|
|
3
|
+
add: string;
|
|
4
|
+
create: (query: string) => string;
|
|
5
|
+
remove: (tag: string) => string;
|
|
6
|
+
max: string;
|
|
7
|
+
/** Shown when what's typed matches nothing and creating isn't allowed. */
|
|
8
|
+
none: string;
|
|
9
|
+
/** Announced to a screen reader once a tag is saved, and once one is gone. */
|
|
10
|
+
added: (tag: string) => string;
|
|
11
|
+
removed: (tag: string) => string;
|
|
12
|
+
}
|
|
13
|
+
interface Props {
|
|
14
|
+
/** The tags. Order is kept. */
|
|
15
|
+
value: readonly string[];
|
|
16
|
+
/** Called with the whole next list. Throw to refuse: the list reverts. */
|
|
17
|
+
onValueChange: (next: string[]) => void | Promise<void>;
|
|
18
|
+
/** The labels people pick from. Picking one stores its exact spelling and case. */
|
|
19
|
+
options?: readonly string[];
|
|
20
|
+
/**
|
|
21
|
+
* Whether a label that isn't an option may be made, through the "Create" row only.
|
|
22
|
+
* Text close to an option never becomes a label unless that row is chosen.
|
|
23
|
+
*/
|
|
24
|
+
allowCreate?: boolean;
|
|
25
|
+
/** Most tags the list holds. Past it the input goes away. */
|
|
26
|
+
max?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Free typing, no options or menu: Enter, comma, space or Tab adds what's typed, a paste
|
|
29
|
+
* adds every part, and leaving the field keeps the text.
|
|
30
|
+
*/
|
|
31
|
+
free?: boolean;
|
|
32
|
+
/** Accessible name of the field. */
|
|
33
|
+
label: string;
|
|
34
|
+
labels?: Partial<Labels>;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
class?: string;
|
|
37
|
+
}
|
|
38
|
+
declare const $$Component: import("svelte").Component<Props, {}, "">;
|
|
39
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
40
|
+
export default $$Component;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { flushSync, mount, tick, unmount } from "svelte";
|
|
2
|
+
import { describe, expect, it } from "vite-plus/test";
|
|
3
|
+
import TagsInput from "./tags-input.svelte";
|
|
4
|
+
|
|
5
|
+
async function render(start: string[]) {
|
|
6
|
+
const target = document.createElement("div");
|
|
7
|
+
document.body.appendChild(target);
|
|
8
|
+
// The field shows `pending` while a save runs, then reads `value` again, so a getter is enough here.
|
|
9
|
+
let saved = start;
|
|
10
|
+
const app = mount(TagsInput, {
|
|
11
|
+
target,
|
|
12
|
+
props: {
|
|
13
|
+
get value() {
|
|
14
|
+
return saved;
|
|
15
|
+
},
|
|
16
|
+
onValueChange: (next: string[]) => {
|
|
17
|
+
saved = next;
|
|
18
|
+
},
|
|
19
|
+
label: "Tools",
|
|
20
|
+
free: true,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
flushSync();
|
|
24
|
+
const key = async (k: string) => {
|
|
25
|
+
(document.activeElement as HTMLElement).dispatchEvent(
|
|
26
|
+
new KeyboardEvent("keydown", { key: k, bubbles: true, cancelable: true }),
|
|
27
|
+
);
|
|
28
|
+
flushSync();
|
|
29
|
+
await tick();
|
|
30
|
+
};
|
|
31
|
+
const chips = () => [
|
|
32
|
+
...target.querySelectorAll<HTMLButtonElement>("[data-slot=tag-chip] button"),
|
|
33
|
+
];
|
|
34
|
+
return {
|
|
35
|
+
target,
|
|
36
|
+
key,
|
|
37
|
+
chips,
|
|
38
|
+
focused: () =>
|
|
39
|
+
document.activeElement?.getAttribute("aria-label") ?? document.activeElement?.tagName,
|
|
40
|
+
done: () => {
|
|
41
|
+
void unmount(app);
|
|
42
|
+
target.remove();
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// The 10 Nov audit: the remove buttons skipped the Tab order, so only the last tag could go.
|
|
48
|
+
describe("TagsInput keyboard", () => {
|
|
49
|
+
it("names the field with its tags at rest", async () => {
|
|
50
|
+
const { target, done } = await render(["Airtable", "Make"]);
|
|
51
|
+
expect(target.querySelector("button")?.getAttribute("aria-label")).toBe(
|
|
52
|
+
"Tools: Airtable, Make",
|
|
53
|
+
);
|
|
54
|
+
done();
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it("walks the chips with the arrows and removes the focused one", async () => {
|
|
58
|
+
const { target, key, chips, focused, done } = await render(["Airtable", "Make", "Zapier"]);
|
|
59
|
+
target.querySelector("button")?.click();
|
|
60
|
+
flushSync();
|
|
61
|
+
await tick();
|
|
62
|
+
expect(focused()).toBe("Tools");
|
|
63
|
+
await key("ArrowLeft");
|
|
64
|
+
expect(focused()).toBe("Remove Zapier");
|
|
65
|
+
await key("ArrowLeft");
|
|
66
|
+
await key("ArrowLeft");
|
|
67
|
+
expect(focused()).toBe("Remove Airtable");
|
|
68
|
+
await key("Delete");
|
|
69
|
+
expect(chips().map((b) => b.getAttribute("aria-label"))).toEqual([
|
|
70
|
+
"Remove Make",
|
|
71
|
+
"Remove Zapier",
|
|
72
|
+
]);
|
|
73
|
+
expect(focused()).toBe("Remove Make");
|
|
74
|
+
expect(target.querySelector("[role=status]")?.textContent).toBe("Removed Airtable");
|
|
75
|
+
await key("ArrowRight");
|
|
76
|
+
await key("ArrowRight");
|
|
77
|
+
expect(focused()).toBe("Tools");
|
|
78
|
+
done();
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it("announces an added tag and goes back to the box on Escape from a chip", async () => {
|
|
82
|
+
const { target, key, focused, done } = await render(["Make"]);
|
|
83
|
+
target.querySelector("button")?.click();
|
|
84
|
+
flushSync();
|
|
85
|
+
await tick();
|
|
86
|
+
const input = target.querySelector("input") as HTMLInputElement;
|
|
87
|
+
input.value = "Notion";
|
|
88
|
+
input.dispatchEvent(new Event("input", { bubbles: true }));
|
|
89
|
+
flushSync();
|
|
90
|
+
await key("Enter");
|
|
91
|
+
expect(target.querySelector("[role=status]")?.textContent).toBe("Added Notion");
|
|
92
|
+
input.value = "";
|
|
93
|
+
input.dispatchEvent(new Event("input", { bubbles: true }));
|
|
94
|
+
flushSync();
|
|
95
|
+
await key("ArrowLeft");
|
|
96
|
+
expect(focused()).toBe("Remove Notion");
|
|
97
|
+
await key("Escape");
|
|
98
|
+
expect(focused()).toBe("Tools");
|
|
99
|
+
done();
|
|
100
|
+
});
|
|
101
|
+
});
|
|
@@ -22,13 +22,18 @@
|
|
|
22
22
|
* Fires when the person changes the mode, never on load. An app that saves the choice
|
|
23
23
|
* on its server posts it here.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
onModeChange?: (mode: ThemeMode) => void;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
// =========================
|
|
29
29
|
// PROPS
|
|
30
30
|
// =========================
|
|
31
|
-
let {
|
|
31
|
+
let {
|
|
32
|
+
initial = "system",
|
|
33
|
+
onModeChange,
|
|
34
|
+
synchronousModeChanges = true,
|
|
35
|
+
...watcher
|
|
36
|
+
}: Props = $props();
|
|
32
37
|
|
|
33
38
|
// =========================
|
|
34
39
|
// EFFECTS
|
|
@@ -37,7 +42,7 @@
|
|
|
37
42
|
let seen: ThemeMode | null = null;
|
|
38
43
|
$effect(() => {
|
|
39
44
|
const next = userPrefersMode.current;
|
|
40
|
-
if (seen !== null && next !== seen)
|
|
45
|
+
if (seen !== null && next !== seen) onModeChange?.(next);
|
|
41
46
|
seen = next;
|
|
42
47
|
});
|
|
43
48
|
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ModeWatcher, userPrefersMode } from "mode-watcher";
|
|
2
|
+
import type { ComponentProps } from "svelte";
|
|
3
|
+
type WatcherProps = ComponentProps<typeof ModeWatcher>;
|
|
4
|
+
type ThemeMode = (typeof userPrefersMode)["current"];
|
|
5
|
+
interface Props extends Omit<WatcherProps, "defaultMode"> {
|
|
6
|
+
/**
|
|
7
|
+
* The choice the server already knows, for a browser that has none stored. A stored
|
|
8
|
+
* choice wins, so it seeds a first visit and never overrides a click.
|
|
9
|
+
*/
|
|
10
|
+
initial?: ThemeMode;
|
|
11
|
+
/**
|
|
12
|
+
* Fires when the person changes the mode, never on load. An app that saves the choice
|
|
13
|
+
* on its server posts it here.
|
|
14
|
+
*/
|
|
15
|
+
onModeChange?: (mode: ThemeMode) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const $$Component: import("svelte").Component<Props, {}, "">;
|
|
18
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
19
|
+
export default $$Component;
|
|
@@ -46,16 +46,16 @@ describe("ThemeProvider", () => {
|
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
it("reports a person's choice and not the load", () => {
|
|
49
|
-
const
|
|
50
|
-
const done = render({ initial: "light",
|
|
49
|
+
const onModeChange = vi.fn();
|
|
50
|
+
const done = render({ initial: "light", onModeChange, disableHeadScriptInjection: true });
|
|
51
51
|
flushSync();
|
|
52
|
-
expect(
|
|
52
|
+
expect(onModeChange).not.toHaveBeenCalled();
|
|
53
53
|
setMode("dark");
|
|
54
54
|
flushSync();
|
|
55
|
-
expect(
|
|
55
|
+
expect(onModeChange).toHaveBeenLastCalledWith("dark");
|
|
56
56
|
toggleMode();
|
|
57
57
|
flushSync();
|
|
58
|
-
expect(
|
|
58
|
+
expect(onModeChange).toHaveBeenLastCalledWith("light");
|
|
59
59
|
done();
|
|
60
60
|
});
|
|
61
61
|
});
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* One toolbar row for a list page
|
|
3
|
-
*
|
|
2
|
+
* One toolbar row for a list page: search, tabs and a view switch inline, folded into menus when
|
|
3
|
+
* narrow, never wrapping. `ToolbarSearch` lives in list-page.
|
|
4
4
|
*/
|
|
5
5
|
export { default as Toolbar } from "./toolbar.svelte";
|
|
6
|
-
export { default as ToolbarSearch } from "./toolbar-search.svelte";
|
|
7
|
-
export { toolbarTriggerClass } from "./toolbar-trigger.js";
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
interface Props {
|
|
13
13
|
value: string;
|
|
14
14
|
placeholder?: string;
|
|
15
|
+
/** The box's accessible name. A placeholder isn't one, and it goes away once you type. */
|
|
16
|
+
label?: string;
|
|
15
17
|
size?: "sm" | "default";
|
|
16
18
|
class?: string;
|
|
17
19
|
}
|
|
@@ -22,6 +24,7 @@
|
|
|
22
24
|
let {
|
|
23
25
|
value = $bindable(""),
|
|
24
26
|
placeholder = "Search...",
|
|
27
|
+
label = "Search",
|
|
25
28
|
size = "default",
|
|
26
29
|
class: extraClass,
|
|
27
30
|
}: Props = $props();
|
|
@@ -54,6 +57,7 @@
|
|
|
54
57
|
<Input
|
|
55
58
|
bind:value
|
|
56
59
|
{placeholder}
|
|
60
|
+
aria-label={label}
|
|
57
61
|
class={cn(
|
|
58
62
|
"w-full",
|
|
59
63
|
size === "sm" ? "h-7 pl-7 pr-2.5 text-xs" : "h-7 pl-7 pr-2.5 text-xs",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
value: string;
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
/** The box's accessible name. A placeholder isn't one, and it goes away once you type. */
|
|
5
|
+
label?: string;
|
|
6
|
+
size?: "sm" | "default";
|
|
7
|
+
class?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const $$Component: import("svelte").Component<Props, {}, "value">;
|
|
10
|
+
type $$Component = ReturnType<typeof $$Component>;
|
|
11
|
+
export default $$Component;
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
<div class="flex flex-nowrap items-center gap-2">
|
|
73
73
|
{#if search !== undefined}
|
|
74
74
|
<div class="w-56 shrink-0 @max-2xl/toolbar:hidden">
|
|
75
|
-
<ToolbarSearch bind:value={search} placeholder={searchPlaceholder} />
|
|
75
|
+
<ToolbarSearch bind:value={search} placeholder={searchPlaceholder} label={searchLabel} />
|
|
76
76
|
</div>
|
|
77
77
|
<Popover.Root>
|
|
78
78
|
<Popover.Trigger
|