@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
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { fades as t, springs as n, useMotion as r } from "../lib/motion.js";
|
|
4
|
+
import { Icon as i } from "../lib/icon.js";
|
|
5
|
+
import { MeasureH as a } from "./measure-h.js";
|
|
6
|
+
import { useEffect as o, useId as s, useRef as c, useState as l } from "react";
|
|
7
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
|
+
import { Button as f } from "react-aria-components";
|
|
9
|
+
import { cva as p } from "class-variance-authority";
|
|
10
|
+
//#region src/components/credenza.tsx
|
|
11
|
+
var m = p("z-401 box-border overflow-hidden bg-card text-foreground shadow-[0_24px_80px_--alpha(black/34%),0_0_0_1px_var(--border)] outline-none", {
|
|
12
|
+
variants: { compact: {
|
|
13
|
+
true: "absolute inset-x-2.5 bottom-2.5 touch-none rounded-[28px]",
|
|
14
|
+
false: "absolute top-1/2 left-1/2 w-[400px] max-w-[calc(100%-44px)] rounded-[24px]"
|
|
15
|
+
} },
|
|
16
|
+
defaultVariants: { compact: !1 }
|
|
17
|
+
}), h = "a[href],button:not([disabled]),input:not([disabled]):not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"]),[contenteditable=\"true\"]", g = [];
|
|
18
|
+
function _(e) {
|
|
19
|
+
return [...e.querySelectorAll(h)].filter((e) => e.getClientRects().length > 0 && !e.closest("[inert],[aria-hidden=\"true\"]"));
|
|
20
|
+
}
|
|
21
|
+
function v({ open: p, onClose: h, onBack: v, canBack: y, view: b, title: x, compact: S, children: C, className: w, style: T }) {
|
|
22
|
+
let E = r(), [D, O] = l(null), k = E.useReducedMotion(), A = c([String(b)]), j = c({
|
|
23
|
+
view: String(b),
|
|
24
|
+
dir: 0
|
|
25
|
+
});
|
|
26
|
+
if (j.current.view !== String(b)) {
|
|
27
|
+
let e = String(b), t = A.current.indexOf(e);
|
|
28
|
+
t >= 0 ? (A.current = A.current.slice(0, t + 1), j.current = {
|
|
29
|
+
view: e,
|
|
30
|
+
dir: -1
|
|
31
|
+
}) : (A.current = [...A.current, e], j.current = {
|
|
32
|
+
view: e,
|
|
33
|
+
dir: 1
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
let M = k ? 0 : j.current.dir, N = c(h);
|
|
37
|
+
N.current = h;
|
|
38
|
+
let P = c(null), F = s(), I = c(!p);
|
|
39
|
+
o(() => {
|
|
40
|
+
if (!p) {
|
|
41
|
+
I.current = !0;
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
let e = {};
|
|
45
|
+
g.push(e);
|
|
46
|
+
let t = () => g[g.length - 1] === e, n = document.activeElement, r = () => P.current?.parentElement ?? null, i = (e) => !(e instanceof Node) || e === document.body || e === document.documentElement || e === document, a = (e) => e instanceof Node && !!P.current?.contains(e), o = () => {
|
|
47
|
+
let e = P.current;
|
|
48
|
+
e && (e.querySelector("[data-autofocus]") ?? e).focus({ preventScroll: !0 });
|
|
49
|
+
}, s = new MutationObserver(() => {
|
|
50
|
+
t() && i(document.activeElement) && P.current?.isConnected && o();
|
|
51
|
+
}), c = !1, l = requestAnimationFrame(() => {
|
|
52
|
+
c = I.current || !!(n && r()?.contains(n)), c && o(), c && P.current && s.observe(P.current, {
|
|
53
|
+
childList: !0,
|
|
54
|
+
subtree: !0
|
|
55
|
+
});
|
|
56
|
+
}), u = (e) => {
|
|
57
|
+
t() && !a(e.target) && e.target instanceof Node && r()?.contains(e.target) && o();
|
|
58
|
+
}, d = (e) => {
|
|
59
|
+
!t() || e.defaultPrevented || a(e.target) || !(i(e.target) || e.target instanceof Node && r()?.contains(e.target)) || (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), N.current()) : e.key === "Tab" && (e.preventDefault(), o()));
|
|
60
|
+
};
|
|
61
|
+
return document.addEventListener("focusin", u), window.addEventListener("keydown", d), () => {
|
|
62
|
+
cancelAnimationFrame(l), s.disconnect(), g.splice(g.indexOf(e), 1), document.removeEventListener("focusin", u), window.removeEventListener("keydown", d);
|
|
63
|
+
let t = document.activeElement;
|
|
64
|
+
n?.isConnected && !a(n) && (i(t) || a(t)) && n.focus({ preventScroll: !0 });
|
|
65
|
+
};
|
|
66
|
+
}, [p]);
|
|
67
|
+
let L = {
|
|
68
|
+
ref: P,
|
|
69
|
+
role: "dialog",
|
|
70
|
+
"aria-modal": !0,
|
|
71
|
+
"aria-labelledby": F,
|
|
72
|
+
tabIndex: -1,
|
|
73
|
+
onKeyDown: (e) => {
|
|
74
|
+
if (e.defaultPrevented) return;
|
|
75
|
+
if (e.key === "Escape") {
|
|
76
|
+
e.preventDefault(), e.stopPropagation(), N.current();
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
if (e.key !== "Tab") return;
|
|
80
|
+
let t = _(e.currentTarget);
|
|
81
|
+
if (!t.length) {
|
|
82
|
+
e.preventDefault();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
let n = t[0], r = t[t.length - 1], i = document.activeElement;
|
|
86
|
+
e.shiftKey && (i === n || i === e.currentTarget) ? (e.preventDefault(), r.focus()) : !e.shiftKey && i === r && (e.preventDefault(), n.focus());
|
|
87
|
+
}
|
|
88
|
+
}, R = (e, t, n) => /* @__PURE__ */ u(f, {
|
|
89
|
+
onPress: t,
|
|
90
|
+
"aria-label": n,
|
|
91
|
+
className: "bl-btn grid size-[30px] shrink-0 cursor-pointer place-items-center rounded-full border-0 bg-secondary p-0 text-muted-foreground",
|
|
92
|
+
children: /* @__PURE__ */ u(i, {
|
|
93
|
+
name: e,
|
|
94
|
+
size: 15,
|
|
95
|
+
sw: 2.6
|
|
96
|
+
})
|
|
97
|
+
}), z = E.motion, B = E.AnimatePresence, V = k ? { duration: 0 } : n.tray, H = /* @__PURE__ */ d("div", {
|
|
98
|
+
className: "relative z-2 flex items-center gap-2.5 px-[14px] pt-[14px] pb-1.5",
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ u(B, {
|
|
101
|
+
initial: !1,
|
|
102
|
+
children: y ? /* @__PURE__ */ u(z.div, {
|
|
103
|
+
initial: {
|
|
104
|
+
opacity: 0,
|
|
105
|
+
scale: .4,
|
|
106
|
+
width: 0,
|
|
107
|
+
marginRight: -10
|
|
108
|
+
},
|
|
109
|
+
animate: {
|
|
110
|
+
opacity: 1,
|
|
111
|
+
scale: 1,
|
|
112
|
+
width: 30,
|
|
113
|
+
marginRight: 0
|
|
114
|
+
},
|
|
115
|
+
exit: {
|
|
116
|
+
opacity: 0,
|
|
117
|
+
scale: .4,
|
|
118
|
+
width: 0,
|
|
119
|
+
marginRight: -10,
|
|
120
|
+
transition: {
|
|
121
|
+
...n.snappy,
|
|
122
|
+
opacity: t.out
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
transition: {
|
|
126
|
+
default: n.snappy,
|
|
127
|
+
opacity: t.in
|
|
128
|
+
},
|
|
129
|
+
className: "grid shrink-0 place-items-center overflow-hidden",
|
|
130
|
+
children: R("chevL", v, "Back")
|
|
131
|
+
}, "bk") : null
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ u("div", {
|
|
134
|
+
id: F,
|
|
135
|
+
className: "relative h-[26px] min-w-0 flex-1",
|
|
136
|
+
children: /* @__PURE__ */ u(B, {
|
|
137
|
+
initial: !1,
|
|
138
|
+
custom: M,
|
|
139
|
+
children: /* @__PURE__ */ u(z.div, {
|
|
140
|
+
custom: M,
|
|
141
|
+
variants: {
|
|
142
|
+
enter: (e) => ({
|
|
143
|
+
opacity: 0,
|
|
144
|
+
x: e * 18,
|
|
145
|
+
filter: "blur(3px)"
|
|
146
|
+
}),
|
|
147
|
+
center: {
|
|
148
|
+
opacity: 1,
|
|
149
|
+
x: 0,
|
|
150
|
+
filter: "blur(0px)"
|
|
151
|
+
},
|
|
152
|
+
exit: (e) => ({
|
|
153
|
+
opacity: 0,
|
|
154
|
+
x: e * -18,
|
|
155
|
+
filter: "blur(3px)",
|
|
156
|
+
transition: {
|
|
157
|
+
...t.out,
|
|
158
|
+
x: n.snappy
|
|
159
|
+
}
|
|
160
|
+
})
|
|
161
|
+
},
|
|
162
|
+
initial: "enter",
|
|
163
|
+
animate: "center",
|
|
164
|
+
exit: "exit",
|
|
165
|
+
transition: {
|
|
166
|
+
default: t.in,
|
|
167
|
+
x: n.snappy
|
|
168
|
+
},
|
|
169
|
+
className: "absolute top-0 left-0 text-[18px] leading-[26px] font-bold tracking-[-.2px] whitespace-nowrap",
|
|
170
|
+
children: x
|
|
171
|
+
}, String(x))
|
|
172
|
+
})
|
|
173
|
+
}),
|
|
174
|
+
R("x", h, "Close")
|
|
175
|
+
]
|
|
176
|
+
}), U = /* @__PURE__ */ u(z.div, {
|
|
177
|
+
initial: !1,
|
|
178
|
+
animate: D == null ? {} : { height: D },
|
|
179
|
+
transition: V,
|
|
180
|
+
className: "relative overflow-hidden",
|
|
181
|
+
children: /* @__PURE__ */ u(B, {
|
|
182
|
+
initial: !1,
|
|
183
|
+
mode: "popLayout",
|
|
184
|
+
custom: M,
|
|
185
|
+
children: /* @__PURE__ */ u(z.div, {
|
|
186
|
+
custom: M,
|
|
187
|
+
variants: {
|
|
188
|
+
enter: (e) => ({
|
|
189
|
+
opacity: 0,
|
|
190
|
+
x: e * 40,
|
|
191
|
+
scale: e ? 1 : .97,
|
|
192
|
+
filter: "blur(6px)"
|
|
193
|
+
}),
|
|
194
|
+
center: {
|
|
195
|
+
opacity: 1,
|
|
196
|
+
x: 0,
|
|
197
|
+
scale: 1,
|
|
198
|
+
filter: "blur(0px)"
|
|
199
|
+
},
|
|
200
|
+
exit: (e) => ({
|
|
201
|
+
opacity: 0,
|
|
202
|
+
x: e * -40,
|
|
203
|
+
scale: e ? 1 : .97,
|
|
204
|
+
filter: "blur(6px)",
|
|
205
|
+
transition: {
|
|
206
|
+
...t.out,
|
|
207
|
+
x: n.smooth
|
|
208
|
+
}
|
|
209
|
+
})
|
|
210
|
+
},
|
|
211
|
+
initial: "enter",
|
|
212
|
+
animate: "center",
|
|
213
|
+
exit: "exit",
|
|
214
|
+
transition: {
|
|
215
|
+
default: t.in,
|
|
216
|
+
x: n.smooth,
|
|
217
|
+
scale: n.smooth
|
|
218
|
+
},
|
|
219
|
+
className: "w-full",
|
|
220
|
+
children: /* @__PURE__ */ u(a, {
|
|
221
|
+
onH: O,
|
|
222
|
+
children: C
|
|
223
|
+
})
|
|
224
|
+
}, String(b))
|
|
225
|
+
})
|
|
226
|
+
});
|
|
227
|
+
return /* @__PURE__ */ d(B, { children: [p ? /* @__PURE__ */ u(z.div, {
|
|
228
|
+
onClick: h,
|
|
229
|
+
initial: { opacity: 0 },
|
|
230
|
+
animate: { opacity: 1 },
|
|
231
|
+
exit: {
|
|
232
|
+
opacity: 0,
|
|
233
|
+
transition: { duration: .24 }
|
|
234
|
+
},
|
|
235
|
+
transition: t.in,
|
|
236
|
+
className: "absolute inset-0 z-400 bg-overlay"
|
|
237
|
+
}, "scrim") : null, p ? S ? /* @__PURE__ */ d(z.div, {
|
|
238
|
+
"data-slot": "credenza",
|
|
239
|
+
...L,
|
|
240
|
+
className: e(m({ compact: !0 }), w),
|
|
241
|
+
initial: { y: "112%" },
|
|
242
|
+
animate: { y: "0%" },
|
|
243
|
+
exit: { y: "118%" },
|
|
244
|
+
transition: V,
|
|
245
|
+
drag: "y",
|
|
246
|
+
dragConstraints: {
|
|
247
|
+
top: 0,
|
|
248
|
+
bottom: 0
|
|
249
|
+
},
|
|
250
|
+
dragElastic: {
|
|
251
|
+
top: .02,
|
|
252
|
+
bottom: .55
|
|
253
|
+
},
|
|
254
|
+
onDragEnd: (e, t) => {
|
|
255
|
+
(t.offset.y > 120 || t.velocity.y > 500) && N.current();
|
|
256
|
+
},
|
|
257
|
+
style: T,
|
|
258
|
+
children: [
|
|
259
|
+
/* @__PURE__ */ u("div", {
|
|
260
|
+
"aria-hidden": "true",
|
|
261
|
+
className: "absolute top-[7px] left-1/2 z-3 h-[5px] w-[38px] -translate-x-1/2 rounded-[3px] bg-secondary-strong"
|
|
262
|
+
}),
|
|
263
|
+
H,
|
|
264
|
+
U
|
|
265
|
+
]
|
|
266
|
+
}, "tray") : /* @__PURE__ */ d(z.div, {
|
|
267
|
+
"data-slot": "credenza",
|
|
268
|
+
...L,
|
|
269
|
+
className: e(m({ compact: !1 }), w),
|
|
270
|
+
initial: {
|
|
271
|
+
x: "-50%",
|
|
272
|
+
y: "-45%",
|
|
273
|
+
opacity: 0,
|
|
274
|
+
scale: .95
|
|
275
|
+
},
|
|
276
|
+
animate: {
|
|
277
|
+
x: "-50%",
|
|
278
|
+
y: "-50%",
|
|
279
|
+
opacity: 1,
|
|
280
|
+
scale: 1
|
|
281
|
+
},
|
|
282
|
+
exit: {
|
|
283
|
+
x: "-50%",
|
|
284
|
+
y: "-48%",
|
|
285
|
+
opacity: 0,
|
|
286
|
+
scale: .97
|
|
287
|
+
},
|
|
288
|
+
transition: V,
|
|
289
|
+
style: T,
|
|
290
|
+
children: [H, U]
|
|
291
|
+
}, "dlg") : null] });
|
|
292
|
+
}
|
|
293
|
+
//#endregion
|
|
294
|
+
export { v as Credenza, m as credenzaVariants };
|
|
@@ -29,12 +29,12 @@ export interface DialogFooterProps extends ComponentProps<'div'> {
|
|
|
29
29
|
}
|
|
30
30
|
export declare function DialogFooter({ className, orientation, ...props }: DialogFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
export declare const dialogActionVariants: (props?: ({
|
|
32
|
-
variant?: "destructive" | "
|
|
32
|
+
variant?: "destructive" | "default" | "cancel" | null | undefined;
|
|
33
33
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
34
34
|
export interface DialogActionProps extends AriaButtonProps, VariantProps<typeof dialogActionVariants> {
|
|
35
35
|
}
|
|
36
36
|
/** iOS alert button. Closes the dialog by default (react-aria's `close` slot); pass `slot={null}` to keep it open. */
|
|
37
|
-
export declare function DialogAction({ className, variant,
|
|
37
|
+
export declare function DialogAction({ className, variant, slot, ...props }: DialogActionProps): import("react/jsx-runtime").JSX.Element;
|
|
38
38
|
/** Round × button pinned to the top-right corner (default / lg dialogs and sheets). */
|
|
39
39
|
export declare function DialogClose({ className, ...props }: AriaButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/components/dialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAA6B,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,EACiB,KAAK,WAAW,IAAI,eAAe,EACnC,KAAK,WAAW,IAAI,eAAe,EACzD,aAAa,EACJ,KAAK,YAAY,EACL,KAAK,iBAAiB,EACrC,KAAK,SAAS,EAErB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAiBlE,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,eAAO,MAAM,cAAc;;8EAY1B,CAAC;AAKF,gDAAgD;AAChD,eAAO,MAAM,kBAAkB,QAG9B,CAAC;AAEF,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,WAAW,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC;IAChI,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,qHAAqH;AACrH,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EAAE,gBAAgB,EAAE,IAAgB,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,KAAK,EAChH,EAAE,kBAAkB,2CA0BpB;AAED,2EAA2E;AAC3E,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAE9D;AAED,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAS1E;AAED,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,2CAUhE;AAED,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CAUnE;AAED,wEAAwE;AACxE,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,2CAExE;AAED,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC9D,gEAAgE;IAChE,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACzC;AAED,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,WAA0B,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAiBlG;AAED,eAAO,MAAM,oBAAoB;;8EAahC,CAAC;AAEF,MAAM,WAAW,iBAAkB,SAAQ,eAAe,EAAE,YAAY,CAAC,OAAO,oBAAoB,CAAC;CAAG;AAExG,sHAAsH;AACtH,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAc,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAS/F;AAED,uFAAuF;AACvF,wBAAgB,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAenE"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { Icon as t } from "../lib/icon.js";
|
|
4
|
+
import { useThemeScopeProps as n } from "../lib/theme.js";
|
|
5
|
+
import { focusRing as r, overlayZ as i } from "../lib/primitives.js";
|
|
6
|
+
import { createContext as a, useContext as o } from "react";
|
|
7
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
8
|
+
import { Button as c, Dialog as l, DialogTrigger as u, Heading as d, Modal as f, ModalOverlay as p, Text as m, composeRenderProps as h } from "react-aria-components";
|
|
9
|
+
import { cva as g } from "class-variance-authority";
|
|
10
|
+
//#region src/components/dialog.tsx
|
|
11
|
+
var _ = g("relative box-border flex max-h-full flex-col overflow-hidden bg-card text-card-foreground shadow-[0_24px_80px_--alpha(black/30%),0_0_0_.5px_var(--border)] outline-none", {
|
|
12
|
+
variants: { size: {
|
|
13
|
+
alert: "w-[270px] rounded-card data-entering:animate-bl-alert-in data-exiting:animate-bl-alert-out motion-reduce:data-entering:animate-bl-fade-in motion-reduce:data-exiting:animate-bl-fade-out",
|
|
14
|
+
default: "w-full max-w-[400px] rounded-[20px] data-entering:animate-bl-pop-in data-exiting:animate-bl-pop-out motion-reduce:data-entering:animate-bl-fade-in motion-reduce:data-exiting:animate-bl-fade-out",
|
|
15
|
+
lg: "w-full max-w-[560px] rounded-[20px] data-entering:animate-bl-pop-in data-exiting:animate-bl-pop-out motion-reduce:data-entering:animate-bl-fade-in motion-reduce:data-exiting:animate-bl-fade-out"
|
|
16
|
+
} },
|
|
17
|
+
defaultVariants: { size: "default" }
|
|
18
|
+
}), v = a("default"), y = e("absolute inset-0 grid place-items-center bg-overlay p-6 data-entering:animate-bl-fade-in data-exiting:animate-bl-fade-out", i);
|
|
19
|
+
function b({ className: t, overlayClassName: r, size: i = "default", children: a, role: o, isDismissable: c, "aria-label": u, ...d }) {
|
|
20
|
+
let m = i ?? "default", h = n();
|
|
21
|
+
return /* @__PURE__ */ s(p, {
|
|
22
|
+
"data-slot": "dialog-overlay",
|
|
23
|
+
"data-theme-scope": h["data-theme-scope"],
|
|
24
|
+
isDismissable: c ?? m !== "alert",
|
|
25
|
+
className: e(y, h.className, r),
|
|
26
|
+
style: h.style,
|
|
27
|
+
...d,
|
|
28
|
+
children: /* @__PURE__ */ s(f, {
|
|
29
|
+
"data-slot": "dialog-content",
|
|
30
|
+
"data-size": m,
|
|
31
|
+
className: e(_({ size: m }), t),
|
|
32
|
+
children: /* @__PURE__ */ s(v.Provider, {
|
|
33
|
+
value: m,
|
|
34
|
+
children: /* @__PURE__ */ s(l, {
|
|
35
|
+
"data-slot": "dialog",
|
|
36
|
+
role: o ?? (m === "alert" ? "alertdialog" : "dialog"),
|
|
37
|
+
"aria-label": u,
|
|
38
|
+
className: "flex min-h-0 flex-1 flex-col outline-none",
|
|
39
|
+
children: a
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function x({ className: t, ...n }) {
|
|
46
|
+
return /* @__PURE__ */ s(l, {
|
|
47
|
+
"data-slot": "dialog",
|
|
48
|
+
className: e("outline-none", t),
|
|
49
|
+
...n
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function S({ className: t, ...n }) {
|
|
53
|
+
let r = o(v);
|
|
54
|
+
return /* @__PURE__ */ s("div", {
|
|
55
|
+
"data-slot": "dialog-header",
|
|
56
|
+
className: e("flex flex-col gap-1", r === "alert" ? "px-4 pt-5 pb-4 text-center" : "px-5 pt-5 pb-3", t),
|
|
57
|
+
...n
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function C({ className: t, ...n }) {
|
|
61
|
+
let r = o(v);
|
|
62
|
+
return /* @__PURE__ */ s(d, {
|
|
63
|
+
slot: "title",
|
|
64
|
+
"data-slot": "dialog-title",
|
|
65
|
+
className: e("m-0 font-semibold text-foreground", r === "alert" ? "text-body leading-[22px]" : "pr-8 text-title leading-[25px] tracking-[-.3px]", t),
|
|
66
|
+
...n
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function w({ className: t, ...n }) {
|
|
70
|
+
let r = o(v);
|
|
71
|
+
return /* @__PURE__ */ s(m, {
|
|
72
|
+
elementType: "p",
|
|
73
|
+
"data-slot": "dialog-description",
|
|
74
|
+
className: e("m-0 text-foreground", r === "alert" ? "text-footnote leading-[18px]" : "text-subhead leading-[20px] text-muted-foreground", t),
|
|
75
|
+
...n
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function T({ className: t, ...n }) {
|
|
79
|
+
return /* @__PURE__ */ s("div", {
|
|
80
|
+
"data-slot": "dialog-body",
|
|
81
|
+
className: e("bl-scroll min-h-0 flex-1 overflow-y-auto px-5 py-2 text-subhead", t),
|
|
82
|
+
...n
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function E({ className: t, orientation: n = "horizontal", ...r }) {
|
|
86
|
+
let i = o(v);
|
|
87
|
+
return /* @__PURE__ */ s("div", {
|
|
88
|
+
"data-slot": "dialog-footer",
|
|
89
|
+
"data-orientation": n,
|
|
90
|
+
className: e(i === "alert" ? e("flex shadow-hairline-t", n === "vertical" ? "flex-col [&>*+*]:shadow-hairline-t" : "[&>*]:flex-1 [&>*+*]:shadow-[inset_1px_0_0_var(--border)]") : "flex items-center justify-end gap-2 px-5 pt-3 pb-5", t),
|
|
91
|
+
...r
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
var D = g(e("bl-btn box-border flex h-11 cursor-pointer items-center justify-center border-0 bg-transparent px-3 [font-family:inherit] text-body whitespace-nowrap text-primary transition-[background-color] duration-exit data-pressed:bg-accent data-disabled:cursor-default data-disabled:opacity-40", r, "data-focus-visible:ring-inset"), {
|
|
95
|
+
variants: { variant: {
|
|
96
|
+
default: "font-normal",
|
|
97
|
+
cancel: "font-semibold",
|
|
98
|
+
destructive: "font-normal text-destructive"
|
|
99
|
+
} },
|
|
100
|
+
defaultVariants: { variant: "default" }
|
|
101
|
+
});
|
|
102
|
+
function O({ className: t, variant: n, slot: r = "close", ...i }) {
|
|
103
|
+
return /* @__PURE__ */ s(c, {
|
|
104
|
+
"data-slot": "dialog-action",
|
|
105
|
+
slot: r,
|
|
106
|
+
className: h(t, (t) => e(D({ variant: n }), t)),
|
|
107
|
+
...i
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function k({ className: n, ...i }) {
|
|
111
|
+
return /* @__PURE__ */ s(c, {
|
|
112
|
+
"data-slot": "dialog-close",
|
|
113
|
+
slot: "close",
|
|
114
|
+
"aria-label": "Close",
|
|
115
|
+
className: h(n, (t) => e("bl-btn absolute top-4 right-4 grid size-[30px] cursor-pointer place-items-center rounded-full border-0 bg-secondary p-0 text-muted-foreground data-pressed:bg-secondary-strong", r, t)),
|
|
116
|
+
...i,
|
|
117
|
+
children: /* @__PURE__ */ s(t, {
|
|
118
|
+
name: "x",
|
|
119
|
+
size: 15,
|
|
120
|
+
sw: 2.6
|
|
121
|
+
})
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
//#endregion
|
|
125
|
+
export { x as Dialog, O as DialogAction, T as DialogBody, k as DialogClose, b as DialogContent, w as DialogDescription, E as DialogFooter, S as DialogHeader, C as DialogTitle, u as DialogTrigger, D as dialogActionVariants, y as dialogOverlayClass, _ as dialogVariants };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disclosure.d.ts","sourceRoot":"","sources":["../../src/components/disclosure.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"disclosure.d.ts","sourceRoot":"","sources":["../../src/components/disclosure.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAEyB,KAAK,eAAe,IAAI,mBAAmB,EACjC,KAAK,oBAAoB,IAAI,wBAAwB,EACrD,KAAK,oBAAoB,IAAI,wBAAwB,EAG9F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAYlE,eAAO,MAAM,uBAAuB;;8EAUlC,CAAC;AAEH,MAAM,WAAW,oBAAqB,SAAQ,wBAAwB,EAAE,YAAY,CAAC,OAAO,uBAAuB,CAAC;CAAG;AAEvH,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,2CAQrF;AAED,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CAStE;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAS,EAAE,EAAE,sBAAsB,2CAsB3F;AAED,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,wBAAwB,2CAa1F;AAGD,eAAO,MAAM,SAAS,wBAAkB,CAAC;AACzC,eAAO,MAAM,aAAa,mBAAa,CAAC;AACxC,eAAO,MAAM,gBAAgB,0BAAoB,CAAC;AAClD,eAAO,MAAM,gBAAgB,wBAAkB,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { Icon as t } from "../lib/icon.js";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import { Button as i, Disclosure as a, DisclosureGroup as o, DisclosurePanel as s, Heading as c, composeRenderProps as l } from "react-aria-components";
|
|
6
|
+
import { cva as u } from "class-variance-authority";
|
|
7
|
+
//#region src/components/disclosure.tsx
|
|
8
|
+
var d = u("flex flex-col", {
|
|
9
|
+
variants: { variant: {
|
|
10
|
+
default: "",
|
|
11
|
+
inset: "overflow-hidden rounded-panel bg-card px-4"
|
|
12
|
+
} },
|
|
13
|
+
defaultVariants: { variant: "default" }
|
|
14
|
+
});
|
|
15
|
+
function f({ className: t, variant: r, ...i }) {
|
|
16
|
+
return /* @__PURE__ */ n(o, {
|
|
17
|
+
"data-slot": "disclosure-group",
|
|
18
|
+
className: l(t, (t) => e(d({ variant: r }), t)),
|
|
19
|
+
...i
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function p({ className: t, ...r }) {
|
|
23
|
+
return /* @__PURE__ */ n(a, {
|
|
24
|
+
"data-slot": "disclosure",
|
|
25
|
+
className: l(t, (t) => e("group/disclosure relative text-foreground not-last:shadow-hairline-b", t)),
|
|
26
|
+
...r
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function m({ className: a, children: o, level: s = 3 }) {
|
|
30
|
+
return /* @__PURE__ */ n(c, {
|
|
31
|
+
level: s,
|
|
32
|
+
className: "m-0 flex",
|
|
33
|
+
children: /* @__PURE__ */ r(i, {
|
|
34
|
+
slot: "trigger",
|
|
35
|
+
"data-slot": "disclosure-trigger",
|
|
36
|
+
className: l(a, (t) => e("bl-btn box-border flex min-h-11 flex-1 cursor-pointer items-center justify-between gap-3 border-0 bg-transparent px-0 py-[11px] text-left [font-family:inherit] text-body leading-[22px] font-normal text-foreground outline-none", "rounded-md data-focus-visible:ring-[3px] data-focus-visible:ring-ring/45 data-pressed:opacity-60 data-disabled:cursor-default data-disabled:opacity-40", t)),
|
|
37
|
+
children: [o, /* @__PURE__ */ n(t, {
|
|
38
|
+
name: "chev",
|
|
39
|
+
size: 17,
|
|
40
|
+
sw: 2.4,
|
|
41
|
+
className: "shrink-0 text-tertiary-foreground transition-transform duration-spring-snappy ease-spring-snappy group-data-expanded/disclosure:rotate-90 motion-reduce:transition-none"
|
|
42
|
+
})]
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function h({ className: t, children: r, ...i }) {
|
|
47
|
+
return /* @__PURE__ */ n(s, {
|
|
48
|
+
"data-slot": "disclosure-panel",
|
|
49
|
+
className: l(t, (t) => e("h-(--disclosure-panel-height) overflow-clip text-subhead leading-[20px] text-muted-foreground transition-[height] duration-spring-tray ease-spring-tray motion-reduce:transition-none", t)),
|
|
50
|
+
...i,
|
|
51
|
+
children: /* @__PURE__ */ n("div", {
|
|
52
|
+
className: "pb-3.5 transition-[opacity,translate] duration-spring-tray ease-spring-tray group-not-data-expanded/disclosure:-translate-y-1 group-not-data-expanded/disclosure:opacity-0 group-not-data-expanded/disclosure:duration-exit group-not-data-expanded/disclosure:ease-exit motion-reduce:transition-none",
|
|
53
|
+
children: r
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
var g = f, _ = p, v = m, y = h;
|
|
58
|
+
//#endregion
|
|
59
|
+
export { g as Accordion, y as AccordionContent, _ as AccordionItem, v as AccordionTrigger, p as Disclosure, f as DisclosureGroup, h as DisclosurePanel, m as DisclosureTrigger, d as disclosureGroupVariants };
|
|
@@ -7,7 +7,7 @@ export interface DropdownMenuContentProps<T> extends MenuProps<T> {
|
|
|
7
7
|
placement?: PopoverProps['placement'];
|
|
8
8
|
popoverClassName?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare function DropdownMenuContent<T extends object>({ className, placement, popoverClassName,
|
|
10
|
+
export declare function DropdownMenuContent<T extends object>({ className, placement, popoverClassName, ...props }: DropdownMenuContentProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export declare const dropdownMenuItemVariants: (props?: ({
|
|
12
12
|
variant?: "destructive" | "default" | null | undefined;
|
|
13
13
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../src/components/dropdown-menu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../src/components/dropdown-menu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAEL,MAAM,EACA,KAAK,SAAS,EACV,KAAK,aAAa,EACf,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAEvB,KAAK,cAAc,EACd,KAAK,mBAAmB,EAGzC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAcrE,wBAAgB,YAAY,CAAC,KAAK,EAAE,gBAAgB,2CAEnD;AAED,MAAM,WAAW,wBAAwB,CAAC,CAAC,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IAC/D,SAAS,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IACtC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,EAAE,EACpD,SAAS,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAG,KAAK,EACjD,EAAE,wBAAwB,CAAC,CAAC,CAAC,2CAY7B;AAED,eAAO,MAAM,wBAAwB;;8EAgBpC,CAAC;AAEF,MAAM,WAAW,qBAAqB,CAAC,CAAC,CAAE,SAAQ,aAAa,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,OAAO,wBAAwB,CAAC;IAC/G,8BAA8B;IAC9B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,sCAAsC;IACtC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,EAAE,EACjD,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAC/E,EAAE,qBAAqB,CAAC,CAAC,CAAC,2CA6B1B;AAED,MAAM,WAAW,wBAAwB,CAAC,CAAC,CAAE,SAAQ,gBAAgB,CAAC,CAAC,CAAC;IACtE,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC,2CAOjI;AAED,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,MAAM,CAAC,2CAQvF;AAED,0DAA0D;AAC1D,wBAAgB,qBAAqB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,2CAE5E;AAED,wBAAgB,oBAAoB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,MAAM,CAAC,2CAEnF;AAED,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,KAAK,EAAE,mBAAmB,2CAEzD"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../lib/utils.js";
|
|
3
|
+
import { Icon as t } from "../lib/icon.js";
|
|
4
|
+
import { Popover as n } from "./popover.js";
|
|
5
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import { Collection as o, Header as s, Menu as c, MenuItem as l, MenuSection as u, MenuTrigger as d, PopoverContext as f, Separator as p, SubmenuTrigger as m, composeRenderProps as h, useSlottedContext as g } from "react-aria-components";
|
|
7
|
+
import { cva as _ } from "class-variance-authority";
|
|
8
|
+
//#region src/components/dropdown-menu.tsx
|
|
9
|
+
function v(e) {
|
|
10
|
+
return /* @__PURE__ */ i(d, { ...e });
|
|
11
|
+
}
|
|
12
|
+
function y({ className: t, placement: r, popoverClassName: a, ...o }) {
|
|
13
|
+
let s = g(f)?.trigger === "SubmenuTrigger";
|
|
14
|
+
return /* @__PURE__ */ i(n, {
|
|
15
|
+
"data-slot": "dropdown-menu",
|
|
16
|
+
placement: r,
|
|
17
|
+
offset: s ? -6 : 8,
|
|
18
|
+
className: e("min-w-[230px]", a),
|
|
19
|
+
children: /* @__PURE__ */ i(c, {
|
|
20
|
+
"data-slot": "dropdown-menu-content",
|
|
21
|
+
className: e("bl-scroll box-border max-h-[inherit] overflow-y-auto py-1 outline-none", t),
|
|
22
|
+
...o
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
var b = _([
|
|
27
|
+
"bl-btn relative box-border flex min-h-11 cursor-pointer items-center gap-3 py-[11px] pr-4 pl-4 text-body leading-[22px] outline-none",
|
|
28
|
+
"data-focused:bg-accent data-pressed:bg-secondary-strong data-open:bg-accent data-disabled:cursor-default data-disabled:opacity-40",
|
|
29
|
+
"after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:h-px after:bg-border last:after:hidden [&:has(+[role=separator])]:after:hidden"
|
|
30
|
+
], {
|
|
31
|
+
variants: { variant: {
|
|
32
|
+
default: "text-foreground",
|
|
33
|
+
destructive: "text-destructive"
|
|
34
|
+
} },
|
|
35
|
+
defaultVariants: { variant: "default" }
|
|
36
|
+
});
|
|
37
|
+
function x({ className: n, variant: o, icon: s, description: c, shortcut: u, children: d, textValue: f, ...p }) {
|
|
38
|
+
return /* @__PURE__ */ i(l, {
|
|
39
|
+
"data-slot": "dropdown-menu-item",
|
|
40
|
+
textValue: f ?? (typeof d == "string" ? d : void 0),
|
|
41
|
+
className: h(n, (t) => e(b({ variant: o }), t)),
|
|
42
|
+
...p,
|
|
43
|
+
children: h(d, (e, { selectionMode: n, isSelected: o, hasSubmenu: l }) => /* @__PURE__ */ a(r, { children: [
|
|
44
|
+
n === "none" ? null : /* @__PURE__ */ i("span", {
|
|
45
|
+
className: "-mr-1 grid w-[18px] shrink-0 place-items-center",
|
|
46
|
+
children: o ? /* @__PURE__ */ i(t, {
|
|
47
|
+
name: "check",
|
|
48
|
+
size: 18,
|
|
49
|
+
sw: 2.4
|
|
50
|
+
}) : null
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ a("span", {
|
|
53
|
+
className: "flex min-w-0 flex-1 flex-col",
|
|
54
|
+
children: [/* @__PURE__ */ i("span", {
|
|
55
|
+
className: "truncate",
|
|
56
|
+
children: e
|
|
57
|
+
}), c ? /* @__PURE__ */ i("span", {
|
|
58
|
+
className: "truncate text-footnote leading-[18px] text-muted-foreground",
|
|
59
|
+
children: c
|
|
60
|
+
}) : null]
|
|
61
|
+
}),
|
|
62
|
+
u ? /* @__PURE__ */ i("span", {
|
|
63
|
+
className: "shrink-0",
|
|
64
|
+
children: u
|
|
65
|
+
}) : null,
|
|
66
|
+
l ? /* @__PURE__ */ i(t, {
|
|
67
|
+
name: "chev",
|
|
68
|
+
size: 17,
|
|
69
|
+
sw: 2.2,
|
|
70
|
+
className: "shrink-0 text-muted-foreground"
|
|
71
|
+
}) : s ? /* @__PURE__ */ i("span", {
|
|
72
|
+
className: "grid size-[22px] shrink-0 place-items-center",
|
|
73
|
+
children: s
|
|
74
|
+
}) : null
|
|
75
|
+
] }))
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function S({ className: t, title: n, children: r, items: s, ...c }) {
|
|
79
|
+
return /* @__PURE__ */ a(u, {
|
|
80
|
+
"data-slot": "dropdown-menu-section",
|
|
81
|
+
className: e("group/section", t),
|
|
82
|
+
...c,
|
|
83
|
+
children: [n ? /* @__PURE__ */ i(C, { children: n }) : null, /* @__PURE__ */ i(o, {
|
|
84
|
+
items: s,
|
|
85
|
+
children: r
|
|
86
|
+
})]
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function C({ className: t, ...n }) {
|
|
90
|
+
return /* @__PURE__ */ i(s, {
|
|
91
|
+
"data-slot": "dropdown-menu-label",
|
|
92
|
+
className: e("px-4 pt-2 pb-1.5 text-footnote leading-[18px] text-muted-foreground", t),
|
|
93
|
+
...n
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function w({ className: t, ...n }) {
|
|
97
|
+
return /* @__PURE__ */ i(p, {
|
|
98
|
+
"data-slot": "dropdown-menu-separator",
|
|
99
|
+
className: e("m-0 h-2 border-0 bg-secondary", t),
|
|
100
|
+
...n
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function T({ className: t, ...n }) {
|
|
104
|
+
return /* @__PURE__ */ i("span", {
|
|
105
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
106
|
+
className: e("text-subhead tracking-[.08em] text-muted-foreground", t),
|
|
107
|
+
...n
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function E(e) {
|
|
111
|
+
return /* @__PURE__ */ i(m, { ...e });
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
export { v as DropdownMenu, y as DropdownMenuContent, x as DropdownMenuItem, C as DropdownMenuLabel, S as DropdownMenuSection, w as DropdownMenuSeparator, T as DropdownMenuShortcut, E as DropdownMenuSub, b as dropdownMenuItemVariants };
|