@persona/design-system 0.10.11 → 0.10.12

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 (348) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/{Action-sLO73eKq.d.mts → Action-CHWYwpYR.d.mts} +2 -2
  3. package/dist/Action.d.mts +1 -1
  4. package/dist/AdvancedFilterRuleRow.d.mts +3 -0
  5. package/dist/AdvancedFilterRulesPopover.d.mts +4 -0
  6. package/dist/Attribute.d.mts +2 -2
  7. package/dist/{Badge-DZq6ByIU.mjs → Badge-B2AJMf3d.mjs} +2 -2
  8. package/dist/{Badge-DZq6ByIU.mjs.map → Badge-B2AJMf3d.mjs.map} +1 -1
  9. package/dist/{Breadcrumbs-DpsNZWF9.mjs → Breadcrumbs-DRs9eo1o.mjs} +8 -8
  10. package/dist/{Breadcrumbs-DpsNZWF9.mjs.map → Breadcrumbs-DRs9eo1o.mjs.map} +1 -1
  11. package/dist/{Button-C4a4BTjL.d.mts → Button-DjD8QxcY.d.mts} +2 -2
  12. package/dist/Button.d.mts +1 -1
  13. package/dist/CalendarBase.d.mts +1 -1
  14. package/dist/{Card-CPV4_mHk.d.mts → Card-DiUHtYg_.d.mts} +4 -4
  15. package/dist/Card.d.mts +1 -1
  16. package/dist/Card2.d.mts +1 -1
  17. package/dist/CardGrouping.d.mts +1 -1
  18. package/dist/{CardV2-DCoDfEvr.mjs → CardV2-DO-8COfu.mjs} +12 -12
  19. package/dist/{CardV2-DCoDfEvr.mjs.map → CardV2-DO-8COfu.mjs.map} +1 -1
  20. package/dist/ChartPopover.d.mts +1 -1
  21. package/dist/{Checkbox-C3z7UUSC.mjs → Checkbox-BAh-wF_F.mjs} +5 -5
  22. package/dist/{Checkbox-C3z7UUSC.mjs.map → Checkbox-BAh-wF_F.mjs.map} +1 -1
  23. package/dist/{CheckboxGroupField-BT87OVOF.d.mts → CheckboxGroupField-XSVAmESI.d.mts} +2 -2
  24. package/dist/CheckboxGroupField.d.mts +1 -1
  25. package/dist/{Combobox-BkK_tosd.mjs → Combobox-BNjYEAmv.mjs} +30 -39
  26. package/dist/{Combobox-BkK_tosd.mjs.map → Combobox-BNjYEAmv.mjs.map} +1 -1
  27. package/dist/{Combobox-aOJDTjzC.d.mts → Combobox-DbcSss15.d.mts} +3 -3
  28. package/dist/Combobox.d.mts +2 -2
  29. package/dist/{ComboboxBase-Brgv5nxk.d.mts → ComboboxBase-CrFweFGi.d.mts} +6 -6
  30. package/dist/ComboboxBase.d.mts +1 -1
  31. package/dist/{ComboboxMultiSelect-DJyAv0Eg.d.mts → ComboboxMultiSelect-Cp5GBGQj.d.mts} +2 -2
  32. package/dist/ComboboxMultiSelect.d.mts +1 -1
  33. package/dist/{ComboboxSingleSelect-CP8-HLKl.d.mts → ComboboxSingleSelect-u7fK3Yvy.d.mts} +3 -3
  34. package/dist/ComboboxSingleSelect.d.mts +1 -1
  35. package/dist/{CompactBar-B0LhjrYV.d.mts → CompactBar-BLZZWtIE.d.mts} +2 -2
  36. package/dist/CompactBar.d.mts +1 -1
  37. package/dist/{ConfigFormGroup-DAUqAhJW.mjs → ConfigFormGroup-BCTWCws5.mjs} +2 -2
  38. package/dist/{ConfigFormGroup-DAUqAhJW.mjs.map → ConfigFormGroup-BCTWCws5.mjs.map} +1 -1
  39. package/dist/{DataTable-CSl5Jn3E.d.mts → DataTable-C1mdfmQa.d.mts} +6 -6
  40. package/dist/{DataTable-DiwzhNMt.mjs → DataTable-DdSY9mzT.mjs} +18 -18
  41. package/dist/{DataTable-DiwzhNMt.mjs.map → DataTable-DdSY9mzT.mjs.map} +1 -1
  42. package/dist/DataTable.d.mts +1 -1
  43. package/dist/{DatePicker-BK7ioKBm.mjs → DatePicker-DiilpYQg.mjs} +375 -375
  44. package/dist/DatePicker-DiilpYQg.mjs.map +1 -0
  45. package/dist/{DropdownButton-Dp-MZ5tA.mjs → DropdownButton-BxZ5hn0X.mjs} +3 -3
  46. package/dist/{DropdownButton-Dp-MZ5tA.mjs.map → DropdownButton-BxZ5hn0X.mjs.map} +1 -1
  47. package/dist/DropdownButton.d.mts +2 -2
  48. package/dist/{DropdownMenu-BnHPeHOm.d.mts → DropdownMenu-CQR0U-zM.d.mts} +3 -3
  49. package/dist/{DropdownMenu-jJSHQaih.mjs → DropdownMenu-Ip75l4Th.mjs} +21 -4
  50. package/dist/DropdownMenu-Ip75l4Th.mjs.map +1 -0
  51. package/dist/DropdownMenu.d.mts +1 -1
  52. package/dist/{FilterBar-DDyk14sx.d.mts → FilterBar-CA4mDAXK.d.mts} +10 -2
  53. package/dist/FilterBar.d.mts +1 -1
  54. package/dist/{FloatingToolbar-rfKurDs8.mjs → FloatingToolbar-BA8Fqmrz.mjs} +4 -4
  55. package/dist/{FloatingToolbar-rfKurDs8.mjs.map → FloatingToolbar-BA8Fqmrz.mjs.map} +1 -1
  56. package/dist/{FormControl-DPYbLcBK.d.mts → FormControl-BQe3GRhi.d.mts} +2 -2
  57. package/dist/{FormControl--pbTH3bY.mjs → FormControl-BoKGiWdQ.mjs} +3 -3
  58. package/dist/{FormControl--pbTH3bY.mjs.map → FormControl-BoKGiWdQ.mjs.map} +1 -1
  59. package/dist/FormControl.d.mts +1 -1
  60. package/dist/FormControlLabel.d.mts +2 -2
  61. package/dist/{FormField-CYNGm2bJ.d.mts → FormField-BW5uMzId.d.mts} +2 -2
  62. package/dist/{FormField-DMxjftFw.mjs → FormField-yYJFkJ6R.mjs} +13 -13
  63. package/dist/{FormField-DMxjftFw.mjs.map → FormField-yYJFkJ6R.mjs.map} +1 -1
  64. package/dist/FormField.d.mts +1 -1
  65. package/dist/{Grid-DVC0SSEZ.mjs → Grid-CYpOqTUu.mjs} +2 -2
  66. package/dist/{Grid-DVC0SSEZ.mjs.map → Grid-CYpOqTUu.mjs.map} +1 -1
  67. package/dist/{Header-DaaUprCL.d.mts → Header-CV0Lcf0C.d.mts} +2 -2
  68. package/dist/Header.d.mts +1 -1
  69. package/dist/{HelperTooltip-C5BDdJSI.d.mts → HelperTooltip-BNM3pTM-.d.mts} +2 -2
  70. package/dist/HelperTooltip.d.mts +1 -1
  71. package/dist/HighlightedText.d.mts +1 -1
  72. package/dist/{HoverCopyableField-B2-xlwUt.mjs → HoverCopyableField-X2XfKTTh.mjs} +5 -5
  73. package/dist/{HoverCopyableField-B2-xlwUt.mjs.map → HoverCopyableField-X2XfKTTh.mjs.map} +1 -1
  74. package/dist/{IconButton-kSjnfhWt.mjs → IconButton-Bj1fry_K.mjs} +8 -8
  75. package/dist/{IconButton-kSjnfhWt.mjs.map → IconButton-Bj1fry_K.mjs.map} +1 -1
  76. package/dist/{IconButton-7k-wjvH3.d.mts → IconButton-C_ReZm8v.d.mts} +2 -2
  77. package/dist/IconButton.d.mts +1 -1
  78. package/dist/ImageTile.d.mts +1 -1
  79. package/dist/IndexTableLayout.d.mts +12 -4
  80. package/dist/InlineCombobox.d.mts +1 -1
  81. package/dist/InlineInput.d.mts +1 -1
  82. package/dist/{Input-CwvrBsiS.d.mts → Input-DH-5dKor.d.mts} +3 -3
  83. package/dist/{Input-TRmTBEav.mjs → Input-DcbzPaax.mjs} +5 -5
  84. package/dist/{Input-TRmTBEav.mjs.map → Input-DcbzPaax.mjs.map} +1 -1
  85. package/dist/Input.d.mts +1 -1
  86. package/dist/{Link-XvzUN8sY.mjs → Link-B29ZMN6m.mjs} +4 -4
  87. package/dist/{Link-XvzUN8sY.mjs.map → Link-B29ZMN6m.mjs.map} +1 -1
  88. package/dist/{ListBox-DahM1PgU.mjs → ListBox-4rTgr3IJ.mjs} +12 -12
  89. package/dist/{ListBox-DahM1PgU.mjs.map → ListBox-4rTgr3IJ.mjs.map} +1 -1
  90. package/dist/{ListBox-BePQBYR7.d.mts → ListBox-ZDaitaXR.d.mts} +3 -3
  91. package/dist/ListBox.d.mts +1 -1
  92. package/dist/{ListBoxField-lj7JN1BX.d.mts → ListBoxField-CGvVWKyL.d.mts} +4 -4
  93. package/dist/ListBoxField.d.mts +1 -1
  94. package/dist/{LoadingShimmer-CpfKTSUs.mjs → LoadingShimmer-BVVdBeN-.mjs} +18 -21
  95. package/dist/LoadingShimmer-BVVdBeN-.mjs.map +1 -0
  96. package/dist/LoadingShimmer.d.mts +1 -1
  97. package/dist/{LogicRow-Do7t7Suf.d.mts → LogicRow-Bzp5o1sL.d.mts} +2 -2
  98. package/dist/LogicRow.d.mts +1 -1
  99. package/dist/MaskedInput.d.mts +2 -2
  100. package/dist/MatchHighlight.d.mts +1 -1
  101. package/dist/{Menu-BvMzSH2I.mjs → Menu-BVn1jh46.mjs} +5 -5
  102. package/dist/{Menu-BvMzSH2I.mjs.map → Menu-BVn1jh46.mjs.map} +1 -1
  103. package/dist/{Menu-Ca5ftvo6.d.mts → Menu-DviYNrFd.d.mts} +4 -4
  104. package/dist/Menu.d.mts +1 -1
  105. package/dist/{MiddleTruncatedText--jzGTD00.mjs → MiddleTruncatedText-DicQsLDG.mjs} +2 -2
  106. package/dist/{MiddleTruncatedText--jzGTD00.mjs.map → MiddleTruncatedText-DicQsLDG.mjs.map} +1 -1
  107. package/dist/{Modal-B6X5AgWj.mjs → Modal-CiPFqr0L.mjs} +6 -6
  108. package/dist/{Modal-B6X5AgWj.mjs.map → Modal-CiPFqr0L.mjs.map} +1 -1
  109. package/dist/{Modal-BPfFyzkw.d.mts → Modal-CujB7DuB.d.mts} +3 -3
  110. package/dist/Modal.d.mts +1 -1
  111. package/dist/{PageHeader-bhQTjuZF.mjs → PageHeader-6KvtGED-.mjs} +2 -2
  112. package/dist/{PageHeader-bhQTjuZF.mjs.map → PageHeader-6KvtGED-.mjs.map} +1 -1
  113. package/dist/{PageHeader-BeBmYmUX.d.mts → PageHeader-UPiqJpIF.d.mts} +2 -2
  114. package/dist/PageHeader.d.mts +1 -1
  115. package/dist/{PageLayout-BXM_pyrU.d.mts → PageLayout-BdVM37bV.d.mts} +2 -2
  116. package/dist/{PageLayout-DgEGcZgB.mjs → PageLayout-CPiVnS_r.mjs} +5 -3
  117. package/dist/PageLayout-CPiVnS_r.mjs.map +1 -0
  118. package/dist/PageLayout.d.mts +1 -1
  119. package/dist/{PageSelector-C14ABZVL.d.mts → PageSelector-B5CcAzss.d.mts} +2 -2
  120. package/dist/PageSelector.d.mts +1 -1
  121. package/dist/{Pagination-DE8wT55m.mjs → Pagination-CqFvnlXc.mjs} +5 -5
  122. package/dist/{Pagination-DE8wT55m.mjs.map → Pagination-CqFvnlXc.mjs.map} +1 -1
  123. package/dist/{Pii-C42ZY88Y.mjs → Pii-jSYND7Cn.mjs} +2 -2
  124. package/dist/{Pii-C42ZY88Y.mjs.map → Pii-jSYND7Cn.mjs.map} +1 -1
  125. package/dist/{Popover-DuFjaSoq.mjs → Popover-CVX-dfYb.mjs} +48 -20
  126. package/dist/Popover-CVX-dfYb.mjs.map +1 -0
  127. package/dist/Popover.d.mts +1 -1
  128. package/dist/ProgressBar.d.mts +1 -1
  129. package/dist/{ProgressIndicator-hy1P-RG1.mjs → ProgressIndicator-zt3ndT9U.mjs} +3 -3
  130. package/dist/{ProgressIndicator-hy1P-RG1.mjs.map → ProgressIndicator-zt3ndT9U.mjs.map} +1 -1
  131. package/dist/{Radio-B4TBAho6.mjs → Radio-B1H_S-Qj.mjs} +4 -4
  132. package/dist/{Radio-B4TBAho6.mjs.map → Radio-B1H_S-Qj.mjs.map} +1 -1
  133. package/dist/{RadioGroup-Bf24GKOb.mjs → RadioGroup-7hdcVhsp.mjs} +3 -3
  134. package/dist/{RadioGroup-Bf24GKOb.mjs.map → RadioGroup-7hdcVhsp.mjs.map} +1 -1
  135. package/dist/RichTextEditor.d.mts +1 -1
  136. package/dist/SectionHeading.d.mts +1 -1
  137. package/dist/{SegmentedControl-BpR7sUWO.mjs → SegmentedControl-BNOJ1FYQ.mjs} +3 -3
  138. package/dist/{SegmentedControl-BpR7sUWO.mjs.map → SegmentedControl-BNOJ1FYQ.mjs.map} +1 -1
  139. package/dist/{Select-RdTT2KoH.mjs → Select-DbWEgH5c.mjs} +9 -9
  140. package/dist/{Select-RdTT2KoH.mjs.map → Select-DbWEgH5c.mjs.map} +1 -1
  141. package/dist/{Select-DYdn73Nh.d.mts → Select-DsVeAyZy.d.mts} +2 -2
  142. package/dist/Select.d.mts +1 -1
  143. package/dist/SmartTextInput.d.mts +1 -1
  144. package/dist/SmartTextInputField.d.mts +2 -2
  145. package/dist/SmartTextInputFunctionDialog.d.mts +1 -1
  146. package/dist/SmartTextInputPopover.d.mts +1 -1
  147. package/dist/{Spinner-vcApnJzv.mjs → Spinner-k9ZiOdTr.mjs} +2 -2
  148. package/dist/{Spinner-vcApnJzv.mjs.map → Spinner-k9ZiOdTr.mjs.map} +1 -1
  149. package/dist/{Stack-B6MrjJeW.d.mts → Stack-CODxfzhl.d.mts} +2 -2
  150. package/dist/Stack.d.mts +1 -1
  151. package/dist/{StatusIndicator-lwt35J6B.mjs → StatusIndicator-CzRaEFSz.mjs} +3 -3
  152. package/dist/{StatusIndicator-lwt35J6B.mjs.map → StatusIndicator-CzRaEFSz.mjs.map} +1 -1
  153. package/dist/{Sticker-jfOM4Yi6.mjs → Sticker-4VdGEFAu.mjs} +5 -5
  154. package/dist/{Sticker-jfOM4Yi6.mjs.map → Sticker-4VdGEFAu.mjs.map} +1 -1
  155. package/dist/{Sticker-C7Wv3Obx.d.mts → Sticker-CLvRB8V5.d.mts} +4 -4
  156. package/dist/Sticker.d.mts +1 -1
  157. package/dist/Tab.d.mts +2 -2
  158. package/dist/{TabBar-DwHgbIQ6.mjs → TabBar-d4sdknti.mjs} +6 -6
  159. package/dist/{TabBar-DwHgbIQ6.mjs.map → TabBar-d4sdknti.mjs.map} +1 -1
  160. package/dist/{Table-SMJAWqoe.mjs → Table-9mNn8Q-d.mjs} +10 -10
  161. package/dist/{Table-SMJAWqoe.mjs.map → Table-9mNn8Q-d.mjs.map} +1 -1
  162. package/dist/{TableBox-DS8mpN3-.mjs → TableBox-D9NA-s9l.mjs} +14 -14
  163. package/dist/{TableBox-DS8mpN3-.mjs.map → TableBox-D9NA-s9l.mjs.map} +1 -1
  164. package/dist/TableBox.d.mts +1 -1
  165. package/dist/{TableBoxCell-Bo5xYEmR.d.mts → TableBoxCell-CQOL30et.d.mts} +6 -6
  166. package/dist/TableBoxCell.d.mts +1 -1
  167. package/dist/{TableBoxField-CdgjSGLK.d.mts → TableBoxField-z0GIFeQw.d.mts} +5 -5
  168. package/dist/TableBoxField.d.mts +1 -1
  169. package/dist/{TableBoxRow-DuWS2iRC.d.mts → TableBoxRow-tb9-KMr9.d.mts} +2 -2
  170. package/dist/TableBoxRow.d.mts +1 -1
  171. package/dist/{TableBoxRowActions-zW74DkXt.d.mts → TableBoxRowActions-BZwulsFP.d.mts} +2 -2
  172. package/dist/TableBoxRowActions.d.mts +1 -1
  173. package/dist/{TableCell-uv_jqT5e.d.mts → TableCell-CQsF7t4e.d.mts} +2 -2
  174. package/dist/TableCell.d.mts +1 -1
  175. package/dist/{TableControls-CX7BvgD2.mjs → TableControls-BXykbUBf.mjs} +53 -31
  176. package/dist/TableControls-BXykbUBf.mjs.map +1 -0
  177. package/dist/{TableControls-9vz-HfDu.d.mts → TableControls-DE6eHq8h.d.mts} +4 -4
  178. package/dist/TableControls.d.mts +1 -1
  179. package/dist/{TableControlsContext-D0Hn3rwL.d.mts → TableControlsContext-C2_2EuMh.d.mts} +2 -2
  180. package/dist/TableControlsContext.d.mts +1 -1
  181. package/dist/{TableViewConfigurationDropdown-CZcLH8uR.d.mts → TableViewConfigurationDropdown-DE9HFXYY.d.mts} +2 -2
  182. package/dist/TableViewConfigurationDropdown.d.mts +1 -1
  183. package/dist/{TechnicalSticker-DrN45Vut.mjs → TechnicalSticker-DtV7Gawf.mjs} +7 -7
  184. package/dist/{TechnicalSticker-DrN45Vut.mjs.map → TechnicalSticker-DtV7Gawf.mjs.map} +1 -1
  185. package/dist/{Text-CdHeSHCc.d.mts → Text-CvaqognH.d.mts} +2 -2
  186. package/dist/Text.d.mts +1 -1
  187. package/dist/{TextUnderlineTooltip-By1VVsSs.d.mts → TextUnderlineTooltip-Bd5e8KH3.d.mts} +3 -3
  188. package/dist/TextUnderlineTooltip.d.mts +1 -1
  189. package/dist/Tile.d.mts +1 -1
  190. package/dist/{Toggle-DjmkjJlw.mjs → Toggle-CzHoIR-n.mjs} +6 -6
  191. package/dist/{Toggle-DjmkjJlw.mjs.map → Toggle-CzHoIR-n.mjs.map} +1 -1
  192. package/dist/{Tooltip-C2VB8I6y.mjs → Tooltip-CVBxc1yf.mjs} +4 -4
  193. package/dist/{Tooltip-C2VB8I6y.mjs.map → Tooltip-CVBxc1yf.mjs.map} +1 -1
  194. package/dist/{Tooltip-OxVvOfn8.d.mts → Tooltip-Ddy2Jq0K.d.mts} +3 -3
  195. package/dist/Tooltip.d.mts +1 -1
  196. package/dist/{TruncatedText-Dqj94BFK.d.mts → TruncatedText-sr9Fhm3N.d.mts} +2 -2
  197. package/dist/WizardModal.d.mts +1 -1
  198. package/dist/{clientFilterUtils-CMLuN8kK.d.mts → clientFilterUtils-2TBUC31K.d.mts} +2 -2
  199. package/dist/clientFilterUtils.d.mts +1 -1
  200. package/dist/components/Accordion/index.mjs +5 -5
  201. package/dist/components/Attribute/index.mjs +6 -6
  202. package/dist/components/Badge/index.mjs +1 -1
  203. package/dist/components/Banner/index.mjs +3 -3
  204. package/dist/components/BottomPanel/index.mjs +7 -7
  205. package/dist/components/Breadcrumbs/index.mjs +1 -1
  206. package/dist/components/Button/index.d.mts +2 -2
  207. package/dist/components/Button/index.mjs +1 -1
  208. package/dist/components/ButtonGroup/index.mjs +2 -2
  209. package/dist/components/Card/index.d.mts +2 -2
  210. package/dist/components/CardV2/index.d.mts +1 -1
  211. package/dist/components/CardV2/index.mjs +1 -1
  212. package/dist/components/Chart/index.mjs +4 -4
  213. package/dist/components/Checkbox/index.mjs +1 -1
  214. package/dist/components/CodeHighlight/index.mjs +4 -4
  215. package/dist/components/Combobox/index.d.mts +4 -4
  216. package/dist/components/Combobox/index.mjs +1 -1
  217. package/dist/components/ConfigFormGroup/index.mjs +1 -1
  218. package/dist/components/DataTable/TableControls/index.d.mts +8 -8
  219. package/dist/components/DataTable/TableControls/index.mjs +1 -1
  220. package/dist/components/DataTable/index.d.mts +5 -5
  221. package/dist/components/DataTable/index.mjs +1 -1
  222. package/dist/components/DataTable/types.d.mts +1 -1
  223. package/dist/components/DatePicker/index.mjs +1 -1
  224. package/dist/components/DropdownButton/index.mjs +1 -1
  225. package/dist/components/DropdownMenu/index.d.mts +1 -1
  226. package/dist/components/DropdownMenu/index.mjs +1 -1
  227. package/dist/components/FloatingPanel/index.mjs +8 -8
  228. package/dist/components/FloatingToolbar/index.mjs +1 -1
  229. package/dist/components/FormControl/index.d.mts +1 -1
  230. package/dist/components/FormControl/index.mjs +1 -1
  231. package/dist/components/FormField/index.d.mts +5 -5
  232. package/dist/components/FormField/index.mjs +1 -1
  233. package/dist/components/Grid/index.mjs +1 -1
  234. package/dist/components/HoverCopyableField/index.mjs +1 -1
  235. package/dist/components/ImageTile/index.mjs +8 -8
  236. package/dist/components/Input/index.d.mts +1 -1
  237. package/dist/components/Input/index.mjs +1 -1
  238. package/dist/components/Link/index.mjs +1 -1
  239. package/dist/components/ListBox/index.d.mts +3 -3
  240. package/dist/components/ListBox/index.mjs +1 -1
  241. package/dist/components/LoadingShimmer/index.mjs +1 -1
  242. package/dist/components/MaskedInput/index.mjs +1 -1
  243. package/dist/components/Menu/index.d.mts +1 -1
  244. package/dist/components/Menu/index.mjs +1 -1
  245. package/dist/components/Modal/index.d.mts +1 -1
  246. package/dist/components/Modal/index.mjs +1 -1
  247. package/dist/components/PageHeader/index.d.mts +1 -1
  248. package/dist/components/PageHeader/index.mjs +1 -1
  249. package/dist/components/Pagination/index.d.mts +1 -1
  250. package/dist/components/Pagination/index.mjs +1 -1
  251. package/dist/components/Pii/index.mjs +1 -1
  252. package/dist/components/Popover/index.mjs +1 -1
  253. package/dist/components/ProgressBar/index.mjs +2 -2
  254. package/dist/components/ProgressIndicator/index.mjs +1 -1
  255. package/dist/components/Radio/index.mjs +1 -1
  256. package/dist/components/RadioGroup/index.mjs +1 -1
  257. package/dist/components/RichTextEditor/index.mjs +9 -9
  258. package/dist/components/RightPanel/index.mjs +4 -4
  259. package/dist/components/SegmentedControl/index.mjs +1 -1
  260. package/dist/components/Select/index.d.mts +1 -1
  261. package/dist/components/Select/index.mjs +1 -1
  262. package/dist/components/SelectionCard/index.mjs +5 -5
  263. package/dist/components/Slider/index.mjs +4 -4
  264. package/dist/components/SmartTextInput/index.mjs +9 -71
  265. package/dist/components/SmartTextInput/index.mjs.map +1 -1
  266. package/dist/{safe-parse.d.mts → components/SmartTextInput/parser/safe-parse.d.mts} +1 -1
  267. package/dist/components/SmartTextInput/parser/safe-parse.mjs +30 -0
  268. package/dist/components/SmartTextInput/parser/safe-parse.mjs.map +1 -0
  269. package/dist/{tree.d.mts → components/SmartTextInput/parser/tree.d.mts} +1 -1
  270. package/dist/components/SmartTextInput/parser/tree.mjs +42 -0
  271. package/dist/components/SmartTextInput/parser/tree.mjs.map +1 -0
  272. package/dist/components/Spinner/index.mjs +1 -1
  273. package/dist/components/Stack/index.d.mts +1 -1
  274. package/dist/components/StatusIndicator/index.mjs +1 -1
  275. package/dist/components/Sticker/index.d.mts +1 -1
  276. package/dist/components/Sticker/index.mjs +1 -1
  277. package/dist/components/SwatchPicker/index.mjs +1 -1
  278. package/dist/components/TabBar/index.mjs +1 -1
  279. package/dist/components/Table/index.d.mts +1 -1
  280. package/dist/components/Table/index.mjs +1 -1
  281. package/dist/components/TableBox/index.d.mts +1 -1
  282. package/dist/components/TableBox/index.mjs +1 -1
  283. package/dist/components/TechnicalSticker/index.mjs +1 -1
  284. package/dist/components/Text/index.d.mts +1 -1
  285. package/dist/components/Tile/index.mjs +2 -2
  286. package/dist/components/Toast/index.mjs +4 -4
  287. package/dist/components/Toggle/index.mjs +1 -1
  288. package/dist/components/Tooltip/index.d.mts +3 -3
  289. package/dist/components/Tooltip/index.mjs +1 -1
  290. package/dist/components/VersionHistory/index.mjs +7 -7
  291. package/dist/fieldPickerOptions.d.mts +1 -1
  292. package/dist/{filters-By_TYKAZ.d.mts → filters-DW7pqWv3.d.mts} +3 -3
  293. package/dist/filters.d.mts +1 -1
  294. package/dist/{helpers-BIHsqdyX.d.mts → helpers-BTD2kXLs.d.mts} +2 -2
  295. package/dist/helpers.d.mts +1 -1
  296. package/dist/{index-CZJp4Af6.d.mts → index-B4tE0RxY.d.mts} +3 -3
  297. package/dist/{index-BozzRwby.d.mts → index-DTM_t7OG.d.mts} +2 -2
  298. package/dist/index2.d.mts +1 -1
  299. package/dist/index4.d.mts +2 -2
  300. package/dist/index6.d.mts +2 -2
  301. package/dist/{inputFields-BqO2H-Kj.d.mts → inputFields-DnBb3NhK.d.mts} +6 -6
  302. package/dist/inputFields.d.mts +1 -1
  303. package/dist/lib/MiddleTruncatedText.mjs +1 -1
  304. package/dist/lib/TruncatedText.d.mts +1 -1
  305. package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
  306. package/dist/lib/TruncatedTextWithTooltip.mjs +1 -1
  307. package/dist/lib/colorMode.d.mts +1 -1
  308. package/dist/lib/useChain.d.mts +1 -1
  309. package/dist/lib/useCloseFocus.d.mts +45 -0
  310. package/dist/lib/useCloseFocus.mjs +123 -0
  311. package/dist/lib/useCloseFocus.mjs.map +1 -0
  312. package/dist/mixins/focus.mjs +1 -1
  313. package/dist/mixins/hoverable.mjs +1 -1
  314. package/dist/mixins/input.mjs +2 -2
  315. package/dist/mixins/motion.d.mts +6 -2
  316. package/dist/mixins/motion.mjs +25 -3
  317. package/dist/mixins/motion.mjs.map +1 -1
  318. package/dist/patterns/CardGrouping/index.mjs +8 -8
  319. package/dist/patterns/IndexTableLayout/index.mjs +23 -16
  320. package/dist/patterns/IndexTableLayout/index.mjs.map +1 -1
  321. package/dist/patterns/LayoutLoadingShimmer/index.mjs +4 -4
  322. package/dist/patterns/LayoutLoadingSpinner/index.mjs +1 -1
  323. package/dist/patterns/PageLayout/index.d.mts +1 -1
  324. package/dist/patterns/PageLayout/index.mjs +1 -1
  325. package/dist/patterns/WizardModal/index.mjs +4 -4
  326. package/dist/tone.d.mts +1 -1
  327. package/dist/{types-D5txFacG.d.mts → types-Dws2XDz2.d.mts} +3 -3
  328. package/dist/{types-C_CncajO.d.mts → types-NO2GRlM-.d.mts} +2 -2
  329. package/dist/types5.d.mts +1 -1
  330. package/dist/{useChain-x9fd9Fyq.d.mts → useChain-B--KAtdN.d.mts} +2 -2
  331. package/dist/useChainAtCursor.d.mts +1 -1
  332. package/dist/useColumnConfiguration.d.mts +2 -2
  333. package/dist/useComboboxFooterAction.d.mts +1 -1
  334. package/dist/{useTableColumns-BEKJNrb1.d.mts → useTableColumns-tITjHasE.d.mts} +2 -2
  335. package/dist/useTableColumns.d.mts +1 -1
  336. package/dist/useTruncation.d.mts +1 -1
  337. package/dist/value-labels.d.mts +12 -0
  338. package/llms.txt +1 -1
  339. package/package.json +9 -3
  340. package/skills/ui-authoring/COMPONENTS.md +1 -1
  341. package/skills/ui-authoring/PATTERNS.md +6 -2
  342. package/skills/ui-authoring/STANDARD.md +11 -1
  343. package/dist/DatePicker-BK7ioKBm.mjs.map +0 -1
  344. package/dist/DropdownMenu-jJSHQaih.mjs.map +0 -1
  345. package/dist/LoadingShimmer-CpfKTSUs.mjs.map +0 -1
  346. package/dist/PageLayout-DgEGcZgB.mjs.map +0 -1
  347. package/dist/Popover-DuFjaSoq.mjs.map +0 -1
  348. package/dist/TableControls-CX7BvgD2.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCloseFocus.mjs","names":[],"sources":["../../src/lib/useCloseFocus.ts"],"sourcesContent":["import { type Ref, type RefObject, useCallback, useRef } from 'react';\n\ntype OutsideEvent = CustomEvent<{ originalEvent: PointerEvent | FocusEvent }>;\n\nexport interface CloseFocusOptions {\n /** Runs once, when the close starts. `preventDefault` keeps focus where it is. */\n onCloseAutoFocus?: (event: Event) => void;\n /** Runs when the content reopens before its exit ends; Radix doesn't run it again then. */\n onOpenAutoFocus?: (event: Event) => void;\n onInteractOutside?: (event: OutsideEvent) => void;\n onEscapeKeyDown?: (event: KeyboardEvent) => void;\n /**\n * Modal content closes at once (it has no exit), so Radix's own focus handling is left alone:\n * until unmount Radix hides the rest of the page from assistive technology.\n */\n modal?: boolean;\n /** Where focus returns. Falls back to the element whose `aria-controls` names the content. */\n triggerRef?: RefObject<HTMLElement | null>;\n /** What takes focus on a reopen mid-exit: the first tabbable element, or the content itself. */\n reopenFocus?: 'first-tabbable' | 'content';\n}\n\nexport interface CloseFocus {\n ref: (node: HTMLElement | null) => void;\n onCloseAutoFocus?: (event: Event) => void;\n onInteractOutside?: (event: OutsideEvent) => void;\n onEscapeKeyDown?: (event: KeyboardEvent) => void;\n 'data-modal'?: '';\n}\n\nconst TABBABLE =\n 'button:not([disabled]), input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\n/**\n * Returns focus when a Radix popover or menu starts to close, instead of when its exit animation\n * ends and it unmounts, and stops the closing content taking input. Spread the result onto the\n * Radix `Content`, after the consumer's props.\n *\n * At close start it calls `onCloseAutoFocus` and, unless that's prevented or the close came from\n * an interaction outside, focuses the trigger, as Radix would. Radix's own call at unmount is then\n * prevented. Content that unmounts at once (no exit running) is left to Radix.\n */\nexport function useCloseFocus(options: CloseFocusOptions): CloseFocus {\n const latest = useRef(options);\n latest.current = options;\n const state = useRef({\n open: true,\n interactedOutside: false,\n trigger: null as HTMLElement | null,\n handled: new WeakSet<EventTarget>(),\n observer: null as MutationObserver | null,\n node: null as HTMLElement | null,\n });\n\n const findTrigger = (node: HTMLElement): HTMLElement | null => {\n // The `aria-controls` match wins: a raw Root nested in a PDS Popover inherits its triggerRef.\n const controlled = node.id\n ? node.ownerDocument.querySelector<HTMLElement>(\n `[aria-controls=\"${node.id.replace(/[\"\\\\]/g, '\\\\$&')}\"]`,\n )\n : null;\n return controlled ?? latest.current.triggerRef?.current ?? state.current.trigger;\n };\n\n const opened = (node: HTMLElement) => {\n const s = state.current;\n s.open = true;\n s.interactedOutside = false;\n s.trigger = findTrigger(node);\n if (!s.handled.has(node)) {\n return;\n }\n s.handled.delete(node);\n node.removeAttribute('inert');\n const event = new CustomEvent('focusScope.autoFocusOnMount', { cancelable: true });\n latest.current.onOpenAutoFocus?.(event);\n if (!event.defaultPrevented) {\n const target =\n latest.current.reopenFocus === 'content'\n ? node\n : (node.querySelector<HTMLElement>(TABBABLE) ?? node);\n target.focus({ preventScroll: true });\n }\n };\n\n const closed = (node: HTMLElement) => {\n const s = state.current;\n s.open = false;\n if (!node.isConnected) {\n return;\n }\n s.handled.add(node);\n const active = node.ownerDocument.activeElement;\n // A portaled child layer closing in the same commit (a menu item that closes its Popover)\n // holds focus outside `node`, and its own trigger is about to go inert with `node`.\n const focusInside =\n active == null ||\n active === node.ownerDocument.body ||\n node.contains(active) ||\n !!active.closest('[data-radix-popper-content-wrapper] [data-state=\"closed\"]');\n const interactedOutside = s.interactedOutside;\n const restore = () => {\n if (s.open) {\n return;\n }\n const event = new CustomEvent('focusScope.autoFocusOnUnmount', { cancelable: true });\n latest.current.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented && focusInside && !interactedOutside) {\n findTrigger(node)?.focus({ preventScroll: true });\n }\n };\n // Focus moved during a keydown takes that key's keypress, so an Enter that closes from a\n // field would click the trigger and reopen it. Radix restores after a task for the same reason.\n if (node.ownerDocument.defaultView?.event?.type === 'keydown') {\n setTimeout(restore, 0);\n } else {\n restore();\n }\n node.setAttribute('inert', '');\n };\n\n const ref = useCallback((node: HTMLElement | null) => {\n const s = state.current;\n // Radix composes its content refs afresh on every render, so React detaches (null) and\n // reattaches the same node each time; only a new node starts a new open.\n if (!node || node === s.node) {\n return;\n }\n s.observer?.disconnect();\n s.observer = null;\n s.node = node;\n if (latest.current.modal) {\n return;\n }\n s.open = node.getAttribute('data-state') !== 'closed';\n s.interactedOutside = false;\n const active = node.ownerDocument.activeElement;\n s.trigger = active && active !== node.ownerDocument.body ? (active as HTMLElement) : null;\n s.trigger = findTrigger(node);\n s.observer = new MutationObserver(() => {\n const isOpen = node.getAttribute('data-state') !== 'closed';\n if (isOpen && !s.open) {\n opened(node);\n } else if (!isOpen && s.open) {\n closed(node);\n }\n });\n s.observer.observe(node, { attributes: true, attributeFilter: ['data-state'] });\n }, []);\n\n if (options.modal) {\n return {\n ref,\n onCloseAutoFocus: options.onCloseAutoFocus,\n onInteractOutside: options.onInteractOutside,\n onEscapeKeyDown: options.onEscapeKeyDown,\n 'data-modal': '',\n };\n }\n\n return {\n ref,\n onCloseAutoFocus: (event) => {\n if (event.currentTarget && state.current.handled.has(event.currentTarget)) {\n state.current.handled.delete(event.currentTarget);\n event.preventDefault();\n return;\n }\n latest.current.onCloseAutoFocus?.(event);\n },\n onInteractOutside: (event) => {\n if (!state.current.open) {\n event.preventDefault();\n return;\n }\n latest.current.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n state.current.interactedOutside = true;\n }\n },\n onEscapeKeyDown: (event) => {\n if (!state.current.open) {\n event.preventDefault();\n return;\n }\n latest.current.onEscapeKeyDown?.(event);\n },\n };\n}\n\n/** Sets every ref to the node. Memoize the result, or React re-attaches it on every render. */\nexport function mergeRefs<T>(...refs: (Ref<T> | undefined)[]): (node: T | null) => void {\n return (node) => {\n for (const ref of refs) {\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n (ref as { current: T | null }).current = node;\n }\n }\n };\n}\n"],"mappings":";;AA8BA,MAAM,WACJ;;;;;;;;;;AAWF,SAAgB,cAAc,SAAwC;CACpE,MAAM,SAAS,OAAO,QAAQ;AAC9B,QAAO,UAAU;CACjB,MAAM,QAAQ,OAAO;EACnB,MAAM;EACN,mBAAmB;EACnB,SAAS;EACT,yBAAS,IAAI,SAAsB;EACnC,UAAU;EACV,MAAM;EACP,CAAC;CAEF,MAAM,eAAe,SAA0C;AAO7D,UALmB,KAAK,KACpB,KAAK,cAAc,cACjB,mBAAmB,KAAK,GAAG,QAAQ,UAAU,OAAO,CAAC,IACtD,GACD,SACiB,OAAO,QAAQ,YAAY,WAAW,MAAM,QAAQ;;CAG3E,MAAM,UAAU,SAAsB;EACpC,MAAM,IAAI,MAAM;AAChB,IAAE,OAAO;AACT,IAAE,oBAAoB;AACtB,IAAE,UAAU,YAAY,KAAK;AAC7B,MAAI,CAAC,EAAE,QAAQ,IAAI,KAAK,CACtB;AAEF,IAAE,QAAQ,OAAO,KAAK;AACtB,OAAK,gBAAgB,QAAQ;EAC7B,MAAM,QAAQ,IAAI,YAAY,+BAA+B,EAAE,YAAY,MAAM,CAAC;AAClF,SAAO,QAAQ,kBAAkB,MAAM;AACvC,MAAI,CAAC,MAAM,iBAKT,EAHE,OAAO,QAAQ,gBAAgB,YAC3B,OACC,KAAK,cAA2B,SAAS,IAAI,MAC7C,MAAM,EAAE,eAAe,MAAM,CAAC;;CAIzC,MAAM,UAAU,SAAsB;EACpC,MAAM,IAAI,MAAM;AAChB,IAAE,OAAO;AACT,MAAI,CAAC,KAAK,YACR;AAEF,IAAE,QAAQ,IAAI,KAAK;EACnB,MAAM,SAAS,KAAK,cAAc;EAGlC,MAAM,cACJ,UAAU,QACV,WAAW,KAAK,cAAc,QAC9B,KAAK,SAAS,OAAO,IACrB,CAAC,CAAC,OAAO,QAAQ,8DAA4D;EAC/E,MAAM,oBAAoB,EAAE;EAC5B,MAAM,gBAAgB;AACpB,OAAI,EAAE,KACJ;GAEF,MAAM,QAAQ,IAAI,YAAY,iCAAiC,EAAE,YAAY,MAAM,CAAC;AACpF,UAAO,QAAQ,mBAAmB,MAAM;AACxC,OAAI,CAAC,MAAM,oBAAoB,eAAe,CAAC,kBAC7C,aAAY,KAAK,EAAE,MAAM,EAAE,eAAe,MAAM,CAAC;;AAKrD,MAAI,KAAK,cAAc,aAAa,OAAO,SAAS,UAClD,YAAW,SAAS,EAAE;MAEtB,UAAS;AAEX,OAAK,aAAa,SAAS,GAAG;;CAGhC,MAAM,MAAM,aAAa,SAA6B;EACpD,MAAM,IAAI,MAAM;AAGhB,MAAI,CAAC,QAAQ,SAAS,EAAE,KACtB;AAEF,IAAE,UAAU,YAAY;AACxB,IAAE,WAAW;AACb,IAAE,OAAO;AACT,MAAI,OAAO,QAAQ,MACjB;AAEF,IAAE,OAAO,KAAK,aAAa,aAAa,KAAK;AAC7C,IAAE,oBAAoB;EACtB,MAAM,SAAS,KAAK,cAAc;AAClC,IAAE,UAAU,UAAU,WAAW,KAAK,cAAc,OAAQ,SAAyB;AACrF,IAAE,UAAU,YAAY,KAAK;AAC7B,IAAE,WAAW,IAAI,uBAAuB;GACtC,MAAM,SAAS,KAAK,aAAa,aAAa,KAAK;AACnD,OAAI,UAAU,CAAC,EAAE,KACf,QAAO,KAAK;YACH,CAAC,UAAU,EAAE,KACtB,QAAO,KAAK;IAEd;AACF,IAAE,SAAS,QAAQ,MAAM;GAAE,YAAY;GAAM,iBAAiB,CAAC,aAAa;GAAE,CAAC;IAC9E,EAAE,CAAC;AAEN,KAAI,QAAQ,MACV,QAAO;EACL;EACA,kBAAkB,QAAQ;EAC1B,mBAAmB,QAAQ;EAC3B,iBAAiB,QAAQ;EACzB,cAAc;EACf;AAGH,QAAO;EACL;EACA,mBAAmB,UAAU;AAC3B,OAAI,MAAM,iBAAiB,MAAM,QAAQ,QAAQ,IAAI,MAAM,cAAc,EAAE;AACzE,UAAM,QAAQ,QAAQ,OAAO,MAAM,cAAc;AACjD,UAAM,gBAAgB;AACtB;;AAEF,UAAO,QAAQ,mBAAmB,MAAM;;EAE1C,oBAAoB,UAAU;AAC5B,OAAI,CAAC,MAAM,QAAQ,MAAM;AACvB,UAAM,gBAAgB;AACtB;;AAEF,UAAO,QAAQ,oBAAoB,MAAM;AACzC,OAAI,CAAC,MAAM,iBACT,OAAM,QAAQ,oBAAoB;;EAGtC,kBAAkB,UAAU;AAC1B,OAAI,CAAC,MAAM,QAAQ,MAAM;AACvB,UAAM,gBAAgB;AACtB;;AAEF,UAAO,QAAQ,kBAAkB,MAAM;;EAE1C;;;AAIH,SAAgB,UAAa,GAAG,MAAwD;AACtF,SAAQ,SAAS;AACf,OAAK,MAAM,OAAO,KAChB,KAAI,OAAO,QAAQ,WACjB,KAAI,KAAK;WACA,IACR,KAA8B,UAAU"}
@@ -1,6 +1,6 @@
1
1
  import { r as css } from "../styledComponentsInterop-Cs5CCPRy.mjs";
2
- import { isFocusedVisible, isNotDisabled } from "../lib/pseudoClass.mjs";
3
2
  import { semanticColor } from "../lib/semanticColor.mjs";
3
+ import { isFocusedVisible, isNotDisabled } from "../lib/pseudoClass.mjs";
4
4
  import { Color } from "@persona/design-tokens";
5
5
  //#region src/mixins/focus.ts
6
6
  const focusColor = (theme) => semanticColor(theme, "BorderFocus", Color.BorderFocus);
@@ -1,8 +1,8 @@
1
1
  import { r as css } from "../styledComponentsInterop-Cs5CCPRy.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 src/mixins/hoverable.ts
7
7
  const hoverMixin = css`
8
8
  box-shadow:
@@ -1,9 +1,9 @@
1
1
  import { r as css } from "../styledComponentsInterop-Cs5CCPRy.mjs";
2
- import { isDisabled, isHovered, isNotDisabled } from "../lib/pseudoClass.mjs";
3
2
  import { semanticColor, semanticTokens } from "../lib/semanticColor.mjs";
4
- import { focusOutlineControlled } from "./focus.mjs";
5
3
  import "../variables/transitions.mjs";
6
4
  import { withAlpha } from "../lib/color.mjs";
5
+ import { isDisabled, isHovered, isNotDisabled } from "../lib/pseudoClass.mjs";
6
+ import { focusOutlineControlled } from "./focus.mjs";
7
7
  import { printMixins } from "./print/index.mjs";
8
8
  import { Color, Spacing, Typography } from "@persona/design-tokens";
9
9
  //#region src/mixins/input.ts
@@ -3,8 +3,12 @@ import * as _$styled_components0 from "styled-components";
3
3
  //#region src/mixins/motion.d.ts
4
4
  /**
5
5
  * The popover row of the motion scale for Radix content: fade and scale from the trigger over
6
- * `Fast` on Enter, and a 150ms fade under reduced motion. There's no Exit animation: Radix would
7
- * keep the content mounted until it ends, delaying `onCloseAutoFocus` focus restoration.
6
+ * `Fast` on Enter, back over `Faster` on Exit, and a 150ms fade under reduced motion. Closing
7
+ * content takes no pointer input.
8
+ *
9
+ * Radix keeps the content mounted until the exit ends and only then returns focus, so pair this
10
+ * with `useCloseFocus`, which returns it when the close starts. Content marked `data-modal` closes
11
+ * at once, and so does Radix Select, which unmounts its content on close without an exit.
8
12
  *
9
13
  * @param originVar the Radix transform-origin custom property, e.g.
10
14
  * `--radix-popover-content-transform-origin`
@@ -1,6 +1,6 @@
1
1
  import { i as keyframes, r as css } from "../styledComponentsInterop-Cs5CCPRy.mjs";
2
+ import { fadeIn, fadeOut } from "../variables/keyframes.mjs";
2
3
  import { ReducedMotionFade } from "../variables/transitions.mjs";
3
- import { fadeIn } from "../variables/keyframes.mjs";
4
4
  //#region src/mixins/motion.ts
5
5
  const popoverEnter = keyframes`
6
6
  from {
@@ -8,10 +8,20 @@ const popoverEnter = keyframes`
8
8
  transform: scale(0.96);
9
9
  }
10
10
  `;
11
+ const popoverExit = keyframes`
12
+ to {
13
+ opacity: 0;
14
+ transform: scale(0.96);
15
+ }
16
+ `;
11
17
  /**
12
18
  * The popover row of the motion scale for Radix content: fade and scale from the trigger over
13
- * `Fast` on Enter, and a 150ms fade under reduced motion. There's no Exit animation: Radix would
14
- * keep the content mounted until it ends, delaying `onCloseAutoFocus` focus restoration.
19
+ * `Fast` on Enter, back over `Faster` on Exit, and a 150ms fade under reduced motion. Closing
20
+ * content takes no pointer input.
21
+ *
22
+ * Radix keeps the content mounted until the exit ends and only then returns focus, so pair this
23
+ * with `useCloseFocus`, which returns it when the close starts. Content marked `data-modal` closes
24
+ * at once, and so does Radix Select, which unmounts its content on close without an exit.
15
25
  *
16
26
  * @param originVar the Radix transform-origin custom property, e.g.
17
27
  * `--radix-popover-content-transform-origin`
@@ -20,8 +30,20 @@ const popoverMotion = (originVar) => css`
20
30
  transform-origin: var(${originVar});
21
31
  animation: ${popoverEnter} ${"200ms"} ${"cubic-bezier(0, 0, 0.2, 1)"} both;
22
32
 
33
+ &[data-state='closed'] {
34
+ pointer-events: none;
35
+ }
36
+
37
+ &[data-state='closed']:not([data-modal]) {
38
+ animation: ${popoverExit} ${"150ms"} ${"cubic-bezier(0.4, 0, 1, 1)"} both;
39
+ }
40
+
23
41
  @media (prefers-reduced-motion: reduce) {
24
42
  animation: ${fadeIn} ${ReducedMotionFade.duration} ${ReducedMotionFade.easing} both;
43
+
44
+ &[data-state='closed']:not([data-modal]) {
45
+ animation: ${fadeOut} ${ReducedMotionFade.duration} ${ReducedMotionFade.easing} both;
46
+ }
25
47
  }
26
48
  `;
27
49
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"motion.mjs","names":[],"sources":["../../src/mixins/motion.ts"],"sourcesContent":["import { css, keyframes } from 'styled-components';\n\nimport { fadeIn } from '#src/variables/keyframes';\nimport {\n ReducedMotionFade,\n TransitionDuration,\n TransitionEasing,\n} from '#src/variables/transitions';\n\nconst popoverEnter = keyframes`\n from {\n opacity: 0;\n transform: scale(0.96);\n }\n`;\n\n/**\n * The popover row of the motion scale for Radix content: fade and scale from the trigger over\n * `Fast` on Enter, and a 150ms fade under reduced motion. There's no Exit animation: Radix would\n * keep the content mounted until it ends, delaying `onCloseAutoFocus` focus restoration.\n *\n * @param originVar the Radix transform-origin custom property, e.g.\n * `--radix-popover-content-transform-origin`\n */\nexport const popoverMotion = (originVar: string) => css`\n transform-origin: var(${originVar});\n animation: ${popoverEnter} ${TransitionDuration.Fast} ${TransitionEasing.Enter} both;\n\n @media (prefers-reduced-motion: reduce) {\n animation: ${fadeIn} ${ReducedMotionFade.duration} ${ReducedMotionFade.easing} both;\n }\n`;\n\n/**\n * The hover-reveal row: `Faster` on Exit while hidden, `Fast` on Enter while shown. CSS runs the\n * transition of the state being entered, so put `revealHidden` on the base rule and `revealShown`\n * on the rule that shows the element.\n */\nexport const revealHidden = css`\n transition: opacity ${TransitionDuration.Faster} ${TransitionEasing.Exit};\n`;\n\nexport const revealShown = css`\n transition-duration: ${TransitionDuration.Fast};\n transition-timing-function: ${TransitionEasing.Enter};\n`;\n\n/** `revealHidden` and `revealShown` for an element whose visibility is a prop. */\nexport const revealTransition = (visible: boolean) =>\n visible\n ? `transition: opacity ${TransitionDuration.Fast} ${TransitionEasing.Enter};`\n : `transition: opacity ${TransitionDuration.Faster} ${TransitionEasing.Exit};`;\n"],"mappings":";;;;AASA,MAAM,eAAe,SAAS;;;;;;;;;;;;;;AAe9B,MAAa,iBAAiB,cAAsB,GAAG;0BAC7B,UAAU;eACrB,aAAa,GAAA,QAA2B,GAAA,6BAA0B;;;iBAGhE,OAAO,GAAG,kBAAkB,SAAS,GAAG,kBAAkB,OAAO;;;;;;;;AASlF,MAAa,eAAe,GAAG;gCACmB,GAAA,6BAAyB;;AAG3E,MAAa,cAAc,GAAG;iCACmB;6DACM;;;AAIvD,MAAa,oBAAoB,YAC/B,UACI,0DACA"}
1
+ {"version":3,"file":"motion.mjs","names":[],"sources":["../../src/mixins/motion.ts"],"sourcesContent":["import { css, keyframes } from 'styled-components';\n\nimport { fadeIn, fadeOut } from '#src/variables/keyframes';\nimport {\n ReducedMotionFade,\n TransitionDuration,\n TransitionEasing,\n} from '#src/variables/transitions';\n\nconst popoverEnter = keyframes`\n from {\n opacity: 0;\n transform: scale(0.96);\n }\n`;\n\nconst popoverExit = keyframes`\n to {\n opacity: 0;\n transform: scale(0.96);\n }\n`;\n\n/**\n * The popover row of the motion scale for Radix content: fade and scale from the trigger over\n * `Fast` on Enter, back over `Faster` on Exit, and a 150ms fade under reduced motion. Closing\n * content takes no pointer input.\n *\n * Radix keeps the content mounted until the exit ends and only then returns focus, so pair this\n * with `useCloseFocus`, which returns it when the close starts. Content marked `data-modal` closes\n * at once, and so does Radix Select, which unmounts its content on close without an exit.\n *\n * @param originVar the Radix transform-origin custom property, e.g.\n * `--radix-popover-content-transform-origin`\n */\nexport const popoverMotion = (originVar: string) => css`\n transform-origin: var(${originVar});\n animation: ${popoverEnter} ${TransitionDuration.Fast} ${TransitionEasing.Enter} both;\n\n &[data-state='closed'] {\n pointer-events: none;\n }\n\n &[data-state='closed']:not([data-modal]) {\n animation: ${popoverExit} ${TransitionDuration.Faster} ${TransitionEasing.Exit} both;\n }\n\n @media (prefers-reduced-motion: reduce) {\n animation: ${fadeIn} ${ReducedMotionFade.duration} ${ReducedMotionFade.easing} both;\n\n &[data-state='closed']:not([data-modal]) {\n animation: ${fadeOut} ${ReducedMotionFade.duration} ${ReducedMotionFade.easing} both;\n }\n }\n`;\n\n/**\n * The hover-reveal row: `Faster` on Exit while hidden, `Fast` on Enter while shown. CSS runs the\n * transition of the state being entered, so put `revealHidden` on the base rule and `revealShown`\n * on the rule that shows the element.\n */\nexport const revealHidden = css`\n transition: opacity ${TransitionDuration.Faster} ${TransitionEasing.Exit};\n`;\n\nexport const revealShown = css`\n transition-duration: ${TransitionDuration.Fast};\n transition-timing-function: ${TransitionEasing.Enter};\n`;\n\n/** `revealHidden` and `revealShown` for an element whose visibility is a prop. */\nexport const revealTransition = (visible: boolean) =>\n visible\n ? `transition: opacity ${TransitionDuration.Fast} ${TransitionEasing.Enter};`\n : `transition: opacity ${TransitionDuration.Faster} ${TransitionEasing.Exit};`;\n"],"mappings":";;;;AASA,MAAM,eAAe,SAAS;;;;;;AAO9B,MAAM,cAAc,SAAS;;;;;;;;;;;;;;;;;;AAmB7B,MAAa,iBAAiB,cAAsB,GAAG;0BAC7B,UAAU;eACrB,aAAa,GAAA,QAA2B,GAAA,6BAA0B;;;;;;;iBAOhE,YAAY,GAAA,QAA6B,GAAA,6BAAyB;;;;iBAIlE,OAAO,GAAG,kBAAkB,SAAS,GAAG,kBAAkB,OAAO;;;mBAG/D,QAAQ,GAAG,kBAAkB,SAAS,GAAG,kBAAkB,OAAO;;;;;;;;;AAUrF,MAAa,eAAe,GAAG;gCACmB,GAAA,6BAAyB;;AAG3E,MAAa,cAAc,GAAG;iCACmB;6DACM;;;AAIvD,MAAa,oBAAoB,YAC/B,UACI,0DACA"}
@@ -1,19 +1,19 @@
1
1
  import { a as styled } from "../../styledComponentsInterop-Cs5CCPRy.mjs";
2
2
  import { semanticColor } from "../../lib/semanticColor.mjs";
3
- import { focusStyle } from "../../mixins/focus.mjs";
4
- import "../../variables/transitions.mjs";
5
3
  import { HeadlessAriaButton } from "../../lib/HeadlessAriaButton.mjs";
6
4
  import { n as RouterLink } from "../../router-BxmA940v.mjs";
7
5
  import { TruncatedText } from "../../lib/TruncatedText.mjs";
8
6
  import { i as Paragraph, n as Heading$1 } from "../../Text-D0vEReED.mjs";
9
- import { a as Tooltip } from "../../Tooltip-C2VB8I6y.mjs";
7
+ import "../../variables/transitions.mjs";
8
+ import { a as Tooltip } from "../../Tooltip-CVBxc1yf.mjs";
9
+ import { focusStyle } from "../../mixins/focus.mjs";
10
10
  import { n as Stack, t as HStack } from "../../Stack-Bzom2BTR.mjs";
11
- import { n as Button$1, t as IconButton } from "../../IconButton-kSjnfhWt.mjs";
12
- import { n as DropdownMenu_default } from "../../DropdownMenu-jJSHQaih.mjs";
13
- import { t as DropdownButton } from "../../DropdownButton-Dp-MZ5tA.mjs";
14
- import { n as SingleColumnLayout } from "../../PageLayout-DgEGcZgB.mjs";
15
- import { Color, Spacing } from "@persona/design-tokens";
11
+ import { n as Button$1, t as IconButton } from "../../IconButton-Bj1fry_K.mjs";
12
+ import { n as DropdownMenu_default } from "../../DropdownMenu-Ip75l4Th.mjs";
13
+ import { t as DropdownButton } from "../../DropdownButton-BxZ5hn0X.mjs";
14
+ import { n as SingleColumnLayout } from "../../PageLayout-CPiVnS_r.mjs";
16
15
  import { cloneElement } from "react";
16
+ import { Color, Spacing } from "@persona/design-tokens";
17
17
  import { Disclosure, DisclosurePanel } from "react-aria-components";
18
18
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
19
19
  import { ChevronDownIcon, MoreIcon } from "@persona/icons";
@@ -1,7 +1,8 @@
1
+ import { a as styled } from "../../styledComponentsInterop-Cs5CCPRy.mjs";
1
2
  import { t as Card_default } from "../../Card-DuQHyroh.mjs";
2
- import { t as DataTable } from "../../DataTable-DiwzhNMt.mjs";
3
- import { t as PageHeader } from "../../PageHeader-bhQTjuZF.mjs";
4
- import { a as Section, i as Container } from "../../PageLayout-DgEGcZgB.mjs";
3
+ import { t as DataTable } from "../../DataTable-DdSY9mzT.mjs";
4
+ import { t as PageHeader } from "../../PageHeader-6KvtGED-.mjs";
5
+ import { n as SingleColumnLayout } from "../../PageLayout-CPiVnS_r.mjs";
5
6
  import { useMemo } from "react";
6
7
  import { jsx, jsxs } from "react/jsx-runtime";
7
8
  //#region src/patterns/IndexTableLayout/useColumnConfiguration.ts
@@ -46,7 +47,10 @@ const useColumnConfiguration = ({ columnDefinitions, columnConfiguration, onColu
46
47
  };
47
48
  //#endregion
48
49
  //#region src/patterns/IndexTableLayout/IndexTableLayout.tsx
49
- const IndexTableLayout = ({ title, tableTitle, headerProps, banner, className, controls, columnDefinitions, defaultColumns, columnConfiguration, onColumnConfigurationChange, getColumnDisabled, sortByRelevance, ...dataTableProps }) => {
50
+ const Root = styled.div`
51
+ width: 100%;
52
+ `;
53
+ const IndexTableLayout = ({ title, tableTitle, headerProps, banner, className, width = "wide", controls, columnDefinitions, defaultColumns, columnConfiguration, onColumnConfigurationChange, getColumnDisabled, sortByRelevance, ...dataTableProps }) => {
50
54
  const { columns, columnConfigurationProps } = useColumnConfiguration({
51
55
  columnDefinitions,
52
56
  defaultColumns,
@@ -60,7 +64,7 @@ const IndexTableLayout = ({ title, tableTitle, headerProps, banner, className, c
60
64
  const forwardedDataTableProps = { ...dataTableProps };
61
65
  delete forwardedDataTableProps.showColumnProperties;
62
66
  delete forwardedDataTableProps.onUpdateColumnProperties;
63
- return /* @__PURE__ */ jsxs(Container, {
67
+ return /* @__PURE__ */ jsxs(Root, {
64
68
  className,
65
69
  children: [/* @__PURE__ */ jsx(PageHeader, {
66
70
  ...restHeaderProps,
@@ -68,17 +72,20 @@ const IndexTableLayout = ({ title, tableTitle, headerProps, banner, className, c
68
72
  title: headerTitle ?? title,
69
73
  subtitle: headerSubtitle
70
74
  }
71
- }), /* @__PURE__ */ jsx(Section, { children: /* @__PURE__ */ jsx(Card_default, { children: /* @__PURE__ */ jsxs(Card_default.Body, { children: [banner, /* @__PURE__ */ jsx(DataTable, {
72
- ...forwardedDataTableProps,
73
- columns,
74
- title: tableTitle,
75
- showControls: true,
76
- controls: {
77
- ...controls,
78
- columnConfigurationProps
79
- },
80
- enableRowSelection: hasBulkActions
81
- })] }) }) })]
75
+ }), /* @__PURE__ */ jsx(SingleColumnLayout, {
76
+ width,
77
+ main: /* @__PURE__ */ jsx(Card_default, { children: /* @__PURE__ */ jsxs(Card_default.Body, { children: [banner, /* @__PURE__ */ jsx(DataTable, {
78
+ ...forwardedDataTableProps,
79
+ columns,
80
+ title: tableTitle,
81
+ showControls: true,
82
+ controls: {
83
+ ...controls,
84
+ columnConfigurationProps
85
+ },
86
+ enableRowSelection: hasBulkActions
87
+ })] }) })
88
+ })]
82
89
  });
83
90
  };
84
91
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["Card"],"sources":["../../../src/patterns/IndexTableLayout/useColumnConfiguration.ts","../../../src/patterns/IndexTableLayout/IndexTableLayout.tsx"],"sourcesContent":["import type { RowData } from '@tanstack/react-table';\nimport { useMemo } from 'react';\n\nimport type { TableViewConfigurationProps } from '#src/components/DataTable/TableControls';\nimport type { ColumnConfig } from '#src/components/DataTable/types';\n\ntype AttributeColumn = TableViewConfigurationProps['columnConfiguration'][number];\n\nexport interface ColumnDefinition<TData extends RowData> extends ColumnConfig<TData> {\n key?: string;\n label: string;\n isCustomField?: boolean;\n}\n\nexport type ColumnDefinitions<TData extends RowData> = Record<string, ColumnDefinition<TData>>;\n\nexport interface UseColumnConfigurationOptions<TData extends RowData> {\n columnDefinitions: ColumnDefinitions<TData>;\n defaultColumns: string[];\n columnConfiguration?: AttributeColumn[];\n onColumnConfigurationChange?: (c: AttributeColumn[]) => void;\n getColumnDisabled?: (columnId: string, shownColumnIds: string[]) => boolean;\n sortByRelevance?: boolean;\n}\n\nexport const useColumnConfiguration = <TData extends RowData>({\n columnDefinitions,\n columnConfiguration,\n onColumnConfigurationChange,\n defaultColumns,\n getColumnDisabled,\n sortByRelevance,\n}: UseColumnConfigurationOptions<TData>): {\n columns: ColumnConfig<TData>[];\n columnConfigurationProps?: TableViewConfigurationProps;\n} => {\n const visibleColumnKeys = useMemo(() => {\n if (!columnConfiguration || columnConfiguration.length === 0) {\n return defaultColumns;\n }\n\n return columnConfiguration.map((column) => column.key);\n }, [columnConfiguration, defaultColumns]);\n\n const columns = useMemo(\n () =>\n visibleColumnKeys\n .map((key): ColumnConfig<TData> | null => {\n const definition = columnDefinitions[key];\n if (!definition) {\n return null;\n }\n\n const {\n key: _key,\n label: _label,\n isCustomField: _isCustomField,\n ...columnConfig\n } = definition;\n return columnConfig;\n })\n .filter((column): column is ColumnConfig<TData> => column != null),\n [visibleColumnKeys, columnDefinitions],\n );\n\n const columnConfigurationProps = useMemo(() => {\n if (!columnConfiguration || !onColumnConfigurationChange) {\n return undefined;\n }\n\n const attributeOptions = Object.keys(columnDefinitions).map((key) => ({\n key: String(key),\n label: columnDefinitions[key].label,\n isCustomField: columnDefinitions[key].isCustomField,\n }));\n\n const currentConfiguration: AttributeColumn[] = visibleColumnKeys\n .filter((key) => columnDefinitions[key] != null)\n .map((key) => ({\n key: String(key),\n label: columnDefinitions[key].label,\n }));\n\n return {\n columnConfiguration: currentConfiguration,\n attributeOptions,\n updateColumnConfiguration: onColumnConfigurationChange,\n getColumnDisabled,\n sortByRelevance,\n };\n }, [\n columnConfiguration,\n onColumnConfigurationChange,\n columnDefinitions,\n visibleColumnKeys,\n getColumnDisabled,\n sortByRelevance,\n ]);\n\n return { columns, columnConfigurationProps };\n};\n","import type { RowData } from '@tanstack/react-table';\nimport type { ReactNode } from 'react';\n\nimport type { BreadcrumbsProps } from '#src/components/Breadcrumbs';\nimport Card from '#src/components/Card';\nimport DataTable, { type DataTableProps } from '#src/components/DataTable';\nimport type {\n BaseFilterConfig,\n FilterConfig,\n TableControlsProps,\n} from '#src/components/DataTable/TableControls';\nimport PageHeader, { type PageHeaderProps } from '#src/components/PageHeader';\nimport { Container, Section } from '#src/patterns/PageLayout';\n\nimport {\n useColumnConfiguration,\n type UseColumnConfigurationOptions,\n} from './useColumnConfiguration';\n\nexport type IndexTableLayoutHeaderProps =\n | (Omit<Extract<PageHeaderProps, { breadcrumbs?: never }>, 'title'> & { title?: ReactNode })\n | Extract<PageHeaderProps, { breadcrumbs: BreadcrumbsProps }>;\n\nexport interface IndexTableLayoutProps<\n TData extends RowData,\n TFilter extends BaseFilterConfig = FilterConfig,\n>\n extends\n Omit<\n DataTableProps<TData, TFilter>,\n | 'title'\n | 'showControls'\n | 'controls'\n | 'columns'\n | 'enableRowSelection'\n | 'showColumnProperties'\n | 'onUpdateColumnProperties'\n >,\n UseColumnConfigurationOptions<TData> {\n title: string;\n tableTitle?: string;\n headerProps?: IndexTableLayoutHeaderProps;\n banner?: ReactNode;\n className?: string;\n /** Host-built table controls: search, filters/filterResolver/filterPanel, saved-view ControlBar props, tableActions… */\n controls?: Omit<TableControlsProps<TFilter>, 'columnConfigurationProps'>;\n}\n\nexport const IndexTableLayout = <\n TData extends RowData,\n TFilter extends BaseFilterConfig = FilterConfig,\n>({\n title,\n tableTitle,\n headerProps,\n banner,\n className,\n controls,\n columnDefinitions,\n defaultColumns,\n columnConfiguration,\n onColumnConfigurationChange,\n getColumnDisabled,\n sortByRelevance,\n ...dataTableProps\n}: IndexTableLayoutProps<TData, TFilter>) => {\n const { columns, columnConfigurationProps } = useColumnConfiguration({\n columnDefinitions,\n defaultColumns,\n columnConfiguration,\n onColumnConfigurationChange,\n getColumnDisabled,\n sortByRelevance,\n });\n\n const hasBulkActions =\n (dataTableProps.bulkActions?.length ?? 0) > 0 ||\n (controls?.bulkActions?.length ?? 0) > 0 ||\n dataTableProps.getAvailableBulkActions != null;\n\n const {\n title: headerTitle,\n subtitle: headerSubtitle,\n breadcrumbs,\n ...restHeaderProps\n } = headerProps ?? {};\n\n const forwardedDataTableProps = { ...dataTableProps } as typeof dataTableProps &\n Pick<DataTableProps<TData, TFilter>, 'showColumnProperties' | 'onUpdateColumnProperties'>;\n delete forwardedDataTableProps.showColumnProperties;\n delete forwardedDataTableProps.onUpdateColumnProperties;\n\n return (\n <Container className={className}>\n <PageHeader\n {...restHeaderProps}\n {...(breadcrumbs\n ? { breadcrumbs }\n : { title: headerTitle ?? title, subtitle: headerSubtitle })}\n />\n <Section>\n <Card>\n <Card.Body>\n {banner}\n <DataTable<TData, TFilter>\n {...forwardedDataTableProps}\n columns={columns}\n title={tableTitle}\n showControls\n controls={{ ...controls, columnConfigurationProps }}\n enableRowSelection={hasBulkActions}\n />\n </Card.Body>\n </Card>\n </Section>\n </Container>\n );\n};\n\nexport default IndexTableLayout;\n"],"mappings":";;;;;;;AAyBA,MAAa,0BAAiD,EAC5D,mBACA,qBACA,6BACA,gBACA,mBACA,sBAIG;CACH,MAAM,oBAAoB,cAAc;AACtC,MAAI,CAAC,uBAAuB,oBAAoB,WAAW,EACzD,QAAO;AAGT,SAAO,oBAAoB,KAAK,WAAW,OAAO,IAAI;IACrD,CAAC,qBAAqB,eAAe,CAAC;AAyDzC,QAAO;EAAE,SAvDO,cAEZ,kBACG,KAAK,QAAoC;GACxC,MAAM,aAAa,kBAAkB;AACrC,OAAI,CAAC,WACH,QAAO;GAGT,MAAM,EACJ,KAAK,MACL,OAAO,QACP,eAAe,gBACf,GAAG,iBACD;AACJ,UAAO;IACP,CACD,QAAQ,WAA0C,UAAU,KAAK,EACtE,CAAC,mBAAmB,kBAAkB,CAqCxB;EAAE,0BAlCe,cAAc;AAC7C,OAAI,CAAC,uBAAuB,CAAC,4BAC3B;GAGF,MAAM,mBAAmB,OAAO,KAAK,kBAAkB,CAAC,KAAK,SAAS;IACpE,KAAK,OAAO,IAAI;IAChB,OAAO,kBAAkB,KAAK;IAC9B,eAAe,kBAAkB,KAAK;IACvC,EAAE;AASH,UAAO;IACL,qBAR8C,kBAC7C,QAAQ,QAAQ,kBAAkB,QAAQ,KAAK,CAC/C,KAAK,SAAS;KACb,KAAK,OAAO,IAAI;KAChB,OAAO,kBAAkB,KAAK;KAC/B,EAGwC;IACzC;IACA,2BAA2B;IAC3B;IACA;IACD;KACA;GACD;GACA;GACA;GACA;GACA;GACA;GACD,CAEyC;EAAE;;;;ACnD9C,MAAa,oBAGX,EACA,OACA,YACA,aACA,QACA,WACA,UACA,mBACA,gBACA,qBACA,6BACA,mBACA,iBACA,GAAG,qBACwC;CAC3C,MAAM,EAAE,SAAS,6BAA6B,uBAAuB;EACnE;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;CAEF,MAAM,kBACH,eAAe,aAAa,UAAU,KAAK,MAC3C,UAAU,aAAa,UAAU,KAAK,KACvC,eAAe,2BAA2B;CAE5C,MAAM,EACJ,OAAO,aACP,UAAU,gBACV,aACA,GAAG,oBACD,eAAe,EAAE;CAErB,MAAM,0BAA0B,EAAE,GAAG,gBAAgB;AAErD,QAAO,wBAAwB;AAC/B,QAAO,wBAAwB;AAE/B,QACE,qBAAC,WAAD;EAAsB;YAAtB,CACE,oBAAC,YAAD;GACE,GAAI;GACJ,GAAK,cACD,EAAE,aAAa,GACf;IAAE,OAAO,eAAe;IAAO,UAAU;IAAgB;GAC7D,CAAA,EACF,oBAAC,SAAD,EAAA,UACE,oBAACA,cAAD,EAAA,UACE,qBAACA,aAAK,MAAN,EAAA,UAAA,CACG,QACD,oBAAC,WAAD;GACE,GAAI;GACK;GACT,OAAO;GACP,cAAA;GACA,UAAU;IAAE,GAAG;IAAU;IAA0B;GACnD,oBAAoB;GACpB,CAAA,CACQ,EAAA,CAAA,EACP,CAAA,EACC,CAAA,CACA"}
1
+ {"version":3,"file":"index.mjs","names":["Card"],"sources":["../../../src/patterns/IndexTableLayout/useColumnConfiguration.ts","../../../src/patterns/IndexTableLayout/IndexTableLayout.tsx"],"sourcesContent":["import type { RowData } from '@tanstack/react-table';\nimport { useMemo } from 'react';\n\nimport type { TableViewConfigurationProps } from '#src/components/DataTable/TableControls';\nimport type { ColumnConfig } from '#src/components/DataTable/types';\n\ntype AttributeColumn = TableViewConfigurationProps['columnConfiguration'][number];\n\nexport interface ColumnDefinition<TData extends RowData> extends ColumnConfig<TData> {\n key?: string;\n label: string;\n isCustomField?: boolean;\n}\n\nexport type ColumnDefinitions<TData extends RowData> = Record<string, ColumnDefinition<TData>>;\n\nexport interface UseColumnConfigurationOptions<TData extends RowData> {\n columnDefinitions: ColumnDefinitions<TData>;\n defaultColumns: string[];\n columnConfiguration?: AttributeColumn[];\n onColumnConfigurationChange?: (c: AttributeColumn[]) => void;\n getColumnDisabled?: (columnId: string, shownColumnIds: string[]) => boolean;\n sortByRelevance?: boolean;\n}\n\nexport const useColumnConfiguration = <TData extends RowData>({\n columnDefinitions,\n columnConfiguration,\n onColumnConfigurationChange,\n defaultColumns,\n getColumnDisabled,\n sortByRelevance,\n}: UseColumnConfigurationOptions<TData>): {\n columns: ColumnConfig<TData>[];\n columnConfigurationProps?: TableViewConfigurationProps;\n} => {\n const visibleColumnKeys = useMemo(() => {\n if (!columnConfiguration || columnConfiguration.length === 0) {\n return defaultColumns;\n }\n\n return columnConfiguration.map((column) => column.key);\n }, [columnConfiguration, defaultColumns]);\n\n const columns = useMemo(\n () =>\n visibleColumnKeys\n .map((key): ColumnConfig<TData> | null => {\n const definition = columnDefinitions[key];\n if (!definition) {\n return null;\n }\n\n const {\n key: _key,\n label: _label,\n isCustomField: _isCustomField,\n ...columnConfig\n } = definition;\n return columnConfig;\n })\n .filter((column): column is ColumnConfig<TData> => column != null),\n [visibleColumnKeys, columnDefinitions],\n );\n\n const columnConfigurationProps = useMemo(() => {\n if (!columnConfiguration || !onColumnConfigurationChange) {\n return undefined;\n }\n\n const attributeOptions = Object.keys(columnDefinitions).map((key) => ({\n key: String(key),\n label: columnDefinitions[key].label,\n isCustomField: columnDefinitions[key].isCustomField,\n }));\n\n const currentConfiguration: AttributeColumn[] = visibleColumnKeys\n .filter((key) => columnDefinitions[key] != null)\n .map((key) => ({\n key: String(key),\n label: columnDefinitions[key].label,\n }));\n\n return {\n columnConfiguration: currentConfiguration,\n attributeOptions,\n updateColumnConfiguration: onColumnConfigurationChange,\n getColumnDisabled,\n sortByRelevance,\n };\n }, [\n columnConfiguration,\n onColumnConfigurationChange,\n columnDefinitions,\n visibleColumnKeys,\n getColumnDisabled,\n sortByRelevance,\n ]);\n\n return { columns, columnConfigurationProps };\n};\n","import type { RowData } from '@tanstack/react-table';\nimport type { ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport type { BreadcrumbsProps } from '#src/components/Breadcrumbs';\nimport Card from '#src/components/Card';\nimport DataTable, { type DataTableProps } from '#src/components/DataTable';\nimport type {\n BaseFilterConfig,\n FilterConfig,\n TableControlsProps,\n} from '#src/components/DataTable/TableControls';\nimport PageHeader, { type PageHeaderProps } from '#src/components/PageHeader';\nimport { type PageLayoutWidth, SingleColumnLayout } from '#src/patterns/PageLayout';\n\nimport {\n useColumnConfiguration,\n type UseColumnConfigurationOptions,\n} from './useColumnConfiguration';\n\nconst Root = styled.div`\n width: 100%;\n`;\n\nexport type IndexTableLayoutHeaderProps =\n | (Omit<Extract<PageHeaderProps, { breadcrumbs?: never }>, 'title'> & { title?: ReactNode })\n | Extract<PageHeaderProps, { breadcrumbs: BreadcrumbsProps }>;\n\nexport interface IndexTableLayoutProps<\n TData extends RowData,\n TFilter extends BaseFilterConfig = FilterConfig,\n>\n extends\n Omit<\n DataTableProps<TData, TFilter>,\n | 'title'\n | 'showControls'\n | 'controls'\n | 'columns'\n | 'enableRowSelection'\n | 'showColumnProperties'\n | 'onUpdateColumnProperties'\n >,\n UseColumnConfigurationOptions<TData> {\n title: string;\n tableTitle?: string;\n headerProps?: IndexTableLayoutHeaderProps;\n banner?: ReactNode;\n className?: string;\n /**\n * Page grid for the table card. `wide` uses the fluid grid; `standard` uses the centered fixed grid (max 1408px).\n *\n * @defaultValue 'wide'\n */\n width?: PageLayoutWidth;\n /** Host-built table controls: search, filters/filterResolver/filterPanel, saved-view ControlBar props, tableActions… */\n controls?: Omit<TableControlsProps<TFilter>, 'columnConfigurationProps'>;\n}\n\nexport const IndexTableLayout = <\n TData extends RowData,\n TFilter extends BaseFilterConfig = FilterConfig,\n>({\n title,\n tableTitle,\n headerProps,\n banner,\n className,\n width = 'wide',\n controls,\n columnDefinitions,\n defaultColumns,\n columnConfiguration,\n onColumnConfigurationChange,\n getColumnDisabled,\n sortByRelevance,\n ...dataTableProps\n}: IndexTableLayoutProps<TData, TFilter>) => {\n const { columns, columnConfigurationProps } = useColumnConfiguration({\n columnDefinitions,\n defaultColumns,\n columnConfiguration,\n onColumnConfigurationChange,\n getColumnDisabled,\n sortByRelevance,\n });\n\n const hasBulkActions =\n (dataTableProps.bulkActions?.length ?? 0) > 0 ||\n (controls?.bulkActions?.length ?? 0) > 0 ||\n dataTableProps.getAvailableBulkActions != null;\n\n const {\n title: headerTitle,\n subtitle: headerSubtitle,\n breadcrumbs,\n ...restHeaderProps\n } = headerProps ?? {};\n\n const forwardedDataTableProps = { ...dataTableProps } as typeof dataTableProps &\n Pick<DataTableProps<TData, TFilter>, 'showColumnProperties' | 'onUpdateColumnProperties'>;\n delete forwardedDataTableProps.showColumnProperties;\n delete forwardedDataTableProps.onUpdateColumnProperties;\n\n return (\n <Root className={className}>\n <PageHeader\n {...restHeaderProps}\n {...(breadcrumbs\n ? { breadcrumbs }\n : { title: headerTitle ?? title, subtitle: headerSubtitle })}\n />\n <SingleColumnLayout\n width={width}\n main={\n <Card>\n <Card.Body>\n {banner}\n <DataTable<TData, TFilter>\n {...forwardedDataTableProps}\n columns={columns}\n title={tableTitle}\n showControls\n controls={{ ...controls, columnConfigurationProps }}\n enableRowSelection={hasBulkActions}\n />\n </Card.Body>\n </Card>\n }\n />\n </Root>\n );\n};\n\nexport default IndexTableLayout;\n"],"mappings":";;;;;;;;AAyBA,MAAa,0BAAiD,EAC5D,mBACA,qBACA,6BACA,gBACA,mBACA,sBAIG;CACH,MAAM,oBAAoB,cAAc;AACtC,MAAI,CAAC,uBAAuB,oBAAoB,WAAW,EACzD,QAAO;AAGT,SAAO,oBAAoB,KAAK,WAAW,OAAO,IAAI;IACrD,CAAC,qBAAqB,eAAe,CAAC;AAyDzC,QAAO;EAAE,SAvDO,cAEZ,kBACG,KAAK,QAAoC;GACxC,MAAM,aAAa,kBAAkB;AACrC,OAAI,CAAC,WACH,QAAO;GAGT,MAAM,EACJ,KAAK,MACL,OAAO,QACP,eAAe,gBACf,GAAG,iBACD;AACJ,UAAO;IACP,CACD,QAAQ,WAA0C,UAAU,KAAK,EACtE,CAAC,mBAAmB,kBAAkB,CAqCxB;EAAE,0BAlCe,cAAc;AAC7C,OAAI,CAAC,uBAAuB,CAAC,4BAC3B;GAGF,MAAM,mBAAmB,OAAO,KAAK,kBAAkB,CAAC,KAAK,SAAS;IACpE,KAAK,OAAO,IAAI;IAChB,OAAO,kBAAkB,KAAK;IAC9B,eAAe,kBAAkB,KAAK;IACvC,EAAE;AASH,UAAO;IACL,qBAR8C,kBAC7C,QAAQ,QAAQ,kBAAkB,QAAQ,KAAK,CAC/C,KAAK,SAAS;KACb,KAAK,OAAO,IAAI;KAChB,OAAO,kBAAkB,KAAK;KAC/B,EAGwC;IACzC;IACA,2BAA2B;IAC3B;IACA;IACD;KACA;GACD;GACA;GACA;GACA;GACA;GACA;GACD,CAEyC;EAAE;;;;AC/E9C,MAAM,OAAO,OAAO,GAAG;;;AAuCvB,MAAa,oBAGX,EACA,OACA,YACA,aACA,QACA,WACA,QAAQ,QACR,UACA,mBACA,gBACA,qBACA,6BACA,mBACA,iBACA,GAAG,qBACwC;CAC3C,MAAM,EAAE,SAAS,6BAA6B,uBAAuB;EACnE;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;CAEF,MAAM,kBACH,eAAe,aAAa,UAAU,KAAK,MAC3C,UAAU,aAAa,UAAU,KAAK,KACvC,eAAe,2BAA2B;CAE5C,MAAM,EACJ,OAAO,aACP,UAAU,gBACV,aACA,GAAG,oBACD,eAAe,EAAE;CAErB,MAAM,0BAA0B,EAAE,GAAG,gBAAgB;AAErD,QAAO,wBAAwB;AAC/B,QAAO,wBAAwB;AAE/B,QACE,qBAAC,MAAD;EAAiB;YAAjB,CACE,oBAAC,YAAD;GACE,GAAI;GACJ,GAAK,cACD,EAAE,aAAa,GACf;IAAE,OAAO,eAAe;IAAO,UAAU;IAAgB;GAC7D,CAAA,EACF,oBAAC,oBAAD;GACS;GACP,MACE,oBAACA,cAAD,EAAA,UACE,qBAACA,aAAK,MAAN,EAAA,UAAA,CACG,QACD,oBAAC,WAAD;IACE,GAAI;IACK;IACT,OAAO;IACP,cAAA;IACA,UAAU;KAAE,GAAG;KAAU;KAA0B;IACnD,oBAAoB;IACpB,CAAA,CACQ,EAAA,CAAA,EACP,CAAA;GAET,CAAA,CACG"}
@@ -1,9 +1,9 @@
1
1
  import { a as styled } from "../../styledComponentsInterop-Cs5CCPRy.mjs";
2
2
  import { n as Stack, t as HStack } from "../../Stack-Bzom2BTR.mjs";
3
- import { t as LoadingShimmer } from "../../LoadingShimmer-CpfKTSUs.mjs";
4
- import { t as Card_default } from "../../CardV2-DCoDfEvr.mjs";
5
- import { h as Table, m as TableHeaderCell, n as TableBody, p as TableRow, r as TableHead, s as TableCell } from "../../Table-SMJAWqoe.mjs";
6
- import { n as PageHeaderContainer } from "../../PageHeader-bhQTjuZF.mjs";
3
+ import { t as LoadingShimmer } from "../../LoadingShimmer-BVVdBeN-.mjs";
4
+ import { t as Card_default } from "../../CardV2-DO-8COfu.mjs";
5
+ import { h as Table, m as TableHeaderCell, n as TableBody, p as TableRow, r as TableHead, s as TableCell } from "../../Table-9mNn8Q-d.mjs";
6
+ import { n as PageHeaderContainer } from "../../PageHeader-6KvtGED-.mjs";
7
7
  import { Color, Spacing } from "@persona/design-tokens";
8
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
9
  //#region src/patterns/containers.tsx
@@ -1,6 +1,6 @@
1
1
  import { a as styled } from "../../styledComponentsInterop-Cs5CCPRy.mjs";
2
- import "../../variables/transitions.mjs";
3
2
  import { fadeIn, rotate } from "../../variables/keyframes.mjs";
3
+ import "../../variables/transitions.mjs";
4
4
  import { Color } from "@persona/design-tokens";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
  //#region src/patterns/LayoutLoadingSpinner/LayoutLoadingSpinner.tsx
@@ -1,4 +1,4 @@
1
- import { n as Container, r as Section, t as Backdrop } from "../../PageLayout-BXM_pyrU.mjs";
1
+ import { n as Container, r as Section, t as Backdrop } from "../../PageLayout-BdVM37bV.mjs";
2
2
  import { r as PageLayoutWidth } from "../../PageLayoutFrame-4QGs7x-t.mjs";
3
3
  import { n as SingleColumnLayoutProps, t as SingleColumnLayout } from "../../SingleColumnLayout-D2bpX7X1.mjs";
4
4
  import { n as SplitColumnLayoutProps, t as SplitColumnLayout } from "../../SplitColumnLayout-CRDSDHHm.mjs";
@@ -1,2 +1,2 @@
1
- import { a as Section, i as Container, n as SingleColumnLayout, r as Backdrop, t as SplitColumnLayout } from "../../PageLayout-DgEGcZgB.mjs";
1
+ import { a as Section, i as Container, n as SingleColumnLayout, r as Backdrop, t as SplitColumnLayout } from "../../PageLayout-CPiVnS_r.mjs";
2
2
  export { Backdrop, Container, Section, SingleColumnLayout, SplitColumnLayout };
@@ -1,11 +1,11 @@
1
1
  import { a as styled } from "../../styledComponentsInterop-Cs5CCPRy.mjs";
2
2
  import { semanticColor } from "../../lib/semanticColor.mjs";
3
3
  import { t as HStack } from "../../Stack-Bzom2BTR.mjs";
4
- import { n as Button } from "../../IconButton-kSjnfhWt.mjs";
5
- import { i as Modal_default } from "../../Modal-B6X5AgWj.mjs";
6
- import { t as ProgressIndicator } from "../../ProgressIndicator-hy1P-RG1.mjs";
7
- import { Color, Spacing } from "@persona/design-tokens";
4
+ import { n as Button } from "../../IconButton-Bj1fry_K.mjs";
5
+ import { i as Modal_default } from "../../Modal-CiPFqr0L.mjs";
6
+ import { t as ProgressIndicator } from "../../ProgressIndicator-zt3ndT9U.mjs";
8
7
  import { useState } from "react";
8
+ import { Color, Spacing } from "@persona/design-tokens";
9
9
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
10
10
  //#region src/patterns/WizardModal/WizardModal.tsx
11
11
  const statusFromProceed = (result) => result === "valid" ? "completed" : result;
package/dist/tone.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { n as SemanticTokens } from "./semantic-BZbvb3LV.mjs";
2
2
  import { n as PdsColor } from "./color-Db57Wms_.mjs";
3
- import { o as StickerProps } from "./Sticker-C7Wv3Obx.mjs";
3
+ import { o as StickerProps } from "./Sticker-CLvRB8V5.mjs";
4
4
  import { Color } from "@persona/design-tokens";
5
5
 
6
6
  //#region src/components/Sticker/tone.d.ts
@@ -1,5 +1,5 @@
1
- import { l as MenuItemProps } from "./Menu-Ca5ftvo6.mjs";
2
- import { o as StickerProps } from "./Sticker-C7Wv3Obx.mjs";
1
+ import { l as MenuItemProps } from "./Menu-DviYNrFd.mjs";
2
+ import { o as StickerProps } from "./Sticker-CLvRB8V5.mjs";
3
3
  import { ReactNode } from "react";
4
4
  import { Column, DeepKeys, FilterFnOption, Header, RowData, SortingState, Table } from "@tanstack/react-table";
5
5
 
@@ -177,4 +177,4 @@ type BulkAction = {
177
177
  };
178
178
  //#endregion
179
179
  export { RowAction as C, RowDataWithTourTarget as D, RowDataWithSubrowsToAlwaysShowIds as E, SortProps as O, RenderValueStickerFormatConfig as S, RowDataWithSubrows as T, DataTableColumns as _, DataTableColumnBaseFormat as a, DatetimeConfig as b, DataTableColumnDatetimeFormat as c, DataTableColumnImageFormat as d, DataTableColumnNumberFormat as f, DataTableColumnURLFormat as g, DataTableColumnStringFormat as h, ColumnConfig as i, StickerMapping as k, DataTableColumnFormat as l, DataTableColumnStickerFormat as m, ClientFilterConfig as n, DataTableColumnCheckboxFormat as o, DataTableColumnPiiFormat as p, ClientFilterType as r, DataTableColumnDateFormat as s, BulkAction as t, DataTableColumnIDFormat as u, DataTableVariables as v, RowDataWithDetails as w, HeadlessFilterConfig as x, DateConfig as y };
180
- //# sourceMappingURL=types-D5txFacG.d.mts.map
180
+ //# sourceMappingURL=types-Dws2XDz2.d.mts.map
@@ -1,4 +1,4 @@
1
- import { n as ComboboxProps } from "./Combobox-aOJDTjzC.mjs";
1
+ import { n as ComboboxProps } from "./Combobox-DbcSss15.mjs";
2
2
  import { n as DateRange } from "./DateRangePicker-DlHC2q--.mjs";
3
3
  import { ReactNode } from "react";
4
4
  import { DateValue } from "@internationalized/date";
@@ -92,4 +92,4 @@ interface FilterTypeDefinition<TFilter extends BaseFilterConfig = FilterConfig>
92
92
  type FilterTypeResolver<TFilter extends BaseFilterConfig = FilterConfig> = (config: TFilter) => FilterTypeDefinition<TFilter> | undefined;
93
93
  //#endregion
94
94
  export { ComboboxFilterConfig as a, FilterRenderOptions as c, InputFilterConfig as d, MultiSelectFilterConfig as f, BaseFilterConfig as i, FilterTypeDefinition as l, AttributeColumn as n, DateRangeFilterConfig as o, SelectFilterConfig as p, BaseActiveFilter as r, FilterConfig as s, ActiveFilter as t, FilterTypeResolver as u };
95
- //# sourceMappingURL=types-C_CncajO.d.mts.map
95
+ //# sourceMappingURL=types-NO2GRlM-.d.mts.map
package/dist/types5.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as ComboboxFilterConfig, c as FilterRenderOptions, d as InputFilterConfig, f as MultiSelectFilterConfig, i as BaseFilterConfig, l as FilterTypeDefinition, n as AttributeColumn, o as DateRangeFilterConfig, p as SelectFilterConfig, r as BaseActiveFilter, s as FilterConfig, t as ActiveFilter, u as FilterTypeResolver } from "./types-C_CncajO.mjs";
1
+ import { a as ComboboxFilterConfig, c as FilterRenderOptions, d as InputFilterConfig, f as MultiSelectFilterConfig, i as BaseFilterConfig, l as FilterTypeDefinition, n as AttributeColumn, o as DateRangeFilterConfig, p as SelectFilterConfig, r as BaseActiveFilter, s as FilterConfig, t as ActiveFilter, u as FilterTypeResolver } from "./types-NO2GRlM-.mjs";
2
2
  export { ActiveFilter, AttributeColumn, BaseActiveFilter, BaseFilterConfig, ComboboxFilterConfig, DateRangeFilterConfig, FilterConfig, FilterRenderOptions, FilterTypeDefinition, FilterTypeResolver, InputFilterConfig, MultiSelectFilterConfig, SelectFilterConfig };
@@ -1,4 +1,4 @@
1
- import { r as Sticker } from "./Sticker-C7Wv3Obx.mjs";
1
+ import { r as Sticker } from "./Sticker-CLvRB8V5.mjs";
2
2
  import { dt as ObjectSchemaMap, n as JsonSchema, st as FunctionJsonSchema } from "./jsonSchema-C4lfpDrt.mjs";
3
3
  import { n as Chain, s as MethodChainNode } from "./methodChainTypes-De6sHGyd.mjs";
4
4
  import { t as Option } from "./schemaOptions-DMq37JC5.mjs";
@@ -74,4 +74,4 @@ declare const useChainSchema: ({
74
74
  declare const useChain: UseChainHook;
75
75
  //#endregion
76
76
  export { useChain as n, useChainSchema as r, chainRootsFromSchemaProperties as t };
77
- //# sourceMappingURL=useChain-x9fd9Fyq.d.mts.map
77
+ //# sourceMappingURL=useChain-B--KAtdN.d.mts.map
@@ -3,7 +3,7 @@ import { dt as ObjectSchemaMap, n as JsonSchema, st as FunctionJsonSchema } from
3
3
  import { n as Chain, s as MethodChainNode } from "./methodChainTypes-De6sHGyd.mjs";
4
4
  import { n as PossibleChainSchema, t as ChainRoot } from "./chainTypes-C5mXGz6T.mjs";
5
5
  import { u as ValueType } from "./types-02Ij0dgs.mjs";
6
- import { n as useChain } from "./useChain-x9fd9Fyq.mjs";
6
+ import { n as useChain } from "./useChain-B--KAtdN.mjs";
7
7
 
8
8
  //#region src/components/SmartTextInput/useChainAtCursor.d.ts
9
9
  /**
@@ -1,5 +1,5 @@
1
- import { i as TableViewConfigurationProps } from "./TableViewConfigurationDropdown-CZcLH8uR.mjs";
2
- import { i as ColumnConfig } from "./types-D5txFacG.mjs";
1
+ import { i as TableViewConfigurationProps } from "./TableViewConfigurationDropdown-DE9HFXYY.mjs";
2
+ import { i as ColumnConfig } from "./types-Dws2XDz2.mjs";
3
3
  import { RowData } from "@tanstack/react-table";
4
4
 
5
5
  //#region src/patterns/IndexTableLayout/useColumnConfiguration.d.ts
@@ -1,4 +1,4 @@
1
- import { m as FooterAction } from "./ComboboxBase-Brgv5nxk.mjs";
1
+ import { m as FooterAction } from "./ComboboxBase-CrFweFGi.mjs";
2
2
  import { KeyboardEvent } from "react";
3
3
 
4
4
  //#region src/components/Combobox/useComboboxFooterAction.d.ts
@@ -1,4 +1,4 @@
1
- import { C as RowAction, O as SortProps, _ as DataTableColumns, l as DataTableColumnFormat } from "./types-D5txFacG.mjs";
1
+ import { C as RowAction, O as SortProps, _ as DataTableColumns, l as DataTableColumnFormat } from "./types-Dws2XDz2.mjs";
2
2
  import { ColumnDef, Row, RowData, Table } from "@tanstack/react-table";
3
3
 
4
4
  //#region src/components/DataTable/useTableColumns.d.ts
@@ -69,4 +69,4 @@ declare function useTableColumns<TData extends RowData, TFormat extends {
69
69
  }[]];
70
70
  //#endregion
71
71
  export { UseTableColumnsParams as n, useTableColumns as r, RenderFormatFn as t };
72
- //# sourceMappingURL=useTableColumns-BEKJNrb1.d.mts.map
72
+ //# sourceMappingURL=useTableColumns-tITjHasE.d.mts.map
@@ -1,2 +1,2 @@
1
- import { n as UseTableColumnsParams, r as useTableColumns, t as RenderFormatFn } from "./useTableColumns-BEKJNrb1.mjs";
1
+ import { n as UseTableColumnsParams, r as useTableColumns, t as RenderFormatFn } from "./useTableColumns-tITjHasE.mjs";
2
2
  export { RenderFormatFn, UseTableColumnsParams, useTableColumns };
@@ -1,4 +1,4 @@
1
- import { i as ComboboxOption } from "./ComboboxBase-Brgv5nxk.mjs";
1
+ import { i as ComboboxOption } from "./ComboboxBase-CrFweFGi.mjs";
2
2
  import { MutableRefObject, RefObject } from "react";
3
3
 
4
4
  //#region src/components/Combobox/useTruncation.d.ts
@@ -0,0 +1,12 @@
1
+ import { d as FilterRuleValue, o as FilterField } from "./types-BJqmRXFV.mjs";
2
+
3
+ //#region src/components/DataTable/TableControls/FiltersV2/FilterBar/value-labels.d.ts
4
+ type GetValueLabel = (fieldId: string, value: string) => string | undefined;
5
+ /**
6
+ * Render-only overlay; never mutate/cache labels in the immutable registry. Re-evaluate
7
+ * on each render so a stable host getter can read newly hydrated external names.
8
+ */
9
+ declare function optionLabelsForDisplay(field: FilterField | undefined, value: FilterRuleValue, optionLabels: Record<string, string> | undefined, getValueLabel?: GetValueLabel): Record<string, string> | undefined;
10
+ //#endregion
11
+ export { GetValueLabel, optionLabelsForDisplay };
12
+ //# sourceMappingURL=value-labels.d.mts.map
package/llms.txt CHANGED
@@ -44,7 +44,7 @@ their own subpaths.
44
44
  - Saved views: `TableControls` (or `DataTable.controls`) requires `onSetDefaultView` and `onUnsetDefaultView` together, or neither. Editable views offer "Set as default" / "Unset default" based on `view.isDefault`; the design system confirms before calling either callback and warns that both changes affect the entire organization. Consumers own persistence and must remove their own confirmations to avoid double prompts. Compact controls omit saved views. Pass `starredDefaultView` to star the default view: the `isDefault` view is pinned first with a star icon, cannot be dragged, hidden, deleted or unset, and its menu offers only Save, Duplicate and Reset (its name field still renames it); every other view gets the full menu. Rename and Duplicate on it call `onViewNameChange` / `onDuplicateView` with its id; Save calls `onSaveView()` with no id, saving whatever the consumer treats as the current view. A null `currentView` is shown as the starred view, so `onSaveView` and toolbar Save must treat null as the starred view; while an `isDefault` view exists, pass its id as `currentView` rather than null. A lazy default is a consumer-owned placeholder view with `isDefault: true`. While a view is the default the built-in tab is not shown and a `null` `currentView` is displayed as the starred view; with no `isDefault` view the built-in tab is shown starred and read-only.
45
45
  - DataTable filters: pass `filtersV2` (`TableControlsFiltersV2Props` / `FilterBarProps`) through `DataTable.controls` or directly to `TableControls` for a first-class FilterBar; defaults visible with size derived from `compact`. Hosts own V2 data filtering and feed `onChange` back to `initialState` for active-filter messaging; hydration needs no remount key. Precedence: `filterPanel` → `filtersV2` → legacy `filters`. Legacy `filters` supports `input`, `select`, `multiselect`, `combobox`, and `daterange` with optional `filterResolver`. With `clientFiltering`, `column.filter` generates legacy-only controls backed by TanStack column-filter state, not V2 filtering.
46
46
  - SmartTextInput: when method chains are allowed (`ValueType.MethodChain` or `{{...}}` interpolation), you MUST pass `renderFunctionForm`. PDS does not build the function-parameter form, so without it the dialog opened by placing the cursor in a call like `convert_to(...)` shows only the function name over an empty body. It receives `FunctionFormRenderProps` and must call `onComplete(nodes)` or `onCancel()`. In persona-web, `useDashboardSmartTextInputProps` supplies it (backed by `InputMethodChain/FunctionForm`). See components/SmartTextInput/SmartTextInput.mdx.
47
- - FilterBar: optional `FilterField.condition`, `pickerGroup`, and `disabledReason` support host-defined individual predicates in pills and native Rules; existing aggregate fields stay unchanged. See components/DataTable/DataTable.mdx. Hosts own feature activation and serialization.
47
+ - FilterBar: optional `getValueLabel(fieldId, value)` supplies synchronous display-only choice/multi-choice names in closed pills, overflow tooltips and Rules summaries, before registry labels/raw values. Re-render when host names arrive; it does not fetch, change values/options or mutate the registry. Optional `FilterField.condition`, `pickerGroup`, and `disabledReason` support host-defined individual predicates; existing aggregate fields stay unchanged. See components/DataTable/DataTable.mdx; hosts own editors, feature activation and serialization.
48
48
 
49
49
  ## Testing
50
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@persona/design-system",
3
- "version": "0.10.11",
3
+ "version": "0.10.12",
4
4
  "description": "React components for Persona UI",
5
5
  "keywords": [
6
6
  "tanstack-intent"
@@ -85,8 +85,10 @@
85
85
  "./components/SmartTextInput": "./dist/components/SmartTextInput/index.mjs",
86
86
  "./components/SmartTextInput/parser/method-chain/parser": "./dist/components/SmartTextInput/parser/method-chain/parser.mjs",
87
87
  "./components/SmartTextInput/parser/method-chain/types": "./dist/components/SmartTextInput/parser/method-chain/types.mjs",
88
+ "./components/SmartTextInput/parser/safe-parse": "./dist/components/SmartTextInput/parser/safe-parse.mjs",
88
89
  "./components/SmartTextInput/parser/smart-text/parser": "./dist/components/SmartTextInput/parser/smart-text/parser.mjs",
89
90
  "./components/SmartTextInput/parser/smart-text/types": "./dist/components/SmartTextInput/parser/smart-text/types.mjs",
91
+ "./components/SmartTextInput/parser/tree": "./dist/components/SmartTextInput/parser/tree.mjs",
90
92
  "./components/SmartTextInput/PillType": "./dist/components/SmartTextInput/PillType.mjs",
91
93
  "./components/Spacer": "./dist/components/Spacer/index.mjs",
92
94
  "./components/Spinner": "./dist/components/Spinner/index.mjs",
@@ -143,6 +145,7 @@
143
145
  "./lib/TruncatedText": "./dist/lib/TruncatedText.mjs",
144
146
  "./lib/TruncatedTextWithTooltip": "./dist/lib/TruncatedTextWithTooltip.mjs",
145
147
  "./lib/useChain": "./dist/lib/useChain.mjs",
148
+ "./lib/useCloseFocus": "./dist/lib/useCloseFocus.mjs",
146
149
  "./lib/useControlled": "./dist/lib/useControlled.mjs",
147
150
  "./lib/useEmbeddedSurface": "./dist/lib/useEmbeddedSurface.mjs",
148
151
  "./lib/useIsOverflow": "./dist/lib/useIsOverflow.mjs",
@@ -245,8 +248,8 @@
245
248
  "@faker-js/faker": "^10.5.0",
246
249
  "@figma/code-connect": "^1.4.4",
247
250
  "@oxlint/plugins": "1.72.0",
248
- "@persona/design-tokens": "0.4.25",
249
- "@persona/icons": "0.1.14",
251
+ "@persona/design-tokens": "0.4.26",
252
+ "@persona/icons": "0.1.15",
250
253
  "@storybook/react": "^10.6.2",
251
254
  "@storybook/react-vite": "^10.6.2",
252
255
  "@tanstack/intent": "^0.3.6",
@@ -371,8 +374,10 @@
371
374
  "./components/SmartTextInput": "./dist/components/SmartTextInput/index.mjs",
372
375
  "./components/SmartTextInput/parser/method-chain/parser": "./dist/components/SmartTextInput/parser/method-chain/parser.mjs",
373
376
  "./components/SmartTextInput/parser/method-chain/types": "./dist/components/SmartTextInput/parser/method-chain/types.mjs",
377
+ "./components/SmartTextInput/parser/safe-parse": "./dist/components/SmartTextInput/parser/safe-parse.mjs",
374
378
  "./components/SmartTextInput/parser/smart-text/parser": "./dist/components/SmartTextInput/parser/smart-text/parser.mjs",
375
379
  "./components/SmartTextInput/parser/smart-text/types": "./dist/components/SmartTextInput/parser/smart-text/types.mjs",
380
+ "./components/SmartTextInput/parser/tree": "./dist/components/SmartTextInput/parser/tree.mjs",
376
381
  "./components/SmartTextInput/PillType": "./dist/components/SmartTextInput/PillType.mjs",
377
382
  "./components/Spacer": "./dist/components/Spacer/index.mjs",
378
383
  "./components/Spinner": "./dist/components/Spinner/index.mjs",
@@ -429,6 +434,7 @@
429
434
  "./lib/TruncatedText": "./dist/lib/TruncatedText.mjs",
430
435
  "./lib/TruncatedTextWithTooltip": "./dist/lib/TruncatedTextWithTooltip.mjs",
431
436
  "./lib/useChain": "./dist/lib/useChain.mjs",
437
+ "./lib/useCloseFocus": "./dist/lib/useCloseFocus.mjs",
432
438
  "./lib/useControlled": "./dist/lib/useControlled.mjs",
433
439
  "./lib/useEmbeddedSurface": "./dist/lib/useEmbeddedSurface.mjs",
434
440
  "./lib/useIsOverflow": "./dist/lib/useIsOverflow.mjs",
@@ -26,7 +26,7 @@ exists. If there is no `.mdx`, use the published type declarations
26
26
  | `SplitColumnLayout` | An 8:4 main and aside page. Same optional regions as `SingleColumnLayout`. Stacks main then aside below 768px | `@persona/design-system/patterns/PageLayout` |
27
27
  | `DataTable` | Data table — browsing tabular data with filtering, bulk actions, search, pagination, and sorting | `@persona/design-system/components/DataTable` |
28
28
  | `IndexTableLayout` | Standard page shell for a DataTable index; hosts supply controls and own saved-view persistence | `@persona/design-system/patterns/IndexTableLayout` |
29
- | `FilterBar` | Structured filters with native Rules; opt-in field `condition`, `pickerGroup`, and `disabledReason` support individual host-defined predicates. Hosts own flags and serialization; see DataTable.mdx | `@persona/design-system/components/DataTable/TableControls` |
29
+ | `FilterBar` | Structured filters with native Rules; opt-in field `condition`, `pickerGroup`, and `disabledReason` support individual host-defined predicates. Optional `getValueLabel(fieldId, value)` supplies display-only choice labels for pills/Rules before registry/raw fallbacks. Hosts re-render when names arrive and own fetching, editors, flags and serialization; see DataTable.mdx | `@persona/design-system/components/DataTable/TableControls` |
30
30
  | `DatePicker` | Picking a date or date range from a calendar | `@persona/design-system/components/DatePicker` |
31
31
  | `DropdownButton` | Opening a menu of related actions from a button | `@persona/design-system/components/DropdownButton` |
32
32
  | `DropdownMenu` | Showing a temporary action list on a custom trigger | `@persona/design-system/components/DropdownMenu` |
@@ -26,14 +26,18 @@ Which pattern to use, and for what. Patterns with a dedicated doc link to
26
26
 
27
27
  ## Page layouts
28
28
 
29
- Index pages backed by `DataTable` use `IndexTableLayout`, which owns its `Container`, `PageHeader`,
30
- `Section`, and `Card` shell. Import it from `@persona/design-system/patterns/IndexTableLayout`;
29
+ Index pages backed by `DataTable` use `IndexTableLayout`, which composes `PageHeader`,
30
+ `SingleColumnLayout` (wide by default), and `Card`; don't wrap it in `Container` or `Section`.
31
+ Import it from `@persona/design-system/patterns/IndexTableLayout`;
31
32
  never copy it, persona-web's `DashboardDataTable` wrapper (PDS does not ship one), or
32
33
  `TableControls`/filter panels into an app. Pass app-specific filters through the `controls` prop
33
34
  (`controls={{ filters, filterResolver }}` or `controls={{ filterPanel }}`), and if the pattern lacks
34
35
  a slot you need, add it here instead of forking the layout. Other pages render `PageHeader`, then `SingleColumnLayout` or
35
36
  `SplitColumnLayout`. Do not wrap those templates in `Container` or `Section`.
36
37
 
38
+ For bulk actions on an index page, always set `floatingBulkActions` with `bulkActions` or
39
+ `getAvailableBulkActions`; inline bulk-action buttons in the table controls are legacy.
40
+
37
41
  ```tsx
38
42
  import Header from '@persona/design-system/components/PageHeader';
39
43
  import { SingleColumnLayout, SplitColumnLayout } from '@persona/design-system/patterns/PageLayout';