@qijenchen/design-system 0.1.0-beta.3
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/package.json +93 -0
- package/src/README.md +32 -0
- package/src/components/Accordion/accordion.tsx +104 -0
- package/src/components/Alert/alert.tsx +188 -0
- package/src/components/AppShell/_demo-helpers.tsx +198 -0
- package/src/components/AppShell/app-shell.tsx +364 -0
- package/src/components/AspectRatio/aspect-ratio.tsx +58 -0
- package/src/components/Avatar/avatar.tsx +368 -0
- package/src/components/Badge/badge.tsx +104 -0
- package/src/components/Breadcrumb/breadcrumb.tsx +609 -0
- package/src/components/BulkActionBar/bulk-action-bar.tsx +156 -0
- package/src/components/Button/button-group.tsx +96 -0
- package/src/components/Button/button.tsx +539 -0
- package/src/components/Calendar/calendar.tsx +411 -0
- package/src/components/Carousel/carousel.tsx +371 -0
- package/src/components/Chart/chart.tsx +376 -0
- package/src/components/Checkbox/checkbox-group.tsx +94 -0
- package/src/components/Checkbox/checkbox.tsx +237 -0
- package/src/components/Chip/chip.tsx +359 -0
- package/src/components/CircularProgress/circular-progress.tsx +204 -0
- package/src/components/Coachmark/coachmark.tsx +255 -0
- package/src/components/Combobox/combobox.tsx +826 -0
- package/src/components/Command/command.tsx +187 -0
- package/src/components/DataTable/active-editor-controller.ts +72 -0
- package/src/components/DataTable/cell-registry.tsx +520 -0
- package/src/components/DataTable/column-types.ts +180 -0
- package/src/components/DataTable/data-table-column-visibility-panel.tsx +261 -0
- package/src/components/DataTable/data-table-filter-panel.tsx +813 -0
- package/src/components/DataTable/data-table-interaction-layer.tsx +483 -0
- package/src/components/DataTable/data-table-sort-manager.tsx +210 -0
- package/src/components/DataTable/data-table.css +165 -0
- package/src/components/DataTable/data-table.tsx +2924 -0
- package/src/components/DataTable/filter-operators.ts +225 -0
- package/src/components/DataTable/filter-tree.ts +313 -0
- package/src/components/DataTable/lib/column-meta.ts +79 -0
- package/src/components/DateGrid/date-grid.tsx +209 -0
- package/src/components/DatePicker/date-picker.tsx +1114 -0
- package/src/components/DescriptionList/description-list.tsx +141 -0
- package/src/components/Dialog/dialog.tsx +267 -0
- package/src/components/DropdownMenu/dropdown-menu.tsx +475 -0
- package/src/components/Empty/empty.tsx +108 -0
- package/src/components/Field/field-context.ts +136 -0
- package/src/components/Field/field-types.ts +52 -0
- package/src/components/Field/field-wrapper.tsx +348 -0
- package/src/components/Field/field.tsx +535 -0
- package/src/components/FieldControlGroup/field-control-group.tsx +136 -0
- package/src/components/FileItem/file-item.tsx +322 -0
- package/src/components/FileUpload/file-upload.tsx +326 -0
- package/src/components/FileViewer/file-viewer-types.ts +76 -0
- package/src/components/FileViewer/file-viewer.tsx +1065 -0
- package/src/components/FileViewer/image-renderer.tsx +256 -0
- package/src/components/HoverCard/hover-card.tsx +79 -0
- package/src/components/Input/input.tsx +233 -0
- package/src/components/LinkInput/link-input.tsx +304 -0
- package/src/components/Menu/menu-item.tsx +334 -0
- package/src/components/NameCard/name-card.tsx +319 -0
- package/src/components/Notice/notice.tsx +196 -0
- package/src/components/NumberInput/number-input.tsx +203 -0
- package/src/components/OverflowIndicator/overflow-indicator.tsx +156 -0
- package/src/components/PeoplePicker/avatar-stack-overflow.ts +100 -0
- package/src/components/PeoplePicker/people-picker-helpers.ts +76 -0
- package/src/components/PeoplePicker/people-picker.tsx +455 -0
- package/src/components/PeoplePicker/person-display.tsx +358 -0
- package/src/components/Popover/popover.tsx +183 -0
- package/src/components/ProgressBar/progress-bar.tsx +157 -0
- package/src/components/README.md +58 -0
- package/src/components/RadioGroup/radio-group.tsx +261 -0
- package/src/components/Rating/rating.tsx +295 -0
- package/src/components/ScrollArea/scroll-area.tsx +110 -0
- package/src/components/SegmentedControl/segmented-control.tsx +304 -0
- package/src/components/Select/select.tsx +658 -0
- package/src/components/SelectMenu/select-menu.tsx +430 -0
- package/src/components/SelectionControl/selection-item.tsx +261 -0
- package/src/components/Separator/separator.tsx +48 -0
- package/src/components/Sheet/sheet.tsx +240 -0
- package/src/components/Sidebar/sidebar.tsx +1280 -0
- package/src/components/Skeleton/skeleton.tsx +35 -0
- package/src/components/Slider/slider.tsx +158 -0
- package/src/components/Steps/steps.tsx +850 -0
- package/src/components/Switch/switch.tsx +285 -0
- package/src/components/Tabs/tabs.tsx +515 -0
- package/src/components/Tag/tag.tsx +246 -0
- package/src/components/Textarea/textarea.tsx +280 -0
- package/src/components/TimePicker/time-columns.tsx +260 -0
- package/src/components/TimePicker/time-picker.tsx +419 -0
- package/src/components/Toast/toast.tsx +129 -0
- package/src/components/Tooltip/tooltip.tsx +68 -0
- package/src/components/TreeView/tree-view.tsx +1031 -0
- package/src/hooks/use-controllable.ts +40 -0
- package/src/hooks/use-is-narrow-viewport.ts +19 -0
- package/src/hooks/use-is-touch-device.ts +21 -0
- package/src/hooks/use-overflow-items.ts +256 -0
- package/src/index.ts +85 -0
- package/src/lib/README.md +82 -0
- package/src/lib/drag-visual.ts +272 -0
- package/src/lib/i18n/README.md +60 -0
- package/src/lib/i18n/i18n-context.tsx +129 -0
- package/src/lib/multi-select-ordering.ts +61 -0
- package/src/lib/utils.ts +93 -0
- package/src/patterns/README.md +67 -0
- package/src/patterns/element-anatomy/item-anatomy.tsx +744 -0
- package/src/patterns/header-canonical/chrome-header.tsx +175 -0
- package/src/patterns/header-canonical/header-canonical.css +27 -0
- package/src/patterns/horizontal-overflow/horizontal-overflow.tsx +217 -0
- package/src/patterns/overlay-surface/overlay-surface.tsx +191 -0
- package/src/patterns/resize-handle/resize-handle.tsx +188 -0
- package/src/stories-helpers/anatomy/anatomy-utils.tsx +64 -0
- package/src/tokens/README.md +53 -0
- package/src/tokens/color/primitives.css +429 -0
- package/src/tokens/color/semantic.css +539 -0
- package/src/tokens/elevation/overlay-geometry.ts +13 -0
- package/src/tokens/layoutSpace/layoutSpace.css +36 -0
- package/src/tokens/motion/motion.css +30 -0
- package/src/tokens/motion/motion.ts +17 -0
- package/src/tokens/opacity/opacity.css +23 -0
- package/src/tokens/radius/radius.css +19 -0
- package/src/tokens/typography/typography.css +118 -0
- package/src/tokens/uiSize/icon-size.ts +52 -0
- package/src/tokens/uiSize/uiSize.css +125 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
2
|
+
Opacity Tokens
|
|
3
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
4
|
+
|
|
5
|
+
็ณป็ตฑๅ
งๅฏไธ็ opacity token(disabled ็ๆ
)ใๅ
ถไปๆๆ้ๆๅบฆ้ๆฑ
|
|
6
|
+
ๆ้้ alpha ่ฒ้(--white-aN / --black-aN)่งฃๆฑบ,ไธๅฆ้ opacity tokenใ
|
|
7
|
+
|
|
8
|
+
**Drag-and-drop reuse(2026-05-06 v14.5.2 ๅฐ้ฝ Atlassian Pragmatic)**:
|
|
9
|
+
- Drag source ๅ้ๆฎๅฝฑ โ reuse `opacity-disabled`(0.45)ใAtlassian Pragmatic
|
|
10
|
+
guidelines ไนๆฏ reuse `opacity.disabled`(ไปๅๅผ 0.40,ๆๅ 0.45,role ไธ่ด)ใ
|
|
11
|
+
- DragOverlay ghost ไธๅฆ dim,็จ `opacity:1` + `shadow-[var(--elevation-200)]`
|
|
12
|
+
่กจ้ "lifted preview"(ๅฐ้ฝ dnd-kit / Material / Atlassian canonical)ใ
|
|
13
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ */
|
|
14
|
+
|
|
15
|
+
@theme inline {
|
|
16
|
+
--opacity-disabled: 0.45;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
/* โโ Custom Utility โโ */
|
|
21
|
+
@utility opacity-disabled {
|
|
22
|
+
opacity: var(--opacity-disabled);
|
|
23
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
2
|
+
Radius Tokens
|
|
3
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
4
|
+
|
|
5
|
+
่ฆ radius.spec.md ็ไฝฟ็จๅๅใ
|
|
6
|
+
|
|
7
|
+
xs :2px(ๆฅตๅฐ่ฆ่ฆบ indicator,ๅฆ Chart legend swatch 8ร8 ่ฒๅก)
|
|
8
|
+
sm / md:4px(ๅฐๅ
ไปถใTagใBadgeใButtonใFieldใcheckbox ็ญ)
|
|
9
|
+
lg :8px(ๅก็ใๅฝ็ชใๅฎนๅจๅฑค)
|
|
10
|
+
full :9999px(pill / circular,AvatarใSwitch track ็ญ)
|
|
11
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ */
|
|
12
|
+
|
|
13
|
+
@theme inline {
|
|
14
|
+
--radius-xs: 2px;
|
|
15
|
+
--radius-sm: 4px;
|
|
16
|
+
--radius-md: 4px;
|
|
17
|
+
--radius-lg: 8px;
|
|
18
|
+
--radius-full: 9999px;
|
|
19
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/* โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
2
|
+
Typography Tokens
|
|
3
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
4
|
+
|
|
5
|
+
โโ ่จญ่จๅๅ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
6
|
+
โ font-size ่้ ่จญ line-height ็ค้ฒ tokenใ โ
|
|
7
|
+
โ font-weight ๆฐธ้ ็ฑไฝฟ็จ็ซฏ็ๅ ๏ผไธๅฏซๆญปๅจ tokenใ โ
|
|
8
|
+
โ โ
|
|
9
|
+
โ line-height ็้ธๆๅบๆผใๆฏๅฆ้ฉๅๅค่ก้ฑ่ฎใ๏ผ โ
|
|
10
|
+
โ lh 1.5 โ ้ฉๅ้ฑ่ฎ็้ฃ็บๆฎต่ฝ๏ผ14px / 16px๏ผ โ
|
|
11
|
+
โ lh 1.3 โ ๆจ้กใ็ญๆๅญใไธ้้ฑ่ฎ่ก่ท็ๅ ดๆฏ โ
|
|
12
|
+
โ โ
|
|
13
|
+
โ 12px ไปฅไธไธ้ฉๅไฝ็บ้ฃ็บ้ฑ่ฎๅ
งๆ๏ผไธๅพ lh 1.3ใ โ
|
|
14
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
15
|
+
|
|
16
|
+
โโ Heading scale ๅ
จ้จ lh 1.3 โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
17
|
+
โ text-h1 48px ้ ้ขไธปๆจ้ก โ
|
|
18
|
+
โ text-h2 32px ๅๅกๆจ้ก โ
|
|
19
|
+
โ text-h3 24px ๅญๅๅกๆจ้ก โ
|
|
20
|
+
โ text-h4 20px ๅฐ็ฏๆจ้ก โ
|
|
21
|
+
โ text-h5 16px ๅ
ไปถๅฑค็ดๆจ้ก โ
|
|
22
|
+
โ text-h6 14px ๆๅฐๅฑค็ดๆจ้ก โ
|
|
23
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
24
|
+
|
|
25
|
+
โโ Body scale lh 1.5๏ผๅฏ็จ leading-compact ่ฆ่็บ 1.3 โโโโโโโโโโโโโโโ
|
|
26
|
+
โ text-body-lg 16px 16px ็บไธป็้ข็ๆฎต่ฝๅ
งๆ โ
|
|
27
|
+
โ text-body 14px โ
ไธป่ฆๅ
งๆๅบๆบ โ
|
|
28
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
29
|
+
|
|
30
|
+
โโ Supplementary scale ๅ
จ้จ lh 1.3 โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
31
|
+
โ text-caption 12px ๅ่กจ้่จปใๅ
ไปถ helper textใๆจ็ฑคๆๅญ โ
|
|
32
|
+
โ text-footnote 10px ๆณๅพๆๅญใไพๆบๆจๆณจ๏ผๆฅตๅฐ็จ๏ผ โ
|
|
33
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
34
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ */
|
|
35
|
+
|
|
36
|
+
:root {
|
|
37
|
+
/* Font Size */
|
|
38
|
+
--font-h1-size: 48px;
|
|
39
|
+
--font-h2-size: 32px;
|
|
40
|
+
--font-h3-size: 24px;
|
|
41
|
+
--font-h4-size: 20px;
|
|
42
|
+
--font-h5-size: 16px;
|
|
43
|
+
--font-h6-size: 14px;
|
|
44
|
+
|
|
45
|
+
--font-body-lg-size: 16px;
|
|
46
|
+
--font-body-size: 14px;
|
|
47
|
+
|
|
48
|
+
--font-caption-size: 12px;
|
|
49
|
+
--font-footnote-size: 10px;
|
|
50
|
+
|
|
51
|
+
/* โ Letter-spacing(role-specific only;raw tracking-* utility ็ฆ็จ)โ
|
|
52
|
+
`--tracking-shortcut`:้ต็คๅฟซๆท้ต้กฏ็คบๅฐ็จ(โK / Ctrl+S ็ญ)ใๅฏฌไธ้
|
|
53
|
+
letter-spacing ่ฎ glyph ไน้ๅผๅธๆๅฐ้ฝ้ตๅธฝ visual idiom โ ๅฐ้ฝ
|
|
54
|
+
Material / GitHub Primer / Polaris KeyboardKey / Tailwindใwider tracking
|
|
55
|
+
for uppercase buttons + labelsใcanonicalใ0.1em ่ Tailwind tracking-widest
|
|
56
|
+
็ธๅๅผไฝ่ช็พฉ็นๅฎ(ไธๆพไปป raw utility ๆผ)ใ */
|
|
57
|
+
--tracking-shortcut: 0.1em;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
/* โโ Tailwind Theme Bridge โโ
|
|
62
|
+
font-sans โ Roboto ็บๅ็ๅญ้ซ๏ผๅ่จญ็ณป็ตฑๅทฒๆ๏ผไธๅฆๅค่ผๅ
ฅ web font๏ผ
|
|
63
|
+
|
|
64
|
+
โโ Stack ้ ๅบ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
65
|
+
โ 1. Roboto๏ผๅ่จญ็ณป็ตฑๆ๏ผๆฒๆๅ fallback๏ผ โ
|
|
66
|
+
โ 2. OS ็ณป็ตฑๅญ fallback๏ผmacOS / Windows / generic๏ผ โ
|
|
67
|
+
โ 3. CJK ๅญ้ซ fallback๏ผ็่ฆฝๅจ glyph-level fallback ่ชๅ่งธ็ผ๏ผ โ
|
|
68
|
+
โ 4. generic + emoji โ
|
|
69
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
70
|
+
|
|
71
|
+
ๅ็๏ผ็่ฆฝๅจๅ glyph-level fallback๏ผ่ชๅๆฒฟ stack ๆพๆๅฐๆๅญๅ
็ๅญ้ซ */
|
|
72
|
+
@theme {
|
|
73
|
+
--font-sans:
|
|
74
|
+
/* Brand font โ ๅ่จญ็ณป็ตฑๅทฒๆ */
|
|
75
|
+
Roboto,
|
|
76
|
+
/* Latin OS fallback */
|
|
77
|
+
-apple-system, BlinkMacSystemFont,
|
|
78
|
+
"Segoe UI Variable", "Segoe UI",
|
|
79
|
+
system-ui,
|
|
80
|
+
/* Japanese */
|
|
81
|
+
"Hiragino Sans", "Yu Gothic UI", Meiryo, "Noto Sans JP",
|
|
82
|
+
/* Korean */
|
|
83
|
+
"Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR",
|
|
84
|
+
/* Chinese (TC) */
|
|
85
|
+
"PingFang TC", "Microsoft JhengHei UI", "Microsoft JhengHei",
|
|
86
|
+
/* generic */
|
|
87
|
+
sans-serif,
|
|
88
|
+
/* emoji */
|
|
89
|
+
"Apple Color Emoji", "Segoe UI Emoji";
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
/* โโ Tailwind Utility Bridge โโ */
|
|
94
|
+
|
|
95
|
+
@utility text-h1 { font-size: var(--font-h1-size); line-height: 1.3; }
|
|
96
|
+
@utility text-h2 { font-size: var(--font-h2-size); line-height: 1.3; }
|
|
97
|
+
@utility text-h3 { font-size: var(--font-h3-size); line-height: 1.3; }
|
|
98
|
+
@utility text-h4 { font-size: var(--font-h4-size); line-height: 1.3; }
|
|
99
|
+
@utility text-h5 { font-size: var(--font-h5-size); line-height: 1.3; }
|
|
100
|
+
@utility text-h6 { font-size: var(--font-h6-size); line-height: 1.3; }
|
|
101
|
+
|
|
102
|
+
@utility text-body-lg { font-size: var(--font-body-lg-size); line-height: 1.5; }
|
|
103
|
+
@utility text-body { font-size: var(--font-body-size); line-height: 1.5; }
|
|
104
|
+
|
|
105
|
+
@utility text-caption { font-size: var(--font-caption-size); line-height: 1.3; }
|
|
106
|
+
@utility text-footnote { font-size: var(--font-footnote-size); line-height: 1.3; }
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
/* โโ line-height override
|
|
110
|
+
leading-normal (1.5) ๅทฒๆฏ Tailwind ๅ
งๅปบ๏ผๅช่ฃ leading-compact โโ */
|
|
111
|
+
@utility leading-compact { line-height: 1.3; }
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
/* โโ Letter-spacing semantic utility(ๅฐ้ฝ single semantic value per role ๅฒๅญธ)โโ
|
|
115
|
+
`tracking-shortcut`:้ต็คๅฟซๆท้ต hint(Command / DropdownMenuShortcut ็ญ)ใ
|
|
116
|
+
็ฆ raw `tracking-(tight|wide|wider|widest|tighter)` per typography.spec.md L91-105
|
|
117
|
+
+ utility-registry.json block listใๆฐๅข role ้ๆฐ token + ๆฐ @utilityใ */
|
|
118
|
+
@utility tracking-shortcut { letter-spacing: var(--tracking-shortcut); }
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icon Size SSOT โ cross-domain re-export entry
|
|
3
|
+
*
|
|
4
|
+
* Owner:`packages/design-system/src/patterns/element-anatomy/item-anatomy.tsx:66` `ICON_SIZE`
|
|
5
|
+
* Spec:`packages/design-system/src/tokens/uiSize/uiSize.spec.md` ใIcon Size Tierใๆฎต
|
|
6
|
+
*
|
|
7
|
+
* โโ ็บไป้บผ re-export ไธ็ดๆฅๅ owner โโ
|
|
8
|
+
* `ICON_SIZE` const codified in `item-anatomy.tsx` ๆฏ row primitive SSOT(MenuItem / TreeView /
|
|
9
|
+
* Sidebar / DropdownMenu / SelectionItem / Item-anatomy ็ญ row-based primitives ๆถ่ฒป)ใ
|
|
10
|
+
*
|
|
11
|
+
* Form control(Button / Input / Combobox / DatePicker / Tabs / Select / SegmentedControl ็ญ)
|
|
12
|
+
* ไธ่ฉฒ cross-domain import patterns/element-anatomy(ๆ้ ๆ componentsโpatterns ๅๅ dependency
|
|
13
|
+
* ๅขๅ cycle ้ขจ้ช)ใ้้ `tokens/uiSize/` ไฝ token home ๆฏ cross-domain SSOT ็ๆ
ฃไพ(token ๆฏ DS
|
|
14
|
+
* ๅ
งๆๅบๅฑค,ๆๆ layer ้ฝๅฏ consume ไธ้ๅ dependency direction)ใ
|
|
15
|
+
*
|
|
16
|
+
* โโ Tier โโ
|
|
17
|
+
* `field-height-xs / sm / md` โ icon **16px**
|
|
18
|
+
* `field-height-lg` โ icon **20px**
|
|
19
|
+
*
|
|
20
|
+
* ่ฉณ spec L132+ Icon Size Tier ๆฎต(stroke ไธ้ 12px / Tag-Field ้
ๅฐ / etc.)
|
|
21
|
+
*
|
|
22
|
+
* โโ Consumer ็จๆณ โโ
|
|
23
|
+
* ```tsx
|
|
24
|
+
* import { ICON_SIZE } from '@/design-system/tokens/uiSize/icon-size'
|
|
25
|
+
*
|
|
26
|
+
* // sm/md โ 16, lg โ 20
|
|
27
|
+
* <LucideIcon size={ICON_SIZE[size]} />
|
|
28
|
+
*
|
|
29
|
+
* // form control xs(field-height-xs 24)็จ ICON_SIZE.sm(ๅ 16,per spec L132 Tier)
|
|
30
|
+
* <LucideIcon size={size === 'xs' ? ICON_SIZE.sm : ICON_SIZE[size]} />
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* โโ ้ฒๆผ็งป โโ
|
|
34
|
+
* 1. uiSize.spec.mdใIcon Size Tierใๆฎต codify 16/16/16/20 tier(text-based canonical)
|
|
35
|
+
* 2. ๆฌ const ็จๅผๅ SSOT(type-safe Record<RowSize, number>)
|
|
36
|
+
* 3. Hook `check_icon_size_literal.sh`(write-time regex ๆ้ๆจๆบ literal)
|
|
37
|
+
* 4. Audit DimใIcon size literal complianceใDS-wide audit-time scan
|
|
38
|
+
*
|
|
39
|
+
* โโ Carve-out(ไธ้ฉ็จๆฌ SSOT)โโ
|
|
40
|
+
* - `rating.spec.md` Rating star 20/24/24(identity scale,cite Ant/Material/Airbnb)
|
|
41
|
+
* - `avatar.spec.md` Avatar ๅ
ง icon `round_even(size ร 0.6)`(Material/Apple HIG)
|
|
42
|
+
* - `empty.tsx` Empty ็จ Avatar 48 wrap โ icon 28(Avatar formula derived)
|
|
43
|
+
* - `file-viewer.tsx` thumb 64 โ icon 20(thumbnail file-type indicator,hardcode ็กๅ
ฌๅผ)
|
|
44
|
+
* - `circular-progress.tsx` `strokeWidth = max(2, size/10)`(stroke ring ๅๅบฆๅ
ฌๅผ,้ icon)
|
|
45
|
+
* - `steps.tsx` INDICATOR_ICON_SIZE `{sm:0, md:16, lg:20}`(้จๅๅฐ้ฝ tier,sm ๅ ๅๅ 8px ๅคชๅฐ)
|
|
46
|
+
* - `slider.tsx` thumb ๅบๅฎไธ้จ size ่ฎ(่ฆ่ฆบ single tier)
|
|
47
|
+
* - `checkbox.tsx` + `switch.tsx` check `{sm:12, md:12, lg:16}`(form-control internal,stroke ไธ้)
|
|
48
|
+
*
|
|
49
|
+
* ่ฉณ uiSize.spec.mdใ่ทจ regime pointer indexใๆฎตใ
|
|
50
|
+
*/
|
|
51
|
+
export { ICON_SIZE } from '@/design-system/patterns/element-anatomy/item-anatomy'
|
|
52
|
+
export type { RowSize } from '@/design-system/patterns/element-anatomy/item-anatomy'
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/* โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
2
|
+
Component Size โ Semantic Tokens
|
|
3
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
4
|
+
|
|
5
|
+
ๅ
ไปถ้ซๅบฆ็่ช็พฉ tokenใrem ๅฎไฝ๏ผๅฐ้ไฝฟ็จ่
็่ฆฝๅจๅญ้ซ่จญๅฎ๏ผWCAG๏ผใ
|
|
6
|
+
้้ data-density ๅๆ md / lg ๆจกๅผใ
|
|
7
|
+
|
|
8
|
+
โโ Field Height โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
9
|
+
โ ButtonใInputใCheckbox/Radio SelectionItem ็ญไบๅๅ
ไปถ โ
|
|
10
|
+
โ xs ๅบๅฎไธ้จ density ็ธฎๆพ๏ผๅฏ้ UIใButton xs๏ผ โ
|
|
11
|
+
โ sm / md / lg ้จ density ้ฟๆ โ
|
|
12
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
13
|
+
|
|
14
|
+
โโ Table Row โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
15
|
+
โ DataTable ่ก้ซ โ
|
|
16
|
+
โ sm / md / lg ไธ็จฎๅฐบๅฏธ๏ผdensity ๅๆ็ตฑไธ +0.5rem (+8px) โ
|
|
17
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
18
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ */
|
|
19
|
+
|
|
20
|
+
:root {
|
|
21
|
+
/* Field Height โ ButtonใInputใSelectionItemใSegmentedControl */
|
|
22
|
+
--field-height-xs: 1.5rem; /* 24px โ ๅบๅฎ๏ผไธ้จ density ็ธฎๆพ */
|
|
23
|
+
--field-height-sm: 1.75rem; /* 28px */
|
|
24
|
+
--field-height-md: 2rem; /* 32px */
|
|
25
|
+
--field-height-lg: 2.25rem; /* 36px */
|
|
26
|
+
|
|
27
|
+
/* Table Row Height โ DataTable */
|
|
28
|
+
--table-row-sm: 2rem; /* 32px */
|
|
29
|
+
--table-row-md: 2.5rem; /* 40px */
|
|
30
|
+
--table-row-lg: 3rem; /* 48px */
|
|
31
|
+
|
|
32
|
+
/* Tab Height โ Tabs
|
|
33
|
+
็จ็ซๆผ field-height ่ table-row๏ผtabs ๆฏ navigation container๏ผ
|
|
34
|
+
้่ฆๆฏ form control ๆดๅคง็ๅผๅธๆใๆธๅผ็ฎๅ่ table-row ๅฐ้ฝ๏ผ
|
|
35
|
+
ไฝๆฆๅฟต็จ็ซ๏ผไธ็จ var() alias โ ๆชไพไปปไฝไธๆน่ชฟๆด้ฝไธ็ฝๅๅฆไธๆนใ */
|
|
36
|
+
--tab-height-sm: 2rem; /* 32px โ โ
้ ่จญ(2026-05-17 ๅพ md ๆน),overlay / chrome / dense */
|
|
37
|
+
--tab-height-md: 2.5rem; /* 40px โ future tier(็ก recommended use case,2026-05-17 ๅพ default ้็ด) */
|
|
38
|
+
--tab-height-lg: 3rem; /* 48px โ ็จ็ซ tabs ๅไปฃ chrome header(= --chrome-header-height) */
|
|
39
|
+
|
|
40
|
+
/* Chrome Header Height โ Sidebar / FileViewer Toolbar+InfoPanel / app top bar / page header
|
|
41
|
+
+ Overlay family chrome (Dialog/Sheet/Popover/Coachmark header+footer via overlay-surface SurfaceHeader/SurfaceFooter)
|
|
42
|
+
(SSOT,2026-05-23 deep-audit Phase A Decision 1 codify per user verbatimใๆฑบ็ญไธ็
งไฝ ๅปบ่ญฐใ โ
|
|
43
|
+
ๅพ src/globals.css ๆฌๅฐ DS tokens ๅ npm-package consumer ๆฒ src/globals.css ๆๅดฉ header ้ซๅบฆ,้ M17 SSOT ้ตๅพ)
|
|
44
|
+
consumer:patterns/header-canonical/chrome-header.tsxใoverlay-surface.tsxใdialog.tsx ็ญ
|
|
45
|
+
ไธ็็ดๅฐ็
ง:Linear 48px / Atlassian 48-56 / Material small AppBar 48-56 / VS Code activity-bar 48
|
|
46
|
+
โโ ็บไป้บผๆฏ 48 / 56(hardcode,้ๅ
ฌๅผ) โโ
|
|
47
|
+
ไธ็็ด app ็ header ้ซๅบฆ้ไธญๅจ 40โ64px,็่้ป 48โ56ใ
|
|
48
|
+
ๅ
ฉๅๅผ้ฝ snap ๅฐ 8px gridใanchor ๆฏ field-height-md(ๅฎน็ด md Button + ไธไธๅผๅธ็ฉบ้)ใ
|
|
49
|
+
ไธๅฏซๆ calc() ๅ
ฌๅผๅ ็บ lg ็กๆณๅฎ็พ้ตๅฎ(54 โ 56 ็บไบ 8px grid ๅๆด),hardcode ๆฏๅๅ
ฌๅผ่ช ๅฏฆใ */
|
|
50
|
+
--chrome-header-height: 3rem; /* 48px */
|
|
51
|
+
|
|
52
|
+
/* Tree Indent โ TreeView + DataTable nested rows(SSOT,2026-05-04)
|
|
53
|
+
ๅ
ฌๅผ:chevronSize + gap-2 = 16+8(sm/md)/ 20+8(lg)
|
|
54
|
+
Consumer:TreeView depth indent / DataTable nested row depth indent */
|
|
55
|
+
--tree-indent-sm: 1.5rem; /* 24px */
|
|
56
|
+
--tree-indent-md: 1.5rem; /* 24px */
|
|
57
|
+
--tree-indent-lg: 1.75rem; /* 28px */
|
|
58
|
+
|
|
59
|
+
/* DataTable Panel Widths โ Sort manager / Filter panel cells(SSOT,2026-05-23 deep-audit Phase A.4 Decision 2 codify per user verbatimใๆฑบ็ญไบ็
งไฝ ๅปบ่ญฐๅใ+ใ็ขบไฟๆSSOTๆ็ฐกๆฝใ)
|
|
60
|
+
Consumer:data-table-sort-manager.tsx / data-table-filter-panel.tsx
|
|
61
|
+
ไธ density-scale(panels ๆฏ floating layout,ไธ่ฉฒ่ทๅฏๅบฆ่ตฐ)
|
|
62
|
+
Naming aligned to family `--<component>-<part>-<size>`(per --field-height-* / --table-row-* / --tab-height-* precedent)*/
|
|
63
|
+
--data-table-sort-panel-width: 30rem; /* 480px โ sort manager root container width */
|
|
64
|
+
--data-table-filter-field-width: 10rem; /* 160px โ filter cell column selector(flat + nested ๅ width) */
|
|
65
|
+
--data-table-filter-op-width: 7.5rem; /* 120px โ filter cell operator selector(when value cell exists) */
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-ui-size="lg"],
|
|
69
|
+
[data-density="lg"] {
|
|
70
|
+
--field-height-sm: 2rem; /* 32px */
|
|
71
|
+
--field-height-md: 2.25rem; /* 36px */
|
|
72
|
+
--field-height-lg: 2.5rem; /* 40px */
|
|
73
|
+
|
|
74
|
+
--table-row-sm: 2.5rem; /* 40px */
|
|
75
|
+
--table-row-md: 3rem; /* 48px */
|
|
76
|
+
--table-row-lg: 3.5rem; /* 56px */
|
|
77
|
+
|
|
78
|
+
--tab-height-sm: 2.5rem; /* 40px */
|
|
79
|
+
--tab-height-md: 3rem; /* 48px */
|
|
80
|
+
--tab-height-lg: 3.5rem; /* 56px */
|
|
81
|
+
|
|
82
|
+
--chrome-header-height: 3.5rem; /* 56px(lg density) */
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* 2026-04-22:md reset selector โ ็ถ็ฅๅ
ๅฑค็ด(e.g. html[data-density="lg"])ๅทฒ cascading
|
|
86
|
+
lg overrides ไธไพ,subtree ๅ
ไปถ(Popover / DropdownMenu / Tooltip ็ญ)ๅฎฃๅ `data-density="md"`
|
|
87
|
+
ๆ `data-ui-size="md"` ๆๅฟ
้ ่ฝ reset ๅ md default,ๅฆๅ Portal ้้ธ + cascading
|
|
88
|
+
ๆ่ฎ lock md ๅคฑๆ(Meta-Pattern M3 Portal subtree context drift ้ก)ใ */
|
|
89
|
+
[data-ui-size="md"],
|
|
90
|
+
[data-density="md"] {
|
|
91
|
+
--field-height-sm: 1.75rem; /* 28px โ md default */
|
|
92
|
+
--field-height-md: 2rem; /* 32px โ md default */
|
|
93
|
+
--field-height-lg: 2.25rem; /* 36px โ md default */
|
|
94
|
+
|
|
95
|
+
--table-row-sm: 2rem; /* 32px */
|
|
96
|
+
--table-row-md: 2.5rem; /* 40px */
|
|
97
|
+
--table-row-lg: 3rem; /* 48px */
|
|
98
|
+
|
|
99
|
+
--tab-height-sm: 2rem; /* 32px */
|
|
100
|
+
--tab-height-md: 2.5rem; /* 40px */
|
|
101
|
+
--tab-height-lg: 3rem; /* 48px */
|
|
102
|
+
|
|
103
|
+
--tree-indent-sm: 1.5rem; /* 24px โ md default */
|
|
104
|
+
--tree-indent-md: 1.5rem; /* 24px โ md default */
|
|
105
|
+
--tree-indent-lg: 1.75rem; /* 28px โ md default */
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
/* โโ Tailwind Theme Bridge โโ
|
|
110
|
+
ๆฉๆฅๆ spacing utility๏ผ่ฎ h-field-md / h-table-row-lg ็ญ class ๅฏ็จ */
|
|
111
|
+
@theme inline {
|
|
112
|
+
--spacing-field-xs: var(--field-height-xs);
|
|
113
|
+
--spacing-field-sm: var(--field-height-sm);
|
|
114
|
+
--spacing-field-md: var(--field-height-md);
|
|
115
|
+
--spacing-field-lg: var(--field-height-lg);
|
|
116
|
+
--spacing-table-row-sm: var(--table-row-sm);
|
|
117
|
+
--spacing-table-row-md: var(--table-row-md);
|
|
118
|
+
--spacing-table-row-lg: var(--table-row-lg);
|
|
119
|
+
--spacing-tab-sm: var(--tab-height-sm);
|
|
120
|
+
--spacing-tab-md: var(--tab-height-md);
|
|
121
|
+
--spacing-tab-lg: var(--tab-height-lg);
|
|
122
|
+
--spacing-tree-indent-sm: var(--tree-indent-sm);
|
|
123
|
+
--spacing-tree-indent-md: var(--tree-indent-md);
|
|
124
|
+
--spacing-tree-indent-lg: var(--tree-indent-lg);
|
|
125
|
+
}
|