@xdev-asia/ui 0.0.0-stage → 4.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +308 -0
- package/dist/tokens.json +269 -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,97 @@
|
|
|
1
|
+
# Tokens by role
|
|
2
|
+
|
|
3
|
+
Pick a token by what the thing *is*, not by the colour you want. The values below are from `src/styles/tokens.css` (generated from `tokens/tokens.json`); the role stays when a value changes. Search them with `xdevui_search_tokens`.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
- Two layers
|
|
7
|
+
- Surfaces and lines
|
|
8
|
+
- Text
|
|
9
|
+
- Accent, signal and state
|
|
10
|
+
- Type
|
|
11
|
+
- Space, radius and size
|
|
12
|
+
- Elevation and layers
|
|
13
|
+
- Breakpoints and containers
|
|
14
|
+
- Icons
|
|
15
|
+
|
|
16
|
+
## Two layers
|
|
17
|
+
- **Graphite (workspace) layer** (`--bg-0`, `--text-1`, `--accent`, `--ok` and the rest): the desktop shell, panes, tabs, terminals, menus.
|
|
18
|
+
- **Semantic layer** (`--x-color-*`): the docs app, the site, dialogs and shared components. `--x-color-focus` is the focus ring everywhere.
|
|
19
|
+
- Inside a workspace surface the library remaps the semantic layer onto graphite, so one component works in both. In app CSS, use the layer the surrounding library parts use; do not mix both on one surface.
|
|
20
|
+
|
|
21
|
+
## Surfaces and lines
|
|
22
|
+
|
|
23
|
+
| token | role | dark | light |
|
|
24
|
+
|---|---|---|---|
|
|
25
|
+
| `--bg-0` | page behind everything | #0d0e11 | #eceef2 |
|
|
26
|
+
| `--bg-1` | shell, sidebar, panels | #15161a | #f6f7f9 |
|
|
27
|
+
| `--bg-2` | cards, inputs, raised content | #1c1d22 | #ffffff |
|
|
28
|
+
| `--bg-3` | hover, selected row, pressed | #25262c | #e8eaee |
|
|
29
|
+
| `--term` | terminal and code ground | #111215 | #ffffff |
|
|
30
|
+
| `--line` | 1px hairline between regions | #2a2b31 | #dcdfe5 |
|
|
31
|
+
| `--line-strong` | control borders that must meet 3:1 | per theme | per theme |
|
|
32
|
+
|
|
33
|
+
## Text
|
|
34
|
+
|
|
35
|
+
| token | role | dark | light |
|
|
36
|
+
|---|---|---|---|
|
|
37
|
+
| `--text-1` | body and titles | #e6e7eb | #16171c |
|
|
38
|
+
| `--text-2` | secondary text, metadata | #a3a4ae | #555864 |
|
|
39
|
+
| `--text-3` | hints, placeholders | #8f909b | #666974 |
|
|
40
|
+
|
|
41
|
+
## Accent, signal and state
|
|
42
|
+
|
|
43
|
+
| token | role | dark | light |
|
|
44
|
+
|---|---|---|---|
|
|
45
|
+
| `--accent` | the next action, the current place | #2f62e6 | #2453d6 |
|
|
46
|
+
| `--signal` | focus ring only | #5bd8ff | #06699a |
|
|
47
|
+
| `--ok` / `--ok-bg` | healthy, connected, saved | #4ade9b | #0e7446 |
|
|
48
|
+
| `--warn` / `--warn-bg` | needs attention, degraded | #f2b544 | #8a5200 |
|
|
49
|
+
| `--danger` / `--danger-bg` | failed, destructive | #ff7a7a | #b42318 |
|
|
50
|
+
| `--violet` / `--violet-bg` | category colour (tabs, graph lanes, renamed files) | #b69cff | #5b3cc4 |
|
|
51
|
+
| `--orange` / `--orange-bg` | category colour | #f0a070 | #a04a14 |
|
|
52
|
+
| `--brand-agent` | the logo's agent blade, nothing else | #ff7a3d | #ff7a3d |
|
|
53
|
+
|
|
54
|
+
The `-bg` tints are 10 to 12% of the state colour: use them as the ground behind state text, never as a full fill. Category colours for tabs and charts come from `--x-tab-color-1` to `--x-tab-color-10` and `--x-graph-lane-1` to `--x-graph-lane-5`.
|
|
55
|
+
|
|
56
|
+
## Type
|
|
57
|
+
|
|
58
|
+
| token | use |
|
|
59
|
+
|---|---|
|
|
60
|
+
| `--type-page-title` | 700 20px, one per page |
|
|
61
|
+
| `--type-dialog-title` | 700 18px |
|
|
62
|
+
| `--type-heading` | 600 16px, section and card headings |
|
|
63
|
+
| `--type-body` | 400 14px/1.6, prose |
|
|
64
|
+
| `--type-control` | 600 13px, buttons and inputs |
|
|
65
|
+
| `--type-menu`, `--type-tab` | 400 13px |
|
|
66
|
+
| `--type-label` | 600 12px, field labels |
|
|
67
|
+
| `--type-status` | 400 12px, status bar and meta |
|
|
68
|
+
| `--type-section` | 600 11px, uppercase section labels |
|
|
69
|
+
| `--type-badge`, `--type-tag` | 11px and 10px chips |
|
|
70
|
+
| `--type-mono`, `--type-kbd` | 12px and 11px JetBrains Mono |
|
|
71
|
+
| `--type-stat`, `--type-mono-stat` | 600 22px and 10px mono, numbers in tiles |
|
|
72
|
+
|
|
73
|
+
Faces: `--font-body` (Roboto) and `--font-mono` (JetBrains Mono). Always set the whole shorthand: `font: var(--type-body)`.
|
|
74
|
+
|
|
75
|
+
## Space, radius and size
|
|
76
|
+
|
|
77
|
+
| group | tokens |
|
|
78
|
+
|---|---|
|
|
79
|
+
| space | `--x-space-1` 4, `--x-space-2` 8, `--x-space-3` 12, `--x-space-4` 16, `--x-space-6` 24, `--x-space-8` 32 |
|
|
80
|
+
| radius, workspace | `--radius-s` 4 (tags, chips, menu items), `--radius-m` 6 (icon buttons, fields, palette), `--radius-l` 8 (menus, toasts) |
|
|
81
|
+
| radius, semantic | `--x-radius-sm` 4 (keys, dialog inputs), `--x-radius-md` 8 (buttons), `--x-radius-lg` 12 (banners, activity items) |
|
|
82
|
+
| heights | `--h-header` 38, `--h-tab` 32, `--h-row` 28, `--h-toolbar` 28, `--h-footer` 26 |
|
|
83
|
+
| widths | `--w-side` 296 (sidebar), `--w-panel` 300 (side panel) |
|
|
84
|
+
| avatars | `--avatar-sm` 20, `--avatar-md` 32, `--avatar-lg` 48 |
|
|
85
|
+
|
|
86
|
+
## Elevation and layers
|
|
87
|
+
- Shadows exist only for floating layers: `--shadow-menu` (menus, popovers, combobox lists), `--shadow-dialog` (dialogs, drawers, command palette).
|
|
88
|
+
- Stacking: `--x-z-raised`, `--x-z-sticky`, `--x-z-dropdown`, `--x-z-nav`, `--x-z-modal`, `--x-z-toast`, `--x-z-skip`. Never a raw `z-index` number.
|
|
89
|
+
|
|
90
|
+
## Breakpoints and containers
|
|
91
|
+
- Breakpoints `--x-bp-sm` 640, `--x-bp-md` 768, `--x-bp-lg` 1024, `--x-bp-xl` 1280, `--x-bp-2xl` 1536 (CSS cannot read them in media queries; write the same numbers there or use `Grid responsive="container"`).
|
|
92
|
+
- `Container` sizes map to `--x-container-sm` to `--x-container-2xl`.
|
|
93
|
+
|
|
94
|
+
## Icons
|
|
95
|
+
- Library icons only (`Icon`, or `icon` props), listed by `xdevui_list_icons`: line icons on a 24 grid, stroke `currentColor` 1.75, round caps and joins, no fills.
|
|
96
|
+
- 16px in controls, 20px in banners, 22px in the activity bar.
|
|
97
|
+
- No emoji as icons, no second icon set. A missing icon is added to xdev-ui.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: xdev-ui-improve
|
|
3
|
+
description: "Audits one existing screen of an app built with @xdev-asia/ui against the design rules that actually govern it (the app's own guidance, the xdev-ui-design rule IDs, component Rules, tokens), keeps only findings with a cited contract, a proven runtime path and one correction, reports at most three, and writes self-contained plans under design-plans/ for another agent to carry out. Read-only on product source. Use when asked to improve, refine, polish or clean up an xDev screen without redesigning it, to investigate design drift from @xdev-asia/ui, or to prepare a design handoff."
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Improve an xDev screen with evidence
|
|
8
|
+
|
|
9
|
+
Find the few changes that a screen's own design system proves are wrong, and hand each one off as a plan. Keep the product's identity; prefer no finding to an unsupported one. This skill writes plans, never product code: `xdev-ui-review` runs the audit and fixes, `xdev-ui-design` decides a new look.
|
|
10
|
+
|
|
11
|
+
## When to use
|
|
12
|
+
|
|
13
|
+
- "Improve", "polish", "tidy" or "make this screen better" on an existing `@xdev-asia/ui` screen.
|
|
14
|
+
- Design drift: a screen that no longer matches the library or its siblings.
|
|
15
|
+
- A handoff: another agent or person will make the change.
|
|
16
|
+
|
|
17
|
+
Skip it for a new screen (use `xdev-ui-admin` or `xdev-ui-design`), for the pre-delivery pass (use `xdev-ui-review`) and for behaviour bugs.
|
|
18
|
+
|
|
19
|
+
## Boundaries
|
|
20
|
+
|
|
21
|
+
- Never modify product source. Create or edit files only under `design-plans/`.
|
|
22
|
+
- Do not install, format, commit or push. Do not edit design documentation; record an accepted documentation change in the plan.
|
|
23
|
+
- Use screenshots or a running app only when the person gives them or asks for visual inspection.
|
|
24
|
+
- Every plan stands alone: its executor has not seen this audit or the conversation.
|
|
25
|
+
|
|
26
|
+
## 1. Select the surface
|
|
27
|
+
|
|
28
|
+
Honour the scope the person gives. If it is broad, pick one route and the parts it renders for one main task, and say which. Start from the route and its layout, then follow what it renders: page, compositions, library parts and their props, app CSS, tokens. Do not start with a repository-wide search for inconsistencies.
|
|
29
|
+
|
|
30
|
+
A connection exists only when it is proven by a render, an import, a prop, CSS that applies, or a loaded file. Similar names, nearby files and "it is the same idea" are not connections.
|
|
31
|
+
|
|
32
|
+
## 2. Reconstruct the governing system
|
|
33
|
+
|
|
34
|
+
Read, in this order, and keep only what governs the selected surface:
|
|
35
|
+
|
|
36
|
+
1. The app's own `DESIGN.md`, `AGENTS.md` or design notes, when current.
|
|
37
|
+
2. The owner's notes and rule catalogue of `xdev-ui-design`: `xdevui_get_skill name="xdev-ui-design" file="references/owner-notes.md"`, then `file="references/rules.md"`. Owner's notes win over the rules.
|
|
38
|
+
3. The `## Rules` of each library part the surface mounts (`xdevui_get_component`) and the guidelines (`xdevui_get_guidelines`).
|
|
39
|
+
4. Tokens by role (`xdevui_search_tokens`).
|
|
40
|
+
|
|
41
|
+
Drafts, proposals and task lists are intent, not rules. Missing documentation is not a finding.
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
## Design language
|
|
45
|
+
- Audited surface:
|
|
46
|
+
- Design sources:
|
|
47
|
+
- Documented decisions:
|
|
48
|
+
- Governing owners and consumers:
|
|
49
|
+
- Explicit exceptions:
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Write `None documented` under exceptions unless a cited source names one.
|
|
53
|
+
|
|
54
|
+
## 3. Prove each finding
|
|
55
|
+
|
|
56
|
+
First collect candidates: labels and copy, the current place and selected states, the four states of each region, sibling variants, the 375px branch. Then keep a candidate only with all three proofs:
|
|
57
|
+
|
|
58
|
+
1. **Contract**: a binding rule for this property and scope (a rule ID such as `tok-one-accent`, a component `## Rules` line, an owner's note), or a direct contradiction inside the same task's presentation. "Prefer", "generally", repetition and silence are not contracts.
|
|
59
|
+
2. **Runtime**: the cited rule or value reaches this surface through the traced path.
|
|
60
|
+
3. **Correction**: one change the evidence requires, naming the exact token, prop, variant or part (`StatusDot`, `variant="secondary"`, `var(--text-2)`). If the evidence allows two answers or needs invented intent, drop it.
|
|
61
|
+
|
|
62
|
+
In scope: tokens, colour, type, spacing, layout, copy, part choice and variant, responsive presentation, and explicit rule violations. Hierarchy, density and discoverability need screenshots or user evidence. Behaviour, data, routing, performance and code quality are out of scope unless the person asks; accessibility only when asked (then cite `xdev-ui-ux-standards`).
|
|
63
|
+
|
|
64
|
+
A finding the audit already reports (`node <review-skill-dir>/scripts/audit.mjs src`) can be cited as runtime evidence, but the fix belongs to `xdev-ui-review`; list it once under "Improve first" only if nothing else survives.
|
|
65
|
+
|
|
66
|
+
## 4. Try to falsify each finding
|
|
67
|
+
|
|
68
|
+
Re-open every cited source. Delete the finding when the cited code does not match, the rule does not govern that property and surface, an owner's note or exception allows it, the correction is not unique, it invents intent, or another finding has the same root.
|
|
69
|
+
|
|
70
|
+
## 5. Report
|
|
71
|
+
|
|
72
|
+
Order by confidence, then user impact, reach and cost. Stop at three.
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
## Design language
|
|
76
|
+
(the block from step 2)
|
|
77
|
+
|
|
78
|
+
## Findings
|
|
79
|
+
| # | Problem | Evidence | Proposed change | Scope | Confidence |
|
|
80
|
+
| --- | --- | --- | --- | --- | --- |
|
|
81
|
+
|
|
82
|
+
## Improve first
|
|
83
|
+
<The one finding with the strongest evidence and highest leverage, and why.>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Evidence cites contract, runtime path and consequence as `file:line` or rule ID. One correction per row; a row missing any column is deleted. With nothing left, write `No supported findings were found.` and `No supported recommendation.`
|
|
87
|
+
|
|
88
|
+
Then stop and ask which findings to turn into plans, unless the person already chose one. Asked to fix directly: offer a plan; do not edit product code.
|
|
89
|
+
|
|
90
|
+
## 6. Write the plans
|
|
91
|
+
|
|
92
|
+
One plan per selected change, not one per symptom, in `design-plans/<short-outcome>.md`, from [the plan template](references/plan-template.md). Before writing, re-open every cited source, record the commit (`git rev-parse --short HEAD`), name the exact library parts, tokens and an exemplar file, and list every affected surface. Update an existing plan instead of writing a second one.
|
|
93
|
+
|
|
94
|
+
A part the library lacks goes into `@xdev-asia/ui`, not into the app: the plan says so and names the consumers that would share it. Never plan a lookalike component, an invented prop or a new token in app CSS.
|
|
95
|
+
|
|
96
|
+
When asked to reconcile, re-check existing plans against current source and update evidence, affected surfaces and status.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Design plan template
|
|
2
|
+
|
|
3
|
+
Copy this into `design-plans/<short-outcome>.md` and fill every section. The executor has no other context.
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
# <Outcome in one line>
|
|
7
|
+
|
|
8
|
+
Written against: <short commit hash, or unavailable>
|
|
9
|
+
|
|
10
|
+
## Evidence chain
|
|
11
|
+
|
|
12
|
+
- Surface: `<route, page file, or rendered state>`
|
|
13
|
+
- Problem: <what is on screen or in the code, observed directly>
|
|
14
|
+
- Contract: `<rule ID, component ## Rules line, owner's note, or app DESIGN.md section>`
|
|
15
|
+
- Runtime path: `<route> -> <page> -> <part or class> -> <token or prop>`
|
|
16
|
+
- Owner: `<file that should change>`
|
|
17
|
+
- Affected surfaces: `<every route or file that renders the owner>`
|
|
18
|
+
- Uncertainty: <none, or what must be checked first>
|
|
19
|
+
|
|
20
|
+
## Design decision
|
|
21
|
+
|
|
22
|
+
<The change, at the right scope, and why it removes the root problem.>
|
|
23
|
+
|
|
24
|
+
## Reuse
|
|
25
|
+
|
|
26
|
+
- Library part, prop or variant: `<e.g. StatusDot tone="warn" label=...>`
|
|
27
|
+
- Token: `<e.g. var(--text-2)>`
|
|
28
|
+
- Exemplar: `<a file in this app or in @xdev-asia/ui examples that already does it right>`
|
|
29
|
+
|
|
30
|
+
If the library lacks the part, say why no existing part, prop or token expresses the decision, which consumers would share it, and that the change goes into `@xdev-asia/ui`, not the app.
|
|
31
|
+
|
|
32
|
+
## Changes
|
|
33
|
+
|
|
34
|
+
1. `<exact path>`
|
|
35
|
+
- Change: <implementation-ready description>
|
|
36
|
+
- Keep: <what must not change: identity, behaviour, strings>
|
|
37
|
+
- Verify: <observable result>
|
|
38
|
+
|
|
39
|
+
## Scope
|
|
40
|
+
|
|
41
|
+
- Inherits the change: <consumers>
|
|
42
|
+
- Check, may be affected: <consumers>
|
|
43
|
+
- Out of scope: <valid exceptions and unrelated work>
|
|
44
|
+
|
|
45
|
+
## Validation
|
|
46
|
+
|
|
47
|
+
- Task: <the user task and the expected outcome>
|
|
48
|
+
- Screen: dark and light, 375, 768 and 1440px, `en` and `vi`, empty, loading, error and full states
|
|
49
|
+
- System: no new token, class or lookalike part in the app; the library part is used as its README says
|
|
50
|
+
- Repository: `node <review-skill-dir>/scripts/audit.mjs src --i18n <strings-dir>` -> no new findings; the project's tests pass
|
|
51
|
+
|
|
52
|
+
## Stop conditions
|
|
53
|
+
|
|
54
|
+
- Stop if <an assumption fails, the owner differs, or the scope has to grow>.
|
|
55
|
+
|
|
56
|
+
## Design documentation
|
|
57
|
+
|
|
58
|
+
- After acceptance: <the decision to record and where (the app's DESIGN.md or the owner's notes), or none>
|
|
59
|
+
```
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: xdev-ui-motion
|
|
3
|
+
description: "Adds, reviews and fixes motion on screens and components built with @xdev-asia/ui: which library parts already animate, the xDev motion budget (transform and opacity, 120 to 200ms, ease-out entrances, reduced motion), and rendering performance rules for layout thrashing, will-change, scroll-linked motion, paint, blur and view transitions, with the audit rules layout-motion, will-change and reduced-motion. Use when adding or changing a transition or animation, when a drawer, popover, pan or zoom view stutters or blurs, or when reviewing CSS or JS animation in an @xdev-asia/ui app or in the library."
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Motion and rendering performance with @xdev-asia/ui
|
|
8
|
+
|
|
9
|
+
xDev is a quiet tool: motion confirms where a thing came from and nothing else. Most screens need no new motion at all, because the parts already animate. This skill decides when motion is allowed and how to make it cheap. The look is in `xdev-ui-design` (rules `mot-*`), the audit in `xdev-ui-review`.
|
|
10
|
+
|
|
11
|
+
## When to use
|
|
12
|
+
|
|
13
|
+
- Adding or changing a `transition`, `@keyframes`, Web Animations or `requestAnimationFrame` code.
|
|
14
|
+
- An interaction stutters, a panel jumps, a zoomed view blurs, scrolling janks.
|
|
15
|
+
- Reviewing motion in an app on `@xdev-asia/ui`, or in a library part.
|
|
16
|
+
|
|
17
|
+
Skip it for colour, layout or copy changes with no motion, and for charts that do not animate.
|
|
18
|
+
|
|
19
|
+
## How to use
|
|
20
|
+
|
|
21
|
+
- **Apply**: follow the rules below for every motion you add in this task.
|
|
22
|
+
- **Review a file**: for each violation report the exact line, why it matters (one sentence) and a code-level fix. Keep fixes small; do not migrate or mix animation libraries.
|
|
23
|
+
|
|
24
|
+
## 1. Use what the library already moves
|
|
25
|
+
|
|
26
|
+
| part | motion | length |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| `Popover`, `MenuButton`, `Coachmark` | fade and 4px rise on open | 120ms ease-out |
|
|
29
|
+
| `Tooltip` | fade; hidden after the fade | 150ms |
|
|
30
|
+
| `Toast` | fade and 6px rise | 160ms ease-out |
|
|
31
|
+
| `Drawer` | slide 24px from its side, fade | 180ms ease-out |
|
|
32
|
+
| `AppShell` off-canvas nav | slide | 180ms ease |
|
|
33
|
+
| `Switch` thumb | `transform` | 120ms ease-out |
|
|
34
|
+
| `StatusDot` `pulse`, `Spinner`, `Skeleton` | loops for "working" only | 0.8 to 1.4s |
|
|
35
|
+
|
|
36
|
+
Under `prefers-reduced-motion: reduce` every one of them stops, except `Spinner`, which pulses instead of turning. Do not add a second entrance on top of a part that already has one, and do not animate a library part from the app.
|
|
37
|
+
|
|
38
|
+
## 2. The budget
|
|
39
|
+
|
|
40
|
+
- Animate only `transform` and `opacity`. Colour or border transitions are allowed on small parts (a row, a chip), never on a page or panel.
|
|
41
|
+
- Interaction feedback finishes within 200ms; entrances 120 to 200ms with `ease-out`; exits can be instant. Do not invent easing curves; the library uses `ease` and `ease-out`.
|
|
42
|
+
- No motion that carries meaning on its own, no bounce, no parallax, no decoration that loops. A loop means "working" and stops when the work stops (`mot-pulse-working-only`).
|
|
43
|
+
- Guard every move, scale or spin:
|
|
44
|
+
|
|
45
|
+
```css
|
|
46
|
+
.app-panel { transition: transform 0.18s ease-out; }
|
|
47
|
+
@media (prefers-reduced-motion: reduce) {
|
|
48
|
+
.app-panel { transition: none; }
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## 3. Performance rules by priority
|
|
53
|
+
|
|
54
|
+
| # | category | must | never |
|
|
55
|
+
|---|---|---|---|
|
|
56
|
+
| 1 | never patterns | read layout once, then write | interleave reads and writes in a frame; animate from `scroll` events; a `requestAnimationFrame` loop with no stop |
|
|
57
|
+
| 2 | mechanism | `transform` / `opacity`; CSS for state changes, JS only when a gesture drives it | `transition: all`; a `width`, `height`, `top`, `left`, `margin` or `padding` transition (audit `layout-motion`) |
|
|
58
|
+
| 3 | measurement | measure once, animate the difference with `transform` (FLIP) | `getBoundingClientRect` inside the frame loop |
|
|
59
|
+
| 4 | scroll | scroll-driven animation (`animation-timeline`) or `IntersectionObserver` | polling `scrollY` to set styles |
|
|
60
|
+
| 5 | paint | paint animation only on small, isolated elements | animating a background, gradient or shadow on a large surface; animating an inherited CSS variable |
|
|
61
|
+
| 6 | layers | `will-change` only while the motion runs (audit `will-change`) | a resting `will-change`, many large promoted layers |
|
|
62
|
+
| 7 | blur | static blur at most 2px (the `Dialog` backdrop) | animating `filter: blur()` or `backdrop-filter` |
|
|
63
|
+
| 8 | view transitions | page-level navigation only | view transitions on interaction-heavy UI or anything that can be interrupted |
|
|
64
|
+
|
|
65
|
+
Worked fixes for each row, taken from the library itself: [recipes](references/recipes.md).
|
|
66
|
+
|
|
67
|
+
## 4. Pan, zoom and drag
|
|
68
|
+
|
|
69
|
+
Use `PanZoom` (and `ZoomBar`) instead of a custom viewport. It moves its content with one `transform`, promotes the layer only while a drag runs (`data-panning`), and re-rasterises after a zoom, so text stays sharp. For drag to reorder use `SortableList` or `DataTable` reorder; both keep a keyboard path.
|
|
70
|
+
|
|
71
|
+
## 5. Check
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
node <review-skill-dir>/scripts/audit.mjs src
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
| rule | finds |
|
|
78
|
+
|---|---|
|
|
79
|
+
| `layout-motion` | a transition of `all` or of a size, position or spacing property; keyframes that change one |
|
|
80
|
+
| `will-change` | `will-change` on a selector with no state |
|
|
81
|
+
| `reduced-motion` | moving keyframes in a file with no `prefers-reduced-motion` guard |
|
|
82
|
+
|
|
83
|
+
Then by hand: turn on reduced motion in the OS and repeat the interaction; record a performance trace of the slow interaction and look for layout or paint in every frame; zoom `PanZoom` to 200% and check that text is sharp.
|
|
84
|
+
|
|
85
|
+
## Report
|
|
86
|
+
|
|
87
|
+
List each finding with file and line, the rule, and the fix you made. Say which manual checks you did not run.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Motion recipes
|
|
2
|
+
|
|
3
|
+
Each recipe is a before and after. Most come from fixes made in `@xdev-asia/ui` itself.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
- Move with transform, not position
|
|
7
|
+
- Promote a layer only during a gesture
|
|
8
|
+
- Full-height surfaces on phones
|
|
9
|
+
- FLIP for a layout change
|
|
10
|
+
- Scroll-linked without scroll events
|
|
11
|
+
- Pause a loop off screen
|
|
12
|
+
- Entrance and exit
|
|
13
|
+
- Paint and blur
|
|
14
|
+
|
|
15
|
+
## Move with transform, not position
|
|
16
|
+
|
|
17
|
+
The `Switch` thumb used to transition `left`, which runs layout every frame. It now moves with `transform`:
|
|
18
|
+
|
|
19
|
+
```css
|
|
20
|
+
/* before */
|
|
21
|
+
.app-thumb { left: 0.125rem; transition: left 0.12s; }
|
|
22
|
+
.app-toggle:checked .app-thumb { left: 1rem; }
|
|
23
|
+
|
|
24
|
+
/* after */
|
|
25
|
+
.app-thumb { left: 0.125rem; transition: transform 0.12s ease-out; }
|
|
26
|
+
.app-toggle:checked .app-thumb { transform: translateX(0.875rem); }
|
|
27
|
+
@media (prefers-reduced-motion: reduce) { .app-thumb { transition: none; } }
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The same goes for a panel that opens by `width` or `height`: keep its size and slide it with `translate`, or fade it with `opacity`. A disclosure that must change height is not animated in xDev; it opens at once.
|
|
31
|
+
|
|
32
|
+
## Promote a layer only during a gesture
|
|
33
|
+
|
|
34
|
+
`will-change: transform` on a resting element keeps a layer for good. The browser rasterises it at one scale, so after a zoom the text blurs, and many such layers cost memory. `PanZoom` sets `data-panning` on pointer down and removes it on pointer up:
|
|
35
|
+
|
|
36
|
+
```css
|
|
37
|
+
/* before */
|
|
38
|
+
.app-canvas-content { will-change: transform; }
|
|
39
|
+
|
|
40
|
+
/* after */
|
|
41
|
+
.app-canvas[data-panning] .app-canvas-content { will-change: transform; }
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
const onPointerDown = (e: PointerEvent<HTMLDivElement>) => e.currentTarget.setAttribute("data-panning", "");
|
|
46
|
+
const onPointerUp = (e: PointerEvent<HTMLDivElement>) => e.currentTarget.removeAttribute("data-panning");
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Full-height surfaces on phones
|
|
50
|
+
|
|
51
|
+
`100vh` is the height with the address bar hidden, so the bottom of a `100vh` page sits under the bar while it shows. Keep `vh` as the fallback and put `dvh` after it (audit `viewport-height`). With Tailwind v4 use `h-dvh` or `min-h-dvh`, never `h-screen`.
|
|
52
|
+
|
|
53
|
+
```css
|
|
54
|
+
.app-signin { min-height: 100vh; min-height: 100dvh; }
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`AppShell`, `SiteShell` and `AuthShell` already do this.
|
|
58
|
+
|
|
59
|
+
## FLIP for a layout change
|
|
60
|
+
|
|
61
|
+
When an item must change place (a reordered card, a row that moves to another group), measure once, change the layout, then animate the difference with `transform`:
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
function flip(el: HTMLElement, change: () => void): void {
|
|
65
|
+
const first = el.getBoundingClientRect();
|
|
66
|
+
change();
|
|
67
|
+
const last = el.getBoundingClientRect();
|
|
68
|
+
if (matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
69
|
+
el.animate(
|
|
70
|
+
[{ transform: `translate(${first.left - last.left}px, ${first.top - last.top}px)` }, { transform: "none" }],
|
|
71
|
+
{ duration: 160, easing: "ease-out" },
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Batch every read before every write when several items move.
|
|
77
|
+
|
|
78
|
+
## Scroll-linked without scroll events
|
|
79
|
+
|
|
80
|
+
`AppShell` draws the rule under its top bar only once the page scrolls, with a scroll timeline and no JavaScript:
|
|
81
|
+
|
|
82
|
+
```css
|
|
83
|
+
.app-main { scroll-timeline: --app-scroll block; }
|
|
84
|
+
.app-top { animation: app-top-rule linear both; animation-timeline: --app-scroll; animation-range: 0 var(--x-space-6); }
|
|
85
|
+
@keyframes app-top-rule { to { border-bottom-color: var(--line); } }
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
For "has this entered the screen", use `IntersectionObserver`, never a `scroll` listener that reads `scrollY`.
|
|
89
|
+
|
|
90
|
+
## Pause a loop off screen
|
|
91
|
+
|
|
92
|
+
A loop means "working". Stop it when the work ends, and pause it when it is not visible:
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
const io = new IntersectionObserver(([e]) => el.toggleAttribute("data-paused", !e.isIntersecting));
|
|
96
|
+
io.observe(el);
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
```css
|
|
100
|
+
.app-loop[data-paused] { animation-play-state: paused; }
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Entrance and exit
|
|
104
|
+
|
|
105
|
+
Enter with `opacity` and a short `translate` (4 to 24px) and `ease-out`; leave at once, or with a shorter fade. Never animate an element out while focus or a screen reader is still on it.
|
|
106
|
+
|
|
107
|
+
```css
|
|
108
|
+
.app-sheet { animation: app-sheet-in 180ms ease-out; }
|
|
109
|
+
@keyframes app-sheet-in { from { opacity: 0; transform: translateY(1.5rem); } }
|
|
110
|
+
@media (prefers-reduced-motion: reduce) { .app-sheet { animation: none; } }
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Paint and blur
|
|
114
|
+
|
|
115
|
+
- A hover tint on a row is fine; a transition of `background` on a whole page or a large card grid is not.
|
|
116
|
+
- The `Dialog` backdrop has a static 2px blur. Do not animate it, and do not add blur to a sticky header that sits over scrolling content.
|
|
117
|
+
- `box-shadow` is not animated; elevation in xDev is fixed per layer (`--shadow-menu`, `--shadow-dialog`).
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: xdev-ui-review
|
|
3
|
+
description: "Audits a React app that uses @xdev-asia/ui, page by page. Use when committing UI work or asked to review UI there: a page, a whole app, a list or table, a dashboard, a settings page, a dialog or form, a sign-in page or a provider grid. Covers tokens instead of raw colours, px and font sizes, coloured left stripes, one primary button, sentence-case labels in en and vi, focus, accessible names, target size, reduced motion, forced colours, contrast, 360px layout, empty, loading and error states, destructive confirms, autofill and translated library labels."
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Review a UI built with @xdev-asia/ui
|
|
8
|
+
|
|
9
|
+
Run the script, fix every error in priority order, then walk the pre-delivery checklist and the check for each page type.
|
|
10
|
+
|
|
11
|
+
## When to use
|
|
12
|
+
|
|
13
|
+
- Before committing UI work, before calling a page done, or when asked to review a page or a whole app on `@xdev-asia/ui`.
|
|
14
|
+
- After the `xdev-ui-admin` or `xdev-ui-build-app` workflow: both end here.
|
|
15
|
+
|
|
16
|
+
Skip it for worker or API code, tests, build config and docs that render no UI. For a standards question (which ARIA pattern, which WCAG criterion), use `xdev-ui-ux-standards`.
|
|
17
|
+
|
|
18
|
+
## Fix order
|
|
19
|
+
|
|
20
|
+
Fix the highest priority first. A higher row can force changes that make a lower finding moot.
|
|
21
|
+
|
|
22
|
+
| priority | category | must have | avoid | audit rules |
|
|
23
|
+
|---|---|---|---|---|
|
|
24
|
+
| 1 critical | Access | visible focus, a name on every control, 4.5:1 text and 3:1 UI contrast, keyboard for every action | `outline: none` with no replacement, a clickable `div`, an unnamed icon button, a viewport that blocks zoom | `focus-outline`, `positive-tabindex`, `icon-button-name`, `img-alt`, `click-div`, `zoom-block`, `contrast` |
|
|
25
|
+
| 2 critical | Tokens and identity | tokens for colour, space, type, z-index; one accent; cyan only as focus | hex, Tailwind palette colours, px font sizes, a coloured left stripe | `raw-colour`, `raw-px`, `raw-font`, `unknown-token`, `left-stripe`, `raw-z-index` |
|
|
26
|
+
| 3 high | States and data safety | loading, error, empty and success for every region; input kept on error; destructive confirms | a blank page on error, a lost form, a double submit | `list-empty`, `confirm-dialog`, `form-busy`, `nav-onclick` |
|
|
27
|
+
| 4 high | Layout | no page scroll sideways at 320 to 1440px; tables scroll in their wrapper; space reserved for late content | fixed widths over 320px, clipped text, content that jumps, `100vh` under a phone's address bar | `fixed-width`, `nowrap`, `viewport-height` |
|
|
28
|
+
| 5 high | Actions | one primary per surface, last in its row; hide what the role can never do, disable with a reason | two primaries, a reason only in a tooltip | `primary-count` |
|
|
29
|
+
| 6 medium | Language | sentence case, verbs on buttons, `en` and `vi` for every string and every `labels` | emoji, `!`, Title Case, three dots, English left in a library part | `label-voice`, `ellipsis`, `i18n-parity`, `i18n-labels` |
|
|
30
|
+
| 7 medium | Forms | a visible label, errors on the field, autofill and paste allowed | placeholder as label, errors only in a toast, blocked paste | `autocomplete`, `paste-block` |
|
|
31
|
+
| 8 medium | Motion and platform | reduced motion, forced colours, 24px targets (44px on touch) | slides and spins with no `prefers-reduced-motion` guard, layout animation, a resting `will-change` | `reduced-motion`, `layout-motion`, `will-change`, `forced-colors`, `target-size` |
|
|
32
|
+
| 9 medium | Page patterns | the shape each pattern expects | a bare `AuthShell`, a delta with no baseline, a card with no face | `sign-in-shell`, `stat-delta`, `resource-face` |
|
|
33
|
+
| 10 low | Visual finish | a screenshot in dark and light at 375 and 1440px with real data | calling it done from the source alone | none: look at it |
|
|
34
|
+
|
|
35
|
+
## 1. Run the audit
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
node <skill-dir>/scripts/audit.mjs src --i18n src/i18n
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- `<skill-dir>` is where this skill is installed, e.g. `.claude/skills/xdev-ui-review`.
|
|
42
|
+
- `--i18n <dir>` compares `en.ts` and `vi.ts` in that folder.
|
|
43
|
+
- `--contrast` adds a WCAG contrast report for the theme token pairs (needs the manifest).
|
|
44
|
+
- `--manifest <path>` points at `ai-manifest.json` when `node_modules/@xdev-asia/ui/dist/ai-manifest.json` does not exist; without a manifest the `unknown-token` and `i18n-labels` rules are skipped with a note.
|
|
45
|
+
- Output is `file:line rule message`. Exit code 1 means at least one error; warnings never fail.
|
|
46
|
+
|
|
47
|
+
| rule | level | what it flags |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| `raw-colour` | error | `#hex`, `rgb(`, `hsl(`, `oklch(` in `.css`, `.ts`, `.tsx` |
|
|
50
|
+
| `raw-px` | error | a size in `px` other than `1px` in CSS or a `style` prop |
|
|
51
|
+
| `raw-font` | error | `font-size`, `fontSize`, or `font:` without `var(--type-*)` |
|
|
52
|
+
| `left-stripe` | error | `border-left`, `border-inline-start` with a width, or an inset left shadow |
|
|
53
|
+
| `unknown-token` | error | `var(--<name>)` that is not a design token or defined in the app |
|
|
54
|
+
| `focus-outline` | error | `outline: none`/`0` with no `:focus-visible` replacement for the same selector |
|
|
55
|
+
| `positive-tabindex` | error | `tabIndex` or `tabindex` above 0 |
|
|
56
|
+
| `icon-button-name` | error | a `button` whose only content is an unnamed icon, or a self-closing `Button` with `icon` and no name |
|
|
57
|
+
| `i18n-parity` | error | `en` and `vi` differ in keys, or a value is empty |
|
|
58
|
+
| `primary-count` | warn | more than one `Button variant="primary"` in one file |
|
|
59
|
+
| `label-voice` | warn | `!`, emoji, or Title Case Of Three Words in UI text |
|
|
60
|
+
| `target-size` | warn | a width or height under 24px on a control selector, with no 24px minimum |
|
|
61
|
+
| `reduced-motion` | warn | an animation whose keyframes move content, in a file with no `prefers-reduced-motion` query and no app-wide `*` guard |
|
|
62
|
+
| `fixed-width` | warn | `width` or `min-width` over 320px in CSS, with no `max-width` in `%`/`vw`/`min()` and not inside a `min-width` query |
|
|
63
|
+
| `nowrap` | warn | `white-space: nowrap` on a non-control with no `overflow` or `text-overflow` in the same rule |
|
|
64
|
+
| `forced-colors` | warn | the outline replaced only by `box-shadow` or border colour, with no `forced-colors` rule in the file |
|
|
65
|
+
| `sign-in-shell` | warn | an `AuthShell` with no `headline`, `actions` or `footer`, inline `actions` with no `ThemeSwitch`, a heading as the headline, or more than one `h1` in its file |
|
|
66
|
+
| `list-empty` | warn | a `DataTable` with no `empty` |
|
|
67
|
+
| `confirm-dialog` | warn | a destructive `Dialog` (`alert` or `tone="danger"`) that is not `modal`, has no `alert`, or has no `busy` or `confirmDisabled` |
|
|
68
|
+
| `form-busy` | warn | a `FormDialog` with no `busy` |
|
|
69
|
+
| `autocomplete` | warn | a `password`, `email` or `tel` field or input with no `autoComplete` |
|
|
70
|
+
| `img-alt` | error | an `img` with no `alt` |
|
|
71
|
+
| `click-div` | error | a `div`, `span`, `li`, `p`, `td` or `img` with `onClick` and no `role` |
|
|
72
|
+
| `zoom-block` | error | `user-scalable=no` or `maximum-scale=1` in the `index.html` beside or above the scanned folder |
|
|
73
|
+
| `nav-onclick` | warn | an `onClick` that only calls `navigate(`, `router.push(` or sets `location` |
|
|
74
|
+
| `ellipsis` | warn | three dots in UI text, a placeholder or a strings file |
|
|
75
|
+
| `paste-block` | error | an `onPaste` handler that calls `preventDefault` |
|
|
76
|
+
| `raw-z-index` | warn | a numeric `z-index` or `zIndex` other than 0, 1 and -1; use `var(--x-z-*)` |
|
|
77
|
+
| `viewport-height` | warn | a `vh` height with no `dvh`/`svh` after it, a `vh` height in a `style` prop, or Tailwind `h-screen` |
|
|
78
|
+
| `layout-motion` | warn | a `transition` of `all` or of a size, position or spacing property, or an animation whose keyframes change one |
|
|
79
|
+
| `will-change` | warn | `will-change` on a selector with no state (`:hover`, `:active`, `[data-*]`, `[aria-*]`) |
|
|
80
|
+
| `stat-delta` | warn | a `StatTile` with a `delta` and no `hint` naming what it is compared with |
|
|
81
|
+
| `resource-face` | warn | a `ResourceCard` with no `leading`, or an `Avatar` or `img` as its face |
|
|
82
|
+
| `i18n-labels` | warn | a library part that takes `labels` used without them, so its built-in words stay English; only with `--i18n` and a manifest |
|
|
83
|
+
| `contrast` | error or warn | a token pair below 4.5:1 (text) or 3:1 (UI parts); only with `--contrast` |
|
|
84
|
+
|
|
85
|
+
## 2. Fix, do not silence
|
|
86
|
+
|
|
87
|
+
- Work down the fix order: all critical findings, then high, then the rest.
|
|
88
|
+
- Colour, size, type: replace the literal with a token. Find it with `xdevui_search_tokens` (see `references/grep-recipes.md`).
|
|
89
|
+
- Stripe: use a tint, a 1px border or a `StatusDot`.
|
|
90
|
+
- Do not delete the audit rule or the line to make it pass; do not add `outline: none`.
|
|
91
|
+
|
|
92
|
+
## 3. Check by hand
|
|
93
|
+
|
|
94
|
+
Work through [the pre-delivery checklist](references/checklist.md), the only one: process, tokens, layout at 375, 768, 1440 and 320px, both themes each on screen, `en` and `vi`, keyboard and names, states, forms, lists, actions and code.
|
|
95
|
+
|
|
96
|
+
When something looks wrong and the cause is not obvious, start here:
|
|
97
|
+
|
|
98
|
+
| symptom | look at |
|
|
99
|
+
|---|---|
|
|
100
|
+
| The screen looks flat, grey or unfinished | `xdev-ui-admin` visual identity; the 10th row of the fix order |
|
|
101
|
+
| The page scrolls sideways on a phone | `fixed-width` and `nowrap` findings, then the layout section |
|
|
102
|
+
| Text is clipped or still English in `vi` | `i18n-parity`, `i18n-labels`, then themes and language |
|
|
103
|
+
| Focus is lost after a dialog or drawer closes | keyboard section; the widget's row in the standards skill patterns |
|
|
104
|
+
| A colour or size will not take a token | `references/grep-recipes.md` and `xdevui_search_tokens` |
|
|
105
|
+
| An animation stutters or a zoomed view blurs | `layout-motion` and `will-change` findings, then the `xdev-ui-motion` skill |
|
|
106
|
+
| The library part lacks something the page needs | the standards skill's known gaps; fix it in `@xdev-asia/ui`, not in the app |
|
|
107
|
+
|
|
108
|
+
Then run the check for each page's type. A page can be more than one type (a list that opens a dialog gets both checks).
|
|
109
|
+
|
|
110
|
+
| the page | check |
|
|
111
|
+
|---|---|
|
|
112
|
+
| a `DataTable`, `List` or `ResourceList` of records | `references/pages/list.md` |
|
|
113
|
+
| totals (`StatTile`) and charts over a period | `references/pages/dashboard.md` |
|
|
114
|
+
| `SettingRow`s or a `SettingsShell` | `references/pages/settings.md` |
|
|
115
|
+
| a `Dialog`, `FormDialog`, `Drawer` or a form of `Field`s | `references/pages/dialogs-forms.md` |
|
|
116
|
+
| `AuthShell`, or a step of signing in (code, consent, hand-off, link landing) | `references/pages/sign-in.md` |
|
|
117
|
+
| cards of providers, models, tools, integrations or apps | `references/pages/provider-grid.md` |
|
|
118
|
+
|
|
119
|
+
Then do the [web interface pass](references/web-interface.md): forms, links and URL state, copy, headings, theme and locale, what the audit cannot read.
|
|
120
|
+
|
|
121
|
+
Then check each widget against its APG keyboard and ARIA contract and walk the heuristics checklist from the `xdev-ui-ux-standards` skill. It gives each audit rule its WCAG or platform source.
|
|
122
|
+
|
|
123
|
+
## 4. Review a whole app
|
|
124
|
+
|
|
125
|
+
When asked to review every page or every feature:
|
|
126
|
+
|
|
127
|
+
1. List the routes from the router file or the nav items, one row per page, including dialogs a page opens and the sign-in steps. With neither, use one row per page file and write `unknown` as the route.
|
|
128
|
+
2. Give each row its page types from the table above.
|
|
129
|
+
3. Run the audit once over the source folder and file each finding under the row of the file and line it points at; a part shared by a page and its dialog goes under the page.
|
|
130
|
+
4. For each page, open it in the running app and walk its page checks. With no running app, decide what the source shows and put the rest under "not run".
|
|
131
|
+
5. Report one table. "passed" and "failed" count the items of that page's checks in `references/pages/`; an item that does not apply goes under "not run" as `n/a`:
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
| page | route | types | audit | passed | failed | not run |
|
|
135
|
+
|---|---|---|---|---|---|---|
|
|
136
|
+
| Users | /users | list, dialogs-forms | 0 errors, 1 warn | 9 | 1: row actions all say "Delete" | 360px: no device |
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## 5. Report
|
|
140
|
+
|
|
141
|
+
List what you fixed and what is left. Say which manual checks you did not run; do not claim them.
|