@brett_lamy/ui 1.1.0 → 3.0.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 +37 -23
- package/dist/components/adaptive-pane.d.ts.map +1 -1
- package/dist/components/adaptive-pane.js +30 -0
- package/dist/components/animated-height.d.ts.map +1 -1
- package/dist/components/animated-height.js +82 -0
- package/dist/{templates → components}/artifact-chat-container.d.ts +17 -5
- package/dist/components/artifact-chat-container.d.ts.map +1 -0
- package/dist/components/artifact-chat-container.js +200 -0
- package/dist/components/avatar.js +26 -0
- package/dist/components/badge.js +24 -0
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/button.js +46 -0
- package/dist/components/card.js +56 -0
- package/dist/components/celebrate.d.ts.map +1 -1
- package/dist/components/celebrate.js +142 -0
- package/dist/components/chat-column.d.ts.map +1 -0
- package/dist/components/chat-column.js +26 -0
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox.js +55 -0
- package/dist/components/combobox.d.ts +1 -1
- package/dist/components/combobox.d.ts.map +1 -1
- package/dist/components/combobox.js +65 -0
- package/dist/components/command-menu.d.ts +210 -0
- package/dist/components/command-menu.d.ts.map +1 -0
- package/dist/components/command-menu.js +906 -0
- package/dist/components/composer/annotator.d.ts.map +1 -0
- package/dist/components/composer/annotator.js +17 -0
- package/dist/components/composer/composer-files.d.ts.map +1 -0
- package/dist/components/composer/composer-files.js +91 -0
- package/dist/components/{workbench/wb-popover.d.ts → composer/composer-popover.d.ts} +3 -5
- package/dist/components/composer/composer-popover.d.ts.map +1 -0
- package/dist/components/composer/composer-popover.js +29 -0
- package/dist/components/{workbench → composer}/composer.d.ts +11 -11
- package/dist/components/composer/composer.d.ts.map +1 -0
- package/dist/components/composer/composer.js +1633 -0
- package/dist/components/{workbench/chat.d.ts → conversation.d.ts} +3 -3
- package/dist/components/conversation.d.ts.map +1 -0
- package/dist/components/conversation.js +357 -0
- package/dist/components/credenza.d.ts +7 -2
- package/dist/components/credenza.d.ts.map +1 -1
- package/dist/components/credenza.js +294 -0
- package/dist/components/dialog.d.ts +2 -2
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js +125 -0
- package/dist/components/disclosure.d.ts.map +1 -1
- package/dist/components/disclosure.js +59 -0
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/dropdown-menu.d.ts.map +1 -1
- package/dist/components/dropdown-menu.js +114 -0
- package/dist/components/edge-drawer.d.ts +14 -2
- package/dist/components/edge-drawer.d.ts.map +1 -1
- package/dist/components/edge-drawer.js +73 -0
- package/dist/components/edit-bar.d.ts.map +1 -1
- package/dist/components/edit-bar.js +33 -0
- package/dist/components/{chat/floating-chat.d.ts → floating-chat.d.ts} +26 -3
- package/dist/components/floating-chat.d.ts.map +1 -0
- package/dist/components/floating-chat.js +288 -0
- package/dist/components/{chat/floating-sheet.d.ts → floating-sheet.d.ts} +24 -4
- package/dist/components/floating-sheet.d.ts.map +1 -0
- package/dist/components/floating-sheet.js +252 -0
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/form.js +32 -0
- package/dist/components/icon-button.d.ts +19 -0
- package/dist/components/icon-button.d.ts.map +1 -0
- package/dist/components/icon-button.js +31 -0
- package/dist/components/icon-swap.d.ts.map +1 -1
- package/dist/components/icon-swap.js +80 -0
- package/dist/components/index-bar.d.ts +14 -1
- package/dist/components/index-bar.d.ts.map +1 -1
- package/dist/components/index-bar.js +249 -0
- package/dist/components/input.d.ts.map +1 -1
- package/dist/components/input.js +30 -0
- package/dist/components/kbd.d.ts.map +1 -1
- package/dist/components/kbd.js +21 -0
- package/dist/components/label.d.ts.map +1 -1
- package/dist/components/label.js +22 -0
- package/dist/components/list-box.d.ts +1 -3
- package/dist/components/list-box.d.ts.map +1 -1
- package/dist/components/list-box.js +104 -0
- package/dist/components/list.d.ts +15 -1
- package/dist/components/list.d.ts.map +1 -1
- package/dist/components/list.js +491 -0
- package/dist/components/markdown-editor.d.ts.map +1 -1
- package/dist/components/markdown-editor.js +300 -0
- package/dist/components/{workbench/markdown.d.ts → markdown-view.d.ts} +1 -1
- package/dist/components/markdown-view.d.ts.map +1 -0
- package/dist/components/markdown-view.js +129 -0
- package/dist/components/measure-h.d.ts.map +1 -1
- package/dist/components/measure-h.js +20 -0
- package/dist/components/message-scroller.d.ts.map +1 -0
- package/dist/components/message-scroller.js +247 -0
- package/dist/components/morph.d.ts +6 -3
- package/dist/components/morph.d.ts.map +1 -1
- package/dist/components/morph.js +89 -0
- package/dist/components/navigation-stack.d.ts +27 -2
- package/dist/components/navigation-stack.d.ts.map +1 -1
- package/dist/components/navigation-stack.js +506 -0
- package/dist/components/now-playing-bars.js +38 -0
- package/dist/components/number-morph.d.ts.map +1 -1
- package/dist/components/number-morph.js +123 -0
- package/dist/{lib → components}/pencilkit/constants.d.ts +8 -8
- package/dist/components/pencilkit/constants.d.ts.map +1 -0
- package/dist/components/pencilkit/constants.js +63 -0
- package/dist/components/pencilkit/pencil-canvas.d.ts +1 -1
- package/dist/components/pencilkit/pencil-canvas.d.ts.map +1 -1
- package/dist/components/pencilkit/pencil-canvas.js +105 -0
- package/dist/components/pencilkit/pencil-toolbar.d.ts +8 -6
- package/dist/components/pencilkit/pencil-toolbar.d.ts.map +1 -1
- package/dist/components/pencilkit/pencil-toolbar.js +186 -0
- package/dist/components/pencilkit/pencilkit-annotator.d.ts +1 -1
- package/dist/components/pencilkit/pencilkit-annotator.d.ts.map +1 -1
- package/dist/components/pencilkit/pencilkit-annotator.js +44 -0
- package/dist/components/pencilkit/stroke-path.d.ts +1 -1
- package/dist/components/pencilkit/stroke-path.d.ts.map +1 -1
- package/dist/components/pencilkit/stroke-path.js +44 -0
- package/dist/components/pencilkit/use-pencil-history.d.ts +2 -2
- package/dist/components/pencilkit/use-pencil-history.d.ts.map +1 -1
- package/dist/components/pencilkit/use-pencil-history.js +25 -0
- package/dist/components/plain-button.d.ts +10 -0
- package/dist/components/plain-button.d.ts.map +1 -0
- package/dist/components/plain-button.js +23 -0
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.d.ts.map +1 -1
- package/dist/components/popover.js +36 -0
- package/dist/components/progress-ring.d.ts +34 -15
- package/dist/components/progress-ring.d.ts.map +1 -1
- package/dist/components/progress-ring.js +195 -0
- package/dist/components/progress-stepper.d.ts.map +1 -0
- package/dist/components/progress-stepper.js +62 -0
- package/dist/components/progress.d.ts.map +1 -1
- package/dist/components/progress.js +54 -0
- package/dist/components/qr-svg.d.ts.map +1 -1
- package/dist/components/qr-svg.js +74 -0
- package/dist/components/radio-group.d.ts +1 -1
- package/dist/components/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group.js +41 -0
- package/dist/components/replay-preview.d.ts +4 -0
- package/dist/components/replay-preview.d.ts.map +1 -0
- package/dist/components/replay-preview.js +3 -0
- package/dist/components/scroll-area.js +23 -0
- package/dist/components/search-field.d.ts.map +1 -1
- package/dist/components/search-field.js +44 -0
- package/dist/components/segmented.d.ts +2 -2
- package/dist/components/segmented.d.ts.map +1 -1
- package/dist/components/segmented.js +32 -0
- package/dist/components/select.d.ts +1 -1
- package/dist/components/select.d.ts.map +1 -1
- package/dist/components/select.js +93 -0
- package/dist/components/separator.d.ts.map +1 -1
- package/dist/components/separator.js +40 -0
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sheet.js +55 -0
- package/dist/components/side-drawer.d.ts +16 -2
- package/dist/components/side-drawer.d.ts.map +1 -1
- package/dist/components/side-drawer.js +247 -0
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar.js +282 -0
- package/dist/components/skeleton.js +48 -0
- package/dist/components/slider.d.ts +10 -4
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/slider.js +98 -0
- package/dist/components/snap-sheet.d.ts +13 -0
- package/dist/components/snap-sheet.d.ts.map +1 -0
- package/dist/components/snap-sheet.js +100 -0
- package/dist/components/spinner.js +35 -0
- package/dist/components/split-view.d.ts +34 -5
- package/dist/components/split-view.d.ts.map +1 -1
- package/dist/components/split-view.js +1060 -0
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/switch.js +27 -0
- package/dist/components/syntax-highlighting.d.ts.map +1 -1
- package/dist/components/syntax-highlighting.js +293 -0
- package/dist/components/tab-bar.js +28 -0
- package/dist/components/tab-view.d.ts +8 -7
- package/dist/components/tab-view.d.ts.map +1 -1
- package/dist/components/tab-view.js +307 -0
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +86 -0
- package/dist/components/text-field.d.ts.map +1 -1
- package/dist/components/text-field.js +29 -0
- package/dist/components/text-morph.d.ts.map +1 -1
- package/dist/components/text-morph.js +131 -0
- package/dist/components/textarea.d.ts.map +1 -1
- package/dist/components/textarea.js +30 -0
- package/dist/components/toast.d.ts +8 -2
- package/dist/components/toast.d.ts.map +1 -1
- package/dist/components/toast.js +302 -0
- package/dist/components/toggle-group.d.ts +1 -1
- package/dist/components/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group.js +48 -0
- package/dist/components/toggle.d.ts +1 -1
- package/dist/components/toggle.d.ts.map +1 -1
- package/dist/components/toggle.js +42 -0
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip.js +42 -0
- package/dist/{lib/workbench/theme.d.ts → components/workbench-theme.d.ts} +4 -5
- package/dist/components/workbench-theme.d.ts.map +1 -0
- package/dist/components/workbench-theme.js +34 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +37 -80
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +91 -20192
- package/dist/lib/container.d.ts.map +1 -1
- package/dist/lib/container.js +49 -0
- package/dist/lib/icon-shapes/chat.d.ts +32 -0
- package/dist/lib/icon-shapes/chat.d.ts.map +1 -0
- package/dist/lib/icon-shapes/chat.js +13 -0
- package/dist/lib/icon-shapes/pencilkit.d.ts +49 -0
- package/dist/lib/icon-shapes/pencilkit.d.ts.map +1 -0
- package/dist/lib/icon-shapes/pencilkit.js +20 -0
- package/dist/lib/icon-shapes/workbench.d.ts +199 -0
- package/dist/lib/icon-shapes/workbench.d.ts.map +1 -0
- package/dist/lib/icon-shapes/workbench.js +47 -0
- package/dist/lib/icon.d.ts +352 -1
- package/dist/lib/icon.d.ts.map +1 -1
- package/dist/lib/icon.js +1774 -0
- package/dist/lib/motion.d.ts +16 -0
- package/dist/lib/motion.d.ts.map +1 -1
- package/dist/lib/motion.js +104 -0
- package/dist/lib/{chat/persistent-host.d.ts → persistent-host.d.ts} +1 -1
- package/dist/lib/persistent-host.d.ts.map +1 -0
- package/dist/lib/persistent-host.js +41 -0
- package/dist/lib/primitives.d.ts +1 -1
- package/dist/lib/primitives.d.ts.map +1 -1
- package/dist/lib/primitives.js +8 -0
- package/dist/lib/qr.js +552 -0
- package/dist/lib/row-label.d.ts +9 -0
- package/dist/lib/row-label.d.ts.map +1 -0
- package/dist/lib/row-label.js +10 -0
- package/dist/lib/sheet-drag.d.ts +22 -7
- package/dist/lib/sheet-drag.d.ts.map +1 -1
- package/dist/lib/sheet-drag.js +128 -0
- package/dist/lib/syntax.js +204 -0
- package/dist/lib/theme.d.ts +61 -5
- package/dist/lib/theme.d.ts.map +1 -1
- package/dist/lib/theme.js +138 -0
- package/dist/lib/tokens.generated.d.ts +16 -0
- package/dist/lib/tokens.generated.d.ts.map +1 -0
- package/dist/lib/tokens.generated.js +22 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +18 -0
- package/dist/theme.css +265 -0
- package/package.json +8 -7
- package/dist/components/adaptive-pane.stories.d.ts +0 -7
- package/dist/components/adaptive-pane.stories.d.ts.map +0 -1
- package/dist/components/avatar.stories.d.ts +0 -9
- package/dist/components/avatar.stories.d.ts.map +0 -1
- package/dist/components/badge.stories.d.ts +0 -9
- package/dist/components/badge.stories.d.ts.map +0 -1
- package/dist/components/button.stories.d.ts +0 -9
- package/dist/components/button.stories.d.ts.map +0 -1
- package/dist/components/card.stories.d.ts +0 -9
- package/dist/components/card.stories.d.ts.map +0 -1
- package/dist/components/chat/channel-list.d.ts +0 -35
- package/dist/components/chat/channel-list.d.ts.map +0 -1
- package/dist/components/chat/channel-list.stories.d.ts +0 -13
- package/dist/components/chat/channel-list.stories.d.ts.map +0 -1
- package/dist/components/chat/chat-avatar.d.ts +0 -13
- package/dist/components/chat/chat-avatar.d.ts.map +0 -1
- package/dist/components/chat/chat-avatar.stories.d.ts +0 -9
- package/dist/components/chat/chat-avatar.stories.d.ts.map +0 -1
- package/dist/components/chat/chat-column.d.ts.map +0 -1
- package/dist/components/chat/chat-column.stories.d.ts +0 -7
- package/dist/components/chat/chat-column.stories.d.ts.map +0 -1
- package/dist/components/chat/chat-composer.d.ts +0 -22
- package/dist/components/chat/chat-composer.d.ts.map +0 -1
- package/dist/components/chat/chat-composer.stories.d.ts +0 -16
- package/dist/components/chat/chat-composer.stories.d.ts.map +0 -1
- package/dist/components/chat/chat.fixtures.d.ts +0 -29
- package/dist/components/chat/chat.fixtures.d.ts.map +0 -1
- package/dist/components/chat/floating-chat.d.ts.map +0 -1
- package/dist/components/chat/floating-chat.stories.d.ts +0 -17
- package/dist/components/chat/floating-chat.stories.d.ts.map +0 -1
- package/dist/components/chat/floating-sheet.d.ts.map +0 -1
- package/dist/components/chat/floating-sheet.stories.d.ts +0 -22
- package/dist/components/chat/floating-sheet.stories.d.ts.map +0 -1
- package/dist/components/chat/member-list.d.ts +0 -21
- package/dist/components/chat/member-list.d.ts.map +0 -1
- package/dist/components/chat/message-list.d.ts +0 -34
- package/dist/components/chat/message-list.d.ts.map +0 -1
- package/dist/components/chat/message.d.ts +0 -47
- package/dist/components/chat/message.d.ts.map +0 -1
- package/dist/components/chat/message.stories.d.ts +0 -30
- package/dist/components/chat/message.stories.d.ts.map +0 -1
- package/dist/components/chat/progress-stepper.d.ts.map +0 -1
- package/dist/components/chat/rich-text.d.ts +0 -8
- package/dist/components/chat/rich-text.d.ts.map +0 -1
- package/dist/components/chat/rich-text.stories.d.ts +0 -9
- package/dist/components/chat/rich-text.stories.d.ts.map +0 -1
- package/dist/components/chat/server-header.d.ts +0 -10
- package/dist/components/chat/server-header.d.ts.map +0 -1
- package/dist/components/chat/thread-preview.d.ts +0 -25
- package/dist/components/chat/thread-preview.d.ts.map +0 -1
- package/dist/components/chat/thread-preview.stories.d.ts +0 -18
- package/dist/components/chat/thread-preview.stories.d.ts.map +0 -1
- package/dist/components/chat/user-panel.d.ts +0 -16
- package/dist/components/chat/user-panel.d.ts.map +0 -1
- package/dist/components/chat/workspace-rail.d.ts +0 -56
- package/dist/components/chat/workspace-rail.d.ts.map +0 -1
- package/dist/components/chat/workspace-rail.stories.d.ts +0 -12
- package/dist/components/chat/workspace-rail.stories.d.ts.map +0 -1
- package/dist/components/checkbox.stories.d.ts +0 -11
- package/dist/components/checkbox.stories.d.ts.map +0 -1
- package/dist/components/combobox.stories.d.ts +0 -10
- package/dist/components/combobox.stories.d.ts.map +0 -1
- package/dist/components/credenza.stories.d.ts +0 -8
- package/dist/components/credenza.stories.d.ts.map +0 -1
- package/dist/components/dialog.stories.d.ts +0 -12
- package/dist/components/dialog.stories.d.ts.map +0 -1
- package/dist/components/disclosure.stories.d.ts +0 -10
- package/dist/components/disclosure.stories.d.ts.map +0 -1
- package/dist/components/dropdown-menu.stories.d.ts +0 -11
- package/dist/components/dropdown-menu.stories.d.ts.map +0 -1
- package/dist/components/edge-drawer.stories.d.ts +0 -8
- package/dist/components/edge-drawer.stories.d.ts.map +0 -1
- package/dist/components/edit-bar.stories.d.ts +0 -10
- package/dist/components/edit-bar.stories.d.ts.map +0 -1
- package/dist/components/form.stories.d.ts +0 -9
- package/dist/components/form.stories.d.ts.map +0 -1
- package/dist/components/haptic-indicator.d.ts +0 -11
- package/dist/components/haptic-indicator.d.ts.map +0 -1
- package/dist/components/haptic-indicator.stories.d.ts +0 -8
- package/dist/components/haptic-indicator.stories.d.ts.map +0 -1
- package/dist/components/index-bar.stories.d.ts +0 -12
- package/dist/components/index-bar.stories.d.ts.map +0 -1
- package/dist/components/input.stories.d.ts +0 -10
- package/dist/components/input.stories.d.ts.map +0 -1
- package/dist/components/kbd.stories.d.ts +0 -9
- package/dist/components/kbd.stories.d.ts.map +0 -1
- package/dist/components/label.stories.d.ts +0 -8
- package/dist/components/label.stories.d.ts.map +0 -1
- package/dist/components/list-box.stories.d.ts +0 -9
- package/dist/components/list-box.stories.d.ts.map +0 -1
- package/dist/components/list-row.stories.d.ts +0 -21
- package/dist/components/list-row.stories.d.ts.map +0 -1
- package/dist/components/list.stories.d.ts +0 -27
- package/dist/components/list.stories.d.ts.map +0 -1
- package/dist/components/markdown-editor.stories.d.ts +0 -17
- package/dist/components/markdown-editor.stories.d.ts.map +0 -1
- package/dist/components/morph.stories.d.ts +0 -14
- package/dist/components/morph.stories.d.ts.map +0 -1
- package/dist/components/motion.stories.d.ts +0 -15
- package/dist/components/motion.stories.d.ts.map +0 -1
- package/dist/components/navigation-stack.stories.d.ts +0 -31
- package/dist/components/navigation-stack.stories.d.ts.map +0 -1
- package/dist/components/now-playing-bars.stories.d.ts +0 -12
- package/dist/components/now-playing-bars.stories.d.ts.map +0 -1
- package/dist/components/pencilkit/pencil-canvas.stories.d.ts +0 -18
- package/dist/components/pencilkit/pencil-canvas.stories.d.ts.map +0 -1
- package/dist/components/pencilkit/pencil-toolbar.stories.d.ts +0 -10
- package/dist/components/pencilkit/pencil-toolbar.stories.d.ts.map +0 -1
- package/dist/components/pencilkit/pk-icon.d.ts +0 -8
- package/dist/components/pencilkit/pk-icon.d.ts.map +0 -1
- package/dist/components/pill-button.d.ts +0 -11
- package/dist/components/pill-button.d.ts.map +0 -1
- package/dist/components/pill-button.stories.d.ts +0 -9
- package/dist/components/pill-button.stories.d.ts.map +0 -1
- package/dist/components/popover.stories.d.ts +0 -9
- package/dist/components/popover.stories.d.ts.map +0 -1
- package/dist/components/progress-ring.stories.d.ts +0 -15
- package/dist/components/progress-ring.stories.d.ts.map +0 -1
- package/dist/components/progress.stories.d.ts +0 -10
- package/dist/components/progress.stories.d.ts.map +0 -1
- package/dist/components/qr-svg.stories.d.ts +0 -16
- package/dist/components/qr-svg.stories.d.ts.map +0 -1
- package/dist/components/radio-group.stories.d.ts +0 -10
- package/dist/components/radio-group.stories.d.ts.map +0 -1
- package/dist/components/scroll-area.stories.d.ts +0 -8
- package/dist/components/scroll-area.stories.d.ts.map +0 -1
- package/dist/components/search-field.stories.d.ts +0 -10
- package/dist/components/search-field.stories.d.ts.map +0 -1
- package/dist/components/segmented.stories.d.ts +0 -8
- package/dist/components/segmented.stories.d.ts.map +0 -1
- package/dist/components/select.stories.d.ts +0 -12
- package/dist/components/select.stories.d.ts.map +0 -1
- package/dist/components/separator.stories.d.ts +0 -9
- package/dist/components/separator.stories.d.ts.map +0 -1
- package/dist/components/sheet.stories.d.ts +0 -12
- package/dist/components/sheet.stories.d.ts.map +0 -1
- package/dist/components/side-drawer.stories.d.ts +0 -8
- package/dist/components/side-drawer.stories.d.ts.map +0 -1
- package/dist/components/sidebar.stories.d.ts +0 -10
- package/dist/components/sidebar.stories.d.ts.map +0 -1
- package/dist/components/skeleton.stories.d.ts +0 -11
- package/dist/components/skeleton.stories.d.ts.map +0 -1
- package/dist/components/slider.stories.d.ts +0 -12
- package/dist/components/slider.stories.d.ts.map +0 -1
- package/dist/components/spinner.stories.d.ts +0 -9
- package/dist/components/spinner.stories.d.ts.map +0 -1
- package/dist/components/split-view.stories.d.ts +0 -51
- package/dist/components/split-view.stories.d.ts.map +0 -1
- package/dist/components/switch.stories.d.ts +0 -9
- package/dist/components/switch.stories.d.ts.map +0 -1
- package/dist/components/syntax-highlighting.stories.d.ts +0 -18
- package/dist/components/syntax-highlighting.stories.d.ts.map +0 -1
- package/dist/components/tab-bar.stories.d.ts +0 -8
- package/dist/components/tab-bar.stories.d.ts.map +0 -1
- package/dist/components/tab-view.stories.d.ts +0 -28
- package/dist/components/tab-view.stories.d.ts.map +0 -1
- package/dist/components/tabs.stories.d.ts +0 -9
- package/dist/components/tabs.stories.d.ts.map +0 -1
- package/dist/components/text-field.stories.d.ts +0 -9
- package/dist/components/text-field.stories.d.ts.map +0 -1
- package/dist/components/toast.stories.d.ts +0 -13
- package/dist/components/toast.stories.d.ts.map +0 -1
- package/dist/components/toggle-group.stories.d.ts +0 -10
- package/dist/components/toggle-group.stories.d.ts.map +0 -1
- package/dist/components/toggle.stories.d.ts +0 -9
- package/dist/components/toggle.stories.d.ts.map +0 -1
- package/dist/components/tooltip.stories.d.ts +0 -11
- package/dist/components/tooltip.stories.d.ts.map +0 -1
- package/dist/components/workbench/annotator.d.ts.map +0 -1
- package/dist/components/workbench/chat.d.ts.map +0 -1
- package/dist/components/workbench/chat.stories.d.ts +0 -13
- package/dist/components/workbench/chat.stories.d.ts.map +0 -1
- package/dist/components/workbench/composer-files.d.ts.map +0 -1
- package/dist/components/workbench/composer.d.ts.map +0 -1
- package/dist/components/workbench/composer.stories.d.ts +0 -35
- package/dist/components/workbench/composer.stories.d.ts.map +0 -1
- package/dist/components/workbench/fixtures.d.ts +0 -38
- package/dist/components/workbench/fixtures.d.ts.map +0 -1
- package/dist/components/workbench/markdown.d.ts.map +0 -1
- package/dist/components/workbench/message-scroller.d.ts.map +0 -1
- package/dist/components/workbench/message-scroller.stories.d.ts +0 -9
- package/dist/components/workbench/message-scroller.stories.d.ts.map +0 -1
- package/dist/components/workbench/model-picker.d.ts +0 -29
- package/dist/components/workbench/model-picker.d.ts.map +0 -1
- package/dist/components/workbench/models.d.ts +0 -32
- package/dist/components/workbench/models.d.ts.map +0 -1
- package/dist/components/workbench/snap-sheet.d.ts +0 -12
- package/dist/components/workbench/snap-sheet.d.ts.map +0 -1
- package/dist/components/workbench/snap-sheet.stories.d.ts +0 -8
- package/dist/components/workbench/snap-sheet.stories.d.ts.map +0 -1
- package/dist/components/workbench/surfaces.d.ts +0 -67
- package/dist/components/workbench/surfaces.d.ts.map +0 -1
- package/dist/components/workbench/surfaces.stories.d.ts +0 -15
- package/dist/components/workbench/surfaces.stories.d.ts.map +0 -1
- package/dist/components/workbench/terminal.d.ts +0 -43
- package/dist/components/workbench/terminal.d.ts.map +0 -1
- package/dist/components/workbench/terminal.stories.d.ts +0 -8
- package/dist/components/workbench/terminal.stories.d.ts.map +0 -1
- package/dist/components/workbench/thread-sidebar.d.ts +0 -100
- package/dist/components/workbench/thread-sidebar.d.ts.map +0 -1
- package/dist/components/workbench/thread-sidebar.stories.d.ts +0 -9
- package/dist/components/workbench/thread-sidebar.stories.d.ts.map +0 -1
- package/dist/components/workbench/wb-popover.d.ts.map +0 -1
- package/dist/components/workbench/workbench-composer.d.ts +0 -26
- package/dist/components/workbench/workbench-composer.d.ts.map +0 -1
- package/dist/demos/delivery/delivery-tracking-demo.d.ts +0 -41
- package/dist/demos/delivery/delivery-tracking-demo.d.ts.map +0 -1
- package/dist/demos/delivery/delivery-tracking-demo.stories.d.ts +0 -13
- package/dist/demos/delivery/delivery-tracking-demo.stories.d.ts.map +0 -1
- package/dist/demos/haptics-playground.d.ts +0 -18
- package/dist/demos/haptics-playground.d.ts.map +0 -1
- package/dist/demos/haptics-playground.stories.d.ts +0 -8
- package/dist/demos/haptics-playground.stories.d.ts.map +0 -1
- package/dist/demos/map-chat/geo.d.ts +0 -46
- package/dist/demos/map-chat/geo.d.ts.map +0 -1
- package/dist/demos/map-chat/map-agent.d.ts +0 -48
- package/dist/demos/map-chat/map-agent.d.ts.map +0 -1
- package/dist/demos/map-chat/map-chat-demo.d.ts +0 -19
- package/dist/demos/map-chat/map-chat-demo.d.ts.map +0 -1
- package/dist/demos/map-chat/map-chat-demo.stories.d.ts +0 -16
- package/dist/demos/map-chat/map-chat-demo.stories.d.ts.map +0 -1
- package/dist/demos/map-chat/map-icons.d.ts +0 -44
- package/dist/demos/map-chat/map-icons.d.ts.map +0 -1
- package/dist/demos/map-chat/places.d.ts +0 -29
- package/dist/demos/map-chat/places.d.ts.map +0 -1
- package/dist/demos/map-chat/tile-map.d.ts +0 -72
- package/dist/demos/map-chat/tile-map.d.ts.map +0 -1
- package/dist/demos/pencilkit/demo-strokes.d.ts +0 -4
- package/dist/demos/pencilkit/demo-strokes.d.ts.map +0 -1
- package/dist/demos/pencilkit/pencilkit-demo.d.ts +0 -15
- package/dist/demos/pencilkit/pencilkit-demo.d.ts.map +0 -1
- package/dist/demos/pencilkit/pencilkit-demo.stories.d.ts +0 -11
- package/dist/demos/pencilkit/pencilkit-demo.stories.d.ts.map +0 -1
- package/dist/demos/sidebar-demo.d.ts +0 -9
- package/dist/demos/sidebar-demo.d.ts.map +0 -1
- package/dist/demos/split-view-demos.d.ts +0 -50
- package/dist/demos/split-view-demos.d.ts.map +0 -1
- package/dist/lib/chat/chat-icon.d.ts +0 -24
- package/dist/lib/chat/chat-icon.d.ts.map +0 -1
- package/dist/lib/chat/chat-shell-context.d.ts +0 -19
- package/dist/lib/chat/chat-shell-context.d.ts.map +0 -1
- package/dist/lib/chat/chat-tokens.d.ts +0 -72
- package/dist/lib/chat/chat-tokens.d.ts.map +0 -1
- package/dist/lib/chat/chat-users.d.ts +0 -18
- package/dist/lib/chat/chat-users.d.ts.map +0 -1
- package/dist/lib/chat/kvib.d.ts +0 -3
- package/dist/lib/chat/kvib.d.ts.map +0 -1
- package/dist/lib/chat/persistent-host.d.ts.map +0 -1
- package/dist/lib/chat/title-ref.d.ts +0 -3
- package/dist/lib/chat/title-ref.d.ts.map +0 -1
- package/dist/lib/haptics.d.ts +0 -27
- package/dist/lib/haptics.d.ts.map +0 -1
- package/dist/lib/icon.stories.d.ts +0 -15
- package/dist/lib/icon.stories.d.ts.map +0 -1
- package/dist/lib/pencilkit/constants.d.ts.map +0 -1
- package/dist/lib/workbench/haptics.d.ts +0 -3
- package/dist/lib/workbench/haptics.d.ts.map +0 -1
- package/dist/lib/workbench/icons.d.ts +0 -29
- package/dist/lib/workbench/icons.d.ts.map +0 -1
- package/dist/lib/workbench/motion.d.ts +0 -83
- package/dist/lib/workbench/motion.d.ts.map +0 -1
- package/dist/lib/workbench/press.d.ts +0 -10
- package/dist/lib/workbench/press.d.ts.map +0 -1
- package/dist/lib/workbench/theme.d.ts.map +0 -1
- package/dist/lib/workbench/util.d.ts +0 -6
- package/dist/lib/workbench/util.d.ts.map +0 -1
- package/dist/stories/frame.d.ts +0 -16
- package/dist/stories/frame.d.ts.map +0 -1
- package/dist/stories/primitive-frame.d.ts +0 -20
- package/dist/stories/primitive-frame.d.ts.map +0 -1
- package/dist/templates/artifact-chat-container.d.ts.map +0 -1
- package/dist/templates/artifact-chat-container.stories.d.ts +0 -24
- package/dist/templates/artifact-chat-container.stories.d.ts.map +0 -1
- package/dist/templates/chat-shell.d.ts +0 -86
- package/dist/templates/chat-shell.d.ts.map +0 -1
- package/dist/templates/chat-shell.stories.d.ts +0 -22
- package/dist/templates/chat-shell.stories.d.ts.map +0 -1
- package/dist/templates/workbench-shell.d.ts +0 -177
- package/dist/templates/workbench-shell.d.ts.map +0 -1
- package/dist/templates/workbench-shell.stories.d.ts +0 -17
- package/dist/templates/workbench-shell.stories.d.ts.map +0 -1
- /package/dist/components/{chat/chat-column.d.ts → chat-column.d.ts} +0 -0
- /package/dist/components/{workbench → composer}/annotator.d.ts +0 -0
- /package/dist/components/{workbench → composer}/composer-files.d.ts +0 -0
- /package/dist/components/{workbench/message-scroller.d.ts → message-scroller.d.ts} +0 -0
- /package/dist/components/{chat/progress-stepper.d.ts → progress-stepper.d.ts} +0 -0
|
@@ -4,7 +4,7 @@ export declare const PopoverTrigger: typeof DialogTrigger;
|
|
|
4
4
|
export interface PopoverProps extends AriaPopoverProps {
|
|
5
5
|
}
|
|
6
6
|
/** The styled floating surface. Select, ComboBox and DropdownMenu render their lists inside it. */
|
|
7
|
-
export declare function Popover({ className, offset, ...props }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function Popover({ className, style, offset, ...props }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export interface PopoverContentProps extends Omit<PopoverProps, 'children'> {
|
|
9
9
|
children?: AriaDialogProps['children'];
|
|
10
10
|
/** Accessible name when the content has no heading. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../src/components/popover.tsx"],"names":[],"mappings":"AACA,OAAO,EACiB,KAAK,WAAW,IAAI,eAAe,EACzD,aAAa,EACW,KAAK,YAAY,IAAI,gBAAgB,EAE9D,MAAM,uBAAuB,CAAC;AAY/B,wEAAwE;AACxE,eAAO,MAAM,cAAc,sBAAgB,CAAC;AAE5C,MAAM,WAAW,YAAa,SAAQ,gBAAgB;CAAG;AAEzD,mGAAmG;AACnG,wBAAgB,OAAO,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,MAAU,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,2CAY/E;AAED,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC;IACzE,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IACvC,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CAQ7G"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { useThemeScopeProps as t } from "../lib/theme.js";
|
|
4
|
+
import { overlayZ as n, popoverMotion as r, popoverSurface as i } from "../lib/primitives.js";
|
|
5
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
6
|
+
import { Dialog as o, DialogTrigger as s, Popover as c, composeRenderProps as l } from "react-aria-components";
|
|
7
|
+
//#region src/components/popover.tsx
|
|
8
|
+
var u = s;
|
|
9
|
+
function d({ className: o, style: s, offset: u = 8, ...d }) {
|
|
10
|
+
let f = t();
|
|
11
|
+
return /* @__PURE__ */ a(c, {
|
|
12
|
+
"data-slot": "popover",
|
|
13
|
+
"data-theme-scope": f["data-theme-scope"],
|
|
14
|
+
offset: u,
|
|
15
|
+
className: l(o, (t) => e(i, r, n, "min-w-(--trigger-width)", f.className, t)),
|
|
16
|
+
style: l(s, (e) => ({
|
|
17
|
+
...f.style,
|
|
18
|
+
...e
|
|
19
|
+
})),
|
|
20
|
+
...d
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function f({ className: t, children: n, "aria-label": r, ...i }) {
|
|
24
|
+
return /* @__PURE__ */ a(d, {
|
|
25
|
+
className: l(t, (t) => e("w-72 min-w-0", t)),
|
|
26
|
+
...i,
|
|
27
|
+
children: /* @__PURE__ */ a(o, {
|
|
28
|
+
"data-slot": "popover-content",
|
|
29
|
+
"aria-label": r,
|
|
30
|
+
className: "p-4 outline-none",
|
|
31
|
+
children: n
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { d as Popover, f as PopoverContent, u as PopoverTrigger };
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { ProgressBarProps } from 'react-aria-components';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
4
|
type RingSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export interface ProgressRingProps extends Omit<ProgressBarProps, 'children' | 'className' | 'style'> {
|
|
5
|
+
/** The ring's box and arc color. Geometry (px, stroke, font) is computed and fed in as --ring-* variables; a
|
|
6
|
+
* `color` / `trackColor` prop overrides --ring-color / --ring-track. */
|
|
7
|
+
export declare const progressRingVariants: (props?: ({
|
|
8
|
+
tone?: "destructive" | "success" | "warning" | "default" | null | undefined;
|
|
9
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
|
+
export type ProgressRingTone = NonNullable<VariantProps<typeof progressRingVariants>['tone']>;
|
|
11
|
+
export interface ProgressRingProps extends Omit<ProgressBarProps, 'children' | 'className' | 'style'>, VariantProps<typeof progressRingVariants> {
|
|
12
12
|
/** `sm` 20 · `md` 28 · `lg` 44 · `xl` 72 px, or a number of px. */
|
|
13
13
|
size?: RingSize | number;
|
|
14
14
|
/** Stroke width in px (defaults scale with the size). */
|
|
15
15
|
thickness?: number;
|
|
16
|
-
tone?: ProgressRingTone;
|
|
17
16
|
/** Any CSS color for the arc (overrides `tone`). */
|
|
18
17
|
color?: string;
|
|
19
18
|
/** Any CSS color for the track. */
|
|
@@ -26,6 +25,13 @@ export interface ProgressRingProps extends Omit<ProgressBarProps, 'children' | '
|
|
|
26
25
|
style?: CSSProperties;
|
|
27
26
|
}
|
|
28
27
|
export declare function ProgressRing({ size, thickness, tone, color, trackColor, showValue, children, className, style, ...props }: ProgressRingProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
/** CountdownRing's seconds label: `labelSize` picks a font size independent of the ring's (default: the ring's
|
|
29
|
+
* --ring-font); `warn` turns it the warning color. */
|
|
30
|
+
export declare const countdownRingLabelVariants: (props?: ({
|
|
31
|
+
labelSize?: "auto" | "sm" | "lg" | "md" | "xl" | null | undefined;
|
|
32
|
+
warn?: boolean | null | undefined;
|
|
33
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
34
|
+
export type CountdownRingLabelSize = Exclude<NonNullable<VariantProps<typeof countdownRingLabelVariants>['labelSize']>, 'auto'>;
|
|
29
35
|
export interface CountdownRingProps {
|
|
30
36
|
/** Seconds left. */
|
|
31
37
|
remaining: number;
|
|
@@ -41,26 +47,39 @@ export interface CountdownRingProps {
|
|
|
41
47
|
/** The arc and label color while warning (default red). */
|
|
42
48
|
warnColor?: string;
|
|
43
49
|
trackColor?: string;
|
|
44
|
-
/** Seconds in the middle (default true when the ring is `md` or larger). */
|
|
50
|
+
/** Seconds in the middle (default true when the ring is `md` or larger, or when `labelSize` is set). */
|
|
45
51
|
showLabel?: boolean;
|
|
52
|
+
/** The seconds' font size, independent of the ring: `sm` 9.36px (a 26px code ring) · `md` 10.5 · `lg` 13 ·
|
|
53
|
+
* `xl` 20 (the preset rings' labels). Default: scales with the ring. */
|
|
54
|
+
labelSize?: CountdownRingLabelSize;
|
|
46
55
|
/** Accessible label; default "N seconds left". */
|
|
47
56
|
'aria-label'?: string;
|
|
48
57
|
className?: string;
|
|
49
58
|
style?: CSSProperties;
|
|
50
59
|
}
|
|
51
|
-
export declare function CountdownRing({ remaining, duration, warnAt, size, thickness, color, warnColor, trackColor, showLabel, className, style, 'aria-label': label, }: CountdownRingProps): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
export declare function CountdownRing({ remaining, duration, warnAt, size, thickness, color, warnColor, trackColor, showLabel, labelSize, className, style, 'aria-label': label, }: CountdownRingProps): import("react/jsx-runtime").JSX.Element;
|
|
52
61
|
export interface UseCountdownOptions {
|
|
53
62
|
/** Running (default true). Pausing freezes the remaining time. */
|
|
54
63
|
running?: boolean;
|
|
55
64
|
/** Start again from `duration` when it reaches zero (default true: a TOTP-style period). */
|
|
56
65
|
loop?: boolean;
|
|
57
|
-
/** Called each time it reaches zero. */
|
|
66
|
+
/** Called each time it reaches zero (once per period that ended, even if the page was throttled meanwhile). */
|
|
58
67
|
onEnd?: () => void;
|
|
68
|
+
/** Seconds already elapsed when it starts, e.g. to align a TOTP period with a clock (default 0). */
|
|
69
|
+
offset?: number;
|
|
59
70
|
}
|
|
60
|
-
|
|
61
|
-
|
|
71
|
+
export interface Countdown {
|
|
72
|
+
/** Whole seconds left in the current period (`duration` … 1 while looping; down to 0 when not). */
|
|
62
73
|
remaining: number;
|
|
74
|
+
/** Periods completed so far (0 at the start); a TOTP code's window is its start window + `period`. */
|
|
75
|
+
period: number;
|
|
76
|
+
/** Whole seconds elapsed, `offset` included. */
|
|
77
|
+
elapsed: number;
|
|
78
|
+
/** Start over from `offset` (period 0). */
|
|
63
79
|
reset: () => void;
|
|
64
|
-
}
|
|
80
|
+
}
|
|
81
|
+
/** A `duration`-second countdown on the wall clock: it reads `Date.now()` (so throttled or delayed timers catch up
|
|
82
|
+
* instead of drifting, and a frozen clock freezes it) and re-renders only when the whole second changes. */
|
|
83
|
+
export declare function useCountdown(duration: number, { running, loop, onEnd, offset }?: UseCountdownOptions): Countdown;
|
|
65
84
|
export {};
|
|
66
85
|
//# sourceMappingURL=progress-ring.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-ring.d.ts","sourceRoot":"","sources":["../../src/components/progress-ring.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"progress-ring.d.ts","sourceRoot":"","sources":["../../src/components/progress-ring.tsx"],"names":[],"mappings":"AACA,OAAO,EAA+B,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxF,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAclE,KAAK,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAO1C;yEACyE;AACzE,eAAO,MAAM,oBAAoB;;8EAahC,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,YAAY,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AA0C9F,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC,EAAE,YAAY,CAAC,OAAO,oBAAoB,CAAC;IAC9I,mEAAmE;IACnE,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gFAAgF;IAChF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAC1F,EAAE,iBAAiB,2CA2BnB;AAED;uDACuD;AACvD,eAAO,MAAM,0BAA0B;;;8EAetC,CAAC;AACF,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,OAAO,0BAA0B,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAEhI,MAAM,WAAW,kBAAkB;IACjC,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wGAAwG;IACxG,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;6EACyE;IACzE,SAAS,CAAC,EAAE,sBAAsB,CAAC;IACnC,kDAAkD;IAClD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EAAE,QAAa,EAAE,MAAU,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAC3H,YAAY,EAAE,KAAK,GACpB,EAAE,kBAAkB,2CAmCpB;AAED,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4FAA4F;IAC5F,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,+GAA+G;IAC/G,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,oGAAoG;IACpG,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,mGAAmG;IACnG,SAAS,EAAE,MAAM,CAAC;IAClB,sGAAsG;IACtG,MAAM,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;6GAC6G;AAC7G,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,OAAc,EAAE,IAAW,EAAE,KAAK,EAAE,MAAU,EAAE,GAAE,mBAAwB,GAAG,SAAS,CAqCtI"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { NumberMorph as t } from "./number-morph.js";
|
|
4
|
+
import { useEffect as n, useRef as r, useState as i } from "react";
|
|
5
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import { ProgressBar as c } from "react-aria-components";
|
|
7
|
+
import { cva as l } from "class-variance-authority";
|
|
8
|
+
//#region src/components/progress-ring.tsx
|
|
9
|
+
var u = {
|
|
10
|
+
sm: {
|
|
11
|
+
px: 20,
|
|
12
|
+
stroke: 2.2,
|
|
13
|
+
font: 0
|
|
14
|
+
},
|
|
15
|
+
md: {
|
|
16
|
+
px: 28,
|
|
17
|
+
stroke: 2.6,
|
|
18
|
+
font: 10.5
|
|
19
|
+
},
|
|
20
|
+
lg: {
|
|
21
|
+
px: 44,
|
|
22
|
+
stroke: 3.5,
|
|
23
|
+
font: 13
|
|
24
|
+
},
|
|
25
|
+
xl: {
|
|
26
|
+
px: 72,
|
|
27
|
+
stroke: 5,
|
|
28
|
+
font: 20
|
|
29
|
+
}
|
|
30
|
+
}, d = l("relative inline-grid size-(--ring-px) shrink-0 place-items-center align-middle", {
|
|
31
|
+
variants: { tone: {
|
|
32
|
+
default: "[--ring-color:var(--primary)]",
|
|
33
|
+
success: "[--ring-color:var(--success,oklch(0.723_0.191_149.6))]",
|
|
34
|
+
warning: "[--ring-color:var(--warning,oklch(0.769_0.165_70.1))]",
|
|
35
|
+
destructive: "[--ring-color:var(--destructive)]"
|
|
36
|
+
} },
|
|
37
|
+
defaultVariants: { tone: "default" }
|
|
38
|
+
}), f = (e, t, n, r) => ({
|
|
39
|
+
"--ring-px": e.px + "px",
|
|
40
|
+
...e.font ? { "--ring-font": e.font + "px" } : null,
|
|
41
|
+
...t ? { "--ring-color": t } : null,
|
|
42
|
+
...n ? { "--ring-track": n } : null,
|
|
43
|
+
...r
|
|
44
|
+
});
|
|
45
|
+
function p(e, t) {
|
|
46
|
+
let n = typeof e == "number" ? {
|
|
47
|
+
px: e,
|
|
48
|
+
stroke: Math.max(2, e / 12),
|
|
49
|
+
font: e >= 26 ? e * .36 : 0
|
|
50
|
+
} : u[e ?? "md"], r = t ?? n.stroke, i = (n.px - r) / 2;
|
|
51
|
+
return {
|
|
52
|
+
...n,
|
|
53
|
+
stroke: r,
|
|
54
|
+
r: i,
|
|
55
|
+
c: 2 * Math.PI * i
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function m({ px: t, stroke: n, r, c: i, fraction: a, transition: c, spin: l }) {
|
|
59
|
+
let u = Math.min(1, Math.max(0, a));
|
|
60
|
+
return /* @__PURE__ */ s("svg", {
|
|
61
|
+
width: t,
|
|
62
|
+
height: t,
|
|
63
|
+
viewBox: `0 0 ${t} ${t}`,
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
className: e("block -rotate-90", l && "animate-spin [animation-duration:900ms] motion-reduce:animate-none"),
|
|
66
|
+
children: [/* @__PURE__ */ o("circle", {
|
|
67
|
+
cx: t / 2,
|
|
68
|
+
cy: t / 2,
|
|
69
|
+
r,
|
|
70
|
+
fill: "none",
|
|
71
|
+
strokeWidth: n,
|
|
72
|
+
className: "stroke-(--ring-track,var(--secondary-strong,var(--accent)))"
|
|
73
|
+
}), /* @__PURE__ */ o("circle", {
|
|
74
|
+
"data-slot": "progress-ring-arc",
|
|
75
|
+
cx: t / 2,
|
|
76
|
+
cy: t / 2,
|
|
77
|
+
r,
|
|
78
|
+
fill: "none",
|
|
79
|
+
strokeWidth: n,
|
|
80
|
+
strokeLinecap: "round",
|
|
81
|
+
strokeDasharray: i,
|
|
82
|
+
strokeDashoffset: i * (1 - u),
|
|
83
|
+
opacity: u <= 0 ? 0 : 1,
|
|
84
|
+
className: e("stroke-(--ring-color)", c)
|
|
85
|
+
})]
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function h({ size: n, thickness: r, tone: i, color: l, trackColor: u, showValue: h, children: g, className: _, style: v, ...y }) {
|
|
89
|
+
let b = p(n, r), x = y.valueLabel == null && y.formatOptions == null;
|
|
90
|
+
return /* @__PURE__ */ o(c, {
|
|
91
|
+
"data-slot": "progress-ring",
|
|
92
|
+
...y,
|
|
93
|
+
className: e(d({ tone: i }), _),
|
|
94
|
+
style: f(b, l, u, v),
|
|
95
|
+
children: ({ percentage: n, valueText: r, isIndeterminate: i }) => /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(m, {
|
|
96
|
+
...b,
|
|
97
|
+
fraction: i ? .25 : (n ?? 0) / 100,
|
|
98
|
+
spin: i,
|
|
99
|
+
transition: "[transition:stroke-dashoffset_var(--duration-spring-smooth)_var(--ease-spring-smooth),stroke_.3s,opacity_.15s]"
|
|
100
|
+
}), g != null || h && !i && b.font ? /* @__PURE__ */ o("span", {
|
|
101
|
+
className: e("absolute inset-0 grid place-items-center font-semibold tabular-nums text-foreground", b.font ? "text-(length:--ring-font)" : ""),
|
|
102
|
+
children: g ?? (x ? /* @__PURE__ */ o(t, {
|
|
103
|
+
value: (n ?? 0) / 100,
|
|
104
|
+
format: { style: "percent" }
|
|
105
|
+
}) : r)
|
|
106
|
+
}) : null] })
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
var g = l("absolute inset-0 grid place-items-center font-semibold tabular-nums transition-colors duration-300", {
|
|
110
|
+
variants: {
|
|
111
|
+
labelSize: {
|
|
112
|
+
auto: "text-(length:--ring-font)",
|
|
113
|
+
sm: "text-[9.36px]",
|
|
114
|
+
md: "text-[10.5px]",
|
|
115
|
+
lg: "text-footnote",
|
|
116
|
+
xl: "text-title"
|
|
117
|
+
},
|
|
118
|
+
warn: {
|
|
119
|
+
false: "text-muted-foreground",
|
|
120
|
+
true: "text-(--ring-warn)"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
defaultVariants: {
|
|
124
|
+
labelSize: "auto",
|
|
125
|
+
warn: !1
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
function _({ remaining: i, duration: a = 30, warnAt: c = 5, size: l, thickness: u, color: h, warnColor: _, trackColor: v, showLabel: y, labelSize: b, className: x, style: S, "aria-label": C }) {
|
|
129
|
+
let w = p(l, u), T = Math.max(0, Math.ceil(i)), E = c > 0 && T <= c, D = r(T), O = T > D.current;
|
|
130
|
+
n(() => {
|
|
131
|
+
D.current = T;
|
|
132
|
+
}, [T]);
|
|
133
|
+
let k = y ?? (b != null || w.font > 0);
|
|
134
|
+
return /* @__PURE__ */ s("span", {
|
|
135
|
+
"data-slot": "countdown-ring",
|
|
136
|
+
"data-warning": E || void 0,
|
|
137
|
+
role: "timer",
|
|
138
|
+
"aria-label": C ?? `${T} second${T === 1 ? "" : "s"} left`,
|
|
139
|
+
className: e(d(), "[--ring-warn:var(--destructive)] data-warning:[--ring-color:var(--ring-warn)]", x),
|
|
140
|
+
style: f({
|
|
141
|
+
px: w.px,
|
|
142
|
+
font: w.font || Math.max(9, w.px * .36)
|
|
143
|
+
}, h, v, _ ? {
|
|
144
|
+
"--ring-warn": _,
|
|
145
|
+
...S
|
|
146
|
+
} : S),
|
|
147
|
+
children: [/* @__PURE__ */ o(m, {
|
|
148
|
+
...w,
|
|
149
|
+
fraction: T / a,
|
|
150
|
+
transition: O ? "[transition:none]" : "[transition:stroke-dashoffset_1s_linear,stroke_.3s]"
|
|
151
|
+
}), k ? /* @__PURE__ */ o("span", {
|
|
152
|
+
"aria-hidden": "true",
|
|
153
|
+
className: g({
|
|
154
|
+
labelSize: b ?? "auto",
|
|
155
|
+
warn: E
|
|
156
|
+
}),
|
|
157
|
+
children: /* @__PURE__ */ o(t, { value: T })
|
|
158
|
+
}) : null]
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
function v(e, { running: t = !0, loop: a = !0, onEnd: o, offset: s = 0 } = {}) {
|
|
162
|
+
let c = r(0), l = r(null), [u, d] = i(s), f = r(-1), p = r(o);
|
|
163
|
+
p.current = o;
|
|
164
|
+
let m = () => s + Math.floor((c.current + (l.current == null ? 0 : Date.now() - l.current)) / 1e3), h = (t) => a ? Math.floor(t / e) : Math.min(1, Math.floor(t / e));
|
|
165
|
+
f.current < 0 && (f.current = h(s));
|
|
166
|
+
let g = () => {
|
|
167
|
+
let e = m(), t = h(e);
|
|
168
|
+
for (; f.current < t; f.current++) p.current?.();
|
|
169
|
+
d(e);
|
|
170
|
+
};
|
|
171
|
+
n(() => {
|
|
172
|
+
if (!t) return;
|
|
173
|
+
l.current = Date.now();
|
|
174
|
+
let e = setInterval(g, 250);
|
|
175
|
+
return () => {
|
|
176
|
+
clearInterval(e), c.current += Date.now() - (l.current ?? Date.now()), l.current = null;
|
|
177
|
+
};
|
|
178
|
+
}, [
|
|
179
|
+
t,
|
|
180
|
+
a,
|
|
181
|
+
e,
|
|
182
|
+
s
|
|
183
|
+
]);
|
|
184
|
+
let _ = () => {
|
|
185
|
+
c.current = 0, l.current != null && (l.current = Date.now()), f.current = h(s), d(s);
|
|
186
|
+
}, v = h(u) - h(s);
|
|
187
|
+
return {
|
|
188
|
+
remaining: a ? e - u % e : Math.max(0, e - u),
|
|
189
|
+
period: v,
|
|
190
|
+
elapsed: u,
|
|
191
|
+
reset: _
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
//#endregion
|
|
195
|
+
export { _ as CountdownRing, h as ProgressRing, g as countdownRingLabelVariants, d as progressRingVariants, v as useCountdown };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-stepper.d.ts","sourceRoot":"","sources":["../../src/components/progress-stepper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAItD,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,oFAAoF;IACpF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE3D,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,8FAA8F;IAC9F,OAAO,EAAE,MAAM,CAAC;IAChB,iGAAiG;IACjG,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAED,eAAO,MAAM,uBAAuB;;8EAGnC,CAAC;AAqBF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,OAAO,EACP,OAAgB,EAChB,QAAe,EACf,MAAc,EACd,SAAS,EACT,KAAK,GACN,EAAE,oBAAoB,2CAyDtB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { cn as e } from "../lib/utils.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { cva as r } from "class-variance-authority";
|
|
4
|
+
//#region src/components/progress-stepper.tsx
|
|
5
|
+
var i = r("m-0 flex list-none p-0 [--ck-stepper-accent:var(--primary)] [--ck-stepper-idle:var(--secondary)]", {
|
|
6
|
+
variants: { variant: {
|
|
7
|
+
bars: "gap-[6px]",
|
|
8
|
+
line: "gap-0"
|
|
9
|
+
} },
|
|
10
|
+
defaultVariants: { variant: "bars" }
|
|
11
|
+
}), a = r("group/step flex min-w-0 flex-1 items-center", { variants: { variant: {
|
|
12
|
+
bars: "flex-col gap-[8px]",
|
|
13
|
+
line: "flex-row gap-0"
|
|
14
|
+
} } }), o = r("relative w-full overflow-hidden rounded-[999px] bg-(--ck-stepper-idle)", { variants: { variant: {
|
|
15
|
+
bars: "h-[5px]",
|
|
16
|
+
line: "h-[3px] group-last/step:hidden"
|
|
17
|
+
} } });
|
|
18
|
+
function s(t, n) {
|
|
19
|
+
return t === "active" && n ? "left-[-100%] w-full bg-[linear-gradient(90deg,transparent,var(--ck-stepper-accent)_40%,var(--ck-stepper-accent)_60%,transparent)] [transform:none] animate-[ck-stepper-sweep_1.6s_ease-in-out_infinite] motion-reduce:left-0 motion-reduce:animate-none motion-reduce:bg-(color:--ck-stepper-accent) motion-reduce:bg-none motion-reduce:[transform:scaleX(.45)]" : e("bg-(color:--ck-stepper-accent)", t === "done" ? "[transform:scaleX(1)]" : t === "active" ? "[transform:scaleX(.45)]" : "[transform:scaleX(0)]");
|
|
20
|
+
}
|
|
21
|
+
function c({ steps: r, current: c, variant: l = "bars", animated: u = !0, labels: d = !1, className: f, style: p }) {
|
|
22
|
+
return /* @__PURE__ */ t("ol", {
|
|
23
|
+
"data-slot": "progress-stepper",
|
|
24
|
+
"data-variant": l,
|
|
25
|
+
"data-animated": u || void 0,
|
|
26
|
+
className: e(i({ variant: l }), f),
|
|
27
|
+
style: p,
|
|
28
|
+
"aria-label": "Progress",
|
|
29
|
+
children: r.map((r, i) => {
|
|
30
|
+
let f = i < c ? "done" : i === c ? "active" : "todo";
|
|
31
|
+
return /* @__PURE__ */ n("li", {
|
|
32
|
+
"data-slot": "progress-step",
|
|
33
|
+
className: a({ variant: l }),
|
|
34
|
+
"data-state": f,
|
|
35
|
+
"aria-current": f === "active" ? "step" : void 0,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ t("span", {
|
|
38
|
+
"data-slot": "progress-step-icon",
|
|
39
|
+
className: e("grid size-[28px] place-items-center [transition:color_var(--duration-spring-smooth)_var(--ease-spring-smooth),transform_var(--duration-spring-bouncy)_var(--ease-spring-bouncy)] motion-reduce:transition-none", f === "todo" ? "text-tertiary-foreground" : "text-(--ck-stepper-accent)", f === "active" && "[transform:scale(1.1)]"),
|
|
40
|
+
"aria-hidden": "true",
|
|
41
|
+
children: r.icon
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ t("span", {
|
|
44
|
+
"data-slot": "progress-step-track",
|
|
45
|
+
className: o({ variant: l }),
|
|
46
|
+
"aria-hidden": "true",
|
|
47
|
+
children: /* @__PURE__ */ t("span", {
|
|
48
|
+
"data-slot": "progress-step-fill",
|
|
49
|
+
className: e("absolute inset-0 origin-[left_center] rounded-[inherit] [transition:transform_var(--duration-spring-smooth)_var(--ease-spring-smooth),background-color_var(--duration-spring-smooth)_var(--ease-spring-smooth)] motion-reduce:transition-none", s(f, u))
|
|
50
|
+
})
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ t("span", {
|
|
53
|
+
className: d ? e("max-w-full truncate text-caption2 font-semibold", f === "active" ? "text-foreground" : "text-muted-foreground") : "sr-only",
|
|
54
|
+
children: r.label
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
}, r.id);
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
export { c as ProgressStepper, i as progressStepperVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/components/progress.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/components/progress.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAsB,KAAK,gBAAgB,EAAsB,MAAM,uBAAuB,CAAC;AACtG,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAOlE,eAAO,MAAM,gBAAgB;;8EAS3B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;8EASpC,CAAC;AAEH,MAAM,WAAW,aAAc,SAAQ,gBAAgB,EAAE,YAAY,CAAC,OAAO,gBAAgB,CAAC,EAAE,YAAY,CAAC,OAAO,yBAAyB,CAAC;IAC5I,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,mDAAmD;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CA+B5F"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { NumberMorph as t } from "./number-morph.js";
|
|
4
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { Label as a, ProgressBar as o, composeRenderProps as s } from "react-aria-components";
|
|
6
|
+
import { cva as c } from "class-variance-authority";
|
|
7
|
+
//#region src/components/progress.tsx
|
|
8
|
+
var l = c("relative w-full overflow-hidden rounded-full bg-secondary-strong", {
|
|
9
|
+
variants: { size: {
|
|
10
|
+
sm: "h-1",
|
|
11
|
+
default: "h-1.5",
|
|
12
|
+
lg: "h-2.5"
|
|
13
|
+
} },
|
|
14
|
+
defaultVariants: { size: "default" }
|
|
15
|
+
}), u = c("absolute inset-y-0 left-0 rounded-full", {
|
|
16
|
+
variants: { tone: {
|
|
17
|
+
default: "bg-primary",
|
|
18
|
+
success: "bg-success",
|
|
19
|
+
destructive: "bg-destructive"
|
|
20
|
+
} },
|
|
21
|
+
defaultVariants: { tone: "default" }
|
|
22
|
+
});
|
|
23
|
+
function d({ className: c, size: d, tone: f, label: p, showValue: m, ...h }) {
|
|
24
|
+
let g = h.valueLabel == null && h.formatOptions == null;
|
|
25
|
+
return /* @__PURE__ */ r(o, {
|
|
26
|
+
"data-slot": "progress",
|
|
27
|
+
className: s(c, (t) => e("grid w-full grid-cols-[1fr_auto] items-center gap-x-3 gap-y-1.5", t)),
|
|
28
|
+
...h,
|
|
29
|
+
children: ({ percentage: o, valueText: s, isIndeterminate: c }) => /* @__PURE__ */ i(n, { children: [
|
|
30
|
+
p ? /* @__PURE__ */ r(a, {
|
|
31
|
+
className: "text-subhead font-medium text-foreground",
|
|
32
|
+
children: p
|
|
33
|
+
}) : null,
|
|
34
|
+
m && !c ? /* @__PURE__ */ r("span", {
|
|
35
|
+
className: "col-start-2 text-subhead text-muted-foreground tabular-nums",
|
|
36
|
+
children: g ? /* @__PURE__ */ r(t, {
|
|
37
|
+
value: (o ?? 0) / 100,
|
|
38
|
+
format: { style: "percent" }
|
|
39
|
+
}) : s
|
|
40
|
+
}) : null,
|
|
41
|
+
/* @__PURE__ */ r("div", {
|
|
42
|
+
"data-slot": "progress-track",
|
|
43
|
+
className: e(l({ size: d }), "col-span-2"),
|
|
44
|
+
children: /* @__PURE__ */ r("div", {
|
|
45
|
+
"data-slot": "progress-indicator",
|
|
46
|
+
className: e(u({ tone: f }), c ? "w-2/5 animate-bl-progress motion-reduce:animate-none" : "w-(--pct) transition-[width] duration-spring-smooth ease-spring-smooth motion-reduce:transition-none"),
|
|
47
|
+
style: c ? void 0 : { "--pct": `${o ?? 0}%` }
|
|
48
|
+
})
|
|
49
|
+
})
|
|
50
|
+
] })
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { d as Progress, u as progressIndicatorVariants, l as progressVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qr-svg.d.ts","sourceRoot":"","sources":["../../src/components/qr-svg.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"qr-svg.d.ts","sourceRoot":"","sources":["../../src/components/qr-svg.tsx"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,WAAW,UAAU;IACzB,6FAA6F;IAC7F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sGAAsG;IACtG,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oGAAoG;IACpG,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4GAA4G;IAC5G,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAwBD;;;GAGG;AACH,wBAAgB,KAAK,CAAC,EACpB,KAAK,EACL,IAAI,EACJ,IAAU,EACV,KAAW,EACX,MAAU,EACV,KAAsB,EACtB,UAAU,EACV,OAAc,EACd,KAAK,EACL,SAAS,EACT,KAAK,GACN,EAAE,UAAU,2CA0DZ"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { encodeQR as t } from "../lib/qr.js";
|
|
4
|
+
import { useMemo as n } from "react";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/qr-svg.tsx
|
|
7
|
+
var a = (e) => String(Math.round(e * 1e3) / 1e3);
|
|
8
|
+
function o(e, t, n, r, i) {
|
|
9
|
+
if (i <= 0) return `M${a(e)} ${a(t)}H${a(e + n)}V${a(t + r)}H${a(e)}Z`;
|
|
10
|
+
let o = i * .4477, s = e + n, c = t + r;
|
|
11
|
+
return `M${a(e + i)} ${a(t)}H${a(s - i)}C${a(s - o)} ${a(t)} ${a(s)} ${a(t + o)} ${a(s)} ${a(t + i)}V${a(c - i)}C${a(s)} ${a(c - o)} ${a(s - o)} ${a(c)} ${a(s - i)} ${a(c)}H${a(e + i)}C${a(e + o)} ${a(c)} ${a(e)} ${a(c - o)} ${a(e)} ${a(c - i)}V${a(t + i)}C${a(e)} ${a(t + o)} ${a(e + o)} ${a(t)} ${a(e + i)} ${a(t)}Z`;
|
|
12
|
+
}
|
|
13
|
+
var s = .03, c = .2;
|
|
14
|
+
function l({ value: a, seed: l, size: u = 168, level: d = "M", margin: f = 0, color: p = "currentColor", background: m, rounded: h = !0, title: g, className: _, style: v }) {
|
|
15
|
+
let y = a ?? l ?? "", { n: b, data: x, finders: S } = n(() => {
|
|
16
|
+
let e = t(y, { level: d }), n = e.size, r = Math.max(0, f), i = (e, t) => e < 7 && t < 7 || e >= n - 7 && t < 7 || e < 7 && t >= n - 7, a = "";
|
|
17
|
+
for (let t = 0; t < n; t++) if (h) for (let l = 0; l < n; l++) e.modules[t][l] && !i(l, t) && (a += o(l + r + s, t + r + s, 1 - 2 * s, 1 - 2 * s, c));
|
|
18
|
+
else for (let s = 0; s < n;) if (e.modules[t][s] && !i(s, t)) {
|
|
19
|
+
let c = s + 1;
|
|
20
|
+
for (; c < n && e.modules[t][c] && !i(c, t);) c++;
|
|
21
|
+
a += o(s + r, t + r, c - s, 1, 0), s = c;
|
|
22
|
+
} else s++;
|
|
23
|
+
let l = "";
|
|
24
|
+
for (let [e, t] of [
|
|
25
|
+
[0, 0],
|
|
26
|
+
[n - 7, 0],
|
|
27
|
+
[0, n - 7]
|
|
28
|
+
]) {
|
|
29
|
+
let n = e + r, i = t + r;
|
|
30
|
+
l += o(n, i, 7, 7, h ? 1.9 : 0) + o(n + 1, i + 1, 5, 5, h ? 1.1 : 0) + o(n + 2, i + 2, 3, 3, h ? .8 : 0);
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
n: n + 2 * r,
|
|
34
|
+
data: a,
|
|
35
|
+
finders: l
|
|
36
|
+
};
|
|
37
|
+
}, [
|
|
38
|
+
y,
|
|
39
|
+
d,
|
|
40
|
+
f,
|
|
41
|
+
h
|
|
42
|
+
]);
|
|
43
|
+
return /* @__PURE__ */ i("svg", {
|
|
44
|
+
"data-slot": "qr-svg",
|
|
45
|
+
className: e("block", _),
|
|
46
|
+
width: u,
|
|
47
|
+
height: u,
|
|
48
|
+
viewBox: `0 0 ${b} ${b}`,
|
|
49
|
+
shapeRendering: h ? void 0 : "crispEdges",
|
|
50
|
+
style: v,
|
|
51
|
+
...g ? { role: "img" } : { "aria-hidden": !0 },
|
|
52
|
+
children: [
|
|
53
|
+
g ? /* @__PURE__ */ r("title", { children: g }) : null,
|
|
54
|
+
m ? /* @__PURE__ */ r("rect", {
|
|
55
|
+
width: b,
|
|
56
|
+
height: b,
|
|
57
|
+
fill: m
|
|
58
|
+
}) : null,
|
|
59
|
+
/* @__PURE__ */ r("path", {
|
|
60
|
+
"data-part": "modules",
|
|
61
|
+
d: x,
|
|
62
|
+
fill: p
|
|
63
|
+
}),
|
|
64
|
+
/* @__PURE__ */ r("path", {
|
|
65
|
+
"data-part": "finders",
|
|
66
|
+
d: S,
|
|
67
|
+
fill: p,
|
|
68
|
+
fillRule: "evenodd"
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
export { l as QRSvg };
|
|
@@ -5,7 +5,7 @@ export declare const radioGroupVariants: (props?: ({
|
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
export interface RadioGroupProps extends AriaRadioGroupProps {
|
|
7
7
|
}
|
|
8
|
-
export declare function RadioGroup({ className, orientation,
|
|
8
|
+
export declare function RadioGroup({ className, orientation, ...props }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export declare const radioVariants: (props?: import('class-variance-authority/types').ClassProp | undefined) => string;
|
|
10
10
|
export interface RadioProps extends AriaRadioProps, VariantProps<typeof radioVariants> {
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":"AACA,OAAO,EACe,KAAK,UAAU,IAAI,cAAc,EACvB,KAAK,eAAe,IAAI,mBAAmB,EAE1E,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,eAAO,MAAM,kBAAkB;;8EAQ7B,CAAC;AAEH,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;CAAG;AAE/D,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,WAAwB,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAS5F;AAED,eAAO,MAAM,aAAa,oFAQzB,CAAC;AAEF,MAAM,WAAW,UAAW,SAAQ,cAAc,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAEzF,wBAAgB,KAAK,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAgBlE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { Radio as i, RadioGroup as a, composeRenderProps as o } from "react-aria-components";
|
|
5
|
+
import { cva as s } from "class-variance-authority";
|
|
6
|
+
//#region src/components/radio-group.tsx
|
|
7
|
+
var c = s("group flex", {
|
|
8
|
+
variants: { orientation: {
|
|
9
|
+
vertical: "flex-col gap-3",
|
|
10
|
+
horizontal: "flex-row flex-wrap gap-5"
|
|
11
|
+
} },
|
|
12
|
+
defaultVariants: { orientation: "vertical" }
|
|
13
|
+
});
|
|
14
|
+
function l({ className: t, orientation: r = "vertical", ...i }) {
|
|
15
|
+
return /* @__PURE__ */ n(a, {
|
|
16
|
+
"data-slot": "radio-group",
|
|
17
|
+
orientation: r,
|
|
18
|
+
className: o(t, (t) => e(c({ orientation: r }), t)),
|
|
19
|
+
...i
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
var u = s([
|
|
23
|
+
"box-border size-[22px] shrink-0 rounded-full border-[1.5px] border-tertiary-foreground bg-transparent",
|
|
24
|
+
"transition-[border-width,border-color,scale] duration-spring-snappy ease-spring-snappy motion-reduce:transition-none",
|
|
25
|
+
"group-data-selected:border-[7px] group-data-selected:border-primary group-data-selected:bg-white",
|
|
26
|
+
"group-data-pressed:scale-90 group-data-focus-visible:ring-[3px] group-data-focus-visible:ring-ring/45",
|
|
27
|
+
"group-data-invalid:border-destructive"
|
|
28
|
+
]);
|
|
29
|
+
function d({ className: a, children: s, ...c }) {
|
|
30
|
+
return /* @__PURE__ */ n(i, {
|
|
31
|
+
"data-slot": "radio",
|
|
32
|
+
className: o(a, (t) => e("group relative inline-flex cursor-pointer items-center gap-3 text-body text-foreground outline-none data-disabled:cursor-default data-disabled:opacity-40", t)),
|
|
33
|
+
...c,
|
|
34
|
+
children: o(s, (e) => /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("span", {
|
|
35
|
+
"data-slot": "radio-indicator",
|
|
36
|
+
className: u()
|
|
37
|
+
}), e] }))
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { d as Radio, l as RadioGroup, c as radioGroupVariants, u as radioVariants };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ReplayPreview, formatReplayTime, getReplayMarkers, getReplayMeta, getReplayPointerTrack, replayPointerAt, } from '@brett_lamy/docstream/replay';
|
|
2
|
+
export type { ReplayPreviewHandle, ReplayPreviewProps, ReplayEvent, ReplayMarker, ReplayMarkerKind, ReplayMeta, ReplayPointerTrack, } from '@brett_lamy/docstream/replay';
|
|
3
|
+
export { replayDemoEvents } from '@brett_lamy/docstream/replay/demo';
|
|
4
|
+
//# sourceMappingURL=replay-preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replay-preview.d.ts","sourceRoot":"","sources":["../../src/components/replay-preview.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,qBAAqB,EAAE,eAAe,GACzG,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,mBAAmB,EAAE,kBAAkB,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,kBAAkB,GACrH,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ReplayPreview as e, formatReplayTime as t, getReplayMarkers as n, getReplayMeta as r, getReplayPointerTrack as i, replayPointerAt as a } from "@brett_lamy/docstream/replay";
|
|
2
|
+
import { replayDemoEvents as o } from "@brett_lamy/docstream/replay/demo";
|
|
3
|
+
export { e as ReplayPreview, t as formatReplayTime, n as getReplayMarkers, r as getReplayMeta, i as getReplayPointerTrack, o as replayDemoEvents, a as replayPointerAt };
|