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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/README.md +144 -15
  2. package/dist/alert/Alert.d.ts +2 -2
  3. package/dist/alert/Alert.js +108 -40
  4. package/dist/alert/Alert.js.map +1 -1
  5. package/dist/alert/tokens.d.ts +1 -1
  6. package/dist/alert/tokens.js.map +1 -1
  7. package/dist/badge/Badge.d.ts +1 -1
  8. package/dist/badge/Badge.js +34 -6
  9. package/dist/badge/Badge.js.map +1 -1
  10. package/dist/badge/tokens.d.ts +1 -1
  11. package/dist/badge/tokens.js.map +1 -1
  12. package/dist/button/Button.d.ts +20 -6
  13. package/dist/button/Button.d.ts.map +1 -1
  14. package/dist/button/Button.js +169 -22
  15. package/dist/button/Button.js.map +1 -1
  16. package/dist/button/LinkButton.d.ts +22 -0
  17. package/dist/button/LinkButton.d.ts.map +1 -0
  18. package/dist/button/LinkButton.js +113 -0
  19. package/dist/button/LinkButton.js.map +1 -0
  20. package/dist/button/tokens.d.ts +1 -1
  21. package/dist/button/tokens.js.map +1 -1
  22. package/dist/card/Card.js +76 -23
  23. package/dist/card/Card.js.map +1 -1
  24. package/dist/card/tokens.d.ts +1 -1
  25. package/dist/card/tokens.js.map +1 -1
  26. package/dist/checkbox/Checkbox.css +9 -9
  27. package/dist/checkbox/Checkbox.d.ts +1 -1
  28. package/dist/checkbox/Checkbox.js +87 -26
  29. package/dist/checkbox/Checkbox.js.map +1 -1
  30. package/dist/checkbox/Checkbox.module.js +3 -3
  31. package/dist/checkbox/Checkbox.module.js.map +1 -1
  32. package/dist/checkbox/ChoiceChrome.js +82 -21
  33. package/dist/checkbox/ChoiceChrome.js.map +1 -1
  34. package/dist/checkbox/tokens.d.ts +1 -1
  35. package/dist/checkbox/tokens.js.map +1 -1
  36. package/dist/combo-box/ComboBox.css +10 -0
  37. package/dist/combo-box/ComboBox.d.ts +7 -2
  38. package/dist/combo-box/ComboBox.d.ts.map +1 -1
  39. package/dist/combo-box/ComboBox.js +310 -78
  40. package/dist/combo-box/ComboBox.js.map +1 -1
  41. package/dist/combo-box/ComboBox.module.js +4 -2
  42. package/dist/combo-box/ComboBox.module.js.map +1 -1
  43. package/dist/command-palette/CommandPalette.css +299 -0
  44. package/dist/command-palette/CommandPalette.d.ts +37 -0
  45. package/dist/command-palette/CommandPalette.d.ts.map +1 -0
  46. package/dist/command-palette/CommandPalette.js +497 -0
  47. package/dist/command-palette/CommandPalette.js.map +1 -0
  48. package/dist/command-palette/CommandPalette.module.js +62 -0
  49. package/dist/command-palette/CommandPalette.module.js.map +1 -0
  50. package/dist/command-palette/match.d.ts +39 -0
  51. package/dist/command-palette/match.d.ts.map +1 -0
  52. package/dist/command-palette/match.js +44 -0
  53. package/dist/command-palette/match.js.map +1 -0
  54. package/dist/command-palette/tokens.d.ts +3 -0
  55. package/dist/command-palette/tokens.d.ts.map +1 -0
  56. package/dist/command-palette/tokens.js +23 -0
  57. package/dist/command-palette/tokens.js.map +1 -0
  58. package/dist/command-palette/useCommandShortcut.d.ts +12 -0
  59. package/dist/command-palette/useCommandShortcut.d.ts.map +1 -0
  60. package/dist/command-palette/useCommandShortcut.js +48 -0
  61. package/dist/command-palette/useCommandShortcut.js.map +1 -0
  62. package/dist/container/Container.js +48 -5
  63. package/dist/container/Container.js.map +1 -1
  64. package/dist/container/tokens.d.ts +1 -1
  65. package/dist/container/tokens.js.map +1 -1
  66. package/dist/date-picker/DatePicker.css +40 -0
  67. package/dist/date-picker/DatePicker.d.ts +3 -2
  68. package/dist/date-picker/DatePicker.d.ts.map +1 -1
  69. package/dist/date-picker/DatePicker.js +279 -72
  70. package/dist/date-picker/DatePicker.js.map +1 -1
  71. package/dist/date-picker/DatePicker.module.js +5 -1
  72. package/dist/date-picker/DatePicker.module.js.map +1 -1
  73. package/dist/date-picker/calendarTokens.d.ts +1 -1
  74. package/dist/date-picker/calendarTokens.js.map +1 -1
  75. package/dist/date-range-picker/DateRangePicker.css +37 -0
  76. package/dist/date-range-picker/DateRangePicker.d.ts +41 -0
  77. package/dist/date-range-picker/DateRangePicker.d.ts.map +1 -0
  78. package/dist/date-range-picker/DateRangePicker.js +438 -0
  79. package/dist/date-range-picker/DateRangePicker.js.map +1 -0
  80. package/dist/date-range-picker/DateRangePicker.module.js +20 -0
  81. package/dist/date-range-picker/DateRangePicker.module.js.map +1 -0
  82. package/dist/dialog/Dialog.css +41 -2
  83. package/dist/dialog/Dialog.d.ts +15 -3
  84. package/dist/dialog/Dialog.d.ts.map +1 -1
  85. package/dist/dialog/Dialog.js +161 -32
  86. package/dist/dialog/Dialog.js.map +1 -1
  87. package/dist/dialog/Dialog.module.js +10 -2
  88. package/dist/dialog/Dialog.module.js.map +1 -1
  89. package/dist/dialog/tokens.d.ts +1 -1
  90. package/dist/dialog/tokens.d.ts.map +1 -1
  91. package/dist/dialog/tokens.js +2 -0
  92. package/dist/dialog/tokens.js.map +1 -1
  93. package/dist/disclosure/Disclosure.js +132 -28
  94. package/dist/disclosure/Disclosure.js.map +1 -1
  95. package/dist/disclosure/tokens.d.ts +1 -1
  96. package/dist/disclosure/tokens.js.map +1 -1
  97. package/dist/divider/Divider.js +55 -11
  98. package/dist/divider/Divider.js.map +1 -1
  99. package/dist/divider/tokens.d.ts +1 -1
  100. package/dist/divider/tokens.js.map +1 -1
  101. package/dist/field/Field.css +26 -0
  102. package/dist/field/Field.module.js +6 -2
  103. package/dist/field/Field.module.js.map +1 -1
  104. package/dist/field/FieldParts.d.ts +1 -1
  105. package/dist/field/FieldParts.js +69 -15
  106. package/dist/field/FieldParts.js.map +1 -1
  107. package/dist/field/Fieldset.d.ts +6 -1
  108. package/dist/field/Fieldset.d.ts.map +1 -1
  109. package/dist/field/Fieldset.js +132 -33
  110. package/dist/field/Fieldset.js.map +1 -1
  111. package/dist/field/inputTokens.d.ts +1 -1
  112. package/dist/field/inputTokens.js.map +1 -1
  113. package/dist/field/tokens.d.ts +1 -1
  114. package/dist/field/tokens.js.map +1 -1
  115. package/dist/grid/Grid.d.ts +1 -1
  116. package/dist/grid/Grid.js +123 -14
  117. package/dist/grid/Grid.js.map +1 -1
  118. package/dist/grid/tokens.d.ts +1 -1
  119. package/dist/grid/tokens.js.map +1 -1
  120. package/dist/heading/Heading.js +41 -6
  121. package/dist/heading/Heading.js.map +1 -1
  122. package/dist/heading/tokens.d.ts +1 -1
  123. package/dist/heading/tokens.js.map +1 -1
  124. package/dist/icon/Icon.js +36 -11
  125. package/dist/icon/Icon.js.map +1 -1
  126. package/dist/icon/lucideIconLoader.d.ts +9 -0
  127. package/dist/icon/lucideIconLoader.d.ts.map +1 -0
  128. package/dist/icon/lucideIconLoader.js +22 -0
  129. package/dist/icon/lucideIconLoader.js.map +1 -0
  130. package/dist/icon/namedIcons.d.ts +16 -9
  131. package/dist/icon/namedIcons.d.ts.map +1 -1
  132. package/dist/icon/namedIcons.js +121 -46
  133. package/dist/icon/namedIcons.js.map +1 -1
  134. package/dist/icon-button/IconButton.d.ts +2 -2
  135. package/dist/icon-button/IconButton.js +70 -13
  136. package/dist/icon-button/IconButton.js.map +1 -1
  137. package/dist/index.d.ts +65 -52
  138. package/dist/index.d.ts.map +1 -1
  139. package/dist/index.js +19 -6
  140. package/dist/inline/Inline.d.ts +1 -1
  141. package/dist/inline/Inline.js +65 -7
  142. package/dist/inline/Inline.js.map +1 -1
  143. package/dist/inline/tokens.d.ts +1 -1
  144. package/dist/inline/tokens.js.map +1 -1
  145. package/dist/intl/usePanneauIntl.js.map +1 -1
  146. package/dist/layout/responsive.js.map +1 -1
  147. package/dist/line-chart/LineChart.css +84 -0
  148. package/dist/line-chart/LineChart.d.ts +26 -0
  149. package/dist/line-chart/LineChart.d.ts.map +1 -0
  150. package/dist/line-chart/LineChart.js +327 -0
  151. package/dist/line-chart/LineChart.js.map +1 -0
  152. package/dist/line-chart/LineChart.module.js +28 -0
  153. package/dist/line-chart/LineChart.module.js.map +1 -0
  154. package/dist/line-chart/tokens.d.ts +3 -0
  155. package/dist/line-chart/tokens.d.ts.map +1 -0
  156. package/dist/line-chart/tokens.js +19 -0
  157. package/dist/line-chart/tokens.js.map +1 -0
  158. package/dist/locales/index.js.map +1 -1
  159. package/dist/menu/Menu.css +84 -0
  160. package/dist/menu/Menu.d.ts +34 -7
  161. package/dist/menu/Menu.d.ts.map +1 -1
  162. package/dist/menu/Menu.js +243 -32
  163. package/dist/menu/Menu.js.map +1 -1
  164. package/dist/menu/Menu.module.js +22 -0
  165. package/dist/menu/Menu.module.js.map +1 -0
  166. package/dist/menu/tokens.d.ts +3 -0
  167. package/dist/menu/tokens.d.ts.map +1 -0
  168. package/dist/menu/tokens.js +31 -0
  169. package/dist/menu/tokens.js.map +1 -0
  170. package/dist/named-icons/index.d.ts +2 -0
  171. package/dist/named-icons/index.d.ts.map +1 -0
  172. package/dist/named-icons/index.js +1 -0
  173. package/dist/node_modules/@internationalized/date/dist/private/CalendarDate.js +136 -0
  174. package/dist/node_modules/@internationalized/date/dist/private/CalendarDate.js.map +1 -0
  175. package/dist/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +117 -0
  176. package/dist/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js.map +1 -0
  177. package/dist/node_modules/@internationalized/date/dist/private/conversion.js +116 -0
  178. package/dist/node_modules/@internationalized/date/dist/private/conversion.js.map +1 -0
  179. package/dist/node_modules/@internationalized/date/dist/private/manipulation.js +206 -0
  180. package/dist/node_modules/@internationalized/date/dist/private/manipulation.js.map +1 -0
  181. package/dist/node_modules/@internationalized/date/dist/private/queries.js +26 -0
  182. package/dist/node_modules/@internationalized/date/dist/private/queries.js.map +1 -0
  183. package/dist/node_modules/@internationalized/date/dist/private/string.js +19 -0
  184. package/dist/node_modules/@internationalized/date/dist/private/string.js.map +1 -0
  185. package/dist/node_modules/@internationalized/date/dist/private/utils.js +8 -0
  186. package/dist/node_modules/@internationalized/date/dist/private/utils.js.map +1 -0
  187. package/dist/number-input/NumberInput.css +18 -0
  188. package/dist/number-input/NumberInput.d.ts +1 -1
  189. package/dist/number-input/NumberInput.js +232 -60
  190. package/dist/number-input/NumberInput.js.map +1 -1
  191. package/dist/number-input/NumberInput.module.js +3 -1
  192. package/dist/number-input/NumberInput.module.js.map +1 -1
  193. package/dist/number-input/tokens.d.ts +1 -1
  194. package/dist/number-input/tokens.js.map +1 -1
  195. package/dist/pill-trigger/PillTrigger.css +104 -0
  196. package/dist/pill-trigger/PillTrigger.d.ts +20 -0
  197. package/dist/pill-trigger/PillTrigger.d.ts.map +1 -0
  198. package/dist/pill-trigger/PillTrigger.js +94 -0
  199. package/dist/pill-trigger/PillTrigger.js.map +1 -0
  200. package/dist/pill-trigger/PillTrigger.module.js +18 -0
  201. package/dist/pill-trigger/PillTrigger.module.js.map +1 -0
  202. package/dist/pill-trigger/tokens.d.ts +3 -0
  203. package/dist/pill-trigger/tokens.d.ts.map +1 -0
  204. package/dist/pill-trigger/tokens.js +37 -0
  205. package/dist/pill-trigger/tokens.js.map +1 -0
  206. package/dist/popover/Popover.css +5 -0
  207. package/dist/popover/Popover.d.ts.map +1 -1
  208. package/dist/popover/Popover.js +116 -20
  209. package/dist/popover/Popover.js.map +1 -1
  210. package/dist/popover/Popover.module.js +4 -2
  211. package/dist/popover/Popover.module.js.map +1 -1
  212. package/dist/popover/tokens.d.ts +1 -1
  213. package/dist/popover/tokens.js.map +1 -1
  214. package/dist/prose/Prose.js +36 -5
  215. package/dist/prose/Prose.js.map +1 -1
  216. package/dist/prose/tokens.d.ts +1 -1
  217. package/dist/prose/tokens.js.map +1 -1
  218. package/dist/radio-group/RadioGroup.css +90 -0
  219. package/dist/radio-group/RadioGroup.d.ts +24 -5
  220. package/dist/radio-group/RadioGroup.d.ts.map +1 -1
  221. package/dist/radio-group/RadioGroup.js +214 -43
  222. package/dist/radio-group/RadioGroup.js.map +1 -1
  223. package/dist/radio-group/RadioGroup.module.js +12 -2
  224. package/dist/radio-group/RadioGroup.module.js.map +1 -1
  225. package/dist/radio-group/tokens.d.ts +2 -2
  226. package/dist/radio-group/tokens.d.ts.map +1 -1
  227. package/dist/radio-group/tokens.js +22 -2
  228. package/dist/radio-group/tokens.js.map +1 -1
  229. package/dist/root/PanneauRoot.css +24 -0
  230. package/dist/root/PanneauRoot.d.ts +40 -4
  231. package/dist/root/PanneauRoot.d.ts.map +1 -1
  232. package/dist/root/PanneauRoot.js +284 -82
  233. package/dist/root/PanneauRoot.js.map +1 -1
  234. package/dist/root/PanneauRoot.module.js.map +1 -1
  235. package/dist/root/ThemeScope.d.ts +1 -1
  236. package/dist/root/ThemeScope.d.ts.map +1 -1
  237. package/dist/root/ThemeScope.js +110 -27
  238. package/dist/root/ThemeScope.js.map +1 -1
  239. package/dist/segmented-control/SegmentedControl.css +83 -0
  240. package/dist/segmented-control/SegmentedControl.d.ts +35 -0
  241. package/dist/segmented-control/SegmentedControl.d.ts.map +1 -0
  242. package/dist/segmented-control/SegmentedControl.js +142 -0
  243. package/dist/segmented-control/SegmentedControl.js.map +1 -0
  244. package/dist/segmented-control/SegmentedControl.module.js +16 -0
  245. package/dist/segmented-control/SegmentedControl.module.js.map +1 -0
  246. package/dist/segmented-control/tokens.d.ts +3 -0
  247. package/dist/segmented-control/tokens.d.ts.map +1 -0
  248. package/dist/segmented-control/tokens.js +29 -0
  249. package/dist/segmented-control/tokens.js.map +1 -0
  250. package/dist/select/ListBox.css +75 -1
  251. package/dist/select/ListBox.module.js +9 -3
  252. package/dist/select/ListBox.module.js.map +1 -1
  253. package/dist/select/Select.d.ts +14 -1
  254. package/dist/select/Select.d.ts.map +1 -1
  255. package/dist/select/Select.js +335 -92
  256. package/dist/select/Select.js.map +1 -1
  257. package/dist/select/listBoxTokens.d.ts +1 -1
  258. package/dist/select/listBoxTokens.d.ts.map +1 -1
  259. package/dist/select/listBoxTokens.js +2 -0
  260. package/dist/select/listBoxTokens.js.map +1 -1
  261. package/dist/skeleton/LoadingRegion.d.ts +16 -0
  262. package/dist/skeleton/LoadingRegion.d.ts.map +1 -0
  263. package/dist/skeleton/LoadingRegion.js +65 -0
  264. package/dist/skeleton/LoadingRegion.js.map +1 -0
  265. package/dist/skeleton/Skeleton.css +62 -0
  266. package/dist/skeleton/Skeleton.d.ts +25 -0
  267. package/dist/skeleton/Skeleton.d.ts.map +1 -0
  268. package/dist/skeleton/Skeleton.js +106 -0
  269. package/dist/skeleton/Skeleton.js.map +1 -0
  270. package/dist/skeleton/Skeleton.module.js +22 -0
  271. package/dist/skeleton/Skeleton.module.js.map +1 -0
  272. package/dist/skeleton/tokens.d.ts +3 -0
  273. package/dist/skeleton/tokens.d.ts.map +1 -0
  274. package/dist/skeleton/tokens.js +15 -0
  275. package/dist/skeleton/tokens.js.map +1 -0
  276. package/dist/slider/Slider.css +84 -0
  277. package/dist/slider/Slider.d.ts +20 -0
  278. package/dist/slider/Slider.d.ts.map +1 -0
  279. package/dist/slider/Slider.js +248 -0
  280. package/dist/slider/Slider.js.map +1 -0
  281. package/dist/slider/Slider.module.js +20 -0
  282. package/dist/slider/Slider.module.js.map +1 -0
  283. package/dist/spinner/Spinner.js +49 -9
  284. package/dist/spinner/Spinner.js.map +1 -1
  285. package/dist/spinner/tokens.d.ts +1 -1
  286. package/dist/spinner/tokens.js.map +1 -1
  287. package/dist/stack/Stack.d.ts +1 -1
  288. package/dist/stack/Stack.js +60 -7
  289. package/dist/stack/Stack.js.map +1 -1
  290. package/dist/stack/tokens.d.ts +1 -1
  291. package/dist/stack/tokens.js.map +1 -1
  292. package/dist/stat/Stat.css +45 -0
  293. package/dist/stat/Stat.d.ts +27 -0
  294. package/dist/stat/Stat.d.ts.map +1 -0
  295. package/dist/stat/Stat.js +87 -0
  296. package/dist/stat/Stat.js.map +1 -0
  297. package/dist/stat/Stat.module.js +18 -0
  298. package/dist/stat/Stat.module.js.map +1 -0
  299. package/dist/stat/tokens.d.ts +3 -0
  300. package/dist/stat/tokens.d.ts.map +1 -0
  301. package/dist/stat/tokens.js +21 -0
  302. package/dist/stat/tokens.js.map +1 -0
  303. package/dist/switch/Switch.css +8 -8
  304. package/dist/switch/Switch.d.ts +1 -1
  305. package/dist/switch/Switch.js +69 -12
  306. package/dist/switch/Switch.js.map +1 -1
  307. package/dist/switch/Switch.module.js +3 -2
  308. package/dist/switch/Switch.module.js.map +1 -1
  309. package/dist/switch/tokens.d.ts +1 -1
  310. package/dist/switch/tokens.js.map +1 -1
  311. package/dist/tabs/Tabs.js +1 -1
  312. package/dist/tabs/Tabs.js.map +1 -1
  313. package/dist/tabs/tokens.d.ts +1 -1
  314. package/dist/tabs/tokens.js.map +1 -1
  315. package/dist/tags-input/TagsInput.css +60 -0
  316. package/dist/tags-input/TagsInput.d.ts +32 -0
  317. package/dist/tags-input/TagsInput.d.ts.map +1 -0
  318. package/dist/tags-input/TagsInput.js +316 -0
  319. package/dist/tags-input/TagsInput.js.map +1 -0
  320. package/dist/tags-input/TagsInput.module.js +20 -0
  321. package/dist/tags-input/TagsInput.module.js.map +1 -0
  322. package/dist/text/Text.d.ts +1 -1
  323. package/dist/text/Text.js +70 -5
  324. package/dist/text/Text.js.map +1 -1
  325. package/dist/text/tokens.d.ts +1 -1
  326. package/dist/text/tokens.js.map +1 -1
  327. package/dist/text-area/TextArea.css +1 -1
  328. package/dist/text-area/TextArea.d.ts +1 -1
  329. package/dist/text-area/TextArea.js +135 -28
  330. package/dist/text-area/TextArea.js.map +1 -1
  331. package/dist/text-area/TextArea.module.js +3 -3
  332. package/dist/text-area/TextArea.module.js.map +1 -1
  333. package/dist/text-input/TextInput.d.ts +7 -3
  334. package/dist/text-input/TextInput.d.ts.map +1 -1
  335. package/dist/text-input/TextInput.js +164 -47
  336. package/dist/text-input/TextInput.js.map +1 -1
  337. package/dist/theme/Tone.css +14 -0
  338. package/dist/theme/Tone.module.js +4 -2
  339. package/dist/theme/Tone.module.js.map +1 -1
  340. package/dist/theme/bootstrap.d.ts +2 -2
  341. package/dist/theme/bootstrap.d.ts.map +1 -1
  342. package/dist/theme/bootstrap.js +6 -0
  343. package/dist/theme/bootstrap.js.map +1 -1
  344. package/dist/theme/chartColors.js.map +1 -1
  345. package/dist/theme/checkTheme.d.ts +2 -2
  346. package/dist/theme/checkTheme.d.ts.map +1 -1
  347. package/dist/theme/checkTheme.js +24 -0
  348. package/dist/theme/checkTheme.js.map +1 -1
  349. package/dist/theme/cli.d.ts +2 -2
  350. package/dist/theme/cli.js.map +1 -1
  351. package/dist/theme/color.js.map +1 -1
  352. package/dist/theme/colorVision.d.ts +1 -1
  353. package/dist/theme/colorVision.js.map +1 -1
  354. package/dist/theme/componentTokens.js.map +1 -1
  355. package/dist/theme/components.d.ts +10 -3
  356. package/dist/theme/components.d.ts.map +1 -1
  357. package/dist/theme/components.js +14 -0
  358. package/dist/theme/components.js.map +1 -1
  359. package/dist/theme/defineTheme.d.ts +5 -5
  360. package/dist/theme/defineTheme.js.map +1 -1
  361. package/dist/theme/fonts.js.map +1 -1
  362. package/dist/theme/index.d.ts +12 -12
  363. package/dist/theme/index.js +1 -1
  364. package/dist/theme/semanticTokens.d.ts +1 -1
  365. package/dist/theme/semanticTokens.d.ts.map +1 -1
  366. package/dist/theme/semanticTokens.js +6 -0
  367. package/dist/theme/semanticTokens.js.map +1 -1
  368. package/dist/theme/theme.d.ts +2 -2
  369. package/dist/theme/theme.js.map +1 -1
  370. package/dist/theme/toneClass.d.ts +1 -1
  371. package/dist/theme/toneClass.js.map +1 -1
  372. package/dist/theme/tones.d.ts +15 -3
  373. package/dist/theme/tones.d.ts.map +1 -1
  374. package/dist/theme/tones.js +14 -2
  375. package/dist/theme/tones.js.map +1 -1
  376. package/dist/time-input/TimeInput.d.ts +1 -1
  377. package/dist/time-input/TimeInput.js +138 -31
  378. package/dist/time-input/TimeInput.js.map +1 -1
  379. package/dist/toast/Toast.css +131 -15
  380. package/dist/toast/Toast.d.ts +47 -10
  381. package/dist/toast/Toast.d.ts.map +1 -1
  382. package/dist/toast/Toast.js +191 -66
  383. package/dist/toast/Toast.js.map +1 -1
  384. package/dist/toast/Toast.module.js +5 -3
  385. package/dist/toast/Toast.module.js.map +1 -1
  386. package/dist/toast/tokens.d.ts +1 -1
  387. package/dist/toast/tokens.js +1 -1
  388. package/dist/toast/tokens.js.map +1 -1
  389. package/dist/tooltip/Tooltip.js +38 -8
  390. package/dist/tooltip/Tooltip.js.map +1 -1
  391. package/dist/tooltip/tokens.d.ts +1 -1
  392. package/dist/tooltip/tokens.js.map +1 -1
  393. package/dist/utils/cx.js.map +1 -1
  394. package/dist/utils/events.d.ts +4 -0
  395. package/dist/utils/events.d.ts.map +1 -0
  396. package/dist/utils/events.js +9 -0
  397. package/dist/utils/events.js.map +1 -0
  398. package/package.json +10 -5
@@ -0,0 +1,3 @@
1
+ /** Tokens of PillTrigger. */
2
+ export declare const pillTriggerTokens: import("../index.js").ComponentTokens<"pill-trigger", "panneau-pill-trigger-color" | "panneau-pill-trigger-radius" | "panneau-pill-trigger-gap" | "panneau-pill-trigger-padding-x" | "panneau-pill-trigger-font-size" | "panneau-pill-trigger-font-weight" | "panneau-pill-trigger-padding-x-sm" | "panneau-pill-trigger-font-size-sm" | "panneau-pill-trigger-bg" | "panneau-pill-trigger-border-color" | "panneau-pill-trigger-media-size" | "panneau-pill-trigger-media-radius" | "panneau-pill-trigger-bg-hover" | "panneau-pill-trigger-media-size-sm">;
3
+ //# sourceMappingURL=tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/pill-trigger/tokens.ts"],"names":[],"mappings":"AAEA,6BAA6B;AAC7B,eAAO,MAAM,iBAAiB,qhBA8B5B,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { defineComponentTokens } from "../theme/componentTokens.js";
2
+ //#region src/pill-trigger/tokens.ts
3
+ /** Tokens of PillTrigger. */
4
+ var pillTriggerTokens = defineComponentTokens("pill-trigger", {
5
+ /** Background. */
6
+ bg: "var(--panneau-color-surface-sunken)",
7
+ /** Background of a hovered, pressed or open trigger. */
8
+ "bg-hover": "color-mix(in srgb, var(--panneau-color-text) 8%, var(--panneau-color-surface-sunken))",
9
+ /** Color of the value. */
10
+ color: "var(--panneau-color-text)",
11
+ /** Color of the border: none by default. */
12
+ "border-color": "transparent",
13
+ /** Corner radius. */
14
+ radius: "var(--panneau-radius-full)",
15
+ /** Space between the media, the value and the chevron. */
16
+ gap: "var(--panneau-space-2)",
17
+ /** Horizontal padding. */
18
+ "padding-x": "var(--panneau-space-3)",
19
+ /** Horizontal padding of the small size. */
20
+ "padding-x-sm": "var(--panneau-space-2)",
21
+ /** Font size of the value. */
22
+ "font-size": "var(--panneau-font-size-md)",
23
+ /** Font size of the value, small size. */
24
+ "font-size-sm": "var(--panneau-font-size-sm)",
25
+ /** Font weight of the value. */
26
+ "font-weight": "var(--panneau-font-weight-medium)",
27
+ /** Size of the leading media. */
28
+ "media-size": "1.5rem",
29
+ /** Size of the leading media, small size. */
30
+ "media-size-sm": "1.25rem",
31
+ /** Corner radius of the leading media: its content is clipped to it. */
32
+ "media-radius": "var(--panneau-radius-full)"
33
+ });
34
+ //#endregion
35
+ export { pillTriggerTokens };
36
+
37
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","names":["defineComponentTokens","pillTriggerTokens","bg","color","radius","gap"],"sources":["../../src/pill-trigger/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of PillTrigger. */\nexport const pillTriggerTokens = defineComponentTokens('pill-trigger', {\n /** Background. */\n bg: 'var(--panneau-color-surface-sunken)',\n /** Background of a hovered, pressed or open trigger. */\n 'bg-hover':\n 'color-mix(in srgb, var(--panneau-color-text) 8%, var(--panneau-color-surface-sunken))',\n /** Color of the value. */\n color: 'var(--panneau-color-text)',\n /** Color of the border: none by default. */\n 'border-color': 'transparent',\n /** Corner radius. */\n radius: 'var(--panneau-radius-full)',\n /** Space between the media, the value and the chevron. */\n gap: 'var(--panneau-space-2)',\n /** Horizontal padding. */\n 'padding-x': 'var(--panneau-space-3)',\n /** Horizontal padding of the small size. */\n 'padding-x-sm': 'var(--panneau-space-2)',\n /** Font size of the value. */\n 'font-size': 'var(--panneau-font-size-md)',\n /** Font size of the value, small size. */\n 'font-size-sm': 'var(--panneau-font-size-sm)',\n /** Font weight of the value. */\n 'font-weight': 'var(--panneau-font-weight-medium)',\n /** Size of the leading media. */\n 'media-size': '1.5rem',\n /** Size of the leading media, small size. */\n 'media-size-sm': '1.25rem',\n /** Corner radius of the leading media: its content is clipped to it. */\n 'media-radius': 'var(--panneau-radius-full)',\n});\n"],"mappings":";;;AAGA,IAAaC,oBAAoBD,sBAAsB,gBAAgB;;CAEnEE,IAAI;;CAEJ,YACI;;CAEJC,OAAO;;CAEP,gBAAgB;;CAEhBC,QAAQ;;CAERC,KAAK;;CAEL,aAAa;;CAEb,gBAAgB;;CAEhB,aAAa;;CAEb,gBAAgB;;CAEhB,eAAe;;CAEf,cAAc;;CAEd,iBAAiB;;CAEjB,gBAAgB;AACpB,CAAC"}
@@ -31,3 +31,8 @@
31
31
  transform: scale(0.97);
32
32
  }
33
33
  }
34
+
35
+ /* Stops the events that React bubbles out of the overlay, without a box of its own. */
36
+ .panneau-popover-boundary {
37
+ display: contents;
38
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../src/popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAEH,KAAK,YAAY,IAAI,gBAAgB,EAExC,MAAM,uBAAuB,CAAC;AAM/B,MAAM,WAAW,YAAa,SAAQ,IAAI,CACtC,gBAAgB,EAChB,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,0BAA0B,CAClE;IACG,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,C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a,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC"}
@@ -1,6 +1,8 @@
1
1
  import { cx } from "../utils/cx.js";
2
2
  import { usePortalContainer } from "../root/PanneauRoot.js";
3
+ import { stopPropagation } from "../utils/events.js";
3
4
  import Popover_module_default from "./Popover.module.js";
5
+ import { c } from "react/compiler-runtime";
4
6
  import { Dialog, DialogTrigger as PopoverTrigger, Popover } from "react-aria-components";
5
7
  import { jsx } from "react/jsx-runtime";
6
8
  //#region src/popover/Popover.tsx
@@ -8,32 +10,126 @@ import { jsx } from "react/jsx-runtime";
8
10
  * A popover with free content, inside a `PopoverTrigger` with its button as the first child. Its
9
11
  * content is a non-modal dialog: focus moves into it and comes back to the button when it closes.
10
12
  */
11
- function Popover$1({ children, "aria-label": ariaLabel, className, dialogClassName, offset = 6, ...props }) {
13
+ function Popover$1(t0) {
14
+ const $ = c(21);
15
+ let ariaLabel;
16
+ let children;
17
+ let className;
18
+ let dialogClassName;
19
+ let props;
20
+ let t1;
21
+ if ($[0] !== t0) {
22
+ ({children, "aria-label": ariaLabel, className, dialogClassName, offset: t1, ...props} = t0);
23
+ $[0] = t0;
24
+ $[1] = ariaLabel;
25
+ $[2] = children;
26
+ $[3] = className;
27
+ $[4] = dialogClassName;
28
+ $[5] = props;
29
+ $[6] = t1;
30
+ } else {
31
+ ariaLabel = $[1];
32
+ children = $[2];
33
+ className = $[3];
34
+ dialogClassName = $[4];
35
+ props = $[5];
36
+ t1 = $[6];
37
+ }
38
+ const offset = t1 === void 0 ? 6 : t1;
12
39
  const container = usePortalContainer();
13
40
  if (container === null) return null;
14
- return /* @__PURE__ */ jsx(Popover, {
15
- ...props,
16
- offset,
17
- className: cx("panneau-popover", Popover_module_default.popover, className),
18
- UNSTABLE_portalContainer: container,
19
- children: /* @__PURE__ */ jsx(Dialog, {
20
- "aria-label": ariaLabel,
21
- className: cx(Popover_module_default.dialog, dialogClassName),
22
- children
23
- })
24
- });
41
+ let t2;
42
+ if ($[7] !== className) {
43
+ t2 = cx("panneau-popover", Popover_module_default.popover, className);
44
+ $[7] = className;
45
+ $[8] = t2;
46
+ } else t2 = $[8];
47
+ let t3;
48
+ if ($[9] !== dialogClassName) {
49
+ t3 = cx(Popover_module_default.dialog, dialogClassName);
50
+ $[9] = dialogClassName;
51
+ $[10] = t3;
52
+ } else t3 = $[10];
53
+ let t4;
54
+ if ($[11] !== ariaLabel || $[12] !== children || $[13] !== t3) {
55
+ t4 = /* @__PURE__ */ jsx("div", {
56
+ className: Popover_module_default.boundary,
57
+ onSubmit: stopPropagation,
58
+ children: /* @__PURE__ */ jsx(Dialog, {
59
+ "aria-label": ariaLabel,
60
+ className: t3,
61
+ children
62
+ })
63
+ });
64
+ $[11] = ariaLabel;
65
+ $[12] = children;
66
+ $[13] = t3;
67
+ $[14] = t4;
68
+ } else t4 = $[14];
69
+ let t5;
70
+ if ($[15] !== container || $[16] !== offset || $[17] !== props || $[18] !== t2 || $[19] !== t4) {
71
+ t5 = /* @__PURE__ */ jsx(Popover, {
72
+ ...props,
73
+ offset,
74
+ className: t2,
75
+ UNSTABLE_portalContainer: container,
76
+ children: t4
77
+ });
78
+ $[15] = container;
79
+ $[16] = offset;
80
+ $[17] = props;
81
+ $[18] = t2;
82
+ $[19] = t4;
83
+ $[20] = t5;
84
+ } else t5 = $[20];
85
+ return t5;
25
86
  }
26
87
  /** The popover surface without a dialog, for listboxes and menus. */
27
- function PopoverSurface({ children, className, offset = 6, ...props }) {
88
+ function PopoverSurface(t0) {
89
+ const $ = c(13);
90
+ let children;
91
+ let className;
92
+ let props;
93
+ let t1;
94
+ if ($[0] !== t0) {
95
+ ({children, className, offset: t1, ...props} = t0);
96
+ $[0] = t0;
97
+ $[1] = children;
98
+ $[2] = className;
99
+ $[3] = props;
100
+ $[4] = t1;
101
+ } else {
102
+ children = $[1];
103
+ className = $[2];
104
+ props = $[3];
105
+ t1 = $[4];
106
+ }
107
+ const offset = t1 === void 0 ? 6 : t1;
28
108
  const container = usePortalContainer();
29
109
  if (container === null) return null;
30
- return /* @__PURE__ */ jsx(Popover, {
31
- ...props,
32
- offset,
33
- className: cx("panneau-popover", Popover_module_default.popover, className),
34
- UNSTABLE_portalContainer: container,
35
- children
36
- });
110
+ let t2;
111
+ if ($[5] !== className) {
112
+ t2 = cx("panneau-popover", Popover_module_default.popover, className);
113
+ $[5] = className;
114
+ $[6] = t2;
115
+ } else t2 = $[6];
116
+ let t3;
117
+ if ($[7] !== children || $[8] !== container || $[9] !== offset || $[10] !== props || $[11] !== t2) {
118
+ t3 = /* @__PURE__ */ jsx(Popover, {
119
+ ...props,
120
+ offset,
121
+ className: t2,
122
+ UNSTABLE_portalContainer: container,
123
+ children
124
+ });
125
+ $[7] = children;
126
+ $[8] = container;
127
+ $[9] = offset;
128
+ $[10] = props;
129
+ $[11] = t2;
130
+ $[12] = t3;
131
+ } else t3 = $[12];
132
+ return t3;
37
133
  }
38
134
  //#endregion
39
135
  export { Popover$1 as Popover, PopoverSurface, PopoverTrigger };
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","names":["Popover","AriaPopover","styles"],"sources":["../../src/popover/Popover.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport {\n Popover as AriaPopover,\n type PopoverProps as AriaPopoverProps,\n Dialog,\n} from 'react-aria-components';\n\nimport { usePortalContainer } from '../root/PanneauRoot';\nimport { cx } from '../utils/cx';\nimport styles from './Popover.module.css';\n\nexport interface PopoverProps extends Omit<\n AriaPopoverProps,\n 'className' | 'style' | 'children' | 'UNSTABLE_portalContainer'\n> {\n children?: ReactNode;\n /** Accessible label of the popover's dialog, when it has no heading. */\n 'aria-label'?: string;\n className?: string;\n dialogClassName?: string;\n}\n\n/**\n * A popover with free content, inside a `PopoverTrigger` with its button as the first child. Its\n * content is a non-modal dialog: focus moves into it and comes back to the button when it closes.\n */\nexport function Popover({\n children,\n 'aria-label': ariaLabel,\n className,\n dialogClassName,\n offset = 6,\n ...props\n}: PopoverProps) {\n const container = usePortalContainer();\n if (container === null) {\n return null;\n }\n return (\n <AriaPopover\n {...props}\n offset={offset}\n className={cx('panneau-popover', styles.popover, className)}\n UNSTABLE_portalContainer={container}\n >\n <Dialog aria-label={ariaLabel} className={cx(styles.dialog, dialogClassName)}>\n {children}\n </Dialog>\n </AriaPopover>\n );\n}\n\n/** The popover surface without a dialog, for listboxes and menus. */\nexport function PopoverSurface({\n children,\n className,\n offset = 6,\n ...props\n}: Omit<PopoverProps, 'aria-label' | 'dialogClassName'>) {\n const container = usePortalContainer();\n if (container === null) {\n return null;\n }\n return (\n <AriaPopover\n {...props}\n offset={offset}\n className={cx('panneau-popover', styles.popover, className)}\n UNSTABLE_portalContainer={container}\n >\n {children}\n </AriaPopover>\n );\n}\n\nexport { DialogTrigger as PopoverTrigger } from 'react-aria-components';\n"],"mappings":";;;;;;;;;;AA0BA,SAAgBA,UAAQ,EACpB,UACA,cAAc,WACd,WACA,iBACA,SAAS,GACT,GAAG,SACU;CACb,MAAM,YAAY,mBAAmB;CACrC,IAAI,cAAc,MACd,OAAO;CAEX,OACI,oBAACC,SAAD;EACI,GAAI;EACI;EACR,WAAW,GAAG,mBAAmBC,uBAAO,SAAS,SAAS;EAC1D,0BAA0B;EAE1B,UAAA,oBAAC,QAAD;GAAQ,cAAY;GAAW,WAAW,GAAGA,uBAAO,QAAQ,eAAe;GACtE;EACG,CAAA;CACC,CAAA;AAErB;;AAGA,SAAgB,eAAe,EAC3B,UACA,WACA,SAAS,GACT,GAAG,SACkD;CACrD,MAAM,YAAY,mBAAmB;CACrC,IAAI,cAAc,MACd,OAAO;CAEX,OACI,oBAACD,SAAD;EACI,GAAI;EACI;EACR,WAAW,GAAG,mBAAmBC,uBAAO,SAAS,SAAS;EAC1D,0BAA0B;EAEzB;CACQ,CAAA;AAErB"}
1
+ {"version":3,"file":"Popover.js","names":["ReactNode","Popover","AriaPopover","PopoverProps","AriaPopoverProps","Dialog","usePortalContainer","cx","stopPropagation","styles","Omit","children","className","dialogClassName","t0","$","_c","ariaLabel","props","t1","offset","undefined","container","t2","popover","t3","dialog","t4","boundary","t5","PopoverSurface","DialogTrigger","PopoverTrigger","Popover","_c","styles","AriaPopover"],"sources":["../../src/popover/Popover.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport {\n Popover as AriaPopover,\n type PopoverProps as AriaPopoverProps,\n Dialog,\n} from 'react-aria-components';\n\nimport { usePortalContainer } from '../root/PanneauRoot';\nimport { cx } from '../utils/cx';\nimport { stopPropagation } from '../utils/events';\nimport styles from './Popover.module.css';\n\nexport interface PopoverProps extends Omit<\n AriaPopoverProps,\n 'className' | 'style' | 'children' | 'UNSTABLE_portalContainer'\n> {\n children?: ReactNode;\n /** Accessible label of the popover's dialog, when it has no heading. */\n 'aria-label'?: string;\n className?: string;\n dialogClassName?: string;\n}\n\n/**\n * A popover with free content, inside a `PopoverTrigger` with its button as the first child. Its\n * content is a non-modal dialog: focus moves into it and comes back to the button when it closes.\n */\nexport function Popover({\n children,\n 'aria-label': ariaLabel,\n className,\n dialogClassName,\n offset = 6,\n ...props\n}: PopoverProps) {\n const container = usePortalContainer();\n if (container === null) {\n return null;\n }\n return (\n <AriaPopover\n {...props}\n offset={offset}\n className={cx('panneau-popover', styles.popover, className)}\n UNSTABLE_portalContainer={container}\n >\n {/* Like a dialog: a form in the popover doesn't submit a form around it (#146). */}\n <div className={styles.boundary} onSubmit={stopPropagation}>\n <Dialog aria-label={ariaLabel} className={cx(styles.dialog, dialogClassName)}>\n {children}\n </Dialog>\n </div>\n </AriaPopover>\n );\n}\n\n/** The popover surface without a dialog, for listboxes and menus. */\nexport function PopoverSurface({\n children,\n className,\n offset = 6,\n ...props\n}: Omit<PopoverProps, 'aria-label' | 'dialogClassName'>) {\n const container = usePortalContainer();\n if (container === null) {\n return null;\n }\n return (\n <AriaPopover\n {...props}\n offset={offset}\n className={cx('panneau-popover', styles.popover, className)}\n UNSTABLE_portalContainer={container}\n >\n {children}\n </AriaPopover>\n );\n}\n\nexport { DialogTrigger as PopoverTrigger } from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AAR,EAAA;CAAA,IAAAU;CAAA,IAAAV,EAAA,OAAAJ,YAAAI,EAAA,OAAAO,aAAAP,EAAA,OAAAK,UAAAL,EAAA,QAAAG,SAAAH,EAAA,QAAAQ,IAAA;EAH/DE,KAAA,oBAACW,SAAD;GAAY,GACJlB;GACIE;GACG,WAAAG;GACeD,0BAAAA;GAEzBX;EANO,CAAA;EAOEI,EAAA,KAAAJ;EAAAI,EAAA,KAAAO;EAAAP,EAAA,KAAAK;EAAAL,EAAA,MAAAG;EAAAH,EAAA,MAAAQ;EAAAR,EAAA,MAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,OAPdU;AAOc"}
@@ -3,12 +3,14 @@ import "./Popover.css";
3
3
  var popover = "panneau-popover";
4
4
  var pop = "panneau-popover-pop";
5
5
  var dialog = "panneau-popover-dialog";
6
+ var boundary = "panneau-popover-boundary";
6
7
  var Popover_module_default = {
7
8
  popover,
8
9
  pop,
9
- dialog
10
+ dialog,
11
+ boundary
10
12
  };
11
13
  //#endregion
12
- export { Popover_module_default as default, dialog, pop, popover };
14
+ export { boundary, Popover_module_default as default, dialog, pop, popover };
13
15
 
14
16
  //# sourceMappingURL=Popover.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.module.js","names":[],"sources":["../../src/popover/Popover.module.css"],"sourcesContent":[".popover {\n min-width: var(--trigger-width, 10rem);\n max-width: calc(100vw - 2 * var(--panneau-space-4));\n color: var(--panneau-color-text);\n background-color: var(--panneau-popover-bg, var(--panneau-color-surface-raised));\n border: var(--panneau-border-width) solid\n var(--panneau-popover-border-color, var(--panneau-color-border));\n border-radius: var(--panneau-popover-radius, var(--panneau-radius-lg));\n box-shadow: var(--panneau-popover-shadow, var(--panneau-shadow-lg));\n outline: none;\n overflow: auto;\n z-index: var(--panneau-z-overlay);\n}\n\n.popover[data-entering] {\n animation: pop var(--panneau-duration) ease-out;\n}\n\n.popover[data-exiting] {\n animation: pop var(--panneau-duration) ease-in reverse;\n}\n\n.dialog {\n padding: var(--panneau-popover-padding, var(--panneau-space-3));\n outline: none;\n}\n\n@keyframes pop {\n from {\n opacity: 0;\n transform: scale(0.97);\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"Popover.module.js","names":[],"sources":["../../src/popover/Popover.module.css"],"sourcesContent":[".popover {\n min-width: var(--trigger-width, 10rem);\n max-width: calc(100vw - 2 * var(--panneau-space-4));\n color: var(--panneau-color-text);\n background-color: var(--panneau-popover-bg, var(--panneau-color-surface-raised));\n border: var(--panneau-border-width) solid\n var(--panneau-popover-border-color, var(--panneau-color-border));\n border-radius: var(--panneau-popover-radius, var(--panneau-radius-lg));\n box-shadow: var(--panneau-popover-shadow, var(--panneau-shadow-lg));\n outline: none;\n overflow: auto;\n z-index: var(--panneau-z-overlay);\n}\n\n.popover[data-entering] {\n animation: pop var(--panneau-duration) ease-out;\n}\n\n.popover[data-exiting] {\n animation: pop var(--panneau-duration) ease-in reverse;\n}\n\n.dialog {\n padding: var(--panneau-popover-padding, var(--panneau-space-3));\n outline: none;\n}\n\n@keyframes pop {\n from {\n opacity: 0;\n transform: scale(0.97);\n }\n}\n\n/* Stops the events that React bubbles out of the overlay, without a box of its own. */\n.boundary {\n display: contents;\n}\n"],"mappings":""}
@@ -1,3 +1,3 @@
1
1
  /** Tokens of Popover. */
2
- export declare const popoverTokens: import("..").ComponentTokens<"popover", "panneau-popover-radius" | "panneau-popover-padding" | "panneau-popover-bg" | "panneau-popover-border-color" | "panneau-popover-shadow">;
2
+ export declare const popoverTokens: import("../index.js").ComponentTokens<"popover", "panneau-popover-radius" | "panneau-popover-padding" | "panneau-popover-bg" | "panneau-popover-border-color" | "panneau-popover-shadow">;
3
3
  //# sourceMappingURL=tokens.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.js","names":[],"sources":["../../src/popover/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Popover. */\nexport const popoverTokens = defineComponentTokens('popover', {\n /** Background. */\n bg: 'var(--panneau-color-surface-raised)',\n /** Border color. */\n 'border-color': 'var(--panneau-color-border)',\n /** Corner radius. */\n radius: 'var(--panneau-radius-lg)',\n /** Shadow. */\n shadow: 'var(--panneau-shadow-lg)',\n /** Padding of the content. */\n padding: 'var(--panneau-space-3)',\n});\n"],"mappings":";;;AAGA,IAAa,gBAAgB,sBAAsB,WAAW;;CAE1D,IAAI;;CAEJ,gBAAgB;;CAEhB,QAAQ;;CAER,QAAQ;;CAER,SAAS;AACb,CAAC"}
1
+ {"version":3,"file":"tokens.js","names":["defineComponentTokens","popoverTokens","bg","radius","shadow","padding"],"sources":["../../src/popover/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Popover. */\nexport const popoverTokens = defineComponentTokens('popover', {\n /** Background. */\n bg: 'var(--panneau-color-surface-raised)',\n /** Border color. */\n 'border-color': 'var(--panneau-color-border)',\n /** Corner radius. */\n radius: 'var(--panneau-radius-lg)',\n /** Shadow. */\n shadow: 'var(--panneau-shadow-lg)',\n /** Padding of the content. */\n padding: 'var(--panneau-space-3)',\n});\n"],"mappings":";;;AAGA,IAAaC,gBAAgBD,sBAAsB,WAAW;;CAE1DE,IAAI;;CAEJ,gBAAgB;;CAEhBC,QAAQ;;CAERC,QAAQ;;CAERC,SAAS;AACb,CAAC"}
@@ -1,16 +1,47 @@
1
1
  import { cx } from "../utils/cx.js";
2
2
  import Prose_module_default from "./Prose.module.js";
3
+ import { c } from "react/compiler-runtime";
3
4
  import { jsx } from "react/jsx-runtime";
4
5
  //#region src/prose/Prose.tsx
5
6
  /**
6
7
  * Styles the elements of rich content (headings, paragraphs, lists, links, quotes, code, tables):
7
8
  * the output of an editor, Markdown, or a help page. Outside of it, Panneau styles no element.
8
9
  */
9
- function Prose({ as: Element = "div", className, ...props }) {
10
- return /* @__PURE__ */ jsx(Element, {
11
- ...props,
12
- className: cx("panneau-prose", Prose_module_default.prose, className)
13
- });
10
+ function Prose(t0) {
11
+ const $ = c(10);
12
+ let className;
13
+ let props;
14
+ let t1;
15
+ if ($[0] !== t0) {
16
+ ({as: t1, className, ...props} = t0);
17
+ $[0] = t0;
18
+ $[1] = className;
19
+ $[2] = props;
20
+ $[3] = t1;
21
+ } else {
22
+ className = $[1];
23
+ props = $[2];
24
+ t1 = $[3];
25
+ }
26
+ const Element = t1 === void 0 ? "div" : t1;
27
+ let t2;
28
+ if ($[4] !== className) {
29
+ t2 = cx("panneau-prose", Prose_module_default.prose, className);
30
+ $[4] = className;
31
+ $[5] = t2;
32
+ } else t2 = $[5];
33
+ let t3;
34
+ if ($[6] !== Element || $[7] !== props || $[8] !== t2) {
35
+ t3 = /* @__PURE__ */ jsx(Element, {
36
+ ...props,
37
+ className: t2
38
+ });
39
+ $[6] = Element;
40
+ $[7] = props;
41
+ $[8] = t2;
42
+ $[9] = t3;
43
+ } else t3 = $[9];
44
+ return t3;
14
45
  }
15
46
  //#endregion
16
47
  export { Prose };
@@ -1 +1 @@
1
- {"version":3,"file":"Prose.js","names":["styles"],"sources":["../../src/prose/Prose.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from '../utils/cx';\nimport styles from './Prose.module.css';\n\nexport interface ProseProps extends HTMLAttributes<HTMLElement> {\n /** Element to render. Defaults to `div`. */\n as?: 'div' | 'article' | 'section';\n}\n\n/**\n * Styles the elements of rich content (headings, paragraphs, lists, links, quotes, code, tables):\n * the output of an editor, Markdown, or a help page. Outside of it, Panneau styles no element.\n */\nexport function Prose({ as: Element = 'div', className, ...props }: ProseProps) {\n return <Element {...props} className={cx('panneau-prose', styles.prose, className)} />;\n}\n"],"mappings":";;;;;;;;AAcA,SAAgB,MAAM,EAAE,IAAI,UAAU,OAAO,WAAW,GAAG,SAAqB;CAC5E,OAAO,oBAAC,SAAD;EAAS,GAAI;EAAO,WAAW,GAAG,iBAAiBA,qBAAO,OAAO,SAAS;CAAE,CAAA;AACvF"}
1
+ {"version":3,"file":"Prose.js","names":["HTMLAttributes","cx","styles","ProseProps","HTMLElement","as","Prose","t0","$","_c","className","props","t1","Element","undefined","t2","prose","t3","_c","styles"],"sources":["../../src/prose/Prose.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\n\nimport { cx } from '../utils/cx';\nimport styles from './Prose.module.css';\n\nexport interface ProseProps extends HTMLAttributes<HTMLElement> {\n /** Element to render. Defaults to `div`. */\n as?: 'div' | 'article' | 'section';\n}\n\n/**\n * Styles the elements of rich content (headings, paragraphs, lists, links, quotes, code, tables):\n * the output of an editor, Markdown, or a help page. Outside of it, Panneau styles no element.\n */\nexport function Prose({ as: Element = 'div', className, ...props }: ProseProps) {\n return <Element {...props} className={cx('panneau-prose', styles.prose, className)} />;\n}\n"],"mappings":";;;;;;;;;AAcA,SAAOM,MAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OAAAD,IAAA;EAAe,CAAA,CAAAF,IAAAO,IAAAF,WAAA,GAAAC,SAAAJ;EAAwDC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAA;EAAAF,YAAAF,EAAA;EAAAG,QAAAH,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CAAlD,MAAAK,UAAAD,OAAAE,KAAAA,IAAA,QAAAF;CAAe,IAAAG;CAAA,IAAAP,EAAA,OAAAE,WAAA;EACDK,KAAAd,GAAG,iBAAiBC,qBAAMc,OAAQN,SAAS;EAACF,EAAA,KAAAE;EAAAF,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,OAAAK,WAAAL,EAAA,OAAAG,SAAAH,EAAA,OAAAO,IAAA;EAA3EE,KAAA,oBAAC,SAAD;GAAQ,GAAKN;GAAkB,WAAAI;EAA4C,CAAA;EAAIP,EAAA,KAAAK;EAAAL,EAAA,KAAAG;EAAAH,EAAA,KAAAO;EAAAP,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OAA/ES;AAA+E"}
@@ -1,3 +1,3 @@
1
1
  /** Tokens of Prose. Its headings use the tokens of Heading. */
2
- export declare const proseTokens: import("..").ComponentTokens<"prose", "panneau-prose-gap" | "panneau-prose-border-color" | "panneau-prose-line-height" | "panneau-prose-heading-gap" | "panneau-prose-list-indent" | "panneau-prose-link-color" | "panneau-prose-code-font-size" | "panneau-prose-code-color" | "panneau-prose-code-bg" | "panneau-prose-code-radius" | "panneau-prose-quote-border-color" | "panneau-prose-quote-color">;
2
+ export declare const proseTokens: import("../index.js").ComponentTokens<"prose", "panneau-prose-gap" | "panneau-prose-border-color" | "panneau-prose-line-height" | "panneau-prose-heading-gap" | "panneau-prose-list-indent" | "panneau-prose-link-color" | "panneau-prose-code-font-size" | "panneau-prose-code-color" | "panneau-prose-code-bg" | "panneau-prose-code-radius" | "panneau-prose-quote-border-color" | "panneau-prose-quote-color">;
3
3
  //# sourceMappingURL=tokens.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.js","names":[],"sources":["../../src/prose/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Prose. Its headings use the tokens of Heading. */\nexport const proseTokens = defineComponentTokens('prose', {\n /** Line height of the content. */\n 'line-height': '1.6',\n /** Space between blocks: paragraphs, lists, tables. */\n gap: 'var(--panneau-space-4)',\n /** Space above a heading. */\n 'heading-gap': 'var(--panneau-space-6)',\n /** Indent of lists. */\n 'list-indent': '1.5em',\n /** Color of links. */\n 'link-color': 'var(--panneau-color-link)',\n /** Font size of code, relative to the text around it. */\n 'code-font-size': '0.875em',\n /** Text color of code: inherited, so that a site's global `code` color doesn't apply. */\n 'code-color': 'inherit',\n /** Background of code and code blocks. */\n 'code-bg': 'var(--panneau-color-surface-sunken)',\n /** Corner radius of code and code blocks. */\n 'code-radius': 'var(--panneau-radius-sm)',\n /** Border of quotes. */\n 'quote-border-color': 'var(--panneau-color-border)',\n /** Text color of quotes and captions. */\n 'quote-color': 'var(--panneau-color-text-muted)',\n /** Color of the borders of tables and of horizontal rules. */\n 'border-color': 'var(--panneau-color-border)',\n});\n"],"mappings":";;;AAGA,IAAa,cAAc,sBAAsB,SAAS;;CAEtD,eAAe;;CAEf,KAAK;;CAEL,eAAe;;CAEf,eAAe;;CAEf,cAAc;;CAEd,kBAAkB;;CAElB,cAAc;;CAEd,WAAW;;CAEX,eAAe;;CAEf,sBAAsB;;CAEtB,eAAe;;CAEf,gBAAgB;AACpB,CAAC"}
1
+ {"version":3,"file":"tokens.js","names":["defineComponentTokens","proseTokens","gap"],"sources":["../../src/prose/tokens.ts"],"sourcesContent":["import { defineComponentTokens } from '../theme/componentTokens';\n\n/** Tokens of Prose. Its headings use the tokens of Heading. */\nexport const proseTokens = defineComponentTokens('prose', {\n /** Line height of the content. */\n 'line-height': '1.6',\n /** Space between blocks: paragraphs, lists, tables. */\n gap: 'var(--panneau-space-4)',\n /** Space above a heading. */\n 'heading-gap': 'var(--panneau-space-6)',\n /** Indent of lists. */\n 'list-indent': '1.5em',\n /** Color of links. */\n 'link-color': 'var(--panneau-color-link)',\n /** Font size of code, relative to the text around it. */\n 'code-font-size': '0.875em',\n /** Text color of code: inherited, so that a site's global `code` color doesn't apply. */\n 'code-color': 'inherit',\n /** Background of code and code blocks. */\n 'code-bg': 'var(--panneau-color-surface-sunken)',\n /** Corner radius of code and code blocks. */\n 'code-radius': 'var(--panneau-radius-sm)',\n /** Border of quotes. */\n 'quote-border-color': 'var(--panneau-color-border)',\n /** Text color of quotes and captions. */\n 'quote-color': 'var(--panneau-color-text-muted)',\n /** Color of the borders of tables and of horizontal rules. */\n 'border-color': 'var(--panneau-color-border)',\n});\n"],"mappings":";;;AAGA,IAAaC,cAAcD,sBAAsB,SAAS;;CAEtD,eAAe;;CAEfE,KAAK;;CAEL,eAAe;;CAEf,eAAe;;CAEf,cAAc;;CAEd,kBAAkB;;CAElB,cAAc;;CAEd,WAAW;;CAEX,eAAe;;CAEf,sBAAsB;;CAEtB,eAAe;;CAEf,gBAAgB;AACpB,CAAC"}
@@ -67,11 +67,101 @@
67
67
  min-width: 0;
68
68
  }
69
69
 
70
+ .panneau-radio-group-option-label {
71
+ overflow-wrap: anywhere;
72
+ }
73
+
70
74
  .panneau-radio-group-description {
71
75
  font-size: var(--panneau-font-size-sm);
72
76
  color: var(--panneau-color-text-muted);
73
77
  }
74
78
 
79
+ /* Leading media of an option, between the radio and the label. */
80
+ .panneau-radio-group-media {
81
+ display: inline-flex;
82
+ flex: 0 0 auto;
83
+ align-items: center;
84
+ justify-content: center;
85
+ width: var(--panneau-radio-media-size, 2rem);
86
+ height: var(--panneau-radio-media-size, 2rem);
87
+ overflow: hidden;
88
+ border-radius: var(--panneau-radio-media-radius, var(--panneau-radius-full));
89
+ }
90
+
91
+ .panneau-radio-group-media > :is(img, svg, video, picture) {
92
+ width: 100%;
93
+ height: 100%;
94
+ object-fit: cover;
95
+ }
96
+
97
+ /*
98
+ * Cards: the options in a grid of --_panneau-radio-group-columns columns, inside a size container
99
+ * of their own, so that they become a single column when the group is narrow, wherever it is.
100
+ */
101
+
102
+ .panneau-radio-group-grid {
103
+ container-type: inline-size;
104
+ }
105
+
106
+ .panneau-radio-group-cards .panneau-radio-group-options {
107
+ display: grid;
108
+ grid-template-columns: repeat(var(--_panneau-radio-group-columns, 2), minmax(0, 1fr));
109
+ gap: var(--panneau-radio-card-gap, var(--panneau-space-2));
110
+ }
111
+
112
+ @container (max-width: 28rem) {
113
+ .panneau-radio-group-cards .panneau-radio-group-options {
114
+ grid-template-columns: minmax(0, 1fr);
115
+ }
116
+ }
117
+
118
+ .panneau-radio-group-card {
119
+ display: flex;
120
+ align-items: center;
121
+ gap: var(--panneau-space-3);
122
+ padding: var(--panneau-radio-card-padding, var(--panneau-space-3));
123
+ background-color: var(--panneau-radio-card-bg, var(--panneau-color-surface));
124
+ border: var(--panneau-border-width) solid
125
+ var(--panneau-radio-card-border-color, var(--panneau-color-border));
126
+ border-radius: var(--panneau-radio-card-radius, var(--panneau-radius-md));
127
+ transition:
128
+ border-color var(--panneau-duration),
129
+ box-shadow var(--panneau-duration);
130
+ }
131
+
132
+ .panneau-radio-group-card .panneau-radio-group-circle {
133
+ margin-top: 0;
134
+ }
135
+
136
+ .panneau-radio-group-card .panneau-radio-group-option-label {
137
+ font-weight: var(--panneau-radio-card-label-font-weight, var(--panneau-font-weight-medium));
138
+ }
139
+
140
+ .panneau-radio-group-card[data-hovered] {
141
+ border-color: var(--panneau-radio-card-border-color-hover, var(--panneau-color-border-control));
142
+ }
143
+
144
+ /* The selected card: a border of twice the width, drawn inside so that nothing moves. */
145
+ .panneau-radio-group-card[data-selected] {
146
+ border-color: var(--panneau-radio-card-border-color-selected, var(--panneau-color-accent));
147
+ box-shadow: inset 0 0 0 var(--panneau-border-width)
148
+ var(--panneau-radio-card-border-color-selected, var(--panneau-color-accent));
149
+ }
150
+
151
+ .panneau-radio-group-card[data-invalid] {
152
+ border-color: var(--panneau-color-danger);
153
+ }
154
+
155
+ /* A card shows the focus ring around itself, instead of around its radio. */
156
+ .panneau-radio-group-card[data-focus-visible] {
157
+ outline: var(--panneau-focus-width) solid var(--panneau-color-focus);
158
+ outline-offset: 2px;
159
+ }
160
+
161
+ .panneau-radio-group-card[data-focus-visible] .panneau-radio-group-circle {
162
+ outline: none;
163
+ }
164
+
75
165
  @media (pointer: coarse) {
76
166
  .panneau-radio-group-radio {
77
167
  min-height: 2.75rem;
@@ -1,12 +1,31 @@
1
+ import type { ReactNode } from 'react';
1
2
  import { type RadioGroupProps as AriaRadioGroupProps } from 'react-aria-components';
2
- import { type FieldChromeProps } from '../field/FieldParts';
3
- import type { OptionValue, SelectOption } from '../select/Select';
3
+ import { type FieldChromeProps } from '../field/FieldParts.js';
4
+ import type { OptionValue, SelectOption } from '../select/Select.js';
5
+ /** An option of a `RadioGroup`: a `SelectOption`, with an optional leading media. */
6
+ export interface RadioGroupOption extends SelectOption {
7
+ /** Leading media, such as an avatar or an image, between the radio and the label. */
8
+ media?: ReactNode;
9
+ }
10
+ /** How a `RadioGroup` shows its options: a list of radios, or bordered cards in a grid. */
11
+ export type RadioGroupAppearance = 'list' | 'cards';
4
12
  export interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'className' | 'style' | 'children' | 'isInvalid' | 'validate' | 'value' | 'defaultValue' | 'onChange'>, FieldChromeProps {
5
- options: readonly SelectOption[];
13
+ options: readonly RadioGroupOption[];
6
14
  value?: OptionValue | null;
7
15
  onChange?: (value: OptionValue) => void;
16
+ /**
17
+ * `list` (default) shows the options as radios, one under the other or side by side with
18
+ * `orientation="horizontal"`. `cards` shows them as bordered cards in a grid of `columns`, which
19
+ * becomes a single column in a narrow container. The selected card has a stronger border.
20
+ */
21
+ appearance?: RadioGroupAppearance;
22
+ /** Columns of cards, with `appearance="cards"`. Defaults to 2. */
23
+ columns?: number;
8
24
  radioClassName?: string;
9
25
  }
10
- /** A set of options where one can be picked, all visible at once. */
11
- export declare function RadioGroup({ options, value, onChange, label, description, errors, orientation, isRequired, className, labelClassName, descriptionClassName, errorsClassName, radioClassName, ...props }: RadioGroupProps): import("react").JSX.Element;
26
+ /**
27
+ * A set of options where one can be picked, all visible at once, as a list of radios or as cards
28
+ * (`appearance="cards"`). Arrow keys move between options in both appearances.
29
+ */
30
+ export declare function RadioGroup({ options, value, onChange, label, description, errors, orientation, appearance, columns, isRequired, className, labelClassName, descriptionClassName, errorsClassName, radioClassName, ...props }: RadioGroupProps): import("react").JSX.Element;
12
31
  //# sourceMappingURL=RadioGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../src/radio-group/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,eAAe,IAAI,mBAAmB,EAE9C,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACH,KAAK,gBAAgB,EAKxB,MAAM,qBAAqB,C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