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

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 (533) 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/Code/shikiAdapter.d.ts +3 -1
  30. package/dist/components/Code/shikiAdapter.d.ts.map +1 -1
  31. package/dist/components/Code/shikiAdapter.js +29 -8
  32. package/dist/components/Code/shikiAdapter.js.map +1 -1
  33. package/dist/components/Code/shikiAdapter.mjs +29 -8
  34. package/dist/components/Code/shikiAdapter.mjs.map +1 -1
  35. package/dist/components/CodeTabs/CodeTabs.styles.d.ts +6 -5
  36. package/dist/components/CodeTabs/CodeTabs.styles.d.ts.map +1 -1
  37. package/dist/components/CodeTabs/CodeTabs.styles.js +6 -5
  38. package/dist/components/CodeTabs/CodeTabs.styles.js.map +1 -1
  39. package/dist/components/CodeTabs/CodeTabs.styles.mjs +6 -5
  40. package/dist/components/CodeTabs/CodeTabs.styles.mjs.map +1 -1
  41. package/dist/components/ColorMode/ColorModeToggle.d.ts +7 -2
  42. package/dist/components/ColorMode/ColorModeToggle.d.ts.map +1 -1
  43. package/dist/components/ColorMode/ColorModeToggle.js +8 -3
  44. package/dist/components/ColorMode/ColorModeToggle.js.map +1 -1
  45. package/dist/components/ColorMode/ColorModeToggle.mjs +8 -3
  46. package/dist/components/ColorMode/ColorModeToggle.mjs.map +1 -1
  47. package/dist/components/Confetti/Confetti.types.d.ts +5 -1
  48. package/dist/components/Confetti/Confetti.types.d.ts.map +1 -1
  49. package/dist/components/Confetti/confettiColors.d.ts +5 -5
  50. package/dist/components/Confetti/confettiColors.js +5 -5
  51. package/dist/components/Confetti/confettiColors.mjs +5 -5
  52. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts +6 -0
  53. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts.map +1 -1
  54. package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts +1 -1
  55. package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts.map +1 -1
  56. package/dist/components/Form/FormModalFooter/FormModalFooter.js +2 -2
  57. package/dist/components/Form/FormModalFooter/FormModalFooter.js.map +1 -1
  58. package/dist/components/Form/FormModalFooter/FormModalFooter.mjs +2 -2
  59. package/dist/components/Form/FormModalFooter/FormModalFooter.mjs.map +1 -1
  60. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts +11 -1
  61. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts.map +1 -1
  62. package/dist/components/Form/FormSection/CollapsibleFormSection.js +1 -0
  63. package/dist/components/Form/FormSection/CollapsibleFormSection.js.map +1 -1
  64. package/dist/components/Form/FormSection/CollapsibleFormSection.mjs +1 -0
  65. package/dist/components/Form/FormSection/CollapsibleFormSection.mjs.map +1 -1
  66. package/dist/components/Input/Input.d.ts.map +1 -1
  67. package/dist/components/Input/Input.js +4 -0
  68. package/dist/components/Input/Input.js.map +1 -1
  69. package/dist/components/Input/Input.mjs +4 -0
  70. package/dist/components/Input/Input.mjs.map +1 -1
  71. package/dist/components/LineGraph/LineGraph.d.ts.map +1 -1
  72. package/dist/components/LineGraph/LineGraph.js +4 -5
  73. package/dist/components/LineGraph/LineGraph.js.map +1 -1
  74. package/dist/components/LineGraph/LineGraph.mjs +5 -6
  75. package/dist/components/LineGraph/LineGraph.mjs.map +1 -1
  76. package/dist/components/LineGraph/LineGraph.types.d.ts +12 -2
  77. package/dist/components/LineGraph/LineGraph.types.d.ts.map +1 -1
  78. package/dist/components/LineGraph/seriesColors.d.ts +12 -8
  79. package/dist/components/LineGraph/seriesColors.d.ts.map +1 -1
  80. package/dist/components/LineGraph/seriesColors.js +8 -7
  81. package/dist/components/LineGraph/seriesColors.js.map +1 -1
  82. package/dist/components/LineGraph/seriesColors.mjs +8 -7
  83. package/dist/components/LineGraph/seriesColors.mjs.map +1 -1
  84. package/dist/components/Masonry/Masonry.types.d.ts +8 -3
  85. package/dist/components/Masonry/Masonry.types.d.ts.map +1 -1
  86. package/dist/components/Menu/MenuItem.types.d.ts +8 -0
  87. package/dist/components/Menu/MenuItem.types.d.ts.map +1 -1
  88. package/dist/components/Modal/ModalCloseButton.d.ts +1 -1
  89. package/dist/components/Modal/ModalCloseButton.js +1 -1
  90. package/dist/components/Modal/ModalCloseButton.mjs +1 -1
  91. package/dist/components/NavList/NavList.d.ts +35 -0
  92. package/dist/components/NavList/NavList.d.ts.map +1 -0
  93. package/dist/components/NavList/NavList.js +113 -0
  94. package/dist/components/NavList/NavList.js.map +1 -0
  95. package/dist/components/NavList/NavList.mjs +111 -0
  96. package/dist/components/NavList/NavList.mjs.map +1 -0
  97. package/dist/components/NavList/NavList.styles.d.ts +90 -0
  98. package/dist/components/NavList/NavList.styles.d.ts.map +1 -0
  99. package/dist/components/NavList/NavList.styles.js +104 -0
  100. package/dist/components/NavList/NavList.styles.js.map +1 -0
  101. package/dist/components/NavList/NavList.styles.mjs +97 -0
  102. package/dist/components/NavList/NavList.styles.mjs.map +1 -0
  103. package/dist/components/NavList/NavList.translations.json.js +19 -0
  104. package/dist/components/NavList/NavList.translations.json.js.map +1 -0
  105. package/dist/components/NavList/NavList.translations.json.mjs +14 -0
  106. package/dist/components/NavList/NavList.translations.json.mjs.map +1 -0
  107. package/dist/components/NavList/NavList.types.d.ts +140 -0
  108. package/dist/components/NavList/NavList.types.d.ts.map +1 -0
  109. package/dist/components/NavList/NavListContext.d.ts +30 -0
  110. package/dist/components/NavList/NavListContext.d.ts.map +1 -0
  111. package/dist/components/NavList/NavListContext.js +16 -0
  112. package/dist/components/NavList/NavListContext.js.map +1 -0
  113. package/dist/components/NavList/NavListContext.mjs +13 -0
  114. package/dist/components/NavList/NavListContext.mjs.map +1 -0
  115. package/dist/components/NavList/NavListGroup.d.ts +31 -0
  116. package/dist/components/NavList/NavListGroup.d.ts.map +1 -0
  117. package/dist/components/NavList/NavListGroup.js +115 -0
  118. package/dist/components/NavList/NavListGroup.js.map +1 -0
  119. package/dist/components/NavList/NavListGroup.mjs +113 -0
  120. package/dist/components/NavList/NavListGroup.mjs.map +1 -0
  121. package/dist/components/NavList/NavListItem.d.ts +16 -0
  122. package/dist/components/NavList/NavListItem.d.ts.map +1 -0
  123. package/dist/components/NavList/NavListItem.js +284 -0
  124. package/dist/components/NavList/NavListItem.js.map +1 -0
  125. package/dist/components/NavList/NavListItem.mjs +282 -0
  126. package/dist/components/NavList/NavListItem.mjs.map +1 -0
  127. package/dist/components/NavList/NavListSkeleton.d.ts +17 -0
  128. package/dist/components/NavList/NavListSkeleton.d.ts.map +1 -0
  129. package/dist/components/NavList/NavListSkeleton.js +33 -0
  130. package/dist/components/NavList/NavListSkeleton.js.map +1 -0
  131. package/dist/components/NavList/NavListSkeleton.mjs +31 -0
  132. package/dist/components/NavList/NavListSkeleton.mjs.map +1 -0
  133. package/dist/components/NavList/index.d.ts +7 -0
  134. package/dist/components/NavList/index.d.ts.map +1 -0
  135. package/dist/components/Pagination/Pagination.d.ts +11 -10
  136. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  137. package/dist/components/Pagination/Pagination.js +11 -10
  138. package/dist/components/Pagination/Pagination.js.map +1 -1
  139. package/dist/components/Pagination/Pagination.mjs +11 -10
  140. package/dist/components/Pagination/Pagination.mjs.map +1 -1
  141. package/dist/components/ProgressBar/ProgressBar.types.d.ts +9 -0
  142. package/dist/components/ProgressBar/ProgressBar.types.d.ts.map +1 -1
  143. package/dist/components/RadialProgress/RadialProgress.types.d.ts +21 -1
  144. package/dist/components/RadialProgress/RadialProgress.types.d.ts.map +1 -1
  145. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts +8 -0
  146. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts.map +1 -1
  147. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  148. package/dist/components/SegmentedControl/SegmentedControl.js +6 -7
  149. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
  150. package/dist/components/SegmentedControl/SegmentedControl.mjs +6 -7
  151. package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  152. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts +2 -0
  153. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts.map +1 -1
  154. package/dist/components/Select/Combobox.d.ts +1 -1
  155. package/dist/components/Select/Combobox.d.ts.map +1 -1
  156. package/dist/components/Select/Combobox.js +9 -2
  157. package/dist/components/Select/Combobox.js.map +1 -1
  158. package/dist/components/Select/Combobox.mjs +10 -3
  159. package/dist/components/Select/Combobox.mjs.map +1 -1
  160. package/dist/components/Select/Select.d.ts +1 -1
  161. package/dist/components/Select/Select.d.ts.map +1 -1
  162. package/dist/components/Select/Select.js +14 -2
  163. package/dist/components/Select/Select.js.map +1 -1
  164. package/dist/components/Select/Select.mjs +15 -3
  165. package/dist/components/Select/Select.mjs.map +1 -1
  166. package/dist/components/Select/Select.styles.d.ts +97 -1
  167. package/dist/components/Select/Select.styles.d.ts.map +1 -1
  168. package/dist/components/Select/Select.styles.js +83 -0
  169. package/dist/components/Select/Select.styles.js.map +1 -1
  170. package/dist/components/Select/Select.styles.mjs +82 -1
  171. package/dist/components/Select/Select.styles.mjs.map +1 -1
  172. package/dist/components/Tabs/Tab/Tab.styles.d.ts +1 -1
  173. package/dist/components/Tabs/Tab/Tab.styles.js +1 -1
  174. package/dist/components/Tabs/Tab/Tab.styles.mjs +1 -1
  175. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  176. package/dist/components/Textarea/Textarea.js +4 -0
  177. package/dist/components/Textarea/Textarea.js.map +1 -1
  178. package/dist/components/Textarea/Textarea.mjs +4 -0
  179. package/dist/components/Textarea/Textarea.mjs.map +1 -1
  180. package/dist/components/Toast/Toast.styles.d.ts +6 -2
  181. package/dist/components/Toast/Toast.styles.d.ts.map +1 -1
  182. package/dist/components/Toast/Toast.styles.js +18 -10
  183. package/dist/components/Toast/Toast.styles.js.map +1 -1
  184. package/dist/components/Toast/Toast.styles.mjs +18 -10
  185. package/dist/components/Toast/Toast.styles.mjs.map +1 -1
  186. package/dist/components/Typography/Caption.d.ts.map +1 -1
  187. package/dist/components/Typography/Caption.js +1 -1
  188. package/dist/components/Typography/Caption.js.map +1 -1
  189. package/dist/components/Typography/Caption.mjs +1 -1
  190. package/dist/components/Typography/Caption.mjs.map +1 -1
  191. package/dist/components/Typography/H1.d.ts.map +1 -1
  192. package/dist/components/Typography/H1.js +1 -1
  193. package/dist/components/Typography/H1.js.map +1 -1
  194. package/dist/components/Typography/H1.mjs +1 -1
  195. package/dist/components/Typography/H1.mjs.map +1 -1
  196. package/dist/components/Typography/H2.d.ts.map +1 -1
  197. package/dist/components/Typography/H2.js +1 -1
  198. package/dist/components/Typography/H2.js.map +1 -1
  199. package/dist/components/Typography/H2.mjs +1 -1
  200. package/dist/components/Typography/H2.mjs.map +1 -1
  201. package/dist/components/Typography/H3.d.ts.map +1 -1
  202. package/dist/components/Typography/H3.js +1 -1
  203. package/dist/components/Typography/H3.js.map +1 -1
  204. package/dist/components/Typography/H3.mjs +1 -1
  205. package/dist/components/Typography/H3.mjs.map +1 -1
  206. package/dist/components/Typography/H4.d.ts.map +1 -1
  207. package/dist/components/Typography/H4.js +1 -1
  208. package/dist/components/Typography/H4.js.map +1 -1
  209. package/dist/components/Typography/H4.mjs +1 -1
  210. package/dist/components/Typography/H4.mjs.map +1 -1
  211. package/dist/components/Typography/H5.d.ts.map +1 -1
  212. package/dist/components/Typography/H5.js +1 -1
  213. package/dist/components/Typography/H5.js.map +1 -1
  214. package/dist/components/Typography/H5.mjs +1 -1
  215. package/dist/components/Typography/H5.mjs.map +1 -1
  216. package/dist/components/Typography/Link.d.ts.map +1 -1
  217. package/dist/components/Typography/Link.js +1 -1
  218. package/dist/components/Typography/Link.js.map +1 -1
  219. package/dist/components/Typography/Link.mjs +1 -1
  220. package/dist/components/Typography/Link.mjs.map +1 -1
  221. package/dist/components/Typography/Overline.d.ts.map +1 -1
  222. package/dist/components/Typography/Overline.js +1 -1
  223. package/dist/components/Typography/Overline.js.map +1 -1
  224. package/dist/components/Typography/Overline.mjs +1 -1
  225. package/dist/components/Typography/Overline.mjs.map +1 -1
  226. package/dist/components/Typography/Subtext.d.ts.map +1 -1
  227. package/dist/components/Typography/Subtext.js +1 -1
  228. package/dist/components/Typography/Subtext.js.map +1 -1
  229. package/dist/components/Typography/Subtext.mjs +1 -1
  230. package/dist/components/Typography/Subtext.mjs.map +1 -1
  231. package/dist/components/Typography/Subtitle.d.ts.map +1 -1
  232. package/dist/components/Typography/Subtitle.js +1 -1
  233. package/dist/components/Typography/Subtitle.js.map +1 -1
  234. package/dist/components/Typography/Subtitle.mjs +1 -1
  235. package/dist/components/Typography/Subtitle.mjs.map +1 -1
  236. package/dist/components/Typography/Text.d.ts.map +1 -1
  237. package/dist/components/Typography/Text.js +1 -1
  238. package/dist/components/Typography/Text.js.map +1 -1
  239. package/dist/components/Typography/Text.mjs +1 -1
  240. package/dist/components/Typography/Text.mjs.map +1 -1
  241. package/dist/hooks/useLanguage.d.ts +5 -0
  242. package/dist/hooks/useLanguage.d.ts.map +1 -1
  243. package/dist/hooks/useLanguage.js +7 -3
  244. package/dist/hooks/useLanguage.js.map +1 -1
  245. package/dist/hooks/useLanguage.mjs +7 -4
  246. package/dist/hooks/useLanguage.mjs.map +1 -1
  247. package/dist/hooks/useTranslate.d.ts.map +1 -1
  248. package/dist/hooks/useTranslate.js +8 -5
  249. package/dist/hooks/useTranslate.js.map +1 -1
  250. package/dist/hooks/useTranslate.mjs +8 -5
  251. package/dist/hooks/useTranslate.mjs.map +1 -1
  252. package/dist/index.d.ts +2 -1
  253. package/dist/index.d.ts.map +1 -1
  254. package/dist/index.js +13 -0
  255. package/dist/index.js.map +1 -1
  256. package/dist/index.mjs +7 -2
  257. package/dist/index.mjs.map +1 -1
  258. package/dist/theme/colors.d.ts +2 -2
  259. package/dist/theme/colors.d.ts.map +1 -1
  260. package/dist/theme/colors.js +54 -18
  261. package/dist/theme/colors.js.map +1 -1
  262. package/dist/theme/colors.mjs +55 -19
  263. package/dist/theme/colors.mjs.map +1 -1
  264. package/dist/theme/global.d.ts.map +1 -1
  265. package/dist/theme/global.js +19 -1
  266. package/dist/theme/global.js.map +1 -1
  267. package/dist/theme/global.mjs +19 -1
  268. package/dist/theme/global.mjs.map +1 -1
  269. package/dist/theme/index.d.ts.map +1 -1
  270. package/dist/theme/index.js +2 -0
  271. package/dist/theme/index.js.map +1 -1
  272. package/dist/theme/index.mjs +2 -0
  273. package/dist/theme/index.mjs.map +1 -1
  274. package/dist/theme/palette.generated.d.ts +232 -123
  275. package/dist/theme/palette.generated.d.ts.map +1 -1
  276. package/dist/theme/palette.generated.js +233 -123
  277. package/dist/theme/palette.generated.js.map +1 -1
  278. package/dist/theme/palette.generated.mjs +233 -124
  279. package/dist/theme/palette.generated.mjs.map +1 -1
  280. package/dist/theme/paletteSwatches.d.ts +20 -0
  281. package/dist/theme/paletteSwatches.d.ts.map +1 -1
  282. package/dist/theme/recipes/avatar.d.ts +30 -0
  283. package/dist/theme/recipes/avatar.d.ts.map +1 -0
  284. package/dist/theme/recipes/avatar.js +96 -0
  285. package/dist/theme/recipes/avatar.js.map +1 -0
  286. package/dist/theme/recipes/avatar.mjs +94 -0
  287. package/dist/theme/recipes/avatar.mjs.map +1 -0
  288. package/dist/translations/Defaults.translations.json.js +19 -1
  289. package/dist/translations/Defaults.translations.json.js.map +1 -1
  290. package/dist/translations/Defaults.translations.json.mjs +18 -2
  291. package/dist/translations/Defaults.translations.json.mjs.map +1 -1
  292. package/dist/utils/disabledControl.d.ts +8 -1
  293. package/dist/utils/disabledControl.d.ts.map +1 -1
  294. package/dist/utils/disabledControl.js +8 -1
  295. package/dist/utils/disabledControl.js.map +1 -1
  296. package/dist/utils/disabledControl.mjs +8 -1
  297. package/dist/utils/disabledControl.mjs.map +1 -1
  298. package/dist/utils/focusRing.d.ts +22 -0
  299. package/dist/utils/focusRing.d.ts.map +1 -1
  300. package/dist/utils/focusRing.js +22 -0
  301. package/dist/utils/focusRing.js.map +1 -1
  302. package/dist/utils/focusRing.mjs +21 -1
  303. package/dist/utils/focusRing.mjs.map +1 -1
  304. package/package.json +2 -1
  305. package/src/components/Accordion/Accordion.stories.tsx +85 -0
  306. package/src/components/Accordion/Accordion.usage.mdx +200 -0
  307. package/src/components/Appear/Appear.usage.mdx +107 -0
  308. package/src/components/Avatar/Avatar.recipe.test.tsx +176 -0
  309. package/src/components/Avatar/Avatar.stories.tsx +199 -24
  310. package/src/components/Avatar/Avatar.tsx +118 -21
  311. package/src/components/Avatar/Avatar.usage.mdx +185 -0
  312. package/src/components/Avatar/index.tsx +8 -1
  313. package/src/components/Badge/Badge.stories.tsx +193 -3
  314. package/src/components/Badge/Badge.tsx +5 -3
  315. package/src/components/Badge/Badge.types.ts +7 -5
  316. package/src/components/Badge/Badge.usage.mdx +265 -0
  317. package/src/components/Banner/Banner.stories.tsx +152 -2
  318. package/src/components/Banner/Banner.types.ts +30 -1
  319. package/src/components/Banner/Banner.usage.mdx +233 -0
  320. package/src/components/BottomSheet/BottomSheet.stories.tsx +168 -1
  321. package/src/components/BottomSheet/BottomSheet.test.tsx +2 -1
  322. package/src/components/BottomSheet/BottomSheet.usage.mdx +216 -0
  323. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +59 -0
  324. package/src/components/Breadcrumb/Breadcrumb.usage.mdx +181 -0
  325. package/src/components/Button/Button.focusableWhenDisabled.test.tsx +218 -0
  326. package/src/components/Button/Button.stories.tsx +332 -3
  327. package/src/components/Button/Button.tsx +46 -3
  328. package/src/components/Button/Button.types.ts +38 -1
  329. package/src/components/Button/Button.usage.mdx +358 -0
  330. package/src/components/Button/Button.variants.test.tsx +13 -1
  331. package/src/components/Card/Card.stories.tsx +106 -0
  332. package/src/components/Card/Card.types.ts +12 -0
  333. package/src/components/Card/Card.usage.mdx +216 -0
  334. package/src/components/Checkbox/Checkbox.stories.tsx +140 -13
  335. package/src/components/Checkbox/Checkbox.usage.mdx +214 -0
  336. package/src/components/Chip/Chip.usage.mdx +78 -0
  337. package/src/components/Code/Code.stories.tsx +60 -0
  338. package/src/components/Code/Code.test.tsx +116 -0
  339. package/src/components/Code/Code.usage.mdx +187 -0
  340. package/src/components/Code/shikiAdapter.ts +38 -9
  341. package/src/components/CodeTabs/CodeTabs.stories.tsx +53 -0
  342. package/src/components/CodeTabs/CodeTabs.styles.ts +6 -5
  343. package/src/components/CodeTabs/CodeTabs.usage.mdx +176 -0
  344. package/src/components/Collapsible/Collapsible.stories.tsx +58 -0
  345. package/src/components/Collapsible/Collapsible.usage.mdx +173 -0
  346. package/src/components/ColorMode/ColorMode.stories.tsx +50 -0
  347. package/src/components/ColorMode/ColorMode.usage.mdx +135 -0
  348. package/src/components/ColorMode/ColorModeToggle.tsx +10 -3
  349. package/src/components/Confetti/Confetti.types.ts +5 -1
  350. package/src/components/Confetti/Confetti.usage.mdx +111 -0
  351. package/src/components/Confetti/confettiColors.ts +5 -5
  352. package/src/components/Container/Container.stories.tsx +32 -0
  353. package/src/components/Container/Container.usage.mdx +130 -0
  354. package/src/components/CopyableCode/CopyableCode.stories.tsx +62 -0
  355. package/src/components/CopyableCode/CopyableCode.usage.mdx +168 -0
  356. package/src/components/CountBadge/CountBadge.stories.tsx +69 -0
  357. package/src/components/CountBadge/CountBadge.usage.mdx +215 -0
  358. package/src/components/CountUp/CountUp.usage.mdx +107 -0
  359. package/src/components/DatePicker/DatePicker.usage.mdx +177 -0
  360. package/src/components/DatePicker/RangeDatePicker.stories.tsx +87 -3
  361. package/src/components/ErrorFallback/ErrorFallback.types.ts +6 -0
  362. package/src/components/ErrorFallback/ErrorFallback.usage.mdx +127 -0
  363. package/src/components/ExpandableText/ExpandableText.stories.tsx +55 -0
  364. package/src/components/ExpandableText/ExpandableText.usage.mdx +176 -0
  365. package/src/components/FileInput/FileInput.stories.tsx +38 -1
  366. package/src/components/FileInput/FileInput.usage.mdx +178 -0
  367. package/src/components/FileItem/FileItem.stories.tsx +71 -0
  368. package/src/components/FileItem/FileItem.usage.mdx +180 -0
  369. package/src/components/FileList/FileList.stories.tsx +25 -0
  370. package/src/components/FileList/FileList.usage.mdx +165 -0
  371. package/src/components/FlyTo/FlyTo.usage.mdx +99 -0
  372. package/src/components/Form/Form.stories.tsx +149 -0
  373. package/src/components/Form/Form.usage.mdx +203 -0
  374. package/src/components/Form/FormModalFooter/FormModalFooter.stories.tsx +1 -1
  375. package/src/components/Form/FormModalFooter/FormModalFooter.test.tsx +19 -1
  376. package/src/components/Form/FormModalFooter/FormModalFooter.tsx +2 -0
  377. package/src/components/Form/FormModalFooter/FormModalFooter.types.ts +11 -1
  378. package/src/components/FormControl/FormControl.stories.tsx +35 -0
  379. package/src/components/FormControl/FormControl.usage.mdx +128 -0
  380. package/src/components/FormIntegration/FormIntegration.usage.mdx +158 -0
  381. package/src/components/FormLabel/FormLabel.stories.tsx +71 -0
  382. package/src/components/FormLabel/FormLabel.usage.mdx +125 -0
  383. package/src/components/Icon/Icon.stories.tsx +61 -1
  384. package/src/components/Icon/Icon.usage.mdx +158 -0
  385. package/src/components/IconButton/IconButton.stories.tsx +213 -5
  386. package/src/components/IconButton/IconButton.usage.mdx +275 -0
  387. package/src/components/InfoSprinkle/InfoSprinkle.stories.tsx +77 -1
  388. package/src/components/InfoSprinkle/InfoSprinkle.usage.mdx +189 -0
  389. package/src/components/InlineCode/InlineCode.stories.tsx +75 -0
  390. package/src/components/InlineCode/InlineCode.usage.mdx +142 -0
  391. package/src/components/Input/Input.stories.tsx +180 -0
  392. package/src/components/Input/Input.tsx +4 -0
  393. package/src/components/Input/Input.usage.mdx +278 -0
  394. package/src/components/LineGraph/LineGraph.stories.tsx +112 -0
  395. package/src/components/LineGraph/LineGraph.tsx +4 -5
  396. package/src/components/LineGraph/LineGraph.types.ts +12 -2
  397. package/src/components/LineGraph/LineGraph.usage.mdx +186 -0
  398. package/src/components/LineGraph/seriesColors.test.ts +10 -9
  399. package/src/components/LineGraph/seriesColors.ts +18 -16
  400. package/src/components/Loaders/Loaders.stories.tsx +93 -0
  401. package/src/components/Loaders/Loaders.usage.mdx +180 -0
  402. package/src/components/LogicianProvider/LogicianProvider.usage.mdx +98 -0
  403. package/src/components/Markdown/Markdown.stories.tsx +53 -0
  404. package/src/components/Markdown/Markdown.usage.mdx +182 -0
  405. package/src/components/Masonry/Masonry.stories.tsx +63 -1
  406. package/src/components/Masonry/Masonry.types.ts +8 -3
  407. package/src/components/Masonry/Masonry.usage.mdx +142 -0
  408. package/src/components/MaxLengthIndicator/MaxLengthIndicator.stories.tsx +57 -0
  409. package/src/components/MaxLengthIndicator/MaxLengthIndicator.usage.mdx +125 -0
  410. package/src/components/Menu/Menu.stories.tsx +146 -2
  411. package/src/components/Menu/Menu.usage.mdx +238 -0
  412. package/src/components/Menu/MenuItem.types.ts +8 -0
  413. package/src/components/Modal/Modal.stories.tsx +177 -1
  414. package/src/components/Modal/Modal.usage.mdx +262 -0
  415. package/src/components/Modal/ModalCloseButton.tsx +1 -1
  416. package/src/components/MonthPicker/MonthPicker.stories.tsx +30 -0
  417. package/src/components/MonthPicker/MonthPicker.usage.mdx +191 -0
  418. package/src/components/NavList/NavList.stories.tsx +927 -0
  419. package/src/components/NavList/NavList.styles.ts +114 -0
  420. package/src/components/NavList/NavList.test.tsx +1306 -0
  421. package/src/components/NavList/NavList.translations.json +9 -0
  422. package/src/components/NavList/NavList.tsx +160 -0
  423. package/src/components/NavList/NavList.types.ts +155 -0
  424. package/src/components/NavList/NavList.usage.mdx +545 -0
  425. package/src/components/NavList/NavListContext.ts +25 -0
  426. package/src/components/NavList/NavListGroup.tsx +243 -0
  427. package/src/components/NavList/NavListItem.tsx +543 -0
  428. package/src/components/NavList/NavListSkeleton.tsx +57 -0
  429. package/src/components/NavList/index.ts +15 -0
  430. package/src/components/Pagination/Pagination.stories.tsx +90 -1
  431. package/src/components/Pagination/Pagination.tsx +11 -10
  432. package/src/components/Pagination/Pagination.usage.mdx +186 -0
  433. package/src/components/PasswordInput/PasswordInput.stories.tsx +51 -0
  434. package/src/components/PasswordInput/PasswordInput.usage.mdx +193 -0
  435. package/src/components/PinInput/PinInput.stories.tsx +91 -0
  436. package/src/components/PinInput/PinInput.usage.mdx +194 -0
  437. package/src/components/Popover/Popover.stories.tsx +104 -1
  438. package/src/components/Popover/Popover.usage.mdx +197 -0
  439. package/src/components/ProgressBar/ProgressBar.stories.tsx +92 -1
  440. package/src/components/ProgressBar/ProgressBar.types.ts +9 -0
  441. package/src/components/ProgressBar/ProgressBar.usage.mdx +210 -0
  442. package/src/components/Pulse/Pulse.usage.mdx +102 -0
  443. package/src/components/RadialProgress/RadialProgress.stories.tsx +74 -1
  444. package/src/components/RadialProgress/RadialProgress.types.ts +21 -1
  445. package/src/components/RadialProgress/RadialProgress.usage.mdx +153 -0
  446. package/src/components/Radio/Radio.stories.tsx +119 -0
  447. package/src/components/Radio/Radio.usage.mdx +187 -0
  448. package/src/components/Reveal/Reveal.usage.mdx +105 -0
  449. package/src/components/ScaledContext/ScaledContext.usage.mdx +111 -0
  450. package/src/components/SeeMoreButton/SeeMoreButton.stories.tsx +146 -2
  451. package/src/components/SeeMoreButton/SeeMoreButton.types.ts +8 -0
  452. package/src/components/SeeMoreButton/SeeMoreButton.usage.mdx +213 -0
  453. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +69 -0
  454. package/src/components/SegmentedControl/SegmentedControl.tsx +6 -7
  455. package/src/components/SegmentedControl/SegmentedControl.usage.mdx +209 -0
  456. package/src/components/SegmentedProgressBar/SegmentedProgressBar.stories.tsx +54 -0
  457. package/src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts +2 -0
  458. package/src/components/SegmentedProgressBar/SegmentedProgressBar.usage.mdx +145 -0
  459. package/src/components/Select/Combobox.tsx +28 -3
  460. package/src/components/Select/Select.clearTrigger.test.tsx +76 -0
  461. package/src/components/Select/Select.stories.tsx +290 -1
  462. package/src/components/Select/Select.styles.ts +89 -0
  463. package/src/components/Select/Select.tsx +28 -2
  464. package/src/components/Select/Select.usage.mdx +341 -0
  465. package/src/components/Shake/Shake.usage.mdx +107 -0
  466. package/src/components/Slider/Slider.stories.tsx +116 -0
  467. package/src/components/Slider/Slider.usage.mdx +179 -0
  468. package/src/components/Spinner/Spinner.stories.tsx +64 -0
  469. package/src/components/Spinner/Spinner.usage.mdx +136 -0
  470. package/src/components/SwapTransition/SwapTransition.usage.mdx +102 -0
  471. package/src/components/Switch/Switch.stories.tsx +131 -6
  472. package/src/components/Switch/Switch.usage.mdx +199 -0
  473. package/src/components/Table/Table.stories.tsx +159 -1
  474. package/src/components/Table/Table.usage.mdx +235 -0
  475. package/src/components/Tabs/Tab/Tab.styles.ts +1 -1
  476. package/src/components/Tabs/Tabs.stories.tsx +86 -0
  477. package/src/components/Tabs/Tabs.usage.mdx +263 -0
  478. package/src/components/Tag/Tag.stories.tsx +181 -4
  479. package/src/components/Tag/Tag.usage.mdx +257 -0
  480. package/src/components/Textarea/Textarea.stories.tsx +113 -0
  481. package/src/components/Textarea/Textarea.tsx +4 -0
  482. package/src/components/Textarea/Textarea.usage.mdx +186 -0
  483. package/src/components/Toast/Toast.stories.tsx +185 -3
  484. package/src/components/Toast/Toast.styles.ts +18 -10
  485. package/src/components/Toast/Toast.usage.mdx +265 -0
  486. package/src/components/Tooltip/Tooltip.stories.tsx +86 -1
  487. package/src/components/Tooltip/Tooltip.usage.mdx +219 -0
  488. package/src/components/Tree/Tree.stories.tsx +89 -0
  489. package/src/components/Tree/Tree.usage.mdx +207 -0
  490. package/src/components/Typography/Caption.tsx +0 -1
  491. package/src/components/Typography/H1.tsx +0 -1
  492. package/src/components/Typography/H2.tsx +0 -1
  493. package/src/components/Typography/H3.tsx +0 -1
  494. package/src/components/Typography/H4.tsx +0 -1
  495. package/src/components/Typography/H5.tsx +0 -1
  496. package/src/components/Typography/Link.tsx +0 -1
  497. package/src/components/Typography/Overline.tsx +0 -1
  498. package/src/components/Typography/Subtext.tsx +0 -1
  499. package/src/components/Typography/Subtitle.tsx +0 -1
  500. package/src/components/Typography/Text.tsx +0 -1
  501. package/src/components/Typography/Typography.stories.tsx +117 -0
  502. package/src/components/Typography/Typography.usage.mdx +257 -0
  503. package/src/components/Workflow/Workflow.usage.mdx +199 -0
  504. package/src/components/a11y.kwcag.test.tsx +66 -0
  505. package/src/components/claude.md +1 -1
  506. package/src/components/noRawScales.test.ts +5 -1
  507. package/src/foundations/BrandAssets.mdx +637 -0
  508. package/src/foundations/BrandAssets.stories.tsx +680 -0
  509. package/src/foundations/BrandColour.mdx +366 -0
  510. package/src/foundations/BrandColour.stories.tsx +343 -0
  511. package/src/guidelines/ComponentPageTemplate.mdx +84 -0
  512. package/src/guidelines/FeedbackActions.mdx +162 -23
  513. package/src/guidelines/_components/Lang.tsx +175 -0
  514. package/src/guidelines/_components/TokenTable.tsx +136 -0
  515. package/src/hooks/useLanguage.ts +8 -3
  516. package/src/hooks/useTranslate.test.tsx +46 -0
  517. package/src/hooks/useTranslate.ts +7 -5
  518. package/src/index.ts +7 -1
  519. package/src/theme/BazePalette.stories.tsx +111 -1
  520. package/src/theme/Palette.stories.tsx +2 -2
  521. package/src/theme/SemanticTokens.mdx +76 -17
  522. package/src/theme/claude.md +23 -9
  523. package/src/theme/colors.ts +71 -18
  524. package/src/theme/contrast.test.ts +57 -0
  525. package/src/theme/global.ts +20 -1
  526. package/src/theme/index.ts +2 -0
  527. package/src/theme/palette.generated.ts +233 -123
  528. package/src/theme/paletteSwatches.test.ts +1 -1
  529. package/src/theme/paletteSwatches.ts +35 -0
  530. package/src/theme/recipes/avatar.ts +92 -0
  531. package/src/translations/Defaults.translations.json +14 -0
  532. package/src/utils/disabledControl.ts +8 -1
  533. package/src/utils/focusRing.ts +23 -0
@@ -0,0 +1,235 @@
1
+ import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
2
+
3
+ import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
4
+ import * as TableStories from './Table.stories';
5
+ import { Tr } from './Tr';
6
+
7
+ <Meta of={TableStories} name="Usage" />
8
+
9
+ <LangToggle />
10
+
11
+ <En>
12
+
13
+ # Table
14
+
15
+ Rows of records that share the same columns, for reading and comparing
16
+ values: members, usage, invoices, API keys.
17
+
18
+ `TableContainer` › `Table` › `Thead` / `Tbody` › `Tr` › `Th` / `Td`. The
19
+ container draws the rounded border, scrolls horizontally, and tracks scroll
20
+ position for sticky columns.
21
+
22
+ ## When to use
23
+
24
+ - A list where each item has the same attributes and the reader compares
25
+ across rows: a member list, usage by model, call history.
26
+ - When the reader scans a column (a date, an amount, a status).
27
+
28
+ ## When not to use
29
+
30
+ - Items that are read one at a time and have different shapes → `Card` in a
31
+ list or grid.
32
+ - Two to five label–value pairs about one thing → a plain stack of `Text`.
33
+ - A hierarchy (groups inside groups) → `Tree`.
34
+ - Page layout. A table is for data only.
35
+
36
+ ## Row states and options
37
+
38
+ </En>
39
+
40
+ <Ko>
41
+
42
+ # Table
43
+
44
+ 같은 열을 가진 기록을 행으로 늘어놓고 값을 읽고 비교하게 하는 컴포넌트입니다.
45
+ 멤버, 사용량, 청구서, API 키 목록에 씁니다.
46
+
47
+ 구조는 `TableContainer` › `Table` › `Thead` / `Tbody` › `Tr` › `Th` / `Td`입니다.
48
+ 컨테이너가 둥근 테두리를 그리고, 가로 스크롤을 맡고, 고정 열을 위해 스크롤 위치를
49
+ 추적합니다.
50
+
51
+ ## 언제 쓰나요
52
+
53
+ - 항목마다 같은 속성이 있고 행끼리 비교해 읽는 목록: 멤버 목록, 모델별 사용량, 호출
54
+ 기록.
55
+ - 읽는 사람이 한 열(날짜, 금액, 상태)을 훑어볼 때.
56
+
57
+ ## 언제 쓰지 않나요
58
+
59
+ - 하나씩 읽는 항목이고 모양이 서로 다르다면 목록이나 격자 안의 `Card`를 씁니다.
60
+ - 한 대상의 라벨과 값 두세 쌍이라면 `Text`를 쌓아서 보여 줍니다.
61
+ - 그룹 안의 그룹 같은 계층은 `Tree`를 씁니다.
62
+ - 페이지 레이아웃에는 쓰지 않습니다. 표는 데이터에만 씁니다.
63
+
64
+ ## 행 상태와 옵션
65
+
66
+ </Ko>
67
+
68
+ <ArgTypes of={Tr} include={['state']} />
69
+
70
+ <En>
71
+
72
+ | Option | Means | Use for |
73
+ | --- | --- | --- |
74
+ | `<Tr state="selected">` | The row is part of the current selection (`primary.selected`) | Rows ticked for a bulk action |
75
+ | `<Tr state="invalid">` | Something in the row is wrong (`bg.invalid.subtle`) | A failed import row |
76
+ | `<Tr state="highlighted">` | Draw the eye to one row (`bg.highlighted`) | The row just added or edited |
77
+ | `onClick` / `tabIndex` / `role="button"` on `Tr` | The row is clickable; it gets the pointer, `primary.wash` hover and a focus outline | Opening a detail drawer |
78
+ | `<Thead sticky>` | The header stays at the top of the scroll area | Long lists in a fixed-height container |
79
+ | `isSticky` + `stickyDirection` + `stickyIndex` on `Th`/`Td` | The column stays put while the table scrolls sideways | A name column on a wide table |
80
+ | `Td wrap` | Long text wraps instead of being cut off | Addresses, descriptions |
81
+ | `ExpandingTr` | A row with a detail row under it, opened by `isExpanded` | Error details for one row |
82
+
83
+ ## Do / Don't
84
+
85
+ </En>
86
+
87
+ <Ko>
88
+
89
+ | 옵션 | 뜻 | 쓰는 곳 |
90
+ | --- | --- | --- |
91
+ | `<Tr state="selected">` | 현재 선택에 포함된 행(`primary.selected`) | 일괄 작업을 위해 체크한 행 |
92
+ | `<Tr state="invalid">` | 행 안의 무언가가 잘못됨(`bg.invalid.subtle`) | 가져오기에 실패한 행 |
93
+ | `<Tr state="highlighted">` | 한 행으로 눈길을 끎(`bg.highlighted`) | 방금 추가하거나 고친 행 |
94
+ | `Tr`의 `onClick` / `tabIndex` / `role="button"` | 누를 수 있는 행. 포인터, `primary.wash` 호버, 초점 테두리가 생김 | 상세 서랍 열기 |
95
+ | `<Thead sticky>` | 스크롤해도 머리글이 위에 남음 | 높이가 정해진 영역 안의 긴 목록 |
96
+ | `Th`/`Td`의 `isSticky` + `stickyDirection` + `stickyIndex` | 표를 옆으로 스크롤해도 그 열은 그대로 있음 | 넓은 표의 이름 열 |
97
+ | `Td wrap` | 긴 글을 자르지 않고 줄바꿈함 | 주소, 설명 |
98
+ | `ExpandingTr` | 아래에 상세 행이 붙은 행. `isExpanded`로 엶 | 한 행의 오류 상세 |
99
+
100
+ ## 이렇게 하세요 / 이렇게 하지 마세요
101
+
102
+ </Ko>
103
+
104
+ <Canvas of={TableStories.DoNumbersAligned} />
105
+ <Verdict
106
+ kind="do"
107
+ en="Put a real link in the name cell, and align numbers to the end with tabular figures so they line up."
108
+ ko="이름 칸에는 실제 링크를 두고, 숫자는 끝에 맞추고 고정폭 숫자를 써서 자릿수가 맞게 합니다."
109
+ />
110
+
111
+ <Canvas of={TableStories.DoStateWithWords} />
112
+ <Verdict
113
+ kind="do"
114
+ en="Back a row state with words in a cell. The tint draws the eye; the Badge says what is wrong."
115
+ ko="행 상태는 칸 안의 문구로 함께 알립니다. 배경색은 눈길을 끌고, Badge가 무엇이 잘못됐는지 말합니다."
116
+ />
117
+
118
+ <Canvas of={TableStories.DontStateColourOnly} />
119
+ <Verdict
120
+ kind="dont"
121
+ en="Rely on the row tint alone. A screen reader does not announce it, and in some modes it is hard to see at all."
122
+ ko="행 배경색만으로 알리지 마세요. 화면 낭독기는 배경색을 읽지 않고, 모드에 따라 거의 보이지 않기도 합니다."
123
+ />
124
+
125
+ <En>
126
+
127
+ ## Content
128
+
129
+ - Column headers are short nouns: 이름, 그룹, 사용 크레딧. Put the unit in
130
+ the header, not in every cell.
131
+ - Numbers and amounts align to the end (`textAlign="end"`); text aligns to the
132
+ start.
133
+ - An empty value is "—", not a blank cell, so the reader knows nothing is
134
+ missing from the page.
135
+ - Keep a status in its own column with a `Badge`, rather than colouring a
136
+ whole row.
137
+
138
+ ## Accessibility
139
+
140
+ What Table does for you:
141
+
142
+ - It renders native table elements (`<table>`, `<th>`, `<td>`), so screen
143
+ readers announce row and column positions.
144
+ - A clickable `Tr` gets a pointer, a hover tint and a 2px inset focus
145
+ outline when focused from the keyboard. Static rows never highlight.
146
+ - Sticky header and sticky columns get an opaque background, so text never
147
+ shows through.
148
+
149
+ What you still have to do:
150
+
151
+ - **A clickable row is not a button by itself.** `Tr` only styles it. Give
152
+ it `tabIndex={0}` and handle Enter in `onKeyDown` (WCAG 2.1.1), or better,
153
+ put a real link or button in the row and let that be the target (WCAG
154
+ 4.1.2). Never put a button inside a row that is also `role="button"`
155
+ (nested interactive controls, see `ACCESSIBILITY.md` §3).
156
+ - **Row states need words** (WCAG 1.4.1). `state` only tints the row.
157
+ - **Name icon-only buttons in cells**: `aria-label` on the `IconButton`
158
+ (WCAG 4.1.2). For an `ExpandingTr` toggle, also pass `aria-expanded`.
159
+ - Give the table a caption or a heading next to it so it has a name
160
+ (WCAG 1.3.1).
161
+ - A cell cut off with an ellipsis hides content. Use `wrap`, or make the full
162
+ value available another way (WCAG 1.4.10).
163
+
164
+ ## Tokens
165
+
166
+ Read from the table slot recipe (`theme/recipes/table.ts`) and the sticky
167
+ styles in `Table.styles.ts`.
168
+
169
+ </En>
170
+
171
+ <Ko>
172
+
173
+ ## 문구
174
+
175
+ - 열 머리글은 짧은 명사로 씁니다: 이름, 그룹, 사용 크레딧. 단위는 칸마다 쓰지 않고
176
+ 머리글에 씁니다.
177
+ - 숫자와 금액은 끝에 맞추고(`textAlign="end"`), 글은 앞에 맞춥니다.
178
+ - 값이 없으면 빈칸 대신 "—"를 써서, 화면에서 빠진 것이 없다는 것을 알립니다.
179
+ - 상태는 행 전체에 색을 칠하지 않고 `Badge`로 따로 열을 둡니다.
180
+
181
+ ## 접근성
182
+
183
+ Table이 알아서 하는 일
184
+
185
+ - 기본 표 요소(`<table>`, `<th>`, `<td>`)로 그리므로 화면 낭독기가 행과 열의 위치를
186
+ 읽어 줍니다.
187
+ - 누를 수 있는 `Tr`에는 포인터, 호버 배경, 키보드 초점 시 안쪽 2px 테두리가 생깁니다.
188
+ 누를 수 없는 행은 강조되지 않습니다.
189
+ - 고정 머리글과 고정 열은 불투명한 배경을 가지므로 뒤의 글자가 비치지 않습니다.
190
+
191
+ 직접 챙겨야 하는 일
192
+
193
+ - **누를 수 있는 행이 저절로 버튼이 되지는 않습니다.** `Tr`은 모양만 바꿉니다.
194
+ `tabIndex={0}`를 주고 `onKeyDown`에서 Enter를 처리하거나(WCAG 2.1.1), 행 안에 실제
195
+ 링크나 버튼을 두고 그것을 누르게 하는 편이 낫습니다(WCAG 4.1.2). `role="button"`인
196
+ 행 안에 다시 버튼을 넣지 않습니다(상호작용 요소 중첩, `ACCESSIBILITY.md` 3절).
197
+ - **행 상태는 문구로도 알립니다**(WCAG 1.4.1). `state`는 배경색만 바꿉니다.
198
+ - **칸 안의 아이콘 버튼에는 이름을 붙입니다.** `IconButton`에 `aria-label`을 줍니다
199
+ (WCAG 4.1.2). `ExpandingTr`을 여닫는 버튼에는 `aria-expanded`도 줍니다.
200
+ - 표에 캡션을 달거나 옆에 제목을 두어 이름을 붙입니다(WCAG 1.3.1).
201
+ - 말줄임표로 잘린 칸은 내용을 숨깁니다. `wrap`을 쓰거나 전체 값을 다른 방법으로
202
+ 볼 수 있게 합니다(WCAG 1.4.10).
203
+
204
+ ## 토큰
205
+
206
+ 표 슬롯 레시피(`theme/recipes/table.ts`)와 `Table.styles.ts`의 고정 열 스타일에서
207
+ 읽습니다.
208
+
209
+ </Ko>
210
+
211
+ <Canvas of={TableStories.UsageTokens} sourceState="none" />
212
+
213
+ <En>
214
+
215
+ ## Related
216
+
217
+ - **Badge**: a status in its own column.
218
+ - **Pagination**: long lists split into pages.
219
+ - **Checkbox**: row selection for bulk actions, with `state="selected"`.
220
+ - **Tree**: hierarchical data.
221
+ - **Card**: items with different shapes.
222
+
223
+ </En>
224
+
225
+ <Ko>
226
+
227
+ ## 관련 컴포넌트
228
+
229
+ - **Badge**: 따로 둔 열의 상태 표시.
230
+ - **Pagination**: 긴 목록을 쪽으로 나눕니다.
231
+ - **Checkbox**: 일괄 작업을 위한 행 선택. `state="selected"`와 함께 씁니다.
232
+ - **Tree**: 계층이 있는 데이터.
233
+ - **Card**: 모양이 서로 다른 항목.
234
+
235
+ </Ko>
@@ -31,7 +31,7 @@ export const verticalStyles = {
31
31
  * The indicator moves with the label, EXCEPT on 5.0's BAZE palette: the
32
32
  * indicator is a 2px underline — a GRAPHIC judged at 3:1, not text at 4.5:1 —
33
33
  * so it reads the brand accent `primary.main` directly (black in light, the
34
- * inverted cream fill in dark), matching the house gallery spec. The label
34
+ * inverted off-white fill in dark), matching the house gallery spec. The label
35
35
  * stays on `fg.emphasized` (= `fg.default`): it is still a PLACE, not a
36
36
  * value, and `primary.main` in dark mode is a solid-fill colour tuned for a
37
37
  * button face under `fg.onPrimary`, not for text on the page.
@@ -2,7 +2,10 @@ import { useState } from 'react';
2
2
  import { Button, CloseButton, Heading, Text } from '@chakra-ui/react';
3
3
  import type { Meta, StoryObj } from '@storybook/react';
4
4
 
5
+ import { T } from '../../guidelines/_components/Lang';
6
+ import { TokenTable } from '../../guidelines/_components/TokenTable';
5
7
  import { Tab } from '@/components/Tabs/Tab/Tab';
8
+ import { TAB_RAMP } from '@/components/Tabs/Tab/Tab.styles';
6
9
  import { TabList } from '@/components/Tabs/TabList';
7
10
  import { TabPanel } from '@/components/Tabs/TabPanel';
8
11
  import { TabPanels } from '@/components/Tabs/TabPanels';
@@ -260,3 +263,86 @@ export const DynamicTabs: Story = {
260
263
  );
261
264
  },
262
265
  };
266
+
267
+ // ───────────────────────── Usage-page specimens ─────────────────────────
268
+ // Pulled into `Tabs.usage.mdx` with <Canvas of={…} />. Hidden from the
269
+ // sidebar (`!dev`).
270
+
271
+ export const DoSectionsOfOnePlace: Story = {
272
+ tags: ['!dev'],
273
+ parameters: { layout: 'padded' },
274
+ name: 'Usage / Do: sections of one place, with a named list',
275
+ render: () => (
276
+ <Tabs defaultValue="credit">
277
+ <TabList aria-label="그룹 설정">
278
+ <Tab value="credit">크레딧</Tab>
279
+ <Tab value="security">보안</Tab>
280
+ <Tab value="notice">공지</Tab>
281
+ </TabList>
282
+ <TabPanel value="credit" pt={4}>
283
+ <Text>이 그룹의 월간 크레딧 한도와 사용량입니다.</Text>
284
+ </TabPanel>
285
+ <TabPanel value="security" pt={4}>
286
+ <Text>로그인과 파일 업로드 정책입니다.</Text>
287
+ </TabPanel>
288
+ <TabPanel value="notice" pt={4}>
289
+ <Text>이 그룹에만 보이는 공지입니다.</Text>
290
+ </TabPanel>
291
+ </Tabs>
292
+ ),
293
+ };
294
+
295
+ export const DontTabsAsSteps: Story = {
296
+ tags: ['!dev'],
297
+ parameters: { layout: 'padded' },
298
+ name: "Usage / Don't: tabs as the steps of a flow",
299
+ render: () => (
300
+ <Tabs defaultValue="step1">
301
+ <TabList>
302
+ <Tab value="step1">1. 기본 정보</Tab>
303
+ <Tab value="step2">2. 모델 선택</Tab>
304
+ <Tab value="step3">3. 확인</Tab>
305
+ </TabList>
306
+ <TabPanel value="step1" pt={4}>
307
+ <Text>이름과 설명을 입력하세요.</Text>
308
+ </TabPanel>
309
+ <TabPanel value="step2" pt={4}>
310
+ <Text>모델을 고르세요.</Text>
311
+ </TabPanel>
312
+ <TabPanel value="step3" pt={4}>
313
+ <Text>입력한 내용을 확인하세요.</Text>
314
+ </TabPanel>
315
+ </Tabs>
316
+ ),
317
+ };
318
+
319
+ /** Tokens a tab reads: the selected ramp from `TAB_RAMP` in `Tab.styles.ts`, the rest from `Tab.tsx` and `TabList.tsx`. */
320
+ export const UsageTokens: Story = {
321
+ tags: ['!dev'],
322
+ parameters: { layout: 'padded' },
323
+ name: 'Usage / Tokens',
324
+ render: () => (
325
+ <TokenTable
326
+ rows={[
327
+ {
328
+ token: TAB_RAMP.label,
329
+ use: <T en="Selected tab · label" ko="선택된 탭 · 글자" />,
330
+ },
331
+ {
332
+ token: TAB_RAMP.indicator,
333
+ use: <T en="Selected tab · indicator" ko="선택된 탭 · 표시 막대" />,
334
+ },
335
+ {
336
+ token: 'fg.muted',
337
+ use: <T en="Other tabs · label" ko="다른 탭 · 글자" />,
338
+ },
339
+ { token: 'primary.wash', use: <T en="Hover" ko="마우스 올림" /> },
340
+ {
341
+ token: 'bg.muted',
342
+ use: <T en="Vertical · selected fill" ko="세로 탭 · 선택 배경" />,
343
+ },
344
+ { token: 'border.subtle', use: <T en="List rule" ko="목록 아래 선" /> },
345
+ ]}
346
+ />
347
+ ),
348
+ };
@@ -0,0 +1,263 @@
1
+ import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
2
+
3
+ import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
4
+ import * as TabsStories from './Tabs.stories';
5
+
6
+ <Meta of={TabsStories} name="Usage" />
7
+
8
+ <LangToggle />
9
+
10
+ <En>
11
+
12
+ # Tabs
13
+
14
+ A row (or column) of labels that switches between sections of the same place.
15
+ One section shows at a time.
16
+
17
+ ## When to use
18
+
19
+ - To split one object's settings or data into sections: a group's 크레딧,
20
+ 보안 and 공지; a chatbot's 설정 and 분석.
21
+ - To switch between dashboards of the same scope, such as usage by model and
22
+ usage by user.
23
+ - For a long settings page in a side panel, with `orientation="vertical"`.
24
+
25
+ ## When not to use
26
+
27
+ - To change how the same content is shown, or to filter it (일/주/월, 목록/카드)
28
+ → `SegmentedControl`. Tabs change _what_ you are looking at, not how.
29
+ - For the steps of a flow the user must complete in order → a stepper or a
30
+ sequence of pages. Tabs let the user jump ahead.
31
+ - For destinations or filters, such as the side navigation of an area or a
32
+ filter rail beside a list, and for a list that is long or keeps growing, or
33
+ whose rows carry counts or icons → `NavList`. Tabs own their panels, move
34
+ with the arrow keys and mark the choice with `aria-selected`; a rail is
35
+ links or filters, reached with Tab.
36
+ - To show where this page sits in a hierarchy → `Breadcrumb`.
37
+ - For two or three short panels the user needs side by side → show them on
38
+ the page.
39
+
40
+ ## Which component
41
+
42
+ Tabs and `NavList` both mark one row as current; they say the same thing from
43
+ opposite sides. Pick by what the rows are:
44
+
45
+ | What you have | Use |
46
+ | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
47
+ | A few sections of one object that swap a panel in place | `Tabs` |
48
+ | Destinations, or the side navigation of an area | `NavList`, each item with `href` |
49
+ | A filter over one list or grid, with many options or with counts | `NavList`: links (`href`) when the filter state is in the URL, buttons (`onClick`) otherwise |
50
+ | A short horizontal switch of two to five options | `SegmentedControl` |
51
+ | A hierarchy the user expands and collapses | `Tree` |
52
+ | Commands (초대하기, 내보내기) | `Button`, or a `Menu` when there are several |
53
+
54
+ ## Variants and what they mean
55
+
56
+ Tabs has one look. A selected tab is a _place_, not a value, so it is marked
57
+ with ink and weight, not with a brand or status colour. `orientation` decides
58
+ the layout:
59
+
60
+ </En>
61
+
62
+ <Ko>
63
+
64
+ # Tabs
65
+
66
+ 같은 곳의 여러 구역을 오가게 하는 라벨 한 줄(또는 한 열)입니다. 한 번에 한 구역만
67
+ 보입니다.
68
+
69
+ ## 언제 쓰나요
70
+
71
+ - 한 대상의 설정이나 데이터를 구역으로 나눌 때: 그룹의 크레딧·보안·공지, 챗봇의 설정·분석.
72
+ - 같은 범위의 대시보드 여러 개를 오갈 때: 모델별 사용량, 사용자별 사용량.
73
+ - 사이드 패널의 긴 설정 화면을 나눌 때는 `orientation="vertical"`을 씁니다.
74
+
75
+ ## 언제 쓰지 않나요
76
+
77
+ - 같은 내용을 보는 방식을 바꾸거나 거를 때(일/주/월, 목록/카드)는 `SegmentedControl`을
78
+ 씁니다. 탭은 무엇을 보는지를 바꾸고, 어떻게 보는지를 바꾸지 않습니다.
79
+ - 차례대로 끝내야 하는 흐름의 단계에는 단계 표시나 이어지는 페이지를 씁니다. 탭은 사용자가
80
+ 단계를 건너뛰게 둡니다.
81
+ - 다른 곳으로 옮겨 가는 항목이나 필터(한 영역의 옆 내비게이션, 목록 옆의 필터 레일)는
82
+ `NavList`가 맡습니다. 항목이 많거나 계속 늘어나는 목록, 항목에 개수나 아이콘이 붙는
83
+ 목록도 `NavList`를 씁니다. 탭은 패널을 갖고, 방향키로 옮기며, 고른 것을
84
+ `aria-selected`로 알립니다. 레일은 링크나 필터이고 Tab 키로 오갑니다.
85
+ - 이 페이지가 계층의 어디에 있는지 보여 줄 때는 `Breadcrumb`를 씁니다.
86
+ - 나란히 봐야 하는 짧은 패널 두세 개는 탭에 숨기지 말고 페이지에 그대로 보입니다.
87
+
88
+ ## 어떤 컴포넌트를 쓰나요
89
+
90
+ Tabs와 `NavList`는 둘 다 항목 하나를 현재 항목으로 표시합니다. 두 문서는 같은 기준을 서로
91
+ 반대쪽에서 설명합니다. 항목이 무엇인지를 보고 고릅니다.
92
+
93
+ | 이런 경우 | 쓰는 컴포넌트 |
94
+ | -------------------------------------------------------------------- | ------------------------------------------------------------------------ |
95
+ | 한 대상의 구역 몇 개를 그 자리에서 패널로 바꿔 보여 줄 때 | `Tabs` |
96
+ | 다른 곳으로 옮겨 가는 항목, 한 영역의 옆 내비게이션 | 항목마다 `href`를 준 `NavList` |
97
+ | 목록이나 그리드 하나를 거르는 필터로, 선택지가 많거나 개수를 붙일 때 | `NavList`. 필터 상태가 URL에 있으면 링크(`href`), 아니면 버튼(`onClick`) |
98
+ | 선택지 둘에서 다섯 개를 가로로 짧게 바꿀 때 | `SegmentedControl` |
99
+ | 펼치고 접는 계층 | `Tree` |
100
+ | 명령(초대하기, 내보내기) | `Button`, 여러 개라면 `Menu` |
101
+
102
+ ## 변형과 뜻
103
+
104
+ Tabs의 모양은 하나입니다. 선택된 탭은 값이 아니라 지금 있는 곳이므로, 브랜드색이나
105
+ 상태색이 아니라 진한 글자와 굵기로 표시합니다. 배치는 `orientation`이 정합니다.
106
+
107
+ </Ko>
108
+
109
+ <ArgTypes
110
+ of={TabsStories}
111
+ include={['orientation', 'defaultValue', 'value', 'activationMode']}
112
+ />
113
+
114
+ <En>
115
+
116
+ | `orientation` | Selected tab | Use for |
117
+ | ---------------------- | ------------------------------------------------------------------------ | -------------------------------------------- |
118
+ | `horizontal` (default) | `fg.emphasized` label, semibold, with a 2px `primary.main` underline | Sections across the top of a page or panel |
119
+ | `vertical` | `bg.muted` fill, bold, with a 2px `primary.main` bar on the leading edge | A long settings page in a narrow side column |
120
+
121
+ ## Do / Don't
122
+
123
+ </En>
124
+
125
+ <Ko>
126
+
127
+ | `orientation` | 선택된 탭 | 쓰는 곳 |
128
+ | ------------------- | --------------------------------------------------------------------- | ---------------------------- |
129
+ | `horizontal` (기본) | `fg.emphasized` 글자를 semibold로 쓰고 아래에 2px `primary.main` 밑줄 | 페이지나 패널 위쪽의 구역 |
130
+ | `vertical` | `bg.muted` 배경에 bold, 앞쪽 가장자리에 2px `primary.main` 막대 | 좁은 옆 열에 둔 긴 설정 화면 |
131
+
132
+ ## 이렇게 하세요 / 이렇게 하지 마세요
133
+
134
+ </Ko>
135
+
136
+ <Canvas of={TabsStories.DoSectionsOfOnePlace} />
137
+ <Verdict
138
+ kind="do"
139
+ en="Use short nouns for sections of one place, and name the list with aria-label ('그룹 설정')."
140
+ ko="한 곳의 구역에는 짧은 명사를 쓰고, 탭 목록에 aria-label('그룹 설정')로 이름을 붙입니다."
141
+ />
142
+
143
+ <Canvas of={TabsStories.DontTabsAsSteps} />
144
+ <Verdict
145
+ kind="dont"
146
+ en="Number tabs as the steps of a flow. Nothing stops the user from opening step 3 first."
147
+ ko="탭에 번호를 붙여 흐름의 단계로 쓰지 마세요. 사용자가 3단계를 먼저 열어도 막을 방법이 없습니다."
148
+ />
149
+
150
+ <En>
151
+
152
+ ## Content
153
+
154
+ - One or two words, a noun: "크레딧", "보안", "사용자별". No full stop and no
155
+ icons alone.
156
+ - Keep labels the same length class; one long label next to short ones reads as
157
+ a different kind of tab.
158
+ - Stay under about six horizontal tabs. More than that, use `vertical` or split
159
+ the page; if the rows are places or filters, use `NavList`.
160
+ - Do not put a count in the label unless it changes what the user does next.
161
+
162
+ ## Accessibility
163
+
164
+ What Tabs does for you:
165
+
166
+ - `TabList` is `role="tablist"`, each `Tab` is `role="tab"` with
167
+ `aria-selected`, and each `TabPanel` is `role="tabpanel"` labelled by its tab
168
+ (WCAG 4.1.2).
169
+ - Keyboard (WCAG 2.1.1): `Tab` lands on the selected tab and then moves on; the
170
+ arrow keys move between tabs and wrap at the ends, `Home` / `End` jump to the
171
+ first and last. With the default `activationMode="automatic"` the panel
172
+ changes as focus moves.
173
+ - Each `Tab` is a `Button`, so it shows the focus ring (WCAG 2.4.7). The
174
+ selected label is `fg.emphasized`, at least 13:1 on every surface it can land
175
+ on (WCAG 1.4.3), and the underline is a second cue beside weight (WCAG
176
+ 1.4.1).
177
+
178
+ What you still have to do:
179
+
180
+ - **Name the list.** Pass `aria-label` to `TabList` when there is no visible
181
+ heading right above it, or `aria-labelledby` pointing at the heading.
182
+ - Give every `Tab` and `TabPanel` the same `value`. Both throw without one.
183
+ - Put only phrasing content inside a `Tab`: it renders a `<button>`, so no
184
+ `<div>` or `<p>` inside (KWCAG 5.4.1.1, see `ACCESSIBILITY.md`).
185
+ - If switching a panel is slow (it fetches data), use
186
+ `activationMode="manual"` so arrowing across the list does not fire a request
187
+ per tab.
188
+
189
+ ## Tokens
190
+
191
+ The selected ramp is `TAB_RAMP` in `Tab.styles.ts`; the other tokens are set in
192
+ `Tab.tsx` and `TabList.tsx`.
193
+
194
+ </En>
195
+
196
+ <Ko>
197
+
198
+ ## 문구
199
+
200
+ - 한두 단어의 명사로 씁니다. "크레딧", "보안", "사용자별". 마침표를 찍지 않고, 아이콘만
201
+ 두지 않습니다.
202
+ - 라벨 길이를 비슷하게 맞춥니다. 짧은 라벨 사이의 긴 라벨 하나는 다른 종류의 탭처럼
203
+ 보입니다.
204
+ - 가로 탭은 여섯 개 안쪽으로 둡니다. 더 많으면 `vertical`을 쓰거나 페이지를 나눕니다.
205
+ 항목이 곳이나 필터라면 `NavList`를 씁니다.
206
+ - 다음 행동을 바꾸는 경우가 아니면 라벨에 개수를 넣지 않습니다.
207
+
208
+ ## 접근성
209
+
210
+ Tabs가 알아서 하는 일
211
+
212
+ - `TabList`는 `role="tablist"`, 각 `Tab`은 `aria-selected`가 붙은 `role="tab"`, 각
213
+ `TabPanel`은 자기 탭으로 이름이 붙는 `role="tabpanel"`입니다(WCAG 4.1.2).
214
+ - 키보드(WCAG 2.1.1): `Tab`을 누르면 선택된 탭에 닿고, 한 번 더 누르면 목록을 벗어납니다. 방향키로 탭 사이를
215
+ 옮기고 끝에서는 처음으로 돌아가며, `Home`/`End`로 처음과 끝으로 갑니다. 기본값인
216
+ `activationMode="automatic"`에서는 초점이 옮겨 가면 패널도 바뀝니다.
217
+ - 각 `Tab`은 `Button`이라 초점 테두리가 보입니다(WCAG 2.4.7). 선택된 글자는
218
+ `fg.emphasized`로, 놓일 수 있는 어느 면에서도 13:1 이상입니다(WCAG 1.4.3). 굵기 말고도
219
+ 밑줄이 한 번 더 알려 줍니다(WCAG 1.4.1).
220
+
221
+ 직접 챙겨야 하는 일
222
+
223
+ - **탭 목록에 이름을 붙입니다.** 바로 위에 보이는 제목이 없다면 `TabList`에
224
+ `aria-label`을, 제목이 있다면 그 제목을 가리키는 `aria-labelledby`를 넘깁니다.
225
+ - 모든 `Tab`과 `TabPanel`에 짝이 맞는 `value`를 줍니다. 없으면 둘 다 오류를 냅니다.
226
+ - `Tab` 안에는 phrasing content만 넣습니다. `<button>`으로 그려지므로 안에 `<div>`나
227
+ `<p>`를 넣지 않습니다(KWCAG 5.4.1.1, `ACCESSIBILITY.md` 참고).
228
+ - 패널을 바꿀 때 데이터를 불러와 느리다면 `activationMode="manual"`을 씁니다. 그래야
229
+ 방향키로 탭을 훑을 때마다 요청이 나가지 않습니다.
230
+
231
+ ## 토큰
232
+
233
+ 선택 상태의 색은 `Tab.styles.ts`의 `TAB_RAMP`에서, 나머지 토큰은 `Tab.tsx`와
234
+ `TabList.tsx`에서 정합니다.
235
+
236
+ </Ko>
237
+
238
+ <Canvas of={TabsStories.UsageTokens} sourceState="none" />
239
+
240
+ <En>
241
+
242
+ ## Related
243
+
244
+ - **NavList**: destinations and filters, such as side navigation and filter
245
+ rails.
246
+ - **SegmentedControl**: change how the same content is shown.
247
+ - **Breadcrumb**: where this page sits in a hierarchy.
248
+ - **Foundations/Brand & colour usage**: why a selected place is ink, not
249
+ colour.
250
+
251
+ </En>
252
+
253
+ <Ko>
254
+
255
+ ## 관련 컴포넌트
256
+
257
+ - **NavList**: 다른 곳으로 옮겨 가는 항목과 필터. 옆 내비게이션, 필터 레일.
258
+ - **SegmentedControl**: 같은 내용을 보는 방식 바꾸기.
259
+ - **Breadcrumb**: 이 페이지가 계층의 어디에 있는지.
260
+ - **Foundations/Brand & colour usage**: 선택된 곳을 색이 아니라 진한 글자로 표시하는
261
+ 이유.
262
+
263
+ </Ko>