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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (525) hide show
  1. package/README.md +1 -0
  2. package/dist/components/Avatar/Avatar.d.ts +68 -11
  3. package/dist/components/Avatar/Avatar.d.ts.map +1 -1
  4. package/dist/components/Avatar/Avatar.js +41 -5
  5. package/dist/components/Avatar/Avatar.js.map +1 -1
  6. package/dist/components/Avatar/Avatar.mjs +40 -5
  7. package/dist/components/Avatar/Avatar.mjs.map +1 -1
  8. package/dist/components/Avatar/index.d.ts +2 -2
  9. package/dist/components/Avatar/index.d.ts.map +1 -1
  10. package/dist/components/Badge/Badge.d.ts.map +1 -1
  11. package/dist/components/Badge/Badge.js +5 -3
  12. package/dist/components/Badge/Badge.js.map +1 -1
  13. package/dist/components/Badge/Badge.mjs +5 -3
  14. package/dist/components/Badge/Badge.mjs.map +1 -1
  15. package/dist/components/Badge/Badge.types.d.ts +7 -5
  16. package/dist/components/Badge/Badge.types.d.ts.map +1 -1
  17. package/dist/components/Banner/Banner.types.d.ts +24 -1
  18. package/dist/components/Banner/Banner.types.d.ts.map +1 -1
  19. package/dist/components/BottomSheet/BottomSheet.styles.d.ts +2 -2
  20. package/dist/components/Button/Button.d.ts.map +1 -1
  21. package/dist/components/Button/Button.js +31 -3
  22. package/dist/components/Button/Button.js.map +1 -1
  23. package/dist/components/Button/Button.mjs +31 -3
  24. package/dist/components/Button/Button.mjs.map +1 -1
  25. package/dist/components/Button/Button.types.d.ts +38 -1
  26. package/dist/components/Button/Button.types.d.ts.map +1 -1
  27. package/dist/components/Card/Card.types.d.ts +12 -0
  28. package/dist/components/Card/Card.types.d.ts.map +1 -1
  29. package/dist/components/CodeTabs/CodeTabs.styles.d.ts +6 -5
  30. package/dist/components/CodeTabs/CodeTabs.styles.d.ts.map +1 -1
  31. package/dist/components/CodeTabs/CodeTabs.styles.js +6 -5
  32. package/dist/components/CodeTabs/CodeTabs.styles.js.map +1 -1
  33. package/dist/components/CodeTabs/CodeTabs.styles.mjs +6 -5
  34. package/dist/components/CodeTabs/CodeTabs.styles.mjs.map +1 -1
  35. package/dist/components/ColorMode/ColorModeToggle.d.ts +7 -2
  36. package/dist/components/ColorMode/ColorModeToggle.d.ts.map +1 -1
  37. package/dist/components/ColorMode/ColorModeToggle.js +8 -3
  38. package/dist/components/ColorMode/ColorModeToggle.js.map +1 -1
  39. package/dist/components/ColorMode/ColorModeToggle.mjs +8 -3
  40. package/dist/components/ColorMode/ColorModeToggle.mjs.map +1 -1
  41. package/dist/components/Confetti/Confetti.types.d.ts +5 -1
  42. package/dist/components/Confetti/Confetti.types.d.ts.map +1 -1
  43. package/dist/components/Confetti/confettiColors.d.ts +5 -5
  44. package/dist/components/Confetti/confettiColors.js +5 -5
  45. package/dist/components/Confetti/confettiColors.mjs +5 -5
  46. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts +6 -0
  47. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts.map +1 -1
  48. package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts +1 -1
  49. package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts.map +1 -1
  50. package/dist/components/Form/FormModalFooter/FormModalFooter.js +2 -2
  51. package/dist/components/Form/FormModalFooter/FormModalFooter.js.map +1 -1
  52. package/dist/components/Form/FormModalFooter/FormModalFooter.mjs +2 -2
  53. package/dist/components/Form/FormModalFooter/FormModalFooter.mjs.map +1 -1
  54. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts +11 -1
  55. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts.map +1 -1
  56. package/dist/components/Form/FormSection/CollapsibleFormSection.js +1 -0
  57. package/dist/components/Form/FormSection/CollapsibleFormSection.js.map +1 -1
  58. package/dist/components/Form/FormSection/CollapsibleFormSection.mjs +1 -0
  59. package/dist/components/Form/FormSection/CollapsibleFormSection.mjs.map +1 -1
  60. package/dist/components/Input/Input.d.ts.map +1 -1
  61. package/dist/components/Input/Input.js +4 -0
  62. package/dist/components/Input/Input.js.map +1 -1
  63. package/dist/components/Input/Input.mjs +4 -0
  64. package/dist/components/Input/Input.mjs.map +1 -1
  65. package/dist/components/LineGraph/LineGraph.d.ts.map +1 -1
  66. package/dist/components/LineGraph/LineGraph.js +4 -5
  67. package/dist/components/LineGraph/LineGraph.js.map +1 -1
  68. package/dist/components/LineGraph/LineGraph.mjs +5 -6
  69. package/dist/components/LineGraph/LineGraph.mjs.map +1 -1
  70. package/dist/components/LineGraph/LineGraph.types.d.ts +12 -2
  71. package/dist/components/LineGraph/LineGraph.types.d.ts.map +1 -1
  72. package/dist/components/LineGraph/seriesColors.d.ts +12 -8
  73. package/dist/components/LineGraph/seriesColors.d.ts.map +1 -1
  74. package/dist/components/LineGraph/seriesColors.js +8 -7
  75. package/dist/components/LineGraph/seriesColors.js.map +1 -1
  76. package/dist/components/LineGraph/seriesColors.mjs +8 -7
  77. package/dist/components/LineGraph/seriesColors.mjs.map +1 -1
  78. package/dist/components/Masonry/Masonry.types.d.ts +8 -3
  79. package/dist/components/Masonry/Masonry.types.d.ts.map +1 -1
  80. package/dist/components/Menu/MenuItem.types.d.ts +8 -0
  81. package/dist/components/Menu/MenuItem.types.d.ts.map +1 -1
  82. package/dist/components/Modal/ModalCloseButton.d.ts +1 -1
  83. package/dist/components/Modal/ModalCloseButton.js +1 -1
  84. package/dist/components/Modal/ModalCloseButton.mjs +1 -1
  85. package/dist/components/NavList/NavList.d.ts +35 -0
  86. package/dist/components/NavList/NavList.d.ts.map +1 -0
  87. package/dist/components/NavList/NavList.js +113 -0
  88. package/dist/components/NavList/NavList.js.map +1 -0
  89. package/dist/components/NavList/NavList.mjs +111 -0
  90. package/dist/components/NavList/NavList.mjs.map +1 -0
  91. package/dist/components/NavList/NavList.styles.d.ts +90 -0
  92. package/dist/components/NavList/NavList.styles.d.ts.map +1 -0
  93. package/dist/components/NavList/NavList.styles.js +104 -0
  94. package/dist/components/NavList/NavList.styles.js.map +1 -0
  95. package/dist/components/NavList/NavList.styles.mjs +97 -0
  96. package/dist/components/NavList/NavList.styles.mjs.map +1 -0
  97. package/dist/components/NavList/NavList.translations.json.js +19 -0
  98. package/dist/components/NavList/NavList.translations.json.js.map +1 -0
  99. package/dist/components/NavList/NavList.translations.json.mjs +14 -0
  100. package/dist/components/NavList/NavList.translations.json.mjs.map +1 -0
  101. package/dist/components/NavList/NavList.types.d.ts +140 -0
  102. package/dist/components/NavList/NavList.types.d.ts.map +1 -0
  103. package/dist/components/NavList/NavListContext.d.ts +30 -0
  104. package/dist/components/NavList/NavListContext.d.ts.map +1 -0
  105. package/dist/components/NavList/NavListContext.js +16 -0
  106. package/dist/components/NavList/NavListContext.js.map +1 -0
  107. package/dist/components/NavList/NavListContext.mjs +13 -0
  108. package/dist/components/NavList/NavListContext.mjs.map +1 -0
  109. package/dist/components/NavList/NavListGroup.d.ts +31 -0
  110. package/dist/components/NavList/NavListGroup.d.ts.map +1 -0
  111. package/dist/components/NavList/NavListGroup.js +115 -0
  112. package/dist/components/NavList/NavListGroup.js.map +1 -0
  113. package/dist/components/NavList/NavListGroup.mjs +113 -0
  114. package/dist/components/NavList/NavListGroup.mjs.map +1 -0
  115. package/dist/components/NavList/NavListItem.d.ts +16 -0
  116. package/dist/components/NavList/NavListItem.d.ts.map +1 -0
  117. package/dist/components/NavList/NavListItem.js +284 -0
  118. package/dist/components/NavList/NavListItem.js.map +1 -0
  119. package/dist/components/NavList/NavListItem.mjs +282 -0
  120. package/dist/components/NavList/NavListItem.mjs.map +1 -0
  121. package/dist/components/NavList/NavListSkeleton.d.ts +17 -0
  122. package/dist/components/NavList/NavListSkeleton.d.ts.map +1 -0
  123. package/dist/components/NavList/NavListSkeleton.js +33 -0
  124. package/dist/components/NavList/NavListSkeleton.js.map +1 -0
  125. package/dist/components/NavList/NavListSkeleton.mjs +31 -0
  126. package/dist/components/NavList/NavListSkeleton.mjs.map +1 -0
  127. package/dist/components/NavList/index.d.ts +7 -0
  128. package/dist/components/NavList/index.d.ts.map +1 -0
  129. package/dist/components/Pagination/Pagination.d.ts +11 -10
  130. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  131. package/dist/components/Pagination/Pagination.js +11 -10
  132. package/dist/components/Pagination/Pagination.js.map +1 -1
  133. package/dist/components/Pagination/Pagination.mjs +11 -10
  134. package/dist/components/Pagination/Pagination.mjs.map +1 -1
  135. package/dist/components/ProgressBar/ProgressBar.types.d.ts +9 -0
  136. package/dist/components/ProgressBar/ProgressBar.types.d.ts.map +1 -1
  137. package/dist/components/RadialProgress/RadialProgress.types.d.ts +21 -1
  138. package/dist/components/RadialProgress/RadialProgress.types.d.ts.map +1 -1
  139. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts +8 -0
  140. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts.map +1 -1
  141. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  142. package/dist/components/SegmentedControl/SegmentedControl.js +6 -7
  143. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
  144. package/dist/components/SegmentedControl/SegmentedControl.mjs +6 -7
  145. package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  146. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts +2 -0
  147. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts.map +1 -1
  148. package/dist/components/Select/Combobox.d.ts +1 -1
  149. package/dist/components/Select/Combobox.d.ts.map +1 -1
  150. package/dist/components/Select/Combobox.js +9 -2
  151. package/dist/components/Select/Combobox.js.map +1 -1
  152. package/dist/components/Select/Combobox.mjs +10 -3
  153. package/dist/components/Select/Combobox.mjs.map +1 -1
  154. package/dist/components/Select/Select.d.ts +1 -1
  155. package/dist/components/Select/Select.d.ts.map +1 -1
  156. package/dist/components/Select/Select.js +14 -2
  157. package/dist/components/Select/Select.js.map +1 -1
  158. package/dist/components/Select/Select.mjs +15 -3
  159. package/dist/components/Select/Select.mjs.map +1 -1
  160. package/dist/components/Select/Select.styles.d.ts +97 -1
  161. package/dist/components/Select/Select.styles.d.ts.map +1 -1
  162. package/dist/components/Select/Select.styles.js +83 -0
  163. package/dist/components/Select/Select.styles.js.map +1 -1
  164. package/dist/components/Select/Select.styles.mjs +82 -1
  165. package/dist/components/Select/Select.styles.mjs.map +1 -1
  166. package/dist/components/Tabs/Tab/Tab.styles.d.ts +1 -1
  167. package/dist/components/Tabs/Tab/Tab.styles.js +1 -1
  168. package/dist/components/Tabs/Tab/Tab.styles.mjs +1 -1
  169. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  170. package/dist/components/Textarea/Textarea.js +4 -0
  171. package/dist/components/Textarea/Textarea.js.map +1 -1
  172. package/dist/components/Textarea/Textarea.mjs +4 -0
  173. package/dist/components/Textarea/Textarea.mjs.map +1 -1
  174. package/dist/components/Toast/Toast.styles.d.ts +6 -2
  175. package/dist/components/Toast/Toast.styles.d.ts.map +1 -1
  176. package/dist/components/Toast/Toast.styles.js +18 -10
  177. package/dist/components/Toast/Toast.styles.js.map +1 -1
  178. package/dist/components/Toast/Toast.styles.mjs +18 -10
  179. package/dist/components/Toast/Toast.styles.mjs.map +1 -1
  180. package/dist/components/Typography/Caption.d.ts.map +1 -1
  181. package/dist/components/Typography/Caption.js +1 -1
  182. package/dist/components/Typography/Caption.js.map +1 -1
  183. package/dist/components/Typography/Caption.mjs +1 -1
  184. package/dist/components/Typography/Caption.mjs.map +1 -1
  185. package/dist/components/Typography/H1.d.ts.map +1 -1
  186. package/dist/components/Typography/H1.js +1 -1
  187. package/dist/components/Typography/H1.js.map +1 -1
  188. package/dist/components/Typography/H1.mjs +1 -1
  189. package/dist/components/Typography/H1.mjs.map +1 -1
  190. package/dist/components/Typography/H2.d.ts.map +1 -1
  191. package/dist/components/Typography/H2.js +1 -1
  192. package/dist/components/Typography/H2.js.map +1 -1
  193. package/dist/components/Typography/H2.mjs +1 -1
  194. package/dist/components/Typography/H2.mjs.map +1 -1
  195. package/dist/components/Typography/H3.d.ts.map +1 -1
  196. package/dist/components/Typography/H3.js +1 -1
  197. package/dist/components/Typography/H3.js.map +1 -1
  198. package/dist/components/Typography/H3.mjs +1 -1
  199. package/dist/components/Typography/H3.mjs.map +1 -1
  200. package/dist/components/Typography/H4.d.ts.map +1 -1
  201. package/dist/components/Typography/H4.js +1 -1
  202. package/dist/components/Typography/H4.js.map +1 -1
  203. package/dist/components/Typography/H4.mjs +1 -1
  204. package/dist/components/Typography/H4.mjs.map +1 -1
  205. package/dist/components/Typography/H5.d.ts.map +1 -1
  206. package/dist/components/Typography/H5.js +1 -1
  207. package/dist/components/Typography/H5.js.map +1 -1
  208. package/dist/components/Typography/H5.mjs +1 -1
  209. package/dist/components/Typography/H5.mjs.map +1 -1
  210. package/dist/components/Typography/Link.d.ts.map +1 -1
  211. package/dist/components/Typography/Link.js +1 -1
  212. package/dist/components/Typography/Link.js.map +1 -1
  213. package/dist/components/Typography/Link.mjs +1 -1
  214. package/dist/components/Typography/Link.mjs.map +1 -1
  215. package/dist/components/Typography/Overline.d.ts.map +1 -1
  216. package/dist/components/Typography/Overline.js +1 -1
  217. package/dist/components/Typography/Overline.js.map +1 -1
  218. package/dist/components/Typography/Overline.mjs +1 -1
  219. package/dist/components/Typography/Overline.mjs.map +1 -1
  220. package/dist/components/Typography/Subtext.d.ts.map +1 -1
  221. package/dist/components/Typography/Subtext.js +1 -1
  222. package/dist/components/Typography/Subtext.js.map +1 -1
  223. package/dist/components/Typography/Subtext.mjs +1 -1
  224. package/dist/components/Typography/Subtext.mjs.map +1 -1
  225. package/dist/components/Typography/Subtitle.d.ts.map +1 -1
  226. package/dist/components/Typography/Subtitle.js +1 -1
  227. package/dist/components/Typography/Subtitle.js.map +1 -1
  228. package/dist/components/Typography/Subtitle.mjs +1 -1
  229. package/dist/components/Typography/Subtitle.mjs.map +1 -1
  230. package/dist/components/Typography/Text.d.ts.map +1 -1
  231. package/dist/components/Typography/Text.js +1 -1
  232. package/dist/components/Typography/Text.js.map +1 -1
  233. package/dist/components/Typography/Text.mjs +1 -1
  234. package/dist/components/Typography/Text.mjs.map +1 -1
  235. package/dist/hooks/useLanguage.d.ts +5 -0
  236. package/dist/hooks/useLanguage.d.ts.map +1 -1
  237. package/dist/hooks/useLanguage.js +7 -3
  238. package/dist/hooks/useLanguage.js.map +1 -1
  239. package/dist/hooks/useLanguage.mjs +7 -4
  240. package/dist/hooks/useLanguage.mjs.map +1 -1
  241. package/dist/hooks/useTranslate.d.ts.map +1 -1
  242. package/dist/hooks/useTranslate.js +8 -5
  243. package/dist/hooks/useTranslate.js.map +1 -1
  244. package/dist/hooks/useTranslate.mjs +8 -5
  245. package/dist/hooks/useTranslate.mjs.map +1 -1
  246. package/dist/index.d.ts +2 -1
  247. package/dist/index.d.ts.map +1 -1
  248. package/dist/index.js +13 -0
  249. package/dist/index.js.map +1 -1
  250. package/dist/index.mjs +7 -2
  251. package/dist/index.mjs.map +1 -1
  252. package/dist/theme/colors.d.ts +2 -2
  253. package/dist/theme/colors.d.ts.map +1 -1
  254. package/dist/theme/colors.js +54 -18
  255. package/dist/theme/colors.js.map +1 -1
  256. package/dist/theme/colors.mjs +55 -19
  257. package/dist/theme/colors.mjs.map +1 -1
  258. package/dist/theme/global.d.ts.map +1 -1
  259. package/dist/theme/global.js +19 -1
  260. package/dist/theme/global.js.map +1 -1
  261. package/dist/theme/global.mjs +19 -1
  262. package/dist/theme/global.mjs.map +1 -1
  263. package/dist/theme/index.d.ts.map +1 -1
  264. package/dist/theme/index.js +2 -0
  265. package/dist/theme/index.js.map +1 -1
  266. package/dist/theme/index.mjs +2 -0
  267. package/dist/theme/index.mjs.map +1 -1
  268. package/dist/theme/palette.generated.d.ts +232 -123
  269. package/dist/theme/palette.generated.d.ts.map +1 -1
  270. package/dist/theme/palette.generated.js +233 -123
  271. package/dist/theme/palette.generated.js.map +1 -1
  272. package/dist/theme/palette.generated.mjs +233 -124
  273. package/dist/theme/palette.generated.mjs.map +1 -1
  274. package/dist/theme/paletteSwatches.d.ts +20 -0
  275. package/dist/theme/paletteSwatches.d.ts.map +1 -1
  276. package/dist/theme/recipes/avatar.d.ts +30 -0
  277. package/dist/theme/recipes/avatar.d.ts.map +1 -0
  278. package/dist/theme/recipes/avatar.js +96 -0
  279. package/dist/theme/recipes/avatar.js.map +1 -0
  280. package/dist/theme/recipes/avatar.mjs +94 -0
  281. package/dist/theme/recipes/avatar.mjs.map +1 -0
  282. package/dist/translations/Defaults.translations.json.js +19 -1
  283. package/dist/translations/Defaults.translations.json.js.map +1 -1
  284. package/dist/translations/Defaults.translations.json.mjs +18 -2
  285. package/dist/translations/Defaults.translations.json.mjs.map +1 -1
  286. package/dist/utils/disabledControl.d.ts +8 -1
  287. package/dist/utils/disabledControl.d.ts.map +1 -1
  288. package/dist/utils/disabledControl.js +8 -1
  289. package/dist/utils/disabledControl.js.map +1 -1
  290. package/dist/utils/disabledControl.mjs +8 -1
  291. package/dist/utils/disabledControl.mjs.map +1 -1
  292. package/dist/utils/focusRing.d.ts +22 -0
  293. package/dist/utils/focusRing.d.ts.map +1 -1
  294. package/dist/utils/focusRing.js +22 -0
  295. package/dist/utils/focusRing.js.map +1 -1
  296. package/dist/utils/focusRing.mjs +21 -1
  297. package/dist/utils/focusRing.mjs.map +1 -1
  298. package/package.json +2 -1
  299. package/src/components/Accordion/Accordion.stories.tsx +85 -0
  300. package/src/components/Accordion/Accordion.usage.mdx +200 -0
  301. package/src/components/Appear/Appear.usage.mdx +107 -0
  302. package/src/components/Avatar/Avatar.recipe.test.tsx +176 -0
  303. package/src/components/Avatar/Avatar.stories.tsx +199 -24
  304. package/src/components/Avatar/Avatar.tsx +118 -21
  305. package/src/components/Avatar/Avatar.usage.mdx +185 -0
  306. package/src/components/Avatar/index.tsx +8 -1
  307. package/src/components/Badge/Badge.stories.tsx +193 -3
  308. package/src/components/Badge/Badge.tsx +5 -3
  309. package/src/components/Badge/Badge.types.ts +7 -5
  310. package/src/components/Badge/Badge.usage.mdx +265 -0
  311. package/src/components/Banner/Banner.stories.tsx +152 -2
  312. package/src/components/Banner/Banner.types.ts +30 -1
  313. package/src/components/Banner/Banner.usage.mdx +233 -0
  314. package/src/components/BottomSheet/BottomSheet.stories.tsx +168 -1
  315. package/src/components/BottomSheet/BottomSheet.test.tsx +2 -1
  316. package/src/components/BottomSheet/BottomSheet.usage.mdx +216 -0
  317. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +59 -0
  318. package/src/components/Breadcrumb/Breadcrumb.usage.mdx +181 -0
  319. package/src/components/Button/Button.focusableWhenDisabled.test.tsx +218 -0
  320. package/src/components/Button/Button.stories.tsx +332 -3
  321. package/src/components/Button/Button.tsx +46 -3
  322. package/src/components/Button/Button.types.ts +38 -1
  323. package/src/components/Button/Button.usage.mdx +358 -0
  324. package/src/components/Button/Button.variants.test.tsx +13 -1
  325. package/src/components/Card/Card.stories.tsx +106 -0
  326. package/src/components/Card/Card.types.ts +12 -0
  327. package/src/components/Card/Card.usage.mdx +216 -0
  328. package/src/components/Checkbox/Checkbox.stories.tsx +140 -13
  329. package/src/components/Checkbox/Checkbox.usage.mdx +214 -0
  330. package/src/components/Chip/Chip.usage.mdx +78 -0
  331. package/src/components/Code/Code.stories.tsx +60 -0
  332. package/src/components/Code/Code.usage.mdx +187 -0
  333. package/src/components/CodeTabs/CodeTabs.stories.tsx +53 -0
  334. package/src/components/CodeTabs/CodeTabs.styles.ts +6 -5
  335. package/src/components/CodeTabs/CodeTabs.usage.mdx +176 -0
  336. package/src/components/Collapsible/Collapsible.stories.tsx +58 -0
  337. package/src/components/Collapsible/Collapsible.usage.mdx +173 -0
  338. package/src/components/ColorMode/ColorMode.stories.tsx +50 -0
  339. package/src/components/ColorMode/ColorMode.usage.mdx +135 -0
  340. package/src/components/ColorMode/ColorModeToggle.tsx +10 -3
  341. package/src/components/Confetti/Confetti.types.ts +5 -1
  342. package/src/components/Confetti/Confetti.usage.mdx +111 -0
  343. package/src/components/Confetti/confettiColors.ts +5 -5
  344. package/src/components/Container/Container.stories.tsx +32 -0
  345. package/src/components/Container/Container.usage.mdx +130 -0
  346. package/src/components/CopyableCode/CopyableCode.stories.tsx +62 -0
  347. package/src/components/CopyableCode/CopyableCode.usage.mdx +168 -0
  348. package/src/components/CountBadge/CountBadge.stories.tsx +69 -0
  349. package/src/components/CountBadge/CountBadge.usage.mdx +215 -0
  350. package/src/components/CountUp/CountUp.usage.mdx +107 -0
  351. package/src/components/DatePicker/DatePicker.usage.mdx +177 -0
  352. package/src/components/DatePicker/RangeDatePicker.stories.tsx +87 -3
  353. package/src/components/ErrorFallback/ErrorFallback.types.ts +6 -0
  354. package/src/components/ErrorFallback/ErrorFallback.usage.mdx +127 -0
  355. package/src/components/ExpandableText/ExpandableText.stories.tsx +55 -0
  356. package/src/components/ExpandableText/ExpandableText.usage.mdx +176 -0
  357. package/src/components/FileInput/FileInput.stories.tsx +38 -1
  358. package/src/components/FileInput/FileInput.usage.mdx +178 -0
  359. package/src/components/FileItem/FileItem.stories.tsx +71 -0
  360. package/src/components/FileItem/FileItem.usage.mdx +180 -0
  361. package/src/components/FileList/FileList.stories.tsx +25 -0
  362. package/src/components/FileList/FileList.usage.mdx +165 -0
  363. package/src/components/FlyTo/FlyTo.usage.mdx +99 -0
  364. package/src/components/Form/Form.stories.tsx +149 -0
  365. package/src/components/Form/Form.usage.mdx +203 -0
  366. package/src/components/Form/FormModalFooter/FormModalFooter.stories.tsx +1 -1
  367. package/src/components/Form/FormModalFooter/FormModalFooter.test.tsx +19 -1
  368. package/src/components/Form/FormModalFooter/FormModalFooter.tsx +2 -0
  369. package/src/components/Form/FormModalFooter/FormModalFooter.types.ts +11 -1
  370. package/src/components/FormControl/FormControl.stories.tsx +35 -0
  371. package/src/components/FormControl/FormControl.usage.mdx +128 -0
  372. package/src/components/FormIntegration/FormIntegration.usage.mdx +158 -0
  373. package/src/components/FormLabel/FormLabel.stories.tsx +71 -0
  374. package/src/components/FormLabel/FormLabel.usage.mdx +125 -0
  375. package/src/components/Icon/Icon.stories.tsx +61 -1
  376. package/src/components/Icon/Icon.usage.mdx +158 -0
  377. package/src/components/IconButton/IconButton.stories.tsx +213 -5
  378. package/src/components/IconButton/IconButton.usage.mdx +275 -0
  379. package/src/components/InfoSprinkle/InfoSprinkle.stories.tsx +77 -1
  380. package/src/components/InfoSprinkle/InfoSprinkle.usage.mdx +189 -0
  381. package/src/components/InlineCode/InlineCode.stories.tsx +75 -0
  382. package/src/components/InlineCode/InlineCode.usage.mdx +142 -0
  383. package/src/components/Input/Input.stories.tsx +180 -0
  384. package/src/components/Input/Input.tsx +4 -0
  385. package/src/components/Input/Input.usage.mdx +278 -0
  386. package/src/components/LineGraph/LineGraph.stories.tsx +112 -0
  387. package/src/components/LineGraph/LineGraph.tsx +4 -5
  388. package/src/components/LineGraph/LineGraph.types.ts +12 -2
  389. package/src/components/LineGraph/LineGraph.usage.mdx +186 -0
  390. package/src/components/LineGraph/seriesColors.test.ts +10 -9
  391. package/src/components/LineGraph/seriesColors.ts +18 -16
  392. package/src/components/Loaders/Loaders.stories.tsx +93 -0
  393. package/src/components/Loaders/Loaders.usage.mdx +180 -0
  394. package/src/components/LogicianProvider/LogicianProvider.usage.mdx +98 -0
  395. package/src/components/Markdown/Markdown.stories.tsx +53 -0
  396. package/src/components/Markdown/Markdown.usage.mdx +182 -0
  397. package/src/components/Masonry/Masonry.stories.tsx +63 -1
  398. package/src/components/Masonry/Masonry.types.ts +8 -3
  399. package/src/components/Masonry/Masonry.usage.mdx +142 -0
  400. package/src/components/MaxLengthIndicator/MaxLengthIndicator.stories.tsx +57 -0
  401. package/src/components/MaxLengthIndicator/MaxLengthIndicator.usage.mdx +125 -0
  402. package/src/components/Menu/Menu.stories.tsx +146 -2
  403. package/src/components/Menu/Menu.usage.mdx +238 -0
  404. package/src/components/Menu/MenuItem.types.ts +8 -0
  405. package/src/components/Modal/Modal.stories.tsx +177 -1
  406. package/src/components/Modal/Modal.usage.mdx +262 -0
  407. package/src/components/Modal/ModalCloseButton.tsx +1 -1
  408. package/src/components/MonthPicker/MonthPicker.stories.tsx +30 -0
  409. package/src/components/MonthPicker/MonthPicker.usage.mdx +191 -0
  410. package/src/components/NavList/NavList.stories.tsx +927 -0
  411. package/src/components/NavList/NavList.styles.ts +114 -0
  412. package/src/components/NavList/NavList.test.tsx +1306 -0
  413. package/src/components/NavList/NavList.translations.json +9 -0
  414. package/src/components/NavList/NavList.tsx +160 -0
  415. package/src/components/NavList/NavList.types.ts +155 -0
  416. package/src/components/NavList/NavList.usage.mdx +545 -0
  417. package/src/components/NavList/NavListContext.ts +25 -0
  418. package/src/components/NavList/NavListGroup.tsx +243 -0
  419. package/src/components/NavList/NavListItem.tsx +543 -0
  420. package/src/components/NavList/NavListSkeleton.tsx +57 -0
  421. package/src/components/NavList/index.ts +15 -0
  422. package/src/components/Pagination/Pagination.stories.tsx +90 -1
  423. package/src/components/Pagination/Pagination.tsx +11 -10
  424. package/src/components/Pagination/Pagination.usage.mdx +186 -0
  425. package/src/components/PasswordInput/PasswordInput.stories.tsx +51 -0
  426. package/src/components/PasswordInput/PasswordInput.usage.mdx +193 -0
  427. package/src/components/PinInput/PinInput.stories.tsx +91 -0
  428. package/src/components/PinInput/PinInput.usage.mdx +194 -0
  429. package/src/components/Popover/Popover.stories.tsx +104 -1
  430. package/src/components/Popover/Popover.usage.mdx +197 -0
  431. package/src/components/ProgressBar/ProgressBar.stories.tsx +92 -1
  432. package/src/components/ProgressBar/ProgressBar.types.ts +9 -0
  433. package/src/components/ProgressBar/ProgressBar.usage.mdx +210 -0
  434. package/src/components/Pulse/Pulse.usage.mdx +102 -0
  435. package/src/components/RadialProgress/RadialProgress.stories.tsx +74 -1
  436. package/src/components/RadialProgress/RadialProgress.types.ts +21 -1
  437. package/src/components/RadialProgress/RadialProgress.usage.mdx +153 -0
  438. package/src/components/Radio/Radio.stories.tsx +119 -0
  439. package/src/components/Radio/Radio.usage.mdx +187 -0
  440. package/src/components/Reveal/Reveal.usage.mdx +105 -0
  441. package/src/components/ScaledContext/ScaledContext.usage.mdx +111 -0
  442. package/src/components/SeeMoreButton/SeeMoreButton.stories.tsx +146 -2
  443. package/src/components/SeeMoreButton/SeeMoreButton.types.ts +8 -0
  444. package/src/components/SeeMoreButton/SeeMoreButton.usage.mdx +213 -0
  445. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +69 -0
  446. package/src/components/SegmentedControl/SegmentedControl.tsx +6 -7
  447. package/src/components/SegmentedControl/SegmentedControl.usage.mdx +209 -0
  448. package/src/components/SegmentedProgressBar/SegmentedProgressBar.stories.tsx +54 -0
  449. package/src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts +2 -0
  450. package/src/components/SegmentedProgressBar/SegmentedProgressBar.usage.mdx +145 -0
  451. package/src/components/Select/Combobox.tsx +28 -3
  452. package/src/components/Select/Select.clearTrigger.test.tsx +76 -0
  453. package/src/components/Select/Select.stories.tsx +290 -1
  454. package/src/components/Select/Select.styles.ts +89 -0
  455. package/src/components/Select/Select.tsx +28 -2
  456. package/src/components/Select/Select.usage.mdx +341 -0
  457. package/src/components/Shake/Shake.usage.mdx +107 -0
  458. package/src/components/Slider/Slider.stories.tsx +116 -0
  459. package/src/components/Slider/Slider.usage.mdx +179 -0
  460. package/src/components/Spinner/Spinner.stories.tsx +64 -0
  461. package/src/components/Spinner/Spinner.usage.mdx +136 -0
  462. package/src/components/SwapTransition/SwapTransition.usage.mdx +102 -0
  463. package/src/components/Switch/Switch.stories.tsx +131 -6
  464. package/src/components/Switch/Switch.usage.mdx +199 -0
  465. package/src/components/Table/Table.stories.tsx +159 -1
  466. package/src/components/Table/Table.usage.mdx +235 -0
  467. package/src/components/Tabs/Tab/Tab.styles.ts +1 -1
  468. package/src/components/Tabs/Tabs.stories.tsx +86 -0
  469. package/src/components/Tabs/Tabs.usage.mdx +263 -0
  470. package/src/components/Tag/Tag.stories.tsx +181 -4
  471. package/src/components/Tag/Tag.usage.mdx +257 -0
  472. package/src/components/Textarea/Textarea.stories.tsx +113 -0
  473. package/src/components/Textarea/Textarea.tsx +4 -0
  474. package/src/components/Textarea/Textarea.usage.mdx +186 -0
  475. package/src/components/Toast/Toast.stories.tsx +185 -3
  476. package/src/components/Toast/Toast.styles.ts +18 -10
  477. package/src/components/Toast/Toast.usage.mdx +265 -0
  478. package/src/components/Tooltip/Tooltip.stories.tsx +86 -1
  479. package/src/components/Tooltip/Tooltip.usage.mdx +219 -0
  480. package/src/components/Tree/Tree.stories.tsx +89 -0
  481. package/src/components/Tree/Tree.usage.mdx +207 -0
  482. package/src/components/Typography/Caption.tsx +0 -1
  483. package/src/components/Typography/H1.tsx +0 -1
  484. package/src/components/Typography/H2.tsx +0 -1
  485. package/src/components/Typography/H3.tsx +0 -1
  486. package/src/components/Typography/H4.tsx +0 -1
  487. package/src/components/Typography/H5.tsx +0 -1
  488. package/src/components/Typography/Link.tsx +0 -1
  489. package/src/components/Typography/Overline.tsx +0 -1
  490. package/src/components/Typography/Subtext.tsx +0 -1
  491. package/src/components/Typography/Subtitle.tsx +0 -1
  492. package/src/components/Typography/Text.tsx +0 -1
  493. package/src/components/Typography/Typography.stories.tsx +117 -0
  494. package/src/components/Typography/Typography.usage.mdx +257 -0
  495. package/src/components/Workflow/Workflow.usage.mdx +199 -0
  496. package/src/components/a11y.kwcag.test.tsx +66 -0
  497. package/src/components/claude.md +1 -1
  498. package/src/components/noRawScales.test.ts +5 -1
  499. package/src/foundations/BrandAssets.mdx +637 -0
  500. package/src/foundations/BrandAssets.stories.tsx +680 -0
  501. package/src/foundations/BrandColour.mdx +366 -0
  502. package/src/foundations/BrandColour.stories.tsx +343 -0
  503. package/src/guidelines/ComponentPageTemplate.mdx +84 -0
  504. package/src/guidelines/FeedbackActions.mdx +162 -23
  505. package/src/guidelines/_components/Lang.tsx +175 -0
  506. package/src/guidelines/_components/TokenTable.tsx +136 -0
  507. package/src/hooks/useLanguage.ts +8 -3
  508. package/src/hooks/useTranslate.test.tsx +46 -0
  509. package/src/hooks/useTranslate.ts +7 -5
  510. package/src/index.ts +7 -1
  511. package/src/theme/BazePalette.stories.tsx +111 -1
  512. package/src/theme/Palette.stories.tsx +2 -2
  513. package/src/theme/SemanticTokens.mdx +76 -17
  514. package/src/theme/claude.md +23 -9
  515. package/src/theme/colors.ts +71 -18
  516. package/src/theme/contrast.test.ts +57 -0
  517. package/src/theme/global.ts +20 -1
  518. package/src/theme/index.ts +2 -0
  519. package/src/theme/palette.generated.ts +233 -123
  520. package/src/theme/paletteSwatches.test.ts +1 -1
  521. package/src/theme/paletteSwatches.ts +35 -0
  522. package/src/theme/recipes/avatar.ts +92 -0
  523. package/src/translations/Defaults.translations.json +14 -0
  524. package/src/utils/disabledControl.ts +8 -1
  525. package/src/utils/focusRing.ts +23 -0
@@ -2,8 +2,37 @@ import { BoxProps } from '@chakra-ui/react';
2
2
 
3
3
  export type BannerSize = 'sm' | 'md' | 'lg';
4
4
 
5
+ /**
6
+ * Banner variants (5.0).
7
+ *
8
+ * - `info` (default): a system fact the reader should know before acting
9
+ * (a setting that is locked, where a value comes from). Nothing is wrong.
10
+ * - `success`: something finished and the result stays relevant on this
11
+ * screen.
12
+ * - `warning`: it still works, but read this first (irreversible step,
13
+ * something expiring).
14
+ * - `danger`: it failed or is blocked, and the reader has to do something.
15
+ * - `neutral`: a brand notice with no status (`primary.main` accent bar).
16
+ */
17
+ export type BannerVariant =
18
+ | 'info'
19
+ | 'success'
20
+ | 'warning'
21
+ | 'danger'
22
+ | 'neutral';
23
+
5
24
  export interface BannerProps extends BoxProps {
6
- variant?: 'info' | 'success' | 'warning' | 'danger' | 'neutral';
25
+ /**
26
+ * Meaning of the message. Status variants only for a status every reader
27
+ * shares; `neutral` for a notice with none.
28
+ * @default 'info'
29
+ */
30
+ variant?: BannerVariant;
31
+ /** Hide the leading status icon. The text must still say the status. */
7
32
  hideIcon?: boolean;
33
+ /**
34
+ * `sm` = subtext, `md` = body text, `lg` = h5 text style.
35
+ * @default 'md'
36
+ */
8
37
  size?: BannerSize;
9
38
  }
@@ -0,0 +1,233 @@
1
+ import { ArgTypes, Canvas, Meta } from '@storybook/blocks';
2
+
3
+ import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
4
+ import * as BannerStories from './Banner.stories';
5
+
6
+ <Meta of={BannerStories} name="Usage" />
7
+
8
+ <LangToggle />
9
+
10
+ <En>
11
+
12
+ # Banner
13
+
14
+ An inline message that stays on the page, next to the thing it is about, until
15
+ the condition behind it changes.
16
+
17
+ ## When to use
18
+
19
+ - To warn before an action the reader is about to take: an irreversible step,
20
+ something about to expire.
21
+ - To state a system fact that shapes what the reader can do here: a setting
22
+ that is locked, a limit, where a value comes from.
23
+ - To report a failure that blocks the form or section, with what to do next.
24
+
25
+ ## When not to use
26
+
27
+ - The message only confirms that something just happened ("Saved") → `Toast`.
28
+ - A short status attached to one item → `Badge`.
29
+ - An error about one field → the field's own error text (`FormControl`).
30
+ - The whole page failed to render → `ErrorFallback`.
31
+ - An explanation the reader asks for → `InfoSprinkle` or `Tooltip`.
32
+
33
+ ## Variants and what they mean
34
+
35
+ </En>
36
+
37
+ <Ko>
38
+
39
+ # Banner
40
+
41
+ 관련된 내용 바로 옆에 붙어서, 원인이 해결될 때까지 화면에 남아 있는 안내
42
+ 문구입니다.
43
+
44
+ ## 언제 쓰나요
45
+
46
+ - 되돌릴 수 없는 작업이나 곧 만료되는 항목처럼, 사용자가 하려는 일 앞에서 주의를
47
+ 줄 때.
48
+ - 잠긴 설정, 한도, 값의 출처처럼 이 화면에서 할 수 있는 일을 정하는 시스템 사실을
49
+ 알릴 때.
50
+ - 폼이나 영역 전체를 막는 실패를 알리고, 다음에 할 일을 함께 적을 때.
51
+
52
+ ## 언제 쓰지 않나요
53
+
54
+ - 방금 끝난 일을 확인만 해 준다면("저장했습니다") `Toast`를 씁니다.
55
+ - 항목 하나에 붙는 짧은 상태는 `Badge`를 씁니다.
56
+ - 입력란 하나의 오류는 그 입력란의 오류 문구(`FormControl`)로 알립니다.
57
+ - 페이지 전체를 그리지 못했다면 `ErrorFallback`을 씁니다.
58
+ - 사용자가 찾아보는 설명은 `InfoSprinkle`이나 `Tooltip`을 씁니다.
59
+
60
+ ## 변형과 뜻
61
+
62
+ </Ko>
63
+
64
+ <ArgTypes of={BannerStories} include={['variant', 'size', 'hideIcon']} />
65
+
66
+ <En>
67
+
68
+ | Variant | Means | Use for |
69
+ | --- | --- | --- |
70
+ | `info` (default) | A system fact to know before acting; nothing is wrong | Locked setting, scope, where a value comes from |
71
+ | `success` | Finished, and the result stays relevant on this screen | A connection that is now live |
72
+ | `warning` | Still works, but read this first | Irreversible step, expiring credit |
73
+ | `danger` | Failed or blocked; the reader has to act | Load failure, over a limit, submit error |
74
+ | `neutral` | A brand notice with no status | Announcements |
75
+
76
+ Use `size="sm"` inside cards, dialogs and forms; `md` (default) at the top of a
77
+ page section. Banner adds `my={2}`; pass `my={0}` when the parent already sets
78
+ the gap.
79
+
80
+ ## Do / Don't
81
+
82
+ </En>
83
+
84
+ <Ko>
85
+
86
+ | 변형 | 뜻 | 예 |
87
+ | --- | --- | --- |
88
+ | `info` (기본) | 작업 전에 알아야 할 시스템 사실이며, 문제가 있다는 뜻은 아님 | 잠긴 설정, 적용 범위, 값의 출처 |
89
+ | `success` | 끝났고, 그 결과가 이 화면에서 계속 의미가 있음 | 연결이 활성화됨 |
90
+ | `warning` | 동작은 하지만 먼저 읽어야 함 | 되돌릴 수 없는 작업, 만료 임박 크레딧 |
91
+ | `danger` | 실패했거나 막혔고, 사용자가 무언가 해야 함 | 불러오기 실패, 한도 초과, 저장 오류 |
92
+ | `neutral` | 상태가 없는 브랜드 공지 | 공지 |
93
+
94
+ 카드, 대화상자, 폼 안에서는 `size="sm"`을, 페이지 영역 맨 위에서는 기본값 `md`를
95
+ 씁니다. Banner에는 `my={2}`가 들어 있으니, 부모가 이미 간격을 정한다면
96
+ `my={0}`을 넘깁니다.
97
+
98
+ ## 이렇게 하세요 / 이렇게 하지 마세요
99
+
100
+ </Ko>
101
+
102
+ <Canvas of={BannerStories.DoWarningBeforeAction} />
103
+ <Verdict
104
+ kind="do"
105
+ en="Put a warning right above the action it is about, inside the same panel."
106
+ ko="주의 문구는 관련된 버튼 바로 위, 같은 패널 안에 둡니다."
107
+ />
108
+
109
+ <Canvas of={BannerStories.DontBannerForTransientSuccess} />
110
+ <Verdict
111
+ kind="dont"
112
+ en="Leave a success banner on the page after a save. It is out of date the moment the reader edits again. Confirm with a Toast."
113
+ ko="저장한 뒤 성공 배너를 화면에 남겨 두지 마세요. 다시 고치는 순간 맞지 않는 말이 됩니다. 확인은 Toast로 합니다."
114
+ />
115
+
116
+ <Canvas of={BannerStories.DoInfoForLockedSetting} />
117
+ <Verdict
118
+ kind="do"
119
+ en="Use info to explain why a setting cannot change. Nothing is wrong, so it is not a warning."
120
+ ko="설정을 바꿀 수 없는 이유는 info로 알립니다. 문제가 생긴 것이 아니므로 warning이 아닙니다."
121
+ />
122
+
123
+ <Canvas of={BannerStories.DontStackBanners} />
124
+ <Verdict
125
+ kind="dont"
126
+ en="Stack several banners. The reader stops reading after the first. Keep the one that blocks the next step and move the rest to where they apply."
127
+ ko="배너를 여러 개 쌓지 마세요. 사용자는 첫 번째 배너만 읽습니다. 다음 단계를 막는 배너 하나만 남기고, 나머지는 해당하는 자리로 옮기세요."
128
+ />
129
+
130
+ <Canvas of={BannerStories.DoDangerWithAlert} />
131
+ <Verdict
132
+ kind="do"
133
+ en='When a danger banner appears in response to a submit, give it role="alert" so screen readers announce it. Say what happened and what to do next.'
134
+ ko='저장 같은 동작의 결과로 나타나는 danger 배너에는 role="alert"를 붙여 화면 낭독기가 바로 읽게 합니다. 무슨 일이 있었는지와 다음에 할 일을 함께 적습니다.'
135
+ />
136
+
137
+ <En>
138
+
139
+ ## Content
140
+
141
+ - One or two sentences. Lead with what happened or what is true, then what to
142
+ do: "저장하지 못했습니다. 네트워크 연결을 확인한 뒤 다시 시도해 주세요."
143
+ - Full sentences end with a full stop. Sentence case in English.
144
+ - Numbers and dates the reader needs go in the text, not only in a link.
145
+ - Do not repeat the icon's meaning as a prefix ("경고:", "Error:"). The variant
146
+ already says it, and the words say the rest.
147
+
148
+ ## Accessibility
149
+
150
+ What Banner does for you:
151
+
152
+ - A string child renders as body text in the variant's `{status}.fg` colour,
153
+ which the contrast audit checks against `{status}.bg` in both modes
154
+ (WCAG 1.4.3).
155
+ - The icon is a decoration next to the words; the status is in the text.
156
+
157
+ What you still have to do:
158
+
159
+ - **Banner has no live-region role.** A banner that is on the page when it
160
+ loads needs none. One that appears after an action does: pass
161
+ `role="alert"` for an error, `role="status"` for anything else
162
+ (WCAG 4.1.3).
163
+ - **Words, not colour alone** (WCAG 1.4.1). If you set `hideIcon`, the text
164
+ still has to say it is a warning or an error when that matters.
165
+ - A link or button inside the banner needs a name that makes sense on its own
166
+ (WCAG 2.4.4).
167
+
168
+ ## Tokens
169
+
170
+ The table is generated from `Banner.styles.ts` and the theme.
171
+
172
+ </En>
173
+
174
+ <Ko>
175
+
176
+ ## 문구
177
+
178
+ - 한두 문장으로 씁니다. 무슨 일이 있었는지 또는 무엇이 사실인지 먼저 쓰고, 다음에 할
179
+ 일을 씁니다. 예: "저장하지 못했습니다. 네트워크 연결을 확인한 뒤 다시 시도해 주세요."
180
+ - 완전한 문장은 마침표로 끝냅니다. 영어는 문장형 대소문자를 씁니다.
181
+ - 사용자에게 필요한 숫자와 날짜는 링크 안에만 두지 말고 본문에 씁니다.
182
+ - 아이콘의 뜻을 "경고:", "오류:" 같은 머리말로 반복하지 않습니다. 변형이 이미 알려
183
+ 주고, 나머지는 문장이 전합니다.
184
+
185
+ ## 접근성
186
+
187
+ Banner가 알아서 하는 일
188
+
189
+ - 문자열을 넘기면 변형의 `{status}.fg` 색으로 본문 글자를 그립니다. 이 색은 대비
190
+ 감사에서 라이트·다크 모두 `{status}.bg` 위에서 검사합니다(WCAG 1.4.3).
191
+ - 아이콘은 문구 옆의 장식이고, 상태는 문구가 전합니다.
192
+
193
+ 직접 챙겨야 하는 일
194
+
195
+ - **Banner에는 라이브 영역 역할이 없습니다.** 페이지를 열 때부터 있는 배너는 역할이
196
+ 필요 없습니다. 어떤 동작 뒤에 나타나는 배너는 다릅니다. 오류라면 `role="alert"`,
197
+ 그 밖에는 `role="status"`를 넘깁니다(WCAG 4.1.3).
198
+ - **색만으로 알리지 않습니다**(WCAG 1.4.1). `hideIcon`을 쓴다면, 주의나 오류라는
199
+ 사실이 중요할 때 문구가 그것을 말해야 합니다.
200
+ - 배너 안의 링크나 버튼에는 그것만 읽어도 뜻이 통하는 이름을 붙입니다(WCAG 2.4.4).
201
+
202
+ ## 토큰
203
+
204
+ 아래 표는 `Banner.styles.ts`와 테마에서 자동으로 만듭니다.
205
+
206
+ </Ko>
207
+
208
+ <Canvas of={BannerStories.UsageTokens} sourceState="none" />
209
+
210
+ <En>
211
+
212
+ ## Related
213
+
214
+ - **Toast**: a passing confirmation or a result with one follow-up action.
215
+ - **Badge**: a one-to-three-word status on one item.
216
+ - **ErrorFallback**: the page or section failed to render.
217
+ - **Guidelines/Actions in feedback surfaces**: buttons and links inside a
218
+ banner.
219
+ - **Foundations/Brand & colour usage**: status colours mean status.
220
+
221
+ </En>
222
+
223
+ <Ko>
224
+
225
+ ## 관련 컴포넌트
226
+
227
+ - **Toast**: 잠깐 보이는 확인 메시지, 또는 후속 동작이 하나 있는 결과 안내.
228
+ - **Badge**: 항목 하나에 붙는 한두 단어의 상태.
229
+ - **ErrorFallback**: 페이지나 영역을 그리지 못했을 때.
230
+ - **Guidelines/Actions in feedback surfaces**: 배너 안의 버튼과 링크.
231
+ - **Foundations/Brand & colour usage**: 상태색은 상태를 뜻합니다.
232
+
233
+ </Ko>
@@ -7,10 +7,12 @@
7
7
  * emulation) to try the gestures; with a mouse the same drags work by
8
8
  * pointer.
9
9
  */
10
- import { useState } from 'react';
10
+ import { type ReactNode, useState } from 'react';
11
11
  import { Box, HStack, Stack } from '@chakra-ui/react';
12
12
  import type { Meta, StoryObj } from '@storybook/react';
13
13
 
14
+ import { T } from '../../guidelines/_components/Lang';
15
+ import { TokenTable } from '../../guidelines/_components/TokenTable';
14
16
  import { Button } from '../Button';
15
17
  import {
16
18
  BoltIcon,
@@ -30,6 +32,8 @@ import {
30
32
  BottomSheetContent,
31
33
  BottomSheetFooter,
32
34
  BottomSheetHeader,
35
+ BottomSheetOverlay,
36
+ bottomSheetSlotRecipe,
33
37
  } from '.';
34
38
 
35
39
  const meta = {
@@ -202,3 +206,166 @@ export const LongScrollingList: Story = {
202
206
  );
203
207
  },
204
208
  };
209
+
210
+ // ───────────────────────── Usage-page specimens ─────────────────────────
211
+ // Pulled into `BottomSheet.usage.mdx` with <Canvas of={…} />. Hidden from the
212
+ // sidebar (`!dev`). Each is a real, open sheet held inside a phone-sized frame
213
+ // on the docs page: the portal is disabled, the frame's transform makes it the
214
+ // containing block for the fixed positioner and scrim, and `modal={false}`
215
+ // keeps the specimen from trapping focus or locking the page's scroll (the
216
+ // scrim is drawn with `BottomSheetOverlay` so it still looks modal).
217
+
218
+ const PhoneFrame = ({ children }: { children: ReactNode }) => (
219
+ <Box
220
+ position="relative"
221
+ w="360px"
222
+ maxW="100%"
223
+ h="420px"
224
+ mx="auto"
225
+ overflow="hidden"
226
+ borderRadius="l3"
227
+ borderWidth="1px"
228
+ borderColor="border.subtle"
229
+ bg="bg.canvas"
230
+ transform="translateZ(0)"
231
+ css={{
232
+ '& [data-scope=drawer][data-part=positioner], & [data-scope=drawer][data-part=backdrop]':
233
+ { width: '100%', height: '100%' },
234
+ }}
235
+ >
236
+ {children}
237
+ </Box>
238
+ );
239
+
240
+ const OpenSheet = ({ children }: { children: ReactNode }) => (
241
+ <PhoneFrame>
242
+ <BottomSheet
243
+ open
244
+ modal={false}
245
+ closeOnInteractOutside={false}
246
+ closeOnEscape={false}
247
+ portalProps={{ disabled: true }}
248
+ >
249
+ <BottomSheetOverlay />
250
+ <BottomSheetContent>{children}</BottomSheetContent>
251
+ </BottomSheet>
252
+ </PhoneFrame>
253
+ );
254
+
255
+ const SHORT_PALETTE = PALETTE.slice(0, 4);
256
+
257
+ export const DoPickFromList: Story = {
258
+ tags: ['!dev'],
259
+ parameters: { layout: 'padded' },
260
+ name: 'Usage / Do: a titled list to pick from',
261
+ render: () => (
262
+ <OpenSheet>
263
+ <BottomSheetHeader>노드 추가</BottomSheetHeader>
264
+ <BottomSheetCloseButton />
265
+ <BottomSheetBody>
266
+ {/* Inline: the docs page's `.sbdocs-content ul` marker rule
267
+ outranks a style prop. */}
268
+ <Stack as="ul" gap="1" style={{ listStyle: 'none' }} m="0" p="0">
269
+ {SHORT_PALETTE.map(({ icon: Icon, label, hint }) => (
270
+ <Box as="li" key={label}>
271
+ <HStack
272
+ as="button"
273
+ w="full"
274
+ gap="3"
275
+ px="3"
276
+ py="2.5"
277
+ borderRadius="l2"
278
+ textAlign="start"
279
+ >
280
+ <Icon boxSize="sm" aria-hidden />
281
+ <Stack gap="0">
282
+ <Text fontWeight="semibold">{label}</Text>
283
+ <Subtext color="fg.muted">{hint}</Subtext>
284
+ </Stack>
285
+ </HStack>
286
+ </Box>
287
+ ))}
288
+ </Stack>
289
+ </BottomSheetBody>
290
+ </OpenSheet>
291
+ ),
292
+ };
293
+
294
+ export const DontNoHeader: Story = {
295
+ tags: ['!dev'],
296
+ parameters: { layout: 'padded' },
297
+ name: "Usage / Don't: a sheet with no header",
298
+ render: () => (
299
+ <OpenSheet>
300
+ <BottomSheetBody>
301
+ <Stack gap="2" pt="2">
302
+ {SHORT_PALETTE.map(({ label }) => (
303
+ <Text key={label}>{label}</Text>
304
+ ))}
305
+ </Stack>
306
+ </BottomSheetBody>
307
+ </OpenSheet>
308
+ ),
309
+ };
310
+
311
+ export const DoFooterToApply: Story = {
312
+ tags: ['!dev'],
313
+ parameters: { layout: 'padded' },
314
+ name: 'Usage / Do: a footer when choices apply together',
315
+ render: () => (
316
+ <OpenSheet>
317
+ <BottomSheetHeader>필터</BottomSheetHeader>
318
+ <BottomSheetCloseButton />
319
+ <BottomSheetBody>
320
+ <Stack gap="2">
321
+ <Text>모델: 전체</Text>
322
+ <Text>기간: 최근 7일</Text>
323
+ <Text>상태: 완료</Text>
324
+ </Stack>
325
+ </BottomSheetBody>
326
+ <BottomSheetFooter>
327
+ <Button variant="secondary">초기화</Button>
328
+ <Button variant="primary">적용</Button>
329
+ </BottomSheetFooter>
330
+ </OpenSheet>
331
+ ),
332
+ };
333
+
334
+ const sheet = bottomSheetSlotRecipe.base ?? {};
335
+
336
+ /** Tokens each sheet part reads, from `bottomSheetSlotRecipe` in `BottomSheet.styles.ts`. */
337
+ export const UsageTokens: Story = {
338
+ tags: ['!dev'],
339
+ parameters: { layout: 'padded' },
340
+ name: 'Usage / Tokens',
341
+ render: () => (
342
+ <TokenTable
343
+ rows={[
344
+ {
345
+ token: String(sheet.content?.bg),
346
+ use: <T en="Sheet · background" ko="시트 · 배경" />,
347
+ },
348
+ {
349
+ token: String(sheet.content?.color),
350
+ use: <T en="Sheet · text" ko="시트 · 글자" />,
351
+ },
352
+ {
353
+ token: String(sheet.content?.borderColor),
354
+ use: <T en="Sheet · top edge" ko="시트 · 위 테두리" />,
355
+ },
356
+ {
357
+ token: String(sheet.grabberIndicator?.bg),
358
+ use: <T en="Grabber" ko="손잡이" />,
359
+ },
360
+ {
361
+ token: String(sheet.description?.color),
362
+ use: <T en="Description" ko="설명" />,
363
+ },
364
+ {
365
+ token: String(sheet.footer?.borderColor),
366
+ use: <T en="Footer · top rule" ko="푸터 · 위 선" />,
367
+ },
368
+ ]}
369
+ />
370
+ ),
371
+ };
@@ -29,7 +29,8 @@ beforeAll(() => {
29
29
  });
30
30
 
31
31
  const Sheet = (props: Partial<BottomSheetProps>) => (
32
- <LogicianProvider>
32
+ // Korean copy, so the built-in close label is 닫기 (it follows `language`).
33
+ <LogicianProvider language="ko">
33
34
  <BottomSheet {...props}>
34
35
  <BottomSheetContent data-testid="content">
35
36
  <BottomSheetHeader>노드 추가</BottomSheetHeader>
@@ -0,0 +1,216 @@
1
+ import { Canvas, Meta } from '@storybook/blocks';
2
+
3
+ import { En, Ko, LangToggle, Verdict } from '../../guidelines/_components/Lang';
4
+ import * as BottomSheetStories from './BottomSheet.stories';
5
+
6
+ <Meta of={BottomSheetStories} name="Usage" />
7
+
8
+ <LangToggle />
9
+
10
+ <En>
11
+
12
+ # BottomSheet
13
+
14
+ A panel that rises from the bottom edge of a phone screen. The user can drag it
15
+ between snap points or swipe it away.
16
+
17
+ ## When to use
18
+
19
+ - On a phone, to pick one item from a list: a node palette in the workflow
20
+ editor, an answer to a question the assistant asks.
21
+ - On a phone, for a few related choices the user applies together, such as
22
+ filters.
23
+ - Next to a canvas the user keeps working on: a non-modal sheet
24
+ (`modal={false}`) resting on a snap point leaves the page usable.
25
+
26
+ ## When not to use
27
+
28
+ - On a desktop layout → `Modal` for a task, `Menu` or `Popover` for options
29
+ next to their trigger.
30
+ - To confirm something that cannot be undone → `Modal`. A swipe should never
31
+ be the only thing between the user and a deletion.
32
+ - For a result or status → `Toast` or `Banner`.
33
+ - For a long form → a page. The sheet is capped at 85% of the screen height.
34
+
35
+ ## Variants and what they mean
36
+
37
+ The sheet has no visual variants. These props decide how it behaves:
38
+
39
+ </En>
40
+
41
+ <Ko>
42
+
43
+ # BottomSheet
44
+
45
+ 휴대폰 화면 아래 가장자리에서 올라오는 패널입니다. 사용자가 끌어서 멈춤 지점 사이를
46
+ 오가거나 쓸어내려 닫을 수 있습니다.
47
+
48
+ ## 언제 쓰나요
49
+
50
+ - 휴대폰에서 목록 중 하나를 고르게 할 때: 워크플로 편집기의 노드 팔레트, 어시스턴트가
51
+ 묻는 질문의 답.
52
+ - 휴대폰에서 함께 적용하는 몇 가지 선택지를 보일 때: 필터.
53
+ - 사용자가 계속 작업하는 캔버스 옆에 둘 때: 멈춤 지점에 걸쳐 둔 비모달 시트
54
+ (`modal={false}`)는 뒤의 페이지를 그대로 쓸 수 있게 둡니다.
55
+
56
+ ## 언제 쓰지 않나요
57
+
58
+ - 데스크톱 화면에서는 작업에 `Modal`을, 버튼 옆 선택지에 `Menu`나 `Popover`를 씁니다.
59
+ - 되돌릴 수 없는 동작의 확인은 `Modal`로 받습니다. 쓸어내리는 동작 하나만으로 삭제가
60
+ 일어나서는 안 됩니다.
61
+ - 결과나 상태는 `Toast`나 `Banner`로 알립니다.
62
+ - 긴 양식은 페이지에 둡니다. 시트 높이는 화면의 85%까지만 늘어납니다.
63
+
64
+ ## 변형과 뜻
65
+
66
+ 시트에는 모양 변형이 없습니다. 동작을 정하는 속성은 다음과 같습니다.
67
+
68
+ </Ko>
69
+
70
+ <En>
71
+
72
+ | Prop | Effect | Use for |
73
+ | --- | --- | --- |
74
+ | `modal` (default `true`) | Scrim, focus trap and scroll lock. | Most sheets: a pick or a set of choices. |
75
+ | `modal={false}` | No scrim, no focus trap, no scroll lock; the page behind stays usable. | A palette beside a canvas, usually with `snapPoints`. |
76
+ | `snapPoints` / `defaultSnapPoint` | Heights the sheet rests at. Numbers up to 1 are fractions of the viewport (`[0.4, 1]`); strings take `px` or `rem`. | A sheet that opens half-way and expands. |
77
+ | `BottomSheetContent showGrabber` (default `true`) | Draws the drag handle. | Leave it on; turn it off only when the sheet cannot be dragged. |
78
+
79
+ ## Do / Don't
80
+
81
+ </En>
82
+
83
+ <Ko>
84
+
85
+ | 속성 | 효과 | 쓰는 곳 |
86
+ | --- | --- | --- |
87
+ | `modal` (기본 `true`) | 배경 막, 초점 가두기, 스크롤 잠금. | 대부분의 시트: 하나 고르기, 선택지 묶음. |
88
+ | `modal={false}` | 배경 막, 초점 가두기, 스크롤 잠금이 모두 없어 뒤의 페이지를 쓸 수 있습니다. | 캔버스 옆의 팔레트. 보통 `snapPoints`와 함께 씁니다. |
89
+ | `snapPoints` / `defaultSnapPoint` | 시트가 멈추는 높이. 1 이하의 숫자는 화면 높이의 비율(`[0.4, 1]`)이고, 문자열은 `px`나 `rem` 값입니다. | 반쯤 열렸다가 더 펼치는 시트. |
90
+ | `BottomSheetContent`의 `showGrabber` (기본 `true`) | 끌기 손잡이를 그립니다. | 켜 둡니다. 시트를 끌 수 없을 때만 끕니다. |
91
+
92
+ ## 이렇게 하세요 / 이렇게 하지 마세요
93
+
94
+ </Ko>
95
+
96
+ <Canvas of={BottomSheetStories.DoPickFromList} />
97
+ <Verdict
98
+ kind="do"
99
+ en="Give the sheet a header and a close button, and keep each row a single button."
100
+ ko="시트에 헤더와 닫기 버튼을 두고, 목록의 한 줄은 버튼 하나로 만듭니다."
101
+ />
102
+
103
+ <Canvas of={BottomSheetStories.DontNoHeader} />
104
+ <Verdict
105
+ kind="dont"
106
+ en="Leave out the header. The header is the sheet's accessible name; without it a screen reader announces an unnamed dialog, and nobody sees what the list is for."
107
+ ko="헤더를 빼지 마세요. 헤더가 시트의 접근 가능한 이름입니다. 헤더가 없으면 화면 낭독기는 이름 없는 대화상자로 읽고, 보는 사람도 목록이 무엇인지 알 수 없습니다."
108
+ />
109
+
110
+ <Canvas of={BottomSheetStories.DoFooterToApply} />
111
+ <Verdict
112
+ kind="do"
113
+ en="Add BottomSheetFooter only when the choices apply together. For a single pick, the row itself is the action."
114
+ ko="선택지를 한꺼번에 적용할 때만 BottomSheetFooter를 둡니다. 하나만 고르는 시트에서는 줄을 누르는 것이 곧 동작입니다."
115
+ />
116
+
117
+ <En>
118
+
119
+ ## Content
120
+
121
+ - **Header:** a noun or a short task name, no full stop: "노드 추가", "필터".
122
+ - **Rows:** a label and, if needed, one line of hint in `fg.muted`.
123
+ - **Footer buttons:** verbs ("적용", "초기화"), at most two.
124
+
125
+ ## Accessibility
126
+
127
+ What BottomSheet does for you:
128
+
129
+ - `BottomSheetHeader` becomes the sheet's title, which the content's
130
+ `aria-labelledby` points at (WCAG 4.1.2).
131
+ - When modal, it traps focus in the sheet and locks the page's scroll.
132
+ `Escape` closes it (WCAG 2.1.1).
133
+ - `BottomSheetCloseButton` carries a translated `aria-label` (닫기 / Close).
134
+ - The grabber is `aria-hidden`: it is a pointer affordance, and dragging is
135
+ never the only way to close the sheet (WCAG 2.5.1).
136
+ - `BottomSheetBody` scrolls inside the sheet; a drag starts from the body only
137
+ when the list is scrolled to the top, so scrolling never drags the sheet.
138
+
139
+ What you still have to do:
140
+
141
+ - **Always render `BottomSheetHeader`.** Without it the sheet has no name.
142
+ - **Keep a close button or a footer action.** A swipe or an outside tap is not
143
+ available to keyboard and switch users.
144
+ - Put `BottomSheetCloseButton` directly inside `BottomSheetContent`, next to
145
+ the header, not inside it.
146
+ - A non-modal sheet does not trap focus: `Tab` can leave it for the page
147
+ behind. Check that the tab order between the two still makes sense.
148
+
149
+ ## Tokens
150
+
151
+ The table is generated from `bottomSheetSlotRecipe` in `BottomSheet.styles.ts`.
152
+ The scrim is `blackAlpha.500`, a fixed value rather than a semantic token.
153
+
154
+ </En>
155
+
156
+ <Ko>
157
+
158
+ ## 문구
159
+
160
+ - **헤더:** 명사나 짧은 작업 이름을 쓰고 마침표를 찍지 않습니다. "노드 추가", "필터".
161
+ - **목록 한 줄:** 라벨 하나와, 필요하면 `fg.muted`로 쓴 도움말 한 줄.
162
+ - **푸터 버튼:** 동사("적용", "초기화")로 두 개까지 씁니다.
163
+
164
+ ## 접근성
165
+
166
+ BottomSheet가 알아서 하는 일
167
+
168
+ - `BottomSheetHeader`가 시트의 제목이 되고, 콘텐츠의 `aria-labelledby`가 이 제목을
169
+ 가리킵니다(WCAG 4.1.2).
170
+ - 모달일 때는 초점을 시트 안에 가두고 페이지 스크롤을 막습니다. `Escape`로 닫힙니다
171
+ (WCAG 2.1.1).
172
+ - `BottomSheetCloseButton`에는 번역된 `aria-label`(닫기 / Close)이 붙어 있습니다.
173
+ - 손잡이는 `aria-hidden`입니다. 포인터용 표시일 뿐이고, 끌기만이 시트를 닫는 유일한
174
+ 방법이 되지 않습니다(WCAG 2.5.1).
175
+ - `BottomSheetBody`는 시트 안에서 스크롤됩니다. 목록이 맨 위에 있을 때만 본문에서 끌기가
176
+ 시작되므로, 목록을 스크롤하다가 시트가 끌려 내려가지 않습니다.
177
+
178
+ 직접 챙겨야 하는 일
179
+
180
+ - **`BottomSheetHeader`를 언제나 둡니다.** 헤더가 없으면 시트에 이름이 없습니다.
181
+ - **닫기 버튼이나 푸터 동작을 남깁니다.** 쓸어내리기나 바깥 누르기는 키보드나 스위치
182
+ 사용자가 쓸 수 없습니다.
183
+ - `BottomSheetCloseButton`은 헤더 안이 아니라 헤더 옆, `BottomSheetContent`의 바로
184
+ 아래에 둡니다.
185
+ - 비모달 시트는 초점을 가두지 않으므로 `Tab`으로 뒤의 페이지로 나갈 수 있습니다. 시트와
186
+ 페이지 사이의 탭 순서가 자연스러운지 확인합니다.
187
+
188
+ ## 토큰
189
+
190
+ 아래 표는 `BottomSheet.styles.ts`의 `bottomSheetSlotRecipe`에서 자동으로 만듭니다. 배경
191
+ 막은 의미 토큰이 아니라 고정값 `blackAlpha.500`입니다.
192
+
193
+ </Ko>
194
+
195
+ <Canvas of={BottomSheetStories.UsageTokens} sourceState="none" />
196
+
197
+ <En>
198
+
199
+ ## Related
200
+
201
+ - **Modal**: the same job on a wide screen, and every destructive confirmation.
202
+ - **Menu**: a short list of actions next to its trigger.
203
+ - **Popover**: a small panel of controls anchored to its trigger.
204
+
205
+ </En>
206
+
207
+ <Ko>
208
+
209
+ ## 관련 컴포넌트
210
+
211
+ - **Modal**: 넓은 화면에서 같은 일을 하며, 되돌릴 수 없는 동작의 확인은 모두 Modal로
212
+ 받습니다.
213
+ - **Menu**: 버튼 옆에 여는 짧은 동작 목록.
214
+ - **Popover**: 버튼에 붙어 열리는 작은 컨트롤 패널.
215
+
216
+ </Ko>