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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (610) hide show
  1. package/MIGRATION-5.0.md +40 -1
  2. package/README.md +1 -0
  3. package/USAGE.md +20 -0
  4. package/dist/components/Avatar/Avatar.d.ts +68 -11
  5. package/dist/components/Avatar/Avatar.d.ts.map +1 -1
  6. package/dist/components/Avatar/Avatar.js +41 -5
  7. package/dist/components/Avatar/Avatar.js.map +1 -1
  8. package/dist/components/Avatar/Avatar.mjs +40 -5
  9. package/dist/components/Avatar/Avatar.mjs.map +1 -1
  10. package/dist/components/Avatar/index.d.ts +2 -2
  11. package/dist/components/Avatar/index.d.ts.map +1 -1
  12. package/dist/components/Banner/Banner.types.d.ts +24 -1
  13. package/dist/components/Banner/Banner.types.d.ts.map +1 -1
  14. package/dist/components/BottomSheet/BottomSheet.styles.d.ts +2 -2
  15. package/dist/components/Button/Button.d.ts.map +1 -1
  16. package/dist/components/Button/Button.js +31 -3
  17. package/dist/components/Button/Button.js.map +1 -1
  18. package/dist/components/Button/Button.mjs +31 -3
  19. package/dist/components/Button/Button.mjs.map +1 -1
  20. package/dist/components/Button/Button.types.d.ts +38 -1
  21. package/dist/components/Button/Button.types.d.ts.map +1 -1
  22. package/dist/components/Card/Card.types.d.ts +12 -0
  23. package/dist/components/Card/Card.types.d.ts.map +1 -1
  24. package/dist/components/Code/shikiAdapter.d.ts +3 -1
  25. package/dist/components/Code/shikiAdapter.d.ts.map +1 -1
  26. package/dist/components/Code/shikiAdapter.js +29 -8
  27. package/dist/components/Code/shikiAdapter.js.map +1 -1
  28. package/dist/components/Code/shikiAdapter.mjs +29 -8
  29. package/dist/components/Code/shikiAdapter.mjs.map +1 -1
  30. package/dist/components/CodeTabs/CodeTabs.styles.d.ts +6 -5
  31. package/dist/components/CodeTabs/CodeTabs.styles.d.ts.map +1 -1
  32. package/dist/components/CodeTabs/CodeTabs.styles.js +6 -5
  33. package/dist/components/CodeTabs/CodeTabs.styles.js.map +1 -1
  34. package/dist/components/CodeTabs/CodeTabs.styles.mjs +6 -5
  35. package/dist/components/CodeTabs/CodeTabs.styles.mjs.map +1 -1
  36. package/dist/components/ColorMode/ColorModeToggle.d.ts +7 -2
  37. package/dist/components/ColorMode/ColorModeToggle.d.ts.map +1 -1
  38. package/dist/components/ColorMode/ColorModeToggle.js +8 -3
  39. package/dist/components/ColorMode/ColorModeToggle.js.map +1 -1
  40. package/dist/components/ColorMode/ColorModeToggle.mjs +8 -3
  41. package/dist/components/ColorMode/ColorModeToggle.mjs.map +1 -1
  42. package/dist/components/Confetti/Confetti.types.d.ts +5 -1
  43. package/dist/components/Confetti/Confetti.types.d.ts.map +1 -1
  44. package/dist/components/Confetti/confettiColors.d.ts +5 -5
  45. package/dist/components/Confetti/confettiColors.js +5 -5
  46. package/dist/components/Confetti/confettiColors.mjs +5 -5
  47. package/dist/components/DatePicker/DatePicker.types.d.ts +12 -0
  48. package/dist/components/DatePicker/DatePicker.types.d.ts.map +1 -0
  49. package/dist/components/DatePicker/RangeDatePicker.d.ts +2 -1
  50. package/dist/components/DatePicker/RangeDatePicker.d.ts.map +1 -1
  51. package/dist/components/DatePicker/RangeDatePicker.js +4 -2
  52. package/dist/components/DatePicker/RangeDatePicker.js.map +1 -1
  53. package/dist/components/DatePicker/RangeDatePicker.mjs +4 -2
  54. package/dist/components/DatePicker/RangeDatePicker.mjs.map +1 -1
  55. package/dist/components/DatePicker/SingleDatePicker.d.ts +2 -1
  56. package/dist/components/DatePicker/SingleDatePicker.d.ts.map +1 -1
  57. package/dist/components/DatePicker/SingleDatePicker.js +4 -2
  58. package/dist/components/DatePicker/SingleDatePicker.js.map +1 -1
  59. package/dist/components/DatePicker/SingleDatePicker.mjs +4 -2
  60. package/dist/components/DatePicker/SingleDatePicker.mjs.map +1 -1
  61. package/dist/components/DatePicker/index.d.ts +1 -0
  62. package/dist/components/DatePicker/index.d.ts.map +1 -1
  63. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts +6 -0
  64. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts.map +1 -1
  65. package/dist/components/ExpandableText/ExpandableText.d.ts.map +1 -1
  66. package/dist/components/ExpandableText/ExpandableText.js +1 -1
  67. package/dist/components/ExpandableText/ExpandableText.js.map +1 -1
  68. package/dist/components/ExpandableText/ExpandableText.mjs +1 -1
  69. package/dist/components/ExpandableText/ExpandableText.mjs.map +1 -1
  70. package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts +1 -1
  71. package/dist/components/Form/FormModalFooter/FormModalFooter.d.ts.map +1 -1
  72. package/dist/components/Form/FormModalFooter/FormModalFooter.js +2 -2
  73. package/dist/components/Form/FormModalFooter/FormModalFooter.js.map +1 -1
  74. package/dist/components/Form/FormModalFooter/FormModalFooter.mjs +2 -2
  75. package/dist/components/Form/FormModalFooter/FormModalFooter.mjs.map +1 -1
  76. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts +11 -1
  77. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts.map +1 -1
  78. package/dist/components/Form/FormSection/CollapsibleFormSection.js +1 -0
  79. package/dist/components/Form/FormSection/CollapsibleFormSection.js.map +1 -1
  80. package/dist/components/Form/FormSection/CollapsibleFormSection.mjs +1 -0
  81. package/dist/components/Form/FormSection/CollapsibleFormSection.mjs.map +1 -1
  82. package/dist/components/Input/Input.d.ts.map +1 -1
  83. package/dist/components/Input/Input.js +4 -0
  84. package/dist/components/Input/Input.js.map +1 -1
  85. package/dist/components/Input/Input.mjs +4 -0
  86. package/dist/components/Input/Input.mjs.map +1 -1
  87. package/dist/components/LineGraph/LineGraph.d.ts.map +1 -1
  88. package/dist/components/LineGraph/LineGraph.js +4 -5
  89. package/dist/components/LineGraph/LineGraph.js.map +1 -1
  90. package/dist/components/LineGraph/LineGraph.mjs +5 -6
  91. package/dist/components/LineGraph/LineGraph.mjs.map +1 -1
  92. package/dist/components/LineGraph/LineGraph.types.d.ts +12 -2
  93. package/dist/components/LineGraph/LineGraph.types.d.ts.map +1 -1
  94. package/dist/components/LineGraph/seriesColors.d.ts +12 -8
  95. package/dist/components/LineGraph/seriesColors.d.ts.map +1 -1
  96. package/dist/components/LineGraph/seriesColors.js +8 -7
  97. package/dist/components/LineGraph/seriesColors.js.map +1 -1
  98. package/dist/components/LineGraph/seriesColors.mjs +8 -7
  99. package/dist/components/LineGraph/seriesColors.mjs.map +1 -1
  100. package/dist/components/Masonry/Masonry.types.d.ts +8 -3
  101. package/dist/components/Masonry/Masonry.types.d.ts.map +1 -1
  102. package/dist/components/Menu/MenuItem.types.d.ts +8 -0
  103. package/dist/components/Menu/MenuItem.types.d.ts.map +1 -1
  104. package/dist/components/Modal/ModalCloseButton.d.ts +1 -1
  105. package/dist/components/Modal/ModalCloseButton.js +1 -1
  106. package/dist/components/Modal/ModalCloseButton.mjs +1 -1
  107. package/dist/components/MonthPicker/MonthPicker.d.ts.map +1 -1
  108. package/dist/components/MonthPicker/MonthPicker.js +3 -2
  109. package/dist/components/MonthPicker/MonthPicker.js.map +1 -1
  110. package/dist/components/MonthPicker/MonthPicker.mjs +3 -2
  111. package/dist/components/MonthPicker/MonthPicker.mjs.map +1 -1
  112. package/dist/components/MonthPicker/MonthPicker.types.d.ts +7 -1
  113. package/dist/components/MonthPicker/MonthPicker.types.d.ts.map +1 -1
  114. package/dist/components/NavList/NavList.d.ts +35 -0
  115. package/dist/components/NavList/NavList.d.ts.map +1 -0
  116. package/dist/components/NavList/NavList.js +113 -0
  117. package/dist/components/NavList/NavList.js.map +1 -0
  118. package/dist/components/NavList/NavList.mjs +111 -0
  119. package/dist/components/NavList/NavList.mjs.map +1 -0
  120. package/dist/components/NavList/NavList.styles.d.ts +90 -0
  121. package/dist/components/NavList/NavList.styles.d.ts.map +1 -0
  122. package/dist/components/NavList/NavList.styles.js +104 -0
  123. package/dist/components/NavList/NavList.styles.js.map +1 -0
  124. package/dist/components/NavList/NavList.styles.mjs +97 -0
  125. package/dist/components/NavList/NavList.styles.mjs.map +1 -0
  126. package/dist/components/NavList/NavList.translations.json.js +19 -0
  127. package/dist/components/NavList/NavList.translations.json.js.map +1 -0
  128. package/dist/components/NavList/NavList.translations.json.mjs +14 -0
  129. package/dist/components/NavList/NavList.translations.json.mjs.map +1 -0
  130. package/dist/components/NavList/NavList.types.d.ts +140 -0
  131. package/dist/components/NavList/NavList.types.d.ts.map +1 -0
  132. package/dist/components/NavList/NavListContext.d.ts +30 -0
  133. package/dist/components/NavList/NavListContext.d.ts.map +1 -0
  134. package/dist/components/NavList/NavListContext.js +16 -0
  135. package/dist/components/NavList/NavListContext.js.map +1 -0
  136. package/dist/components/NavList/NavListContext.mjs +13 -0
  137. package/dist/components/NavList/NavListContext.mjs.map +1 -0
  138. package/dist/components/NavList/NavListGroup.d.ts +31 -0
  139. package/dist/components/NavList/NavListGroup.d.ts.map +1 -0
  140. package/dist/components/NavList/NavListGroup.js +115 -0
  141. package/dist/components/NavList/NavListGroup.js.map +1 -0
  142. package/dist/components/NavList/NavListGroup.mjs +113 -0
  143. package/dist/components/NavList/NavListGroup.mjs.map +1 -0
  144. package/dist/components/NavList/NavListItem.d.ts +16 -0
  145. package/dist/components/NavList/NavListItem.d.ts.map +1 -0
  146. package/dist/components/NavList/NavListItem.js +284 -0
  147. package/dist/components/NavList/NavListItem.js.map +1 -0
  148. package/dist/components/NavList/NavListItem.mjs +282 -0
  149. package/dist/components/NavList/NavListItem.mjs.map +1 -0
  150. package/dist/components/NavList/NavListSkeleton.d.ts +17 -0
  151. package/dist/components/NavList/NavListSkeleton.d.ts.map +1 -0
  152. package/dist/components/NavList/NavListSkeleton.js +33 -0
  153. package/dist/components/NavList/NavListSkeleton.js.map +1 -0
  154. package/dist/components/NavList/NavListSkeleton.mjs +31 -0
  155. package/dist/components/NavList/NavListSkeleton.mjs.map +1 -0
  156. package/dist/components/NavList/index.d.ts +7 -0
  157. package/dist/components/NavList/index.d.ts.map +1 -0
  158. package/dist/components/Pagination/Pagination.d.ts +11 -10
  159. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  160. package/dist/components/Pagination/Pagination.js +11 -10
  161. package/dist/components/Pagination/Pagination.js.map +1 -1
  162. package/dist/components/Pagination/Pagination.mjs +11 -10
  163. package/dist/components/Pagination/Pagination.mjs.map +1 -1
  164. package/dist/components/ProgressBar/ProgressBar.types.d.ts +9 -0
  165. package/dist/components/ProgressBar/ProgressBar.types.d.ts.map +1 -1
  166. package/dist/components/RadialProgress/RadialProgress.types.d.ts +21 -1
  167. package/dist/components/RadialProgress/RadialProgress.types.d.ts.map +1 -1
  168. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts +8 -0
  169. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts.map +1 -1
  170. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  171. package/dist/components/SegmentedControl/SegmentedControl.js +34 -33
  172. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
  173. package/dist/components/SegmentedControl/SegmentedControl.mjs +35 -34
  174. package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  175. package/dist/components/SegmentedControl/SegmentedControl.styles.d.ts +24 -0
  176. package/dist/components/SegmentedControl/SegmentedControl.styles.d.ts.map +1 -1
  177. package/dist/components/SegmentedControl/SegmentedControl.styles.js +30 -0
  178. package/dist/components/SegmentedControl/SegmentedControl.styles.js.map +1 -1
  179. package/dist/components/SegmentedControl/SegmentedControl.styles.mjs +29 -1
  180. package/dist/components/SegmentedControl/SegmentedControl.styles.mjs.map +1 -1
  181. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts +2 -0
  182. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts.map +1 -1
  183. package/dist/components/Select/Combobox.d.ts +1 -1
  184. package/dist/components/Select/Combobox.d.ts.map +1 -1
  185. package/dist/components/Select/Combobox.js +9 -2
  186. package/dist/components/Select/Combobox.js.map +1 -1
  187. package/dist/components/Select/Combobox.mjs +10 -3
  188. package/dist/components/Select/Combobox.mjs.map +1 -1
  189. package/dist/components/Select/Select.d.ts +1 -1
  190. package/dist/components/Select/Select.d.ts.map +1 -1
  191. package/dist/components/Select/Select.js +14 -2
  192. package/dist/components/Select/Select.js.map +1 -1
  193. package/dist/components/Select/Select.mjs +15 -3
  194. package/dist/components/Select/Select.mjs.map +1 -1
  195. package/dist/components/Select/Select.styles.d.ts +97 -1
  196. package/dist/components/Select/Select.styles.d.ts.map +1 -1
  197. package/dist/components/Select/Select.styles.js +83 -0
  198. package/dist/components/Select/Select.styles.js.map +1 -1
  199. package/dist/components/Select/Select.styles.mjs +82 -1
  200. package/dist/components/Select/Select.styles.mjs.map +1 -1
  201. package/dist/components/Switch/SwitchControl.d.ts.map +1 -1
  202. package/dist/components/Switch/SwitchControl.js +26 -11
  203. package/dist/components/Switch/SwitchControl.js.map +1 -1
  204. package/dist/components/Switch/SwitchControl.mjs +27 -12
  205. package/dist/components/Switch/SwitchControl.mjs.map +1 -1
  206. package/dist/components/Tabs/Tab/Tab.styles.d.ts +1 -1
  207. package/dist/components/Tabs/Tab/Tab.styles.js +1 -1
  208. package/dist/components/Tabs/Tab/Tab.styles.mjs +1 -1
  209. package/dist/components/Tag/Tag.d.ts.map +1 -1
  210. package/dist/components/Tag/Tag.js +14 -2
  211. package/dist/components/Tag/Tag.js.map +1 -1
  212. package/dist/components/Tag/Tag.mjs +15 -3
  213. package/dist/components/Tag/Tag.mjs.map +1 -1
  214. package/dist/components/Tag/Tag.styles.d.ts +20 -2
  215. package/dist/components/Tag/Tag.styles.d.ts.map +1 -1
  216. package/dist/components/Tag/Tag.styles.js +81 -0
  217. package/dist/components/Tag/Tag.styles.js.map +1 -1
  218. package/dist/components/Tag/Tag.styles.mjs +81 -1
  219. package/dist/components/Tag/Tag.styles.mjs.map +1 -1
  220. package/dist/components/Tag/Tag.types.d.ts +15 -2
  221. package/dist/components/Tag/Tag.types.d.ts.map +1 -1
  222. package/dist/components/Tag/index.d.ts +2 -2
  223. package/dist/components/Tag/index.d.ts.map +1 -1
  224. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  225. package/dist/components/Textarea/Textarea.js +4 -0
  226. package/dist/components/Textarea/Textarea.js.map +1 -1
  227. package/dist/components/Textarea/Textarea.mjs +4 -0
  228. package/dist/components/Textarea/Textarea.mjs.map +1 -1
  229. package/dist/components/Toast/Toast.d.ts.map +1 -1
  230. package/dist/components/Toast/Toast.js +5 -1
  231. package/dist/components/Toast/Toast.js.map +1 -1
  232. package/dist/components/Toast/Toast.mjs +5 -1
  233. package/dist/components/Toast/Toast.mjs.map +1 -1
  234. package/dist/components/Toast/Toast.styles.d.ts +13 -2
  235. package/dist/components/Toast/Toast.styles.d.ts.map +1 -1
  236. package/dist/components/Toast/Toast.styles.js +19 -7
  237. package/dist/components/Toast/Toast.styles.js.map +1 -1
  238. package/dist/components/Toast/Toast.styles.mjs +19 -7
  239. package/dist/components/Toast/Toast.styles.mjs.map +1 -1
  240. package/dist/components/Typography/Caption.d.ts.map +1 -1
  241. package/dist/components/Typography/Caption.js +1 -1
  242. package/dist/components/Typography/Caption.js.map +1 -1
  243. package/dist/components/Typography/Caption.mjs +1 -1
  244. package/dist/components/Typography/Caption.mjs.map +1 -1
  245. package/dist/components/Typography/H1.d.ts.map +1 -1
  246. package/dist/components/Typography/H1.js +1 -1
  247. package/dist/components/Typography/H1.js.map +1 -1
  248. package/dist/components/Typography/H1.mjs +1 -1
  249. package/dist/components/Typography/H1.mjs.map +1 -1
  250. package/dist/components/Typography/H2.d.ts.map +1 -1
  251. package/dist/components/Typography/H2.js +1 -1
  252. package/dist/components/Typography/H2.js.map +1 -1
  253. package/dist/components/Typography/H2.mjs +1 -1
  254. package/dist/components/Typography/H2.mjs.map +1 -1
  255. package/dist/components/Typography/H3.d.ts.map +1 -1
  256. package/dist/components/Typography/H3.js +1 -1
  257. package/dist/components/Typography/H3.js.map +1 -1
  258. package/dist/components/Typography/H3.mjs +1 -1
  259. package/dist/components/Typography/H3.mjs.map +1 -1
  260. package/dist/components/Typography/H4.d.ts.map +1 -1
  261. package/dist/components/Typography/H4.js +1 -1
  262. package/dist/components/Typography/H4.js.map +1 -1
  263. package/dist/components/Typography/H4.mjs +1 -1
  264. package/dist/components/Typography/H4.mjs.map +1 -1
  265. package/dist/components/Typography/H5.d.ts.map +1 -1
  266. package/dist/components/Typography/H5.js +1 -1
  267. package/dist/components/Typography/H5.js.map +1 -1
  268. package/dist/components/Typography/H5.mjs +1 -1
  269. package/dist/components/Typography/H5.mjs.map +1 -1
  270. package/dist/components/Typography/Link.d.ts.map +1 -1
  271. package/dist/components/Typography/Link.js +1 -1
  272. package/dist/components/Typography/Link.js.map +1 -1
  273. package/dist/components/Typography/Link.mjs +1 -1
  274. package/dist/components/Typography/Link.mjs.map +1 -1
  275. package/dist/components/Typography/Overline.d.ts.map +1 -1
  276. package/dist/components/Typography/Overline.js +1 -1
  277. package/dist/components/Typography/Overline.js.map +1 -1
  278. package/dist/components/Typography/Overline.mjs +1 -1
  279. package/dist/components/Typography/Overline.mjs.map +1 -1
  280. package/dist/components/Typography/Subtext.d.ts.map +1 -1
  281. package/dist/components/Typography/Subtext.js +1 -1
  282. package/dist/components/Typography/Subtext.js.map +1 -1
  283. package/dist/components/Typography/Subtext.mjs +1 -1
  284. package/dist/components/Typography/Subtext.mjs.map +1 -1
  285. package/dist/components/Typography/Subtitle.d.ts.map +1 -1
  286. package/dist/components/Typography/Subtitle.js +1 -1
  287. package/dist/components/Typography/Subtitle.js.map +1 -1
  288. package/dist/components/Typography/Subtitle.mjs +1 -1
  289. package/dist/components/Typography/Subtitle.mjs.map +1 -1
  290. package/dist/components/Typography/Text.d.ts.map +1 -1
  291. package/dist/components/Typography/Text.js +1 -1
  292. package/dist/components/Typography/Text.js.map +1 -1
  293. package/dist/components/Typography/Text.mjs +1 -1
  294. package/dist/components/Typography/Text.mjs.map +1 -1
  295. package/dist/hooks/useLanguage.d.ts +5 -0
  296. package/dist/hooks/useLanguage.d.ts.map +1 -1
  297. package/dist/hooks/useLanguage.js +7 -3
  298. package/dist/hooks/useLanguage.js.map +1 -1
  299. package/dist/hooks/useLanguage.mjs +7 -4
  300. package/dist/hooks/useLanguage.mjs.map +1 -1
  301. package/dist/hooks/useTranslate.d.ts.map +1 -1
  302. package/dist/hooks/useTranslate.js +8 -5
  303. package/dist/hooks/useTranslate.js.map +1 -1
  304. package/dist/hooks/useTranslate.mjs +8 -5
  305. package/dist/hooks/useTranslate.mjs.map +1 -1
  306. package/dist/index.d.ts +3 -1
  307. package/dist/index.d.ts.map +1 -1
  308. package/dist/index.js +22 -0
  309. package/dist/index.js.map +1 -1
  310. package/dist/index.mjs +9 -3
  311. package/dist/index.mjs.map +1 -1
  312. package/dist/theme/colors.d.ts +2 -2
  313. package/dist/theme/colors.d.ts.map +1 -1
  314. package/dist/theme/colors.js +63 -19
  315. package/dist/theme/colors.js.map +1 -1
  316. package/dist/theme/colors.mjs +64 -20
  317. package/dist/theme/colors.mjs.map +1 -1
  318. package/dist/theme/controlSizes.d.ts +91 -0
  319. package/dist/theme/controlSizes.d.ts.map +1 -0
  320. package/dist/theme/controlSizes.js +143 -0
  321. package/dist/theme/controlSizes.js.map +1 -0
  322. package/dist/theme/controlSizes.mjs +135 -0
  323. package/dist/theme/controlSizes.mjs.map +1 -0
  324. package/dist/theme/global.d.ts.map +1 -1
  325. package/dist/theme/global.js +19 -1
  326. package/dist/theme/global.js.map +1 -1
  327. package/dist/theme/global.mjs +19 -1
  328. package/dist/theme/global.mjs.map +1 -1
  329. package/dist/theme/index.d.ts.map +1 -1
  330. package/dist/theme/index.js +14 -43
  331. package/dist/theme/index.js.map +1 -1
  332. package/dist/theme/index.mjs +14 -43
  333. package/dist/theme/index.mjs.map +1 -1
  334. package/dist/theme/palette.generated.d.ts +295 -162
  335. package/dist/theme/palette.generated.d.ts.map +1 -1
  336. package/dist/theme/palette.generated.js +296 -162
  337. package/dist/theme/palette.generated.js.map +1 -1
  338. package/dist/theme/palette.generated.mjs +296 -163
  339. package/dist/theme/palette.generated.mjs.map +1 -1
  340. package/dist/theme/paletteSwatches.d.ts +20 -0
  341. package/dist/theme/paletteSwatches.d.ts.map +1 -1
  342. package/dist/theme/recipes/avatar.d.ts +30 -0
  343. package/dist/theme/recipes/avatar.d.ts.map +1 -0
  344. package/dist/theme/recipes/avatar.js +96 -0
  345. package/dist/theme/recipes/avatar.js.map +1 -0
  346. package/dist/theme/recipes/avatar.mjs +94 -0
  347. package/dist/theme/recipes/avatar.mjs.map +1 -0
  348. package/dist/theme/recipes/controls.d.ts +94 -0
  349. package/dist/theme/recipes/controls.d.ts.map +1 -0
  350. package/dist/theme/recipes/controls.js +154 -0
  351. package/dist/theme/recipes/controls.js.map +1 -0
  352. package/dist/theme/recipes/controls.mjs +144 -0
  353. package/dist/theme/recipes/controls.mjs.map +1 -0
  354. package/dist/translations/Defaults.translations.json.js +19 -1
  355. package/dist/translations/Defaults.translations.json.js.map +1 -1
  356. package/dist/translations/Defaults.translations.json.mjs +18 -2
  357. package/dist/translations/Defaults.translations.json.mjs.map +1 -1
  358. package/dist/utils/disabledControl.d.ts +8 -1
  359. package/dist/utils/disabledControl.d.ts.map +1 -1
  360. package/dist/utils/disabledControl.js +8 -1
  361. package/dist/utils/disabledControl.js.map +1 -1
  362. package/dist/utils/disabledControl.mjs +8 -1
  363. package/dist/utils/disabledControl.mjs.map +1 -1
  364. package/dist/utils/focusRing.d.ts +22 -0
  365. package/dist/utils/focusRing.d.ts.map +1 -1
  366. package/dist/utils/focusRing.js +22 -0
  367. package/dist/utils/focusRing.js.map +1 -1
  368. package/dist/utils/focusRing.mjs +21 -1
  369. package/dist/utils/focusRing.mjs.map +1 -1
  370. package/package.json +2 -1
  371. package/src/components/Accordion/Accordion.stories.tsx +85 -0
  372. package/src/components/Accordion/Accordion.usage.mdx +200 -0
  373. package/src/components/Appear/Appear.usage.mdx +107 -0
  374. package/src/components/Avatar/Avatar.recipe.test.tsx +176 -0
  375. package/src/components/Avatar/Avatar.stories.tsx +199 -24
  376. package/src/components/Avatar/Avatar.tsx +118 -21
  377. package/src/components/Avatar/Avatar.usage.mdx +185 -0
  378. package/src/components/Avatar/index.tsx +8 -1
  379. package/src/components/Banner/Banner.stories.tsx +152 -2
  380. package/src/components/Banner/Banner.types.ts +30 -1
  381. package/src/components/Banner/Banner.usage.mdx +233 -0
  382. package/src/components/BottomSheet/BottomSheet.stories.tsx +168 -1
  383. package/src/components/BottomSheet/BottomSheet.test.tsx +2 -1
  384. package/src/components/BottomSheet/BottomSheet.usage.mdx +216 -0
  385. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +59 -0
  386. package/src/components/Breadcrumb/Breadcrumb.usage.mdx +181 -0
  387. package/src/components/Button/Button.focusableWhenDisabled.test.tsx +218 -0
  388. package/src/components/Button/Button.stories.tsx +332 -3
  389. package/src/components/Button/Button.tsx +46 -3
  390. package/src/components/Button/Button.types.ts +38 -1
  391. package/src/components/Button/Button.usage.mdx +358 -0
  392. package/src/components/Button/Button.variants.test.tsx +13 -1
  393. package/src/components/Card/Card.stories.tsx +106 -0
  394. package/src/components/Card/Card.types.ts +12 -0
  395. package/src/components/Card/Card.usage.mdx +216 -0
  396. package/src/components/Checkbox/Checkbox.stories.tsx +140 -13
  397. package/src/components/Checkbox/Checkbox.usage.mdx +214 -0
  398. package/src/components/Chip/Chip.usage.mdx +78 -0
  399. package/src/components/Code/Code.stories.tsx +60 -0
  400. package/src/components/Code/Code.test.tsx +116 -0
  401. package/src/components/Code/Code.usage.mdx +187 -0
  402. package/src/components/Code/shikiAdapter.ts +38 -9
  403. package/src/components/CodeTabs/CodeTabs.stories.tsx +53 -0
  404. package/src/components/CodeTabs/CodeTabs.styles.ts +6 -5
  405. package/src/components/CodeTabs/CodeTabs.usage.mdx +176 -0
  406. package/src/components/Collapsible/Collapsible.stories.tsx +58 -0
  407. package/src/components/Collapsible/Collapsible.usage.mdx +173 -0
  408. package/src/components/ColorMode/ColorMode.stories.tsx +50 -0
  409. package/src/components/ColorMode/ColorMode.usage.mdx +135 -0
  410. package/src/components/ColorMode/ColorModeToggle.tsx +10 -3
  411. package/src/components/Confetti/Confetti.types.ts +5 -1
  412. package/src/components/Confetti/Confetti.usage.mdx +111 -0
  413. package/src/components/Confetti/confettiColors.ts +5 -5
  414. package/src/components/Container/Container.stories.tsx +32 -0
  415. package/src/components/Container/Container.usage.mdx +130 -0
  416. package/src/components/CopyableCode/CopyableCode.stories.tsx +62 -0
  417. package/src/components/CopyableCode/CopyableCode.usage.mdx +168 -0
  418. package/src/components/CountBadge/CountBadge.stories.tsx +69 -0
  419. package/src/components/CountBadge/CountBadge.usage.mdx +215 -0
  420. package/src/components/CountUp/CountUp.usage.mdx +107 -0
  421. package/src/components/DatePicker/DatePicker.types.ts +12 -0
  422. package/src/components/DatePicker/DatePicker.usage.mdx +177 -0
  423. package/src/components/DatePicker/RangeDatePicker.stories.tsx +87 -3
  424. package/src/components/DatePicker/RangeDatePicker.tsx +7 -1
  425. package/src/components/DatePicker/SingleDatePicker.tsx +7 -1
  426. package/src/components/DatePicker/index.ts +1 -0
  427. package/src/components/ErrorFallback/ErrorFallback.types.ts +6 -0
  428. package/src/components/ErrorFallback/ErrorFallback.usage.mdx +127 -0
  429. package/src/components/ExpandableText/ExpandableText.stories.tsx +55 -0
  430. package/src/components/ExpandableText/ExpandableText.tsx +0 -1
  431. package/src/components/ExpandableText/ExpandableText.usage.mdx +178 -0
  432. package/src/components/FileInput/FileInput.stories.tsx +38 -1
  433. package/src/components/FileInput/FileInput.usage.mdx +178 -0
  434. package/src/components/FileItem/FileItem.stories.tsx +71 -0
  435. package/src/components/FileItem/FileItem.usage.mdx +180 -0
  436. package/src/components/FileList/FileList.stories.tsx +25 -0
  437. package/src/components/FileList/FileList.usage.mdx +165 -0
  438. package/src/components/FlyTo/FlyTo.usage.mdx +99 -0
  439. package/src/components/Form/Form.stories.tsx +149 -0
  440. package/src/components/Form/Form.usage.mdx +203 -0
  441. package/src/components/Form/FormModalFooter/FormModalFooter.stories.tsx +1 -1
  442. package/src/components/Form/FormModalFooter/FormModalFooter.test.tsx +19 -1
  443. package/src/components/Form/FormModalFooter/FormModalFooter.tsx +2 -0
  444. package/src/components/Form/FormModalFooter/FormModalFooter.types.ts +11 -1
  445. package/src/components/FormControl/FormControl.stories.tsx +35 -0
  446. package/src/components/FormControl/FormControl.usage.mdx +128 -0
  447. package/src/components/FormIntegration/FormIntegration.usage.mdx +158 -0
  448. package/src/components/FormLabel/FormLabel.stories.tsx +71 -0
  449. package/src/components/FormLabel/FormLabel.usage.mdx +125 -0
  450. package/src/components/Icon/Icon.stories.tsx +61 -1
  451. package/src/components/Icon/Icon.usage.mdx +158 -0
  452. package/src/components/IconButton/IconButton.stories.tsx +213 -5
  453. package/src/components/IconButton/IconButton.usage.mdx +275 -0
  454. package/src/components/InfoSprinkle/InfoSprinkle.stories.tsx +77 -1
  455. package/src/components/InfoSprinkle/InfoSprinkle.usage.mdx +189 -0
  456. package/src/components/InlineCode/InlineCode.stories.tsx +75 -0
  457. package/src/components/InlineCode/InlineCode.usage.mdx +142 -0
  458. package/src/components/Input/Input.stories.tsx +180 -0
  459. package/src/components/Input/Input.tsx +4 -0
  460. package/src/components/Input/Input.usage.mdx +278 -0
  461. package/src/components/LineGraph/LineGraph.stories.tsx +112 -0
  462. package/src/components/LineGraph/LineGraph.tsx +4 -5
  463. package/src/components/LineGraph/LineGraph.types.ts +12 -2
  464. package/src/components/LineGraph/LineGraph.usage.mdx +186 -0
  465. package/src/components/LineGraph/seriesColors.test.ts +10 -9
  466. package/src/components/LineGraph/seriesColors.ts +18 -16
  467. package/src/components/Loaders/Loaders.stories.tsx +93 -0
  468. package/src/components/Loaders/Loaders.usage.mdx +180 -0
  469. package/src/components/LogicianProvider/LogicianProvider.usage.mdx +98 -0
  470. package/src/components/Markdown/Markdown.stories.tsx +53 -0
  471. package/src/components/Markdown/Markdown.usage.mdx +182 -0
  472. package/src/components/Masonry/Masonry.stories.tsx +63 -1
  473. package/src/components/Masonry/Masonry.types.ts +8 -3
  474. package/src/components/Masonry/Masonry.usage.mdx +142 -0
  475. package/src/components/MaxLengthIndicator/MaxLengthIndicator.stories.tsx +57 -0
  476. package/src/components/MaxLengthIndicator/MaxLengthIndicator.usage.mdx +125 -0
  477. package/src/components/Menu/Menu.stories.tsx +146 -2
  478. package/src/components/Menu/Menu.usage.mdx +238 -0
  479. package/src/components/Menu/MenuItem.types.ts +8 -0
  480. package/src/components/Modal/Modal.stories.tsx +177 -1
  481. package/src/components/Modal/Modal.usage.mdx +262 -0
  482. package/src/components/Modal/ModalCloseButton.tsx +1 -1
  483. package/src/components/MonthPicker/MonthPicker.stories.tsx +30 -0
  484. package/src/components/MonthPicker/MonthPicker.tsx +7 -1
  485. package/src/components/MonthPicker/MonthPicker.types.ts +8 -1
  486. package/src/components/MonthPicker/MonthPicker.usage.mdx +191 -0
  487. package/src/components/NavList/NavList.stories.tsx +927 -0
  488. package/src/components/NavList/NavList.styles.ts +114 -0
  489. package/src/components/NavList/NavList.test.tsx +1306 -0
  490. package/src/components/NavList/NavList.translations.json +9 -0
  491. package/src/components/NavList/NavList.tsx +160 -0
  492. package/src/components/NavList/NavList.types.ts +155 -0
  493. package/src/components/NavList/NavList.usage.mdx +545 -0
  494. package/src/components/NavList/NavListContext.ts +25 -0
  495. package/src/components/NavList/NavListGroup.tsx +243 -0
  496. package/src/components/NavList/NavListItem.tsx +543 -0
  497. package/src/components/NavList/NavListSkeleton.tsx +57 -0
  498. package/src/components/NavList/index.ts +15 -0
  499. package/src/components/Pagination/Pagination.stories.tsx +90 -1
  500. package/src/components/Pagination/Pagination.tsx +11 -10
  501. package/src/components/Pagination/Pagination.usage.mdx +186 -0
  502. package/src/components/PasswordInput/PasswordInput.stories.tsx +51 -0
  503. package/src/components/PasswordInput/PasswordInput.usage.mdx +193 -0
  504. package/src/components/PinInput/PinInput.stories.tsx +91 -0
  505. package/src/components/PinInput/PinInput.usage.mdx +194 -0
  506. package/src/components/Popover/Popover.stories.tsx +104 -1
  507. package/src/components/Popover/Popover.usage.mdx +197 -0
  508. package/src/components/ProgressBar/ProgressBar.stories.tsx +92 -1
  509. package/src/components/ProgressBar/ProgressBar.types.ts +9 -0
  510. package/src/components/ProgressBar/ProgressBar.usage.mdx +210 -0
  511. package/src/components/Pulse/Pulse.usage.mdx +102 -0
  512. package/src/components/RadialProgress/RadialProgress.stories.tsx +74 -1
  513. package/src/components/RadialProgress/RadialProgress.types.ts +21 -1
  514. package/src/components/RadialProgress/RadialProgress.usage.mdx +153 -0
  515. package/src/components/Radio/Radio.stories.tsx +119 -0
  516. package/src/components/Radio/Radio.usage.mdx +187 -0
  517. package/src/components/Reveal/Reveal.usage.mdx +105 -0
  518. package/src/components/ScaledContext/ScaledContext.usage.mdx +111 -0
  519. package/src/components/SeeMoreButton/SeeMoreButton.stories.tsx +146 -2
  520. package/src/components/SeeMoreButton/SeeMoreButton.types.ts +8 -0
  521. package/src/components/SeeMoreButton/SeeMoreButton.usage.mdx +213 -0
  522. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +69 -0
  523. package/src/components/SegmentedControl/SegmentedControl.styles.ts +38 -0
  524. package/src/components/SegmentedControl/SegmentedControl.tsx +43 -37
  525. package/src/components/SegmentedControl/SegmentedControl.usage.mdx +216 -0
  526. package/src/components/SegmentedProgressBar/SegmentedProgressBar.stories.tsx +54 -0
  527. package/src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts +2 -0
  528. package/src/components/SegmentedProgressBar/SegmentedProgressBar.usage.mdx +145 -0
  529. package/src/components/Select/Combobox.tsx +28 -3
  530. package/src/components/Select/Select.clearTrigger.test.tsx +76 -0
  531. package/src/components/Select/Select.stories.tsx +290 -1
  532. package/src/components/Select/Select.styles.ts +89 -0
  533. package/src/components/Select/Select.tsx +28 -2
  534. package/src/components/Select/Select.usage.mdx +341 -0
  535. package/src/components/Shake/Shake.usage.mdx +107 -0
  536. package/src/components/Slider/Slider.stories.tsx +116 -0
  537. package/src/components/Slider/Slider.usage.mdx +179 -0
  538. package/src/components/Spinner/Spinner.stories.tsx +64 -0
  539. package/src/components/Spinner/Spinner.usage.mdx +136 -0
  540. package/src/components/SwapTransition/SwapTransition.usage.mdx +102 -0
  541. package/src/components/Switch/Switch.stories.tsx +139 -6
  542. package/src/components/Switch/Switch.usage.mdx +200 -0
  543. package/src/components/Switch/SwitchControl.tsx +32 -15
  544. package/src/components/Table/Table.stories.tsx +159 -1
  545. package/src/components/Table/Table.usage.mdx +235 -0
  546. package/src/components/Tabs/Tab/Tab.styles.ts +1 -1
  547. package/src/components/Tabs/Tabs.stories.tsx +86 -0
  548. package/src/components/Tabs/Tabs.usage.mdx +263 -0
  549. package/src/components/Tag/Tag.stories.tsx +181 -4
  550. package/src/components/Tag/Tag.styles.ts +117 -2
  551. package/src/components/Tag/Tag.test.tsx +87 -1
  552. package/src/components/Tag/Tag.tsx +22 -1
  553. package/src/components/Tag/Tag.types.ts +16 -2
  554. package/src/components/Tag/Tag.usage.mdx +257 -0
  555. package/src/components/Tag/index.ts +2 -0
  556. package/src/components/Textarea/Textarea.stories.tsx +113 -0
  557. package/src/components/Textarea/Textarea.tsx +4 -0
  558. package/src/components/Textarea/Textarea.usage.mdx +186 -0
  559. package/src/components/Toast/Toast.stories.tsx +185 -3
  560. package/src/components/Toast/Toast.styles.ts +19 -7
  561. package/src/components/Toast/Toast.tsx +8 -1
  562. package/src/components/Toast/Toast.usage.mdx +265 -0
  563. package/src/components/Tooltip/Tooltip.stories.tsx +86 -1
  564. package/src/components/Tooltip/Tooltip.usage.mdx +219 -0
  565. package/src/components/Tree/Tree.stories.tsx +89 -0
  566. package/src/components/Tree/Tree.usage.mdx +207 -0
  567. package/src/components/Typography/Caption.tsx +0 -1
  568. package/src/components/Typography/H1.tsx +0 -1
  569. package/src/components/Typography/H2.tsx +0 -1
  570. package/src/components/Typography/H3.tsx +0 -1
  571. package/src/components/Typography/H4.tsx +0 -1
  572. package/src/components/Typography/H5.tsx +0 -1
  573. package/src/components/Typography/Link.tsx +0 -1
  574. package/src/components/Typography/Overline.tsx +0 -1
  575. package/src/components/Typography/Subtext.tsx +0 -1
  576. package/src/components/Typography/Subtitle.tsx +0 -1
  577. package/src/components/Typography/Text.tsx +0 -1
  578. package/src/components/Typography/Typography.stories.tsx +117 -0
  579. package/src/components/Typography/Typography.usage.mdx +257 -0
  580. package/src/components/Workflow/Workflow.usage.mdx +199 -0
  581. package/src/components/a11y.kwcag.test.tsx +78 -21
  582. package/src/components/claude.md +24 -1
  583. package/src/components/noRawScales.test.ts +5 -1
  584. package/src/foundations/BrandAssets.mdx +637 -0
  585. package/src/foundations/BrandAssets.stories.tsx +680 -0
  586. package/src/foundations/BrandColour.mdx +103 -4
  587. package/src/foundations/BrandColour.stories.tsx +135 -2
  588. package/src/hooks/useLanguage.ts +8 -3
  589. package/src/hooks/useTranslate.test.tsx +46 -0
  590. package/src/hooks/useTranslate.ts +7 -5
  591. package/src/index.ts +19 -1
  592. package/src/theme/BazePalette.stories.tsx +111 -1
  593. package/src/theme/ControlSizes.stories.tsx +586 -0
  594. package/src/theme/Palette.stories.tsx +2 -2
  595. package/src/theme/SemanticTokens.mdx +118 -19
  596. package/src/theme/claude.md +34 -9
  597. package/src/theme/colors.ts +82 -19
  598. package/src/theme/contrast.test.ts +67 -0
  599. package/src/theme/controlSizes.test.ts +153 -0
  600. package/src/theme/controlSizes.ts +162 -0
  601. package/src/theme/global.ts +20 -1
  602. package/src/theme/index.ts +23 -46
  603. package/src/theme/palette.generated.ts +296 -162
  604. package/src/theme/paletteSwatches.test.ts +1 -1
  605. package/src/theme/paletteSwatches.ts +35 -0
  606. package/src/theme/recipes/avatar.ts +92 -0
  607. package/src/theme/recipes/controls.ts +171 -0
  608. package/src/translations/Defaults.translations.json +14 -0
  609. package/src/utils/disabledControl.ts +8 -1
  610. package/src/utils/focusRing.ts +23 -0
package/MIGRATION-5.0.md CHANGED
@@ -82,7 +82,8 @@ row above; for the rest pick the role by use (`primary.*`, a status family,
82
82
  `fg.placeholder`, `fg.onPrimary`, `fg.link`/`fg.linkHover`,
83
83
  `primary.{hover,active,wash,washActive,selected}`,
84
84
  `secondary.{surface,surfaceStrong,border,fg,fgStrong}`, `action.*`, `send.*`,
85
- `count.*`, `disabled.*`, `focus.ring`, `info.*`, status
85
+ `count.*`, `control.{on,onFg}` (on/off state), `mark.starred` (favourite,
86
+ bookmark), `disabled.*`, `focus.ring`, `info.*`, status
86
87
  `{bg,border,fg,solid,onSolid}` (+`danger.solidHover/solidActive`), `tooltip.*`,
87
88
  `category.{hue}.{surface,fg}`, `neutral.1–12`, `secondary.1–12`. High-contrast
88
89
  values apply under `prefers-contrast: more`.
@@ -143,6 +144,44 @@ Kept as `@deprecated` exports: `ButtonColorPalette`, `buttonColorPalettes`,
143
144
  `getIconButtonStyles(variant, isDestructive)`, `getTagStyles({ tone, selected,
144
145
  category, interactive })`. `LINK_RAMP` entries are plain token strings now.
145
146
 
147
+ ### Control sizes (shared scale)
148
+
149
+ Every control that takes `size` now resolves it through one table,
150
+ `controlSizes` (`src/theme/controlSizes.ts`, exported from the package root):
151
+ the same height, type size, inline padding, icon size and corner per size.
152
+ `Button` is the reference and does not change.
153
+
154
+ | size | height | 14px root | 16px `ScaledContext` | type (textStyle) |
155
+ | ---- | ---------- | --------- | -------------------- | ------------------- |
156
+ | xs | `sizes.8` | 28px | 28px | `xs` (12.25 / 14px) |
157
+ | sm | `sizes.9` | 31.5px | 36px | `sm` (14 / 16px) |
158
+ | md | `sizes.10` | 35px | 40px | `sm` |
159
+ | lg | `sizes.11` | 38.5px | 44px | `md` (14 / 16px) |
160
+
161
+ What changes on screen:
162
+
163
+ - **Interactive `Tag`** (`as="button"`, `selected`, `onClick`, a link) now has
164
+ the control height of its `size` (default `md`, 35px) instead of the badge
165
+ height (`lg` was 21px). Filter chips written as `<Tag as="button" size="lg">`
166
+ become 38.5px — pick `size="xs"` / `"sm"` to match the row they sit in.
167
+ Static tags (badges) are unchanged. `xs` is new.
168
+ - **SegmentedControl** is 1px shorter at every size at the 14px root (it was
169
+ Button + 1px) and its labels use the control type (xs 10.5 → 12.25px,
170
+ sm / md 12.25 → 14px).
171
+ - **Input / PasswordInput / Textarea / Select `lg` (and `xl`)** type goes back
172
+ to the 14 / 16px control step (was 16 / 18.3px); the height is unchanged at
173
+ the root, and inside a `ScaledContext` `lg` is 44px (was 50px).
174
+ - **Combobox `lg`** is 38.5px (was 42px), like every other `lg` control.
175
+ - **Input, Textarea, Select, Combobox** corners are 8px (`radii.md`, Button's)
176
+ instead of 6px.
177
+ - **Switch label** takes the size's type (was a fixed 12.25px).
178
+ - **SingleDatePicker / RangeDatePicker** take `size`; the trigger's calendar
179
+ icon follows the control icon ramp (was a fixed 21px). **MonthPicker** takes
180
+ `size` (was always `md`).
181
+
182
+ To put your own icon in a control, size it from the same table:
183
+ `<SearchIcon boxSize={controlSizes[size].iconBoxSize} />`.
184
+
146
185
  ## 4. After the codemod — what a human checks
147
186
 
148
187
  - Call sites the codemod reported (dynamic props, spreads, raw primitives).
package/README.md CHANGED
@@ -93,6 +93,7 @@ function App() {
93
93
  - **Pagination** - Page navigation component
94
94
  - **Menu** - Dropdown and context menus
95
95
  - **Tabs** - Tab navigation component
96
+ - **NavList** - Side navigation and filter rails (links or filters, not tabs)
96
97
 
97
98
  #### Feedback
98
99
 
package/USAGE.md CHANGED
@@ -298,6 +298,26 @@ function App() {
298
298
  </Button>
299
299
  ```
300
300
 
301
+ ### Rows of controls (filter bars, toolbars, inline forms)
302
+
303
+ Give every control in the row the same `size` and nothing else — no `h=` /
304
+ `height` overrides. `Button`, `IconButton`, `Input`, `Select`, `Combobox`,
305
+ `SegmentedControl`, interactive `Tag`, the date-picker triggers and `Tabs` all
306
+ resolve `size` through the shared `controlSizes` scale, so they share height,
307
+ type, padding and corner per size (also inside `ScaledContext`). See the
308
+ Storybook page **Foundations / Control sizes**.
309
+
310
+ ```tsx
311
+ <HStack gap="2">
312
+ <SegmentedControl size="sm" options={views} />
313
+ <Tag as="button" size="sm" selected>전체 22</Tag>
314
+ <Input size="sm" leftIcon={<SearchIcon boxSize={controlSizes.sm.iconBoxSize} />} />
315
+ <SelectField size="sm" options={sortOptions} ariaLabel="정렬" />
316
+ <RangeDatePicker size="sm" selectedDates={dates} onDateChange={setDates} />
317
+ <IconButton size="sm" aria-label="필터"><FilterIcon boxSize={controlSizes.sm.iconBoxSize} /></IconButton>
318
+ </HStack>
319
+ ```
320
+
301
321
  ### 5. Actions in Feedback Surfaces
302
322
 
303
323
  - A toast takes at most one action, through the `action` prop; dismiss is the ×
@@ -1,7 +1,24 @@
1
- import { Avatar as ChakraAvatar, AvatarRootProps as ChakraAvatarRootProps } from '@chakra-ui/react';
1
+ import { type ComponentProps, type ForwardRefExoticComponent, type ReactNode, type RefAttributes } from 'react';
2
+ import { AvatarGroupProps as ChakraAvatarGroupProps, AvatarRootProps as ChakraAvatarRootProps, AvatarRootProvider as ChakraAvatarRootProvider, type ConditionalValue } from '@chakra-ui/react';
2
3
  import { SystemHue } from '@/theme/colors';
3
- export type { AvatarFallbackProps, AvatarGroupProps, AvatarIconProps, AvatarImageProps, AvatarRootProps, } from '@chakra-ui/react';
4
- export type AvatarProps = ChakraAvatarRootProps & {
4
+ export type { AvatarFallbackProps, AvatarIconProps, AvatarImageProps, } from '@chakra-ui/react';
5
+ /**
6
+ * Chakra's variants plus Logician's `logo`. Chakra types `variant` from its
7
+ * own recipe, so the theme-level `logo` variant needs widening here.
8
+ */
9
+ export type AvatarVariant = 'subtle' | 'solid' | 'outline' | 'logo';
10
+ /** `P` with `variant` widened to {@link AvatarVariant}. */
11
+ type WithAvatarVariant<P> = Omit<P, 'variant'> & {
12
+ /**
13
+ * `subtle` (default): the `colorPalette` fill — a person's category hue, or
14
+ * the neutral pair. `logo`: the light `bg.logo` tile for model, chatbot and
15
+ * brand marks, the same in both modes.
16
+ */
17
+ variant?: ConditionalValue<AvatarVariant>;
18
+ };
19
+ export type AvatarRootProps = WithAvatarVariant<ChakraAvatarRootProps>;
20
+ export type AvatarRootProviderProps = WithAvatarVariant<ComponentProps<typeof ChakraAvatarRootProvider>>;
21
+ export type AvatarProps = AvatarRootProps & {
5
22
  src?: string;
6
23
  name?: string;
7
24
  /**
@@ -14,6 +31,15 @@ export type AvatarProps = ChakraAvatarRootProps & {
14
31
  */
15
32
  colorHue?: SystemHue;
16
33
  };
34
+ export interface AvatarGroupProps extends Omit<WithAvatarVariant<ChakraAvatarGroupProps>, 'children'> {
35
+ children?: ReactNode;
36
+ /**
37
+ * Show at most this many avatars; the rest collapse into a trailing "+N"
38
+ * counter in the neutral pair. Omit to show all. Chakra 3 dropped 2.x's
39
+ * `max`; this restores it.
40
+ */
41
+ max?: number;
42
+ }
17
43
  /**
18
44
  * A stable hash of `name` into one of `SYSTEM_HUE_NAMES`, so a given name
19
45
  * always lands on the same hue (no lookup table, nothing to keep in sync) and
@@ -24,15 +50,32 @@ export type AvatarProps = ChakraAvatarRootProps & {
24
50
  */
25
51
  export declare function hueForName(name: string): SystemHue;
26
52
  export declare function hueForName(name: string | undefined): SystemHue | undefined;
53
+ /**
54
+ * The `colorPalette` an avatar paints with: `category.<hue>` for a person
55
+ * (`colorHue`, else {@link hueForName}), `category.neutral` with no name. The
56
+ * avatar recipe maps `colorPalette.surface` / `colorPalette.fg` onto it.
57
+ */
58
+ export declare function avatarColorPalette(name: string | undefined, colorHue?: SystemHue): `category.${SystemHue | 'neutral'}`;
27
59
  /**
28
60
  * Fallback (initials / icon) colours: the person's hue when there is one,
29
61
  * otherwise the neutral pair Badge `neutral` uses.
62
+ *
63
+ * @deprecated The avatar recipe now paints the root from `colorPalette` (see
64
+ * {@link avatarColorPalette}); `Avatar` no longer calls this. Kept for
65
+ * callers that colour a non-avatar element to match a person. Removed in 6.0.
30
66
  */
31
67
  export declare function avatarFallbackColors(name: string | undefined, colorHue?: SystemHue): {
32
68
  bg: string;
33
69
  color: string;
34
70
  };
35
- export declare const Avatar: import("react").ForwardRefExoticComponent<ChakraAvatar.RootProps & {
71
+ export declare const Avatar: ForwardRefExoticComponent<Omit<ChakraAvatarRootProps, "variant"> & {
72
+ /**
73
+ * `subtle` (default): the `colorPalette` fill — a person's category hue, or
74
+ * the neutral pair. `logo`: the light `bg.logo` tile for model, chatbot and
75
+ * brand marks, the same in both modes.
76
+ */
77
+ variant?: ConditionalValue<AvatarVariant>;
78
+ } & {
36
79
  src?: string;
37
80
  name?: string;
38
81
  /**
@@ -44,13 +87,27 @@ export declare const Avatar: import("react").ForwardRefExoticComponent<ChakraAva
44
87
  * (`bg.muted` / `secondary.fgStrong`), not a hue.
45
88
  */
46
89
  colorHue?: SystemHue;
47
- } & import("react").RefAttributes<HTMLDivElement>> & {
48
- Root: import("react").ForwardRefExoticComponent<ChakraAvatar.RootProps & import("react").RefAttributes<HTMLDivElement>>;
49
- RootProvider: import("react").ForwardRefExoticComponent<import("node_modules/@chakra-ui/react/dist/types/components/avatar/avatar").AvatarRootProviderProps & import("react").RefAttributes<HTMLDivElement>>;
50
- Fallback: import("react").ForwardRefExoticComponent<ChakraAvatar.FallbackProps & import("react").RefAttributes<HTMLDivElement>>;
51
- Image: import("react").ForwardRefExoticComponent<ChakraAvatar.ImageProps & import("react").RefAttributes<HTMLImageElement>>;
52
- Icon: import("react").ForwardRefExoticComponent<ChakraAvatar.IconProps & import("react").RefAttributes<SVGElement>>;
53
- Group: import("react").ForwardRefExoticComponent<import("@chakra-ui/react").AvatarGroupProps & import("react").RefAttributes<HTMLDivElement>>;
90
+ } & RefAttributes<HTMLDivElement>> & {
91
+ Root: ForwardRefExoticComponent<Omit<ChakraAvatarRootProps, "variant"> & {
92
+ /**
93
+ * `subtle` (default): the `colorPalette` fill — a person's category hue, or
94
+ * the neutral pair. `logo`: the light `bg.logo` tile for model, chatbot and
95
+ * brand marks, the same in both modes.
96
+ */
97
+ variant?: ConditionalValue<AvatarVariant>;
98
+ } & RefAttributes<HTMLDivElement>>;
99
+ RootProvider: ForwardRefExoticComponent<Omit<import("node_modules/@chakra-ui/react/dist/types/components/avatar/avatar").AvatarRootProviderProps & RefAttributes<HTMLDivElement>, "variant"> & {
100
+ /**
101
+ * `subtle` (default): the `colorPalette` fill — a person's category hue, or
102
+ * the neutral pair. `logo`: the light `bg.logo` tile for model, chatbot and
103
+ * brand marks, the same in both modes.
104
+ */
105
+ variant?: ConditionalValue<AvatarVariant>;
106
+ } & RefAttributes<HTMLDivElement>>;
107
+ Fallback: ForwardRefExoticComponent<import("@chakra-ui/react").AvatarFallbackProps & RefAttributes<HTMLDivElement>>;
108
+ Image: ForwardRefExoticComponent<import("@chakra-ui/react").AvatarImageProps & RefAttributes<HTMLImageElement>>;
109
+ Icon: ForwardRefExoticComponent<import("@chakra-ui/react").AvatarIconProps & RefAttributes<SVGElement>>;
110
+ Group: ForwardRefExoticComponent<AvatarGroupProps & RefAttributes<HTMLDivElement>>;
54
111
  Context: (props: import("@ark-ui/react").AvatarContextProps) => import("react").ReactNode;
55
112
  };
56
113
  //# sourceMappingURL=Avatar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,IAAI,YAAY,EAOtB,eAAe,IAAI,qBAAqB,EAEzC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAoB,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE7D,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,WAAW,GAAG,qBAAqB,GAAG;IAChD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,SAA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ui/react');
7
7
  var colors = require('../../theme/colors.js');
8
8
 
9
+ // Chakra's parts, typed for the `logo` variant.
10
+ const AvatarRoot = react.AvatarRoot;
11
+ const AvatarRootProvider = react.AvatarRootProvider;
12
+ const ChakraAvatarGroupTyped = react.AvatarGroup;
9
13
  function hueForName(name) {
10
14
  // No name, no identity to colour: `undefined` so the caller falls back to
11
15
  // the neutral pair. `SYSTEM_HUE_NAMES[0]` is red, and a red placeholder
@@ -21,9 +25,22 @@ function hueForName(name) {
21
25
  const index = Math.abs(hash) % colors.SYSTEM_HUE_NAMES.length;
22
26
  return colors.SYSTEM_HUE_NAMES[index];
23
27
  }
28
+ /**
29
+ * The `colorPalette` an avatar paints with: `category.<hue>` for a person
30
+ * (`colorHue`, else {@link hueForName}), `category.neutral` with no name. The
31
+ * avatar recipe maps `colorPalette.surface` / `colorPalette.fg` onto it.
32
+ */
33
+ function avatarColorPalette(name, colorHue) {
34
+ const hue = colorHue ?? hueForName(name);
35
+ return hue ? `category.${hue}` : 'category.neutral';
36
+ }
24
37
  /**
25
38
  * Fallback (initials / icon) colours: the person's hue when there is one,
26
39
  * otherwise the neutral pair Badge `neutral` uses.
40
+ *
41
+ * @deprecated The avatar recipe now paints the root from `colorPalette` (see
42
+ * {@link avatarColorPalette}); `Avatar` no longer calls this. Kept for
43
+ * callers that colour a non-avatar element to match a person. Removed in 6.0.
27
44
  */
28
45
  function avatarFallbackColors(name, colorHue) {
29
46
  const hue = colorHue ?? hueForName(name);
@@ -31,23 +48,42 @@ function avatarFallbackColors(name, colorHue) {
31
48
  return { bg: 'bg.muted', color: 'secondary.fgStrong' };
32
49
  return { bg: `category.${hue}.surface`, color: `category.${hue}.fg` };
33
50
  }
51
+ /**
52
+ * Chakra's `AvatarGroup` (overlapping avatars; `size` / `variant` reach every
53
+ * child through the recipe props context) with the `max` overflow cap. The
54
+ * counter is always the neutral `subtle` pair, whatever the group's variant:
55
+ * it is a count, not a person or a logo.
56
+ */
57
+ const AvatarGroup = React.forwardRef(({ max, children, ...rest }, ref) => {
58
+ const items = React.Children.toArray(children);
59
+ const visible = typeof max === 'number' ? items.slice(0, Math.max(0, max)) : items;
60
+ const overflow = items.length - visible.length;
61
+ return (jsxRuntime.jsxs(ChakraAvatarGroupTyped, { ref: ref, ...rest, children: [visible, overflow > 0 && (
62
+ // Spans so a group inside a button (a popover trigger) stays phrasing
63
+ // content; the recipe sets the display, so nothing else changes.
64
+ jsxRuntime.jsx(AvatarRoot, { as: "span", colorPalette: "category.neutral", variant: "subtle", children: jsxRuntime.jsxs(react.AvatarFallback, { as: "span", children: ["+", overflow] }) }))] }));
65
+ });
66
+ AvatarGroup.displayName = 'AvatarGroup';
34
67
  const AvatarComponent = React.forwardRef((props, ref) => {
35
68
  const { src, name, colorHue, ...rest } = props;
36
- const fallback = avatarFallbackColors(name, colorHue);
37
- return (jsxRuntime.jsxs(react.Avatar.Root, { ref: ref, borderWidth: "1px", borderColor: "border.subtle", overflow: "hidden", bgColor: "transparent", ...rest, children: [jsxRuntime.jsx(react.Avatar.Fallback, { name: name, bg: fallback.bg, color: fallback.color }), jsxRuntime.jsx(react.Avatar.Image, { src: src })] }));
69
+ // Fill, text colour, border and the full-circle fallback all come from
70
+ // the avatar recipe (src/theme/recipes/avatar.ts); only the palette is
71
+ // chosen here. A caller's own `colorPalette` still wins.
72
+ return (jsxRuntime.jsxs(AvatarRoot, { ref: ref, colorPalette: avatarColorPalette(name, colorHue), ...rest, children: [jsxRuntime.jsx(react.AvatarFallback, { name: name }), jsxRuntime.jsx(react.AvatarImage, { src: src })] }));
38
73
  });
39
74
  AvatarComponent.displayName = 'Avatar';
40
75
  const Avatar = Object.assign(AvatarComponent, {
41
- Root: react.AvatarRoot,
42
- RootProvider: react.AvatarRootProvider,
76
+ Root: AvatarRoot,
77
+ RootProvider: AvatarRootProvider,
43
78
  Fallback: react.AvatarFallback,
44
79
  Image: react.AvatarImage,
45
80
  Icon: react.AvatarIcon,
46
- Group: react.AvatarGroup,
81
+ Group: AvatarGroup,
47
82
  Context: react.AvatarContext,
48
83
  });
49
84
 
50
85
  exports.Avatar = Avatar;
86
+ exports.avatarColorPalette = avatarColorPalette;
51
87
  exports.avatarFallbackColors = avatarFallbackColors;
52
88
  exports.hueForName = hueForName;
53
89
  //# sourceMappingURL=Avatar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":[null],"names":["SYSTEM_HUE_NAMES","forwardRef","_jsxs","ChakraAvatar","_jsx","AvatarRoot","AvatarRootProvider","AvatarFallback","AvatarImage","AvatarIcon","AvatarGroup","AvatarContext"],"mappings":";;;;;;;;AA+CM,SAAU,UAAU,CAAC,IAAwB,EAAA;;;;AAIjD,IAAA,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,SAAS;IAC3B,IAAI,IAAI,GAAG,CAAC;AACZ,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;;;AAGvC,QAAA,IAAI,GAAG,CAAC,IAAI,GAAG,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7C;AACA,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAGA,uBAAgB,CAAC,MAAM;AACtD,IAAA,OAAOA,uBAAgB,CAAC,KAAK,CAAC;AAChC;AAEA;;;AAGG;AACG,SAAU,oBAAoB,CAClC,IAAwB,EACxB,QAAoB,EAAA;IAEpB,MAAM,GAAG,GAAG,QAAQ,IAAI,UAAU,CAAC,IAAI,CAAC;AACxC,IAAA,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,oBAAoB,EAAE;AAChE,IAAA,OAAO,EAAE,EAAE,EAAE,CAAA,SAAA,EAAY,GAAG,CAAA,QAAA,CAAU,EAAE,KAAK,EAAE,CAAA,SAAA,EAAY,GAAG,CAAA,GAAA,CAAK,EAAE;AACvE;AAEA,MAAM,eAAe,GAAGC,gBAAU,CAChC,CAAC,KAAK,EAAE,GAAG,KAAI;AACb,IAAA,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK;IAC9C,MAAM,QAAQ,GAAG,oBAAoB,CAAC,IAAI,EAAE,QAAQ,CAAC;AACrD,IAAA,QACEC,eAAA,CAACC,YAAY,CAAC,IAAI,EAAA,EAChB,GAAG,EAAE,GAAG,EACR,WAAW,EAAC,KAAK,EACjB,WAAW,EAAC,eAAe,EAC3B,QAAQ,EAAC,QAAQ,EACjB,OAAO,EAAC,aAAa,EAAA,GACjB,IAAI,EAAA,QAAA,EAAA,CAERC,cAAA,CAACD,YAAY,CAAC,QAAQ,EAAA,EACpB,IAAI,EAAE,IAAI,EACV,EAAE,EAAE,QAAQ,CAAC,EAAE,EACf,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAA,CACrB,EACFC,cAAA,CAACD,YAAY,CAAC,KAAK,EAAA,EAAC,GAAG,EAAE,GAAG,EAAA,CAAI,CAAA,EAAA,CACd;AAExB,CAAC,CACF;AAED,eAAe,CAAC,WAAW,GAAG,QAAQ;MAEzB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;AACnD,IAAA,IAAI,EAAEE,gBAAU;AAChB,IAAA,YAAY,EAAEC,wBAAkB;AAChC,IAAA,QAAQ,EAAEC,oBAAc;AACxB,IAAA,KAAK,EAAEC,iBAAW;AAClB,IAAA,IAAI,EAAEC,gBAAU;AAChB,IAAA,KAAK,EAAEC,iBAAW;AAClB,IAAA,OAAO,EAAEC,mBAAa;AACvB,CAAA;;;;;;"}
1
+ {"version":3,"file":"Avatar.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":[null],"names":["ChakraAvatarRoot","ChakraAvatarRootProvider","ChakraAvatarGroup","SYSTEM_HUE_NAMES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AA,EAAA,CAERC,cAAA,CAACC,oBAAc,EAAA,EAAC,IAAI,EAAE,IAAI,GAAI,EAC9BD,cAAA,CAACE,iBAAW,EAAA,EAAC,GAAG,EAAE,GAAG,EAAA,CAAI,CAAA,EAAA,CACd;AAEjB,CAAC,CACF;AAED,eAAe,CAAC,WAAW,GAAG,QAAQ;MAEzB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;AACnD,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,YAAY,EAAE,kBAAkB;AAChC,IAAA,QAAQ,EAAED,oBAAc;AACxB,IAAA,KAAK,EAAEC,iBAAW;AAClB,IAAA,IAAI,EAAEC,gBAAU;AAChB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,OAAO,EAAEC,mBAAa;AACvB,CAAA;;;;;;;"}
@@ -1,9 +1,13 @@
1
1
  "use client";
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
- import { forwardRef } from 'react';
4
- import { Avatar as Avatar$1, AvatarContext, AvatarGroup, AvatarIcon, AvatarImage, AvatarFallback, AvatarRootProvider, AvatarRoot } from '@chakra-ui/react';
3
+ import { forwardRef, Children } from 'react';
4
+ import { AvatarGroup as AvatarGroup$1, AvatarRoot as AvatarRoot$1, AvatarFallback, AvatarImage, AvatarContext, AvatarIcon, AvatarRootProvider as AvatarRootProvider$1 } from '@chakra-ui/react';
5
5
  import { SYSTEM_HUE_NAMES } from '../../theme/colors.mjs';
6
6
 
7
+ // Chakra's parts, typed for the `logo` variant.
8
+ const AvatarRoot = AvatarRoot$1;
9
+ const AvatarRootProvider = AvatarRootProvider$1;
10
+ const ChakraAvatarGroupTyped = AvatarGroup$1;
7
11
  function hueForName(name) {
8
12
  // No name, no identity to colour: `undefined` so the caller falls back to
9
13
  // the neutral pair. `SYSTEM_HUE_NAMES[0]` is red, and a red placeholder
@@ -19,9 +23,22 @@ function hueForName(name) {
19
23
  const index = Math.abs(hash) % SYSTEM_HUE_NAMES.length;
20
24
  return SYSTEM_HUE_NAMES[index];
21
25
  }
26
+ /**
27
+ * The `colorPalette` an avatar paints with: `category.<hue>` for a person
28
+ * (`colorHue`, else {@link hueForName}), `category.neutral` with no name. The
29
+ * avatar recipe maps `colorPalette.surface` / `colorPalette.fg` onto it.
30
+ */
31
+ function avatarColorPalette(name, colorHue) {
32
+ const hue = colorHue ?? hueForName(name);
33
+ return hue ? `category.${hue}` : 'category.neutral';
34
+ }
22
35
  /**
23
36
  * Fallback (initials / icon) colours: the person's hue when there is one,
24
37
  * otherwise the neutral pair Badge `neutral` uses.
38
+ *
39
+ * @deprecated The avatar recipe now paints the root from `colorPalette` (see
40
+ * {@link avatarColorPalette}); `Avatar` no longer calls this. Kept for
41
+ * callers that colour a non-avatar element to match a person. Removed in 6.0.
25
42
  */
26
43
  function avatarFallbackColors(name, colorHue) {
27
44
  const hue = colorHue ?? hueForName(name);
@@ -29,10 +46,28 @@ function avatarFallbackColors(name, colorHue) {
29
46
  return { bg: 'bg.muted', color: 'secondary.fgStrong' };
30
47
  return { bg: `category.${hue}.surface`, color: `category.${hue}.fg` };
31
48
  }
49
+ /**
50
+ * Chakra's `AvatarGroup` (overlapping avatars; `size` / `variant` reach every
51
+ * child through the recipe props context) with the `max` overflow cap. The
52
+ * counter is always the neutral `subtle` pair, whatever the group's variant:
53
+ * it is a count, not a person or a logo.
54
+ */
55
+ const AvatarGroup = forwardRef(({ max, children, ...rest }, ref) => {
56
+ const items = Children.toArray(children);
57
+ const visible = typeof max === 'number' ? items.slice(0, Math.max(0, max)) : items;
58
+ const overflow = items.length - visible.length;
59
+ return (jsxs(ChakraAvatarGroupTyped, { ref: ref, ...rest, children: [visible, overflow > 0 && (
60
+ // Spans so a group inside a button (a popover trigger) stays phrasing
61
+ // content; the recipe sets the display, so nothing else changes.
62
+ jsx(AvatarRoot, { as: "span", colorPalette: "category.neutral", variant: "subtle", children: jsxs(AvatarFallback, { as: "span", children: ["+", overflow] }) }))] }));
63
+ });
64
+ AvatarGroup.displayName = 'AvatarGroup';
32
65
  const AvatarComponent = forwardRef((props, ref) => {
33
66
  const { src, name, colorHue, ...rest } = props;
34
- const fallback = avatarFallbackColors(name, colorHue);
35
- return (jsxs(Avatar$1.Root, { ref: ref, borderWidth: "1px", borderColor: "border.subtle", overflow: "hidden", bgColor: "transparent", ...rest, children: [jsx(Avatar$1.Fallback, { name: name, bg: fallback.bg, color: fallback.color }), jsx(Avatar$1.Image, { src: src })] }));
67
+ // Fill, text colour, border and the full-circle fallback all come from
68
+ // the avatar recipe (src/theme/recipes/avatar.ts); only the palette is
69
+ // chosen here. A caller's own `colorPalette` still wins.
70
+ return (jsxs(AvatarRoot, { ref: ref, colorPalette: avatarColorPalette(name, colorHue), ...rest, children: [jsx(AvatarFallback, { name: name }), jsx(AvatarImage, { src: src })] }));
36
71
  });
37
72
  AvatarComponent.displayName = 'Avatar';
38
73
  const Avatar = Object.assign(AvatarComponent, {
@@ -45,5 +80,5 @@ const Avatar = Object.assign(AvatarComponent, {
45
80
  Context: AvatarContext,
46
81
  });
47
82
 
48
- export { Avatar, avatarFallbackColors, hueForName };
83
+ export { Avatar, avatarColorPalette, avatarFallbackColors, hueForName };
49
84
  //# sourceMappingURL=Avatar.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.mjs","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":[null],"names":["_jsxs","ChakraAvatar","_jsx"],"mappings":";;;;;;AA+CM,SAAU,UAAU,CAAC,IAAwB,EAAA;;;;AAIjD,IAAA,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,SAAS;IAC3B,IAAI,IAAI,GAAG,CAAC;AACZ,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;;;AAGvC,QAAA,IAAI,GAAG,CAAC,IAAI,GAAG,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;IAC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,CAAC,WAAW,GAAG,QAAQ;MAEzB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;AACnD,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,YAAY,EAAE,kBAAkB;AAChC,IAAA,QAAQ,EAAE,cAAc;AACxB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,OAAO,EAAE,aAAa;AACvB,CAAA;;;;"}
1
+ {"version":3,"file":"Avatar.mjs","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":[null],"names":["ChakraAvatarRoot","ChakraAvatarRootProvider","ChakraAvatarGroup","_jsxs","_jsx"],"mappings":";;;;;;AAkDA;AACA,MAAM,UAAU,GAAGA,YAElB;AACD,MAAM,kBAAkB,GACtBC,oBAEC;AACH,MAAM,sBAAsB,GAAGC,aAE9B;AAuCK,SAAU,UAAU,CAAC,IAAwB,EAAA;;;;AAIjD,IAAA,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,SAAS;IAC3B,IAAI,IAAI,GAAG,CAAC;AACZ,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;;;AAGvC,QAAA,IAAI,GAAG,CAAC,IAAI,GAAG,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7C;AACA,IAAA,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC,MAAM;AACtD,IAAA,OAAO,gBAAgB,CAAC,KAAK,CAAC;AAChC;AAEA;;;;AAIG;AACG,SAAU,kBAAkB,CAChC,IAAwB,EACxB,QAAoB,EAAA;IAEpB,MAAM,GAAG,GAAG,QAAQ,IAAI,UAAU,CAAC,IAAI,CAAC;IACxC,OAAO,GAAG,GAAG,CAAA,SAAA,EAA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AA,CACsB;AAE7B,CAAC,CACF;AAED,WAAW,CAAC,WAAW,GAAG,aAAa;AAEvC,MAAM,eAAe,GAAG,UAAU,CAChC,CAAC,KAAK,EAAE,GAAG,KAAI;AACb,IAAA,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK;;;;AAI9C,IAAA,QACEA,IAAA,CAAC,UAAU,EAAA,EACT,GAAG,EAAE,GAAG,EACR,YAAY,EAAE,kBAAkB,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAA,GAC5C,IAAI,EAAA,QAAA,EAAA,CAERC,GAAA,CAAC,cAAc,EAAA,EAAC,IAAI,EAAE,IAAI,GAAI,EAC9BA,GAAA,CAAC,WAAW,EAAA,EAAC,GAAG,EAAE,GAAG,EAAA,CAAI,CAAA,EAAA,CACd;AAEjB,CAAC,CACF;AAED,eAAe,CAAC,WAAW,GAAG,QAAQ;MAEzB,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;AACnD,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,YAAY,EAAE,kBAAkB;AAChC,IAAA,QAAQ,EAAE,cAAc;AACxB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,OAAO,EAAE,aAAa;AACvB,CAAA;;;;"}
@@ -1,3 +1,3 @@
1
- export type { AvatarFallbackProps, AvatarGroupProps, AvatarIconProps, AvatarImageProps, AvatarProps, AvatarRootProps, } from './Avatar';
2
- export { Avatar, avatarFallbackColors, hueForName } from './Avatar';
1
+ export type { AvatarFallbackProps, AvatarGroupProps, AvatarIconProps, AvatarImageProps, AvatarProps, AvatarRootProps, AvatarRootProviderProps, AvatarVariant, } from './Avatar';
2
+ export { Avatar, avatarColorPalette, avatarFallbackColors, hueForName, } from './Avatar';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/index.tsx"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,eAAe,GAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Avatar/index.tsx"],"names":[],"mappings":"AAAA,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,aAAa,GACd,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,MAAM,EACN,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,GACX,MAAM,UAAU,CAAC"}
@@ -1,8 +1,31 @@
1
1
  import { BoxProps } from '@chakra-ui/react';
2
2
  export type BannerSize = 'sm' | 'md' | 'lg';
3
+ /**
4
+ * Banner variants (5.0).
5
+ *
6
+ * - `info` (default): a system fact the reader should know before acting
7
+ * (a setting that is locked, where a value comes from). Nothing is wrong.
8
+ * - `success`: something finished and the result stays relevant on this
9
+ * screen.
10
+ * - `warning`: it still works, but read this first (irreversible step,
11
+ * something expiring).
12
+ * - `danger`: it failed or is blocked, and the reader has to do something.
13
+ * - `neutral`: a brand notice with no status (`primary.main` accent bar).
14
+ */
15
+ export type BannerVariant = 'info' | 'success' | 'warning' | 'danger' | 'neutral';
3
16
  export interface BannerProps extends BoxProps {
4
- variant?: 'info' | 'success' | 'warning' | 'danger' | 'neutral';
17
+ /**
18
+ * Meaning of the message. Status variants only for a status every reader
19
+ * shares; `neutral` for a notice with none.
20
+ * @default 'info'
21
+ */
22
+ variant?: BannerVariant;
23
+ /** Hide the leading status icon. The text must still say the status. */
5
24
  hideIcon?: boolean;
25
+ /**
26
+ * `sm` = subtext, `md` = body text, `lg` = h5 text style.
27
+ * @default 'md'
28
+ */
6
29
  size?: BannerSize;
7
30
  }
8
31
  //# sourceMappingURL=Banner.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.types.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/Banner.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,WAAY,SAAQ,QAAQ;IAC3C,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB"}
1
+ {"version":3,"file":"Banner.types.d.ts","sourceRoot":"","sources":["../../../src/components/Banner/Banner.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,SAAS,GACT,SAAS,GACT,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,WAAW,WAAY,SAAQ,QAAQ;IAC3C;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB"}
@@ -3,7 +3,7 @@
3
3
  * (`header` / `body` / `footer`) that have no machine behaviour of their own —
4
4
  * the same extension Chakra makes for its dialog-backed `Drawer`.
5
5
  */
6
- export declare const bottomSheetAnatomy: import("@zag-js/anatomy").AnatomyInstance<"content" | "body" | "footer" | "header" | "title" | "positioner" | "description" | "trigger" | "backdrop" | "grabber" | "grabberIndicator" | "closeTrigger" | "swipeArea">;
6
+ export declare const bottomSheetAnatomy: import("@zag-js/anatomy").AnatomyInstance<"content" | "body" | "footer" | "header" | "title" | "description" | "positioner" | "trigger" | "backdrop" | "grabber" | "grabberIndicator" | "closeTrigger" | "swipeArea">;
7
7
  /**
8
8
  * The BottomSheet's slot recipe.
9
9
  *
@@ -28,5 +28,5 @@ export declare const bottomSheetAnatomy: import("@zag-js/anatomy").AnatomyInstan
28
28
  * drops to `motion.instant` so the sheet lands on its snap point without
29
29
  * travelling there.
30
30
  */
31
- export declare const bottomSheetSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"content" | "body" | "footer" | "header" | "title" | "positioner" | "description" | "trigger" | "backdrop" | "grabber" | "grabberIndicator" | "closeTrigger" | "swipeArea", import("@chakra-ui/react").SlotRecipeVariantRecord<"content" | "body" | "footer" | "header" | "title" | "positioner" | "description" | "trigger" | "backdrop" | "grabber" | "grabberIndicator" | "closeTrigger" | "swipeArea">>;
31
+ export declare const bottomSheetSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"content" | "body" | "footer" | "header" | "title" | "description" | "positioner" | "trigger" | "backdrop" | "grabber" | "grabberIndicator" | "closeTrigger" | "swipeArea", import("@chakra-ui/react").SlotRecipeVariantRecord<"content" | "body" | "footer" | "header" | "title" | "description" | "positioner" | "trigger" | "backdrop" | "grabber" | "grabberIndicator" | "closeTrigger" | "swipeArea">>;
32
32
  //# sourceMappingURL=BottomSheet.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,cAAc,EAA8B,MAAM,gBAAgB,CAAC;AA8J5E,eAAO,MAAM,MAAM,gEAA0C,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,EAA8B,MAAM,gBAAgB,CAAC;AAwM5E,eAAO,MAAM,MAAM,gEAA0C,CAAC"}
@@ -4,6 +4,7 @@
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var React = require('react');
6
6
  var react = require('@chakra-ui/react');
7
+ var useTranslate = require('../../hooks/useTranslate.js');
7
8
  var focusRing = require('../../utils/focusRing.js');
8
9
  var mergeCss = require('../../utils/mergeCss.js');
9
10
  var polymorphic = require('../../types/polymorphic.js');
@@ -27,11 +28,18 @@ var Button_styles = require('./Button.styles.js');
27
28
  * <Button as="a" href="/docs" target="_blank">문서</Button>
28
29
  * ```
29
30
  */
30
- const ButtonImpl = React.forwardRef(({ variant: variantProp, isDestructive: isDestructiveProp = false, size, lift, children, _hover: hoverProp, _active: activeProp, _disabled: disabledProp, css: cssProp, ...restWithLegacy }, ref) => {
31
+ const ButtonImpl = React.forwardRef(({ variant: variantProp, isDestructive: isDestructiveProp = false, size, lift, disabled, focusableWhenDisabled = false, onDisabledClick, onClick, children, _hover: hoverProp, _active: activeProp, _disabled: disabledProp, css: cssProp, ...restWithLegacy }, ref) => {
31
32
  // 4.x callers (untyped JS, `as any`) can still hand us `colorPalette` and
32
33
  // an old variant name. Strip it so it never reaches Chakra's own recipe,
33
34
  // and map the pair onto a 5.0 role — see `Button.legacy.ts`.
34
- const { colorPalette: legacyPalette, ...rest } = restWithLegacy;
35
+ const { colorPalette: legacyPalette, loadingText: loadingTextProp, ...rest } = restWithLegacy;
36
+ // A busy button says what it is doing: 처리 중 unless the call site names
37
+ // the verb (저장 중). `loadingText={null}` opts out — spinner only, and the
38
+ // button keeps its width.
39
+ const translate = useTranslate.useTranslate();
40
+ const loadingText = loadingTextProp === undefined
41
+ ? translate('processing')
42
+ : (loadingTextProp ?? undefined);
35
43
  let variant = variantProp ?? 'subtle';
36
44
  let isDestructive = isDestructiveProp;
37
45
  if (Button_legacy.isLegacyButtonProps('button', legacyPalette, variantProp)) {
@@ -41,6 +49,23 @@ const ButtonImpl = React.forwardRef(({ variant: variantProp, isDestructive: isDe
41
49
  isDestructive = isDestructive || resolved.isDestructive;
42
50
  }
43
51
  const base = Button_styles.getButtonStyles(variant, isDestructive);
52
+ // `focusableWhenDisabled`: disabled by ARIA, not by the attribute, so the
53
+ // button stays focusable and can answer a press. `aria-disabled=true` is
54
+ // in Chakra's `_disabled` condition, so the disabled colours and cursor
55
+ // still apply; `data-disabled` is what `_hover` / `_active` exclude, so
56
+ // without it the button would still react to the pointer. `loading` keeps
57
+ // the native attribute (Chakra sets it) — see `focusableWhenDisabled`.
58
+ const softDisabled = !!disabled && focusableWhenDisabled && !rest.loading;
59
+ const handleClick = softDisabled
60
+ ? (event) => {
61
+ // Also what stops a `type="submit"` button from submitting.
62
+ event.preventDefault();
63
+ // A native disabled button sends no click to its ancestors either —
64
+ // a clickable row around it must not run its own action.
65
+ event.stopPropagation();
66
+ onDisabledClick?.(event);
67
+ }
68
+ : onClick;
44
69
  // Merged rather than spread after: each variant already owns `_hover` and
45
70
  // `_active` for its colours, and replacing either would drop them.
46
71
  const styles = lift
@@ -104,7 +129,10 @@ const ButtonImpl = React.forwardRef(({ variant: variantProp, isDestructive: isDe
104
129
  // Two clocks on one element — the press is faster than the colour
105
130
  // change — so the shorthand is written out and only the reduced-motion
106
131
  // guard comes from the vocabulary.
107
- transition: Button_styles.buttonTransition, animationStyle: "composite", ref: ref, "data-variant": variant, "data-destructive": isDestructive || undefined, ...rest,
132
+ transition: Button_styles.buttonTransition, animationStyle: "composite", ref: ref, "data-variant": variant, "data-destructive": isDestructive || undefined, loadingText: loadingText, disabled: softDisabled ? undefined : disabled, onClick: handleClick, ...rest, ...(softDisabled && {
133
+ 'aria-disabled': true,
134
+ 'data-disabled': '',
135
+ }),
108
136
  // The `action` icon rule lives in `css` (a nested selector cannot be a
109
137
  // style prop); merged so a call site's `css` adds to it.
110
138
  css: mergeCss.mergeCss(base.css, cssProp), children: children }));
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":[null],"names":["forwardRef","isLegacyButtonProps","resolveLegacyButtonVariant","warnLegacyButtonProps","getButtonStyles","_jsx","ChakraButton","mergeCss","focusRing","buttonTransition","polymorphic"],"mappings":";;;;;;;;;;;;AAeA;;;;;;;;;;;;;;;;AAgBG;AACH,MAAM,UAAU,GAAGA,gBAAU,CAC3B,CACE,EACE,OAAO,EAAE,WAAW,EACpB,aAAa,EAAE,iBAAiB,GAAG,KAAK,EACxC,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,YAAY,EACvB,GAAG,EAAE,OAAO,EACZ,GAAG,cAAc,EAClB,EACD,GAAG,KACD;;;;IAIF,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,GAC5C,cAAoE;AAEtE,IAAA,IAAI,OAAO,GAAkB,WAAW,IAAI,QAAQ;IACpD,IAAI,aAAa,GAAG,iBAAiB;IACrC,IAAIC,iCAAmB,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE;QAC7D,MAAM,QAAQ,GAAGC,wCAA0B,CACzC,QAAQ,EACR,aAAa,EACb,WAAW,CACZ;QACDC,mCAAqB,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,CAAC;AACrE,QAAA,OAAO,GAAG,QAAQ,CAAC,OAAO;AAC1B,QAAA,aAAa,GAAG,aAAa,IAAI,QAAQ,CAAC,aAAa;IACzD;IAEA,MAAM,IAAI,GAAGC,6BAAe,CAAC,OAAO,EAAE,aAAa,CAAC;;;IAIpD,MAAM,MAAM,GAAG;AACb,UAAE;AACE,YAAA,GAAG,IAAI;AACP,YAAA,MAAM,EAAE;gBACN,GAAG,IAAI,CAAC,MAAM;AACd,gBAAA,SAAS,EAAE,QAAQ;;;;;;AAMnB,gBAAA,MAAM,EAAE,4CAA4C;;AAEpD,gBAAA,KAAK,EAAE,EA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AAG,QAAQ;MAEpB,MAAM,GAAGG,uBAAW,CAAiB,UAAU;;;;"}
1
+ {"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":[null],"names":["forwardRef","useTranslate","isLegacyButtonProps","resolveLegacyButtonVariant","warnLegacyButtonProps","getButtonStyles","_jsx","ChakraButton","mergeCss","focusRing","buttonTransition","polymorphic"],"mappings":";;;;;;;;;;;;;AAgBA;;;;;;;;;;;;;;;;AAgBG;AACH,MAAM,UAAU,GAAGA,gBAAU,CAC3B,CACE,EACE,OAAO,EAAE,WAAW,EACpB,aAAa,EAAE,iBAAiB,GAAG,KAAK,EACxC,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,qBAAqB,GAAG,KAAK,EAC7B,eAAe,EACf,OAAO,EACP,QAAQ,EACR,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,YAAY,EACvB,GAAG,EAAE,OAAO,EACZ,GAAG,cAAc,EAClB,EACD,GAAG,KACD;;;;AAIF,IAAA,MAAM,EACJ,YAAY,EAAE,aAAa,EAC3B,WAAW,EAAE,eAAe,EAC5B,GAAG,IAAI,EACR,GAAG,cAAoE;;;;AAIxE,IAAA,MAAM,SAAS,GAAGC,yBAAY,EAAE;AAChC,IAAA,MAAM,WAAW,GACf,eAAe,KAAK;AAClB,UAAE,SAAS,CAAC,YAAY;AACxB,WAAG,eAAe,IAAI,SAAS,CAAC;AAEpC,IAAA,IAAI,OAAO,GAAkB,WAAW,IAAI,QAAQ;IACpD,IAAI,aAAa,GAAG,iBAAiB;IACrC,IAAIC,iCAAmB,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE;QAC7D,MAAM,QAAQ,GAAGC,wCAA0B,CACzC,QAAQ,EACR,aAAa,EACb,WAAW,CACZ;QACDC,mCAAqB,CAAC,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,CAAC;AACrE,QAAA,OAAO,GAAG,QAAQ,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