@qijenchen/design-system 0.1.0-beta.86 → 0.1.0-beta.87
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/patterns/element-anatomy/item-anatomy.js +1 -1
- package/ds-canonical/hooks/check_overlay_open_focus_escape_probe.sh +10 -2
- package/llms-full.txt +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/src/components/DataTable/data-table.spec.md +1 -0
- package/src/components/DatePicker/date-picker.spec.md +1 -0
- package/src/components/Empty/empty.spec.md +0 -1
- package/src/components/Field/field-controls.spec.md +2 -0
- package/src/components/Field/field.spec.md +1 -0
- package/src/components/Field/form-validation.spec.md +2 -0
- package/src/components/Select/select.spec.md +1 -0
- package/src/components/Tag/tag.spec.md +1 -0
- package/src/patterns/action-bar/action-bar.spec.md +1 -0
- package/src/patterns/element-anatomy/item-anatomy.spec.md +4 -0
- package/src/tokens/motion/motion.spec.md +6 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { cva } from "class-variance-authority";
|
|
4
|
-
import {
|
|
4
|
+
import { cn, lineClampClass } from "../../lib/utils.js";
|
|
5
5
|
import { Avatar } from "../../components/Avatar/avatar.js";
|
|
6
6
|
import { Tooltip, TooltipTrigger, TooltipContent } from "../../components/Tooltip/tooltip.js";
|
|
7
7
|
const ICON_SIZE = {
|
|
@@ -49,14 +49,22 @@ if [ -z "$USED" ]; then exit 0; fi
|
|
|
49
49
|
# 2026-07-16 dim 74 regex 加廣:原只認 open={true|isOpen|isVisible} 3 個字面名 —
|
|
50
50
|
# 漏 controlled `open={<任意變數/expression>}`(如 open={open} / open={!collapsed})與
|
|
51
51
|
# bare `open` boolean attr(JSX `<Popover open>` = true)→ 合法 controlled story 被誤殺。
|
|
52
|
-
# - `open=\{[!a-zA-Z_]` 涵蓋任意 identifier / negation expression(含 true/isOpen/isVisible)
|
|
53
52
|
# - bare attr 兩形態:tag 內 `<Sheet open>` / `<Popover open onX>`(`<Tag[^<>]* open` 限同 tag,
|
|
54
53
|
# `[^<>]*` 不可跨 `>` → JSX 內文 / 註解 prose 的「open / close」不誤中)+ 多行 prop 排版
|
|
55
54
|
# 「整行只有 open」(`^\s*open\s*$`)。存量驗證:Coachmark principles(行只有 open)pass、
|
|
56
55
|
# dropdown-menu.anatomy prose「浮層 open / close」不誤 pass。
|
|
57
56
|
# - defaultOpen 原本就有,保留
|
|
57
|
+
# 2026-07-18 修 bde8973c 過廣 bug:原 `open=\{[!a-zA-Z_]` 把 false/null/undefined 的首字 f/n/u
|
|
58
|
+
# 誤中 → `open={false}`(假 open,控制成關閉)被當成「有 open 機制」→ 漏擋 trigger-only story
|
|
59
|
+
# (test P3 失敗 → ci.yml Hook test suite 紅 → 下游 gate 全跳過)。修:controlled open={<expr>}
|
|
60
|
+
# 單獨抽出偵測,排除三個「關閉字面值」open={false|null|undefined}(空白容忍);identifier/negation
|
|
61
|
+
# /true 仍認(如 open={showMenu} / open={!collapsed} / open={true})。
|
|
58
62
|
HAS_OPEN=""
|
|
59
|
-
if echo "$CONTENT" | grep -qE 'defaultOpen
|
|
63
|
+
if echo "$CONTENT" | grep -qE 'defaultOpen|<[A-Za-z][^<>]*[[:space:]]open([[:space:]>]|$)|^[[:space:]]*open[[:space:]]*$|play:\s*async|play\(.*click'; then
|
|
64
|
+
HAS_OPEN="found"
|
|
65
|
+
fi
|
|
66
|
+
# controlled open={<expr>}:認任意 identifier / negation / true,但排除關閉字面值 false|null|undefined
|
|
67
|
+
if [ -z "$HAS_OPEN" ] && echo "$CONTENT" | grep -oE 'open=\{[^}]*\}' | grep -qvE '^open=\{[[:space:]]*(false|null|undefined)[[:space:]]*\}$'; then
|
|
60
68
|
HAS_OPEN="found"
|
|
61
69
|
fi
|
|
62
70
|
|
package/llms-full.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @qijenchen/design-system — 完整設計參考(llms-full)
|
|
2
2
|
|
|
3
|
-
> 全 component / pattern 的 variants / sizes / 禁止事項。build-time 從 spec.md frontmatter 生成,禁手改。v0.1.0-beta.
|
|
3
|
+
> 全 component / pattern 的 variants / sizes / 禁止事項。build-time 從 spec.md frontmatter 生成,禁手改。v0.1.0-beta.87。
|
|
4
4
|
|
|
5
5
|
# Components
|
|
6
6
|
|
package/llms.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @qijenchen/design-system
|
|
2
2
|
|
|
3
3
|
> World-class React design system(Radix/shadcn + Tailwind v4 + 自訂 design token)。
|
|
4
|
-
> 57 components + 4 public patterns + design tokens。v0.1.0-beta.
|
|
4
|
+
> 57 components + 4 public patterns + design tokens。v0.1.0-beta.87。
|
|
5
5
|
|
|
6
6
|
本檔由 source(spec.md frontmatter + Storybook index)build-time 自動生成,**禁手改**(CI --check drift gate 守)。
|
|
7
7
|
每元件 / pattern 的完整 variants / sizes / 禁止事項 全文見 [llms-full.txt](./llms-full.txt)。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qijenchen/design-system",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.87",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "World-class design system — components, patterns, tokens, hooks (single source of truth for team distribution).",
|
|
6
6
|
"type": "module",
|
|
@@ -511,6 +511,7 @@ DataTable 是 composite multi-section 元件,**不套 SizeMatrix / StateBehavior
|
|
|
511
511
|
- `carousel.spec.md`
|
|
512
512
|
- `circular-progress.spec.md`
|
|
513
513
|
- `description-list.spec.md`
|
|
514
|
+
- `filter-operators.spec.md`
|
|
514
515
|
- `opacity.spec.md`
|
|
515
516
|
- `pagination.spec.md`
|
|
516
517
|
- `scroll-area.spec.md`
|
|
@@ -424,11 +424,13 @@ col.accessor('status', {
|
|
|
424
424
|
- `checkbox.spec.md`
|
|
425
425
|
- `circular-progress.spec.md`
|
|
426
426
|
- `combobox.spec.md`
|
|
427
|
+
- `data-table.spec.md`
|
|
427
428
|
- `date-picker.spec.md`
|
|
428
429
|
- `element-anatomy.spec.md`
|
|
429
430
|
- `field-control-group.spec.md`
|
|
430
431
|
- `field.spec.md`
|
|
431
432
|
- `form-validation.spec.md`
|
|
433
|
+
- `inline-edit.spec.md`
|
|
432
434
|
- `input.spec.md`
|
|
433
435
|
- `item-anatomy.spec.md`
|
|
434
436
|
- `link-input.spec.md`
|
|
@@ -452,6 +452,7 @@ Field 內的資料輸入控件(Input / NumberInput / DatePicker / Select / Com
|
|
|
452
452
|
|
|
453
453
|
> 本節由 `scripts/add-reciprocal-pointers.mjs` 自動維護,列出在 SSOT 語境下指向本 spec 的其他 spec。若要手動補充,寫在本節之前。
|
|
454
454
|
|
|
455
|
+
- `data-table.spec.md`
|
|
455
456
|
- `description-list.spec.md`
|
|
456
457
|
- `element-anatomy.spec.md`
|
|
457
458
|
- `field-control-group.spec.md`
|
|
@@ -168,10 +168,12 @@ Form validation 的 ARIA / 鍵盤行為(對齊 WCAG 3.3.1 Error Identification +
|
|
|
168
168
|
|
|
169
169
|
> 本節由 `scripts/add-reciprocal-pointers.mjs` 自動維護,列出在 SSOT 語境下指向本 spec 的其他 spec。若要手動補充,寫在本節之前。
|
|
170
170
|
|
|
171
|
+
- `checkbox.spec.md`
|
|
171
172
|
- `combobox.spec.md`
|
|
172
173
|
- `date-picker.spec.md`
|
|
173
174
|
- `field-controls.spec.md`
|
|
174
175
|
- `field.spec.md`
|
|
175
176
|
- `link-input.spec.md`
|
|
177
|
+
- `select.spec.md`
|
|
176
178
|
- `textarea.spec.md`
|
|
177
179
|
- `time-picker.spec.md`
|
|
@@ -1028,15 +1028,18 @@ Selection control(Dropdown / Menu / List / SegmentedControl / Chip)的 item 視
|
|
|
1028
1028
|
> 本節由 `scripts/add-reciprocal-pointers.mjs` 自動維護,列出在 SSOT 語境下指向本 spec 的其他 spec。若要手動補充,寫在本節之前。
|
|
1029
1029
|
|
|
1030
1030
|
- `alert.spec.md`
|
|
1031
|
+
- `checkbox.spec.md`
|
|
1031
1032
|
- `color.spec.md`
|
|
1032
1033
|
- `command.spec.md`
|
|
1033
1034
|
- `dropdown-menu.spec.md`
|
|
1034
1035
|
- `element-anatomy.spec.md`
|
|
1035
1036
|
- `empty.spec.md`
|
|
1037
|
+
- `field-controls.spec.md`
|
|
1036
1038
|
- `field.spec.md`
|
|
1037
1039
|
- `file-item.spec.md`
|
|
1038
1040
|
- `header-canonical.spec.md`
|
|
1039
1041
|
- `inline-action.spec.md`
|
|
1042
|
+
- `layoutSpace.spec.md`
|
|
1040
1043
|
- `menu-item.spec.md`
|
|
1041
1044
|
- `notice.spec.md`
|
|
1042
1045
|
- `select-menu.spec.md`
|
|
@@ -1047,5 +1050,6 @@ Selection control(Dropdown / Menu / List / SegmentedControl / Chip)的 item 視
|
|
|
1047
1050
|
- `tabs.spec.md`
|
|
1048
1051
|
- `time-picker.spec.md`
|
|
1049
1052
|
- `toast.spec.md`
|
|
1053
|
+
- `token-system.spec.md`
|
|
1050
1054
|
- `tree-view.spec.md`
|
|
1051
1055
|
- `typography.spec.md`
|
|
@@ -97,13 +97,6 @@ Hover delay token 是「hover 觸發 → 延遲 N ms → overlay 顯示」的延
|
|
|
97
97
|
- `../../components/Tooltip/tooltip.spec.md`(consumer)
|
|
98
98
|
- `../../components/HoverCard/hover-card.spec.md`(consumer)
|
|
99
99
|
- `../../components/Avatar/avatar.spec.md`(consumer)
|
|
100
|
-
|
|
101
|
-
## 被引用(auto-maintained,Dim 3 reciprocal audit)
|
|
102
|
-
|
|
103
|
-
> 本節由 `scripts/add-reciprocal-pointers.mjs` 自動維護,列出在 SSOT 語境下指向本 spec 的其他 spec。若要手動補充,寫在本節之前。
|
|
104
|
-
|
|
105
|
-
- `hover-card.spec.md`
|
|
106
|
-
|
|
107
100
|
## 進出場動畫 token(2026-07-11 加,user 拍板)
|
|
108
101
|
|
|
109
102
|
Overlay(Tooltip/Popover/HoverCard/DropdownMenu/Dialog/Sheet/FileViewer)的 fade/zoom/slide 進出場動畫,值統一 token 化(原各元件硬寫 zoom-95/slide-2/duration-300 = M17 假 SSOT)。由 tw-animate-css(Tailwind v4,= shadcn 官方機制)的 `--tw-duration`/`--tw-ease` 變數綁定;共用 SSOT = `overlay-motion.ts`(overlayMotion/surfaceMotion)。
|
|
@@ -120,3 +113,9 @@ Overlay(Tooltip/Popover/HoverCard/DropdownMenu/Dialog/Sheet/FileViewer)的 fade/
|
|
|
120
113
|
**幾何原型分層(正當差異,不強行抹平)**:輕量 popup = fade+zoom+slide-side(8px);模態置中 = fade+zoom+slide-center(Dialog/FileViewer);邊緣抽屜 = slide-edge 100%、正當無 zoom(Sheet)。統一的是**時長/曲線/reduced-motion 守衛**(motion-reduce:animate-none 全 7 浮層),非幾何原型(對齊 Material standard-vs-emphasized / Carbon productive-vs-expressive tier 分層)。
|
|
121
114
|
|
|
122
115
|
**a11y**:prefers-reduced-motion 下 `motion-reduce:animate-none` 全 7 浮層統一關進出場動畫(overlay-motion SSOT 保證,無漏)。
|
|
116
|
+
|
|
117
|
+
## 被引用(auto-maintained,Dim 3 reciprocal audit)
|
|
118
|
+
|
|
119
|
+
> 本節由 `scripts/add-reciprocal-pointers.mjs` 自動維護,列出在 SSOT 語境下指向本 spec 的其他 spec。若要手動補充,寫在本節之前。
|
|
120
|
+
|
|
121
|
+
- `hover-card.spec.md`
|