@panneau/ui 5.0.0-alpha.1 → 5.0.0-alpha.2

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 (384) hide show
  1. package/README.md +263 -6
  2. package/bin/check-theme.js +5 -0
  3. package/dist/alert/Alert.css +28 -42
  4. package/dist/alert/Alert.d.ts +18 -4
  5. package/dist/alert/Alert.d.ts.map +1 -1
  6. package/dist/alert/Alert.js +4 -3
  7. package/dist/alert/Alert.js.map +1 -1
  8. package/dist/alert/Alert.module.js +14 -16
  9. package/dist/alert/Alert.module.js.map +1 -1
  10. package/dist/alert/tokens.d.ts +3 -0
  11. package/dist/alert/tokens.d.ts.map +1 -0
  12. package/dist/alert/tokens.js +21 -0
  13. package/dist/alert/tokens.js.map +1 -0
  14. package/dist/badge/Badge.css +24 -36
  15. package/dist/badge/Badge.d.ts +18 -3
  16. package/dist/badge/Badge.d.ts.map +1 -1
  17. package/dist/badge/Badge.js +3 -2
  18. package/dist/badge/Badge.js.map +1 -1
  19. package/dist/badge/Badge.module.js +9 -13
  20. package/dist/badge/Badge.module.js.map +1 -1
  21. package/dist/badge/tokens.d.ts +3 -0
  22. package/dist/badge/tokens.d.ts.map +1 -0
  23. package/dist/badge/tokens.js +23 -0
  24. package/dist/badge/tokens.js.map +1 -0
  25. package/dist/button/Button.css +58 -42
  26. package/dist/button/Button.d.ts +30 -3
  27. package/dist/button/Button.d.ts.map +1 -1
  28. package/dist/button/Button.js +27 -2
  29. package/dist/button/Button.js.map +1 -1
  30. package/dist/button/Button.module.js +14 -14
  31. package/dist/button/Button.module.js.map +1 -1
  32. package/dist/button/tokens.d.ts +3 -0
  33. package/dist/button/tokens.d.ts.map +1 -0
  34. package/dist/button/tokens.js +25 -0
  35. package/dist/button/tokens.js.map +1 -0
  36. package/dist/card/Card.css +27 -20
  37. package/dist/card/Card.js +1 -1
  38. package/dist/card/Card.js.map +1 -1
  39. package/dist/card/Card.module.js +5 -5
  40. package/dist/card/Card.module.js.map +1 -1
  41. package/dist/card/tokens.d.ts +3 -0
  42. package/dist/card/tokens.d.ts.map +1 -0
  43. package/dist/card/tokens.js +31 -0
  44. package/dist/card/tokens.js.map +1 -0
  45. package/dist/checkbox/Checkbox.css +22 -21
  46. package/dist/checkbox/Checkbox.d.ts.map +1 -1
  47. package/dist/checkbox/Checkbox.js +1 -0
  48. package/dist/checkbox/Checkbox.js.map +1 -1
  49. package/dist/checkbox/Checkbox.module.js +4 -4
  50. package/dist/checkbox/Checkbox.module.js.map +1 -1
  51. package/dist/checkbox/ChoiceChrome.d.ts +3 -1
  52. package/dist/checkbox/ChoiceChrome.d.ts.map +1 -1
  53. package/dist/checkbox/ChoiceChrome.js +2 -2
  54. package/dist/checkbox/ChoiceChrome.js.map +1 -1
  55. package/dist/checkbox/tokens.d.ts +3 -0
  56. package/dist/checkbox/tokens.d.ts.map +1 -0
  57. package/dist/checkbox/tokens.js +21 -0
  58. package/dist/checkbox/tokens.js.map +1 -0
  59. package/dist/combo-box/ComboBox.css +4 -4
  60. package/dist/combo-box/ComboBox.js +1 -1
  61. package/dist/combo-box/ComboBox.js.map +1 -1
  62. package/dist/combo-box/ComboBox.module.js +3 -3
  63. package/dist/container/Container.css +32 -0
  64. package/dist/container/Container.d.ts +15 -0
  65. package/dist/container/Container.d.ts.map +1 -0
  66. package/dist/container/Container.js +18 -0
  67. package/dist/container/Container.js.map +1 -0
  68. package/dist/container/Container.module.js +20 -0
  69. package/dist/container/Container.module.js.map +1 -0
  70. package/dist/container/tokens.d.ts +3 -0
  71. package/dist/container/tokens.d.ts.map +1 -0
  72. package/dist/container/tokens.js +19 -0
  73. package/dist/container/tokens.js.map +1 -0
  74. package/dist/date-picker/DatePicker.css +30 -30
  75. package/dist/date-picker/DatePicker.js +1 -1
  76. package/dist/date-picker/DatePicker.js.map +1 -1
  77. package/dist/date-picker/DatePicker.module.js +11 -11
  78. package/dist/date-picker/DatePicker.module.js.map +1 -1
  79. package/dist/date-picker/calendarTokens.d.ts +3 -0
  80. package/dist/date-picker/calendarTokens.d.ts.map +1 -0
  81. package/dist/date-picker/calendarTokens.js +17 -0
  82. package/dist/date-picker/calendarTokens.js.map +1 -0
  83. package/dist/dialog/Dialog.css +40 -36
  84. package/dist/dialog/Dialog.js +1 -1
  85. package/dist/dialog/Dialog.js.map +1 -1
  86. package/dist/dialog/Dialog.module.js +11 -11
  87. package/dist/dialog/Dialog.module.js.map +1 -1
  88. package/dist/dialog/tokens.d.ts +3 -0
  89. package/dist/dialog/tokens.d.ts.map +1 -0
  90. package/dist/dialog/tokens.js +29 -0
  91. package/dist/dialog/tokens.js.map +1 -0
  92. package/dist/disclosure/Disclosure.css +12 -12
  93. package/dist/disclosure/Disclosure.d.ts.map +1 -1
  94. package/dist/disclosure/Disclosure.js +1 -1
  95. package/dist/disclosure/Disclosure.js.map +1 -1
  96. package/dist/disclosure/Disclosure.module.js +7 -7
  97. package/dist/disclosure/Disclosure.module.js.map +1 -1
  98. package/dist/disclosure/tokens.d.ts +3 -0
  99. package/dist/disclosure/tokens.d.ts.map +1 -0
  100. package/dist/disclosure/tokens.js +15 -0
  101. package/dist/disclosure/tokens.js.map +1 -0
  102. package/dist/divider/Divider.css +17 -0
  103. package/dist/divider/Divider.d.ts +8 -0
  104. package/dist/divider/Divider.d.ts.map +1 -0
  105. package/dist/divider/Divider.js +21 -0
  106. package/dist/divider/Divider.js.map +1 -0
  107. package/dist/divider/Divider.module.js +12 -0
  108. package/dist/divider/Divider.module.js.map +1 -0
  109. package/dist/divider/tokens.d.ts +3 -0
  110. package/dist/divider/tokens.d.ts.map +1 -0
  111. package/dist/divider/tokens.js +13 -0
  112. package/dist/divider/tokens.js.map +1 -0
  113. package/dist/field/Field.css +40 -37
  114. package/dist/field/Field.module.js +11 -11
  115. package/dist/field/Field.module.js.map +1 -1
  116. package/dist/field/Fieldset.js +1 -1
  117. package/dist/field/Fieldset.js.map +1 -1
  118. package/dist/field/inputTokens.d.ts +3 -0
  119. package/dist/field/inputTokens.d.ts.map +1 -0
  120. package/dist/field/inputTokens.js +21 -0
  121. package/dist/field/inputTokens.js.map +1 -0
  122. package/dist/field/tokens.d.ts +3 -0
  123. package/dist/field/tokens.d.ts.map +1 -0
  124. package/dist/field/tokens.js +15 -0
  125. package/dist/field/tokens.js.map +1 -0
  126. package/dist/grid/Grid.css +174 -0
  127. package/dist/grid/Grid.d.ts +28 -0
  128. package/dist/grid/Grid.d.ts.map +1 -0
  129. package/dist/grid/Grid.js +31 -0
  130. package/dist/grid/Grid.js.map +1 -0
  131. package/dist/grid/Grid.module.js +12 -0
  132. package/dist/grid/Grid.module.js.map +1 -0
  133. package/dist/grid/GridItem.css +59 -0
  134. package/dist/grid/GridItem.module.js +7 -0
  135. package/dist/grid/GridItem.module.js.map +1 -0
  136. package/dist/grid/tokens.d.ts +3 -0
  137. package/dist/grid/tokens.d.ts.map +1 -0
  138. package/dist/grid/tokens.js +10 -0
  139. package/dist/grid/tokens.js.map +1 -0
  140. package/dist/heading/Heading.css +52 -0
  141. package/dist/heading/Heading.d.ts +17 -0
  142. package/dist/heading/Heading.d.ts.map +1 -0
  143. package/dist/heading/Heading.js +17 -0
  144. package/dist/heading/Heading.js.map +1 -0
  145. package/dist/heading/Heading.module.js +16 -0
  146. package/dist/heading/Heading.module.js.map +1 -0
  147. package/dist/heading/tokens.d.ts +6 -0
  148. package/dist/heading/tokens.d.ts.map +1 -0
  149. package/dist/heading/tokens.js +66 -0
  150. package/dist/heading/tokens.js.map +1 -0
  151. package/dist/icon/Icon.css +1 -1
  152. package/dist/icon/Icon.js +1 -1
  153. package/dist/icon/Icon.js.map +1 -1
  154. package/dist/icon/Icon.module.js +1 -1
  155. package/dist/icon-button/IconButton.css +2 -2
  156. package/dist/icon-button/IconButton.d.ts +1 -1
  157. package/dist/icon-button/IconButton.d.ts.map +1 -1
  158. package/dist/icon-button/IconButton.js +3 -3
  159. package/dist/icon-button/IconButton.js.map +1 -1
  160. package/dist/icon-button/IconButton.module.js +2 -2
  161. package/dist/index.d.ts +25 -5
  162. package/dist/index.d.ts.map +1 -1
  163. package/dist/index.js +20 -2
  164. package/dist/inline/Inline.css +142 -0
  165. package/dist/inline/Inline.d.ts +17 -0
  166. package/dist/inline/Inline.d.ts.map +1 -0
  167. package/dist/inline/Inline.js +21 -0
  168. package/dist/inline/Inline.js.map +1 -0
  169. package/dist/inline/Inline.module.js +12 -0
  170. package/dist/inline/Inline.module.js.map +1 -0
  171. package/dist/inline/tokens.d.ts +3 -0
  172. package/dist/inline/tokens.d.ts.map +1 -0
  173. package/dist/inline/tokens.js +10 -0
  174. package/dist/inline/tokens.js.map +1 -0
  175. package/dist/layout/responsive.d.ts +38 -0
  176. package/dist/layout/responsive.d.ts.map +1 -0
  177. package/dist/layout/responsive.js +49 -0
  178. package/dist/layout/responsive.js.map +1 -0
  179. package/dist/menu/Menu.js +2 -2
  180. package/dist/menu/Menu.js.map +1 -1
  181. package/dist/number-input/NumberInput.css +12 -12
  182. package/dist/number-input/NumberInput.js +1 -1
  183. package/dist/number-input/NumberInput.js.map +1 -1
  184. package/dist/number-input/NumberInput.module.js +4 -4
  185. package/dist/number-input/NumberInput.module.js.map +1 -1
  186. package/dist/number-input/tokens.d.ts +3 -0
  187. package/dist/number-input/tokens.d.ts.map +1 -0
  188. package/dist/number-input/tokens.js +10 -0
  189. package/dist/number-input/tokens.js.map +1 -0
  190. package/dist/popover/Popover.css +13 -12
  191. package/dist/popover/Popover.js +2 -2
  192. package/dist/popover/Popover.js.map +1 -1
  193. package/dist/popover/Popover.module.js +3 -3
  194. package/dist/popover/Popover.module.js.map +1 -1
  195. package/dist/popover/tokens.d.ts +3 -0
  196. package/dist/popover/tokens.d.ts.map +1 -0
  197. package/dist/popover/tokens.js +19 -0
  198. package/dist/popover/tokens.js.map +1 -0
  199. package/dist/prose/Prose.css +141 -0
  200. package/dist/prose/Prose.d.ts +11 -0
  201. package/dist/prose/Prose.d.ts.map +1 -0
  202. package/dist/prose/Prose.js +18 -0
  203. package/dist/prose/Prose.js.map +1 -0
  204. package/dist/prose/Prose.module.js +8 -0
  205. package/dist/prose/Prose.module.js.map +1 -0
  206. package/dist/prose/tokens.d.ts +3 -0
  207. package/dist/prose/tokens.d.ts.map +1 -0
  208. package/dist/prose/tokens.js +33 -0
  209. package/dist/prose/tokens.js.map +1 -0
  210. package/dist/radio-group/RadioGroup.css +21 -20
  211. package/dist/radio-group/RadioGroup.d.ts.map +1 -1
  212. package/dist/radio-group/RadioGroup.js +2 -2
  213. package/dist/radio-group/RadioGroup.js.map +1 -1
  214. package/dist/radio-group/RadioGroup.module.js +6 -6
  215. package/dist/radio-group/RadioGroup.module.js.map +1 -1
  216. package/dist/radio-group/tokens.d.ts +3 -0
  217. package/dist/radio-group/tokens.d.ts.map +1 -0
  218. package/dist/radio-group/tokens.js +19 -0
  219. package/dist/radio-group/tokens.js.map +1 -0
  220. package/dist/root/PanneauRoot.css +243 -20
  221. package/dist/root/PanneauRoot.d.ts +28 -4
  222. package/dist/root/PanneauRoot.d.ts.map +1 -1
  223. package/dist/root/PanneauRoot.js +104 -21
  224. package/dist/root/PanneauRoot.js.map +1 -1
  225. package/dist/root/PanneauRoot.module.js +11 -3
  226. package/dist/root/PanneauRoot.module.js.map +1 -1
  227. package/dist/root/ThemeScope.d.ts +24 -0
  228. package/dist/root/ThemeScope.d.ts.map +1 -0
  229. package/dist/root/ThemeScope.js +49 -0
  230. package/dist/root/ThemeScope.js.map +1 -0
  231. package/dist/select/ListBox.css +23 -22
  232. package/dist/select/ListBox.module.js +12 -12
  233. package/dist/select/ListBox.module.js.map +1 -1
  234. package/dist/select/Select.js +1 -1
  235. package/dist/select/Select.js.map +1 -1
  236. package/dist/select/listBoxTokens.d.ts +3 -0
  237. package/dist/select/listBoxTokens.d.ts.map +1 -0
  238. package/dist/select/listBoxTokens.js +19 -0
  239. package/dist/select/listBoxTokens.js.map +1 -0
  240. package/dist/spinner/Spinner.css +8 -8
  241. package/dist/spinner/Spinner.js +1 -1
  242. package/dist/spinner/Spinner.js.map +1 -1
  243. package/dist/spinner/Spinner.module.js +5 -5
  244. package/dist/spinner/Spinner.module.js.map +1 -1
  245. package/dist/spinner/tokens.d.ts +3 -0
  246. package/dist/spinner/tokens.d.ts.map +1 -0
  247. package/dist/spinner/tokens.js +10 -0
  248. package/dist/spinner/tokens.js.map +1 -0
  249. package/dist/stack/Stack.css +135 -0
  250. package/dist/stack/Stack.d.ts +15 -0
  251. package/dist/stack/Stack.d.ts.map +1 -0
  252. package/dist/stack/Stack.js +21 -0
  253. package/dist/stack/Stack.js.map +1 -0
  254. package/dist/stack/Stack.module.js +8 -0
  255. package/dist/stack/Stack.module.js.map +1 -0
  256. package/dist/stack/tokens.d.ts +3 -0
  257. package/dist/stack/tokens.d.ts.map +1 -0
  258. package/dist/stack/tokens.js +10 -0
  259. package/dist/stack/tokens.js.map +1 -0
  260. package/dist/switch/Switch.css +34 -25
  261. package/dist/switch/Switch.d.ts.map +1 -1
  262. package/dist/switch/Switch.js +1 -0
  263. package/dist/switch/Switch.js.map +1 -1
  264. package/dist/switch/Switch.module.js +4 -4
  265. package/dist/switch/Switch.module.js.map +1 -1
  266. package/dist/switch/tokens.d.ts +3 -0
  267. package/dist/switch/tokens.d.ts.map +1 -0
  268. package/dist/switch/tokens.js +25 -0
  269. package/dist/switch/tokens.js.map +1 -0
  270. package/dist/tabs/Tabs.css +24 -23
  271. package/dist/tabs/Tabs.js +4 -4
  272. package/dist/tabs/Tabs.js.map +1 -1
  273. package/dist/tabs/Tabs.module.js +4 -4
  274. package/dist/tabs/Tabs.module.js.map +1 -1
  275. package/dist/tabs/tokens.d.ts +3 -0
  276. package/dist/tabs/tokens.d.ts.map +1 -0
  277. package/dist/tabs/tokens.js +25 -0
  278. package/dist/tabs/tokens.js.map +1 -0
  279. package/dist/text/Text.css +74 -0
  280. package/dist/text/Text.d.ts +27 -0
  281. package/dist/text/Text.d.ts.map +1 -0
  282. package/dist/text/Text.js +16 -0
  283. package/dist/text/Text.js.map +1 -0
  284. package/dist/text/Text.module.js +30 -0
  285. package/dist/text/Text.module.js.map +1 -0
  286. package/dist/text/tokens.d.ts +3 -0
  287. package/dist/text/tokens.d.ts.map +1 -0
  288. package/dist/text/tokens.js +10 -0
  289. package/dist/text/tokens.js.map +1 -0
  290. package/dist/text-area/TextArea.css +1 -1
  291. package/dist/text-area/TextArea.js +1 -1
  292. package/dist/text-area/TextArea.js.map +1 -1
  293. package/dist/text-area/TextArea.module.js +1 -1
  294. package/dist/text-input/TextInput.js +1 -1
  295. package/dist/text-input/TextInput.js.map +1 -1
  296. package/dist/theme/Tone.css +70 -0
  297. package/dist/theme/Tone.module.js +20 -0
  298. package/dist/theme/Tone.module.js.map +1 -0
  299. package/dist/theme/bootstrap.d.ts +10 -0
  300. package/dist/theme/bootstrap.d.ts.map +1 -1
  301. package/dist/theme/bootstrap.js +48 -5
  302. package/dist/theme/bootstrap.js.map +1 -1
  303. package/dist/theme/chartColors.d.ts +23 -0
  304. package/dist/theme/chartColors.d.ts.map +1 -0
  305. package/dist/theme/chartColors.js +27 -0
  306. package/dist/theme/chartColors.js.map +1 -0
  307. package/dist/theme/checkTheme.d.ts +39 -0
  308. package/dist/theme/checkTheme.d.ts.map +1 -0
  309. package/dist/theme/checkTheme.js +132 -0
  310. package/dist/theme/checkTheme.js.map +1 -0
  311. package/dist/theme/cli.d.ts +14 -0
  312. package/dist/theme/cli.d.ts.map +1 -0
  313. package/dist/theme/cli.js +61 -0
  314. package/dist/theme/cli.js.map +1 -0
  315. package/dist/theme/color.d.ts +30 -0
  316. package/dist/theme/color.d.ts.map +1 -0
  317. package/dist/theme/color.js +94 -0
  318. package/dist/theme/color.js.map +1 -0
  319. package/dist/theme/colorVision.d.ts +23 -0
  320. package/dist/theme/colorVision.d.ts.map +1 -0
  321. package/dist/theme/colorVision.js +140 -0
  322. package/dist/theme/colorVision.js.map +1 -0
  323. package/dist/theme/componentTokens.d.ts +24 -0
  324. package/dist/theme/componentTokens.d.ts.map +1 -0
  325. package/dist/theme/componentTokens.js +20 -0
  326. package/dist/theme/componentTokens.js.map +1 -0
  327. package/dist/theme/components.d.ts +38 -0
  328. package/dist/theme/components.d.ts.map +1 -0
  329. package/dist/theme/components.js +65 -0
  330. package/dist/theme/components.js.map +1 -0
  331. package/dist/theme/defineTheme.d.ts +85 -0
  332. package/dist/theme/defineTheme.d.ts.map +1 -0
  333. package/dist/theme/defineTheme.js +130 -0
  334. package/dist/theme/defineTheme.js.map +1 -0
  335. package/dist/theme/fonts.d.ts +32 -0
  336. package/dist/theme/fonts.d.ts.map +1 -0
  337. package/dist/theme/fonts.js +36 -0
  338. package/dist/theme/fonts.js.map +1 -0
  339. package/dist/theme/index.d.ts +13 -0
  340. package/dist/theme/index.d.ts.map +1 -0
  341. package/dist/theme/index.js +10 -0
  342. package/dist/theme/semanticTokens.d.ts +9 -0
  343. package/dist/theme/semanticTokens.d.ts.map +1 -0
  344. package/dist/theme/semanticTokens.js +110 -0
  345. package/dist/theme/semanticTokens.js.map +1 -0
  346. package/dist/theme/theme.d.ts +61 -7
  347. package/dist/theme/theme.d.ts.map +1 -1
  348. package/dist/theme/theme.js +100 -10
  349. package/dist/theme/theme.js.map +1 -1
  350. package/dist/theme/toneClass.d.ts +8 -0
  351. package/dist/theme/toneClass.d.ts.map +1 -0
  352. package/dist/theme/toneClass.js +15 -0
  353. package/dist/theme/toneClass.js.map +1 -0
  354. package/dist/theme/tones.d.ts +89 -0
  355. package/dist/theme/tones.d.ts.map +1 -0
  356. package/dist/theme/tones.js +127 -0
  357. package/dist/theme/tones.js.map +1 -0
  358. package/dist/time-input/TimeInput.js +1 -1
  359. package/dist/time-input/TimeInput.js.map +1 -1
  360. package/dist/toast/Toast.css +22 -44
  361. package/dist/toast/Toast.d.ts +5 -3
  362. package/dist/toast/Toast.d.ts.map +1 -1
  363. package/dist/toast/Toast.js +4 -3
  364. package/dist/toast/Toast.js.map +1 -1
  365. package/dist/toast/Toast.module.js +10 -16
  366. package/dist/toast/Toast.module.js.map +1 -1
  367. package/dist/toast/tokens.d.ts +3 -0
  368. package/dist/toast/tokens.d.ts.map +1 -0
  369. package/dist/toast/tokens.js +21 -0
  370. package/dist/toast/tokens.js.map +1 -0
  371. package/dist/tooltip/Tooltip.css +12 -11
  372. package/dist/tooltip/Tooltip.js +1 -1
  373. package/dist/tooltip/Tooltip.js.map +1 -1
  374. package/dist/tooltip/Tooltip.module.js +2 -2
  375. package/dist/tooltip/Tooltip.module.js.map +1 -1
  376. package/dist/tooltip/tokens.d.ts +3 -0
  377. package/dist/tooltip/tokens.d.ts.map +1 -0
  378. package/dist/tooltip/tokens.js +21 -0
  379. package/dist/tooltip/tokens.js.map +1 -0
  380. package/dist/utils/cx.d.ts +1 -1
  381. package/dist/utils/cx.d.ts.map +1 -1
  382. package/dist/utils/cx.js +2 -2
  383. package/dist/utils/cx.js.map +1 -1
  384. package/package.json +15 -3
package/README.md CHANGED
@@ -15,24 +15,281 @@ import { Button, PanneauRoot, TextInput, bootstrapTheme } from '@panneau/ui';
15
15
  </PanneauRoot>;
16
16
  ```
17
17
 
18
- | Export | Content |
19
- | --------------------- | ------------------------------------------------------------------------------------------------- |
20
- | `@panneau/ui` | `PanneauRoot`, themes, the primitives, `Icon`, `getNamedIcon()`, `useToast()`, `usePanneauIntl()` |
21
- | `@panneau/ui/locales` | Deprecated: the UI messages by locale, `en` and `fr`. Use `@panneau/intl` |
18
+ | Export | Content |
19
+ | --------------------- | ------------------------------------------------------------------------------------------------------- |
20
+ | `@panneau/ui` | `PanneauRoot`, themes, the primitives, `Icon`, `getNamedIcon()`, `useToast()`, `usePanneauIntl()` |
21
+ | `@panneau/ui/theme` | Themes as data, without components or CSS, for Node: `defineTheme()`, `checkTheme()`, `bootstrapTheme`… |
22
+ | `@panneau/ui/locales` | Deprecated: the UI messages by locale, `en` and `fr`. Use `@panneau/intl` |
22
23
 
23
24
  ## Root, tokens and themes
24
25
 
25
26
  Every Panneau interface renders inside a `PanneauRoot`. It scopes the base stylesheet and the design tokens (`--panneau-*` CSS variables) to its element: Panneau adds no global CSS to the page. Overlays (dialogs, popovers, menus, tooltips) and toasts render inside it too.
26
27
 
27
28
  - `colorScheme`: `light` (default), `dark`, or `auto`, which follows the system.
28
- - `theme`: tokens that override the default theme. `bootstrapTheme` follows a site's Bootstrap 5.3 variables and color mode.
29
+ - `density`: `compact`, `comfortable`, `touch`, or `auto` (default), which is `touch` on touch screens and `comfortable` otherwise. See [Density](#density).
30
+ - `theme`: tokens, tones and variants that override the default theme (see [Defining themes](#defining-themes)). `bootstrapTheme` follows a site's Bootstrap 5.3 variables and color mode.
29
31
  - A project can also override any token with its own class on the root: `.my-panneau { --panneau-color-accent: #0a58ca; }`.
30
32
 
31
33
  The default theme and the icon set are explained in [decision 0020](../../docs/decisions/0020-default-theme-and-icons.md).
32
34
 
35
+ ### Scopes
36
+
37
+ `ThemeScope` applies a theme, a color scheme or a density to part of the page, like `data-bs-theme` on any element, without a new root:
38
+
39
+ ```tsx
40
+ <PanneauRoot theme={brand}>
41
+ <ThemeScope as="aside" colorScheme="dark">
42
+ <Navigation />
43
+ </ThemeScope>
44
+ <ThemeScope density="compact">
45
+ <ListView />
46
+ </ThemeScope>
47
+ </PanneauRoot>
48
+ ```
49
+
50
+ What a scope doesn't set comes from around it: a scope with only a density keeps the colors of the root's theme. Overlays opened inside a scope (dialogs, popovers, menus) render in its own container and keep its tokens. Custom color schemes, beyond light and dark, are themes applied to a scope.
51
+
52
+ ### Component tokens
53
+
54
+ Every component reads its own tokens, `--panneau-<component>-<token>`, which default to semantic tokens. Set one to restyle a single component, in a theme, on the root, or on any element around the components:
55
+
56
+ ```css
57
+ .my-panneau {
58
+ --panneau-badge-radius: var(--panneau-radius-sm); /* square badges, nothing else changes */
59
+ }
60
+
61
+ .my-toolbar {
62
+ --panneau-button-padding-x: var(--panneau-space-2);
63
+ }
64
+ ```
65
+
66
+ `componentTokens` lists every component token and its default, by component, and `ComponentTokenName` is their type. Some tokens style parts that several components share:
67
+
68
+ - `input`: the box of text inputs, selects, combo boxes and pickers;
69
+ - `field`: labels, descriptions and errors;
70
+ - `list-box`: options of selects, combo boxes and menus;
71
+ - `calendar`.
72
+
73
+ ### Tones and appearances
74
+
75
+ Components with a color take a `tone`, like Bootstrap's theme colors: `neutral`, `accent`, `success`, `warning`, `danger` and `info` are built in. `Button`, `Badge` and `Alert` also take an `appearance` (`solid`, `outline`, `subtle`, and `ghost` for buttons):
76
+
77
+ ```tsx
78
+ <Button tone="accent">Save</Button>
79
+ <Button tone="danger" appearance="outline">Remove</Button>
80
+ <Badge tone="success">Published</Badge>
81
+ <Alert tone="warning" appearance="solid" title="Scheduled" />
82
+ ```
83
+
84
+ The `variant` values of `Button` (`primary`, `secondary`, `ghost`, `danger`) are deprecated aliases of a tone and an appearance.
85
+
86
+ A theme adds tones, from one color (Panneau derives a readable text color, the hover, the subtle background and the border) or with every value, and named variants of components:
87
+
88
+ ```tsx
89
+ const theme = defineTheme({
90
+ tones: { signal: '#f25c05' },
91
+ components: {
92
+ badge: { variants: { tag: { 'panneau-badge-radius': 'var(--panneau-radius-sm)' } } },
93
+ },
94
+ });
95
+
96
+ declare module '@panneau/ui' {
97
+ interface PanneauTones {
98
+ signal: true;
99
+ }
100
+ interface BadgeVariants {
101
+ tag: true;
102
+ }
103
+ }
104
+
105
+ <Badge tone="signal" variant="tag">
106
+ Live
107
+ </Badge>;
108
+ ```
109
+
110
+ `checkTheme(theme)` reports the colors of a theme that miss their contrast ratio (4.5:1 for text, 3:1 for control borders), like Bootstrap's `$min-contrast-ratio`. It follows references to the theme's palette and tokens.
111
+
112
+ ### Defining themes
113
+
114
+ `defineTheme()` declares a theme. TypeScript checks the name of every token, semantic or component, and the console reports unknown names in Panneau's namespaces (`panneau-color-txt`), such as typos in a theme loaded from JSON. A theme can name its raw colors once in a `palette`, written as `--panneau-palette-<name>`, and build on other themes with `extends`:
115
+
116
+ ```ts
117
+ import { bootstrapTheme, defineTheme } from '@panneau/ui';
118
+
119
+ const brand = defineTheme({
120
+ label: 'Brand',
121
+ palette: { orange: '#f25c05', ink: '#1c1917' },
122
+ tokens: {
123
+ 'panneau-color-accent': 'var(--panneau-palette-ink)',
124
+ 'panneau-button-radius': '0',
125
+ },
126
+ dark: { 'panneau-color-accent': '#fafaf9' },
127
+ tones: { signal: 'var(--panneau-palette-orange)' },
128
+ });
129
+
130
+ // A variation: the same theme, more compact.
131
+ const compact = defineTheme({ extends: brand, tokens: { 'panneau-control-height': '2rem' } });
132
+
133
+ // The brand theme, on a site that uses Bootstrap.
134
+ const onBootstrap = defineTheme({ extends: [bootstrapTheme, brand] });
135
+ ```
136
+
137
+ Values merge in this order, each overriding the ones before: the default theme, the themes a theme `extends` (in order), the theme itself, then a project's own class on the root. A token set in `tokens` but not in `dark` applies to both schemes, so it also replaces the dark value of the themes it extends. `mergeThemes()` merges themes the same way.
138
+
139
+ `defineTheme()` returns a plain `Theme`: themes are data. They can be written as JSON files, with the [`theme.schema.json`](../protocol/schema/theme.schema.json) of `@panneau/protocol`, registered by plugins of `@panneau/core`, and carried by the definition, whose `theme` extends themes of plugins by id. Tokens of a project's own components are declared in `PanneauTokens`:
140
+
141
+ ```ts
142
+ declare module '@panneau/ui' {
143
+ interface PanneauTokens {
144
+ 'panneau-map-marker-color': true;
145
+ }
146
+ }
147
+ ```
148
+
149
+ `SEMANTIC_TOKENS` lists the semantic tokens, `componentTokens` the component tokens.
150
+
151
+ ### Typography and fonts
152
+
153
+ The theme has four font roles: `--panneau-font-family-body`, `-heading` (the body's by default), `-display` (the heading's by default) and `-mono`. `--panneau-font-family` is a deprecated alias of the body family: set `-body` instead, so that headings follow it. `--panneau-font-numeric` (`tabular-nums`) lines up digits in stats, dates and tables.
154
+
155
+ Panneau styles no element beyond its reset, since it is often embedded in someone else's page. Three components apply the typography of the theme:
156
+
157
+ - `Heading`: a `level` (`h1`–`h6`, 2 by default) and a visual `size`, independent of it: `1` to `4`, `display-1` and `display-2`, like Bootstrap's `.h1` and `.display-1`. Its tokens (`--panneau-heading-1-font-size`, `--panneau-heading-display-1-font-weight`…) set the size, weight, line height and letter spacing of each size.
158
+ - `Text`: `size` (`xs` to `xl`), `weight`, `family` (a font role), `tone`, `muted`, `numeric` and `truncate`, as a `p` by default (`as="span"`).
159
+ - `Prose`: styles the elements of rich content inside it (headings, lists, links, quotes, code, tables), such as the output of an editor or Markdown.
160
+
161
+ ```tsx
162
+ <Heading level={1} size="display-2">
163
+ 1,204 pages
164
+ </Heading>
165
+ <Text muted size="sm">
166
+ Updated today
167
+ </Text>
168
+ <Prose dangerouslySetInnerHTML={{ __html: page.body }} />
169
+ ```
170
+
171
+ A theme declares its fonts: font faces, written as `@font-face` rules, or a hosted stylesheet. `PanneauRoot` adds them to the page once, however many roots use the theme.
172
+
173
+ ```ts
174
+ const editorial = defineTheme({
175
+ fonts: [
176
+ { family: 'Geist', src: "url(/fonts/geist.woff2) format('woff2')", weight: '100 900' },
177
+ { stylesheet: 'https://fonts.googleapis.com/css2?family=Fraunces:wght@600&display=swap' },
178
+ ],
179
+ tokens: {
180
+ 'panneau-font-family-body': 'Geist, system-ui, sans-serif',
181
+ 'panneau-font-family-heading': 'Fraunces, Georgia, serif',
182
+ },
183
+ });
184
+ ```
185
+
186
+ ### Layout
187
+
188
+ Five primitives lay out content with the space scale of the theme, without utility classes:
189
+
190
+ - `Stack`: items one under the other, like Bootstrap's `.vstack`;
191
+ - `Inline`: items side by side, wrapping when they don't fit, like `.hstack`;
192
+ - `Grid` and `GridItem`: equal columns (`columns`), or as many as fit (`minItemWidth="16rem"`), and cells that span several columns (`span`, or `span="full"`);
193
+ - `Container`: a centered column with a maximum width (`size`: `sm`, `md`, `lg` by default, `xl` or `full`);
194
+ - `Divider`: a line between groups, horizontal or vertical.
195
+
196
+ `gap` takes a step of the space scale (`gap={2}` is `--panneau-space-2`), and `align` and `justify` the alignment of the items. These props, `columns` and `span` are **responsive**: a value, or values by breakpoint, each applying from its breakpoint up.
197
+
198
+ ```tsx
199
+ <Container>
200
+ <Grid columns={{ base: 1, md: 2, lg: 3 }} gap={{ base: 3, lg: 4 }}>
201
+ <GridItem span={{ base: 1, lg: 'full' }}>
202
+ <Card title="Summary" />
203
+ </GridItem>
204
+ <Card title="Pages" />
205
+ <Card title="Articles" />
206
+ </Grid>
207
+ </Container>
208
+ ```
209
+
210
+ Breakpoints (`BREAKPOINTS`) are `sm` 40rem, `md` 48rem, `lg` 64rem and `xl` 80rem, like `$grid-breakpoints`. They are widths of the nearest **size container**, not of the viewport, so that a grid in a narrow sidebar behaves as on a phone. `PanneauRoot` and `Container` are size containers, as are forms and lists. A size container takes its width from its parent, never from its content: in a flex row or a float, give the root a width, or it collapses.
211
+
212
+ Responsive values are inline CSS variables, read by static rules in each container query: no styles are generated per instance.
213
+
214
+ ### Density
215
+
216
+ A density is a set of tokens: `--panneau-control-height` and `-sm`, `--panneau-font-size-control`, `--panneau-control-padding-x` (inputs and buttons) and `--panneau-row-padding-y` (rows of tables, options of lists). The `density` of the root picks one, and the `size` props of components (`size="sm"`) stay relative to it.
217
+
218
+ A theme redefines a density in `densities`. Density tokens set in `tokens` instead apply to every density, which then no longer changes them.
219
+
220
+ ```ts
221
+ const roomy = defineTheme({
222
+ densities: {
223
+ comfortable: { 'panneau-control-height': '2.5rem' },
224
+ compact: { 'panneau-row-padding-y': '0.125rem' },
225
+ },
226
+ });
227
+ ```
228
+
229
+ ### Chart colors
230
+
231
+ Charts (dashboard widgets, reports) use only the chart tokens of the theme, in both schemes:
232
+
233
+ - `--panneau-chart-categorical-1` to `-8`: series, in a fixed order;
234
+ - `--panneau-chart-sequential-1` to `-5`: a ramp from low to high, for quantities;
235
+ - `--panneau-chart-diverging-negative`, `-neutral` and `-positive`: values below and above a reference.
236
+
237
+ `chartColors` gives them as CSS variables for `fill` and `stroke`, so that charts follow the theme, the color scheme and the scope:
238
+
239
+ ```tsx
240
+ <rect fill={chartColors.categorical(index)} />
241
+ <rect fill={chartColors.sequential(5)} />
242
+ <rect fill={chartColors.diverging.negative} />
243
+ ```
244
+
245
+ Each default categorical color reaches 3:1 against the surface (WCAG non-text contrast), and the eight stay distinct for people with protanopia, deuteranopia or tritanopia: a test checks it. `checkTheme()` runs the same checks on the chart colors a theme sets, and `checkColorDifferences(colors)` on any palette.
246
+
247
+ ### Checking a theme
248
+
249
+ `checkTheme(theme)` reports what a theme makes hard to read: text tokens against backgrounds (4.5:1), control borders and chart colors (3:1), the text of each tone on the surface and on its subtle background, and categorical chart colors that look alike with a color vision deficiency. The `panneau-check-theme` command runs it on a JSON theme or on an export of a module, and exits with 1 when a check fails, for CI:
250
+
251
+ ```sh
252
+ npx panneau-check-theme themes/brand.json
253
+ npx panneau-check-theme src/theme.mjs --export brand --json
254
+ ```
255
+
256
+ `@panneau/ui/theme` exports the theme functions without components or CSS, so that Node scripts (a build step, a backend that stores themes) can import them.
257
+
258
+ ### Bootstrap
259
+
260
+ `bootstrapTheme` maps Panneau's tokens to the CSS variables of Bootstrap 5.3: colors, fonts, radii, shadows, the color mode (`data-bs-theme`), and the size of controls in the comfortable density. Bootstrap's theme colors become tones: `accent` is `primary`, and `primary` and `secondary` keep their names. `bootstrapTone(color)` turns any theme color of a site, custom ones included, into a tone:
261
+
262
+ ```ts
263
+ const site = defineTheme({ extends: bootstrapTheme, tones: { brand: bootstrapTone('brand') } });
264
+ ```
265
+
266
+ Bootstrap 5.3 declares the variables of its components (`--bs-btn-*`, `--bs-card-*`) on their classes, where Panneau's components can't read them: `bootstrapTheme` maps component tokens to the root variables those default to (`--bs-border-radius`, `--bs-border-color-translucent`, `--bs-heading-color`).
267
+
268
+ ### Classes
269
+
270
+ Class names are stable and readable, without a hash, like Bootstrap's: target them in a project's CSS.
271
+
272
+ - The root of every component has `panneau-<component>`: `.panneau-button`, `.panneau-badge`, `.panneau-text-input`, `.panneau-card`.
273
+ - Its parts and modifiers are `panneau-<component>-<name>`: `.panneau-card-header`, `.panneau-button-sm`.
274
+ - States use standard attributes: ARIA (`[aria-invalid]`, `[aria-expanded]`, `[aria-selected]`…) and the state attributes of React Aria Components (`[data-hovered]`, `[data-focus-visible]`…).
275
+
276
+ ```css
277
+ .my-panneau .panneau-badge {
278
+ letter-spacing: 0.02em;
279
+ }
280
+
281
+ .my-panneau .panneau-text-input [aria-invalid='true'] {
282
+ background-color: #fff5f5;
283
+ }
284
+ ```
285
+
286
+ [`api/ui.classes.md`](api/ui.classes.md) lists every class. They are public API: a rename is a breaking change.
287
+
288
+ The theme model is described in [decision 0024](../../docs/decisions/0024-theme-model.md).
289
+
33
290
  ## Primitives
34
291
 
35
- `Button`, `IconButton`, `TextInput`, `TextArea`, `NumberInput`, `Select` (single or multiple), `ComboBox`, `Checkbox`, `Switch`, `RadioGroup`, `DatePicker`, `TimeInput`, `Fieldset`, `Dialog`, `Popover`, `Menu`, `Tabs`, `Tooltip`, toasts (`useToast()`), `Alert`, `Badge`, `Spinner`, `Card`, `Disclosure` and `Icon`.
292
+ `Heading`, `Text`, `Prose`, `Stack`, `Inline`, `Grid`, `Container`, `Divider`, `Button`, `IconButton`, `TextInput`, `TextArea`, `NumberInput`, `Select` (single or multiple), `ComboBox`, `Checkbox`, `Switch`, `RadioGroup`, `DatePicker`, `TimeInput`, `Fieldset`, `Dialog`, `Popover`, `Menu`, `Tabs`, `Tooltip`, toasts (`useToast()`), `Alert`, `Badge`, `Spinner`, `Card`, `Disclosure` and `Icon`.
36
293
 
37
294
  - Every component accepts `className`, and `xxxClassName` props for its inner elements (`labelClassName`, `inputClassName`…).
38
295
  - Labelled controls take `label`, `description` and `errors` (a list of messages: any message makes the control invalid and describes it).
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ // Checks the contrast of a theme: `panneau-check-theme theme.json`. See `--help`.
3
+ import { runCheckTheme } from '../dist/theme/cli.js';
4
+
5
+ process.exitCode = await runCheckTheme(process.argv.slice(2));
@@ -1,56 +1,42 @@
1
- .panneau-alert-YltdMY {
1
+ .panneau-alert {
2
2
  display: flex;
3
3
  align-items: flex-start;
4
- gap: var(--panneau-space-3);
5
- padding: var(--panneau-space-3) var(--panneau-space-4);
4
+ gap: var(--panneau-alert-gap, var(--panneau-space-3));
5
+ padding: var(--panneau-alert-padding-y, var(--panneau-space-3))
6
+ var(--panneau-alert-padding-x, var(--panneau-space-4));
6
7
  color: var(--panneau-color-text);
7
- background-color: var(--panneau-color-surface-sunken);
8
- border: var(--panneau-border-width) solid var(--panneau-color-border);
9
- border-radius: var(--panneau-radius-md);
8
+ border: var(--panneau-alert-border-width, var(--panneau-border-width)) solid transparent;
9
+ border-radius: var(--panneau-alert-radius, var(--panneau-radius-md));
10
10
  }
11
11
 
12
- .panneau-success-Z7VQdb {
13
- background-color: var(--panneau-color-success-subtle);
14
- border-color: var(--panneau-color-success-border);
15
- }
16
-
17
- .panneau-danger-7fFkRR {
18
- background-color: var(--panneau-color-danger-subtle);
19
- border-color: var(--panneau-color-danger-border);
20
- }
21
-
22
- .panneau-warning-xvkEcQ {
23
- background-color: var(--panneau-color-warning-subtle);
24
- border-color: var(--panneau-color-warning-border);
25
- }
26
-
27
- .panneau-info-beWi9v {
28
- background-color: var(--panneau-color-info-subtle);
29
- border-color: var(--panneau-color-info-border);
30
- }
31
-
32
- .panneau-icon-blRAxm {
12
+ .panneau-alert-icon {
33
13
  margin-top: 0.125rem;
34
- color: var(--panneau-color-text-muted);
14
+ color: var(--panneau-tone-text);
35
15
  }
36
16
 
37
- .panneau-success-Z7VQdb .panneau-icon-blRAxm {
38
- color: var(--panneau-color-success);
17
+ /* Appearances: they read the --panneau-tone-* variables of the tone class (decision 0024). */
18
+
19
+ .panneau-alert-subtle {
20
+ background-color: var(--panneau-tone-subtle);
21
+ border-color: var(--panneau-tone-border);
39
22
  }
40
23
 
41
- .panneau-danger-7fFkRR .panneau-icon-blRAxm {
42
- color: var(--panneau-color-danger);
24
+ .panneau-alert-outline {
25
+ background-color: var(--panneau-color-surface);
26
+ border-color: var(--panneau-tone-outline);
43
27
  }
44
28
 
45
- .panneau-warning-xvkEcQ .panneau-icon-blRAxm {
46
- color: var(--panneau-color-warning);
29
+ .panneau-alert-solid {
30
+ color: var(--panneau-tone-solid-text);
31
+ background-color: var(--panneau-tone-solid);
32
+ border-color: var(--panneau-tone-solid);
47
33
  }
48
34
 
49
- .panneau-info-beWi9v .panneau-icon-blRAxm {
50
- color: var(--panneau-color-info);
35
+ .panneau-alert-solid .panneau-alert-icon {
36
+ color: inherit;
51
37
  }
52
38
 
53
- .panneau-content-dNGM-n {
39
+ .panneau-alert-content {
54
40
  display: flex;
55
41
  flex: 1 1 auto;
56
42
  flex-direction: column;
@@ -58,21 +44,21 @@
58
44
  min-width: 0;
59
45
  }
60
46
 
61
- .panneau-title-uRgCXb {
62
- font-weight: var(--panneau-font-weight-bold);
47
+ .panneau-alert-title {
48
+ font-weight: var(--panneau-alert-title-font-weight, var(--panneau-font-weight-bold));
63
49
  }
64
50
 
65
- .panneau-body-2meig0 {
51
+ .panneau-alert-body {
66
52
  overflow-wrap: anywhere;
67
53
  }
68
54
 
69
- .panneau-actions-MXSoKc {
55
+ .panneau-alert-actions {
70
56
  display: flex;
71
57
  flex-wrap: wrap;
72
58
  gap: var(--panneau-space-2);
73
59
  margin-top: var(--panneau-space-2);
74
60
  }
75
61
 
76
- .panneau-dismiss-LWaGfl {
62
+ .panneau-alert-dismiss {
77
63
  margin: calc(-1 * var(--panneau-space-1)) calc(-1 * var(--panneau-space-2)) 0 0;
78
64
  }
@@ -1,12 +1,26 @@
1
1
  import type { ReactNode, Ref } from 'react';
2
2
  import { type IconComponent } from '../icon/Icon';
3
- export type AlertTone = 'neutral' | 'success' | 'danger' | 'warning' | 'info';
3
+ import type { Tone } from '../theme/tones';
4
+ /** @deprecated Use `Tone`. */
5
+ export type AlertTone = Tone;
6
+ /** How an alert uses its tone. */
7
+ export type AlertAppearance = 'subtle' | 'outline' | 'solid';
8
+ /**
9
+ * Named variants of `Alert`, registered by a theme (`components.alert.variants`). Declare them
10
+ * here so that `variant="banner"` type-checks.
11
+ */
12
+ export interface AlertVariants {
13
+ }
4
14
  export interface AlertProps {
5
15
  /** Defaults to `neutral`. */
6
- tone?: AlertTone;
16
+ tone?: Tone;
17
+ /** Defaults to `subtle`. */
18
+ appearance?: AlertAppearance;
19
+ /** A named variant of the theme. */
20
+ variant?: keyof AlertVariants & string;
7
21
  title?: ReactNode;
8
22
  children?: ReactNode;
9
- /** Replaces the icon of the tone. `null` hides it. */
23
+ /** Replaces the icon of the tone (an info icon for tones added by a theme). `null` hides it. */
10
24
  icon?: IconComponent | null;
11
25
  /** Buttons under the message. */
12
26
  actions?: ReactNode;
@@ -26,5 +40,5 @@ export interface AlertProps {
26
40
  bodyClassName?: string;
27
41
  }
28
42
  /** A message inside the page: an error summary, a warning, a confirmation. */
29
- export declare function Alert({ tone, title, children, icon, actions, onDismiss, role, id, tabIndex, ref, className, titleClassName, bodyClassName, }: AlertProps): import("react").JSX.Element;
43
+ export declare function Alert({ tone, appearance, variant, title, children, icon, actions, onDismiss, role, id, tabIndex, ref, className, titleClassName, bodyClassName, }: AlertProps): import("react").JSX.Element;
30
44
  //# sourceMappingURL=Alert.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../src/alert/Alert.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAMxD,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAU9E,MAAM,WAAW,UAAU;IACvB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,sDAAsD;IACtD,IAAI,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC5B,iCAAiC;IACjC,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,8EAA8E;AAC9E,wBAAgB,KAAK,CAAC,EAClB,IAAgB,EAChB,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,SAAS,EACT,IAAI,EACJ,EAAE,EACF,QAAQ,EACR,GAAG,EACH,SAAS,EACT,cAAc,EACd,aAAa,GAChB,EAAE,UAAU,+BAmCZ"}
1
+ {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../src/alert/Alert.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAIxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAI3C,8BAA8B;AAC9B,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC;AAE7B,kCAAkC;AAClC,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;AAE7D;;;GAGG;AAEH,MAAM,WAAW,aAAa;CAAG;AAUjC,MAAM,WAAW,UAAU;IACvB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,4BAA4B;IAC5B,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,aAAa,GAAG,MAAM,CAAC;IACvC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,gGAAgG;IAChG,IAAI,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC5B,iCAAiC;IACjC,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,8EAA8E;AAC9E,wBAAgB,KAAK,CAAC,EAClB,IAAgB,EAChB,UAAqB,EACrB,OAAO,EACP,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,SAAS,EACT,IAAI,EACJ,EAAE,EACF,QAAQ,EACR,GAAG,EACH,SAAS,EACT,cAAc,EACd,aAAa,GAChB,EAAE,UAAU,+BA0CZ"}
@@ -2,6 +2,7 @@ import { cx } from "../utils/cx.js";
2
2
  import { Icon } from "../icon/Icon.js";
3
3
  import { messages } from "../intl/messages.js";
4
4
  import { usePanneauIntl } from "../intl/usePanneauIntl.js";
5
+ import { toneClass } from "../theme/toneClass.js";
5
6
  import { IconButton } from "../icon-button/IconButton.js";
6
7
  import Alert_module_default from "./Alert.module.js";
7
8
  import { CircleAlert, CircleCheck, Info, TriangleAlert, X } from "lucide-react";
@@ -15,15 +16,15 @@ var TONE_ICONS = {
15
16
  info: Info
16
17
  };
17
18
  /** A message inside the page: an error summary, a warning, a confirmation. */
18
- function Alert({ tone = "neutral", title, children, icon, actions, onDismiss, role, id, tabIndex, ref, className, titleClassName, bodyClassName }) {
19
+ function Alert({ tone = "neutral", appearance = "subtle", variant, title, children, icon, actions, onDismiss, role, id, tabIndex, ref, className, titleClassName, bodyClassName }) {
19
20
  const intl = usePanneauIntl();
20
- const shown = icon === void 0 ? TONE_ICONS[tone] : icon;
21
+ const shown = icon === void 0 ? TONE_ICONS[tone] ?? Info : icon;
21
22
  return /* @__PURE__ */ jsxs("div", {
22
23
  ref,
23
24
  id,
24
25
  role,
25
26
  tabIndex,
26
- className: cx(Alert_module_default.alert, Alert_module_default[tone], className),
27
+ className: cx("panneau-alert", Alert_module_default.alert, toneClass(tone), Alert_module_default[appearance], variant !== void 0 && `panneau-alert-variant-${variant}`, className),
27
28
  children: [
28
29
  shown !== null ? /* @__PURE__ */ jsx(Icon, {
29
30
  icon: shown,
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.js","names":["styles"],"sources":["../../src/alert/Alert.tsx"],"sourcesContent":["import { CircleAlert, CircleCheck, Info, TriangleAlert, X } from 'lucide-react';\nimport type { ReactNode, Ref } from 'react';\n\nimport { IconButton } from '../icon-button/IconButton';\nimport { Icon, type IconComponent } from '../icon/Icon';\nimport { messages } from '../intl/messages';\nimport { usePanneauIntl } from '../intl/usePanneauIntl';\nimport { cx } from '../utils/cx';\nimport styles from './Alert.module.css';\n\nexport type AlertTone = 'neutral' | 'success' | 'danger' | 'warning' | 'info';\n\nconst TONE_ICONS: Record<AlertTone, IconComponent> = {\n neutral: Info,\n success: CircleCheck,\n danger: CircleAlert,\n warning: TriangleAlert,\n info: Info,\n};\n\nexport interface AlertProps {\n /** Defaults to `neutral`. */\n tone?: AlertTone;\n title?: ReactNode;\n children?: ReactNode;\n /** Replaces the icon of the tone. `null` hides it. */\n icon?: IconComponent | null;\n /** Buttons under the message. */\n actions?: ReactNode;\n /** Shows a close button. */\n onDismiss?: () => void;\n /**\n * `alert` announces the message as soon as it appears, for errors that need attention.\n * `status` announces it politely. Without a role, it is only read in place.\n */\n role?: 'alert' | 'status';\n id?: string;\n /** Makes the alert focusable, to move focus to it (an error summary). */\n tabIndex?: number;\n ref?: Ref<HTMLDivElement>;\n className?: string;\n titleClassName?: string;\n bodyClassName?: string;\n}\n\n/** A message inside the page: an error summary, a warning, a confirmation. */\nexport function Alert({\n tone = 'neutral',\n title,\n children,\n icon,\n actions,\n onDismiss,\n role,\n id,\n tabIndex,\n ref,\n className,\n titleClassName,\n bodyClassName,\n}: AlertProps) {\n const intl = usePanneauIntl();\n const shown = icon === undefined ? TONE_ICONS[tone] : icon;\n return (\n <div\n ref={ref}\n id={id}\n role={role}\n tabIndex={tabIndex}\n className={cx(styles.alert, styles[tone], className)}\n >\n {shown !== null ? <Icon icon={shown} size=\"lg\" className={styles.icon} /> : null}\n <div className={styles.content}>\n {title !== undefined && title !== null ? (\n <div className={cx(styles.title, titleClassName)}>{title}</div>\n ) : null}\n {children !== undefined && children !== null ? (\n <div className={cx(styles.body, bodyClassName)}>{children}</div>\n ) : null}\n {actions !== undefined && actions !== null ? (\n <div className={styles.actions}>{actions}</div>\n ) : null}\n </div>\n {onDismiss !== undefined ? (\n <IconButton\n icon={X}\n size=\"sm\"\n label={intl.formatMessage(messages.close)}\n showTooltip={false}\n onPress={onDismiss}\n className={styles.dismiss}\n />\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAYA,IAAM,aAA+C;CACjD,SAAS;CACT,SAAS;CACT,QAAQ;CACR,SAAS;CACT,MAAM;AACV;;AA4BA,SAAgB,MAAM,EAClB,OAAO,WACP,OACA,UACA,MACA,SACA,WACA,MACA,IACA,UACA,KACA,WACA,gBACA,iBACW;CACX,MAAM,OAAO,eAAe;CAC5B,MAAM,QAAQ,SAAS,KAAA,IAAY,WAAW,QAAQ;CACtD,OACI,qBAAC,OAAD;EACS;EACD;EACE;EACI;EACV,WAAW,GAAGA,qBAAO,OAAOA,qBAAO,OAAO,SAAS;EALvD,UAAA;GAOK,UAAU,OAAO,oBAAC,MAAD;IAAM,MAAM;IAAO,MAAK;IAAK,WAAWA,qBAAO;GAAK,CAAA,IAAM;GAC5E,qBAAC,OAAD;IAAK,WAAWA,qBAAO;IAAvB,UAAA;KACK,UAAU,KAAA,KAAa,UAAU,OAC9B,oBAAC,OAAD;MAAK,WAAW,GAAGA,qBAAO,OAAO,cAAc;MAAI,UAAA;KAAW,CAAA,IAC9D;KACH,aAAa,KAAA,KAAa,aAAa,OACpC,oBAAC,OAAD;MAAK,WAAW,GAAGA,qBAAO,MAAM,aAAa;MAAI;KAAc,CAAA,IAC/D;KACH,YAAY,KAAA,KAAa,YAAY,OAClC,oBAAC,OAAD;MAAK,WAAWA,qBAAO;MAAU,UAAA;KAAa,CAAA,IAC9C;IACH;;GACJ,cAAc,KAAA,IACX,oBAAC,YAAD;IACI,MAAM;IACN,MAAK;IACL,OAAO,KAAK,cAAc,SAAS,KAAK;IACxC,aAAa;IACb,SAAS;IACT,WAAWA,qBAAO;GAAQ,CAAA,IAE9B;EACH;;AAEb"}
1
+ {"version":3,"file":"Alert.js","names":["styles"],"sources":["../../src/alert/Alert.tsx"],"sourcesContent":["import { CircleAlert, CircleCheck, Info, TriangleAlert, X } from 'lucide-react';\nimport type { ReactNode, Ref } from 'react';\n\nimport { IconButton } from '../icon-button/IconButton';\nimport { Icon, type IconComponent } from '../icon/Icon';\nimport { messages } from '../intl/messages';\nimport { usePanneauIntl } from '../intl/usePanneauIntl';\nimport { toneClass } from '../theme/toneClass';\nimport type { Tone } from '../theme/tones';\nimport { cx } from '../utils/cx';\nimport styles from './Alert.module.css';\n\n/** @deprecated Use `Tone`. */\nexport type AlertTone = Tone;\n\n/** How an alert uses its tone. */\nexport type AlertAppearance = 'subtle' | 'outline' | 'solid';\n\n/**\n * Named variants of `Alert`, registered by a theme (`components.alert.variants`). Declare them\n * here so that `variant=\"banner\"` type-checks.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type -- extended by projects\nexport interface AlertVariants {}\n\nconst TONE_ICONS: Partial<Record<Tone, IconComponent>> = {\n neutral: Info,\n success: CircleCheck,\n danger: CircleAlert,\n warning: TriangleAlert,\n info: Info,\n};\n\nexport interface AlertProps {\n /** Defaults to `neutral`. */\n tone?: Tone;\n /** Defaults to `subtle`. */\n appearance?: AlertAppearance;\n /** A named variant of the theme. */\n variant?: keyof AlertVariants & string;\n title?: ReactNode;\n children?: ReactNode;\n /** Replaces the icon of the tone (an info icon for tones added by a theme). `null` hides it. */\n icon?: IconComponent | null;\n /** Buttons under the message. */\n actions?: ReactNode;\n /** Shows a close button. */\n onDismiss?: () => void;\n /**\n * `alert` announces the message as soon as it appears, for errors that need attention.\n * `status` announces it politely. Without a role, it is only read in place.\n */\n role?: 'alert' | 'status';\n id?: string;\n /** Makes the alert focusable, to move focus to it (an error summary). */\n tabIndex?: number;\n ref?: Ref<HTMLDivElement>;\n className?: string;\n titleClassName?: string;\n bodyClassName?: string;\n}\n\n/** A message inside the page: an error summary, a warning, a confirmation. */\nexport function Alert({\n tone = 'neutral',\n appearance = 'subtle',\n variant,\n title,\n children,\n icon,\n actions,\n onDismiss,\n role,\n id,\n tabIndex,\n ref,\n className,\n titleClassName,\n bodyClassName,\n}: AlertProps) {\n const intl = usePanneauIntl();\n const shown = icon === undefined ? (TONE_ICONS[tone] ?? Info) : icon;\n return (\n <div\n ref={ref}\n id={id}\n role={role}\n tabIndex={tabIndex}\n className={cx(\n 'panneau-alert',\n styles.alert,\n toneClass(tone),\n styles[appearance],\n variant !== undefined && `panneau-alert-variant-${variant}`,\n className,\n )}\n >\n {shown !== null ? <Icon icon={shown} size=\"lg\" className={styles.icon} /> : null}\n <div className={styles.content}>\n {title !== undefined && title !== null ? (\n <div className={cx(styles.title, titleClassName)}>{title}</div>\n ) : null}\n {children !== undefined && children !== null ? (\n <div className={cx(styles.body, bodyClassName)}>{children}</div>\n ) : null}\n {actions !== undefined && actions !== null ? (\n <div className={styles.actions}>{actions}</div>\n ) : null}\n </div>\n {onDismiss !== undefined ? (\n <IconButton\n icon={X}\n size=\"sm\"\n label={intl.formatMessage(messages.close)}\n showTooltip={false}\n onPress={onDismiss}\n className={styles.dismiss}\n />\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAyBA,IAAM,aAAmD;CACrD,SAAS;CACT,SAAS;CACT,QAAQ;CACR,SAAS;CACT,MAAM;AACV;;AAgCA,SAAgB,MAAM,EAClB,OAAO,WACP,aAAa,UACb,SACA,OACA,UACA,MACA,SACA,WACA,MACA,IACA,UACA,KACA,WACA,gBACA,iBACW;CACX,MAAM,OAAO,eAAe;CAC5B,MAAM,QAAQ,SAAS,KAAA,IAAa,WAAW,SAAS,OAAQ;CAChE,OACI,qBAAC,OAAD;EACS;EACD;EACE;EACI;EACV,WAAW,GACP,iBACAA,qBAAO,OACP,UAAU,IAAI,GACdA,qBAAO,aACP,YAAY,KAAA,KAAa,yBAAyB,WAClD,SACJ;EAZJ,UAAA;GAcK,UAAU,OAAO,oBAAC,MAAD;IAAM,MAAM;IAAO,MAAK;IAAK,WAAWA,qBAAO;GAAK,CAAA,IAAM;GAC5E,qBAAC,OAAD;IAAK,WAAWA,qBAAO;IAAvB,UAAA;KACK,UAAU,KAAA,KAAa,UAAU,OAC9B,oBAAC,OAAD;MAAK,WAAW,GAAGA,qBAAO,OAAO,cAAc;MAAI,UAAA;KAAW,CAAA,IAC9D;KACH,aAAa,KAAA,KAAa,aAAa,OACpC,oBAAC,OAAD;MAAK,WAAW,GAAGA,qBAAO,MAAM,aAAa;MAAI;KAAc,CAAA,IAC/D;KACH,YAAY,KAAA,KAAa,YAAY,OAClC,oBAAC,OAAD;MAAK,WAAWA,qBAAO;MAAU,UAAA;KAAa,CAAA,IAC9C;IACH;;GACJ,cAAc,KAAA,IACX,oBAAC,YAAD;IACI,MAAM;IACN,MAAK;IACL,OAAO,KAAK,cAAc,SAAS,KAAK;IACxC,aAAa;IACb,SAAS;IACT,WAAWA,qBAAO;GAAQ,CAAA,IAE9B;EACH;;AAEb"}
@@ -1,23 +1,21 @@
1
1
  import "./Alert.css";
2
2
  //#region src/alert/Alert.module.css
3
- var alert = "panneau-alert-YltdMY";
4
- var success = "panneau-success-Z7VQdb";
5
- var danger = "panneau-danger-7fFkRR";
6
- var warning = "panneau-warning-xvkEcQ";
7
- var info = "panneau-info-beWi9v";
8
- var icon = "panneau-icon-blRAxm";
9
- var content = "panneau-content-dNGM-n";
10
- var title = "panneau-title-uRgCXb";
11
- var body = "panneau-body-2meig0";
12
- var actions = "panneau-actions-MXSoKc";
13
- var dismiss = "panneau-dismiss-LWaGfl";
3
+ var alert = "panneau-alert";
4
+ var icon = "panneau-alert-icon";
5
+ var subtle = "panneau-alert-subtle";
6
+ var outline = "panneau-alert-outline";
7
+ var solid = "panneau-alert-solid";
8
+ var content = "panneau-alert-content";
9
+ var title = "panneau-alert-title";
10
+ var body = "panneau-alert-body";
11
+ var actions = "panneau-alert-actions";
12
+ var dismiss = "panneau-alert-dismiss";
14
13
  var Alert_module_default = {
15
14
  alert,
16
- success,
17
- danger,
18
- warning,
19
- info,
20
15
  icon,
16
+ subtle,
17
+ outline,
18
+ solid,
21
19
  content,
22
20
  title,
23
21
  body,
@@ -25,6 +23,6 @@ var Alert_module_default = {
25
23
  dismiss
26
24
  };
27
25
  //#endregion
28
- export { actions, alert, body, content, danger, Alert_module_default as default, dismiss, icon, info, success, title, warning };
26
+ export { actions, alert, body, content, Alert_module_default as default, dismiss, icon, outline, solid, subtle, title };
29
27
 
30
28
  //# sourceMappingURL=Alert.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.module.js","names":[],"sources":["../../src/alert/Alert.module.css"],"sourcesContent":[".alert {\n display: flex;\n align-items: flex-start;\n gap: var(--panneau-space-3);\n padding: var(--panneau-space-3) var(--panneau-space-4);\n color: var(--panneau-color-text);\n background-color: var(--panneau-color-surface-sunken);\n border: var(--panneau-border-width) solid var(--panneau-color-border);\n border-radius: var(--panneau-radius-md);\n}\n\n.success {\n background-color: var(--panneau-color-success-subtle);\n border-color: var(--panneau-color-success-border);\n}\n\n.danger {\n background-color: var(--panneau-color-danger-subtle);\n border-color: var(--panneau-color-danger-border);\n}\n\n.warning {\n background-color: var(--panneau-color-warning-subtle);\n border-color: var(--panneau-color-warning-border);\n}\n\n.info {\n background-color: var(--panneau-color-info-subtle);\n border-color: var(--panneau-color-info-border);\n}\n\n.icon {\n margin-top: 0.125rem;\n color: var(--panneau-color-text-muted);\n}\n\n.success .icon {\n color: var(--panneau-color-success);\n}\n\n.danger .icon {\n color: var(--panneau-color-danger);\n}\n\n.warning .icon {\n color: var(--panneau-color-warning);\n}\n\n.info .icon {\n color: var(--panneau-color-info);\n}\n\n.content {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: var(--panneau-space-1);\n min-width: 0;\n}\n\n.title {\n font-weight: var(--panneau-font-weight-bold);\n}\n\n.body {\n overflow-wrap: anywhere;\n}\n\n.actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--panneau-space-2);\n margin-top: var(--panneau-space-2);\n}\n\n.dismiss {\n margin: calc(-1 * var(--panneau-space-1)) calc(-1 * var(--panneau-space-2)) 0 0;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"Alert.module.js","names":[],"sources":["../../src/alert/Alert.module.css"],"sourcesContent":[".alert {\n display: flex;\n align-items: flex-start;\n gap: var(--panneau-alert-gap, var(--panneau-space-3));\n padding: var(--panneau-alert-padding-y, var(--panneau-space-3))\n var(--panneau-alert-padding-x, var(--panneau-space-4));\n color: var(--panneau-color-text);\n border: var(--panneau-alert-border-width, var(--panneau-border-width)) solid transparent;\n border-radius: var(--panneau-alert-radius, var(--panneau-radius-md));\n}\n\n.icon {\n margin-top: 0.125rem;\n color: var(--panneau-tone-text);\n}\n\n/* Appearances: they read the --panneau-tone-* variables of the tone class (decision 0024). */\n\n.subtle {\n background-color: var(--panneau-tone-subtle);\n border-color: var(--panneau-tone-border);\n}\n\n.outline {\n background-color: var(--panneau-color-surface);\n border-color: var(--panneau-tone-outline);\n}\n\n.solid {\n color: var(--panneau-tone-solid-text);\n background-color: var(--panneau-tone-solid);\n border-color: var(--panneau-tone-solid);\n}\n\n.solid .icon {\n color: inherit;\n}\n\n.content {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: var(--panneau-space-1);\n min-width: 0;\n}\n\n.title {\n font-weight: var(--panneau-alert-title-font-weight, var(--panneau-font-weight-bold));\n}\n\n.body {\n overflow-wrap: anywhere;\n}\n\n.actions {\n display: flex;\n flex-wrap: wrap;\n gap: var(--panneau-space-2);\n margin-top: var(--panneau-space-2);\n}\n\n.dismiss {\n margin: calc(-1 * var(--panneau-space-1)) calc(-1 * var(--panneau-space-2)) 0 0;\n}\n"],"mappings":""}
@@ -0,0 +1,3 @@
1
+ /** Tokens of Alert. */
2
+ export declare const alertTokens: import("..").ComponentTokens<"alert", "panneau-alert-radius" | "panneau-alert-gap" | "panneau-alert-padding-y" | "panneau-alert-padding-x" | "panneau-alert-border-width" | "panneau-alert-title-font-weight">;
3
+ //# sourceMappingURL=tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/alert/tokens.ts"],"names":[],"mappings":"AAEA,uBAAuB;AACvB,eAAO,MAAM,WAAW,gNAatB,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { defineComponentTokens } from "../theme/componentTokens.js";
2
+ //#region src/alert/tokens.ts
3
+ /** Tokens of Alert. */
4
+ var alertTokens = defineComponentTokens("alert", {
5
+ /** Space between the icon, the content and the dismiss button. */
6
+ gap: "var(--panneau-space-3)",
7
+ /** Vertical padding. */
8
+ "padding-y": "var(--panneau-space-3)",
9
+ /** Horizontal padding. */
10
+ "padding-x": "var(--panneau-space-4)",
11
+ /** Width of the border. */
12
+ "border-width": "var(--panneau-border-width)",
13
+ /** Corner radius. */
14
+ radius: "var(--panneau-radius-md)",
15
+ /** Font weight of the title. */
16
+ "title-font-weight": "var(--panneau-font-weight-bold)"
17
+ });
18
+ //#endregion
19
+ export { alertTokens };
20
+
21
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","names":[],"sources":["../../src/alert/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Alert. */\nexport const alertTokens = defineComponentTokens('alert', {\n /** Space between the icon, the content and the dismiss button. */\n gap: 'var(--panneau-space-3)',\n /** Vertical padding. */\n 'padding-y': 'var(--panneau-space-3)',\n /** Horizontal padding. */\n 'padding-x': 'var(--panneau-space-4)',\n /** Width of the border. */\n 'border-width': 'var(--panneau-border-width)',\n /** Corner radius. */\n radius: 'var(--panneau-radius-md)',\n /** Font weight of the title. */\n 'title-font-weight': 'var(--panneau-font-weight-bold)',\n});\n"],"mappings":";;;AAGA,IAAa,cAAc,sBAAsB,SAAS;;CAEtD,KAAK;;CAEL,aAAa;;CAEb,aAAa;;CAEb,gBAAgB;;CAEhB,QAAQ;;CAER,qBAAqB;AACzB,CAAC"}