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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (533) hide show
  1. package/README.md +1 -0
  2. package/dist/components/Avatar/Avatar.d.ts +68 -11
  3. package/dist/components/Avatar/Avatar.d.ts.map +1 -1
  4. package/dist/components/Avatar/Avatar.js +41 -5
  5. package/dist/components/Avatar/Avatar.js.map +1 -1
  6. package/dist/components/Avatar/Avatar.mjs +40 -5
  7. package/dist/components/Avatar/Avatar.mjs.map +1 -1
  8. package/dist/components/Avatar/index.d.ts +2 -2
  9. package/dist/components/Avatar/index.d.ts.map +1 -1
  10. package/dist/components/Badge/Badge.d.ts.map +1 -1
  11. package/dist/components/Badge/Badge.js +5 -3
  12. package/dist/components/Badge/Badge.js.map +1 -1
  13. package/dist/components/Badge/Badge.mjs +5 -3
  14. package/dist/components/Badge/Badge.mjs.map +1 -1
  15. package/dist/components/Badge/Badge.types.d.ts +7 -5
  16. package/dist/components/Badge/Badge.types.d.ts.map +1 -1
  17. package/dist/components/Banner/Banner.types.d.ts +24 -1
  18. package/dist/components/Banner/Banner.types.d.ts.map +1 -1
  19. package/dist/components/BottomSheet/BottomSheet.styles.d.ts +2 -2
  20. package/dist/components/Button/Button.d.ts.map +1 -1
  21. package/dist/components/Button/Button.js +31 -3
  22. package/dist/components/Button/Button.js.map +1 -1
  23. package/dist/components/Button/Button.mjs +31 -3
  24. package/dist/components/Button/Button.mjs.map +1 -1
  25. package/dist/components/Button/Button.types.d.ts +38 -1
  26. package/dist/components/Button/Button.types.d.ts.map +1 -1
  27. package/dist/components/Card/Card.types.d.ts +12 -0
  28. package/dist/components/Card/Card.types.d.ts.map +1 -1
  29. package/dist/components/Code/shikiAdapter.d.ts +3 -1
  30. package/dist/components/Code/shikiAdapter.d.ts.map +1 -1
  31. package/dist/components/Code/shikiAdapter.js +29 -8
  32. package/dist/components/Code/shikiAdapter.js.map +1 -1
  33. package/dist/components/Code/shikiAdapter.mjs +29 -8
  34. package/dist/components/Code/shikiAdapter.mjs.map +1 -1
  35. package/dist/components/CodeTabs/CodeTabs.styles.d.ts +6 -5
  36. package/dist/components/CodeTabs/CodeTabs.styles.d.ts.map +1 -1
  37. package/dist/components/CodeTabs/CodeTabs.styles.js +6 -5
  38. package/dist/components/CodeTabs/CodeTabs.styles.js.map +1 -1
  39. package/dist/components/CodeTabs/CodeTabs.styles.mjs +6 -5
  40. package/dist/components/CodeTabs/CodeTabs.styles.mjs.map +1 -1
  41. package/dist/components/ColorMode/ColorModeToggle.d.ts +7 -2
  42. package/dist/components/ColorMode/ColorModeToggle.d.ts.map +1 -1
  43. package/dist/components/ColorMode/ColorModeToggle.js +8 -3
  44. package/dist/components/ColorMode/ColorModeToggle.js.map +1 -1
  45. package/dist/components/ColorMode/ColorModeToggle.mjs +8 -3
  46. package/dist/components/ColorMode/ColorModeToggle.mjs.map +1 -1
  47. package/dist/components/Confetti/Confetti.types.d.ts +5 -1
  48. package/dist/components/Confetti/Confetti.types.d.ts.map +1 -1
  49. package/dist/components/Confetti/confettiColors.d.ts +5 -5
  50. package/dist/components/Confetti/confettiColors.js +5 -5
  51. package/dist/components/Confetti/confettiColors.mjs +5 -5
  52. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts +6 -0
  53. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts.map +1 -1
  54. package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts +1 -1
  55. package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts.map +1 -1
  56. package/dist/components/Form/FormModalFooter/FormModalFooter.js +2 -2
  57. package/dist/components/Form/FormModalFooter/FormModalFooter.js.map +1 -1
  58. package/dist/components/Form/FormModalFooter/FormModalFooter.mjs +2 -2
  59. package/dist/components/Form/FormModalFooter/FormModalFooter.mjs.map +1 -1
  60. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts +11 -1
  61. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts.map +1 -1
  62. package/dist/components/Form/FormSection/CollapsibleFormSection.js +1 -0
  63. package/dist/components/Form/FormSection/CollapsibleFormSection.js.map +1 -1
  64. package/dist/components/Form/FormSection/CollapsibleFormSection.mjs +1 -0
  65. package/dist/components/Form/FormSection/CollapsibleFormSection.mjs.map +1 -1
  66. package/dist/components/Input/Input.d.ts.map +1 -1
  67. package/dist/components/Input/Input.js +4 -0
  68. package/dist/components/Input/Input.js.map +1 -1
  69. package/dist/components/Input/Input.mjs +4 -0
  70. package/dist/components/Input/Input.mjs.map +1 -1
  71. package/dist/components/LineGraph/LineGraph.d.ts.map +1 -1
  72. package/dist/components/LineGraph/LineGraph.js +4 -5
  73. package/dist/components/LineGraph/LineGraph.js.map +1 -1
  74. package/dist/components/LineGraph/LineGraph.mjs +5 -6
  75. package/dist/components/LineGraph/LineGraph.mjs.map +1 -1
  76. package/dist/components/LineGraph/LineGraph.types.d.ts +12 -2
  77. package/dist/components/LineGraph/LineGraph.types.d.ts.map +1 -1
  78. package/dist/components/LineGraph/seriesColors.d.ts +12 -8
  79. package/dist/components/LineGraph/seriesColors.d.ts.map +1 -1
  80. package/dist/components/LineGraph/seriesColors.js +8 -7
  81. package/dist/components/LineGraph/seriesColors.js.map +1 -1
  82. package/dist/components/LineGraph/seriesColors.mjs +8 -7
  83. package/dist/components/LineGraph/seriesColors.mjs.map +1 -1
  84. package/dist/components/Masonry/Masonry.types.d.ts +8 -3
  85. package/dist/components/Masonry/Masonry.types.d.ts.map +1 -1
  86. package/dist/components/Menu/MenuItem.types.d.ts +8 -0
  87. package/dist/components/Menu/MenuItem.types.d.ts.map +1 -1
  88. package/dist/components/Modal/ModalCloseButton.d.ts +1 -1
  89. package/dist/components/Modal/ModalCloseButton.js +1 -1
  90. package/dist/components/Modal/ModalCloseButton.mjs +1 -1
  91. package/dist/components/NavList/NavList.d.ts +35 -0
  92. package/dist/components/NavList/NavList.d.ts.map +1 -0
  93. package/dist/components/NavList/NavList.js +113 -0
  94. package/dist/components/NavList/NavList.js.map +1 -0
  95. package/dist/components/NavList/NavList.mjs +111 -0
  96. package/dist/components/NavList/NavList.mjs.map +1 -0
  97. package/dist/components/NavList/NavList.styles.d.ts +90 -0
  98. package/dist/components/NavList/NavList.styles.d.ts.map +1 -0
  99. package/dist/components/NavList/NavList.styles.js +104 -0
  100. package/dist/components/NavList/NavList.styles.js.map +1 -0
  101. package/dist/components/NavList/NavList.styles.mjs +97 -0
  102. package/dist/components/NavList/NavList.styles.mjs.map +1 -0
  103. package/dist/components/NavList/NavList.translations.json.js +19 -0
  104. package/dist/components/NavList/NavList.translations.json.js.map +1 -0
  105. package/dist/components/NavList/NavList.translations.json.mjs +14 -0
  106. package/dist/components/NavList/NavList.translations.json.mjs.map +1 -0
  107. package/dist/components/NavList/NavList.types.d.ts +140 -0
  108. package/dist/components/NavList/NavList.types.d.ts.map +1 -0
  109. package/dist/components/NavList/NavListContext.d.ts +30 -0
  110. package/dist/components/NavList/NavListContext.d.ts.map +1 -0
  111. package/dist/components/NavList/NavListContext.js +16 -0
  112. package/dist/components/NavList/NavListContext.js.map +1 -0
  113. package/dist/components/NavList/NavListContext.mjs +13 -0
  114. package/dist/components/NavList/NavListContext.mjs.map +1 -0
  115. package/dist/components/NavList/NavListGroup.d.ts +31 -0
  116. package/dist/components/NavList/NavListGroup.d.ts.map +1 -0
  117. package/dist/components/NavList/NavListGroup.js +115 -0
  118. package/dist/components/NavList/NavListGroup.js.map +1 -0
  119. package/dist/components/NavList/NavListGroup.mjs +113 -0
  120. package/dist/components/NavList/NavListGroup.mjs.map +1 -0
  121. package/dist/components/NavList/NavListItem.d.ts +16 -0
  122. package/dist/components/NavList/NavListItem.d.ts.map +1 -0
  123. package/dist/components/NavList/NavListItem.js +284 -0
  124. package/dist/components/NavList/NavListItem.js.map +1 -0
  125. package/dist/components/NavList/NavListItem.mjs +282 -0
  126. package/dist/components/NavList/NavListItem.mjs.map +1 -0
  127. package/dist/components/NavList/NavListSkeleton.d.ts +17 -0
  128. package/dist/components/NavList/NavListSkeleton.d.ts.map +1 -0
  129. package/dist/components/NavList/NavListSkeleton.js +33 -0
  130. package/dist/components/NavList/NavListSkeleton.js.map +1 -0
  131. package/dist/components/NavList/NavListSkeleton.mjs +31 -0
  132. package/dist/components/NavList/NavListSkeleton.mjs.map +1 -0
  133. package/dist/components/NavList/index.d.ts +7 -0
  134. package/dist/components/NavList/index.d.ts.map +1 -0
  135. package/dist/components/Pagination/Pagination.d.ts +11 -10
  136. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  137. package/dist/components/Pagination/Pagination.js +11 -10
  138. package/dist/components/Pagination/Pagination.js.map +1 -1
  139. package/dist/components/Pagination/Pagination.mjs +11 -10
  140. package/dist/components/Pagination/Pagination.mjs.map +1 -1
  141. package/dist/components/ProgressBar/ProgressBar.types.d.ts +9 -0
  142. package/dist/components/ProgressBar/ProgressBar.types.d.ts.map +1 -1
  143. package/dist/components/RadialProgress/RadialProgress.types.d.ts +21 -1
  144. package/dist/components/RadialProgress/RadialProgress.types.d.ts.map +1 -1
  145. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts +8 -0
  146. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts.map +1 -1
  147. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  148. package/dist/components/SegmentedControl/SegmentedControl.js +6 -7
  149. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
  150. package/dist/components/SegmentedControl/SegmentedControl.mjs +6 -7
  151. package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  152. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts +2 -0
  153. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts.map +1 -1
  154. package/dist/components/Select/Combobox.d.ts +1 -1
  155. package/dist/components/Select/Combobox.d.ts.map +1 -1
  156. package/dist/components/Select/Combobox.js +9 -2
  157. package/dist/components/Select/Combobox.js.map +1 -1
  158. package/dist/components/Select/Combobox.mjs +10 -3
  159. package/dist/components/Select/Combobox.mjs.map +1 -1
  160. package/dist/components/Select/Select.d.ts +1 -1
  161. package/dist/components/Select/Select.d.ts.map +1 -1
  162. package/dist/components/Select/Select.js +14 -2
  163. package/dist/components/Select/Select.js.map +1 -1
  164. package/dist/components/Select/Select.mjs +15 -3
  165. package/dist/components/Select/Select.mjs.map +1 -1
  166. package/dist/components/Select/Select.styles.d.ts +97 -1
  167. package/dist/components/Select/Select.styles.d.ts.map +1 -1
  168. package/dist/components/Select/Select.styles.js +83 -0
  169. package/dist/components/Select/Select.styles.js.map +1 -1
  170. package/dist/components/Select/Select.styles.mjs +82 -1
  171. package/dist/components/Select/Select.styles.mjs.map +1 -1
  172. package/dist/components/Tabs/Tab/Tab.styles.d.ts +1 -1
  173. package/dist/components/Tabs/Tab/Tab.styles.js +1 -1
  174. package/dist/components/Tabs/Tab/Tab.styles.mjs +1 -1
  175. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  176. package/dist/components/Textarea/Textarea.js +4 -0
  177. package/dist/components/Textarea/Textarea.js.map +1 -1
  178. package/dist/components/Textarea/Textarea.mjs +4 -0
  179. package/dist/components/Textarea/Textarea.mjs.map +1 -1
  180. package/dist/components/Toast/Toast.styles.d.ts +6 -2
  181. package/dist/components/Toast/Toast.styles.d.ts.map +1 -1
  182. package/dist/components/Toast/Toast.styles.js +18 -10
  183. package/dist/components/Toast/Toast.styles.js.map +1 -1
  184. package/dist/components/Toast/Toast.styles.mjs +18 -10
  185. package/dist/components/Toast/Toast.styles.mjs.map +1 -1
  186. package/dist/components/Typography/Caption.d.ts.map +1 -1
  187. package/dist/components/Typography/Caption.js +1 -1
  188. package/dist/components/Typography/Caption.js.map +1 -1
  189. package/dist/components/Typography/Caption.mjs +1 -1
  190. package/dist/components/Typography/Caption.mjs.map +1 -1
  191. package/dist/components/Typography/H1.d.ts.map +1 -1
  192. package/dist/components/Typography/H1.js +1 -1
  193. package/dist/components/Typography/H1.js.map +1 -1
  194. package/dist/components/Typography/H1.mjs +1 -1
  195. package/dist/components/Typography/H1.mjs.map +1 -1
  196. package/dist/components/Typography/H2.d.ts.map +1 -1
  197. package/dist/components/Typography/H2.js +1 -1
  198. package/dist/components/Typography/H2.js.map +1 -1
  199. package/dist/components/Typography/H2.mjs +1 -1
  200. package/dist/components/Typography/H2.mjs.map +1 -1
  201. package/dist/components/Typography/H3.d.ts.map +1 -1
  202. package/dist/components/Typography/H3.js +1 -1
  203. package/dist/components/Typography/H3.js.map +1 -1
  204. package/dist/components/Typography/H3.mjs +1 -1
  205. package/dist/components/Typography/H3.mjs.map +1 -1
  206. package/dist/components/Typography/H4.d.ts.map +1 -1
  207. package/dist/components/Typography/H4.js +1 -1
  208. package/dist/components/Typography/H4.js.map +1 -1
  209. package/dist/components/Typography/H4.mjs +1 -1
  210. package/dist/components/Typography/H4.mjs.map +1 -1
  211. package/dist/components/Typography/H5.d.ts.map +1 -1
  212. package/dist/components/Typography/H5.js +1 -1
  213. package/dist/components/Typography/H5.js.map +1 -1
  214. package/dist/components/Typography/H5.mjs +1 -1
  215. package/dist/components/Typography/H5.mjs.map +1 -1
  216. package/dist/components/Typography/Link.d.ts.map +1 -1
  217. package/dist/components/Typography/Link.js +1 -1
  218. package/dist/components/Typography/Link.js.map +1 -1
  219. package/dist/components/Typography/Link.mjs +1 -1
  220. package/dist/components/Typography/Link.mjs.map +1 -1
  221. package/dist/components/Typography/Overline.d.ts.map +1 -1
  222. package/dist/components/Typography/Overline.js +1 -1
  223. package/dist/components/Typography/Overline.js.map +1 -1
  224. package/dist/components/Typography/Overline.mjs +1 -1
  225. package/dist/components/Typography/Overline.mjs.map +1 -1
  226. package/dist/components/Typography/Subtext.d.ts.map +1 -1
  227. package/dist/components/Typography/Subtext.js +1 -1
  228. package/dist/components/Typography/Subtext.js.map +1 -1
  229. package/dist/components/Typography/Subtext.mjs +1 -1
  230. package/dist/components/Typography/Subtext.mjs.map +1 -1
  231. package/dist/components/Typography/Subtitle.d.ts.map +1 -1
  232. package/dist/components/Typography/Subtitle.js +1 -1
  233. package/dist/components/Typography/Subtitle.js.map +1 -1
  234. package/dist/components/Typography/Subtitle.mjs +1 -1
  235. package/dist/components/Typography/Subtitle.mjs.map +1 -1
  236. package/dist/components/Typography/Text.d.ts.map +1 -1
  237. package/dist/components/Typography/Text.js +1 -1
  238. package/dist/components/Typography/Text.js.map +1 -1
  239. package/dist/components/Typography/Text.mjs +1 -1
  240. package/dist/components/Typography/Text.mjs.map +1 -1
  241. package/dist/hooks/useLanguage.d.ts +5 -0
  242. package/dist/hooks/useLanguage.d.ts.map +1 -1
  243. package/dist/hooks/useLanguage.js +7 -3
  244. package/dist/hooks/useLanguage.js.map +1 -1
  245. package/dist/hooks/useLanguage.mjs +7 -4
  246. package/dist/hooks/useLanguage.mjs.map +1 -1
  247. package/dist/hooks/useTranslate.d.ts.map +1 -1
  248. package/dist/hooks/useTranslate.js +8 -5
  249. package/dist/hooks/useTranslate.js.map +1 -1
  250. package/dist/hooks/useTranslate.mjs +8 -5
  251. package/dist/hooks/useTranslate.mjs.map +1 -1
  252. package/dist/index.d.ts +2 -1
  253. package/dist/index.d.ts.map +1 -1
  254. package/dist/index.js +13 -0
  255. package/dist/index.js.map +1 -1
  256. package/dist/index.mjs +7 -2
  257. package/dist/index.mjs.map +1 -1
  258. package/dist/theme/colors.d.ts +2 -2
  259. package/dist/theme/colors.d.ts.map +1 -1
  260. package/dist/theme/colors.js +54 -18
  261. package/dist/theme/colors.js.map +1 -1
  262. package/dist/theme/colors.mjs +55 -19
  263. package/dist/theme/colors.mjs.map +1 -1
  264. package/dist/theme/global.d.ts.map +1 -1
  265. package/dist/theme/global.js +19 -1
  266. package/dist/theme/global.js.map +1 -1
  267. package/dist/theme/global.mjs +19 -1
  268. package/dist/theme/global.mjs.map +1 -1
  269. package/dist/theme/index.d.ts.map +1 -1
  270. package/dist/theme/index.js +2 -0
  271. package/dist/theme/index.js.map +1 -1
  272. package/dist/theme/index.mjs +2 -0
  273. package/dist/theme/index.mjs.map +1 -1
  274. package/dist/theme/palette.generated.d.ts +232 -123
  275. package/dist/theme/palette.generated.d.ts.map +1 -1
  276. package/dist/theme/palette.generated.js +233 -123
  277. package/dist/theme/palette.generated.js.map +1 -1
  278. package/dist/theme/palette.generated.mjs +233 -124
  279. package/dist/theme/palette.generated.mjs.map +1 -1
  280. package/dist/theme/paletteSwatches.d.ts +20 -0
  281. package/dist/theme/paletteSwatches.d.ts.map +1 -1
  282. package/dist/theme/recipes/avatar.d.ts +30 -0
  283. package/dist/theme/recipes/avatar.d.ts.map +1 -0
  284. package/dist/theme/recipes/avatar.js +96 -0
  285. package/dist/theme/recipes/avatar.js.map +1 -0
  286. package/dist/theme/recipes/avatar.mjs +94 -0
  287. package/dist/theme/recipes/avatar.mjs.map +1 -0
  288. package/dist/translations/Defaults.translations.json.js +19 -1
  289. package/dist/translations/Defaults.translations.json.js.map +1 -1
  290. package/dist/translations/Defaults.translations.json.mjs +18 -2
  291. package/dist/translations/Defaults.translations.json.mjs.map +1 -1
  292. package/dist/utils/disabledControl.d.ts +8 -1
  293. package/dist/utils/disabledControl.d.ts.map +1 -1
  294. package/dist/utils/disabledControl.js +8 -1
  295. package/dist/utils/disabledControl.js.map +1 -1
  296. package/dist/utils/disabledControl.mjs +8 -1
  297. package/dist/utils/disabledControl.mjs.map +1 -1
  298. package/dist/utils/focusRing.d.ts +22 -0
  299. package/dist/utils/focusRing.d.ts.map +1 -1
  300. package/dist/utils/focusRing.js +22 -0
  301. package/dist/utils/focusRing.js.map +1 -1
  302. package/dist/utils/focusRing.mjs +21 -1
  303. package/dist/utils/focusRing.mjs.map +1 -1
  304. package/package.json +2 -1
  305. package/src/components/Accordion/Accordion.stories.tsx +85 -0
  306. package/src/components/Accordion/Accordion.usage.mdx +200 -0
  307. package/src/components/Appear/Appear.usage.mdx +107 -0
  308. package/src/components/Avatar/Avatar.recipe.test.tsx +176 -0
  309. package/src/components/Avatar/Avatar.stories.tsx +199 -24
  310. package/src/components/Avatar/Avatar.tsx +118 -21
  311. package/src/components/Avatar/Avatar.usage.mdx +185 -0
  312. package/src/components/Avatar/index.tsx +8 -1
  313. package/src/components/Badge/Badge.stories.tsx +193 -3
  314. package/src/components/Badge/Badge.tsx +5 -3
  315. package/src/components/Badge/Badge.types.ts +7 -5
  316. package/src/components/Badge/Badge.usage.mdx +265 -0
  317. package/src/components/Banner/Banner.stories.tsx +152 -2
  318. package/src/components/Banner/Banner.types.ts +30 -1
  319. package/src/components/Banner/Banner.usage.mdx +233 -0
  320. package/src/components/BottomSheet/BottomSheet.stories.tsx +168 -1
  321. package/src/components/BottomSheet/BottomSheet.test.tsx +2 -1
  322. package/src/components/BottomSheet/BottomSheet.usage.mdx +216 -0
  323. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +59 -0
  324. package/src/components/Breadcrumb/Breadcrumb.usage.mdx +181 -0
  325. package/src/components/Button/Button.focusableWhenDisabled.test.tsx +218 -0
  326. package/src/components/Button/Button.stories.tsx +332 -3
  327. package/src/components/Button/Button.tsx +46 -3
  328. package/src/components/Button/Button.types.ts +38 -1
  329. package/src/components/Button/Button.usage.mdx +358 -0
  330. package/src/components/Button/Button.variants.test.tsx +13 -1
  331. package/src/components/Card/Card.stories.tsx +106 -0
  332. package/src/components/Card/Card.types.ts +12 -0
  333. package/src/components/Card/Card.usage.mdx +216 -0
  334. package/src/components/Checkbox/Checkbox.stories.tsx +140 -13
  335. package/src/components/Checkbox/Checkbox.usage.mdx +214 -0
  336. package/src/components/Chip/Chip.usage.mdx +78 -0
  337. package/src/components/Code/Code.stories.tsx +60 -0
  338. package/src/components/Code/Code.test.tsx +116 -0
  339. package/src/components/Code/Code.usage.mdx +187 -0
  340. package/src/components/Code/shikiAdapter.ts +38 -9
  341. package/src/components/CodeTabs/CodeTabs.stories.tsx +53 -0
  342. package/src/components/CodeTabs/CodeTabs.styles.ts +6 -5
  343. package/src/components/CodeTabs/CodeTabs.usage.mdx +176 -0
  344. package/src/components/Collapsible/Collapsible.stories.tsx +58 -0
  345. package/src/components/Collapsible/Collapsible.usage.mdx +173 -0
  346. package/src/components/ColorMode/ColorMode.stories.tsx +50 -0
  347. package/src/components/ColorMode/ColorMode.usage.mdx +135 -0
  348. package/src/components/ColorMode/ColorModeToggle.tsx +10 -3
  349. package/src/components/Confetti/Confetti.types.ts +5 -1
  350. package/src/components/Confetti/Confetti.usage.mdx +111 -0
  351. package/src/components/Confetti/confettiColors.ts +5 -5
  352. package/src/components/Container/Container.stories.tsx +32 -0
  353. package/src/components/Container/Container.usage.mdx +130 -0
  354. package/src/components/CopyableCode/CopyableCode.stories.tsx +62 -0
  355. package/src/components/CopyableCode/CopyableCode.usage.mdx +168 -0
  356. package/src/components/CountBadge/CountBadge.stories.tsx +69 -0
  357. package/src/components/CountBadge/CountBadge.usage.mdx +215 -0
  358. package/src/components/CountUp/CountUp.usage.mdx +107 -0
  359. package/src/components/DatePicker/DatePicker.usage.mdx +177 -0
  360. package/src/components/DatePicker/RangeDatePicker.stories.tsx +87 -3
  361. package/src/components/ErrorFallback/ErrorFallback.types.ts +6 -0
  362. package/src/components/ErrorFallback/ErrorFallback.usage.mdx +127 -0
  363. package/src/components/ExpandableText/ExpandableText.stories.tsx +55 -0
  364. package/src/components/ExpandableText/ExpandableText.usage.mdx +176 -0
  365. package/src/components/FileInput/FileInput.stories.tsx +38 -1
  366. package/src/components/FileInput/FileInput.usage.mdx +178 -0
  367. package/src/components/FileItem/FileItem.stories.tsx +71 -0
  368. package/src/components/FileItem/FileItem.usage.mdx +180 -0
  369. package/src/components/FileList/FileList.stories.tsx +25 -0
  370. package/src/components/FileList/FileList.usage.mdx +165 -0
  371. package/src/components/FlyTo/FlyTo.usage.mdx +99 -0
  372. package/src/components/Form/Form.stories.tsx +149 -0
  373. package/src/components/Form/Form.usage.mdx +203 -0
  374. package/src/components/Form/FormModalFooter/FormModalFooter.stories.tsx +1 -1
  375. package/src/components/Form/FormModalFooter/FormModalFooter.test.tsx +19 -1
  376. package/src/components/Form/FormModalFooter/FormModalFooter.tsx +2 -0
  377. package/src/components/Form/FormModalFooter/FormModalFooter.types.ts +11 -1
  378. package/src/components/FormControl/FormControl.stories.tsx +35 -0
  379. package/src/components/FormControl/FormControl.usage.mdx +128 -0
  380. package/src/components/FormIntegration/FormIntegration.usage.mdx +158 -0
  381. package/src/components/FormLabel/FormLabel.stories.tsx +71 -0
  382. package/src/components/FormLabel/FormLabel.usage.mdx +125 -0
  383. package/src/components/Icon/Icon.stories.tsx +61 -1
  384. package/src/components/Icon/Icon.usage.mdx +158 -0
  385. package/src/components/IconButton/IconButton.stories.tsx +213 -5
  386. package/src/components/IconButton/IconButton.usage.mdx +275 -0
  387. package/src/components/InfoSprinkle/InfoSprinkle.stories.tsx +77 -1
  388. package/src/components/InfoSprinkle/InfoSprinkle.usage.mdx +189 -0
  389. package/src/components/InlineCode/InlineCode.stories.tsx +75 -0
  390. package/src/components/InlineCode/InlineCode.usage.mdx +142 -0
  391. package/src/components/Input/Input.stories.tsx +180 -0
  392. package/src/components/Input/Input.tsx +4 -0
  393. package/src/components/Input/Input.usage.mdx +278 -0
  394. package/src/components/LineGraph/LineGraph.stories.tsx +112 -0
  395. package/src/components/LineGraph/LineGraph.tsx +4 -5
  396. package/src/components/LineGraph/LineGraph.types.ts +12 -2
  397. package/src/components/LineGraph/LineGraph.usage.mdx +186 -0
  398. package/src/components/LineGraph/seriesColors.test.ts +10 -9
  399. package/src/components/LineGraph/seriesColors.ts +18 -16
  400. package/src/components/Loaders/Loaders.stories.tsx +93 -0
  401. package/src/components/Loaders/Loaders.usage.mdx +180 -0
  402. package/src/components/LogicianProvider/LogicianProvider.usage.mdx +98 -0
  403. package/src/components/Markdown/Markdown.stories.tsx +53 -0
  404. package/src/components/Markdown/Markdown.usage.mdx +182 -0
  405. package/src/components/Masonry/Masonry.stories.tsx +63 -1
  406. package/src/components/Masonry/Masonry.types.ts +8 -3
  407. package/src/components/Masonry/Masonry.usage.mdx +142 -0
  408. package/src/components/MaxLengthIndicator/MaxLengthIndicator.stories.tsx +57 -0
  409. package/src/components/MaxLengthIndicator/MaxLengthIndicator.usage.mdx +125 -0
  410. package/src/components/Menu/Menu.stories.tsx +146 -2
  411. package/src/components/Menu/Menu.usage.mdx +238 -0
  412. package/src/components/Menu/MenuItem.types.ts +8 -0
  413. package/src/components/Modal/Modal.stories.tsx +177 -1
  414. package/src/components/Modal/Modal.usage.mdx +262 -0
  415. package/src/components/Modal/ModalCloseButton.tsx +1 -1
  416. package/src/components/MonthPicker/MonthPicker.stories.tsx +30 -0
  417. package/src/components/MonthPicker/MonthPicker.usage.mdx +191 -0
  418. package/src/components/NavList/NavList.stories.tsx +927 -0
  419. package/src/components/NavList/NavList.styles.ts +114 -0
  420. package/src/components/NavList/NavList.test.tsx +1306 -0
  421. package/src/components/NavList/NavList.translations.json +9 -0
  422. package/src/components/NavList/NavList.tsx +160 -0
  423. package/src/components/NavList/NavList.types.ts +155 -0
  424. package/src/components/NavList/NavList.usage.mdx +545 -0
  425. package/src/components/NavList/NavListContext.ts +25 -0
  426. package/src/components/NavList/NavListGroup.tsx +243 -0
  427. package/src/components/NavList/NavListItem.tsx +543 -0
  428. package/src/components/NavList/NavListSkeleton.tsx +57 -0
  429. package/src/components/NavList/index.ts +15 -0
  430. package/src/components/Pagination/Pagination.stories.tsx +90 -1
  431. package/src/components/Pagination/Pagination.tsx +11 -10
  432. package/src/components/Pagination/Pagination.usage.mdx +186 -0
  433. package/src/components/PasswordInput/PasswordInput.stories.tsx +51 -0
  434. package/src/components/PasswordInput/PasswordInput.usage.mdx +193 -0
  435. package/src/components/PinInput/PinInput.stories.tsx +91 -0
  436. package/src/components/PinInput/PinInput.usage.mdx +194 -0
  437. package/src/components/Popover/Popover.stories.tsx +104 -1
  438. package/src/components/Popover/Popover.usage.mdx +197 -0
  439. package/src/components/ProgressBar/ProgressBar.stories.tsx +92 -1
  440. package/src/components/ProgressBar/ProgressBar.types.ts +9 -0
  441. package/src/components/ProgressBar/ProgressBar.usage.mdx +210 -0
  442. package/src/components/Pulse/Pulse.usage.mdx +102 -0
  443. package/src/components/RadialProgress/RadialProgress.stories.tsx +74 -1
  444. package/src/components/RadialProgress/RadialProgress.types.ts +21 -1
  445. package/src/components/RadialProgress/RadialProgress.usage.mdx +153 -0
  446. package/src/components/Radio/Radio.stories.tsx +119 -0
  447. package/src/components/Radio/Radio.usage.mdx +187 -0
  448. package/src/components/Reveal/Reveal.usage.mdx +105 -0
  449. package/src/components/ScaledContext/ScaledContext.usage.mdx +111 -0
  450. package/src/components/SeeMoreButton/SeeMoreButton.stories.tsx +146 -2
  451. package/src/components/SeeMoreButton/SeeMoreButton.types.ts +8 -0
  452. package/src/components/SeeMoreButton/SeeMoreButton.usage.mdx +213 -0
  453. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +69 -0
  454. package/src/components/SegmentedControl/SegmentedControl.tsx +6 -7
  455. package/src/components/SegmentedControl/SegmentedControl.usage.mdx +209 -0
  456. package/src/components/SegmentedProgressBar/SegmentedProgressBar.stories.tsx +54 -0
  457. package/src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts +2 -0
  458. package/src/components/SegmentedProgressBar/SegmentedProgressBar.usage.mdx +145 -0
  459. package/src/components/Select/Combobox.tsx +28 -3
  460. package/src/components/Select/Select.clearTrigger.test.tsx +76 -0
  461. package/src/components/Select/Select.stories.tsx +290 -1
  462. package/src/components/Select/Select.styles.ts +89 -0
  463. package/src/components/Select/Select.tsx +28 -2
  464. package/src/components/Select/Select.usage.mdx +341 -0
  465. package/src/components/Shake/Shake.usage.mdx +107 -0
  466. package/src/components/Slider/Slider.stories.tsx +116 -0
  467. package/src/components/Slider/Slider.usage.mdx +179 -0
  468. package/src/components/Spinner/Spinner.stories.tsx +64 -0
  469. package/src/components/Spinner/Spinner.usage.mdx +136 -0
  470. package/src/components/SwapTransition/SwapTransition.usage.mdx +102 -0
  471. package/src/components/Switch/Switch.stories.tsx +131 -6
  472. package/src/components/Switch/Switch.usage.mdx +199 -0
  473. package/src/components/Table/Table.stories.tsx +159 -1
  474. package/src/components/Table/Table.usage.mdx +235 -0
  475. package/src/components/Tabs/Tab/Tab.styles.ts +1 -1
  476. package/src/components/Tabs/Tabs.stories.tsx +86 -0
  477. package/src/components/Tabs/Tabs.usage.mdx +263 -0
  478. package/src/components/Tag/Tag.stories.tsx +181 -4
  479. package/src/components/Tag/Tag.usage.mdx +257 -0
  480. package/src/components/Textarea/Textarea.stories.tsx +113 -0
  481. package/src/components/Textarea/Textarea.tsx +4 -0
  482. package/src/components/Textarea/Textarea.usage.mdx +186 -0
  483. package/src/components/Toast/Toast.stories.tsx +185 -3
  484. package/src/components/Toast/Toast.styles.ts +18 -10
  485. package/src/components/Toast/Toast.usage.mdx +265 -0
  486. package/src/components/Tooltip/Tooltip.stories.tsx +86 -1
  487. package/src/components/Tooltip/Tooltip.usage.mdx +219 -0
  488. package/src/components/Tree/Tree.stories.tsx +89 -0
  489. package/src/components/Tree/Tree.usage.mdx +207 -0
  490. package/src/components/Typography/Caption.tsx +0 -1
  491. package/src/components/Typography/H1.tsx +0 -1
  492. package/src/components/Typography/H2.tsx +0 -1
  493. package/src/components/Typography/H3.tsx +0 -1
  494. package/src/components/Typography/H4.tsx +0 -1
  495. package/src/components/Typography/H5.tsx +0 -1
  496. package/src/components/Typography/Link.tsx +0 -1
  497. package/src/components/Typography/Overline.tsx +0 -1
  498. package/src/components/Typography/Subtext.tsx +0 -1
  499. package/src/components/Typography/Subtitle.tsx +0 -1
  500. package/src/components/Typography/Text.tsx +0 -1
  501. package/src/components/Typography/Typography.stories.tsx +117 -0
  502. package/src/components/Typography/Typography.usage.mdx +257 -0
  503. package/src/components/Workflow/Workflow.usage.mdx +199 -0
  504. package/src/components/a11y.kwcag.test.tsx +66 -0
  505. package/src/components/claude.md +1 -1
  506. package/src/components/noRawScales.test.ts +5 -1
  507. package/src/foundations/BrandAssets.mdx +637 -0
  508. package/src/foundations/BrandAssets.stories.tsx +680 -0
  509. package/src/foundations/BrandColour.mdx +366 -0
  510. package/src/foundations/BrandColour.stories.tsx +343 -0
  511. package/src/guidelines/ComponentPageTemplate.mdx +84 -0
  512. package/src/guidelines/FeedbackActions.mdx +162 -23
  513. package/src/guidelines/_components/Lang.tsx +175 -0
  514. package/src/guidelines/_components/TokenTable.tsx +136 -0
  515. package/src/hooks/useLanguage.ts +8 -3
  516. package/src/hooks/useTranslate.test.tsx +46 -0
  517. package/src/hooks/useTranslate.ts +7 -5
  518. package/src/index.ts +7 -1
  519. package/src/theme/BazePalette.stories.tsx +111 -1
  520. package/src/theme/Palette.stories.tsx +2 -2
  521. package/src/theme/SemanticTokens.mdx +76 -17
  522. package/src/theme/claude.md +23 -9
  523. package/src/theme/colors.ts +71 -18
  524. package/src/theme/contrast.test.ts +57 -0
  525. package/src/theme/global.ts +20 -1
  526. package/src/theme/index.ts +2 -0
  527. package/src/theme/palette.generated.ts +233 -123
  528. package/src/theme/paletteSwatches.test.ts +1 -1
  529. package/src/theme/paletteSwatches.ts +35 -0
  530. package/src/theme/recipes/avatar.ts +92 -0
  531. package/src/translations/Defaults.translations.json +14 -0
  532. package/src/utils/disabledControl.ts +8 -1
  533. package/src/utils/focusRing.ts +23 -0
@@ -12,7 +12,15 @@ export type SeeMoreButtonOwnProps = Omit<
12
12
  ButtonOwnProps,
13
13
  'variant' | 'isDestructive'
14
14
  > & {
15
+ /**
16
+ * How many items the list shows now. Printed as the first number of
17
+ * `더보기 (currentCount/maxCount)`.
18
+ */
15
19
  currentCount: number;
20
+ /**
21
+ * How many items there are in total. The button does not disable or hide
22
+ * itself when `currentCount` reaches this; the caller does.
23
+ */
16
24
  maxCount: number;
17
25
  };
18
26
 
@@ -0,0 +1,213 @@
1
+ import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
2
+
3
+ import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
4
+ import * as SeeMoreButtonStories from './SeeMoreButton.stories';
5
+
6
+ <Meta of={SeeMoreButtonStories} name="Usage" />
7
+
8
+ <LangToggle />
9
+
10
+ <En>
11
+
12
+ # SeeMoreButton
13
+
14
+ A full-width button at the end of a list that shows more of the same list in
15
+ place, and says how many are shown out of how many.
16
+
17
+ ## When to use
18
+
19
+ - A list that grows where it is when the reader asks: reviews, recommended
20
+ questions, search results in a dropdown. In FactChat the store's reviews,
21
+ recommended questions and chatbot search use it.
22
+ - When you know the total, so the count `(3/10)` is true.
23
+
24
+ ## When not to use
25
+
26
+ - Opening the full list on another page → a link-shaped `Button`
27
+ (`as="a"`, `ghost`) such as 전체 보기, usually next to the section heading.
28
+ - Paging through a long, numbered result set → `Pagination`.
29
+ - Expanding one block of text → `ExpandableText`, which has its own
30
+ 더보기 / 접기.
31
+ - Showing more attached files → `FileList` already renders its own control.
32
+ - You do not know the total → a `subtle` or `ghost` `Button` with your own
33
+ label, because SeeMoreButton always prints a count.
34
+
35
+ ## Props
36
+
37
+ SeeMoreButton has no `variant`. It always renders the `ghost` Button recipe
38
+ with a top hairline, takes the full width of its container, and accepts
39
+ Button's other props (`onClick`, `disabled`, `loading`, `size` …).
40
+
41
+ </En>
42
+
43
+ <Ko>
44
+
45
+ # SeeMoreButton
46
+
47
+ 목록 끝에 놓는 전체 너비 버튼입니다. 같은 목록을 그 자리에서 더 보여 주고, 전체 중
48
+ 몇 개를 보여 주는지 알려 줍니다.
49
+
50
+ ## 언제 쓰나요
51
+
52
+ - 읽는 사람이 원할 때 그 자리에서 늘어나는 목록: 리뷰, 추천 질문, 드롭다운 안의 검색
53
+ 결과. FactChat에서는 스토어의 리뷰, 추천 질문, 챗봇 검색에 씁니다.
54
+ - 전체 개수를 알고 있어서 `(3/10)` 같은 개수가 사실일 때.
55
+
56
+ ## 언제 쓰지 않나요
57
+
58
+ - 다른 화면에서 전체 목록을 연다면 링크 모양의 `Button`(`as="a"`, `ghost`)을 씁니다.
59
+ "전체 보기"처럼 쓰고, 보통 섹션 제목 옆에 둡니다.
60
+ - 번호가 매겨진 긴 결과를 넘겨 본다면 `Pagination`을 씁니다.
61
+ - 글 한 덩어리를 펼친다면 더보기 / 접기가 들어 있는 `ExpandableText`를 씁니다.
62
+ - 첨부 파일을 더 보여 준다면 `FileList`가 자체 컨트롤을 그립니다.
63
+ - 전체 개수를 모른다면 라벨을 직접 쓰는 `subtle`이나 `ghost` `Button`을 씁니다.
64
+ SeeMoreButton은 언제나 개수를 함께 표시하기 때문입니다.
65
+
66
+ ## 속성
67
+
68
+ SeeMoreButton에는 `variant`가 없습니다. 언제나 위쪽 구분선을 더한 `ghost` Button
69
+ 레시피로 그려지고, 담긴 영역의 너비를 다 차지하며, Button의 나머지 속성(`onClick`,
70
+ `disabled`, `loading`, `size` 등)을 받습니다.
71
+
72
+ </Ko>
73
+
74
+ <ArgTypes of={SeeMoreButtonStories} include={['currentCount', 'maxCount']} />
75
+
76
+ <En>
77
+
78
+ The component does not disable or hide itself when `currentCount` reaches
79
+ `maxCount`; that is up to you (see Do / Don't).
80
+
81
+ ## Do / Don't
82
+
83
+ </En>
84
+
85
+ <Ko>
86
+
87
+ `currentCount`가 `maxCount`에 닿아도 컴포넌트가 스스로 비활성이 되거나 사라지지
88
+ 않습니다. 그 처리는 호출하는 쪽에서 합니다(아래 예시 참고).
89
+
90
+ ## 이렇게 하세요 / 이렇게 하지 마세요
91
+
92
+ </Ko>
93
+
94
+ <Canvas of={SeeMoreButtonStories.DoGrowTheList} />
95
+ <Verdict
96
+ kind="do"
97
+ en="Put it right under the list, let each click add items in place, and remove it once everything is shown. FactChat renders it only while there is a next page."
98
+ ko="목록 바로 아래에 두고, 누를 때마다 그 자리에 항목을 더하며, 모두 보여 준 뒤에는 버튼을 없앱니다. FactChat도 다음 페이지가 있을 때만 버튼을 그립니다."
99
+ />
100
+
101
+ <Canvas of={SeeMoreButtonStories.DontNavigate} />
102
+ <Verdict
103
+ kind="dont"
104
+ en="Use it to send the reader to a different page with all 128 reviews. It promises more of this list, here."
105
+ ko="리뷰 128개가 있는 다른 화면으로 보내는 데 쓰지 마세요. 이 버튼은 지금 이 목록을 이 자리에서 더 보여 주겠다는 뜻입니다."
106
+ />
107
+
108
+ <Canvas of={SeeMoreButtonStories.DoLinkToFullPage} />
109
+ <Verdict
110
+ kind="do"
111
+ en="To open the full list elsewhere, use a link-shaped ghost Button next to the heading."
112
+ ko="다른 화면에서 전체 목록을 연다면 제목 옆에 링크 모양의 ghost Button을 둡니다."
113
+ />
114
+
115
+ <En>
116
+
117
+ ## Content
118
+
119
+ - The label is fixed: `더보기 (currentCount/maxCount)` and a chevron.
120
+ Children are ignored. The text comes from the library's own `see_more`
121
+ string, which today always resolves to Korean, so an English screen still
122
+ shows 더보기.
123
+ - Keep the numbers honest. `maxCount` is the real total; if the server only
124
+ tells you "there is more", use a `Button` instead.
125
+
126
+ ## Accessibility
127
+
128
+ What SeeMoreButton does for you:
129
+
130
+ - It is a Button: a native `<button>`, Tab and Enter / Space (WCAG 2.1.1), and
131
+ the keyboard focus ring (WCAG 2.4.7).
132
+ - The count is part of the visible label, so the accessible name is
133
+ "더보기 (3/10)" and matches what is on screen (WCAG 2.5.3).
134
+
135
+ What you still have to do:
136
+
137
+ - **Keep the keyboard user's place.** When the last click removes the button,
138
+ focus would fall back to the page. Move focus to the first newly shown item
139
+ (WCAG 2.4.3).
140
+ - **New items are not announced.** The component has no live region. If the
141
+ added items are not obvious from the focus move, announce the new count
142
+ yourself.
143
+ - **Loading.** While the next page loads, pass `loading` with a
144
+ `loadingText` (불러오는 중) so the button cannot be pressed twice and still
145
+ has words. Without `loadingText` the label is hidden behind the spinner.
146
+
147
+ ## Tokens
148
+
149
+ The table is generated from `SeeMoreButton.styles.ts` and the ghost Button
150
+ recipe it renders.
151
+
152
+ </En>
153
+
154
+ <Ko>
155
+
156
+ ## 문구
157
+
158
+ - 라벨은 정해져 있습니다. `더보기 (currentCount/maxCount)`와 아래 화살표이며,
159
+ children은 무시됩니다. 문구는 라이브러리의 `see_more` 문자열에서 오는데 지금은
160
+ 언제나 한국어로 풀리므로, 영어 화면에도 "더보기"가 나옵니다.
161
+ - 숫자는 사실이어야 합니다. `maxCount`는 실제 전체 개수입니다. 서버가 "더 있다"는
162
+ 것만 알려 준다면 `Button`을 씁니다.
163
+
164
+ ## 접근성
165
+
166
+ SeeMoreButton이 알아서 하는 일
167
+
168
+ - Button 그대로입니다. 기본 `<button>`이며 Tab, Enter와 Space로 다루고(WCAG 2.1.1),
169
+ 키보드 초점 링을 그립니다(WCAG 2.4.7).
170
+ - 개수가 보이는 라벨에 들어 있어서, 접근 가능한 이름이 화면에 보이는 그대로
171
+ "더보기 (3/10)"입니다(WCAG 2.5.3).
172
+
173
+ 직접 챙겨야 하는 일
174
+
175
+ - **키보드 사용자의 위치를 지킵니다.** 마지막으로 눌렀을 때 버튼이 사라지면 초점이
176
+ 페이지 처음으로 돌아갈 수 있습니다. 새로 나온 첫 항목으로 초점을 옮깁니다(WCAG
177
+ 2.4.3).
178
+ - **새 항목은 알려 주지 않습니다.** 컴포넌트에 라이브 영역이 없습니다. 초점을 옮기는
179
+ 것만으로 새 항목이 분명하지 않다면 늘어난 개수를 직접 알립니다.
180
+ - **불러오는 중.** 다음 페이지를 불러오는 동안 `loading`과 `loadingText`(불러오는 중)를
181
+ 함께 주어 두 번 눌리지 않게 하고 글자도 남깁니다. `loadingText`가 없으면 라벨이
182
+ 스피너 뒤로 숨습니다.
183
+
184
+ ## 토큰
185
+
186
+ 아래 표는 `SeeMoreButton.styles.ts`와 이 컴포넌트가 그리는 ghost Button 레시피에서
187
+ 자동으로 만듭니다.
188
+
189
+ </Ko>
190
+
191
+ <Canvas of={SeeMoreButtonStories.UsageTokens} sourceState="none" />
192
+
193
+ <En>
194
+
195
+ ## Related
196
+
197
+ - **Button**: a link-shaped `ghost` Button for 전체 보기, or your own label
198
+ when the total is unknown.
199
+ - **Pagination**: numbered pages.
200
+ - **ExpandableText**: 더보기 / 접기 for one block of text.
201
+
202
+ </En>
203
+
204
+ <Ko>
205
+
206
+ ## 관련 컴포넌트
207
+
208
+ - **Button**: 전체 보기에 쓰는 링크 모양의 `ghost` Button, 또는 전체 개수를 모를 때
209
+ 라벨을 직접 쓰는 버튼.
210
+ - **Pagination**: 번호가 있는 페이지.
211
+ - **ExpandableText**: 글 한 덩어리의 더보기 / 접기.
212
+
213
+ </Ko>
@@ -3,6 +3,8 @@ import { Meta, StoryObj } from '@storybook/react';
3
3
  import React, { useState } from 'react';
4
4
  import { FiHome, FiSettings, FiUser } from 'react-icons/fi';
5
5
 
6
+ import { T } from '../../guidelines/_components/Lang';
7
+ import { TokenTable } from '../../guidelines/_components/TokenTable';
6
8
  import { SegmentedControl } from './SegmentedControl';
7
9
 
8
10
  const meta = {
@@ -202,3 +204,70 @@ export const WithCustomContent = {
202
204
  ],
203
205
  },
204
206
  };
207
+
208
+ // ───────────────────────── Usage-page specimens ─────────────────────────
209
+ // Pulled into `SegmentedControl.usage.mdx` with <Canvas of={…} />. Hidden from
210
+ // the sidebar (`!dev`).
211
+
212
+ export const DoChangeTheView: Story = {
213
+ tags: ['!dev'],
214
+ parameters: { layout: 'padded' },
215
+ name: 'Usage / Do: change how the same data is shown',
216
+ render: () => (
217
+ <VStack align="start" gap={3}>
218
+ <Text fontWeight="600">크레딧 사용량</Text>
219
+ <SegmentedControl
220
+ aria-label="집계 단위"
221
+ size="sm"
222
+ defaultValue="week"
223
+ options={[
224
+ { label: '일', value: 'day' },
225
+ { label: '주', value: 'week' },
226
+ { label: '월', value: 'month' },
227
+ ]}
228
+ />
229
+ </VStack>
230
+ ),
231
+ };
232
+
233
+ export const DontSectionsAsSegments: Story = {
234
+ tags: ['!dev'],
235
+ parameters: { layout: 'padded' },
236
+ name: "Usage / Don't: switch between unrelated sections",
237
+ render: () => (
238
+ <SegmentedControl
239
+ defaultValue="credit"
240
+ options={[
241
+ { label: '크레딧', value: 'credit' },
242
+ { label: '보안', value: 'security' },
243
+ { label: '공지', value: 'notice' },
244
+ { label: '멤버', value: 'members' },
245
+ { label: '감사 로그', value: 'audit' },
246
+ ]}
247
+ />
248
+ ),
249
+ };
250
+
251
+ /** Tokens the track, thumb and labels read, as set in `SegmentedControl.tsx`. */
252
+ export const UsageTokens: Story = {
253
+ tags: ['!dev'],
254
+ parameters: { layout: 'padded' },
255
+ name: 'Usage / Tokens',
256
+ render: () => (
257
+ <TokenTable
258
+ rows={[
259
+ { token: 'bg.subtle', use: <T en="Track" ko="트랙" /> },
260
+ {
261
+ token: 'border.default',
262
+ use: <T en="Track ring (light)" ko="트랙 테두리(라이트)" />,
263
+ },
264
+ { token: 'bg.raised', use: <T en="Selected thumb" ko="선택된 칸" /> },
265
+ { token: 'fg.muted', use: <T en="Label" ko="라벨" /> },
266
+ {
267
+ token: 'fg.default',
268
+ use: <T en="Selected label" ko="선택된 라벨" />,
269
+ },
270
+ ]}
271
+ />
272
+ ),
273
+ };
@@ -67,18 +67,17 @@ export const SegmentedControl = forwardRef<
67
67
  }
68
68
  }}
69
69
  size={size}
70
- // Track is bg.subtle (gray.50 light) and the selected indicator rides on
71
- // `bg.raised` — a raised neutral surface that resolves white in light and
72
- // the lightest neutral (gray.1100) in dark, so the thumb reads as lifted
73
- // above the track in both modes (`bg.surface` could not: its dark value is
74
- // darker than the track). The indicator also gains a shadow: an md drop
70
+ // Track is bg.subtle and the selected indicator rides on `bg.raised` — a
71
+ // raised neutral surface that resolves white in light and a lighter
72
+ // neutral than the track in dark, so the thumb reads as lifted
73
+ // above the track in both modes. The indicator also gains a shadow: an md drop
75
74
  // shadow in light, and in dark — where a drop shadow is invisible on a
76
75
  // dark canvas — a soft ambient shadow + a translucent-white hairline edge.
77
76
  //
78
77
  // The track itself only contrasts where the page wash is darker (light) or
79
78
  // lighter (dark) than the fill. It vanishes when the page matches the
80
- // track: a `bg.sunken` list/overview page is gray.50 in light — identical
81
- // to the bg.subtle track — and a `bg.surface` card is lighter than the
79
+ // track: a `bg.sunken` list/overview page has the same light value as
80
+ // the bg.subtle track — and a `bg.surface` card is lighter than the
82
81
  // track in dark. In either case the control would read as floating text,
83
82
  // so a hairline ring defines its bounds on *any* background: a neutral
84
83
  // `border.default` ring in light, a translucent-white ring in dark. (The
@@ -0,0 +1,209 @@
1
+ import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
2
+
3
+ import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
4
+ import * as SegmentedControlStories from './SegmentedControl.stories';
5
+
6
+ <Meta of={SegmentedControlStories} name="Usage" />
7
+
8
+ <LangToggle />
9
+
10
+ <En>
11
+
12
+ # SegmentedControl
13
+
14
+ A row of two to five mutually exclusive options in one track. Choosing one
15
+ changes how the content next to it is shown, or which setting applies.
16
+
17
+ ## When to use
18
+
19
+ - To change the unit or view of the same data: 일 / 주 / 월, chart / table.
20
+ - To filter one list by a small, fixed set: all models, chat models, image
21
+ models.
22
+ - For a setting with a few named values that all fit on screen, such as
23
+ 상위 설정 따름 / 허용 / 차단.
24
+ - To switch the language of a field being edited (한국어 / English).
25
+
26
+ ## When not to use
27
+
28
+ - To switch between different sections with their own content → `Tabs`.
29
+ - For more than five options, or options that do not fit on one line →
30
+ `Select` or `Radio`.
31
+ - For on / off → `Switch`.
32
+ - For actions (저장, 삭제) → `Button`s. A segment holds a value; it does not
33
+ do something when pressed.
34
+ - To pick several at once → `Checkbox` or `Tag` with `selected`.
35
+
36
+ ## Variants and what they mean
37
+
38
+ SegmentedControl has one look: the selected option sits on a raised thumb in a
39
+ `bg.subtle` track. `size` matches the height of the `Button` of the same size,
40
+ so a control and a button line up in one row.
41
+
42
+ </En>
43
+
44
+ <Ko>
45
+
46
+ # SegmentedControl
47
+
48
+ 한 트랙 안에 둘에서 다섯 개의 선택지를 나란히 두고 하나만 고르게 합니다. 하나를 고르면
49
+ 옆 내용을 보는 방식이나 적용되는 설정이 바뀝니다.
50
+
51
+ ## 언제 쓰나요
52
+
53
+ - 같은 데이터의 단위나 보기를 바꿀 때: 일 / 주 / 월, 차트 / 표.
54
+ - 적고 정해진 기준으로 목록 하나를 거를 때: 전체 모델, 대화 모델, 이미지 모델.
55
+ - 이름 붙은 값 몇 개가 화면에 다 들어가는 설정: 상위 설정 따름 / 허용 / 차단.
56
+ - 편집 중인 입력란의 언어를 바꿀 때(한국어 / English).
57
+
58
+ ## 언제 쓰지 않나요
59
+
60
+ - 내용이 따로 있는 서로 다른 구역을 오갈 때는 `Tabs`를 씁니다.
61
+ - 선택지가 다섯 개보다 많거나 한 줄에 들어가지 않으면 `Select`나 `Radio`를 씁니다.
62
+ - 켜고 끄는 것은 `Switch`를 씁니다.
63
+ - 저장, 삭제 같은 동작은 `Button`으로 둡니다. 세그먼트는 값을 고르는 것이지 누르면 무언가를
64
+ 하는 것이 아닙니다.
65
+ - 여러 개를 함께 고르게 하려면 `Checkbox`나 `selected`를 쓰는 `Tag`를 씁니다.
66
+
67
+ ## 변형과 뜻
68
+
69
+ SegmentedControl의 모양은 하나입니다. `bg.subtle` 트랙 위에 선택된 칸이 떠 있는 판으로
70
+ 올라옵니다. `size`는 같은 크기의 `Button`과 높이가 같아서 한 줄에 나란히 두면 맞아떨어집니다.
71
+
72
+ </Ko>
73
+
74
+ <ArgTypes of={SegmentedControlStories} include={['options', 'value', 'defaultValue', 'onSelect', 'size']} />
75
+
76
+ <En>
77
+
78
+ | `size` | Height | Next to |
79
+ | --- | --- | --- |
80
+ | `xs` | 32px | A `Button size="xs"`, a dense field header |
81
+ | `sm` | 36px | Settings rows and filters in admin tables |
82
+ | `md` (default) | 40px | Page-level view switches |
83
+ | `lg` | 44px | A `Button size="lg"` |
84
+
85
+ ## Do / Don't
86
+
87
+ </En>
88
+
89
+ <Ko>
90
+
91
+ | `size` | 높이 | 함께 두는 것 |
92
+ | --- | --- | --- |
93
+ | `xs` | 32px | `Button size="xs"`, 촘촘한 입력란 머리 |
94
+ | `sm` | 36px | 관리 화면 표의 설정 줄과 필터 |
95
+ | `md` (기본) | 40px | 페이지 전체의 보기 전환 |
96
+ | `lg` | 44px | `Button size="lg"` |
97
+
98
+ ## 이렇게 하세요 / 이렇게 하지 마세요
99
+
100
+ </Ko>
101
+
102
+ <Canvas of={SegmentedControlStories.DoChangeTheView} />
103
+ <Verdict
104
+ kind="do"
105
+ en="Use it to change the unit of the data beside it, and name the group with aria-label ('집계 단위')."
106
+ ko="옆 데이터의 단위를 바꾸는 데 쓰고, 묶음에 aria-label('집계 단위')로 이름을 붙입니다."
107
+ />
108
+
109
+ <Canvas of={SegmentedControlStories.DontSectionsAsSegments} />
110
+ <Verdict
111
+ kind="dont"
112
+ en="Use it to switch between unrelated sections. That is Tabs: it gives each section a panel and the tab roles."
113
+ ko="서로 다른 구역을 오가는 데 쓰지 마세요. 그것은 Tabs의 일입니다. Tabs는 구역마다 패널과 탭 역할을 줍니다."
114
+ />
115
+
116
+ <En>
117
+
118
+ ## Content
119
+
120
+ - One or two words per option, nouns or short adjectives. No full stop.
121
+ - Keep options parallel: 일 / 주 / 월, not 일별 / 이번 주 / 월.
122
+ - Keep the order fixed across screens. When the same choice appears in several
123
+ places, users find it by position.
124
+
125
+ ## Accessibility
126
+
127
+ What SegmentedControl does for you:
128
+
129
+ - It is a radio group: the root is `role="radiogroup"` and each option is a
130
+ radio with a hidden native input, so `Tab` reaches the group and the arrow
131
+ keys change the selection (WCAG 2.1.1, 4.1.2).
132
+ - The selected option is shown by the raised thumb and by a heavier, darker
133
+ label, not by colour alone (WCAG 1.4.1). The bold width is reserved in
134
+ advance, so the labels do not shift when the selection moves.
135
+ - A hairline ring keeps the track visible on any page colour.
136
+
137
+ What you still have to do:
138
+
139
+ - **Name the group.** Pass `aria-label` (or `aria-labelledby` pointing at the
140
+ visible label) on `SegmentedControl`. Without it, a screen reader announces
141
+ the options with no question.
142
+ - Give icon-only options a text alternative inside the label.
143
+ - A disabled option (`disabled: true` in `options`) cannot be chosen; say why
144
+ nearby if the reason is not obvious.
145
+
146
+ ## Tokens
147
+
148
+ The table lists the tokens set in `SegmentedControl.tsx`. In dark mode the
149
+ ring and the thumb's edge are translucent white, not tokens.
150
+
151
+ </En>
152
+
153
+ <Ko>
154
+
155
+ ## 문구
156
+
157
+ - 선택지마다 한두 단어의 명사나 짧은 형용사를 씁니다. 마침표를 찍지 않습니다.
158
+ - 선택지를 같은 꼴로 맞춥니다. "일별 / 이번 주 / 월"이 아니라 "일 / 주 / 월"처럼 씁니다.
159
+ - 화면이 달라도 순서를 바꾸지 않습니다. 같은 선택이 여러 곳에 나오면 사용자는 위치로
160
+ 찾습니다.
161
+
162
+ ## 접근성
163
+
164
+ SegmentedControl이 알아서 하는 일
165
+
166
+ - 라디오 묶음입니다. 루트는 `role="radiogroup"`이고 각 선택지는 숨은 기본 입력이 있는
167
+ 라디오라서, `Tab`으로 묶음에 닿고 방향키로 선택을 바꿉니다(WCAG 2.1.1, 4.1.2).
168
+ - 선택된 칸은 떠 있는 판과 더 굵고 진한 라벨로 보이며, 색만으로 알리지 않습니다
169
+ (WCAG 1.4.1). 굵은 글자의 너비를 미리 잡아 두므로 선택이 옮겨 가도 라벨이 흔들리지
170
+ 않습니다.
171
+ - 가는 테두리가 있어 어떤 페이지 색 위에서도 트랙이 보입니다.
172
+
173
+ 직접 챙겨야 하는 일
174
+
175
+ - **묶음에 이름을 붙입니다.** `SegmentedControl`에 `aria-label`을 넘기거나, 보이는
176
+ 라벨을 가리키는 `aria-labelledby`를 넘깁니다. 이름이 없으면 화면 낭독기는 무엇을 고르는지
177
+ 모른 채 선택지만 읽습니다.
178
+ - 아이콘만 있는 선택지에는 라벨 안에 대체 텍스트를 넣습니다.
179
+ - 비활성 선택지(`options`의 `disabled: true`)는 고를 수 없습니다. 이유가 분명하지 않다면
180
+ 가까이에 이유를 적습니다.
181
+
182
+ ## 토큰
183
+
184
+ 아래 표는 `SegmentedControl.tsx`에서 정한 토큰입니다. 다크 모드의 테두리와 판 가장자리는
185
+ 토큰이 아니라 반투명한 흰색입니다.
186
+
187
+ </Ko>
188
+
189
+ <Canvas of={SegmentedControlStories.UsageTokens} sourceState="none" />
190
+
191
+ <En>
192
+
193
+ ## Related
194
+
195
+ - **Tabs**: different sections with their own content.
196
+ - **Select** / **Radio**: more options, or options in a form.
197
+ - **Switch**: on / off.
198
+
199
+ </En>
200
+
201
+ <Ko>
202
+
203
+ ## 관련 컴포넌트
204
+
205
+ - **Tabs**: 내용이 따로 있는 서로 다른 구역.
206
+ - **Select** / **Radio**: 선택지가 많거나 양식 안의 선택지.
207
+ - **Switch**: 켜기 / 끄기.
208
+
209
+ </Ko>
@@ -1,6 +1,8 @@
1
1
  import { Box, Flex, Text, VStack } from '@chakra-ui/react';
2
2
  import { Meta, StoryObj } from '@storybook/react';
3
3
 
4
+ import { T } from '../../guidelines/_components/Lang';
5
+ import { TokenTable } from '../../guidelines/_components/TokenTable';
4
6
  import { ProgressSegment, SegmentedProgressBar } from './';
5
7
 
6
8
  const meta = {
@@ -274,3 +276,55 @@ export const CustomColors: Story = {
274
276
  </VStack>
275
277
  ),
276
278
  };
279
+
280
+ // ───────────────────────── Usage-page specimens ─────────────────────────
281
+ // Pulled into `SegmentedProgressBar.usage.mdx` with <Canvas of={…} />. Hidden
282
+ // from the sidebar (`!dev`).
283
+
284
+ export const DoCountsInText: Story = {
285
+ tags: ['!dev'],
286
+ parameters: { layout: 'padded' },
287
+ name: 'Usage / Do: counts in words next to the bar',
288
+ render: () => (
289
+ <Box width="400px">
290
+ <SegmentedProgressBar max={100} height="8px" aria-hidden>
291
+ <ProgressSegment value={42} filledTrackColor="success.solid" />
292
+ <ProgressSegment value={3} filledTrackColor="danger.solid" />
293
+ </SegmentedProgressBar>
294
+ <Flex gap={4} mt={2} textStyle="subtext" color="fg.muted">
295
+ <Text>보냄 42</Text>
296
+ <Text color="danger.fg">실패 3</Text>
297
+ <Text>남음 55</Text>
298
+ </Flex>
299
+ </Box>
300
+ ),
301
+ };
302
+
303
+ export const DontColourOnly: Story = {
304
+ tags: ['!dev'],
305
+ parameters: { layout: 'padded' },
306
+ name: "Usage / Don't: segments with no words",
307
+ render: () => (
308
+ <Box width="400px">
309
+ <SegmentedProgressBar max={100} height="8px">
310
+ <ProgressSegment value={42} filledTrackColor="success.solid" />
311
+ <ProgressSegment value={3} filledTrackColor="danger.solid" />
312
+ </SegmentedProgressBar>
313
+ </Box>
314
+ ),
315
+ };
316
+
317
+ /** Tokens the bar reads, from `SegmentedProgressBar.tsx` and the theme. */
318
+ export const UsageTokens: Story = {
319
+ tags: ['!dev'],
320
+ parameters: { layout: 'padded' },
321
+ name: 'Usage / Tokens',
322
+ render: () => (
323
+ <TokenTable
324
+ rows={[
325
+ { token: 'bg.track', use: <T en="remainder behind the segments" ko="세그먼트 뒤의 남은 부분" /> },
326
+ { token: 'primary.main', use: <T en="segment fill (default)" ko="세그먼트 채움(기본)" /> },
327
+ ]}
328
+ />
329
+ ),
330
+ };
@@ -3,9 +3,11 @@ import { BoxProps } from '@chakra-ui/react';
3
3
  import { ProgressBarProps } from '../ProgressBar/ProgressBar.types';
4
4
 
5
5
  export type SegmentedProgressBarProps = BoxProps & {
6
+ /** The whole; each segment's width is `value / max`. */
6
7
  max: number;
7
8
  };
8
9
 
9
10
  export type ProgressSegmentProps = ProgressBarProps & {
11
+ /** This part's amount, in the same unit as the bar's `max`. */
10
12
  value: number;
11
13
  };