@mindlogic-ai/logician-ui 5.0.0-alpha.3 → 5.0.0-alpha.30

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 (610) hide show
  1. package/MIGRATION-5.0.md +40 -1
  2. package/README.md +1 -0
  3. package/USAGE.md +20 -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 +41 -5
  7. package/dist/components/Avatar/Avatar.js.map +1 -1
  8. package/dist/components/Avatar/Avatar.mjs +40 -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/Banner/Banner.types.d.ts +24 -1
  13. package/dist/components/Banner/Banner.types.d.ts.map +1 -1
  14. package/dist/components/BottomSheet/BottomSheet.styles.d.ts +2 -2
  15. package/dist/components/Button/Button.d.ts.map +1 -1
  16. package/dist/components/Button/Button.js +31 -3
  17. package/dist/components/Button/Button.js.map +1 -1
  18. package/dist/components/Button/Button.mjs +31 -3
  19. package/dist/components/Button/Button.mjs.map +1 -1
  20. package/dist/components/Button/Button.types.d.ts +38 -1
  21. package/dist/components/Button/Button.types.d.ts.map +1 -1
  22. package/dist/components/Card/Card.types.d.ts +12 -0
  23. package/dist/components/Card/Card.types.d.ts.map +1 -1
  24. package/dist/components/Code/shikiAdapter.d.ts +3 -1
  25. package/dist/components/Code/shikiAdapter.d.ts.map +1 -1
  26. package/dist/components/Code/shikiAdapter.js +29 -8
  27. package/dist/components/Code/shikiAdapter.js.map +1 -1
  28. package/dist/components/Code/shikiAdapter.mjs +29 -8
  29. package/dist/components/Code/shikiAdapter.mjs.map +1 -1
  30. package/dist/components/CodeTabs/CodeTabs.styles.d.ts +6 -5
  31. package/dist/components/CodeTabs/CodeTabs.styles.d.ts.map +1 -1
  32. package/dist/components/CodeTabs/CodeTabs.styles.js +6 -5
  33. package/dist/components/CodeTabs/CodeTabs.styles.js.map +1 -1
  34. package/dist/components/CodeTabs/CodeTabs.styles.mjs +6 -5
  35. package/dist/components/CodeTabs/CodeTabs.styles.mjs.map +1 -1
  36. package/dist/components/ColorMode/ColorModeToggle.d.ts +7 -2
  37. package/dist/components/ColorMode/ColorModeToggle.d.ts.map +1 -1
  38. package/dist/components/ColorMode/ColorModeToggle.js +8 -3
  39. package/dist/components/ColorMode/ColorModeToggle.js.map +1 -1
  40. package/dist/components/ColorMode/ColorModeToggle.mjs +8 -3
  41. package/dist/components/ColorMode/ColorModeToggle.mjs.map +1 -1
  42. package/dist/components/Confetti/Confetti.types.d.ts +5 -1
  43. package/dist/components/Confetti/Confetti.types.d.ts.map +1 -1
  44. package/dist/components/Confetti/confettiColors.d.ts +5 -5
  45. package/dist/components/Confetti/confettiColors.js +5 -5
  46. package/dist/components/Confetti/confettiColors.mjs +5 -5
  47. package/dist/components/DatePicker/DatePicker.types.d.ts +12 -0
  48. package/dist/components/DatePicker/DatePicker.types.d.ts.map +1 -0
  49. package/dist/components/DatePicker/RangeDatePicker.d.ts +2 -1
  50. package/dist/components/DatePicker/RangeDatePicker.d.ts.map +1 -1
  51. package/dist/components/DatePicker/RangeDatePicker.js +4 -2
  52. package/dist/components/DatePicker/RangeDatePicker.js.map +1 -1
  53. package/dist/components/DatePicker/RangeDatePicker.mjs +4 -2
  54. package/dist/components/DatePicker/RangeDatePicker.mjs.map +1 -1
  55. package/dist/components/DatePicker/SingleDatePicker.d.ts +2 -1
  56. package/dist/components/DatePicker/SingleDatePicker.d.ts.map +1 -1
  57. package/dist/components/DatePicker/SingleDatePicker.js +4 -2
  58. package/dist/components/DatePicker/SingleDatePicker.js.map +1 -1
  59. package/dist/components/DatePicker/SingleDatePicker.mjs +4 -2
  60. package/dist/components/DatePicker/SingleDatePicker.mjs.map +1 -1
  61. package/dist/components/DatePicker/index.d.ts +1 -0
  62. package/dist/components/DatePicker/index.d.ts.map +1 -1
  63. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts +6 -0
  64. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts.map +1 -1
  65. package/dist/components/ExpandableText/ExpandableText.d.ts.map +1 -1
  66. package/dist/components/ExpandableText/ExpandableText.js +1 -1
  67. package/dist/components/ExpandableText/ExpandableText.js.map +1 -1
  68. package/dist/components/ExpandableText/ExpandableText.mjs +1 -1
  69. package/dist/components/ExpandableText/ExpandableText.mjs.map +1 -1
  70. package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts +1 -1
  71. package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts.map +1 -1
  72. package/dist/components/Form/FormModalFooter/FormModalFooter.js +2 -2
  73. package/dist/components/Form/FormModalFooter/FormModalFooter.js.map +1 -1
  74. package/dist/components/Form/FormModalFooter/FormModalFooter.mjs +2 -2
  75. package/dist/components/Form/FormModalFooter/FormModalFooter.mjs.map +1 -1
  76. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts +11 -1
  77. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts.map +1 -1
  78. package/dist/components/Form/FormSection/CollapsibleFormSection.js +1 -0
  79. package/dist/components/Form/FormSection/CollapsibleFormSection.js.map +1 -1
  80. package/dist/components/Form/FormSection/CollapsibleFormSection.mjs +1 -0
  81. package/dist/components/Form/FormSection/CollapsibleFormSection.mjs.map +1 -1
  82. package/dist/components/Input/Input.d.ts.map +1 -1
  83. package/dist/components/Input/Input.js +4 -0
  84. package/dist/components/Input/Input.js.map +1 -1
  85. package/dist/components/Input/Input.mjs +4 -0
  86. package/dist/components/Input/Input.mjs.map +1 -1
  87. package/dist/components/LineGraph/LineGraph.d.ts.map +1 -1
  88. package/dist/components/LineGraph/LineGraph.js +4 -5
  89. package/dist/components/LineGraph/LineGraph.js.map +1 -1
  90. package/dist/components/LineGraph/LineGraph.mjs +5 -6
  91. package/dist/components/LineGraph/LineGraph.mjs.map +1 -1
  92. package/dist/components/LineGraph/LineGraph.types.d.ts +12 -2
  93. package/dist/components/LineGraph/LineGraph.types.d.ts.map +1 -1
  94. package/dist/components/LineGraph/seriesColors.d.ts +12 -8
  95. package/dist/components/LineGraph/seriesColors.d.ts.map +1 -1
  96. package/dist/components/LineGraph/seriesColors.js +8 -7
  97. package/dist/components/LineGraph/seriesColors.js.map +1 -1
  98. package/dist/components/LineGraph/seriesColors.mjs +8 -7
  99. package/dist/components/LineGraph/seriesColors.mjs.map +1 -1
  100. package/dist/components/Masonry/Masonry.types.d.ts +8 -3
  101. package/dist/components/Masonry/Masonry.types.d.ts.map +1 -1
  102. package/dist/components/Menu/MenuItem.types.d.ts +8 -0
  103. package/dist/components/Menu/MenuItem.types.d.ts.map +1 -1
  104. package/dist/components/Modal/ModalCloseButton.d.ts +1 -1
  105. package/dist/components/Modal/ModalCloseButton.js +1 -1
  106. package/dist/components/Modal/ModalCloseButton.mjs +1 -1
  107. package/dist/components/MonthPicker/MonthPicker.d.ts.map +1 -1
  108. package/dist/components/MonthPicker/MonthPicker.js +3 -2
  109. package/dist/components/MonthPicker/MonthPicker.js.map +1 -1
  110. package/dist/components/MonthPicker/MonthPicker.mjs +3 -2
  111. package/dist/components/MonthPicker/MonthPicker.mjs.map +1 -1
  112. package/dist/components/MonthPicker/MonthPicker.types.d.ts +7 -1
  113. package/dist/components/MonthPicker/MonthPicker.types.d.ts.map +1 -1
  114. package/dist/components/NavList/NavList.d.ts +35 -0
  115. package/dist/components/NavList/NavList.d.ts.map +1 -0
  116. package/dist/components/NavList/NavList.js +113 -0
  117. package/dist/components/NavList/NavList.js.map +1 -0
  118. package/dist/components/NavList/NavList.mjs +111 -0
  119. package/dist/components/NavList/NavList.mjs.map +1 -0
  120. package/dist/components/NavList/NavList.styles.d.ts +90 -0
  121. package/dist/components/NavList/NavList.styles.d.ts.map +1 -0
  122. package/dist/components/NavList/NavList.styles.js +104 -0
  123. package/dist/components/NavList/NavList.styles.js.map +1 -0
  124. package/dist/components/NavList/NavList.styles.mjs +97 -0
  125. package/dist/components/NavList/NavList.styles.mjs.map +1 -0
  126. package/dist/components/NavList/NavList.translations.json.js +19 -0
  127. package/dist/components/NavList/NavList.translations.json.js.map +1 -0
  128. package/dist/components/NavList/NavList.translations.json.mjs +14 -0
  129. package/dist/components/NavList/NavList.translations.json.mjs.map +1 -0
  130. package/dist/components/NavList/NavList.types.d.ts +140 -0
  131. package/dist/components/NavList/NavList.types.d.ts.map +1 -0
  132. package/dist/components/NavList/NavListContext.d.ts +30 -0
  133. package/dist/components/NavList/NavListContext.d.ts.map +1 -0
  134. package/dist/components/NavList/NavListContext.js +16 -0
  135. package/dist/components/NavList/NavListContext.js.map +1 -0
  136. package/dist/components/NavList/NavListContext.mjs +13 -0
  137. package/dist/components/NavList/NavListContext.mjs.map +1 -0
  138. package/dist/components/NavList/NavListGroup.d.ts +31 -0
  139. package/dist/components/NavList/NavListGroup.d.ts.map +1 -0
  140. package/dist/components/NavList/NavListGroup.js +115 -0
  141. package/dist/components/NavList/NavListGroup.js.map +1 -0
  142. package/dist/components/NavList/NavListGroup.mjs +113 -0
  143. package/dist/components/NavList/NavListGroup.mjs.map +1 -0
  144. package/dist/components/NavList/NavListItem.d.ts +16 -0
  145. package/dist/components/NavList/NavListItem.d.ts.map +1 -0
  146. package/dist/components/NavList/NavListItem.js +284 -0
  147. package/dist/components/NavList/NavListItem.js.map +1 -0
  148. package/dist/components/NavList/NavListItem.mjs +282 -0
  149. package/dist/components/NavList/NavListItem.mjs.map +1 -0
  150. package/dist/components/NavList/NavListSkeleton.d.ts +17 -0
  151. package/dist/components/NavList/NavListSkeleton.d.ts.map +1 -0
  152. package/dist/components/NavList/NavListSkeleton.js +33 -0
  153. package/dist/components/NavList/NavListSkeleton.js.map +1 -0
  154. package/dist/components/NavList/NavListSkeleton.mjs +31 -0
  155. package/dist/components/NavList/NavListSkeleton.mjs.map +1 -0
  156. package/dist/components/NavList/index.d.ts +7 -0
  157. package/dist/components/NavList/index.d.ts.map +1 -0
  158. package/dist/components/Pagination/Pagination.d.ts +11 -10
  159. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  160. package/dist/components/Pagination/Pagination.js +11 -10
  161. package/dist/components/Pagination/Pagination.js.map +1 -1
  162. package/dist/components/Pagination/Pagination.mjs +11 -10
  163. package/dist/components/Pagination/Pagination.mjs.map +1 -1
  164. package/dist/components/ProgressBar/ProgressBar.types.d.ts +9 -0
  165. package/dist/components/ProgressBar/ProgressBar.types.d.ts.map +1 -1
  166. package/dist/components/RadialProgress/RadialProgress.types.d.ts +21 -1
  167. package/dist/components/RadialProgress/RadialProgress.types.d.ts.map +1 -1
  168. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts +8 -0
  169. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts.map +1 -1
  170. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  171. package/dist/components/SegmentedControl/SegmentedControl.js +34 -33
  172. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
  173. package/dist/components/SegmentedControl/SegmentedControl.mjs +35 -34
  174. package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  175. package/dist/components/SegmentedControl/SegmentedControl.styles.d.ts +24 -0
  176. package/dist/components/SegmentedControl/SegmentedControl.styles.d.ts.map +1 -1
  177. package/dist/components/SegmentedControl/SegmentedControl.styles.js +30 -0
  178. package/dist/components/SegmentedControl/SegmentedControl.styles.js.map +1 -1
  179. package/dist/components/SegmentedControl/SegmentedControl.styles.mjs +29 -1
  180. package/dist/components/SegmentedControl/SegmentedControl.styles.mjs.map +1 -1
  181. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts +2 -0
  182. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts.map +1 -1
  183. package/dist/components/Select/Combobox.d.ts +1 -1
  184. package/dist/components/Select/Combobox.d.ts.map +1 -1
  185. package/dist/components/Select/Combobox.js +9 -2
  186. package/dist/components/Select/Combobox.js.map +1 -1
  187. package/dist/components/Select/Combobox.mjs +10 -3
  188. package/dist/components/Select/Combobox.mjs.map +1 -1
  189. package/dist/components/Select/Select.d.ts +1 -1
  190. package/dist/components/Select/Select.d.ts.map +1 -1
  191. package/dist/components/Select/Select.js +14 -2
  192. package/dist/components/Select/Select.js.map +1 -1
  193. package/dist/components/Select/Select.mjs +15 -3
  194. package/dist/components/Select/Select.mjs.map +1 -1
  195. package/dist/components/Select/Select.styles.d.ts +97 -1
  196. package/dist/components/Select/Select.styles.d.ts.map +1 -1
  197. package/dist/components/Select/Select.styles.js +83 -0
  198. package/dist/components/Select/Select.styles.js.map +1 -1
  199. package/dist/components/Select/Select.styles.mjs +82 -1
  200. package/dist/components/Select/Select.styles.mjs.map +1 -1
  201. package/dist/components/Switch/SwitchControl.d.ts.map +1 -1
  202. package/dist/components/Switch/SwitchControl.js +26 -11
  203. package/dist/components/Switch/SwitchControl.js.map +1 -1
  204. package/dist/components/Switch/SwitchControl.mjs +27 -12
  205. package/dist/components/Switch/SwitchControl.mjs.map +1 -1
  206. package/dist/components/Tabs/Tab/Tab.styles.d.ts +1 -1
  207. package/dist/components/Tabs/Tab/Tab.styles.js +1 -1
  208. package/dist/components/Tabs/Tab/Tab.styles.mjs +1 -1
  209. package/dist/components/Tag/Tag.d.ts.map +1 -1
  210. package/dist/components/Tag/Tag.js +14 -2
  211. package/dist/components/Tag/Tag.js.map +1 -1
  212. package/dist/components/Tag/Tag.mjs +15 -3
  213. package/dist/components/Tag/Tag.mjs.map +1 -1
  214. package/dist/components/Tag/Tag.styles.d.ts +20 -2
  215. package/dist/components/Tag/Tag.styles.d.ts.map +1 -1
  216. package/dist/components/Tag/Tag.styles.js +81 -0
  217. package/dist/components/Tag/Tag.styles.js.map +1 -1
  218. package/dist/components/Tag/Tag.styles.mjs +81 -1
  219. package/dist/components/Tag/Tag.styles.mjs.map +1 -1
  220. package/dist/components/Tag/Tag.types.d.ts +15 -2
  221. package/dist/components/Tag/Tag.types.d.ts.map +1 -1
  222. package/dist/components/Tag/index.d.ts +2 -2
  223. package/dist/components/Tag/index.d.ts.map +1 -1
  224. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  225. package/dist/components/Textarea/Textarea.js +4 -0
  226. package/dist/components/Textarea/Textarea.js.map +1 -1
  227. package/dist/components/Textarea/Textarea.mjs +4 -0
  228. package/dist/components/Textarea/Textarea.mjs.map +1 -1
  229. package/dist/components/Toast/Toast.d.ts.map +1 -1
  230. package/dist/components/Toast/Toast.js +5 -1
  231. package/dist/components/Toast/Toast.js.map +1 -1
  232. package/dist/components/Toast/Toast.mjs +5 -1
  233. package/dist/components/Toast/Toast.mjs.map +1 -1
  234. package/dist/components/Toast/Toast.styles.d.ts +13 -2
  235. package/dist/components/Toast/Toast.styles.d.ts.map +1 -1
  236. package/dist/components/Toast/Toast.styles.js +19 -7
  237. package/dist/components/Toast/Toast.styles.js.map +1 -1
  238. package/dist/components/Toast/Toast.styles.mjs +19 -7
  239. package/dist/components/Toast/Toast.styles.mjs.map +1 -1
  240. package/dist/components/Typography/Caption.d.ts.map +1 -1
  241. package/dist/components/Typography/Caption.js +1 -1
  242. package/dist/components/Typography/Caption.js.map +1 -1
  243. package/dist/components/Typography/Caption.mjs +1 -1
  244. package/dist/components/Typography/Caption.mjs.map +1 -1
  245. package/dist/components/Typography/H1.d.ts.map +1 -1
  246. package/dist/components/Typography/H1.js +1 -1
  247. package/dist/components/Typography/H1.js.map +1 -1
  248. package/dist/components/Typography/H1.mjs +1 -1
  249. package/dist/components/Typography/H1.mjs.map +1 -1
  250. package/dist/components/Typography/H2.d.ts.map +1 -1
  251. package/dist/components/Typography/H2.js +1 -1
  252. package/dist/components/Typography/H2.js.map +1 -1
  253. package/dist/components/Typography/H2.mjs +1 -1
  254. package/dist/components/Typography/H2.mjs.map +1 -1
  255. package/dist/components/Typography/H3.d.ts.map +1 -1
  256. package/dist/components/Typography/H3.js +1 -1
  257. package/dist/components/Typography/H3.js.map +1 -1
  258. package/dist/components/Typography/H3.mjs +1 -1
  259. package/dist/components/Typography/H3.mjs.map +1 -1
  260. package/dist/components/Typography/H4.d.ts.map +1 -1
  261. package/dist/components/Typography/H4.js +1 -1
  262. package/dist/components/Typography/H4.js.map +1 -1
  263. package/dist/components/Typography/H4.mjs +1 -1
  264. package/dist/components/Typography/H4.mjs.map +1 -1
  265. package/dist/components/Typography/H5.d.ts.map +1 -1
  266. package/dist/components/Typography/H5.js +1 -1
  267. package/dist/components/Typography/H5.js.map +1 -1
  268. package/dist/components/Typography/H5.mjs +1 -1
  269. package/dist/components/Typography/H5.mjs.map +1 -1
  270. package/dist/components/Typography/Link.d.ts.map +1 -1
  271. package/dist/components/Typography/Link.js +1 -1
  272. package/dist/components/Typography/Link.js.map +1 -1
  273. package/dist/components/Typography/Link.mjs +1 -1
  274. package/dist/components/Typography/Link.mjs.map +1 -1
  275. package/dist/components/Typography/Overline.d.ts.map +1 -1
  276. package/dist/components/Typography/Overline.js +1 -1
  277. package/dist/components/Typography/Overline.js.map +1 -1
  278. package/dist/components/Typography/Overline.mjs +1 -1
  279. package/dist/components/Typography/Overline.mjs.map +1 -1
  280. package/dist/components/Typography/Subtext.d.ts.map +1 -1
  281. package/dist/components/Typography/Subtext.js +1 -1
  282. package/dist/components/Typography/Subtext.js.map +1 -1
  283. package/dist/components/Typography/Subtext.mjs +1 -1
  284. package/dist/components/Typography/Subtext.mjs.map +1 -1
  285. package/dist/components/Typography/Subtitle.d.ts.map +1 -1
  286. package/dist/components/Typography/Subtitle.js +1 -1
  287. package/dist/components/Typography/Subtitle.js.map +1 -1
  288. package/dist/components/Typography/Subtitle.mjs +1 -1
  289. package/dist/components/Typography/Subtitle.mjs.map +1 -1
  290. package/dist/components/Typography/Text.d.ts.map +1 -1
  291. package/dist/components/Typography/Text.js +1 -1
  292. package/dist/components/Typography/Text.js.map +1 -1
  293. package/dist/components/Typography/Text.mjs +1 -1
  294. package/dist/components/Typography/Text.mjs.map +1 -1
  295. package/dist/hooks/useLanguage.d.ts +5 -0
  296. package/dist/hooks/useLanguage.d.ts.map +1 -1
  297. package/dist/hooks/useLanguage.js +7 -3
  298. package/dist/hooks/useLanguage.js.map +1 -1
  299. package/dist/hooks/useLanguage.mjs +7 -4
  300. package/dist/hooks/useLanguage.mjs.map +1 -1
  301. package/dist/hooks/useTranslate.d.ts.map +1 -1
  302. package/dist/hooks/useTranslate.js +8 -5
  303. package/dist/hooks/useTranslate.js.map +1 -1
  304. package/dist/hooks/useTranslate.mjs +8 -5
  305. package/dist/hooks/useTranslate.mjs.map +1 -1
  306. package/dist/index.d.ts +3 -1
  307. package/dist/index.d.ts.map +1 -1
  308. package/dist/index.js +22 -0
  309. package/dist/index.js.map +1 -1
  310. package/dist/index.mjs +9 -3
  311. package/dist/index.mjs.map +1 -1
  312. package/dist/theme/colors.d.ts +2 -2
  313. package/dist/theme/colors.d.ts.map +1 -1
  314. package/dist/theme/colors.js +63 -19
  315. package/dist/theme/colors.js.map +1 -1
  316. package/dist/theme/colors.mjs +64 -20
  317. package/dist/theme/colors.mjs.map +1 -1
  318. package/dist/theme/controlSizes.d.ts +91 -0
  319. package/dist/theme/controlSizes.d.ts.map +1 -0
  320. package/dist/theme/controlSizes.js +143 -0
  321. package/dist/theme/controlSizes.js.map +1 -0
  322. package/dist/theme/controlSizes.mjs +135 -0
  323. package/dist/theme/controlSizes.mjs.map +1 -0
  324. package/dist/theme/global.d.ts.map +1 -1
  325. package/dist/theme/global.js +19 -1
  326. package/dist/theme/global.js.map +1 -1
  327. package/dist/theme/global.mjs +19 -1
  328. package/dist/theme/global.mjs.map +1 -1
  329. package/dist/theme/index.d.ts.map +1 -1
  330. package/dist/theme/index.js +14 -43
  331. package/dist/theme/index.js.map +1 -1
  332. package/dist/theme/index.mjs +14 -43
  333. package/dist/theme/index.mjs.map +1 -1
  334. package/dist/theme/palette.generated.d.ts +295 -162
  335. package/dist/theme/palette.generated.d.ts.map +1 -1
  336. package/dist/theme/palette.generated.js +296 -162
  337. package/dist/theme/palette.generated.js.map +1 -1
  338. package/dist/theme/palette.generated.mjs +296 -163
  339. package/dist/theme/palette.generated.mjs.map +1 -1
  340. package/dist/theme/paletteSwatches.d.ts +20 -0
  341. package/dist/theme/paletteSwatches.d.ts.map +1 -1
  342. package/dist/theme/recipes/avatar.d.ts +30 -0
  343. package/dist/theme/recipes/avatar.d.ts.map +1 -0
  344. package/dist/theme/recipes/avatar.js +96 -0
  345. package/dist/theme/recipes/avatar.js.map +1 -0
  346. package/dist/theme/recipes/avatar.mjs +94 -0
  347. package/dist/theme/recipes/avatar.mjs.map +1 -0
  348. package/dist/theme/recipes/controls.d.ts +94 -0
  349. package/dist/theme/recipes/controls.d.ts.map +1 -0
  350. package/dist/theme/recipes/controls.js +154 -0
  351. package/dist/theme/recipes/controls.js.map +1 -0
  352. package/dist/theme/recipes/controls.mjs +144 -0
  353. package/dist/theme/recipes/controls.mjs.map +1 -0
  354. package/dist/translations/Defaults.translations.json.js +19 -1
  355. package/dist/translations/Defaults.translations.json.js.map +1 -1
  356. package/dist/translations/Defaults.translations.json.mjs +18 -2
  357. package/dist/translations/Defaults.translations.json.mjs.map +1 -1
  358. package/dist/utils/disabledControl.d.ts +8 -1
  359. package/dist/utils/disabledControl.d.ts.map +1 -1
  360. package/dist/utils/disabledControl.js +8 -1
  361. package/dist/utils/disabledControl.js.map +1 -1
  362. package/dist/utils/disabledControl.mjs +8 -1
  363. package/dist/utils/disabledControl.mjs.map +1 -1
  364. package/dist/utils/focusRing.d.ts +22 -0
  365. package/dist/utils/focusRing.d.ts.map +1 -1
  366. package/dist/utils/focusRing.js +22 -0
  367. package/dist/utils/focusRing.js.map +1 -1
  368. package/dist/utils/focusRing.mjs +21 -1
  369. package/dist/utils/focusRing.mjs.map +1 -1
  370. package/package.json +2 -1
  371. package/src/components/Accordion/Accordion.stories.tsx +85 -0
  372. package/src/components/Accordion/Accordion.usage.mdx +200 -0
  373. package/src/components/Appear/Appear.usage.mdx +107 -0
  374. package/src/components/Avatar/Avatar.recipe.test.tsx +176 -0
  375. package/src/components/Avatar/Avatar.stories.tsx +199 -24
  376. package/src/components/Avatar/Avatar.tsx +118 -21
  377. package/src/components/Avatar/Avatar.usage.mdx +185 -0
  378. package/src/components/Avatar/index.tsx +8 -1
  379. package/src/components/Banner/Banner.stories.tsx +152 -2
  380. package/src/components/Banner/Banner.types.ts +30 -1
  381. package/src/components/Banner/Banner.usage.mdx +233 -0
  382. package/src/components/BottomSheet/BottomSheet.stories.tsx +168 -1
  383. package/src/components/BottomSheet/BottomSheet.test.tsx +2 -1
  384. package/src/components/BottomSheet/BottomSheet.usage.mdx +216 -0
  385. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +59 -0
  386. package/src/components/Breadcrumb/Breadcrumb.usage.mdx +181 -0
  387. package/src/components/Button/Button.focusableWhenDisabled.test.tsx +218 -0
  388. package/src/components/Button/Button.stories.tsx +332 -3
  389. package/src/components/Button/Button.tsx +46 -3
  390. package/src/components/Button/Button.types.ts +38 -1
  391. package/src/components/Button/Button.usage.mdx +358 -0
  392. package/src/components/Button/Button.variants.test.tsx +13 -1
  393. package/src/components/Card/Card.stories.tsx +106 -0
  394. package/src/components/Card/Card.types.ts +12 -0
  395. package/src/components/Card/Card.usage.mdx +216 -0
  396. package/src/components/Checkbox/Checkbox.stories.tsx +140 -13
  397. package/src/components/Checkbox/Checkbox.usage.mdx +214 -0
  398. package/src/components/Chip/Chip.usage.mdx +78 -0
  399. package/src/components/Code/Code.stories.tsx +60 -0
  400. package/src/components/Code/Code.test.tsx +116 -0
  401. package/src/components/Code/Code.usage.mdx +187 -0
  402. package/src/components/Code/shikiAdapter.ts +38 -9
  403. package/src/components/CodeTabs/CodeTabs.stories.tsx +53 -0
  404. package/src/components/CodeTabs/CodeTabs.styles.ts +6 -5
  405. package/src/components/CodeTabs/CodeTabs.usage.mdx +176 -0
  406. package/src/components/Collapsible/Collapsible.stories.tsx +58 -0
  407. package/src/components/Collapsible/Collapsible.usage.mdx +173 -0
  408. package/src/components/ColorMode/ColorMode.stories.tsx +50 -0
  409. package/src/components/ColorMode/ColorMode.usage.mdx +135 -0
  410. package/src/components/ColorMode/ColorModeToggle.tsx +10 -3
  411. package/src/components/Confetti/Confetti.types.ts +5 -1
  412. package/src/components/Confetti/Confetti.usage.mdx +111 -0
  413. package/src/components/Confetti/confettiColors.ts +5 -5
  414. package/src/components/Container/Container.stories.tsx +32 -0
  415. package/src/components/Container/Container.usage.mdx +130 -0
  416. package/src/components/CopyableCode/CopyableCode.stories.tsx +62 -0
  417. package/src/components/CopyableCode/CopyableCode.usage.mdx +168 -0
  418. package/src/components/CountBadge/CountBadge.stories.tsx +69 -0
  419. package/src/components/CountBadge/CountBadge.usage.mdx +215 -0
  420. package/src/components/CountUp/CountUp.usage.mdx +107 -0
  421. package/src/components/DatePicker/DatePicker.types.ts +12 -0
  422. package/src/components/DatePicker/DatePicker.usage.mdx +177 -0
  423. package/src/components/DatePicker/RangeDatePicker.stories.tsx +87 -3
  424. package/src/components/DatePicker/RangeDatePicker.tsx +7 -1
  425. package/src/components/DatePicker/SingleDatePicker.tsx +7 -1
  426. package/src/components/DatePicker/index.ts +1 -0
  427. package/src/components/ErrorFallback/ErrorFallback.types.ts +6 -0
  428. package/src/components/ErrorFallback/ErrorFallback.usage.mdx +127 -0
  429. package/src/components/ExpandableText/ExpandableText.stories.tsx +55 -0
  430. package/src/components/ExpandableText/ExpandableText.tsx +0 -1
  431. package/src/components/ExpandableText/ExpandableText.usage.mdx +178 -0
  432. package/src/components/FileInput/FileInput.stories.tsx +38 -1
  433. package/src/components/FileInput/FileInput.usage.mdx +178 -0
  434. package/src/components/FileItem/FileItem.stories.tsx +71 -0
  435. package/src/components/FileItem/FileItem.usage.mdx +180 -0
  436. package/src/components/FileList/FileList.stories.tsx +25 -0
  437. package/src/components/FileList/FileList.usage.mdx +165 -0
  438. package/src/components/FlyTo/FlyTo.usage.mdx +99 -0
  439. package/src/components/Form/Form.stories.tsx +149 -0
  440. package/src/components/Form/Form.usage.mdx +203 -0
  441. package/src/components/Form/FormModalFooter/FormModalFooter.stories.tsx +1 -1
  442. package/src/components/Form/FormModalFooter/FormModalFooter.test.tsx +19 -1
  443. package/src/components/Form/FormModalFooter/FormModalFooter.tsx +2 -0
  444. package/src/components/Form/FormModalFooter/FormModalFooter.types.ts +11 -1
  445. package/src/components/FormControl/FormControl.stories.tsx +35 -0
  446. package/src/components/FormControl/FormControl.usage.mdx +128 -0
  447. package/src/components/FormIntegration/FormIntegration.usage.mdx +158 -0
  448. package/src/components/FormLabel/FormLabel.stories.tsx +71 -0
  449. package/src/components/FormLabel/FormLabel.usage.mdx +125 -0
  450. package/src/components/Icon/Icon.stories.tsx +61 -1
  451. package/src/components/Icon/Icon.usage.mdx +158 -0
  452. package/src/components/IconButton/IconButton.stories.tsx +213 -5
  453. package/src/components/IconButton/IconButton.usage.mdx +275 -0
  454. package/src/components/InfoSprinkle/InfoSprinkle.stories.tsx +77 -1
  455. package/src/components/InfoSprinkle/InfoSprinkle.usage.mdx +189 -0
  456. package/src/components/InlineCode/InlineCode.stories.tsx +75 -0
  457. package/src/components/InlineCode/InlineCode.usage.mdx +142 -0
  458. package/src/components/Input/Input.stories.tsx +180 -0
  459. package/src/components/Input/Input.tsx +4 -0
  460. package/src/components/Input/Input.usage.mdx +278 -0
  461. package/src/components/LineGraph/LineGraph.stories.tsx +112 -0
  462. package/src/components/LineGraph/LineGraph.tsx +4 -5
  463. package/src/components/LineGraph/LineGraph.types.ts +12 -2
  464. package/src/components/LineGraph/LineGraph.usage.mdx +186 -0
  465. package/src/components/LineGraph/seriesColors.test.ts +10 -9
  466. package/src/components/LineGraph/seriesColors.ts +18 -16
  467. package/src/components/Loaders/Loaders.stories.tsx +93 -0
  468. package/src/components/Loaders/Loaders.usage.mdx +180 -0
  469. package/src/components/LogicianProvider/LogicianProvider.usage.mdx +98 -0
  470. package/src/components/Markdown/Markdown.stories.tsx +53 -0
  471. package/src/components/Markdown/Markdown.usage.mdx +182 -0
  472. package/src/components/Masonry/Masonry.stories.tsx +63 -1
  473. package/src/components/Masonry/Masonry.types.ts +8 -3
  474. package/src/components/Masonry/Masonry.usage.mdx +142 -0
  475. package/src/components/MaxLengthIndicator/MaxLengthIndicator.stories.tsx +57 -0
  476. package/src/components/MaxLengthIndicator/MaxLengthIndicator.usage.mdx +125 -0
  477. package/src/components/Menu/Menu.stories.tsx +146 -2
  478. package/src/components/Menu/Menu.usage.mdx +238 -0
  479. package/src/components/Menu/MenuItem.types.ts +8 -0
  480. package/src/components/Modal/Modal.stories.tsx +177 -1
  481. package/src/components/Modal/Modal.usage.mdx +262 -0
  482. package/src/components/Modal/ModalCloseButton.tsx +1 -1
  483. package/src/components/MonthPicker/MonthPicker.stories.tsx +30 -0
  484. package/src/components/MonthPicker/MonthPicker.tsx +7 -1
  485. package/src/components/MonthPicker/MonthPicker.types.ts +8 -1
  486. package/src/components/MonthPicker/MonthPicker.usage.mdx +191 -0
  487. package/src/components/NavList/NavList.stories.tsx +927 -0
  488. package/src/components/NavList/NavList.styles.ts +114 -0
  489. package/src/components/NavList/NavList.test.tsx +1306 -0
  490. package/src/components/NavList/NavList.translations.json +9 -0
  491. package/src/components/NavList/NavList.tsx +160 -0
  492. package/src/components/NavList/NavList.types.ts +155 -0
  493. package/src/components/NavList/NavList.usage.mdx +545 -0
  494. package/src/components/NavList/NavListContext.ts +25 -0
  495. package/src/components/NavList/NavListGroup.tsx +243 -0
  496. package/src/components/NavList/NavListItem.tsx +543 -0
  497. package/src/components/NavList/NavListSkeleton.tsx +57 -0
  498. package/src/components/NavList/index.ts +15 -0
  499. package/src/components/Pagination/Pagination.stories.tsx +90 -1
  500. package/src/components/Pagination/Pagination.tsx +11 -10
  501. package/src/components/Pagination/Pagination.usage.mdx +186 -0
  502. package/src/components/PasswordInput/PasswordInput.stories.tsx +51 -0
  503. package/src/components/PasswordInput/PasswordInput.usage.mdx +193 -0
  504. package/src/components/PinInput/PinInput.stories.tsx +91 -0
  505. package/src/components/PinInput/PinInput.usage.mdx +194 -0
  506. package/src/components/Popover/Popover.stories.tsx +104 -1
  507. package/src/components/Popover/Popover.usage.mdx +197 -0
  508. package/src/components/ProgressBar/ProgressBar.stories.tsx +92 -1
  509. package/src/components/ProgressBar/ProgressBar.types.ts +9 -0
  510. package/src/components/ProgressBar/ProgressBar.usage.mdx +210 -0
  511. package/src/components/Pulse/Pulse.usage.mdx +102 -0
  512. package/src/components/RadialProgress/RadialProgress.stories.tsx +74 -1
  513. package/src/components/RadialProgress/RadialProgress.types.ts +21 -1
  514. package/src/components/RadialProgress/RadialProgress.usage.mdx +153 -0
  515. package/src/components/Radio/Radio.stories.tsx +119 -0
  516. package/src/components/Radio/Radio.usage.mdx +187 -0
  517. package/src/components/Reveal/Reveal.usage.mdx +105 -0
  518. package/src/components/ScaledContext/ScaledContext.usage.mdx +111 -0
  519. package/src/components/SeeMoreButton/SeeMoreButton.stories.tsx +146 -2
  520. package/src/components/SeeMoreButton/SeeMoreButton.types.ts +8 -0
  521. package/src/components/SeeMoreButton/SeeMoreButton.usage.mdx +213 -0
  522. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +69 -0
  523. package/src/components/SegmentedControl/SegmentedControl.styles.ts +38 -0
  524. package/src/components/SegmentedControl/SegmentedControl.tsx +43 -37
  525. package/src/components/SegmentedControl/SegmentedControl.usage.mdx +216 -0
  526. package/src/components/SegmentedProgressBar/SegmentedProgressBar.stories.tsx +54 -0
  527. package/src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts +2 -0
  528. package/src/components/SegmentedProgressBar/SegmentedProgressBar.usage.mdx +145 -0
  529. package/src/components/Select/Combobox.tsx +28 -3
  530. package/src/components/Select/Select.clearTrigger.test.tsx +76 -0
  531. package/src/components/Select/Select.stories.tsx +290 -1
  532. package/src/components/Select/Select.styles.ts +89 -0
  533. package/src/components/Select/Select.tsx +28 -2
  534. package/src/components/Select/Select.usage.mdx +341 -0
  535. package/src/components/Shake/Shake.usage.mdx +107 -0
  536. package/src/components/Slider/Slider.stories.tsx +116 -0
  537. package/src/components/Slider/Slider.usage.mdx +179 -0
  538. package/src/components/Spinner/Spinner.stories.tsx +64 -0
  539. package/src/components/Spinner/Spinner.usage.mdx +136 -0
  540. package/src/components/SwapTransition/SwapTransition.usage.mdx +102 -0
  541. package/src/components/Switch/Switch.stories.tsx +139 -6
  542. package/src/components/Switch/Switch.usage.mdx +200 -0
  543. package/src/components/Switch/SwitchControl.tsx +32 -15
  544. package/src/components/Table/Table.stories.tsx +159 -1
  545. package/src/components/Table/Table.usage.mdx +235 -0
  546. package/src/components/Tabs/Tab/Tab.styles.ts +1 -1
  547. package/src/components/Tabs/Tabs.stories.tsx +86 -0
  548. package/src/components/Tabs/Tabs.usage.mdx +263 -0
  549. package/src/components/Tag/Tag.stories.tsx +181 -4
  550. package/src/components/Tag/Tag.styles.ts +117 -2
  551. package/src/components/Tag/Tag.test.tsx +87 -1
  552. package/src/components/Tag/Tag.tsx +22 -1
  553. package/src/components/Tag/Tag.types.ts +16 -2
  554. package/src/components/Tag/Tag.usage.mdx +257 -0
  555. package/src/components/Tag/index.ts +2 -0
  556. package/src/components/Textarea/Textarea.stories.tsx +113 -0
  557. package/src/components/Textarea/Textarea.tsx +4 -0
  558. package/src/components/Textarea/Textarea.usage.mdx +186 -0
  559. package/src/components/Toast/Toast.stories.tsx +185 -3
  560. package/src/components/Toast/Toast.styles.ts +19 -7
  561. package/src/components/Toast/Toast.tsx +8 -1
  562. package/src/components/Toast/Toast.usage.mdx +265 -0
  563. package/src/components/Tooltip/Tooltip.stories.tsx +86 -1
  564. package/src/components/Tooltip/Tooltip.usage.mdx +219 -0
  565. package/src/components/Tree/Tree.stories.tsx +89 -0
  566. package/src/components/Tree/Tree.usage.mdx +207 -0
  567. package/src/components/Typography/Caption.tsx +0 -1
  568. package/src/components/Typography/H1.tsx +0 -1
  569. package/src/components/Typography/H2.tsx +0 -1
  570. package/src/components/Typography/H3.tsx +0 -1
  571. package/src/components/Typography/H4.tsx +0 -1
  572. package/src/components/Typography/H5.tsx +0 -1
  573. package/src/components/Typography/Link.tsx +0 -1
  574. package/src/components/Typography/Overline.tsx +0 -1
  575. package/src/components/Typography/Subtext.tsx +0 -1
  576. package/src/components/Typography/Subtitle.tsx +0 -1
  577. package/src/components/Typography/Text.tsx +0 -1
  578. package/src/components/Typography/Typography.stories.tsx +117 -0
  579. package/src/components/Typography/Typography.usage.mdx +257 -0
  580. package/src/components/Workflow/Workflow.usage.mdx +199 -0
  581. package/src/components/a11y.kwcag.test.tsx +78 -21
  582. package/src/components/claude.md +24 -1
  583. package/src/components/noRawScales.test.ts +5 -1
  584. package/src/foundations/BrandAssets.mdx +637 -0
  585. package/src/foundations/BrandAssets.stories.tsx +680 -0
  586. package/src/foundations/BrandColour.mdx +103 -4
  587. package/src/foundations/BrandColour.stories.tsx +135 -2
  588. package/src/hooks/useLanguage.ts +8 -3
  589. package/src/hooks/useTranslate.test.tsx +46 -0
  590. package/src/hooks/useTranslate.ts +7 -5
  591. package/src/index.ts +19 -1
  592. package/src/theme/BazePalette.stories.tsx +111 -1
  593. package/src/theme/ControlSizes.stories.tsx +586 -0
  594. package/src/theme/Palette.stories.tsx +2 -2
  595. package/src/theme/SemanticTokens.mdx +118 -19
  596. package/src/theme/claude.md +34 -9
  597. package/src/theme/colors.ts +82 -19
  598. package/src/theme/contrast.test.ts +67 -0
  599. package/src/theme/controlSizes.test.ts +153 -0
  600. package/src/theme/controlSizes.ts +162 -0
  601. package/src/theme/global.ts +20 -1
  602. package/src/theme/index.ts +23 -46
  603. package/src/theme/palette.generated.ts +296 -162
  604. package/src/theme/paletteSwatches.test.ts +1 -1
  605. package/src/theme/paletteSwatches.ts +35 -0
  606. package/src/theme/recipes/avatar.ts +92 -0
  607. package/src/theme/recipes/controls.ts +171 -0
  608. package/src/translations/Defaults.translations.json +14 -0
  609. package/src/utils/disabledControl.ts +8 -1
  610. package/src/utils/focusRing.ts +23 -0
@@ -1,6 +1,10 @@
1
+ import { Fragment } from 'react';
2
+ import { Box, Grid } from '@chakra-ui/react';
1
3
  import type { Meta, StoryObj } from '@storybook/react';
2
4
 
5
+ import { TokenTable } from '../../guidelines/_components/TokenTable';
3
6
  import { LineGraph } from '.';
7
+ import { CHART_SERIES_HUES, seriesColor } from './seriesColors';
4
8
  import type { DatumBase } from './LineGraph.types';
5
9
 
6
10
  type TestDataType = {
@@ -105,3 +109,111 @@ export const CustomColors: Story = {
105
109
  ],
106
110
  },
107
111
  };
112
+
113
+ // ───────────────────────── Usage-page specimens ─────────────────────────
114
+ // Pulled into `LineGraph.usage.mdx` with <Canvas of={…} />. Hidden from the
115
+ // sidebar (`!dev`); `tags` is written out on each story because the indexer
116
+ // reads CSF statically.
117
+
118
+ type DailyType = { 질문?: number; 답변실패?: number };
119
+
120
+ const DAILY: Array<{ name: string } & DailyType> = [
121
+ { name: '10/16', 질문: 120, 답변실패: 9 },
122
+ { name: '10/17', 질문: 148, 답변실패: 12 },
123
+ { name: '10/18', 질문: 96, 답변실패: 4 },
124
+ { name: '10/19', 질문: 60, 답변실패: 3 },
125
+ { name: '10/20', 질문: 171, 답변실패: 15 },
126
+ { name: '10/21', 질문: 188, 답변실패: 11 },
127
+ { name: '10/22', 질문: 164, 답변실패: 8 },
128
+ ];
129
+
130
+ export const DoDefaultSeriesColours: Story = {
131
+ tags: ['!dev'],
132
+ parameters: { layout: 'padded' },
133
+ name: 'Usage / Do: default series colours, a trend over time',
134
+ render: () => (
135
+ <LineGraph<DailyType>
136
+ h="280px"
137
+ data={DAILY}
138
+ dataKeys={[
139
+ { key: '질문', label: '질문 수' },
140
+ { key: '답변실패', label: '답변하지 못한 질문' },
141
+ ]}
142
+ />
143
+ ),
144
+ };
145
+
146
+ export const DontStatusColours: Story = {
147
+ tags: ['!dev'],
148
+ parameters: { layout: 'padded' },
149
+ name: "Usage / Don't: status colours for ordinary series",
150
+ render: () => (
151
+ <LineGraph<DailyType>
152
+ h="280px"
153
+ data={DAILY}
154
+ dataKeys={[
155
+ {
156
+ key: '질문',
157
+ label: '질문 수',
158
+ color: 'var(--chakra-colors-success-fg)',
159
+ },
160
+ {
161
+ key: '답변실패',
162
+ label: '답변하지 못한 질문',
163
+ color: 'var(--chakra-colors-danger-fg)',
164
+ },
165
+ ]}
166
+ />
167
+ ),
168
+ };
169
+
170
+ export const UsageTokens: Story = {
171
+ tags: ['!dev'],
172
+ parameters: { layout: 'padded' },
173
+ name: 'Usage / Tokens',
174
+ render: () => (
175
+ <TokenTable
176
+ rows={[
177
+ { token: 'primary.main', use: 'series 1' },
178
+ { token: 'border.default', use: 'grid lines, tooltip border' },
179
+ { token: 'fg.muted', use: 'axis labels' },
180
+ { token: 'bg.surface', use: 'tooltip background' },
181
+ { token: 'fg.default', use: 'tooltip text' },
182
+ ]}
183
+ />
184
+ ),
185
+ };
186
+
187
+ /**
188
+ * Default stroke for series 2 onwards, light and dark, computed with the same
189
+ * `seriesColor` the chart calls.
190
+ */
191
+ export const UsageSeriesOrder: Story = {
192
+ tags: ['!dev'],
193
+ parameters: { layout: 'padded' },
194
+ name: 'Usage / Series order',
195
+ render: () => (
196
+ <Grid templateColumns="auto auto auto" gap={2} fontSize="13px">
197
+ {CHART_SERIES_HUES.map(({ hue }, i) => (
198
+ <Fragment key={hue}>
199
+ <Box fontFamily="mono">
200
+ {i + 2}. {hue}
201
+ </Box>
202
+ {[false, true].map((dark) => {
203
+ const stroke = seriesColor(i + 1, dark);
204
+ return (
205
+ <Box
206
+ key={String(dark)}
207
+ style={{ background: stroke }}
208
+ w="88px"
209
+ h="20px"
210
+ borderRadius="sm"
211
+ title={`${hue} ${dark ? 'dark' : 'light'} ${stroke}`}
212
+ />
213
+ );
214
+ })}
215
+ </Fragment>
216
+ ))}
217
+ </Grid>
218
+ ),
219
+ };
@@ -21,10 +21,9 @@ export const LineGraph = <T extends DatumBase>({
21
21
  displayLegend = true,
22
22
  ...rest
23
23
  }: LineGraphProps<T>) => {
24
- const primaryColor = useToken('colors', 'primary.main')[0];
25
- // Series 1 is the neutral brand line; further series cycle hues with no
26
- // status meaning (see seriesColors.ts). Strokes read the generated palette
27
- // directly because no semantic role fits a chart line.
24
+ // Series 1 is the data blue; further series cycle hues with no status
25
+ // meaning (see seriesColors.ts). Strokes read the generated palette directly
26
+ // because no semantic role fits a chart line.
28
27
  const { colorMode } = useColorMode();
29
28
  const isDark = colorMode === 'dark';
30
29
  return (
@@ -100,7 +99,7 @@ export const LineGraph = <T extends DatumBase>({
100
99
  type="monotone"
101
100
  dataKey={key}
102
101
  name={label}
103
- stroke={color ?? seriesColor(index, primaryColor, isDark)}
102
+ stroke={color ?? seriesColor(index, isDark)}
104
103
  dot={{ r: 0 }}
105
104
  />
106
105
  ))}
@@ -2,8 +2,14 @@ import { BoxProps } from '@chakra-ui/react';
2
2
  import { type DataKey as RechartsDataKey } from 'recharts/types/util/types.d';
3
3
 
4
4
  export interface LineGraphProps<T extends DatumBase> extends BoxProps {
5
+ /** One object per point on the X axis; `name` is the axis label. */
5
6
  data: Array<Datum<T>>;
7
+ /** The series to draw, in order. */
6
8
  dataKeys: Array<DataKey<T>>;
9
+ /**
10
+ * Show the legend under the chart.
11
+ * @default true
12
+ */
7
13
  displayLegend?: boolean;
8
14
  }
9
15
 
@@ -31,12 +37,16 @@ export type DataKey<T extends DatumBase> = {
31
37
  key: RechartsDataKey<keyof T>;
32
38
 
33
39
  /**
34
- * Label for the XAxis
40
+ * Series name, shown in the legend and the tooltip.
35
41
  */
36
42
  label: string;
37
43
 
38
44
  /**
39
- * Optional custom colors for the series
45
+ * Stroke colour for this series, passed straight to the SVG (recharts does
46
+ * not resolve Chakra tokens — use a CSS variable such as
47
+ * `var(--chakra-colors-category-teal-fg)`). Defaults: series 1 is
48
+ * `primary.main`, the rest cycle meaning-free category hues
49
+ * (`CHART_SERIES_HUES`).
40
50
  */
41
51
  color?: string;
42
52
  };
@@ -0,0 +1,186 @@
1
+ import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
2
+
3
+ import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
4
+ import * as LineGraphStories from './LineGraph.stories';
5
+
6
+ <Meta of={LineGraphStories} name="Usage" />
7
+
8
+ <LangToggle />
9
+
10
+ <En>
11
+
12
+ # LineGraph
13
+
14
+ A line chart (recharts) for one or more numeric series over an ordered X
15
+ axis, usually time: daily questions, usage by model, feedback over a month.
16
+ It ships the house grid, axes, tooltip and series colours, in both modes.
17
+
18
+ ## When to use
19
+
20
+ - A trend over time or another ordered axis, where the shape matters more
21
+ than any single value.
22
+
23
+ ## When not to use
24
+
25
+ - Comparing categories with no order (models, groups) → a bar chart or a
26
+ `Table`.
27
+ - One number → a stat with `Text`. A share of a whole → a `ProgressBar` or a
28
+ table of percentages.
29
+ - When the reader needs exact values → a `Table`, with the chart as a
30
+ summary if at all.
31
+
32
+ ## Props
33
+
34
+ </En>
35
+
36
+ <Ko>
37
+
38
+ # LineGraph
39
+
40
+ 순서가 있는 X축(대개 시간) 위에 숫자 계열 하나 이상을 그리는 꺾은선 그래프(recharts)
41
+ 입니다. 일별 질문 수, 모델별 사용량, 한 달 동안의 피드백에 씁니다. 격자, 축, 툴팁,
42
+ 계열 색이 두 모드 모두에 맞춰져 있습니다.
43
+
44
+ ## 언제 쓰나요
45
+
46
+ - 값 하나하나보다 흐름의 모양이 중요한, 시간이나 순서가 있는 축 위의 추세.
47
+
48
+ ## 언제 쓰지 않나요
49
+
50
+ - 순서가 없는 항목(모델, 그룹) 비교에는 막대 그래프나 `Table`을 씁니다.
51
+ - 숫자 하나는 `Text`로 보여 줍니다. 전체 중 비율은 `ProgressBar`나 비율 표를 씁니다.
52
+ - 정확한 값이 필요하다면 `Table`을 쓰고, 그래프는 요약으로만 씁니다.
53
+
54
+ ## 속성
55
+
56
+ </Ko>
57
+
58
+ <ArgTypes of={LineGraphStories} include={['data', 'dataKeys', 'displayLegend']} />
59
+
60
+ <En>
61
+
62
+ **Series colours.** Series 1 is the data blue (`blue.base`), the same blue a
63
+ single-measure chart uses. Series 2 onwards cycle eight category hues that
64
+ carry no meaning, alternating cool and warm (teal, pink, indigo, purple,
65
+ brown, …). Red, yellow and green are left out, because they mean danger,
66
+ warning and success. Every default stroke clears 3:1 against the page in both modes.
67
+
68
+ ## Do / Don't
69
+
70
+ </En>
71
+
72
+ <Ko>
73
+
74
+ **계열 색.** 첫 계열은 데이터 파랑(`blue.base`)으로, 측정값이 하나인 차트와 같은 색입니다.
75
+ 둘째 계열부터는 뜻이 없는 category 색 여덟 가지를 차가운 색과 따뜻한 색이 번갈아 오도록
76
+ 돌아가며 씁니다(청록, 분홍, 남색, 보라, 갈색 …). 빨강, 노랑, 초록은 위험, 경고, 성공을
77
+ 뜻하므로 빠져 있습니다. 기본 선 색은 두 모드 모두에서 바탕과 3:1 이상입니다.
78
+
79
+ ## 이렇게 하세요 / 이렇게 하지 마세요
80
+
81
+ </Ko>
82
+
83
+ <Canvas of={LineGraphStories.DoDefaultSeriesColours} />
84
+ <Verdict
85
+ kind="do"
86
+ en="Keep the default series colours and name each series in words; the legend and the tooltip show the label."
87
+ ko="기본 계열 색을 그대로 쓰고 계열마다 이름을 붙입니다. 범례와 툴팁에 그 이름이 나옵니다."
88
+ />
89
+
90
+ <Canvas of={LineGraphStories.DontStatusColours} />
91
+ <Verdict
92
+ kind="dont"
93
+ en="Colour ordinary series with success and danger. Readers take the red line as an error even when the numbers are fine."
94
+ ko="일반 계열에 success와 danger 색을 쓰지 마세요. 숫자에 문제가 없어도 읽는 사람은 빨간 선을 오류로 받아들입니다."
95
+ />
96
+
97
+ <En>
98
+
99
+ ## Content
100
+
101
+ - Name series in words the reader uses (질문 수), not field names (`uv`).
102
+ - X labels short: 10/22, not 2026-10-22 00:00.
103
+ - Two or three series at most; split into several charts beyond that.
104
+
105
+ ## Accessibility
106
+
107
+ What LineGraph does for you:
108
+
109
+ - Axis labels, grid and tooltip read CSS variables, so they follow light and
110
+ dark mode. Default strokes clear 3:1 (WCAG 1.4.11).
111
+ - Series names appear as text in the legend and tooltip.
112
+
113
+ What you still have to do:
114
+
115
+ - **Give the chart a text alternative** (WCAG 1.1.1). The SVG has no name.
116
+ Put a heading and a one-sentence summary next to it (질문 수는 지난주보다
117
+ 12% 늘었습니다), and offer the numbers as a table when they matter.
118
+ - **Lines differ only by colour** (no markers, no dash patterns), so with
119
+ three or more series the legend alone can be hard to match (WCAG 1.4.1).
120
+ Keep series few, or label them at the line end.
121
+ - The tooltip appears on pointer hover only; keyboard users cannot reach
122
+ values (WCAG 2.1.1). Another reason to offer the table.
123
+
124
+ ## Tokens
125
+
126
+ The chart reads these roles as CSS variables. The default series strokes
127
+ come from the palette, in the order below.
128
+
129
+ </En>
130
+
131
+ <Ko>
132
+
133
+ ## 문구
134
+
135
+ - 계열 이름은 필드 이름(`uv`)이 아니라 읽는 사람이 쓰는 말(질문 수)로 씁니다.
136
+ - X축 라벨은 짧게 씁니다. '2026-10-22 00:00'이 아니라 '10/22'로 씁니다.
137
+ - 계열은 많아야 두세 개로 두고, 더 많으면 그래프를 나눕니다.
138
+
139
+ ## 접근성
140
+
141
+ LineGraph가 알아서 하는 일
142
+
143
+ - 축 라벨, 격자, 툴팁이 CSS 변수를 읽으므로 라이트·다크 모드를 따릅니다. 기본 선
144
+ 색은 3:1 이상입니다(WCAG 1.4.11).
145
+ - 계열 이름이 범례와 툴팁에 글자로 나옵니다.
146
+
147
+ 직접 챙겨야 하는 일
148
+
149
+ - **그래프에 글로 된 대체 내용을 붙입니다**(WCAG 1.1.1). SVG에는 이름이 없습니다.
150
+ 옆에 제목과 한 문장 요약('질문 수는 지난주보다 12% 늘었습니다')을 두고, 숫자가
151
+ 중요하면 표로도 보여 줍니다.
152
+ - **선은 색으로만 구분됩니다**(점 표시나 점선 없음). 계열이 셋 이상이면 범례만으로는
153
+ 짝을 맞추기 어렵습니다(WCAG 1.4.1). 계열 수를 줄이거나 선 끝에 이름을 붙입니다.
154
+ - 툴팁은 마우스를 올려야만 나타나서 키보드 사용자는 값을 볼 수 없습니다(WCAG
155
+ 2.1.1). 이 점에서도 표를 함께 주는 편이 좋습니다.
156
+
157
+ ## 토큰
158
+
159
+ 그래프는 아래 역할을 CSS 변수로 읽습니다. 기본 계열 선 색은 팔레트에서 아래 순서대로
160
+ 가져옵니다.
161
+
162
+ </Ko>
163
+
164
+ <Canvas of={LineGraphStories.UsageTokens} sourceState="none" />
165
+
166
+ <Canvas of={LineGraphStories.UsageSeriesOrder} sourceState="none" />
167
+
168
+ <En>
169
+
170
+ ## Related
171
+
172
+ - **Table**: exact values, and the accessible alternative to a chart.
173
+ - **ProgressBar** / **RadialProgress**: a single share or progress.
174
+ - **Setup/Theme/Using Semantic Tokens**: "Blue means data and links".
175
+
176
+ </En>
177
+
178
+ <Ko>
179
+
180
+ ## 관련 컴포넌트
181
+
182
+ - **Table**: 정확한 값, 그리고 그래프의 접근 가능한 대안.
183
+ - **ProgressBar** / **RadialProgress**: 비율이나 진행률 하나.
184
+ - **Setup/Theme/Using Semantic Tokens**: "Blue means data and links".
185
+
186
+ </Ko>
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, it } from 'vitest';
2
2
 
3
- import { SYSTEM_HUES } from '@/theme/palette.generated';
3
+ import { RAMPS, SYSTEM_HUES } from '@/theme/palette.generated';
4
4
 
5
5
  import { CHART_SERIES_HUES, seriesColor } from './seriesColors';
6
6
 
@@ -22,18 +22,19 @@ describe('chart series colours', () => {
22
22
  expect(CHART_SERIES_HUES.filter(({ hue }) => banned.has(hue))).toEqual([]);
23
23
  });
24
24
 
25
- it('series 1 is the primary line, series 2 is brown', () => {
26
- expect(seriesColor(0, '#252525', false)).toBe('#252525');
27
- expect(seriesColor(1, '#252525', false)).toBe(SYSTEM_HUES.brown.base);
25
+ it('series 1 is the data blue, series 2 is teal', () => {
26
+ expect(seriesColor(0, false)).toBe(SYSTEM_HUES.blue.base);
27
+ expect(seriesColor(0, true)).toBe(SYSTEM_HUES.blue.baseDark);
28
+ expect(seriesColor(1, false)).toBe(SYSTEM_HUES.teal.base);
28
29
  });
29
30
 
30
31
  it('every default stroke clears 3:1 against the page in both modes', () => {
31
- CHART_SERIES_HUES.forEach((_, i) => {
32
+ [undefined, ...CHART_SERIES_HUES].forEach((_, i) => {
33
+ expect(contrast(seriesColor(i, false), '#FFFFFF')).toBeGreaterThanOrEqual(
34
+ 3
35
+ );
32
36
  expect(
33
- contrast(seriesColor(i + 1, '', false), '#FFFFFF')
34
- ).toBeGreaterThanOrEqual(3);
35
- expect(
36
- contrast(seriesColor(i + 1, '', true), '#1F1E1D')
37
+ contrast(seriesColor(i, true), RAMPS.ink.canvasDark)
37
38
  ).toBeGreaterThanOrEqual(3);
38
39
  });
39
40
  });
@@ -4,12 +4,16 @@ import { SYSTEM_HUES } from '@/theme/palette.generated';
4
4
  /**
5
5
  * Default stroke order for multi-series charts.
6
6
  *
7
- * Series 1 is the neutral brand line (`primary.main`); the rest cycle hues
8
- * that carry no meaning in the system. Red, yellow and green are the danger,
9
- * warning and success colours, and blue is info and links, so none of them
10
- * may colour a series by default — a red "UV" line reads as an error.
11
- * (Blue is reserved for data as a whole: a single-measure chart is a blue
12
- * monochrome ramp — SemanticTokens.mdx, "Blue means data and links".)
7
+ * Series 1 is the data blue (`blue.base`): blue means data (SemanticTokens.mdx,
8
+ * "Blue means data and links"), and a single-measure chart draws in the same
9
+ * blue, so adding a second series does not repaint the first. It used to be
10
+ * the ink `primary.main`, which read as body text rather than as data.
11
+ *
12
+ * The rest cycle hues that carry no meaning in the system, alternating cool
13
+ * and warm so neighbouring lines separate. Red, yellow and green are the
14
+ * danger, warning and success colours, so none of them may colour a series by
15
+ * default — a red "UV" line reads as an error. Brown comes late: next to the
16
+ * other dusty warm hues it reads as mud.
13
17
  *
14
18
  * Every stroke clears 3:1 against the page in both modes. Cyan, mint and
15
19
  * orange are too light at their base value in light mode (≈1.9:1), so they
@@ -21,23 +25,21 @@ type SeriesHue = {
21
25
  };
22
26
 
23
27
  export const CHART_SERIES_HUES: readonly SeriesHue[] = [
24
- { hue: 'brown', light: 'base' },
25
- { hue: 'indigo', light: 'base' },
26
- { hue: 'pink', light: 'base' },
27
28
  { hue: 'teal', light: 'base' },
29
+ { hue: 'pink', light: 'base' },
30
+ { hue: 'indigo', light: 'base' },
28
31
  { hue: 'purple', light: 'base' },
32
+ { hue: 'brown', light: 'base' },
29
33
  { hue: 'cyan', light: 'hc' },
30
34
  { hue: 'mint', light: 'hc' },
31
35
  { hue: 'orange', light: 'hc' },
32
36
  ];
33
37
 
34
- /** Stroke for series `index` (0-based); index 0 is the caller's primary line. */
35
- export const seriesColor = (
36
- index: number,
37
- primary: string,
38
- isDark: boolean
39
- ): string => {
40
- if (index === 0) return primary;
38
+ /** Stroke for series `index` (0-based); index 0 is the data blue. */
39
+ export const seriesColor = (index: number, isDark: boolean): string => {
40
+ if (index === 0) {
41
+ return isDark ? SYSTEM_HUES.blue.baseDark : SYSTEM_HUES.blue.base;
42
+ }
41
43
  const { hue, light } =
42
44
  CHART_SERIES_HUES[(index - 1) % CHART_SERIES_HUES.length];
43
45
  return isDark ? SYSTEM_HUES[hue].baseDark : SYSTEM_HUES[hue][light];
@@ -0,0 +1,93 @@
1
+ import type { ReactNode } from 'react';
2
+ import { Box } from '@chakra-ui/react';
3
+ import { Meta, StoryObj } from '@storybook/react';
4
+
5
+ import { T } from '../../guidelines/_components/Lang';
6
+ import { TokenTable } from '../../guidelines/_components/TokenTable';
7
+ import { Card } from '../Card';
8
+ import { Subtext, Text } from '../Typography';
9
+ import { SectionLoader } from './SectionLoader';
10
+
11
+ /**
12
+ * Specimens for `Loaders.usage.mdx`, which covers `PageLoader`,
13
+ * `SectionLoader` and `ThinkingDots` together. Every story here is hidden
14
+ * (`!dev`): the components' own stories stay under Components/PageLoader and
15
+ * Components/SectionLoader.
16
+ */
17
+ const meta = {
18
+ title: 'Components/Loaders',
19
+ component: SectionLoader,
20
+ args: { isLoading: true },
21
+ } satisfies Meta<typeof SectionLoader>;
22
+
23
+ export default meta;
24
+
25
+ type Story = StoryObj<typeof meta>;
26
+
27
+ /** A card whose body is loading; the card is the positioned parent. */
28
+ const LoadingCard = ({ children }: { children: ReactNode }) => (
29
+ <Card p={4} w="320px">
30
+ <Text fontWeight="bold" mb={2}>
31
+ 멤버
32
+ </Text>
33
+ <Box position="relative" h="120px" borderRadius="md" overflow="hidden">
34
+ <Subtext>홍길동, 김철수, 이영희</Subtext>
35
+ {children}
36
+ </Box>
37
+ </Card>
38
+ );
39
+
40
+ export const DoSectionLoaderInParent: Story = {
41
+ tags: ['!dev'],
42
+ parameters: { layout: 'padded' },
43
+ name: 'Usage / Do: SectionLoader inside a positioned parent',
44
+ render: () => (
45
+ <LoadingCard>
46
+ <SectionLoader isLoading label="멤버 목록을 불러오는 중" />
47
+ </LoadingCard>
48
+ ),
49
+ };
50
+
51
+ export const DoThinkingForAI: Story = {
52
+ tags: ['!dev'],
53
+ parameters: { layout: 'padded' },
54
+ name: 'Usage / Do: thinking dots while the AI works',
55
+ render: () => (
56
+ <LoadingCard>
57
+ <SectionLoader
58
+ isLoading
59
+ variant="thinking"
60
+ label="답변을 준비하는 중"
61
+ />
62
+ </LoadingCard>
63
+ ),
64
+ };
65
+
66
+ /** Tokens the loaders read. */
67
+ export const UsageTokens: Story = {
68
+ tags: ['!dev'],
69
+ parameters: { layout: 'padded' },
70
+ name: 'Usage / Tokens',
71
+ render: () => (
72
+ <TokenTable
73
+ rows={[
74
+ {
75
+ token: 'bg.canvas',
76
+ use: <T en="overlay (PageLoader at 50% opacity)" ko="덮개(PageLoader는 불투명도 50%)" />,
77
+ },
78
+ {
79
+ token: 'primary.main',
80
+ use: <T en="spinner (default variant)" ko="스피너(기본 변형)" />,
81
+ },
82
+ {
83
+ token: 'bg.track',
84
+ use: <T en="spinner track" ko="스피너 트랙" />,
85
+ },
86
+ {
87
+ token: 'action.mark',
88
+ use: <T en="thinking dots" ko="thinking 점" />,
89
+ },
90
+ ]}
91
+ />
92
+ ),
93
+ };