@persona/design-system 0.5.0 → 0.5.1

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 (559) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/dist/{Action-C2waxwIy.d.mts → Action-C2FTJhnQ.d.mts} +3 -3
  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 +8 -6
  8. package/dist/{Badge-CM2TzkdE.mjs → Badge-BtNIvtDZ.mjs} +3 -3
  9. package/dist/{Badge-CM2TzkdE.mjs.map → Badge-BtNIvtDZ.mjs.map} +1 -1
  10. package/dist/BooleanValueControl.d.mts +1 -1
  11. package/dist/{Breadcrumb-Df06cTnA.d.mts → Breadcrumb-BlAhp45l.d.mts} +1 -1
  12. package/dist/Breadcrumb.d.mts +1 -1
  13. package/dist/{Breadcrumbs-BEYQlGbW.mjs → Breadcrumbs-ClKHNIr-.mjs} +15 -14
  14. package/dist/Breadcrumbs-ClKHNIr-.mjs.map +1 -0
  15. package/dist/{Breadcrumbs-D_Gzd4_J.d.mts → Breadcrumbs-DdZ14ZFw.d.mts} +2 -2
  16. package/dist/Breadcrumbs.d.mts +1 -1
  17. package/dist/{Button-CRFbWv3l.d.mts → Button-CTgyA3gc.d.mts} +5 -4
  18. package/dist/Button.d.mts +1 -1
  19. package/dist/{Calendar-DjnoZVcT.d.mts → Calendar-_gM6U5ET.d.mts} +1 -1
  20. package/dist/Calendar.d.mts +1 -1
  21. package/dist/CalendarBase.d.mts +1 -1
  22. package/dist/Card-Dorym91P.d.mts +75 -0
  23. package/dist/{Card-CKrJtn1f.mjs → Card-vQIPtdXi.mjs} +12 -10
  24. package/dist/Card-vQIPtdXi.mjs.map +1 -0
  25. package/dist/Card.d.mts +1 -1
  26. package/dist/Card2.d.mts +1 -1
  27. package/dist/{CardV2-B2wx1NE3.mjs → CardV2-CFTjYWoO.mjs} +18 -17
  28. package/dist/CardV2-CFTjYWoO.mjs.map +1 -0
  29. package/dist/{Checkbox-DwZEsi7x.mjs → Checkbox-CyeitZ5q.mjs} +26 -22
  30. package/dist/Checkbox-CyeitZ5q.mjs.map +1 -0
  31. package/dist/{Checkbox-CwPXPLCi.d.mts → Checkbox-DRJXDs2T.d.mts} +1 -1
  32. package/dist/Checkbox.d.mts +1 -1
  33. package/dist/CheckboxGroupField.d.mts +1 -1
  34. package/dist/ChoicesValueControl.d.mts +1 -1
  35. package/dist/CodeHighlight.d.mts +40 -0
  36. package/dist/{Combobox-BQN5OwB-.d.mts → Combobox-DX4DLe1b.d.mts} +3 -3
  37. package/dist/{Combobox-CKaVX-32.mjs → Combobox-Ddas5FN-.mjs} +22 -21
  38. package/dist/Combobox-Ddas5FN-.mjs.map +1 -0
  39. package/dist/Combobox.d.mts +2 -2
  40. package/dist/{ComboboxBase-nfHr19x-.d.mts → ComboboxBase-Ds_i3K2m.d.mts} +18 -29
  41. package/dist/ComboboxBase.d.mts +1 -1
  42. package/dist/{ComboboxMultiSelect-DRNj2Mtx.d.mts → ComboboxMultiSelect-S6oFJcOS.d.mts} +2 -2
  43. package/dist/ComboboxMultiSelect.d.mts +1 -1
  44. package/dist/{ComboboxSingleSelect-BkhbEx-F.d.mts → ComboboxSingleSelect-DFzCwW1Y.d.mts} +4 -4
  45. package/dist/ComboboxSingleSelect.d.mts +1 -1
  46. package/dist/{CompactBar-CyHbWTv4.d.mts → CompactBar-DEqItiZr.d.mts} +3 -3
  47. package/dist/CompactBar.d.mts +1 -1
  48. package/dist/{ConfigFormGroup-CmCRJyse.mjs → ConfigFormGroup-DcsM-u8o.mjs} +2 -2
  49. package/dist/{ConfigFormGroup-CmCRJyse.mjs.map → ConfigFormGroup-DcsM-u8o.mjs.map} +1 -1
  50. package/dist/{ControlBar-DwAhPcb5.d.mts → ControlBar-BVG5Pbvh.d.mts} +2 -2
  51. package/dist/ControlBar.d.mts +1 -1
  52. package/dist/DataTable.d.mts +17 -6
  53. package/dist/{DateField-tOyrGcx1.d.mts → DateField-CBCo8_d3.d.mts} +2 -2
  54. package/dist/DateField.d.mts +1 -1
  55. package/dist/{DatePicker-Bs9JODNg.d.mts → DatePicker-BZ4_I4Db.d.mts} +2 -2
  56. package/dist/{DatePicker-D2SfjS-N.mjs → DatePicker-DTT-mJ8r.mjs} +45 -34
  57. package/dist/DatePicker-DTT-mJ8r.mjs.map +1 -0
  58. package/dist/DatePicker.d.mts +1 -1
  59. package/dist/{DateRangePicker-BT6-j8V7.d.mts → DateRangePicker-BMKJquPT.d.mts} +3 -3
  60. package/dist/DateRangePicker.d.mts +1 -1
  61. package/dist/DateRangeValueControl.d.mts +2 -2
  62. package/dist/DateValueControl.d.mts +1 -1
  63. package/dist/{DropdownButton-dpGAmVlN.mjs → DropdownButton-DV5if_uG.mjs} +3 -3
  64. package/dist/{DropdownButton-dpGAmVlN.mjs.map → DropdownButton-DV5if_uG.mjs.map} +1 -1
  65. package/dist/DropdownButton.d.mts +2 -2
  66. package/dist/{DropdownMenu-RTxQ0Zu1.d.mts → DropdownMenu-CbhEzWy1.d.mts} +3 -3
  67. package/dist/{DropdownMenu-CyxizDxJ.mjs → DropdownMenu-DovtBJBs.mjs} +3 -3
  68. package/dist/{DropdownMenu-CyxizDxJ.mjs.map → DropdownMenu-DovtBJBs.mjs.map} +1 -1
  69. package/dist/DropdownMenu.d.mts +1 -1
  70. package/dist/{ErrorProps-C9T857Wk.d.mts → ErrorProps-7eWoxSes.d.mts} +1 -1
  71. package/dist/ErrorProps.d.mts +1 -1
  72. package/dist/{FieldRegistry-D6niLExM.d.mts → FieldRegistry-BslyuPZw.d.mts} +2 -2
  73. package/dist/FieldRegistry.d.mts +1 -1
  74. package/dist/{FilterBar-DfBV7yKM.d.mts → FilterBar-DjZE4PoB.d.mts} +4 -4
  75. package/dist/FilterBar.d.mts +1 -1
  76. package/dist/FilterPickerMenu.d.mts +2 -2
  77. package/dist/FilterPill.d.mts +1 -1
  78. package/dist/FilterPopover.d.mts +1 -1
  79. package/dist/FloatValueControl.d.mts +1 -1
  80. package/dist/{FormControl-DQFefbrI.mjs → FormControl-BvRzRknE.mjs} +6 -5
  81. package/dist/FormControl-BvRzRknE.mjs.map +1 -0
  82. package/dist/{FormControl-BMYRsFkI.d.mts → FormControl-gpLZZpNs.d.mts} +3 -3
  83. package/dist/FormControl.d.mts +1 -1
  84. package/dist/FormControlLabel.d.mts +2 -2
  85. package/dist/{FormField-C7bW-O6H.mjs → FormField-BDJ6zNE6.mjs} +14 -14
  86. package/dist/{FormField-C7bW-O6H.mjs.map → FormField-BDJ6zNE6.mjs.map} +1 -1
  87. package/dist/{FormField-C1DaUT5U.d.mts → FormField-CZXKvCGt.d.mts} +2 -2
  88. package/dist/FormField.d.mts +1 -1
  89. package/dist/{Header-BKk3qESS.d.mts → Header-1laYnwRP.d.mts} +2 -2
  90. package/dist/Header.d.mts +1 -1
  91. package/dist/{HelperTooltip-CD_yy7Hp.d.mts → HelperTooltip-BPJS3EwC.d.mts} +2 -2
  92. package/dist/HelperTooltip.d.mts +1 -1
  93. package/dist/{HoverCopyableField-Bgt639FR.mjs → HoverCopyableField-WP6DPjy1.mjs} +8 -8
  94. package/dist/{HoverCopyableField-Bgt639FR.mjs.map → HoverCopyableField-WP6DPjy1.mjs.map} +1 -1
  95. package/dist/{IconButton-BnSEV7eR.mjs → IconButton-CnJNIJVQ.mjs} +124 -25
  96. package/dist/IconButton-CnJNIJVQ.mjs.map +1 -0
  97. package/dist/{IconButton-Bh-JJ-0x.d.mts → IconButton-PnrnqQ1s.d.mts} +2 -2
  98. package/dist/IconButton.d.mts +1 -1
  99. package/dist/ImageTile.d.mts +1 -1
  100. package/dist/InlineCombobox.d.mts +1 -1
  101. package/dist/InlineInput.d.mts +1 -1
  102. package/dist/{Input-D7of_GtJ.mjs → Input-DbfwNzS_.mjs} +11 -9
  103. package/dist/Input-DbfwNzS_.mjs.map +1 -0
  104. package/dist/{Input-1bDdMAgO.d.mts → Input-Diztxhle.d.mts} +5 -9
  105. package/dist/Input.d.mts +1 -1
  106. package/dist/{InputProps-BBShwi8N.d.mts → InputProps-BILq1X-n.d.mts} +2 -2
  107. package/dist/InputProps.d.mts +1 -1
  108. package/dist/IntegerValueControl.d.mts +1 -1
  109. package/dist/{ListBox-jzXQDraS.mjs → ListBox-CXh9Jfb-.mjs} +36 -28
  110. package/dist/ListBox-CXh9Jfb-.mjs.map +1 -0
  111. package/dist/{ListBox-DeFHRX2T.d.mts → ListBox-P1eTecdo.d.mts} +3 -3
  112. package/dist/ListBox.d.mts +1 -1
  113. package/dist/ListBoxField.d.mts +2 -2
  114. package/dist/{LoadingShimmer-a2Hv0kAq.mjs → LoadingShimmer-DeVCDCjT.mjs} +13 -5
  115. package/dist/LoadingShimmer-DeVCDCjT.mjs.map +1 -0
  116. package/dist/LoadingShimmer.d.mts +2 -2
  117. package/dist/{LogicRow-BOhB0uNS.d.mts → LogicRow-DtZYOzQ8.d.mts} +3 -3
  118. package/dist/LogicRow.d.mts +1 -1
  119. package/dist/MaskedInput.d.mts +2 -2
  120. package/dist/MatchHighlight.d.mts +1 -1
  121. package/dist/{Menu-DVI8l-4Q.mjs → Menu-CAGTCBqj.mjs} +42 -25
  122. package/dist/Menu-CAGTCBqj.mjs.map +1 -0
  123. package/dist/{Menu-BCVhmNEe.d.mts → Menu-_loh8pe3.d.mts} +4 -4
  124. package/dist/Menu.d.mts +1 -1
  125. package/dist/{MiddleTruncatedText-DnF7F_1D.mjs → MiddleTruncatedText-CO58jrNF.mjs} +2 -2
  126. package/dist/{MiddleTruncatedText-DnF7F_1D.mjs.map → MiddleTruncatedText-CO58jrNF.mjs.map} +1 -1
  127. package/dist/Modal.d.mts +4 -4
  128. package/dist/{PageHeader-BpGT-BM0.mjs → PageHeader-wpvRRTaa.mjs} +9 -6
  129. package/dist/PageHeader-wpvRRTaa.mjs.map +1 -0
  130. package/dist/PageHeader.d.mts +2 -2
  131. package/dist/PageLayout.d.mts +1 -1
  132. package/dist/{PageSelector-D6tffcGW.d.mts → PageSelector-CIa3Zts9.d.mts} +3 -3
  133. package/dist/PageSelector.d.mts +1 -1
  134. package/dist/{Pagination-BkjmybcI.d.mts → Pagination-C2eZEM7K.d.mts} +2 -2
  135. package/dist/{Pagination-CVRTcKSG.mjs → Pagination-wjr3W3xf.mjs} +9 -8
  136. package/dist/Pagination-wjr3W3xf.mjs.map +1 -0
  137. package/dist/Pagination.d.mts +1 -1
  138. package/dist/{Pii-CA7aCuYT.mjs → Pii-Bm-qkweh.mjs} +2 -2
  139. package/dist/{Pii-CA7aCuYT.mjs.map → Pii-Bm-qkweh.mjs.map} +1 -1
  140. package/dist/{PillShell-CVqpZ5iV.d.mts → PillShell-D6dN9sWk.d.mts} +2 -2
  141. package/dist/PillShell.d.mts +1 -1
  142. package/dist/{Popover-DlXyKYL5.mjs → Popover-DUyzmq3e.mjs} +9 -5
  143. package/dist/Popover-DUyzmq3e.mjs.map +1 -0
  144. package/dist/{PseudoClassProps-BPdn-ofQ.d.mts → PseudoClassProps-DnlHhW5u.d.mts} +1 -1
  145. package/dist/PseudoClassProps.d.mts +1 -1
  146. package/dist/{Radio-DYGEt0FT.mjs → Radio-CkugnL91.mjs} +21 -17
  147. package/dist/Radio-CkugnL91.mjs.map +1 -0
  148. package/dist/{RadioGroup-pegXtLwD.mjs → RadioGroup-8dI8gljw.mjs} +3 -3
  149. package/dist/{RadioGroup-pegXtLwD.mjs.map → RadioGroup-8dI8gljw.mjs.map} +1 -1
  150. package/dist/{RadioGroup-DYIfRj02.d.mts → RadioGroup-Dg_gydUp.d.mts} +1 -1
  151. package/dist/RadioGroup.d.mts +1 -1
  152. package/dist/RangeCalendar.d.mts +1 -1
  153. package/dist/RangeCalendarPresets.d.mts +1 -1
  154. package/dist/RuleEditorFields.d.mts +2 -2
  155. package/dist/RulesPill.d.mts +1 -1
  156. package/dist/{SearchInput-Dc90GLTF.d.mts → SearchInput-CNg109M5.d.mts} +2 -2
  157. package/dist/SearchInput.d.mts +1 -1
  158. package/dist/SectionHeading.d.mts +1 -1
  159. package/dist/{SegmentedControl-DIHonamg.d.mts → SegmentedControl-BBIHKcvo.d.mts} +1 -1
  160. package/dist/{SegmentedControl-DwbltwDQ.mjs → SegmentedControl-DQE0hN57.mjs} +9 -8
  161. package/dist/SegmentedControl-DQE0hN57.mjs.map +1 -0
  162. package/dist/SegmentedControl.d.mts +1 -1
  163. package/dist/{Select-CBVvPyRJ.mjs → Select-D9OVjzPR.mjs} +15 -14
  164. package/dist/Select-D9OVjzPR.mjs.map +1 -0
  165. package/dist/{Select-DwqWnWBi.d.mts → Select-wnr46ROZ.d.mts} +3 -3
  166. package/dist/Select.d.mts +1 -1
  167. package/dist/{Spacer-BsK8tTwA.mjs → Spacer-D58qwuXR.mjs} +2 -2
  168. package/dist/{Spacer-BsK8tTwA.mjs.map → Spacer-D58qwuXR.mjs.map} +1 -1
  169. package/dist/{Spinner-e725Rxkd.mjs → Spinner-gBNWIwOn.mjs} +6 -8
  170. package/dist/Spinner-gBNWIwOn.mjs.map +1 -0
  171. package/dist/{Stack-Bre2oiov.mjs → Stack-BqQndGI9.mjs} +2 -2
  172. package/dist/{Stack-Bre2oiov.mjs.map → Stack-BqQndGI9.mjs.map} +1 -1
  173. package/dist/{Stack-6eOrxjJi.d.mts → Stack-DgC83-nw.d.mts} +2 -2
  174. package/dist/Stack.d.mts +1 -1
  175. package/dist/{Sticker-By3F8Aip.mjs → Sticker-BDyejPZa.mjs} +159 -14
  176. package/dist/Sticker-BDyejPZa.mjs.map +1 -0
  177. package/dist/{Sticker-Ep6N4Exq.d.mts → Sticker-qvWkqEMw.d.mts} +5 -5
  178. package/dist/Sticker.d.mts +1 -1
  179. package/dist/StringValueControl.d.mts +1 -1
  180. package/dist/Tab.d.mts +3 -4
  181. package/dist/{TabBar-CWF65Tv4.mjs → TabBar-B__54oO3.mjs} +17 -16
  182. package/dist/TabBar-B__54oO3.mjs.map +1 -0
  183. package/dist/TabBarIconButton.d.mts +1 -5
  184. package/dist/{Table-BOcWdwpv.d.mts → Table-CPvIH27_.d.mts} +1 -1
  185. package/dist/{Table-nWd5ZVbm.mjs → Table-CqIi5mVF.mjs} +86 -39
  186. package/dist/Table-CqIi5mVF.mjs.map +1 -0
  187. package/dist/Table.d.mts +1 -1
  188. package/dist/{TableBody-BFPFaZnD.d.mts → TableBody-CQYijW_3.d.mts} +1 -1
  189. package/dist/TableBody.d.mts +1 -1
  190. package/dist/{TableBox-Bd-H5oyh.mjs → TableBox-C-8RxZT4.mjs} +56 -46
  191. package/dist/TableBox-C-8RxZT4.mjs.map +1 -0
  192. package/dist/TableBox.d.mts +2 -2
  193. package/dist/{TableBoxCell-Cjlc_xJz.d.mts → TableBoxCell-CQ3zT1jG.d.mts} +7 -7
  194. package/dist/TableBoxCell.d.mts +1 -1
  195. package/dist/TableBoxField.d.mts +3 -3
  196. package/dist/{TableBoxRow-CKDjNUsU.d.mts → TableBoxRow-ClK2pceY.d.mts} +3 -3
  197. package/dist/TableBoxRow.d.mts +1 -1
  198. package/dist/{TableBoxRowActions-BJ8ue3Bk.d.mts → TableBoxRowActions-CoF3DuUQ.d.mts} +2 -2
  199. package/dist/TableBoxRowActions.d.mts +1 -1
  200. package/dist/{index-CvBvfQAY.d.mts → TableCell-BQv4ASkE.d.mts} +5 -26
  201. package/dist/TableCell.d.mts +1 -1
  202. package/dist/{TableControls-D8xMNgyS.d.mts → TableControls-CtEL3ioz.d.mts} +3 -3
  203. package/dist/{TableControls-BnesnTue.mjs → TableControls-DplArh-9.mjs} +76 -64
  204. package/dist/TableControls-DplArh-9.mjs.map +1 -0
  205. package/dist/TableControls.d.mts +1 -1
  206. package/dist/{TableControlsContext-ChFsFEjR.d.mts → TableControlsContext-X-Lupvc6.d.mts} +2 -2
  207. package/dist/TableControlsContext.d.mts +1 -1
  208. package/dist/{TableHead-CWDxuy5V.d.mts → TableHead-DLLn0zoP.d.mts} +1 -1
  209. package/dist/TableHead.d.mts +1 -1
  210. package/dist/{TableHeaderCell-C_sIU1d7.d.mts → TableHeaderCell-DiJ2jyw4.d.mts} +3 -1
  211. package/dist/TableHeaderCell.d.mts +1 -1
  212. package/dist/{TableLayout-CgGhKU_A.d.mts → TableLayout-BgnUz8NO.d.mts} +1 -1
  213. package/dist/TableLayout.d.mts +1 -1
  214. package/dist/{TableRow-B1UKlbze.d.mts → TableRow-Dgg8hGy5.d.mts} +2 -2
  215. package/dist/TableRow.d.mts +1 -1
  216. package/dist/TableTH.d.mts +1 -1
  217. package/dist/{TableViewConfigurationDropdown-BqB7pOh8.d.mts → TableViewConfigurationDropdown-DRxd562-.d.mts} +2 -2
  218. package/dist/TableViewConfigurationDropdown.d.mts +1 -1
  219. package/dist/{TechnicalSticker-Ct2WnNzJ.mjs → TechnicalSticker-D6MO_IfT.mjs} +27 -22
  220. package/dist/TechnicalSticker-D6MO_IfT.mjs.map +1 -0
  221. package/dist/{Text-B0orb-cZ.mjs → Text-Dn_p7ZvT.mjs} +16 -12
  222. package/dist/Text-Dn_p7ZvT.mjs.map +1 -0
  223. package/dist/{Text-BzzUdBdc.d.mts → Text-tgFz40XD.d.mts} +4 -4
  224. package/dist/Text.d.mts +1 -1
  225. package/dist/{TextArea-CGpY5xqX.d.mts → TextArea-BxxXQSwP.d.mts} +2 -2
  226. package/dist/{TextArea-CospIXEO.mjs → TextArea-CYirq-B2.mjs} +2 -2
  227. package/dist/{TextArea-CospIXEO.mjs.map → TextArea-CYirq-B2.mjs.map} +1 -1
  228. package/dist/TextArea.d.mts +1 -1
  229. package/dist/{TextUnderlineTooltip-DZYGjJq1.d.mts → TextUnderlineTooltip-DQVYsLqM.d.mts} +3 -3
  230. package/dist/TextUnderlineTooltip.d.mts +1 -1
  231. package/dist/Tile.d.mts +1 -1
  232. package/dist/Toast.d.mts +1 -1
  233. package/dist/{Toggle-BjAivdyX.d.mts → Toggle-BmUl78kH.d.mts} +1 -1
  234. package/dist/{Toggle-Do5z1VcO.mjs → Toggle-CqgFNIYS.mjs} +19 -10
  235. package/dist/Toggle-CqgFNIYS.mjs.map +1 -0
  236. package/dist/Toggle.d.mts +1 -1
  237. package/dist/{Tooltip-DSKGD33G.mjs → Tooltip-BsuYG0fw.mjs} +12 -9
  238. package/dist/Tooltip-BsuYG0fw.mjs.map +1 -0
  239. package/dist/{Tooltip-n3XkX4dp.d.mts → Tooltip-eSaiYjxT.d.mts} +3 -3
  240. package/dist/Tooltip.d.mts +1 -1
  241. package/dist/{TruncatedText-C-MJPIRi.d.mts → TruncatedText-B2v53Y11.d.mts} +2 -2
  242. package/dist/{codec-B0dZTwlG.d.mts → codec-D5qlDVgU.d.mts} +2 -2
  243. package/dist/codec.d.mts +1 -1
  244. package/dist/color-fQTsW4gq.d.mts +20 -0
  245. package/dist/components/Attribute/index.mjs +34 -9
  246. package/dist/components/Attribute/index.mjs.map +1 -1
  247. package/dist/components/Badge/index.mjs +1 -1
  248. package/dist/components/Banner/index.mjs +19 -8
  249. package/dist/components/Banner/index.mjs.map +1 -1
  250. package/dist/components/BottomPanel/index.mjs +4 -4
  251. package/dist/components/Breadcrumbs/index.d.mts +1 -1
  252. package/dist/components/Breadcrumbs/index.mjs +1 -1
  253. package/dist/components/Button/index.d.mts +2 -2
  254. package/dist/components/Button/index.mjs +1 -1
  255. package/dist/components/ButtonGroup/index.mjs +12 -4
  256. package/dist/components/ButtonGroup/index.mjs.map +1 -1
  257. package/dist/components/Card/index.d.mts +2 -2
  258. package/dist/components/Card/index.mjs +1 -1
  259. package/dist/components/CardV2/index.d.mts +1 -1
  260. package/dist/components/CardV2/index.mjs +1 -1
  261. package/dist/components/Checkbox/index.d.mts +1 -1
  262. package/dist/components/Checkbox/index.mjs +1 -1
  263. package/dist/components/CodeHighlight/PrismWithLanguages.d.mts +2 -0
  264. package/dist/components/CodeHighlight/PrismWithLanguages.mjs +48 -0
  265. package/dist/components/CodeHighlight/PrismWithLanguages.mjs.map +1 -0
  266. package/dist/components/CodeHighlight/index.d.mts +2 -0
  267. package/dist/components/CodeHighlight/index.mjs +381 -0
  268. package/dist/components/CodeHighlight/index.mjs.map +1 -0
  269. package/dist/components/Combobox/index.d.mts +2 -2
  270. package/dist/components/Combobox/index.mjs +1 -1
  271. package/dist/components/ConfigFormGroup/index.mjs +1 -1
  272. package/dist/components/DataTable/TableControls/index.d.mts +19 -19
  273. package/dist/components/DataTable/TableControls/index.mjs +1 -1
  274. package/dist/components/DataTable/index.mjs +84 -44
  275. package/dist/components/DataTable/index.mjs.map +1 -1
  276. package/dist/components/DataTable/types.d.mts +2 -2
  277. package/dist/components/DatePicker/index.d.mts +4 -4
  278. package/dist/components/DatePicker/index.mjs +1 -1
  279. package/dist/components/DropdownButton/index.mjs +1 -1
  280. package/dist/components/DropdownMenu/index.d.mts +1 -1
  281. package/dist/components/DropdownMenu/index.mjs +1 -1
  282. package/dist/components/FloatingPanel/index.mjs +5 -5
  283. package/dist/components/FormControl/index.d.mts +2 -2
  284. package/dist/components/FormControl/index.mjs +1 -1
  285. package/dist/components/FormField/index.d.mts +1 -1
  286. package/dist/components/FormField/index.mjs +1 -1
  287. package/dist/components/Grid/index.mjs +1 -1
  288. package/dist/components/HoverCopyableField/index.mjs +1 -1
  289. package/dist/components/ImageTile/index.mjs +18 -17
  290. package/dist/components/ImageTile/index.mjs.map +1 -1
  291. package/dist/components/Input/index.d.mts +1 -1
  292. package/dist/components/Input/index.mjs +1 -1
  293. package/dist/components/Link/index.mjs +7 -8
  294. package/dist/components/Link/index.mjs.map +1 -1
  295. package/dist/components/ListBox/index.d.mts +3 -3
  296. package/dist/components/ListBox/index.mjs +1 -1
  297. package/dist/components/LoadingShimmer/index.mjs +1 -1
  298. package/dist/components/MaskedInput/index.mjs +1 -1
  299. package/dist/components/MatchHighlight/index.mjs +6 -4
  300. package/dist/components/MatchHighlight/index.mjs.map +1 -1
  301. package/dist/components/Menu/index.d.mts +1 -1
  302. package/dist/components/Menu/index.mjs +1 -1
  303. package/dist/components/Modal/index.mjs +10 -8
  304. package/dist/components/Modal/index.mjs.map +1 -1
  305. package/dist/components/PageHeader/index.mjs +1 -1
  306. package/dist/components/Pagination/index.d.mts +3 -3
  307. package/dist/components/Pagination/index.mjs +1 -1
  308. package/dist/components/Pii/index.mjs +1 -1
  309. package/dist/components/Popover/index.mjs +1 -1
  310. package/dist/components/ProgressBar/index.mjs +16 -19
  311. package/dist/components/ProgressBar/index.mjs.map +1 -1
  312. package/dist/components/ProgressIndicator/index.mjs +25 -19
  313. package/dist/components/ProgressIndicator/index.mjs.map +1 -1
  314. package/dist/components/Radio/index.mjs +1 -1
  315. package/dist/components/RadioGroup/index.d.mts +1 -1
  316. package/dist/components/RadioGroup/index.mjs +1 -1
  317. package/dist/components/RightPanel/index.mjs +5 -5
  318. package/dist/components/SegmentedControl/index.d.mts +1 -1
  319. package/dist/components/SegmentedControl/index.mjs +1 -1
  320. package/dist/components/Select/index.d.mts +1 -1
  321. package/dist/components/Select/index.mjs +1 -1
  322. package/dist/components/Slider/index.mjs +22 -13
  323. package/dist/components/Slider/index.mjs.map +1 -1
  324. package/dist/components/SmartTextInput/PillType.d.mts +10 -0
  325. package/dist/components/SmartTextInput/PillType.mjs +31 -0
  326. package/dist/components/SmartTextInput/PillType.mjs.map +1 -0
  327. package/dist/components/SmartTextInput/parser/method-chain/parser.d.mts +21 -0
  328. package/dist/components/SmartTextInput/parser/method-chain/parser.mjs +2 -0
  329. package/dist/components/SmartTextInput/parser/method-chain/types.d.mts +105 -0
  330. package/dist/components/SmartTextInput/parser/method-chain/types.mjs +31 -0
  331. package/dist/components/SmartTextInput/parser/method-chain/types.mjs.map +1 -0
  332. package/dist/components/SmartTextInput/parser/smart-text/parser.d.mts +17 -0
  333. package/dist/components/SmartTextInput/parser/smart-text/parser.mjs +814 -0
  334. package/dist/components/SmartTextInput/parser/smart-text/parser.mjs.map +1 -0
  335. package/dist/components/SmartTextInput/parser/smart-text/types.d.mts +72 -0
  336. package/dist/components/SmartTextInput/parser/smart-text/types.mjs +38 -0
  337. package/dist/components/SmartTextInput/parser/smart-text/types.mjs.map +1 -0
  338. package/dist/components/Spacer/index.mjs +1 -1
  339. package/dist/components/Spinner/index.mjs +1 -1
  340. package/dist/components/Stack/index.d.mts +1 -1
  341. package/dist/components/Stack/index.mjs +1 -1
  342. package/dist/components/StatusIndicator/index.mjs +112 -13
  343. package/dist/components/StatusIndicator/index.mjs.map +1 -1
  344. package/dist/components/Sticker/index.d.mts +1 -1
  345. package/dist/components/Sticker/index.mjs +1 -1
  346. package/dist/components/SwatchPicker/index.mjs +5 -4
  347. package/dist/components/SwatchPicker/index.mjs.map +1 -1
  348. package/dist/components/TabBar/index.mjs +1 -1
  349. package/dist/components/Table/index.d.mts +8 -7
  350. package/dist/components/Table/index.mjs +1 -1
  351. package/dist/components/TableBox/index.d.mts +2 -2
  352. package/dist/components/TableBox/index.mjs +1 -1
  353. package/dist/components/TechnicalSticker/index.mjs +1 -1
  354. package/dist/components/Text/index.d.mts +1 -1
  355. package/dist/components/Text/index.mjs +1 -1
  356. package/dist/components/TextArea/index.d.mts +1 -1
  357. package/dist/components/TextArea/index.mjs +1 -1
  358. package/dist/components/Tile/index.mjs +9 -8
  359. package/dist/components/Tile/index.mjs.map +1 -1
  360. package/dist/components/Toast/index.mjs +18 -12
  361. package/dist/components/Toast/index.mjs.map +1 -1
  362. package/dist/components/Toggle/index.d.mts +1 -1
  363. package/dist/components/Toggle/index.mjs +1 -1
  364. package/dist/components/Tooltip/index.d.mts +3 -3
  365. package/dist/components/Tooltip/index.mjs +1 -1
  366. package/dist/compound-expression.d.mts +1 -1
  367. package/dist/{constants-Bs94Jw4y.d.mts → constants-zZyl7QbX.d.mts} +1 -1
  368. package/dist/constants.d.mts +1 -1
  369. package/dist/{date-filter-BbWgAXy3.mjs → date-filter-DMZnJwGs.mjs} +1 -1
  370. package/dist/{date-filter-BbWgAXy3.mjs.map → date-filter-DMZnJwGs.mjs.map} +1 -1
  371. package/dist/{date-range-rule-value-DBEEWTQp.d.mts → date-range-rule-value-zJaa_jR9.d.mts} +2 -2
  372. package/dist/date-range-rule-value.d.mts +1 -1
  373. package/dist/{date-rule-intent-BArNGT2E.d.mts → date-rule-intent-CdWv68my.d.mts} +3 -3
  374. package/dist/date-rule-intent.d.mts +1 -1
  375. package/dist/display.d.mts +1 -1
  376. package/dist/fieldPickerOptions.d.mts +2 -2
  377. package/dist/fieldSchemaTypes-COEJOqYL.d.mts +39 -0
  378. package/dist/{filter-size-context-D1UhTwOG.d.mts → filter-size-context-DYkfYMkX.d.mts} +2 -2
  379. package/dist/filter-size-context.d.mts +1 -1
  380. package/dist/helpers.d.mts +1 -1
  381. package/dist/{index-I_Cy3X5R.d.mts → index-BJr_obTf.d.mts} +3 -3
  382. package/dist/{index-DASkW991.d.mts → index-BX8dSNcy.d.mts} +2 -2
  383. package/dist/index-DxIXll2Z.d.mts +21 -0
  384. package/dist/index.d.mts +1 -1
  385. package/dist/index2.d.mts +1 -1
  386. package/dist/index3.d.mts +3 -3
  387. package/dist/index4.d.mts +1 -1
  388. package/dist/index5.d.mts +14 -14
  389. package/dist/{input-M7BEIewR.d.mts → input-DN_8iHVD.d.mts} +3 -3
  390. package/dist/inputFields.d.mts +10 -10
  391. package/dist/jsonSchema-B1VonQij.d.mts +222 -0
  392. package/dist/lib/GlobalStyles.mjs +1 -1
  393. package/dist/lib/HeadlessAriaButton.d.mts +1 -2
  394. package/dist/lib/HeadlessAriaButton.mjs +1 -1
  395. package/dist/lib/MiddleTruncatedText.mjs +1 -1
  396. package/dist/lib/PDSProvider.d.mts +1 -1
  397. package/dist/lib/PDSProvider.mjs +1 -1
  398. package/dist/lib/TruncatedText.d.mts +1 -1
  399. package/dist/lib/TruncatedText.mjs +1 -1
  400. package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
  401. package/dist/lib/TruncatedTextWithTooltip.mjs +1 -1
  402. package/dist/lib/color.d.mts +2 -0
  403. package/dist/lib/color.mjs +21 -0
  404. package/dist/lib/color.mjs.map +1 -0
  405. package/dist/lib/date-filter/index.d.mts +2 -2
  406. package/dist/lib/date-filter/index.mjs +1 -1
  407. package/dist/lib/errorReporter.d.mts +7 -0
  408. package/dist/lib/errorReporter.mjs +15 -0
  409. package/dist/lib/errorReporter.mjs.map +1 -0
  410. package/dist/lib/fieldSchemaTypes.d.mts +2 -0
  411. package/dist/lib/fieldSchemaTypes.mjs +41 -0
  412. package/dist/lib/fieldSchemaTypes.mjs.map +1 -0
  413. package/dist/lib/jsonSchema.d.mts +2 -0
  414. package/dist/lib/jsonSchema.mjs +260 -0
  415. package/dist/lib/jsonSchema.mjs.map +1 -0
  416. package/dist/lib/message.d.mts +1 -1
  417. package/dist/lib/methodChain.d.mts +66 -0
  418. package/dist/lib/methodChain.mjs +239 -0
  419. package/dist/lib/methodChain.mjs.map +1 -0
  420. package/dist/lib/methodChainNormalize.d.mts +14 -0
  421. package/dist/lib/methodChainNormalize.mjs +53 -0
  422. package/dist/lib/methodChainNormalize.mjs.map +1 -0
  423. package/dist/lib/methodChainTypes.d.mts +23 -0
  424. package/dist/lib/methodChainTypes.mjs +0 -0
  425. package/dist/lib/objectSchemaTypes.d.mts +2 -0
  426. package/dist/lib/objectSchemaTypes.mjs +0 -0
  427. package/dist/lib/pseudoClass.d.mts +1 -1
  428. package/dist/lib/selectHelper.mjs.map +1 -1
  429. package/dist/lib/semanticColor.d.mts +2 -0
  430. package/dist/lib/semanticColor.mjs +17 -0
  431. package/dist/lib/semanticColor.mjs.map +1 -0
  432. package/dist/lib/useControlled.mjs.map +1 -1
  433. package/dist/{message-CyxgAWZl.d.mts → message-DfEpU8lV.d.mts} +1 -1
  434. package/dist/mixins/focus.d.mts +4 -4
  435. package/dist/mixins/focus.mjs +7 -5
  436. package/dist/mixins/focus.mjs.map +1 -1
  437. package/dist/mixins/hoverable.d.mts +2 -2
  438. package/dist/mixins/hoverable.mjs +2 -2
  439. package/dist/mixins/input.d.mts +1 -1
  440. package/dist/mixins/input.mjs +56 -23
  441. package/dist/mixins/input.mjs.map +1 -1
  442. package/dist/mixins/menuItem.d.mts +2 -2
  443. package/dist/mixins/menuItem.mjs +78 -50
  444. package/dist/mixins/menuItem.mjs.map +1 -1
  445. package/dist/mixins/print/index.mjs +4 -2
  446. package/dist/mixins/print/index.mjs.map +1 -1
  447. package/dist/mixins/text.d.mts +1 -1
  448. package/dist/mixins/text.mjs +1 -1
  449. package/dist/{operators-CXkmvFpP.d.mts → operators-F8X0hyQB.d.mts} +2 -2
  450. package/dist/operators.d.mts +1 -1
  451. package/dist/palette-BANY1Xfs.d.mts +21 -0
  452. package/dist/palette.d.mts +2 -0
  453. package/dist/parser-Kxos6siN.mjs +2156 -0
  454. package/dist/parser-Kxos6siN.mjs.map +1 -0
  455. package/dist/patterns/LayoutLoadingShimmer/index.mjs +6 -6
  456. package/dist/patterns/LayoutLoadingSpinner/index.mjs +1 -1
  457. package/dist/patterns/PageLayout/index.mjs +1 -1
  458. package/dist/relative-date-label.d.mts +1 -1
  459. package/dist/semantic-Dy7mTyBP.d.mts +133 -0
  460. package/dist/semanticColor-DkVQjcbc.d.mts +29 -0
  461. package/dist/{styledComponentsInterop-8zScIQyC.mjs → styledComponentsInterop-NxwFjeA4.mjs} +2 -2
  462. package/dist/{styledComponentsInterop-8zScIQyC.mjs.map → styledComponentsInterop-NxwFjeA4.mjs.map} +1 -1
  463. package/dist/{text-DjTGRUM1.d.mts → text-BaQdW8qa.d.mts} +1 -1
  464. package/dist/{theme-Biwx2eJZ.d.mts → theme-D02MOaH6.d.mts} +22 -5
  465. package/dist/theme.d.mts +2 -2
  466. package/dist/theme.mjs +22 -1
  467. package/dist/theme.mjs.map +1 -1
  468. package/dist/tone.d.mts +17 -0
  469. package/dist/{types-V8UJX-rk.d.mts → types-1_JSe9Wr.d.mts} +2 -2
  470. package/dist/{types-DBBfOCX1.d.mts → types-C2s9yhgO.d.mts} +2 -2
  471. package/dist/{types-Bsf1VsW6.d.mts → types-COeginAF.d.mts} +1 -1
  472. package/dist/{types-Df0D37uh.d.mts → types-CtLY82w5.d.mts} +1 -1
  473. package/dist/{types-Ds43XULD.d.mts → types-Ok2lRZeu.d.mts} +1 -1
  474. package/dist/types.d.mts +1 -1
  475. package/dist/types2.d.mts +1 -1
  476. package/dist/types3.d.mts +1 -1
  477. package/dist/types4.d.mts +1 -1
  478. package/dist/types5.d.mts +1 -1
  479. package/dist/{url-state-M64mdtQ2.d.mts → url-state-DP78aDol.d.mts} +2 -2
  480. package/dist/url-state.d.mts +1 -1
  481. package/dist/useComboboxFooterAction.d.mts +1 -1
  482. package/dist/{useFilterStateV2-gALqONXf.d.mts → useFilterStateV2-DC2rGXHK.d.mts} +3 -3
  483. package/dist/useFilterStateV2.d.mts +1 -1
  484. package/dist/{useFormField-Bo7oHMof.d.mts → useFormField--_14te0K.d.mts} +2 -2
  485. package/dist/useFormField.d.mts +1 -1
  486. package/dist/{useTableBoxDragAndDrop-BrJFRSaG.d.mts → useTableBoxDragAndDrop-DkCxC7Mi.d.mts} +1 -1
  487. package/dist/useTableBoxDragAndDrop.d.mts +1 -1
  488. package/dist/{useToggle-Bo3yd14Y.mjs → useToggle-0zLL1E7s.mjs} +1 -1
  489. package/dist/{useToggle-Bo3yd14Y.mjs.map → useToggle-0zLL1E7s.mjs.map} +1 -1
  490. package/dist/useTruncation.d.mts +1 -1
  491. package/dist/{utilities-BHMNnJ8h.d.mts → utilities-C1hOxjt_.d.mts} +1 -1
  492. package/dist/utilities.d.mts +1 -1
  493. package/dist/utils/storybook.mjs +1 -1
  494. package/dist/utils/storybook.mjs.map +1 -1
  495. package/dist/utils/testing.mjs.map +1 -1
  496. package/dist/utils.d.mts +1 -1
  497. package/dist/{validation-BCBIvN6H.d.mts → validation-CpDsI-TM.d.mts} +3 -3
  498. package/dist/validation.d.mts +1 -1
  499. package/dist/{value-control-resolver-qKTH1ErF.d.mts → value-control-resolver-DhaqxKmK.d.mts} +2 -2
  500. package/dist/value-control-resolver.d.mts +1 -1
  501. package/dist/variables/effect.d.mts +14 -3
  502. package/dist/variables/effect.mjs +5 -3
  503. package/dist/variables/effect.mjs.map +1 -1
  504. package/dist/variables/keyframes.mjs +1 -1
  505. package/dist/variables/semantic.d.mts +2 -0
  506. package/dist/variables/semantic.mjs +241 -0
  507. package/dist/variables/semantic.mjs.map +1 -0
  508. package/package.json +68 -7
  509. package/skills/ui-authoring/COMPONENTS.md +1 -1
  510. package/skills/ui-authoring/TOKENS.md +1 -1
  511. package/dist/Breadcrumbs-BEYQlGbW.mjs.map +0 -1
  512. package/dist/Card-BoGV5tY2.d.mts +0 -52
  513. package/dist/Card-CKrJtn1f.mjs.map +0 -1
  514. package/dist/CardV2-B2wx1NE3.mjs.map +0 -1
  515. package/dist/Checkbox-DwZEsi7x.mjs.map +0 -1
  516. package/dist/Combobox-CKaVX-32.mjs.map +0 -1
  517. package/dist/DatePicker-D2SfjS-N.mjs.map +0 -1
  518. package/dist/FormControl-DQFefbrI.mjs.map +0 -1
  519. package/dist/IconButton-BnSEV7eR.mjs.map +0 -1
  520. package/dist/Input-D7of_GtJ.mjs.map +0 -1
  521. package/dist/ListBox-jzXQDraS.mjs.map +0 -1
  522. package/dist/LoadingShimmer-a2Hv0kAq.mjs.map +0 -1
  523. package/dist/Menu-DVI8l-4Q.mjs.map +0 -1
  524. package/dist/PageHeader-BpGT-BM0.mjs.map +0 -1
  525. package/dist/Pagination-CVRTcKSG.mjs.map +0 -1
  526. package/dist/Popover-DlXyKYL5.mjs.map +0 -1
  527. package/dist/Radio-DYGEt0FT.mjs.map +0 -1
  528. package/dist/SegmentedControl-DwbltwDQ.mjs.map +0 -1
  529. package/dist/Select-CBVvPyRJ.mjs.map +0 -1
  530. package/dist/Spinner-e725Rxkd.mjs.map +0 -1
  531. package/dist/Sticker-By3F8Aip.mjs.map +0 -1
  532. package/dist/TabBar-CWF65Tv4.mjs.map +0 -1
  533. package/dist/Table-nWd5ZVbm.mjs.map +0 -1
  534. package/dist/TableBox-Bd-H5oyh.mjs.map +0 -1
  535. package/dist/TableControls-BnesnTue.mjs.map +0 -1
  536. package/dist/TechnicalSticker-Ct2WnNzJ.mjs.map +0 -1
  537. package/dist/Text-B0orb-cZ.mjs.map +0 -1
  538. package/dist/Toggle-Do5z1VcO.mjs.map +0 -1
  539. package/dist/Tooltip-DSKGD33G.mjs.map +0 -1
  540. /package/dist/{index-8SLBz2NH.d.mts → index-1-AkepUA.d.mts} +0 -0
  541. /package/dist/{index-Bt4QNofW.d.mts → index-BFnNtGdX.d.mts} +0 -0
  542. /package/dist/{index-BwAfCVZH2.d.mts → index-BO_854F2.d.mts} +0 -0
  543. /package/dist/{index-BwFl_eS0.d.mts → index-BPiqSRRl.d.mts} +0 -0
  544. /package/dist/{index-CCKHlTA4.d.mts → index-BSVhZrWN.d.mts} +0 -0
  545. /package/dist/{index-CDGG7lCB.d.mts → index-BYd3Btr1.d.mts} +0 -0
  546. /package/dist/{index-CRo77wc3.d.mts → index-B_BBnMou.d.mts} +0 -0
  547. /package/dist/{index-CX869wwk.d.mts → index-BrGZHEgX.d.mts} +0 -0
  548. /package/dist/{index-D13oYj4_.d.mts → index-Ci-uuV07.d.mts} +0 -0
  549. /package/dist/{index-D4DUvwPf.d.mts → index-CknANNvQ2.d.mts} +0 -0
  550. /package/dist/{index-D7UbuJwP.d.mts → index-CtJuGxUp.d.mts} +0 -0
  551. /package/dist/{index-DA6_cwf8.d.mts → index-CuYZJcK3.d.mts} +0 -0
  552. /package/dist/{index-DMRtRo7y.d.mts → index-DWfPppPU.d.mts} +0 -0
  553. /package/dist/{index-Dflz2i1X.d.mts → index-DYX_PQ7T2.d.mts} +0 -0
  554. /package/dist/{index-DvmLVvRD.d.mts → index-DZlqSwCF.d.mts} +0 -0
  555. /package/dist/{index-Es5nKSSL.d.mts → index-De7MV8-j.d.mts} +0 -0
  556. /package/dist/{index-Wc1llEvP.d.mts → index-Deol7ZWO.d.mts} +0 -0
  557. /package/dist/{index-dhjtMp5F.d.mts → index-N-OgGgfF.d.mts} +0 -0
  558. /package/dist/{index-e6k85DKM.d.mts → index-VWno75SQ.d.mts} +0 -0
  559. /package/dist/{index-ehD5GjMH.d.mts → index-hcx6LMSC.d.mts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"methodChain.mjs","names":["updatedParse","UpdatedSyntaxError"],"sources":["../../lib/methodChain.ts"],"sourcesContent":["import { last } from 'lodash-es';\n\nimport {\n parse as updatedParse,\n SyntaxError as UpdatedSyntaxError,\n} from '@persona/design-system/components/SmartTextInput/parser/method-chain/parser';\nimport { ASTNodeType } from '@persona/design-system/components/SmartTextInput/parser/method-chain/types';\n\nimport { reportError } from './errorReporter';\nimport { type JsonSchema, JsonSchemaTypes } from './jsonSchema';\nimport { normalizeChain } from './methodChainNormalize';\nimport type {\n Chain,\n FunctionNode,\n CustomFunctionNode,\n IdentifierNode,\n StringNode,\n NumberNode,\n ArrayNode,\n FunctionParamType,\n MethodChainNode,\n} from './methodChainTypes';\n\n// @ts-expect-error Returns never so the compiler checks exhaustiveness, but doesn't throw so a malformed\n// chain degrades instead of breaking render.\nfunction assertNever(value: never): never {\n const dump = typeof value === 'object' ? JSON.stringify(value) : value;\n reportError(new TypeError(`assertNever non-exhaustive match: ${dump}`));\n}\n\n// Re-export types for backward compatibility\nexport {\n Chain,\n FunctionNode,\n CustomFunctionNode,\n IdentifierNode,\n StringNode,\n NumberNode,\n ArrayNode,\n FunctionParamType,\n MethodChainNode,\n};\n\nexport const methodChainCache: { [key: string]: Chain } = {};\n\nexport const MethodChainNodeTypes = {\n Chain: ASTNodeType.Chain,\n String: ASTNodeType.String,\n Number: ASTNodeType.Number,\n Identifier: ASTNodeType.Identifier,\n Function: ASTNodeType.Function,\n CustomFunction: ASTNodeType.CustomFunction,\n Array: ASTNodeType.Array,\n} as const;\n\nexport const EMPTY_METHOD_CHAIN: Chain = {\n type: MethodChainNodeTypes.Chain,\n links: [],\n};\n\ntype MethodChainLiteral = string | number | (string | number)[];\n\nexport const isFunctionNode = (node: MethodChainNode): node is FunctionNode =>\n node.type === MethodChainNodeTypes.Function;\n\nexport const isCustomFunctionNode = (node: MethodChainNode): node is CustomFunctionNode =>\n node.type === MethodChainNodeTypes.CustomFunction;\n\nexport const isIdentifierNode = (node: MethodChainNode): node is IdentifierNode =>\n node.type === MethodChainNodeTypes.Identifier;\n\nexport const isStringNode = (node: FunctionParamType): node is StringNode =>\n node.type === MethodChainNodeTypes.String;\n\nexport const isArrayNode = (node: FunctionParamType): node is ArrayNode =>\n node.type === MethodChainNodeTypes.Array;\n\nexport const containsFunctionNode = (methodChain: Chain, ...functionNames: string[]): boolean =>\n methodChain.links.some((link) => isFunctionNode(link) && functionNames.includes(link.name));\n\n/**\n * Returns true if the string contains any function node (e.g. `.at(...)`) when parsed\n * as a method chain. Use this to detect whether a field path must be treated as an\n * opaque key rather than split on `.` for Lodash set/get operations.\n */\nexport const pathContainsFunctionNode = (path: string): boolean => {\n try {\n const chain = parseMethodChain(path);\n return chain.links.some(\n (link) =>\n link.type === MethodChainNodeTypes.Function ||\n link.type === MethodChainNodeTypes.CustomFunction,\n );\n } catch {\n return false;\n }\n};\n\nexport const isEmpty = (methodChain: Chain): boolean => methodChain.links.length === 0;\n\nexport const getFunctionParams = (\n methodChain: Chain,\n ...functionNames: string[]\n): Record<string, MethodChainLiteral[]> => {\n return Object.fromEntries(\n methodChain.links\n .filter((link) => isFunctionNode(link))\n .filter((link) => functionNames.includes(link.name))\n .map((link) => [link.name, flattenParamsToString(link.params)]),\n );\n};\n\nexport const removeFunctionNode = (methodChain: Chain, functionName: string): Chain => {\n return {\n type: MethodChainNodeTypes.Chain,\n links: methodChain.links.filter(\n (link) => link.type !== MethodChainNodeTypes.Function || link.name !== functionName,\n ),\n };\n};\n\nconst flattenParamsToString = (params: FunctionParamType[]): MethodChainLiteral[] => {\n const result: MethodChainLiteral[] = [];\n\n for (const param of params) {\n switch (param.type) {\n case MethodChainNodeTypes.Chain:\n result.push(...flattenChainToString(param));\n break;\n case MethodChainNodeTypes.String:\n case MethodChainNodeTypes.Number:\n result.push(param.value);\n break;\n case MethodChainNodeTypes.Array:\n result.push(param.items.map((item) => item.value));\n break;\n }\n }\n\n return result;\n};\n\nconst flattenChainToString = (methodChain: Chain): MethodChainLiteral[] =>\n methodChain.links\n .map((link) => {\n switch (link.type) {\n case MethodChainNodeTypes.Function:\n case MethodChainNodeTypes.CustomFunction:\n return flattenParamsToString(link.params);\n case MethodChainNodeTypes.Identifier:\n return link.name;\n }\n })\n .flat();\n\nexport const isValid = (methodChain: string): boolean => {\n try {\n parseMethodChain(methodChain);\n return true;\n } catch {\n return false;\n }\n};\n\n/**\n * The parsed chain, or undefined when it will not parse. Callers that read a chain while it is being\n * authored hold half-typed input, where a throw is noise rather than an error.\n */\nexport const tryParseMethodChain = (methodChain: string): Chain | undefined => {\n try {\n return parseMethodChain(methodChain);\n } catch {\n return undefined;\n }\n};\n\n/** The object a chain is rooted at: `current_case.inquiries` -> `current_case`. */\nexport const methodChainRootName = (methodChain: string): string | undefined => {\n const [root] = tryParseMethodChain(methodChain)?.links ?? [];\n return root && isIdentifierNode(root) ? root.name : undefined;\n};\n\nexport const parseMethodChain = (methodChain: string): Chain => {\n if (!methodChain || methodChain === '') {\n return EMPTY_METHOD_CHAIN;\n }\n\n if (!methodChainCache[methodChain]) {\n methodChainCache[methodChain] = normalizeChain(updatedParse(methodChain, { strict: true }));\n }\n return methodChainCache[methodChain];\n};\n\nconst memberToString = (value: string): string => {\n return `'${value.replace(/'/g, \"\\\\'\")}'`;\n};\n\n// Number#toString gives the shortest decimal string that round-trips back to the same\n// float64, but for magnitudes below 1e-6 (or above 1e21) it switches to exponential\n// notation (e.g. `0.0000001` -> \"1e-7\"), which the method chain grammar's plain-decimal\n// literal can't parse. Expand that exponential form back into plain decimal by shifting\n// its digits, rather than capping fraction digits (e.g. via toLocaleString), which silently\n// rounds magnitudes below the cap to \"0\" instead of reproducing them.\nconst expandExponentialNotation = (str: string): string => {\n const match = /^(-?)(\\d)(?:\\.(\\d+))?e([+-]\\d+)$/.exec(str);\n if (!match) {\n return str;\n }\n const [, sign, leadingDigit, fractionDigits = '', exponentStr] = match;\n const digits = leadingDigit + fractionDigits;\n const exponent = Number(exponentStr);\n\n if (exponent < 0) {\n return `${sign}0.${'0'.repeat(-exponent - 1)}${digits}`;\n }\n // Positive exponential notation only appears at exponent >= 21 (Number#toString's own\n // threshold), while a double's mantissa never carries more than 17 significant digits,\n // so the exponent always reaches past the end of `digits` — there's no case where the\n // decimal point lands inside them.\n return `${sign}${digits}${'0'.repeat(exponent - fractionDigits.length)}`;\n};\n\nconst numberLiteralToString = (value: number): string => {\n // The grammar has no literal for Infinity/NaN; render/label call sites have no way to\n // recover from a throw, so fall back to JS's own string form instead of crashing them.\n if (!Number.isFinite(value)) {\n return `${value}`;\n }\n\n const str = value.toString();\n return /e/i.test(str) ? expandExponentialNotation(str) : str;\n};\n\nexport const methodChainToString = (\n methodChain: Chain | StringNode | NumberNode | ArrayNode,\n): string => {\n switch (methodChain.type) {\n case MethodChainNodeTypes.String:\n return methodChain.value;\n case MethodChainNodeTypes.Number:\n return numberLiteralToString(methodChain.value);\n case MethodChainNodeTypes.Array:\n return `[${methodChain.items\n .map((item) =>\n item.type === MethodChainNodeTypes.String\n ? memberToString(item.value)\n : `#${numberLiteralToString(item.value)}`,\n )\n .join(', ')}]`;\n default: {\n const regex = new RegExp('^@?[a-zA-Z0-9_-]+$');\n return methodChain.links\n .map((link, index) => {\n switch (link.type) {\n case MethodChainNodeTypes.Identifier: {\n const fullName = `${link.prefix ?? ''}${link.name}`;\n return index === 0\n ? fullName\n : regex.test(fullName)\n ? `.${fullName}`\n : `['${fullName.replace(/'/g, \"\\\\'\")}']`;\n }\n case MethodChainNodeTypes.Function: {\n return `.${link.name}(${link.params\n .map((param) => {\n switch (param.type) {\n case MethodChainNodeTypes.String:\n return memberToString(param.value);\n case MethodChainNodeTypes.Number:\n return `#${numberLiteralToString(param.value)}`;\n case MethodChainNodeTypes.Chain:\n case MethodChainNodeTypes.Array:\n return methodChainToString(param);\n }\n })\n .join(', ')})`;\n }\n case MethodChainNodeTypes.CustomFunction: {\n const paramStr = link.params\n .map((param) => {\n switch (param.type) {\n case MethodChainNodeTypes.String:\n return memberToString(param.value);\n case MethodChainNodeTypes.Number:\n return `#${numberLiteralToString(param.value)}`;\n case MethodChainNodeTypes.Chain:\n case MethodChainNodeTypes.Array:\n return methodChainToString(param);\n }\n })\n .join(', ');\n return [\n index === 0 ? '' : '.',\n `@${link.name}`,\n link.params.length === 0 ? '' : `(${paramStr})`,\n ].join('');\n }\n default:\n assertNever(link);\n }\n })\n .join('');\n }\n }\n};\n\nexport const appendedMethodChain = (\n parentChain: Chain,\n appended: string | MethodChainNode,\n): Chain => {\n const buildNode = (name: string): MethodChainNode => {\n if (name.startsWith('@')) {\n return { type: MethodChainNodeTypes.CustomFunction, name: name.slice(1), params: [] };\n }\n return { type: MethodChainNodeTypes.Identifier, name };\n };\n\n return {\n type: MethodChainNodeTypes.Chain,\n links: [...parentChain.links, typeof appended === 'string' ? buildNode(appended) : appended],\n };\n};\n\nexport const parseWithPartialOption = (\n path: string,\n): { methodChain: Chain; partial: string; valid: boolean } => {\n if (isValid(path)) {\n const methodChain = parseMethodChain(path);\n\n return {\n methodChain: {\n type: MethodChainNodeTypes.Chain,\n links: methodChain.links.slice(0, methodChain.links.length - 1),\n },\n partial: last(methodChain.links)?.name || '',\n valid: true,\n };\n }\n\n const rawParse = (input: string): Chain => {\n return normalizeChain(updatedParse(input, { strict: true }));\n };\n\n try {\n if (path.endsWith('.')) {\n return {\n methodChain: rawParse(path.slice(0, -1)),\n partial: '',\n valid: true,\n };\n }\n\n if (path.lastIndexOf('[') > path.lastIndexOf(']')) {\n const partialString = path.slice(path.lastIndexOf('[') + 2);\n const partialValue = partialString.endsWith(\"'\") ? partialString.slice(0, -1) : partialString;\n return {\n methodChain: rawParse(path.slice(0, path.lastIndexOf('['))),\n partial: partialValue,\n valid: true,\n };\n }\n } catch {\n /* empty */\n }\n\n return {\n methodChain: EMPTY_METHOD_CHAIN,\n partial: path,\n valid: false,\n };\n};\n\n// Check if the path can be parsed as legacy method chain format.\n// Normative means all the name parts are\n// 1. delimited by only dots and\n// 2. only contain alphanumeric characters, underscores, and hyphens.\nexport const pathIsNormative = (path: string): boolean => {\n return path.split('.').every((part) => /^[a-zA-Z0-9_-]+$/.test(part));\n};\nexport const getSyntaxError = (): typeof UpdatedSyntaxError => UpdatedSyntaxError;\n\nexport const methodChainNodeToJsonSchema = (\n node: StringNode | NumberNode | ArrayNode,\n): JsonSchema | null => {\n if (node.type === MethodChainNodeTypes.String) {\n return {\n type: JsonSchemaTypes.String,\n };\n } else if (node.type === MethodChainNodeTypes.Number) {\n return {\n type: JsonSchemaTypes.Number,\n };\n } else if (node.type === MethodChainNodeTypes.Array) {\n // Determine the items schema based on the first item type\n // For simplicity, assume all items are the same type\n if (node.items.length > 0) {\n const firstItem = node.items[0];\n const itemSchema: JsonSchema =\n firstItem.type === MethodChainNodeTypes.String\n ? { type: JsonSchemaTypes.String }\n : { type: JsonSchemaTypes.Number };\n\n return {\n type: JsonSchemaTypes.Array,\n items: itemSchema,\n };\n } else {\n return {\n type: JsonSchemaTypes.Array,\n items: { type: JsonSchemaTypes.String },\n };\n }\n }\n\n return null;\n};\n"],"mappings":";;;;;;;AAyBA,SAAS,YAAY,OAAqB;CACxC,MAAM,OAAO,OAAO,UAAU,WAAW,KAAK,UAAU,MAAM,GAAG;AACjE,6BAAY,IAAI,UAAU,qCAAqC,OAAO,CAAC;;AAgBzE,MAAa,mBAA6C,EAAE;AAE5D,MAAa,uBAAuB;CAClC,OAAA;CACA,QAAA;CACA,QAAA;CACA,YAAA;CACA,UAAA;CACA,gBAAA;CACA,OAAA;CACD;AAED,MAAa,qBAA4B;CACvC,MAAM,qBAAqB;CAC3B,OAAO,EAAE;CACV;AAID,MAAa,kBAAkB,SAC7B,KAAK,SAAS,qBAAqB;AAErC,MAAa,wBAAwB,SACnC,KAAK,S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AG,cAAc,MAAM,GAAG,GAAG,GAAG;AAChF,UAAO;IACL,aAAa,SAAS,KAAK,MAAM,GAAG,KAAK,YAAY,IAAI,CAAC,CAAC;IAC3D,SAAS;IACT,OAAO;IACR;;SAEG;AAIR,QAAO;EACL,aAAa;EACb,SAAS;EACT,OAAO;EACR;;AAOH,MAAa,mBAAmB,SAA0B;AACxD,QAAO,KAAK,MAAM,IAAI,CAAC,OAAO,SAAS,mBAAmB,KAAK,KAAK,CAAC;;AAEvE,MAAa,uBAAkDC;AAE/D,MAAa,+BACX,SACsB;AACtB,KAAI,KAAK,SAAS,qBAAqB,OACrC,QAAO,EACL,MAAA,UACD;UACQ,KAAK,SAAS,qBAAqB,OAC5C,QAAO,EACL,MAAA,UACD;UACQ,KAAK,SAAS,qBAAqB,MAG5C,KAAI,KAAK,MAAM,SAAS,EAOtB,QAAO;EACL,MAAA;EACA,OARgB,KAAK,MAAM,GAEjB,SAAS,qBAAqB,SACpC,EAAE,MAAA,UAA8B,GAChC,EAAE,MAAA,UAA8B;EAKrC;KAED,QAAO;EACL,MAAA;EACA,OAAO,EAAE,MAAA,UAA8B;EACxC;AAIL,QAAO"}
@@ -0,0 +1,14 @@
1
+ import { ASTArrayNode, ASTChain, ASTNumberNode, ASTStringNode } from "../components/SmartTextInput/parser/method-chain/types.mjs";
2
+ import { Chain, FunctionParamType, NumberNode, StringNode } from "./methodChainTypes.mjs";
3
+
4
+ //#region lib/methodChainNormalize.d.ts
5
+ declare function normalizeArrayItem(item: ASTStringNode | ASTNumberNode): StringNode | NumberNode;
6
+ declare function normalizeFunctionParam(param: ASTChain | ASTStringNode | ASTNumberNode | ASTArrayNode): FunctionParamType;
7
+ /**
8
+ * Normalizes a parsed method chain AST to match the semantic types. Normalization removes
9
+ * information from the AST that is not needed for Persona-domain or schema-based logic.
10
+ */
11
+ declare function normalizeChain(chain: ASTChain): Chain;
12
+ //#endregion
13
+ export { normalizeArrayItem, normalizeChain, normalizeFunctionParam };
14
+ //# sourceMappingURL=methodChainNormalize.d.mts.map
@@ -0,0 +1,53 @@
1
+ import { isASTMethodChainNode, isAnyASTFunctionNode, isRealASTFunctionParamType } from "../components/SmartTextInput/parser/method-chain/types.mjs";
2
+ //#region lib/methodChainNormalize.ts
3
+ function normalizeArrayItem(item) {
4
+ if (item.type === "string") return {
5
+ type: item.type,
6
+ value: item.value
7
+ };
8
+ else return {
9
+ type: item.type,
10
+ value: item.value
11
+ };
12
+ }
13
+ function normalizeFunctionParam(param) {
14
+ if (param.type === "chain") return normalizeChain(param);
15
+ else if (param.type === "array") return {
16
+ type: param.type,
17
+ items: param.children.map(normalizeArrayItem)
18
+ };
19
+ else if (param.type === "string") return {
20
+ type: param.type,
21
+ value: param.value
22
+ };
23
+ else return {
24
+ type: param.type,
25
+ value: param.value
26
+ };
27
+ }
28
+ function normalizeChainNode(link) {
29
+ if (isAnyASTFunctionNode(link)) return {
30
+ type: link.type,
31
+ name: link.name,
32
+ params: link.children.filter(isRealASTFunctionParamType).map(normalizeFunctionParam)
33
+ };
34
+ else return {
35
+ type: link.type,
36
+ name: link.name,
37
+ prefix: link.prefix
38
+ };
39
+ }
40
+ /**
41
+ * Normalizes a parsed method chain AST to match the semantic types. Normalization removes
42
+ * information from the AST that is not needed for Persona-domain or schema-based logic.
43
+ */
44
+ function normalizeChain(chain) {
45
+ return {
46
+ type: "chain",
47
+ links: chain.children.filter(isASTMethodChainNode).map(normalizeChainNode)
48
+ };
49
+ }
50
+ //#endregion
51
+ export { normalizeArrayItem, normalizeChain, normalizeFunctionParam };
52
+
53
+ //# sourceMappingURL=methodChainNormalize.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"methodChainNormalize.mjs","names":[],"sources":["../../lib/methodChainNormalize.ts"],"sourcesContent":["import {\n type ASTChain,\n type ASTStringNode,\n type ASTNumberNode,\n type ASTArrayNode,\n type ASTMethodChainNode,\n ASTNodeType,\n isASTMethodChainNode,\n isAnyASTFunctionNode,\n isRealASTFunctionParamType,\n} from '@persona/design-system/components/SmartTextInput/parser/method-chain/types';\n\nimport type {\n FunctionParamType,\n MethodChainNode,\n NumberNode,\n StringNode,\n Chain,\n} from './methodChainTypes';\n\nexport function normalizeArrayItem(item: ASTStringNode | ASTNumberNode): StringNode | NumberNode {\n if (item.type === 'string') {\n return {\n type: item.type,\n value: item.value,\n };\n } else {\n return {\n type: item.type,\n value: item.value,\n };\n }\n}\n\nexport function normalizeFunctionParam(\n param: ASTChain | ASTStringNode | ASTNumberNode | ASTArrayNode,\n): FunctionParamType {\n if (param.type === 'chain') {\n return normalizeChain(param);\n } else if (param.type === 'array') {\n return {\n type: param.type,\n items: param.children.map(normalizeArrayItem),\n };\n } else if (param.type === 'string') {\n return {\n type: param.type,\n value: param.value,\n };\n } else {\n return {\n type: param.type,\n value: param.value,\n };\n }\n}\n\nfunction normalizeChainNode(link: ASTMethodChainNode): MethodChainNode {\n if (isAnyASTFunctionNode(link)) {\n return {\n type: link.type,\n name: link.name,\n params: link.children.filter(isRealASTFunctionParamType).map(normalizeFunctionParam),\n };\n } else {\n return {\n type: link.type,\n name: link.name,\n prefix: link.prefix,\n };\n }\n}\n\n/**\n * Normalizes a parsed method chain AST to match the semantic types. Normalization removes\n * information from the AST that is not needed for Persona-domain or schema-based logic.\n */\nexport function normalizeChain(chain: ASTChain): Chain {\n return {\n type: ASTNodeType.Chain,\n links: chain.children.filter(isASTMethodChainNode).map(normalizeChainNode),\n };\n}\n"],"mappings":";;AAoBA,SAAgB,mBAAmB,MAA8D;AAC/F,KAAI,KAAK,SAAS,SAChB,QAAO;EACL,MAAM,KAAK;EACX,OAAO,KAAK;EACb;KAED,QAAO;EACL,MAAM,KAAK;EACX,OAAO,KAAK;EACb;;AAIL,SAAgB,uBACd,OACmB;AACnB,KAAI,MAAM,SAAS,QACjB,QAAO,eAAe,MAAM;UACnB,MAAM,SAAS,QACxB,QAAO;EACL,MAAM,MAAM;EACZ,OAAO,MAAM,SAAS,IAAI,mBAAmB;EAC9C;UACQ,MAAM,SAAS,SACxB,QAAO;EACL,MAAM,MAAM;EACZ,OAAO,MAAM;EACd;KAED,QAAO;EACL,MAAM,MAAM;EACZ,OAAO,MAAM;EACd;;AAIL,SAAS,mBAAmB,MAA2C;AACrE,KAAI,qBAAqB,KAAK,CAC5B,QAAO;EACL,MAAM,KAAK;EACX,MAAM,KAAK;EACX,QAAQ,KAAK,SAAS,OAAO,2BAA2B,CAAC,IAAI,uBAAuB;EACrF;KAED,QAAO;EACL,MAAM,KAAK;EACX,MAAM,KAAK;EACX,QAAQ,KAAK;EACd;;;;;;AAQL,SAAgB,eAAe,OAAwB;AACrD,QAAO;EACL,MAAA;EACA,OAAO,MAAM,SAAS,OAAO,qBAAqB,CAAC,IAAI,mBAAmB;EAC3E"}
@@ -0,0 +1,23 @@
1
+ import { ASTArrayNode, ASTChain, ASTCustomFunctionNode, ASTFunctionNode, ASTIdentifierNode, ASTNumberNode, ASTStringNode } from "../components/SmartTextInput/parser/method-chain/types.mjs";
2
+
3
+ //#region lib/methodChainTypes.d.ts
4
+ type MethodChainNode = IdentifierNode | FunctionNode | CustomFunctionNode;
5
+ type FunctionParamType = Chain | StringNode | NumberNode | ArrayNode;
6
+ type Chain = Omit<ASTChain, 'children' | 'start' | 'end'> & {
7
+ links: MethodChainNode[];
8
+ };
9
+ type StringNode = Omit<ASTStringNode, 'start' | 'end'>;
10
+ type NumberNode = Omit<ASTNumberNode, 'start' | 'end'>;
11
+ type ArrayNode = Omit<ASTArrayNode, 'children' | 'start' | 'end'> & {
12
+ items: (StringNode | NumberNode)[];
13
+ };
14
+ type IdentifierNode = Omit<ASTIdentifierNode, 'start' | 'end'>;
15
+ type FunctionNode = Omit<ASTFunctionNode, 'children' | 'start' | 'end'> & {
16
+ params: FunctionParamType[];
17
+ };
18
+ type CustomFunctionNode = Omit<ASTCustomFunctionNode, 'children' | 'start' | 'end'> & {
19
+ params: FunctionParamType[];
20
+ };
21
+ //#endregion
22
+ export { ArrayNode, Chain, CustomFunctionNode, FunctionNode, FunctionParamType, IdentifierNode, MethodChainNode, NumberNode, StringNode };
23
+ //# sourceMappingURL=methodChainTypes.d.mts.map
File without changes
@@ -0,0 +1,2 @@
1
+ import { $ as FunctionConvertedTypeSchema, Q as CollectionMetaJsonSchema, at as ObjectSchemaMap, et as FunctionGenericParameterSchema, it as GenericType, nt as FunctionParameterJsonSchema, rt as FunctionReturnTypeJsonSchema, tt as FunctionJsonSchema } from "../jsonSchema-B1VonQij.mjs";
2
+ export { CollectionMetaJsonSchema, FunctionConvertedTypeSchema, FunctionGenericParameterSchema, FunctionJsonSchema, FunctionParameterJsonSchema, FunctionReturnTypeJsonSchema, GenericType, ObjectSchemaMap };
File without changes
@@ -1,4 +1,4 @@
1
- import { t as PseudoClassProps } from "../PseudoClassProps-BPdn-ofQ.mjs";
1
+ import { t as PseudoClassProps } from "../PseudoClassProps-DnlHhW5u.mjs";
2
2
 
3
3
  //#region lib/pseudoClass.d.ts
4
4
  declare const isDisabled: ({
@@ -1 +1 @@
1
- {"version":3,"file":"selectHelper.mjs","names":[],"sources":["../../lib/selectHelper.ts"],"sourcesContent":["import { act, fireEvent, screen } from '@testing-library/react';\n\n/**\n * Click a PDS Select (Radix UI) option using fireEvent.click inside act().\n *\n * userEvent.click doesn't work for Radix SelectItem in React 18 + JSDOM because it fires\n * pointer events that set pointerTypeRef to \"mouse\", routing selection through onPointerUp\n * instead of onClick — and that path doesn't flush React state within act() due to focus()\n * calls from onPointerMove interfering with the concurrent scheduler. fireEvent.click\n * bypasses all of this cleanly.\n */\n// eslint-disable-next-line @persona-id/rtl-user-event\nexport const clickSelectItem = async (name: RegExp | string) => {\n await act(async () => {\n // eslint-disable-next-line @persona-id/rtl-user-event\n fireEvent.click(screen.getByRole('option', { name }));\n });\n};\n"],"mappings":";;;;;;;;;;;AAYA,MAAa,kBAAkB,OAAO,SAA0B;AAC9D,OAAM,IAAI,YAAY;AAEpB,YAAU,MAAM,OAAO,UAAU,UAAU,EAAE,MAAM,CAAC,CAAC;GACrD"}
1
+ {"version":3,"file":"selectHelper.mjs","names":[],"sources":["../../lib/selectHelper.ts"],"sourcesContent":["import { act, fireEvent, screen } from '@testing-library/react';\n\n/**\n * Click a PDS Select (Radix UI) option using fireEvent.click inside act().\n *\n * userEvent.click doesn't work for Radix SelectItem in React 18 + JSDOM because it fires\n * pointer events that set pointerTypeRef to \"mouse\", routing selection through onPointerUp\n * instead of onClick — and that path doesn't flush React state within act() due to focus()\n * calls from onPointerMove interfering with the concurrent scheduler. fireEvent.click\n * bypasses all of this cleanly.\n */\nexport const clickSelectItem = async (name: RegExp | string) => {\n await act(async () => {\n fireEvent.click(screen.getByRole('option', { name }));\n });\n};\n"],"mappings":";;;;;;;;;;;AAWA,MAAa,kBAAkB,OAAO,SAA0B;AAC9D,OAAM,IAAI,YAAY;AACpB,YAAU,MAAM,OAAO,UAAU,UAAU,EAAE,MAAM,CAAC,CAAC;GACrD"}
@@ -0,0 +1,2 @@
1
+ import { a as semanticTokens, i as semanticOnly, n as SemanticFallback, r as semanticColor, t as MaybeSemanticTheme } from "../semanticColor-DkVQjcbc.mjs";
2
+ export { MaybeSemanticTheme, SemanticFallback, semanticColor, semanticOnly, semanticTokens };
@@ -0,0 +1,17 @@
1
+ //#region lib/semanticColor.ts
2
+ /**
3
+ * Reads a semantic token, falling back to `legacy` when the theme has no semantic namespace.
4
+ * `legacy` must be the component's pre-migration expression (not a generic default) so themes
5
+ * without semantic tokens keep rendering exactly as before. It is evaluated by the caller, so a
6
+ * component Relay renders must pass a constant: Relay's theme has no `theme.color` either.
7
+ * `theme` may be `undefined` (`useTheme()` outside a provider).
8
+ */
9
+ const semanticColor = (theme, token, legacy) => theme?.semantic?.[token] ?? legacy;
10
+ /** For palettes derived from several tokens; callers must branch and keep the legacy path intact. */
11
+ const semanticTokens = (theme) => theme?.semantic;
12
+ /** Interpolation for declarations that exist only under semantic theming; emits nothing otherwise. */
13
+ const semanticOnly = (build) => ({ theme }) => theme?.semantic ? build(theme.semantic) : void 0;
14
+ //#endregion
15
+ export { semanticColor, semanticOnly, semanticTokens };
16
+
17
+ //# sourceMappingURL=semanticColor.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semanticColor.mjs","names":[],"sources":["../../lib/semanticColor.ts"],"sourcesContent":["import type { CssColor } from 'design-system/lib/color';\nimport type { CssPercentage, SemanticTokens } from 'design-system/variables/semantic';\n\n/** PDS components also render under foreign themes (Relay, darkTheme), so `semantic` is optional. */\nexport interface MaybeSemanticTheme {\n semantic?: SemanticTokens;\n}\n\n/** Colour tokens also accept a computed `CssColor` fallback; percentage tokens only their own type. */\nexport type SemanticFallback<K extends keyof SemanticTokens> =\n | SemanticTokens[K]\n | (SemanticTokens[K] extends CssPercentage ? never : CssColor);\n\n/**\n * Reads a semantic token, falling back to `legacy` when the theme has no semantic namespace.\n * `legacy` must be the component's pre-migration expression (not a generic default) so themes\n * without semantic tokens keep rendering exactly as before. It is evaluated by the caller, so a\n * component Relay renders must pass a constant: Relay's theme has no `theme.color` either.\n * `theme` may be `undefined` (`useTheme()` outside a provider).\n */\nexport const semanticColor = <K extends keyof SemanticTokens>(\n theme: MaybeSemanticTheme | undefined,\n token: K,\n legacy: SemanticFallback<K>,\n): SemanticFallback<K> => theme?.semantic?.[token] ?? legacy;\n\n/** For palettes derived from several tokens; callers must branch and keep the legacy path intact. */\nexport const semanticTokens = (theme: MaybeSemanticTheme | undefined): SemanticTokens | undefined =>\n theme?.semantic;\n\n/** Interpolation for declarations that exist only under semantic theming; emits nothing otherwise. */\nexport const semanticOnly =\n <T>(build: (tokens: SemanticTokens) => T) =>\n ({ theme }: { theme?: MaybeSemanticTheme }): T | undefined =>\n theme?.semantic ? build(theme.semantic) : undefined;\n"],"mappings":";;;;;;;;AAoBA,MAAa,iBACX,OACA,OACA,WACwB,OAAO,WAAW,UAAU;;AAGtD,MAAa,kBAAkB,UAC7B,OAAO;;AAGT,MAAa,gBACP,WACH,EAAE,YACD,OAAO,WAAW,MAAM,MAAM,SAAS,GAAG,KAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useControlled.mjs","names":[],"sources":["../../lib/useControlled.ts"],"sourcesContent":["import { useCallback, useRef, useState } from 'react';\n\n/**\n * Hook to allow components that can be controlled and uncontrolled to get and set state.\n *\n * Inspired by MUI's neat controlled util\n * https://github.com/mui-org/material-ui/blob/master/packages/mui-utils/src/useControlled.js\n */\nexport default function useControlled<T>({\n controlledValue,\n default: defaultProp,\n}: {\n controlledValue?: T;\n default: T;\n}) {\n // eslint-disable-next-line @persona-id/eqeq-null-undefined\n const { current: isControlled } = useRef(controlledValue !== undefined);\n const [valueState, setValue] = useState<T | undefined>(defaultProp);\n const value = isControlled ? controlledValue : valueState;\n\n const setValueIfUncontrolled = useCallback((newValue: T | undefined) => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n\n return [value, setValueIfUncontrolled] as const;\n}\n"],"mappings":";;;;;;;;AAQA,SAAwB,cAAiB,EACvC,iBACA,SAAS,eAIR;CAED,MAAM,EAAE,SAAS,iBAAiB,OAAO,oBAAoB,KAAA,EAAU;CACvE,MAAM,CAAC,YAAY,YAAY,SAAwB,YAAY;AASnE,QAAO,CARO,eAAe,kBAAkB,YAEhB,aAAa,aAA4B;AACtE,MAAI,CAAC,aACH,UAAS,SAAS;IAEnB,EAAE,CAEgC,CAAC"}
1
+ {"version":3,"file":"useControlled.mjs","names":[],"sources":["../../lib/useControlled.ts"],"sourcesContent":["import { useCallback, useRef, useState } from 'react';\n\n/**\n * Hook to allow components that can be controlled and uncontrolled to get and set state.\n *\n * Inspired by MUI's neat controlled util\n * https://github.com/mui-org/material-ui/blob/master/packages/mui-utils/src/useControlled.js\n */\nexport default function useControlled<T>({\n controlledValue,\n default: defaultProp,\n}: {\n controlledValue?: T;\n default: T;\n}) {\n const { current: isControlled } = useRef(controlledValue !== undefined);\n const [valueState, setValue] = useState<T | undefined>(defaultProp);\n const value = isControlled ? controlledValue : valueState;\n\n const setValueIfUncontrolled = useCallback((newValue: T | undefined) => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n\n return [value, setValueIfUncontrolled] as const;\n}\n"],"mappings":";;;;;;;;AAQA,SAAwB,cAAiB,EACvC,iBACA,SAAS,eAIR;CACD,MAAM,EAAE,SAAS,iBAAiB,OAAO,oBAAoB,KAAA,EAAU;CACvE,MAAM,CAAC,YAAY,YAAY,SAAwB,YAAY;AASnE,QAAO,CARO,eAAe,kBAAkB,YAEhB,aAAa,aAA4B;AACtE,MAAI,CAAC,aACH,UAAS,SAAS;IAEnB,EAAE,CAEgC,CAAC"}
@@ -6,4 +6,4 @@ declare enum MessageType {
6
6
  }
7
7
  //#endregion
8
8
  export { MessageType as t };
9
- //# sourceMappingURL=message-CyxgAWZl.d.mts.map
9
+ //# sourceMappingURL=message-DfEpU8lV.d.mts.map
@@ -1,11 +1,11 @@
1
- import { t as PseudoClassProps } from "../PseudoClassProps-BPdn-ofQ.mjs";
1
+ import { t as PseudoClassProps } from "../PseudoClassProps-DnlHhW5u.mjs";
2
2
  import * as _$styled_components0 from "styled-components";
3
3
 
4
4
  //#region mixins/focus.d.ts
5
- declare const focusStyle: _$styled_components0.FlattenSimpleInterpolation;
6
- declare const focusOutline: _$styled_components0.FlattenSimpleInterpolation;
5
+ declare const focusStyle: _$styled_components0.FlattenInterpolation<_$styled_components0.ThemeProps<any>>;
6
+ declare const focusOutline: _$styled_components0.FlattenInterpolation<_$styled_components0.ThemeProps<any>>;
7
7
  declare const focusOutlineControlled: _$styled_components0.FlattenInterpolation<_$styled_components0.ThemedStyledProps<PseudoClassProps, any>>;
8
- declare const focusWithinOutline: _$styled_components0.FlattenSimpleInterpolation;
8
+ declare const focusWithinOutline: _$styled_components0.FlattenInterpolation<_$styled_components0.ThemeProps<any>>;
9
9
  //#endregion
10
10
  export { focusOutline, focusOutlineControlled, focusStyle, focusWithinOutline };
11
11
  //# sourceMappingURL=focus.d.mts.map
@@ -1,17 +1,19 @@
1
- import { r as css } from "../styledComponentsInterop-8zScIQyC.mjs";
1
+ import { r as css } from "../styledComponentsInterop-NxwFjeA4.mjs";
2
+ import { semanticColor } from "../lib/semanticColor.mjs";
2
3
  import { isFocusedVisible, isNotDisabled } from "../lib/pseudoClass.mjs";
3
4
  import { Color } from "@persona/design-tokens";
4
5
  //#region mixins/focus.ts
6
+ const focusColor = (theme) => semanticColor(theme, "BorderFocus", Color.BorderFocus);
5
7
  const focusStyle = css`
6
8
  outline-offset: 1px;
7
- outline: ${Color.BorderFocus} solid 2px;
9
+ outline: ${({ theme }) => focusColor(theme)} solid 2px;
8
10
  `;
9
11
  const focusOutline = css`
10
12
  outline: none;
11
13
 
12
14
  &:focus-visible {
13
15
  outline-offset: 1px;
14
- outline: ${Color.BorderFocus} solid 2px;
16
+ outline: ${({ theme }) => focusColor(theme)} solid 2px;
15
17
  }
16
18
  `;
17
19
  const focusOutlineControlled = css`
@@ -19,13 +21,13 @@ const focusOutlineControlled = css`
19
21
 
20
22
  &${isFocusedVisible}${isNotDisabled} {
21
23
  outline-offset: 1px;
22
- outline: ${Color.BorderFocus} solid 2px;
24
+ outline: ${({ theme }) => focusColor(theme)} solid 2px;
23
25
  }
24
26
  `;
25
27
  const focusWithinOutline = css`
26
28
  &:focus-within {
27
29
  outline-offset: 1px;
28
- outline: ${Color.BorderFocus} solid 2px;
30
+ outline: ${({ theme }) => focusColor(theme)} solid 2px;
29
31
  }
30
32
  `;
31
33
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"focus.mjs","names":[],"sources":["../../mixins/focus.ts"],"sourcesContent":["import { css } from 'styled-components';\n\nimport { Color } from '@persona/design-tokens';\nimport { isFocusedVisible, isNotDisabled } from 'design-system/lib/pseudoClass';\n\nexport const focusStyle = css`\n outline-offset: 1px;\n outline: ${Color.BorderFocus} solid 2px;\n`;\n\nexport const focusOutline = css`\n outline: none;\n\n &:focus-visible {\n outline-offset: 1px;\n outline: ${Color.BorderFocus} solid 2px;\n }\n`;\n\nexport const focusOutlineControlled = css`\n outline: none;\n\n &${isFocusedVisible}${isNotDisabled} {\n outline-offset: 1px;\n outline: ${Color.BorderFocus} solid 2px;\n }\n`;\n\nexport const focusWithinOutline = css`\n &:focus-within {\n outline-offset: 1px;\n outline: ${Color.BorderFocus} solid 2px;\n }\n`;\n"],"mappings":";;;;AAKA,MAAa,aAAa,GAAG;;aAEhB,MAAM,YAAY;;AAG/B,MAAa,eAAe,GAAG;;;;;eAKhB,MAAM,YAAY;;;AAIjC,MAAa,yBAAyB,GAAG;;;KAGpC,mBAAmB,cAAc;;eAEvB,MAAM,YAAY;;;AAIjC,MAAa,qBAAqB,GAAG;;;eAGtB,MAAM,YAAY"}
1
+ {"version":3,"file":"focus.mjs","names":[],"sources":["../../mixins/focus.ts"],"sourcesContent":["import { css } from 'styled-components';\n\nimport { Color } from '@persona/design-tokens';\nimport { isFocusedVisible, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport { type MaybeSemanticTheme, semanticColor } from 'design-system/lib/semanticColor';\n\nconst focusColor = (theme: MaybeSemanticTheme) =>\n semanticColor(theme, 'BorderFocus', Color.BorderFocus);\n\nexport const focusStyle = css`\n outline-offset: 1px;\n outline: ${({ theme }) => focusColor(theme)} solid 2px;\n`;\n\nexport const focusOutline = css`\n outline: none;\n\n &:focus-visible {\n outline-offset: 1px;\n outline: ${({ theme }) => focusColor(theme)} solid 2px;\n }\n`;\n\nexport const focusOutlineControlled = css`\n outline: none;\n\n &${isFocusedVisible}${isNotDisabled} {\n outline-offset: 1px;\n outline: ${({ theme }) => focusColor(theme)} solid 2px;\n }\n`;\n\nexport const focusWithinOutline = css`\n &:focus-within {\n outline-offset: 1px;\n outline: ${({ theme }) => focusColor(theme)} solid 2px;\n }\n`;\n"],"mappings":";;;;;AAMA,MAAM,cAAc,UAClB,cAAc,OAAO,eAAe,MAAM,YAAY;AAExD,MAAa,aAAa,GAAG;;cAEf,EAAE,YAAY,WAAW,MAAM,CAAC;;AAG9C,MAAa,eAAe,GAAG;;;;;gBAKf,EAAE,YAAY,WAAW,MAAM,CAAC;;;AAIhD,MAAa,yBAAyB,GAAG;;;KAGpC,mBAAmB,cAAc;;gBAEtB,EAAE,YAAY,WAAW,MAAM,CAAC;;;AAIhD,MAAa,qBAAqB,GAAG;;;gBAGrB,EAAE,YAAY,WAAW,MAAM,CAAC"}
@@ -1,5 +1,5 @@
1
- import { t as PseudoClassProps } from "../PseudoClassProps-BPdn-ofQ.mjs";
2
- import { i as Variant } from "../theme-Biwx2eJZ.mjs";
1
+ import { o as Variant } from "../theme-D02MOaH6.mjs";
2
+ import { t as PseudoClassProps } from "../PseudoClassProps-DnlHhW5u.mjs";
3
3
  import * as _$styled_components0 from "styled-components";
4
4
 
5
5
  //#region mixins/hoverable.d.ts
@@ -1,8 +1,8 @@
1
- import { r as css } from "../styledComponentsInterop-8zScIQyC.mjs";
1
+ import { r as css } from "../styledComponentsInterop-NxwFjeA4.mjs";
2
+ import "../variables/transitions.mjs";
2
3
  import { isDisabled, isHovered, isNotDisabled } from "../lib/pseudoClass.mjs";
3
4
  import { focusOutlineControlled } from "./focus.mjs";
4
5
  import "../variables/effect.mjs";
5
- import "../variables/transitions.mjs";
6
6
  //#region mixins/hoverable.ts
7
7
  const hoverMixin = css`
8
8
  box-shadow:
@@ -1,2 +1,2 @@
1
- import { n as InputSizes, r as inputMixin, t as InputMixinProps } from "../input-M7BEIewR.mjs";
1
+ import { n as InputSizes, r as inputMixin, t as InputMixinProps } from "../input-DN_8iHVD.mjs";
2
2
  export { InputMixinProps, InputSizes, inputMixin as default };
@@ -1,7 +1,9 @@
1
- import { r as css } from "../styledComponentsInterop-8zScIQyC.mjs";
1
+ import { r as css } from "../styledComponentsInterop-NxwFjeA4.mjs";
2
+ import { semanticColor, semanticTokens } from "../lib/semanticColor.mjs";
3
+ import "../variables/transitions.mjs";
4
+ import { withAlpha } from "../lib/color.mjs";
2
5
  import { isDisabled, isHovered, isNotDisabled } from "../lib/pseudoClass.mjs";
3
6
  import { focusOutlineControlled } from "./focus.mjs";
4
- import "../variables/transitions.mjs";
5
7
  import { printMixins } from "./print/index.mjs";
6
8
  import { Color, Spacing, Typography } from "@persona/design-tokens";
7
9
  //#region mixins/input.ts
@@ -10,11 +12,11 @@ import { Color, Spacing, Typography } from "@persona/design-tokens";
10
12
  * non-input elements (like divs) to give input-like styles.
11
13
  */
12
14
  const inputMixin = css`
13
- background: ${({ theme }) => theme.color.background.primary};
14
- color: ${({ theme }) => theme.color.text.primary};
15
+ background: ${({ theme }) => semanticColor(theme, "InputSurfaceDefault", theme.color.background.primary)};
16
+ color: ${({ theme }) => semanticColor(theme, "FgPrimary", theme.color.text.primary)};
15
17
  border-width: 1px;
16
18
  border-style: solid;
17
- border-color: ${({ theme }) => theme.color.border.input};
19
+ border-color: ${({ theme }) => semanticColor(theme, "InputBorderDefault", theme.color.border.input)};
18
20
  box-sizing: border-box;
19
21
  border-radius: ${({ theme }) => theme.element.borderRadius};
20
22
 
@@ -32,20 +34,28 @@ const inputMixin = css`
32
34
 
33
35
  &::placeholder {
34
36
  font-weight: ${({ theme }) => theme.text.paragraph.md.fontWeight};
35
- color: ${({ theme }) => theme.color.text.tertiary};
37
+ color: ${({ theme }) => semanticColor(theme, "FgSecondary", theme.color.text.tertiary)};
36
38
  }
37
39
 
38
40
  &${isDisabled} {
39
- background: ${({ theme }) => theme.color.background.disabled};
40
- border-color: ${({ theme }) => theme.color.border.disabled};
41
- color: ${({ theme }) => theme.color.text.disabled};
41
+ background: ${({ theme }) => semanticColor(theme, "InputSurfaceDisabled", theme.color.background.disabled)};
42
+ border-color: ${({ theme }) => semanticColor(theme, "InputBorderDisabled", theme.color.border.disabled)};
43
+ color: ${({ theme }) => semanticColor(theme, "FgDisabled", theme.color.text.disabled)};
42
44
  ::placeholder {
43
- color: ${({ theme }) => theme.color.text.disabled};
45
+ color: ${({ theme }) => semanticColor(theme, "FgDisabled", theme.color.text.disabled)};
44
46
  }
45
47
  }
46
48
 
47
49
  &${isHovered}${isNotDisabled} {
48
- border-color: ${({ theme }) => theme.color.border.inputHover};
50
+ ${({ theme }) => {
51
+ const tokens = semanticTokens(theme);
52
+ return tokens ? css`
53
+ background: ${tokens.InputSurfaceHover};
54
+ border-color: ${tokens.InputBorderHover};
55
+ ` : css`
56
+ border-color: ${theme.color.border.inputHover};
57
+ `;
58
+ }}
49
59
  }
50
60
 
51
61
  ${({ $size }) => {
@@ -70,21 +80,44 @@ const inputMixin = css`
70
80
  }
71
81
  }}
72
82
 
73
- ${({ theme, hasError, hasWarning }) => hasError ? css`
74
- border-color: ${theme.color.variants.danger.default};
83
+ ${({ theme, hasError, hasWarning }) => {
84
+ const tokens = semanticTokens(theme);
85
+ if (hasError) {
86
+ const danger = semanticColor(theme, "BorderDanger", theme.color.variants.danger.default);
87
+ return css`
88
+ border-color: ${danger};
89
+
90
+ &${isHovered}${isNotDisabled} {
91
+ border-color: ${danger};
92
+ }
75
93
 
76
- &${isHovered}${isNotDisabled} {
77
- border-color: ${theme.color.variants.danger.default};
94
+ ${tokens && css`
95
+ &${isDisabled} {
96
+ border-color: ${withAlpha(tokens.BorderDanger, tokens.Opacity65)};
78
97
  }
79
- ` : hasWarning ? css`
80
- border-color: ${Color.CoreOrange700};
98
+ `}
99
+ `;
100
+ }
101
+ if (hasWarning) {
102
+ const warning = semanticColor(theme, "BorderWarning", Color.CoreOrange700);
103
+ return css`
104
+ border-color: ${warning};
81
105
 
82
- ${isHovered}${isNotDisabled} {
83
- border-color: ${Color.CoreOrange700};
84
- }
85
- ` : css`
86
- border-color: ${theme.color.border.input};
87
- `}
106
+ &${isHovered}${isNotDisabled} {
107
+ border-color: ${warning};
108
+ }
109
+
110
+ ${tokens && css`
111
+ &${isDisabled} {
112
+ border-color: ${withAlpha(tokens.BorderWarning, tokens.Opacity65)};
113
+ }
114
+ `}
115
+ `;
116
+ }
117
+ return css`
118
+ border-color: ${semanticColor(theme, "InputBorderDefault", theme.color.border.input)};
119
+ `;
120
+ }}
88
121
 
89
122
  ${printMixins.hide}
90
123
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"input.mjs","names":[],"sources":["../../mixins/input.ts"],"sourcesContent":["import { css } from 'styled-components';\n\nimport { Color, Spacing, Typography } from '@persona/design-tokens';\nimport { isDisabled, isHovered, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport { focusOutlineControlled } from 'design-system/mixins/focus';\nimport { printMixins } from 'design-system/mixins/print';\nimport type ErrorProps from 'design-system/types/ErrorProps';\nimport type PseudoClassProps from 'design-system/types/PseudoClassProps';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\nexport type InputSizes = 'md' | 'sm';\n\nexport interface InputMixinProps extends ErrorProps, PseudoClassProps {\n $size?: InputSizes;\n}\n\n/**\n * Provides input-like hover and focus outline effects. Can also be applied to\n * non-input elements (like divs) to give input-like styles.\n */\nconst inputMixin = css<InputMixinProps>`\n background: ${({ theme }) => theme.color.background.primary};\n color: ${({ theme }) => theme.color.text.primary};\n border-width: 1px;\n border-style: solid;\n border-color: ${({ theme }) => theme.color.border.input};\n box-sizing: border-box;\n border-radius: ${({ theme }) => theme.element.borderRadius};\n\n width: 100%;\n min-width: 0;\n\n ${focusOutlineControlled}\n\n text-decoration: none;\n transition-duration: ${TransitionDuration.Fast};\n transition-property: background-color, color, border-color, width, height;\n\n /* Some input-likes like <select/> reduce opacity when disabled */\n opacity: 1;\n\n &::placeholder {\n font-weight: ${({ theme }) => theme.text.paragraph.md.fontWeight};\n color: ${({ theme }) => theme.color.text.tertiary};\n }\n\n &${isDisabled} {\n background: ${({ theme }) => theme.color.background.disabled};\n border-color: ${({ theme }) => theme.color.border.disabled};\n color: ${({ theme }) => theme.color.text.disabled};\n ::placeholder {\n color: ${({ theme }) => theme.color.text.disabled};\n }\n }\n\n &${isHovered}${isNotDisabled} {\n border-color: ${({ theme }) => theme.color.border.inputHover};\n }\n\n ${({ $size }) => {\n switch ($size) {\n default:\n case 'md':\n return css`\n height: ${({ theme }) => theme.element.height.xs};\n padding-top: ${Spacing[2]};\n padding-right: ${Spacing[3]};\n padding-bottom: ${Spacing[2]};\n padding-left: ${Spacing[3]};\n ${Typography.TextMedium};\n `;\n case 'sm':\n return css`\n height: 24px;\n padding-top: ${Spacing[1]};\n padding-right: ${Spacing[2]};\n padding-bottom: ${Spacing[1]};\n padding-left: ${Spacing[2]};\n ${Typography.TextSmall};\n `;\n }\n }}\n\n ${({ theme, hasError, hasWarning }) =>\n hasError\n ? css`\n border-color: ${theme.color.variants.danger.default};\n\n &${isHovered}${isNotDisabled} {\n border-color: ${theme.color.variants.danger.default};\n }\n `\n : hasWarning\n ? css`\n border-color: ${Color.CoreOrange700};\n\n ${isHovered}${isNotDisabled} {\n border-color: ${Color.CoreOrange700};\n }\n `\n : css`\n border-color: ${theme.color.border.input};\n `}\n\n ${printMixins.hide}\n`;\n\nexport default inputMixin;\n"],"mappings":";;;;;;;;;;;AAoBA,MAAM,aAAa,GAAoB;iBACtB,EAAE,YAAY,MAAM,MAAM,WAAW,QAAQ;YAClD,EAAE,YAAY,MAAM,MAAM,KAAK,QAAQ;;;mBAGhC,EAAE,YAAY,MAAM,MAAM,OAAO,MAAM;;oBAEtC,EAAE,YAAY,MAAM,QAAQ,aAAa;;;;;IAKzD,uBAAuB;;;iCAGsB;;;;;;;oBAO7B,EAAE,YAAY,MAAM,KAAK,UAAU,GAAG,WAAW;cACvD,EAAE,YAAY,MAAM,MAAM,KAAK,SAAS;;;KAGjD,WAAW;mBACG,EAAE,YAAY,MAAM,MAAM,WAAW,SAAS;qBAC5C,EAAE,YAAY,MAAM,MAAM,OAAO,SAAS;cACjD,EAAE,YAAY,MAAM,MAAM,KAAK,SAAS;;gBAEtC,EAAE,YAAY,MAAM,MAAM,KAAK,SAAS;;;;KAInD,YAAY,cAAc;qBACV,EAAE,YAAY,MAAM,MAAM,OAAO,WAAW;;;KAG5D,EAAE,YAAY;AACf,SAAQ,OAAR;EACE;EACA,KAAK,KACH,QAAO,GAAG;qBACG,EAAE,YAAY,MAAM,QAAQ,OAAO,GAAG;yBAClC,QAAQ,GAAG;2BACT,QAAQ,GAAG;4BACV,QAAQ,GAAG;0BACb,QAAQ,GAAG;YACzB,WAAW,WAAW;;EAE5B,KAAK,KACH,QAAO,GAAG;;yBAEO,QAAQ,GAAG;2BACT,QAAQ,GAAG;4BACV,QAAQ,GAAG;0BACb,QAAQ,GAAG;YACzB,WAAW,UAAU;;;EAG7B;;KAEC,EAAE,OAAO,UAAU,iBACpB,WACI,GAAG;0BACe,MAAM,MAAM,SAAS,OAAO,QAAQ;;aAEjD,YAAY,cAAc;4BACX,MAAM,MAAM,SAAS,OAAO,QAAQ;;YAGxD,aACE,GAAG;4BACe,MAAM,cAAc;;cAElC,YAAY,cAAc;8BACV,MAAM,cAAc;;cAGxC,GAAG;4BACe,MAAM,MAAM,OAAO,MAAM;YACzC;;IAER,YAAY,KAAK"}
1
+ {"version":3,"file":"input.mjs","names":[],"sources":["../../mixins/input.ts"],"sourcesContent":["import { css } from 'styled-components';\n\nimport { Color, Spacing, Typography } from '@persona/design-tokens';\nimport { withAlpha } from 'design-system/lib/color';\nimport { isDisabled, isHovered, isNotDisabled } from 'design-system/lib/pseudoClass';\nimport { semanticColor, semanticTokens } from 'design-system/lib/semanticColor';\nimport { focusOutlineControlled } from 'design-system/mixins/focus';\nimport { printMixins } from 'design-system/mixins/print';\nimport type ErrorProps from 'design-system/types/ErrorProps';\nimport type PseudoClassProps from 'design-system/types/PseudoClassProps';\nimport { TransitionDuration } from 'design-system/variables/transitions';\n\nexport type InputSizes = 'md' | 'sm';\n\nexport interface InputMixinProps extends ErrorProps, PseudoClassProps {\n $size?: InputSizes;\n}\n\n/**\n * Provides input-like hover and focus outline effects. Can also be applied to\n * non-input elements (like divs) to give input-like styles.\n */\nconst inputMixin = css<InputMixinProps>`\n background: ${({ theme }) =>\n semanticColor(theme, 'InputSurfaceDefault', theme.color.background.primary)};\n color: ${({ theme }) => semanticColor(theme, 'FgPrimary', theme.color.text.primary)};\n border-width: 1px;\n border-style: solid;\n border-color: ${({ theme }) => semanticColor(theme, 'InputBorderDefault', theme.color.border.input)};\n box-sizing: border-box;\n border-radius: ${({ theme }) => theme.element.borderRadius};\n\n width: 100%;\n min-width: 0;\n\n ${focusOutlineControlled}\n\n text-decoration: none;\n transition-duration: ${TransitionDuration.Fast};\n transition-property: background-color, color, border-color, width, height;\n\n /* Some input-likes like <select/> reduce opacity when disabled */\n opacity: 1;\n\n &::placeholder {\n font-weight: ${({ theme }) => theme.text.paragraph.md.fontWeight};\n color: ${({ theme }) => semanticColor(theme, 'FgSecondary', theme.color.text.tertiary)};\n }\n\n &${isDisabled} {\n background: ${({ theme }) =>\n semanticColor(theme, 'InputSurfaceDisabled', theme.color.background.disabled)};\n border-color: ${({ theme }) =>\n semanticColor(theme, 'InputBorderDisabled', theme.color.border.disabled)};\n color: ${({ theme }) => semanticColor(theme, 'FgDisabled', theme.color.text.disabled)};\n ::placeholder {\n color: ${({ theme }) => semanticColor(theme, 'FgDisabled', theme.color.text.disabled)};\n }\n }\n\n &${isHovered}${isNotDisabled} {\n ${({ theme }) => {\n const tokens = semanticTokens(theme);\n return tokens\n ? css`\n background: ${tokens.InputSurfaceHover};\n border-color: ${tokens.InputBorderHover};\n `\n : css`\n border-color: ${theme.color.border.inputHover};\n `;\n }}\n }\n\n ${({ $size }) => {\n switch ($size) {\n default:\n case 'md':\n return css`\n height: ${({ theme }) => theme.element.height.xs};\n padding-top: ${Spacing[2]};\n padding-right: ${Spacing[3]};\n padding-bottom: ${Spacing[2]};\n padding-left: ${Spacing[3]};\n ${Typography.TextMedium};\n `;\n case 'sm':\n return css`\n height: 24px;\n padding-top: ${Spacing[1]};\n padding-right: ${Spacing[2]};\n padding-bottom: ${Spacing[1]};\n padding-left: ${Spacing[2]};\n ${Typography.TextSmall};\n `;\n }\n }}\n\n ${({ theme, hasError, hasWarning }) => {\n const tokens = semanticTokens(theme);\n\n if (hasError) {\n const danger = semanticColor(theme, 'BorderDanger', theme.color.variants.danger.default);\n return css`\n border-color: ${danger};\n\n &${isHovered}${isNotDisabled} {\n border-color: ${danger};\n }\n\n ${\n tokens &&\n css`\n &${isDisabled} {\n border-color: ${withAlpha(tokens.BorderDanger, tokens.Opacity65)};\n }\n `\n }\n `;\n }\n\n if (hasWarning) {\n const warning = semanticColor(theme, 'BorderWarning', Color.CoreOrange700);\n return css`\n border-color: ${warning};\n\n &${isHovered}${isNotDisabled} {\n border-color: ${warning};\n }\n\n ${\n tokens &&\n css`\n &${isDisabled} {\n border-color: ${withAlpha(tokens.BorderWarning, tokens.Opacity65)};\n }\n `\n }\n `;\n }\n\n return css`\n border-color: ${semanticColor(theme, 'InputBorderDefault', theme.color.border.input)};\n `;\n }}\n\n ${printMixins.hide}\n`;\n\nexport default inputMixin;\n"],"mappings":";;;;;;;;;;;;;AAsBA,MAAM,aAAa,GAAoB;iBACtB,EAAE,YACf,cAAc,OAAO,uBAAuB,MAAM,MAAM,WAAW,QAAQ,CAAC;YACpE,EAAE,YAAY,cAAc,OAAO,aAAa,MAAM,MAAM,KAAK,QAAQ,CAAC;;;mBAGnE,EAAE,YAAY,cAAc,OAAO,sBAAsB,MAAM,MAAM,OAAO,MAAM,CAAC;;oBAElF,EAAE,YAAY,MAAM,QAAQ,aAAa;;;;;IAKzD,uBAAuB;;;iCAGsB;;;;;;;oBAO7B,EAAE,YAAY,MAAM,KAAK,UAAU,GAAG,WAAW;cACvD,EAAE,YAAY,cAAc,OAAO,eAAe,MAAM,MAAM,KAAK,SAAS,CAAC;;;KAGtF,WAAW;mBACG,EAAE,YACf,cAAc,OAAO,wBAAwB,MAAM,MAAM,WAAW,SAAS,CAAC;qBAC/D,EAAE,YACjB,cAAc,OAAO,uBAAuB,MAAM,MAAM,OAAO,SAAS,CAAC;cACjE,EAAE,YAAY,cAAc,OAAO,cAAc,MAAM,MAAM,KAAK,SAAS,CAAC;;gBAE1E,EAAE,YAAY,cAAc,OAAO,cAAc,MAAM,MAAM,KAAK,SAAS,CAAC;;;;KAIvF,YAAY,cAAc;OACxB,EAAE,YAAY;C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import { o as Variant } from "../theme-D02MOaH6.mjs";
2
+ import { t as PseudoClassProps } from "../PseudoClassProps-DnlHhW5u.mjs";
3
3
  import * as _$styled_components0 from "styled-components";
4
4
 
5
5
  //#region mixins/menuItem.d.ts