@agimon-ai/po-web-components 0.0.0-alpha.214 → 0.0.0-alpha.216
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 +11 -7
- package/dist/po-runtime-identity.json +1 -1
- package/dist/src/components/Checkbox.cjs +1 -1
- package/dist/src/components/Checkbox.cjs.map +1 -1
- package/dist/src/components/Checkbox.mjs +1 -1
- package/dist/src/components/Checkbox.mjs.map +1 -1
- package/dist/src/components/Input.cjs +1 -1
- package/dist/src/components/Input.cjs.map +1 -1
- package/dist/src/components/Input.d.mts +1 -1
- package/dist/src/components/Input.d.mts.map +1 -1
- package/dist/src/components/Input.mjs +1 -1
- package/dist/src/components/Input.mjs.map +1 -1
- package/dist/src/components/RadioGroup.cjs +1 -1
- package/dist/src/components/RadioGroup.cjs.map +1 -1
- package/dist/src/components/RadioGroup.mjs +1 -1
- package/dist/src/components/RadioGroup.mjs.map +1 -1
- package/dist/src/components/Sheet.cjs +1 -1
- package/dist/src/components/Sheet.cjs.map +1 -1
- package/dist/src/components/Sheet.d.mts +10 -8
- package/dist/src/components/Sheet.d.mts.map +1 -1
- package/dist/src/components/Sheet.mjs +1 -1
- package/dist/src/components/Sheet.mjs.map +1 -1
- package/dist/src/components/Switch.cjs +1 -1
- package/dist/src/components/Switch.cjs.map +1 -1
- package/dist/src/components/Switch.mjs +1 -1
- package/dist/src/components/Switch.mjs.map +1 -1
- package/package.json +5 -5
- package/styles/theme.css +11 -0
package/README.md
CHANGED
|
@@ -8,7 +8,16 @@ Because every colour is a token, a theme config recolours the whole cockpit at r
|
|
|
8
8
|
|
|
9
9
|
## Entry points
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- `@agimon-ai/po-web-components`: React components and shared view helpers.
|
|
12
|
+
- `@agimon-ai/po-web-components/theme`: theme config validation, preferences, and runtime theme application.
|
|
13
|
+
- `@agimon-ai/po-web-components/nativeTheme`: native Unistyles theme contract (`NATIVE_THEMES`, `nativeTheme`, `withAlpha`, tone tables) without importing the browser root.
|
|
14
|
+
- `@agimon-ai/po-web-components/text`: DOM-free text, file, diff-review, ANSI, QR, hashline, and syntax-highlighting helpers.
|
|
15
|
+
- `@agimon-ai/po-web-components/markdownMediaSlot`: `markdownMediaReviewSlot` helper for markdown media review integration.
|
|
16
|
+
- `@agimon-ai/po-web-components/mcpAppHost`: sandboxed MCP App host frame, CSP, relay HTML, and OpenAI bootstrap helpers.
|
|
17
|
+
- `@agimon-ai/po-web-components/mcpWidget`: `McpApp`, `mountMcpApp`, `McpToolFrame`, `McpToolFields`, and `McpToolOutput` primitives for MCP App widgets.
|
|
18
|
+
- `@agimon-ai/po-web-components/styles.css`: theme tokens, base styles, and default bundled fonts.
|
|
19
|
+
- `@agimon-ai/po-web-components/mcp.css`: theme tokens without bundled fonts for self-contained MCP Apps.
|
|
20
|
+
- `@agimon-ai/po-web-components/themes/*.json`: complete theme examples.
|
|
12
21
|
|
|
13
22
|
## Using it from the cockpit host
|
|
14
23
|
|
|
@@ -121,12 +130,7 @@ supply their own shadows.
|
|
|
121
130
|
|
|
122
131
|
## Type
|
|
123
132
|
|
|
124
|
-
Po Bloom
|
|
125
|
-
word of UI, headings included, and JetBrains Mono (`font-mono`) for code, paths, keys, and terminal
|
|
126
|
-
output. `font-display` remains as an alias of the sans family. Hierarchy comes from size, weight, and
|
|
127
|
-
ink; the role ladder is in [Architecture: Type](https://github.com/AgiFlow/po/blob/main/docs/architecture.md#type). `./mcp.css` carries the
|
|
128
|
-
same tokens without the fonts: a Po-generated MCP app gets them inlined by its build, and a
|
|
129
|
-
third-party app keeps its own.
|
|
133
|
+
Po Bloom declares three `@fontsource-variable` families (OFL): IBM Plex Sans (`font-sans`) for UI text and headings, JetBrains Mono (`font-mono`) for code, paths, keys, and terminal output, and `@fontsource-variable/source-serif-4` for serif surfaces and themes. `./styles.css` imports IBM Plex Sans and JetBrains Mono by default, and `font-display` remains an alias of the sans family. Hierarchy comes from size, weight, and ink; the role ladder is in [Architecture: Type](https://github.com/AgiFlow/po/blob/main/docs/architecture.md#type). `./mcp.css` carries the same tokens without the fonts: a Po-generated MCP app gets them inlined by its build, and a third-party app keeps its own.
|
|
130
134
|
|
|
131
135
|
Each token is published as `--po-<token>` on the root element and mapped to Tailwind as
|
|
132
136
|
`po-<token>` (`bg-po-panel`, `text-po-hi`, `border-po-edge-red`), and to shadcn's semantic
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"platformRequirements":{},"sourceFiles":["LICENSE","NOTICE","README.md","llms.txt","locales/vi.json","locales/zh-CN.json","package.json","src/components/Accordion.stories.tsx","src/components/Accordion.tsx","src/components/AgentAvatar.stories.tsx","src/components/AgentAvatar.tsx","src/components/AnsiText.stories.tsx","src/components/AnsiText.tsx","src/components/Avatar.stories.tsx","src/components/Avatar.tsx","src/components/Badge.stories.tsx","src/components/Badge.tsx","src/components/BrandPalette.stories.tsx","src/components/Breadcrumb.stories.tsx","src/components/Breadcrumb.tsx","src/components/Button.stories.tsx","src/components/Button.tsx","src/components/Checkbox.stories.tsx","src/components/Checkbox.tsx","src/components/CodeBlock.stories.tsx","src/components/CodeBlock.tsx","src/components/CodeEditor.stories.tsx","src/components/CodeEditor.tsx","src/components/CodeEditorView.stories.tsx","src/components/CodeEditorView.tsx","src/components/Collapsible.stories.tsx","src/components/Collapsible.tsx","src/components/Command.stories.tsx","src/components/Command.tsx","src/components/CopyButton.stories.tsx","src/components/CopyButton.tsx","src/components/CtaCard.stories.tsx","src/components/CtaCard.tsx","src/components/Dialog.stories.tsx","src/components/Dialog.tsx","src/components/DiffView.stories.tsx","src/components/DiffView.tsx","src/components/Dot.stories.tsx","src/components/Dot.tsx","src/components/Drawer.stories.tsx","src/components/Drawer.tsx","src/components/DropdownMenu.stories.tsx","src/components/DropdownMenu.tsx","src/components/EmptyState.stories.tsx","src/components/EmptyState.tsx","src/components/FileBrowser.stories.tsx","src/components/FileBrowser.tsx","src/components/FilePreview.stories.tsx","src/components/FilePreview.tsx","src/components/FlowGraph.stories.tsx","src/components/FlowGraph.tsx","src/components/HashlineLines.stories.tsx","src/components/HashlineLines.tsx","src/components/Input.stories.tsx","src/components/Input.tsx","src/components/Kbd.stories.tsx","src/components/Kbd.tsx","src/components/Label.stories.tsx","src/components/Label.tsx","src/components/LiveDuration.tsx","src/components/LoadingState.stories.tsx","src/components/LoadingState.tsx","src/components/Markdown.stories.tsx","src/components/Markdown.tsx","src/components/McpApp.tsx","src/components/McpToolWidget.stories.tsx","src/components/McpToolWidget.tsx","src/components/MediaPreview.stories.tsx","src/components/MediaPreview.tsx","src/components/MediaViewerDialog.stories.tsx","src/components/MediaViewerDialog.tsx","src/components/MermaidDiagram.stories.tsx","src/components/MermaidDiagram.tsx","src/components/MessageItem.stories.tsx","src/components/MessageItem.tsx","src/components/MessageLines.stories.tsx","src/components/MessageLines.tsx","src/components/OptionList.stories.tsx","src/components/OptionList.tsx","src/components/Panel.stories.tsx","src/components/Panel.tsx","src/components/PathText.stories.tsx","src/components/PathText.tsx","src/components/PdfPreview.stories.tsx","src/components/PdfPreview.tsx","src/components/Picker.stories.tsx","src/components/Picker.tsx","src/components/Popover.stories.tsx","src/components/Popover.tsx","src/components/ProfilePicker.stories.tsx","src/components/ProfilePicker.tsx","src/components/Progress.stories.tsx","src/components/Progress.tsx","src/components/QrCode.stories.tsx","src/components/QrCode.tsx","src/components/RadioGroup.stories.tsx","src/components/RadioGroup.tsx","src/components/ReferenceChip.stories.tsx","src/components/ReferenceChip.tsx","src/components/ReviewCommentDraft.stories.tsx","src/components/ReviewCommentDraft.tsx","src/components/ScrollArea.stories.tsx","src/components/ScrollArea.tsx","src/components/SectionLabel.stories.tsx","src/components/SectionLabel.tsx","src/components/Select.stories.tsx","src/components/Select.tsx","src/components/Separator.stories.tsx","src/components/Separator.tsx","src/components/Settings.tsx","src/components/SetupRow.stories.tsx","src/components/SetupRow.tsx","src/components/Sheet.stories.tsx","src/components/Sheet.tsx","src/components/Skeleton.stories.tsx","src/components/Skeleton.tsx","src/components/Spinner.stories.tsx","src/components/Spinner.tsx","src/components/StatusBadge.stories.tsx","src/components/StatusBadge.tsx","src/components/StreamCursor.stories.tsx","src/components/StreamCursor.tsx","src/components/Switch.stories.tsx","src/components/Switch.tsx","src/components/SyntaxText.stories.tsx","src/components/SyntaxText.tsx","src/components/Tabs.stories.tsx","src/components/Tabs.tsx","src/components/TerminalView.stories.tsx","src/components/TerminalView.tsx","src/components/Textarea.stories.tsx","src/components/Textarea.tsx","src/components/Toast.stories.tsx","src/components/Toast.tsx","src/components/ToolPathLink.stories.tsx","src/components/ToolPathLink.tsx","src/components/Tooltip.stories.tsx","src/components/Tooltip.tsx","src/components/ViewableImage.stories.tsx","src/components/ViewableImage.tsx","src/exports/index.ts","src/exports/markdownMediaSlot.ts","src/exports/mcpAppHost.ts","src/exports/mcpWidget.ts","src/exports/nativeTheme.ts","src/exports/text.ts","src/exports/theme.ts","src/icons/icons.ts","src/lib/ansiSpans.ts","src/lib/cn.ts","src/lib/collapse.ts","src/lib/editorController.ts","src/lib/editorLanguage.ts","src/lib/editorTheme.ts","src/lib/fenceGrammar.ts","src/lib/fileDownload.ts","src/lib/files.ts","src/lib/hashlineHighlight.ts","src/lib/hashlineView.ts","src/lib/markdownMedia.ts","src/lib/markdownMediaSlot.ts","src/lib/markdownReferences.ts","src/lib/mcpAppFrame.ts","src/lib/mcpAppSandbox.ts","src/lib/mcpOpenAiBootstrap.ts","src/lib/media.ts","src/lib/mediaPlayback.ts","src/lib/mermaidDiagram.ts","src/lib/optionList.ts","src/lib/pathGroups.ts","src/lib/picker.ts","src/lib/profilePicker.ts","src/lib/qrMatrix.ts","src/lib/review.ts","src/lib/runDuration.ts","src/lib/syntaxHighlight.ts","src/lib/tone.ts","src/theme/apply.ts","src/theme/builtinThemes.ts","src/theme/derive.ts","src/theme/nativeTheme.ts","src/theme/parse.ts","src/theme/piTheme.ts","src/theme/preference.ts","src/types/diff.ts","src/types/editor.ts","src/types/theme.ts","src/types/tone.ts","styles/mcp.css","styles/preview.css","styles/theme.css","styles/tokens.css","themes/po-nord-dark.json","themes/po-one-light.json","tsdown.config.ts"],"sourceRevision":"6302b60ef3db9e144e6d272946e923d8","manifestRevision":"43164e31d72545cfbe09b709e8d2989f","outputFiles":["LICENSE","NOTICE","README.md","dist/_virtual/_rolldown/runtime.cjs","dist/index.cjs","dist/index.mjs","dist/markdownMediaSlot.cjs","dist/markdownMediaSlot.mjs","dist/mcpAppHost.cjs","dist/mcpAppHost.mjs","dist/mcpWidget.cjs","dist/mcpWidget.mjs","dist/nativeTheme.cjs","dist/nativeTheme.mjs","dist/src/components/Accordion.cjs","dist/src/components/Accordion.mjs","dist/src/components/AgentAvatar.cjs","dist/src/components/AgentAvatar.mjs","dist/src/components/AnsiText.cjs","dist/src/components/AnsiText.mjs","dist/src/components/Avatar.cjs","dist/src/components/Avatar.mjs","dist/src/components/Badge.cjs","dist/src/components/Badge.mjs","dist/src/components/Breadcrumb.cjs","dist/src/components/Breadcrumb.mjs","dist/src/components/Button.cjs","dist/src/components/Button.mjs","dist/src/components/Checkbox.cjs","dist/src/components/Checkbox.mjs","dist/src/components/CodeBlock.cjs","dist/src/components/CodeBlock.mjs","dist/src/components/CodeEditor.cjs","dist/src/components/CodeEditor.mjs","dist/src/components/CodeEditorView.cjs","dist/src/components/CodeEditorView.mjs","dist/src/components/Collapsible.cjs","dist/src/components/Collapsible.mjs","dist/src/components/Command.cjs","dist/src/components/Command.mjs","dist/src/components/CopyButton.cjs","dist/src/components/CopyButton.mjs","dist/src/components/CtaCard.cjs","dist/src/components/CtaCard.mjs","dist/src/components/Dialog.cjs","dist/src/components/Dialog.mjs","dist/src/components/DiffView.cjs","dist/src/components/DiffView.mjs","dist/src/components/Dot.cjs","dist/src/components/Dot.mjs","dist/src/components/Drawer.cjs","dist/src/components/Drawer.mjs","dist/src/components/DropdownMenu.cjs","dist/src/components/DropdownMenu.mjs","dist/src/components/EmptyState.cjs","dist/src/components/EmptyState.mjs","dist/src/components/FileBrowser.cjs","dist/src/components/FileBrowser.mjs","dist/src/components/FilePreview.cjs","dist/src/components/FilePreview.mjs","dist/src/components/FlowGraph.cjs","dist/src/components/FlowGraph.mjs","dist/src/components/HashlineLines.cjs","dist/src/components/HashlineLines.mjs","dist/src/components/Input.cjs","dist/src/components/Input.mjs","dist/src/components/Kbd.cjs","dist/src/components/Kbd.mjs","dist/src/components/Label.cjs","dist/src/components/Label.mjs","dist/src/components/LiveDuration.cjs","dist/src/components/LiveDuration.mjs","dist/src/components/LoadingState.cjs","dist/src/components/LoadingState.mjs","dist/src/components/Markdown.cjs","dist/src/components/Markdown.mjs","dist/src/components/McpApp.cjs","dist/src/components/McpApp.mjs","dist/src/components/McpToolWidget.cjs","dist/src/components/McpToolWidget.mjs","dist/src/components/MediaPreview.cjs","dist/src/components/MediaPreview.mjs","dist/src/components/MediaViewerDialog.cjs","dist/src/components/MediaViewerDialog.mjs","dist/src/components/MermaidDiagram.cjs","dist/src/components/MermaidDiagram.mjs","dist/src/components/MessageItem.cjs","dist/src/components/MessageItem.mjs","dist/src/components/MessageLines.cjs","dist/src/components/MessageLines.mjs","dist/src/components/OptionList.cjs","dist/src/components/OptionList.mjs","dist/src/components/Panel.cjs","dist/src/components/Panel.mjs","dist/src/components/PathText.cjs","dist/src/components/PathText.mjs","dist/src/components/PdfPreview.cjs","dist/src/components/PdfPreview.mjs","dist/src/components/Picker.cjs","dist/src/components/Picker.mjs","dist/src/components/Popover.cjs","dist/src/components/Popover.mjs","dist/src/components/ProfilePicker.cjs","dist/src/components/ProfilePicker.mjs","dist/src/components/Progress.cjs","dist/src/components/Progress.mjs","dist/src/components/QrCode.cjs","dist/src/components/QrCode.mjs","dist/src/components/RadioGroup.cjs","dist/src/components/RadioGroup.mjs","dist/src/components/ReferenceChip.cjs","dist/src/components/ReferenceChip.mjs","dist/src/components/ReviewCommentDraft.cjs","dist/src/components/ReviewCommentDraft.mjs","dist/src/components/ScrollArea.cjs","dist/src/components/ScrollArea.mjs","dist/src/components/SectionLabel.cjs","dist/src/components/SectionLabel.mjs","dist/src/components/Select.cjs","dist/src/components/Select.mjs","dist/src/components/Separator.cjs","dist/src/components/Separator.mjs","dist/src/components/Settings.cjs","dist/src/components/Settings.mjs","dist/src/components/SetupRow.cjs","dist/src/components/SetupRow.mjs","dist/src/components/Sheet.cjs","dist/src/components/Sheet.mjs","dist/src/components/Skeleton.cjs","dist/src/components/Skeleton.mjs","dist/src/components/Spinner.cjs","dist/src/components/Spinner.mjs","dist/src/components/StatusBadge.cjs","dist/src/components/StatusBadge.mjs","dist/src/components/StreamCursor.cjs","dist/src/components/StreamCursor.mjs","dist/src/components/Switch.cjs","dist/src/components/Switch.mjs","dist/src/components/SyntaxText.cjs","dist/src/components/SyntaxText.mjs","dist/src/components/Tabs.cjs","dist/src/components/Tabs.mjs","dist/src/components/TerminalView.cjs","dist/src/components/TerminalView.mjs","dist/src/components/Textarea.cjs","dist/src/components/Textarea.mjs","dist/src/components/Toast.cjs","dist/src/components/Toast.mjs","dist/src/components/ToolPathLink.cjs","dist/src/components/ToolPathLink.mjs","dist/src/components/Tooltip.cjs","dist/src/components/Tooltip.mjs","dist/src/components/ViewableImage.cjs","dist/src/components/ViewableImage.mjs","dist/src/icons/icons.cjs","dist/src/icons/icons.mjs","dist/src/lib/ansiSpans.cjs","dist/src/lib/ansiSpans.mjs","dist/src/lib/cn.cjs","dist/src/lib/cn.mjs","dist/src/lib/collapse.cjs","dist/src/lib/collapse.mjs","dist/src/lib/editorController.cjs","dist/src/lib/editorController.mjs","dist/src/lib/editorLanguage.cjs","dist/src/lib/editorLanguage.mjs","dist/src/lib/editorTheme.cjs","dist/src/lib/editorTheme.mjs","dist/src/lib/fenceGrammar.cjs","dist/src/lib/fenceGrammar.mjs","dist/src/lib/fileDownload.cjs","dist/src/lib/fileDownload.mjs","dist/src/lib/files.cjs","dist/src/lib/files.mjs","dist/src/lib/hashlineHighlight.cjs","dist/src/lib/hashlineHighlight.mjs","dist/src/lib/hashlineView.cjs","dist/src/lib/hashlineView.mjs","dist/src/lib/markdownMedia.cjs","dist/src/lib/markdownMedia.mjs","dist/src/lib/markdownMediaSlot.cjs","dist/src/lib/markdownMediaSlot.mjs","dist/src/lib/markdownReferences.cjs","dist/src/lib/markdownReferences.mjs","dist/src/lib/mcpAppFrame.cjs","dist/src/lib/mcpAppFrame.mjs","dist/src/lib/mcpAppSandbox.cjs","dist/src/lib/mcpAppSandbox.mjs","dist/src/lib/mcpOpenAiBootstrap.cjs","dist/src/lib/mcpOpenAiBootstrap.mjs","dist/src/lib/media.cjs","dist/src/lib/media.mjs","dist/src/lib/mediaPlayback.cjs","dist/src/lib/mediaPlayback.mjs","dist/src/lib/mermaidDiagram.cjs","dist/src/lib/mermaidDiagram.mjs","dist/src/lib/optionList.cjs","dist/src/lib/optionList.mjs","dist/src/lib/pathGroups.cjs","dist/src/lib/pathGroups.mjs","dist/src/lib/picker.cjs","dist/src/lib/picker.mjs","dist/src/lib/profilePicker.cjs","dist/src/lib/profilePicker.mjs","dist/src/lib/qrMatrix.cjs","dist/src/lib/qrMatrix.mjs","dist/src/lib/review.cjs","dist/src/lib/review.mjs","dist/src/lib/runDuration.cjs","dist/src/lib/runDuration.mjs","dist/src/lib/syntaxHighlight.cjs","dist/src/lib/syntaxHighlight.mjs","dist/src/lib/tone.cjs","dist/src/lib/tone.mjs","dist/src/theme/apply.cjs","dist/src/theme/apply.mjs","dist/src/theme/builtinThemes.cjs","dist/src/theme/builtinThemes.mjs","dist/src/theme/derive.cjs","dist/src/theme/derive.mjs","dist/src/theme/nativeTheme.cjs","dist/src/theme/nativeTheme.mjs","dist/src/theme/parse.cjs","dist/src/theme/parse.mjs","dist/src/theme/piTheme.cjs","dist/src/theme/piTheme.mjs","dist/src/theme/preference.cjs","dist/src/theme/preference.mjs","dist/src/types/editor.cjs","dist/src/types/editor.mjs","dist/src/types/theme.cjs","dist/src/types/theme.mjs","dist/src/types/tone.cjs","dist/src/types/tone.mjs","dist/text.cjs","dist/text.mjs","dist/theme.cjs","dist/theme.mjs","dist/themes/po-nord-dark.cjs","dist/themes/po-nord-dark.mjs","dist/themes/po-one-light.cjs","dist/themes/po-one-light.mjs","llms.txt","locales/vi.json","locales/zh-CN.json","styles/mcp.css","styles/preview.css","styles/theme.css","styles/tokens.css","themes/po-nord-dark.json","themes/po-one-light.json"],"outputRevision":"6286bfc714eb2b301116631fe3cad399"}
|
|
1
|
+
{"version":1,"platformRequirements":{},"sourceFiles":["LICENSE","NOTICE","README.md","llms.txt","locales/vi.json","locales/zh-CN.json","package.json","src/components/Accordion.stories.tsx","src/components/Accordion.tsx","src/components/AgentAvatar.stories.tsx","src/components/AgentAvatar.tsx","src/components/AnsiText.stories.tsx","src/components/AnsiText.tsx","src/components/Avatar.stories.tsx","src/components/Avatar.tsx","src/components/Badge.stories.tsx","src/components/Badge.tsx","src/components/BrandPalette.stories.tsx","src/components/Breadcrumb.stories.tsx","src/components/Breadcrumb.tsx","src/components/Button.stories.tsx","src/components/Button.tsx","src/components/Checkbox.stories.tsx","src/components/Checkbox.tsx","src/components/CodeBlock.stories.tsx","src/components/CodeBlock.tsx","src/components/CodeEditor.stories.tsx","src/components/CodeEditor.tsx","src/components/CodeEditorView.stories.tsx","src/components/CodeEditorView.tsx","src/components/Collapsible.stories.tsx","src/components/Collapsible.tsx","src/components/Command.stories.tsx","src/components/Command.tsx","src/components/CopyButton.stories.tsx","src/components/CopyButton.tsx","src/components/CtaCard.stories.tsx","src/components/CtaCard.tsx","src/components/Dialog.stories.tsx","src/components/Dialog.tsx","src/components/DiffView.stories.tsx","src/components/DiffView.tsx","src/components/Dot.stories.tsx","src/components/Dot.tsx","src/components/Drawer.stories.tsx","src/components/Drawer.tsx","src/components/DropdownMenu.stories.tsx","src/components/DropdownMenu.tsx","src/components/EmptyState.stories.tsx","src/components/EmptyState.tsx","src/components/FileBrowser.stories.tsx","src/components/FileBrowser.tsx","src/components/FilePreview.stories.tsx","src/components/FilePreview.tsx","src/components/FlowGraph.stories.tsx","src/components/FlowGraph.tsx","src/components/HashlineLines.stories.tsx","src/components/HashlineLines.tsx","src/components/Input.stories.tsx","src/components/Input.tsx","src/components/Kbd.stories.tsx","src/components/Kbd.tsx","src/components/Label.stories.tsx","src/components/Label.tsx","src/components/LiveDuration.tsx","src/components/LoadingState.stories.tsx","src/components/LoadingState.tsx","src/components/Markdown.stories.tsx","src/components/Markdown.tsx","src/components/McpApp.tsx","src/components/McpToolWidget.stories.tsx","src/components/McpToolWidget.tsx","src/components/MediaPreview.stories.tsx","src/components/MediaPreview.tsx","src/components/MediaViewerDialog.stories.tsx","src/components/MediaViewerDialog.tsx","src/components/MermaidDiagram.stories.tsx","src/components/MermaidDiagram.tsx","src/components/MessageItem.stories.tsx","src/components/MessageItem.tsx","src/components/MessageLines.stories.tsx","src/components/MessageLines.tsx","src/components/OptionList.stories.tsx","src/components/OptionList.tsx","src/components/Panel.stories.tsx","src/components/Panel.tsx","src/components/PathText.stories.tsx","src/components/PathText.tsx","src/components/PdfPreview.stories.tsx","src/components/PdfPreview.tsx","src/components/Picker.stories.tsx","src/components/Picker.tsx","src/components/Popover.stories.tsx","src/components/Popover.tsx","src/components/ProfilePicker.stories.tsx","src/components/ProfilePicker.tsx","src/components/Progress.stories.tsx","src/components/Progress.tsx","src/components/QrCode.stories.tsx","src/components/QrCode.tsx","src/components/RadioGroup.stories.tsx","src/components/RadioGroup.tsx","src/components/ReferenceChip.stories.tsx","src/components/ReferenceChip.tsx","src/components/ReviewCommentDraft.stories.tsx","src/components/ReviewCommentDraft.tsx","src/components/ScrollArea.stories.tsx","src/components/ScrollArea.tsx","src/components/SectionLabel.stories.tsx","src/components/SectionLabel.tsx","src/components/Select.stories.tsx","src/components/Select.tsx","src/components/Separator.stories.tsx","src/components/Separator.tsx","src/components/Settings.tsx","src/components/SetupRow.stories.tsx","src/components/SetupRow.tsx","src/components/Sheet.stories.tsx","src/components/Sheet.tsx","src/components/Skeleton.stories.tsx","src/components/Skeleton.tsx","src/components/Spinner.stories.tsx","src/components/Spinner.tsx","src/components/StatusBadge.stories.tsx","src/components/StatusBadge.tsx","src/components/StreamCursor.stories.tsx","src/components/StreamCursor.tsx","src/components/Switch.stories.tsx","src/components/Switch.tsx","src/components/SyntaxText.stories.tsx","src/components/SyntaxText.tsx","src/components/Tabs.stories.tsx","src/components/Tabs.tsx","src/components/TerminalView.stories.tsx","src/components/TerminalView.tsx","src/components/Textarea.stories.tsx","src/components/Textarea.tsx","src/components/Toast.stories.tsx","src/components/Toast.tsx","src/components/ToolPathLink.stories.tsx","src/components/ToolPathLink.tsx","src/components/Tooltip.stories.tsx","src/components/Tooltip.tsx","src/components/ViewableImage.stories.tsx","src/components/ViewableImage.tsx","src/exports/index.ts","src/exports/markdownMediaSlot.ts","src/exports/mcpAppHost.ts","src/exports/mcpWidget.ts","src/exports/nativeTheme.ts","src/exports/text.ts","src/exports/theme.ts","src/icons/icons.ts","src/lib/ansiSpans.ts","src/lib/cn.ts","src/lib/collapse.ts","src/lib/editorController.ts","src/lib/editorLanguage.ts","src/lib/editorTheme.ts","src/lib/fenceGrammar.ts","src/lib/fileDownload.ts","src/lib/files.ts","src/lib/hashlineHighlight.ts","src/lib/hashlineView.ts","src/lib/markdownMedia.ts","src/lib/markdownMediaSlot.ts","src/lib/markdownReferences.ts","src/lib/mcpAppFrame.ts","src/lib/mcpAppSandbox.ts","src/lib/mcpOpenAiBootstrap.ts","src/lib/media.ts","src/lib/mediaPlayback.ts","src/lib/mermaidDiagram.ts","src/lib/optionList.ts","src/lib/pathGroups.ts","src/lib/picker.ts","src/lib/profilePicker.ts","src/lib/qrMatrix.ts","src/lib/review.ts","src/lib/runDuration.ts","src/lib/syntaxHighlight.ts","src/lib/tone.ts","src/theme/apply.ts","src/theme/builtinThemes.ts","src/theme/derive.ts","src/theme/nativeTheme.ts","src/theme/parse.ts","src/theme/piTheme.ts","src/theme/preference.ts","src/types/diff.ts","src/types/editor.ts","src/types/theme.ts","src/types/tone.ts","styles/mcp.css","styles/preview.css","styles/theme.css","styles/tokens.css","themes/po-nord-dark.json","themes/po-one-light.json","tsdown.config.ts"],"sourceRevision":"befec1697066c08cb385ab0151b57664","manifestRevision":"c3c44760e0e9394e32599f0491ff993f","outputFiles":["LICENSE","NOTICE","README.md","dist/_virtual/_rolldown/runtime.cjs","dist/index.cjs","dist/index.mjs","dist/markdownMediaSlot.cjs","dist/markdownMediaSlot.mjs","dist/mcpAppHost.cjs","dist/mcpAppHost.mjs","dist/mcpWidget.cjs","dist/mcpWidget.mjs","dist/nativeTheme.cjs","dist/nativeTheme.mjs","dist/src/components/Accordion.cjs","dist/src/components/Accordion.mjs","dist/src/components/AgentAvatar.cjs","dist/src/components/AgentAvatar.mjs","dist/src/components/AnsiText.cjs","dist/src/components/AnsiText.mjs","dist/src/components/Avatar.cjs","dist/src/components/Avatar.mjs","dist/src/components/Badge.cjs","dist/src/components/Badge.mjs","dist/src/components/Breadcrumb.cjs","dist/src/components/Breadcrumb.mjs","dist/src/components/Button.cjs","dist/src/components/Button.mjs","dist/src/components/Checkbox.cjs","dist/src/components/Checkbox.mjs","dist/src/components/CodeBlock.cjs","dist/src/components/CodeBlock.mjs","dist/src/components/CodeEditor.cjs","dist/src/components/CodeEditor.mjs","dist/src/components/CodeEditorView.cjs","dist/src/components/CodeEditorView.mjs","dist/src/components/Collapsible.cjs","dist/src/components/Collapsible.mjs","dist/src/components/Command.cjs","dist/src/components/Command.mjs","dist/src/components/CopyButton.cjs","dist/src/components/CopyButton.mjs","dist/src/components/CtaCard.cjs","dist/src/components/CtaCard.mjs","dist/src/components/Dialog.cjs","dist/src/components/Dialog.mjs","dist/src/components/DiffView.cjs","dist/src/components/DiffView.mjs","dist/src/components/Dot.cjs","dist/src/components/Dot.mjs","dist/src/components/Drawer.cjs","dist/src/components/Drawer.mjs","dist/src/components/DropdownMenu.cjs","dist/src/components/DropdownMenu.mjs","dist/src/components/EmptyState.cjs","dist/src/components/EmptyState.mjs","dist/src/components/FileBrowser.cjs","dist/src/components/FileBrowser.mjs","dist/src/components/FilePreview.cjs","dist/src/components/FilePreview.mjs","dist/src/components/FlowGraph.cjs","dist/src/components/FlowGraph.mjs","dist/src/components/HashlineLines.cjs","dist/src/components/HashlineLines.mjs","dist/src/components/Input.cjs","dist/src/components/Input.mjs","dist/src/components/Kbd.cjs","dist/src/components/Kbd.mjs","dist/src/components/Label.cjs","dist/src/components/Label.mjs","dist/src/components/LiveDuration.cjs","dist/src/components/LiveDuration.mjs","dist/src/components/LoadingState.cjs","dist/src/components/LoadingState.mjs","dist/src/components/Markdown.cjs","dist/src/components/Markdown.mjs","dist/src/components/McpApp.cjs","dist/src/components/McpApp.mjs","dist/src/components/McpToolWidget.cjs","dist/src/components/McpToolWidget.mjs","dist/src/components/MediaPreview.cjs","dist/src/components/MediaPreview.mjs","dist/src/components/MediaViewerDialog.cjs","dist/src/components/MediaViewerDialog.mjs","dist/src/components/MermaidDiagram.cjs","dist/src/components/MermaidDiagram.mjs","dist/src/components/MessageItem.cjs","dist/src/components/MessageItem.mjs","dist/src/components/MessageLines.cjs","dist/src/components/MessageLines.mjs","dist/src/components/OptionList.cjs","dist/src/components/OptionList.mjs","dist/src/components/Panel.cjs","dist/src/components/Panel.mjs","dist/src/components/PathText.cjs","dist/src/components/PathText.mjs","dist/src/components/PdfPreview.cjs","dist/src/components/PdfPreview.mjs","dist/src/components/Picker.cjs","dist/src/components/Picker.mjs","dist/src/components/Popover.cjs","dist/src/components/Popover.mjs","dist/src/components/ProfilePicker.cjs","dist/src/components/ProfilePicker.mjs","dist/src/components/Progress.cjs","dist/src/components/Progress.mjs","dist/src/components/QrCode.cjs","dist/src/components/QrCode.mjs","dist/src/components/RadioGroup.cjs","dist/src/components/RadioGroup.mjs","dist/src/components/ReferenceChip.cjs","dist/src/components/ReferenceChip.mjs","dist/src/components/ReviewCommentDraft.cjs","dist/src/components/ReviewCommentDraft.mjs","dist/src/components/ScrollArea.cjs","dist/src/components/ScrollArea.mjs","dist/src/components/SectionLabel.cjs","dist/src/components/SectionLabel.mjs","dist/src/components/Select.cjs","dist/src/components/Select.mjs","dist/src/components/Separator.cjs","dist/src/components/Separator.mjs","dist/src/components/Settings.cjs","dist/src/components/Settings.mjs","dist/src/components/SetupRow.cjs","dist/src/components/SetupRow.mjs","dist/src/components/Sheet.cjs","dist/src/components/Sheet.mjs","dist/src/components/Skeleton.cjs","dist/src/components/Skeleton.mjs","dist/src/components/Spinner.cjs","dist/src/components/Spinner.mjs","dist/src/components/StatusBadge.cjs","dist/src/components/StatusBadge.mjs","dist/src/components/StreamCursor.cjs","dist/src/components/StreamCursor.mjs","dist/src/components/Switch.cjs","dist/src/components/Switch.mjs","dist/src/components/SyntaxText.cjs","dist/src/components/SyntaxText.mjs","dist/src/components/Tabs.cjs","dist/src/components/Tabs.mjs","dist/src/components/TerminalView.cjs","dist/src/components/TerminalView.mjs","dist/src/components/Textarea.cjs","dist/src/components/Textarea.mjs","dist/src/components/Toast.cjs","dist/src/components/Toast.mjs","dist/src/components/ToolPathLink.cjs","dist/src/components/ToolPathLink.mjs","dist/src/components/Tooltip.cjs","dist/src/components/Tooltip.mjs","dist/src/components/ViewableImage.cjs","dist/src/components/ViewableImage.mjs","dist/src/icons/icons.cjs","dist/src/icons/icons.mjs","dist/src/lib/ansiSpans.cjs","dist/src/lib/ansiSpans.mjs","dist/src/lib/cn.cjs","dist/src/lib/cn.mjs","dist/src/lib/collapse.cjs","dist/src/lib/collapse.mjs","dist/src/lib/editorController.cjs","dist/src/lib/editorController.mjs","dist/src/lib/editorLanguage.cjs","dist/src/lib/editorLanguage.mjs","dist/src/lib/editorTheme.cjs","dist/src/lib/editorTheme.mjs","dist/src/lib/fenceGrammar.cjs","dist/src/lib/fenceGrammar.mjs","dist/src/lib/fileDownload.cjs","dist/src/lib/fileDownload.mjs","dist/src/lib/files.cjs","dist/src/lib/files.mjs","dist/src/lib/hashlineHighlight.cjs","dist/src/lib/hashlineHighlight.mjs","dist/src/lib/hashlineView.cjs","dist/src/lib/hashlineView.mjs","dist/src/lib/markdownMedia.cjs","dist/src/lib/markdownMedia.mjs","dist/src/lib/markdownMediaSlot.cjs","dist/src/lib/markdownMediaSlot.mjs","dist/src/lib/markdownReferences.cjs","dist/src/lib/markdownReferences.mjs","dist/src/lib/mcpAppFrame.cjs","dist/src/lib/mcpAppFrame.mjs","dist/src/lib/mcpAppSandbox.cjs","dist/src/lib/mcpAppSandbox.mjs","dist/src/lib/mcpOpenAiBootstrap.cjs","dist/src/lib/mcpOpenAiBootstrap.mjs","dist/src/lib/media.cjs","dist/src/lib/media.mjs","dist/src/lib/mediaPlayback.cjs","dist/src/lib/mediaPlayback.mjs","dist/src/lib/mermaidDiagram.cjs","dist/src/lib/mermaidDiagram.mjs","dist/src/lib/optionList.cjs","dist/src/lib/optionList.mjs","dist/src/lib/pathGroups.cjs","dist/src/lib/pathGroups.mjs","dist/src/lib/picker.cjs","dist/src/lib/picker.mjs","dist/src/lib/profilePicker.cjs","dist/src/lib/profilePicker.mjs","dist/src/lib/qrMatrix.cjs","dist/src/lib/qrMatrix.mjs","dist/src/lib/review.cjs","dist/src/lib/review.mjs","dist/src/lib/runDuration.cjs","dist/src/lib/runDuration.mjs","dist/src/lib/syntaxHighlight.cjs","dist/src/lib/syntaxHighlight.mjs","dist/src/lib/tone.cjs","dist/src/lib/tone.mjs","dist/src/theme/apply.cjs","dist/src/theme/apply.mjs","dist/src/theme/builtinThemes.cjs","dist/src/theme/builtinThemes.mjs","dist/src/theme/derive.cjs","dist/src/theme/derive.mjs","dist/src/theme/nativeTheme.cjs","dist/src/theme/nativeTheme.mjs","dist/src/theme/parse.cjs","dist/src/theme/parse.mjs","dist/src/theme/piTheme.cjs","dist/src/theme/piTheme.mjs","dist/src/theme/preference.cjs","dist/src/theme/preference.mjs","dist/src/types/editor.cjs","dist/src/types/editor.mjs","dist/src/types/theme.cjs","dist/src/types/theme.mjs","dist/src/types/tone.cjs","dist/src/types/tone.mjs","dist/text.cjs","dist/text.mjs","dist/theme.cjs","dist/theme.mjs","dist/themes/po-nord-dark.cjs","dist/themes/po-nord-dark.mjs","dist/themes/po-one-light.cjs","dist/themes/po-one-light.mjs","llms.txt","locales/vi.json","locales/zh-CN.json","styles/mcp.css","styles/preview.css","styles/theme.css","styles/tokens.css","themes/po-nord-dark.json","themes/po-one-light.json"],"outputRevision":"32fee9c0f927e232adfbe4467897d318"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../icons/icons.cjs");const e=require("../lib/cn.cjs");let t=require("radix-ui"),n=require("react/jsx-runtime"),r=require("lucide-react");function i({className:i,...a}){return/* @__PURE__ */ (0,n.jsx)(t.Checkbox.Root,{"data-slot":`checkbox`,className:e.cn(`flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-sm border border-po-border bg-po-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/
|
|
1
|
+
require("../icons/icons.cjs");const e=require("../lib/cn.cjs");let t=require("radix-ui"),n=require("react/jsx-runtime"),r=require("lucide-react");function i({className:i,...a}){return/* @__PURE__ */ (0,n.jsx)(t.Checkbox.Root,{"data-slot":`checkbox`,className:e.cn(`flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-sm border border-po-border bg-po-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/70 disabled:pointer-events-none disabled:opacity-40 data-[state=checked]:border-po-green data-[state=indeterminate]:border-po-green`,i),...a,children:/* @__PURE__ */ (0,n.jsx)(t.Checkbox.Indicator,{"data-slot":`checkbox-indicator`,className:`text-po-green`,children:/* @__PURE__ */ (0,n.jsx)(r.Check,{className:`h-2.5 w-2.5`})})})}exports.Checkbox=i;
|
|
2
2
|
//# sourceMappingURL=Checkbox.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.cjs","names":["CheckboxPrimitive","cn","CheckIcon","require_cn","radix_ui","react_jsx_runtime","lucide_react","Checkbox","props","className"],"sources":["../../../src/components/Checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\n\nimport { CheckIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\n\n/** A box that is on, off, or indeterminate; the tick is the accent on the deep well. */\nexport function Checkbox({ className, ...props }: ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-sm border border-po-border bg-po-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/
|
|
1
|
+
{"version":3,"file":"Checkbox.cjs","names":["CheckboxPrimitive","cn","CheckIcon","require_cn","radix_ui","react_jsx_runtime","lucide_react","Checkbox","props","className"],"sources":["../../../src/components/Checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\n\nimport { CheckIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\n\n/** A box that is on, off, or indeterminate; the tick is the accent on the deep well. */\nexport function Checkbox({ className, ...props }: ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-sm border border-po-border bg-po-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/70 disabled:pointer-events-none disabled:opacity-40 data-[state=checked]:border-po-green data-[state=indeterminate]:border-po-green',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator data-slot=\"checkbox-indicator\" className=\"text-po-green\">\n <CheckIcon className=\"h-2.5 w-2.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n"],"mappings":"A,kJAOA,SAAgBO,EAAS,CAAE,YAAW,GAAGC,GAAwD,CAC/F,MACE,iBAAA,EAAAH,EAAA,IAAA,CAACL,EAAAA,SAAkB,KAAnB,CACE,YAAU,WACV,UAAWC,EAAAA,GACT,yUACAQ,CACF,EACA,GAAID,EAEJ,SAAA,iBAAA,EAAAH,EAAA,IAAA,CAACL,EAAAA,SAAkB,UAAnB,CAA6B,YAAU,qBAAqB,UAAU,gBACpE,SAAA,iBAAA,EAAAK,EAAA,IAAA,CAACH,EAAAA,MAAD,CAAW,UAAU,aAAe,CAAA,CACT,CAAA,CACP,CAAA,CAE5B,C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CheckIcon as e}from"../icons/icons.mjs";import{cn as t}from"../lib/cn.mjs";import{Checkbox as n}from"radix-ui";import{jsx as r}from"react/jsx-runtime";function i({className:i,...a}){return/* @__PURE__ */ r(n.Root,{"data-slot":`checkbox`,className:t(`flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-sm border border-po-border bg-po-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/
|
|
1
|
+
import{CheckIcon as e}from"../icons/icons.mjs";import{cn as t}from"../lib/cn.mjs";import{Checkbox as n}from"radix-ui";import{jsx as r}from"react/jsx-runtime";function i({className:i,...a}){return/* @__PURE__ */ r(n.Root,{"data-slot":`checkbox`,className:t(`flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-sm border border-po-border bg-po-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/70 disabled:pointer-events-none disabled:opacity-40 data-[state=checked]:border-po-green data-[state=indeterminate]:border-po-green`,i),...a,children:/* @__PURE__ */ r(n.Indicator,{"data-slot":`checkbox-indicator`,className:`text-po-green`,children:/* @__PURE__ */ r(e,{className:`h-2.5 w-2.5`})})})}export{i as Checkbox};
|
|
2
2
|
//# sourceMappingURL=Checkbox.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.mjs","names":["Checkbox","CheckboxPrimitive","Checkbox$1","props","Checkbox","cn","className","CheckIcon"],"sources":["../../../src/components/Checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\n\nimport { CheckIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\n\n/** A box that is on, off, or indeterminate; the tick is the accent on the deep well. */\nexport function Checkbox({ className, ...props }: ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-sm border border-po-border bg-po-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/
|
|
1
|
+
{"version":3,"file":"Checkbox.mjs","names":["Checkbox","CheckboxPrimitive","Checkbox$1","props","Checkbox","cn","className","CheckIcon"],"sources":["../../../src/components/Checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\n\nimport { CheckIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\n\n/** A box that is on, off, or indeterminate; the tick is the accent on the deep well. */\nexport function Checkbox({ className, ...props }: ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-sm border border-po-border bg-po-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/70 disabled:pointer-events-none disabled:opacity-40 data-[state=checked]:border-po-green data-[state=indeterminate]:border-po-green',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator data-slot=\"checkbox-indicator\" className=\"text-po-green\">\n <CheckIcon className=\"h-2.5 w-2.5\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n"],"mappings":"A,8JAOA,SAAgBA,EAAS,CAAE,YAAW,GAAGG,GAAwD,CAC/F,MACE,kBAACF,EAAkB,KAAnB,CACE,YAAU,WACV,UAAWI,EACT,yUACAC,CACF,EACA,GAAIH,EAEJ,SAAA,kBAACF,EAAkB,UAAnB,CAA6B,YAAU,qBAAqB,UAAU,gBACpE,SAAA,kBAACM,EAAD,CAAW,UAAU,aAAe,CAAA,CACT,CAAA,CACP,CAAA,CAE5B,C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../lib/cn.cjs");let t=require("react/jsx-runtime");const n=(0,require("class-variance-authority").cva)(`min-w-0 pointer-coarse:text-xl text-po-hi outline-none placeholder:text-po-faint disabled:opacity-50 aria-invalid:border-po-edge-red aria-invalid:text-po-red`,{variants:{variant:{default:`rounded border border-po-border bg-po-deep transition-
|
|
1
|
+
const e=require("../lib/cn.cjs");let t=require("react/jsx-runtime");const n=(0,require("class-variance-authority").cva)(`min-w-0 pointer-coarse:text-xl text-po-hi outline-none placeholder:text-po-faint disabled:opacity-50 aria-invalid:border-po-edge-red aria-invalid:text-po-red`,{variants:{variant:{default:`rounded border border-po-border bg-po-deep transition-[color,background-color,border-color,box-shadow] focus:border-po-green/60 focus-visible:ring-2 focus-visible:ring-po-green/70 aria-invalid:focus-visible:ring-po-red/70`,bare:`border-0 bg-transparent`},size:{xs:`min-h-6 px-1.5 py-0.5 text-sm`,sm:`min-h-7 px-2 py-1 text-sm`,md:`min-h-8 px-2.5 py-1.5 text-base`,lg:`min-h-9 px-3 py-1.5 text-base`}},compoundVariants:[{variant:`bare`,class:`min-h-0 p-0`}],defaultVariants:{variant:`default`,size:`md`}});function r({className:r,type:i,variant:a,size:o,...s}){return/* @__PURE__ */ (0,t.jsx)(`input`,{type:i??`text`,"data-slot":`input`,spellCheck:!1,className:e.cn(n({variant:a,size:o}),r),...s})}exports.Input=r,exports.fieldVariants=n;
|
|
2
2
|
//# sourceMappingURL=Input.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.cjs","names":["cva","cn","require_cn","react_jsx_runtime","fieldVariants","Input","props","type","className"],"sources":["../../../src/components/Input.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/**\n * The shape both fields wear, so a single-line and a multi-line field in the\n * same form agree on their well, their type ramp, and their invalid state.\n * Textarea builds on it rather than restating it.\n */\nexport const fieldVariants = cva(\n 'min-w-0 pointer-coarse:text-xl text-po-hi outline-none placeholder:text-po-faint disabled:opacity-50 aria-invalid:border-po-edge-red aria-invalid:text-po-red',\n {\n variants: {\n variant: {\n
|
|
1
|
+
{"version":3,"file":"Input.cjs","names":["cva","cn","require_cn","react_jsx_runtime","fieldVariants","Input","props","type","className"],"sources":["../../../src/components/Input.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/**\n * The shape both fields wear, so a single-line and a multi-line field in the\n * same form agree on their well, their type ramp, and their invalid state.\n * Textarea builds on it rather than restating it.\n */\nexport const fieldVariants = cva(\n 'min-w-0 pointer-coarse:text-xl text-po-hi outline-none placeholder:text-po-faint disabled:opacity-50 aria-invalid:border-po-edge-red aria-invalid:text-po-red',\n {\n variants: {\n variant: {\n // A jade ring at 70%: the lightest that keeps 3:1 against the page in every shipped theme.\n default:\n 'rounded border border-po-border bg-po-deep transition-[color,background-color,border-color,box-shadow] focus:border-po-green/60 focus-visible:ring-2 focus-visible:ring-po-green/70 aria-invalid:focus-visible:ring-po-red/70',\n /** No well: a composer or a palette search that draws its own surface. */\n bare: 'border-0 bg-transparent',\n },\n /** The same rungs Button names, so a field and the button beside it line up. */\n size: {\n xs: 'min-h-6 px-1.5 py-0.5 text-sm',\n sm: 'min-h-7 px-2 py-1 text-sm',\n md: 'min-h-8 px-2.5 py-1.5 text-base',\n lg: 'min-h-9 px-3 py-1.5 text-base',\n },\n },\n compoundVariants: [\n // A bare field sits inside a surface that already has its own padding,\n // so it keeps the size's type ramp and gives up the size's box.\n { variant: 'bare', class: 'min-h-0 p-0' },\n ],\n defaultVariants: { variant: 'default', size: 'md' },\n },\n);\n\nexport type FieldVariant = NonNullable<VariantProps<typeof fieldVariants>['variant']>;\nexport type FieldSize = NonNullable<VariantProps<typeof fieldVariants>['size']>;\n\nexport interface InputProps extends Omit<ComponentProps<'input'>, 'size'>, VariantProps<typeof fieldVariants> {}\n\n/** The one text field: deep well, quiet border, jade ring on focus, red edge when invalid. */\nexport function Input({ className, type, variant, size, ...props }: InputProps) {\n return (\n <input\n type={type ?? 'text'}\n data-slot=\"input\"\n spellCheck={false}\n className={cn(fieldVariants({ variant, size }), className)}\n {...props}\n />\n );\n}\n"],"mappings":"A,oEAUA,MAAaI,GAAA,E,kCAAgBJ,CAAAA,CAAAA,IAAAA,CAC3B,gKACA,CACE,SAAU,CACR,QAAS,CAEP,QACE,gOAEF,KAAM,yBACR,EAEA,KAAM,CACJ,GAAI,gCACJ,GAAI,4BACJ,GAAI,kCACJ,GAAI,+BACN,CACF,EACA,iBAAkB,CAGhB,CAAE,QAAS,OAAQ,MAAO,aAAc,CAC1C,EACA,gBAAiB,CAAE,QAAS,UAAW,KAAM,IAAK,CACpD,CACF,EAQA,SAAgBK,EAAM,CAAE,YAAW,OAAM,UAAS,OAAM,GAAGC,GAAqB,CAC9E,MACE,iBAAA,EAAAH,EAAA,IAAA,CAAC,QAAD,CACE,KAAMI,GAAQ,OACd,YAAU,QACV,WAAY,GACZ,UAAWN,EAAAA,GAAGG,EAAc,CAAE,UAAS,MAAK,CAAC,EAAGI,CAAS,EACzD,GAAIF,CACL,CAAA,CAEL,C"}
|
|
@@ -13,7 +13,7 @@ export declare const fieldVariants: (props?: ({
|
|
|
13
13
|
export type FieldVariant = NonNullable<VariantProps<typeof fieldVariants>['variant']>;
|
|
14
14
|
export type FieldSize = NonNullable<VariantProps<typeof fieldVariants>['size']>;
|
|
15
15
|
export interface InputProps extends Omit<ComponentProps<'input'>, 'size'>, VariantProps<typeof fieldVariants> {}
|
|
16
|
-
/** The one text field: deep well, quiet border,
|
|
16
|
+
/** The one text field: deep well, quiet border, jade ring on focus, red edge when invalid. */
|
|
17
17
|
export declare function Input({ className, type, variant, size, ...props }: InputProps): import("react").JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
//# sourceMappingURL=Input.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.mts","names":[],"sources":["../../../src/components/Input.tsx"],"mappings":";;;;;;;;qBAUa,gBAAa;;;
|
|
1
|
+
{"version":3,"file":"Input.d.mts","names":[],"sources":["../../../src/components/Input.tsx"],"mappings":";;;;;;;;qBAUa,gBAAa;;;6CA0BzB;YAEW,eAAe,YAAY,oBAAoB;YAC/C,YAAY,YAAY,oBAAoB;iBAEvC,mBAAmB,KAAK,kCAAkC,oBAAoB;;wBAG/E,QAAQ,WAAW,MAAM,SAAS,SAAS,SAAS,6BAAU,IAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as e}from"../lib/cn.mjs";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(`min-w-0 pointer-coarse:text-xl text-po-hi outline-none placeholder:text-po-faint disabled:opacity-50 aria-invalid:border-po-edge-red aria-invalid:text-po-red`,{variants:{variant:{default:`rounded border border-po-border bg-po-deep transition-
|
|
1
|
+
import{cn as e}from"../lib/cn.mjs";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(`min-w-0 pointer-coarse:text-xl text-po-hi outline-none placeholder:text-po-faint disabled:opacity-50 aria-invalid:border-po-edge-red aria-invalid:text-po-red`,{variants:{variant:{default:`rounded border border-po-border bg-po-deep transition-[color,background-color,border-color,box-shadow] focus:border-po-green/60 focus-visible:ring-2 focus-visible:ring-po-green/70 aria-invalid:focus-visible:ring-po-red/70`,bare:`border-0 bg-transparent`},size:{xs:`min-h-6 px-1.5 py-0.5 text-sm`,sm:`min-h-7 px-2 py-1 text-sm`,md:`min-h-8 px-2.5 py-1.5 text-base`,lg:`min-h-9 px-3 py-1.5 text-base`}},compoundVariants:[{variant:`bare`,class:`min-h-0 p-0`}],defaultVariants:{variant:`default`,size:`md`}});function i({className:n,type:i,variant:a,size:o,...s}){return/* @__PURE__ */ t(`input`,{type:i??`text`,"data-slot":`input`,spellCheck:!1,className:e(r({variant:a,size:o}),n),...s})}export{i as Input,r as fieldVariants};
|
|
2
2
|
//# sourceMappingURL=Input.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.mjs","names":["fieldVariants","cva","Input","props","type","cn","className"],"sources":["../../../src/components/Input.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/**\n * The shape both fields wear, so a single-line and a multi-line field in the\n * same form agree on their well, their type ramp, and their invalid state.\n * Textarea builds on it rather than restating it.\n */\nexport const fieldVariants = cva(\n 'min-w-0 pointer-coarse:text-xl text-po-hi outline-none placeholder:text-po-faint disabled:opacity-50 aria-invalid:border-po-edge-red aria-invalid:text-po-red',\n {\n variants: {\n variant: {\n
|
|
1
|
+
{"version":3,"file":"Input.mjs","names":["fieldVariants","cva","Input","props","type","cn","className"],"sources":["../../../src/components/Input.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/**\n * The shape both fields wear, so a single-line and a multi-line field in the\n * same form agree on their well, their type ramp, and their invalid state.\n * Textarea builds on it rather than restating it.\n */\nexport const fieldVariants = cva(\n 'min-w-0 pointer-coarse:text-xl text-po-hi outline-none placeholder:text-po-faint disabled:opacity-50 aria-invalid:border-po-edge-red aria-invalid:text-po-red',\n {\n variants: {\n variant: {\n // A jade ring at 70%: the lightest that keeps 3:1 against the page in every shipped theme.\n default:\n 'rounded border border-po-border bg-po-deep transition-[color,background-color,border-color,box-shadow] focus:border-po-green/60 focus-visible:ring-2 focus-visible:ring-po-green/70 aria-invalid:focus-visible:ring-po-red/70',\n /** No well: a composer or a palette search that draws its own surface. */\n bare: 'border-0 bg-transparent',\n },\n /** The same rungs Button names, so a field and the button beside it line up. */\n size: {\n xs: 'min-h-6 px-1.5 py-0.5 text-sm',\n sm: 'min-h-7 px-2 py-1 text-sm',\n md: 'min-h-8 px-2.5 py-1.5 text-base',\n lg: 'min-h-9 px-3 py-1.5 text-base',\n },\n },\n compoundVariants: [\n // A bare field sits inside a surface that already has its own padding,\n // so it keeps the size's type ramp and gives up the size's box.\n { variant: 'bare', class: 'min-h-0 p-0' },\n ],\n defaultVariants: { variant: 'default', size: 'md' },\n },\n);\n\nexport type FieldVariant = NonNullable<VariantProps<typeof fieldVariants>['variant']>;\nexport type FieldSize = NonNullable<VariantProps<typeof fieldVariants>['size']>;\n\nexport interface InputProps extends Omit<ComponentProps<'input'>, 'size'>, VariantProps<typeof fieldVariants> {}\n\n/** The one text field: deep well, quiet border, jade ring on focus, red edge when invalid. */\nexport function Input({ className, type, variant, size, ...props }: InputProps) {\n return (\n <input\n type={type ?? 'text'}\n data-slot=\"input\"\n spellCheck={false}\n className={cn(fieldVariants({ variant, size }), className)}\n {...props}\n />\n );\n}\n"],"mappings":"A,0HAUA,MAAaA,EAAgBC,EAC3B,gKACA,CACE,SAAU,CACR,QAAS,CAEP,QACE,gOAEF,KAAM,yBACR,EAEA,KAAM,CACJ,GAAI,gCACJ,GAAI,4BACJ,GAAI,kCACJ,GAAI,+BACN,CACF,EACA,iBAAkB,CAGhB,CAAE,QAAS,OAAQ,MAAO,aAAc,CAC1C,EACA,gBAAiB,CAAE,QAAS,UAAW,KAAM,IAAK,CACpD,CACF,EAQA,SAAgBC,EAAM,CAAE,YAAW,OAAM,UAAS,OAAM,GAAGC,GAAqB,CAC9E,MACE,kBAAC,QAAD,CACE,KAAMC,GAAQ,OACd,YAAU,QACV,WAAY,GACZ,UAAWC,EAAGL,EAAc,CAAE,UAAS,MAAK,CAAC,EAAGM,CAAS,EACzD,GAAIH,CACL,CAAA,CAEL,C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../lib/cn.cjs");let t=require("radix-ui"),n=require("react/jsx-runtime");function r({className:r,...i}){return/* @__PURE__ */ (0,n.jsx)(t.RadioGroup.Root,{"data-slot":`radio-group`,className:e.cn(`flex flex-col gap-2`,r),...i})}function i({className:r,...i}){return/* @__PURE__ */ (0,n.jsx)(t.RadioGroup.Item,{"data-slot":`radio-group-item`,className:e.cn(`flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-full border border-po-border bg-po-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/
|
|
1
|
+
const e=require("../lib/cn.cjs");let t=require("radix-ui"),n=require("react/jsx-runtime");function r({className:r,...i}){return/* @__PURE__ */ (0,n.jsx)(t.RadioGroup.Root,{"data-slot":`radio-group`,className:e.cn(`flex flex-col gap-2`,r),...i})}function i({className:r,...i}){return/* @__PURE__ */ (0,n.jsx)(t.RadioGroup.Item,{"data-slot":`radio-group-item`,className:e.cn(`flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-full border border-po-border bg-po-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/70 disabled:pointer-events-none disabled:opacity-40 data-[state=checked]:border-po-green`,r),...i,children:/* @__PURE__ */ (0,n.jsx)(t.RadioGroup.Indicator,{"data-slot":`radio-group-indicator`,className:`block h-1.5 w-1.5 rounded-full bg-po-green`})})}function a({className:r,...i}){return/* @__PURE__ */ (0,n.jsx)(t.RadioGroup.Item,{"data-slot":`radio-group-card`,className:e.cn(`cursor-pointer rounded-md border border-po-border bg-po-panel p-2 text-left outline-none transition-colors hover:border-po-green/50 focus-visible:ring-2 focus-visible:ring-po-green/70 data-[state=checked]:border-po-green data-[state=checked]:bg-po-tint-green`,r),...i})}exports.RadioGroup=r,exports.RadioGroupCard=a,exports.RadioGroupItem=i;
|
|
2
2
|
//# sourceMappingURL=RadioGroup.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.cjs","names":["RadioGroupPrimitive","cn","require_cn","radix_ui","react_jsx_runtime","RadioGroup","props","className","RadioGroupItem","RadioGroupCard"],"sources":["../../../src/components/RadioGroup.tsx"],"sourcesContent":["import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/** One choice out of several; Radix owns the arrow-key roving focus a native group has. */\nexport function RadioGroup({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root data-slot=\"radio-group\" className={cn('flex flex-col gap-2', className)} {...props} />\n );\n}\n\nexport function RadioGroupItem({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n 'flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-full border border-po-border bg-po-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/
|
|
1
|
+
{"version":3,"file":"RadioGroup.cjs","names":["RadioGroupPrimitive","cn","require_cn","radix_ui","react_jsx_runtime","RadioGroup","props","className","RadioGroupItem","RadioGroupCard"],"sources":["../../../src/components/RadioGroup.tsx"],"sourcesContent":["import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/** One choice out of several; Radix owns the arrow-key roving focus a native group has. */\nexport function RadioGroup({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root data-slot=\"radio-group\" className={cn('flex flex-col gap-2', className)} {...props} />\n );\n}\n\nexport function RadioGroupItem({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n 'flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-full border border-po-border bg-po-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/70 disabled:pointer-events-none disabled:opacity-40 data-[state=checked]:border-po-green',\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"block h-1.5 w-1.5 rounded-full bg-po-green\"\n />\n </RadioGroupPrimitive.Item>\n );\n}\n\n/**\n * A whole card that is one radio choice: the theme picker, where the target is\n * the preview rather than a dot. Radix keeps the roving focus and the checked\n * state; the card supplies the frame.\n */\nexport function RadioGroupCard({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-card\"\n className={cn(\n 'cursor-pointer rounded-md border border-po-border bg-po-panel p-2 text-left outline-none transition-colors hover:border-po-green/50 focus-visible:ring-2 focus-visible:ring-po-green/70 data-[state=checked]:border-po-green data-[state=checked]:bg-po-tint-green',\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"A,0FAMA,SAAgBK,EAAW,CAAE,YAAW,GAAGC,GAA0D,CACnG,MACE,iBAAA,EAAAF,EAAA,IAAA,CAACJ,EAAAA,WAAoB,KAArB,CAA0B,YAAU,cAAc,UAAWC,EAAAA,GAAG,sBAAuBM,CAAS,EAAG,GAAID,CAAQ,CAAA,CAEnH,CAEA,SAAgBE,EAAe,CAAE,YAAW,GAAGF,GAA0D,CACvG,MACE,iBAAA,EAAAF,EAAA,IAAA,CAACJ,EAAAA,WAAoB,KAArB,CACE,YAAU,mBACV,UAAWC,EAAAA,GACT,gSACAM,CACF,EACA,GAAID,EAEJ,SAAA,iBAAA,EAAAF,EAAA,IAAA,CAACJ,EAAAA,WAAoB,UAArB,CACE,YAAU,wBACV,UAAU,4CACX,CAAA,CACuB,CAAA,CAE9B,CAOA,SAAgBS,EAAe,CAAE,YAAW,GAAGH,GAA0D,CACvG,MACE,iBAAA,EAAAF,EAAA,IAAA,CAACJ,EAAAA,WAAoB,KAArB,CACE,YAAU,mBACV,UAAWC,EAAAA,GACT,qQACAM,CACF,EACA,GAAID,CACL,CAAA,CAEL,C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as e}from"../lib/cn.mjs";import{RadioGroup as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function r({className:r,...i}){return/* @__PURE__ */ n(t.Root,{"data-slot":`radio-group`,className:e(`flex flex-col gap-2`,r),...i})}function i({className:r,...i}){return/* @__PURE__ */ n(t.Item,{"data-slot":`radio-group-item`,className:e(`flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-full border border-po-border bg-po-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/
|
|
1
|
+
import{cn as e}from"../lib/cn.mjs";import{RadioGroup as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function r({className:r,...i}){return/* @__PURE__ */ n(t.Root,{"data-slot":`radio-group`,className:e(`flex flex-col gap-2`,r),...i})}function i({className:r,...i}){return/* @__PURE__ */ n(t.Item,{"data-slot":`radio-group-item`,className:e(`flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-full border border-po-border bg-po-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/70 disabled:pointer-events-none disabled:opacity-40 data-[state=checked]:border-po-green`,r),...i,children:/* @__PURE__ */ n(t.Indicator,{"data-slot":`radio-group-indicator`,className:`block h-1.5 w-1.5 rounded-full bg-po-green`})})}function a({className:r,...i}){return/* @__PURE__ */ n(t.Item,{"data-slot":`radio-group-card`,className:e(`cursor-pointer rounded-md border border-po-border bg-po-panel p-2 text-left outline-none transition-colors hover:border-po-green/50 focus-visible:ring-2 focus-visible:ring-po-green/70 data-[state=checked]:border-po-green data-[state=checked]:bg-po-tint-green`,r),...i})}export{r as RadioGroup,a as RadioGroupCard,i as RadioGroupItem};
|
|
2
2
|
//# sourceMappingURL=RadioGroup.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.mjs","names":["RadioGroup","RadioGroupPrimitive","RadioGroup$1","props","RadioGroup","cn","className","RadioGroupItem","RadioGroupCard"],"sources":["../../../src/components/RadioGroup.tsx"],"sourcesContent":["import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/** One choice out of several; Radix owns the arrow-key roving focus a native group has. */\nexport function RadioGroup({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root data-slot=\"radio-group\" className={cn('flex flex-col gap-2', className)} {...props} />\n );\n}\n\nexport function RadioGroupItem({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n 'flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-full border border-po-border bg-po-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/
|
|
1
|
+
{"version":3,"file":"RadioGroup.mjs","names":["RadioGroup","RadioGroupPrimitive","RadioGroup$1","props","RadioGroup","cn","className","RadioGroupItem","RadioGroupCard"],"sources":["../../../src/components/RadioGroup.tsx"],"sourcesContent":["import { RadioGroup as RadioGroupPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/** One choice out of several; Radix owns the arrow-key roving focus a native group has. */\nexport function RadioGroup({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root data-slot=\"radio-group\" className={cn('flex flex-col gap-2', className)} {...props} />\n );\n}\n\nexport function RadioGroupItem({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n 'flex h-3.5 w-3.5 shrink-0 cursor-pointer items-center justify-center rounded-full border border-po-border bg-po-deep outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/70 disabled:pointer-events-none disabled:opacity-40 data-[state=checked]:border-po-green',\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"block h-1.5 w-1.5 rounded-full bg-po-green\"\n />\n </RadioGroupPrimitive.Item>\n );\n}\n\n/**\n * A whole card that is one radio choice: the theme picker, where the target is\n * the preview rather than a dot. Radix keeps the roving focus and the checked\n * state; the card supplies the frame.\n */\nexport function RadioGroupCard({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-card\"\n className={cn(\n 'cursor-pointer rounded-md border border-po-border bg-po-panel p-2 text-left outline-none transition-colors hover:border-po-green/50 focus-visible:ring-2 focus-visible:ring-po-green/70 data-[state=checked]:border-po-green data-[state=checked]:bg-po-tint-green',\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"A,iHAMA,SAAgBA,EAAW,CAAE,YAAW,GAAGG,GAA0D,CACnG,MACE,kBAACF,EAAoB,KAArB,CAA0B,YAAU,cAAc,UAAWI,EAAG,sBAAuBC,CAAS,EAAG,GAAIH,CAAQ,CAAA,CAEnH,CAEA,SAAgBI,EAAe,CAAE,YAAW,GAAGJ,GAA0D,CACvG,MACE,kBAACF,EAAoB,KAArB,CACE,YAAU,mBACV,UAAWI,EACT,gSACAC,CACF,EACA,GAAIH,EAEJ,SAAA,kBAACF,EAAoB,UAArB,CACE,YAAU,wBACV,UAAU,4CACX,CAAA,CACuB,CAAA,CAE9B,CAOA,SAAgBO,EAAe,CAAE,YAAW,GAAGL,GAA0D,CACvG,MACE,kBAACF,EAAoB,KAArB,CACE,YAAU,mBACV,UAAWI,EACT,qQACAC,CACF,EACA,GAAIH,CACL,CAAA,CAEL,C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
require("../icons/icons.cjs");const e=require("../lib/cn.cjs"),t=require("./Button.cjs");let n=require("radix-ui"),r=require("react/jsx-runtime"),i=require("@agimon-ai/po-core/web"),
|
|
1
|
+
require("../icons/icons.cjs");const e=require("../lib/cn.cjs"),t=require("./Button.cjs");let n=require("radix-ui"),r=require("react/jsx-runtime"),i=require("react"),a=require("@agimon-ai/po-core/web"),o=require("lucide-react");const s=(0,i.createContext)(void 0);function c(e){let t=e.onOpenChange===void 0?void 0:t=>e.onOpenChange?.(t);return/* @__PURE__ */ (0,r.jsx)(s.Provider,{value:t,children:/* @__PURE__ */ (0,r.jsx)(n.Dialog.Root,{"data-slot":`sheet`,...e,onOpenChange:t})})}function l(e){return/* @__PURE__ */ (0,r.jsx)(n.Dialog.Trigger,{"data-slot":`sheet-trigger`,...e})}function u(e){return/* @__PURE__ */ (0,r.jsx)(n.Dialog.Close,{"data-slot":`sheet-close`,...e})}function d({className:t,onPointerDownCapture:a,...o}){let c=(0,i.useContext)(s);return/* @__PURE__ */ (0,r.jsx)(n.Dialog.Overlay,{"data-slot":`sheet-overlay`,className:e.cn(`fixed inset-0 z-40 bg-po-deep/70 data-[state=open]:animate-po-fade`,t),onPointerDownCapture:e=>{if(a?.(e),e.defaultPrevented||c===void 0)return;let t=e.currentTarget.nextElementSibling;if(t?.querySelector(`[data-slot="select-trigger"][data-state="open"]`)==null)return;let n=t?.getBoundingClientRect();n&&e.clientX>=n.left&&e.clientX<=n.right&&e.clientY>=n.top&&e.clientY<=n.bottom||(e.stopPropagation(),c(!1))},...o})}const f={right:`inset-y-0 right-0 max-w-[calc(100vw-24px)] border-l data-[state=open]:animate-po-slide-right`,left:`inset-y-0 left-0 max-w-[calc(100vw-24px)] border-r data-[state=open]:animate-po-slide-left`,bottom:`inset-x-0 bottom-0 mx-auto w-full max-w-2xl max-h-[min(85dvh,680px)] rounded-t-lg border-x border-t border-b-0 data-[state=open]:animate-po-slide-up`},p={sm:`w-[360px]`,md:`w-[440px]`,lg:`w-[560px]`};function m({className:t,children:i,side:a=`right`,width:o=`md`,container:s,...c}){return/* @__PURE__ */ (0,r.jsxs)(n.Dialog.Portal,{container:s,children:[/* @__PURE__ */ (0,r.jsx)(d,{}),/* @__PURE__ */ (0,r.jsxs)(n.Dialog.Content,{"data-slot":`sheet-content`,"data-side":a,className:e.cn(`fixed z-50 flex flex-col overflow-hidden border-po-border bg-po-rail shadow-2xl outline-none`,f[a],a===`bottom`?void 0:p[o],t),...c,children:[a===`bottom`?/* @__PURE__ */ (0,r.jsx)(`div`,{"data-slot":`sheet-handle`,className:`flex shrink-0 justify-center bg-po-rail pt-2.5 pb-1`,children:/* @__PURE__ */ (0,r.jsx)(`span`,{"aria-hidden":`true`,className:`h-1 w-10 rounded-full bg-po-border`})}):null,i]})]})}function h({className:i,dismissible:s=!0,closeLabel:c,children:l,...u}){let d=(0,a.useT)();return/* @__PURE__ */ (0,r.jsxs)(`div`,{"data-slot":`sheet-header`,className:e.cn(`flex h-11 min-w-0 shrink-0 items-center gap-2.5 border-b border-po-border px-4`,i),...u,children:[l,s?/* @__PURE__ */ (0,r.jsx)(n.Dialog.Close,{asChild:!0,children:/* @__PURE__ */ (0,r.jsx)(t.Button,{variant:`ghost`,size:`icon`,"aria-label":c??d(`webComponents.dialog.close`,`close`),className:`ml-auto text-po-faint hover:text-po-hi`,children:/* @__PURE__ */ (0,r.jsx)(o.X,{className:`h-3 w-3`})})}):null]})}function g({className:t,...i}){return/* @__PURE__ */ (0,r.jsx)(n.Dialog.Title,{"data-slot":`sheet-title`,className:e.cn(`truncate text-lg font-semibold text-po-hi`,t),...i})}function _({className:t,...i}){return/* @__PURE__ */ (0,r.jsx)(n.Dialog.Description,{"data-slot":`sheet-description`,className:e.cn(`text-sm leading-relaxed text-po-dim`,t),...i})}function v({className:t,...n}){return/* @__PURE__ */ (0,r.jsx)(`div`,{"data-slot":`sheet-body`,className:e.cn(`flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-4 py-3`,t),...n})}function y({className:t,...n}){return/* @__PURE__ */ (0,r.jsx)(`div`,{"data-slot":`sheet-footer`,className:e.cn(`flex min-h-[34px] shrink-0 flex-wrap items-center justify-between gap-2 border-t border-po-border-soft bg-po-deep px-4 py-1.5`,t),...n})}exports.Sheet=c,exports.SheetBody=v,exports.SheetClose=u,exports.SheetContent=m,exports.SheetDescription=_,exports.SheetFooter=y,exports.SheetHeader=h,exports.SheetOverlay=d,exports.SheetTitle=g,exports.SheetTrigger=l;
|
|
2
2
|
//# sourceMappingURL=Sheet.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sheet.cjs","names":["SheetPrimitive","cn","useT","Button","CloseIcon","require_cn","require_Button","radix_ui","react_jsx_runtime","_agimon_ai_po_core_web","lucide_react","Sheet","props","SheetTrigger","SheetClose","SheetOverlay","className","SIDE_POSITION","CONTENT_WIDTH","SheetContent","side","width","SheetHeader","t","children","dismissible","closeLabel","SheetTitle","SheetDescription","SheetBody","SheetFooter"],"sources":["../../../src/components/Sheet.tsx"],"sourcesContent":["import { useT } from '@agimon-ai/po-core/web';\nimport { Dialog as SheetPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\n\nimport { CloseIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\nimport { Button } from './Button';\n\n/**\n * A side panel on Radix's Dialog: an overlay that slides in from an edge,\n * with the focus trap, Escape, outside click and scroll lock a dialog has.\n *\n * It is the Dialog for content that reads as a column rather than a form: a\n * detail view beside what the reader was looking at. An inline aside cannot\n * do this, because it takes width from the surface underneath it.\n */\nexport function Sheet(props: ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\nexport function SheetTrigger(props: ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\nexport function SheetClose(props: ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\nexport function SheetOverlay({ className, ...props }: ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn('fixed inset-0 z-40 bg-po-deep/70 data-[state=open]:animate-po-fade', className)}\n {...props}\n />\n );\n}\n\nconst SIDE_POSITION = {\n right: 'inset-y-0 right-0 border-l data-[state=open]:animate-po-slide-right',\n left: 'inset-y-0 left-0 border-r data-[state=open]:animate-po-slide-left',\n} as const;\n\nexport interface SheetContentProps extends ComponentProps<typeof SheetPrimitive.Content> {\n /** Which edge it comes from. */\n side?: 'right' | 'left';\n /** Width preset; `className` may still override. */\n width?: 'sm' | 'md' | 'lg';\n}\n\nconst CONTENT_WIDTH = { sm: 'w-[360px]', md: 'w-[440px]', lg: 'w-[560px]' } as const;\n\nexport function SheetContent({ className, children, side = 'right', width = 'md', ...props }: SheetContentProps) {\n return (\n <SheetPrimitive.Portal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n data-side={side}\n className={cn(\n 'fixed z-50 flex max-w-[calc(100vw-24px)] flex-col overflow-hidden border-po-border bg-po-rail shadow-2xl outline-none',\n SIDE_POSITION[side],\n CONTENT_WIDTH[width],\n className,\n )}\n {...props}\n >\n {children}\n </SheetPrimitive.Content>\n </SheetPrimitive.Portal>\n );\n}\n\nexport interface SheetHeaderProps extends ComponentProps<'div'> {\n /** Show the close control at the right of the strip. On by default: a sheet is dismissed, not answered. */\n dismissible?: boolean;\n /** What the close control announces. */\n closeLabel?: string;\n}\n\nexport function SheetHeader({ className, dismissible = true, closeLabel, children, ...props }: SheetHeaderProps) {\n const t = useT();\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn('flex h-11 min-w-0 shrink-0 items-center gap-2.5 border-b border-po-border px-4', className)}\n {...props}\n >\n {children}\n {dismissible ? (\n <SheetPrimitive.Close asChild>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n aria-label={closeLabel ?? t('webComponents.dialog.close', 'close')}\n className=\"ml-auto text-po-faint hover:text-po-hi\"\n >\n <CloseIcon className=\"h-3 w-3\" />\n </Button>\n </SheetPrimitive.Close>\n ) : null}\n </div>\n );\n}\n\nexport function SheetTitle({ className, ...props }: ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn('truncate text-lg font-semibold text-po-hi', className)}\n {...props}\n />\n );\n}\n\nexport function SheetDescription({ className, ...props }: ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn('text-sm leading-relaxed text-po-dim', className)}\n {...props}\n />\n );\n}\n\nexport function SheetBody({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sheet-body\"\n className={cn('flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-4 py-3', className)}\n {...props}\n />\n );\n}\n\nexport function SheetFooter({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn(\n 'flex min-h-[34px] shrink-0 flex-wrap items-center justify-between gap-2 border-t border-po-border-soft bg-po-deep px-4 py-1.5',\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"Sheet.cjs","names":["createContext","SheetPrimitive","useContext","cn","useT","Button","CloseIcon","require_cn","require_Button","radix_ui","react_jsx_runtime","react","_agimon_ai_po_core_web","lucide_react","SheetOpenChangeContext","Sheet","onOpenChange","props","open","SheetTrigger","SheetClose","SheetOverlay","className","onPointerDownCapture","event","sheetContent","bounds","SIDE_POSITION","CONTENT_WIDTH","SheetContent","side","width","children","SheetHeader","t","dismissible","closeLabel","SheetTitle","SheetDescription","SheetBody","SheetFooter"],"sources":["../../../src/components/Sheet.tsx"],"sourcesContent":["import { useT } from '@agimon-ai/po-core/web';\nimport { Dialog as SheetPrimitive } from 'radix-ui';\nimport { createContext, type ComponentProps, useContext } from 'react';\n\nimport { CloseIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\nimport { Button } from './Button';\n\nconst SheetOpenChangeContext = createContext<((open: boolean) => void) | undefined>(undefined);\n\n/**\n * A panel on Radix's Dialog: an overlay that slides in from a side or bottom edge,\n * with the focus trap, Escape, outside click and scroll lock a dialog has.\n *\n * It is the Dialog for content that reads as a panel or sheet rather than a centered\n * form: a detail view or settings sheet over what the reader was looking at, without\n * taking layout width from the surface underneath it.\n */\nexport function Sheet(props: ComponentProps<typeof SheetPrimitive.Root>) {\n const onOpenChange = props.onOpenChange === undefined ? undefined : (open: boolean) => props.onOpenChange?.(open);\n return (\n <SheetOpenChangeContext.Provider value={onOpenChange}>\n <SheetPrimitive.Root data-slot=\"sheet\" {...props} onOpenChange={onOpenChange} />\n </SheetOpenChangeContext.Provider>\n );\n}\n\nexport function SheetTrigger(props: ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\nexport function SheetClose(props: ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\nexport function SheetOverlay({\n className,\n onPointerDownCapture,\n ...props\n}: ComponentProps<typeof SheetPrimitive.Overlay>) {\n const onOpenChange = useContext(SheetOpenChangeContext);\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn('fixed inset-0 z-40 bg-po-deep/70 data-[state=open]:animate-po-fade', className)}\n onPointerDownCapture={(event) => {\n onPointerDownCapture?.(event);\n if (event.defaultPrevented || onOpenChange === undefined) return;\n const sheetContent = event.currentTarget.nextElementSibling;\n const openSelectTrigger = sheetContent?.querySelector('[data-slot=\"select-trigger\"][data-state=\"open\"]');\n if (openSelectTrigger === null || openSelectTrigger === undefined) return;\n // An open Select disables pointer events on the sheet; an inside press falls through to this overlay.\n const bounds = sheetContent?.getBoundingClientRect();\n if (\n bounds &&\n event.clientX >= bounds.left &&\n event.clientX <= bounds.right &&\n event.clientY >= bounds.top &&\n event.clientY <= bounds.bottom\n )\n return;\n\n // Radix's parent outside listener can lag one render behind a nested\n // modal Select. Own this backdrop press so the complete stack closes.\n event.stopPropagation();\n onOpenChange(false);\n }}\n {...props}\n />\n );\n}\n\nconst SIDE_POSITION = {\n right: 'inset-y-0 right-0 max-w-[calc(100vw-24px)] border-l data-[state=open]:animate-po-slide-right',\n left: 'inset-y-0 left-0 max-w-[calc(100vw-24px)] border-r data-[state=open]:animate-po-slide-left',\n bottom:\n 'inset-x-0 bottom-0 mx-auto w-full max-w-2xl max-h-[min(85dvh,680px)] rounded-t-lg border-x border-t border-b-0 data-[state=open]:animate-po-slide-up',\n} as const;\n\nexport interface SheetContentProps extends ComponentProps<typeof SheetPrimitive.Content> {\n /** Which edge it comes from. */\n side?: 'right' | 'left' | 'bottom';\n /** Width preset for left/right sheets; ignored when `side=\"bottom\"`. `className` may still override. */\n width?: 'sm' | 'md' | 'lg';\n /** Portal mount target; defaults to `document.body`. */\n container?: HTMLElement | null;\n}\n\nconst CONTENT_WIDTH = { sm: 'w-[360px]', md: 'w-[440px]', lg: 'w-[560px]' } as const;\n\nexport function SheetContent({\n className,\n children,\n side = 'right',\n width = 'md',\n container,\n ...props\n}: SheetContentProps) {\n return (\n <SheetPrimitive.Portal container={container}>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n data-side={side}\n className={cn(\n 'fixed z-50 flex flex-col overflow-hidden border-po-border bg-po-rail shadow-2xl outline-none',\n SIDE_POSITION[side],\n side === 'bottom' ? undefined : CONTENT_WIDTH[width],\n className,\n )}\n {...props}\n >\n {side === 'bottom' ? (\n <div data-slot=\"sheet-handle\" className=\"flex shrink-0 justify-center bg-po-rail pt-2.5 pb-1\">\n <span aria-hidden=\"true\" className=\"h-1 w-10 rounded-full bg-po-border\" />\n </div>\n ) : null}\n {children}\n </SheetPrimitive.Content>\n </SheetPrimitive.Portal>\n );\n}\n\nexport interface SheetHeaderProps extends ComponentProps<'div'> {\n /** Show the close control at the right of the strip. On by default: a sheet is dismissed, not answered. */\n dismissible?: boolean;\n /** What the close control announces. */\n closeLabel?: string;\n}\n\nexport function SheetHeader({ className, dismissible = true, closeLabel, children, ...props }: SheetHeaderProps) {\n const t = useT();\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn('flex h-11 min-w-0 shrink-0 items-center gap-2.5 border-b border-po-border px-4', className)}\n {...props}\n >\n {children}\n {dismissible ? (\n <SheetPrimitive.Close asChild>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n aria-label={closeLabel ?? t('webComponents.dialog.close', 'close')}\n className=\"ml-auto text-po-faint hover:text-po-hi\"\n >\n <CloseIcon className=\"h-3 w-3\" />\n </Button>\n </SheetPrimitive.Close>\n ) : null}\n </div>\n );\n}\n\nexport function SheetTitle({ className, ...props }: ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn('truncate text-lg font-semibold text-po-hi', className)}\n {...props}\n />\n );\n}\n\nexport function SheetDescription({ className, ...props }: ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn('text-sm leading-relaxed text-po-dim', className)}\n {...props}\n />\n );\n}\n\nexport function SheetBody({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sheet-body\"\n className={cn('flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-4 py-3', className)}\n {...props}\n />\n );\n}\n\nexport function SheetFooter({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn(\n 'flex min-h-[34px] shrink-0 flex-wrap items-center justify-between gap-2 border-t border-po-border-soft bg-po-deep px-4 py-1.5',\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"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"}
|
|
@@ -2,24 +2,26 @@ import { Dialog } from "radix-ui";
|
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
3
|
//#region src/components/Sheet.d.ts
|
|
4
4
|
/**
|
|
5
|
-
* A
|
|
5
|
+
* A panel on Radix's Dialog: an overlay that slides in from a side or bottom edge,
|
|
6
6
|
* with the focus trap, Escape, outside click and scroll lock a dialog has.
|
|
7
7
|
*
|
|
8
|
-
* It is the Dialog for content that reads as a
|
|
9
|
-
* detail view
|
|
10
|
-
*
|
|
8
|
+
* It is the Dialog for content that reads as a panel or sheet rather than a centered
|
|
9
|
+
* form: a detail view or settings sheet over what the reader was looking at, without
|
|
10
|
+
* taking layout width from the surface underneath it.
|
|
11
11
|
*/
|
|
12
12
|
export declare function Sheet(props: ComponentProps<typeof Dialog.Root>): import("react").JSX.Element;
|
|
13
13
|
export declare function SheetTrigger(props: ComponentProps<typeof Dialog.Trigger>): import("react").JSX.Element;
|
|
14
14
|
export declare function SheetClose(props: ComponentProps<typeof Dialog.Close>): import("react").JSX.Element;
|
|
15
|
-
export declare function SheetOverlay({ className, ...props }: ComponentProps<typeof Dialog.Overlay>): import("react").JSX.Element;
|
|
15
|
+
export declare function SheetOverlay({ className, onPointerDownCapture, ...props }: ComponentProps<typeof Dialog.Overlay>): import("react").JSX.Element;
|
|
16
16
|
export interface SheetContentProps extends ComponentProps<typeof Dialog.Content> {
|
|
17
17
|
/** Which edge it comes from. */
|
|
18
|
-
side?: 'right' | 'left';
|
|
19
|
-
/** Width preset; `className` may still override. */
|
|
18
|
+
side?: 'right' | 'left' | 'bottom';
|
|
19
|
+
/** Width preset for left/right sheets; ignored when `side="bottom"`. `className` may still override. */
|
|
20
20
|
width?: 'sm' | 'md' | 'lg';
|
|
21
|
+
/** Portal mount target; defaults to `document.body`. */
|
|
22
|
+
container?: HTMLElement | null;
|
|
21
23
|
}
|
|
22
|
-
export declare function SheetContent({ className, children, side, width, ...props }: SheetContentProps): import("react").JSX.Element;
|
|
24
|
+
export declare function SheetContent({ className, children, side, width, container, ...props }: SheetContentProps): import("react").JSX.Element;
|
|
23
25
|
export interface SheetHeaderProps extends ComponentProps<'div'> {
|
|
24
26
|
/** Show the close control at the right of the strip. On by default: a sheet is dismissed, not answered. */
|
|
25
27
|
dismissible?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sheet.d.mts","names":["SheetPrimitive"],"sources":["../../../src/components/Sheet.tsx"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Sheet.d.mts","names":["SheetPrimitive"],"sources":["../../../src/components/Sheet.tsx"],"mappings":";;;;;;;;;;;wBAkBgB,MAAM,OAAO,sBAAsBA,OAAe,wBAAK,IAAA;wBASvD,aAAa,OAAO,sBAAsBA,OAAe,2BAAQ,IAAA;wBAIjE,WAAW,OAAO,sBAAsBA,OAAe,yBAAM,IAAA;wBAI7D,eACd,WACA,yBACG,SACF,sBAAsBA,OAAe,2BAAQ,IAAA;iBAwC/B,0BAA0B,sBAAsBA,OAAe;;EAE9E;;EAEA;;EAEA,YAAY;;wBAKE,eACd,WACA,UACA,MACA,OACA,cACG,SACF,oCAAiB,IAAA;iBA0BH,yBAAyB;;EAExC;;EAEA;;wBAGc,cAAc,WAAW,aAAoB,YAAY,aAAa,SAAS,mCAAgB,IAAA;wBAyB/F,aAAa,cAAc,SAAS,sBAAsBA,OAAe,yBAAM,IAAA;wBAU/E,mBAAmB,cAAc,SAAS,sBAAsBA,OAAe,+BAAY,IAAA;wBAU3F,YAAY,cAAc,SAAS,wCAAqB,IAAA;wBAUxD,cAAc,cAAc,SAAS,wCAAqB,IAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{CloseIcon as e}from"../icons/icons.mjs";import{cn as t}from"../lib/cn.mjs";import{Button as n}from"./Button.mjs";import{Dialog as r}from"radix-ui";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{
|
|
1
|
+
import{CloseIcon as e}from"../icons/icons.mjs";import{cn as t}from"../lib/cn.mjs";import{Button as n}from"./Button.mjs";import{Dialog as r}from"radix-ui";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{createContext as o,useContext as s}from"react";import{useT as c}from"@agimon-ai/po-core/web";const l=o(void 0);function u(e){let t=e.onOpenChange===void 0?void 0:t=>e.onOpenChange?.(t);return/* @__PURE__ */ i(l.Provider,{value:t,children:/* @__PURE__ */ i(r.Root,{"data-slot":`sheet`,...e,onOpenChange:t})})}function d(e){return/* @__PURE__ */ i(r.Trigger,{"data-slot":`sheet-trigger`,...e})}function f(e){return/* @__PURE__ */ i(r.Close,{"data-slot":`sheet-close`,...e})}function p({className:e,onPointerDownCapture:n,...a}){let o=s(l);return/* @__PURE__ */ i(r.Overlay,{"data-slot":`sheet-overlay`,className:t(`fixed inset-0 z-40 bg-po-deep/70 data-[state=open]:animate-po-fade`,e),onPointerDownCapture:e=>{if(n?.(e),e.defaultPrevented||o===void 0)return;let t=e.currentTarget.nextElementSibling;if(t?.querySelector(`[data-slot="select-trigger"][data-state="open"]`)==null)return;let r=t?.getBoundingClientRect();r&&e.clientX>=r.left&&e.clientX<=r.right&&e.clientY>=r.top&&e.clientY<=r.bottom||(e.stopPropagation(),o(!1))},...a})}const m={right:`inset-y-0 right-0 max-w-[calc(100vw-24px)] border-l data-[state=open]:animate-po-slide-right`,left:`inset-y-0 left-0 max-w-[calc(100vw-24px)] border-r data-[state=open]:animate-po-slide-left`,bottom:`inset-x-0 bottom-0 mx-auto w-full max-w-2xl max-h-[min(85dvh,680px)] rounded-t-lg border-x border-t border-b-0 data-[state=open]:animate-po-slide-up`},h={sm:`w-[360px]`,md:`w-[440px]`,lg:`w-[560px]`};function g({className:e,children:n,side:o=`right`,width:s=`md`,container:c,...l}){return/* @__PURE__ */ a(r.Portal,{container:c,children:[/* @__PURE__ */ i(p,{}),/* @__PURE__ */ a(r.Content,{"data-slot":`sheet-content`,"data-side":o,className:t(`fixed z-50 flex flex-col overflow-hidden border-po-border bg-po-rail shadow-2xl outline-none`,m[o],o===`bottom`?void 0:h[s],e),...l,children:[o===`bottom`?/* @__PURE__ */ i(`div`,{"data-slot":`sheet-handle`,className:`flex shrink-0 justify-center bg-po-rail pt-2.5 pb-1`,children:/* @__PURE__ */ i(`span`,{"aria-hidden":`true`,className:`h-1 w-10 rounded-full bg-po-border`})}):null,n]})]})}function _({className:o,dismissible:s=!0,closeLabel:l,children:u,...d}){let f=c();return/* @__PURE__ */ a(`div`,{"data-slot":`sheet-header`,className:t(`flex h-11 min-w-0 shrink-0 items-center gap-2.5 border-b border-po-border px-4`,o),...d,children:[u,s?/* @__PURE__ */ i(r.Close,{asChild:!0,children:/* @__PURE__ */ i(n,{variant:`ghost`,size:`icon`,"aria-label":l??f(`webComponents.dialog.close`,`close`),className:`ml-auto text-po-faint hover:text-po-hi`,children:/* @__PURE__ */ i(e,{className:`h-3 w-3`})})}):null]})}function v({className:e,...n}){return/* @__PURE__ */ i(r.Title,{"data-slot":`sheet-title`,className:t(`truncate text-lg font-semibold text-po-hi`,e),...n})}function y({className:e,...n}){return/* @__PURE__ */ i(r.Description,{"data-slot":`sheet-description`,className:t(`text-sm leading-relaxed text-po-dim`,e),...n})}function b({className:e,...n}){return/* @__PURE__ */ i(`div`,{"data-slot":`sheet-body`,className:t(`flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-4 py-3`,e),...n})}function x({className:e,...n}){return/* @__PURE__ */ i(`div`,{"data-slot":`sheet-footer`,className:t(`flex min-h-[34px] shrink-0 flex-wrap items-center justify-between gap-2 border-t border-po-border-soft bg-po-deep px-4 py-1.5`,e),...n})}export{u as Sheet,b as SheetBody,f as SheetClose,g as SheetContent,y as SheetDescription,x as SheetFooter,_ as SheetHeader,p as SheetOverlay,v as SheetTitle,d as SheetTrigger};
|
|
2
2
|
//# sourceMappingURL=Sheet.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sheet.mjs","names":["SheetPrimitive","Sheet","Dialog","props","SheetTrigger","SheetClose","SheetOverlay","cn","className","SIDE_POSITION","CONTENT_WIDTH","SheetContent","side","width","SheetHeader","t","useT","children","dismissible","Button","closeLabel","CloseIcon","SheetTitle","SheetDescription","SheetBody","SheetFooter"],"sources":["../../../src/components/Sheet.tsx"],"sourcesContent":["import { useT } from '@agimon-ai/po-core/web';\nimport { Dialog as SheetPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\n\nimport { CloseIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\nimport { Button } from './Button';\n\n/**\n * A side panel on Radix's Dialog: an overlay that slides in from an edge,\n * with the focus trap, Escape, outside click and scroll lock a dialog has.\n *\n * It is the Dialog for content that reads as a column rather than a form: a\n * detail view beside what the reader was looking at. An inline aside cannot\n * do this, because it takes width from the surface underneath it.\n */\nexport function Sheet(props: ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\nexport function SheetTrigger(props: ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\nexport function SheetClose(props: ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\nexport function SheetOverlay({ className, ...props }: ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn('fixed inset-0 z-40 bg-po-deep/70 data-[state=open]:animate-po-fade', className)}\n {...props}\n />\n );\n}\n\nconst SIDE_POSITION = {\n right: 'inset-y-0 right-0 border-l data-[state=open]:animate-po-slide-right',\n left: 'inset-y-0 left-0 border-r data-[state=open]:animate-po-slide-left',\n} as const;\n\nexport interface SheetContentProps extends ComponentProps<typeof SheetPrimitive.Content> {\n /** Which edge it comes from. */\n side?: 'right' | 'left';\n /** Width preset; `className` may still override. */\n width?: 'sm' | 'md' | 'lg';\n}\n\nconst CONTENT_WIDTH = { sm: 'w-[360px]', md: 'w-[440px]', lg: 'w-[560px]' } as const;\n\nexport function SheetContent({ className, children, side = 'right', width = 'md', ...props }: SheetContentProps) {\n return (\n <SheetPrimitive.Portal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n data-side={side}\n className={cn(\n 'fixed z-50 flex max-w-[calc(100vw-24px)] flex-col overflow-hidden border-po-border bg-po-rail shadow-2xl outline-none',\n SIDE_POSITION[side],\n CONTENT_WIDTH[width],\n className,\n )}\n {...props}\n >\n {children}\n </SheetPrimitive.Content>\n </SheetPrimitive.Portal>\n );\n}\n\nexport interface SheetHeaderProps extends ComponentProps<'div'> {\n /** Show the close control at the right of the strip. On by default: a sheet is dismissed, not answered. */\n dismissible?: boolean;\n /** What the close control announces. */\n closeLabel?: string;\n}\n\nexport function SheetHeader({ className, dismissible = true, closeLabel, children, ...props }: SheetHeaderProps) {\n const t = useT();\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn('flex h-11 min-w-0 shrink-0 items-center gap-2.5 border-b border-po-border px-4', className)}\n {...props}\n >\n {children}\n {dismissible ? (\n <SheetPrimitive.Close asChild>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n aria-label={closeLabel ?? t('webComponents.dialog.close', 'close')}\n className=\"ml-auto text-po-faint hover:text-po-hi\"\n >\n <CloseIcon className=\"h-3 w-3\" />\n </Button>\n </SheetPrimitive.Close>\n ) : null}\n </div>\n );\n}\n\nexport function SheetTitle({ className, ...props }: ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn('truncate text-lg font-semibold text-po-hi', className)}\n {...props}\n />\n );\n}\n\nexport function SheetDescription({ className, ...props }: ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn('text-sm leading-relaxed text-po-dim', className)}\n {...props}\n />\n );\n}\n\nexport function SheetBody({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sheet-body\"\n className={cn('flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-4 py-3', className)}\n {...props}\n />\n );\n}\n\nexport function SheetFooter({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn(\n 'flex min-h-[34px] shrink-0 flex-wrap items-center justify-between gap-2 border-t border-po-border-soft bg-po-deep px-4 py-1.5',\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"A,0PAgBA,SAAgBC,EAAM,EAAmD,CACvE,MAAO,kBAACD,EAAe,KAAhB,CAAqB,YAAU,QAAQ,GAAIG,CAAQ,CAAA,CAC5D,CAEA,SAAgBC,EAAa,EAAsD,CACjF,MAAO,kBAACJ,EAAe,QAAhB,CAAwB,YAAU,gBAAgB,GAAIG,CAAQ,CAAA,CACvE,CAEA,SAAgBE,EAAW,EAAoD,CAC7E,MAAO,kBAACL,EAAe,MAAhB,CAAsB,YAAU,cAAc,GAAIG,CAAQ,CAAA,CACnE,CAEA,SAAgBG,EAAa,CAAE,YAAW,GAAGH,GAAwD,CACnG,MACE,kBAACH,EAAe,QAAhB,CACE,YAAU,gBACV,UAAWO,EAAG,qEAAsEC,CAAS,EAC7F,GAAIL,CACL,CAAA,CAEL,CAEA,MAAMM,EAAgB,CACpB,MAAO,sEACP,KAAM,mEACR,EASMC,EAAgB,CAAE,GAAI,YAAa,GAAI,YAAa,GAAI,WAAY,EAE1E,SAAgBC,EAAa,CAAE,YAAW,WAAU,OAAO,QAAS,QAAQ,KAAM,GAAGR,GAA4B,CAC/G,MACE,kBAACH,EAAe,OAAhB,CAAA,SAAA,CACE,kBAACM,EAAD,CAAe,CAAA,EACf,kBAACN,EAAe,QAAhB,CACE,YAAU,gBACV,YAAWY,EACX,UAAWL,EACT,wHACAE,EAAcG,GACdF,EAAcG,GACdL,CACF,EACA,GAAIL,EAEH,UACqB,CAAA,CACH,CAAA,CAAA,CAE3B,CASA,SAAgBW,EAAY,CAAE,YAAW,cAAc,GAAM,aAAY,WAAU,GAAGX,GAA2B,CAC/G,IAAMY,EAAIC,EAAK,EACf,MACE,kBAAC,MAAD,CACE,YAAU,eACV,UAAWT,EAAG,iFAAkFC,CAAS,EACzG,GAAIL,EAHN,SAAA,CAKGc,EACAC,EACC,kBAAClB,EAAe,MAAhB,CAAsB,QAAA,GACpB,SAAA,kBAACmB,EAAD,CACE,QAAQ,QACR,KAAK,OACL,aAAYC,GAAcL,EAAE,6BAA8B,OAAO,EACjE,UAAU,yCAEV,SAAA,kBAACM,EAAD,CAAW,UAAU,SAAW,CAAA,CAC1B,CAAA,CACY,CAAA,EACpB,IACD,C,EAET,CAEA,SAAgBC,EAAW,CAAE,YAAW,GAAGnB,GAAsD,CAC/F,MACE,kBAACH,EAAe,MAAhB,CACE,YAAU,cACV,UAAWO,EAAG,4CAA6CC,CAAS,EACpE,GAAIL,CACL,CAAA,CAEL,CAEA,SAAgBoB,EAAiB,CAAE,YAAW,GAAGpB,GAA4D,CAC3G,MACE,kBAACH,EAAe,YAAhB,CACE,YAAU,oBACV,UAAWO,EAAG,sCAAuCC,CAAS,EAC9D,GAAIL,CACL,CAAA,CAEL,CAEA,SAAgBqB,EAAU,CAAE,YAAW,GAAGrB,GAAgC,CACxE,MACE,kBAAC,MAAD,CACE,YAAU,aACV,UAAWI,EAAG,+DAAgEC,CAAS,EACvF,GAAIL,CACL,CAAA,CAEL,CAEA,SAAgBsB,EAAY,CAAE,YAAW,GAAGtB,GAAgC,CAC1E,MACE,kBAAC,MAAD,CACE,YAAU,eACV,UAAWI,EACT,gIACAC,CACF,EACA,GAAIL,CACL,CAAA,CAEL,C"}
|
|
1
|
+
{"version":3,"file":"Sheet.mjs","names":["SheetPrimitive","SheetOpenChangeContext","createContext","Sheet","onOpenChange","props","open","Dialog","SheetTrigger","SheetClose","SheetOverlay","useContext","cn","className","onPointerDownCapture","event","sheetContent","bounds","SIDE_POSITION","CONTENT_WIDTH","SheetContent","side","width","children","SheetHeader","t","useT","dismissible","Button","closeLabel","CloseIcon","SheetTitle","SheetDescription","SheetBody","SheetFooter"],"sources":["../../../src/components/Sheet.tsx"],"sourcesContent":["import { useT } from '@agimon-ai/po-core/web';\nimport { Dialog as SheetPrimitive } from 'radix-ui';\nimport { createContext, type ComponentProps, useContext } from 'react';\n\nimport { CloseIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\nimport { Button } from './Button';\n\nconst SheetOpenChangeContext = createContext<((open: boolean) => void) | undefined>(undefined);\n\n/**\n * A panel on Radix's Dialog: an overlay that slides in from a side or bottom edge,\n * with the focus trap, Escape, outside click and scroll lock a dialog has.\n *\n * It is the Dialog for content that reads as a panel or sheet rather than a centered\n * form: a detail view or settings sheet over what the reader was looking at, without\n * taking layout width from the surface underneath it.\n */\nexport function Sheet(props: ComponentProps<typeof SheetPrimitive.Root>) {\n const onOpenChange = props.onOpenChange === undefined ? undefined : (open: boolean) => props.onOpenChange?.(open);\n return (\n <SheetOpenChangeContext.Provider value={onOpenChange}>\n <SheetPrimitive.Root data-slot=\"sheet\" {...props} onOpenChange={onOpenChange} />\n </SheetOpenChangeContext.Provider>\n );\n}\n\nexport function SheetTrigger(props: ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\nexport function SheetClose(props: ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\nexport function SheetOverlay({\n className,\n onPointerDownCapture,\n ...props\n}: ComponentProps<typeof SheetPrimitive.Overlay>) {\n const onOpenChange = useContext(SheetOpenChangeContext);\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn('fixed inset-0 z-40 bg-po-deep/70 data-[state=open]:animate-po-fade', className)}\n onPointerDownCapture={(event) => {\n onPointerDownCapture?.(event);\n if (event.defaultPrevented || onOpenChange === undefined) return;\n const sheetContent = event.currentTarget.nextElementSibling;\n const openSelectTrigger = sheetContent?.querySelector('[data-slot=\"select-trigger\"][data-state=\"open\"]');\n if (openSelectTrigger === null || openSelectTrigger === undefined) return;\n // An open Select disables pointer events on the sheet; an inside press falls through to this overlay.\n const bounds = sheetContent?.getBoundingClientRect();\n if (\n bounds &&\n event.clientX >= bounds.left &&\n event.clientX <= bounds.right &&\n event.clientY >= bounds.top &&\n event.clientY <= bounds.bottom\n )\n return;\n\n // Radix's parent outside listener can lag one render behind a nested\n // modal Select. Own this backdrop press so the complete stack closes.\n event.stopPropagation();\n onOpenChange(false);\n }}\n {...props}\n />\n );\n}\n\nconst SIDE_POSITION = {\n right: 'inset-y-0 right-0 max-w-[calc(100vw-24px)] border-l data-[state=open]:animate-po-slide-right',\n left: 'inset-y-0 left-0 max-w-[calc(100vw-24px)] border-r data-[state=open]:animate-po-slide-left',\n bottom:\n 'inset-x-0 bottom-0 mx-auto w-full max-w-2xl max-h-[min(85dvh,680px)] rounded-t-lg border-x border-t border-b-0 data-[state=open]:animate-po-slide-up',\n} as const;\n\nexport interface SheetContentProps extends ComponentProps<typeof SheetPrimitive.Content> {\n /** Which edge it comes from. */\n side?: 'right' | 'left' | 'bottom';\n /** Width preset for left/right sheets; ignored when `side=\"bottom\"`. `className` may still override. */\n width?: 'sm' | 'md' | 'lg';\n /** Portal mount target; defaults to `document.body`. */\n container?: HTMLElement | null;\n}\n\nconst CONTENT_WIDTH = { sm: 'w-[360px]', md: 'w-[440px]', lg: 'w-[560px]' } as const;\n\nexport function SheetContent({\n className,\n children,\n side = 'right',\n width = 'md',\n container,\n ...props\n}: SheetContentProps) {\n return (\n <SheetPrimitive.Portal container={container}>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n data-side={side}\n className={cn(\n 'fixed z-50 flex flex-col overflow-hidden border-po-border bg-po-rail shadow-2xl outline-none',\n SIDE_POSITION[side],\n side === 'bottom' ? undefined : CONTENT_WIDTH[width],\n className,\n )}\n {...props}\n >\n {side === 'bottom' ? (\n <div data-slot=\"sheet-handle\" className=\"flex shrink-0 justify-center bg-po-rail pt-2.5 pb-1\">\n <span aria-hidden=\"true\" className=\"h-1 w-10 rounded-full bg-po-border\" />\n </div>\n ) : null}\n {children}\n </SheetPrimitive.Content>\n </SheetPrimitive.Portal>\n );\n}\n\nexport interface SheetHeaderProps extends ComponentProps<'div'> {\n /** Show the close control at the right of the strip. On by default: a sheet is dismissed, not answered. */\n dismissible?: boolean;\n /** What the close control announces. */\n closeLabel?: string;\n}\n\nexport function SheetHeader({ className, dismissible = true, closeLabel, children, ...props }: SheetHeaderProps) {\n const t = useT();\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn('flex h-11 min-w-0 shrink-0 items-center gap-2.5 border-b border-po-border px-4', className)}\n {...props}\n >\n {children}\n {dismissible ? (\n <SheetPrimitive.Close asChild>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n aria-label={closeLabel ?? t('webComponents.dialog.close', 'close')}\n className=\"ml-auto text-po-faint hover:text-po-hi\"\n >\n <CloseIcon className=\"h-3 w-3\" />\n </Button>\n </SheetPrimitive.Close>\n ) : null}\n </div>\n );\n}\n\nexport function SheetTitle({ className, ...props }: ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn('truncate text-lg font-semibold text-po-hi', className)}\n {...props}\n />\n );\n}\n\nexport function SheetDescription({ className, ...props }: ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn('text-sm leading-relaxed text-po-dim', className)}\n {...props}\n />\n );\n}\n\nexport function SheetBody({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sheet-body\"\n className={cn('flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-4 py-3', className)}\n {...props}\n />\n );\n}\n\nexport function SheetFooter({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn(\n 'flex min-h-[34px] shrink-0 flex-wrap items-center justify-between gap-2 border-t border-po-border-soft bg-po-deep px-4 py-1.5',\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../lib/cn.cjs");let t=require("radix-ui"),n=require("react/jsx-runtime");function r({className:r,...i}){return/* @__PURE__ */ (0,n.jsx)(t.Switch.Root,{"data-slot":`switch`,className:e.cn(`inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border border-po-border bg-po-deep p-px outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/
|
|
1
|
+
const e=require("../lib/cn.cjs");let t=require("radix-ui"),n=require("react/jsx-runtime");function r({className:r,...i}){return/* @__PURE__ */ (0,n.jsx)(t.Switch.Root,{"data-slot":`switch`,className:e.cn(`inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border border-po-border bg-po-deep p-px outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/70 disabled:pointer-events-none disabled:opacity-40 data-[state=checked]:border-po-green data-[state=checked]:bg-po-tint-green`,r),...i,children:/* @__PURE__ */ (0,n.jsx)(t.Switch.Thumb,{"data-slot":`switch-thumb`,className:`block h-3 w-3 rounded-full bg-po-faint transition-transform data-[state=checked]:translate-x-3 data-[state=checked]:bg-po-green`})})}exports.Switch=r;
|
|
2
2
|
//# sourceMappingURL=Switch.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.cjs","names":["SwitchPrimitive","cn","require_cn","radix_ui","react_jsx_runtime","Switch","props","className"],"sources":["../../../src/components/Switch.tsx"],"sourcesContent":["import { Switch as SwitchPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/** An on/off track; use it where the change takes effect immediately, a checkbox where it needs a save. */\nexport function Switch({ className, ...props }: ComponentProps<typeof SwitchPrimitive.Root>) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n className={cn(\n 'inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border border-po-border bg-po-deep p-px outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/
|
|
1
|
+
{"version":3,"file":"Switch.cjs","names":["SwitchPrimitive","cn","require_cn","radix_ui","react_jsx_runtime","Switch","props","className"],"sources":["../../../src/components/Switch.tsx"],"sourcesContent":["import { Switch as SwitchPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/** An on/off track; use it where the change takes effect immediately, a checkbox where it needs a save. */\nexport function Switch({ className, ...props }: ComponentProps<typeof SwitchPrimitive.Root>) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n className={cn(\n 'inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border border-po-border bg-po-deep p-px outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/70 disabled:pointer-events-none disabled:opacity-40 data-[state=checked]:border-po-green data-[state=checked]:bg-po-tint-green',\n className,\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className=\"block h-3 w-3 rounded-full bg-po-faint transition-transform data-[state=checked]:translate-x-3 data-[state=checked]:bg-po-green\"\n />\n </SwitchPrimitive.Root>\n );\n}\n"],"mappings":"A,0FAMA,SAAgBK,EAAO,CAAE,YAAW,GAAGC,GAAsD,CAC3F,MACE,iBAAA,EAAAF,EAAA,IAAA,CAACJ,EAAAA,OAAgB,KAAjB,CACE,YAAU,SACV,UAAWC,EAAAA,GACT,+TACAM,CACF,EACA,GAAID,EAEJ,SAAA,iBAAA,EAAAF,EAAA,IAAA,CAACJ,EAAAA,OAAgB,MAAjB,CACE,YAAU,eACV,UAAU,iIACX,CAAA,CACmB,CAAA,CAE1B,C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cn as e}from"../lib/cn.mjs";import{Switch as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function r({className:r,...i}){return/* @__PURE__ */ n(t.Root,{"data-slot":`switch`,className:e(`inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border border-po-border bg-po-deep p-px outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/
|
|
1
|
+
import{cn as e}from"../lib/cn.mjs";import{Switch as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function r({className:r,...i}){return/* @__PURE__ */ n(t.Root,{"data-slot":`switch`,className:e(`inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border border-po-border bg-po-deep p-px outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/70 disabled:pointer-events-none disabled:opacity-40 data-[state=checked]:border-po-green data-[state=checked]:bg-po-tint-green`,r),...i,children:/* @__PURE__ */ n(t.Thumb,{"data-slot":`switch-thumb`,className:`block h-3 w-3 rounded-full bg-po-faint transition-transform data-[state=checked]:translate-x-3 data-[state=checked]:bg-po-green`})})}export{r as Switch};
|
|
2
2
|
//# sourceMappingURL=Switch.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.mjs","names":["Switch","SwitchPrimitive","Switch$1","props","Switch","cn","className"],"sources":["../../../src/components/Switch.tsx"],"sourcesContent":["import { Switch as SwitchPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/** An on/off track; use it where the change takes effect immediately, a checkbox where it needs a save. */\nexport function Switch({ className, ...props }: ComponentProps<typeof SwitchPrimitive.Root>) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n className={cn(\n 'inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border border-po-border bg-po-deep p-px outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/
|
|
1
|
+
{"version":3,"file":"Switch.mjs","names":["Switch","SwitchPrimitive","Switch$1","props","Switch","cn","className"],"sources":["../../../src/components/Switch.tsx"],"sourcesContent":["import { Switch as SwitchPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/** An on/off track; use it where the change takes effect immediately, a checkbox where it needs a save. */\nexport function Switch({ className, ...props }: ComponentProps<typeof SwitchPrimitive.Root>) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n className={cn(\n 'inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border border-po-border bg-po-deep p-px outline-none transition-colors focus-visible:ring-2 focus-visible:ring-po-green/70 disabled:pointer-events-none disabled:opacity-40 data-[state=checked]:border-po-green data-[state=checked]:bg-po-tint-green',\n className,\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className=\"block h-3 w-3 rounded-full bg-po-faint transition-transform data-[state=checked]:translate-x-3 data-[state=checked]:bg-po-green\"\n />\n </SwitchPrimitive.Root>\n );\n}\n"],"mappings":"A,6GAMA,SAAgBA,EAAO,CAAE,YAAW,GAAGG,GAAsD,CAC3F,MACE,kBAACF,EAAgB,KAAjB,CACE,YAAU,SACV,UAAWI,EACT,+TACAC,CACF,EACA,GAAIH,EAEJ,SAAA,kBAACF,EAAgB,MAAjB,CACE,YAAU,eACV,UAAU,iIACX,CAAA,CACmB,CAAA,CAE1B,C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/po-web-components",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.216",
|
|
4
4
|
"description": "Shared web components and theme tokens for the Po cockpit and its web plugins: shadcn-style primitives on Radix, tuned to the Po palette, with runtime theme configs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -122,9 +122,9 @@
|
|
|
122
122
|
"tailwind-merge": "3.7.0"
|
|
123
123
|
},
|
|
124
124
|
"devDependencies": {
|
|
125
|
-
"@agimon-ai/po-build": "0.0.0-alpha.
|
|
126
|
-
"@agimon-ai/po-core": "0.0.0-alpha.
|
|
127
|
-
"@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.
|
|
125
|
+
"@agimon-ai/po-build": "0.0.0-alpha.216",
|
|
126
|
+
"@agimon-ai/po-core": "0.0.0-alpha.216",
|
|
127
|
+
"@agimon-ai/vibe-lint-plugin-po-web": "0.0.0-alpha.216",
|
|
128
128
|
"@types/node": "26.6.5",
|
|
129
129
|
"@types/react": "19.3.0",
|
|
130
130
|
"@types/react-dom": "19.3.0",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"vitest": "5.0.4"
|
|
138
138
|
},
|
|
139
139
|
"peerDependencies": {
|
|
140
|
-
"@agimon-ai/po-core": "0.0.0-alpha.
|
|
140
|
+
"@agimon-ai/po-core": "0.0.0-alpha.216",
|
|
141
141
|
"react": "^19.0.0",
|
|
142
142
|
"react-dom": "^19.0.0"
|
|
143
143
|
},
|
package/styles/theme.css
CHANGED
|
@@ -207,6 +207,7 @@
|
|
|
207
207
|
--animate-po-blink: po-blink 1s steps(2, start) infinite;
|
|
208
208
|
--animate-po-slide-right: po-slide-right 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
209
209
|
--animate-po-slide-left: po-slide-left 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
210
|
+
--animate-po-slide-up: po-slide-up 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
210
211
|
|
|
211
212
|
@keyframes po-fade {
|
|
212
213
|
from {
|
|
@@ -256,6 +257,16 @@
|
|
|
256
257
|
transform: translateX(0);
|
|
257
258
|
}
|
|
258
259
|
}
|
|
260
|
+
@keyframes po-slide-up {
|
|
261
|
+
from {
|
|
262
|
+
opacity: 0;
|
|
263
|
+
transform: translateY(16px);
|
|
264
|
+
}
|
|
265
|
+
to {
|
|
266
|
+
opacity: 1;
|
|
267
|
+
transform: translateY(0);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
259
270
|
@keyframes po-blink {
|
|
260
271
|
50% {
|
|
261
272
|
opacity: 0;
|