@qijenchen/design-system 0.1.0-beta.38 → 0.1.0-beta.42
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/dist/components/Coachmark/coachmark-story-helpers.d.ts +22 -0
- package/dist/components/Coachmark/coachmark-story-helpers.d.ts.map +1 -0
- package/dist/components/DataTable/data-table.js +2 -2
- package/dist/components/DataTable/data-table.js.map +1 -1
- package/dist/components/DescriptionList/description-list.d.ts +2 -2
- package/dist/components/DescriptionList/description-list.js +2 -1
- package/dist/components/DescriptionList/description-list.js.map +1 -1
- package/dist/components/Menu/menu-item.d.ts.map +1 -1
- package/dist/components/Menu/menu-item.js +2 -1
- package/dist/components/Menu/menu-item.js.map +1 -1
- package/dist/components/Notice/notice.d.ts.map +1 -1
- package/dist/components/Notice/notice.js +2 -1
- package/dist/components/Notice/notice.js.map +1 -1
- package/dist/components/Rating/rating.js +0 -1
- package/dist/components/Rating/rating.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/tokens/uiSize/icon-size.d.ts +1 -2
- package/dist/tokens/uiSize/icon-size.d.ts.map +1 -1
- package/ds-canonical/hooks/check_addon_subdir_ship.sh +1 -1
- package/ds-canonical/hooks/check_audit_post_report_validator.sh +57 -9
- package/ds-canonical/hooks/check_chrome_header_avatar_canonical.sh +4 -1
- package/ds-canonical/hooks/check_escape_marker_abuse.sh +52 -12
- package/ds-canonical/hooks/check_field_family_invariants.sh +36 -1
- package/ds-canonical/hooks/check_fork_user_plugin_install.sh +9 -5
- package/ds-canonical/hooks/check_opacity_token_usage.sh +1 -1
- package/ds-canonical/hooks/check_sidebar_menu_button_implicit_wrap.sh +3 -1
- package/ds-canonical/hooks/check_tailwind_wildcard_in_docs.sh +8 -3
- package/ds-canonical/hooks/chrome_header_dispatcher.sh +24 -7
- package/ds-canonical/hooks/lib/_app_shell_primary_header_consistency.sh +8 -6
- package/ds-canonical/hooks/lib/_token_hygiene.sh +3 -3
- package/ds-canonical/hooks/tests/test_auto_regen_ds_barrel.sh +180 -0
- package/ds-canonical/hooks/tests/test_check_addon_subdir_ship.sh +170 -0
- package/ds-canonical/hooks/tests/test_check_app_shell_primary_header_consistency.sh +3 -3
- package/ds-canonical/hooks/tests/test_check_audit_post_report_validator.sh +18 -6
- package/ds-canonical/hooks/tests/test_check_chrome_header_avatar_canonical.sh +198 -0
- package/ds-canonical/hooks/tests/test_check_codex_brief_invariants.sh +208 -0
- package/ds-canonical/hooks/tests/test_check_consumer_app_story_title.sh +163 -0
- package/ds-canonical/hooks/tests/test_check_consumer_ds_primitive_misuse.sh +202 -0
- package/ds-canonical/hooks/tests/test_check_consumer_no_ds_catalog.sh +201 -0
- package/ds-canonical/hooks/tests/test_check_consumer_story_baseline.sh +200 -0
- package/ds-canonical/hooks/tests/test_check_escape_marker_abuse.sh +192 -0
- package/ds-canonical/hooks/tests/test_check_full_story_visual_interaction_sweep.sh +190 -0
- package/ds-canonical/hooks/tests/test_check_layout_space_magic_numbers.sh +196 -0
- package/ds-canonical/hooks/tests/test_check_orphan_ds_css.sh +212 -0
- package/ds-canonical/hooks/tests/test_check_overlay_open_focus_escape_probe.sh +191 -0
- package/ds-canonical/hooks/tests/test_check_propose_cite_required.sh +180 -0
- package/ds-canonical/hooks/tests/test_check_sidebar_menu_button_implicit_wrap.sh +224 -0
- package/ds-canonical/hooks/tests/test_check_storybook_addon_preset_cjs.sh +199 -0
- package/ds-canonical/hooks/tests/test_check_tailwind_wildcard_in_docs.sh +182 -0
- package/ds-canonical/hooks/tests/test_session_start_governance_check.sh +7 -0
- package/ds-canonical/references/principle-dim-map.json +2 -4
- package/ds-canonical/references/tailwind-gotchas.md +1 -1
- package/ds-canonical/rules/meta-patterns.md +1 -1
- package/ds-canonical/rules/ui-development.md +1 -1
- package/ds-canonical/skills/deep-audit-cross-codex/SKILL.md +19 -1
- package/ds-canonical/skills/design-system-audit/SKILL.md +2 -2
- package/ds-canonical/skills/design-system-audit/references/audit-prompts.md +61 -4
- package/ds-canonical/skills/design-system-audit/references/principle-audit-protocol.md +14 -0
- package/ds-canonical/skills/knowledge-prune/SKILL.md +1 -1
- package/ds-canonical/skills/product-ui-audit/references/audit-checks.md +1 -1
- package/ds-story-manifest.json +3 -8
- package/package.json +1 -1
- package/src/components/Accordion/accordion.spec.md +1 -1
- package/src/components/Alert/alert.spec.md +9 -9
- package/src/components/AppShell/app-shell.spec.md +14 -15
- package/src/components/AspectRatio/aspect-ratio.spec.md +4 -4
- package/src/components/Avatar/avatar.spec.md +11 -1
- package/src/components/Badge/badge.spec.md +1 -1
- package/src/components/Breadcrumb/breadcrumb.spec.md +12 -6
- package/src/components/BulkActionBar/bulk-action-bar.spec.md +4 -4
- package/src/components/Button/button.spec.md +19 -4
- package/src/components/Calendar/calendar.spec.md +26 -24
- package/src/components/Carousel/carousel.spec.md +5 -5
- package/src/components/Checkbox/checkbox.spec.md +3 -3
- package/src/components/Chip/chip.spec.md +23 -15
- package/src/components/CircularProgress/circular-progress.spec.md +8 -8
- package/src/components/Coachmark/coachmark-story-helpers.tsx +39 -0
- package/src/components/Coachmark/coachmark.spec.md +6 -6
- package/src/components/Combobox/combobox.spec.md +12 -10
- package/src/components/Command/command.spec.md +1 -1
- package/src/components/DataTable/data-table.spec.md +15 -14
- package/src/components/DataTable/data-table.tsx +4 -4
- package/src/components/DatePicker/date-picker.spec.md +3 -4
- package/src/components/DescriptionList/description-list.spec.md +1 -1
- package/src/components/DescriptionList/description-list.tsx +2 -2
- package/src/components/Dialog/dialog.spec.md +12 -4
- package/src/components/DropdownMenu/dropdown-menu.spec.md +11 -2
- package/src/components/Empty/empty.spec.md +22 -11
- package/src/components/Field/field.spec.md +4 -4
- package/src/components/Field/form-validation.spec.md +8 -0
- package/src/components/FieldControlGroup/field-control-group.spec.md +12 -9
- package/src/components/FileItem/file-item.spec.md +23 -29
- package/src/components/FileUpload/file-upload.spec.md +2 -2
- package/src/components/FileViewer/file-viewer.spec.md +21 -20
- package/src/components/HoverCard/hover-card.spec.md +10 -2
- package/src/components/Input/input.spec.md +4 -4
- package/src/components/LinkInput/link-input.spec.md +4 -3
- package/src/components/Menu/menu-item.spec.md +7 -0
- package/src/components/Menu/menu-item.tsx +1 -0
- package/src/components/NameCard/name-card.spec.md +3 -3
- package/src/components/Notice/notice.spec.md +3 -1
- package/src/components/Notice/notice.tsx +1 -0
- package/src/components/NumberInput/number-input.spec.md +6 -7
- package/src/components/OverflowIndicator/overflow-indicator.spec.md +10 -13
- package/src/components/PeoplePicker/people-picker.spec.md +20 -17
- package/src/components/Popover/popover.spec.md +7 -0
- package/src/components/RadioGroup/radio-group.spec.md +2 -2
- package/src/components/Rating/rating.spec.md +5 -5
- package/src/components/Rating/rating.tsx +2 -2
- package/src/components/ScrollArea/scroll-area.spec.md +6 -6
- package/src/components/SegmentedControl/segmented-control.spec.md +8 -7
- package/src/components/Select/select.spec.md +20 -8
- package/src/components/SelectMenu/select-menu.spec.md +7 -5
- package/src/components/SelectionControl/selection-item.spec.md +11 -9
- package/src/components/Separator/separator.spec.md +1 -1
- package/src/components/Sheet/sheet.spec.md +10 -3
- package/src/components/Sidebar/sidebar.spec.md +11 -6
- package/src/components/Skeleton/skeleton.spec.md +5 -5
- package/src/components/Slider/slider.spec.md +14 -14
- package/src/components/Steps/steps.spec.md +26 -27
- package/src/components/Switch/switch.spec.md +4 -5
- package/src/components/Tabs/tabs.spec.md +8 -6
- package/src/components/Tag/tag.spec.md +2 -3
- package/src/components/Textarea/textarea.spec.md +8 -8
- package/src/components/TimePicker/time-picker.spec.md +24 -33
- package/src/components/Toast/toast.spec.md +4 -3
- package/src/components/Tooltip/tooltip.spec.md +7 -0
- package/src/components/TreeView/tree-view.spec.md +15 -15
- package/src/index.ts +1 -3
- package/src/patterns/action-bar/action-bar.spec.md +8 -8
- package/src/patterns/element-anatomy/inline-action.spec.md +17 -1
- package/src/patterns/element-anatomy/item-anatomy.spec.md +8 -8
- package/src/patterns/header-canonical/header-canonical.spec.md +14 -12
- package/src/patterns/horizontal-overflow/horizontal-overflow.spec.md +3 -3
- package/src/patterns/overlay-surface/overlay-surface.spec.md +17 -7
- package/src/tokens/color/color.spec.md +13 -0
- package/src/tokens/density/density.spec.md +1 -1
- package/src/tokens/elevation/elevation.spec.md +7 -0
- package/src/tokens/layoutSpace/layoutSpace.spec.md +10 -0
- package/src/tokens/opacity/opacity.spec.md +6 -0
- package/src/tokens/orphan-tokens.spec.md +5 -5
- package/src/tokens/radius/radius.spec.md +5 -0
- package/src/tokens/typography/typography.spec.md +6 -0
- package/src/tokens/uiSize/icon-size.ts +1 -2
- package/src/tokens/uiSize/uiSize.spec.md +11 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { LucideIcon } from 'lucide-react';
|
|
2
|
+
/**
|
|
3
|
+
* Shared media-illustration helper for all Coachmark story files
|
|
4
|
+
* (`*.stories.tsx` / `*.anatomy.stories.tsx` / `*.principles.stories.tsx`).
|
|
5
|
+
*
|
|
6
|
+
* SSOT — 三檔共用單一定義,避免 placeholder gradient 在各檔重複 + drift。
|
|
7
|
+
*
|
|
8
|
+
* 設計約束(對齊 DS token 原則 + WCAG AA):
|
|
9
|
+
* - `from` / `to` 必傳 DS color token(`var(--color-{hue}-N)` 如 indigo-6)— 禁硬寫 hex
|
|
10
|
+
* - `bg-black/30` overlay 均勻壓暗:某些 DS primitive 色 lightness 較高
|
|
11
|
+
* (如 `--color-yellow-6` OKLCH L=0.87),白字直接疊上去會失去 AA 對比。
|
|
12
|
+
* 壓暗 overlay 保證 icon+label 在任何 gradient 色上都 ≥ 4.5:1。
|
|
13
|
+
* - 文字走 `text-on-emphasis`(DS emphasis-surface token)而非半透明 `text-white/90`,
|
|
14
|
+
* 對齊 DS typography tier + 確保對比。
|
|
15
|
+
*/
|
|
16
|
+
export declare const MediaGradient: ({ from, to, icon: Icon, label, }: {
|
|
17
|
+
from: string;
|
|
18
|
+
to: string;
|
|
19
|
+
icon: LucideIcon;
|
|
20
|
+
label: string;
|
|
21
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=coachmark-story-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coachmark-story-helpers.d.ts","sourceRoot":"","sources":["../../../src/components/Coachmark/coachmark-story-helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,GAAI,kCAK3B;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CACd,4CAYA,CAAA"}
|
|
@@ -900,7 +900,7 @@ function DataTableInner({
|
|
|
900
900
|
type: "button",
|
|
901
901
|
"aria-label": isExpanded ? "收合" : "展開",
|
|
902
902
|
"aria-expanded": isExpanded,
|
|
903
|
-
className: "inline-flex items-center justify-center shrink-0 w-4 h-4 mr-2 text-fg-muted hover:text-foreground rounded-
|
|
903
|
+
className: "inline-flex items-center justify-center shrink-0 w-4 h-4 mr-2 text-fg-muted hover:text-foreground rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring transition-transform",
|
|
904
904
|
style: { transform: isExpanded ? "rotate(90deg)" : void 0 },
|
|
905
905
|
onClick: (e) => {
|
|
906
906
|
e.stopPropagation();
|
|
@@ -933,7 +933,7 @@ function DataTableInner({
|
|
|
933
933
|
type: "button",
|
|
934
934
|
"aria-label": isExpanded ? "收合" : "展開",
|
|
935
935
|
"aria-expanded": isExpanded,
|
|
936
|
-
className: "inline-flex items-center justify-center shrink-0 w-4 h-4 mr-2 text-fg-muted hover:text-foreground rounded-
|
|
936
|
+
className: "inline-flex items-center justify-center shrink-0 w-4 h-4 mr-2 text-fg-muted hover:text-foreground rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring transition-transform",
|
|
937
937
|
style: { transform: isExpanded ? "rotate(90deg)" : void 0 },
|
|
938
938
|
onClick: (e) => {
|
|
939
939
|
e.stopPropagation();
|