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

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 (242) hide show
  1. package/dist/components/Banner/Banner.types.d.ts +24 -1
  2. package/dist/components/Banner/Banner.types.d.ts.map +1 -1
  3. package/dist/components/Card/Card.types.d.ts +12 -0
  4. package/dist/components/Card/Card.types.d.ts.map +1 -1
  5. package/dist/components/ColorMode/ColorModeToggle.d.ts +7 -2
  6. package/dist/components/ColorMode/ColorModeToggle.d.ts.map +1 -1
  7. package/dist/components/ColorMode/ColorModeToggle.js +8 -3
  8. package/dist/components/ColorMode/ColorModeToggle.js.map +1 -1
  9. package/dist/components/ColorMode/ColorModeToggle.mjs +8 -3
  10. package/dist/components/ColorMode/ColorModeToggle.mjs.map +1 -1
  11. package/dist/components/Confetti/Confetti.types.d.ts +5 -1
  12. package/dist/components/Confetti/Confetti.types.d.ts.map +1 -1
  13. package/dist/components/Confetti/confettiColors.d.ts +5 -5
  14. package/dist/components/Confetti/confettiColors.js +5 -5
  15. package/dist/components/Confetti/confettiColors.mjs +5 -5
  16. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts +6 -0
  17. package/dist/components/ErrorFallback/ErrorFallback.types.d.ts.map +1 -1
  18. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts +4 -1
  19. package/dist/components/Form/FormModalFooter/FormModalFooter.types.d.ts.map +1 -1
  20. package/dist/components/LineGraph/LineGraph.d.ts.map +1 -1
  21. package/dist/components/LineGraph/LineGraph.js +4 -5
  22. package/dist/components/LineGraph/LineGraph.js.map +1 -1
  23. package/dist/components/LineGraph/LineGraph.mjs +5 -6
  24. package/dist/components/LineGraph/LineGraph.mjs.map +1 -1
  25. package/dist/components/LineGraph/LineGraph.types.d.ts +12 -2
  26. package/dist/components/LineGraph/LineGraph.types.d.ts.map +1 -1
  27. package/dist/components/LineGraph/seriesColors.d.ts +12 -8
  28. package/dist/components/LineGraph/seriesColors.d.ts.map +1 -1
  29. package/dist/components/LineGraph/seriesColors.js +8 -7
  30. package/dist/components/LineGraph/seriesColors.js.map +1 -1
  31. package/dist/components/LineGraph/seriesColors.mjs +8 -7
  32. package/dist/components/LineGraph/seriesColors.mjs.map +1 -1
  33. package/dist/components/Masonry/Masonry.types.d.ts +8 -3
  34. package/dist/components/Masonry/Masonry.types.d.ts.map +1 -1
  35. package/dist/components/Menu/MenuItem.types.d.ts +8 -0
  36. package/dist/components/Menu/MenuItem.types.d.ts.map +1 -1
  37. package/dist/components/Modal/ModalCloseButton.d.ts +1 -1
  38. package/dist/components/Modal/ModalCloseButton.js +1 -1
  39. package/dist/components/Modal/ModalCloseButton.mjs +1 -1
  40. package/dist/components/Pagination/Pagination.d.ts +11 -10
  41. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  42. package/dist/components/Pagination/Pagination.js +11 -10
  43. package/dist/components/Pagination/Pagination.js.map +1 -1
  44. package/dist/components/Pagination/Pagination.mjs +11 -10
  45. package/dist/components/Pagination/Pagination.mjs.map +1 -1
  46. package/dist/components/ProgressBar/ProgressBar.types.d.ts +9 -0
  47. package/dist/components/ProgressBar/ProgressBar.types.d.ts.map +1 -1
  48. package/dist/components/RadialProgress/RadialProgress.types.d.ts +21 -1
  49. package/dist/components/RadialProgress/RadialProgress.types.d.ts.map +1 -1
  50. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts +8 -0
  51. package/dist/components/SeeMoreButton/SeeMoreButton.types.d.ts.map +1 -1
  52. package/dist/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  53. package/dist/components/SegmentedControl/SegmentedControl.js +6 -7
  54. package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
  55. package/dist/components/SegmentedControl/SegmentedControl.mjs +6 -7
  56. package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
  57. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts +2 -0
  58. package/dist/components/SegmentedProgressBar/SegmentedProgressBar.types.d.ts.map +1 -1
  59. package/dist/components/Toast/Toast.styles.d.ts +6 -2
  60. package/dist/components/Toast/Toast.styles.d.ts.map +1 -1
  61. package/dist/components/Toast/Toast.styles.js +18 -10
  62. package/dist/components/Toast/Toast.styles.js.map +1 -1
  63. package/dist/components/Toast/Toast.styles.mjs +18 -10
  64. package/dist/components/Toast/Toast.styles.mjs.map +1 -1
  65. package/dist/theme/colors.d.ts +2 -2
  66. package/dist/theme/colors.d.ts.map +1 -1
  67. package/dist/theme/colors.js +22 -2
  68. package/dist/theme/colors.js.map +1 -1
  69. package/dist/theme/colors.mjs +23 -3
  70. package/dist/theme/colors.mjs.map +1 -1
  71. package/dist/theme/palette.generated.d.ts +98 -0
  72. package/dist/theme/palette.generated.d.ts.map +1 -1
  73. package/dist/theme/palette.generated.js +99 -0
  74. package/dist/theme/palette.generated.js.map +1 -1
  75. package/dist/theme/palette.generated.mjs +99 -1
  76. package/dist/theme/palette.generated.mjs.map +1 -1
  77. package/dist/theme/paletteSwatches.d.ts +20 -0
  78. package/dist/theme/paletteSwatches.d.ts.map +1 -1
  79. package/package.json +1 -1
  80. package/src/components/Accordion/Accordion.stories.tsx +85 -0
  81. package/src/components/Accordion/Accordion.usage.mdx +200 -0
  82. package/src/components/Appear/Appear.usage.mdx +107 -0
  83. package/src/components/Avatar/Avatar.stories.tsx +71 -1
  84. package/src/components/Avatar/Avatar.usage.mdx +166 -0
  85. package/src/components/Banner/Banner.stories.tsx +152 -2
  86. package/src/components/Banner/Banner.types.ts +30 -1
  87. package/src/components/Banner/Banner.usage.mdx +233 -0
  88. package/src/components/BottomSheet/BottomSheet.stories.tsx +168 -1
  89. package/src/components/BottomSheet/BottomSheet.usage.mdx +216 -0
  90. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +59 -0
  91. package/src/components/Breadcrumb/Breadcrumb.usage.mdx +181 -0
  92. package/src/components/Button/Button.stories.tsx +263 -3
  93. package/src/components/Button/Button.usage.mdx +342 -0
  94. package/src/components/Card/Card.stories.tsx +106 -0
  95. package/src/components/Card/Card.types.ts +12 -0
  96. package/src/components/Card/Card.usage.mdx +216 -0
  97. package/src/components/Checkbox/Checkbox.stories.tsx +140 -13
  98. package/src/components/Checkbox/Checkbox.usage.mdx +214 -0
  99. package/src/components/Chip/Chip.usage.mdx +78 -0
  100. package/src/components/Code/Code.stories.tsx +60 -0
  101. package/src/components/Code/Code.usage.mdx +187 -0
  102. package/src/components/CodeTabs/CodeTabs.stories.tsx +53 -0
  103. package/src/components/CodeTabs/CodeTabs.usage.mdx +176 -0
  104. package/src/components/Collapsible/Collapsible.stories.tsx +58 -0
  105. package/src/components/Collapsible/Collapsible.usage.mdx +173 -0
  106. package/src/components/ColorMode/ColorMode.stories.tsx +50 -0
  107. package/src/components/ColorMode/ColorMode.usage.mdx +135 -0
  108. package/src/components/ColorMode/ColorModeToggle.tsx +10 -3
  109. package/src/components/Confetti/Confetti.types.ts +5 -1
  110. package/src/components/Confetti/Confetti.usage.mdx +111 -0
  111. package/src/components/Confetti/confettiColors.ts +5 -5
  112. package/src/components/Container/Container.stories.tsx +32 -0
  113. package/src/components/Container/Container.usage.mdx +130 -0
  114. package/src/components/CopyableCode/CopyableCode.stories.tsx +62 -0
  115. package/src/components/CopyableCode/CopyableCode.usage.mdx +168 -0
  116. package/src/components/CountBadge/CountBadge.stories.tsx +69 -0
  117. package/src/components/CountBadge/CountBadge.usage.mdx +215 -0
  118. package/src/components/CountUp/CountUp.usage.mdx +107 -0
  119. package/src/components/DatePicker/DatePicker.usage.mdx +177 -0
  120. package/src/components/DatePicker/RangeDatePicker.stories.tsx +87 -3
  121. package/src/components/ErrorFallback/ErrorFallback.types.ts +6 -0
  122. package/src/components/ErrorFallback/ErrorFallback.usage.mdx +127 -0
  123. package/src/components/ExpandableText/ExpandableText.stories.tsx +55 -0
  124. package/src/components/ExpandableText/ExpandableText.usage.mdx +176 -0
  125. package/src/components/FileInput/FileInput.stories.tsx +38 -1
  126. package/src/components/FileInput/FileInput.usage.mdx +178 -0
  127. package/src/components/FileItem/FileItem.stories.tsx +71 -0
  128. package/src/components/FileItem/FileItem.usage.mdx +180 -0
  129. package/src/components/FileList/FileList.stories.tsx +25 -0
  130. package/src/components/FileList/FileList.usage.mdx +165 -0
  131. package/src/components/FlyTo/FlyTo.usage.mdx +99 -0
  132. package/src/components/Form/Form.stories.tsx +149 -0
  133. package/src/components/Form/Form.usage.mdx +201 -0
  134. package/src/components/Form/FormModalFooter/FormModalFooter.types.ts +4 -1
  135. package/src/components/FormControl/FormControl.stories.tsx +35 -0
  136. package/src/components/FormControl/FormControl.usage.mdx +128 -0
  137. package/src/components/FormIntegration/FormIntegration.usage.mdx +158 -0
  138. package/src/components/FormLabel/FormLabel.stories.tsx +71 -0
  139. package/src/components/FormLabel/FormLabel.usage.mdx +125 -0
  140. package/src/components/Icon/Icon.stories.tsx +61 -1
  141. package/src/components/Icon/Icon.usage.mdx +158 -0
  142. package/src/components/IconButton/IconButton.stories.tsx +209 -5
  143. package/src/components/IconButton/IconButton.usage.mdx +273 -0
  144. package/src/components/InfoSprinkle/InfoSprinkle.stories.tsx +77 -1
  145. package/src/components/InfoSprinkle/InfoSprinkle.usage.mdx +189 -0
  146. package/src/components/InlineCode/InlineCode.stories.tsx +75 -0
  147. package/src/components/InlineCode/InlineCode.usage.mdx +142 -0
  148. package/src/components/Input/Input.stories.tsx +180 -0
  149. package/src/components/Input/Input.usage.mdx +278 -0
  150. package/src/components/LineGraph/LineGraph.stories.tsx +112 -0
  151. package/src/components/LineGraph/LineGraph.tsx +4 -5
  152. package/src/components/LineGraph/LineGraph.types.ts +12 -2
  153. package/src/components/LineGraph/LineGraph.usage.mdx +186 -0
  154. package/src/components/LineGraph/seriesColors.test.ts +11 -10
  155. package/src/components/LineGraph/seriesColors.ts +18 -16
  156. package/src/components/Loaders/Loaders.stories.tsx +93 -0
  157. package/src/components/Loaders/Loaders.usage.mdx +180 -0
  158. package/src/components/LogicianProvider/LogicianProvider.usage.mdx +98 -0
  159. package/src/components/Markdown/Markdown.stories.tsx +53 -0
  160. package/src/components/Markdown/Markdown.usage.mdx +182 -0
  161. package/src/components/Masonry/Masonry.stories.tsx +63 -1
  162. package/src/components/Masonry/Masonry.types.ts +8 -3
  163. package/src/components/Masonry/Masonry.usage.mdx +142 -0
  164. package/src/components/MaxLengthIndicator/MaxLengthIndicator.stories.tsx +57 -0
  165. package/src/components/MaxLengthIndicator/MaxLengthIndicator.usage.mdx +125 -0
  166. package/src/components/Menu/Menu.stories.tsx +146 -2
  167. package/src/components/Menu/Menu.usage.mdx +230 -0
  168. package/src/components/Menu/MenuItem.types.ts +8 -0
  169. package/src/components/Modal/Modal.stories.tsx +177 -1
  170. package/src/components/Modal/Modal.usage.mdx +262 -0
  171. package/src/components/Modal/ModalCloseButton.tsx +1 -1
  172. package/src/components/MonthPicker/MonthPicker.stories.tsx +30 -0
  173. package/src/components/MonthPicker/MonthPicker.usage.mdx +191 -0
  174. package/src/components/Pagination/Pagination.stories.tsx +90 -1
  175. package/src/components/Pagination/Pagination.tsx +11 -10
  176. package/src/components/Pagination/Pagination.usage.mdx +186 -0
  177. package/src/components/PasswordInput/PasswordInput.stories.tsx +51 -0
  178. package/src/components/PasswordInput/PasswordInput.usage.mdx +193 -0
  179. package/src/components/PinInput/PinInput.stories.tsx +91 -0
  180. package/src/components/PinInput/PinInput.usage.mdx +194 -0
  181. package/src/components/Popover/Popover.stories.tsx +104 -1
  182. package/src/components/Popover/Popover.usage.mdx +197 -0
  183. package/src/components/ProgressBar/ProgressBar.stories.tsx +92 -1
  184. package/src/components/ProgressBar/ProgressBar.types.ts +9 -0
  185. package/src/components/ProgressBar/ProgressBar.usage.mdx +210 -0
  186. package/src/components/Pulse/Pulse.usage.mdx +102 -0
  187. package/src/components/RadialProgress/RadialProgress.stories.tsx +74 -1
  188. package/src/components/RadialProgress/RadialProgress.types.ts +21 -1
  189. package/src/components/RadialProgress/RadialProgress.usage.mdx +153 -0
  190. package/src/components/Radio/Radio.stories.tsx +119 -0
  191. package/src/components/Radio/Radio.usage.mdx +187 -0
  192. package/src/components/Reveal/Reveal.usage.mdx +105 -0
  193. package/src/components/ScaledContext/ScaledContext.usage.mdx +111 -0
  194. package/src/components/SeeMoreButton/SeeMoreButton.stories.tsx +146 -2
  195. package/src/components/SeeMoreButton/SeeMoreButton.types.ts +8 -0
  196. package/src/components/SeeMoreButton/SeeMoreButton.usage.mdx +213 -0
  197. package/src/components/SegmentedControl/SegmentedControl.stories.tsx +69 -0
  198. package/src/components/SegmentedControl/SegmentedControl.tsx +6 -7
  199. package/src/components/SegmentedControl/SegmentedControl.usage.mdx +209 -0
  200. package/src/components/SegmentedProgressBar/SegmentedProgressBar.stories.tsx +54 -0
  201. package/src/components/SegmentedProgressBar/SegmentedProgressBar.types.ts +2 -0
  202. package/src/components/SegmentedProgressBar/SegmentedProgressBar.usage.mdx +145 -0
  203. package/src/components/Select/Select.stories.tsx +209 -1
  204. package/src/components/Select/Select.usage.mdx +278 -0
  205. package/src/components/Shake/Shake.usage.mdx +107 -0
  206. package/src/components/Slider/Slider.stories.tsx +116 -0
  207. package/src/components/Slider/Slider.usage.mdx +179 -0
  208. package/src/components/Spinner/Spinner.stories.tsx +64 -0
  209. package/src/components/Spinner/Spinner.usage.mdx +136 -0
  210. package/src/components/SwapTransition/SwapTransition.usage.mdx +102 -0
  211. package/src/components/Switch/Switch.stories.tsx +131 -6
  212. package/src/components/Switch/Switch.usage.mdx +199 -0
  213. package/src/components/Table/Table.stories.tsx +159 -1
  214. package/src/components/Table/Table.usage.mdx +235 -0
  215. package/src/components/Tabs/Tabs.stories.tsx +86 -0
  216. package/src/components/Tabs/Tabs.usage.mdx +219 -0
  217. package/src/components/Tag/Tag.stories.tsx +181 -4
  218. package/src/components/Tag/Tag.usage.mdx +257 -0
  219. package/src/components/Textarea/Textarea.stories.tsx +113 -0
  220. package/src/components/Textarea/Textarea.usage.mdx +186 -0
  221. package/src/components/Toast/Toast.stories.tsx +185 -3
  222. package/src/components/Toast/Toast.styles.ts +18 -10
  223. package/src/components/Toast/Toast.usage.mdx +265 -0
  224. package/src/components/Tooltip/Tooltip.stories.tsx +86 -1
  225. package/src/components/Tooltip/Tooltip.usage.mdx +211 -0
  226. package/src/components/Tree/Tree.stories.tsx +89 -0
  227. package/src/components/Tree/Tree.usage.mdx +207 -0
  228. package/src/components/Typography/Typography.stories.tsx +117 -0
  229. package/src/components/Typography/Typography.usage.mdx +251 -0
  230. package/src/components/Workflow/Workflow.usage.mdx +199 -0
  231. package/src/components/noRawScales.test.ts +5 -1
  232. package/src/foundations/BrandAssets.mdx +637 -0
  233. package/src/foundations/BrandAssets.stories.tsx +680 -0
  234. package/src/foundations/BrandColour.mdx +65 -2
  235. package/src/theme/BazePalette.stories.tsx +111 -1
  236. package/src/theme/Palette.stories.tsx +2 -2
  237. package/src/theme/SemanticTokens.mdx +75 -16
  238. package/src/theme/claude.md +15 -9
  239. package/src/theme/colors.ts +33 -3
  240. package/src/theme/contrast.test.ts +32 -0
  241. package/src/theme/palette.generated.ts +99 -0
  242. package/src/theme/paletteSwatches.ts +35 -0
@@ -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,19 @@ import { CardRootProps as ChakraCardRootProps } from '@chakra-ui/react';
3
3
  import type { PolymorphicProps } from '../../types/polymorphic';
4
4
  export type CardVariant = 'default' | 'wash' | 'elevated';
5
5
  export type CardOwnProps = Omit<ChakraCardRootProps, 'as'> & {
6
+ /**
7
+ * The whole card is one target: pointer cursor, and on hover the ground
8
+ * steps to `bg.subtle` and the border to `border.strong`. Styling only —
9
+ * render it as the control with `as` (`as={NextLink}`, `as="button"`).
10
+ */
6
11
  clickable?: boolean;
12
+ /**
13
+ * `default`: `bg.surface` with a `border.subtle` hairline — most content.
14
+ * `wash`: `bg.muted`, no border — a block that summarises or concludes (an
15
+ * AI summary, a purchase total). `elevated`: a soft `sm` shadow — a
16
+ * standalone card that should read as a raised object.
17
+ * @default 'default'
18
+ */
7
19
  variant?: CardVariant;
8
20
  };
9
21
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Card.types.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;AAE1D,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,GAAG;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,SAAS,CAAC,QAAQ,SAAS,WAAW,GAAG,KAAK,IAAI,gBAAgB,CAC5E,QAAQ,EACR,YAAY,CACb,CAAC"}
1
+ {"version":3,"file":"Card.types.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;AAE1D,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,GAAG;IAC3D;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,MAAM,SAAS,CAAC,QAAQ,SAAS,WAAW,GAAG,KAAK,IAAI,gBAAgB,CAC5E,QAAQ,EACR,YAAY,CACb,CAAC"}
@@ -6,8 +6,13 @@ export interface ColorModeToggleProps extends Omit<IconButtonProps, 'children'>
6
6
  * A ready-made light/dark toggle button. Shared across products so each app
7
7
  * doesn't reinvent the control.
8
8
  *
9
- * Renders nothing until mounted on the client to avoid an SSR/CSR icon
10
- * mismatch (the resolved mode is only known after hydration).
9
+ * Shows the light-mode state (moon) until mounted on the client, to avoid an
10
+ * SSR/CSR icon mismatch (the resolved mode is only known after hydration).
11
+ * Toggles between `light` and `dark` only; to offer `system` as well, build a
12
+ * picker on `useColorMode().setColorMode`.
13
+ *
14
+ * The icon wrappers render as `<span>`: only phrasing content may sit inside
15
+ * a `<button>` (see ACCESSIBILITY.md §5).
11
16
  *
12
17
  * @example
13
18
  * ```tsx
@@ -1 +1 @@
1
- {"version":3,"file":"ColorModeToggle.d.ts","sourceRoot":"","sources":["../../../src/components/ColorMode/ColorModeToggle.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAKnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAIhF,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAChD,eAAe,EACf,UAAU,CACX;CAAG;AAEJ;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA8C1D,CAAC"}
1
+ {"version":3,"file":"ColorModeToggle.d.ts","sourceRoot":"","sources":["../../../src/components/ColorMode/ColorModeToggle.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAKnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAIhF,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAChD,eAAe,EACf,UAAU,CACX;CAAG;AAEJ;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAgD1D,CAAC"}
@@ -13,8 +13,13 @@ var useColorMode = require('./useColorMode.js');
13
13
  * A ready-made light/dark toggle button. Shared across products so each app
14
14
  * doesn't reinvent the control.
15
15
  *
16
- * Renders nothing until mounted on the client to avoid an SSR/CSR icon
17
- * mismatch (the resolved mode is only known after hydration).
16
+ * Shows the light-mode state (moon) until mounted on the client, to avoid an
17
+ * SSR/CSR icon mismatch (the resolved mode is only known after hydration).
18
+ * Toggles between `light` and `dark` only; to offer `system` as well, build a
19
+ * picker on `useColorMode().setColorMode`.
20
+ *
21
+ * The icon wrappers render as `<span>`: only phrasing content may sit inside
22
+ * a `<button>` (see ACCESSIBILITY.md §5).
18
23
  *
19
24
  * @example
20
25
  * ```tsx
@@ -28,7 +33,7 @@ const ColorModeToggle = ({ 'aria-label': ariaLabel = 'Toggle color mode', ...res
28
33
  setMounted(true);
29
34
  }, []);
30
35
  const isDark = mounted && colorMode === 'dark';
31
- return (jsxRuntime.jsx(IconButton.IconButton, { "aria-label": ariaLabel, onClick: toggleColorMode, ...rest, children: jsxRuntime.jsxs(react.Box, { display: "grid", placeItems: "center", children: [jsxRuntime.jsx(react.Box, { gridArea: "1 / 1", display: "grid", placeItems: "center", opacity: isDark ? 1 : 0, transform: isDark ? undefined : 'rotate(-90deg) scale(0.5)', animationStyle: "spring", transitionProperty: "opacity, transform", children: jsxRuntime.jsx(index.SunIcon, {}) }), jsxRuntime.jsx(react.Box, { gridArea: "1 / 1", display: "grid", placeItems: "center", opacity: isDark ? 0 : 1, transform: isDark ? 'rotate(90deg) scale(0.5)' : undefined, animationStyle: "spring", transitionProperty: "opacity, transform", children: jsxRuntime.jsx(index.MoonIcon, {}) })] }) }));
36
+ return (jsxRuntime.jsx(IconButton.IconButton, { "aria-label": ariaLabel, onClick: toggleColorMode, ...rest, children: jsxRuntime.jsxs(react.Box, { as: "span", display: "grid", placeItems: "center", children: [jsxRuntime.jsx(react.Box, { as: "span", gridArea: "1 / 1", display: "grid", placeItems: "center", opacity: isDark ? 1 : 0, transform: isDark ? undefined : 'rotate(-90deg) scale(0.5)', animationStyle: "spring", transitionProperty: "opacity, transform", children: jsxRuntime.jsx(index.SunIcon, {}) }), jsxRuntime.jsx(react.Box, { as: "span", gridArea: "1 / 1", display: "grid", placeItems: "center", opacity: isDark ? 0 : 1, transform: isDark ? 'rotate(90deg) scale(0.5)' : undefined, animationStyle: "spring", transitionProperty: "opacity, transform", children: jsxRuntime.jsx(index.MoonIcon, {}) })] }) }));
32
37
  };
33
38
  ColorModeToggle.displayName = 'ColorModeToggle';
34
39
 
@@ -1 +1 @@
1
- {"version":3,"file":"ColorModeToggle.js","sources":["../../../src/components/ColorMode/ColorModeToggle.tsx"],"sourcesContent":[null],"names":["useColorMode","useState","useEffect","_jsx","IconButton","_jsxs","Box","SunIcon","MoonIcon"],"mappings":";;;;;;;;;;;AAeA;;;;;;;;;;;AAWG;AACI,MAAM,eAAe,GAAmC,CAAC,EAC9D,YAAY,EAAE,SAAS,GAAG,mBAAmB,EAC7C,GAAG,IAAI,EACR,KAAI;IACH,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,GAAGA,yBAAY,EAAE;IACrD,MAAM,CAAC,OAAO,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GAAG,CAAC,GAAG,CAAC,EACvB,SAAS,EAAE,MAAM,GAAG,0BAA0B,GAAG,SAAS,EAC1D,cAAc,EAAC,QAAQ,EACvB,kBAAkB,EAAC,oBAAoB,EAAA,QAAA,EAEvCH,cAAA,CAACK,cAAQ,EAAA,EAAA,CAAG,EAAA,CACR,CAAA,EAAA,CACF,EAAA,CACK;AAEjB;AAEA,eAAe,CAAC,WAAW,GAAG,iBAAiB;;;;"}
@@ -11,8 +11,13 @@ import { useColorMode } from './useColorMode.mjs';
11
11
  * A ready-made light/dark toggle button. Shared across products so each app
12
12
  * doesn't reinvent the control.
13
13
  *
14
- * Renders nothing until mounted on the client to avoid an SSR/CSR icon
15
- * mismatch (the resolved mode is only known after hydration).
14
+ * Shows the light-mode state (moon) until mounted on the client, to avoid an
15
+ * SSR/CSR icon mismatch (the resolved mode is only known after hydration).
16
+ * Toggles between `light` and `dark` only; to offer `system` as well, build a
17
+ * picker on `useColorMode().setColorMode`.
18
+ *
19
+ * The icon wrappers render as `<span>`: only phrasing content may sit inside
20
+ * a `<button>` (see ACCESSIBILITY.md §5).
16
21
  *
17
22
  * @example
18
23
  * ```tsx
@@ -26,7 +31,7 @@ const ColorModeToggle = ({ 'aria-label': ariaLabel = 'Toggle color mode', ...res
26
31
  setMounted(true);
27
32
  }, []);
28
33
  const isDark = mounted && colorMode === 'dark';
29
- return (jsx(IconButton, { "aria-label": ariaLabel, onClick: toggleColorMode, ...rest, children: jsxs(Box, { display: "grid", placeItems: "center", children: [jsx(Box, { gridArea: "1 / 1", display: "grid", placeItems: "center", opacity: isDark ? 1 : 0, transform: isDark ? undefined : 'rotate(-90deg) scale(0.5)', animationStyle: "spring", transitionProperty: "opacity, transform", children: jsx(SunIcon, {}) }), jsx(Box, { gridArea: "1 / 1", display: "grid", placeItems: "center", opacity: isDark ? 0 : 1, transform: isDark ? 'rotate(90deg) scale(0.5)' : undefined, animationStyle: "spring", transitionProperty: "opacity, transform", children: jsx(MoonIcon, {}) })] }) }));
34
+ return (jsx(IconButton, { "aria-label": ariaLabel, onClick: toggleColorMode, ...rest, children: jsxs(Box, { as: "span", display: "grid", placeItems: "center", children: [jsx(Box, { as: "span", gridArea: "1 / 1", display: "grid", placeItems: "center", opacity: isDark ? 1 : 0, transform: isDark ? undefined : 'rotate(-90deg) scale(0.5)', animationStyle: "spring", transitionProperty: "opacity, transform", children: jsx(SunIcon, {}) }), jsx(Box, { as: "span", gridArea: "1 / 1", display: "grid", placeItems: "center", opacity: isDark ? 0 : 1, transform: isDark ? 'rotate(90deg) scale(0.5)' : undefined, animationStyle: "spring", transitionProperty: "opacity, transform", children: jsx(MoonIcon, {}) })] }) }));
30
35
  };
31
36
  ColorModeToggle.displayName = 'ColorModeToggle';
32
37
 
@@ -1 +1 @@
1
- {"version":3,"file":"ColorModeToggle.mjs","sources":["../../../src/components/ColorMode/ColorModeToggle.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;AAeA;;;;;;;;;;;AAWG;AACI,MAAM,eAAe,GAAmC,CAAC,EAC9D,YAAY,EAAE,SAAS,GAAG,mBAAmB,EAC7C,GAAG,IAAI,EACR,KAAI;IACH,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,YAAY,EAAE;IACrD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;IAE7C,SAAS,CAAC,MAAK;QACb,UAAU,CAAC,IAAI,CAAC;IAClB,CAAC,EAAE,EAAE,CAAC;AAEN,IAAA,MAAM,MAAM,GAAG,OAAO,IAAI,SAAS,KAAK,MAAM;AAE9C,IAAA,QACEA,GAAA,CAAC,UAAU,EAAA,EAAA,YAAA,EAAa,SAAS,EAAE,OAAO,EAAE,eAAe,EAAA,GAAM,IAAI,EAAA,QAAA,EAMnEC,IAAA,CAAC,GAAG,EAAA,EAAC,OAAO,EAAC,MAAM,EAAC,UAAU,EAAC,QAAQ,EAAA,QAAA,EAAA,CACrCD,GAAA,C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AAK,MAAM;AAE9C,IAAA,QACEA,GAAA,CAAC,UAAU,EAAA,EAAA,YAAA,EAAa,SAAS,EAAE,OAAO,EAAE,eAAe,EAAA,GAAM,IAAI,EAAA,QAAA,EAMnEC,IAAA,CAAC,GAAG,EAAA,EAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAC,MAAM,EAAC,UAAU,EAAC,QAAQ,EAAA,QAAA,EAAA,CAC/CD,GAAA,CAAC,GAAG,EAAA,EACF,EAAE,EAAC,MAAM,EACT,QAAQ,EAAC,OAAO,EAChB,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,QAAQ,EACnB,OAAO,EAAE,MAAM,GAAG,CAAC,GAAG,CAAC,EACvB,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,2BAA2B,EAC3D,cAAc,EAAC,QAAQ,EACvB,kBAAkB,EAAC,oBAAoB,EAAA,QAAA,EAEvCA,GAAA,CAAC,OAAO,EAAA,EAAA,CAAG,EAAA,CACP,EACNA,GAAA,CAAC,GAAG,IACF,EAAE,EAAC,MAAM,EACT,QAAQ,EAAC,OAAO,EAChB,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,QAAQ,EACnB,OAAO,EAAE,MAAM,GAAG,CAAC,GAAG,CAAC,EACvB,SAAS,EAAE,MAAM,GAAG,0BAA0B,GAAG,SAAS,EAC1D,cAAc,EAAC,QAAQ,EACvB,kBAAkB,EAAC,oBAAoB,EAAA,QAAA,EAEvCA,GAAA,CAAC,QAAQ,EAAA,EAAA,CAAG,EAAA,CACR,CAAA,EAAA,CACF,EAAA,CACK;AAEjB;AAEA,eAAe,CAAC,WAAW,GAAG,iBAAiB;;;;"}
@@ -2,7 +2,11 @@ import type { BoxProps } from '@chakra-ui/react';
2
2
  export interface ConfettiProps extends BoxProps {
3
3
  /** How many pieces. Defaults to 50. */
4
4
  pieceCount?: number;
5
- /** Colour token names to pick from. Defaults to the palette's five accents. */
5
+ /**
6
+ * Colours to pick from: any CSS colour string or colour token. Defaults to ten
7
+ * decorative colours — coral, beige and the eight system hues with no status
8
+ * meaning — as light-mode hex, so they do not follow dark mode.
9
+ */
6
10
  colors?: string[];
7
11
  /**
8
12
  * Changes the scatter. The generator is seeded rather than `Math.random()` so
@@ -1 +1 @@
1
- {"version":3,"file":"Confetti.types.d.ts","sourceRoot":"","sources":["../../../src/components/Confetti/Confetti.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,WAAW,aAAc,SAAQ,QAAQ;IAC7C,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
1
+ {"version":3,"file":"Confetti.types.d.ts","sourceRoot":"","sources":["../../../src/components/Confetti/Confetti.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,WAAW,aAAc,SAAQ,QAAQ;IAC7C,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Hues that carry meaning elsewhere in the system and so never colour a piece
3
- * by default: red, yellow and green are the danger, warning and success
4
- * solids, and blue is info and links. The same rule as the chart series
5
- * defaults (`LineGraph/seriesColors.ts`) — a red piece in a "payment complete"
6
- * burst says something the screen does not.
2
+ * Hues left out of the *default* pieces: red, yellow and green are the
3
+ * danger, warning and success solids, and blue is info and links. This is a
4
+ * default, not a ban — a caller may pass them through `colors`, since a burst
5
+ * lasting under two seconds on a success moment cannot be read as a status
6
+ * (Confetti.usage.mdx).
7
7
  */
8
8
  export declare const CONFETTI_EXCLUDED_HUES: readonly ["red", "yellow", "green", "blue"];
9
9
  /**
@@ -4,11 +4,11 @@
4
4
  var palette_generated = require('../../theme/palette.generated.js');
5
5
 
6
6
  /**
7
- * Hues that carry meaning elsewhere in the system and so never colour a piece
8
- * by default: red, yellow and green are the danger, warning and success
9
- * solids, and blue is info and links. The same rule as the chart series
10
- * defaults (`LineGraph/seriesColors.ts`) — a red piece in a "payment complete"
11
- * burst says something the screen does not.
7
+ * Hues left out of the *default* pieces: red, yellow and green are the
8
+ * danger, warning and success solids, and blue is info and links. This is a
9
+ * default, not a ban — a caller may pass them through `colors`, since a burst
10
+ * lasting under two seconds on a success moment cannot be read as a status
11
+ * (Confetti.usage.mdx).
12
12
  */
13
13
  const CONFETTI_EXCLUDED_HUES = [
14
14
  'red',
@@ -2,11 +2,11 @@
2
2
  import { SYSTEM_HUES, CORAL, RAMPS } from '../../theme/palette.generated.mjs';
3
3
 
4
4
  /**
5
- * Hues that carry meaning elsewhere in the system and so never colour a piece
6
- * by default: red, yellow and green are the danger, warning and success
7
- * solids, and blue is info and links. The same rule as the chart series
8
- * defaults (`LineGraph/seriesColors.ts`) — a red piece in a "payment complete"
9
- * burst says something the screen does not.
5
+ * Hues left out of the *default* pieces: red, yellow and green are the
6
+ * danger, warning and success solids, and blue is info and links. This is a
7
+ * default, not a ban — a caller may pass them through `colors`, since a burst
8
+ * lasting under two seconds on a success moment cannot be read as a status
9
+ * (Confetti.usage.mdx).
10
10
  */
11
11
  const CONFETTI_EXCLUDED_HUES = [
12
12
  'red',
@@ -1,9 +1,15 @@
1
1
  export interface ErrorFallbackProps {
2
+ /** The caught error. Its `message` is shown as is; a translated default when empty. */
2
3
  error: Error | null;
4
+ /** ID shown for support; generated (`ERR-…`) when missing. */
3
5
  errorId?: string;
6
+ /** ISO time for the copied report only; the card shows the render time. */
4
7
  timestamp?: string;
8
+ /** Where it failed, shown and copied; "unknown" (translated) when missing. */
5
9
  componentName?: string;
10
+ /** Shown and copied; "anonymous" (translated) when missing. */
6
11
  userId?: string;
12
+ /** Called by the "try again" button, e.g. the error boundary's reset. */
7
13
  onErrorReset?: () => void;
8
14
  }
9
15
  export interface ErrorLogData {
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorFallback.types.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorFallback/ErrorFallback.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
1
+ {"version":3,"file":"ErrorFallback.types.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorFallback/ErrorFallback.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,uFAAuF;IACvF,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
@@ -19,7 +19,10 @@ export interface FormModalFooterProps extends Omit<ModalFooterProps, 'children'
19
19
  cancelLabel: ReactNode;
20
20
  /** Primary submit button label. */
21
21
  submitLabel: ReactNode;
22
- /** Palette for the primary button. Defaults to `primary`. */
22
+ /**
23
+ * @deprecated 5.0 Button has no colour palette. Only `'danger'` changes
24
+ * anything (a danger submit button); every other value renders `primary`.
25
+ */
23
26
  submitColorPalette?: ButtonColorPalette;
24
27
  /**
25
28
  * In-flight state — shows the submit spinner and disables every button so the
@@ -1 +1 @@
1
- {"version":3,"file":"FormModalFooter.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FormModalFooter/FormModalFooter.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,KAAK,gBAAgB,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC;AAE3D,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAChD,gBAAgB,EAChB,UAAU,GAAG,UAAU,GAAG,OAAO,CAClC;IACC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,+EAA+E;IAC/E,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,WAAW,EAAE,SAAS,CAAC;IACvB,mCAAmC;IACnC,WAAW,EAAE,SAAS,CAAC;IACvB,6DAA6D;IAC7D,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
1
+ {"version":3,"file":"FormModalFooter.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FormModalFooter/FormModalFooter.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,KAAK,gBAAgB,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,CAAC;AAE3D,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAChD,gBAAgB,EAChB,UAAU,GAAG,UAAU,GAAG,OAAO,CAClC;IACC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,+EAA+E;IAC/E,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,WAAW,EAAE,SAAS,CAAC;IACvB,mCAAmC;IACnC,WAAW,EAAE,SAAS,CAAC;IACvB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"LineGraph.d.ts","sourceRoot":"","sources":["../../../src/components/LineGraph/LineGraph.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAG9D,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,SAAS,EAAE,4CAK5C,cAAc,CAAC,CAAC,CAAC,4CAwFnB,CAAC"}
1
+ {"version":3,"file":"LineGraph.d.ts","sourceRoot":"","sources":["../../../src/components/LineGraph/LineGraph.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAG9D,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,SAAS,EAAE,4CAK5C,cAAc,CAAC,CAAC,CAAC,4CAuFnB,CAAC"}
@@ -10,10 +10,9 @@ var useColorMode = require('../ColorMode/useColorMode.js');
10
10
  var seriesColors = require('./seriesColors.js');
11
11
 
12
12
  const LineGraph = ({ data = [], dataKeys, displayLegend = true, ...rest }) => {
13
- const primaryColor = react.useToken('colors', 'primary.main')[0];
14
- // Series 1 is the neutral brand line; further series cycle hues with no
15
- // status meaning (see seriesColors.ts). Strokes read the generated palette
16
- // directly because no semantic role fits a chart line.
13
+ // Series 1 is the data blue; further series cycle hues with no status
14
+ // meaning (see seriesColors.ts). Strokes read the generated palette directly
15
+ // because no semantic role fits a chart line.
17
16
  const { colorMode } = useColorMode.useColorMode();
18
17
  const isDark = colorMode === 'dark';
19
18
  return (jsxRuntime.jsx(react.Box, { h: "400px", ...rest, children: jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height: "100%", children: jsxRuntime.jsxs(recharts.LineChart, { data: data, margin: {
@@ -68,7 +67,7 @@ const LineGraph = ({ data = [], dataKeys, displayLegend = true, ...rest }) => {
68
67
  color: 'var(--chakra-colors-fg-default)',
69
68
  } }), displayLegend && (jsxRuntime.jsx(recharts.Legend, { wrapperStyle: {
70
69
  bottom: -16,
71
- } })), dataKeys.map(({ key, label, color }, index) => (jsxRuntime.jsx(recharts.Line, { type: "monotone", dataKey: key, name: label, stroke: color ?? seriesColors.seriesColor(index, primaryColor, isDark), dot: { r: 0 } }, `line-${key}`)))] }) }) }));
70
+ } })), dataKeys.map(({ key, label, color }, index) => (jsxRuntime.jsx(recharts.Line, { type: "monotone", dataKey: key, name: label, stroke: color ?? seriesColors.seriesColor(index, isDark), dot: { r: 0 } }, `line-${key}`)))] }) }) }));
72
71
  };
73
72
 
74
73
  exports.LineGraph = LineGraph;
@@ -1 +1 @@
1
- {"version":3,"file":"LineGraph.js","sources":["../../../src/components/LineGraph/LineGraph.tsx"],"sourcesContent":[null],"names":["useToken","useColorMode","_jsx","Box","ResponsiveContainer","_jsxs","LineChart","CartesianGrid","XAxis","YAxis","Tooltip","Legend","Line","seriesColor"],"mappings":";;;;;;;;;;;MAiBa,SAAS,GAAG,CAAsB,EAC7C,IAAI,GAAG,EAAE,EACT,QAAQ,EACR,aAAa,GAAG,IAAI,EACpB,GAAG,IAAI,EACW,KAAI;IACtB,MAAM,YAAY,GAAGA,cAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;;;;AAI1D,IAAA,MAAM,EAAE,SAAS,EAAE,GAAGC,yBAAY,EAAE;AACpC,IAAA,MAAM,MAAM,GAAG,SAAS,KAAK,MAAM;AACnC,IAAA,QACEC,cAAA,CAACC,SAAG,EAAA,EAAC,CAAC,EAAC,OAAO,EAAA,GAAK,IAAI,EAAA,QAAA,EACrBD,cAAA,CAACE,4BAAmB,EAAA,EAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAA,QAAA,EAC7CC,eAAA,CAACC,kBAAS,EAAA,EACR,IAAI,EAAE,IAAI,EACV,MAAM,EAAE;AACN,oBAAA,GAAG,EAAE,CAAC;AACN,oBAAA,MAAM,EAAE,CAAC;AACT,oBAAA,IAAI,EAAE,CAAC;AACP,oBAAA,KAAK,EAAE,EAAE;AACV,iBAAA,EAAA,QAAA,EAAA,CAEDJ,eAACK;;;;AAEC,wBAAA,eAAe,EAAC,EAAE,EAClB,QAAQ,EAAE,KAAK;;;wBAGf,MAAM,EAAC,qCAAqC,EAAA,CAC5C,EACFL,eAACM,cAAK,EAAA,EACJ,OAAO,EAAC,MAAM;;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,CAClB;AAEV;;;;"}
1
+ {"version":3,"file":"LineGraph.js","sources":["../../../src/components/LineGraph/LineGraph.tsx"],"sourcesContent":[null],"names":["useColorMode","_jsx","Box","ResponsiveContainer","_jsxs","LineChart","CartesianGrid","XAxis","useToken","YAxis","Tooltip","Legend","Line","seriesColor"],"mappings":";;;;;;;;;;;MAiBa,SAAS,GAAG,CAAsB,EAC7C,IAAI,GAAG,EAAE,EACT,QAAQ,EACR,aAAa,GAAG,IAAI,EACpB,GAAG,IAAI,EACW,KAAI;;;;AAItB,IAAA,MAAM,EAAE,SAAS,EAAE,GAAGA,yBAAY,EAAE;AACpC,IAAA,MAAM,MAAM,GAAG,SAAS,KAAK,MAAM;AACnC,IAAA,QACEC,cAAA,CAACC,SAAG,EAAA,EAAC,CAAC,EAAC,OAAO,EAAA,GAAK,IAAI,EAAA,QAAA,EACrBD,cAAA,CAACE,4BAAmB,EAAA,EAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAA,QAAA,EAC7CC,eAAA,CAACC,kBAAS,EAAA,EACR,IAAI,EAAE,IAAI,EACV,MAAM,EAAE;AACN,oBAAA,GAAG,EAAE,CAAC;AACN,oBAAA,MAAM,EAAE,CAAC;AACT,oBAAA,IAAI,EAAE,CAAC;AACP,oBAAA,KAAK,EAAE,EAAE;AACV,iBAAA,EAAA,QAAA,EAAA,CAEDJ,eAACK;;;;AAEC,wBAAA,eAAe,EAAC,EAAE,EAClB,QAAQ,EAAE,KAAK;;;wBAGf,MAAM,EAAC,qCAAqC,EAAA,CAC5C,EACFL,eAACM,cAAK,EAAA,EACJ,OAAO,EAAC,MAAM;;AAEd,wBAAA,MAAM,EAAC,aAAa;;;AAGpB,wBAAA,IAAI,EAAE;AACJ,4BAAA,IAAI,EAAE,+BAA+B;4BACrC,QAAQ,EAAE,GAAGC,cAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA,CAAE;AAC3C,yBAAA,EACD,UAAU,EAAE,CAAC,EAAA,CACb,EACFP,eAACQ;;;;AAEC,wBAAA,MAAM,EAAC,aAAa;;AAEpB,wBAAA,IAAI,EAAE;AACJ,4BAAA,IAAI,EAAE,+BAA+B;4BACrC,QAAQ,EAAE,GAAGD,cAAQ,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA,CAAE;AAC3C,yBAAA,EACD,UAAU,EAAE,CAAC,EAAA,CACb,EACFP,eAACS;;;;;;;;;;;;;;AAOC,wBAAA,YAAY,EAAE;AACZ,4BAAA,eAAe,EAAE,iCAAiC;AAClD,4BAAA,WAAW,EAAE,qCAAqC;AACnD,yBAAA,EACD,UAAU,EAAE;AACV,4BAAA,KAAK,EAAE,iCAAiC;AACzC,yBAAA,EACD,SAAS,EAAE;AACT,4BAAA,KAAK,EAAE,iCAAiC;yBACzC,EAAA,CACD,EACD,aAAa,KACZT,eAACU,eAAM,EAAA,EACL,YAAY,EAAE;4BACZ,MAAM,EAAE,GAAG;AACZ,yBAAA,EAAA,CACD,CACH,EACA,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,MACzCV,cAAA,CAACW,aAAI,EAAA,EAEH,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,GAAG,EACZ,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,KAAK,IAAIC,wBAAW,CAAC,KAAK,EAAE,MAAM,CAAC,EAC3C,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAA,EALR,CAAA,KAAA,EAAQ,GAAG,CAAA,CAAE,CAMlB,CACH,CAAC,CAAA,EAAA,CACQ,EAAA,CACQ,EAAA,CAClB;AAEV;;;;"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
- import { useToken, Box } from '@chakra-ui/react';
3
+ import { Box, useToken } from '@chakra-ui/react';
4
4
  import { ResponsiveContainer, LineChart, CartesianGrid, XAxis, YAxis, Tooltip, Legend, Line } from 'recharts';
5
5
  import '../ColorMode/ColorModeProvider.mjs';
6
6
  import '../ColorMode/ColorModeToggle.mjs';
@@ -8,10 +8,9 @@ import { useColorMode } from '../ColorMode/useColorMode.mjs';
8
8
  import { seriesColor } from './seriesColors.mjs';
9
9
 
10
10
  const LineGraph = ({ data = [], dataKeys, displayLegend = true, ...rest }) => {
11
- const primaryColor = useToken('colors', 'primary.main')[0];
12
- // Series 1 is the neutral brand line; further series cycle hues with no
13
- // status meaning (see seriesColors.ts). Strokes read the generated palette
14
- // directly because no semantic role fits a chart line.
11
+ // Series 1 is the data blue; further series cycle hues with no status
12
+ // meaning (see seriesColors.ts). Strokes read the generated palette directly
13
+ // because no semantic role fits a chart line.
15
14
  const { colorMode } = useColorMode();
16
15
  const isDark = colorMode === 'dark';
17
16
  return (jsx(Box, { h: "400px", ...rest, children: jsx(ResponsiveContainer, { width: "100%", height: "100%", children: jsxs(LineChart, { data: data, margin: {
@@ -66,7 +65,7 @@ const LineGraph = ({ data = [], dataKeys, displayLegend = true, ...rest }) => {
66
65
  color: 'var(--chakra-colors-fg-default)',
67
66
  } }), displayLegend && (jsx(Legend, { wrapperStyle: {
68
67
  bottom: -16,
69
- } })), dataKeys.map(({ key, label, color }, index) => (jsx(Line, { type: "monotone", dataKey: key, name: label, stroke: color ?? seriesColor(index, primaryColor, isDark), dot: { r: 0 } }, `line-${key}`)))] }) }) }));
68
+ } })), dataKeys.map(({ key, label, color }, index) => (jsx(Line, { type: "monotone", dataKey: key, name: label, stroke: color ?? seriesColor(index, isDark), dot: { r: 0 } }, `line-${key}`)))] }) }) }));
70
69
  };
71
70
 
72
71
  export { LineGraph };
@@ -1 +1 @@
1
- {"version":3,"file":"LineGraph.mjs","sources":["../../../src/components/LineGraph/LineGraph.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;MAiBa,SAAS,GAAG,CAAsB,EAC7C,IAAI,GAAG,EAAE,EACT,QAAQ,EACR,aAAa,GAAG,IAAI,EAC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EAAA,CACb,EACFA,IAAC;;;;;;;;;;;;;;AAOC,wBAAA,YAAY,EAAE;AACZ,4BAAA,eAAe,EAAE,iCAAiC;AAClD,4BAAA,WAAW,EAAE,qCAAqC;AACnD,yBAAA,EACD,UAAU,EAAE;AACV,4BAAA,KAAK,EAAE,iCAAiC;AACzC,yBAAA,EACD,SAAS,EAAE;AACT,4BAAA,KAAK,EAAE,iCAAiC;yBACzC,EAAA,CACD,EACD,aAAa,KACZA,IAAC,MAAM,EAAA,EACL,YAAY,EAAE;4BACZ,MAAM,EAAE,GAAG;AACZ,yBAAA,EAAA,CACD,CACH,EACA,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,MACzCA,GAAA,CAAC,IAAI,EAAA,EAEH,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,GAAG,EACZ,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,KAAK,IAAI,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,EACzD,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAA,EALR,QAAQ,GAAG,CAAA,CAAE,CAMlB,CACH,CAAC,CAAA,EAAA,CACQ,EAAA,CACQ,EAAA,CAClB;AAEV;;;;"}
1
+ {"version":3,"file":"LineGraph.mjs","sources":["../../../src/components/LineGraph/LineGraph.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;MAiBa,SAAS,GAAG,CAAsB,EAC7C,IAAI,GAAG,EAAE,EACT,QAAQ,EACR,aAAa,GAAG,IAAI,EACpB,GAAG,IAAI,EACW,KAAI;;;;AAItB,IAAA,MAAM,EAAE,SAAS,EAAE,GAAG,YAAY,EAAE;AACpC,IAAA,MAAM,MAAM,GAAG,SAAS,KAAK,MAAM;AACnC,IAAA,QACEA,GAAA,CAAC,GAAG,EAAA,EAAC,CAAC,EAAC,OAAO,EAAA,GAAK,IAAI,EAAA,Q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AA,EACL,YAAY,EAAE;4BACZ,MAAM,EAAE,GAAG;AACZ,yBAAA,EAAA,CACD,CACH,EACA,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,MACzCA,GAAA,CAAC,IAAI,EAAA,EAEH,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,GAAG,EACZ,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,KAAK,IAAI,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,EAC3C,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAA,EALR,CAAA,KAAA,EAAQ,GAAG,CAAA,CAAE,CAMlB,CACH,CAAC,CAAA,EAAA,CACQ,EAAA,CACQ,EAAA,CAClB;AAEV;;;;"}
@@ -1,8 +1,14 @@
1
1
  import { BoxProps } from '@chakra-ui/react';
2
2
  import { type DataKey as RechartsDataKey } from 'recharts/types/util/types.d';
3
3
  export interface LineGraphProps<T extends DatumBase> extends BoxProps {
4
+ /** One object per point on the X axis; `name` is the axis label. */
4
5
  data: Array<Datum<T>>;
6
+ /** The series to draw, in order. */
5
7
  dataKeys: Array<DataKey<T>>;
8
+ /**
9
+ * Show the legend under the chart.
10
+ * @default true
11
+ */
6
12
  displayLegend?: boolean;
7
13
  }
8
14
  /**
@@ -26,11 +32,15 @@ export type DataKey<T extends DatumBase> = {
26
32
  */
27
33
  key: RechartsDataKey<keyof T>;
28
34
  /**
29
- * Label for the XAxis
35
+ * Series name, shown in the legend and the tooltip.
30
36
  */
31
37
  label: string;
32
38
  /**
33
- * Optional custom colors for the series
39
+ * Stroke colour for this series, passed straight to the SVG (recharts does
40
+ * not resolve Chakra tokens — use a CSS variable such as
41
+ * `var(--chakra-colors-category-teal-fg)`). Defaults: series 1 is
42
+ * `primary.main`, the rest cycle meaning-free category hues
43
+ * (`CHART_SERIES_HUES`).
34
44
  */
35
45
  color?: string;
36
46
  };
@@ -1 +1 @@
1
- {"version":3,"file":"LineGraph.types.d.ts","sourceRoot":"","sources":["../../../src/components/LineGraph/LineGraph.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,OAAO,IAAI,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9E,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,SAAS,CAAE,SAAQ,QAAQ;IACnE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACnC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,SAAS,IAAI;IACvC,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,CAAC,CAAC;AAEN;;GAEG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,SAAS,IAAI;IACzC;;OAEG;IACH,GAAG,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;IAE9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
1
+ {"version":3,"file":"LineGraph.types.d.ts","sourceRoot":"","sources":["../../../src/components/LineGraph/LineGraph.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,OAAO,IAAI,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9E,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,SAAS,CAAE,SAAQ,QAAQ;IACnE,oEAAoE;IACpE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACtB,oCAAoC;IACpC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACnC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,SAAS,SAAS,IAAI;IACvC,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,CAAC,CAAC;AAEN;;GAEG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,SAAS,IAAI;IACzC;;OAEG;IACH,GAAG,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;IAE9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
@@ -2,12 +2,16 @@ import type { SystemHue } from '@/theme/colors';
2
2
  /**
3
3
  * Default stroke order for multi-series charts.
4
4
  *
5
- * Series 1 is the neutral brand line (`primary.main`); the rest cycle hues
6
- * that carry no meaning in the system. Red, yellow and green are the danger,
7
- * warning and success colours, and blue is info and links, so none of them
8
- * may colour a series by default — a red "UV" line reads as an error.
9
- * (Blue is reserved for data as a whole: a single-measure chart is a blue
10
- * monochrome ramp — SemanticTokens.mdx, "Blue means data and links".)
5
+ * Series 1 is the data blue (`blue.base`): blue means data (SemanticTokens.mdx,
6
+ * "Blue means data and links"), and a single-measure chart draws in the same
7
+ * blue, so adding a second series does not repaint the first. It used to be
8
+ * the ink `primary.main`, which read as body text rather than as data.
9
+ *
10
+ * The rest cycle hues that carry no meaning in the system, alternating cool
11
+ * and warm so neighbouring lines separate. Red, yellow and green are the
12
+ * danger, warning and success colours, so none of them may colour a series by
13
+ * default — a red "UV" line reads as an error. Brown comes late: next to the
14
+ * other dusty warm hues it reads as mud.
11
15
  *
12
16
  * Every stroke clears 3:1 against the page in both modes. Cyan, mint and
13
17
  * orange are too light at their base value in light mode (≈1.9:1), so they
@@ -18,7 +22,7 @@ type SeriesHue = {
18
22
  light: 'base' | 'hc';
19
23
  };
20
24
  export declare const CHART_SERIES_HUES: readonly SeriesHue[];
21
- /** Stroke for series `index` (0-based); index 0 is the caller's primary line. */
22
- export declare const seriesColor: (index: number, primary: string, isDark: boolean) => string;
25
+ /** Stroke for series `index` (0-based); index 0 is the data blue. */
26
+ export declare const seriesColor: (index: number, isDark: boolean) => string;
23
27
  export {};
24
28
  //# sourceMappingURL=seriesColors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"seriesColors.d.ts","sourceRoot":"","sources":["../../../src/components/LineGraph/seriesColors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;;;;;;;;;;;GAaG;AACH,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,OAAO,CAAC,SAAS,EAAE,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;IAC7D,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,SAAS,SAAS,EASjD,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,WAAW,GACtB,OAAO,MAAM,EACb,SAAS,MAAM,EACf,QAAQ,OAAO,KACd,MAKF,CAAC"}
1
+ {"version":3,"file":"seriesColors.d.ts","sourceRoot":"","sources":["../../../src/components/LineGraph/seriesColors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD;;;;;;;;;;;;;;;;;GAiBG;AACH,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,OAAO,CAAC,SAAS,EAAE,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;IAC7D,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,SAAS,SAAS,EASjD,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,QAAQ,OAAO,KAAG,MAO5D,CAAC"}
@@ -4,19 +4,20 @@
4
4
  var palette_generated = require('../../theme/palette.generated.js');
5
5
 
6
6
  const CHART_SERIES_HUES = [
7
- { hue: 'brown', light: 'base' },
8
- { hue: 'indigo', light: 'base' },
9
- { hue: 'pink', light: 'base' },
10
7
  { hue: 'teal', light: 'base' },
8
+ { hue: 'pink', light: 'base' },
9
+ { hue: 'indigo', light: 'base' },
11
10
  { hue: 'purple', light: 'base' },
11
+ { hue: 'brown', light: 'base' },
12
12
  { hue: 'cyan', light: 'hc' },
13
13
  { hue: 'mint', light: 'hc' },
14
14
  { hue: 'orange', light: 'hc' },
15
15
  ];
16
- /** Stroke for series `index` (0-based); index 0 is the caller's primary line. */
17
- const seriesColor = (index, primary, isDark) => {
18
- if (index === 0)
19
- return primary;
16
+ /** Stroke for series `index` (0-based); index 0 is the data blue. */
17
+ const seriesColor = (index, isDark) => {
18
+ if (index === 0) {
19
+ return isDark ? palette_generated.SYSTEM_HUES.blue.baseDark : palette_generated.SYSTEM_HUES.blue.base;
20
+ }
20
21
  const { hue, light } = CHART_SERIES_HUES[(index - 1) % CHART_SERIES_HUES.length];
21
22
  return isDark ? palette_generated.SYSTEM_HUES[hue].baseDark : palette_generated.SYSTEM_HUES[hue][light];
22
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"seriesColors.js","sources":["../../../src/components/LineGraph/seriesColors.ts"],"sourcesContent":[null],"names":["SYSTEM_HUES"],"mappings":";;;;;AAsBO,MAAM,iBAAiB,GAAyB;AACrD,IAAA,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE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AAK,EAAE,MAAM,EAAE;AAChC,IAAA,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE;AAC/B,IAAA,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE;AAC5B,IAAA,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE;AAC5B,IAAA,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE;;AAGhC;MACa,WAAW,GAAG,CAAC,KAAa,EAAE,MAAe,KAAY;AACpE,IAAA,IAAI,KAAK,KAAK,CAAC,EAAE;AACf,QAAA,OAAO,MAAM,GAAGA,6BAAW,CAAC,IAAI,CAAC,QAAQ,GAAGA,6BAAW,CAAC,IAAI,CAAC,IAAI;IACnE;AACA,IAAA,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAClB,iBAAiB,CAAC,CAAC,KAAK,GAAG,CAAC,IAAI,iBAAiB,CAAC,MAAM,CAAC;IAC3D,OAAO,MAAM,GAAGA,6BAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAGA,6BAAW,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC;AACrE;;;;;"}
@@ -2,19 +2,20 @@
2
2
  import { SYSTEM_HUES } from '../../theme/palette.generated.mjs';
3
3
 
4
4
  const CHART_SERIES_HUES = [
5
- { hue: 'brown', light: 'base' },
6
- { hue: 'indigo', light: 'base' },
7
- { hue: 'pink', light: 'base' },
8
5
  { hue: 'teal', light: 'base' },
6
+ { hue: 'pink', light: 'base' },
7
+ { hue: 'indigo', light: 'base' },
9
8
  { hue: 'purple', light: 'base' },
9
+ { hue: 'brown', light: 'base' },
10
10
  { hue: 'cyan', light: 'hc' },
11
11
  { hue: 'mint', light: 'hc' },
12
12
  { hue: 'orange', light: 'hc' },
13
13
  ];
14
- /** Stroke for series `index` (0-based); index 0 is the caller's primary line. */
15
- const seriesColor = (index, primary, isDark) => {
16
- if (index === 0)
17
- return primary;
14
+ /** Stroke for series `index` (0-based); index 0 is the data blue. */
15
+ const seriesColor = (index, isDark) => {
16
+ if (index === 0) {
17
+ return isDark ? SYSTEM_HUES.blue.baseDark : SYSTEM_HUES.blue.base;
18
+ }
18
19
  const { hue, light } = CHART_SERIES_HUES[(index - 1) % CHART_SERIES_HUES.length];
19
20
  return isDark ? SYSTEM_HUES[hue].baseDark : SYSTEM_HUES[hue][light];
20
21
  };
@@ -1 +1 @@
1
- {"version":3,"file":"seriesColors.mjs","sources":["../../../src/components/LineGraph/seriesColors.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAsBO,MAAM,iBAAiB,GAAyB;AACrD,IAAA,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE;AAC/B,IAAA,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE;AAChC,IAAA,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;AAC9B,IAAA,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;AAC9B,IAAA,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE;AAChC,IAAA,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE;AAC5B,IAAA,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE;AAC5B,IAAA,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE;;AAGhC;AACO,MAAM,WAAW,GAAG,CACzB,KAAa,EACb,OAAe,EACf,MAAe,KACL;IACV,IAAI,KAAK,KAAK,CAAC;AAAE,QAAA,OAAO,OAAO;AAC/B,IAAA,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAClB,iBAAiB,CAAC,CAAC,KAAK,GAAG,CAAC,IAAI,iBAAiB,CAAC,MAAM,CAAC;IAC3D,OAAO,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC;AACrE;;;;"}
1
+ {"version":3,"file":"seriesColors.mjs","sources":["../../../src/components/LineGraph/seriesColors.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AA0BO,MAAM,iBAAiB,GAAyB;AACrD,IAAA,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;AAC9B,IAAA,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;AAC9B,IAAA,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE;AAChC,IAAA,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE;AAChC,IAAA,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE;AAC/B,IAAA,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE;AAC5B,IAAA,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE;AAC5B,IAAA,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE;;AAGhC;MACa,WAAW,GAAG,CAAC,KAAa,EAAE,MAAe,KAAY;AACpE,IAAA,IAAI,KAAK,KAAK,CAAC,EAAE;AACf,QAAA,OAAO,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI;IACnE;AACA,IAAA,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAClB,iBAAiB,CAAC,CAAC,KAAK,GAAG,CAAC,IAAI,iBAAiB,CAAC,MAAM,CAAC;IAC3D,OAAO,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC;AACrE;;;;"}
@@ -1,7 +1,8 @@
1
1
  import { GridProps } from '@chakra-ui/react';
2
2
  export interface MasonryProps extends Omit<GridProps, 'gap'> {
3
3
  /**
4
- * Number of columns in the masonry layout
4
+ * Number of columns. A plain number, not a responsive object: for a
5
+ * responsive count, pass the result of `useBreakpointValue`.
5
6
  */
6
7
  numCols: number;
7
8
  /**
@@ -10,8 +11,12 @@ export interface MasonryProps extends Omit<GridProps, 'gap'> {
10
11
  */
11
12
  gap?: number | string;
12
13
  /**
13
- * Whether to arrange items from left to right (true) or top to bottom (false)
14
- * @default false (arrange vertically)
14
+ * `false` (default): each item goes into the currently shortest column, so
15
+ * the column heights stay balanced. `true`: items are dealt round-robin
16
+ * across the columns (item 1 → column 1, item 2 → column 2, …), so the
17
+ * first row reads left to right. Either way the DOM order is column by
18
+ * column, which is the order keyboard and screen-reader users get.
19
+ * @default false
15
20
  */
16
21
  horizontalArrangement?: boolean;
17
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Masonry.types.d.ts","sourceRoot":"","sources":["../../../src/components/Masonry/Masonry.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;IAC1D;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC"}
1
+ {"version":3,"file":"Masonry.types.d.ts","sourceRoot":"","sources":["../../../src/components/Masonry/Masonry.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;IAC1D;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB;;;;;;;OAOG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC"}
@@ -8,8 +8,16 @@ export declare const ItemVariant: {
8
8
  export type ItemVariant = (typeof ItemVariant)[keyof typeof ItemVariant];
9
9
  export type MenuItemOwnProps = Omit<ChakraMenuItemProps, 'as'> & {
10
10
  value: string;
11
+ /**
12
+ * `'danger'`: an action that deletes or removes something and cannot be
13
+ * undone (삭제, 연결 해제). Text is `danger.fg`; the highlighted row is
14
+ * `danger.bg`. Everything else is `'default'`.
15
+ * @default 'default'
16
+ */
11
17
  variant?: ItemVariant | null;
18
+ /** Leading icon. Decorative: give it `aria-hidden`. */
12
19
  icon?: React.ReactElement;
20
+ /** Trailing icon, pushed to the end of the row. Decorative: give it `aria-hidden`. */
13
21
  rightIcon?: React.ReactElement;
14
22
  };
15
23
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"MenuItem.types.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuItem.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAKxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,eAAO,MAAM,WAAW;;;CAGd,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEzE,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,GAAG;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,SAAS,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,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