@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,30 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
export interface DonutSlice {
|
|
3
|
+
/** Stable key. */
|
|
4
|
+
key: string;
|
|
5
|
+
/** Category name, shown in the legend. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** The measure; negative values count as zero. */
|
|
8
|
+
value: number;
|
|
9
|
+
/** The value, already formatted ("42%", "$3.4k"). */
|
|
10
|
+
valueLabel: string;
|
|
11
|
+
}
|
|
12
|
+
export interface DonutChartProps {
|
|
13
|
+
/** One slice per category, in the order to draw them clockwise from 12 o'clock (usually largest first). At most 8. */
|
|
14
|
+
slices: readonly DonutSlice[];
|
|
15
|
+
/** Accessible name of the chart. */
|
|
16
|
+
label: string;
|
|
17
|
+
/** Text in the hole, such as the total ("100%" over "Revenue"). */
|
|
18
|
+
center?: ReactNode;
|
|
19
|
+
/** Diameter of the ring in px. Default 160. */
|
|
20
|
+
size?: number;
|
|
21
|
+
}
|
|
22
|
+
/** Categorical colours in order: distinct hues from the theme's tokens, so the ring follows light and dark. */
|
|
23
|
+
export declare const DONUT_COLORS: readonly ["--accent", "--ok", "--orange", "--violet", "--warn", "--signal", "--danger", "--text-2"];
|
|
24
|
+
/** Pure: each slice's share of 100 and where it starts, for a ring drawn with pathLength="100". */
|
|
25
|
+
export declare function donutArcs(slices: readonly DonutSlice[]): {
|
|
26
|
+
key: string;
|
|
27
|
+
share: number;
|
|
28
|
+
start: number;
|
|
29
|
+
}[];
|
|
30
|
+
export declare function DonutChart({ slices, label, center, size }: DonutChartProps): JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { DonutChart } from "./DonutChart";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof DonutChart;
|
|
6
|
+
args: {
|
|
7
|
+
label: string;
|
|
8
|
+
center: import("react").JSX.Element;
|
|
9
|
+
slices: {
|
|
10
|
+
key: string;
|
|
11
|
+
label: string;
|
|
12
|
+
value: number;
|
|
13
|
+
valueLabel: string;
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
16
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-vite").ReactRenderer, {
|
|
17
|
+
slices: readonly import("./DonutChart").DonutSlice[];
|
|
18
|
+
label: string;
|
|
19
|
+
center?: import("react").ReactNode;
|
|
20
|
+
size?: number;
|
|
21
|
+
}>) => import("react").JSX.Element)[];
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
export declare const Default: Story;
|
|
26
|
+
export declare const OneSlice: Story;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type JSX, type ReactNode } from "react";
|
|
2
|
+
export interface DrawerLabels {
|
|
3
|
+
close: string;
|
|
4
|
+
}
|
|
5
|
+
export interface DrawerProps {
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
/** One line under the title. */
|
|
8
|
+
description?: ReactNode;
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
/** Actions pinned to the bottom (Cancel, then the primary Button). */
|
|
11
|
+
footer?: ReactNode;
|
|
12
|
+
/** Esc, the close button and a click on the backdrop call it. Not called while `busy`. */
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
/** Ignore close requests, e.g. while saving. */
|
|
15
|
+
busy?: boolean;
|
|
16
|
+
/** "default" 420px, "wide" 640px; both cap at the viewport. */
|
|
17
|
+
size?: "default" | "wide";
|
|
18
|
+
/** Which edge it slides from. Default "end" (right in LTR). "bottom" is a sheet: full width, capped at 85% of the height. */
|
|
19
|
+
side?: "end" | "start" | "bottom";
|
|
20
|
+
/** false renders the markup only (previews); default true traps focus and makes the page inert. */
|
|
21
|
+
modal?: boolean;
|
|
22
|
+
labels?: Partial<DrawerLabels>;
|
|
23
|
+
/** With `modal`, render into `document.body` once mounted, so no parent's overflow, transform or z-index clips it. Default true. */
|
|
24
|
+
portal?: boolean;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function Drawer({ title, description, children, footer, onClose, busy, size, side, modal, labels, portal, className }: DrawerProps): JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Drawer } from "./Drawer";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Drawer;
|
|
6
|
+
args: {
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
modal: false;
|
|
10
|
+
onClose: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
11
|
+
children: string;
|
|
12
|
+
footer: import("react").JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
export declare const Default: Story;
|
|
18
|
+
export declare const Wide: Story;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { JSX } from "react";
|
|
2
|
+
import type { IconName } from "../../icons";
|
|
3
|
+
export interface EmblemProps {
|
|
4
|
+
/** The thing's name: the accessible label, and the source of the letters when `text` is not given. */
|
|
5
|
+
name: string;
|
|
6
|
+
/** One to three letters to show instead of the initials ("OA", "ARK"). */
|
|
7
|
+
text?: string;
|
|
8
|
+
/** A logo: a `data:` or same-origin URL. Shown instead of the letters. */
|
|
9
|
+
src?: string | null;
|
|
10
|
+
/** An icon instead of letters, for a thing that is a kind, not a brand. */
|
|
11
|
+
icon?: IconName;
|
|
12
|
+
/** The thing's own colour, any CSS colour. The tile is a tint of it and the letters lean towards it. Default: the accent. */
|
|
13
|
+
color?: string | null;
|
|
14
|
+
/** 24, 32 or 48 px. Default "md". */
|
|
15
|
+
size?: "sm" | "md" | "lg";
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/** A rounded square that stands for one thing (a provider, an integration, a tool): its logo, an icon, or its letters on a tint of its colour. */
|
|
19
|
+
export declare function Emblem({ name, text, src, icon, color, size, className }: EmblemProps): JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Emblem } from "./Emblem";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Emblem;
|
|
6
|
+
args: {
|
|
7
|
+
name: string;
|
|
8
|
+
text: string;
|
|
9
|
+
color: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Default: Story;
|
|
15
|
+
export declare const Initials: Story;
|
|
16
|
+
export declare const NoColour: Story;
|
|
17
|
+
export declare const WithIcon: Story;
|
|
18
|
+
/** The three sizes, and colours close to the surface. */
|
|
19
|
+
export declare const Row: Story;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
import type { IconName } from "../../icons";
|
|
3
|
+
import { type StepDotsLabels } from "../StepDots/StepDots";
|
|
4
|
+
export interface EmptyStateStep {
|
|
5
|
+
/** What to do in this step ("Open a project"). */
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
/** The step is finished. Shown as a check mark and read as "Done". */
|
|
8
|
+
done?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface EmptyStateLabels {
|
|
11
|
+
/** Text read after a finished step. */
|
|
12
|
+
done: string;
|
|
13
|
+
/** Names the step dots ("Step 2 of 3"). */
|
|
14
|
+
step: StepDotsLabels["step"];
|
|
15
|
+
/** Names the list of steps. */
|
|
16
|
+
steps: string;
|
|
17
|
+
}
|
|
18
|
+
export interface EmptyStateProps {
|
|
19
|
+
/** Icon in a soft tile; shown only for size "center". */
|
|
20
|
+
icon?: IconName;
|
|
21
|
+
/** A decorative picture for a whole-page status view, in place of the small icon tile (hidden from assistive tech); size "center" only. */
|
|
22
|
+
art?: ReactNode;
|
|
23
|
+
/** A large figure above the title for a whole-page status view, such as "404"; shown only for size "center". */
|
|
24
|
+
figure?: ReactNode;
|
|
25
|
+
/** Render the title as this heading level (1 for a whole-page status view such as 404); a paragraph by default. */
|
|
26
|
+
headingLevel?: 1 | 2 | 3;
|
|
27
|
+
/** What is missing, as a statement ("No worktrees yet"). */
|
|
28
|
+
title: ReactNode;
|
|
29
|
+
/** One line on how to fill it. */
|
|
30
|
+
hint?: ReactNode;
|
|
31
|
+
/** Numbered steps under the hint, with `StepDots` above them. For a first-run view that teaches a short path. */
|
|
32
|
+
steps?: EmptyStateStep[];
|
|
33
|
+
/** 1-based step the person is on. Defaults to the first step that is not done. */
|
|
34
|
+
current?: number;
|
|
35
|
+
/** Override the English defaults (e.g. for vi). Only used with `steps`. */
|
|
36
|
+
labels?: Partial<EmptyStateLabels>;
|
|
37
|
+
/** One primary action, maybe one secondary. */
|
|
38
|
+
actions?: ReactNode;
|
|
39
|
+
/** "inline" for a short muted line inside a pane; "center" for a whole empty view. Default "inline". */
|
|
40
|
+
size?: "inline" | "center";
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare function EmptyState({ icon, art, figure, headingLevel, title, hint, steps, current, labels, actions, size, className }: EmptyStateProps): JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { EmptyState } from "./EmptyState";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof EmptyState;
|
|
6
|
+
args: {
|
|
7
|
+
title: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Inline: Story;
|
|
13
|
+
export declare const Center: Story;
|
|
14
|
+
export declare const NoResults: Story;
|
|
15
|
+
export declare const WithSteps: Story;
|
|
16
|
+
/** A whole-page status view: a large figure over the title; `art` takes a decorative picture in place of the icon tile. */
|
|
17
|
+
export declare const StatusPage: Story;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
import { type CodeBlockLabels } from "../CodeBlock/CodeBlock";
|
|
3
|
+
export interface EndpointPanelLabels extends CodeBlockLabels {
|
|
4
|
+
/** aria-label of the paths list. */
|
|
5
|
+
paths: string;
|
|
6
|
+
}
|
|
7
|
+
export interface EndpointPanelProps {
|
|
8
|
+
title: ReactNode;
|
|
9
|
+
/** One sentence under the title: what to do with the URL. Wraps on narrow cards. */
|
|
10
|
+
description?: ReactNode;
|
|
11
|
+
/** The base URL a client sets. Shown whole and copied whole. */
|
|
12
|
+
url: string;
|
|
13
|
+
/** Label in the code head ("Base URL"). */
|
|
14
|
+
urlLabel?: string;
|
|
15
|
+
/** Paths under the URL, shown as mono tags ("/v1/chat/completions"). */
|
|
16
|
+
paths?: string[];
|
|
17
|
+
/** Right side on wide screens, under the URL on narrow ones: usually a `RouteDiagram`. */
|
|
18
|
+
aside?: ReactNode;
|
|
19
|
+
/** Controls at the end of the head (a "Create key" button). */
|
|
20
|
+
actions?: ReactNode;
|
|
21
|
+
onCopy?: (url: string) => void;
|
|
22
|
+
/** Heading element of the title. Default 2. */
|
|
23
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
24
|
+
/** Override the English defaults (e.g. for vi). */
|
|
25
|
+
labels?: Partial<EndpointPanelLabels>;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
/** The address a client points at: the base URL to copy, the paths under it, and room for a picture of the route. */
|
|
29
|
+
export declare function EndpointPanel({ title, description, url, urlLabel, paths, aside, actions, onCopy, headingLevel, labels, className }: EndpointPanelProps): JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
export interface FacetOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** Items that match this option alone. */
|
|
6
|
+
count?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface FacetFilterLabels {
|
|
9
|
+
/** aria-label of the search field. */
|
|
10
|
+
search: string;
|
|
11
|
+
/** aria-label of the search field's clear button. */
|
|
12
|
+
clearSearch: string;
|
|
13
|
+
/** Button that unchecks every option. */
|
|
14
|
+
clear: string;
|
|
15
|
+
/** Shown when the search matches no option. */
|
|
16
|
+
noResults: string;
|
|
17
|
+
/** Visually hidden after the trigger label while options are picked ("2 selected"). */
|
|
18
|
+
selected: (count: number) => string;
|
|
19
|
+
}
|
|
20
|
+
export interface FacetFilterProps {
|
|
21
|
+
/** The facet being filtered ("Status"); names the trigger and the panel. */
|
|
22
|
+
label: string;
|
|
23
|
+
options: FacetOption[];
|
|
24
|
+
/** Values that are checked. */
|
|
25
|
+
selected: string[];
|
|
26
|
+
/** Next selection, in the order of `options`. */
|
|
27
|
+
onChange: (next: string[]) => void;
|
|
28
|
+
/** Shows the search field. Default: more than 7 options. */
|
|
29
|
+
searchable?: boolean;
|
|
30
|
+
/** Open on first render (previews, docs). */
|
|
31
|
+
defaultOpen?: boolean;
|
|
32
|
+
/** Render the list into `document.body` (default true). false keeps it inside the filter, for an inline preview. */
|
|
33
|
+
portal?: boolean;
|
|
34
|
+
placement?: "bottom-start" | "bottom-end";
|
|
35
|
+
/** Override the English defaults (e.g. for vi). */
|
|
36
|
+
labels?: Partial<FacetFilterLabels>;
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function FacetFilter({ label, options, selected, onChange, searchable, defaultOpen, portal, placement, labels, className, }: FacetFilterProps): JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { FacetFilter } from "./FacetFilter";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof FacetFilter;
|
|
6
|
+
args: {
|
|
7
|
+
label: string;
|
|
8
|
+
options: {
|
|
9
|
+
value: string;
|
|
10
|
+
label: string;
|
|
11
|
+
count: number;
|
|
12
|
+
}[];
|
|
13
|
+
selected: never[];
|
|
14
|
+
onChange: () => void;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
export declare const Default: Story;
|
|
20
|
+
export declare const Picked: Story;
|
|
21
|
+
/** Past seven options the search field appears by itself. */
|
|
22
|
+
export declare const Searchable: Story;
|
|
23
|
+
export declare const Vietnamese: Story;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FacetOption } from "./FacetFilter";
|
|
2
|
+
/** Options whose label contains the query (trimmed, case and diacritic insensitive). An empty query keeps all; order is kept. */
|
|
3
|
+
export declare function filterFacetOptions<T extends Pick<FacetOption, "label">>(options: readonly T[], query: string): T[];
|
|
4
|
+
/** Adds or removes `value`. The result follows the order of `options`; selected values that are not options stay, at the end. */
|
|
5
|
+
export declare function toggleFacetValue(selected: readonly string[], value: string, options: readonly Pick<FacetOption, "value">[]): string[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type InputHTMLAttributes, type JSX, type ReactNode, type Ref } from "react";
|
|
2
|
+
export interface FieldLabels {
|
|
3
|
+
/** Name of the password toggle while the value is hidden. */
|
|
4
|
+
show: string;
|
|
5
|
+
/** Name of the password toggle while the value is shown. */
|
|
6
|
+
hide: string;
|
|
7
|
+
}
|
|
8
|
+
export interface FieldProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
hint?: ReactNode;
|
|
11
|
+
/** When set, replaces the hint and marks the field invalid. */
|
|
12
|
+
error?: ReactNode;
|
|
13
|
+
/** Keeps the label for screen readers only (visually hidden), for inputs that would otherwise carry just an aria-label. */
|
|
14
|
+
hideLabel?: boolean;
|
|
15
|
+
/** Monospace value, for ids, codes, IPA, paths and keys (like `Textarea mono`). */
|
|
16
|
+
mono?: boolean;
|
|
17
|
+
/** Small control on the label row, end-aligned, such as a "Generate" link button. */
|
|
18
|
+
action?: ReactNode;
|
|
19
|
+
/** Content inside the control at its end, such as a unit or a small `IconButton`. The input text stops before it. */
|
|
20
|
+
end?: ReactNode;
|
|
21
|
+
/** With `type="password"`: a show/hide toggle inside the control end (after `end`). Default true; false opts out. */
|
|
22
|
+
reveal?: boolean;
|
|
23
|
+
/** Override the English defaults (e.g. for vi). */
|
|
24
|
+
labels?: Partial<FieldLabels>;
|
|
25
|
+
ref?: Ref<HTMLInputElement>;
|
|
26
|
+
}
|
|
27
|
+
export declare function Field({ label, hint, error, hideLabel, mono, action, end, reveal, labels, id, className, type, ...rest }: FieldProps): JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { Field } from "./Field";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Field;
|
|
6
|
+
args: {
|
|
7
|
+
label: string;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const WithHint: Story;
|
|
15
|
+
export declare const WithError: Story;
|
|
16
|
+
export declare const Disabled: Story;
|
|
17
|
+
export declare const ReadOnly: Story;
|
|
18
|
+
export declare const WithAction: Story;
|
|
19
|
+
export declare const WithEndUnit: Story;
|
|
20
|
+
export declare const WithEndButton: Story;
|
|
21
|
+
export declare const Password: Story;
|
|
22
|
+
export declare const PasswordInvalid: Story;
|
|
23
|
+
export declare const PasswordDisabled: Story;
|
|
24
|
+
export declare const PasswordNoReveal: Story;
|
|
25
|
+
export declare const PasswordTranslated: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { JSX, ReactNode } from "react";
|
|
2
|
+
export interface FieldMessageProps {
|
|
3
|
+
/** "error" is announced at once (role=alert); "warn" and "info" are read through aria-describedby. Default "error". */
|
|
4
|
+
tone?: "error" | "warn" | "info";
|
|
5
|
+
/** Give it an id and point the field's aria-describedby at it. */
|
|
6
|
+
id?: string;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function FieldMessage({ tone, id, children, className }: FieldMessageProps): JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { FieldMessage } from "./FieldMessage";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof FieldMessage;
|
|
6
|
+
args: {
|
|
7
|
+
children: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const ErrorTone: Story;
|
|
13
|
+
export declare const Warn: Story;
|
|
14
|
+
export declare const Info: Story;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type InputHTMLAttributes, type JSX, type ReactNode } from "react";
|
|
2
|
+
/** The part of `File` FileDrop reads; lets the checks run without a DOM. */
|
|
3
|
+
export interface FileLike {
|
|
4
|
+
name: string;
|
|
5
|
+
size: number;
|
|
6
|
+
type: string;
|
|
7
|
+
}
|
|
8
|
+
export type FileRejectReason = "type" | "size" | "count";
|
|
9
|
+
export interface FileRejection<F extends FileLike = File> {
|
|
10
|
+
file: F;
|
|
11
|
+
reason: FileRejectReason;
|
|
12
|
+
}
|
|
13
|
+
/** True when `file` matches an `accept` list ("image/*,.pdf,application/zip"); an empty list accepts all. */
|
|
14
|
+
export declare function matchesAccept(file: FileLike, accept: string | undefined): boolean;
|
|
15
|
+
/** Splits picked files into accepted and rejected, in order: wrong type, too big, then over the count limit. */
|
|
16
|
+
export declare function checkFiles<F extends FileLike>(files: readonly F[], opts: {
|
|
17
|
+
accept?: string;
|
|
18
|
+
maxSize?: number;
|
|
19
|
+
multiple?: boolean;
|
|
20
|
+
maxFiles?: number;
|
|
21
|
+
}): {
|
|
22
|
+
accepted: F[];
|
|
23
|
+
rejected: FileRejection<F>[];
|
|
24
|
+
};
|
|
25
|
+
/** "512 B", "1.4 KB", "3.2 MB" (base 1024). */
|
|
26
|
+
export declare function formatBytes(n: number): string;
|
|
27
|
+
/** A file shown in the list under the drop zone (uploaded, uploading or failed). */
|
|
28
|
+
export interface FileDropItem {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
size?: number;
|
|
32
|
+
/** 0 to 100 while uploading. */
|
|
33
|
+
progress?: number;
|
|
34
|
+
/** Short state text after the size: "Waiting", "Done", "Duplicate". The progress bar still shows while uploading. */
|
|
35
|
+
status?: ReactNode;
|
|
36
|
+
error?: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
export interface FileDropLabels {
|
|
39
|
+
/** The zone's main line. */
|
|
40
|
+
drop: string;
|
|
41
|
+
/** The link-styled part that opens the file chooser. */
|
|
42
|
+
browse: string;
|
|
43
|
+
/** Hint under the main line; built from accept and maxSize when not given. */
|
|
44
|
+
limits: (accept: string | undefined, maxSize: string | undefined) => string;
|
|
45
|
+
rejected: (name: string, reason: FileRejectReason) => string;
|
|
46
|
+
remove: (name: string) => string;
|
|
47
|
+
uploading: (percent: number) => string;
|
|
48
|
+
}
|
|
49
|
+
export interface FileDropProps {
|
|
50
|
+
/** Names the zone for screen readers ("Cover image"). */
|
|
51
|
+
label: string;
|
|
52
|
+
accept?: string;
|
|
53
|
+
/** Bytes. */
|
|
54
|
+
maxSize?: number;
|
|
55
|
+
multiple?: boolean;
|
|
56
|
+
maxFiles?: number;
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
/** Accepted files of one pick or drop. */
|
|
59
|
+
onFiles: (files: File[]) => void;
|
|
60
|
+
/** Rejected files of one pick or drop; also listed under the zone until the next pick. */
|
|
61
|
+
onReject?: (rejected: FileRejection[]) => void;
|
|
62
|
+
/** Files to list under the zone. */
|
|
63
|
+
items?: FileDropItem[];
|
|
64
|
+
onRemove?: (id: string) => void;
|
|
65
|
+
labels?: Partial<FileDropLabels>;
|
|
66
|
+
className?: string;
|
|
67
|
+
/** Extra attributes for the hidden file input: `name`, `id`, `data-*`, `aria-describedby`. FileDrop owns type, accept, multiple, disabled and onChange. */
|
|
68
|
+
inputProps?: Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "accept" | "multiple" | "disabled" | "onChange"> & {
|
|
69
|
+
[data: `data-${string}`]: string | undefined;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export declare function FileDrop({ label, accept, maxSize, multiple, maxFiles, disabled, onFiles, onReject, items, onRemove, labels, className, inputProps }: FileDropProps): JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { FileDrop } from "./FileDrop";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof FileDrop;
|
|
6
|
+
args: {
|
|
7
|
+
label: string;
|
|
8
|
+
accept: string;
|
|
9
|
+
maxSize: number;
|
|
10
|
+
multiple: true;
|
|
11
|
+
onFiles: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
12
|
+
onRemove: import("storybook/test").Mock<(...args: any[]) => any>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
export declare const Empty: Story;
|
|
18
|
+
export declare const WithFiles: Story;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { CSSProperties, JSX } from "react";
|
|
2
|
+
import type { IconName } from "../../icons";
|
|
3
|
+
/** Colour family. CSS maps each one to a theme token, so both themes keep their contrast. */
|
|
4
|
+
export type FileTone = "folder" | "folder-open" | "code" | "markup" | "style" | "data" | "doc" | "media" | "config" | "shell" | "test" | "plain";
|
|
5
|
+
export interface FileIconMatch {
|
|
6
|
+
icon: IconName;
|
|
7
|
+
tone: FileTone;
|
|
8
|
+
}
|
|
9
|
+
/** Picks the icon and tone for a tree row. Pure, so a file list can call it without rendering. */
|
|
10
|
+
export declare function fileIcon(name: string, kind?: "file" | "dir", open?: boolean): FileIconMatch;
|
|
11
|
+
export interface FileIconProps {
|
|
12
|
+
/** File or folder name; a path works too (only the last segment counts). */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Default "file". */
|
|
15
|
+
kind?: "file" | "dir";
|
|
16
|
+
/** Expanded folder. Ignored for files. */
|
|
17
|
+
open?: boolean;
|
|
18
|
+
/** Default 16. */
|
|
19
|
+
size?: number;
|
|
20
|
+
/** Set only when the icon stands alone without the file name next to it. */
|
|
21
|
+
label?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
style?: CSSProperties;
|
|
24
|
+
}
|
|
25
|
+
export declare function FileIcon({ name, kind, open, size, label, className, style }: FileIconProps): JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { FileIcon } from "./FileIcon";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof FileIcon;
|
|
6
|
+
args: {
|
|
7
|
+
name: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Single: Story;
|
|
13
|
+
export declare const OpenFolder: Story;
|
|
14
|
+
export declare const Catalogue: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, JSX, ReactNode } from "react";
|
|
2
|
+
export interface FilterChipProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
|
|
3
|
+
/** Whether the filter is on; rendered as aria-pressed. */
|
|
4
|
+
pressed: boolean;
|
|
5
|
+
/** Items that match this filter. */
|
|
6
|
+
count?: number;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare function FilterChip({ pressed, count, children, className, ...rest }: FilterChipProps): JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { FilterChip } from "./FilterChip";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof FilterChip;
|
|
6
|
+
args: {
|
|
7
|
+
pressed: false;
|
|
8
|
+
children: string;
|
|
9
|
+
count: number;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Default: Story;
|
|
15
|
+
export declare const Pressed: Story;
|
|
16
|
+
export declare const WithoutCount: Story;
|
|
17
|
+
export declare const Disabled: Story;
|
|
18
|
+
/** A filter row over agent sessions. */
|
|
19
|
+
export declare const Row: Story;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { type JSX, type ReactNode } from "react";
|
|
2
|
+
/** Size of a node and of the hub in the map, in px at zoom 1. The stylesheet reads them from the root. */
|
|
3
|
+
export declare const FLOW_NODE: {
|
|
4
|
+
readonly w: 220;
|
|
5
|
+
readonly h: 64;
|
|
6
|
+
};
|
|
7
|
+
export declare const FLOW_HUB: {
|
|
8
|
+
readonly w: 272;
|
|
9
|
+
readonly h: 80;
|
|
10
|
+
};
|
|
11
|
+
export interface FlowMapNode {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
/** Logo URL, as in `Emblem`. */
|
|
15
|
+
src?: string | null;
|
|
16
|
+
/** The thing's own colour and letters, as in `Emblem`. */
|
|
17
|
+
color?: string | null;
|
|
18
|
+
text?: string;
|
|
19
|
+
/** A short line under the name ("12 requests"). The state is said here, not only by the edge colour. */
|
|
20
|
+
detail?: string;
|
|
21
|
+
/** Traffic went through this edge: the edge is drawn in colour and moves. */
|
|
22
|
+
active?: boolean;
|
|
23
|
+
/** This node's share of the traffic, 0 to 1: its edge grows from 1.5px to 5px and carries more, faster packets. */
|
|
24
|
+
weight?: number;
|
|
25
|
+
/** Failures: the node's border and edge turn amber or red. Say the same in `detail` ("3 failed"). */
|
|
26
|
+
tone?: "warn" | "danger";
|
|
27
|
+
}
|
|
28
|
+
export interface FlowMapLabels {
|
|
29
|
+
zoomIn: string;
|
|
30
|
+
zoomOut: string;
|
|
31
|
+
fit: string;
|
|
32
|
+
/** aria-label of the controls group. */
|
|
33
|
+
controls: string;
|
|
34
|
+
}
|
|
35
|
+
export interface FlowMapProps {
|
|
36
|
+
/** The centre every node connects to. `mark` replaces the default letters (a `BrandMark`, an `Emblem`). */
|
|
37
|
+
hub: {
|
|
38
|
+
name: string;
|
|
39
|
+
mark?: ReactNode;
|
|
40
|
+
detail?: string;
|
|
41
|
+
};
|
|
42
|
+
/** Where traffic goes (providers). Round the hub, or in a column on its right when there are `sources`. */
|
|
43
|
+
nodes: FlowMapNode[];
|
|
44
|
+
/** What sends traffic in (callers, apps). Given, the map reads left to right: sources, hub, nodes, on curved edges. */
|
|
45
|
+
sources?: FlowMapNode[];
|
|
46
|
+
/** Accessible name of the map. */
|
|
47
|
+
label: string;
|
|
48
|
+
labels?: Partial<FlowMapLabels>;
|
|
49
|
+
className?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Where each of `count` nodes sits around the hub at 0, 0, in px. One node sits straight above it; more go round an
|
|
53
|
+
* ellipse from the top, clockwise, sized so no two boxes (and no box and the hub) come closer than 16 px.
|
|
54
|
+
*/
|
|
55
|
+
export declare function flowMapLayout(count: number): Array<{
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Where `left` sources and `right` nodes sit in the left-to-right map, hub at 0, 0: one column each side, every
|
|
61
|
+
* column centred on the hub, rows 20 px apart.
|
|
62
|
+
*/
|
|
63
|
+
export declare function flowMapSides(left: number, right: number): {
|
|
64
|
+
left: Array<{
|
|
65
|
+
x: number;
|
|
66
|
+
y: number;
|
|
67
|
+
}>;
|
|
68
|
+
right: Array<{
|
|
69
|
+
x: number;
|
|
70
|
+
y: number;
|
|
71
|
+
}>;
|
|
72
|
+
};
|
|
73
|
+
/** A hub and the things connected to it, on a grid you can pan and zoom (9router's usage topology). */
|
|
74
|
+
export declare function FlowMap({ hub, nodes, sources, label, labels, className }: FlowMapProps): JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { FlowMap } from "./FlowMap";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof FlowMap;
|
|
6
|
+
args: {
|
|
7
|
+
label: string;
|
|
8
|
+
hub: {
|
|
9
|
+
name: string;
|
|
10
|
+
};
|
|
11
|
+
nodes: {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
text: string;
|
|
15
|
+
color: string;
|
|
16
|
+
}[];
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
export declare const One: Story;
|
|
22
|
+
export declare const Several: Story;
|
|
23
|
+
export declare const Routed: Story;
|
|
24
|
+
export declare const Empty: Story;
|