@persona/design-system 0.10.9 → 0.10.11

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 (451) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/{Action-CHWYwpYR.d.mts → Action-sLO73eKq.d.mts} +2 -2
  3. package/dist/Action.d.mts +1 -1
  4. package/dist/AdvancedFilterRuleRow.d.mts +2 -2
  5. package/dist/AdvancedFilterRulesPopover.d.mts +2 -2
  6. package/dist/ArrayValueControl.d.mts +1 -1
  7. package/dist/Attribute.d.mts +2 -2
  8. package/dist/{Badge-BCdsVKuj.mjs → Badge-DZq6ByIU.mjs} +2 -2
  9. package/dist/{Badge-BCdsVKuj.mjs.map → Badge-DZq6ByIU.mjs.map} +1 -1
  10. package/dist/BooleanValueControl.d.mts +1 -1
  11. package/dist/{Breadcrumbs-CMf3Uvow.mjs → Breadcrumbs-DpsNZWF9.mjs} +9 -9
  12. package/dist/Breadcrumbs-DpsNZWF9.mjs.map +1 -0
  13. package/dist/{Button-DjD8QxcY.d.mts → Button-C4a4BTjL.d.mts} +2 -2
  14. package/dist/Button.d.mts +1 -1
  15. package/dist/CalendarBase.d.mts +1 -1
  16. package/dist/{Card-DiUHtYg_.d.mts → Card-CPV4_mHk.d.mts} +4 -4
  17. package/dist/Card.d.mts +1 -1
  18. package/dist/Card2.d.mts +1 -1
  19. package/dist/CardGrouping.d.mts +1 -1
  20. package/dist/{CardV2-ACI5RIzF.mjs → CardV2-DCoDfEvr.mjs} +26 -13
  21. package/dist/CardV2-DCoDfEvr.mjs.map +1 -0
  22. package/dist/ChartFrame.d.mts +61 -0
  23. package/dist/ChartLegend.d.mts +60 -0
  24. package/dist/ChartPopover.d.mts +155 -0
  25. package/dist/{Checkbox-Dr4LMKHV.mjs → Checkbox-C3z7UUSC.mjs} +8 -8
  26. package/dist/Checkbox-C3z7UUSC.mjs.map +1 -0
  27. package/dist/{CheckboxGroupField-DnVqlpwi.d.mts → CheckboxGroupField-BT87OVOF.d.mts} +2 -2
  28. package/dist/CheckboxGroupField.d.mts +1 -1
  29. package/dist/ChoicesValueControl.d.mts +1 -1
  30. package/dist/{Combobox-Gb_j1dg6.mjs → Combobox-BkK_tosd.mjs} +300 -116
  31. package/dist/Combobox-BkK_tosd.mjs.map +1 -0
  32. package/dist/Combobox-aOJDTjzC.d.mts +12 -0
  33. package/dist/Combobox.d.mts +3 -3
  34. package/dist/{ComboboxBase-Mb8HyeAI.d.mts → ComboboxBase-Brgv5nxk.d.mts} +65 -25
  35. package/dist/ComboboxBase.d.mts +2 -2
  36. package/dist/{ComboboxMultiSelect-C87lkXr7.d.mts → ComboboxMultiSelect-DJyAv0Eg.d.mts} +10 -6
  37. package/dist/ComboboxMultiSelect.d.mts +2 -2
  38. package/dist/{ComboboxSingleSelect-CIYakRW5.d.mts → ComboboxSingleSelect-CP8-HLKl.d.mts} +8 -6
  39. package/dist/ComboboxSingleSelect.d.mts +2 -2
  40. package/dist/{CompactBar-BLZZWtIE.d.mts → CompactBar-B0LhjrYV.d.mts} +2 -2
  41. package/dist/CompactBar.d.mts +1 -1
  42. package/dist/{ConfigFormGroup-BCTWCws5.mjs → ConfigFormGroup-DAUqAhJW.mjs} +2 -2
  43. package/dist/{ConfigFormGroup-BCTWCws5.mjs.map → ConfigFormGroup-DAUqAhJW.mjs.map} +1 -1
  44. package/dist/{DataTable-Bf1WDY0z.d.mts → DataTable-CSl5Jn3E.d.mts} +18 -8
  45. package/dist/{DataTable-CIZJ1vO8.mjs → DataTable-DiwzhNMt.mjs} +41 -28
  46. package/dist/DataTable-DiwzhNMt.mjs.map +1 -0
  47. package/dist/DataTable.d.mts +1 -1
  48. package/dist/{DatePicker-C9redLBr.mjs → DatePicker-BK7ioKBm.mjs} +410 -410
  49. package/dist/DatePicker-BK7ioKBm.mjs.map +1 -0
  50. package/dist/DateRangeValueControl.d.mts +1 -1
  51. package/dist/DateValueControl.d.mts +1 -1
  52. package/dist/{DropdownButton-DpLG-cIj.mjs → DropdownButton-Dp-MZ5tA.mjs} +3 -3
  53. package/dist/{DropdownButton-DpLG-cIj.mjs.map → DropdownButton-Dp-MZ5tA.mjs.map} +1 -1
  54. package/dist/DropdownButton.d.mts +2 -2
  55. package/dist/{DropdownMenu-DVxXQDRC.d.mts → DropdownMenu-BnHPeHOm.d.mts} +3 -3
  56. package/dist/{DropdownMenu-c8XK2Lr4.mjs → DropdownMenu-jJSHQaih.mjs} +4 -2
  57. package/dist/DropdownMenu-jJSHQaih.mjs.map +1 -0
  58. package/dist/DropdownMenu.d.mts +1 -1
  59. package/dist/{FieldRegistry-C2NVPhMO.d.mts → FieldRegistry-CJwGpUVK.d.mts} +2 -2
  60. package/dist/FieldRegistry.d.mts +1 -1
  61. package/dist/{FilterBar-BE_gBM0H.d.mts → FilterBar-DDyk14sx.d.mts} +4 -4
  62. package/dist/FilterBar.d.mts +1 -1
  63. package/dist/FilterPickerMenu.d.mts +2 -2
  64. package/dist/FilterPill.d.mts +1 -1
  65. package/dist/FilterPopover.d.mts +1 -1
  66. package/dist/FloatValueControl.d.mts +3 -2
  67. package/dist/{FloatingToolbar-DLRaE0o7.mjs → FloatingToolbar-rfKurDs8.mjs} +36 -39
  68. package/dist/FloatingToolbar-rfKurDs8.mjs.map +1 -0
  69. package/dist/{FormControl-BztNXLn6.mjs → FormControl--pbTH3bY.mjs} +3 -3
  70. package/dist/{FormControl-BztNXLn6.mjs.map → FormControl--pbTH3bY.mjs.map} +1 -1
  71. package/dist/{FormControl-BQe3GRhi.d.mts → FormControl-DPYbLcBK.d.mts} +2 -2
  72. package/dist/FormControl.d.mts +1 -1
  73. package/dist/FormControlLabel.d.mts +2 -2
  74. package/dist/{FormField-BW5uMzId.d.mts → FormField-CYNGm2bJ.d.mts} +2 -2
  75. package/dist/{FormField-Cf1VMvoa.mjs → FormField-DMxjftFw.mjs} +14 -14
  76. package/dist/{FormField-Cf1VMvoa.mjs.map → FormField-DMxjftFw.mjs.map} +1 -1
  77. package/dist/FormField.d.mts +1 -1
  78. package/dist/{Grid-CYpOqTUu.mjs → Grid-DVC0SSEZ.mjs} +2 -2
  79. package/dist/{Grid-CYpOqTUu.mjs.map → Grid-DVC0SSEZ.mjs.map} +1 -1
  80. package/dist/{Header-CV0Lcf0C.d.mts → Header-DaaUprCL.d.mts} +2 -2
  81. package/dist/Header.d.mts +1 -1
  82. package/dist/{HelperTooltip-BNM3pTM-.d.mts → HelperTooltip-C5BDdJSI.d.mts} +2 -2
  83. package/dist/HelperTooltip.d.mts +1 -1
  84. package/dist/HighlightedText.d.mts +1 -1
  85. package/dist/{HoverCopyableField-XHC_n9tp.mjs → HoverCopyableField-B2-xlwUt.mjs} +12 -7
  86. package/dist/HoverCopyableField-B2-xlwUt.mjs.map +1 -0
  87. package/dist/{IconButton-C_ReZm8v.d.mts → IconButton-7k-wjvH3.d.mts} +2 -2
  88. package/dist/{IconButton-DxHB2g80.mjs → IconButton-kSjnfhWt.mjs} +11 -10
  89. package/dist/IconButton-kSjnfhWt.mjs.map +1 -0
  90. package/dist/IconButton.d.mts +1 -1
  91. package/dist/ImageTile.d.mts +1 -1
  92. package/dist/IndexTableLayout.d.mts +4 -4
  93. package/dist/InlineCombobox.d.mts +1 -1
  94. package/dist/InlineInput.d.mts +1 -1
  95. package/dist/{Input-DH-5dKor.d.mts → Input-CwvrBsiS.d.mts} +3 -3
  96. package/dist/{Input-RHXujO9u.mjs → Input-TRmTBEav.mjs} +5 -5
  97. package/dist/{Input-RHXujO9u.mjs.map → Input-TRmTBEav.mjs.map} +1 -1
  98. package/dist/Input.d.mts +1 -1
  99. package/dist/IntegerValueControl.d.mts +3 -2
  100. package/dist/{Link-D_kCyLYX.mjs → Link-XvzUN8sY.mjs} +6 -6
  101. package/dist/Link-XvzUN8sY.mjs.map +1 -0
  102. package/dist/{ListBox-DxOACf6N.d.mts → ListBox-BePQBYR7.d.mts} +3 -3
  103. package/dist/{ListBox-BZp6exb8.mjs → ListBox-DahM1PgU.mjs} +12 -12
  104. package/dist/{ListBox-BZp6exb8.mjs.map → ListBox-DahM1PgU.mjs.map} +1 -1
  105. package/dist/ListBox.d.mts +1 -1
  106. package/dist/{ListBoxField-CgnDuhUw.d.mts → ListBoxField-lj7JN1BX.d.mts} +4 -4
  107. package/dist/ListBoxField.d.mts +1 -1
  108. package/dist/{LoadingShimmer-oPIv2ESr.mjs → LoadingShimmer-CpfKTSUs.mjs} +4 -3
  109. package/dist/LoadingShimmer-CpfKTSUs.mjs.map +1 -0
  110. package/dist/LoadingShimmer.d.mts +1 -1
  111. package/dist/{LogicRow-Dv_1G1TC.d.mts → LogicRow-Do7t7Suf.d.mts} +2 -2
  112. package/dist/LogicRow.d.mts +1 -1
  113. package/dist/MaskedInput.d.mts +2 -2
  114. package/dist/MatchHighlight.d.mts +1 -1
  115. package/dist/{Menu-BVn1jh46.mjs → Menu-BvMzSH2I.mjs} +5 -5
  116. package/dist/{Menu-BVn1jh46.mjs.map → Menu-BvMzSH2I.mjs.map} +1 -1
  117. package/dist/{Menu-BfjvH8mr.d.mts → Menu-Ca5ftvo6.d.mts} +4 -4
  118. package/dist/Menu.d.mts +1 -1
  119. package/dist/{MiddleTruncatedText-DicQsLDG.mjs → MiddleTruncatedText--jzGTD00.mjs} +2 -2
  120. package/dist/{MiddleTruncatedText-DicQsLDG.mjs.map → MiddleTruncatedText--jzGTD00.mjs.map} +1 -1
  121. package/dist/{Modal-De5_bPJ_.mjs → Modal-B6X5AgWj.mjs} +54 -25
  122. package/dist/{Modal-De5_bPJ_.mjs.map → Modal-B6X5AgWj.mjs.map} +1 -1
  123. package/dist/{Modal-CujB7DuB.d.mts → Modal-BPfFyzkw.d.mts} +3 -3
  124. package/dist/Modal.d.mts +1 -1
  125. package/dist/{PageHeader-UPiqJpIF.d.mts → PageHeader-BeBmYmUX.d.mts} +2 -2
  126. package/dist/{PageHeader-7_Hf6rHl.mjs → PageHeader-bhQTjuZF.mjs} +2 -2
  127. package/dist/{PageHeader-7_Hf6rHl.mjs.map → PageHeader-bhQTjuZF.mjs.map} +1 -1
  128. package/dist/PageHeader.d.mts +1 -1
  129. package/dist/{PageLayout-BdVM37bV.d.mts → PageLayout-BXM_pyrU.d.mts} +2 -2
  130. package/dist/{PageLayout-DjtGrvJa.mjs → PageLayout-DgEGcZgB.mjs} +3 -3
  131. package/dist/{PageLayout-DjtGrvJa.mjs.map → PageLayout-DgEGcZgB.mjs.map} +1 -1
  132. package/dist/PageLayout.d.mts +1 -1
  133. package/dist/{PageSelector-B5CcAzss.d.mts → PageSelector-C14ABZVL.d.mts} +2 -2
  134. package/dist/PageSelector.d.mts +1 -1
  135. package/dist/{Pagination-DMH2IaV0.mjs → Pagination-DE8wT55m.mjs} +5 -5
  136. package/dist/{Pagination-DMH2IaV0.mjs.map → Pagination-DE8wT55m.mjs.map} +1 -1
  137. package/dist/{Pii-24D_nSRQ.mjs → Pii-C42ZY88Y.mjs} +2 -2
  138. package/dist/{Pii-24D_nSRQ.mjs.map → Pii-C42ZY88Y.mjs.map} +1 -1
  139. package/dist/{PillShell-B7Bm-dsE.d.mts → PillShell-Bkyu5FXB.d.mts} +2 -2
  140. package/dist/PillShell.d.mts +1 -1
  141. package/dist/{Popover-DordjYNM.mjs → Popover-DuFjaSoq.mjs} +4 -2
  142. package/dist/Popover-DuFjaSoq.mjs.map +1 -0
  143. package/dist/Popover.d.mts +1 -1
  144. package/dist/ProgressBar.d.mts +1 -1
  145. package/dist/{ProgressIndicator-zt3ndT9U.mjs → ProgressIndicator-hy1P-RG1.mjs} +3 -3
  146. package/dist/{ProgressIndicator-zt3ndT9U.mjs.map → ProgressIndicator-hy1P-RG1.mjs.map} +1 -1
  147. package/dist/{Radio-BlEtetrr.mjs → Radio-B4TBAho6.mjs} +5 -5
  148. package/dist/Radio-B4TBAho6.mjs.map +1 -0
  149. package/dist/{RadioGroup-CMrXmmn4.mjs → RadioGroup-Bf24GKOb.mjs} +3 -3
  150. package/dist/{RadioGroup-CMrXmmn4.mjs.map → RadioGroup-Bf24GKOb.mjs.map} +1 -1
  151. package/dist/RichTextEditor.d.mts +1 -1
  152. package/dist/RuleEditorFields.d.mts +2 -2
  153. package/dist/RulesPill.d.mts +1 -1
  154. package/dist/SectionHeading.d.mts +1 -1
  155. package/dist/{SegmentedControl-D_DA-MU1.mjs → SegmentedControl-BpR7sUWO.mjs} +6 -3
  156. package/dist/SegmentedControl-BpR7sUWO.mjs.map +1 -0
  157. package/dist/{Select-CaG6OQi1.d.mts → Select-DYdn73Nh.d.mts} +2 -2
  158. package/dist/{Select-DOlw_LPR.mjs → Select-RdTT2KoH.mjs} +10 -8
  159. package/dist/Select-RdTT2KoH.mjs.map +1 -0
  160. package/dist/Select.d.mts +1 -1
  161. package/dist/SmartTextInput.d.mts +1 -1
  162. package/dist/SmartTextInputField.d.mts +2 -2
  163. package/dist/SmartTextInputFunctionDialog.d.mts +1 -1
  164. package/dist/SmartTextInputPopover.d.mts +1 -1
  165. package/dist/{Spinner-CXb-KUs1.mjs → Spinner-vcApnJzv.mjs} +2 -2
  166. package/dist/{Spinner-CXb-KUs1.mjs.map → Spinner-vcApnJzv.mjs.map} +1 -1
  167. package/dist/{Stack-CODxfzhl.d.mts → Stack-B6MrjJeW.d.mts} +2 -2
  168. package/dist/Stack.d.mts +1 -1
  169. package/dist/{StatusIndicator-CzRaEFSz.mjs → StatusIndicator-lwt35J6B.mjs} +3 -3
  170. package/dist/{StatusIndicator-CzRaEFSz.mjs.map → StatusIndicator-lwt35J6B.mjs.map} +1 -1
  171. package/dist/{Sticker-CLvRB8V5.d.mts → Sticker-C7Wv3Obx.d.mts} +4 -4
  172. package/dist/{Sticker-C1_6I08u.mjs → Sticker-jfOM4Yi6.mjs} +5 -5
  173. package/dist/{Sticker-C1_6I08u.mjs.map → Sticker-jfOM4Yi6.mjs.map} +1 -1
  174. package/dist/Sticker.d.mts +1 -1
  175. package/dist/StringValueControl.d.mts +2 -1
  176. package/dist/Tab.d.mts +2 -2
  177. package/dist/{TabBar-BCFO38E0.mjs → TabBar-DwHgbIQ6.mjs} +8 -8
  178. package/dist/TabBar-DwHgbIQ6.mjs.map +1 -0
  179. package/dist/{Table-DPi4Dt5H.mjs → Table-SMJAWqoe.mjs} +21 -13
  180. package/dist/Table-SMJAWqoe.mjs.map +1 -0
  181. package/dist/{TableBox-DNQsgQ8x.mjs → TableBox-DS8mpN3-.mjs} +21 -17
  182. package/dist/TableBox-DS8mpN3-.mjs.map +1 -0
  183. package/dist/TableBox.d.mts +1 -1
  184. package/dist/{TableBoxCell-B9KMWebc.d.mts → TableBoxCell-Bo5xYEmR.d.mts} +6 -6
  185. package/dist/TableBoxCell.d.mts +1 -1
  186. package/dist/{TableBoxField-0uIGzBhF.d.mts → TableBoxField-CdgjSGLK.d.mts} +5 -5
  187. package/dist/TableBoxField.d.mts +1 -1
  188. package/dist/{TableBoxRow-PjBBDcEk.d.mts → TableBoxRow-DuWS2iRC.d.mts} +2 -2
  189. package/dist/TableBoxRow.d.mts +1 -1
  190. package/dist/{TableBoxRowActions-B7stm6Q3.d.mts → TableBoxRowActions-zW74DkXt.d.mts} +2 -2
  191. package/dist/TableBoxRowActions.d.mts +1 -1
  192. package/dist/{TableCell-CQsF7t4e.d.mts → TableCell-uv_jqT5e.d.mts} +2 -2
  193. package/dist/TableCell.d.mts +1 -1
  194. package/dist/{TableControls-ODHrCDJM.d.mts → TableControls-9vz-HfDu.d.mts} +4 -4
  195. package/dist/{TableControls-BrP_BqnF.mjs → TableControls-CX7BvgD2.mjs} +107 -43
  196. package/dist/TableControls-CX7BvgD2.mjs.map +1 -0
  197. package/dist/TableControls.d.mts +1 -1
  198. package/dist/{TableControlsContext-CHuLxfa7.d.mts → TableControlsContext-D0Hn3rwL.d.mts} +2 -2
  199. package/dist/TableControlsContext.d.mts +1 -1
  200. package/dist/{TableViewConfigurationDropdown-BWBBUXCs.d.mts → TableViewConfigurationDropdown-CZcLH8uR.d.mts} +2 -2
  201. package/dist/TableViewConfigurationDropdown.d.mts +1 -1
  202. package/dist/{TechnicalSticker-Cq5jzYKQ.mjs → TechnicalSticker-DrN45Vut.mjs} +9 -7
  203. package/dist/TechnicalSticker-DrN45Vut.mjs.map +1 -0
  204. package/dist/{Text-CvaqognH.d.mts → Text-CdHeSHCc.d.mts} +2 -2
  205. package/dist/Text.d.mts +1 -1
  206. package/dist/{TextArea-Dro-HH8O.mjs → TextArea-CQ1YNi2b.mjs} +4 -5
  207. package/dist/TextArea-CQ1YNi2b.mjs.map +1 -0
  208. package/dist/{TextUnderlineTooltip-Bd5e8KH3.d.mts → TextUnderlineTooltip-By1VVsSs.d.mts} +3 -3
  209. package/dist/TextUnderlineTooltip.d.mts +1 -1
  210. package/dist/Tile.d.mts +1 -1
  211. package/dist/{Toggle-D9MzTIZs.mjs → Toggle-DjmkjJlw.mjs} +13 -9
  212. package/dist/Toggle-DjmkjJlw.mjs.map +1 -0
  213. package/dist/{Tooltip-YViXzMdm.mjs → Tooltip-C2VB8I6y.mjs} +18 -5
  214. package/dist/Tooltip-C2VB8I6y.mjs.map +1 -0
  215. package/dist/{Tooltip-Ddy2Jq0K.d.mts → Tooltip-OxVvOfn8.d.mts} +3 -3
  216. package/dist/Tooltip.d.mts +1 -1
  217. package/dist/{TruncatedText-sr9Fhm3N.d.mts → TruncatedText-Dqj94BFK.d.mts} +2 -2
  218. package/dist/WizardModal.d.mts +1 -1
  219. package/dist/chartColors.d.mts +92 -0
  220. package/dist/chartFrameLayout.d.mts +46 -0
  221. package/dist/{clientFilterUtils-scLlIuP_.d.mts → clientFilterUtils-CMLuN8kK.d.mts} +2 -2
  222. package/dist/clientFilterUtils.d.mts +1 -1
  223. package/dist/components/Accordion/index.mjs +25 -16
  224. package/dist/components/Accordion/index.mjs.map +1 -1
  225. package/dist/components/Attribute/index.mjs +8 -6
  226. package/dist/components/Attribute/index.mjs.map +1 -1
  227. package/dist/components/Badge/index.mjs +1 -1
  228. package/dist/components/Banner/index.mjs +3 -3
  229. package/dist/components/BottomPanel/index.mjs +10 -8
  230. package/dist/components/BottomPanel/index.mjs.map +1 -1
  231. package/dist/components/Breadcrumbs/index.mjs +1 -1
  232. package/dist/components/Button/index.d.mts +2 -2
  233. package/dist/components/Button/index.mjs +1 -1
  234. package/dist/components/ButtonGroup/index.mjs +2 -2
  235. package/dist/components/Card/index.d.mts +2 -2
  236. package/dist/components/CardV2/index.d.mts +1 -1
  237. package/dist/components/CardV2/index.mjs +1 -1
  238. package/dist/components/Chart/index.d.mts +9 -0
  239. package/dist/components/Chart/index.mjs +680 -0
  240. package/dist/components/Chart/index.mjs.map +1 -0
  241. package/dist/components/Checkbox/index.mjs +1 -1
  242. package/dist/components/CodeHighlight/index.mjs +4 -4
  243. package/dist/components/Combobox/index.d.mts +5 -3
  244. package/dist/components/Combobox/index.mjs +1 -1
  245. package/dist/components/ConfigFormGroup/index.mjs +1 -1
  246. package/dist/components/DataTable/TableControls/index.d.mts +20 -20
  247. package/dist/components/DataTable/TableControls/index.mjs +2 -2
  248. package/dist/components/DataTable/index.d.mts +5 -5
  249. package/dist/components/DataTable/index.mjs +1 -1
  250. package/dist/components/DataTable/types.d.mts +1 -1
  251. package/dist/components/DatePicker/index.mjs +1 -1
  252. package/dist/components/DropdownButton/index.mjs +1 -1
  253. package/dist/components/DropdownMenu/index.d.mts +1 -1
  254. package/dist/components/DropdownMenu/index.mjs +1 -1
  255. package/dist/components/FloatingPanel/index.mjs +20 -18
  256. package/dist/components/FloatingPanel/index.mjs.map +1 -1
  257. package/dist/components/FloatingToolbar/index.mjs +1 -1
  258. package/dist/components/FormControl/index.d.mts +1 -1
  259. package/dist/components/FormControl/index.mjs +1 -1
  260. package/dist/components/FormField/index.d.mts +5 -5
  261. package/dist/components/FormField/index.mjs +1 -1
  262. package/dist/components/Grid/index.mjs +1 -1
  263. package/dist/components/HoverCopyableField/index.mjs +1 -1
  264. package/dist/components/ImageTile/index.mjs +10 -10
  265. package/dist/components/ImageTile/index.mjs.map +1 -1
  266. package/dist/components/Input/index.d.mts +1 -1
  267. package/dist/components/Input/index.mjs +1 -1
  268. package/dist/components/Link/index.mjs +1 -1
  269. package/dist/components/ListBox/index.d.mts +3 -3
  270. package/dist/components/ListBox/index.mjs +1 -1
  271. package/dist/components/LoadingShimmer/index.mjs +1 -1
  272. package/dist/components/MaskedInput/index.mjs +1 -1
  273. package/dist/components/Menu/index.d.mts +1 -1
  274. package/dist/components/Menu/index.mjs +1 -1
  275. package/dist/components/Modal/index.d.mts +1 -1
  276. package/dist/components/Modal/index.mjs +1 -1
  277. package/dist/components/PageHeader/index.d.mts +1 -1
  278. package/dist/components/PageHeader/index.mjs +1 -1
  279. package/dist/components/Pagination/index.d.mts +1 -1
  280. package/dist/components/Pagination/index.mjs +1 -1
  281. package/dist/components/Pii/index.mjs +1 -1
  282. package/dist/components/Popover/index.mjs +1 -1
  283. package/dist/components/ProgressBar/index.mjs +20 -3
  284. package/dist/components/ProgressBar/index.mjs.map +1 -1
  285. package/dist/components/ProgressIndicator/index.mjs +1 -1
  286. package/dist/components/Radio/index.mjs +1 -1
  287. package/dist/components/RadioGroup/index.mjs +1 -1
  288. package/dist/components/RichTextEditor/index.mjs +9 -9
  289. package/dist/components/RightPanel/index.mjs +30 -15
  290. package/dist/components/RightPanel/index.mjs.map +1 -1
  291. package/dist/components/SegmentedControl/index.mjs +1 -1
  292. package/dist/components/Select/index.d.mts +1 -1
  293. package/dist/components/Select/index.mjs +1 -1
  294. package/dist/components/SelectionCard/index.mjs +5 -5
  295. package/dist/components/Slider/index.mjs +5 -4
  296. package/dist/components/Slider/index.mjs.map +1 -1
  297. package/dist/components/SmartTextInput/index.mjs +11 -18
  298. package/dist/components/SmartTextInput/index.mjs.map +1 -1
  299. package/dist/components/Spinner/index.mjs +1 -1
  300. package/dist/components/Stack/index.d.mts +1 -1
  301. package/dist/components/StatusIndicator/index.mjs +1 -1
  302. package/dist/components/Sticker/index.d.mts +1 -1
  303. package/dist/components/Sticker/index.mjs +1 -1
  304. package/dist/components/SwatchPicker/index.mjs +2 -1
  305. package/dist/components/SwatchPicker/index.mjs.map +1 -1
  306. package/dist/components/TabBar/index.mjs +1 -1
  307. package/dist/components/Table/index.d.mts +1 -1
  308. package/dist/components/Table/index.mjs +1 -1
  309. package/dist/components/TableBox/index.d.mts +1 -1
  310. package/dist/components/TableBox/index.mjs +1 -1
  311. package/dist/components/TechnicalSticker/index.mjs +1 -1
  312. package/dist/components/Text/index.d.mts +1 -1
  313. package/dist/components/TextArea/index.mjs +1 -1
  314. package/dist/components/Tile/index.mjs +2 -2
  315. package/dist/components/Toast/index.mjs +19 -13
  316. package/dist/components/Toast/index.mjs.map +1 -1
  317. package/dist/components/Toggle/index.mjs +1 -1
  318. package/dist/components/Tooltip/index.d.mts +3 -3
  319. package/dist/components/Tooltip/index.mjs +1 -1
  320. package/dist/components/VersionHistory/index.mjs +8 -8
  321. package/dist/compound-expression.d.mts +1 -1
  322. package/dist/{date-range-rule-value-ASr06ClE.d.mts → date-range-rule-value-DyLlMtjr.d.mts} +2 -2
  323. package/dist/date-range-rule-value.d.mts +1 -1
  324. package/dist/display.d.mts +1 -1
  325. package/dist/duration-token.d.mts +11 -0
  326. package/dist/exit-motion.d.mts +7 -0
  327. package/dist/fieldPickerOptions.d.mts +2 -2
  328. package/dist/{filter-size-context-CmFyIPCm.d.mts → filter-size-context-DVnjmuhk.d.mts} +2 -2
  329. package/dist/filter-size-context.d.mts +1 -1
  330. package/dist/{filters-yfzOlqKx.d.mts → filters-By_TYKAZ.d.mts} +3 -3
  331. package/dist/filters.d.mts +1 -1
  332. package/dist/{helpers-BeCjgAeE.d.mts → helpers-BIHsqdyX.d.mts} +2 -2
  333. package/dist/helpers.d.mts +1 -1
  334. package/dist/{index-kIon1vPp.d.mts → index-BozzRwby.d.mts} +2 -2
  335. package/dist/{index-BEHNqAZa.d.mts → index-CZJp4Af6.d.mts} +3 -3
  336. package/dist/index2.d.mts +1 -1
  337. package/dist/index4.d.mts +3 -3
  338. package/dist/index5.d.mts +1 -1
  339. package/dist/index6.d.mts +14 -14
  340. package/dist/{inputFields-BnCdmuBt.d.mts → inputFields-BqO2H-Kj.d.mts} +6 -6
  341. package/dist/inputFields.d.mts +1 -1
  342. package/dist/lib/MiddleTruncatedText.mjs +1 -1
  343. package/dist/lib/TruncatedText.d.mts +1 -1
  344. package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
  345. package/dist/lib/TruncatedTextWithTooltip.mjs +1 -1
  346. package/dist/lib/colorMode.d.mts +1 -1
  347. package/dist/lib/schemaOptions.mjs +9 -4
  348. package/dist/lib/schemaOptions.mjs.map +1 -1
  349. package/dist/lib/useChain.d.mts +1 -1
  350. package/dist/lib/useModalInsetRight.d.mts +4 -3
  351. package/dist/lib/useModalInsetRight.mjs +7 -5
  352. package/dist/lib/useModalInsetRight.mjs.map +1 -1
  353. package/dist/lint/THIRD_PARTY_NOTICES.md +30 -0
  354. package/dist/lint/index.mjs +696 -11
  355. package/dist/lint/index.mjs.map +1 -1
  356. package/dist/lint/recommended.json +7 -1
  357. package/dist/mixins/focus.mjs +1 -1
  358. package/dist/mixins/hoverable.mjs +2 -2
  359. package/dist/mixins/hoverable.mjs.map +1 -1
  360. package/dist/mixins/input.mjs +3 -2
  361. package/dist/mixins/input.mjs.map +1 -1
  362. package/dist/mixins/menuItem.mjs +2 -0
  363. package/dist/mixins/menuItem.mjs.map +1 -1
  364. package/dist/mixins/motion.d.mts +24 -0
  365. package/dist/mixins/motion.mjs +44 -0
  366. package/dist/mixins/motion.mjs.map +1 -0
  367. package/dist/motion-origin.d.mts +7 -0
  368. package/dist/motion.d.mts +63 -0
  369. package/dist/no-layout-motion.d.mts +7 -0
  370. package/dist/no-transition-all.d.mts +7 -0
  371. package/dist/{operators-BHxKZcpD.d.mts → operators-B8_k3r69.d.mts} +10 -3
  372. package/dist/operators.d.mts +2 -2
  373. package/dist/overlay-motion.d.mts +7 -0
  374. package/dist/patterns/CardGrouping/index.mjs +9 -9
  375. package/dist/patterns/CardGrouping/index.mjs.map +1 -1
  376. package/dist/patterns/IndexTableLayout/index.mjs +3 -3
  377. package/dist/patterns/LayoutLoadingShimmer/index.mjs +4 -4
  378. package/dist/patterns/LayoutLoadingSpinner/index.mjs +3 -1
  379. package/dist/patterns/LayoutLoadingSpinner/index.mjs.map +1 -1
  380. package/dist/patterns/PageLayout/index.d.mts +1 -1
  381. package/dist/patterns/PageLayout/index.mjs +1 -1
  382. package/dist/patterns/WizardModal/index.mjs +4 -4
  383. package/dist/relative-date-label.d.mts +1 -1
  384. package/dist/tone.d.mts +1 -1
  385. package/dist/{types-DLnCkvTt.d.mts → types-BJqmRXFV.d.mts} +15 -1
  386. package/dist/{types-CqcbWyUY.d.mts → types-BOsCi-kZ.d.mts} +8 -2
  387. package/dist/{types-BXJ6qAGy.d.mts → types-C_CncajO.d.mts} +2 -2
  388. package/dist/{types-BeFBvQ1c.d.mts → types-D5txFacG.d.mts} +3 -3
  389. package/dist/types4.d.mts +1 -1
  390. package/dist/types5.d.mts +1 -1
  391. package/dist/types6.d.mts +1 -1
  392. package/dist/{url-state-CXUuK3_r.d.mts → url-state-CXPmXzIZ.d.mts} +2 -2
  393. package/dist/url-state.d.mts +1 -1
  394. package/dist/{useChain-B--KAtdN.d.mts → useChain-x9fd9Fyq.d.mts} +2 -2
  395. package/dist/useChainAtCursor.d.mts +1 -1
  396. package/dist/useChartColors.d.mts +30 -0
  397. package/dist/useChartSeriesVisibility.d.mts +22 -0
  398. package/dist/useChartStyles.d.mts +108 -0
  399. package/dist/useColumnConfiguration.d.mts +2 -2
  400. package/dist/useComboboxFooterAction.d.mts +1 -1
  401. package/dist/{useFilterStateV2-DBpbxAEC.d.mts → useFilterStateV2-DiTS9DTg.d.mts} +3 -3
  402. package/dist/useFilterStateV2.d.mts +1 -1
  403. package/dist/{useTableColumns-DJFy0Gp8.d.mts → useTableColumns-BEKJNrb1.d.mts} +2 -2
  404. package/dist/useTableColumns.d.mts +1 -1
  405. package/dist/useTruncation.d.mts +1 -1
  406. package/dist/useValueControlError.d.mts +26 -0
  407. package/dist/utils.d.mts +1 -1
  408. package/dist/{validation-Tgg3AhuP.d.mts → validation-BDQdQ1cY.d.mts} +3 -3
  409. package/dist/validation.d.mts +1 -1
  410. package/dist/{value-control-resolver-XQbGCdsP.d.mts → value-control-resolver-BFJZEWDn.d.mts} +9 -3
  411. package/dist/value-control-resolver.d.mts +1 -1
  412. package/dist/variables/charting.mjs +1 -1
  413. package/dist/variables/charting.mjs.map +1 -1
  414. package/dist/variables/keyframes.d.mts +2 -1
  415. package/dist/variables/keyframes.mjs +9 -1
  416. package/dist/variables/keyframes.mjs.map +1 -1
  417. package/dist/variables/transitions.d.mts +31 -1
  418. package/dist/variables/transitions.mjs +50 -1
  419. package/dist/variables/transitions.mjs.map +1 -1
  420. package/llms.txt +3 -2
  421. package/package.json +14 -4
  422. package/skills/new-screen/SKILL.md +33 -0
  423. package/skills/ui-authoring/COMPONENTS.md +19 -1
  424. package/skills/ui-authoring/PATTERNS.md +57 -33
  425. package/skills/ui-authoring/STANDARD.md +68 -4
  426. package/skills/ui-authoring/TOKENS.md +27 -24
  427. package/dist/Breadcrumbs-CMf3Uvow.mjs.map +0 -1
  428. package/dist/CardV2-ACI5RIzF.mjs.map +0 -1
  429. package/dist/Checkbox-Dr4LMKHV.mjs.map +0 -1
  430. package/dist/Combobox-Gb_j1dg6.mjs.map +0 -1
  431. package/dist/Combobox-fYZjpn5-.d.mts +0 -11
  432. package/dist/DataTable-CIZJ1vO8.mjs.map +0 -1
  433. package/dist/DatePicker-C9redLBr.mjs.map +0 -1
  434. package/dist/DropdownMenu-c8XK2Lr4.mjs.map +0 -1
  435. package/dist/FloatingToolbar-DLRaE0o7.mjs.map +0 -1
  436. package/dist/HoverCopyableField-XHC_n9tp.mjs.map +0 -1
  437. package/dist/IconButton-DxHB2g80.mjs.map +0 -1
  438. package/dist/Link-D_kCyLYX.mjs.map +0 -1
  439. package/dist/LoadingShimmer-oPIv2ESr.mjs.map +0 -1
  440. package/dist/Popover-DordjYNM.mjs.map +0 -1
  441. package/dist/Radio-BlEtetrr.mjs.map +0 -1
  442. package/dist/SegmentedControl-D_DA-MU1.mjs.map +0 -1
  443. package/dist/Select-DOlw_LPR.mjs.map +0 -1
  444. package/dist/TabBar-BCFO38E0.mjs.map +0 -1
  445. package/dist/Table-DPi4Dt5H.mjs.map +0 -1
  446. package/dist/TableBox-DNQsgQ8x.mjs.map +0 -1
  447. package/dist/TableControls-BrP_BqnF.mjs.map +0 -1
  448. package/dist/TechnicalSticker-Cq5jzYKQ.mjs.map +0 -1
  449. package/dist/TextArea-Dro-HH8O.mjs.map +0 -1
  450. package/dist/Toggle-D9MzTIZs.mjs.map +0 -1
  451. package/dist/Tooltip-YViXzMdm.mjs.map +0 -1
@@ -0,0 +1,680 @@
1
+ import { a as styled, o as useTheme, r as css } from "../../styledComponentsInterop-Cs5CCPRy.mjs";
2
+ import { chartingColors, semanticColor } from "../../lib/semanticColor.mjs";
3
+ import { focusOutline } from "../../mixins/focus.mjs";
4
+ import { Hairline } from "../../variables/effect.mjs";
5
+ import { paragraphMixins } from "../../mixins/text.mjs";
6
+ import { chartingDark } from "../../variables/charting.mjs";
7
+ import { c as usePDSLocale } from "../../i18n-DaOKaFc2.mjs";
8
+ import { i as Paragraph } from "../../Text-D0vEReED.mjs";
9
+ import { n as Stack } from "../../Stack-Bzom2BTR.mjs";
10
+ import { BorderRadius, Color, Spacing, Typography } from "@persona/design-tokens";
11
+ import { createContext, useCallback, useContext, useMemo, useState } from "react";
12
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
13
+ //#region src/components/Chart/chartColors.ts
14
+ /** @experimental */
15
+ const CHART_PALETTE_TOKENS = {
16
+ qualitative: "Qualitative",
17
+ sequentialMono: "SequentialMono",
18
+ sequentialDivergent: "SequentialDivergent"
19
+ };
20
+ /** @experimental */
21
+ const DEFAULT_CHART_PALETTE = "qualitative";
22
+ /**
23
+ * Marks a series colour override as a deliberate chart colour. It returns its argument unchanged;
24
+ * its job is to type-check the override (Persona tokens only, never hex) and to tell the
25
+ * `pds/semantic-color` lint rule that the `Color.*` inside is intended.
26
+ *
27
+ * ```ts
28
+ * { key: 'fraud', label: 'Fraud', color: chartColor(Color.CoreRed600) }
29
+ * { key: 'fraud', label: 'Fraud', color: chartColor({ light: Color.CoreRed600, dark: Color.CoreRed400 }) }
30
+ * ```
31
+ *
32
+ * @experimental
33
+ */
34
+ const chartColor = (color) => color;
35
+ /** The ordered colours of `palette` in `tokens`. @experimental */
36
+ const chartPaletteColors = (tokens, palette = DEFAULT_CHART_PALETTE) => tokens[CHART_PALETTE_TOKENS[palette]];
37
+ /** Resolves an override to the single token for `mode`. @experimental */
38
+ const resolveChartColor = (color, mode) => typeof color === "string" ? color : color[mode];
39
+ /** `'dark'` when `theme` carries the dark charting palettes, else `'light'`. @experimental */
40
+ const chartColorModeOf = (theme) => theme?.charting === chartingDark ? "dark" : "light";
41
+ const warnedPaletteOverflow = /* @__PURE__ */ new Set();
42
+ /**
43
+ * Assigns each series a colour token, keyed by series key.
44
+ *
45
+ * Series without an override take the palette colour at their own index, so a series keeps its
46
+ * colour when another is hidden or overridden. Past the end of the palette colours repeat and a
47
+ * development warning suggests grouping the extra series (e.g. into "Other"): never invent colours.
48
+ *
49
+ * @experimental
50
+ */
51
+ function resolveSeriesColors(series, { tokens = chartingColors(void 0), palette, mode = "light" } = {}) {
52
+ const colors = chartPaletteColors(tokens, palette);
53
+ const resolved = {};
54
+ series.forEach(({ key, color }, index) => {
55
+ resolved[key] = color ? resolveChartColor(color, mode) : colors[index % colors.length];
56
+ });
57
+ const overflowKey = `${palette ?? "qualitative"}:${series.length}`;
58
+ if (process.env.NODE_ENV !== "production" && series.length > colors.length && !warnedPaletteOverflow.has(overflowKey)) {
59
+ warnedPaletteOverflow.add(overflowKey);
60
+ console.warn(`[PDS charts] ${series.length} series exceed the ${colors.length}-colour ${palette ?? "qualitative"} palette, so colours repeat. Group the extra series (for example into "Other") instead of adding colours.`);
61
+ }
62
+ return resolved;
63
+ }
64
+ //#endregion
65
+ //#region src/components/Chart/useChartColors.ts
66
+ /**
67
+ * The chart colours for the current PDS colour mode. Reads the charting palettes `PDSProvider` /
68
+ * `ColorModeScope` install on the styled-components theme, so charts follow dark mode with no
69
+ * extra setup; without a PDS colour mode it returns the light `ChartingColors`.
70
+ *
71
+ * ```tsx
72
+ * const { resolve } = useChartColors();
73
+ * const colors = resolve([{ key: 'approved' }, { key: 'declined', color: chartColor(Color.CoreRed600) }]);
74
+ * <Bar dataKey='approved' fill={colors.approved} />
75
+ * ```
76
+ *
77
+ * @experimental
78
+ */
79
+ function useChartColors(palette = DEFAULT_CHART_PALETTE) {
80
+ const theme = useTheme();
81
+ const tokens = chartingColors(theme);
82
+ const mode = chartColorModeOf(theme);
83
+ const colors = chartPaletteColors(tokens, palette);
84
+ const resolve = useCallback((series) => resolveSeriesColors(series, {
85
+ tokens,
86
+ palette,
87
+ mode
88
+ }), [
89
+ tokens,
90
+ palette,
91
+ mode
92
+ ]);
93
+ return useMemo(() => ({
94
+ mode,
95
+ colors,
96
+ resolve
97
+ }), [
98
+ mode,
99
+ colors,
100
+ resolve
101
+ ]);
102
+ }
103
+ //#endregion
104
+ //#region src/components/Chart/chartFrameLayout.ts
105
+ /** @experimental */
106
+ const DEFAULT_CHART_LEGEND_POSITION = "stack";
107
+ /**
108
+ * Plot height in px when a `ChartFrame` is given none. The plot always fills the frame's width.
109
+ *
110
+ * @experimental
111
+ */
112
+ const CHART_DEFAULT_HEIGHT = 300;
113
+ /**
114
+ * Opacity of a de-emphasised series: a hidden series' legend swatch, and the series a pointer is
115
+ * not on (its popover row and its segment in the hovered bar).
116
+ *
117
+ * @experimental
118
+ */
119
+ const CHART_INACTIVE_OPACITY = .65;
120
+ /**
121
+ * Recharts margin for a plot inside a `ChartFrame`. The frame owns the spacing around the plot
122
+ * (`Spacing[3]` between legend and plot) and lets axis labels overflow the SVG, so the chart adds
123
+ * no margin of its own: `<BarChart margin={CHART_PLOT_MARGIN} ...>`.
124
+ *
125
+ * @experimental
126
+ */
127
+ const CHART_PLOT_MARGIN = {
128
+ top: 0,
129
+ right: 0,
130
+ bottom: 0,
131
+ left: 0
132
+ };
133
+ const ChartLegendPositionContext = createContext(void 0);
134
+ /** Provided by `ChartFrame` so its `ChartLegend` lays its items out to match. */
135
+ const ChartLegendPositionProvider = ChartLegendPositionContext.Provider;
136
+ /** The legend position of the enclosing `ChartFrame`, or `undefined` outside one. */
137
+ const useChartLegendPosition = () => useContext(ChartLegendPositionContext);
138
+ //#endregion
139
+ //#region src/components/Chart/ChartFrame.tsx
140
+ const Frame = styled.figure`
141
+ display: flex;
142
+ gap: ${({ $position }) => $position === "right" ? Spacing[3] : Spacing[4]};
143
+ box-sizing: border-box;
144
+ width: 100%;
145
+ margin: 0;
146
+ min-width: 0;
147
+ ${({ $position }) => $position === "right" ? css`
148
+ flex-direction: row-reverse;
149
+ align-items: flex-start;
150
+ ` : css`
151
+ flex-direction: column;
152
+ align-items: flex-start;
153
+ `}
154
+ `;
155
+ const INLINE_LEGEND_MAX_WIDTH = "200px";
156
+ const LegendSlot = styled.div`
157
+ min-width: 0;
158
+ ${({ $position }) => $position === "right" && css`
159
+ flex: 0 0 auto;
160
+ width: max-content; /* fits the longest label, on one line */
161
+ max-width: min(${INLINE_LEGEND_MAX_WIDTH}, 33%);
162
+ `}
163
+ `;
164
+ const Plot = styled.div`
165
+ align-self: stretch;
166
+ flex: 1 1 auto;
167
+ min-width: 0;
168
+ height: ${({ $height }) => $height}px;
169
+
170
+ /* Axis labels may overflow the plot box instead of needing a Recharts margin. */
171
+ .recharts-surface {
172
+ overflow: visible;
173
+ }
174
+ `;
175
+ /**
176
+ * Lays out a chart: its legend and the plot area, `Spacing[4]` apart stacked (`Spacing[3]` inline), with the legend left-aligned
177
+ * above the plot (`legendPosition='stack'`, the default) or inline on its right (`'right'`). The
178
+ * frame has no header, border or surface of its own: titles, descriptions and controls belong to
179
+ * the surrounding container (for example a `CardV2`), which also names the chart via
180
+ * `aria-labelledby`.
181
+ *
182
+ * Size: the chart fills 100% of its container's width, and the plot is 300px tall
183
+ * (`CHART_DEFAULT_HEIGHT`) unless `height` overrides it.
184
+ *
185
+ * @experimental Part of the in-progress PDS charting components; the API may change.
186
+ */
187
+ function ChartFrame({ legend, legendPosition = DEFAULT_CHART_LEGEND_POSITION, height = 300, children, className, ...label }) {
188
+ return /* @__PURE__ */ jsx(ChartLegendPositionProvider, {
189
+ value: legendPosition,
190
+ children: /* @__PURE__ */ jsxs(Frame, {
191
+ $position: legendPosition,
192
+ className,
193
+ "data-legend-position": legendPosition,
194
+ ...label,
195
+ children: [legend && /* @__PURE__ */ jsx(LegendSlot, {
196
+ $position: legendPosition,
197
+ children: legend
198
+ }), /* @__PURE__ */ jsx(Plot, {
199
+ $height: height,
200
+ children
201
+ })]
202
+ })
203
+ });
204
+ }
205
+ //#endregion
206
+ //#region src/components/Chart/ChartLegend.tsx
207
+ const SWATCH_SIZE = Spacing[3];
208
+ const List = styled(Stack)`
209
+ min-width: 0;
210
+ max-width: 100%;
211
+ margin: 0;
212
+ padding: 0;
213
+ list-style: none;
214
+ `;
215
+ const ListItem = styled.li`
216
+ display: flex;
217
+ min-width: 0;
218
+ max-width: 100%;
219
+ `;
220
+ const Label = styled(Paragraph)`
221
+ min-width: 0;
222
+ overflow: hidden;
223
+ text-overflow: ellipsis;
224
+ white-space: nowrap;
225
+ `;
226
+ const Swatch$1 = styled.span`
227
+ flex-shrink: 0;
228
+ width: ${SWATCH_SIZE};
229
+ height: ${SWATCH_SIZE};
230
+ border-radius: ${BorderRadius.Sm};
231
+ background: ${({ $color }) => $color};
232
+ opacity: ${({ $hidden }) => $hidden ? CHART_INACTIVE_OPACITY : 1};
233
+ `;
234
+ const ToggleButton = styled.button`
235
+ ${paragraphMixins.md};
236
+ display: flex;
237
+ align-items: center;
238
+ gap: ${Spacing[2]};
239
+ min-width: 0;
240
+ max-width: 100%;
241
+ margin: 0;
242
+ padding: 0;
243
+ border: 0;
244
+ border-radius: ${BorderRadius.Sm};
245
+ background: none;
246
+ color: inherit;
247
+ text-align: start;
248
+ cursor: pointer;
249
+ ${focusOutline}
250
+
251
+ /* Hover and pressed fill, as on a text Button. The same-colour spread ring paints the fill a
252
+ little past the item without changing the legend's layout. */
253
+ &:hover {
254
+ ${({ theme }) => {
255
+ const fill = semanticColor(theme, "ActionNeutralHover", Color.CoreSlate100);
256
+ return `background-color: ${fill}; box-shadow: 0 0 0 ${Spacing[1]} ${fill};`;
257
+ }}
258
+ }
259
+
260
+ &:active {
261
+ ${({ theme }) => {
262
+ const fill = semanticColor(theme, "ActionNeutralActive", Color.CoreSlate200);
263
+ return `background-color: ${fill}; box-shadow: 0 0 0 ${Spacing[1]} ${fill};`;
264
+ }}
265
+ }
266
+ `;
267
+ const StaticItem = styled.span`
268
+ ${paragraphMixins.md};
269
+ display: flex;
270
+ align-items: center;
271
+ gap: ${Spacing[2]};
272
+ min-width: 0;
273
+ max-width: 100%;
274
+ `;
275
+ const GroupTitle = styled.span`
276
+ ${paragraphMixins.smMono};
277
+ text-transform: uppercase;
278
+ color: ${({ theme }) => semanticColor(theme, "FgSecondary", Color.TextSecondary)};
279
+ `;
280
+ function LegendItems({ items, hidden, onToggle, "aria-label": ariaLabel, vertical, className }) {
281
+ return /* @__PURE__ */ jsx(List, {
282
+ as: "ul",
283
+ className,
284
+ "aria-label": ariaLabel,
285
+ direction: vertical ? "vertical" : "horizontal",
286
+ spacing: vertical ? Spacing[2] : Spacing[4],
287
+ wrap: vertical ? void 0 : "wrap",
288
+ align: vertical ? "flex-start" : "center",
289
+ children: items.map(({ key, label, color }) => {
290
+ const isHidden = hidden.includes(key);
291
+ const content = /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Swatch$1, {
292
+ $color: color,
293
+ $hidden: isHidden,
294
+ "aria-hidden": true
295
+ }), /* @__PURE__ */ jsx(Label, {
296
+ as: "span",
297
+ size: "md",
298
+ color: isHidden ? "tertiary" : "primary",
299
+ title: label,
300
+ children: label
301
+ })] });
302
+ return /* @__PURE__ */ jsx(ListItem, { children: onToggle ? /* @__PURE__ */ jsx(ToggleButton, {
303
+ type: "button",
304
+ "aria-pressed": !isHidden,
305
+ onClick: () => onToggle(key),
306
+ children: content
307
+ }) : /* @__PURE__ */ jsx(StaticItem, { children: content }) }, key);
308
+ })
309
+ });
310
+ }
311
+ /**
312
+ * The series key for a chart: a square colour swatch and a `TextMedium` label per series, laid out
313
+ * in a row that wraps (a column when it sits right of the plot in a `ChartFrame`). With `onToggle`,
314
+ * each item toggles its series; a hidden series keeps a filled swatch at 65% opacity and gets a
315
+ * muted label.
316
+ *
317
+ * Pass `groups` instead of `items` for a grouped legend: groups stack `Spacing[2]` apart, each with
318
+ * an uppercase mono title `Spacing[1]` above its row of items.
319
+ *
320
+ * @experimental Part of the in-progress PDS charting components; the API may change.
321
+ */
322
+ function ChartLegend({ items, groups, hidden = [], onToggle, "aria-label": ariaLabel = "Chart legend", className }) {
323
+ const vertical = useChartLegendPosition() === "right";
324
+ if (!groups) return /* @__PURE__ */ jsx(LegendItems, {
325
+ items,
326
+ hidden,
327
+ onToggle,
328
+ "aria-label": ariaLabel,
329
+ vertical,
330
+ className
331
+ });
332
+ return /* @__PURE__ */ jsx(Stack, {
333
+ role: "group",
334
+ "aria-label": ariaLabel,
335
+ className,
336
+ spacing: Spacing[2],
337
+ align: "flex-start",
338
+ children: groups.map((group) => /* @__PURE__ */ jsxs(Stack, {
339
+ spacing: Spacing[1],
340
+ align: "flex-start",
341
+ children: [/* @__PURE__ */ jsx(GroupTitle, {
342
+ "aria-hidden": true,
343
+ children: group.label
344
+ }), /* @__PURE__ */ jsx(LegendItems, {
345
+ items: group.items,
346
+ hidden,
347
+ onToggle,
348
+ "aria-label": group.label,
349
+ vertical
350
+ })]
351
+ }, group.key))
352
+ });
353
+ }
354
+ //#endregion
355
+ //#region src/components/Chart/useChartSeriesVisibility.ts
356
+ /**
357
+ * Show/hide state for a chart's series, driven by a {@link ChartLegend}. Every series may be hidden.
358
+ * Hide a Recharts series with its `hide` prop (`<Bar hide={isHidden(key)} />`) rather than
359
+ * unmounting it, so colours and axes stay put.
360
+ *
361
+ * @experimental
362
+ */
363
+ function useChartSeriesVisibility(keys, initialHidden = []) {
364
+ const [hiddenSet, setHiddenSet] = useState(() => new Set(initialHidden));
365
+ const toggle = useCallback((key) => {
366
+ setHiddenSet((current) => {
367
+ const next = new Set(current);
368
+ if (next.has(key)) next.delete(key);
369
+ else next.add(key);
370
+ return next;
371
+ });
372
+ }, []);
373
+ const isHidden = useCallback((key) => hiddenSet.has(key), [hiddenSet]);
374
+ return useMemo(() => {
375
+ const hidden = keys.filter((key) => hiddenSet.has(key));
376
+ return {
377
+ hidden,
378
+ toggle,
379
+ isHidden,
380
+ allHidden: keys.length > 0 && hidden.length === keys.length
381
+ };
382
+ }, [
383
+ keys,
384
+ hiddenSet,
385
+ toggle,
386
+ isHidden
387
+ ]);
388
+ }
389
+ //#endregion
390
+ //#region src/components/Chart/ChartPopover.tsx
391
+ /** Default popover widths in px (Figma). @experimental */
392
+ const CHART_POPOVER_WIDTH = {
393
+ default: 256,
394
+ condensed: 210
395
+ };
396
+ const SPACING = {
397
+ default: {
398
+ padding: Spacing[3],
399
+ gap: Spacing[2]
400
+ },
401
+ condensed: {
402
+ padding: Spacing[2],
403
+ gap: Spacing[1]
404
+ }
405
+ };
406
+ const Panel = styled.div`
407
+ ${paragraphMixins.md};
408
+ box-sizing: border-box;
409
+ display: flex;
410
+ flex-direction: column;
411
+ gap: ${({ $size }) => SPACING[$size].gap};
412
+ padding: ${({ $size }) => SPACING[$size].padding};
413
+ border-radius: ${BorderRadius.Md};
414
+ background-color: ${({ theme }) => semanticColor(theme, "SurfacePrimary", Color.BackgroundPrimary)};
415
+ box-shadow: ${"0px 8px 14px 0px rgba(0, 0, 0, 0.06), 0px 3px 24px 0px rgba(0, 0, 0, 0.06)"};
416
+ color: ${({ theme }) => semanticColor(theme, "FgPrimary", Color.TextPrimary)};
417
+ pointer-events: none;
418
+ `;
419
+ const Header = styled.div`
420
+ ${paragraphMixins.mdBold};
421
+ `;
422
+ const Rows = styled.ul`
423
+ display: flex;
424
+ flex-direction: column;
425
+ gap: ${({ $size }) => SPACING[$size].gap};
426
+ margin: 0;
427
+ padding: 0;
428
+ list-style: none;
429
+ `;
430
+ const Row = styled.li`
431
+ display: grid;
432
+ grid-template-columns: auto minmax(0, 1fr) auto;
433
+ align-items: center;
434
+ column-gap: ${Spacing[2]};
435
+ opacity: ${({ $dimmed }) => $dimmed ? CHART_INACTIVE_OPACITY : 1};
436
+ `;
437
+ const TotalRow = styled(Row)`
438
+ padding-top: ${Spacing[1]};
439
+ box-shadow: ${Hairline.Top};
440
+ `;
441
+ const Swatch = styled.span`
442
+ width: ${Spacing[3]};
443
+ height: ${Spacing[3]};
444
+ border-radius: ${"2px"};
445
+ flex-shrink: 0;
446
+ `;
447
+ const SeriesName = styled.span`
448
+ overflow: hidden;
449
+ color: ${({ theme }) => semanticColor(theme, "FgSecondary", Color.TextSecondary)};
450
+ text-overflow: ellipsis;
451
+ white-space: nowrap;
452
+ `;
453
+ const Value = styled.span`
454
+ ${paragraphMixins.md};
455
+ text-align: right;
456
+ white-space: nowrap;
457
+ `;
458
+ const isPresent = (value) => typeof value === "number" ? !Number.isNaN(value) : typeof value === "string" && value !== "";
459
+ /**
460
+ * The chart popover body: an optional header, one row per series (swatch, name, right-aligned
461
+ * value) and an optional total row. Use it directly for a popover drawn outside Recharts; inside a
462
+ * Recharts chart use {@link ChartPopover}.
463
+ *
464
+ * @experimental Part of the in-progress PDS charting components; the API may change.
465
+ */
466
+ function ChartPopoverPanel({ label, rows, valueFormatter, showTotal = false, total, totalLabel = "Total", size = "default", width, activeSeries, className }) {
467
+ const locale = usePDSLocale();
468
+ const format = (value, key) => {
469
+ if (valueFormatter) return valueFormatter(value, key);
470
+ return typeof value === "number" ? value.toLocaleString(locale) : value;
471
+ };
472
+ const totalValue = total ?? rows.reduce((sum, { value }) => typeof value === "number" && !Number.isNaN(value) ? sum + value : sum, 0);
473
+ const hasLabel = label !== void 0 && label !== null && label !== "";
474
+ return /* @__PURE__ */ jsxs(Panel, {
475
+ $size: size,
476
+ className,
477
+ "data-size": size,
478
+ "data-test": "chart-popover",
479
+ style: { width: width ?? CHART_POPOVER_WIDTH[size] },
480
+ children: [hasLabel && /* @__PURE__ */ jsx(Header, { children: label }), /* @__PURE__ */ jsxs(Rows, {
481
+ $size: size,
482
+ children: [rows.map((row) => /* @__PURE__ */ jsxs(Row, {
483
+ $dimmed: activeSeries !== void 0 && row.key !== activeSeries,
484
+ "data-active": activeSeries === row.key || void 0,
485
+ children: [
486
+ /* @__PURE__ */ jsx(Swatch, {
487
+ "aria-hidden": true,
488
+ style: { background: row.color }
489
+ }),
490
+ /* @__PURE__ */ jsx(SeriesName, {
491
+ title: typeof row.label === "string" ? row.label : void 0,
492
+ children: row.label
493
+ }),
494
+ /* @__PURE__ */ jsx(Value, { children: isPresent(row.value) ? format(row.value, row.key) : "–" })
495
+ ]
496
+ }, row.key)), showTotal && size !== "condensed" && /* @__PURE__ */ jsxs(TotalRow, { children: [
497
+ /* @__PURE__ */ jsx(Swatch, { "aria-hidden": true }),
498
+ /* @__PURE__ */ jsx("span", { children: totalLabel }),
499
+ /* @__PURE__ */ jsx(Value, { children: format(totalValue, "total") })
500
+ ] })]
501
+ })]
502
+ });
503
+ }
504
+ const entryKey = ({ dataKey, name }) => {
505
+ if (typeof dataKey === "string" || typeof dataKey === "number") return String(dataKey);
506
+ return typeof name === "string" || typeof name === "number" ? String(name) : void 0;
507
+ };
508
+ const isEntryVisible = (entry) => !entry.hide && !entry.inactive && entry.type !== "none";
509
+ /**
510
+ * Builds the popover rows from a Recharts tooltip payload: drops hidden and inactive series, then
511
+ * orders, labels and colours the rest by `series` (or keeps the payload order without it).
512
+ *
513
+ * @experimental
514
+ */
515
+ function chartPopoverRows(payload, series, hiddenSeries) {
516
+ const hidden = new Set(hiddenSeries ?? []);
517
+ const visible = /* @__PURE__ */ new Map();
518
+ for (const entry of payload) {
519
+ const key = entryKey(entry);
520
+ if (key !== void 0 && !hidden.has(key) && isEntryVisible(entry) && !visible.has(key)) visible.set(key, entry);
521
+ }
522
+ const payloadColor = (entry) => entry.color ?? entry.fill ?? entry.stroke;
523
+ if (!series) return [...visible].map(([key, entry]) => ({
524
+ key,
525
+ label: isPresent(entry.name) ? entry.name : key,
526
+ color: payloadColor(entry),
527
+ value: entry.value
528
+ }));
529
+ return series.flatMap(({ key, label, color }) => {
530
+ const entry = visible.get(key);
531
+ return entry ? [{
532
+ key,
533
+ label,
534
+ color: color ?? payloadColor(entry),
535
+ value: entry.value
536
+ }] : [];
537
+ });
538
+ }
539
+ /**
540
+ * Chart popover (tooltip) content for Recharts 2 and 3. Pass it to `<Tooltip content={...} />`;
541
+ * Recharts injects `active`, `payload` and `label`.
542
+ *
543
+ * ```tsx
544
+ * const series = [{ key: 'approved', label: 'Approved', color: colors.approved }, ...];
545
+ * <Tooltip cursor={false} content={<ChartPopover series={series} hiddenSeries={hidden} />} />
546
+ * ```
547
+ *
548
+ * Renders nothing while inactive or when every series is hidden.
549
+ *
550
+ * @experimental Part of the in-progress PDS charting components; the API may change.
551
+ */
552
+ function ChartPopover({ active, payload, label, series, hiddenSeries, labelFormatter, ...panelProps }) {
553
+ if (!active || !payload || payload.length === 0) return null;
554
+ const rows = chartPopoverRows(payload, series, hiddenSeries);
555
+ if (rows.length === 0) return null;
556
+ const header = labelFormatter ? labelFormatter(label, payload) : label;
557
+ return /* @__PURE__ */ jsx(ChartPopoverPanel, {
558
+ ...panelProps,
559
+ label: header,
560
+ rows
561
+ });
562
+ }
563
+ //#endregion
564
+ //#region src/components/Chart/useChartStyles.ts
565
+ const GRID_Z_INDEX = 250;
566
+ /**
567
+ * PDS styling for hand-built Recharts charts, as props to spread on Recharts' own components so a
568
+ * custom chart (reference lines, formatters, extra children) keeps the PDS look:
569
+ *
570
+ * ```tsx
571
+ * const styles = useChartStyles();
572
+ * <BarChart data={data} margin={CHART_PLOT_MARGIN}>
573
+ * <Tooltip cursor={styles.barCursor} content={<ChartPopover series={series} />} />
574
+ * <CartesianGrid {...styles.grid} />
575
+ * <XAxis dataKey='month' {...styles.xAxis} tickFormatter={formatMonth} />
576
+ * <YAxis {...styles.yAxis} />
577
+ * <ReferenceLine y={target} stroke={styles.colors.axis} strokeDasharray='4 4' />
578
+ * ...
579
+ * </BarChart>
580
+ * ```
581
+ *
582
+ * Colours come from semantic tokens, so they follow light and dark mode.
583
+ *
584
+ * @experimental Part of the in-progress PDS charting components; the API may change.
585
+ */
586
+ function useChartStyles() {
587
+ const theme = useTheme();
588
+ const colors = {
589
+ grid: semanticColor(theme, "BorderDivider", Color.BorderHairline),
590
+ axis: semanticColor(theme, "BorderDefault", Color.BorderDivider),
591
+ text: semanticColor(theme, "FgSecondary", Color.TextSecondary),
592
+ surface: semanticColor(theme, "SurfacePrimary", Color.BackgroundPrimary),
593
+ hover: semanticColor(theme, "SurfaceHover", Color.BackgroundSecondary)
594
+ };
595
+ const tick = {
596
+ fill: colors.text,
597
+ fontSize: Typography.TextSmall.fontSize,
598
+ fontFamily: Typography.TextSmall.fontFamily
599
+ };
600
+ return {
601
+ colors,
602
+ /**
603
+ * `<CartesianGrid>`: horizontal gridlines only, drawn over the tooltip cursor band so they stay
604
+ * visible through it. Recharts 3 layers by `zIndex` (its cursor band is 200, bars 300); Recharts 2
605
+ * ignores `zIndex` and layers by child order, so put `<Tooltip>` before `<CartesianGrid>`.
606
+ */
607
+ grid: {
608
+ vertical: false,
609
+ stroke: colors.grid,
610
+ zIndex: GRID_Z_INDEX
611
+ },
612
+ /** `<XAxis>`: no tick marks, a baseline in the default border colour. */
613
+ xAxis: {
614
+ tick,
615
+ tickLine: false,
616
+ axisLine: { stroke: colors.axis }
617
+ },
618
+ /** `<YAxis>`: no tick marks or axis line. */
619
+ yAxis: {
620
+ tick,
621
+ tickLine: false,
622
+ axisLine: false
623
+ },
624
+ /** `<Tooltip cursor>` for bar charts: a translucent band, so gridlines show through. */
625
+ barCursor: {
626
+ fill: colors.hover,
627
+ fillOpacity: CHART_INACTIVE_OPACITY
628
+ },
629
+ /** `<Tooltip cursor>` for line charts: a vertical line. */
630
+ lineCursor: { stroke: colors.axis },
631
+ /** `<Bar>` in a stack: a 1px surface-coloured line between segments. */
632
+ segmentGap: {
633
+ stroke: colors.surface,
634
+ strokeWidth: 1
635
+ },
636
+ /** `<Line activeDot>`: the hovered point, ringed in the surface colour. */
637
+ activeDot: {
638
+ r: 4,
639
+ stroke: colors.surface,
640
+ strokeWidth: 2
641
+ }
642
+ };
643
+ }
644
+ /**
645
+ * Hover emphasis for bars holding several series (stacked or grouped): the segment under the
646
+ * pointer stays at full strength, the other segments of the same category drop to 65% opacity, and
647
+ * `activeSeries` dims the matching popover rows.
648
+ *
649
+ * ```tsx
650
+ * const { activeSeries, barHandlers, segmentOpacity } = useChartActiveSeries<Key>();
651
+ * <Tooltip content={<ChartPopover series={series} activeSeries={activeSeries} />} />
652
+ * {series.map(({ key }) => (
653
+ * <Bar key={key} dataKey={key} {...barHandlers(key)}>
654
+ * {data.map((_, i) => <Cell key={i} fillOpacity={segmentOpacity(key, i)} />)}
655
+ * </Bar>
656
+ * ))}
657
+ * ```
658
+ *
659
+ * @experimental
660
+ */
661
+ function useChartActiveSeries() {
662
+ const [active, setActive] = useState(null);
663
+ const barHandlers = useCallback((key) => ({
664
+ onMouseEnter: (_data, index) => setActive({
665
+ key,
666
+ index
667
+ }),
668
+ onMouseLeave: () => setActive(null)
669
+ }), []);
670
+ const segmentOpacity = (key, index) => active && active.index === index && active.key !== key ? CHART_INACTIVE_OPACITY : 1;
671
+ return {
672
+ activeSeries: active?.key,
673
+ barHandlers,
674
+ segmentOpacity
675
+ };
676
+ }
677
+ //#endregion
678
+ export { CHART_DEFAULT_HEIGHT, CHART_INACTIVE_OPACITY, CHART_PALETTE_TOKENS, CHART_PLOT_MARGIN, ChartFrame, ChartLegend, ChartPopover, ChartPopoverPanel, DEFAULT_CHART_LEGEND_POSITION, DEFAULT_CHART_PALETTE, chartColor, chartColorModeOf, chartPaletteColors, chartPopoverRows, resolveChartColor, resolveSeriesColors, useChartActiveSeries, useChartColors, useChartSeriesVisibility, useChartStyles };
679
+
680
+ //# sourceMappingURL=index.mjs.map