@dfosco/storyboard-core 4.2.0-beta.3 → 4.2.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/commandpalette.config.json +109 -24
- package/dist/storyboard-ui.css +1 -1
- package/dist/storyboard-ui.js +16711 -27239
- package/dist/storyboard-ui.js.map +1 -1
- package/dist/tailwind.css +1 -1
- package/package.json +5 -2
- package/scaffold/agents/prompt-agent.agent.md +181 -0
- package/scaffold/agents/terminal-agent.agent.md +351 -0
- package/scaffold/codex/config.toml +246 -0
- package/scaffold/manifest.json +5 -10
- package/scaffold/skills/canvas/SKILL.md +5 -4
- package/scaffold/skills/ship/SKILL.md +1 -1
- package/scaffold/storyboard.config.json +11 -1
- package/src/ActionMenuButton.jsx +103 -0
- package/src/AutosyncMenuButton.css +67 -0
- package/src/AutosyncMenuButton.jsx +242 -0
- package/src/BranchSelect.jsx +29 -0
- package/src/BranchSelect.module.css +30 -0
- package/src/CanvasAgentsMenu.jsx +89 -0
- package/src/CanvasCreateMenu.jsx +611 -0
- package/src/CanvasSnap.css +27 -0
- package/src/CanvasSnap.jsx +51 -0
- package/src/CanvasUndoRedo.css +36 -0
- package/src/CanvasUndoRedo.jsx +62 -0
- package/src/CanvasZoomControl.css +53 -0
- package/src/CanvasZoomControl.jsx +49 -0
- package/src/CanvasZoomToFit.css +18 -0
- package/src/CanvasZoomToFit.jsx +26 -0
- package/src/CommandMenu.css +8 -0
- package/src/CommandMenu.jsx +287 -0
- package/src/CommandPalette.jsx +35 -0
- package/src/CommandPaletteTrigger.jsx +25 -0
- package/src/CommentsMenuButton.jsx +40 -0
- package/src/CoreUIBar.css +47 -0
- package/src/CoreUIBar.jsx +858 -0
- package/src/CreateMenuButton.jsx +117 -0
- package/src/HideChromeTrigger.jsx +40 -0
- package/src/InspectorPanel.css +109 -0
- package/src/InspectorPanel.jsx +632 -0
- package/src/PwaInstallBanner.css +42 -0
- package/src/PwaInstallBanner.jsx +124 -0
- package/src/SidePanel.jsx +261 -0
- package/src/ThemeMenuButton.jsx +139 -0
- package/src/autosync/server.js +202 -5
- package/src/autosync/server.test.js +111 -0
- package/src/canvas/__tests__/agent-integration.test.js +596 -0
- package/src/canvas/__tests__/helpers/browser.js +95 -0
- package/src/canvas/__tests__/helpers/canvas-api.js +129 -0
- package/src/canvas/__tests__/helpers/perf.js +118 -0
- package/src/canvas/__tests__/helpers/setup.js +176 -0
- package/src/canvas/__tests__/helpers/tmux.js +130 -0
- package/src/canvas/__tests__/helpers/transcript.js +132 -0
- package/src/canvas/__tests__/terminal-integration.test.js +177 -0
- package/src/canvas/hot-pool.js +756 -0
- package/src/canvas/materializer.js +31 -0
- package/src/canvas/materializer.test.js +56 -0
- package/src/canvas/selectedWidgets.js +65 -7
- package/src/canvas/server.js +1802 -22
- package/src/canvas/server.test.js +239 -0
- package/src/canvas/terminal-config.js +330 -0
- package/src/canvas/terminal-registry.js +41 -3
- package/src/canvas/terminal-server.js +1098 -37
- package/src/canvas/writeGuard.js +51 -3
- package/src/canvasConfig.js +67 -1
- package/src/canvasConfig.test.js +79 -1
- package/src/cli/agent.js +85 -0
- package/src/cli/branch.js +232 -0
- package/src/cli/canvasAdd.js +61 -14
- package/src/cli/canvasBatch.js +98 -0
- package/src/cli/canvasBounds.js +1 -1
- package/src/cli/canvasRead.js +1 -1
- package/src/cli/canvasUpdate.js +179 -0
- package/src/cli/compact.js +0 -2
- package/src/cli/create.js +40 -16
- package/src/cli/dev.js +158 -84
- package/src/cli/exit.js +23 -24
- package/src/cli/index.js +55 -2
- package/src/cli/proxy.js +96 -37
- package/src/cli/schemas.js +22 -4
- package/src/cli/server.js +149 -26
- package/src/cli/serverUrl.js +8 -3
- package/src/cli/sessions.js +133 -7
- package/src/cli/setup.js +138 -12
- package/src/cli/terminal-commands.js +20 -9
- package/src/cli/terminal-messaging.js +231 -0
- package/src/cli/terminal-welcome.js +449 -34
- package/src/cli/updateVersion.js +1 -1
- package/src/commandActions.js +1 -0
- package/src/commandPaletteConfig.js +9 -0
- package/src/comments/auth.js +2 -1
- package/src/comments/ui/AuthModal.jsx +114 -0
- package/src/comments/ui/CommentWindow.jsx +329 -0
- package/src/comments/ui/CommentsDrawer.jsx +102 -0
- package/src/comments/ui/Composer.jsx +64 -0
- package/src/comments/ui/authModal.test.js +1 -1
- package/src/comments/ui/commentWindow.js +16 -17
- package/src/comments/ui/commentsDrawer.js +25 -26
- package/src/comments/ui/composer.js +23 -24
- package/src/comments/ui/index.js +2 -3
- package/src/configSchema.js +59 -1
- package/src/configStore.js +161 -0
- package/src/core-ui-colors.css +12 -0
- package/src/devtools.js +17 -19
- package/src/devtools.test.js +18 -9
- package/src/featureFlags.js +12 -5
- package/src/fuzzySearch.test.js +10 -0
- package/src/index.js +15 -3
- package/src/lib/components/ui/alert/alert-action.jsx +11 -0
- package/src/lib/components/ui/alert/alert-description.jsx +11 -0
- package/src/lib/components/ui/alert/alert-title.jsx +11 -0
- package/src/lib/components/ui/alert/alert.jsx +25 -0
- package/src/lib/components/ui/alert/index.js +15 -15
- package/src/lib/components/ui/avatar/avatar-badge.jsx +22 -0
- package/src/lib/components/ui/avatar/avatar-fallback.jsx +18 -0
- package/src/lib/components/ui/avatar/avatar-group-count.jsx +19 -0
- package/src/lib/components/ui/avatar/avatar-group.jsx +19 -0
- package/src/lib/components/ui/avatar/avatar-image.jsx +15 -0
- package/src/lib/components/ui/avatar/avatar.jsx +19 -0
- package/src/lib/components/ui/avatar/index.js +20 -20
- package/src/lib/components/ui/badge/badge.jsx +31 -0
- package/src/lib/components/ui/badge/index.js +2 -2
- package/src/lib/components/ui/button/button.jsx +100 -0
- package/src/lib/components/ui/button/index.js +9 -9
- package/src/lib/components/ui/card/card-action.jsx +11 -0
- package/src/lib/components/ui/card/card-content.jsx +11 -0
- package/src/lib/components/ui/card/card-description.jsx +11 -0
- package/src/lib/components/ui/card/card-footer.jsx +11 -0
- package/src/lib/components/ui/card/card-header.jsx +19 -0
- package/src/lib/components/ui/card/card-title.jsx +11 -0
- package/src/lib/components/ui/card/card.jsx +17 -0
- package/src/lib/components/ui/card/index.js +23 -23
- package/src/lib/components/ui/checkbox/checkbox.jsx +29 -0
- package/src/lib/components/ui/checkbox/index.js +5 -5
- package/src/lib/components/ui/collapsible/collapsible-content.jsx +7 -0
- package/src/lib/components/ui/collapsible/collapsible-trigger.jsx +7 -0
- package/src/lib/components/ui/collapsible/collapsible.jsx +7 -0
- package/src/lib/components/ui/collapsible/index.js +11 -11
- package/src/lib/components/ui/dialog/dialog-close.jsx +7 -0
- package/src/lib/components/ui/dialog/dialog-content.jsx +34 -0
- package/src/lib/components/ui/dialog/dialog-description.jsx +15 -0
- package/src/lib/components/ui/dialog/dialog-footer.jsx +23 -0
- package/src/lib/components/ui/dialog/dialog-header.jsx +11 -0
- package/src/lib/components/ui/dialog/dialog-overlay.jsx +15 -0
- package/src/lib/components/ui/dialog/dialog-portal.jsx +4 -0
- package/src/lib/components/ui/dialog/dialog-title.jsx +15 -0
- package/src/lib/components/ui/dialog/dialog-trigger.jsx +7 -0
- package/src/lib/components/ui/dialog/dialog.jsx +4 -0
- package/src/lib/components/ui/dialog/index.js +32 -32
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-group.jsx +8 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.jsx +30 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-content.jsx +22 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.jsx +16 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-group.jsx +7 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-item.jsx +20 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-label.jsx +17 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-portal.jsx +4 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.jsx +7 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.jsx +29 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.jsx +15 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.jsx +16 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.jsx +15 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.jsx +23 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub.jsx +4 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-trigger.jsx +7 -0
- package/src/lib/components/ui/dropdown-menu/dropdown-menu.jsx +4 -0
- package/src/lib/components/ui/dropdown-menu/index.js +52 -52
- package/src/lib/components/ui/input/index.js +5 -5
- package/src/lib/components/ui/input/input.jsx +19 -0
- package/src/lib/components/ui/label/index.js +5 -5
- package/src/lib/components/ui/label/label.jsx +19 -0
- package/src/lib/components/ui/panel/index.js +21 -21
- package/src/lib/components/ui/panel/panel-body.jsx +11 -0
- package/src/lib/components/ui/panel/panel-close.jsx +16 -0
- package/src/lib/components/ui/panel/panel-content.jsx +29 -0
- package/src/lib/components/ui/panel/panel-footer.jsx +11 -0
- package/src/lib/components/ui/panel/panel-header.jsx +11 -0
- package/src/lib/components/ui/panel/panel-title.jsx +12 -0
- package/src/lib/components/ui/panel/panel.jsx +4 -0
- package/src/lib/components/ui/popover/index.js +26 -26
- package/src/lib/components/ui/popover/popover-close.jsx +7 -0
- package/src/lib/components/ui/popover/popover-content.jsx +22 -0
- package/src/lib/components/ui/popover/popover-description.jsx +11 -0
- package/src/lib/components/ui/popover/popover-header.jsx +11 -0
- package/src/lib/components/ui/popover/popover-portal.jsx +4 -0
- package/src/lib/components/ui/popover/popover-title.jsx +11 -0
- package/src/lib/components/ui/popover/popover-trigger.jsx +8 -0
- package/src/lib/components/ui/popover/popover.jsx +4 -0
- package/src/lib/components/ui/searchable-list.jsx +160 -0
- package/src/lib/components/ui/select/index.js +35 -35
- package/src/lib/components/ui/select/select-content.jsx +30 -0
- package/src/lib/components/ui/select/select-group-heading.jsx +17 -0
- package/src/lib/components/ui/select/select-group.jsx +15 -0
- package/src/lib/components/ui/select/select-item.jsx +26 -0
- package/src/lib/components/ui/select/select-label.jsx +11 -0
- package/src/lib/components/ui/select/select-portal.jsx +4 -0
- package/src/lib/components/ui/select/select-scroll-down-button.jsx +18 -0
- package/src/lib/components/ui/select/select-scroll-up-button.jsx +18 -0
- package/src/lib/components/ui/select/select-separator.jsx +15 -0
- package/src/lib/components/ui/select/select-trigger.jsx +25 -0
- package/src/lib/components/ui/select/select.jsx +4 -0
- package/src/lib/components/ui/separator/index.js +5 -5
- package/src/lib/components/ui/separator/separator.jsx +22 -0
- package/src/lib/components/ui/sheet/index.js +32 -32
- package/src/lib/components/ui/sheet/sheet-close.jsx +7 -0
- package/src/lib/components/ui/sheet/sheet-content.jsx +35 -0
- package/src/lib/components/ui/sheet/sheet-description.jsx +15 -0
- package/src/lib/components/ui/sheet/sheet-footer.jsx +11 -0
- package/src/lib/components/ui/sheet/sheet-header.jsx +11 -0
- package/src/lib/components/ui/sheet/sheet-overlay.jsx +15 -0
- package/src/lib/components/ui/sheet/sheet-portal.jsx +4 -0
- package/src/lib/components/ui/sheet/sheet-title.jsx +15 -0
- package/src/lib/components/ui/sheet/sheet-trigger.jsx +7 -0
- package/src/lib/components/ui/sheet/sheet.jsx +4 -0
- package/src/lib/components/ui/textarea/index.js +5 -5
- package/src/lib/components/ui/textarea/textarea.jsx +18 -0
- package/src/lib/components/ui/toggle/index.js +6 -9
- package/src/lib/components/ui/toggle/toggle.jsx +36 -0
- package/src/lib/components/ui/toggle-group/index.js +8 -8
- package/src/lib/components/ui/toggle-group/toggle-group-item.jsx +29 -0
- package/src/lib/components/ui/toggle-group/toggle-group.jsx +43 -0
- package/src/lib/components/ui/tooltip/index.js +3 -3
- package/src/lib/components/ui/tooltip/tooltip-content.jsx +21 -0
- package/src/lib/components/ui/tooltip/tooltip-trigger.jsx +23 -0
- package/src/lib/components/ui/tooltip/tooltip.jsx +11 -0
- package/src/lib/components/ui/trigger-button/index.js +3 -3
- package/src/lib/components/ui/trigger-button/trigger-button.css +38 -0
- package/src/lib/components/ui/trigger-button/trigger-button.jsx +63 -0
- package/src/logger/devLogger.js +238 -0
- package/src/logger/devLogger.test.js +193 -0
- package/src/modes.test.js +4 -4
- package/src/mountStoryboardCore.js +133 -35
- package/src/paletteProviders.js +3 -0
- package/src/paletteProviders.test.js +2 -2
- package/src/server/index.js +104 -40
- package/src/sidepanel.css +214 -0
- package/src/smoothCorners.js +1 -1
- package/src/styles/tailwind.css +1 -1
- package/src/svelte-plugin-ui/__tests__/ModeSwitch.test.ts +8 -8
- package/src/svelte-plugin-ui/__tests__/ToolbarShell.test.ts +11 -10
- package/src/svelte-plugin-ui/components/Icon.css +11 -0
- package/src/svelte-plugin-ui/components/Icon.jsx +281 -0
- package/src/svelte-plugin-ui/components/ModeSwitch.css +90 -0
- package/src/svelte-plugin-ui/components/ModeSwitch.jsx +47 -0
- package/src/svelte-plugin-ui/components/ToolbarShell.css +80 -0
- package/src/svelte-plugin-ui/components/ToolbarShell.jsx +84 -0
- package/src/svelte-plugin-ui/components/Viewfinder.css +412 -0
- package/src/svelte-plugin-ui/components/Viewfinder.jsx +513 -0
- package/src/svelte-plugin-ui/mount.ts +12 -16
- package/src/toolRegistry.js +4 -4
- package/src/toolbarConfigStore.js +30 -0
- package/src/tools/handlers/autosync.js +1 -1
- package/src/tools/handlers/canvasAddWidget.js +1 -1
- package/src/tools/handlers/canvasAgents.js +20 -0
- package/src/tools/handlers/canvasToolbar.js +8 -8
- package/src/tools/handlers/commandPalette.js +9 -0
- package/src/tools/handlers/comments.js +2 -2
- package/src/tools/handlers/create.js +1 -1
- package/src/tools/handlers/devtools.js +19 -3
- package/src/tools/handlers/devtools.test.js +38 -0
- package/src/tools/handlers/featureFlags.js +1 -1
- package/src/tools/handlers/flows.js +3 -3
- package/src/tools/handlers/hideChrome.js +9 -0
- package/src/tools/handlers/paletteTheme.js +35 -0
- package/src/tools/handlers/theme.js +1 -1
- package/src/tools/registry.js +4 -1
- package/src/tools/surfaces/commandList.js +3 -3
- package/src/tools/surfaces/mainToolbar.js +3 -3
- package/src/tools/surfaces/registry.js +4 -4
- package/src/ui/design-modes.ts +2 -2
- package/src/ui/viewfinder.ts +1 -1
- package/src/vite/server-plugin.js +243 -61
- package/src/workshop/features/createCanvas/CreateCanvasForm.jsx +260 -0
- package/src/workshop/features/createCanvas/index.js +1 -1
- package/src/workshop/features/createFlow/CreateFlowForm.jsx +334 -0
- package/src/workshop/features/createFlow/index.js +1 -1
- package/src/workshop/features/createPage/CreatePageForm.jsx +304 -0
- package/src/workshop/features/createPage/index.js +1 -1
- package/src/workshop/features/createPrototype/CreatePrototypeForm.jsx +289 -0
- package/src/workshop/features/createPrototype/index.js +1 -1
- package/src/workshop/features/createPrototype/server.js +98 -0
- package/src/workshop/features/createStory/CreateStoryForm.jsx +208 -0
- package/src/workshop/features/createStory/index.js +1 -1
- package/src/workshop/ui/WorkshopPanel.jsx +98 -0
- package/src/workshop/ui/mount.ts +1 -1
- package/src/worktree/port.js +48 -0
- package/src/worktree/serverRegistry.js +120 -0
- package/toolbar.config.json +93 -42
- package/widgets.config.json +580 -12
- package/scaffold/commandpalette.config.json +0 -4
- package/scaffold/toolbar.config.json +0 -4
- package/src/ActionMenuButton.svelte +0 -119
- package/src/AutosyncMenuButton.svelte +0 -397
- package/src/CanvasCreateMenu.svelte +0 -295
- package/src/CanvasSnap.svelte +0 -87
- package/src/CanvasUndoRedo.svelte +0 -108
- package/src/CanvasZoomControl.svelte +0 -111
- package/src/CanvasZoomToFit.svelte +0 -52
- package/src/CommandMenu.svelte +0 -249
- package/src/CommandPalette.svelte +0 -33
- package/src/CommentsMenuButton.svelte +0 -53
- package/src/CoreUIBar.svelte +0 -847
- package/src/CreateMenuButton.svelte +0 -133
- package/src/DocPanel.svelte +0 -299
- package/src/InspectorPanel.svelte +0 -745
- package/src/PwaInstallBanner.svelte +0 -124
- package/src/SidePanel.svelte +0 -480
- package/src/ThemeMenuButton.svelte +0 -132
- package/src/comments/ui/AuthModal.svelte +0 -108
- package/src/comments/ui/CommentWindow.svelte +0 -333
- package/src/comments/ui/CommentsDrawer.svelte +0 -96
- package/src/comments/ui/Composer.svelte +0 -65
- package/src/lib/components/ui/alert/alert-action.svelte +0 -19
- package/src/lib/components/ui/alert/alert-description.svelte +0 -22
- package/src/lib/components/ui/alert/alert-title.svelte +0 -22
- package/src/lib/components/ui/alert/alert.svelte +0 -38
- package/src/lib/components/ui/avatar/avatar-badge.svelte +0 -25
- package/src/lib/components/ui/avatar/avatar-fallback.svelte +0 -20
- package/src/lib/components/ui/avatar/avatar-group-count.svelte +0 -22
- package/src/lib/components/ui/avatar/avatar-group.svelte +0 -22
- package/src/lib/components/ui/avatar/avatar-image.svelte +0 -17
- package/src/lib/components/ui/avatar/avatar.svelte +0 -24
- package/src/lib/components/ui/badge/badge.svelte +0 -44
- package/src/lib/components/ui/button/button.svelte +0 -108
- package/src/lib/components/ui/card/card-action.svelte +0 -21
- package/src/lib/components/ui/card/card-content.svelte +0 -19
- package/src/lib/components/ui/card/card-description.svelte +0 -19
- package/src/lib/components/ui/card/card-footer.svelte +0 -18
- package/src/lib/components/ui/card/card-header.svelte +0 -21
- package/src/lib/components/ui/card/card-title.svelte +0 -14
- package/src/lib/components/ui/card/card.svelte +0 -21
- package/src/lib/components/ui/checkbox/checkbox.svelte +0 -39
- package/src/lib/components/ui/collapsible/collapsible-content.svelte +0 -7
- package/src/lib/components/ui/collapsible/collapsible-trigger.svelte +0 -7
- package/src/lib/components/ui/collapsible/collapsible.svelte +0 -11
- package/src/lib/components/ui/dialog/dialog-close.svelte +0 -11
- package/src/lib/components/ui/dialog/dialog-content.svelte +0 -42
- package/src/lib/components/ui/dialog/dialog-description.svelte +0 -17
- package/src/lib/components/ui/dialog/dialog-footer.svelte +0 -29
- package/src/lib/components/ui/dialog/dialog-header.svelte +0 -19
- package/src/lib/components/ui/dialog/dialog-overlay.svelte +0 -17
- package/src/lib/components/ui/dialog/dialog-portal.svelte +0 -7
- package/src/lib/components/ui/dialog/dialog-title.svelte +0 -17
- package/src/lib/components/ui/dialog/dialog-trigger.svelte +0 -11
- package/src/lib/components/ui/dialog/dialog.svelte +0 -7
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-group.svelte +0 -16
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +0 -40
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-content.svelte +0 -27
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +0 -18
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-group.svelte +0 -7
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-item.svelte +0 -24
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-label.svelte +0 -20
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-portal.svelte +0 -7
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte +0 -16
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +0 -34
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-separator.svelte +0 -17
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-shortcut.svelte +0 -19
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +0 -17
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +0 -27
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-sub.svelte +0 -7
- package/src/lib/components/ui/dropdown-menu/dropdown-menu-trigger.svelte +0 -7
- package/src/lib/components/ui/dropdown-menu/dropdown-menu.svelte +0 -7
- package/src/lib/components/ui/input/input.svelte +0 -40
- package/src/lib/components/ui/label/label.svelte +0 -20
- package/src/lib/components/ui/panel/panel-body.svelte +0 -13
- package/src/lib/components/ui/panel/panel-close.svelte +0 -16
- package/src/lib/components/ui/panel/panel-content.svelte +0 -33
- package/src/lib/components/ui/panel/panel-footer.svelte +0 -13
- package/src/lib/components/ui/panel/panel-header.svelte +0 -16
- package/src/lib/components/ui/panel/panel-title.svelte +0 -14
- package/src/lib/components/ui/panel/panel.svelte +0 -15
- package/src/lib/components/ui/popover/popover-close.svelte +0 -7
- package/src/lib/components/ui/popover/popover-content.svelte +0 -27
- package/src/lib/components/ui/popover/popover-description.svelte +0 -19
- package/src/lib/components/ui/popover/popover-header.svelte +0 -19
- package/src/lib/components/ui/popover/popover-portal.svelte +0 -7
- package/src/lib/components/ui/popover/popover-title.svelte +0 -19
- package/src/lib/components/ui/popover/popover-trigger.svelte +0 -17
- package/src/lib/components/ui/popover/popover.svelte +0 -7
- package/src/lib/components/ui/select/select-content.svelte +0 -40
- package/src/lib/components/ui/select/select-group-heading.svelte +0 -19
- package/src/lib/components/ui/select/select-group.svelte +0 -17
- package/src/lib/components/ui/select/select-item.svelte +0 -38
- package/src/lib/components/ui/select/select-label.svelte +0 -18
- package/src/lib/components/ui/select/select-portal.svelte +0 -7
- package/src/lib/components/ui/select/select-scroll-down-button.svelte +0 -20
- package/src/lib/components/ui/select/select-scroll-up-button.svelte +0 -20
- package/src/lib/components/ui/select/select-separator.svelte +0 -17
- package/src/lib/components/ui/select/select-trigger.svelte +0 -27
- package/src/lib/components/ui/select/select.svelte +0 -11
- package/src/lib/components/ui/separator/separator.svelte +0 -23
- package/src/lib/components/ui/sheet/sheet-close.svelte +0 -7
- package/src/lib/components/ui/sheet/sheet-content.svelte +0 -43
- package/src/lib/components/ui/sheet/sheet-description.svelte +0 -17
- package/src/lib/components/ui/sheet/sheet-footer.svelte +0 -18
- package/src/lib/components/ui/sheet/sheet-header.svelte +0 -19
- package/src/lib/components/ui/sheet/sheet-overlay.svelte +0 -17
- package/src/lib/components/ui/sheet/sheet-portal.svelte +0 -7
- package/src/lib/components/ui/sheet/sheet-title.svelte +0 -17
- package/src/lib/components/ui/sheet/sheet-trigger.svelte +0 -7
- package/src/lib/components/ui/sheet/sheet.svelte +0 -7
- package/src/lib/components/ui/textarea/textarea.svelte +0 -21
- package/src/lib/components/ui/toggle/toggle.svelte +0 -45
- package/src/lib/components/ui/toggle-group/toggle-group-item.svelte +0 -35
- package/src/lib/components/ui/toggle-group/toggle-group.svelte +0 -63
- package/src/lib/components/ui/tooltip/tooltip-content.svelte +0 -24
- package/src/lib/components/ui/tooltip/tooltip-trigger.svelte +0 -27
- package/src/lib/components/ui/tooltip/tooltip.svelte +0 -9
- package/src/lib/components/ui/trigger-button/trigger-button.svelte +0 -106
- package/src/svelte-plugin-ui/components/Icon.svelte +0 -181
- package/src/svelte-plugin-ui/components/ModeSwitch.svelte +0 -121
- package/src/svelte-plugin-ui/components/ToolbarShell.svelte +0 -150
- package/src/svelte-plugin-ui/components/Viewfinder.svelte +0 -1001
- package/src/tools/handlers/docs.js +0 -11
- package/src/workshop/features/createCanvas/CreateCanvasForm.svelte +0 -139
- package/src/workshop/features/createFlow/CreateFlowForm.svelte +0 -314
- package/src/workshop/features/createPage/CreatePageForm.svelte +0 -249
- package/src/workshop/features/createPrototype/CreatePrototypeForm.svelte +0 -287
- package/src/workshop/features/createStory/CreateStoryForm.svelte +0 -161
- package/src/workshop/ui/WorkshopPanel.svelte +0 -97
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import Root from "./select.
|
|
2
|
-
import Group from "./select-group.
|
|
3
|
-
import Label from "./select-label.
|
|
4
|
-
import Item from "./select-item.
|
|
5
|
-
import Content from "./select-content.
|
|
6
|
-
import Trigger from "./select-trigger.
|
|
7
|
-
import Separator from "./select-separator.
|
|
8
|
-
import ScrollDownButton from "./select-scroll-down-button.
|
|
9
|
-
import ScrollUpButton from "./select-scroll-up-button.
|
|
10
|
-
import GroupHeading from "./select-group-heading.
|
|
11
|
-
import Portal from "./select-portal.
|
|
1
|
+
import Root from "./select.jsx";
|
|
2
|
+
import Group from "./select-group.jsx";
|
|
3
|
+
import Label from "./select-label.jsx";
|
|
4
|
+
import Item from "./select-item.jsx";
|
|
5
|
+
import Content from "./select-content.jsx";
|
|
6
|
+
import Trigger from "./select-trigger.jsx";
|
|
7
|
+
import Separator from "./select-separator.jsx";
|
|
8
|
+
import ScrollDownButton from "./select-scroll-down-button.jsx";
|
|
9
|
+
import ScrollUpButton from "./select-scroll-up-button.jsx";
|
|
10
|
+
import GroupHeading from "./select-group-heading.jsx";
|
|
11
|
+
import Portal from "./select-portal.jsx";
|
|
12
12
|
|
|
13
13
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
};
|
|
14
|
+
Root,
|
|
15
|
+
Group,
|
|
16
|
+
Label,
|
|
17
|
+
Item,
|
|
18
|
+
Content,
|
|
19
|
+
Trigger,
|
|
20
|
+
Separator,
|
|
21
|
+
ScrollDownButton,
|
|
22
|
+
ScrollUpButton,
|
|
23
|
+
GroupHeading,
|
|
24
|
+
Portal,
|
|
25
|
+
//
|
|
26
|
+
Root as Select,
|
|
27
|
+
Group as SelectGroup,
|
|
28
|
+
Label as SelectLabel,
|
|
29
|
+
Item as SelectItem,
|
|
30
|
+
Content as SelectContent,
|
|
31
|
+
Trigger as SelectTrigger,
|
|
32
|
+
Separator as SelectSeparator,
|
|
33
|
+
ScrollDownButton as SelectScrollDownButton,
|
|
34
|
+
ScrollUpButton as SelectScrollUpButton,
|
|
35
|
+
GroupHeading as SelectGroupHeading,
|
|
36
|
+
Portal as SelectPortal,
|
|
37
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
import SelectScrollUpButton from "./select-scroll-up-button.jsx";
|
|
4
|
+
import SelectScrollDownButton from "./select-scroll-down-button.jsx";
|
|
5
|
+
import { cn } from "../../../utils/index.js";
|
|
6
|
+
|
|
7
|
+
const SelectContent = forwardRef(function SelectContent({ className, children, sideOffset = 4, position = "popper", ...props }, ref) {
|
|
8
|
+
return (
|
|
9
|
+
<SelectPrimitive.Portal>
|
|
10
|
+
<SelectPrimitive.Content
|
|
11
|
+
ref={ref}
|
|
12
|
+
data-slot="select-content"
|
|
13
|
+
sideOffset={sideOffset}
|
|
14
|
+
position={position}
|
|
15
|
+
className={cn(
|
|
16
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-lg shadow-md ring-1 duration-100 relative isolate z-50 overflow-x-hidden overflow-y-auto",
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...props}
|
|
20
|
+
>
|
|
21
|
+
<SelectScrollUpButton />
|
|
22
|
+
<SelectPrimitive.Viewport className="w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1">
|
|
23
|
+
{children}
|
|
24
|
+
</SelectPrimitive.Viewport>
|
|
25
|
+
<SelectScrollDownButton />
|
|
26
|
+
</SelectPrimitive.Content>
|
|
27
|
+
</SelectPrimitive.Portal>
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
export default SelectContent;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
import { cn } from "../../../utils/index.js";
|
|
4
|
+
|
|
5
|
+
const SelectGroupHeading = forwardRef(function SelectGroupHeading({ className, children, ...props }, ref) {
|
|
6
|
+
return (
|
|
7
|
+
<SelectPrimitive.Label
|
|
8
|
+
ref={ref}
|
|
9
|
+
data-slot="select-group-heading"
|
|
10
|
+
className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
|
|
11
|
+
{...props}
|
|
12
|
+
>
|
|
13
|
+
{children}
|
|
14
|
+
</SelectPrimitive.Label>
|
|
15
|
+
);
|
|
16
|
+
});
|
|
17
|
+
export default SelectGroupHeading;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
import { cn } from "../../../utils/index.js";
|
|
4
|
+
|
|
5
|
+
const SelectGroup = forwardRef(function SelectGroup({ className, ...props }, ref) {
|
|
6
|
+
return (
|
|
7
|
+
<SelectPrimitive.Group
|
|
8
|
+
ref={ref}
|
|
9
|
+
data-slot="select-group"
|
|
10
|
+
className={cn("scroll-my-1 p-1", className)}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
);
|
|
14
|
+
});
|
|
15
|
+
export default SelectGroup;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
import { Check } from "lucide-react";
|
|
4
|
+
import { cn } from "../../../utils/index.js";
|
|
5
|
+
|
|
6
|
+
const SelectItem = forwardRef(function SelectItem({ className, children, ...props }, ref) {
|
|
7
|
+
return (
|
|
8
|
+
<SelectPrimitive.Item
|
|
9
|
+
ref={ref}
|
|
10
|
+
data-slot="select-item"
|
|
11
|
+
className={cn(
|
|
12
|
+
"focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 focus:bg-accent data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground focus:text-accent-foreground relative flex w-full cursor-default items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
13
|
+
className
|
|
14
|
+
)}
|
|
15
|
+
{...props}
|
|
16
|
+
>
|
|
17
|
+
<span className="absolute end-2 flex size-3.5 items-center justify-center">
|
|
18
|
+
<SelectPrimitive.ItemIndicator>
|
|
19
|
+
<Check className="cn-select-item-indicator-icon" />
|
|
20
|
+
</SelectPrimitive.ItemIndicator>
|
|
21
|
+
</span>
|
|
22
|
+
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
23
|
+
</SelectPrimitive.Item>
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
export default SelectItem;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import { cn } from "../../../utils/index.js";
|
|
3
|
+
|
|
4
|
+
const SelectLabel = forwardRef(function SelectLabel({ className, children, ...props }, ref) {
|
|
5
|
+
return (
|
|
6
|
+
<div ref={ref} data-slot="select-label" className={cn("text-muted-foreground px-1.5 py-1 text-xs", className)} {...props}>
|
|
7
|
+
{children}
|
|
8
|
+
</div>
|
|
9
|
+
);
|
|
10
|
+
});
|
|
11
|
+
export default SelectLabel;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
import { ChevronDown } from "lucide-react";
|
|
4
|
+
import { cn } from "../../../utils/index.js";
|
|
5
|
+
|
|
6
|
+
const SelectScrollDownButton = forwardRef(function SelectScrollDownButton({ className, ...props }, ref) {
|
|
7
|
+
return (
|
|
8
|
+
<SelectPrimitive.ScrollDownButton
|
|
9
|
+
ref={ref}
|
|
10
|
+
data-slot="select-scroll-down-button"
|
|
11
|
+
className={cn("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 bottom-0 w-full", className)}
|
|
12
|
+
{...props}
|
|
13
|
+
>
|
|
14
|
+
<ChevronDown />
|
|
15
|
+
</SelectPrimitive.ScrollDownButton>
|
|
16
|
+
);
|
|
17
|
+
});
|
|
18
|
+
export default SelectScrollDownButton;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
import { ChevronUp } from "lucide-react";
|
|
4
|
+
import { cn } from "../../../utils/index.js";
|
|
5
|
+
|
|
6
|
+
const SelectScrollUpButton = forwardRef(function SelectScrollUpButton({ className, ...props }, ref) {
|
|
7
|
+
return (
|
|
8
|
+
<SelectPrimitive.ScrollUpButton
|
|
9
|
+
ref={ref}
|
|
10
|
+
data-slot="select-scroll-up-button"
|
|
11
|
+
className={cn("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 top-0 w-full", className)}
|
|
12
|
+
{...props}
|
|
13
|
+
>
|
|
14
|
+
<ChevronUp />
|
|
15
|
+
</SelectPrimitive.ScrollUpButton>
|
|
16
|
+
);
|
|
17
|
+
});
|
|
18
|
+
export default SelectScrollUpButton;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
import { cn } from "../../../utils/index.js";
|
|
4
|
+
|
|
5
|
+
const SelectSeparator = forwardRef(function SelectSeparator({ className, ...props }, ref) {
|
|
6
|
+
return (
|
|
7
|
+
<SelectPrimitive.Separator
|
|
8
|
+
ref={ref}
|
|
9
|
+
data-slot="select-separator"
|
|
10
|
+
className={cn("bg-border -mx-1 my-1 h-px pointer-events-none", className)}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
);
|
|
14
|
+
});
|
|
15
|
+
export default SelectSeparator;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3
|
+
import { ChevronDown } from "lucide-react";
|
|
4
|
+
import { cn } from "../../../utils/index.js";
|
|
5
|
+
|
|
6
|
+
const SelectTrigger = forwardRef(function SelectTrigger({ className, children, size = "default", ...props }, ref) {
|
|
7
|
+
return (
|
|
8
|
+
<SelectPrimitive.Trigger
|
|
9
|
+
ref={ref}
|
|
10
|
+
data-slot="select-trigger"
|
|
11
|
+
data-size={size}
|
|
12
|
+
className={cn(
|
|
13
|
+
"border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--sb--radius-md),10px)] *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
14
|
+
className
|
|
15
|
+
)}
|
|
16
|
+
{...props}
|
|
17
|
+
>
|
|
18
|
+
{children}
|
|
19
|
+
<SelectPrimitive.Icon asChild>
|
|
20
|
+
<ChevronDown className="text-muted-foreground size-4 pointer-events-none" />
|
|
21
|
+
</SelectPrimitive.Icon>
|
|
22
|
+
</SelectPrimitive.Trigger>
|
|
23
|
+
);
|
|
24
|
+
});
|
|
25
|
+
export default SelectTrigger;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3
|
+
import { cn } from "../../../utils/index.js";
|
|
4
|
+
|
|
5
|
+
const Separator = forwardRef(function Separator({ className, orientation = "horizontal", decorative = true, "data-slot": dataSlot = "separator", ...props }, ref) {
|
|
6
|
+
return (
|
|
7
|
+
<SeparatorPrimitive.Root
|
|
8
|
+
ref={ref}
|
|
9
|
+
data-slot={dataSlot}
|
|
10
|
+
decorative={decorative}
|
|
11
|
+
orientation={orientation}
|
|
12
|
+
className={cn(
|
|
13
|
+
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",
|
|
14
|
+
"data-[orientation=vertical]:h-full",
|
|
15
|
+
className
|
|
16
|
+
)}
|
|
17
|
+
{...props}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export default Separator;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import Root from "./sheet.
|
|
2
|
-
import Portal from "./sheet-portal.
|
|
3
|
-
import Trigger from "./sheet-trigger.
|
|
4
|
-
import Close from "./sheet-close.
|
|
5
|
-
import Overlay from "./sheet-overlay.
|
|
6
|
-
import Content from "./sheet-content.
|
|
7
|
-
import Header from "./sheet-header.
|
|
8
|
-
import Footer from "./sheet-footer.
|
|
9
|
-
import Title from "./sheet-title.
|
|
10
|
-
import Description from "./sheet-description.
|
|
1
|
+
import Root from "./sheet.jsx";
|
|
2
|
+
import Portal from "./sheet-portal.jsx";
|
|
3
|
+
import Trigger from "./sheet-trigger.jsx";
|
|
4
|
+
import Close from "./sheet-close.jsx";
|
|
5
|
+
import Overlay from "./sheet-overlay.jsx";
|
|
6
|
+
import Content from "./sheet-content.jsx";
|
|
7
|
+
import Header from "./sheet-header.jsx";
|
|
8
|
+
import Footer from "./sheet-footer.jsx";
|
|
9
|
+
import Title from "./sheet-title.jsx";
|
|
10
|
+
import Description from "./sheet-description.jsx";
|
|
11
11
|
|
|
12
12
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
13
|
+
Root,
|
|
14
|
+
Close,
|
|
15
|
+
Trigger,
|
|
16
|
+
Portal,
|
|
17
|
+
Overlay,
|
|
18
|
+
Content,
|
|
19
|
+
Header,
|
|
20
|
+
Footer,
|
|
21
|
+
Title,
|
|
22
|
+
Description,
|
|
23
|
+
//
|
|
24
|
+
Root as Sheet,
|
|
25
|
+
Close as SheetClose,
|
|
26
|
+
Trigger as SheetTrigger,
|
|
27
|
+
Portal as SheetPortal,
|
|
28
|
+
Overlay as SheetOverlay,
|
|
29
|
+
Content as SheetContent,
|
|
30
|
+
Header as SheetHeader,
|
|
31
|
+
Footer as SheetFooter,
|
|
32
|
+
Title as SheetTitle,
|
|
33
|
+
Description as SheetDescription,
|
|
34
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
|
|
4
|
+
const SheetClose = forwardRef(function SheetClose(props, ref) {
|
|
5
|
+
return <DialogPrimitive.Close ref={ref} data-slot="sheet-close" {...props} />;
|
|
6
|
+
});
|
|
7
|
+
export default SheetClose;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
import SheetOverlay from "./sheet-overlay.jsx";
|
|
4
|
+
import { cn } from "../../../utils/index.js";
|
|
5
|
+
import { Button } from "../../../components/ui/button/index.js";
|
|
6
|
+
import { X } from "lucide-react";
|
|
7
|
+
|
|
8
|
+
const SheetContent = forwardRef(function SheetContent({ className, side = "right", showCloseButton = true, children, ...props }, ref) {
|
|
9
|
+
return (
|
|
10
|
+
<DialogPrimitive.Portal>
|
|
11
|
+
<SheetOverlay />
|
|
12
|
+
<DialogPrimitive.Content
|
|
13
|
+
ref={ref}
|
|
14
|
+
data-slot="sheet-content"
|
|
15
|
+
data-side={side}
|
|
16
|
+
className={cn(
|
|
17
|
+
"bg-background fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[side=bottom]:data-[state=open]:slide-in-from-bottom-10 data-[side=left]:data-[state=open]:slide-in-from-left-10 data-[side=right]:data-[state=open]:slide-in-from-right-10 data-[side=top]:data-[state=open]:slide-in-from-top-10 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[side=bottom]:data-[state=closed]:slide-out-to-bottom-10 data-[side=left]:data-[state=closed]:slide-out-to-left-10 data-[side=right]:data-[state=closed]:slide-out-to-right-10 data-[side=top]:data-[state=closed]:slide-out-to-top-10",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...props}
|
|
21
|
+
>
|
|
22
|
+
{children}
|
|
23
|
+
{showCloseButton && (
|
|
24
|
+
<DialogPrimitive.Close asChild data-slot="sheet-close">
|
|
25
|
+
<Button variant="ghost" className="absolute top-3 right-3" size="icon-sm">
|
|
26
|
+
<X />
|
|
27
|
+
<span className="sr-only">Close</span>
|
|
28
|
+
</Button>
|
|
29
|
+
</DialogPrimitive.Close>
|
|
30
|
+
)}
|
|
31
|
+
</DialogPrimitive.Content>
|
|
32
|
+
</DialogPrimitive.Portal>
|
|
33
|
+
);
|
|
34
|
+
});
|
|
35
|
+
export default SheetContent;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
import { cn } from "../../../utils/index.js";
|
|
4
|
+
|
|
5
|
+
const SheetDescription = forwardRef(function SheetDescription({ className, ...props }, ref) {
|
|
6
|
+
return (
|
|
7
|
+
<DialogPrimitive.Description
|
|
8
|
+
ref={ref}
|
|
9
|
+
data-slot="sheet-description"
|
|
10
|
+
className={cn("text-muted-foreground text-sm", className)}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
);
|
|
14
|
+
});
|
|
15
|
+
export default SheetDescription;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import { cn } from "../../../utils/index.js";
|
|
3
|
+
|
|
4
|
+
const SheetFooter = forwardRef(function SheetFooter({ className, children, ...props }, ref) {
|
|
5
|
+
return (
|
|
6
|
+
<div ref={ref} data-slot="sheet-footer" className={cn("gap-2 p-4 mt-auto flex flex-col", className)} {...props}>
|
|
7
|
+
{children}
|
|
8
|
+
</div>
|
|
9
|
+
);
|
|
10
|
+
});
|
|
11
|
+
export default SheetFooter;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import { cn } from "../../../utils/index.js";
|
|
3
|
+
|
|
4
|
+
const SheetHeader = forwardRef(function SheetHeader({ className, children, ...props }, ref) {
|
|
5
|
+
return (
|
|
6
|
+
<div ref={ref} data-slot="sheet-header" className={cn("gap-0.5 p-4 flex flex-col", className)} {...props}>
|
|
7
|
+
{children}
|
|
8
|
+
</div>
|
|
9
|
+
);
|
|
10
|
+
});
|
|
11
|
+
export default SheetHeader;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
import { cn } from "../../../utils/index.js";
|
|
4
|
+
|
|
5
|
+
const SheetOverlay = forwardRef(function SheetOverlay({ className, ...props }, ref) {
|
|
6
|
+
return (
|
|
7
|
+
<DialogPrimitive.Overlay
|
|
8
|
+
ref={ref}
|
|
9
|
+
data-slot="sheet-overlay"
|
|
10
|
+
className={cn("bg-black/10 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50", className)}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
);
|
|
14
|
+
});
|
|
15
|
+
export default SheetOverlay;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
import { cn } from "../../../utils/index.js";
|
|
4
|
+
|
|
5
|
+
const SheetTitle = forwardRef(function SheetTitle({ className, ...props }, ref) {
|
|
6
|
+
return (
|
|
7
|
+
<DialogPrimitive.Title
|
|
8
|
+
ref={ref}
|
|
9
|
+
data-slot="sheet-title"
|
|
10
|
+
className={cn("text-foreground text-base font-medium", className)}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
);
|
|
14
|
+
});
|
|
15
|
+
export default SheetTitle;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
|
|
4
|
+
const SheetTrigger = forwardRef(function SheetTrigger(props, ref) {
|
|
5
|
+
return <DialogPrimitive.Trigger ref={ref} data-slot="sheet-trigger" {...props} />;
|
|
6
|
+
});
|
|
7
|
+
export default SheetTrigger;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import { cn } from "../../../utils/index.js";
|
|
3
|
+
|
|
4
|
+
const Textarea = forwardRef(function Textarea({ className, "data-slot": dataSlot = "textarea", ...props }, ref) {
|
|
5
|
+
return (
|
|
6
|
+
<textarea
|
|
7
|
+
ref={ref}
|
|
8
|
+
data-slot={dataSlot}
|
|
9
|
+
className={cn(
|
|
10
|
+
"border-input dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 rounded-lg border bg-transparent px-2.5 py-2 text-base transition-colors focus-visible:ring-3 aria-invalid:ring-3 md:text-sm placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
11
|
+
className
|
|
12
|
+
)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export default Textarea;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import Root from "./toggle.
|
|
2
|
-
export {
|
|
3
|
-
toggleVariants,
|
|
4
|
-
|
|
5
|
-
} from "./toggle.svelte";
|
|
1
|
+
import Root, { toggleVariants } from "./toggle.jsx";
|
|
6
2
|
|
|
7
3
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
toggleVariants,
|
|
5
|
+
Root,
|
|
6
|
+
//
|
|
7
|
+
Root as Toggle,
|
|
8
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
3
|
+
import { cn } from "../../../utils/index.js";
|
|
4
|
+
import { tv } from "tailwind-variants";
|
|
5
|
+
|
|
6
|
+
export const toggleVariants = tv({
|
|
7
|
+
base: "hover:text-foreground aria-pressed:bg-muted focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[state=on]:bg-muted gap-1 rounded-lg text-sm font-medium transition-all [&_svg:not([class*='size-'])]:size-4 group/toggle hover:bg-muted inline-flex items-center justify-center whitespace-nowrap outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-transparent",
|
|
11
|
+
outline: "border-input hover:bg-muted border bg-transparent",
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
default: "h-8 min-w-8 px-2",
|
|
15
|
+
sm: "h-7 min-w-7 rounded-[min(var(--sb--radius-md),12px)] px-1.5 text-[0.8rem]",
|
|
16
|
+
lg: "h-9 min-w-9 px-2.5",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "default",
|
|
21
|
+
size: "default",
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const Toggle = forwardRef(function Toggle({ className, variant = "default", size = "default", ...props }, ref) {
|
|
26
|
+
return (
|
|
27
|
+
<TogglePrimitive.Root
|
|
28
|
+
ref={ref}
|
|
29
|
+
data-slot="toggle"
|
|
30
|
+
className={cn(toggleVariants({ variant, size }), className)}
|
|
31
|
+
{...props}
|
|
32
|
+
/>
|
|
33
|
+
);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export default Toggle;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import Root from "./toggle-group.
|
|
2
|
-
import Item from "./toggle-group-item.
|
|
1
|
+
import Root from "./toggle-group.jsx";
|
|
2
|
+
import Item from "./toggle-group-item.jsx";
|
|
3
3
|
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
5
|
+
Root,
|
|
6
|
+
Item,
|
|
7
|
+
//
|
|
8
|
+
Root as ToggleGroup,
|
|
9
|
+
Item as ToggleGroupItem,
|
|
10
|
+
};
|