@mindlogic-ai/logician-ui 5.0.0-alpha.0 → 5.0.0-alpha.10

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 (444) hide show
  1. package/MIGRATION-5.0.md +18 -18
  2. package/codemods/5.0/button-variants.js +1 -0
  3. package/codemods/5.0/codemods.test.ts +1 -0
  4. package/dist/components/Avatar/Avatar.d.ts +68 -11
  5. package/dist/components/Avatar/Avatar.d.ts.map +1 -1
  6. package/dist/components/Avatar/Avatar.js +38 -5
  7. package/dist/components/Avatar/Avatar.js.map +1 -1
  8. package/dist/components/Avatar/Avatar.mjs +37 -5
  9. package/dist/components/Avatar/Avatar.mjs.map +1 -1
  10. package/dist/components/Avatar/index.d.ts +2 -2
  11. package/dist/components/Avatar/index.d.ts.map +1 -1
  12. package/dist/components/Badge/Badge.d.ts.map +1 -1
  13. package/dist/components/Badge/Badge.js +5 -3
  14. package/dist/components/Badge/Badge.js.map +1 -1
  15. package/dist/components/Badge/Badge.mjs +5 -3
  16. package/dist/components/Badge/Badge.mjs.map +1 -1
  17. package/dist/components/Badge/Badge.types.d.ts +7 -5
  18. package/dist/components/Badge/Badge.types.d.ts.map +1 -1
  19. package/dist/components/Banner/Banner.types.d.ts +24 -1
  20. package/dist/components/Banner/Banner.types.d.ts.map +1 -1
  21. package/dist/components/BottomSheet/BottomSheet.styles.d.ts +2 -2
  22. package/dist/components/Button/Button.d.ts.map +1 -1
  23. package/dist/components/Button/Button.js +10 -2
  24. package/dist/components/Button/Button.js.map +1 -1
  25. package/dist/components/Button/Button.legacy.d.ts.map +1 -1
  26. package/dist/components/Button/Button.legacy.js +1 -0
  27. package/dist/components/Button/Button.legacy.js.map +1 -1
  28. package/dist/components/Button/Button.legacy.mjs +1 -0
  29. package/dist/components/Button/Button.legacy.mjs.map +1 -1
  30. package/dist/components/Button/Button.mjs +10 -2
  31. package/dist/components/Button/Button.mjs.map +1 -1
  32. package/dist/components/Button/Button.styles.d.ts.map +1 -1
  33. package/dist/components/Button/Button.styles.js +18 -0
  34. package/dist/components/Button/Button.styles.js.map +1 -1
  35. package/dist/components/Button/Button.styles.mjs +18 -0
  36. package/dist/components/Button/Button.styles.mjs.map +1 -1
  37. package/dist/components/Button/Button.types.d.ts +5 -3
  38. package/dist/components/Button/Button.types.d.ts.map +1 -1
  39. package/dist/components/Card/Card.types.d.ts +12 -0
  40. package/dist/components/Card/Card.types.d.ts.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/LineGraph/LineGraph.d.ts.map +1 -1
  67. package/dist/components/LineGraph/LineGraph.js +4 -5
  68. package/dist/components/LineGraph/LineGraph.js.map +1 -1
  69. package/dist/components/LineGraph/LineGraph.mjs +5 -6
  70. package/dist/components/LineGraph/LineGraph.mjs.map +1 -1
  71. package/dist/components/LineGraph/LineGraph.types.d.ts +12 -2
  72. package/dist/components/LineGraph/LineGraph.types.d.ts.map +1 -1
  73. package/dist/components/LineGraph/seriesColors.d.ts +12 -6
  74. package/dist/components/LineGraph/seriesColors.d.ts.map +1 -1
  75. package/dist/components/LineGraph/seriesColors.js +8 -7
  76. package/dist/components/LineGraph/seriesColors.js.map +1 -1
  77. package/dist/components/LineGraph/seriesColors.mjs +8 -7
  78. package/dist/components/LineGraph/seriesColors.mjs.map +1 -1
  79. package/dist/components/Masonry/Masonry.types.d.ts +8 -3
  80. package/dist/components/Masonry/Masonry.types.d.ts.map +1 -1
  81. package/dist/components/Menu/MenuItem.types.d.ts +8 -0
  82. package/dist/components/Menu/MenuItem.types.d.ts.map +1 -1
  83. package/dist/components/Modal/ModalCloseButton.d.ts +1 -1
  84. package/dist/components/Modal/ModalCloseButton.js +1 -1
  85. package/dist/components/Modal/ModalCloseButton.mjs +1 -1
  86. package/dist/components/Pagination/Pagination.d.ts +11 -10
  87. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  88. package/dist/components/Pagination/Pagination.js +11 -10
  89. package/dist/components/Pagination/Pagination.js.map +1 -1
  90. package/dist/components/Pagination/Pagination.mjs +11 -10
  91. package/dist/components/Pagination/Pagination.mjs.map +1 -1
  92. package/dist/components/ProgressBar/ProgressBar.types.d.ts +9 -0
  93. package/dist/components/ProgressBar/ProgressBar.types.d.ts.map +1 -1
  94. package/dist/components/RadialProgress/RadialProgress.types.d.ts +21 -1
  95. package/dist/components/RadialProgress/RadialProgress.types.d.ts.map +1 -1
  96. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts +8 -0
  97. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts.map +1 -1
  98. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  99. package/dist/components/SegmentedControl/SegmentedControl.js +6 -7
  100. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
  101. package/dist/components/SegmentedControl/SegmentedControl.mjs +6 -7
  102. package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  103. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts +2 -0
  104. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts.map +1 -1
  105. package/dist/components/Select/Select.d.ts +5 -1
  106. package/dist/components/Select/Select.d.ts.map +1 -1
  107. package/dist/components/Select/Select.js +2 -2
  108. package/dist/components/Select/Select.js.map +1 -1
  109. package/dist/components/Select/Select.mjs +3 -3
  110. package/dist/components/Select/Select.mjs.map +1 -1
  111. package/dist/components/Select/Select.styles.d.ts +38 -0
  112. package/dist/components/Select/Select.styles.d.ts.map +1 -1
  113. package/dist/components/Select/Select.styles.js +35 -0
  114. package/dist/components/Select/Select.styles.js.map +1 -1
  115. package/dist/components/Select/Select.styles.mjs +35 -2
  116. package/dist/components/Select/Select.styles.mjs.map +1 -1
  117. package/dist/components/Select/Select.types.d.ts +10 -0
  118. package/dist/components/Select/Select.types.d.ts.map +1 -1
  119. package/dist/components/Select/SelectField.d.ts +1 -1
  120. package/dist/components/Select/SelectField.d.ts.map +1 -1
  121. package/dist/components/Select/SelectField.js +3 -2
  122. package/dist/components/Select/SelectField.js.map +1 -1
  123. package/dist/components/Select/SelectField.mjs +3 -2
  124. package/dist/components/Select/SelectField.mjs.map +1 -1
  125. package/dist/components/Select/index.d.ts +1 -0
  126. package/dist/components/Select/index.d.ts.map +1 -1
  127. package/dist/components/Toast/Toast.styles.d.ts +6 -2
  128. package/dist/components/Toast/Toast.styles.d.ts.map +1 -1
  129. package/dist/components/Toast/Toast.styles.js +18 -10
  130. package/dist/components/Toast/Toast.styles.js.map +1 -1
  131. package/dist/components/Toast/Toast.styles.mjs +18 -10
  132. package/dist/components/Toast/Toast.styles.mjs.map +1 -1
  133. package/dist/components/Typography/Caption.d.ts.map +1 -1
  134. package/dist/components/Typography/Caption.js +1 -1
  135. package/dist/components/Typography/Caption.js.map +1 -1
  136. package/dist/components/Typography/Caption.mjs +1 -1
  137. package/dist/components/Typography/Caption.mjs.map +1 -1
  138. package/dist/components/Typography/H1.d.ts.map +1 -1
  139. package/dist/components/Typography/H1.js +1 -1
  140. package/dist/components/Typography/H1.js.map +1 -1
  141. package/dist/components/Typography/H1.mjs +1 -1
  142. package/dist/components/Typography/H1.mjs.map +1 -1
  143. package/dist/components/Typography/H2.d.ts.map +1 -1
  144. package/dist/components/Typography/H2.js +1 -1
  145. package/dist/components/Typography/H2.js.map +1 -1
  146. package/dist/components/Typography/H2.mjs +1 -1
  147. package/dist/components/Typography/H2.mjs.map +1 -1
  148. package/dist/components/Typography/H3.d.ts.map +1 -1
  149. package/dist/components/Typography/H3.js +1 -1
  150. package/dist/components/Typography/H3.js.map +1 -1
  151. package/dist/components/Typography/H3.mjs +1 -1
  152. package/dist/components/Typography/H3.mjs.map +1 -1
  153. package/dist/components/Typography/H4.d.ts.map +1 -1
  154. package/dist/components/Typography/H4.js +1 -1
  155. package/dist/components/Typography/H4.js.map +1 -1
  156. package/dist/components/Typography/H4.mjs +1 -1
  157. package/dist/components/Typography/H4.mjs.map +1 -1
  158. package/dist/components/Typography/H5.d.ts.map +1 -1
  159. package/dist/components/Typography/H5.js +1 -1
  160. package/dist/components/Typography/H5.js.map +1 -1
  161. package/dist/components/Typography/H5.mjs +1 -1
  162. package/dist/components/Typography/H5.mjs.map +1 -1
  163. package/dist/components/Typography/Link.d.ts.map +1 -1
  164. package/dist/components/Typography/Link.js +1 -1
  165. package/dist/components/Typography/Link.js.map +1 -1
  166. package/dist/components/Typography/Link.mjs +1 -1
  167. package/dist/components/Typography/Link.mjs.map +1 -1
  168. package/dist/components/Typography/Overline.d.ts.map +1 -1
  169. package/dist/components/Typography/Overline.js +1 -1
  170. package/dist/components/Typography/Overline.js.map +1 -1
  171. package/dist/components/Typography/Overline.mjs +1 -1
  172. package/dist/components/Typography/Overline.mjs.map +1 -1
  173. package/dist/components/Typography/Subtext.d.ts.map +1 -1
  174. package/dist/components/Typography/Subtext.js +1 -1
  175. package/dist/components/Typography/Subtext.js.map +1 -1
  176. package/dist/components/Typography/Subtext.mjs +1 -1
  177. package/dist/components/Typography/Subtext.mjs.map +1 -1
  178. package/dist/components/Typography/Subtitle.d.ts.map +1 -1
  179. package/dist/components/Typography/Subtitle.js +1 -1
  180. package/dist/components/Typography/Subtitle.js.map +1 -1
  181. package/dist/components/Typography/Subtitle.mjs +1 -1
  182. package/dist/components/Typography/Subtitle.mjs.map +1 -1
  183. package/dist/components/Typography/Text.d.ts.map +1 -1
  184. package/dist/components/Typography/Text.js +1 -1
  185. package/dist/components/Typography/Text.js.map +1 -1
  186. package/dist/components/Typography/Text.mjs +1 -1
  187. package/dist/components/Typography/Text.mjs.map +1 -1
  188. package/dist/hooks/useLanguage.d.ts +5 -0
  189. package/dist/hooks/useLanguage.d.ts.map +1 -1
  190. package/dist/hooks/useLanguage.js +7 -3
  191. package/dist/hooks/useLanguage.js.map +1 -1
  192. package/dist/hooks/useLanguage.mjs +7 -4
  193. package/dist/hooks/useLanguage.mjs.map +1 -1
  194. package/dist/hooks/useTranslate.d.ts.map +1 -1
  195. package/dist/hooks/useTranslate.js +8 -5
  196. package/dist/hooks/useTranslate.js.map +1 -1
  197. package/dist/hooks/useTranslate.mjs +8 -5
  198. package/dist/hooks/useTranslate.mjs.map +1 -1
  199. package/dist/index.js +1 -0
  200. package/dist/index.js.map +1 -1
  201. package/dist/index.mjs +1 -1
  202. package/dist/theme/colors.d.ts +2 -2
  203. package/dist/theme/colors.d.ts.map +1 -1
  204. package/dist/theme/colors.js +36 -2
  205. package/dist/theme/colors.js.map +1 -1
  206. package/dist/theme/colors.mjs +37 -3
  207. package/dist/theme/colors.mjs.map +1 -1
  208. package/dist/theme/global.d.ts.map +1 -1
  209. package/dist/theme/global.js +18 -0
  210. package/dist/theme/global.js.map +1 -1
  211. package/dist/theme/global.mjs +18 -0
  212. package/dist/theme/global.mjs.map +1 -1
  213. package/dist/theme/index.d.ts.map +1 -1
  214. package/dist/theme/index.js +2 -0
  215. package/dist/theme/index.js.map +1 -1
  216. package/dist/theme/index.mjs +2 -0
  217. package/dist/theme/index.mjs.map +1 -1
  218. package/dist/theme/palette.generated.d.ts +98 -0
  219. package/dist/theme/palette.generated.d.ts.map +1 -1
  220. package/dist/theme/palette.generated.js +99 -0
  221. package/dist/theme/palette.generated.js.map +1 -1
  222. package/dist/theme/palette.generated.mjs +99 -1
  223. package/dist/theme/palette.generated.mjs.map +1 -1
  224. package/dist/theme/paletteSwatches.d.ts +20 -0
  225. package/dist/theme/paletteSwatches.d.ts.map +1 -1
  226. package/dist/theme/recipes/avatar.d.ts +30 -0
  227. package/dist/theme/recipes/avatar.d.ts.map +1 -0
  228. package/dist/theme/recipes/avatar.js +96 -0
  229. package/dist/theme/recipes/avatar.js.map +1 -0
  230. package/dist/theme/recipes/avatar.mjs +94 -0
  231. package/dist/theme/recipes/avatar.mjs.map +1 -0
  232. package/dist/translations/Defaults.translations.json.js +9 -0
  233. package/dist/translations/Defaults.translations.json.js.map +1 -1
  234. package/dist/translations/Defaults.translations.json.mjs +9 -1
  235. package/dist/translations/Defaults.translations.json.mjs.map +1 -1
  236. package/package.json +1 -1
  237. package/src/components/Accordion/Accordion.stories.tsx +85 -0
  238. package/src/components/Accordion/Accordion.usage.mdx +200 -0
  239. package/src/components/Appear/Appear.usage.mdx +107 -0
  240. package/src/components/Avatar/Avatar.recipe.test.tsx +171 -0
  241. package/src/components/Avatar/Avatar.stories.tsx +199 -24
  242. package/src/components/Avatar/Avatar.tsx +112 -21
  243. package/src/components/Avatar/Avatar.usage.mdx +185 -0
  244. package/src/components/Avatar/index.tsx +8 -1
  245. package/src/components/Badge/Badge.stories.tsx +193 -3
  246. package/src/components/Badge/Badge.tsx +5 -3
  247. package/src/components/Badge/Badge.types.ts +7 -5
  248. package/src/components/Badge/Badge.usage.mdx +265 -0
  249. package/src/components/Banner/Banner.stories.tsx +152 -2
  250. package/src/components/Banner/Banner.types.ts +30 -1
  251. package/src/components/Banner/Banner.usage.mdx +233 -0
  252. package/src/components/BottomSheet/BottomSheet.stories.tsx +168 -1
  253. package/src/components/BottomSheet/BottomSheet.test.tsx +2 -1
  254. package/src/components/BottomSheet/BottomSheet.usage.mdx +216 -0
  255. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +59 -0
  256. package/src/components/Breadcrumb/Breadcrumb.usage.mdx +181 -0
  257. package/src/components/Button/Button.legacy.ts +1 -0
  258. package/src/components/Button/Button.stories.tsx +287 -3
  259. package/src/components/Button/Button.styles.ts +18 -0
  260. package/src/components/Button/Button.tsx +15 -2
  261. package/src/components/Button/Button.types.ts +5 -2
  262. package/src/components/Button/Button.usage.mdx +342 -0
  263. package/src/components/Button/Button.variants.test.tsx +9 -0
  264. package/src/components/Card/Card.stories.tsx +106 -0
  265. package/src/components/Card/Card.types.ts +12 -0
  266. package/src/components/Card/Card.usage.mdx +216 -0
  267. package/src/components/Checkbox/Checkbox.stories.tsx +140 -13
  268. package/src/components/Checkbox/Checkbox.usage.mdx +214 -0
  269. package/src/components/Chip/Chip.usage.mdx +78 -0
  270. package/src/components/Code/Code.stories.tsx +60 -0
  271. package/src/components/Code/Code.usage.mdx +187 -0
  272. package/src/components/CodeTabs/CodeTabs.stories.tsx +53 -0
  273. package/src/components/CodeTabs/CodeTabs.usage.mdx +176 -0
  274. package/src/components/Collapsible/Collapsible.stories.tsx +58 -0
  275. package/src/components/Collapsible/Collapsible.usage.mdx +173 -0
  276. package/src/components/ColorMode/ColorMode.stories.tsx +50 -0
  277. package/src/components/ColorMode/ColorMode.usage.mdx +135 -0
  278. package/src/components/ColorMode/ColorModeToggle.tsx +10 -3
  279. package/src/components/Confetti/Confetti.types.ts +5 -1
  280. package/src/components/Confetti/Confetti.usage.mdx +111 -0
  281. package/src/components/Confetti/confettiColors.ts +5 -5
  282. package/src/components/Container/Container.stories.tsx +32 -0
  283. package/src/components/Container/Container.usage.mdx +130 -0
  284. package/src/components/CopyableCode/CopyableCode.stories.tsx +62 -0
  285. package/src/components/CopyableCode/CopyableCode.usage.mdx +168 -0
  286. package/src/components/CountBadge/CountBadge.stories.tsx +69 -0
  287. package/src/components/CountBadge/CountBadge.usage.mdx +215 -0
  288. package/src/components/CountUp/CountUp.usage.mdx +107 -0
  289. package/src/components/DatePicker/DatePicker.usage.mdx +177 -0
  290. package/src/components/DatePicker/RangeDatePicker.stories.tsx +87 -3
  291. package/src/components/ErrorFallback/ErrorFallback.types.ts +6 -0
  292. package/src/components/ErrorFallback/ErrorFallback.usage.mdx +127 -0
  293. package/src/components/ExpandableText/ExpandableText.stories.tsx +55 -0
  294. package/src/components/ExpandableText/ExpandableText.usage.mdx +176 -0
  295. package/src/components/FileInput/FileInput.stories.tsx +38 -1
  296. package/src/components/FileInput/FileInput.usage.mdx +178 -0
  297. package/src/components/FileItem/FileItem.stories.tsx +71 -0
  298. package/src/components/FileItem/FileItem.usage.mdx +180 -0
  299. package/src/components/FileList/FileList.stories.tsx +25 -0
  300. package/src/components/FileList/FileList.usage.mdx +165 -0
  301. package/src/components/FlyTo/FlyTo.usage.mdx +99 -0
  302. package/src/components/Form/Form.stories.tsx +149 -0
  303. package/src/components/Form/Form.usage.mdx +203 -0
  304. package/src/components/Form/FormModalFooter/FormModalFooter.stories.tsx +1 -1
  305. package/src/components/Form/FormModalFooter/FormModalFooter.test.tsx +19 -1
  306. package/src/components/Form/FormModalFooter/FormModalFooter.tsx +2 -0
  307. package/src/components/Form/FormModalFooter/FormModalFooter.types.ts +11 -1
  308. package/src/components/FormControl/FormControl.stories.tsx +35 -0
  309. package/src/components/FormControl/FormControl.usage.mdx +128 -0
  310. package/src/components/FormIntegration/FormIntegration.usage.mdx +158 -0
  311. package/src/components/FormLabel/FormLabel.stories.tsx +71 -0
  312. package/src/components/FormLabel/FormLabel.usage.mdx +125 -0
  313. package/src/components/Icon/Icon.stories.tsx +61 -1
  314. package/src/components/Icon/Icon.usage.mdx +158 -0
  315. package/src/components/IconButton/IconButton.stories.tsx +209 -5
  316. package/src/components/IconButton/IconButton.usage.mdx +273 -0
  317. package/src/components/InfoSprinkle/InfoSprinkle.stories.tsx +77 -1
  318. package/src/components/InfoSprinkle/InfoSprinkle.usage.mdx +189 -0
  319. package/src/components/InlineCode/InlineCode.stories.tsx +75 -0
  320. package/src/components/InlineCode/InlineCode.usage.mdx +142 -0
  321. package/src/components/Input/Input.stories.tsx +180 -0
  322. package/src/components/Input/Input.usage.mdx +278 -0
  323. package/src/components/LineGraph/LineGraph.stories.tsx +112 -0
  324. package/src/components/LineGraph/LineGraph.tsx +4 -5
  325. package/src/components/LineGraph/LineGraph.types.ts +12 -2
  326. package/src/components/LineGraph/LineGraph.usage.mdx +186 -0
  327. package/src/components/LineGraph/seriesColors.test.ts +11 -10
  328. package/src/components/LineGraph/seriesColors.ts +18 -14
  329. package/src/components/Loaders/Loaders.stories.tsx +93 -0
  330. package/src/components/Loaders/Loaders.usage.mdx +180 -0
  331. package/src/components/LogicianProvider/LogicianProvider.usage.mdx +98 -0
  332. package/src/components/Markdown/Markdown.stories.tsx +53 -0
  333. package/src/components/Markdown/Markdown.usage.mdx +182 -0
  334. package/src/components/Masonry/Masonry.stories.tsx +63 -1
  335. package/src/components/Masonry/Masonry.types.ts +8 -3
  336. package/src/components/Masonry/Masonry.usage.mdx +142 -0
  337. package/src/components/MaxLengthIndicator/MaxLengthIndicator.stories.tsx +57 -0
  338. package/src/components/MaxLengthIndicator/MaxLengthIndicator.usage.mdx +125 -0
  339. package/src/components/Menu/Menu.stories.tsx +146 -2
  340. package/src/components/Menu/Menu.usage.mdx +230 -0
  341. package/src/components/Menu/MenuItem.types.ts +8 -0
  342. package/src/components/Modal/Modal.stories.tsx +177 -1
  343. package/src/components/Modal/Modal.usage.mdx +262 -0
  344. package/src/components/Modal/ModalCloseButton.tsx +1 -1
  345. package/src/components/MonthPicker/MonthPicker.stories.tsx +30 -0
  346. package/src/components/MonthPicker/MonthPicker.usage.mdx +191 -0
  347. package/src/components/Pagination/Pagination.stories.tsx +90 -1
  348. package/src/components/Pagination/Pagination.tsx +11 -10
  349. package/src/components/Pagination/Pagination.usage.mdx +186 -0
  350. package/src/components/PasswordInput/PasswordInput.stories.tsx +51 -0
  351. package/src/components/PasswordInput/PasswordInput.usage.mdx +193 -0
  352. package/src/components/PinInput/PinInput.stories.tsx +91 -0
  353. package/src/components/PinInput/PinInput.usage.mdx +194 -0
  354. package/src/components/Popover/Popover.stories.tsx +104 -1
  355. package/src/components/Popover/Popover.usage.mdx +197 -0
  356. package/src/components/ProgressBar/ProgressBar.stories.tsx +92 -1
  357. package/src/components/ProgressBar/ProgressBar.types.ts +9 -0
  358. package/src/components/ProgressBar/ProgressBar.usage.mdx +210 -0
  359. package/src/components/Pulse/Pulse.usage.mdx +102 -0
  360. package/src/components/RadialProgress/RadialProgress.stories.tsx +74 -1
  361. package/src/components/RadialProgress/RadialProgress.types.ts +21 -1
  362. package/src/components/RadialProgress/RadialProgress.usage.mdx +153 -0
  363. package/src/components/Radio/Radio.stories.tsx +119 -0
  364. package/src/components/Radio/Radio.usage.mdx +187 -0
  365. package/src/components/Reveal/Reveal.usage.mdx +105 -0
  366. package/src/components/ScaledContext/ScaledContext.usage.mdx +111 -0
  367. package/src/components/SeeMoreButton/SeeMoreButton.stories.tsx +146 -2
  368. package/src/components/SeeMoreButton/SeeMoreButton.types.ts +8 -0
  369. package/src/components/SeeMoreButton/SeeMoreButton.usage.mdx +213 -0
  370. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +69 -0
  371. package/src/components/SegmentedControl/SegmentedControl.tsx +6 -7
  372. package/src/components/SegmentedControl/SegmentedControl.usage.mdx +209 -0
  373. package/src/components/SegmentedProgressBar/SegmentedProgressBar.stories.tsx +54 -0
  374. package/src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts +2 -0
  375. package/src/components/SegmentedProgressBar/SegmentedProgressBar.usage.mdx +145 -0
  376. package/src/components/Select/Comparison.stories.tsx +19 -0
  377. package/src/components/Select/Select.stories.tsx +264 -1
  378. package/src/components/Select/Select.styles.ts +36 -1
  379. package/src/components/Select/Select.tsx +13 -3
  380. package/src/components/Select/Select.types.ts +11 -0
  381. package/src/components/Select/Select.usage.mdx +278 -0
  382. package/src/components/Select/SelectField.tsx +7 -3
  383. package/src/components/Select/index.ts +1 -0
  384. package/src/components/Shake/Shake.usage.mdx +107 -0
  385. package/src/components/Slider/Slider.stories.tsx +116 -0
  386. package/src/components/Slider/Slider.usage.mdx +179 -0
  387. package/src/components/Spinner/Spinner.stories.tsx +64 -0
  388. package/src/components/Spinner/Spinner.usage.mdx +136 -0
  389. package/src/components/SwapTransition/SwapTransition.usage.mdx +102 -0
  390. package/src/components/Switch/Switch.stories.tsx +131 -6
  391. package/src/components/Switch/Switch.usage.mdx +199 -0
  392. package/src/components/Table/Table.stories.tsx +159 -1
  393. package/src/components/Table/Table.usage.mdx +235 -0
  394. package/src/components/Tabs/Tabs.stories.tsx +86 -0
  395. package/src/components/Tabs/Tabs.usage.mdx +219 -0
  396. package/src/components/Tag/Tag.stories.tsx +181 -4
  397. package/src/components/Tag/Tag.usage.mdx +257 -0
  398. package/src/components/Textarea/Textarea.stories.tsx +113 -0
  399. package/src/components/Textarea/Textarea.usage.mdx +186 -0
  400. package/src/components/Toast/Toast.stories.tsx +185 -3
  401. package/src/components/Toast/Toast.styles.ts +18 -10
  402. package/src/components/Toast/Toast.usage.mdx +265 -0
  403. package/src/components/Tooltip/Tooltip.stories.tsx +86 -1
  404. package/src/components/Tooltip/Tooltip.usage.mdx +211 -0
  405. package/src/components/Tree/Tree.stories.tsx +89 -0
  406. package/src/components/Tree/Tree.usage.mdx +207 -0
  407. package/src/components/Typography/Caption.tsx +0 -1
  408. package/src/components/Typography/H1.tsx +0 -1
  409. package/src/components/Typography/H2.tsx +0 -1
  410. package/src/components/Typography/H3.tsx +0 -1
  411. package/src/components/Typography/H4.tsx +0 -1
  412. package/src/components/Typography/H5.tsx +0 -1
  413. package/src/components/Typography/Link.tsx +0 -1
  414. package/src/components/Typography/Overline.tsx +0 -1
  415. package/src/components/Typography/Subtext.tsx +0 -1
  416. package/src/components/Typography/Subtitle.tsx +0 -1
  417. package/src/components/Typography/Text.tsx +0 -1
  418. package/src/components/Typography/Typography.stories.tsx +117 -0
  419. package/src/components/Typography/Typography.usage.mdx +257 -0
  420. package/src/components/Workflow/Workflow.usage.mdx +199 -0
  421. package/src/components/noRawScales.test.ts +5 -1
  422. package/src/foundations/BrandAssets.mdx +637 -0
  423. package/src/foundations/BrandAssets.stories.tsx +680 -0
  424. package/src/foundations/BrandColour.mdx +364 -0
  425. package/src/foundations/BrandColour.stories.tsx +334 -0
  426. package/src/guidelines/ComponentPageTemplate.mdx +84 -0
  427. package/src/guidelines/FeedbackActions.mdx +162 -23
  428. package/src/guidelines/_components/Lang.tsx +175 -0
  429. package/src/guidelines/_components/TokenTable.tsx +136 -0
  430. package/src/hooks/useLanguage.ts +8 -3
  431. package/src/hooks/useTranslate.test.tsx +46 -0
  432. package/src/hooks/useTranslate.ts +7 -5
  433. package/src/theme/BazePalette.stories.tsx +111 -1
  434. package/src/theme/Palette.stories.tsx +2 -2
  435. package/src/theme/SemanticTokens.mdx +87 -2
  436. package/src/theme/claude.md +16 -7
  437. package/src/theme/colors.ts +51 -6
  438. package/src/theme/contrast.test.ts +59 -3
  439. package/src/theme/global.ts +19 -0
  440. package/src/theme/index.ts +2 -0
  441. package/src/theme/palette.generated.ts +99 -0
  442. package/src/theme/paletteSwatches.ts +35 -0
  443. package/src/theme/recipes/avatar.ts +92 -0
  444. package/src/translations/Defaults.translations.json +7 -0
@@ -0,0 +1,210 @@
1
+ import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
2
+
3
+ import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
4
+ import * as ProgressBarStories from './ProgressBar.stories';
5
+
6
+ <Meta of={ProgressBarStories} name="Usage" />
7
+
8
+ <LangToggle />
9
+
10
+ <En>
11
+
12
+ # ProgressBar
13
+
14
+ A horizontal bar that shows how much of something is done or used: an upload,
15
+ a completion rate, a budget.
16
+
17
+ ## When to use
18
+
19
+ - A job with a known length: files uploaded, steps finished.
20
+ - A share of a limit: credits used this month, a completion rate in a table
21
+ row.
22
+ - `indeterminate` only when there is no denominator yet, such as a sync whose
23
+ size is not known.
24
+
25
+ ## When not to use
26
+
27
+ - Several parts of one whole (sent, failed, remaining) → `SegmentedProgressBar`.
28
+ - A share split into categories, shown as a ring → `RadialProgress`.
29
+ - A short wait with no length → `Spinner`. An indeterminate bar says only
30
+ "something is happening", which a spinner says in less space.
31
+ - A value the reader sets → `Slider`.
32
+
33
+ ## Variants and what they mean
34
+
35
+ </En>
36
+
37
+ <Ko>
38
+
39
+ # ProgressBar
40
+
41
+ 업로드, 완료율, 예산처럼 얼마나 끝났는지 또는 얼마나 썼는지 보여 주는 가로 막대입니다.
42
+
43
+ ## 언제 쓰나요
44
+
45
+ - 길이를 아는 작업: 올린 파일 수, 끝난 단계 수.
46
+ - 한도 중 쓴 비율: 이번 달 쓴 크레딧, 표의 행마다 보이는 완료율.
47
+ - `indeterminate`는 동기화처럼 전체 크기를 아직 모를 때만 씁니다.
48
+
49
+ ## 언제 쓰지 않나요
50
+
51
+ - 한 전체를 이루는 여러 부분(보냄, 실패, 남음)은 `SegmentedProgressBar`를 씁니다.
52
+ - 분류별로 나눈 비율을 고리로 보여 줄 때는 `RadialProgress`를 씁니다.
53
+ - 길이를 모르는 짧은 대기는 `Spinner`를 씁니다. 진행률을 모르는 막대는 "무언가 처리
54
+ 중"이라는 말만 하는데, 스피너는 같은 말을 더 작은 자리에서 합니다.
55
+ - 사용자가 값을 정한다면 `Slider`를 씁니다.
56
+
57
+ ## 변형과 뜻
58
+
59
+ </Ko>
60
+
61
+ <ArgTypes of={ProgressBarStories} include={['value', 'size', 'indeterminate', 'filledTrackColor']} />
62
+
63
+ <En>
64
+
65
+ | Prop | Means | Notes |
66
+ | --- | --- | --- |
67
+ | `value` | Percentage done, 0–100 by default | Change `max` (Chakra) for another scale |
68
+ | `size` | `xs` 4px · `sm` 8px · `md` 16px (default) · `lg` 24px · `xl` 32px | `xs`/`sm` in table rows and cards |
69
+ | `filledTrackColor` | Fill colour, default `primary.main` | `danger.solid` only when the value means a problem (over a limit) |
70
+ | `indeterminate` | Length unknown; a block slides across | `value` is ignored |
71
+
72
+ The fill moves with the house `travel` motion, so an update reads as the bar
73
+ catching up. Under `prefers-reduced-motion` the indeterminate block stops
74
+ sliding.
75
+
76
+ ## Do / Don't
77
+
78
+ </En>
79
+
80
+ <Ko>
81
+
82
+ | 속성 | 뜻 | 참고 |
83
+ | --- | --- | --- |
84
+ | `value` | 끝난 비율, 기본 0–100 | 다른 단위라면 Chakra의 `max`를 바꿉니다 |
85
+ | `size` | `xs` 4px · `sm` 8px · `md` 16px(기본) · `lg` 24px · `xl` 32px | 표의 행과 카드에서는 `xs`/`sm` |
86
+ | `filledTrackColor` | 채움 색, 기본 `primary.main` | 값이 문제를 뜻할 때(한도 초과)만 `danger.solid` |
87
+ | `indeterminate` | 길이를 모름. 막대 조각이 가로질러 움직임 | `value`는 무시됨 |
88
+
89
+ 채움은 공통 `travel` 모션으로 움직여서, 값이 바뀌면 막대가 따라잡는 것처럼 보입니다.
90
+ `prefers-reduced-motion`에서는 indeterminate 조각이 움직이지 않습니다.
91
+
92
+ ## 이렇게 하세요 / 이렇게 하지 마세요
93
+
94
+ </Ko>
95
+
96
+ <Canvas of={ProgressBarStories.DoLabelAndNumber} />
97
+ <Verdict
98
+ kind="do"
99
+ en="Say what is being measured and give the number in words. The bar is the picture; the text is the information."
100
+ ko="무엇을 재는지 쓰고 숫자를 글자로 보여 줍니다. 막대는 그림이고, 정보는 글자가 전합니다."
101
+ />
102
+
103
+ <Canvas of={ProgressBarStories.DontBareBar} />
104
+ <Verdict
105
+ kind="dont"
106
+ en="Show a bar with nothing next to it. Sighted readers guess; screen readers hear only '60%'."
107
+ ko="옆에 아무것도 없는 막대만 두지 마세요. 보는 사람은 짐작해야 하고, 화면 낭독기 사용자는 '60%'만 듣습니다."
108
+ />
109
+
110
+ <Canvas of={ProgressBarStories.DoDangerWhenOver} />
111
+ <Verdict
112
+ kind="do"
113
+ en="Switch the fill to danger.solid when the value is a problem, and say so in words (WCAG 1.4.1)."
114
+ ko="값이 문제를 뜻할 때는 채움을 danger.solid로 바꾸고, 그 사실을 글자로도 씁니다(WCAG 1.4.1)."
115
+ />
116
+
117
+ <Canvas of={ProgressBarStories.DoIndeterminateWithHint} />
118
+ <Verdict
119
+ kind="do"
120
+ en="With an indeterminate bar, add a line that says what is happening and roughly how long it may take."
121
+ ko="indeterminate 막대에는 무슨 일이 일어나는지, 대략 얼마나 걸릴지 알려 주는 한 줄을 붙입니다."
122
+ />
123
+
124
+ <En>
125
+
126
+ ## Content
127
+
128
+ - Label: what is measured, as a noun phrase (문서 업로드, 이번 달 크레딧).
129
+ - Number: the form the reader thinks in, such as 3 / 5 or 112%, next to the
130
+ label.
131
+ - When the bar is full, replace it with the result if the result matters
132
+ (업로드 완료).
133
+
134
+ ## Accessibility
135
+
136
+ What ProgressBar does for you:
137
+
138
+ - The track is `role="progressbar"` with `aria-valuemin`, `aria-valuemax` and
139
+ `aria-valuenow`; indeterminate leaves out `aria-valuenow` (WCAG 4.1.2).
140
+
141
+ What you still have to do:
142
+
143
+ - **The bar's accessible name is its percentage**, such as "60%". Chakra puts
144
+ that `aria-label` on the track, and props you pass to `ProgressBar` land on
145
+ the wrapper, so an `aria-label` of yours does not reach it. Put the label and
146
+ the number in visible text next to the bar (WCAG 1.3.1).
147
+ - Progress changes are not announced. For a long job, announce the milestones
148
+ that matter (started, finished, failed) in a `role="status"` region, as
149
+ FactChat does with `aria-live="polite"` on the row (WCAG 4.1.3).
150
+ - The `bg.track` track and the fill are drawn so the bar reads on any
151
+ background (WCAG 1.4.11). A custom `filledTrackColor` has to keep that.
152
+
153
+ ## Tokens
154
+
155
+ </En>
156
+
157
+ <Ko>
158
+
159
+ ## 문구
160
+
161
+ - 라벨: 무엇을 재는지 명사구로 씁니다(문서 업로드, 이번 달 크레딧).
162
+ - 숫자: 사용자가 생각하는 형태(3 / 5, 112%)로 라벨 옆에 씁니다.
163
+ - 결과가 중요하다면, 막대가 다 차면 막대 대신 결과를 보여 줍니다(업로드 완료).
164
+
165
+ ## 접근성
166
+
167
+ ProgressBar가 알아서 하는 일
168
+
169
+ - 트랙에 `role="progressbar"`와 `aria-valuemin`, `aria-valuemax`, `aria-valuenow`가
170
+ 붙습니다. indeterminate일 때는 `aria-valuenow`가 빠집니다(WCAG 4.1.2).
171
+
172
+ 직접 챙겨야 하는 일
173
+
174
+ - **막대의 접근 가능한 이름은 "60%" 같은 비율입니다.** Chakra가 그 `aria-label`을
175
+ 트랙에 붙이고, `ProgressBar`에 넘긴 속성은 바깥 요소로 가기 때문에 직접 넘긴
176
+ `aria-label`은 트랙에 닿지 않습니다. 라벨과 숫자는 막대 옆에 눈에 보이는 글자로
177
+ 씁니다(WCAG 1.3.1).
178
+ - 진행률이 바뀌어도 알려 주지 않습니다. 오래 걸리는 작업이라면 시작, 완료, 실패처럼
179
+ 중요한 순간을 `role="status"` 영역으로 알립니다. FactChat은 행에
180
+ `aria-live="polite"`를 붙여 이렇게 합니다(WCAG 4.1.3).
181
+ - `bg.track` 트랙과 채움은 어떤 배경에서도 막대가 보이도록 정해져 있습니다(WCAG
182
+ 1.4.11). `filledTrackColor`를 바꾼다면 이 점을 지켜야 합니다.
183
+
184
+ ## 토큰
185
+
186
+ </Ko>
187
+
188
+ <Canvas of={ProgressBarStories.UsageTokens} sourceState="none" />
189
+
190
+ <En>
191
+
192
+ ## Related
193
+
194
+ - **SegmentedProgressBar**: several parts of one whole.
195
+ - **RadialProgress**: a share split into categories, as a ring.
196
+ - **Spinner** / **Loaders**: a wait with no length.
197
+ - **Slider**: a value the reader sets.
198
+
199
+ </En>
200
+
201
+ <Ko>
202
+
203
+ ## 관련 컴포넌트
204
+
205
+ - **SegmentedProgressBar**: 한 전체를 이루는 여러 부분.
206
+ - **RadialProgress**: 분류별로 나눈 비율을 고리로.
207
+ - **Spinner** / **Loaders**: 길이를 모르는 대기.
208
+ - **Slider**: 사용자가 정하는 값.
209
+
210
+ </Ko>
@@ -0,0 +1,102 @@
1
+ import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
2
+
3
+ import { En, Ko, LangToggle } from '../../guidelines/_components/Lang';
4
+ import * as PulseStories from './Pulse.stories';
5
+
6
+ <Meta of={PulseStories} name="Usage" />
7
+
8
+ <LangToggle />
9
+
10
+ <En>
11
+
12
+ # Pulse
13
+
14
+ Pops its content once each time `trigger` changes, to draw the eye to a value
15
+ that just updated for the better.
16
+
17
+ </En>
18
+
19
+ <Ko>
20
+
21
+ # Pulse
22
+
23
+ `trigger`가 바뀔 때마다 내용을 한 번 톡 튀게 해서, 방금 좋아진 값으로 시선을 끕니다.
24
+
25
+ </Ko>
26
+
27
+ <Canvas of={PulseStories.Default} />
28
+
29
+ <En>
30
+
31
+ ## When to use
32
+
33
+ - A count or balance that just grew: missions finished, credits added.
34
+ - A step indicator that just filled, or a level card when the level changes.
35
+ - A badge or chip that just landed, for example at the end of a `FlyTo`.
36
+
37
+ ## When not to use
38
+
39
+ - The change is a refusal or an error → `Shake`. The pair must stay apart: a
40
+ pulse reads as "good, look here", a shake as "no".
41
+ - The element is appearing for the first time → `Appear`. Pulse never plays on
42
+ the first render, so a value that is already set on mount stays still.
43
+ - The number itself should be seen changing → `CountUp` (it can sit inside a
44
+ Pulse).
45
+ - Values that update continuously (a timer, live progress) → no Pulse. It
46
+ would play on every tick.
47
+
48
+ ## Reduced motion and accessibility
49
+
50
+ - With `prefers-reduced-motion: reduce` the pop is removed outright. The value
51
+ has already changed by then; only the emphasis is lost.
52
+ - Replaying does not remount the children, so keyboard focus and input state
53
+ inside the Pulse are kept.
54
+ - The pop is not announced. If the change matters to someone who cannot see
55
+ it, announce the new value yourself (WCAG 4.1.3).
56
+ - Pulse adds one `div` (`display: inline-flex`) around `children`. Inside a
57
+ `<button>` pass `as="span"` (ACCESSIBILITY.md §5).
58
+
59
+ ## Props
60
+
61
+ Any changing value works as `trigger`: a counter, an id, a timestamp. Going
62
+ back to an earlier value (`0 → 1 → 0`) still pops.
63
+
64
+ </En>
65
+
66
+ <Ko>
67
+
68
+ ## 언제 쓰나요
69
+
70
+ - 개수나 잔액이 방금 늘었을 때: 완료한 미션 수, 추가된 크레딧.
71
+ - 단계 표시가 방금 채워졌거나, 레벨이 바뀌어 레벨 카드가 달라졌을 때.
72
+ - 배지나 칩이 방금 도착했을 때. 예를 들어 `FlyTo`가 끝나는 자리입니다.
73
+
74
+ ## 언제 쓰지 않나요
75
+
76
+ - 거절이나 오류를 알리는 변화라면 `Shake`를 씁니다. 둘은 섞으면 안 됩니다. Pulse는
77
+ "좋아요, 여기 보세요"로, Shake는 "아니요"로 읽힙니다.
78
+ - 요소가 처음 나타나는 것이라면 `Appear`를 씁니다. Pulse는 첫 렌더에서 재생되지 않으므로,
79
+ 마운트할 때 이미 정해진 값은 움직이지 않습니다.
80
+ - 숫자가 바뀌는 과정 자체를 보여 줘야 한다면 `CountUp`을 씁니다(Pulse 안에 넣어도 됩니다).
81
+ - 타이머나 실시간 진행률처럼 계속 바뀌는 값에는 Pulse를 쓰지 않습니다. 바뀔 때마다
82
+ 튀게 됩니다.
83
+
84
+ ## 동작 줄이기와 접근성
85
+
86
+ - `prefers-reduced-motion: reduce`에서는 튀는 효과를 아예 뺍니다. 값은 이미 바뀌었으니
87
+ 잃는 것은 강조뿐입니다.
88
+ - 다시 재생할 때 자식을 새로 마운트하지 않으므로, Pulse 안의 키보드 초점과 입력 상태가
89
+ 그대로 유지됩니다.
90
+ - 튀는 효과는 읽어 주지 않습니다. 보지 못하는 사람에게도 중요한 변화라면 새 값을 직접
91
+ 알립니다(WCAG 4.1.3).
92
+ - Pulse는 `children` 바깥에 `div`(`display: inline-flex`)를 하나 더합니다. `<button>`
93
+ 안에서는 `as="span"`을 넘깁니다(ACCESSIBILITY.md 5절).
94
+
95
+ ## 속성
96
+
97
+ `trigger`에는 바뀌는 값이면 무엇이든 넣을 수 있습니다. 카운터, id, 타임스탬프 모두
98
+ 됩니다. 이전 값으로 돌아가도(`0 → 1 → 0`) 다시 튑니다.
99
+
100
+ </Ko>
101
+
102
+ <ArgTypes of={PulseStories} include={['trigger', 'peak']} />
@@ -1,6 +1,9 @@
1
- import { Box } from '@chakra-ui/react';
1
+ import { Box, Flex, HStack, Stack } from '@chakra-ui/react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
3
 
4
+ import { T } from '../../guidelines/_components/Lang';
5
+ import { TokenTable } from '../../guidelines/_components/TokenTable';
6
+ import { Subtext, Text } from '../Typography';
4
7
  import RadialProgress from './RadialProgress';
5
8
 
6
9
  const meta = {
@@ -271,3 +274,73 @@ export const EmptySegments: Story = {
271
274
  },
272
275
  },
273
276
  };
277
+
278
+ // ───────────────────────── Usage-page specimens ─────────────────────────
279
+ // Pulled into `RadialProgress.usage.mdx` with <Canvas of={…} />. Hidden from
280
+ // the sidebar (`!dev`); `tags` is written on each story because the indexer
281
+ // reads CSF statically.
282
+
283
+ const STORAGE = [
284
+ { label: '문서', color: 'category.blue.fg', value: 42 },
285
+ { label: '이미지', color: 'category.purple.fg', value: 28 },
286
+ { label: '오디오', color: 'category.orange.fg', value: 12 },
287
+ ];
288
+
289
+ export const DoTokensAndLegend: Story = {
290
+ tags: ['!dev'],
291
+ name: 'Usage / Do: category tokens and a text legend',
292
+ render: () => (
293
+ <Flex gap={6} align="center" wrap="wrap">
294
+ <RadialProgress
295
+ size={160}
296
+ total={100}
297
+ unit="GB"
298
+ segments={STORAGE.map(({ color, value }) => ({ color, value }))}
299
+ aria-hidden
300
+ width="auto"
301
+ />
302
+ <Stack gap={1}>
303
+ <Text fontWeight="bold">저장 공간 100GB 중 82GB 사용</Text>
304
+ {STORAGE.map(({ label, color, value }) => (
305
+ <HStack key={label} gap={2}>
306
+ <Box boxSize="10px" borderRadius="full" bg={color} />
307
+ <Subtext>
308
+ {label} {value}GB
309
+ </Subtext>
310
+ </HStack>
311
+ ))}
312
+ </Stack>
313
+ </Flex>
314
+ ),
315
+ };
316
+
317
+ export const DontHexNoLegend: Story = {
318
+ tags: ['!dev'],
319
+ name: "Usage / Don't: hex colours and no legend",
320
+ args: {
321
+ size: 160,
322
+ total: 100,
323
+ unit: 'GB',
324
+ segments: [
325
+ { color: '#4ECDC4', value: 42 },
326
+ { color: '#FF6B6B', value: 28 },
327
+ { color: '#FFD93D', value: 12 },
328
+ ],
329
+ },
330
+ };
331
+
332
+ /** Tokens the chart reads besides its segments, from `RadialProgress.tsx`. */
333
+ export const UsageTokens: Story = {
334
+ tags: ['!dev'],
335
+ name: 'Usage / Tokens',
336
+ render: () => (
337
+ <TokenTable
338
+ rows={[
339
+ { token: 'bg.track', use: <T en="remaining arc" ko="남은 부분의 호" /> },
340
+ { token: 'bg.surface', use: <T en="background" ko="배경" /> },
341
+ { token: 'fg.subtle', use: <T en="centre number" ko="가운데 숫자" /> },
342
+ { token: 'bg.muted', use: <T en="shadow under the ring" ko="고리 아래 그림자" /> },
343
+ ]}
344
+ />
345
+ ),
346
+ };
@@ -1,16 +1,36 @@
1
1
  import { BoxProps } from '@chakra-ui/react';
2
2
 
3
3
  export interface Segment {
4
- /** Color value - supports hex colors, CSS color names, and Chakra UI color tokens (e.g., 'primary.main', 'danger.solid') */
4
+ /**
5
+ * Colour token for the arc. Categories take `category.{hue}.fg`; a status
6
+ * colour (`danger.solid`, …) only when the segment means that status. Hex and
7
+ * CSS colour names still render but skip the theme (no dark mode).
8
+ */
5
9
  color: string;
10
+ /** Amount, in the same unit as `total`. */
6
11
  value: number;
7
12
  }
8
13
 
9
14
  export interface RadialProgressProps extends BoxProps {
15
+ /**
16
+ * Diameter in px; stroke, gaps and the centre text scale with it.
17
+ * @default 200
18
+ */
10
19
  size?: number;
20
+ /**
21
+ * The whole the segments are parts of, also shown as the centre number.
22
+ * Nothing renders when it is 0 or less.
23
+ * @default 100
24
+ */
11
25
  total?: number;
26
+ /** Unit after the centre number, e.g. `GB`. */
12
27
  unit?: string;
28
+ /**
29
+ * Arcs in order, clockwise from the top. Whatever `total` leaves over is
30
+ * drawn as a `bg.track` arc.
31
+ */
13
32
  segments?: Segment[];
33
+ /** Formats the centre number, e.g. thousands separators. */
14
34
  formatTotal?: (value: number) => string | number;
15
35
  }
16
36
 
@@ -0,0 +1,153 @@
1
+ import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
2
+
3
+ import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
4
+ import * as RadialProgressStories from './RadialProgress.stories';
5
+
6
+ <Meta of={RadialProgressStories} name="Usage" />
7
+
8
+ <LangToggle />
9
+
10
+ <En>
11
+
12
+ # RadialProgress
13
+
14
+ A ring split into coloured arcs that shows how a total is used, category by
15
+ category, with the total in the middle.
16
+
17
+ ## When to use
18
+
19
+ - A share of one total split into a few categories: storage by file type,
20
+ a budget by team.
21
+ - A summary tile where a ring reads faster than a table.
22
+
23
+ ## When not to use
24
+
25
+ - One value against a limit → `ProgressBar`.
26
+ - Parts of a job in progress (sent, failed, remaining) → `SegmentedProgressBar`.
27
+ - More than five or six categories, or values the reader must compare
28
+ precisely → a bar chart or a table.
29
+
30
+ ## Props
31
+
32
+ </En>
33
+
34
+ <Ko>
35
+
36
+ # RadialProgress
37
+
38
+ 전체가 분류별로 어떻게 쓰였는지 색이 다른 호로 나눠 보여 주고, 가운데에 전체 값을
39
+ 적는 고리입니다.
40
+
41
+ ## 언제 쓰나요
42
+
43
+ - 하나의 전체를 몇 가지 분류로 나눈 비율: 파일 종류별 저장 공간, 팀별 예산.
44
+ - 표보다 고리가 더 빨리 읽히는 요약 카드.
45
+
46
+ ## 언제 쓰지 않나요
47
+
48
+ - 한도에 대한 값 하나는 `ProgressBar`를 씁니다.
49
+ - 진행 중인 작업의 부분(보냄, 실패, 남음)은 `SegmentedProgressBar`를 씁니다.
50
+ - 분류가 대여섯 개를 넘거나 값을 정확히 비교해야 한다면 막대그래프나 표를 씁니다.
51
+
52
+ ## 속성
53
+
54
+ </Ko>
55
+
56
+ <ArgTypes of={RadialProgressStories} include={['segments', 'total', 'unit', 'size', 'formatTotal']} />
57
+
58
+ <En>
59
+
60
+ - The centre shows `total` (through `formatTotal` if given) and `unit`, not
61
+ the used amount. Put "82GB used" in text next to the ring.
62
+ - Segments are drawn clockwise from the top with a gap between arcs. Whatever
63
+ `total` leaves over is a `bg.track` arc.
64
+ - RadialProgress is a default export re-exported as
65
+ `import { RadialProgress } from '@mindlogic-ai/logician-ui'`.
66
+
67
+ ## Do / Don't
68
+
69
+ </En>
70
+
71
+ <Ko>
72
+
73
+ - 가운데에는 쓴 양이 아니라 `total`(`formatTotal`이 있으면 그 결과)과 `unit`이
74
+ 보입니다. "82GB 사용" 같은 문구는 고리 옆에 글자로 씁니다.
75
+ - 세그먼트는 위쪽에서 시작해 시계 방향으로, 호 사이에 틈을 두고 그려집니다. `total`에서
76
+ 남은 부분은 `bg.track` 호로 그려집니다.
77
+ - 기본 내보내기이며, `import { RadialProgress } from '@mindlogic-ai/logician-ui'`로
78
+ 가져옵니다.
79
+
80
+ ## 이렇게 하세요 / 이렇게 하지 마세요
81
+
82
+ </Ko>
83
+
84
+ <Canvas of={RadialProgressStories.DoTokensAndLegend} />
85
+ <Verdict
86
+ kind="do"
87
+ en="Colour segments with category.{hue}.fg tokens and add a text legend with each value. Mark the ring aria-hidden when the legend says everything."
88
+ ko="세그먼트 색은 category.{hue}.fg 토큰으로 정하고, 값을 함께 적은 글자 범례를 붙입니다. 범례가 모든 정보를 전한다면 고리에는 aria-hidden을 붙입니다."
89
+ />
90
+
91
+ <Canvas of={RadialProgressStories.DontHexNoLegend} />
92
+ <Verdict
93
+ kind="dont"
94
+ en="Pass hex colours and leave out the legend. Hex skips the theme, so dark mode keeps light-mode colours, and without a legend nobody knows what each arc is."
95
+ ko="16진수 색을 넘기고 범례를 빼지 마세요. 16진수는 테마를 거치지 않아 다크 모드에서도 라이트 모드 색이 그대로 남고, 범례가 없으면 각 호가 무엇인지 아무도 모릅니다."
96
+ />
97
+
98
+ <En>
99
+
100
+ ## Accessibility
101
+
102
+ - **RadialProgress exposes nothing to assistive tech except the centre
103
+ number.** The SVG has no role, title or description, and the arcs have no
104
+ names. Give the same information in text (a legend, a sentence) next to it
105
+ (WCAG 1.1.1, 1.3.1).
106
+ - **Words, not colour alone** (WCAG 1.4.1). The legend names each category;
107
+ the colours only connect legend and arc.
108
+ - Status colours mean status: use `danger.solid` for a segment only when that
109
+ segment is a problem, such as an overrun.
110
+
111
+ ## Tokens
112
+
113
+ </En>
114
+
115
+ <Ko>
116
+
117
+ ## 접근성
118
+
119
+ - **RadialProgress는 가운데 숫자 말고는 보조 기술에 아무것도 알리지 않습니다.** SVG에는
120
+ 역할, 제목, 설명이 없고 호에도 이름이 없습니다. 같은 정보를 범례나 문장 같은 글자로
121
+ 옆에 씁니다(WCAG 1.1.1, 1.3.1).
122
+ - **색만으로 알리지 않습니다**(WCAG 1.4.1). 분류 이름은 범례가 알려 주고, 색은 범례와
123
+ 호를 이어 줄 뿐입니다.
124
+ - 상태색은 상태를 뜻합니다. 초과 사용처럼 그 세그먼트가 문제일 때만 `danger.solid`를
125
+ 씁니다.
126
+
127
+ ## 토큰
128
+
129
+ </Ko>
130
+
131
+ <Canvas of={RadialProgressStories.UsageTokens} sourceState="none" />
132
+
133
+ <En>
134
+
135
+ ## Related
136
+
137
+ - **ProgressBar**: one value against a limit.
138
+ - **SegmentedProgressBar**: parts of one job, as a bar.
139
+ - **LineGraph**: change over time.
140
+ - **Foundations/Brand & colour usage**: category hues for categories.
141
+
142
+ </En>
143
+
144
+ <Ko>
145
+
146
+ ## 관련 컴포넌트
147
+
148
+ - **ProgressBar**: 한도에 대한 값 하나.
149
+ - **SegmentedProgressBar**: 한 작업의 부분을 막대로.
150
+ - **LineGraph**: 시간에 따른 변화.
151
+ - **Foundations/Brand & colour usage**: 분류에는 category 색을 씁니다.
152
+
153
+ </Ko>