@chotot/clad-ui 3.0.0 → 3.1.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.
Files changed (264) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +9 -9
  3. package/dist/{chunk-Bmb41Sf3.cjs → _virtual/_rolldown/runtime.cjs} +1 -1
  4. package/dist/brand/ChototLogoText.cjs +1 -0
  5. package/dist/brand/ChototLogoText.es.js +15 -0
  6. package/dist/brand/CtC2C.cjs +1 -0
  7. package/dist/brand/CtC2C.es.js +18 -0
  8. package/dist/brand/CtProperty.cjs +1 -0
  9. package/dist/brand/CtProperty.es.js +204 -0
  10. package/dist/brand/CtVehicle.cjs +1 -0
  11. package/dist/brand/CtVehicle.es.js +70 -0
  12. package/dist/brand/Tot.cjs +1 -0
  13. package/dist/brand/Tot.es.js +17 -0
  14. package/dist/components/Announcer/Announcer.cjs +1 -0
  15. package/dist/components/Announcer/Announcer.es.js +100 -0
  16. package/dist/components/Announcer/announcer.styles.cjs +1 -0
  17. package/dist/components/Announcer/announcer.styles.es.js +24 -0
  18. package/dist/components/Badge/Badge.cjs +1 -0
  19. package/dist/components/Badge/Badge.es.js +83 -0
  20. package/dist/components/Badge/badge.styles.cjs +1 -0
  21. package/dist/components/Badge/badge.styles.es.js +83 -0
  22. package/dist/components/Box/Box.cjs +1 -0
  23. package/dist/components/Box/Box.es.js +72 -0
  24. package/dist/components/Breadcrumbs/BreadcrumbItem.cjs +1 -0
  25. package/dist/components/Breadcrumbs/BreadcrumbItem.es.js +17 -0
  26. package/dist/components/Breadcrumbs/Breadcrumbs.cjs +1 -0
  27. package/dist/components/Breadcrumbs/Breadcrumbs.es.js +44 -0
  28. package/dist/components/Breadcrumbs/breadcrumbs.styles.cjs +1 -0
  29. package/dist/components/Breadcrumbs/breadcrumbs.styles.es.js +5 -0
  30. package/dist/components/Button/Button.cjs +1 -0
  31. package/dist/components/Button/Button.es.js +41 -0
  32. package/dist/components/Button/ButtonLink.cjs +1 -0
  33. package/dist/components/Button/ButtonLink.es.js +5 -0
  34. package/dist/components/Button/GhostButton.cjs +1 -0
  35. package/dist/components/Button/GhostButton.es.js +25 -0
  36. package/dist/components/Button/IconButton.cjs +1 -0
  37. package/dist/components/Button/IconButton.es.js +13 -0
  38. package/dist/components/Button/button.styles.cjs +1 -0
  39. package/dist/components/Button/button.styles.es.js +100 -0
  40. package/dist/components/Checkbox/Checkbox.cjs +1 -0
  41. package/dist/components/Checkbox/Checkbox.es.js +43 -0
  42. package/dist/components/Checkbox/checkbox.styles.cjs +1 -0
  43. package/dist/components/Checkbox/checkbox.styles.es.js +15 -0
  44. package/dist/components/Chip/Chip.cjs +1 -0
  45. package/dist/components/Chip/Chip.es.js +35 -0
  46. package/dist/components/Chip/chip.styles.cjs +1 -0
  47. package/dist/components/Chip/chip.styles.es.js +33 -0
  48. package/dist/components/CurrencyInput/CurrencyInput.cjs +1 -0
  49. package/dist/components/CurrencyInput/CurrencyInput.es.js +142 -0
  50. package/dist/components/CurrencyInput/currency-input.styles.cjs +1 -0
  51. package/dist/components/CurrencyInput/currency-input.styles.es.js +13 -0
  52. package/dist/components/CurrencyInput/utils.cjs +1 -0
  53. package/dist/components/CurrencyInput/utils.es.js +30 -0
  54. package/dist/components/DatePicker/DatePicker.cjs +1 -0
  55. package/dist/components/DatePicker/DatePicker.es.js +354 -0
  56. package/dist/components/DatePicker/DateTimePicker.cjs +1 -0
  57. package/dist/components/DatePicker/DateTimePicker.es.js +416 -0
  58. package/dist/components/DatePicker/date-picker.styles.cjs +1 -0
  59. package/dist/components/DatePicker/date-picker.styles.es.js +8 -0
  60. package/dist/components/DatePicker/date-time-picker.styles.cjs +1 -0
  61. package/dist/components/DatePicker/date-time-picker.styles.es.js +8 -0
  62. package/dist/components/DatePicker/index.d.ts +2 -1
  63. package/dist/components/DatePicker/types.cjs +1 -0
  64. package/dist/components/DatePicker/types.es.js +6 -0
  65. package/dist/components/Drawer/Drawer.cjs +1 -0
  66. package/dist/components/Drawer/Drawer.es.js +407 -0
  67. package/dist/components/Dropdown/Dropdown.cjs +1 -0
  68. package/dist/components/Dropdown/Dropdown.es.js +145 -0
  69. package/dist/components/Dropdown/dropdown.styles.cjs +1 -0
  70. package/dist/components/Dropdown/dropdown.styles.es.js +12 -0
  71. package/dist/components/EmptyState/EmptyState.cjs +2 -0
  72. package/dist/components/EmptyState/EmptyState.es.js +114 -0
  73. package/dist/components/EmptyState/empty-state.styles.cjs +1 -0
  74. package/dist/components/EmptyState/empty-state.styles.es.js +5 -0
  75. package/dist/components/Grid/Col.cjs +1 -0
  76. package/dist/components/Grid/Col.es.js +37 -0
  77. package/dist/components/Grid/Grid.cjs +1 -0
  78. package/dist/components/Grid/Grid.es.js +66 -0
  79. package/dist/components/Input/Input.cjs +1 -0
  80. package/dist/components/Input/Input.es.js +122 -0
  81. package/dist/components/Input/input.styles.cjs +1 -0
  82. package/dist/components/Input/input.styles.es.js +14 -0
  83. package/dist/components/InputGroup/InputGroup.cjs +1 -0
  84. package/dist/components/InputGroup/InputGroup.es.js +16 -0
  85. package/dist/components/InputGroup/input-group.styles.cjs +1 -0
  86. package/dist/components/InputGroup/input-group.styles.es.js +12 -0
  87. package/dist/components/LegacyDialog/DialogMainIcon.cjs +1 -0
  88. package/dist/components/LegacyDialog/DialogMainIcon.es.js +52 -0
  89. package/dist/components/LegacyDialog/LegacyDialog.cjs +1 -0
  90. package/dist/components/LegacyDialog/LegacyDialog.es.js +54 -0
  91. package/dist/components/LegacyPopup/LegacyPopup.cjs +1 -0
  92. package/dist/components/LegacyPopup/LegacyPopup.es.js +72 -0
  93. package/dist/components/MultiSearchDropdown/MultiSearchDropdown.cjs +1 -0
  94. package/dist/components/MultiSearchDropdown/MultiSearchDropdown.es.js +215 -0
  95. package/dist/components/MultiSearchDropdown/multi-search-dropdown.styles.cjs +1 -0
  96. package/dist/components/MultiSearchDropdown/multi-search-dropdown.styles.es.js +12 -0
  97. package/dist/components/Pagination/PageItem.cjs +1 -0
  98. package/dist/components/Pagination/PageItem.es.js +20 -0
  99. package/dist/components/Pagination/Pagination.cjs +1 -0
  100. package/dist/components/Pagination/Pagination.es.js +84 -0
  101. package/dist/components/Pagination/pagination.styles.cjs +1 -0
  102. package/dist/components/Pagination/pagination.styles.es.js +15 -0
  103. package/dist/components/Pagination/types.d.ts +1 -1
  104. package/dist/components/Popover/Popover.cjs +1 -0
  105. package/dist/components/Popover/Popover.es.js +54 -0
  106. package/dist/components/Popover/popover.styles.cjs +1 -0
  107. package/dist/components/Popover/popover.styles.es.js +5 -0
  108. package/dist/components/Popup/Popup.cjs +1 -0
  109. package/dist/components/Popup/Popup.es.js +148 -0
  110. package/dist/components/RadioButton/RadioButton.cjs +1 -0
  111. package/dist/components/RadioButton/RadioButton.es.js +61 -0
  112. package/dist/components/RadioButton/radio-button.styles.cjs +1 -0
  113. package/dist/components/RadioButton/radio-button.styles.es.js +15 -0
  114. package/dist/components/RangeInput/RangeInput.cjs +1 -0
  115. package/dist/components/RangeInput/RangeInput.es.js +32 -0
  116. package/dist/components/RangeInput/range-input.styles.cjs +1 -0
  117. package/dist/components/RangeInput/range-input.styles.es.js +5 -0
  118. package/dist/components/RowItem/RowItem.cjs +1 -0
  119. package/dist/components/RowItem/RowItem.es.js +56 -0
  120. package/dist/components/RowItem/rowitem.styles.cjs +1 -0
  121. package/dist/components/RowItem/rowitem.styles.es.js +23 -0
  122. package/dist/components/SearchInput/SearchInput.cjs +1 -0
  123. package/dist/components/SearchInput/SearchInput.es.js +129 -0
  124. package/dist/components/SearchInput/search-input.styles.cjs +1 -0
  125. package/dist/components/SearchInput/search-input.styles.es.js +12 -0
  126. package/dist/components/Searchbar/Searchbar.cjs +1 -0
  127. package/dist/components/Searchbar/Searchbar.es.js +51 -0
  128. package/dist/components/Searchbar/searchbar.styles.cjs +1 -0
  129. package/dist/components/Searchbar/searchbar.styles.es.js +5 -0
  130. package/dist/components/ShapeIcon/ShapeIcon.cjs +1 -0
  131. package/dist/components/ShapeIcon/ShapeIcon.es.js +22 -0
  132. package/dist/components/ShapeIcon/shape-icon.styles.cjs +1 -0
  133. package/dist/components/ShapeIcon/shape-icon.styles.es.js +65 -0
  134. package/dist/components/Slider/Slider.cjs +1 -0
  135. package/dist/components/Slider/Slider.es.js +169 -0
  136. package/dist/components/Slider/slider.styles.cjs +1 -0
  137. package/dist/components/Slider/slider.styles.es.js +5 -0
  138. package/dist/components/Snack/Snack.cjs +1 -0
  139. package/dist/components/Snack/Snack.es.js +69 -0
  140. package/dist/components/Snack/snack.styles.cjs +1 -0
  141. package/dist/components/Snack/snack.styles.es.js +13 -0
  142. package/dist/components/Tabs/Tab.cjs +1 -0
  143. package/dist/components/Tabs/Tab.es.js +42 -0
  144. package/dist/components/Tabs/Tabs.cjs +1 -0
  145. package/dist/components/Tabs/Tabs.es.js +115 -0
  146. package/dist/components/Tabs/tabs.styles.cjs +1 -0
  147. package/dist/components/Tabs/tabs.styles.es.js +33 -0
  148. package/dist/components/TagCloud/TagCloud.cjs +1 -0
  149. package/dist/components/TagCloud/TagCloud.d.ts +1 -1
  150. package/dist/components/TagCloud/TagCloud.es.js +48 -0
  151. package/dist/components/TagCloud/tagcloud.styles.cjs +1 -0
  152. package/dist/components/TagCloud/tagcloud.styles.es.js +12 -0
  153. package/dist/components/TagCloud/types.d.ts +5 -0
  154. package/dist/components/TextArea/TextArea.cjs +1 -0
  155. package/dist/components/TextArea/TextArea.es.js +104 -0
  156. package/dist/components/TextArea/text-area.styles.cjs +1 -0
  157. package/dist/components/TextArea/text-area.styles.es.js +13 -0
  158. package/dist/components/TextLabel/TextLabel.cjs +1 -0
  159. package/dist/components/TextLabel/TextLabel.es.js +28 -0
  160. package/dist/components/TextLabel/textlabel.styles.cjs +1 -0
  161. package/dist/components/TextLabel/textlabel.styles.es.js +29 -0
  162. package/dist/components/ToggleSwitch/ToggleSwitch.cjs +1 -0
  163. package/dist/components/ToggleSwitch/ToggleSwitch.es.js +37 -0
  164. package/dist/components/ToggleSwitch/toggle-switch.styles.cjs +1 -0
  165. package/dist/components/ToggleSwitch/toggle-switch.styles.es.js +24 -0
  166. package/dist/components/Tooltip/Tooltip.cjs +1 -0
  167. package/dist/components/Tooltip/Tooltip.es.js +103 -0
  168. package/dist/components/Tooltip/tooltip.styles.cjs +1 -0
  169. package/dist/components/Tooltip/tooltip.styles.es.js +12 -0
  170. package/dist/forge/index.cjs +1 -0
  171. package/dist/icons.cjs +1 -1
  172. package/dist/index.cjs +1 -0
  173. package/dist/index.es.js +82 -0
  174. package/dist/styles.css +1 -1
  175. package/dist/types/index.cjs +1 -0
  176. package/dist/types/index.es.js +7 -0
  177. package/dist/typography/BodyAnnotation.cjs +1 -0
  178. package/dist/typography/BodyAnnotation.es.js +10 -0
  179. package/dist/typography/BodyCaption.cjs +1 -0
  180. package/dist/typography/BodyCaption.es.js +10 -0
  181. package/dist/typography/BodyPage.cjs +1 -0
  182. package/dist/typography/BodyPage.es.js +10 -0
  183. package/dist/typography/BodySection.cjs +1 -0
  184. package/dist/typography/BodySection.es.js +10 -0
  185. package/dist/typography/DisplayAnnotation.cjs +1 -0
  186. package/dist/typography/DisplayAnnotation.es.js +10 -0
  187. package/dist/typography/DisplayCaption.cjs +1 -0
  188. package/dist/typography/DisplayCaption.es.js +10 -0
  189. package/dist/typography/DisplayPage.cjs +1 -0
  190. package/dist/typography/DisplayPage.es.js +10 -0
  191. package/dist/typography/DisplayPrice.cjs +1 -0
  192. package/dist/typography/DisplayPrice.es.js +10 -0
  193. package/dist/typography/DisplaySection.cjs +1 -0
  194. package/dist/typography/DisplaySection.es.js +10 -0
  195. package/dist/typography/HeaderAnnotation.cjs +1 -0
  196. package/dist/typography/HeaderAnnotation.es.js +10 -0
  197. package/dist/typography/HeaderCaption.cjs +1 -0
  198. package/dist/typography/HeaderCaption.es.js +10 -0
  199. package/dist/typography/HeaderPage.cjs +1 -0
  200. package/dist/typography/HeaderPage.es.js +10 -0
  201. package/dist/typography/HeaderSection.cjs +1 -0
  202. package/dist/typography/HeaderSection.es.js +10 -0
  203. package/dist/typography/LabelAnnotation.cjs +1 -0
  204. package/dist/typography/LabelAnnotation.es.js +10 -0
  205. package/dist/typography/LabelCaption.cjs +1 -0
  206. package/dist/typography/LabelCaption.es.js +10 -0
  207. package/dist/typography/LabelPage.cjs +1 -0
  208. package/dist/typography/LabelPage.es.js +10 -0
  209. package/dist/typography/LabelSection.cjs +1 -0
  210. package/dist/typography/LabelSection.es.js +10 -0
  211. package/dist/typography/NoteCaption.cjs +1 -0
  212. package/dist/typography/NoteCaption.es.js +10 -0
  213. package/dist/typography/NotePage.cjs +1 -0
  214. package/dist/typography/NotePage.es.js +10 -0
  215. package/dist/typography/NoteSection.cjs +1 -0
  216. package/dist/typography/NoteSection.es.js +10 -0
  217. package/dist/typography/TaglineAnnotation.cjs +1 -0
  218. package/dist/typography/TaglineAnnotation.es.js +10 -0
  219. package/dist/typography/TaglineCaption.cjs +1 -0
  220. package/dist/typography/TaglineCaption.es.js +10 -0
  221. package/dist/typography/TaglineFootext.cjs +1 -0
  222. package/dist/typography/TaglineFootext.es.js +10 -0
  223. package/dist/typography/TaglineSection.cjs +1 -0
  224. package/dist/typography/TaglineSection.es.js +10 -0
  225. package/dist/utils/bundleCss.cjs +1 -1
  226. package/dist/utils/cleanHtml.cjs +1 -0
  227. package/dist/utils/cleanHtml.es.js +6 -0
  228. package/dist/utils/cn.cjs +1 -0
  229. package/dist/utils/cn.es.js +59 -0
  230. package/dist/utils/createUniversalPortal.cjs +1 -0
  231. package/dist/utils/createUniversalPortal.es.js +17 -0
  232. package/dist/utils/floating.cjs +1 -0
  233. package/dist/utils/floating.es.js +374 -0
  234. package/dist/utils/getBreakpointsValues.cjs +1 -0
  235. package/dist/utils/getBreakpointsValues.es.js +27 -0
  236. package/dist/utils/sizes.cjs +1 -0
  237. package/dist/utils/sizes.es.js +30 -0
  238. package/dist/utils/themeTokens.cjs +1 -0
  239. package/dist/utils/themeTokens.es.js +319 -0
  240. package/dist/utils/useBodyScrollLock.cjs +1 -0
  241. package/dist/utils/useBodyScrollLock.es.js +24 -0
  242. package/dist/utils/useScrollTop.cjs +1 -0
  243. package/dist/utils/useScrollTop.es.js +9 -0
  244. package/package.json +6 -6
  245. package/scripts/postinstall.cjs +34 -6
  246. package/skills/clad-ui/SKILL.md +17 -2
  247. package/skills/clad-ui/references/components-display-layout.md +1 -0
  248. package/skills/clad-ui-feedback/SKILL.md +1 -1
  249. package/skills/migrate-clad-ui-v3/SKILL.md +4 -2
  250. package/skills/migrate-clad-ui-v3/references/component-api-changes.md +42 -0
  251. package/skills/migrate-clad-ui-v3/references/token-and-linaria-mapping.md +4 -1
  252. package/src/styles/base/base.css +1 -0
  253. package/src/styles/components/button.css +25 -0
  254. package/src/styles/components/chip.css +35 -0
  255. package/src/styles/components/drawer.css +9 -0
  256. package/src/styles/preset.css +1 -1
  257. package/dist/clad-ui.cjs +0 -2
  258. package/dist/clad-ui.d.ts +0 -2
  259. package/dist/clad-ui.es.js +0 -9791
  260. package/dist/components/Drawer/Drawer.pw.fixtures.d.ts +0 -9
  261. package/dist/components/Grid/Grid.pw.fixtures.d.ts +0 -3
  262. package/dist/components/Popover/Popover.pw.fixtures.d.ts +0 -6
  263. package/dist/components/Popup/Popup.pw.fixtures.d.ts +0 -5
  264. package/dist/components/Tooltip/Tooltip.pw.fixtures.d.ts +0 -1
@@ -0,0 +1,319 @@
1
+ //#region src/utils/themeTokens.ts
2
+ var e = {
3
+ none: "0px",
4
+ xxxs: "2px",
5
+ xxs: "4px",
6
+ xs: "8px",
7
+ sm: "12px",
8
+ md: "16px",
9
+ mdl: "20px",
10
+ lg: "24px",
11
+ xl: "32px",
12
+ xxl: "48px",
13
+ xxxl: "64px",
14
+ xxxxl: "96px",
15
+ xxxxxl: "128px"
16
+ }, t = {
17
+ vW: "100vw",
18
+ vH: "100vh",
19
+ quarter: "25%",
20
+ third: "33.33%",
21
+ half: "50%",
22
+ twoThird: "66.66%",
23
+ threeQuarter: "75%",
24
+ full: "100%",
25
+ xxxs: "12px",
26
+ xxs: "16px",
27
+ xs: "20px",
28
+ sm: "24px",
29
+ md: "28px",
30
+ lg: "32px",
31
+ lxl: "40px",
32
+ xl: "48px",
33
+ xxl: "64px",
34
+ xxxl: "80px",
35
+ xxxxl: "96px",
36
+ xxxxxl: "128px",
37
+ buttonMaxWidth: "352px",
38
+ $sm: "236px",
39
+ $md: "480px",
40
+ $lg: "636px",
41
+ $xl: "864px"
42
+ }, n = {
43
+ none: "0px",
44
+ sm: "1px",
45
+ md: "2px",
46
+ lg: "3px",
47
+ xl: "4px",
48
+ strokeDivider: "1px",
49
+ strokeAction: "2px",
50
+ strokeEmphasize: "3px"
51
+ }, r = {
52
+ none: "0",
53
+ xs: "2px",
54
+ sm: "4px",
55
+ $sm: "6px",
56
+ md: "8px",
57
+ lg: "12px",
58
+ xl: "20px",
59
+ pill: "9999px",
60
+ circle: "100%",
61
+ adSmall: "var(--radius-ad-small)",
62
+ ad: "var(--radius-ad)",
63
+ cardSmall: "var(--radius-card-small)",
64
+ card: "var(--radius-card)",
65
+ decoration: "var(--radius-decoration)",
66
+ modal: "var(--radius-modal)"
67
+ }, i = {
68
+ none: "none",
69
+ sm: "0px 2px 4px rgba(0,0,0,.5)",
70
+ md: "0px 0px 8px rgba(0,0,0,.3)",
71
+ lg: "2px 2px 14px rgba(0,0,0,.3)",
72
+ below: "var(--shadow-below)",
73
+ floating: "var(--shadow-floating)"
74
+ }, a = {
75
+ gray0: "var(--color-gray0)",
76
+ gray25: "var(--color-gray25)",
77
+ gray50: "var(--color-gray50)",
78
+ gray75: "var(--color-gray75)",
79
+ gray100: "var(--color-gray100)",
80
+ gray200: "var(--color-gray200)",
81
+ gray300: "var(--color-gray300)",
82
+ gray400: "var(--color-gray400)",
83
+ gray500: "var(--color-gray500)",
84
+ gray600: "var(--color-gray600)",
85
+ gray700: "var(--color-gray700)",
86
+ gray800: "var(--color-gray800)",
87
+ gray900: "var(--color-gray900)",
88
+ red50: "var(--color-red50)",
89
+ red75: "var(--color-red75)",
90
+ red100: "var(--color-red100)",
91
+ red200: "var(--color-red200)",
92
+ red300: "var(--color-red300)",
93
+ red400: "var(--color-red400)",
94
+ red500: "var(--color-red500)",
95
+ red600: "var(--color-red600)",
96
+ red700: "var(--color-red700)",
97
+ red800: "var(--color-red800)",
98
+ red900: "var(--color-red900)",
99
+ orange50: "var(--color-orange50)",
100
+ orange75: "var(--color-orange75)",
101
+ orange100: "var(--color-orange100)",
102
+ orange200: "var(--color-orange200)",
103
+ orange300: "var(--color-orange300)",
104
+ orange400: "var(--color-orange400)",
105
+ orange500: "var(--color-orange500)",
106
+ orange600: "var(--color-orange600)",
107
+ orange700: "var(--color-orange700)",
108
+ orange800: "var(--color-orange800)",
109
+ orange900: "var(--color-orange900)",
110
+ yellow50: "var(--color-yellow50)",
111
+ yellow75: "var(--color-yellow75)",
112
+ yellow100: "var(--color-yellow100)",
113
+ yellow200: "var(--color-yellow200)",
114
+ yellow300: "var(--color-yellow300)",
115
+ yellow400: "var(--color-yellow400)",
116
+ yellow500: "var(--color-yellow500)",
117
+ yellow600: "var(--color-yellow600)",
118
+ yellow700: "var(--color-yellow700)",
119
+ yellow800: "var(--color-yellow800)",
120
+ yellow900: "var(--color-yellow900)",
121
+ green50: "var(--color-green50)",
122
+ green75: "var(--color-green75)",
123
+ green100: "var(--color-green100)",
124
+ green200: "var(--color-green200)",
125
+ green300: "var(--color-green300)",
126
+ green400: "var(--color-green400)",
127
+ green500: "var(--color-green500)",
128
+ green600: "var(--color-green600)",
129
+ green700: "var(--color-green700)",
130
+ green800: "var(--color-green800)",
131
+ green900: "var(--color-green900)",
132
+ blue50: "var(--color-blue50)",
133
+ blue75: "var(--color-blue75)",
134
+ blue100: "var(--color-blue100)",
135
+ blue200: "var(--color-blue200)",
136
+ blue300: "var(--color-blue300)",
137
+ blue400: "var(--color-blue400)",
138
+ blue500: "var(--color-blue500)",
139
+ blue600: "var(--color-blue600)",
140
+ blue700: "var(--color-blue700)",
141
+ blue800: "var(--color-blue800)",
142
+ blue900: "var(--color-blue900)",
143
+ vertical50: "var(--color-vertical50)",
144
+ vertical75: "var(--color-vertical75)",
145
+ vertical100: "var(--color-vertical100)",
146
+ vertical200: "var(--color-vertical200)",
147
+ vertical300: "var(--color-vertical300)",
148
+ vertical400: "var(--color-vertical400)",
149
+ vertical500: "var(--color-vertical500)",
150
+ vertical600: "var(--color-vertical600)",
151
+ vertical700: "var(--color-vertical700)",
152
+ vertical800: "var(--color-vertical800)",
153
+ vertical900: "var(--color-vertical900)",
154
+ text: "var(--color-gray900)",
155
+ textLighter: "var(--color-gray400)",
156
+ link: "var(--color-blue500)",
157
+ linkHover: "var(--color-blue400)",
158
+ linkActive: "var(--color-blue600)",
159
+ border: "var(--color-gray200)",
160
+ line: "var(--color-gray75)",
161
+ background: "var(--color-gray50)",
162
+ highlight: "var(--color-yellow75)",
163
+ muted: "var(--color-gray200)",
164
+ primary: "var(--color-orange300)",
165
+ primaryDark: "var(--color-orange400)",
166
+ primaryLight: "var(--color-orange200)",
167
+ primaryBG: "var(--color-orange75)",
168
+ primaryBGLight: "var(--color-orange50)",
169
+ secondary: "var(--color-green400)",
170
+ secondaryDark: "var(--color-green500)",
171
+ secondaryLight: "var(--color-green300)",
172
+ secondaryBG: "var(--color-green75)",
173
+ secondaryBGLight: "var(--color-green50)",
174
+ accent: "var(--color-orange300)",
175
+ accentDark: "var(--color-orange400)",
176
+ accentLight: "var(--color-orange200)",
177
+ accentBG: "var(--color-orange75)",
178
+ accentBGLight: "var(--color-orange50)",
179
+ neutral: "var(--color-gray200)",
180
+ neutralDark: "var(--color-gray400)",
181
+ neutralLight: "var(--color-gray75)",
182
+ neutralBG: "var(--color-gray50)",
183
+ neutralBGLight: "var(--color-gray50)",
184
+ critical: "var(--color-red500)",
185
+ criticalDark: "var(--color-red400)",
186
+ criticalLight: "var(--color-red600)",
187
+ criticalBG: "var(--color-red75)",
188
+ criticalBGLight: "var(--color-red50)",
189
+ info: "var(--color-blue400)",
190
+ infoDark: "var(--color-blue500)",
191
+ infoLight: "var(--color-blue300)",
192
+ infoBG: "var(--color-blue75)",
193
+ infoBGLight: "var(--color-blue50)",
194
+ positive: "var(--color-green400)",
195
+ positiveDark: "var(--color-green500)",
196
+ positiveLight: "var(--color-green300)",
197
+ positiveBG: "var(--color-green75)",
198
+ positiveBGLight: "var(--color-green50)",
199
+ caution: "var(--color-yellow200)",
200
+ cautionDark: "var(--color-yellow300)",
201
+ cautionLight: "var(--color-yellow100)",
202
+ cautionBG: "var(--color-yellow75)",
203
+ cautionBGLight: "var(--color-yellow50)",
204
+ negative: "var(--color-red500)",
205
+ notice: "",
206
+ backgroundApp: "var(--color-background-app)",
207
+ backgroundBrand: "var(--color-background-brand)",
208
+ backgroundBrandLight: "var(--color-background-brand-light)",
209
+ backgroundBrandLightSecondary: "var(--color-background-brand-light-secondary)",
210
+ backgroundInfo: "var(--color-background-info)",
211
+ backgroundInfoLight: "var(--color-background-info-light)",
212
+ backgroundSuccess: "var(--color-background-success)",
213
+ backgroundSuccessLight: "var(--color-background-success-light)",
214
+ backgroundError: "var(--color-background-error)",
215
+ backgroundErrorLight: "var(--color-background-error-light)",
216
+ backgroundWarning: "var(--color-background-warning)",
217
+ backgroundWarningLight: "var(--color-background-warning-light)",
218
+ backgroundAppwrapper: "var(--color-background-appwrapper)",
219
+ backgroundPrimary: "var(--color-background-primary)",
220
+ backgroundInverted: "var(--color-background-inverted)",
221
+ backgroundSecondary: "var(--color-background-secondary)",
222
+ backgroundOverlay: "var(--color-background-overlay)",
223
+ backgroundOverlayInverted: "var(--color-background-overlay-inverted)",
224
+ backgroundTertiary: "var(--color-background-tertiary)",
225
+ backgroundChotot: "var(--color-background-chotot)",
226
+ backgroundChototLight: "var(--color-background-chotot-light)",
227
+ backgroundDisabled: "var(--color-background-disabled)",
228
+ backgroundDisable: "var(--color-background-disable)",
229
+ textBrand: "var(--color-text-brand)",
230
+ textPrimary: "var(--color-text-primary)",
231
+ textSecondary: "var(--color-text-secondary)",
232
+ textTertiary: "var(--color-text-tertiary)",
233
+ textLink: "var(--color-text-link)",
234
+ textInfo: "var(--color-text-info)",
235
+ textSuccess: "var(--color-text-success)",
236
+ textError: "var(--color-text-error)",
237
+ textWarning: "var(--color-text-warning)",
238
+ textDisabled: "var(--color-text-disabled)",
239
+ textBlank: "var(--color-text-blank)",
240
+ textOverlay: "var(--color-text-overlay)",
241
+ textOverlaySecondary: "var(--color-text-overlay-secondary)",
242
+ textOnBackground: "var(--color-text-on-background)",
243
+ textChotot: "var(--color-text-chotot)",
244
+ buttonPrimary: "var(--color-button-primary)",
245
+ buttonNeutral: "var(--color-button-neutral)",
246
+ buttonInfo: "var(--color-button-info)",
247
+ buttonSuccess: "var(--color-button-success)",
248
+ buttonError: "var(--color-button-error)",
249
+ buttonChotot: "var(--color-button-chotot)",
250
+ buttonBlank: "var(--color-button-blank)",
251
+ buttonDisabled: "var(--color-button-disabled)",
252
+ buttonAppwrapper: "var(--color-button-appwrapper)",
253
+ buttonSecondary: "var(--color-button-secondary)",
254
+ buttonTonalInfo: "var(--color-button-tonal-info)",
255
+ buttonTonalSuccess: "var(--color-button-tonal-success)",
256
+ buttonTonalError: "var(--color-button-tonal-error)",
257
+ buttonTonalNeutral: "var(--color-button-tonal-neutral)",
258
+ skeletonBackground: "var(--color-skeleton-background)",
259
+ skeletonItem: "var(--color-skeleton-item)",
260
+ logoPrimary: "var(--color-logo-primary)",
261
+ logoSecondary: "var(--color-logo-secondary)",
262
+ logoOnBlack: "var(--color-logo-on-black)",
263
+ borderThin: "var(--color-border-thin)",
264
+ borderRegular: "var(--color-border-regular)",
265
+ borderBold: "var(--color-border-bold)",
266
+ borderActive: "var(--color-border-active)",
267
+ borderBlank: "var(--color-border-blank)",
268
+ borderBrand: "var(--color-border-brand)",
269
+ borderInfo: "var(--color-border-info)",
270
+ borderSuccess: "var(--color-border-success)",
271
+ borderError: "var(--color-border-error)",
272
+ borderDisabled: "var(--color-border-disabled)",
273
+ borderBlack: "var(--color-border-black)",
274
+ borderDivider: "var(--color-border-divider)",
275
+ borderOverlay: "var(--color-border-overlay)",
276
+ borderWarning: "var(--color-border-warning)",
277
+ iconBrand: "var(--color-icon-brand)",
278
+ iconPrimary: "var(--color-icon-primary)",
279
+ iconSecondary: "var(--color-icon-secondary)",
280
+ iconTertiary: "var(--color-icon-tertiary)",
281
+ iconBlank: "var(--color-icon-blank)",
282
+ iconInfo: "var(--color-icon-info)",
283
+ iconSuccess: "var(--color-icon-success)",
284
+ iconError: "var(--color-icon-error)",
285
+ iconWarning: "var(--color-icon-warning)",
286
+ iconChotot: "var(--color-icon-chotot)",
287
+ iconChototBold: "var(--color-icon-chotot-bold)",
288
+ iconDisabled: "var(--color-icon-disabled)",
289
+ iconOnBackground: "var(--color-icon-on-background)",
290
+ interactionBrandHover: "var(--color-interaction-brand-hover)",
291
+ interactionBrandPressed: "var(--color-interaction-brand-pressed)",
292
+ interactionBrandLightHover: "var(--color-interaction-brand-light-hover)",
293
+ interactionBrandLightPressed: "var(--color-interaction-brand-light-pressed)",
294
+ interactionInfoHover: "var(--color-interaction-info-hover)",
295
+ interactionInfoPressed: "var(--color-interaction-info-pressed)",
296
+ interactionInfoLightHover: "var(--color-interaction-info-light-hover)",
297
+ interactionInfoLightPressed: "var(--color-interaction-info-light-pressed)",
298
+ interactionSuccessHover: "var(--color-interaction-success-hover)",
299
+ interactionSuccessPressed: "var(--color-interaction-success-pressed)",
300
+ interactionSuccessLightHover: "var(--color-interaction-success-light-hover)",
301
+ interactionSuccessLightPressed: "var(--color-interaction-success-light-pressed)",
302
+ interactionErrorHover: "var(--color-interaction-error-hover)",
303
+ interactionErrorPressed: "var(--color-interaction-error-pressed)",
304
+ interactionErrorLightHover: "var(--color-interaction-error-light-hover)",
305
+ interactionErrorLightPressed: "var(--color-interaction-error-light-pressed)",
306
+ interactionNeutralHover: "var(--color-interaction-neutral-hover)",
307
+ interactionNeutralPressed: "var(--color-interaction-neutral-pressed)",
308
+ interactionNeutralLightHover: "var(--color-interaction-neutral-light-hover)",
309
+ interactionNeutralLightPressed: "var(--color-interaction-neutral-light-pressed)",
310
+ interactionChototHover: "var(--color-interaction-chotot-hover)",
311
+ interactionChototPressed: "var(--color-interaction-chotot-pressed)",
312
+ interactionPrimaryHover: "var(--color-interaction-primary-hover)",
313
+ interactionWarningHover: "var(--color-interaction-warning-hover)",
314
+ interactionWarningPressed: "var(--color-interaction-warning-pressed)",
315
+ interactionWarningLightHover: "var(--color-interaction-warning-light-hover)",
316
+ interactionWarningLightPressed: "var(--color-interaction-warning-light-pressed)"
317
+ };
318
+ //#endregion
319
+ export { n as BORDER_WIDTHS_MAP, a as COLORS_MAP, r as RADII_MAP, i as SHADOWS_MAP, t as SIZES_TOKENS_MAP, e as SPACE_MAP };
@@ -0,0 +1 @@
1
+ "use client";require(`../_virtual/_rolldown/runtime.cjs`);let e=require(`react`);var t=`data-ct-modal-count`,n=`scroll-locked`;function r(r){(0,e.useEffect)(()=>{if(typeof document>`u`)return;let{body:e}=document;if(!e)return;let i=()=>parseInt(e.getAttribute(t)||`0`,10),a=n=>e.setAttribute(t,n.toString());if(r){let t=i()+1;a(t),t===1&&e.classList.add(n)}return()=>{if(r){let r=i(),o=Math.max(0,r-1);a(o),o===0&&(e.classList.remove(n),e.removeAttribute(t))}}},[r])}exports.default=r;
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import { useEffect as e } from "react";
3
+ //#region src/utils/useBodyScrollLock.ts
4
+ var t = "data-ct-modal-count", n = "scroll-locked";
5
+ function r(r) {
6
+ e(() => {
7
+ if (typeof document > "u") return;
8
+ let { body: e } = document;
9
+ if (!e) return;
10
+ let i = () => parseInt(e.getAttribute(t) || "0", 10), a = (n) => e.setAttribute(t, n.toString());
11
+ if (r) {
12
+ let t = i() + 1;
13
+ a(t), t === 1 && e.classList.add(n);
14
+ }
15
+ return () => {
16
+ if (r) {
17
+ let r = i(), o = Math.max(0, r - 1);
18
+ a(o), o === 0 && (e.classList.remove(n), e.removeAttribute(t));
19
+ }
20
+ };
21
+ }, [r]);
22
+ }
23
+ //#endregion
24
+ export { r as default };
@@ -0,0 +1 @@
1
+ "use client";require(`../_virtual/_rolldown/runtime.cjs`);let e=require(`react`);function t(){let[t,n]=(0,e.useState)(0);return[t,{onScroll:e=>n(e.target.scrollTop)}]}exports.default=t;
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import { useState as e } from "react";
3
+ //#region src/utils/useScrollTop.ts
4
+ function t() {
5
+ let [t, n] = e(0);
6
+ return [t, { onScroll: (e) => n(e.target.scrollTop) }];
7
+ }
8
+ //#endregion
9
+ export { t as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chotot/clad-ui",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Classified Ads group (Chotot) design system built on Tailwind CSS v4.",
5
5
  "keywords": [
6
6
  "chotot",
@@ -30,14 +30,14 @@
30
30
  "sideEffects": [
31
31
  "*.css"
32
32
  ],
33
- "main": "./dist/clad-ui.cjs",
34
- "module": "./dist/clad-ui.es.js",
33
+ "main": "./dist/index.cjs",
34
+ "module": "./dist/index.es.js",
35
35
  "types": "./dist/index.d.ts",
36
36
  "exports": {
37
37
  ".": {
38
38
  "types": "./dist/index.d.ts",
39
- "import": "./dist/clad-ui.es.js",
40
- "require": "./dist/clad-ui.cjs"
39
+ "import": "./dist/index.es.js",
40
+ "require": "./dist/index.cjs"
41
41
  },
42
42
  "./styles.css": {
43
43
  "require": "./dist/styles.css",
@@ -110,7 +110,7 @@
110
110
  "publint": "publint",
111
111
  "pw": "playwright test -c playwright-ct.config.ts",
112
112
  "pw:ui": "playwright test -c playwright-ct.config.ts --ui",
113
- "test": "pnpm validate:skills",
113
+ "test": "pnpm validate:skills && node --test test/rsc-contract.spec.mjs",
114
114
  "type-check": "tsc -b tsconfig.build.json",
115
115
  "validate:skills": "intent validate skills"
116
116
  }
@@ -104,9 +104,17 @@ function main() {
104
104
 
105
105
  const onlyBuilt =
106
106
  (consumerPkg.pnpm && consumerPkg.pnpm.onlyBuiltDependencies) || [];
107
- if (Array.isArray(onlyBuilt) && !onlyBuilt.includes(PKG_NAME)) {
107
+ const workspaceYamlPath = path.join(projectRoot, 'pnpm-workspace.yaml');
108
+ const configuredInWorkspaceYaml =
109
+ fs.existsSync(workspaceYamlPath) &&
110
+ fs.readFileSync(workspaceYamlPath, 'utf8').includes(PKG_NAME);
111
+ if (
112
+ Array.isArray(onlyBuilt) &&
113
+ !onlyBuilt.includes(PKG_NAME) &&
114
+ !configuredInWorkspaceYaml
115
+ ) {
108
116
  console.warn(
109
- `[clad-ui] Tip: Add "${PKG_NAME}" to "pnpm.onlyBuiltDependencies" in package.json so pnpm always runs postinstall skill linking.`
117
+ `[clad-ui] Tip: Add "${PKG_NAME}" to "onlyBuiltDependencies" (in pnpm-workspace.yaml or package.json) so pnpm always runs postinstall skill linking.`
110
118
  );
111
119
  }
112
120
  } catch (pkgErr) {
@@ -141,8 +149,19 @@ function main() {
141
149
  const targetSkillsDir = path.join(projectRoot, '.claude', 'skills');
142
150
  fs.mkdirSync(targetSkillsDir, { recursive: true });
143
151
 
152
+ const consumerSkillsRoot = path.join(
153
+ projectRoot,
154
+ 'node_modules',
155
+ '@chotot',
156
+ 'clad-ui',
157
+ 'skills'
158
+ );
159
+
144
160
  for (const dir of skillDirs) {
145
- const sourcePath = path.join(skillsRoot, dir.name);
161
+ const consumerSourcePath = path.join(consumerSkillsRoot, dir.name);
162
+ const preferredSource = fs.existsSync(consumerSourcePath)
163
+ ? consumerSourcePath
164
+ : path.join(skillsRoot, dir.name);
146
165
  const targetLink = path.join(targetSkillsDir, dir.name);
147
166
 
148
167
  try {
@@ -154,7 +173,12 @@ function main() {
154
173
  // targetLink does not exist yet
155
174
  }
156
175
 
157
- fs.symlinkSync(sourcePath, targetLink, 'dir');
176
+ if (process.platform === 'win32') {
177
+ fs.symlinkSync(preferredSource, targetLink, 'junction');
178
+ } else {
179
+ const relativeSource = path.relative(targetSkillsDir, preferredSource);
180
+ fs.symlinkSync(relativeSource, targetLink, 'dir');
181
+ }
158
182
  }
159
183
 
160
184
  console.log(
@@ -163,8 +187,12 @@ function main() {
163
187
  .join(', ')}) -> .claude/skills/`
164
188
  );
165
189
 
166
- const isPostinstall = process.env.npm_lifecycle_event === 'postinstall';
167
- if (!isPostinstall) {
190
+ const lifecycleEvent = process.env.npm_lifecycle_event || '';
191
+ const isLifecycleHook =
192
+ lifecycleEvent === 'postinstall' ||
193
+ lifecycleEvent === 'prepare' ||
194
+ process.argv.includes('--link-only');
195
+ if (!isLifecycleHook) {
168
196
  updateAgentDocs(projectRoot);
169
197
  }
170
198
  } catch (err) {
@@ -5,7 +5,7 @@ metadata:
5
5
  purpose: Build and style React UI using @chotot/clad-ui (Clad UI v3, Tailwind CSS v4) and @chotot/icons. Use when creating or updating UI components, selecting semantic color/typography tokens, wiring forms, modals, drawers, or tabs. Not for migrating legacy @chotot/clad-ui v2 Linaria code, use migrate-clad-ui-v3 instead.
6
6
  type: core
7
7
  library: '@chotot/clad-ui'
8
- library_version: '3.0.0'
8
+ library_version: '3.1.0'
9
9
  sources:
10
10
  - 'carousell/clad-ui:packages/clad-ui/src/**'
11
11
  ---
@@ -48,6 +48,19 @@ Discovery reads (fallback when an edge-case prop or icon name is not in `referen
48
48
  | Inline banner alert with icon and action | `Announcer` |
49
49
  | Raw `<h1>`–`<p>` with manual font sizes/weights | Typography components (`HeaderPage`, `LabelSection`, `BodySection`...) or `text-{header,label,body}-*` |
50
50
 
51
+ ## Typography Hierarchy (24 Components & Utilities)
52
+
53
+ Always compose text using this 6-tier semantic hierarchy instead of raw `text-sm` / `font-bold`:
54
+
55
+ | Tier (Weight / Style) | Components (`@chotot/clad-ui`) | Tailwind Utilities | Typical Role |
56
+ |---|---|---|---|
57
+ | **1. Display** (Bold) | `DisplayPage`, `DisplaySection`, `DisplayCaption`, `DisplayAnnotation`, `DisplayPrice` | `text-display-{page,section,caption,annotation,price}` | Hero headlines, KPI numbers, highlighted listing price (`DisplayPrice`) |
58
+ | **2. Header** (SemiBold) | `HeaderPage`, `HeaderSection`, `HeaderCaption`, `HeaderAnnotation` | `text-header-{page,section,caption,annotation}` | Page (`h1`), modal/drawer, and section (`h2`–`h3`) headings |
59
+ | **3. Label** (Bold) | `LabelPage`, `LabelSection`, `LabelCaption`, `LabelAnnotation` | `text-label-{page,section,caption,annotation}` | Card titles, field/button labels, emphasized inline values |
60
+ | **4. Body** (Regular) | `BodyPage`, `BodySection`, `BodyCaption`, `BodyAnnotation` | `text-body-{page,section,caption,annotation}` | Primary copy, descriptions, list/form content |
61
+ | **5. Note** (Italic) | `NotePage`, `NoteSection`, `NoteCaption` | `text-note-{page,section,caption}` | Secondary hints, disclaimers, timestamps |
62
+ | **6. Tagline** (Medium) | `TaglineSection`, `TaglineCaption`, `TaglineAnnotation`, `TaglineFootext` | `text-tagline-{section,caption,annotation,footext}` | Chips, badges, metadata pills, compact footers |
63
+
51
64
  ---
52
65
 
53
66
  ## Critical API & Event Gotchas
@@ -69,6 +82,8 @@ Discovery reads (fallback when an edge-case prop or icon name is not in `referen
69
82
  - When using legacy `<Drawer>`, passing `title="..."` always renders a header bar. If the child screen renders its own header, omit `title` and pass `isEmptyDrawer`.
70
83
  3. **Icons, `cn` Class Merging & Imports**:
71
84
  - Import components and `cn` (pre-configured `shadcn-ui/cn` class merger aware of Clad UI typography/border/radii/shadow tokens) from `@chotot/clad-ui`, and icons from `@chotot/clad-ui/icons` (`{Name}` and `{Name}Filled`, backed by `@chotot/icons`).
85
+ 4. **React Server Components (RSC) & Next.js App Router**:
86
+ - Display, layout, and SEO navigation components (`Button`, `ButtonLink`, `GhostButton`, `IconButton`, `Breadcrumbs`, `BreadcrumbItem`, `Chip`, `Pagination`, `PageItem`, `Tab`, `Badge`, `TextLabel`, `ShapeIcon`, `EmptyState`, `Box`, `Grid`/`Col`, `InputGroup`, `RangeInput`, all 24 Typography components, Brand logos, `@chotot/clad-ui/icons`, `cn`, and `DateFormat`) are **RSC-native** (0 KB client JS) and support server-only props like `as={Link}` (`next/link`) and `renderPageItem` without adding `'use client'` to parent pages. Interactive form controls and overlays (`Drawer`, `Popup`, `Tabs`, `Dropdown`, `Input`, `Checkbox`, etc.) carry their own module-level `'use client'` boundaries automatically.
72
87
 
73
88
  ---
74
89
 
@@ -78,7 +93,7 @@ Discovery reads (fallback when an edge-case prop or icon name is not in `referen
78
93
  |---|---|
79
94
  | **Tokens** | Bg: `bg-background-{primary,secondary,tertiary,app,brand,brand-light,brand-light-secondary,chotot,info,success,error,warning}` · Text: `text-text-{primary,secondary,tertiary,disabled,blank,brand,on-background,info,success,error,warning}` · Border: `border-border-{divider,thin,regular,bold,active,brand,error,warning}` · Icon: `text-icon-{primary,secondary,tertiary,brand,error,success,warning}` · Typo: `text-{display,header,label,body}-{page,section,caption,annotation}`, `text-tagline-{section,caption,annotation,footext}` · Radius: `rounded-{ad-small,ad,card-small,card,decoration,modal,pill}` · Shadow: `shadow-{below,floating}` |
80
95
  | **Buttons** | `<Button color="primary\|info\|success\|error\|neutral\|tertiary" variant="solid\|outline\|tonal" size="sm\|md\|lg\|xl" icon isLoading as="a">` (also accepts `'small\|medium\|large\|xlarge'`) · Aliases: `IconButton`, `GhostButton`, `ButtonLink` |
81
- | **Chips & Tags** | `<Chip variant="fill\|outline\|ghost" size="sm\|md\|lg" active dropdownIcon icon={…} onClose={(val, e) => …} />` · `<TagCloud options={[{value,label}]} value={v} variant="fill\|outline" multiple maxSelection={n} onChange={e => setV(e.target.value)} />` |
96
+ | **Chips & Tags** | `<Chip variant="fill\|outline\|ghost" size="sm\|md\|lg\|xl" active dropdownIcon icon={…} onClose={(val, e) => …} />` · `<TagCloud options={[{value,label}]} value={v} variant="fill\|outline" size="sm\|md\|lg\|xl" multiple maxSelection={n} onChange={e => setV(e.target.value)} />` |
82
97
  | **Badges & Labels** | `<Badge size="sm\|md\|lg\|dot" label="9+" backgroundColor="error\|warning\|info\|success\|neutral" variant="solid\|tonal" borderRadius="pill">{child}</Badge>` · `<TextLabel color="info\|success\|error\|warning\|neutral" type="text\|status" size="md\|sm" label="…" />` · `<ShapeIcon size="xxxs..xxl" radius="circle\|md" bg="brand-light" color="brand"><Icon /></ShapeIcon>` |
83
98
  | **Text Inputs** | `<Input label="…" value={v} onChange={e => setV(e.target.value)} status="default\|warning\|error\|success" helptext="…" allowClear showPassword icon={…} />` · `<TextArea label="…" lines={4} value={v} status="default\|warning\|error" onChange={…} characterLimit={300} />` · `<CurrencyInput label="…" value={v} suffix=" đ" status="default\|warning\|error" onChange={e => setV(e.target.value)} onFormatChange={setFormatted} />` |
84
99
  | **Input Groups** | `<InputGroup status="default\|error" helptext="…"><Dropdown … /><Input … /></InputGroup>` · `<RangeInput helptext="…"><Input label="Từ" … /><Input label="Đến" … /></RangeInput>` |
@@ -105,6 +105,7 @@ import { TagCloud } from '@chotot/clad-ui';
105
105
  | `maxSelection` | `number` | — |
106
106
  | `label` / `helptext` | `string` | — |
107
107
  | `variant` | `'fill' \| 'outline'` (also accepts `'normal'`) | `'fill'` |
108
+ | `size` | `'sm' \| 'md' \| 'lg' \| 'xl'` | `'md'` |
108
109
  | `selectedTextStyle` | `'bold' \| 'normal'` | `'bold'` |
109
110
 
110
111
  ---
@@ -5,7 +5,7 @@ metadata:
5
5
  purpose: Report bugs, request component/token/icon enhancements, or propose new ideas for @chotot/clad-ui, @chotot/icons, and @chotot/charts by creating structured GitHub issues in carousell/clad-ui. Use when a consumer developer hits a design system bug, missing prop/icon/token, migration blocker, or asks to file feedback/issue for Clad UI.
6
6
  type: sub-skill
7
7
  library: '@chotot/clad-ui'
8
- library_version: '3.0.0'
8
+ library_version: '3.1.0'
9
9
  requires:
10
10
  - clad-ui
11
11
  sources:
@@ -5,7 +5,7 @@ metadata:
5
5
  purpose: Migrate consumer React/Next.js code from @chotot/clad-ui v2 (Linaria) to @chotot/clad-ui v3 (Tailwind CSS v4) and @chotot/icons. Supports incremental file/feature migration (coexistence via @chotot/clad-ui-v2 alias) and full-repo cutover. Not for building new v3 UI from scratch, use clad-ui instead.
6
6
  type: lifecycle
7
7
  library: '@chotot/clad-ui'
8
- library_version: '3.0.0'
8
+ library_version: '3.1.0'
9
9
  requires:
10
10
  - clad-ui
11
11
  sources:
@@ -54,7 +54,7 @@ Discovery reads:
54
54
  ## Workflow
55
55
 
56
56
  1. **Verify root package & stylesheet setup (`package.json` + root layout).**
57
- - Inspect `package.json`. Ensure `@chotot/clad-ui` (`^3.0.0`) is installed (`pnpm add @chotot/clad-ui@^3.0.0`; `@chotot/icons` is automatically installed as a direct dependency of `@chotot/clad-ui`) and `"@chotot/clad-ui"` is listed in `pnpm.onlyBuiltDependencies`. (For **Incremental Coexistence mode** where unmigrated files still rely on v2 Linaria, alias v2 as `"@chotot/clad-ui-v2": "npm:@chotot/clad-ui@^2"` per [references/component-api-changes.md](references/component-api-changes.md)).
57
+ - Inspect `package.json`. Ensure `@chotot/clad-ui` (`^3.0.0`) is installed (`pnpm add @chotot/clad-ui@^3.0.0`; `@chotot/icons` is automatically installed as a direct dependency of `@chotot/clad-ui`) and `"@chotot/clad-ui"` is listed in `pnpm.onlyBuiltDependencies`. If `.claude/skills/` is listed in `.gitignore`, also add `"prepare": "clad-ui-helper"` to `scripts` so clean `pnpm install --frozen-lockfile` runs re-link `.claude/skills/*` even when pnpm's `side-effects-cache` skips dependency `postinstall`. (For **Incremental Coexistence mode** where unmigrated files still rely on v2 Linaria, alias v2 as `"@chotot/clad-ui-v2": "npm:@chotot/clad-ui@^2"` per [references/component-api-changes.md](references/component-api-changes.md)).
58
58
  - Check the root layout (`_app.tsx` / `layout.tsx` / global CSS):
59
59
  - Ensure `@chotot/clad-ui/styles.css` (or `@import "@chotot/clad-ui/preset.css"`) is imported once.
60
60
  - Ensure the root wrapper sets `data-theme="chotot|pty|job|veh"` (coexisting with or replacing legacy `chototTheme`/`baselineStyles` per [references/component-api-changes.md](references/component-api-changes.md)).
@@ -72,9 +72,11 @@ Discovery reads:
72
72
  - Map `Chip` / `TagCloud` `variant="normal"` → `variant="fill"` (and review `Chip` `size`: v3 default `'md'` is 32px, `'sm'` is 24px, `'lg'` is 40px).
73
73
  - Map `RowItem` `type="menu"` → `type="chevron"`.
74
74
  - Map `Badge` `bg` → `backgroundColor`.
75
+ - Map `ShapeIcon` `bg` / `color` from v2 `theme.colors.*` camelCase keys (`backgroundPrimary` → `primary`, `positive` → `success`, `buttonBlank` → `blank`, `critical` → `error`, etc.) and pass the icon as `children` (`<ShapeIcon size="sm"><Phone /></ShapeIcon>`).
75
76
 
76
77
  4. **Convert Linaria `css` / `styled` blocks and `theme.*` tokens in `target` files.**
77
78
  - If the file imports `@linaria/core`, `@linaria/react`, or `@chotot/clad-ui/theme/*`, read [references/token-and-linaria-mapping.md](references/token-and-linaria-mapping.md).
79
+ - Note that the JS `theme` object (`@chotot/clad-ui/theme/*`) is completely removed in v3: replace inline `style` / SVG `fill` / 3rd-party JS `theme.colors.*` props with CSS variables (`var(--color-*)`) or `currentColor` per [references/component-api-changes.md](references/component-api-changes.md) Section 2.3.
78
80
  - Replace `styled.<tag>` and `css\`...\`` with Tailwind utility classes and Clad semantic tokens (`bg-background-*`, `text-text-*`, `border-border-*`, `text-icon-*`, `text-{display,header,label,body}-*`), merging conditional classes via `cn` from `@chotot/clad-ui`.
79
81
  - Map `theme.mediaQueries.tablet` → `md:` (`768px`) and `theme.mediaQueries.desktop` → `min-[992px]:`.
80
82
  - Avoid the 3 common Linaria-to-Tailwind pitfalls in [references/token-and-linaria-mapping.md](references/token-and-linaria-mapping.md) Section 1.1: use `text-[24px]`/`text-[20px]` instead of `text-2xl`/`text-xl` when only `font-size` was set without `line-height`; strip spaces inside `var(--x,0px)` arbitrary values; and map wrapper `gap` props via `cn(gapClass, className)` rather than inline `style={{ gap }}`.
@@ -61,6 +61,13 @@ import ptyTheme from '@chotot/clad-ui/theme/ct-pty';
61
61
  <div data-theme="pty">{children}</div>
62
62
  ```
63
63
 
64
+ ### 2.3 JS `theme` Object Removed (`@chotot/clad-ui/theme/*`)
65
+ v3 is pure CSS-variable driven and **does not export a JS `theme` object** (`@chotot/clad-ui/theme/chotot`, `ct-pty`, `ct-job`, `ct-veh` are removed). When migrating non-Linaria JS consumers of `theme.*` (inline `style={{ ... }}`, SVG `fill`/`stroke` attributes, or 3rd-party component color/zIndex props):
66
+ - **Inline `style` & 3rd-party color props:** Pass v3 CSS variables directly (`var(--color-text-primary)`, `var(--color-background-brand)`, `var(--spacing-medium-16)`) — see [token-and-linaria-mapping.md](token-and-linaria-mapping.md) Section 2.
67
+ - **SVG icons & custom `<svg>`:** Prefer `className="text-icon-primary"` (with `fill="currentColor"`), or `fill="var(--color-icon-primary)"`.
68
+ - **Canvas / JS libraries that require resolved hex at runtime:** Read `getComputedStyle(document.documentElement).getPropertyValue('--color-background-brand').trim()` on the client.
69
+ - **Numeric `theme.zIndices.*` in JS / Tailwind:** Replace with explicit z-index utilities or numeric constants (`modal: 1600`, `dropdown: 1700`, `tooltip: 1800`, `notification: 1900` — see [token-and-linaria-mapping.md](token-and-linaria-mapping.md) Section 6).
70
+
64
71
  ---
65
72
 
66
73
  ## 3. Universal Component Prop Changes
@@ -117,6 +124,41 @@ import ptyTheme from '@chotot/clad-ui/theme/ct-pty';
117
124
  - `bg` prop → `backgroundColor` (`'error' | 'warning' | 'info' | 'success' | 'neutral'`).
118
125
  - Uses `variant` (`'solid' | 'tonal'`), `size` (`'sm' | 'md' | 'lg' | 'dot'`), `position` (`'topRight' | 'topLeft' | 'right'`), and `borderRadius` (`'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'pill' | 'circle'`).
119
126
 
127
+ ### ShapeIcon
128
+ - **Icon passed as `children`:** Render the icon inside `<ShapeIcon size="sm"><Phone /></ShapeIcon>` (there is no `Icon` prop).
129
+ - **`bg` and `color` renamed from v2 `theme.colors.*` keys to short semantic names:**
130
+ - Valid v3 `bg`: `'none' | 'primary' | 'secondary' | 'tertiary' | 'inverted' | 'brand' | 'brand-light' | 'info' | 'info-light' | 'success' | 'success-light' | 'error' | 'error-light' | 'warning' | 'warning-light'` (default `'none'`).
131
+ - Valid v3 `color`: `'primary' | 'secondary' | 'tertiary' | 'blank' | 'brand' | 'info' | 'success' | 'error' | 'warning' | 'on-background'` (default `'primary'`).
132
+ - Common v2 → v3 mappings:
133
+
134
+ | Prop | v2 `theme.colors` Key | v3 Value |
135
+ |---|---|---|
136
+ | `bg` | `'transparent'` / omitted | `'none'` |
137
+ | `bg` | `'backgroundPrimary'` / `'white'` / `'gray0'` | `'primary'` |
138
+ | `bg` | `'backgroundSecondary'` / `'neutralBG'` / `'gray50'` | `'secondary'` |
139
+ | `bg` | `'backgroundTertiary'` / `'neutralLight'` / `'gray75'` | `'tertiary'` |
140
+ | `bg` | `'backgroundInverted'` / `'gray900'` | `'inverted'` |
141
+ | `bg` | `'backgroundBrand'` / `'caution'` | `'brand'` |
142
+ | `bg` | `'backgroundBrandLight'` / `'cautionBG'` | `'brand-light'` |
143
+ | `bg` | `'backgroundSuccess'` / `'positive'` | `'success'` |
144
+ | `bg` | `'backgroundSuccessLight'` / `'positiveBG'` | `'success-light'` |
145
+ | `bg` | `'backgroundError'` / `'critical'` / `'negative'` | `'error'` |
146
+ | `bg` | `'backgroundErrorLight'` / `'criticalBG'` | `'error-light'` |
147
+ | `bg` | `'backgroundWarning'` / `'accent'` | `'warning'` |
148
+ | `bg` | `'backgroundWarningLight'` / `'accentBG'` | `'warning-light'` |
149
+ | `bg` | `'backgroundInfo'` / `'info'` | `'info'` |
150
+ | `bg` | `'backgroundInfoLight'` / `'infoBG'` | `'info-light'` |
151
+ | `color` | `'iconPrimary'` / `'textPrimary'` | `'primary'` |
152
+ | `color` | `'iconSecondary'` / `'textSecondary'` | `'secondary'` |
153
+ | `color` | `'iconTertiary'` / `'textTertiary'` | `'tertiary'` |
154
+ | `color` | `'buttonBlank'` / `'textBlank'` / `'white'` / `'gray0'` | `'blank'` |
155
+ | `color` | `'textOnBackground'` | `'on-background'` |
156
+ | `color` | `'iconBrand'` / `'textBrand'` / `'caution'` | `'brand'` |
157
+ | `color` | `'iconSuccess'` / `'textSuccess'` / `'positive'` | `'success'` |
158
+ | `color` | `'iconError'` / `'textError'` / `'critical'` | `'error'` |
159
+ | `color` | `'iconWarning'` / `'textWarning'` / `'accent'` | `'warning'` |
160
+ | `color` | `'iconInfo'` / `'textInfo'` / `'info'` | `'info'` |
161
+
120
162
  ### TextLabel
121
163
  - Valid props: `color` (`'info' | 'success' | 'error' | 'warning' | 'neutral'`), `size` (`'md' | 'sm'`), `type` (`'text' | 'status'`), `label` (`string`), `icon` (`ReactNode`).
122
164
 
@@ -177,8 +177,11 @@ Many older consumer files reference v1/v2 deprecated keys on `theme.colors`. Map
177
177
  | `space.xl` / `space.xxl` / `space.xxxl` / `space.xxxxl` | `32px` / `48px` / `64px` / `96px` | `p-8` / `p-12` / `p-16` / `p-24` (or `--spacing-huge-32`, `--spacing-massive-40`) |
178
178
  | `sizes.xxxs` / `xxs` / `xs` / `sm` / `md` / `lg` / `lxl` / `xl` / `xxl` | `12` / `16` / `20` / `24` / `28` / `32` / `40` / `48` / `64px` | `h-3` / `h-4` / `h-5` / `h-6` / `h-7` / `h-8` / `h-10` / `h-12` / `h-16` (also `w-*`, `size-*`) |
179
179
  | `radii.sm` / `radii.$sm` / `radii.md` / `radii.lg` / `radii.xl` / `radii.pill` | `4px` / `6px` / `8px` / `12px` / `20px` / `999px` | `rounded-ad-small` (`4px`) / `rounded-ad` (`6px`) / `rounded-card-small` (`8px`) / `rounded-card` (`12px`) / `rounded-decoration` (`16px`) / `rounded-modal` (`20px`) / `rounded-pill` (`999px`) |
180
- | `borderWidths.strokeDivider` / `strokeAction` / `strokeEmphasize` | `1px` / `2px` / `3px` | `border` (`var(--stroke-divider)`) / `border-2` (`var(--stroke-action)`) / `border-[3px]` (`var(--stroke-emphasize)`) |
180
+ | `borderWidths.none` / `sm` (`strokeDivider`) / `md` (`strokeAction`) / `lg` (`strokeEmphasize`) / `xl` | `0px` / `1px` / `2px` / `3px` / `4px` | `border-0` / `border` (`var(--stroke-divider)`) / `border-2` (`var(--stroke-action)`) / `border-[3px]` (`var(--stroke-emphasize)`) / `border-4` |
181
+ | `borders.none` / `borders.sm` | `0` / `1px solid borderThin` | `border-0` / `border border-border-thin` |
181
182
  | `shadows.sm` / `shadows.md` / `shadows.lg` | Elevation shadows | `shadow-below` (`var(--shadow-below)`) / `shadow-floating` (`var(--shadow-floating)`) |
183
+ | `zIndices.initial` / `neutral` / `up` / `down` | `'auto'` / `0` / `1` / `-1` | `z-auto` / `z-0` / `z-[1]` / `-z-[1]` |
184
+ | `zIndices.modal` / `dropdown` / `tooltip` / `notification` | `1600` / `1700` / `1800` / `1900` | `z-[1600]` (Drawer/Popup) / `z-[1700]` (Dropdown/DatePicker) / `z-[1800]` (Popover) / `z-[1900]` (Tooltip/Snack) |
182
185
 
183
186
  ---
184
187