@mindlogic-ai/logician-ui 5.0.0-alpha.2 → 5.0.0-alpha.20

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 (525) hide show
  1. package/README.md +1 -0
  2. package/dist/components/Avatar/Avatar.d.ts +68 -11
  3. package/dist/components/Avatar/Avatar.d.ts.map +1 -1
  4. package/dist/components/Avatar/Avatar.js +41 -5
  5. package/dist/components/Avatar/Avatar.js.map +1 -1
  6. package/dist/components/Avatar/Avatar.mjs +40 -5
  7. package/dist/components/Avatar/Avatar.mjs.map +1 -1
  8. package/dist/components/Avatar/index.d.ts +2 -2
  9. package/dist/components/Avatar/index.d.ts.map +1 -1
  10. package/dist/components/Badge/Badge.d.ts.map +1 -1
  11. package/dist/components/Badge/Badge.js +5 -3
  12. package/dist/components/Badge/Badge.js.map +1 -1
  13. package/dist/components/Badge/Badge.mjs +5 -3
  14. package/dist/components/Badge/Badge.mjs.map +1 -1
  15. package/dist/components/Badge/Badge.types.d.ts +7 -5
  16. package/dist/components/Badge/Badge.types.d.ts.map +1 -1
  17. package/dist/components/Banner/Banner.types.d.ts +24 -1
  18. package/dist/components/Banner/Banner.types.d.ts.map +1 -1
  19. package/dist/components/BottomSheet/BottomSheet.styles.d.ts +2 -2
  20. package/dist/components/Button/Button.d.ts.map +1 -1
  21. package/dist/components/Button/Button.js +31 -3
  22. package/dist/components/Button/Button.js.map +1 -1
  23. package/dist/components/Button/Button.mjs +31 -3
  24. package/dist/components/Button/Button.mjs.map +1 -1
  25. package/dist/components/Button/Button.types.d.ts +38 -1
  26. package/dist/components/Button/Button.types.d.ts.map +1 -1
  27. package/dist/components/Card/Card.types.d.ts +12 -0
  28. package/dist/components/Card/Card.types.d.ts.map +1 -1
  29. package/dist/components/CodeTabs/CodeTabs.styles.d.ts +6 -5
  30. package/dist/components/CodeTabs/CodeTabs.styles.d.ts.map +1 -1
  31. package/dist/components/CodeTabs/CodeTabs.styles.js +6 -5
  32. package/dist/components/CodeTabs/CodeTabs.styles.js.map +1 -1
  33. package/dist/components/CodeTabs/CodeTabs.styles.mjs +6 -5
  34. package/dist/components/CodeTabs/CodeTabs.styles.mjs.map +1 -1
  35. package/dist/components/ColorMode/ColorModeToggle.d.ts +7 -2
  36. package/dist/components/ColorMode/ColorModeToggle.d.ts.map +1 -1
  37. package/dist/components/ColorMode/ColorModeToggle.js +8 -3
  38. package/dist/components/ColorMode/ColorModeToggle.js.map +1 -1
  39. package/dist/components/ColorMode/ColorModeToggle.mjs +8 -3
  40. package/dist/components/ColorMode/ColorModeToggle.mjs.map +1 -1
  41. package/dist/components/Confetti/Confetti.types.d.ts +5 -1
  42. package/dist/components/Confetti/Confetti.types.d.ts.map +1 -1
  43. package/dist/components/Confetti/confettiColors.d.ts +5 -5
  44. package/dist/components/Confetti/confettiColors.js +5 -5
  45. package/dist/components/Confetti/confettiColors.mjs +5 -5
  46. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts +6 -0
  47. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts.map +1 -1
  48. package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts +1 -1
  49. package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts.map +1 -1
  50. package/dist/components/Form/FormModalFooter/FormModalFooter.js +2 -2
  51. package/dist/components/Form/FormModalFooter/FormModalFooter.js.map +1 -1
  52. package/dist/components/Form/FormModalFooter/FormModalFooter.mjs +2 -2
  53. package/dist/components/Form/FormModalFooter/FormModalFooter.mjs.map +1 -1
  54. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts +11 -1
  55. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts.map +1 -1
  56. package/dist/components/Form/FormSection/CollapsibleFormSection.js +1 -0
  57. package/dist/components/Form/FormSection/CollapsibleFormSection.js.map +1 -1
  58. package/dist/components/Form/FormSection/CollapsibleFormSection.mjs +1 -0
  59. package/dist/components/Form/FormSection/CollapsibleFormSection.mjs.map +1 -1
  60. package/dist/components/Input/Input.d.ts.map +1 -1
  61. package/dist/components/Input/Input.js +4 -0
  62. package/dist/components/Input/Input.js.map +1 -1
  63. package/dist/components/Input/Input.mjs +4 -0
  64. package/dist/components/Input/Input.mjs.map +1 -1
  65. package/dist/components/LineGraph/LineGraph.d.ts.map +1 -1
  66. package/dist/components/LineGraph/LineGraph.js +4 -5
  67. package/dist/components/LineGraph/LineGraph.js.map +1 -1
  68. package/dist/components/LineGraph/LineGraph.mjs +5 -6
  69. package/dist/components/LineGraph/LineGraph.mjs.map +1 -1
  70. package/dist/components/LineGraph/LineGraph.types.d.ts +12 -2
  71. package/dist/components/LineGraph/LineGraph.types.d.ts.map +1 -1
  72. package/dist/components/LineGraph/seriesColors.d.ts +12 -8
  73. package/dist/components/LineGraph/seriesColors.d.ts.map +1 -1
  74. package/dist/components/LineGraph/seriesColors.js +8 -7
  75. package/dist/components/LineGraph/seriesColors.js.map +1 -1
  76. package/dist/components/LineGraph/seriesColors.mjs +8 -7
  77. package/dist/components/LineGraph/seriesColors.mjs.map +1 -1
  78. package/dist/components/Masonry/Masonry.types.d.ts +8 -3
  79. package/dist/components/Masonry/Masonry.types.d.ts.map +1 -1
  80. package/dist/components/Menu/MenuItem.types.d.ts +8 -0
  81. package/dist/components/Menu/MenuItem.types.d.ts.map +1 -1
  82. package/dist/components/Modal/ModalCloseButton.d.ts +1 -1
  83. package/dist/components/Modal/ModalCloseButton.js +1 -1
  84. package/dist/components/Modal/ModalCloseButton.mjs +1 -1
  85. package/dist/components/NavList/NavList.d.ts +35 -0
  86. package/dist/components/NavList/NavList.d.ts.map +1 -0
  87. package/dist/components/NavList/NavList.js +113 -0
  88. package/dist/components/NavList/NavList.js.map +1 -0
  89. package/dist/components/NavList/NavList.mjs +111 -0
  90. package/dist/components/NavList/NavList.mjs.map +1 -0
  91. package/dist/components/NavList/NavList.styles.d.ts +90 -0
  92. package/dist/components/NavList/NavList.styles.d.ts.map +1 -0
  93. package/dist/components/NavList/NavList.styles.js +104 -0
  94. package/dist/components/NavList/NavList.styles.js.map +1 -0
  95. package/dist/components/NavList/NavList.styles.mjs +97 -0
  96. package/dist/components/NavList/NavList.styles.mjs.map +1 -0
  97. package/dist/components/NavList/NavList.translations.json.js +19 -0
  98. package/dist/components/NavList/NavList.translations.json.js.map +1 -0
  99. package/dist/components/NavList/NavList.translations.json.mjs +14 -0
  100. package/dist/components/NavList/NavList.translations.json.mjs.map +1 -0
  101. package/dist/components/NavList/NavList.types.d.ts +140 -0
  102. package/dist/components/NavList/NavList.types.d.ts.map +1 -0
  103. package/dist/components/NavList/NavListContext.d.ts +30 -0
  104. package/dist/components/NavList/NavListContext.d.ts.map +1 -0
  105. package/dist/components/NavList/NavListContext.js +16 -0
  106. package/dist/components/NavList/NavListContext.js.map +1 -0
  107. package/dist/components/NavList/NavListContext.mjs +13 -0
  108. package/dist/components/NavList/NavListContext.mjs.map +1 -0
  109. package/dist/components/NavList/NavListGroup.d.ts +31 -0
  110. package/dist/components/NavList/NavListGroup.d.ts.map +1 -0
  111. package/dist/components/NavList/NavListGroup.js +115 -0
  112. package/dist/components/NavList/NavListGroup.js.map +1 -0
  113. package/dist/components/NavList/NavListGroup.mjs +113 -0
  114. package/dist/components/NavList/NavListGroup.mjs.map +1 -0
  115. package/dist/components/NavList/NavListItem.d.ts +16 -0
  116. package/dist/components/NavList/NavListItem.d.ts.map +1 -0
  117. package/dist/components/NavList/NavListItem.js +284 -0
  118. package/dist/components/NavList/NavListItem.js.map +1 -0
  119. package/dist/components/NavList/NavListItem.mjs +282 -0
  120. package/dist/components/NavList/NavListItem.mjs.map +1 -0
  121. package/dist/components/NavList/NavListSkeleton.d.ts +17 -0
  122. package/dist/components/NavList/NavListSkeleton.d.ts.map +1 -0
  123. package/dist/components/NavList/NavListSkeleton.js +33 -0
  124. package/dist/components/NavList/NavListSkeleton.js.map +1 -0
  125. package/dist/components/NavList/NavListSkeleton.mjs +31 -0
  126. package/dist/components/NavList/NavListSkeleton.mjs.map +1 -0
  127. package/dist/components/NavList/index.d.ts +7 -0
  128. package/dist/components/NavList/index.d.ts.map +1 -0
  129. package/dist/components/Pagination/Pagination.d.ts +11 -10
  130. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  131. package/dist/components/Pagination/Pagination.js +11 -10
  132. package/dist/components/Pagination/Pagination.js.map +1 -1
  133. package/dist/components/Pagination/Pagination.mjs +11 -10
  134. package/dist/components/Pagination/Pagination.mjs.map +1 -1
  135. package/dist/components/ProgressBar/ProgressBar.types.d.ts +9 -0
  136. package/dist/components/ProgressBar/ProgressBar.types.d.ts.map +1 -1
  137. package/dist/components/RadialProgress/RadialProgress.types.d.ts +21 -1
  138. package/dist/components/RadialProgress/RadialProgress.types.d.ts.map +1 -1
  139. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts +8 -0
  140. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts.map +1 -1
  141. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  142. package/dist/components/SegmentedControl/SegmentedControl.js +6 -7
  143. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
  144. package/dist/components/SegmentedControl/SegmentedControl.mjs +6 -7
  145. package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  146. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts +2 -0
  147. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts.map +1 -1
  148. package/dist/components/Select/Combobox.d.ts +1 -1
  149. package/dist/components/Select/Combobox.d.ts.map +1 -1
  150. package/dist/components/Select/Combobox.js +9 -2
  151. package/dist/components/Select/Combobox.js.map +1 -1
  152. package/dist/components/Select/Combobox.mjs +10 -3
  153. package/dist/components/Select/Combobox.mjs.map +1 -1
  154. package/dist/components/Select/Select.d.ts +1 -1
  155. package/dist/components/Select/Select.d.ts.map +1 -1
  156. package/dist/components/Select/Select.js +14 -2
  157. package/dist/components/Select/Select.js.map +1 -1
  158. package/dist/components/Select/Select.mjs +15 -3
  159. package/dist/components/Select/Select.mjs.map +1 -1
  160. package/dist/components/Select/Select.styles.d.ts +97 -1
  161. package/dist/components/Select/Select.styles.d.ts.map +1 -1
  162. package/dist/components/Select/Select.styles.js +83 -0
  163. package/dist/components/Select/Select.styles.js.map +1 -1
  164. package/dist/components/Select/Select.styles.mjs +82 -1
  165. package/dist/components/Select/Select.styles.mjs.map +1 -1
  166. package/dist/components/Tabs/Tab/Tab.styles.d.ts +1 -1
  167. package/dist/components/Tabs/Tab/Tab.styles.js +1 -1
  168. package/dist/components/Tabs/Tab/Tab.styles.mjs +1 -1
  169. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  170. package/dist/components/Textarea/Textarea.js +4 -0
  171. package/dist/components/Textarea/Textarea.js.map +1 -1
  172. package/dist/components/Textarea/Textarea.mjs +4 -0
  173. package/dist/components/Textarea/Textarea.mjs.map +1 -1
  174. package/dist/components/Toast/Toast.styles.d.ts +6 -2
  175. package/dist/components/Toast/Toast.styles.d.ts.map +1 -1
  176. package/dist/components/Toast/Toast.styles.js +18 -10
  177. package/dist/components/Toast/Toast.styles.js.map +1 -1
  178. package/dist/components/Toast/Toast.styles.mjs +18 -10
  179. package/dist/components/Toast/Toast.styles.mjs.map +1 -1
  180. package/dist/components/Typography/Caption.d.ts.map +1 -1
  181. package/dist/components/Typography/Caption.js +1 -1
  182. package/dist/components/Typography/Caption.js.map +1 -1
  183. package/dist/components/Typography/Caption.mjs +1 -1
  184. package/dist/components/Typography/Caption.mjs.map +1 -1
  185. package/dist/components/Typography/H1.d.ts.map +1 -1
  186. package/dist/components/Typography/H1.js +1 -1
  187. package/dist/components/Typography/H1.js.map +1 -1
  188. package/dist/components/Typography/H1.mjs +1 -1
  189. package/dist/components/Typography/H1.mjs.map +1 -1
  190. package/dist/components/Typography/H2.d.ts.map +1 -1
  191. package/dist/components/Typography/H2.js +1 -1
  192. package/dist/components/Typography/H2.js.map +1 -1
  193. package/dist/components/Typography/H2.mjs +1 -1
  194. package/dist/components/Typography/H2.mjs.map +1 -1
  195. package/dist/components/Typography/H3.d.ts.map +1 -1
  196. package/dist/components/Typography/H3.js +1 -1
  197. package/dist/components/Typography/H3.js.map +1 -1
  198. package/dist/components/Typography/H3.mjs +1 -1
  199. package/dist/components/Typography/H3.mjs.map +1 -1
  200. package/dist/components/Typography/H4.d.ts.map +1 -1
  201. package/dist/components/Typography/H4.js +1 -1
  202. package/dist/components/Typography/H4.js.map +1 -1
  203. package/dist/components/Typography/H4.mjs +1 -1
  204. package/dist/components/Typography/H4.mjs.map +1 -1
  205. package/dist/components/Typography/H5.d.ts.map +1 -1
  206. package/dist/components/Typography/H5.js +1 -1
  207. package/dist/components/Typography/H5.js.map +1 -1
  208. package/dist/components/Typography/H5.mjs +1 -1
  209. package/dist/components/Typography/H5.mjs.map +1 -1
  210. package/dist/components/Typography/Link.d.ts.map +1 -1
  211. package/dist/components/Typography/Link.js +1 -1
  212. package/dist/components/Typography/Link.js.map +1 -1
  213. package/dist/components/Typography/Link.mjs +1 -1
  214. package/dist/components/Typography/Link.mjs.map +1 -1
  215. package/dist/components/Typography/Overline.d.ts.map +1 -1
  216. package/dist/components/Typography/Overline.js +1 -1
  217. package/dist/components/Typography/Overline.js.map +1 -1
  218. package/dist/components/Typography/Overline.mjs +1 -1
  219. package/dist/components/Typography/Overline.mjs.map +1 -1
  220. package/dist/components/Typography/Subtext.d.ts.map +1 -1
  221. package/dist/components/Typography/Subtext.js +1 -1
  222. package/dist/components/Typography/Subtext.js.map +1 -1
  223. package/dist/components/Typography/Subtext.mjs +1 -1
  224. package/dist/components/Typography/Subtext.mjs.map +1 -1
  225. package/dist/components/Typography/Subtitle.d.ts.map +1 -1
  226. package/dist/components/Typography/Subtitle.js +1 -1
  227. package/dist/components/Typography/Subtitle.js.map +1 -1
  228. package/dist/components/Typography/Subtitle.mjs +1 -1
  229. package/dist/components/Typography/Subtitle.mjs.map +1 -1
  230. package/dist/components/Typography/Text.d.ts.map +1 -1
  231. package/dist/components/Typography/Text.js +1 -1
  232. package/dist/components/Typography/Text.js.map +1 -1
  233. package/dist/components/Typography/Text.mjs +1 -1
  234. package/dist/components/Typography/Text.mjs.map +1 -1
  235. package/dist/hooks/useLanguage.d.ts +5 -0
  236. package/dist/hooks/useLanguage.d.ts.map +1 -1
  237. package/dist/hooks/useLanguage.js +7 -3
  238. package/dist/hooks/useLanguage.js.map +1 -1
  239. package/dist/hooks/useLanguage.mjs +7 -4
  240. package/dist/hooks/useLanguage.mjs.map +1 -1
  241. package/dist/hooks/useTranslate.d.ts.map +1 -1
  242. package/dist/hooks/useTranslate.js +8 -5
  243. package/dist/hooks/useTranslate.js.map +1 -1
  244. package/dist/hooks/useTranslate.mjs +8 -5
  245. package/dist/hooks/useTranslate.mjs.map +1 -1
  246. package/dist/index.d.ts +2 -1
  247. package/dist/index.d.ts.map +1 -1
  248. package/dist/index.js +13 -0
  249. package/dist/index.js.map +1 -1
  250. package/dist/index.mjs +7 -2
  251. package/dist/index.mjs.map +1 -1
  252. package/dist/theme/colors.d.ts +2 -2
  253. package/dist/theme/colors.d.ts.map +1 -1
  254. package/dist/theme/colors.js +54 -18
  255. package/dist/theme/colors.js.map +1 -1
  256. package/dist/theme/colors.mjs +55 -19
  257. package/dist/theme/colors.mjs.map +1 -1
  258. package/dist/theme/global.d.ts.map +1 -1
  259. package/dist/theme/global.js +19 -1
  260. package/dist/theme/global.js.map +1 -1
  261. package/dist/theme/global.mjs +19 -1
  262. package/dist/theme/global.mjs.map +1 -1
  263. package/dist/theme/index.d.ts.map +1 -1
  264. package/dist/theme/index.js +2 -0
  265. package/dist/theme/index.js.map +1 -1
  266. package/dist/theme/index.mjs +2 -0
  267. package/dist/theme/index.mjs.map +1 -1
  268. package/dist/theme/palette.generated.d.ts +232 -123
  269. package/dist/theme/palette.generated.d.ts.map +1 -1
  270. package/dist/theme/palette.generated.js +233 -123
  271. package/dist/theme/palette.generated.js.map +1 -1
  272. package/dist/theme/palette.generated.mjs +233 -124
  273. package/dist/theme/palette.generated.mjs.map +1 -1
  274. package/dist/theme/paletteSwatches.d.ts +20 -0
  275. package/dist/theme/paletteSwatches.d.ts.map +1 -1
  276. package/dist/theme/recipes/avatar.d.ts +30 -0
  277. package/dist/theme/recipes/avatar.d.ts.map +1 -0
  278. package/dist/theme/recipes/avatar.js +96 -0
  279. package/dist/theme/recipes/avatar.js.map +1 -0
  280. package/dist/theme/recipes/avatar.mjs +94 -0
  281. package/dist/theme/recipes/avatar.mjs.map +1 -0
  282. package/dist/translations/Defaults.translations.json.js +19 -1
  283. package/dist/translations/Defaults.translations.json.js.map +1 -1
  284. package/dist/translations/Defaults.translations.json.mjs +18 -2
  285. package/dist/translations/Defaults.translations.json.mjs.map +1 -1
  286. package/dist/utils/disabledControl.d.ts +8 -1
  287. package/dist/utils/disabledControl.d.ts.map +1 -1
  288. package/dist/utils/disabledControl.js +8 -1
  289. package/dist/utils/disabledControl.js.map +1 -1
  290. package/dist/utils/disabledControl.mjs +8 -1
  291. package/dist/utils/disabledControl.mjs.map +1 -1
  292. package/dist/utils/focusRing.d.ts +22 -0
  293. package/dist/utils/focusRing.d.ts.map +1 -1
  294. package/dist/utils/focusRing.js +22 -0
  295. package/dist/utils/focusRing.js.map +1 -1
  296. package/dist/utils/focusRing.mjs +21 -1
  297. package/dist/utils/focusRing.mjs.map +1 -1
  298. package/package.json +2 -1
  299. package/src/components/Accordion/Accordion.stories.tsx +85 -0
  300. package/src/components/Accordion/Accordion.usage.mdx +200 -0
  301. package/src/components/Appear/Appear.usage.mdx +107 -0
  302. package/src/components/Avatar/Avatar.recipe.test.tsx +176 -0
  303. package/src/components/Avatar/Avatar.stories.tsx +199 -24
  304. package/src/components/Avatar/Avatar.tsx +118 -21
  305. package/src/components/Avatar/Avatar.usage.mdx +185 -0
  306. package/src/components/Avatar/index.tsx +8 -1
  307. package/src/components/Badge/Badge.stories.tsx +193 -3
  308. package/src/components/Badge/Badge.tsx +5 -3
  309. package/src/components/Badge/Badge.types.ts +7 -5
  310. package/src/components/Badge/Badge.usage.mdx +265 -0
  311. package/src/components/Banner/Banner.stories.tsx +152 -2
  312. package/src/components/Banner/Banner.types.ts +30 -1
  313. package/src/components/Banner/Banner.usage.mdx +233 -0
  314. package/src/components/BottomSheet/BottomSheet.stories.tsx +168 -1
  315. package/src/components/BottomSheet/BottomSheet.test.tsx +2 -1
  316. package/src/components/BottomSheet/BottomSheet.usage.mdx +216 -0
  317. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +59 -0
  318. package/src/components/Breadcrumb/Breadcrumb.usage.mdx +181 -0
  319. package/src/components/Button/Button.focusableWhenDisabled.test.tsx +218 -0
  320. package/src/components/Button/Button.stories.tsx +332 -3
  321. package/src/components/Button/Button.tsx +46 -3
  322. package/src/components/Button/Button.types.ts +38 -1
  323. package/src/components/Button/Button.usage.mdx +358 -0
  324. package/src/components/Button/Button.variants.test.tsx +13 -1
  325. package/src/components/Card/Card.stories.tsx +106 -0
  326. package/src/components/Card/Card.types.ts +12 -0
  327. package/src/components/Card/Card.usage.mdx +216 -0
  328. package/src/components/Checkbox/Checkbox.stories.tsx +140 -13
  329. package/src/components/Checkbox/Checkbox.usage.mdx +214 -0
  330. package/src/components/Chip/Chip.usage.mdx +78 -0
  331. package/src/components/Code/Code.stories.tsx +60 -0
  332. package/src/components/Code/Code.usage.mdx +187 -0
  333. package/src/components/CodeTabs/CodeTabs.stories.tsx +53 -0
  334. package/src/components/CodeTabs/CodeTabs.styles.ts +6 -5
  335. package/src/components/CodeTabs/CodeTabs.usage.mdx +176 -0
  336. package/src/components/Collapsible/Collapsible.stories.tsx +58 -0
  337. package/src/components/Collapsible/Collapsible.usage.mdx +173 -0
  338. package/src/components/ColorMode/ColorMode.stories.tsx +50 -0
  339. package/src/components/ColorMode/ColorMode.usage.mdx +135 -0
  340. package/src/components/ColorMode/ColorModeToggle.tsx +10 -3
  341. package/src/components/Confetti/Confetti.types.ts +5 -1
  342. package/src/components/Confetti/Confetti.usage.mdx +111 -0
  343. package/src/components/Confetti/confettiColors.ts +5 -5
  344. package/src/components/Container/Container.stories.tsx +32 -0
  345. package/src/components/Container/Container.usage.mdx +130 -0
  346. package/src/components/CopyableCode/CopyableCode.stories.tsx +62 -0
  347. package/src/components/CopyableCode/CopyableCode.usage.mdx +168 -0
  348. package/src/components/CountBadge/CountBadge.stories.tsx +69 -0
  349. package/src/components/CountBadge/CountBadge.usage.mdx +215 -0
  350. package/src/components/CountUp/CountUp.usage.mdx +107 -0
  351. package/src/components/DatePicker/DatePicker.usage.mdx +177 -0
  352. package/src/components/DatePicker/RangeDatePicker.stories.tsx +87 -3
  353. package/src/components/ErrorFallback/ErrorFallback.types.ts +6 -0
  354. package/src/components/ErrorFallback/ErrorFallback.usage.mdx +127 -0
  355. package/src/components/ExpandableText/ExpandableText.stories.tsx +55 -0
  356. package/src/components/ExpandableText/ExpandableText.usage.mdx +176 -0
  357. package/src/components/FileInput/FileInput.stories.tsx +38 -1
  358. package/src/components/FileInput/FileInput.usage.mdx +178 -0
  359. package/src/components/FileItem/FileItem.stories.tsx +71 -0
  360. package/src/components/FileItem/FileItem.usage.mdx +180 -0
  361. package/src/components/FileList/FileList.stories.tsx +25 -0
  362. package/src/components/FileList/FileList.usage.mdx +165 -0
  363. package/src/components/FlyTo/FlyTo.usage.mdx +99 -0
  364. package/src/components/Form/Form.stories.tsx +149 -0
  365. package/src/components/Form/Form.usage.mdx +203 -0
  366. package/src/components/Form/FormModalFooter/FormModalFooter.stories.tsx +1 -1
  367. package/src/components/Form/FormModalFooter/FormModalFooter.test.tsx +19 -1
  368. package/src/components/Form/FormModalFooter/FormModalFooter.tsx +2 -0
  369. package/src/components/Form/FormModalFooter/FormModalFooter.types.ts +11 -1
  370. package/src/components/FormControl/FormControl.stories.tsx +35 -0
  371. package/src/components/FormControl/FormControl.usage.mdx +128 -0
  372. package/src/components/FormIntegration/FormIntegration.usage.mdx +158 -0
  373. package/src/components/FormLabel/FormLabel.stories.tsx +71 -0
  374. package/src/components/FormLabel/FormLabel.usage.mdx +125 -0
  375. package/src/components/Icon/Icon.stories.tsx +61 -1
  376. package/src/components/Icon/Icon.usage.mdx +158 -0
  377. package/src/components/IconButton/IconButton.stories.tsx +213 -5
  378. package/src/components/IconButton/IconButton.usage.mdx +275 -0
  379. package/src/components/InfoSprinkle/InfoSprinkle.stories.tsx +77 -1
  380. package/src/components/InfoSprinkle/InfoSprinkle.usage.mdx +189 -0
  381. package/src/components/InlineCode/InlineCode.stories.tsx +75 -0
  382. package/src/components/InlineCode/InlineCode.usage.mdx +142 -0
  383. package/src/components/Input/Input.stories.tsx +180 -0
  384. package/src/components/Input/Input.tsx +4 -0
  385. package/src/components/Input/Input.usage.mdx +278 -0
  386. package/src/components/LineGraph/LineGraph.stories.tsx +112 -0
  387. package/src/components/LineGraph/LineGraph.tsx +4 -5
  388. package/src/components/LineGraph/LineGraph.types.ts +12 -2
  389. package/src/components/LineGraph/LineGraph.usage.mdx +186 -0
  390. package/src/components/LineGraph/seriesColors.test.ts +10 -9
  391. package/src/components/LineGraph/seriesColors.ts +18 -16
  392. package/src/components/Loaders/Loaders.stories.tsx +93 -0
  393. package/src/components/Loaders/Loaders.usage.mdx +180 -0
  394. package/src/components/LogicianProvider/LogicianProvider.usage.mdx +98 -0
  395. package/src/components/Markdown/Markdown.stories.tsx +53 -0
  396. package/src/components/Markdown/Markdown.usage.mdx +182 -0
  397. package/src/components/Masonry/Masonry.stories.tsx +63 -1
  398. package/src/components/Masonry/Masonry.types.ts +8 -3
  399. package/src/components/Masonry/Masonry.usage.mdx +142 -0
  400. package/src/components/MaxLengthIndicator/MaxLengthIndicator.stories.tsx +57 -0
  401. package/src/components/MaxLengthIndicator/MaxLengthIndicator.usage.mdx +125 -0
  402. package/src/components/Menu/Menu.stories.tsx +146 -2
  403. package/src/components/Menu/Menu.usage.mdx +238 -0
  404. package/src/components/Menu/MenuItem.types.ts +8 -0
  405. package/src/components/Modal/Modal.stories.tsx +177 -1
  406. package/src/components/Modal/Modal.usage.mdx +262 -0
  407. package/src/components/Modal/ModalCloseButton.tsx +1 -1
  408. package/src/components/MonthPicker/MonthPicker.stories.tsx +30 -0
  409. package/src/components/MonthPicker/MonthPicker.usage.mdx +191 -0
  410. package/src/components/NavList/NavList.stories.tsx +927 -0
  411. package/src/components/NavList/NavList.styles.ts +114 -0
  412. package/src/components/NavList/NavList.test.tsx +1306 -0
  413. package/src/components/NavList/NavList.translations.json +9 -0
  414. package/src/components/NavList/NavList.tsx +160 -0
  415. package/src/components/NavList/NavList.types.ts +155 -0
  416. package/src/components/NavList/NavList.usage.mdx +545 -0
  417. package/src/components/NavList/NavListContext.ts +25 -0
  418. package/src/components/NavList/NavListGroup.tsx +243 -0
  419. package/src/components/NavList/NavListItem.tsx +543 -0
  420. package/src/components/NavList/NavListSkeleton.tsx +57 -0
  421. package/src/components/NavList/index.ts +15 -0
  422. package/src/components/Pagination/Pagination.stories.tsx +90 -1
  423. package/src/components/Pagination/Pagination.tsx +11 -10
  424. package/src/components/Pagination/Pagination.usage.mdx +186 -0
  425. package/src/components/PasswordInput/PasswordInput.stories.tsx +51 -0
  426. package/src/components/PasswordInput/PasswordInput.usage.mdx +193 -0
  427. package/src/components/PinInput/PinInput.stories.tsx +91 -0
  428. package/src/components/PinInput/PinInput.usage.mdx +194 -0
  429. package/src/components/Popover/Popover.stories.tsx +104 -1
  430. package/src/components/Popover/Popover.usage.mdx +197 -0
  431. package/src/components/ProgressBar/ProgressBar.stories.tsx +92 -1
  432. package/src/components/ProgressBar/ProgressBar.types.ts +9 -0
  433. package/src/components/ProgressBar/ProgressBar.usage.mdx +210 -0
  434. package/src/components/Pulse/Pulse.usage.mdx +102 -0
  435. package/src/components/RadialProgress/RadialProgress.stories.tsx +74 -1
  436. package/src/components/RadialProgress/RadialProgress.types.ts +21 -1
  437. package/src/components/RadialProgress/RadialProgress.usage.mdx +153 -0
  438. package/src/components/Radio/Radio.stories.tsx +119 -0
  439. package/src/components/Radio/Radio.usage.mdx +187 -0
  440. package/src/components/Reveal/Reveal.usage.mdx +105 -0
  441. package/src/components/ScaledContext/ScaledContext.usage.mdx +111 -0
  442. package/src/components/SeeMoreButton/SeeMoreButton.stories.tsx +146 -2
  443. package/src/components/SeeMoreButton/SeeMoreButton.types.ts +8 -0
  444. package/src/components/SeeMoreButton/SeeMoreButton.usage.mdx +213 -0
  445. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +69 -0
  446. package/src/components/SegmentedControl/SegmentedControl.tsx +6 -7
  447. package/src/components/SegmentedControl/SegmentedControl.usage.mdx +209 -0
  448. package/src/components/SegmentedProgressBar/SegmentedProgressBar.stories.tsx +54 -0
  449. package/src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts +2 -0
  450. package/src/components/SegmentedProgressBar/SegmentedProgressBar.usage.mdx +145 -0
  451. package/src/components/Select/Combobox.tsx +28 -3
  452. package/src/components/Select/Select.clearTrigger.test.tsx +76 -0
  453. package/src/components/Select/Select.stories.tsx +290 -1
  454. package/src/components/Select/Select.styles.ts +89 -0
  455. package/src/components/Select/Select.tsx +28 -2
  456. package/src/components/Select/Select.usage.mdx +341 -0
  457. package/src/components/Shake/Shake.usage.mdx +107 -0
  458. package/src/components/Slider/Slider.stories.tsx +116 -0
  459. package/src/components/Slider/Slider.usage.mdx +179 -0
  460. package/src/components/Spinner/Spinner.stories.tsx +64 -0
  461. package/src/components/Spinner/Spinner.usage.mdx +136 -0
  462. package/src/components/SwapTransition/SwapTransition.usage.mdx +102 -0
  463. package/src/components/Switch/Switch.stories.tsx +131 -6
  464. package/src/components/Switch/Switch.usage.mdx +199 -0
  465. package/src/components/Table/Table.stories.tsx +159 -1
  466. package/src/components/Table/Table.usage.mdx +235 -0
  467. package/src/components/Tabs/Tab/Tab.styles.ts +1 -1
  468. package/src/components/Tabs/Tabs.stories.tsx +86 -0
  469. package/src/components/Tabs/Tabs.usage.mdx +263 -0
  470. package/src/components/Tag/Tag.stories.tsx +181 -4
  471. package/src/components/Tag/Tag.usage.mdx +257 -0
  472. package/src/components/Textarea/Textarea.stories.tsx +113 -0
  473. package/src/components/Textarea/Textarea.tsx +4 -0
  474. package/src/components/Textarea/Textarea.usage.mdx +186 -0
  475. package/src/components/Toast/Toast.stories.tsx +185 -3
  476. package/src/components/Toast/Toast.styles.ts +18 -10
  477. package/src/components/Toast/Toast.usage.mdx +265 -0
  478. package/src/components/Tooltip/Tooltip.stories.tsx +86 -1
  479. package/src/components/Tooltip/Tooltip.usage.mdx +219 -0
  480. package/src/components/Tree/Tree.stories.tsx +89 -0
  481. package/src/components/Tree/Tree.usage.mdx +207 -0
  482. package/src/components/Typography/Caption.tsx +0 -1
  483. package/src/components/Typography/H1.tsx +0 -1
  484. package/src/components/Typography/H2.tsx +0 -1
  485. package/src/components/Typography/H3.tsx +0 -1
  486. package/src/components/Typography/H4.tsx +0 -1
  487. package/src/components/Typography/H5.tsx +0 -1
  488. package/src/components/Typography/Link.tsx +0 -1
  489. package/src/components/Typography/Overline.tsx +0 -1
  490. package/src/components/Typography/Subtext.tsx +0 -1
  491. package/src/components/Typography/Subtitle.tsx +0 -1
  492. package/src/components/Typography/Text.tsx +0 -1
  493. package/src/components/Typography/Typography.stories.tsx +117 -0
  494. package/src/components/Typography/Typography.usage.mdx +257 -0
  495. package/src/components/Workflow/Workflow.usage.mdx +199 -0
  496. package/src/components/a11y.kwcag.test.tsx +66 -0
  497. package/src/components/claude.md +1 -1
  498. package/src/components/noRawScales.test.ts +5 -1
  499. package/src/foundations/BrandAssets.mdx +637 -0
  500. package/src/foundations/BrandAssets.stories.tsx +680 -0
  501. package/src/foundations/BrandColour.mdx +366 -0
  502. package/src/foundations/BrandColour.stories.tsx +343 -0
  503. package/src/guidelines/ComponentPageTemplate.mdx +84 -0
  504. package/src/guidelines/FeedbackActions.mdx +162 -23
  505. package/src/guidelines/_components/Lang.tsx +175 -0
  506. package/src/guidelines/_components/TokenTable.tsx +136 -0
  507. package/src/hooks/useLanguage.ts +8 -3
  508. package/src/hooks/useTranslate.test.tsx +46 -0
  509. package/src/hooks/useTranslate.ts +7 -5
  510. package/src/index.ts +7 -1
  511. package/src/theme/BazePalette.stories.tsx +111 -1
  512. package/src/theme/Palette.stories.tsx +2 -2
  513. package/src/theme/SemanticTokens.mdx +76 -17
  514. package/src/theme/claude.md +23 -9
  515. package/src/theme/colors.ts +71 -18
  516. package/src/theme/contrast.test.ts +57 -0
  517. package/src/theme/global.ts +20 -1
  518. package/src/theme/index.ts +2 -0
  519. package/src/theme/palette.generated.ts +233 -123
  520. package/src/theme/paletteSwatches.test.ts +1 -1
  521. package/src/theme/paletteSwatches.ts +35 -0
  522. package/src/theme/recipes/avatar.ts +92 -0
  523. package/src/translations/Defaults.translations.json +14 -0
  524. package/src/utils/disabledControl.ts +8 -1
  525. package/src/utils/focusRing.ts +23 -0
@@ -0,0 +1,358 @@
1
+ import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
2
+
3
+ import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
4
+ import * as ButtonStories from './Button.stories';
5
+
6
+ <Meta of={ButtonStories} name="Usage" />
7
+
8
+ <LangToggle />
9
+
10
+ <En>
11
+
12
+ # Button
13
+
14
+ A control that does something on this screen: save, cancel, run, delete. One
15
+ `variant` sets fill, border and label colour together.
16
+
17
+ ## When to use
18
+
19
+ - To commit or cancel what the user is doing: the footer of a dialog, a form,
20
+ a settings pane (취소 · 저장).
21
+ - To start work: 실행, 생성, 보내기 with a label.
22
+ - To confirm a destructive step after the user has been told what it does
23
+ (삭제, 영구 삭제).
24
+ - As a call to action that navigates, rendered as a link with `as="a"` or a
25
+ router link (전체 보기, 문서).
26
+
27
+ ## When not to use
28
+
29
+ - The control is an icon with no visible label → `IconButton`, and give it an
30
+ `aria-label`.
31
+ - The action lives inside a toast or an inline banner → a text action in the
32
+ surface's own colour (see **Guidelines/Actions in feedback surfaces**), not a
33
+ Button.
34
+ - "Load more" at the end of a list that grows in place → `SeeMoreButton`.
35
+ - A choice that stays on or off → `Switch` or `Checkbox`. Picking one option
36
+ from a few → `SegmentedControl` or `Radio`, not a row of buttons.
37
+ - A link inside running text → a text link (`fg.link`).
38
+
39
+ ## Variants and what they mean
40
+
41
+ </En>
42
+
43
+ <Ko>
44
+
45
+ # Button
46
+
47
+ 지금 화면에서 무언가를 실행하는 컨트롤입니다. 저장, 취소, 실행, 삭제가 여기에
48
+ 해당합니다. `variant` 하나가 바탕, 테두리, 글자 색을 함께 정합니다.
49
+
50
+ ## 언제 쓰나요
51
+
52
+ - 사용자가 하던 일을 확정하거나 취소할 때: 대화상자, 폼, 설정 패널의 하단(취소 · 저장).
53
+ - 작업을 시작할 때: 라벨이 있는 실행, 생성, 보내기.
54
+ - 무슨 일이 일어나는지 알린 다음, 되돌릴 수 없는 단계를 확정할 때(삭제, 영구 삭제).
55
+ - 다른 화면으로 이동하는 행동 유도 버튼. 이때는 `as="a"`나 라우터 링크로 렌더해
56
+ 링크로 만듭니다(전체 보기, 문서).
57
+
58
+ ## 언제 쓰지 않나요
59
+
60
+ - 글자 없이 아이콘만 있는 컨트롤이라면 `IconButton`을 쓰고 `aria-label`을 붙입니다.
61
+ - 토스트나 인라인 배너 안의 동작이라면 Button 대신 그 면의 색을 따르는 텍스트
62
+ 동작을 씁니다(**Guidelines/Actions in feedback surfaces** 참고).
63
+ - 목록을 그 자리에서 늘리는 "더보기"라면 `SeeMoreButton`을 씁니다.
64
+ - 켜고 끄는 상태라면 `Switch`나 `Checkbox`를 씁니다. 몇 가지 중 하나를 고르는
65
+ 경우라면 버튼을 늘어놓지 말고 `SegmentedControl`이나 `Radio`를 씁니다.
66
+ - 본문 문장 속 링크라면 텍스트 링크(`fg.link`)를 씁니다.
67
+
68
+ ## 변형과 뜻
69
+
70
+ </Ko>
71
+
72
+ <ArgTypes of={ButtonStories} include={['variant', 'isDestructive', 'lift', 'focusableWhenDisabled', 'onDisabledClick']} />
73
+
74
+ <En>
75
+
76
+ | Variant | Means | Use for |
77
+ | --- | --- | --- |
78
+ | `primary` | The one main action of the screen | 저장, 확인, 요금제 업그레이드, 결제 |
79
+ | `action` | Run: start AI work. Black fill, coral icon | 실행, 생성 (with a leading icon) |
80
+ | `accent` | The one coloured call to action of a landing page or hero | 시작하기, 입장하기 on marketing surfaces |
81
+ | `secondary` | An alternative or a way out | 취소, 나중에, 필터 해제 |
82
+ | `subtle` (default) | A low-emphasis action that still needs a shape | 필터 초기화, 다시 시도, 더보기 / 접기 |
83
+ | `ghost` | Toolbars and inline actions next to content | 선택 해제, 닫기, 전체 보기 |
84
+ | `danger` | Confirms a destructive step | 삭제 in a confirmation dialog, 반려 |
85
+
86
+ `isDestructive` turns the label `danger.fg` on `secondary`, `subtle` and
87
+ `ghost`; it is ignored on the filled roles. Use it for a delete that sits among
88
+ other actions, and keep the red fill for the final confirmation.
89
+
90
+ ### Choosing a variant
91
+
92
+ 1. **Is it the step the screen exists for?** → `primary`. One per view. In
93
+ FactChat, `secondary` is used almost twice as often as `primary`: most
94
+ screens have one main action and several ways around it.
95
+ 2. **Does it start AI work?** → `action` with its icon. The coral icon is the
96
+ run signal; one per screen (Foundations: one run signal per screen).
97
+ 3. **Is it a marketing hero or landing CTA?** → `accent`. Product screens keep
98
+ `primary`; sign-up, payment and upgrade are black, not coral.
99
+ 4. **Does it delete or reject?** → in a confirmation, `danger`; anywhere else,
100
+ the quiet role plus `isDestructive`.
101
+ 5. **Otherwise** → `secondary` for an alternative, `ghost` in a toolbar or next
102
+ to content, `subtle` when a ghost would get lost on the surface.
103
+
104
+ ## Do / Don't
105
+
106
+ </En>
107
+
108
+ <Ko>
109
+
110
+ | 변형 | 뜻 | 예 |
111
+ | --- | --- | --- |
112
+ | `primary` | 화면의 주 행동 하나 | 저장, 확인, 요금제 업그레이드, 결제 |
113
+ | `action` | AI 작업 실행. 검정 바탕에 코랄 아이콘 | 실행, 생성(앞에 아이콘) |
114
+ | `accent` | 랜딩 페이지나 히어로 영역의 색 있는 행동 유도 버튼 하나 | 마케팅 화면의 시작하기, 입장하기 |
115
+ | `secondary` | 다른 선택지나 빠져나가는 길 | 취소, 나중에, 필터 해제 |
116
+ | `subtle` (기본) | 강조는 낮지만 모양은 있어야 하는 동작 | 필터 초기화, 다시 시도, 더보기 / 접기 |
117
+ | `ghost` | 툴바, 내용 옆의 인라인 동작 | 선택 해제, 닫기, 전체 보기 |
118
+ | `danger` | 되돌릴 수 없는 단계를 확정 | 확인 대화상자의 삭제, 반려 |
119
+
120
+ `isDestructive`는 `secondary`, `subtle`, `ghost`의 글자를 `danger.fg`로 바꿉니다.
121
+ 바탕이 있는 변형에서는 무시됩니다. 다른 동작과 나란히 있는 삭제에 쓰고, 빨간
122
+ 바탕은 마지막 확인 단계에만 씁니다.
123
+
124
+ ### 변형 고르기
125
+
126
+ 1. **이 화면이 있는 이유가 되는 단계인가요?** 그렇다면 `primary`입니다. 한 화면에
127
+ 하나만 둡니다. FactChat에서는 `secondary`가 `primary`보다 두 배 가까이 많이 쓰입니다.
128
+ 대부분의 화면은 주 행동 하나와 여러 개의 다른 길로 이루어지기 때문입니다.
129
+ 2. **AI 작업을 시작하나요?** 그렇다면 아이콘을 넣은 `action`입니다. 코랄 아이콘이
130
+ 실행 신호이며, 한 화면에 하나만 둡니다(Foundations의 실행 신호 규칙).
131
+ 3. **마케팅 히어로나 랜딩 페이지의 행동 유도 버튼인가요?** 그렇다면 `accent`입니다.
132
+ 제품 화면은 `primary`를 씁니다. 가입, 결제, 업그레이드 버튼은 코랄이 아니라
133
+ 검정입니다.
134
+ 4. **삭제하거나 반려하나요?** 확인 대화상자에서는 `danger`, 그 밖의 자리에서는 조용한
135
+ 변형에 `isDestructive`를 붙입니다.
136
+ 5. **그 밖에는** 다른 선택지에 `secondary`, 툴바나 내용 옆에 `ghost`, 면 위에서
137
+ ghost가 묻힐 때 `subtle`을 씁니다.
138
+
139
+ ## 이렇게 하세요 / 이렇게 하지 마세요
140
+
141
+ </Ko>
142
+
143
+ <Canvas of={ButtonStories.DoOnePrimary} />
144
+ <Verdict
145
+ kind="do"
146
+ en="Give the screen one primary, with the secondary to its left."
147
+ ko="주 행동은 하나만 primary로 두고, secondary는 그 왼쪽에 둡니다."
148
+ />
149
+
150
+ <Canvas of={ButtonStories.DontTwoPrimaries} />
151
+ <Verdict
152
+ kind="dont"
153
+ en="Make both buttons primary. The reader can no longer see which one moves them forward, and 취소 looks as safe as 저장."
154
+ ko="두 버튼을 모두 primary로 만들지 마세요. 어느 쪽이 다음 단계인지 보이지 않고, 취소가 저장만큼 중요해 보입니다."
155
+ />
156
+
157
+ <Canvas of={ButtonStories.DoDangerToConfirm} />
158
+ <Verdict
159
+ kind="do"
160
+ en="Use the danger fill on the button that confirms the deletion, after the dialog has said what is lost."
161
+ ko="빨간 바탕은 무엇이 사라지는지 알린 대화상자에서 삭제를 확정하는 버튼에만 씁니다."
162
+ />
163
+
164
+ <Canvas of={ButtonStories.DoQuietDestructiveInRows} />
165
+ <Verdict
166
+ kind="do"
167
+ en="In a list, use a quiet button with isDestructive. The red label marks the risk without shouting on every row."
168
+ ko="목록에서는 조용한 버튼에 isDestructive를 붙입니다. 빨간 글자가 위험을 알리면서도 줄마다 눈에 띄지는 않습니다."
169
+ />
170
+
171
+ <Canvas of={ButtonStories.DontDangerFillInRows} />
172
+ <Verdict
173
+ kind="dont"
174
+ en="Put a red-filled button on every row. Three red blocks read as three errors, and the fill means nothing by the time the dialog asks for confirmation."
175
+ ko="줄마다 빨간 바탕 버튼을 두지 마세요. 빨간 덩어리 세 개는 오류 세 개로 읽히고, 확인 대화상자의 빨간 버튼도 힘을 잃습니다."
176
+ />
177
+
178
+ <Canvas of={ButtonStories.DoPrimaryForUpgrade} />
179
+ <Verdict
180
+ kind="do"
181
+ en="Use primary (black) for upgrade, payment and sign-up in the product."
182
+ ko="제품 화면의 업그레이드, 결제, 가입 버튼에는 primary(검정)를 씁니다."
183
+ />
184
+
185
+ <Canvas of={ButtonStories.DontAccentForUpgrade} />
186
+ <Verdict
187
+ kind="dont"
188
+ en="Use the coral accent for upgrade or payment. Coral is kept for send, run and the landing CTA, and it sits only a few degrees from the error red."
189
+ ko="업그레이드나 결제에 코랄 accent를 쓰지 마세요. 코랄은 보내기, 실행, 랜딩 페이지의 행동 유도 버튼에만 씁니다. 게다가 코랄은 오류 빨강과 색상이 몇 도밖에 차이 나지 않습니다."
190
+ />
191
+
192
+ <Canvas of={ButtonStories.DoLoadingText} />
193
+ <Verdict
194
+ kind="do"
195
+ en="While the action runs, set loading with a loadingText. The button is disabled and says what is happening."
196
+ ko="동작이 진행되는 동안 loading과 loadingText를 함께 줍니다. 버튼은 비활성이 되고, 무슨 일이 진행 중인지 글자로 알립니다."
197
+ />
198
+
199
+ <Canvas of={ButtonStories.DontSpinnerOnly} />
200
+ <Verdict
201
+ kind="dont"
202
+ en="Set loading with no loadingText. The label is hidden behind the spinner, so the button has no visible words and screen readers may get no name."
203
+ ko="loadingText 없이 loading만 주지 마세요. 라벨이 스피너 뒤로 숨어 눈에 보이는 글자가 없어지고, 화면 낭독기에도 이름이 전달되지 않을 수 있습니다."
204
+ />
205
+
206
+ <Canvas of={ButtonStories.FocusableWhenDisabled} />
207
+ <Verdict
208
+ kind="do"
209
+ en="When the reason a button is disabled can be out of view, add focusableWhenDisabled and answer onDisabledClick by moving focus to what is missing. Without it the button cannot be reached by Tab and a press does nothing."
210
+ ko="버튼이 비활성인 이유가 화면 밖에 있을 수 있다면 focusableWhenDisabled를 붙이고, onDisabledClick에서 빠진 항목으로 초점을 옮깁니다. 붙이지 않으면 Tab으로 닿지 않고, 눌러도 아무 반응이 없습니다."
211
+ />
212
+
213
+ <En>
214
+
215
+ ## Content
216
+
217
+ - Start with a verb, or a noun that names the result: 저장, 삭제, 내려받기,
218
+ 초대 보내기. One to three words.
219
+ - Say what will happen, not "확인" or "예" when a verb fits. In a delete
220
+ dialog the confirm button says 삭제, not 확인.
221
+ - Sentence case in English ("Save changes"). No full stop, no 「」 or quotation
222
+ marks.
223
+ - Keep the same word for the same action across a flow: if the dialog title
224
+ says 삭제, the button says 삭제, not 제거.
225
+ - `loadingText` is a short present-tense state: 저장 중, 실행 중.
226
+
227
+ ## Accessibility
228
+
229
+ What Button does for you:
230
+
231
+ - It renders a native `<button type="button">`, so Tab reaches it and Enter
232
+ and Space activate it (WCAG 2.1.1). It will not submit a form by accident;
233
+ pass `type="submit"` when it should.
234
+ - A keyboard focus ring (`focus.ring` with a canvas-coloured inner band) on
235
+ `:focus-visible` only, with no transition (WCAG 2.4.7).
236
+ - Disabled is a fixed colour pair (`disabled.bg` / `disabled.fg`; the
237
+ fill-less `ghost` uses the lighter `disabled.fgGhost` label alone), not
238
+ opacity, and does not react to hover or press. The cursor is `not-allowed`,
239
+ and `progress` while `loading`.
240
+ - `loading` disables the button and shows a spinner.
241
+ - With `as="a"` or a router link it renders that element, so a navigating
242
+ button is announced as a link and keeps open-in-new-tab.
243
+
244
+ What you still have to do:
245
+
246
+ - **Give it words.** The visible label is the accessible name (WCAG 4.1.2).
247
+ An icon next to the label is decoration. With no visible label, use
248
+ `IconButton` with `aria-label`. If you add an `aria-label` to a Button with
249
+ text, it must start with the visible words (WCAG 2.5.3).
250
+ - **Pass `loadingText`** with `loading`. Without it the label is hidden behind
251
+ the spinner.
252
+ - **Say why it is disabled.** A disabled `<button>` cannot be focused, so a
253
+ keyboard or screen reader user may never find it. Put the reason in text
254
+ near it. When the reason is out of view (a consent box at the bottom of a
255
+ long form), add `focusableWhenDisabled`: the button stays in the Tab order
256
+ as `aria-disabled="true"`, looks and refuses the same, and calls
257
+ `onDisabledClick` instead of `onClick` when pressed — use it to move focus
258
+ to what is missing. Point `aria-describedby` at the reason text.
259
+ - **Only phrasing content inside** (ACCESSIBILITY.md §5). No `<div>` or `<p>`
260
+ inside a Button; wrap with `as="span"` and set `display`.
261
+ - **No button inside another control.** Don't put a Button inside a clickable
262
+ card or a `role="button"` wrapper (ACCESSIBILITY.md §3, axe
263
+ `nested-interactive`).
264
+ - **Words, not colour alone** (WCAG 1.4.1). `danger` and `isDestructive`
265
+ colour the button; the label (삭제) is what tells the user.
266
+
267
+ ## Tokens
268
+
269
+ The table is generated from `Button.styles.ts` and the theme. `transparent`
270
+ fills and borders are left out.
271
+
272
+ </En>
273
+
274
+ <Ko>
275
+
276
+ ## 문구
277
+
278
+ - 동사나 결과를 가리키는 명사로 시작합니다: 저장, 삭제, 내려받기, 초대 보내기. 한
279
+ 단어에서 세 단어까지 씁니다.
280
+ - 알맞은 동사가 있으면 "확인"이나 "예" 대신 무슨 일이 일어나는지 적습니다. 삭제
281
+ 대화상자의 확정 버튼은 "확인"이 아니라 "삭제"입니다.
282
+ - 영어는 문장형 대소문자를 씁니다("Save changes"). 마침표, 「」, 따옴표를 쓰지
283
+ 않습니다.
284
+ - 한 흐름 안에서 같은 동작에는 같은 말을 씁니다. 대화상자 제목이 "삭제"라면 버튼도
285
+ "제거"가 아니라 "삭제"입니다.
286
+ - `loadingText`는 지금 진행 중인 상태를 짧게 씁니다: 저장 중, 실행 중.
287
+
288
+ ## 접근성
289
+
290
+ Button이 알아서 하는 일
291
+
292
+ - 기본 `<button type="button">`으로 렌더하므로 Tab으로 이동하고 Enter와 Space로
293
+ 실행합니다(WCAG 2.1.1). 실수로 폼을 제출하지 않으며, 제출해야 할 때는
294
+ `type="submit"`을 줍니다.
295
+ - 키보드 초점에만(`:focus-visible`) 초점 링을 그립니다. `focus.ring`에 바탕색 안쪽
296
+ 띠를 더한 모양이며, 전환 효과 없이 바로 나타납니다(WCAG 2.4.7).
297
+ - 비활성 상태는 투명도가 아니라 고정된 색 한 쌍(`disabled.bg` / `disabled.fg`)이며
298
+ 바탕이 없는 `ghost`는 더 옅은 글자색 `disabled.fgGhost`만 씁니다.
299
+ 마우스를 올리거나 눌러도 변하지 않습니다. 커서는 `not-allowed`이고, `loading`
300
+ 중에는 `progress`입니다.
301
+ - `loading`을 주면 버튼이 비활성이 되고 스피너가 나타납니다.
302
+ - `as="a"`나 라우터 링크를 주면 그 요소로 렌더합니다. 이동하는 버튼이 링크로 읽히고
303
+ 새 탭에서 열기도 그대로 됩니다.
304
+
305
+ 직접 챙겨야 하는 일
306
+
307
+ - **글자를 넣습니다.** 눈에 보이는 라벨이 접근 가능한 이름입니다(WCAG 4.1.2).
308
+ 라벨 옆의 아이콘은 장식입니다. 보이는 라벨이 없다면 `IconButton`에
309
+ `aria-label`을 붙여 씁니다. 글자가 있는 Button에 `aria-label`을 더한다면 보이는
310
+ 글자로 시작해야 합니다(WCAG 2.5.3).
311
+ - **`loading`에는 `loadingText`를 함께 줍니다.** 없으면 라벨이 스피너 뒤로 숨습니다.
312
+ - **왜 비활성인지 알립니다.** 비활성 `<button>`은 초점을 받지 못해 키보드나 화면
313
+ 낭독기 사용자는 버튼이 있다는 것조차 모를 수 있습니다. 가까운 곳에 이유를 글로
314
+ 적습니다. 이유가 화면 밖에 있다면(긴 폼 맨 아래의 동의 체크박스) `focusableWhenDisabled`를
315
+ 붙입니다. 버튼이 `aria-disabled="true"`로 Tab 순서에 남고, 모양과 막히는 동작은
316
+ 같으며, 누르면 `onClick` 대신 `onDisabledClick`을 부릅니다. 여기서 빠진 항목으로
317
+ 초점을 옮기고, `aria-describedby`로 이유 문구를 가리킵니다.
318
+ - **안에는 구문 콘텐츠만 넣습니다**(ACCESSIBILITY.md 5절). Button 안에 `<div>`나
319
+ `<p>`를 넣지 않습니다. 감싸야 한다면 `as="span"`에 `display`를 지정합니다.
320
+ - **컨트롤 안에 버튼을 넣지 않습니다.** 누를 수 있는 카드나 `role="button"` 래퍼 안에
321
+ Button을 두지 않습니다(ACCESSIBILITY.md 3절, axe `nested-interactive`).
322
+ - **색만으로 알리지 않습니다**(WCAG 1.4.1). `danger`와 `isDestructive`는 색을 바꿀
323
+ 뿐이고, 뜻은 "삭제" 같은 라벨이 전합니다.
324
+
325
+ ## 토큰
326
+
327
+ 아래 표는 `Button.styles.ts`와 테마에서 자동으로 만듭니다. `transparent`인 바탕과
328
+ 테두리는 뺐습니다.
329
+
330
+ </Ko>
331
+
332
+ <Canvas of={ButtonStories.UsageTokens} sourceState="none" />
333
+
334
+ <En>
335
+
336
+ ## Related
337
+
338
+ - **IconButton**: the same roles for an icon with no visible label.
339
+ - **SeeMoreButton**: "load more" at the end of a list.
340
+ - **Guidelines/Actions in feedback surfaces**: which control goes in a toast,
341
+ a banner, a pane or a dialog.
342
+ - **Foundations/Brand & colour usage**: why button states are black, and where
343
+ coral may go.
344
+
345
+ </En>
346
+
347
+ <Ko>
348
+
349
+ ## 관련 컴포넌트
350
+
351
+ - **IconButton**: 보이는 라벨 없이 아이콘만 있는 버튼. 역할은 같습니다.
352
+ - **SeeMoreButton**: 목록 끝의 "더보기".
353
+ - **Guidelines/Actions in feedback surfaces**: 토스트, 배너, 패널, 대화상자에 어떤
354
+ 컨트롤을 두는지.
355
+ - **Foundations/Brand & colour usage**: 버튼 상태를 검정으로 표현하는 이유와 코랄을
356
+ 쓰는 자리.
357
+
358
+ </Ko>
@@ -4,7 +4,10 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
4
4
 
5
5
  import { system } from '../../theme';
6
6
  import { IconButton } from '../IconButton';
7
- import { getIconButtonStyles } from '../IconButton/IconButton.styles';
7
+ import {
8
+ getIconButtonStyles,
9
+ iconButtonVariantStyles,
10
+ } from '../IconButton/IconButton.styles';
8
11
  import { Button } from './Button';
9
12
  import {
10
13
  __resetLegacyButtonWarnings,
@@ -62,8 +65,17 @@ describe('Button variants (5.0)', () => {
62
65
  color: 'disabled.fg',
63
66
  opacity: 1,
64
67
  });
68
+ // Fill-less: no disabled.bg, so a lighter glyph/label carries the state.
65
69
  expect(buttonVariantStyles.ghost._disabled).toMatchObject({
66
70
  bg: 'transparent',
71
+ color: 'disabled.fgGhost',
72
+ });
73
+ expect(iconButtonVariantStyles.ghost._disabled).toMatchObject({
74
+ bg: 'transparent',
75
+ color: 'disabled.fgGhost',
76
+ });
77
+ expect(iconButtonVariantStyles.secondary._disabled).toMatchObject({
78
+ bg: 'disabled.bg',
67
79
  color: 'disabled.fg',
68
80
  });
69
81
  });
@@ -1,6 +1,11 @@
1
+ import { Flex } from '@chakra-ui/react';
1
2
  import type { Meta, StoryObj } from '@storybook/react';
2
3
 
4
+ import { TokenTable } from '../../guidelines/_components/TokenTable';
5
+ import { Button } from '../Button';
6
+ import { Subtext, Text } from '../Typography';
3
7
  import { Card } from './Card';
8
+ import { clickableStyles, variantStyles } from './Card.styles';
4
9
 
5
10
  const meta = {
6
11
  title: 'Components/Card',
@@ -9,6 +14,15 @@ const meta = {
9
14
  children: 'Default Card',
10
15
  p: 8,
11
16
  },
17
+ argTypes: {
18
+ variant: {
19
+ control: 'select',
20
+ options: ['default', 'wash', 'elevated'],
21
+ description:
22
+ '`default`: `bg.surface` + `border.subtle` hairline. `wash`: `bg.muted`, no border — a block that summarises or concludes. `elevated`: soft `sm` shadow — a standalone raised object.',
23
+ table: { defaultValue: { summary: 'default' } },
24
+ },
25
+ },
12
26
  } satisfies Meta<typeof Card>;
13
27
 
14
28
  export default meta;
@@ -52,3 +66,95 @@ export const AsButton: Story = {
52
66
  <Card {...args} as="button" type="button" textAlign="left" />
53
67
  ),
54
68
  };
69
+
70
+ // ───────────────────────── Usage-page specimens ─────────────────────────
71
+ // Pulled into `Card.usage.mdx` with <Canvas of={…} />. Hidden from the
72
+ // sidebar (`!dev`); `tags` is written out on each story because the indexer
73
+ // reads CSF statically.
74
+
75
+ const CourseBody = () => (
76
+ <>
77
+ <Text fontWeight="bold">AI 글쓰기 기초</Text>
78
+ <Subtext color="fg.muted">수강생 42명 · 6주 과정</Subtext>
79
+ </>
80
+ );
81
+
82
+ export const DoClickableIsTheLink: Story = {
83
+ tags: ['!dev'],
84
+ parameters: { layout: 'padded' },
85
+ name: 'Usage / Do: a clickable card is the link',
86
+ render: () => (
87
+ <Card clickable as="a" href="#course-1" p={5} maxW="320px">
88
+ <CourseBody />
89
+ </Card>
90
+ ),
91
+ };
92
+
93
+ export const DontButtonInClickable: Story = {
94
+ tags: ['!dev'],
95
+ parameters: { layout: 'padded' },
96
+ name: "Usage / Don't: a second control inside a clickable card",
97
+ render: () => (
98
+ <Card clickable onClick={() => {}} p={5} maxW="320px">
99
+ <CourseBody />
100
+ <Flex mt={3}>
101
+ <Button size="sm" variant="secondary">
102
+ 삭제
103
+ </Button>
104
+ </Flex>
105
+ </Card>
106
+ ),
107
+ };
108
+
109
+ export const DoWashForSummary: Story = {
110
+ tags: ['!dev'],
111
+ parameters: { layout: 'padded' },
112
+ name: 'Usage / Do: wash for a summary or result',
113
+ render: () => (
114
+ <Card variant="wash" p={5} maxW="420px">
115
+ <Text fontWeight="bold" mb={1}>
116
+ 요약
117
+ </Text>
118
+ <Text>다음 주까지 요금제 변경안을 정리하고, 금요일에 다시 검토합니다.</Text>
119
+ </Card>
120
+ ),
121
+ };
122
+
123
+ export const DontNestedCards: Story = {
124
+ tags: ['!dev'],
125
+ parameters: { layout: 'padded' },
126
+ name: "Usage / Don't: cards inside cards",
127
+ render: () => (
128
+ <Card p={5} maxW="420px">
129
+ <Text fontWeight="bold" mb={3}>
130
+ 이번 달
131
+ </Text>
132
+ <Card p={4} mb={2}>
133
+ <Text>사용 크레딧 8,489</Text>
134
+ </Card>
135
+ <Card p={4}>
136
+ <Text>남은 크레딧 1,511</Text>
137
+ </Card>
138
+ </Card>
139
+ ),
140
+ };
141
+
142
+ /** Colour tokens from `Card.tsx` (base) and `Card.styles.ts`. */
143
+ const CARD_TOKENS: { token: string; use: string }[] = [
144
+ { token: 'bg.surface', use: 'default · background' },
145
+ { token: 'fg.default', use: 'text' },
146
+ { token: 'border.subtle', use: 'default, elevated · border' },
147
+ { token: variantStyles.wash.bg, use: 'wash · background (no border)' },
148
+ { token: clickableStyles._hover.bg, use: 'clickable · hover background' },
149
+ {
150
+ token: clickableStyles._hover.borderColor,
151
+ use: 'clickable · hover border',
152
+ },
153
+ ];
154
+
155
+ export const UsageTokens: Story = {
156
+ tags: ['!dev'],
157
+ parameters: { layout: 'padded' },
158
+ name: 'Usage / Tokens',
159
+ render: () => <TokenTable rows={CARD_TOKENS} />,
160
+ };
@@ -7,7 +7,19 @@ import type { PolymorphicProps } from '../../types/polymorphic';
7
7
  export type CardVariant = 'default' | 'wash' | 'elevated';
8
8
 
9
9
  export type CardOwnProps = Omit<ChakraCardRootProps, 'as'> & {
10
+ /**
11
+ * The whole card is one target: pointer cursor, and on hover the ground
12
+ * steps to `bg.subtle` and the border to `border.strong`. Styling only —
13
+ * render it as the control with `as` (`as={NextLink}`, `as="button"`).
14
+ */
10
15
  clickable?: boolean;
16
+ /**
17
+ * `default`: `bg.surface` with a `border.subtle` hairline — most content.
18
+ * `wash`: `bg.muted`, no border — a block that summarises or concludes (an
19
+ * AI summary, a purchase total). `elevated`: a soft `sm` shadow — a
20
+ * standalone card that should read as a raised object.
21
+ * @default 'default'
22
+ */
11
23
  variant?: CardVariant;
12
24
  };
13
25