@xdev-asia/ui 0.0.0-stage → 4.15.1
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/AGENTS.md +66 -0
- package/LICENSE +202 -0
- package/README.md +149 -2
- package/assets/brand/mobile/android-background-1024.png +0 -0
- package/assets/brand/mobile/android-background.svg +13 -0
- package/assets/brand/mobile/android-foreground-1024.png +0 -0
- package/assets/brand/mobile/android-foreground.svg +13 -0
- package/assets/brand/mobile/android-monochrome-1024.png +0 -0
- package/assets/brand/mobile/android-monochrome.svg +3 -0
- package/assets/brand/mobile/ios-icon-1024.png +0 -0
- package/assets/brand/mobile/ios-icon-dark-1024.png +0 -0
- package/assets/brand/mobile/ios-icon-dark.svg +22 -0
- package/assets/brand/mobile/ios-icon.svg +22 -0
- package/assets/brand/systems/xdev-ui-icon.svg +23 -0
- package/assets/brand/systems/xdev-ui-lockup-dark.svg +24 -0
- package/assets/brand/systems/xdev-ui-lockup-light.svg +24 -0
- package/assets/brand/systems/xdev-ui-mark-lit.svg +13 -0
- package/assets/brand/systems/xdev-ui-mark.svg +3 -0
- package/assets/brand/xdev-icon-512.png +0 -0
- package/assets/brand/xdev-icon-blue.svg +23 -0
- package/assets/brand/xdev-icon.svg +23 -0
- package/assets/brand/xdev-lockup-dark.svg +24 -0
- package/assets/brand/xdev-lockup-light.svg +24 -0
- package/assets/brand/xdev-mark-lit.svg +13 -0
- package/assets/brand/xdev-mark-tile.svg +3 -0
- package/assets/brand/xdev-mark.svg +3 -0
- package/bin/xdev-ui-skills.mjs +142 -0
- package/dist/Workspace.stories.d.ts +15 -0
- package/dist/ai-manifest.json +3727 -0
- package/dist/chunks/FileDrop-C-ygn8kF.js +891 -0
- package/dist/chunks/FileDrop-C-ygn8kF.js.map +1 -0
- package/dist/chunks/Popover-Ds4RBtZv.js +121 -0
- package/dist/chunks/Popover-Ds4RBtZv.js.map +1 -0
- package/dist/chunks/crop-CahE3q01.js +55 -0
- package/dist/chunks/crop-CahE3q01.js.map +1 -0
- package/dist/chunks/modal-BYFY08ti.js +54 -0
- package/dist/chunks/modal-BYFY08ti.js.map +1 -0
- package/dist/components/ActionTile/ActionTile.d.ts +14 -0
- package/dist/components/ActionTile/ActionTile.stories.d.ts +18 -0
- package/dist/components/ActivityBar/ActivityBar.d.ts +36 -0
- package/dist/components/ActivityBar/ActivityBar.stories.d.ts +27 -0
- package/dist/components/AgentChip/AgentChip.d.ts +10 -0
- package/dist/components/AgentChip/AgentChip.stories.d.ts +21 -0
- package/dist/components/AgentRow/AgentRow.d.ts +24 -0
- package/dist/components/AgentRow/AgentRow.stories.d.ts +19 -0
- package/dist/components/AppShell/AppShell.d.ts +58 -0
- package/dist/components/AppShell/AppShell.stories.d.ts +17 -0
- package/dist/components/ApprovalBar/ApprovalBar.d.ts +23 -0
- package/dist/components/ApprovalBar/ApprovalBar.stories.d.ts +18 -0
- package/dist/components/AttentionInbox/AttentionInbox.d.ts +43 -0
- package/dist/components/AttentionInbox/AttentionInbox.stories.d.ts +16 -0
- package/dist/components/AudioPreview/AudioPreview.d.ts +33 -0
- package/dist/components/AudioPreview/AudioPreview.stories.d.ts +23 -0
- package/dist/components/AudioPreview/audio-preview-store.d.ts +14 -0
- package/dist/components/AuthShell/AuthShell.d.ts +24 -0
- package/dist/components/AuthShell/AuthShell.stories.d.ts +20 -0
- package/dist/components/Avatar/Avatar.d.ts +13 -0
- package/dist/components/Avatar/Avatar.stories.d.ts +21 -0
- package/dist/components/Badge/Badge.d.ts +14 -0
- package/dist/components/Badge/Badge.stories.d.ts +26 -0
- package/dist/components/Banner/Banner.d.ts +11 -0
- package/dist/components/Banner/Banner.stories.d.ts +23 -0
- package/dist/components/BarChart/BarChart.d.ts +20 -0
- package/dist/components/BarChart/BarChart.stories.d.ts +24 -0
- package/dist/components/Board/Board.d.ts +9 -0
- package/dist/components/Board/Board.stories.d.ts +18 -0
- package/dist/components/BoardCard/BoardCard.d.ts +32 -0
- package/dist/components/BoardColumn/BoardColumn.d.ts +24 -0
- package/dist/components/BottomNav/BottomNav.d.ts +40 -0
- package/dist/components/BottomNav/BottomNav.stories.d.ts +40 -0
- package/dist/components/BrandMark/BrandMark.d.ts +20 -0
- package/dist/components/BrandMark/BrandMark.stories.d.ts +28 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +22 -0
- package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts +27 -0
- package/dist/components/BulkBar/BulkBar.d.ts +21 -0
- package/dist/components/BulkBar/BulkBar.stories.d.ts +16 -0
- package/dist/components/Button/Button.d.ts +42 -0
- package/dist/components/Button/Button.stories.d.ts +41 -0
- package/dist/components/Card/Card.d.ts +22 -0
- package/dist/components/Card/Card.stories.d.ts +307 -0
- package/dist/components/Checkbox/Checkbox.d.ts +10 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +18 -0
- package/dist/components/Coachmark/Coachmark.d.ts +31 -0
- package/dist/components/Coachmark/Coachmark.stories.d.ts +27 -0
- package/dist/components/Coachmark/placeCoachmark.d.ts +31 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +19 -0
- package/dist/components/CodeBlock/CodeBlock.stories.d.ts +22 -0
- package/dist/components/CodeInput/CodeInput.d.ts +25 -0
- package/dist/components/CodeInput/CodeInput.stories.d.ts +32 -0
- package/dist/components/CodeInput/normalizeCode.d.ts +10 -0
- package/dist/components/ColorField/ColorField.d.ts +29 -0
- package/dist/components/Combobox/Combobox.d.ts +105 -0
- package/dist/components/Combobox/Combobox.stories.d.ts +42 -0
- package/dist/components/CommandPalette/CommandPalette.d.ts +94 -0
- package/dist/components/CommandPalette/CommandPalette.stories.d.ts +39 -0
- package/dist/components/Comment/Comment.d.ts +25 -0
- package/dist/components/Comment/Comment.stories.d.ts +24 -0
- package/dist/components/CommitGraph/CommitGraph.d.ts +15 -0
- package/dist/components/CommitGraph/CommitGraph.stories.d.ts +15 -0
- package/dist/components/CommitGraph/graphLanes.d.ts +56 -0
- package/dist/components/Composer/Composer.d.ts +31 -0
- package/dist/components/Composer/Composer.stories.d.ts +17 -0
- package/dist/components/Container/Container.d.ts +11 -0
- package/dist/components/Container/Container.stories.d.ts +14 -0
- package/dist/components/DataTable/DataTable.d.ts +79 -0
- package/dist/components/DataTable/DataTable.stories.d.ts +26 -0
- package/dist/components/DataTable/table-helpers.d.ts +16 -0
- package/dist/components/DataTable/table-reorder.d.ts +40 -0
- package/dist/components/DatePicker/Calendar.d.ts +51 -0
- package/dist/components/DatePicker/DatePicker.d.ts +51 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts +42 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +59 -0
- package/dist/components/DateRangePicker/DateRangePicker.stories.d.ts +42 -0
- package/dist/components/DescriptionList/DescriptionList.d.ts +14 -0
- package/dist/components/DescriptionList/DescriptionList.stories.d.ts +21 -0
- package/dist/components/Dialog/Dialog.d.ts +43 -0
- package/dist/components/Dialog/Dialog.stories.d.ts +22 -0
- package/dist/components/DiffStat/DiffStat.d.ts +12 -0
- package/dist/components/DiffStat/DiffStat.stories.d.ts +15 -0
- package/dist/components/Disclosure/Disclosure.d.ts +18 -0
- package/dist/components/Disclosure/Disclosure.stories.d.ts +27 -0
- package/dist/components/DonutChart/DonutChart.d.ts +30 -0
- package/dist/components/DonutChart/DonutChart.stories.d.ts +26 -0
- package/dist/components/Drawer/Drawer.d.ts +27 -0
- package/dist/components/Drawer/Drawer.stories.d.ts +18 -0
- package/dist/components/Emblem/Emblem.d.ts +19 -0
- package/dist/components/Emblem/Emblem.stories.d.ts +19 -0
- package/dist/components/EmptyState/EmptyState.d.ts +43 -0
- package/dist/components/EmptyState/EmptyState.stories.d.ts +17 -0
- package/dist/components/EndpointPanel/EndpointPanel.d.ts +29 -0
- package/dist/components/FacetFilter/FacetFilter.d.ts +39 -0
- package/dist/components/FacetFilter/FacetFilter.stories.d.ts +23 -0
- package/dist/components/FacetFilter/facet-helpers.d.ts +5 -0
- package/dist/components/Field/Field.d.ts +27 -0
- package/dist/components/Field/Field.stories.d.ts +25 -0
- package/dist/components/FieldMessage/FieldMessage.d.ts +10 -0
- package/dist/components/FieldMessage/FieldMessage.stories.d.ts +14 -0
- package/dist/components/FileDrop/FileDrop.d.ts +72 -0
- package/dist/components/FileDrop/FileDrop.stories.d.ts +18 -0
- package/dist/components/FileIcon/FileIcon.d.ts +25 -0
- package/dist/components/FileIcon/FileIcon.stories.d.ts +14 -0
- package/dist/components/FilterChip/FilterChip.d.ts +9 -0
- package/dist/components/FilterChip/FilterChip.stories.d.ts +19 -0
- package/dist/components/FlowMap/FlowMap.d.ts +74 -0
- package/dist/components/FlowMap/FlowMap.stories.d.ts +24 -0
- package/dist/components/FontField/FontField.d.ts +15 -0
- package/dist/components/FontField/FontField.stories.d.ts +17 -0
- package/dist/components/FormDialog/FormDialog.d.ts +40 -0
- package/dist/components/FormDialog/FormDialog.stories.d.ts +22 -0
- package/dist/components/FormSection/FormSection.d.ts +19 -0
- package/dist/components/FormSection/FormSection.stories.d.ts +16 -0
- package/dist/components/Grid/Grid.d.ts +23 -0
- package/dist/components/Grid/Grid.stories.d.ts +19 -0
- package/dist/components/Grid/breakpoints.d.ts +25 -0
- package/dist/components/Heatmap/Heatmap.d.ts +22 -0
- package/dist/components/Heatmap/Heatmap.stories.d.ts +24 -0
- package/dist/components/Icon/Icon.d.ts +14 -0
- package/dist/components/Icon/Icon.stories.d.ts +20 -0
- package/dist/components/IconButton/IconButton.d.ts +16 -0
- package/dist/components/IconButton/IconButton.stories.d.ts +27 -0
- package/dist/components/Identity/Identity.d.ts +14 -0
- package/dist/components/Identity/Identity.stories.d.ts +14 -0
- package/dist/components/Kbd/Kbd.d.ts +5 -0
- package/dist/components/Kbd/Kbd.stories.d.ts +13 -0
- package/dist/components/Label/Label.d.ts +15 -0
- package/dist/components/Label/Label.stories.d.ts +16 -0
- package/dist/components/LaunchCard/LaunchCard.d.ts +36 -0
- package/dist/components/LaunchCard/LaunchCard.stories.d.ts +32 -0
- package/dist/components/List/List.d.ts +11 -0
- package/dist/components/List/List.stories.d.ts +13 -0
- package/dist/components/ListRow/ListRow.d.ts +20 -0
- package/dist/components/ListRow/ListRow.stories.d.ts +27 -0
- package/dist/components/Menu/Menu.d.ts +53 -0
- package/dist/components/Menu/Menu.stories.d.ts +85 -0
- package/dist/components/Menu/MenuButton.d.ts +23 -0
- package/dist/components/Menu/MenuButton.stories.d.ts +46 -0
- package/dist/components/Menu/menu-keys.d.ts +26 -0
- package/dist/components/Meter/Meter.d.ts +18 -0
- package/dist/components/Meter/Meter.stories.d.ts +34 -0
- package/dist/components/ModelChip/ModelChip.d.ts +26 -0
- package/dist/components/ModelChip/ModelChip.stories.d.ts +18 -0
- package/dist/components/NavList/NavList.d.ts +56 -0
- package/dist/components/NavList/NavList.stories.d.ts +25 -0
- package/dist/components/PageHeader/PageHeader.d.ts +14 -0
- package/dist/components/PageHeader/PageHeader.stories.d.ts +14 -0
- package/dist/components/Pagination/Pagination.d.ts +28 -0
- package/dist/components/Pagination/Pagination.stories.d.ts +16 -0
- package/dist/components/PairingCode/PairingCode.d.ts +17 -0
- package/dist/components/PairingCode/PairingCode.stories.d.ts +24 -0
- package/dist/components/PaletteTrigger/PaletteTrigger.d.ts +16 -0
- package/dist/components/PanZoom/PanZoom.d.ts +24 -0
- package/dist/components/PanZoom/PanZoom.stories.d.ts +11 -0
- package/dist/components/Popover/Popover.d.ts +24 -0
- package/dist/components/Popover/Popover.stories.d.ts +25 -0
- package/dist/components/Prose/Prose.d.ts +8 -0
- package/dist/components/Prose/Prose.stories.d.ts +12 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +27 -0
- package/dist/components/RadioGroup/RadioGroup.stories.d.ts +22 -0
- package/dist/components/ReactionBar/ReactionBar.d.ts +21 -0
- package/dist/components/ReactionBar/ReactionBar.stories.d.ts +26 -0
- package/dist/components/ResourceCard/ResourceCard.d.ts +30 -0
- package/dist/components/ResourceCard/ResourceCard.stories.d.ts +19 -0
- package/dist/components/ReviewComment/ReviewComment.d.ts +41 -0
- package/dist/components/ReviewComment/ReviewComment.stories.d.ts +19 -0
- package/dist/components/RouteDiagram/RouteDiagram.d.ts +27 -0
- package/dist/components/RunTimeline/RunTimeline.d.ts +28 -0
- package/dist/components/RunTimeline/RunTimeline.stories.d.ts +31 -0
- package/dist/components/SaveBar/SaveBar.d.ts +56 -0
- package/dist/components/SaveBar/SaveBar.stories.d.ts +16 -0
- package/dist/components/SearchInput/SearchInput.d.ts +22 -0
- package/dist/components/SearchInput/SearchInput.stories.d.ts +18 -0
- package/dist/components/SearchPicker/SearchPicker.d.ts +49 -0
- package/dist/components/SearchPicker/SearchPicker.stories.d.ts +33 -0
- package/dist/components/Segmented/Segmented.d.ts +18 -0
- package/dist/components/Segmented/Segmented.stories.d.ts +18 -0
- package/dist/components/Select/Select.d.ts +26 -0
- package/dist/components/Select/Select.stories.d.ts +22 -0
- package/dist/components/ServiceStatus/ServiceStatus.d.ts +13 -0
- package/dist/components/SessionBar/SessionBar.d.ts +33 -0
- package/dist/components/SessionBar/SessionBar.stories.d.ts +27 -0
- package/dist/components/SettingRow/SettingRow.d.ts +17 -0
- package/dist/components/SettingRow/SettingRow.stories.d.ts +26 -0
- package/dist/components/SettingsShell/SettingsShell.d.ts +52 -0
- package/dist/components/SettingsShell/SettingsShell.stories.d.ts +9 -0
- package/dist/components/ShellTitle/ShellTitle.d.ts +25 -0
- package/dist/components/SiteShell/SiteShell.d.ts +24 -0
- package/dist/components/SiteShell/SiteShell.stories.d.ts +18 -0
- package/dist/components/Skeleton/Skeleton.d.ts +20 -0
- package/dist/components/Skeleton/Skeleton.stories.d.ts +15 -0
- package/dist/components/SortableList/SortableList.d.ts +30 -0
- package/dist/components/SortableList/SortableList.stories.d.ts +16 -0
- package/dist/components/Spinner/Spinner.d.ts +15 -0
- package/dist/components/Spinner/Spinner.stories.d.ts +14 -0
- package/dist/components/SplitHandle/SplitHandle.d.ts +25 -0
- package/dist/components/SplitHandle/SplitHandle.stories.d.ts +18 -0
- package/dist/components/Stack/Stack.d.ts +18 -0
- package/dist/components/Stack/Stack.stories.d.ts +12 -0
- package/dist/components/StatTile/StatTile.d.ts +30 -0
- package/dist/components/StatTile/StatTile.stories.d.ts +32 -0
- package/dist/components/StatusBar/StatusBar.d.ts +8 -0
- package/dist/components/StatusBar/StatusBar.stories.d.ts +15 -0
- package/dist/components/StatusDot/StatusDot.d.ts +18 -0
- package/dist/components/StatusDot/StatusDot.stories.d.ts +24 -0
- package/dist/components/StepDots/StepDots.d.ts +15 -0
- package/dist/components/StepDots/StepDots.stories.d.ts +15 -0
- package/dist/components/SwatchGroup/SwatchGroup.d.ts +20 -0
- package/dist/components/SwatchGroup/SwatchGroup.stories.d.ts +33 -0
- package/dist/components/Switch/Switch.d.ts +10 -0
- package/dist/components/Switch/Switch.stories.d.ts +17 -0
- package/dist/components/TabStrip/TabStrip.d.ts +44 -0
- package/dist/components/TabStrip/TabStrip.stories.d.ts +66 -0
- package/dist/components/Tabs/Tabs.d.ts +28 -0
- package/dist/components/Tabs/Tabs.stories.d.ts +34 -0
- package/dist/components/Tag/Tag.d.ts +12 -0
- package/dist/components/Tag/Tag.stories.d.ts +21 -0
- package/dist/components/Textarea/Textarea.d.ts +15 -0
- package/dist/components/Textarea/Textarea.stories.d.ts +19 -0
- package/dist/components/ThemeEditor/ThemeEditor.d.ts +56 -0
- package/dist/components/ThemePreview/ThemePreview.d.ts +15 -0
- package/dist/components/ThemeSwitch/ThemeSwitch.d.ts +30 -0
- package/dist/components/ThemeSwitch/ThemeSwitch.stories.d.ts +15 -0
- package/dist/components/TimeField/TimeField.d.ts +32 -0
- package/dist/components/TimeField/TimeField.stories.d.ts +36 -0
- package/dist/components/TimeField/time-text.d.ts +26 -0
- package/dist/components/TimeSeriesChart/TimeSeriesChart.d.ts +30 -0
- package/dist/components/TimeSeriesChart/TimeSeriesChart.stories.d.ts +29 -0
- package/dist/components/Toast/Toast.d.ts +18 -0
- package/dist/components/Toast/Toast.stories.d.ts +15 -0
- package/dist/components/Toast/Toaster.d.ts +18 -0
- package/dist/components/Toast/Toaster.stories.d.ts +16 -0
- package/dist/components/Toast/toast-region.d.ts +17 -0
- package/dist/components/Toast/toast-store.d.ts +46 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +16 -0
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +20 -0
- package/dist/components/Toolbar/Toolbar.d.ts +21 -0
- package/dist/components/Toolbar/Toolbar.stories.d.ts +25 -0
- package/dist/components/Tooltip/Tooltip.d.ts +13 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts +23 -0
- package/dist/components/TreeView/TreeView.d.ts +42 -0
- package/dist/components/TreeView/TreeView.stories.d.ts +26 -0
- package/dist/components/TreeView/pathRows.d.ts +16 -0
- package/dist/components/TreeView/treeKeys.d.ts +16 -0
- package/dist/components/UsageMeterRow/UsageMeterRow.d.ts +28 -0
- package/dist/components/UsageMeterRow/UsageMeterRow.stories.d.ts +26 -0
- package/dist/components/WorktreeRow/WorktreeRow.d.ts +32 -0
- package/dist/components/WorktreeRow/WorktreeRow.stories.d.ts +32 -0
- package/dist/components/ZoomBar/ZoomBar.d.ts +22 -0
- package/dist/components/ZoomBar/ZoomBar.stories.d.ts +17 -0
- package/dist/editor/RichTextEditor/EditorToolbar.d.ts +35 -0
- package/dist/editor/RichTextEditor/ImageBar.d.ts +17 -0
- package/dist/editor/RichTextEditor/LinkForm.d.ts +16 -0
- package/dist/editor/RichTextEditor/RichTextEditor.d.ts +45 -0
- package/dist/editor/RichTextEditor/RichTextEditor.stories.d.ts +43 -0
- package/dist/editor/RichTextEditor/extensions.d.ts +23 -0
- package/dist/editor/RichTextEditor/icons.d.ts +23 -0
- package/dist/editor/RichTextEditor/insertImage.d.ts +28 -0
- package/dist/editor/RichTextEditor/labels.d.ts +32 -0
- package/dist/editor/index.d.ts +4 -0
- package/dist/editor.js +629 -0
- package/dist/editor.js.map +1 -0
- package/dist/fonts.css +2 -0
- package/dist/icons.d.ts +891 -0
- package/dist/image/ImageCropper/ImageCropper.d.ts +39 -0
- package/dist/image/ImageCropper/ImageCropper.stories.d.ts +18 -0
- package/dist/image/ImageField/ImageField.d.ts +86 -0
- package/dist/image/ImageField/ImageField.stories.d.ts +29 -0
- package/dist/image/crop.d.ts +39 -0
- package/dist/image/index.d.ts +3 -0
- package/dist/image.js +377 -0
- package/dist/image.js.map +1 -0
- package/dist/index.d.ts +138 -0
- package/dist/index.js +8253 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/cx.d.ts +2 -0
- package/dist/internal/date.d.ts +96 -0
- package/dist/internal/duration.d.ts +4 -0
- package/dist/internal/focus.d.ts +34 -0
- package/dist/internal/keys.d.ts +21 -0
- package/dist/internal/modal.d.ts +8 -0
- package/dist/internal/portal.d.ts +9 -0
- package/dist/internal/position.d.ts +37 -0
- package/dist/internal/reveal.d.ts +6 -0
- package/dist/internal/roving.d.ts +25 -0
- package/dist/internal/scroll-fade.d.ts +16 -0
- package/dist/internal/session-labels.d.ts +3 -0
- package/dist/internal/text.d.ts +2 -0
- package/dist/llms-full.txt +9786 -0
- package/dist/llms.txt +162 -0
- package/dist/mcp.js +24706 -0
- package/dist/panZoom.d.ts +40 -0
- package/dist/styles.css +2 -0
- package/dist/styles.layered.css +4 -0
- package/dist/tailwind.css +38 -0
- package/dist/test-utils.d.ts +5 -0
- package/dist/theme/font.d.ts +20 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/theme.d.ts +62 -0
- package/dist/tokens.css +304 -0
- package/dist/tokens.json +267 -0
- package/dist/types.d.ts +6 -0
- package/package.json +177 -4
- package/skills/xdev-ui-admin/SKILL.md +106 -0
- package/skills/xdev-ui-admin/references/audit-log.md +18 -0
- package/skills/xdev-ui-admin/references/console-chrome.md +119 -0
- package/skills/xdev-ui-admin/references/dashboard.md +24 -0
- package/skills/xdev-ui-admin/references/detail-and-forms.md +22 -0
- package/skills/xdev-ui-admin/references/dialogs.md +33 -0
- package/skills/xdev-ui-admin/references/forms.md +60 -0
- package/skills/xdev-ui-admin/references/from-other-kits.md +75 -0
- package/skills/xdev-ui-admin/references/layout.md +58 -0
- package/skills/xdev-ui-admin/references/navigation.md +10 -0
- package/skills/xdev-ui-admin/references/permissions.md +26 -0
- package/skills/xdev-ui-admin/references/resource-list.md +64 -0
- package/skills/xdev-ui-admin/references/responsive.md +68 -0
- package/skills/xdev-ui-admin/references/rich-content.md +37 -0
- package/skills/xdev-ui-admin/references/settings.md +20 -0
- package/skills/xdev-ui-admin/references/sign-in.md +47 -0
- package/skills/xdev-ui-admin/references/states-feedback.md +26 -0
- package/skills/xdev-ui-admin/references/tree-list.md +50 -0
- package/skills/xdev-ui-admin/references/users-roles.md +32 -0
- package/skills/xdev-ui-admin/references/ux-principles.md +43 -0
- package/skills/xdev-ui-admin/references/visual-identity.md +62 -0
- package/skills/xdev-ui-admin/templates/admin/_gitignore +3 -0
- package/skills/xdev-ui-admin/templates/admin/_mcp.json +5 -0
- package/skills/xdev-ui-admin/templates/admin/_npmrc +2 -0
- package/skills/xdev-ui-admin/templates/admin/index.html +14 -0
- package/skills/xdev-ui-admin/templates/admin/package.json +24 -0
- package/skills/xdev-ui-admin/templates/admin/src/App.tsx +66 -0
- package/skills/xdev-ui-admin/templates/admin/src/app.css +26 -0
- package/skills/xdev-ui-admin/templates/admin/src/auth/permissions.ts +7 -0
- package/skills/xdev-ui-admin/templates/admin/src/auth/session.ts +42 -0
- package/skills/xdev-ui-admin/templates/admin/src/data/context.ts +11 -0
- package/skills/xdev-ui-admin/templates/admin/src/data/store.ts +84 -0
- package/skills/xdev-ui-admin/templates/admin/src/data/useLoad.ts +25 -0
- package/skills/xdev-ui-admin/templates/admin/src/i18n/en.ts +98 -0
- package/skills/xdev-ui-admin/templates/admin/src/i18n/index.tsx +63 -0
- package/skills/xdev-ui-admin/templates/admin/src/i18n/vi.ts +98 -0
- package/skills/xdev-ui-admin/templates/admin/src/i18n/xdev-ui-labels.ts +47 -0
- package/skills/xdev-ui-admin/templates/admin/src/main.tsx +12 -0
- package/skills/xdev-ui-admin/templates/admin/src/notify.tsx +36 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/Dashboard.tsx +55 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/ItemDetail.tsx +83 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/ItemsList.tsx +140 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/NotFound.tsx +17 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/Settings.tsx +37 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/SignIn.tsx +105 -0
- package/skills/xdev-ui-admin/templates/admin/src/router.ts +49 -0
- package/skills/xdev-ui-admin/templates/admin/src/shell/AccountMenu.tsx +36 -0
- package/skills/xdev-ui-admin/templates/admin/src/shell/Shell.tsx +53 -0
- package/skills/xdev-ui-admin/templates/admin/src/theme.ts +34 -0
- package/skills/xdev-ui-admin/templates/admin/tsconfig.json +16 -0
- package/skills/xdev-ui-admin/templates/admin/vite.config.ts +4 -0
- package/skills/xdev-ui-build-app/SKILL.md +85 -0
- package/skills/xdev-ui-build-app/references/app-shell.md +20 -0
- package/skills/xdev-ui-build-app/references/i18n.md +9 -0
- package/skills/xdev-ui-build-app/references/responsive-a11y.md +10 -0
- package/skills/xdev-ui-build-app/references/routing.md +14 -0
- package/skills/xdev-ui-build-app/references/setup.md +25 -0
- package/skills/xdev-ui-build-app/references/states.md +25 -0
- package/skills/xdev-ui-build-app/references/theme.md +11 -0
- package/skills/xdev-ui-build-app/templates/app/_gitignore +3 -0
- package/skills/xdev-ui-build-app/templates/app/_mcp.json +5 -0
- package/skills/xdev-ui-build-app/templates/app/_npmrc +2 -0
- package/skills/xdev-ui-build-app/templates/app/index.html +14 -0
- package/skills/xdev-ui-build-app/templates/app/package.json +24 -0
- package/skills/xdev-ui-build-app/templates/app/src/App.tsx +77 -0
- package/skills/xdev-ui-build-app/templates/app/src/app.css +3 -0
- package/skills/xdev-ui-build-app/templates/app/src/i18n/en.ts +35 -0
- package/skills/xdev-ui-build-app/templates/app/src/i18n/index.tsx +63 -0
- package/skills/xdev-ui-build-app/templates/app/src/i18n/vi.ts +35 -0
- package/skills/xdev-ui-build-app/templates/app/src/i18n/xdev-ui-labels.ts +19 -0
- package/skills/xdev-ui-build-app/templates/app/src/main.tsx +12 -0
- package/skills/xdev-ui-build-app/templates/app/src/notify.tsx +36 -0
- package/skills/xdev-ui-build-app/templates/app/src/pages/Home.tsx +22 -0
- package/skills/xdev-ui-build-app/templates/app/src/pages/NotFound.tsx +17 -0
- package/skills/xdev-ui-build-app/templates/app/src/pages/Settings.tsx +35 -0
- package/skills/xdev-ui-build-app/templates/app/src/router.ts +26 -0
- package/skills/xdev-ui-build-app/templates/app/src/theme.ts +34 -0
- package/skills/xdev-ui-build-app/templates/app/tsconfig.json +16 -0
- package/skills/xdev-ui-build-app/templates/app/vite.config.ts +4 -0
- package/skills/xdev-ui-design/SKILL.md +111 -0
- package/skills/xdev-ui-design/references/brand.md +58 -0
- package/skills/xdev-ui-design/references/checklist.md +55 -0
- package/skills/xdev-ui-design/references/owner-notes.md +54 -0
- package/skills/xdev-ui-design/references/porting.md +56 -0
- package/skills/xdev-ui-design/references/rules.md +135 -0
- package/skills/xdev-ui-design/references/screens.md +61 -0
- package/skills/xdev-ui-design/references/tokens.md +97 -0
- package/skills/xdev-ui-improve/SKILL.md +96 -0
- package/skills/xdev-ui-improve/references/plan-template.md +59 -0
- package/skills/xdev-ui-motion/SKILL.md +87 -0
- package/skills/xdev-ui-motion/references/recipes.md +117 -0
- package/skills/xdev-ui-review/SKILL.md +141 -0
- package/skills/xdev-ui-review/references/checklist.md +92 -0
- package/skills/xdev-ui-review/references/grep-recipes.md +37 -0
- package/skills/xdev-ui-review/references/pages/dashboard.md +21 -0
- package/skills/xdev-ui-review/references/pages/dialogs-forms.md +23 -0
- package/skills/xdev-ui-review/references/pages/list.md +22 -0
- package/skills/xdev-ui-review/references/pages/provider-grid.md +19 -0
- package/skills/xdev-ui-review/references/pages/settings.md +18 -0
- package/skills/xdev-ui-review/references/pages/sign-in.md +21 -0
- package/skills/xdev-ui-review/references/web-interface.md +73 -0
- package/skills/xdev-ui-review/scripts/audit.mjs +775 -0
- package/skills/xdev-ui-ux-standards/SKILL.md +88 -0
- package/skills/xdev-ui-ux-standards/references/heuristics-checklist.md +129 -0
- package/skills/xdev-ui-ux-standards/references/patterns.md +120 -0
- package/skills/xdev-ui-ux-standards/references/platforms.md +104 -0
- package/skills/xdev-ui-ux-standards/references/standards-map.md +144 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { RadioGroup } from "./RadioGroup";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof RadioGroup;
|
|
6
|
+
args: {
|
|
7
|
+
name: string;
|
|
8
|
+
label: string;
|
|
9
|
+
options: {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
defaultValue: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
export declare const Default: Story;
|
|
19
|
+
export declare const VerticalWithHints: Story;
|
|
20
|
+
export declare const DisabledOption: Story;
|
|
21
|
+
export declare const Disabled: Story;
|
|
22
|
+
export declare const Controlled: Story;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
export interface ReactionItem {
|
|
3
|
+
/** Passed back to `onToggle`. */
|
|
4
|
+
key: string;
|
|
5
|
+
/** Required: the accessible name and title of the button ("Thumbs up"). */
|
|
6
|
+
label: string;
|
|
7
|
+
/** What the button shows: an Icon or a short text. */
|
|
8
|
+
symbol: ReactNode;
|
|
9
|
+
count: number;
|
|
10
|
+
/** The signed-in person reacted. Rendered as aria-pressed. */
|
|
11
|
+
mine: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ReactionBarProps {
|
|
14
|
+
items: ReactionItem[];
|
|
15
|
+
onToggle: (key: string) => void;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** Accessible name of the group. */
|
|
18
|
+
label?: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function ReactionBar({ items, onToggle, disabled, label, className }: ReactionBarProps): JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { ReactionBar } from "./ReactionBar";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ReactionBar;
|
|
6
|
+
args: {
|
|
7
|
+
onToggle: () => void;
|
|
8
|
+
items: ({
|
|
9
|
+
key: string;
|
|
10
|
+
label: string;
|
|
11
|
+
symbol: import("react").JSX.Element;
|
|
12
|
+
count: number;
|
|
13
|
+
mine: true;
|
|
14
|
+
} | {
|
|
15
|
+
key: string;
|
|
16
|
+
label: string;
|
|
17
|
+
symbol: import("react").JSX.Element;
|
|
18
|
+
count: number;
|
|
19
|
+
mine: false;
|
|
20
|
+
})[];
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
export declare const Default: Story;
|
|
26
|
+
export declare const Disabled: Story;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
/** Props handed to `renderLink`; spread them on your router's link. */
|
|
3
|
+
export interface ResourceCardLinkProps {
|
|
4
|
+
href: string;
|
|
5
|
+
className: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface ResourceCardProps {
|
|
9
|
+
/** Name of the thing: a provider, an integration, a tool. */
|
|
10
|
+
title: ReactNode;
|
|
11
|
+
/** Line under the title: a StatusDot with a label, Badges or one short fact. */
|
|
12
|
+
status?: ReactNode;
|
|
13
|
+
/** Before the text: an Avatar, a logo or an Icon. */
|
|
14
|
+
leading?: ReactNode;
|
|
15
|
+
/** After the text and outside the main link: a Switch or an IconButton. */
|
|
16
|
+
trailing?: ReactNode;
|
|
17
|
+
/** "hover" shows `trailing` on hover and focus only (always on touch screens). Default "always". */
|
|
18
|
+
revealTrailing?: "always" | "hover";
|
|
19
|
+
/** Makes the main area a link that opens the thing. */
|
|
20
|
+
href?: string;
|
|
21
|
+
/** Makes the main area a button. Ignored with `href`. Without both the card is static. */
|
|
22
|
+
onClick?: () => void;
|
|
23
|
+
/** Renders the `href` through your link component (e.g. Next `Link`). Default: a plain `<a>`. */
|
|
24
|
+
renderLink?: (props: ResourceCardLinkProps) => ReactNode;
|
|
25
|
+
/** Draws the card fainter, for a thing that is switched off. */
|
|
26
|
+
dimmed?: boolean;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
/** A card for one thing in a grid (a provider, an integration, a tool): its mark, its name, its status, one control. */
|
|
30
|
+
export declare function ResourceCard({ title, status, leading, trailing, revealTrailing, href, onClick, renderLink, dimmed, className }: ResourceCardProps): JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { ResourceCard } from "./ResourceCard";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ResourceCard;
|
|
6
|
+
args: {
|
|
7
|
+
title: string;
|
|
8
|
+
status: string;
|
|
9
|
+
leading: import("react").JSX.Element;
|
|
10
|
+
href: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default meta;
|
|
14
|
+
type Story = StoryObj<typeof meta>;
|
|
15
|
+
export declare const Default: Story;
|
|
16
|
+
export declare const Connected: Story;
|
|
17
|
+
export declare const SwitchedOff: Story;
|
|
18
|
+
/** A grid of providers; the switch shows on hover or focus. */
|
|
19
|
+
export declare const InGrid: Story;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
export interface ReviewCommentLabels {
|
|
3
|
+
/** Text of the line reference, e.g. "Line 42". */
|
|
4
|
+
line: (line: number | string) => string;
|
|
5
|
+
/** Heading of the suggestion block. */
|
|
6
|
+
suggestion: string;
|
|
7
|
+
/** Button that resolves the thread. */
|
|
8
|
+
resolve: string;
|
|
9
|
+
/** Button that reopens a resolved thread. */
|
|
10
|
+
reopen: string;
|
|
11
|
+
/** Badge on a resolved thread. */
|
|
12
|
+
resolved: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ReviewCommentProps {
|
|
15
|
+
/** The line the comment is on: a number or a range label ("40-44"). */
|
|
16
|
+
line: number | string;
|
|
17
|
+
/** File path shown before the line reference. */
|
|
18
|
+
file?: string;
|
|
19
|
+
/** Who wrote it. */
|
|
20
|
+
author: string;
|
|
21
|
+
/** The time as text, already formatted. */
|
|
22
|
+
time?: string;
|
|
23
|
+
/** The comment text. Render user text through a sanitizing renderer, never as raw HTML. */
|
|
24
|
+
body?: ReactNode;
|
|
25
|
+
/** The comment text as children, the same as `body` (both given: body first). */
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
/** Replacement code the author proposes. Shown as plain text in a code block. */
|
|
28
|
+
suggestion?: string;
|
|
29
|
+
/** The thread is resolved: faded body and a badge. */
|
|
30
|
+
resolved?: boolean;
|
|
31
|
+
/** Shows a "Resolve" button while the thread is open. */
|
|
32
|
+
onResolve?: () => void;
|
|
33
|
+
/** Shows a "Reopen" button once the thread is resolved. */
|
|
34
|
+
onReopen?: () => void;
|
|
35
|
+
/** Under the suggestion: a reply composer or the like. */
|
|
36
|
+
footer?: ReactNode;
|
|
37
|
+
/** Override the English defaults (e.g. for vi). */
|
|
38
|
+
labels?: Partial<ReviewCommentLabels>;
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare function ReviewComment({ line, file, author, time, body, children, suggestion, resolved, onResolve, onReopen, footer, labels, className }: ReviewCommentProps): JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { ReviewComment } from "./ReviewComment";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ReviewComment;
|
|
6
|
+
args: {
|
|
7
|
+
file: string;
|
|
8
|
+
line: number;
|
|
9
|
+
author: string;
|
|
10
|
+
time: string;
|
|
11
|
+
body: string;
|
|
12
|
+
onResolve: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
export declare const Default: Story;
|
|
18
|
+
export declare const WithSuggestion: Story;
|
|
19
|
+
export declare const Resolved: Story;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
import type { IconName } from "../../icons";
|
|
3
|
+
export interface RouteNode {
|
|
4
|
+
id: string;
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
/** 16px icon before the label. */
|
|
7
|
+
icon?: IconName;
|
|
8
|
+
/** Quiet second line: a count, a host, a model. */
|
|
9
|
+
detail?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface RouteDiagramProps {
|
|
12
|
+
/** Accessible name of the figure ("Request route"). */
|
|
13
|
+
label: string;
|
|
14
|
+
/** What sends traffic in, on the left (clients, agents, apps). */
|
|
15
|
+
inputs: RouteNode[];
|
|
16
|
+
/** The router in the middle. `mark` is your product mark, usually `BrandMark variant="tile"`. */
|
|
17
|
+
hub: {
|
|
18
|
+
name: ReactNode;
|
|
19
|
+
mark?: ReactNode;
|
|
20
|
+
detail?: ReactNode;
|
|
21
|
+
};
|
|
22
|
+
/** Where traffic leaves to, on the right (providers, accounts, keys). */
|
|
23
|
+
outputs: RouteNode[];
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
/** Traffic in on the left, the router in the middle, traffic out on the right. Stacks top to bottom in a narrow container. */
|
|
27
|
+
export declare function RouteDiagram({ label, inputs, hub, outputs, className }: RouteDiagramProps): JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
export type RunStepStatus = "pending" | "running" | "done" | "failed" | "skipped";
|
|
3
|
+
export interface RunTimelineStep {
|
|
4
|
+
id: string;
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
status: RunStepStatus;
|
|
7
|
+
/** When the step started, as text, already formatted ("14:02"). */
|
|
8
|
+
at?: string;
|
|
9
|
+
/** How long it took. Shown as text from `labels.duration`. */
|
|
10
|
+
durationMs?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface RunTimelineLabels {
|
|
13
|
+
/** Names the list for screen readers. */
|
|
14
|
+
list: string;
|
|
15
|
+
/** Text of each status, read by screen readers. */
|
|
16
|
+
status: Record<RunStepStatus, string>;
|
|
17
|
+
/** Formats a duration ("1.2 s", "3 min 4 s"). */
|
|
18
|
+
duration: (ms: number) => string;
|
|
19
|
+
}
|
|
20
|
+
export interface RunTimelineProps {
|
|
21
|
+
steps: RunTimelineStep[];
|
|
22
|
+
/** Override the English defaults (e.g. for vi). */
|
|
23
|
+
labels?: Partial<Omit<RunTimelineLabels, "status">> & {
|
|
24
|
+
status?: Partial<RunTimelineLabels["status"]>;
|
|
25
|
+
};
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function RunTimeline({ steps, labels, className }: RunTimelineProps): JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { RunTimeline } from "./RunTimeline";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof RunTimeline;
|
|
6
|
+
args: {
|
|
7
|
+
steps: ({
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
status: "done";
|
|
11
|
+
at: string;
|
|
12
|
+
durationMs: number;
|
|
13
|
+
} | {
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
status: "failed";
|
|
17
|
+
at: string;
|
|
18
|
+
durationMs: number;
|
|
19
|
+
} | {
|
|
20
|
+
at?: undefined;
|
|
21
|
+
durationMs?: undefined;
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
status: "skipped";
|
|
25
|
+
})[];
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export default meta;
|
|
29
|
+
type Story = StoryObj<typeof meta>;
|
|
30
|
+
export declare const Default: Story;
|
|
31
|
+
export declare const Running: Story;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type JSX, type ReactNode } from "react";
|
|
2
|
+
export interface SaveBarLabels {
|
|
3
|
+
/** The bar's message and region name. */
|
|
4
|
+
unsaved: string;
|
|
5
|
+
save: string;
|
|
6
|
+
discard: string;
|
|
7
|
+
saving: string;
|
|
8
|
+
}
|
|
9
|
+
export interface SaveBarProps {
|
|
10
|
+
/** The form differs from what is saved. The bar shows only while dirty or busy. */
|
|
11
|
+
dirty: boolean;
|
|
12
|
+
onSave: () => void;
|
|
13
|
+
onDiscard: () => void;
|
|
14
|
+
busy?: boolean;
|
|
15
|
+
/** A save error; replaces the message and is announced. */
|
|
16
|
+
error?: ReactNode;
|
|
17
|
+
/** Disables Save, e.g. while the form is invalid. */
|
|
18
|
+
saveDisabled?: boolean;
|
|
19
|
+
labels?: Partial<SaveBarLabels>;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function SaveBar({ dirty, onSave, onDiscard, busy, error, saveDisabled, labels, className }: SaveBarProps): JSX.Element | null;
|
|
23
|
+
export interface UnsavedGuard {
|
|
24
|
+
/** Asks with `window.confirm(message)` when dirty; true means go ahead (not dirty, or the user agreed). Call it before an in-app navigation or before closing a Drawer. */
|
|
25
|
+
confirmLeave: () => boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface UnsavedGuardOptions {
|
|
28
|
+
/**
|
|
29
|
+
* Also ask before following a same-page link while dirty: a click on an `<a href>` whose target is in this
|
|
30
|
+
* document (a `#/route` hash link from `NavList` or `Breadcrumb`, or a same-origin path). The click is cancelled
|
|
31
|
+
* when the user says no. Off by default, so a router that already calls `confirmLeave()` does not ask twice.
|
|
32
|
+
*/
|
|
33
|
+
guardLinks?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Pure: whether a click on a link with `href` leaves the current view inside the same document (and so needs
|
|
37
|
+
* `confirmLeave`). `here` is the current URL. Hash-only links that keep the current hash, other origins, `target`
|
|
38
|
+
* other than `_self`, `download` links and modified clicks are not in-app navigations.
|
|
39
|
+
*/
|
|
40
|
+
export declare function isInAppNavigation(link: {
|
|
41
|
+
href: string;
|
|
42
|
+
target?: string | null;
|
|
43
|
+
download?: boolean;
|
|
44
|
+
}, here: string, click?: {
|
|
45
|
+
button?: number;
|
|
46
|
+
metaKey?: boolean;
|
|
47
|
+
ctrlKey?: boolean;
|
|
48
|
+
shiftKey?: boolean;
|
|
49
|
+
altKey?: boolean;
|
|
50
|
+
}): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* While `dirty`, the browser asks before the tab is closed or reloaded (beforeunload). In-app links are the router's
|
|
53
|
+
* job: call `confirmLeave()` before navigating, or pass `{ guardLinks: true }` to have same-page link clicks
|
|
54
|
+
* (hash routes included) ask first.
|
|
55
|
+
*/
|
|
56
|
+
export declare function useUnsavedGuard(dirty: boolean, message?: string, options?: UnsavedGuardOptions): UnsavedGuard;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { SaveBar } from "./SaveBar";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof SaveBar;
|
|
6
|
+
args: {
|
|
7
|
+
dirty: true;
|
|
8
|
+
onSave: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
9
|
+
onDiscard: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Default: Story;
|
|
15
|
+
export declare const Saving: Story;
|
|
16
|
+
export declare const Failed: Story;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { InputHTMLAttributes, JSX } from "react";
|
|
2
|
+
export interface SearchInputLabels {
|
|
3
|
+
/** aria-label of the input when no other label is given. */
|
|
4
|
+
search: string;
|
|
5
|
+
/** aria-label of the clear button. */
|
|
6
|
+
clear: string;
|
|
7
|
+
/** Result count read out after the input. */
|
|
8
|
+
count: (n: number) => string;
|
|
9
|
+
}
|
|
10
|
+
export interface SearchInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
|
|
11
|
+
/** "md" (34px, page search) by default; "sm" (26px) for panel filters and toolbars. */
|
|
12
|
+
size?: "sm" | "md";
|
|
13
|
+
/** Shows a clear button while `value` is not empty. */
|
|
14
|
+
onClear?: () => void;
|
|
15
|
+
/** Keyboard shortcut shown while the input is empty, e.g. "Ctrl K". */
|
|
16
|
+
shortcut?: string;
|
|
17
|
+
/** Number of matches; shown after the input and announced politely. */
|
|
18
|
+
count?: number;
|
|
19
|
+
/** Override the English defaults (e.g. for vi). */
|
|
20
|
+
labels?: Partial<SearchInputLabels>;
|
|
21
|
+
}
|
|
22
|
+
export declare function SearchInput({ size, onClear, shortcut, count, labels, className, value, ...rest }: SearchInputProps): JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { SearchInput } from "./SearchInput";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof SearchInput;
|
|
6
|
+
args: {
|
|
7
|
+
placeholder: string;
|
|
8
|
+
size: "md";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const WithShortcut: Story;
|
|
15
|
+
export declare const Small: Story;
|
|
16
|
+
export declare const Disabled: Story;
|
|
17
|
+
/** Typing shows the clear button and the match count. */
|
|
18
|
+
export declare const WithClearAndCount: Story;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type JSX, type ReactNode } from "react";
|
|
2
|
+
export interface SearchPickerItem {
|
|
3
|
+
id: string;
|
|
4
|
+
/** Main line. */
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
/** Second line in muted text. */
|
|
7
|
+
meta?: ReactNode;
|
|
8
|
+
/** Before the text: an icon, StatusDot or Badge. */
|
|
9
|
+
leading?: ReactNode;
|
|
10
|
+
/** Shown but skipped by the arrow keys and ignored by Enter and click. */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface SearchPickerLabels {
|
|
14
|
+
/** aria-label of the clear button. */
|
|
15
|
+
clear: string;
|
|
16
|
+
}
|
|
17
|
+
export interface SearchPickerProps {
|
|
18
|
+
/** The query. */
|
|
19
|
+
value: string;
|
|
20
|
+
onValueChange: (value: string) => void;
|
|
21
|
+
/** The matches for `value`; the caller searches and filters. */
|
|
22
|
+
items: SearchPickerItem[];
|
|
23
|
+
/** Enter or a click on an enabled option. */
|
|
24
|
+
onPick: (id: string) => void;
|
|
25
|
+
/** A loading, empty or error line under the list; announced politely. */
|
|
26
|
+
status?: ReactNode;
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
/** Accessible name of the box and of the list. */
|
|
29
|
+
label: string;
|
|
30
|
+
/**
|
|
31
|
+
* Show `label` above the box as a real `<label>`, like `Field` and `Combobox`. Use it when the picker sits in a form
|
|
32
|
+
* next to labelled fields; leave it off where a heading or a dialog title already names the search.
|
|
33
|
+
*/
|
|
34
|
+
showLabel?: boolean;
|
|
35
|
+
/** Override the English defaults (e.g. for vi). */
|
|
36
|
+
labels?: Partial<SearchPickerLabels>;
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface KeyResult {
|
|
40
|
+
/** The option that is active after the key. */
|
|
41
|
+
active: string | null;
|
|
42
|
+
/** An option to pick (Enter). */
|
|
43
|
+
pick: string | null;
|
|
44
|
+
/** Escape with a query: clear it and keep the key from reaching a parent dialog. */
|
|
45
|
+
clear: boolean;
|
|
46
|
+
}
|
|
47
|
+
/** What a key does to the list: arrows move over enabled options, Enter picks, Escape clears a query. Pure, so it can be tested without a DOM. */
|
|
48
|
+
export declare function searchPickerKey(items: SearchPickerItem[], active: string | null, key: string, query: string): KeyResult;
|
|
49
|
+
export declare function SearchPicker({ value, onValueChange, items, onPick, status, placeholder, label, showLabel, labels, className }: SearchPickerProps): JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { SearchPicker, type SearchPickerItem } from "./SearchPicker";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof SearchPicker;
|
|
6
|
+
args: {
|
|
7
|
+
label: string;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
value: string;
|
|
10
|
+
items: SearchPickerItem[];
|
|
11
|
+
onValueChange: () => void;
|
|
12
|
+
onPick: () => void;
|
|
13
|
+
};
|
|
14
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-vite").ReactRenderer, {
|
|
15
|
+
value: string;
|
|
16
|
+
onValueChange: (value: string) => void;
|
|
17
|
+
items: SearchPickerItem[];
|
|
18
|
+
onPick: (id: string) => void;
|
|
19
|
+
status?: import("react").ReactNode;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
label: string;
|
|
22
|
+
showLabel?: boolean;
|
|
23
|
+
labels?: Partial<import("./SearchPicker").SearchPickerLabels>;
|
|
24
|
+
className?: string;
|
|
25
|
+
}>) => import("react").JSX.Element)[];
|
|
26
|
+
};
|
|
27
|
+
export default meta;
|
|
28
|
+
type Story = StoryObj<typeof meta>;
|
|
29
|
+
export declare const Default: Story;
|
|
30
|
+
export declare const Loading: Story;
|
|
31
|
+
export declare const Empty: Story;
|
|
32
|
+
/** Arrow keys move, Enter picks, Escape clears the query. */
|
|
33
|
+
export declare const Interactive: Story;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
export interface SegmentedOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** Small count shown after the label (0 is shown). */
|
|
6
|
+
count?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface SegmentedProps {
|
|
9
|
+
options: SegmentedOption[];
|
|
10
|
+
value?: string;
|
|
11
|
+
defaultValue?: string;
|
|
12
|
+
onChange?: (value: string) => void;
|
|
13
|
+
/** aria-label of the group. */
|
|
14
|
+
label?: string;
|
|
15
|
+
/** Greys out every segment, for example while a save is under way. */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function Segmented({ options, value, defaultValue, onChange, label, disabled }: SegmentedProps): JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Segmented } from "./Segmented";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Segmented;
|
|
6
|
+
args: {
|
|
7
|
+
label: string;
|
|
8
|
+
defaultValue: string;
|
|
9
|
+
options: {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
export declare const Default: Story;
|
|
18
|
+
export declare const Theme: Story;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type JSX, type ReactNode, type Ref, type SelectHTMLAttributes } from "react";
|
|
2
|
+
import type { IconName } from "../../icons";
|
|
3
|
+
export interface SelectOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, "size"> {
|
|
8
|
+
/** Flat list of choices. Use this or `children`, never both: `options` wins when both are set. */
|
|
9
|
+
options?: SelectOption[];
|
|
10
|
+
/** Native `<option>` and `<optgroup>` elements, for grouped or computed lists. Use this or `options`, never both. */
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
/** "md" (32px, forms) by default; "sm" (26px, the height of `SearchInput size="sm"`) for toolbars and table filters. */
|
|
13
|
+
size?: "sm" | "md";
|
|
14
|
+
ref?: Ref<HTMLSelectElement>;
|
|
15
|
+
/** Leading icon inside the control, such as "globe" for a language picker. Decorative: the select still needs a label. */
|
|
16
|
+
icon?: IconName;
|
|
17
|
+
/** Visible label above the select, like `Field`: the select then sits in a `.ws-field` with an optional hint or error line. */
|
|
18
|
+
label?: ReactNode;
|
|
19
|
+
/** Line under the select (needs `label`). */
|
|
20
|
+
hint?: ReactNode;
|
|
21
|
+
/** Error line under the select; marks it invalid (needs `label`). */
|
|
22
|
+
error?: ReactNode;
|
|
23
|
+
/** Keep the label for screen readers only. */
|
|
24
|
+
hideLabel?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare function Select(props: SelectProps): JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Select } from "./Select";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Select;
|
|
6
|
+
args: {
|
|
7
|
+
"aria-label": string;
|
|
8
|
+
defaultValue: string;
|
|
9
|
+
options: {
|
|
10
|
+
value: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
export declare const Default: Story;
|
|
18
|
+
export declare const Disabled: Story;
|
|
19
|
+
export declare const Small: Story;
|
|
20
|
+
export declare const Grouped: Story;
|
|
21
|
+
export declare const Labelled: Story;
|
|
22
|
+
export declare const Invalid: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
import { type StatusTone } from "../StatusDot/StatusDot";
|
|
3
|
+
export interface ServiceStatusProps {
|
|
4
|
+
/** ok: up; warn: degraded; danger: down; neutral: unknown. */
|
|
5
|
+
tone: StatusTone;
|
|
6
|
+
/** The state in words ("Gateway online"). */
|
|
7
|
+
label: ReactNode;
|
|
8
|
+
/** Quiet mono text at the end: a version, a region, a build. */
|
|
9
|
+
detail?: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/** One line for the foot of a sidebar: the state of the service this console runs, and its version. */
|
|
13
|
+
export declare function ServiceStatus({ tone, label, detail, className }: ServiceStatusProps): JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
import type { SessionState } from "../../types";
|
|
3
|
+
import { type DiffStatLabels } from "../DiffStat/DiffStat";
|
|
4
|
+
export interface SessionBarLabels {
|
|
5
|
+
/** aria-label of the bar. */
|
|
6
|
+
region: string;
|
|
7
|
+
/** Visible words of the state, per state. */
|
|
8
|
+
status: Record<SessionState, string>;
|
|
9
|
+
/** aria-label of the model, e.g. "Model". */
|
|
10
|
+
model: string;
|
|
11
|
+
/** aria-label of the elapsed time, e.g. "Elapsed". */
|
|
12
|
+
elapsed: string;
|
|
13
|
+
/** Formats the elapsed time, e.g. "5 min". */
|
|
14
|
+
duration: (ms: number) => string;
|
|
15
|
+
diffStat: DiffStatLabels["diffStat"];
|
|
16
|
+
}
|
|
17
|
+
export interface SessionBarProps {
|
|
18
|
+
status: SessionState;
|
|
19
|
+
/** Model name, e.g. "claude-opus-5-5". */
|
|
20
|
+
model?: string;
|
|
21
|
+
/** Time since the session started, in ms. */
|
|
22
|
+
elapsed?: number;
|
|
23
|
+
/** Lines added and removed by this session. */
|
|
24
|
+
diff?: {
|
|
25
|
+
add: number;
|
|
26
|
+
del: number;
|
|
27
|
+
};
|
|
28
|
+
/** Buttons at the end of the bar (IconButtons or secondary Buttons; no primary here). */
|
|
29
|
+
actions?: ReactNode;
|
|
30
|
+
labels?: Partial<SessionBarLabels>;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function SessionBar({ status, model, elapsed, diff, actions, labels, className }: SessionBarProps): JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { SessionBar } from "./SessionBar";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof SessionBar;
|
|
6
|
+
args: {
|
|
7
|
+
status: "working";
|
|
8
|
+
model: string;
|
|
9
|
+
elapsed: number;
|
|
10
|
+
diff: {
|
|
11
|
+
add: number;
|
|
12
|
+
del: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
argTypes: {
|
|
16
|
+
status: {
|
|
17
|
+
control: "select";
|
|
18
|
+
options: string[];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<typeof meta>;
|
|
24
|
+
export declare const Working: Story;
|
|
25
|
+
export declare const NeedsYou: Story;
|
|
26
|
+
export declare const WithActions: Story;
|
|
27
|
+
export declare const StateOnly: Story;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
export interface SettingRowProps {
|
|
3
|
+
/** Setting name in sentence case ("Restore sessions on launch"). */
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
/** One or two lines on what the setting does. */
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
/** The control at the right: a Switch, Select, Segmented or Button. */
|
|
8
|
+
control?: ReactNode;
|
|
9
|
+
/** Row id, so search results and deep links can scroll to it. */
|
|
10
|
+
id?: string;
|
|
11
|
+
/** Id of the form control. The label then becomes a <label for> and the description its hint id (`<controlId>-hint`). */
|
|
12
|
+
controlId?: string;
|
|
13
|
+
/** Briefly highlights the row after a jump from search. Re-mount or toggle to replay. */
|
|
14
|
+
flash?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function SettingRow({ label, description, control, id, controlId, flash, className }: SettingRowProps): JSX.Element;
|