@persona/design-system 0.10.6 → 0.10.8

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 (469) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/Accordion.d.mts +1 -1
  3. package/dist/AccordionItem.d.mts +1 -1
  4. package/dist/{Action-Bmo8B-Q3.d.mts → Action-CHWYwpYR.d.mts} +3 -3
  5. package/dist/Action.d.mts +1 -1
  6. package/dist/AdvancedFilterRuleRow.d.mts +2 -2
  7. package/dist/AdvancedFilterRulesPopover.d.mts +2 -2
  8. package/dist/ArrayValueControl.d.mts +1 -1
  9. package/dist/Attribute.d.mts +3 -3
  10. package/dist/BooleanValueControl.d.mts +1 -1
  11. package/dist/BottomPanel.d.mts +7 -0
  12. package/dist/{Breadcrumb-DnY8n3EL.d.mts → Breadcrumb-uK4v6_P1.d.mts} +1 -1
  13. package/dist/Breadcrumb.d.mts +1 -1
  14. package/dist/{Breadcrumbs-DRu_JfdI.d.mts → Breadcrumbs-3MtvzTPi.d.mts} +2 -2
  15. package/dist/Breadcrumbs.d.mts +1 -1
  16. package/dist/{Button-Cg8KyT5M.d.mts → Button-DjD8QxcY.d.mts} +4 -4
  17. package/dist/Button.d.mts +1 -1
  18. package/dist/{Calendar-D-6WOLJ1.d.mts → Calendar-DRJljp8S.d.mts} +1 -1
  19. package/dist/Calendar.d.mts +1 -1
  20. package/dist/CalendarBase.d.mts +1 -1
  21. package/dist/{Card-CfECLwQ6.d.mts → Card-DiUHtYg_.d.mts} +3 -3
  22. package/dist/Card.d.mts +1 -1
  23. package/dist/Card2.d.mts +2 -2
  24. package/dist/CardGrouping.d.mts +2 -2
  25. package/dist/{Checkbox-ZywrdT_h.d.mts → Checkbox-Clt9mCTk.d.mts} +1 -1
  26. package/dist/Checkbox.d.mts +1 -1
  27. package/dist/{CheckboxGroupField-CjeEoiPa.d.mts → CheckboxGroupField-DnVqlpwi.d.mts} +3 -3
  28. package/dist/CheckboxGroupField.d.mts +1 -1
  29. package/dist/ChoicesValueControl.d.mts +1 -1
  30. package/dist/{Combobox-O6LbofT2.d.mts → Combobox-fYZjpn5-.d.mts} +3 -3
  31. package/dist/Combobox.d.mts +2 -2
  32. package/dist/{ComboboxBase-5aSDuY-E.d.mts → ComboboxBase-Mb8HyeAI.d.mts} +6 -6
  33. package/dist/ComboboxBase.d.mts +1 -1
  34. package/dist/{ComboboxMultiSelect-D3mX4Dzq.d.mts → ComboboxMultiSelect-C87lkXr7.d.mts} +2 -2
  35. package/dist/ComboboxMultiSelect.d.mts +1 -1
  36. package/dist/{ComboboxSingleSelect-CfSy6sCU.d.mts → ComboboxSingleSelect-CIYakRW5.d.mts} +4 -4
  37. package/dist/ComboboxSingleSelect.d.mts +1 -1
  38. package/dist/{CompactBar-zYfXjFmn.d.mts → CompactBar-D67CdcIo.d.mts} +3 -3
  39. package/dist/CompactBar.d.mts +1 -1
  40. package/dist/{ControlBar-kJ_eWf8f.d.mts → ControlBar-34th2yt4.d.mts} +2 -2
  41. package/dist/ControlBar.d.mts +1 -1
  42. package/dist/{DataTable-BXHmi-SW.d.mts → DataTable-BZtzdtVs.d.mts} +6 -6
  43. package/dist/{DataTable-CAfZNJmb.mjs → DataTable-BvA2H9D9.mjs} +4 -4
  44. package/dist/{DataTable-CAfZNJmb.mjs.map → DataTable-BvA2H9D9.mjs.map} +1 -1
  45. package/dist/DataTable.d.mts +1 -1
  46. package/dist/{DateField-g7malFm-.d.mts → DateField-BIPqfQzC.d.mts} +2 -2
  47. package/dist/DateField.d.mts +1 -1
  48. package/dist/{DatePicker-8kUpFFh8.d.mts → DatePicker-BdOqWdwx.d.mts} +2 -2
  49. package/dist/DatePicker.d.mts +1 -1
  50. package/dist/{DateRangePicker-Nv4uNuIW.d.mts → DateRangePicker-DlHC2q--.d.mts} +3 -3
  51. package/dist/DateRangePicker.d.mts +1 -1
  52. package/dist/DateRangeValueControl.d.mts +2 -2
  53. package/dist/DateValueControl.d.mts +1 -1
  54. package/dist/DropdownButton.d.mts +2 -2
  55. package/dist/{DropdownMenu-CAYVX9Q3.d.mts → DropdownMenu-DVxXQDRC.d.mts} +2 -2
  56. package/dist/DropdownMenu.d.mts +1 -1
  57. package/dist/{ErrorProps-Cy-APmdC.d.mts → ErrorProps-4Ohsinrf.d.mts} +1 -1
  58. package/dist/ErrorProps.d.mts +1 -1
  59. package/dist/{FieldRegistry-a44G08fS.d.mts → FieldRegistry-C2NVPhMO.d.mts} +2 -2
  60. package/dist/FieldRegistry.d.mts +1 -1
  61. package/dist/{FilterBar-BpMguIXl.d.mts → FilterBar-BE_gBM0H.d.mts} +4 -4
  62. package/dist/FilterBar.d.mts +1 -1
  63. package/dist/FilterPickerMenu.d.mts +2 -2
  64. package/dist/FilterPill.d.mts +1 -1
  65. package/dist/FilterPopover.d.mts +1 -1
  66. package/dist/FloatValueControl.d.mts +1 -1
  67. package/dist/{FloatingActionBar-DPA9v_yH.d.mts → FloatingActionBar-BUgSKimy.d.mts} +1 -1
  68. package/dist/FloatingActionBar.d.mts +1 -1
  69. package/dist/FloatingToolbar-Df90f7Dm.mjs +493 -0
  70. package/dist/FloatingToolbar-Df90f7Dm.mjs.map +1 -0
  71. package/dist/FloatingToolbar.d.mts +1 -1
  72. package/dist/{FormControl-TkYMZeBd.d.mts → FormControl-BQe3GRhi.d.mts} +2 -2
  73. package/dist/FormControl.d.mts +1 -1
  74. package/dist/FormControlLabel.d.mts +1 -1
  75. package/dist/{FormField-D10LW9-a.d.mts → FormField-BW5uMzId.d.mts} +2 -2
  76. package/dist/FormField.d.mts +1 -1
  77. package/dist/{Grid-BtTuj5mR.mjs → Grid-CYpOqTUu.mjs} +1 -1
  78. package/dist/{Grid-BtTuj5mR.mjs.map → Grid-CYpOqTUu.mjs.map} +1 -1
  79. package/dist/{Header-fwlbzxYx.d.mts → Header-CV0Lcf0C.d.mts} +1 -1
  80. package/dist/Header.d.mts +1 -1
  81. package/dist/{HelperTooltip-BLfPfJRN.d.mts → HelperTooltip-BNM3pTM-.d.mts} +2 -2
  82. package/dist/HelperTooltip.d.mts +1 -1
  83. package/dist/HighlightedText.d.mts +2 -2
  84. package/dist/{I18nContext-BBVKF9ui.d.mts → I18nContext-Dt5VraO8.d.mts} +2 -2
  85. package/dist/I18nContext.d.mts +1 -1
  86. package/dist/{IconButton-KhCwTwPx.d.mts → IconButton-C_ReZm8v.d.mts} +2 -2
  87. package/dist/IconButton.d.mts +1 -1
  88. package/dist/ImageTile.d.mts +1 -1
  89. package/dist/IndexTableLayout.d.mts +5 -5
  90. package/dist/InlineCombobox.d.mts +1 -1
  91. package/dist/InlineInput.d.mts +1 -1
  92. package/dist/{Input-QNjbGo38.d.mts → Input-DH-5dKor.d.mts} +3 -3
  93. package/dist/Input.d.mts +1 -1
  94. package/dist/{InputProps-BT7-RfnD.d.mts → InputProps-B363l4_k.d.mts} +2 -2
  95. package/dist/InputProps.d.mts +1 -1
  96. package/dist/{Inserter-BnQVEqHV.d.mts → Inserter-BtUatmsd.d.mts} +1 -1
  97. package/dist/Inserter.d.mts +1 -1
  98. package/dist/IntegerValueControl.d.mts +1 -1
  99. package/dist/Link.d.mts +1 -1
  100. package/dist/{ListBox-CvnFiHK5.d.mts → ListBox-DxOACf6N.d.mts} +3 -3
  101. package/dist/ListBox.d.mts +1 -1
  102. package/dist/{ListBoxField-DuUwx9Cv.d.mts → ListBoxField-CgnDuhUw.d.mts} +4 -4
  103. package/dist/ListBoxField.d.mts +1 -1
  104. package/dist/LoadingShimmer.d.mts +1 -1
  105. package/dist/{LogicRow-COvZNiUd.d.mts → LogicRow-Dv_1G1TC.d.mts} +3 -3
  106. package/dist/LogicRow.d.mts +1 -1
  107. package/dist/MaskedInput.d.mts +2 -2
  108. package/dist/{Menu-ByYFNvgS.d.mts → Menu-BfjvH8mr.d.mts} +3 -3
  109. package/dist/Menu.d.mts +1 -1
  110. package/dist/{Modal-ziuzDCPN.mjs → Modal-BGlRX63w.mjs} +47 -39
  111. package/dist/Modal-BGlRX63w.mjs.map +1 -0
  112. package/dist/{Modal-Bhwq1bQJ.d.mts → Modal-CujB7DuB.d.mts} +6 -3
  113. package/dist/Modal.d.mts +1 -1
  114. package/dist/{PageHeader-BzvA_NNt.mjs → PageHeader-DEKTopzU.mjs} +1 -1
  115. package/dist/{PageHeader-BzvA_NNt.mjs.map → PageHeader-DEKTopzU.mjs.map} +1 -1
  116. package/dist/{PageHeader-D2QLrS7-.d.mts → PageHeader-DRatgscC.d.mts} +2 -2
  117. package/dist/PageHeader.d.mts +1 -1
  118. package/dist/{PageLayout-DfAbeFIh.d.mts → PageLayout-BdVM37bV.d.mts} +1 -1
  119. package/dist/{PageLayout-DCe3F76N.mjs → PageLayout-DjtGrvJa.mjs} +2 -2
  120. package/dist/{PageLayout-DCe3F76N.mjs.map → PageLayout-DjtGrvJa.mjs.map} +1 -1
  121. package/dist/PageLayout.d.mts +1 -1
  122. package/dist/{PageLayoutFrame-CQLREOBH.d.mts → PageLayoutFrame-4QGs7x-t.d.mts} +1 -1
  123. package/dist/PageLayoutFrame.d.mts +1 -1
  124. package/dist/{PageSelector-BOe4EzbS.d.mts → PageSelector-B5CcAzss.d.mts} +3 -3
  125. package/dist/PageSelector.d.mts +1 -1
  126. package/dist/{Pagination-Dpc6TadZ.mjs → Pagination-C8hPOu0l.mjs} +2 -2
  127. package/dist/{Pagination-Dpc6TadZ.mjs.map → Pagination-C8hPOu0l.mjs.map} +1 -1
  128. package/dist/{Pagination-Dy-OSH0Y.d.mts → Pagination-CCKuudiz.d.mts} +2 -2
  129. package/dist/Pagination.d.mts +1 -1
  130. package/dist/{PillShell-B35z66jZ.d.mts → PillShell-B7Bm-dsE.d.mts} +2 -2
  131. package/dist/PillShell.d.mts +1 -1
  132. package/dist/{ProgressIndicator-COCwRZfK.d.mts → ProgressIndicator-BoB5JOfV.d.mts} +1 -1
  133. package/dist/{ProgressIndicator-ISARECzW.mjs → ProgressIndicator-zt3ndT9U.mjs} +1 -1
  134. package/dist/{ProgressIndicator-ISARECzW.mjs.map → ProgressIndicator-zt3ndT9U.mjs.map} +1 -1
  135. package/dist/ProgressIndicator.d.mts +1 -1
  136. package/dist/{PseudoClassProps-D_f-JUT1.d.mts → PseudoClassProps-CIuO49a4.d.mts} +1 -1
  137. package/dist/PseudoClassProps.d.mts +1 -1
  138. package/dist/{RadioGroup-pyGpWhhj.d.mts → RadioGroup-D_z37ZOU.d.mts} +1 -1
  139. package/dist/RadioGroup.d.mts +1 -1
  140. package/dist/{RangeCalendar-BiugsdSP.d.mts → RangeCalendar-CLCp70w6.d.mts} +2 -2
  141. package/dist/RangeCalendar.d.mts +1 -1
  142. package/dist/RangeCalendarPresets.d.mts +1 -1
  143. package/dist/{RouterContext-BUdfr1it.d.mts → RouterContext-DchdVyIX.d.mts} +2 -2
  144. package/dist/RouterContext.d.mts +1 -1
  145. package/dist/{RouterLink-BKbfvJcM.d.mts → RouterLink-B6ikC5Kq.d.mts} +2 -2
  146. package/dist/RouterLink.d.mts +1 -1
  147. package/dist/RuleEditorFields.d.mts +2 -2
  148. package/dist/RulesPill.d.mts +1 -1
  149. package/dist/{SearchInput-BejaiGsS.d.mts → SearchInput-D42v7MLp.d.mts} +2 -2
  150. package/dist/SearchInput.d.mts +1 -1
  151. package/dist/SectionHeading.d.mts +1 -1
  152. package/dist/{SegmentedControl-UV03Ujqn.d.mts → SegmentedControl-yVK6kkcx.d.mts} +1 -1
  153. package/dist/SegmentedControl.d.mts +1 -1
  154. package/dist/{Select-BLqHxJUz.d.mts → Select-CaG6OQi1.d.mts} +3 -3
  155. package/dist/Select.d.mts +1 -1
  156. package/dist/{SingleColumnLayout-DBo35psH.d.mts → SingleColumnLayout-D2bpX7X1.d.mts} +2 -2
  157. package/dist/SingleColumnLayout.d.mts +1 -1
  158. package/dist/SmartTextInput.d.mts +6 -6
  159. package/dist/SmartTextInputField.d.mts +2 -2
  160. package/dist/SmartTextInputFunctionDialog.d.mts +4 -4
  161. package/dist/SmartTextInputListbox.d.mts +2 -2
  162. package/dist/SmartTextInputPopover.d.mts +1 -1
  163. package/dist/{SplitColumnLayout-C6m_mwdf.d.mts → SplitColumnLayout-CRDSDHHm.d.mts} +2 -2
  164. package/dist/SplitColumnLayout.d.mts +1 -1
  165. package/dist/{Stack-DrYxBkiF.d.mts → Stack-CODxfzhl.d.mts} +1 -1
  166. package/dist/Stack.d.mts +1 -1
  167. package/dist/{StatusIndicator-pWl1-FLb.mjs → StatusIndicator-Zf75KK3O.mjs} +1 -1
  168. package/dist/{StatusIndicator-pWl1-FLb.mjs.map → StatusIndicator-Zf75KK3O.mjs.map} +1 -1
  169. package/dist/{Sticker-sIBnBbHD.d.mts → Sticker-CLvRB8V5.d.mts} +4 -4
  170. package/dist/Sticker.d.mts +1 -1
  171. package/dist/StringValueControl.d.mts +1 -1
  172. package/dist/Tab.d.mts +1 -1
  173. package/dist/{Table-BJfcRpMX.d.mts → Table-qsIo7V-R.d.mts} +1 -1
  174. package/dist/Table.d.mts +1 -1
  175. package/dist/{TableBody-CBz2PjA-.d.mts → TableBody-1fqZP2Cb.d.mts} +1 -1
  176. package/dist/TableBody.d.mts +1 -1
  177. package/dist/TableBox.d.mts +2 -2
  178. package/dist/{TableBoxCell-DPXrw63v.d.mts → TableBoxCell-B9KMWebc.d.mts} +6 -6
  179. package/dist/TableBoxCell.d.mts +1 -1
  180. package/dist/{TableBoxField-C7MGSie9.d.mts → TableBoxField-0uIGzBhF.d.mts} +5 -5
  181. package/dist/TableBoxField.d.mts +1 -1
  182. package/dist/{TableBoxRow-uToXVWvl.d.mts → TableBoxRow-PjBBDcEk.d.mts} +3 -3
  183. package/dist/TableBoxRow.d.mts +1 -1
  184. package/dist/{TableBoxRowActions-Do646IVE.d.mts → TableBoxRowActions-B7stm6Q3.d.mts} +2 -2
  185. package/dist/TableBoxRowActions.d.mts +1 -1
  186. package/dist/{TableCell-KHx5JlqZ.d.mts → TableCell-CQsF7t4e.d.mts} +2 -2
  187. package/dist/TableCell.d.mts +1 -1
  188. package/dist/{TableControls-C-0Dw8vM.mjs → TableControls-BZ8RrYOc.mjs} +3 -3
  189. package/dist/{TableControls-C-0Dw8vM.mjs.map → TableControls-BZ8RrYOc.mjs.map} +1 -1
  190. package/dist/{TableControls-BHv-tXA-.d.mts → TableControls-DT2YpFK8.d.mts} +5 -5
  191. package/dist/TableControls.d.mts +1 -1
  192. package/dist/{TableControlsContext-D6rifk-v.d.mts → TableControlsContext-CHuLxfa7.d.mts} +2 -2
  193. package/dist/TableControlsContext.d.mts +1 -1
  194. package/dist/{TableHead-D5A3bOwt.d.mts → TableHead-Dq0Fi4hP.d.mts} +1 -1
  195. package/dist/TableHead.d.mts +1 -1
  196. package/dist/{TableHeaderCell-BXgnxPpX.d.mts → TableHeaderCell-CAfcFwJy.d.mts} +1 -1
  197. package/dist/TableHeaderCell.d.mts +1 -1
  198. package/dist/{TableLayout-Dy5ht8KO.d.mts → TableLayout-CM8wiU3C.d.mts} +1 -1
  199. package/dist/TableLayout.d.mts +1 -1
  200. package/dist/{TableRow-C1iGbNjZ.d.mts → TableRow-C4eHuRF3.d.mts} +2 -2
  201. package/dist/TableRow.d.mts +1 -1
  202. package/dist/TableTH.d.mts +1 -1
  203. package/dist/{TableViewConfigurationDropdown-C5bjxTGX.d.mts → TableViewConfigurationDropdown-BWBBUXCs.d.mts} +2 -2
  204. package/dist/TableViewConfigurationDropdown.d.mts +1 -1
  205. package/dist/{Text-SaoRBdB6.d.mts → Text-CvaqognH.d.mts} +3 -3
  206. package/dist/Text.d.mts +1 -1
  207. package/dist/{TextArea-gtSlghjy.d.mts → TextArea-BJWEaURJ.d.mts} +2 -2
  208. package/dist/TextArea.d.mts +1 -1
  209. package/dist/{TextUnderlineTooltip-DV61avLv.d.mts → TextUnderlineTooltip-Bd5e8KH3.d.mts} +2 -2
  210. package/dist/TextUnderlineTooltip.d.mts +1 -1
  211. package/dist/Tile.d.mts +1 -1
  212. package/dist/Toast.d.mts +1 -1
  213. package/dist/{Toggle-BlvrM-Cw.d.mts → Toggle-CeIDF9yS.d.mts} +1 -1
  214. package/dist/Toggle.d.mts +1 -1
  215. package/dist/{Tooltip-CysnLwST.d.mts → Tooltip-Ddy2Jq0K.d.mts} +2 -2
  216. package/dist/Tooltip.d.mts +1 -1
  217. package/dist/{TruncatedText-YcjNG-zP.d.mts → TruncatedText-sr9Fhm3N.d.mts} +1 -1
  218. package/dist/VersionHistory.d.mts +1 -1
  219. package/dist/{VersionHistoryItem-Px3ylMMq.d.mts → VersionHistoryItem-DnKlzuDe.d.mts} +1 -1
  220. package/dist/VersionHistoryItem.d.mts +1 -1
  221. package/dist/WizardModal.d.mts +2 -2
  222. package/dist/{accordionTitleTypography-Dlo2YyWd.d.mts → accordionTitleTypography-D7tOgRzj.d.mts} +2 -2
  223. package/dist/accordionTitleTypography.d.mts +1 -1
  224. package/dist/{chainTypes-aF5rWav-.d.mts → chainTypes-C5mXGz6T.d.mts} +4 -4
  225. package/dist/charting-C_WcP3tn.d.mts +16 -0
  226. package/dist/{clientFilterUtils-DDDG1g7e.d.mts → clientFilterUtils-scLlIuP_.d.mts} +2 -2
  227. package/dist/clientFilterUtils.d.mts +1 -1
  228. package/dist/{codec-D8ZKFLgs.d.mts → codec-BTVOuowZ.d.mts} +2 -2
  229. package/dist/codec.d.mts +1 -1
  230. package/dist/{color-Cy_0z4IY.d.mts → color-Db57Wms_.d.mts} +2 -2
  231. package/dist/complete-typography.d.mts +1 -1
  232. package/dist/components/Accordion/index.d.mts +1 -1
  233. package/dist/components/BottomPanel/index.mjs +67 -6
  234. package/dist/components/BottomPanel/index.mjs.map +1 -1
  235. package/dist/components/Breadcrumbs/index.d.mts +1 -1
  236. package/dist/components/Button/index.d.mts +2 -2
  237. package/dist/components/Card/index.d.mts +2 -2
  238. package/dist/components/CardV2/index.d.mts +1 -1
  239. package/dist/components/Checkbox/index.d.mts +1 -1
  240. package/dist/components/Combobox/index.d.mts +2 -2
  241. package/dist/components/DataTable/TableControls/index.d.mts +21 -21
  242. package/dist/components/DataTable/TableControls/index.mjs +1 -1
  243. package/dist/components/DataTable/index.d.mts +8 -8
  244. package/dist/components/DataTable/index.mjs +1 -1
  245. package/dist/components/DataTable/types.d.mts +1 -1
  246. package/dist/components/DatePicker/index.d.mts +5 -5
  247. package/dist/components/DropdownMenu/index.d.mts +1 -1
  248. package/dist/components/FloatingToolbar/index.d.mts +2 -0
  249. package/dist/components/FloatingToolbar/index.mjs +2 -0
  250. package/dist/components/FormControl/index.d.mts +2 -2
  251. package/dist/components/FormField/index.d.mts +5 -5
  252. package/dist/components/Grid/index.mjs +1 -1
  253. package/dist/components/Input/index.d.mts +1 -1
  254. package/dist/components/ListBox/index.d.mts +3 -3
  255. package/dist/components/Menu/index.d.mts +1 -1
  256. package/dist/components/Modal/index.d.mts +1 -1
  257. package/dist/components/Modal/index.mjs +1 -1
  258. package/dist/components/PageHeader/index.d.mts +1 -1
  259. package/dist/components/PageHeader/index.mjs +1 -1
  260. package/dist/components/Pagination/index.d.mts +3 -3
  261. package/dist/components/Pagination/index.mjs +1 -1
  262. package/dist/components/ProgressIndicator/index.d.mts +1 -1
  263. package/dist/components/ProgressIndicator/index.mjs +1 -1
  264. package/dist/components/RadioGroup/index.d.mts +1 -1
  265. package/dist/components/RichTextEditor/index.d.mts +1 -2
  266. package/dist/components/RichTextEditor/index.mjs +21 -476
  267. package/dist/components/RichTextEditor/index.mjs.map +1 -1
  268. package/dist/components/SegmentedControl/index.d.mts +1 -1
  269. package/dist/components/Select/index.d.mts +1 -1
  270. package/dist/components/SmartTextInput/index.d.mts +2 -2
  271. package/dist/components/SmartTextInput/parser/method-chain/types.d.mts +1 -1
  272. package/dist/components/SmartTextInput/parser/smart-text/types.d.mts +2 -2
  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/Table/index.d.mts +8 -8
  277. package/dist/components/TableBox/index.d.mts +2 -2
  278. package/dist/components/Text/index.d.mts +1 -1
  279. package/dist/components/TextArea/index.d.mts +1 -1
  280. package/dist/components/Toggle/index.d.mts +1 -1
  281. package/dist/components/Tooltip/index.d.mts +3 -3
  282. package/dist/components/VersionHistory/index.d.mts +1 -1
  283. package/dist/components/VersionHistory/index.mjs +2 -2
  284. package/dist/compound-expression.d.mts +1 -1
  285. package/dist/{constants-CW1DRgwi.d.mts → constants-ByOakXpZ.d.mts} +1 -1
  286. package/dist/{constants-D1hoZ5LO.d.mts → constants-DMTL6rF3.d.mts} +1 -1
  287. package/dist/constants.d.mts +1 -1
  288. package/dist/constants2.d.mts +1 -1
  289. package/dist/{createPath-C4ZFkt93.d.mts → createPath-BgyL9FVF.d.mts} +2 -2
  290. package/dist/createPath.d.mts +1 -1
  291. package/dist/{date-range-rule-value-CrVBpQcf.d.mts → date-range-rule-value-ASr06ClE.d.mts} +2 -2
  292. package/dist/date-range-rule-value.d.mts +1 -1
  293. package/dist/{date-rule-intent-C1aptAoX.d.mts → date-rule-intent-DDDCA6kc.d.mts} +3 -3
  294. package/dist/date-rule-intent.d.mts +1 -1
  295. package/dist/display.d.mts +2 -2
  296. package/dist/fieldPickerOptions.d.mts +2 -2
  297. package/dist/{filter-size-context-CbT4pi3S.d.mts → filter-size-context-CmFyIPCm.d.mts} +2 -2
  298. package/dist/filter-size-context.d.mts +1 -1
  299. package/dist/{filters-CkAFU8LV.d.mts → filters-yfzOlqKx.d.mts} +2 -2
  300. package/dist/filters.d.mts +1 -1
  301. package/dist/{formatDateTime-BikGGrvq.d.mts → formatDateTime-Cj9XxTNy.d.mts} +1 -1
  302. package/dist/formatDateTime.d.mts +1 -1
  303. package/dist/{helpers-Dvvcz-hL.d.mts → helpers-BeCjgAeE.d.mts} +4 -4
  304. package/dist/helpers.d.mts +1 -1
  305. package/dist/{i18n-CKRi992F.mjs → i18n-DaOKaFc2.mjs} +3 -2
  306. package/dist/i18n-DaOKaFc2.mjs.map +1 -0
  307. package/dist/{index-B3A74_ew.d.mts → index-BEHNqAZa.d.mts} +3 -3
  308. package/dist/{index-BWAycP6L.d.mts → index-CLAjbq8g.d.mts} +1 -1
  309. package/dist/{index-D2YFHdsf.d.mts → index-aK04IR94.d.mts} +2 -2
  310. package/dist/{index-FgIOTuJ4.d.mts → index-kIon1vPp.d.mts} +2 -2
  311. package/dist/index2.d.mts +1 -1
  312. package/dist/index3.d.mts +1 -1
  313. package/dist/index4.d.mts +3 -3
  314. package/dist/index5.d.mts +1 -1
  315. package/dist/index6.d.mts +14 -14
  316. package/dist/{input-gtTnb9M8.d.mts → input-JDU1Goyr.d.mts} +3 -3
  317. package/dist/{inputFields-Dfpxi68z.d.mts → inputFields-BnCdmuBt.d.mts} +11 -11
  318. package/dist/inputFields.d.mts +1 -1
  319. package/dist/{jsonSchema-DUkfAip_.d.mts → jsonSchema-C4lfpDrt.d.mts} +1 -1
  320. package/dist/lib/PDSProvider.d.mts +3 -3
  321. package/dist/lib/PDSProvider.mjs +1 -1
  322. package/dist/lib/TruncatedText.d.mts +1 -1
  323. package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
  324. package/dist/lib/chainTypes.d.mts +1 -1
  325. package/dist/lib/color.d.mts +1 -1
  326. package/dist/lib/colorMode.d.mts +2 -2
  327. package/dist/lib/customFunctionSchema.d.mts +1 -1
  328. package/dist/lib/date-filter/index.d.mts +2 -2
  329. package/dist/lib/i18n/index.d.mts +3 -3
  330. package/dist/lib/i18n/index.mjs +1 -1
  331. package/dist/lib/jsonSchema.d.mts +1 -1
  332. package/dist/lib/jsonSchemaType.d.mts +1 -1
  333. package/dist/lib/message.d.mts +1 -1
  334. package/dist/lib/methodChain.d.mts +2 -2
  335. package/dist/lib/methodChainNormalize.d.mts +2 -2
  336. package/dist/lib/methodChainTypes.d.mts +1 -1
  337. package/dist/lib/objectSchemaTypes.d.mts +1 -1
  338. package/dist/lib/platformObject.d.mts +1 -1
  339. package/dist/lib/pseudoClass.d.mts +1 -1
  340. package/dist/lib/router/adapters/reactRouter.d.mts +1 -1
  341. package/dist/lib/router/adapters/tanstack.d.mts +1 -1
  342. package/dist/lib/router/index.d.mts +5 -5
  343. package/dist/lib/schemaOptions.d.mts +1 -1
  344. package/dist/lib/semanticColor.d.mts +2 -2
  345. package/dist/lib/semanticColor.mjs +8 -1
  346. package/dist/lib/semanticColor.mjs.map +1 -1
  347. package/dist/lib/useChain.d.mts +1 -1
  348. package/dist/lint/index.d.mts +1 -1
  349. package/dist/{listbox-options-CkwENvff.d.mts → listbox-options-CDAOiyUH.d.mts} +3 -3
  350. package/dist/listbox-options.d.mts +1 -1
  351. package/dist/{message-klSuXfNN.d.mts → message-BwRBPJXD.d.mts} +1 -1
  352. package/dist/{methodChain-CRYRDa1k.d.mts → methodChain-COb4t-sM.d.mts} +4 -4
  353. package/dist/{methodChainTypes-BtbYWrdP.d.mts → methodChainTypes-De6sHGyd.d.mts} +2 -2
  354. package/dist/min-copy-size.d.mts +1 -1
  355. package/dist/mixins/focus.d.mts +1 -1
  356. package/dist/mixins/hoverable.d.mts +2 -2
  357. package/dist/mixins/input.d.mts +1 -1
  358. package/dist/mixins/menuItem.d.mts +2 -2
  359. package/dist/mixins/scrollbar.d.mts +1 -1
  360. package/dist/mixins/text.d.mts +1 -1
  361. package/dist/no-raw-table.d.mts +1 -1
  362. package/dist/{operators-BrrJKENE.d.mts → operators-BHxKZcpD.d.mts} +3 -3
  363. package/dist/operators.d.mts +1 -1
  364. package/dist/{palette-C1gBbxLO.d.mts → palette-DzmqrF_5.d.mts} +3 -3
  365. package/dist/palette.d.mts +1 -1
  366. package/dist/patterns/CardGrouping/index.mjs +1 -1
  367. package/dist/patterns/IndexTableLayout/index.mjs +3 -3
  368. package/dist/patterns/LayoutLoadingShimmer/index.mjs +1 -1
  369. package/dist/patterns/PageLayout/index.d.mts +4 -4
  370. package/dist/patterns/PageLayout/index.mjs +1 -1
  371. package/dist/patterns/WizardModal/index.mjs +2 -2
  372. package/dist/reactRouterFallback.d.mts +1 -1
  373. package/dist/reduced-motion.d.mts +1 -1
  374. package/dist/relative-date-label.d.mts +1 -1
  375. package/dist/safe-parse.d.mts +1 -1
  376. package/dist/{schemaOptions-C_JM2-sg.d.mts → schemaOptions-DMq37JC5.d.mts} +3 -3
  377. package/dist/{semantic-BLaQSW1r.d.mts → semantic-BZbvb3LV.d.mts} +1 -1
  378. package/dist/semantic-color.d.mts +1 -1
  379. package/dist/{semanticColor-Bxufk3ZO.d.mts → semanticColor-BKbCliyl.d.mts} +15 -4
  380. package/dist/shared.d.mts +1 -1
  381. package/dist/{strings-BGXKl_m6.d.mts → strings-DQZIO-n7.d.mts} +3 -1
  382. package/dist/strings.d.mts +1 -1
  383. package/dist/{text-Csytfclh.d.mts → text-CKLxMlG4.d.mts} +1 -1
  384. package/dist/{theme-mQ4WkH90.d.mts → theme-CeA8jBRG.d.mts} +9 -5
  385. package/dist/theme.d.mts +1 -1
  386. package/dist/theme.mjs +7 -3
  387. package/dist/theme.mjs.map +1 -1
  388. package/dist/tone.d.mts +3 -3
  389. package/dist/tree.d.mts +1 -1
  390. package/dist/{types-XjJqUj-p.d.mts → types-02Ij0dgs.d.mts} +4 -4
  391. package/dist/{types-Dhz6VMKx.d.mts → types-BRYGqFVm.d.mts} +1 -1
  392. package/dist/{types-sUEmxsGM.d.mts → types-BXJ6qAGy.d.mts} +3 -3
  393. package/dist/{types-DoJubhWu.d.mts → types-BeFBvQ1c.d.mts} +3 -3
  394. package/dist/{types-6L0ptM6-.d.mts → types-CRymR_J9.d.mts} +1 -1
  395. package/dist/{types-B4KbdEDc.d.mts → types-CqcbWyUY.d.mts} +2 -2
  396. package/dist/{types-C2RhHxbE.d.mts → types-D9LBWGw5.d.mts} +1 -1
  397. package/dist/{types-DbOD5vE_.d.mts → types-DLnCkvTt.d.mts} +2 -2
  398. package/dist/{types-rDQg74j-.d.mts → types-DQVUNrrN.d.mts} +1 -1
  399. package/dist/{types-dmItSshr.d.mts → types-DeVO4sCM.d.mts} +2 -2
  400. package/dist/types.d.mts +1 -1
  401. package/dist/types2.d.mts +1 -1
  402. package/dist/types3.d.mts +1 -1
  403. package/dist/types4.d.mts +1 -1
  404. package/dist/types5.d.mts +1 -1
  405. package/dist/types6.d.mts +1 -1
  406. package/dist/types8.d.mts +1 -1
  407. package/dist/{url-state-CmgyDnG7.d.mts → url-state-CXUuK3_r.d.mts} +2 -2
  408. package/dist/url-state.d.mts +1 -1
  409. package/dist/{useChain-7ztbfujM.d.mts → useChain-B--KAtdN.d.mts} +6 -6
  410. package/dist/useChainAtCursor.d.mts +6 -6
  411. package/dist/useCodeChainFunctionPanel.d.mts +1 -1
  412. package/dist/useColumnConfiguration.d.mts +2 -2
  413. package/dist/useComboboxFooterAction.d.mts +1 -1
  414. package/dist/{useFilterStateV2-CPBt0qwc.d.mts → useFilterStateV2-DBpbxAEC.d.mts} +3 -3
  415. package/dist/useFilterStateV2.d.mts +1 -1
  416. package/dist/{useFormField-CmEJCqse.d.mts → useFormField-CTgW_8x0.d.mts} +2 -2
  417. package/dist/useFormField.d.mts +1 -1
  418. package/dist/{useLocationPathname-Cnqj8pf4.d.mts → useLocationPathname-CClZoIGm.d.mts} +1 -1
  419. package/dist/useLocationPathname.d.mts +1 -1
  420. package/dist/{useTableBoxDragAndDrop-8NS4JBuI.d.mts → useTableBoxDragAndDrop-MwbXWWDQ.d.mts} +1 -1
  421. package/dist/useTableBoxDragAndDrop.d.mts +1 -1
  422. package/dist/{useTableColumns-nPrbDfF_.d.mts → useTableColumns-DJFy0Gp8.d.mts} +2 -2
  423. package/dist/useTableColumns.d.mts +1 -1
  424. package/dist/useTruncation.d.mts +1 -1
  425. package/dist/{utilities-CXoc5Cyr.d.mts → utilities-BDkho6-f.d.mts} +1 -1
  426. package/dist/utilities.d.mts +1 -1
  427. package/dist/utils/testing.d.mts +1 -1
  428. package/dist/utils.d.mts +1 -1
  429. package/dist/utils4.d.mts +5 -5
  430. package/dist/{validation-BaqPVG1C.d.mts → validation-Tgg3AhuP.d.mts} +3 -3
  431. package/dist/validation.d.mts +1 -1
  432. package/dist/validation2.d.mts +4 -4
  433. package/dist/{value-control-resolver-CMyFwEY7.d.mts → value-control-resolver-XQbGCdsP.d.mts} +2 -2
  434. package/dist/value-control-resolver.d.mts +1 -1
  435. package/dist/variables/charting.d.mts +2 -0
  436. package/dist/variables/charting.mjs +134 -0
  437. package/dist/variables/charting.mjs.map +1 -0
  438. package/dist/variables/effect.d.mts +1 -1
  439. package/dist/variables/semantic.d.mts +1 -1
  440. package/llms.txt +1 -1
  441. package/package.json +16 -15
  442. package/skills/ui-authoring/COMPONENTS.md +1 -0
  443. package/skills/ui-authoring/TOKENS.md +5 -0
  444. package/dist/Modal-ziuzDCPN.mjs.map +0 -1
  445. package/dist/i18n-CKRi992F.mjs.map +0 -1
  446. /package/dist/{index-AnhM47-e2.d.mts → index-0-W_aPej.d.mts} +0 -0
  447. /package/dist/{index-B4woaFSm.d.mts → index-1-AkepUA.d.mts} +0 -0
  448. /package/dist/{index-BPiqSRRl.d.mts → index-B9SJORI12.d.mts} +0 -0
  449. /package/dist/{index-BTviwbFV.d.mts → index-BINnViIh.d.mts} +0 -0
  450. /package/dist/{index-Bo9LXG4r.d.mts → index-BRJ_6A42.d.mts} +0 -0
  451. /package/dist/{index-Bq9Ub6MB.d.mts → index-BsHUlSyF.d.mts} +0 -0
  452. /package/dist/{index-BrGZHEgX.d.mts → index-C6HcjJiY.d.mts} +0 -0
  453. /package/dist/{index-Bt4QNofW.d.mts → index-CCKHlTA4.d.mts} +0 -0
  454. /package/dist/{index-CFuHCx9T.d.mts → index-CCt0lwyI.d.mts} +0 -0
  455. /package/dist/{index-CLTQPxoD.d.mts → index-CIABef8t.d.mts} +0 -0
  456. /package/dist/{index-CjDodOH2.d.mts → index-CoUVmp_Q.d.mts} +0 -0
  457. /package/dist/{index-CjmAoxrR2.d.mts → index-CuYZJcK3.d.mts} +0 -0
  458. /package/dist/{index-CzItj62a.d.mts → index-CuheJfs-.d.mts} +0 -0
  459. /package/dist/{index-DBGd4WeR.d.mts → index-CzdAgLVp.d.mts} +0 -0
  460. /package/dist/{index-DW3xeuzq.d.mts → index-DG59sVPG2.d.mts} +0 -0
  461. /package/dist/{index-DZlqSwCF.d.mts → index-DeVKzGce.d.mts} +0 -0
  462. /package/dist/{index-De7MV8-j.d.mts → index-DedbSZMv.d.mts} +0 -0
  463. /package/dist/{index-DjG1RCY5.d.mts → index-Deol7ZWO.d.mts} +0 -0
  464. /package/dist/{index-Dlcv6Ku22.d.mts → index-Es5nKSSL.d.mts} +0 -0
  465. /package/dist/{index-DrK1_jKY.d.mts → index-KEHKKJEa.d.mts} +0 -0
  466. /package/dist/{index-DztUdPP_.d.mts → index-PQbV5sXG2.d.mts} +0 -0
  467. /package/dist/{index-NKYLt_R9.d.mts → index-dhjtMp5F.d.mts} +0 -0
  468. /package/dist/{index-VWno75SQ.d.mts → index-dzI_9J-Z.d.mts} +0 -0
  469. /package/dist/{index-uMNhmxEh.d.mts → index-lTcag11w.d.mts} +0 -0
@@ -0,0 +1,493 @@
1
+ import { a as styled } from "./styledComponentsInterop-Cs5CCPRy.mjs";
2
+ import "./variables/transitions.mjs";
3
+ import { Z_INDICES } from "./lib/zindex.mjs";
4
+ import { n as Stack } from "./Stack-Bzom2BTR.mjs";
5
+ import { t as IconButton } from "./IconButton-DftINsp7.mjs";
6
+ import Input_default from "./components/Input/index.mjs";
7
+ import { n as DropdownMenu_default } from "./DropdownMenu-Q8S-9rXm.mjs";
8
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
9
+ import { BorderRadius, Color, Spacing } from "@persona/design-tokens";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ import { BoldIcon, CheckIcon, GridIcon, ItalicIcon, LinkIcon, ListIcon, UnlinkIcon, XIcon } from "@persona/icons";
12
+ import { AnimatePresence, motion } from "framer-motion";
13
+ import { PluginKey } from "@tiptap/pm/state";
14
+ import { useEditorState } from "@tiptap/react";
15
+ import { BubbleMenu } from "@tiptap/react/menus";
16
+ //#region src/components/FloatingToolbar/FloatingToolbar.tsx
17
+ const BubbleMenuBar = styled(Stack)`
18
+ padding: ${Spacing[1]} ${Spacing[2]};
19
+ background-color: ${Color.CoreSlate1100};
20
+ border-radius: ${BorderRadius.Lg};
21
+ `;
22
+ const IconContainer = styled(motion.div)`
23
+ display: flex;
24
+ gap: ${Spacing[1]};
25
+ `;
26
+ const InverseIconButton = styled(IconButton)`
27
+ background-color: ${({ $selected }) => $selected ? Color.CoreSlate900 : "transparent"};
28
+ color: ${Color.PrimaryWhite};
29
+ transition: background-color ${"100ms"} ease-out;
30
+
31
+ &:hover:not(:disabled) {
32
+ background-color: ${Color.CoreSlate800};
33
+ }
34
+
35
+ &:disabled {
36
+ background-color: transparent;
37
+ opacity: 0.35;
38
+ }
39
+ `;
40
+ const InverseInput = styled(Input_default)`
41
+ background-color: ${Color.CoreSlate900};
42
+ color: ${Color.PrimaryWhite};
43
+
44
+ :focus-within {
45
+ border-color: ${Color.CoreBlue700};
46
+ }
47
+ ::placeholder {
48
+ color: ${Color.TextDisabled};
49
+ }
50
+
51
+ input {
52
+ background-color: ${Color.CoreSlate900};
53
+ color: ${Color.PrimaryWhite};
54
+ }
55
+ `;
56
+ const StyledDropdownItem = styled(DropdownMenu_default.Item)`
57
+ width: 100%;
58
+ height: 30px;
59
+ font-size: small;
60
+ overflow: hidden;
61
+ white-space: nowrap;
62
+ text-overflow: ellipsis;
63
+ `;
64
+ const TOOLBAR_GAP = parseInt(Spacing[1]);
65
+ const FIELD_OFFSET = {
66
+ mainAxis: TOOLBAR_GAP,
67
+ crossAxis: 0
68
+ };
69
+ const SELECTION_OFFSET = {
70
+ mainAxis: TOOLBAR_GAP,
71
+ crossAxis: -parseInt(Spacing[2])
72
+ };
73
+ const getFieldElement = (editor) => editor.options.element instanceof Element ? editor.options.element : editor.view.dom;
74
+ const SAFE_LINK_SCHEME = /^(https?|mailto|tel):/i;
75
+ const URI_SCHEME = /^[a-zA-Z][a-zA-Z0-9+.-]*:/;
76
+ const ensureProtocol = (url) => {
77
+ const trimmedUrl = url.trim();
78
+ if (!trimmedUrl) return "";
79
+ if (trimmedUrl.includes("{{")) {
80
+ const beforePlaceholder = trimmedUrl.slice(0, trimmedUrl.indexOf("{{")).replace(/[\u0000-\u0020]/g, "");
81
+ if (!URI_SCHEME.test(beforePlaceholder) || SAFE_LINK_SCHEME.test(beforePlaceholder)) return trimmedUrl;
82
+ return "";
83
+ }
84
+ const candidate = SAFE_LINK_SCHEME.test(trimmedUrl) ? trimmedUrl : `https://${trimmedUrl}`;
85
+ return URL.canParse(candidate) ? candidate : "";
86
+ };
87
+ /**
88
+ * Floating bubble toolbar that appears on text selection or inside a table, or —
89
+ * with `showOnFocus` — for as long as the editor is focused.
90
+ * Keyboard shortcut: Cmd/Ctrl+Shift+U opens the link-edit row.
91
+ */
92
+ function FloatingToolbar({ editor, showOnFocus = false }) {
93
+ const [linkURL, setLinkURL] = useState("");
94
+ const [editingLink, setEditingLink] = useState(false);
95
+ const linkInputRef = useRef(null);
96
+ const toolbarRef = useRef(null);
97
+ const savedSelection = useRef(null);
98
+ const editingLinkRef = useRef(editingLink);
99
+ const blurTimeout = useRef();
100
+ const [pluginKey] = useState(() => new PluginKey("floatingToolbar"));
101
+ useEffect(() => () => clearTimeout(blurTimeout.current), []);
102
+ useEffect(() => {
103
+ editingLinkRef.current = editingLink;
104
+ }, [editingLink]);
105
+ const restoreSelection = useCallback(() => {
106
+ if (editor && savedSelection.current) {
107
+ const { from, to } = savedSelection.current;
108
+ editor.chain().focus().setTextSelection({
109
+ from,
110
+ to
111
+ }).run();
112
+ }
113
+ }, [editor]);
114
+ const openLinkEditingMode = useCallback(() => {
115
+ if (!editor) return;
116
+ if (!editor.can().chain().toggleLink({ href: "https://www.google.com" }).run()) return;
117
+ const { from, to } = editor.state.selection;
118
+ savedSelection.current = {
119
+ from,
120
+ to
121
+ };
122
+ const linkAttr = editor.getAttributes("link");
123
+ if (linkAttr.href) setLinkURL(linkAttr.href);
124
+ editor.chain().focus().setTextSelection({
125
+ from,
126
+ to
127
+ }).run();
128
+ setEditingLink(true);
129
+ setTimeout(() => {
130
+ linkInputRef.current?.focus();
131
+ }, 250);
132
+ }, [editor]);
133
+ useEffect(() => {
134
+ if (!editor) return;
135
+ const dom = editor.view.dom;
136
+ const handler = (event) => {
137
+ if ((event.metaKey || event.ctrlKey) && event.shiftKey && event.key.toLowerCase() === "u") {
138
+ event.preventDefault();
139
+ openLinkEditingMode();
140
+ return;
141
+ }
142
+ if (event.key === "Escape" && editingLinkRef.current) {
143
+ event.preventDefault();
144
+ setEditingLink(false);
145
+ setLinkURL("");
146
+ savedSelection.current = null;
147
+ }
148
+ };
149
+ dom.addEventListener("keydown", handler);
150
+ return () => {
151
+ dom.removeEventListener("keydown", handler);
152
+ };
153
+ }, [editor, openLinkEditingMode]);
154
+ useEffect(() => {
155
+ if (!editingLink || !editor || !savedSelection.current) return;
156
+ restoreSelection();
157
+ const timeoutId = setTimeout(() => {
158
+ restoreSelection();
159
+ editor.view.dom?.focus();
160
+ }, 0);
161
+ return () => clearTimeout(timeoutId);
162
+ }, [
163
+ editingLink,
164
+ restoreSelection,
165
+ editor
166
+ ]);
167
+ const isFocusWithinToolbar = useCallback(() => !!toolbarRef.current?.contains(document.activeElement), []);
168
+ const bubbleMenuOptions = useMemo(() => ({
169
+ placement: "top-start",
170
+ offset: showOnFocus ? FIELD_OFFSET : SELECTION_OFFSET
171
+ }), [showOnFocus]);
172
+ const getReferencedVirtualElement = useMemo(() => showOnFocus && editor ? () => ({ getBoundingClientRect: () => getFieldElement(editor).getBoundingClientRect() }) : void 0, [editor, showOnFocus]);
173
+ const shouldShow = useCallback(({ editor: e, view, from, to }) => {
174
+ if (!e.isEditable) return false;
175
+ if (e.isActive("mention")) return false;
176
+ if (e.isActive("table")) return true;
177
+ if (from !== to) return true;
178
+ return showOnFocus && (view.hasFocus() || isFocusWithinToolbar());
179
+ }, [isFocusWithinToolbar, showOnFocus]);
180
+ const editorState = useEditorState({
181
+ editor,
182
+ selector: (snapshot) => snapshot.editor && {
183
+ isBold: snapshot.editor.isActive("bold"),
184
+ canBold: snapshot.editor.can().chain().toggleBold().run(),
185
+ isItalic: snapshot.editor.isActive("italic"),
186
+ canItalic: snapshot.editor.can().chain().toggleItalic().run(),
187
+ isLink: snapshot.editor.isActive("link"),
188
+ isBulletList: snapshot.editor.isActive("bulletList"),
189
+ canLink: snapshot.editor.can().chain().toggleLink({ href: "https://www.google.com" }).run(),
190
+ isTable: snapshot.editor.isActive("table"),
191
+ canInsertTable: snapshot.editor.can().chain().insertTable({
192
+ rows: 3,
193
+ cols: 3,
194
+ withHeaderRow: true
195
+ }).run()
196
+ }
197
+ });
198
+ if (!editor || !editorState) return null;
199
+ const handleToolbarBlur = () => {
200
+ blurTimeout.current = setTimeout(() => {
201
+ if (editor.isDestroyed || isFocusWithinToolbar() || editor.view.hasFocus()) return;
202
+ editor.view.dispatch(editor.state.tr.setMeta(pluginKey, "hide"));
203
+ });
204
+ };
205
+ return /* @__PURE__ */ jsx(BubbleMenu, {
206
+ editor,
207
+ pluginKey,
208
+ options: bubbleMenuOptions,
209
+ getReferencedVirtualElement,
210
+ shouldShow,
211
+ style: { zIndex: Z_INDICES.modalElevated },
212
+ children: /* @__PURE__ */ jsx(AnimatePresence, { children: /* @__PURE__ */ jsx(BubbleMenuBar, {
213
+ ref: toolbarRef,
214
+ role: "toolbar",
215
+ "aria-label": "Text formatting",
216
+ direction: "horizontal",
217
+ spacing: Spacing[1],
218
+ onBlur: handleToolbarBlur,
219
+ children: !editingLink ? /* @__PURE__ */ jsxs(IconContainer, {
220
+ layout: true,
221
+ initial: {
222
+ x: -10,
223
+ opacity: 0
224
+ },
225
+ animate: {
226
+ x: 0,
227
+ opacity: 1
228
+ },
229
+ exit: {
230
+ x: -10,
231
+ opacity: 0
232
+ },
233
+ transition: {
234
+ duration: .2,
235
+ ease: "easeOut"
236
+ },
237
+ children: [
238
+ /* @__PURE__ */ jsx(InverseIconButton, {
239
+ onClick: () => editor.chain().focus().toggleBulletList().run(),
240
+ $selected: editorState.isBulletList,
241
+ size: "sm",
242
+ type: "button",
243
+ "aria-label": "Toggle bullet list",
244
+ "data-rte-menu-bar-item": true,
245
+ children: /* @__PURE__ */ jsx(ListIcon, {})
246
+ }),
247
+ /* @__PURE__ */ jsx(InverseIconButton, {
248
+ onClick: () => editor.chain().focus().toggleBold().run(),
249
+ disabled: !editorState.canBold,
250
+ $selected: editorState.isBold,
251
+ size: "sm",
252
+ type: "button",
253
+ "aria-label": "Toggle bold",
254
+ "data-rte-menu-bar-item": true,
255
+ children: /* @__PURE__ */ jsx(BoldIcon, {})
256
+ }),
257
+ /* @__PURE__ */ jsx(InverseIconButton, {
258
+ onClick: () => editor.chain().focus().toggleItalic().run(),
259
+ $selected: editorState.isItalic,
260
+ disabled: !editorState.canItalic,
261
+ type: "button",
262
+ size: "sm",
263
+ "aria-label": "Toggle italic",
264
+ "data-rte-menu-bar-item": true,
265
+ children: /* @__PURE__ */ jsx(ItalicIcon, {})
266
+ }),
267
+ /* @__PURE__ */ jsx(InverseIconButton, {
268
+ onClick: (e) => {
269
+ e.preventDefault();
270
+ e.stopPropagation();
271
+ openLinkEditingMode();
272
+ },
273
+ $selected: editorState.isLink,
274
+ disabled: !editorState.canLink,
275
+ size: "sm",
276
+ type: "button",
277
+ "aria-label": "Toggle link",
278
+ "data-rte-menu-bar-item": true,
279
+ children: /* @__PURE__ */ jsx(LinkIcon, {})
280
+ }),
281
+ editorState.isTable ? /* @__PURE__ */ jsxs(DropdownMenu_default, {
282
+ contentProps: {
283
+ "data-rte-menu-bar-item": "table-actions-dropdown-menu",
284
+ onCloseAutoFocus: (event) => {
285
+ event.preventDefault();
286
+ editor.commands.focus();
287
+ }
288
+ },
289
+ trigger: /* @__PURE__ */ jsx(InverseIconButton, {
290
+ size: "sm",
291
+ type: "button",
292
+ "aria-label": "Table actions",
293
+ "data-rte-menu-bar-item": true,
294
+ $selected: true,
295
+ children: /* @__PURE__ */ jsx(GridIcon, {})
296
+ }),
297
+ children: [
298
+ /* @__PURE__ */ jsx(StyledDropdownItem, {
299
+ id: "floating-toolbar__tableAddRowAfter",
300
+ variant: "basic",
301
+ "data-rte-menu-bar-item": "table-add-row-after",
302
+ onClick: () => editor.chain().focus().addRowAfter().run(),
303
+ children: "Add row below"
304
+ }),
305
+ /* @__PURE__ */ jsx(StyledDropdownItem, {
306
+ id: "floating-toolbar__tableAddRowBefore",
307
+ variant: "basic",
308
+ "data-rte-menu-bar-item": "table-add-row-before",
309
+ onClick: () => editor.chain().focus().addRowBefore().run(),
310
+ children: "Add row above"
311
+ }),
312
+ /* @__PURE__ */ jsx(StyledDropdownItem, {
313
+ id: "floating-toolbar__tableAddColumnAfter",
314
+ variant: "basic",
315
+ "data-rte-menu-bar-item": "table-add-column-after",
316
+ onClick: () => editor.chain().focus().addColumnAfter().run(),
317
+ children: "Add column right"
318
+ }),
319
+ /* @__PURE__ */ jsx(StyledDropdownItem, {
320
+ id: "floating-toolbar__tableAddColumnBefore",
321
+ variant: "basic",
322
+ "data-rte-menu-bar-item": "table-add-column-before",
323
+ onClick: () => editor.chain().focus().addColumnBefore().run(),
324
+ children: "Add column left"
325
+ }),
326
+ /* @__PURE__ */ jsx(StyledDropdownItem, {
327
+ id: "floating-toolbar__tableDeleteRow",
328
+ variant: "basic",
329
+ "data-rte-menu-bar-item": "table-delete-row",
330
+ onClick: () => editor.chain().focus().deleteRow().run(),
331
+ children: "Delete row"
332
+ }),
333
+ /* @__PURE__ */ jsx(StyledDropdownItem, {
334
+ id: "floating-toolbar__tableDeleteColumn",
335
+ variant: "basic",
336
+ "data-rte-menu-bar-item": "table-delete-column",
337
+ onClick: () => editor.chain().focus().deleteColumn().run(),
338
+ children: "Delete column"
339
+ }),
340
+ /* @__PURE__ */ jsx(StyledDropdownItem, {
341
+ id: "floating-toolbar__tableToggleHeaderRow",
342
+ variant: "basic",
343
+ "data-rte-menu-bar-item": "table-toggle-header-row",
344
+ onClick: () => editor.chain().focus().toggleHeaderRow().run(),
345
+ children: "Toggle header row"
346
+ }),
347
+ /* @__PURE__ */ jsx(StyledDropdownItem, {
348
+ id: "floating-toolbar__tableDelete",
349
+ variant: "basic",
350
+ "data-rte-menu-bar-item": "table-delete",
351
+ onClick: () => editor.chain().focus().deleteTable().run(),
352
+ children: "Delete table"
353
+ })
354
+ ]
355
+ }) : /* @__PURE__ */ jsx(InverseIconButton, {
356
+ onClick: () => editor.chain().focus().insertTable({
357
+ rows: 3,
358
+ cols: 3,
359
+ withHeaderRow: true
360
+ }).run(),
361
+ disabled: !editorState.canInsertTable,
362
+ size: "sm",
363
+ type: "button",
364
+ "aria-label": "Insert table",
365
+ "data-rte-menu-bar-item": true,
366
+ children: /* @__PURE__ */ jsx(GridIcon, {})
367
+ })
368
+ ]
369
+ }, "main-toolbar") : /* @__PURE__ */ jsxs(IconContainer, {
370
+ initial: {
371
+ x: -10,
372
+ opacity: 0
373
+ },
374
+ animate: {
375
+ x: 0,
376
+ opacity: 1
377
+ },
378
+ exit: {
379
+ x: -10,
380
+ opacity: 0
381
+ },
382
+ transition: {
383
+ duration: .2,
384
+ ease: "easeOut"
385
+ },
386
+ "aria-label": "Link toolbar",
387
+ onAnimationComplete: () => {
388
+ if (editor && savedSelection.current) setTimeout(() => {
389
+ restoreSelection();
390
+ linkInputRef.current?.focus();
391
+ }, 10);
392
+ },
393
+ children: [
394
+ /* @__PURE__ */ jsx(InverseInput, {
395
+ ref: linkInputRef,
396
+ size: "sm",
397
+ value: linkURL,
398
+ onChange: (e) => setLinkURL(e.target.value),
399
+ placeholder: "Click to enter URL...",
400
+ "aria-label": "Link input",
401
+ "data-rte-menu-bar-item": true,
402
+ onClick: () => {
403
+ linkInputRef.current?.focus();
404
+ },
405
+ onFocus: () => {
406
+ if (savedSelection.current && editor) {
407
+ const { from, to } = savedSelection.current;
408
+ editor.chain().setTextSelection({
409
+ from,
410
+ to
411
+ }).run();
412
+ }
413
+ },
414
+ onKeyDown: (e) => {
415
+ if (e.key === "Enter" && linkURL.trim() && editor && savedSelection.current) {
416
+ e.preventDefault();
417
+ e.stopPropagation();
418
+ const { from, to } = savedSelection.current;
419
+ editor.chain().focus().setTextSelection({
420
+ from,
421
+ to
422
+ }).setLink({ href: ensureProtocol(linkURL) }).run();
423
+ savedSelection.current = null;
424
+ setEditingLink(false);
425
+ setLinkURL("");
426
+ return;
427
+ }
428
+ if (e.key === "Escape") {
429
+ e.preventDefault();
430
+ e.stopPropagation();
431
+ setEditingLink(false);
432
+ setLinkURL("");
433
+ savedSelection.current = null;
434
+ const { from, to } = editor.state.selection;
435
+ editor.chain().focus().setTextSelection({
436
+ from,
437
+ to
438
+ }).run();
439
+ }
440
+ }
441
+ }),
442
+ /* @__PURE__ */ jsx(InverseIconButton, {
443
+ onClick: (e) => {
444
+ e.preventDefault();
445
+ e.stopPropagation();
446
+ if (linkURL) editor.chain().focus().unsetLink().run();
447
+ restoreSelection();
448
+ setLinkURL("");
449
+ savedSelection.current = null;
450
+ setEditingLink(false);
451
+ },
452
+ size: "sm",
453
+ type: "button",
454
+ "aria-label": "Cancel link",
455
+ "data-rte-menu-bar-item": true,
456
+ children: linkURL && editorState.isLink ? /* @__PURE__ */ jsx(UnlinkIcon, {}) : /* @__PURE__ */ jsx(XIcon, {})
457
+ }),
458
+ /* @__PURE__ */ jsx(InverseIconButton, {
459
+ onClick: (e) => {
460
+ e.preventDefault();
461
+ e.stopPropagation();
462
+ if (linkURL.trim() && editor && savedSelection.current) {
463
+ const { from, to } = savedSelection.current;
464
+ editor.chain().focus().setTextSelection({
465
+ from,
466
+ to
467
+ }).setLink({ href: ensureProtocol(linkURL) }).run();
468
+ } else if (editor && savedSelection.current) {
469
+ const { from, to } = savedSelection.current;
470
+ editor.chain().focus().setTextSelection({
471
+ from,
472
+ to
473
+ }).unsetLink().run();
474
+ }
475
+ savedSelection.current = null;
476
+ setEditingLink(false);
477
+ setLinkURL("");
478
+ },
479
+ size: "sm",
480
+ type: "button",
481
+ "aria-label": "Apply link",
482
+ "data-rte-menu-bar-item": true,
483
+ children: /* @__PURE__ */ jsx(CheckIcon, {})
484
+ })
485
+ ]
486
+ }, "link-toolbar")
487
+ }) })
488
+ });
489
+ }
490
+ //#endregion
491
+ export { ensureProtocol as n, FloatingToolbar as t };
492
+
493
+ //# sourceMappingURL=FloatingToolbar-Df90f7Dm.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingToolbar-Df90f7Dm.mjs","names":["Input","DropdownMenu"],"sources":["../src/components/FloatingToolbar/FloatingToolbar.tsx"],"sourcesContent":["import { PluginKey } from '@tiptap/pm/state';\nimport type { EditorView } from '@tiptap/pm/view';\nimport { useEditorState, type Editor } from '@tiptap/react';\nimport { BubbleMenu } from '@tiptap/react/menus';\nimport { AnimatePresence, motion } from 'framer-motion';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport styled from 'styled-components';\n\nimport { BorderRadius, Color, Spacing } from '@persona/design-tokens';\nimport {\n BoldIcon,\n CheckIcon,\n GridIcon,\n ItalicIcon,\n LinkIcon,\n ListIcon,\n UnlinkIcon,\n XIcon,\n} from '@persona/icons';\n\nimport { IconButton } from '#src/components/Button';\nimport DropdownMenu from '#src/components/DropdownMenu';\nimport Input from '#src/components/Input';\nimport Stack from '#src/components/Stack';\nimport { Z_INDICES } from '#src/lib/zindex';\nimport { TransitionDuration } from '#src/variables/transitions';\n\n// Core* colors throughout this file are intentional: the bubble toolbar is an\n// always-dark inverse surface floating over the editor, so it must not track\n// the semantic surface theme.\nconst BubbleMenuBar = styled(Stack)`\n padding: ${Spacing[1]} ${Spacing[2]};\n background-color: ${Color.CoreSlate1100};\n border-radius: ${BorderRadius.Lg};\n`;\n\nconst IconContainer = styled(motion.div)`\n display: flex;\n gap: ${Spacing[1]};\n`;\n\nconst InverseIconButton = styled(IconButton)<{ $selected?: boolean }>`\n background-color: ${({ $selected }) => ($selected ? Color.CoreSlate900 : 'transparent')};\n color: ${Color.PrimaryWhite};\n transition: background-color ${TransitionDuration.ExtraFast} ease-out;\n\n &:hover:not(:disabled) {\n background-color: ${Color.CoreSlate800};\n }\n\n &:disabled {\n background-color: transparent;\n opacity: 0.35;\n }\n`;\n\nconst InverseInput = styled(Input)`\n background-color: ${Color.CoreSlate900};\n color: ${Color.PrimaryWhite};\n\n :focus-within {\n border-color: ${Color.CoreBlue700};\n }\n ::placeholder {\n color: ${Color.TextDisabled};\n }\n\n input {\n background-color: ${Color.CoreSlate900};\n color: ${Color.PrimaryWhite};\n }\n`;\n\nconst StyledDropdownItem = styled(DropdownMenu.Item)`\n width: 100%;\n height: 30px;\n font-size: small;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\n// Floating UI takes its offset as numbers while the spacing tokens are CSS lengths.\nconst TOOLBAR_GAP = parseInt(Spacing[1]);\n\n// Anchored to the field, the toolbar lines up with the input's left edge; over a\n// selection it sits back a notch so it does not crowd the first selected glyph.\nconst FIELD_OFFSET = { mainAxis: TOOLBAR_GAP, crossAxis: 0 };\nconst SELECTION_OFFSET = { mainAxis: TOOLBAR_GAP, crossAxis: -parseInt(Spacing[2]) };\n\n// The element EditorContent mounts the editor into — the visible field. Tiptap\n// types `options.element` loosely, so fall back to the editable root.\nconst getFieldElement = (editor: Editor): Element =>\n editor.options.element instanceof Element ? editor.options.element : editor.view.dom;\n\n// Schemes we trust as link targets. Anything else (no scheme, or an unsafe one\n// like javascript:/data:/vbscript:) is treated as a bare host and forced onto\n// https, which both preserves host:port input and neutralizes script schemes.\nconst SAFE_LINK_SCHEME = /^(https?|mailto|tel):/i;\nconst URI_SCHEME = /^[a-zA-Z][a-zA-Z0-9+.-]*:/;\n\nexport const ensureProtocol = (url: string): string => {\n const trimmedUrl = url.trim();\n if (!trimmedUrl) {\n return '';\n }\n // Handlebars placeholders (e.g. {{inquiry.id}}) are legitimate link targets in\n // templated messages — the template render produces the final URL, so pass\n // the expression through unvalidated. Only when nothing before the first\n // placeholder looks like an unsafe scheme: javascript:alert(1)//{{x}} would\n // otherwise smuggle a script href past the allowlist. URL parsers strip C0\n // controls, tabs and spaces before reading the scheme, so normalize the\n // prefix the same way first — java\\tscript:...{{x}} must not slip through.\n if (trimmedUrl.includes('{{')) {\n const beforePlaceholder = trimmedUrl\n .slice(0, trimmedUrl.indexOf('{{'))\n // eslint-disable-next-line no-control-regex -- mirrors how URL parsers strip C0/space before reading the scheme\n .replace(/[\\u0000-\\u0020]/g, '');\n if (!URI_SCHEME.test(beforePlaceholder) || SAFE_LINK_SCHEME.test(beforePlaceholder)) {\n return trimmedUrl;\n }\n return '';\n }\n const candidate = SAFE_LINK_SCHEME.test(trimmedUrl) ? trimmedUrl : `https://${trimmedUrl}`;\n // Re-parse so malformed input — including an unsafe scheme that can't survive\n // the https prefix — is dropped instead of applied as a broken href.\n return URL.canParse(candidate) ? candidate : '';\n};\n\ninterface FloatingToolbarProps {\n /** TipTap editor instance to operate on. */\n editor: Editor | null;\n /**\n * Keep the toolbar up the whole time the editor is focused instead of only\n * while text is selected, so the formatting actions are discoverable without\n * knowing to select first.\n */\n showOnFocus?: boolean;\n}\n\n/**\n * Floating bubble toolbar that appears on text selection or inside a table, or —\n * with `showOnFocus` — for as long as the editor is focused.\n * Keyboard shortcut: Cmd/Ctrl+Shift+U opens the link-edit row.\n */\nfunction FloatingToolbar({ editor, showOnFocus = false }: FloatingToolbarProps) {\n const [linkURL, setLinkURL] = useState('');\n const [editingLink, setEditingLink] = useState(false);\n const linkInputRef = useRef<HTMLInputElement>(null);\n const toolbarRef = useRef<HTMLDivElement>(null);\n const savedSelection = useRef<{ from: number; to: number } | null>(null);\n const editingLinkRef = useRef(editingLink);\n const blurTimeout = useRef<ReturnType<typeof setTimeout>>();\n // Lets the toolbar close its own bubble menu plugin via a `hide` meta.\n const [pluginKey] = useState(() => new PluginKey('floatingToolbar'));\n\n useEffect(() => () => clearTimeout(blurTimeout.current), []);\n\n useEffect(() => {\n editingLinkRef.current = editingLink;\n }, [editingLink]);\n\n const restoreSelection = useCallback(() => {\n if (editor && savedSelection.current) {\n const { from, to } = savedSelection.current;\n editor.chain().focus().setTextSelection({ from, to }).run();\n }\n }, [editor]);\n\n const openLinkEditingMode = useCallback(() => {\n if (!editor) {\n return;\n }\n if (!editor.can().chain().toggleLink({ href: 'https://www.google.com' }).run()) {\n return;\n }\n\n const { from, to } = editor.state.selection;\n savedSelection.current = { from, to };\n\n const linkAttr = editor.getAttributes('link');\n if (linkAttr.href) {\n setLinkURL(linkAttr.href);\n }\n\n editor.chain().focus().setTextSelection({ from, to }).run();\n setEditingLink(true);\n\n setTimeout(() => {\n linkInputRef.current?.focus();\n }, 250);\n }, [editor]);\n\n // Cmd/Ctrl+Shift+U → open link mode; Escape inside link mode → cancel.\n useEffect(() => {\n if (!editor) {\n return undefined;\n }\n const dom = editor.view.dom;\n const handler = (event: KeyboardEvent) => {\n if ((event.metaKey || event.ctrlKey) && event.shiftKey && event.key.toLowerCase() === 'u') {\n event.preventDefault();\n openLinkEditingMode();\n return;\n }\n if (event.key === 'Escape' && editingLinkRef.current) {\n event.preventDefault();\n setEditingLink(false);\n setLinkURL('');\n savedSelection.current = null;\n }\n };\n dom.addEventListener('keydown', handler);\n return () => {\n dom.removeEventListener('keydown', handler);\n };\n }, [editor, openLinkEditingMode]);\n\n // Keep selection highlighted while focus is in the link input.\n useEffect(() => {\n if (!editingLink || !editor || !savedSelection.current) {\n return undefined;\n }\n restoreSelection();\n const timeoutId = setTimeout(() => {\n restoreSelection();\n editor.view.dom?.focus();\n }, 0);\n return () => clearTimeout(timeoutId);\n }, [editingLink, restoreSelection, editor]);\n\n // Pressing a toolbar button focuses that button, and the command's own\n // transaction re-runs this check before the chained `.focus()` hands focus\n // back to the editor. Ignoring focus held inside the toolbar therefore tears\n // the bar down for a frame mid-click, taking the pressed button with it.\n const isFocusWithinToolbar = useCallback(\n () => !!toolbarRef.current?.contains(document.activeElement),\n [],\n );\n\n // BubbleMenu dispatches an options-update transaction whenever these props\n // change identity, and editors that re-render per transaction would then\n // loop — so keep them stable across renders.\n const bubbleMenuOptions = useMemo(\n () => ({\n placement: 'top-start' as const,\n offset: showOnFocus ? FIELD_OFFSET : SELECTION_OFFSET,\n }),\n [showOnFocus],\n );\n\n // Sitting above the field rather than the selection: a toolbar that is up\n // for the whole time the field is focused looks jumpy if it chases the\n // caret and hops between selections.\n const getReferencedVirtualElement = useMemo(\n () =>\n showOnFocus && editor\n ? () => ({ getBoundingClientRect: () => getFieldElement(editor).getBoundingClientRect() })\n : undefined,\n [editor, showOnFocus],\n );\n\n const shouldShow = useCallback(\n ({\n editor: e,\n view,\n from,\n to,\n }: {\n editor: Editor;\n view: EditorView;\n from: number;\n to: number;\n }) => {\n if (!e.isEditable) {\n return false;\n }\n if (e.isActive('mention')) {\n return false;\n }\n // The toolbar carries the table-actions dropdown — a collapsed caret\n // inside a table must still show it or row/column controls are\n // unreachable.\n if (e.isActive('table')) {\n return true;\n }\n if (from !== to) {\n return true;\n }\n return showOnFocus && (view.hasFocus() || isFocusWithinToolbar());\n },\n [isFocusWithinToolbar, showOnFocus],\n );\n\n // Self-subscribe: standalone use can't rely on the host's useEditor options (shouldRerenderOnTransaction is off by default in Tiptap 3).\n const editorState = useEditorState({\n editor,\n selector: (snapshot) =>\n snapshot.editor && {\n isBold: snapshot.editor.isActive('bold'),\n canBold: snapshot.editor.can().chain().toggleBold().run(),\n isItalic: snapshot.editor.isActive('italic'),\n canItalic: snapshot.editor.can().chain().toggleItalic().run(),\n isLink: snapshot.editor.isActive('link'),\n isBulletList: snapshot.editor.isActive('bulletList'),\n canLink: snapshot.editor.can().chain().toggleLink({ href: 'https://www.google.com' }).run(),\n isTable: snapshot.editor.isActive('table'),\n canInsertTable: snapshot.editor\n .can()\n .chain()\n .insertTable({ rows: 3, cols: 3, withHeaderRow: true })\n .run(),\n },\n });\n\n if (!editor || !editorState) {\n return null;\n }\n\n // The plugin closes the toolbar off the editor's blur, which cannot fire again\n // once focus has moved in here, so leaving from the toolbar has to close it.\n // Focus only lands on its next target after this event, hence the tick.\n const handleToolbarBlur = () => {\n blurTimeout.current = setTimeout(() => {\n if (editor.isDestroyed || isFocusWithinToolbar() || editor.view.hasFocus()) {\n return;\n }\n editor.view.dispatch(editor.state.tr.setMeta(pluginKey, 'hide'));\n });\n };\n\n return (\n <BubbleMenu\n editor={editor}\n pluginKey={pluginKey}\n options={bubbleMenuOptions}\n getReferencedVirtualElement={getReferencedVirtualElement}\n shouldShow={shouldShow}\n // Floating UI sets no z-index on the portaled menu (Tippy used 9999).\n style={{ zIndex: Z_INDICES.modalElevated }}\n >\n <AnimatePresence>\n <BubbleMenuBar\n ref={toolbarRef}\n role='toolbar'\n aria-label='Text formatting'\n direction='horizontal'\n spacing={Spacing[1]}\n onBlur={handleToolbarBlur}\n >\n {!editingLink ? (\n <IconContainer\n key='main-toolbar'\n layout\n initial={{ x: -10, opacity: 0 }}\n animate={{ x: 0, opacity: 1 }}\n exit={{ x: -10, opacity: 0 }}\n transition={{ duration: 0.2, ease: 'easeOut' }}\n >\n <InverseIconButton\n onClick={() => editor.chain().focus().toggleBulletList().run()}\n $selected={editorState.isBulletList}\n size='sm'\n type='button'\n aria-label='Toggle bullet list'\n data-rte-menu-bar-item\n >\n <ListIcon />\n </InverseIconButton>\n <InverseIconButton\n onClick={() => editor.chain().focus().toggleBold().run()}\n disabled={!editorState.canBold}\n $selected={editorState.isBold}\n size='sm'\n type='button'\n aria-label='Toggle bold'\n data-rte-menu-bar-item\n >\n <BoldIcon />\n </InverseIconButton>\n <InverseIconButton\n onClick={() => editor.chain().focus().toggleItalic().run()}\n $selected={editorState.isItalic}\n disabled={!editorState.canItalic}\n type='button'\n size='sm'\n aria-label='Toggle italic'\n data-rte-menu-bar-item\n >\n <ItalicIcon />\n </InverseIconButton>\n <InverseIconButton\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n openLinkEditingMode();\n }}\n $selected={editorState.isLink}\n disabled={!editorState.canLink}\n size='sm'\n type='button'\n aria-label='Toggle link'\n data-rte-menu-bar-item\n >\n <LinkIcon />\n </InverseIconButton>\n {editorState.isTable ? (\n <DropdownMenu\n contentProps={{\n // @ts-expect-error data attribute on dropdown menu\n 'data-rte-menu-bar-item': 'table-actions-dropdown-menu',\n onCloseAutoFocus: (event) => {\n event.preventDefault();\n editor.commands.focus();\n },\n }}\n trigger={\n <InverseIconButton\n size='sm'\n type='button'\n aria-label='Table actions'\n data-rte-menu-bar-item\n $selected\n >\n <GridIcon />\n </InverseIconButton>\n }\n >\n <StyledDropdownItem\n id='floating-toolbar__tableAddRowAfter'\n variant='basic'\n data-rte-menu-bar-item='table-add-row-after'\n onClick={() => editor.chain().focus().addRowAfter().run()}\n >\n Add row below\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableAddRowBefore'\n variant='basic'\n data-rte-menu-bar-item='table-add-row-before'\n onClick={() => editor.chain().focus().addRowBefore().run()}\n >\n Add row above\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableAddColumnAfter'\n variant='basic'\n data-rte-menu-bar-item='table-add-column-after'\n onClick={() => editor.chain().focus().addColumnAfter().run()}\n >\n Add column right\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableAddColumnBefore'\n variant='basic'\n data-rte-menu-bar-item='table-add-column-before'\n onClick={() => editor.chain().focus().addColumnBefore().run()}\n >\n Add column left\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableDeleteRow'\n variant='basic'\n data-rte-menu-bar-item='table-delete-row'\n onClick={() => editor.chain().focus().deleteRow().run()}\n >\n Delete row\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableDeleteColumn'\n variant='basic'\n data-rte-menu-bar-item='table-delete-column'\n onClick={() => editor.chain().focus().deleteColumn().run()}\n >\n Delete column\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableToggleHeaderRow'\n variant='basic'\n data-rte-menu-bar-item='table-toggle-header-row'\n onClick={() => editor.chain().focus().toggleHeaderRow().run()}\n >\n Toggle header row\n </StyledDropdownItem>\n <StyledDropdownItem\n id='floating-toolbar__tableDelete'\n variant='basic'\n data-rte-menu-bar-item='table-delete'\n onClick={() => editor.chain().focus().deleteTable().run()}\n >\n Delete table\n </StyledDropdownItem>\n </DropdownMenu>\n ) : (\n <InverseIconButton\n onClick={() =>\n editor\n .chain()\n .focus()\n .insertTable({ rows: 3, cols: 3, withHeaderRow: true })\n .run()\n }\n disabled={!editorState.canInsertTable}\n size='sm'\n type='button'\n aria-label='Insert table'\n data-rte-menu-bar-item\n >\n <GridIcon />\n </InverseIconButton>\n )}\n </IconContainer>\n ) : (\n <IconContainer\n key='link-toolbar'\n initial={{ x: -10, opacity: 0 }}\n animate={{ x: 0, opacity: 1 }}\n exit={{ x: -10, opacity: 0 }}\n transition={{ duration: 0.2, ease: 'easeOut' }}\n aria-label='Link toolbar'\n onAnimationComplete={() => {\n if (editor && savedSelection.current) {\n setTimeout(() => {\n restoreSelection();\n linkInputRef.current?.focus();\n }, 10);\n }\n }}\n >\n <InverseInput\n ref={linkInputRef}\n size='sm'\n value={linkURL}\n onChange={(e) => setLinkURL(e.target.value)}\n placeholder='Click to enter URL...'\n aria-label='Link input'\n data-rte-menu-bar-item\n onClick={() => {\n linkInputRef.current?.focus();\n }}\n onFocus={() => {\n if (savedSelection.current && editor) {\n const { from, to } = savedSelection.current;\n editor.chain().setTextSelection({ from, to }).run();\n }\n }}\n onKeyDown={(e) => {\n if (e.key === 'Enter' && linkURL.trim() && editor && savedSelection.current) {\n e.preventDefault();\n e.stopPropagation();\n const { from, to } = savedSelection.current;\n editor\n .chain()\n .focus()\n .setTextSelection({ from, to })\n .setLink({ href: ensureProtocol(linkURL) })\n .run();\n savedSelection.current = null;\n setEditingLink(false);\n setLinkURL('');\n return;\n }\n if (e.key === 'Escape') {\n e.preventDefault();\n e.stopPropagation();\n setEditingLink(false);\n setLinkURL('');\n savedSelection.current = null;\n const { from, to } = editor.state.selection;\n editor.chain().focus().setTextSelection({ from, to }).run();\n }\n }}\n />\n <InverseIconButton\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n if (linkURL) {\n editor.chain().focus().unsetLink().run();\n }\n restoreSelection();\n setLinkURL('');\n savedSelection.current = null;\n setEditingLink(false);\n }}\n size='sm'\n type='button'\n aria-label='Cancel link'\n data-rte-menu-bar-item\n >\n {linkURL && editorState.isLink ? <UnlinkIcon /> : <XIcon />}\n </InverseIconButton>\n <InverseIconButton\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n if (linkURL.trim() && editor && savedSelection.current) {\n const { from, to } = savedSelection.current;\n editor\n .chain()\n .focus()\n .setTextSelection({ from, to })\n .setLink({ href: ensureProtocol(linkURL) })\n .run();\n } else if (editor && savedSelection.current) {\n const { from, to } = savedSelection.current;\n editor.chain().focus().setTextSelection({ from, to }).unsetLink().run();\n }\n savedSelection.current = null;\n setEditingLink(false);\n setLinkURL('');\n }}\n size='sm'\n type='button'\n aria-label='Apply link'\n data-rte-menu-bar-item\n >\n <CheckIcon />\n </InverseIconButton>\n </IconContainer>\n )}\n </BubbleMenuBar>\n </AnimatePresence>\n </BubbleMenu>\n );\n}\n\nexport default FloatingToolbar;\n"],"mappings":";;;;;;;;;;;;;;;;AA8BA,MAAM,gBAAgB,OAAO,MAAM;aACtB,QAAQ,GAAG,GAAG,QAAQ,GAAG;sBAChB,MAAM,cAAc;mBACvB,aAAa,GAAG;;AAGnC,MAAM,gBAAgB,OAAO,OAAO,IAAI;;SAE/B,QAAQ,GAAG;;AAGpB,MAAM,oBAAoB,OAAO,WAAW;uBACrB,EAAE,gBAAiB,YAAY,MAAM,eAAe,cAAe;WAC/E,MAAM,aAAa;yCACgC;;;wBAGtC,MAAM,aAAa;;;;;;;;AAS3C,MAAM,eAAe,OAAOA,cAAM;sBACZ,MAAM,aAAa;WAC9B,MAAM,aAAa;;;oBAGV,MAAM,YAAY;;;aAGzB,MAAM,aAAa;;;;wBAIR,MAAM,aAAa;aAC9B,MAAM,aAAa;;;AAIhC,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Q,MAAM,IAAI,UAAU,eAAe,SAAS;QACtD,MAAM,EAAE,MAAM,OAAO,eAAe;AACpC,eACG,OAAO,CACP,OAAO,CACP,iBAAiB;SAAE;SAAM;SAAI,CAAC,CAC9B,QAAQ,EAAE,MAAM,eAAe,QAAQ,EAAE,CAAC,CAC1C,KAAK;kBACC,UAAU,eAAe,SAAS;QAC3C,MAAM,EAAE,MAAM,OAAO,eAAe;AACpC,eAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB;SAAE;SAAM;SAAI,CAAC,CAAC,WAAW,CAAC,KAAK;;AAEzE,sBAAe,UAAU;AACzB,sBAAe,MAAM;AACrB,kBAAW,GAAG;;MAEhB,MAAK;MACL,MAAK;MACL,cAAW;MACX,0BAAA;gBAEA,oBAAC,WAAD,EAAa,CAAA;MACK,CAAA;KACN;MAzGV,eAyGU;GAEJ,CAAA,EACA,CAAA;EACP,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
2
2
  import { Editor } from "@tiptap/react";
3
3
 
4
- //#region src/components/RichTextEditor/FloatingToolbar.d.ts
4
+ //#region src/components/FloatingToolbar/FloatingToolbar.d.ts
5
5
  declare const ensureProtocol: (url: string) => string;
6
6
  interface FloatingToolbarProps {
7
7
  /** TipTap editor instance to operate on. */
@@ -1,4 +1,4 @@
1
- import { t as ErrorProps } from "./ErrorProps-Cy-APmdC.mjs";
1
+ import { t as ErrorProps } from "./ErrorProps-4Ohsinrf.mjs";
2
2
  import * as _$react from "react";
3
3
  import { ComponentPropsWithoutRef, ReactNode } from "react";
4
4
  import * as _$styled_components0 from "styled-components";
@@ -61,4 +61,4 @@ interface FormControlProps extends ComponentPropsWithoutRef<'div'>, FormControlB
61
61
  declare const FormControl: _$react.ForwardRefExoticComponent<FormControlProps & _$react.RefAttributes<HTMLDivElement>>;
62
62
  //#endregion
63
63
  export { FormControlProps as a, FormLabelProps as c, FormControlBaseProps as i, HelperText as l, ErrorText as n, FormInputContainer as o, FormControl as r, FormLabel as s, Container as t, WarningText as u };
64
- //# sourceMappingURL=FormControl-TkYMZeBd.d.mts.map
64
+ //# sourceMappingURL=FormControl-BQe3GRhi.d.mts.map
@@ -1,2 +1,2 @@
1
- import { a as FormControlProps, c as FormLabelProps, i as FormControlBaseProps, l as HelperText, n as ErrorText, o as FormInputContainer, r as FormControl, s as FormLabel, t as Container, u as WarningText } from "./FormControl-TkYMZeBd.mjs";
1
+ import { a as FormControlProps, c as FormLabelProps, i as FormControlBaseProps, l as HelperText, n as ErrorText, o as FormInputContainer, r as FormControl, s as FormLabel, t as Container, u as WarningText } from "./FormControl-BQe3GRhi.mjs";
2
2
  export { Container, ErrorText, FormControl, FormControl as default, FormControlBaseProps, FormControlProps, FormInputContainer, FormLabel, FormLabelProps, HelperText, WarningText };
@@ -1,4 +1,4 @@
1
- import { c as ParagraphProps, o as LabelProps, u as SpanProps } from "./Text-SaoRBdB6.mjs";
1
+ import { c as ParagraphProps, o as LabelProps, u as SpanProps } from "./Text-CvaqognH.mjs";
2
2
  import * as _$react from "react";
3
3
  import * as _$styled_components0 from "styled-components";
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as FormControlProps, l as HelperText, n as ErrorText, s as FormLabel, u as WarningText } from "./FormControl-TkYMZeBd.mjs";
1
+ import { a as FormControlProps, l as HelperText, n as ErrorText, s as FormLabel, u as WarningText } from "./FormControl-BQe3GRhi.mjs";
2
2
  import * as _$react from "react";
3
3
  import { ComponentPropsWithRef, ReactElement, ReactNode } from "react";
4
4
 
@@ -67,4 +67,4 @@ interface FormFieldProps extends Omit<FormControlProps, 'children'>, FormFieldBa
67
67
  declare const FormField: _$react.ForwardRefExoticComponent<FormFieldProps & _$react.RefAttributes<HTMLDivElement>>;
68
68
  //#endregion
69
69
  export { FormFieldBaseProps as n, FormFieldProps as r, FormField as t };
70
- //# sourceMappingURL=FormField-D10LW9-a.d.mts.map
70
+ //# sourceMappingURL=FormField-BW5uMzId.d.mts.map
@@ -1,2 +1,2 @@
1
- import { n as FormFieldBaseProps, r as FormFieldProps, t as FormField } from "./FormField-D10LW9-a.mjs";
1
+ import { n as FormFieldBaseProps, r as FormFieldProps, t as FormField } from "./FormField-BW5uMzId.mjs";
2
2
  export { FormField, FormField as default, FormFieldBaseProps, FormFieldProps };
@@ -89,4 +89,4 @@ const GridItem = ({ span, children, ...rest }) => /* @__PURE__ */ jsx(Item, {
89
89
  //#endregion
90
90
  export { useGridBreakpoint as i, GRID_BREAKPOINTS as n, Grid as r, GridItem as t };
91
91
 
92
- //# sourceMappingURL=Grid-BtTuj5mR.mjs.map
92
+ //# sourceMappingURL=Grid-CYpOqTUu.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Grid-BtTuj5mR.mjs","names":[],"sources":["../src/components/Grid/Grid.tsx","../src/components/Grid/GridItem.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n createContext,\n type ReactNode,\n type RefObject,\n useContext,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\n\nexport const GRID_BREAKPOINTS = { sm: 768, md: 1024, lg: 1408 } as const;\n\ntype Breakpoint = 'xs' | 'sm' | 'md' | 'lg';\n\nconst GridBreakpointContext = createContext<Breakpoint>('md');\n\n/** Breakpoint of the nearest `Grid`, measured from that grid's width. */\nexport const useGridBreakpoint = (): Breakpoint => useContext(GridBreakpointContext);\n\nconst getBreakpoint = (width: number): Breakpoint => {\n if (width >= GRID_BREAKPOINTS.lg) {\n return 'lg';\n }\n if (width >= GRID_BREAKPOINTS.md) {\n return 'md';\n }\n if (width >= GRID_BREAKPOINTS.sm) {\n return 'sm';\n }\n return 'xs';\n};\n\nconst useMeasuredGridBreakpoint = (ref: RefObject<HTMLDivElement>) => {\n const [breakpoint, setBreakpoint] = useState<Breakpoint>('md');\n useLayoutEffect(() => {\n const node = ref.current;\n if (!node) {\n return;\n }\n const update = () => setBreakpoint(getBreakpoint(node.offsetWidth));\n update();\n const observer = new ResizeObserver(update);\n observer.observe(node);\n return () => observer.disconnect();\n }, [ref]);\n return breakpoint;\n};\n\nconst Root = styled.div<{ $mode: GridProps['mode']; $breakpoint: Breakpoint }>`\n display: grid;\n width: 100%;\n grid-template-columns: repeat(12, minmax(0, 1fr));\n box-sizing: border-box;\n\n ${({ $breakpoint }) =>\n $breakpoint === 'xs' &&\n css`\n min-width: ${GRID_BREAKPOINTS.sm - 1}px;\n `}\n\n ${({ $breakpoint }) =>\n $breakpoint === 'xs' || $breakpoint === 'sm'\n ? css`\n gap: ${Spacing[3]};\n padding-inline: ${Spacing[5]};\n `\n : css`\n gap: ${Spacing[4]};\n padding-inline: ${Spacing[6]};\n `}\n\n // max-width equals the lg threshold; offsetWidth reads the clamped border-box width and getBreakpoint uses >=, so the clamp stays 'lg'\n ${({ $mode, $breakpoint }) =>\n $mode === 'fixed' &&\n $breakpoint === 'lg' &&\n css`\n max-width: ${GRID_BREAKPOINTS.lg}px;\n margin-inline: auto;\n `}\n`;\n\nexport interface GridProps extends ComponentPropsWithoutRef<'div'> {\n /**\n * Selects the grid width behavior at the large breakpoint. `fixed` centers the grid at a\n * maximum width of 1408px, while `fluid` fills the available width.\n *\n * Breakpoints:\n * - ≤767px: 12 columns, 24px margins, 12px gutters, and a 767px minimum width.\n * - 768–1023px: 12 columns, 24px margins, 12px gutters, and 100% width.\n * - 1024–1407px: 12 columns, 32px margins, 16px gutters, and 100% width.\n * - ≥1408px: 12 columns, 32px margins, 16px gutters, and either fixed or fluid width.\n */\n mode: 'fixed' | 'fluid';\n children: ReactNode;\n}\n\n/**\n * Provides a 12-column CSS grid that measures its own width with a ResizeObserver for responsive\n * horizontal margins and gutters. Vertical spacing is left to the consumer.\n *\n * The grid measures breakpoints against its own width rather than the viewport. Use `fixed` to\n * center the grid at its large-screen maximum width, or `fluid` to keep it at 100% width.\n */\nexport const Grid = ({ mode, children, ...rest }: GridProps) => {\n const ref = useRef<HTMLDivElement>(null);\n const breakpoint = useMeasuredGridBreakpoint(ref);\n return (\n <GridBreakpointContext.Provider value={breakpoint}>\n <Root ref={ref} $mode={mode} $breakpoint={breakpoint} {...rest}>\n {children}\n </Root>\n </GridBreakpointContext.Provider>\n );\n};\n\nexport default Grid;\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nexport type GridSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport interface GridItemProps extends ComponentPropsWithoutRef<'div'> {\n span: GridSpan;\n children: ReactNode;\n}\n\nconst Item = styled.div<{ $span: GridSpan }>`\n grid-column: span ${({ $span }) => $span};\n min-width: 0;\n`;\n\nexport const GridItem = ({ span, children, ...rest }: GridItemProps) => (\n <Item $span={span} {...rest}>\n {children}\n </Item>\n);\n\nexport default GridItem;\n"],"mappings":";;;;;AAcA,MAAa,mBAAmB;CAAE,IAAI;CAAK,IAAI;CAAM,IAAI;CAAM;AAI/D,MAAM,wBAAwB,cAA0B,KAAK;;AAG7D,MAAa,0BAAsC,WAAW,sBAAsB;AAEpF,MAAM,iBAAiB,UAA8B;AACnD,KAAI,SAAS,iBAAiB,GAC5B,QAAO;AAET,KAAI,SAAS,iBAAiB,GAC5B,QAAO;AAET,KAAI,SAAS,iBAAiB,GAC5B,QAAO;AAET,QAAO;;AAGT,MAAM,6BAA6B,QAAmC;CACpE,MAAM,CAAC,YAAY,iBAAiB,SAAqB,KAAK;AAC9D,uBAAsB;EACpB,MAAM,OAAO,IAAI;AACjB,MAAI,CAAC,KACH;EAEF,MAAM,eAAe,cAAc,cAAc,KAAK,YAAY,CAAC;AACnE,UAAQ;EACR,MAAM,WAAW,IAAI,eAAe,OAAO;AAC3C,WAAS,QAAQ,KAAK;AACtB,eAAa,SAAS,YAAY;IACjC,CAAC,IAAI,CAAC;AACT,QAAO;;AAGT,MAAM,OAAO,OAAO,GAA0D;;;;;;KAMzE,EAAE,kBACH,gBAAgB,QAChB,GAAG;mBACY,iBAAiB,KAAK,EAAE;MACrC;;KAED,EAAE,kBACH,gBAAgB,QAAQ,gBAAgB,OACpC,GAAG;iBACM,QAAQ,GAAG;4BACA,QAAQ,GAAG;YAE/B,GAAG;iBACM,QAAQ,GAAG;4BACA,QAAQ,GAAG;UAC7B;;;KAGL,EAAE,OAAO,kBACV,UAAU,WACV,gBAAgB,QAChB,GAAG;mBACY,iBAAiB,GAAG;;MAEjC;;;;;;;;;AAyBN,MAAa,QAAQ,EAAE,MAAM,UAAU,GAAG,WAAsB;CAC9D,MAAM,MAAM,OAAuB,KAAK;CACxC,MAAM,aAAa,0BAA0B,IAAI;AACjD,QACE,oBAAC,sBAAsB,UAAvB;EAAgC,OAAO;YACrC,oBAAC,MAAD;GAAW;GAAK,OAAO;GAAM,aAAa;GAAY,GAAI;GACvD;GACI,CAAA;EACwB,CAAA;;;;ACzGrC,MAAM,OAAO,OAAO,GAAwB;uBACrB,EAAE,YAAY,MAAM;;;AAI3C,MAAa,YAAY,EAAE,MAAM,UAAU,GAAG,WAC5C,oBAAC,MAAD;CAAM,OAAO;CAAM,GAAI;CACpB;CACI,CAAA"}
1
+ {"version":3,"file":"Grid-CYpOqTUu.mjs","names":[],"sources":["../src/components/Grid/Grid.tsx","../src/components/Grid/GridItem.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n createContext,\n type ReactNode,\n type RefObject,\n useContext,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Spacing } from '@persona/design-tokens';\n\nexport const GRID_BREAKPOINTS = { sm: 768, md: 1024, lg: 1408 } as const;\n\ntype Breakpoint = 'xs' | 'sm' | 'md' | 'lg';\n\nconst GridBreakpointContext = createContext<Breakpoint>('md');\n\n/** Breakpoint of the nearest `Grid`, measured from that grid's width. */\nexport const useGridBreakpoint = (): Breakpoint => useContext(GridBreakpointContext);\n\nconst getBreakpoint = (width: number): Breakpoint => {\n if (width >= GRID_BREAKPOINTS.lg) {\n return 'lg';\n }\n if (width >= GRID_BREAKPOINTS.md) {\n return 'md';\n }\n if (width >= GRID_BREAKPOINTS.sm) {\n return 'sm';\n }\n return 'xs';\n};\n\nconst useMeasuredGridBreakpoint = (ref: RefObject<HTMLDivElement>) => {\n const [breakpoint, setBreakpoint] = useState<Breakpoint>('md');\n useLayoutEffect(() => {\n const node = ref.current;\n if (!node) {\n return;\n }\n const update = () => setBreakpoint(getBreakpoint(node.offsetWidth));\n update();\n const observer = new ResizeObserver(update);\n observer.observe(node);\n return () => observer.disconnect();\n }, [ref]);\n return breakpoint;\n};\n\nconst Root = styled.div<{ $mode: GridProps['mode']; $breakpoint: Breakpoint }>`\n display: grid;\n width: 100%;\n grid-template-columns: repeat(12, minmax(0, 1fr));\n box-sizing: border-box;\n\n ${({ $breakpoint }) =>\n $breakpoint === 'xs' &&\n css`\n min-width: ${GRID_BREAKPOINTS.sm - 1}px;\n `}\n\n ${({ $breakpoint }) =>\n $breakpoint === 'xs' || $breakpoint === 'sm'\n ? css`\n gap: ${Spacing[3]};\n padding-inline: ${Spacing[5]};\n `\n : css`\n gap: ${Spacing[4]};\n padding-inline: ${Spacing[6]};\n `}\n\n // max-width equals the lg threshold; offsetWidth reads the clamped border-box width and getBreakpoint uses >=, so the clamp stays 'lg'\n ${({ $mode, $breakpoint }) =>\n $mode === 'fixed' &&\n $breakpoint === 'lg' &&\n css`\n max-width: ${GRID_BREAKPOINTS.lg}px;\n margin-inline: auto;\n `}\n`;\n\nexport interface GridProps extends ComponentPropsWithoutRef<'div'> {\n /**\n * Selects the grid width behavior at the large breakpoint. `fixed` centers the grid at a\n * maximum width of 1408px, while `fluid` fills the available width.\n *\n * Breakpoints:\n * - ≤767px: 12 columns, 24px margins, 12px gutters, and a 767px minimum width.\n * - 768–1023px: 12 columns, 24px margins, 12px gutters, and 100% width.\n * - 1024–1407px: 12 columns, 32px margins, 16px gutters, and 100% width.\n * - ≥1408px: 12 columns, 32px margins, 16px gutters, and either fixed or fluid width.\n */\n mode: 'fixed' | 'fluid';\n children: ReactNode;\n}\n\n/**\n * Provides a 12-column CSS grid that measures its own width with a ResizeObserver for responsive\n * horizontal margins and gutters. Vertical spacing is left to the consumer.\n *\n * The grid measures breakpoints against its own width rather than the viewport. Use `fixed` to\n * center the grid at its large-screen maximum width, or `fluid` to keep it at 100% width.\n */\nexport const Grid = ({ mode, children, ...rest }: GridProps) => {\n const ref = useRef<HTMLDivElement>(null);\n const breakpoint = useMeasuredGridBreakpoint(ref);\n return (\n <GridBreakpointContext.Provider value={breakpoint}>\n <Root ref={ref} $mode={mode} $breakpoint={breakpoint} {...rest}>\n {children}\n </Root>\n </GridBreakpointContext.Provider>\n );\n};\n\nexport default Grid;\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nexport type GridSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport interface GridItemProps extends ComponentPropsWithoutRef<'div'> {\n span: GridSpan;\n children: ReactNode;\n}\n\nconst Item = styled.div<{ $span: GridSpan }>`\n grid-column: span ${({ $span }) => $span};\n min-width: 0;\n`;\n\nexport const GridItem = ({ span, children, ...rest }: GridItemProps) => (\n <Item $span={span} {...rest}>\n {children}\n </Item>\n);\n\nexport default GridItem;\n"],"mappings":";;;;;AAcA,MAAa,mBAAmB;CAAE,IAAI;CAAK,IAAI;CAAM,IAAI;CAAM;AAI/D,MAAM,wBAAwB,cAA0B,KAAK;;AAG7D,MAAa,0BAAsC,WAAW,sBAAsB;AAEpF,MAAM,iBAAiB,UAA8B;AACnD,KAAI,SAAS,iBAAiB,GAC5B,QAAO;AAET,KAAI,SAAS,iBAAiB,GAC5B,QAAO;AAET,KAAI,SAAS,iBAAiB,GAC5B,QAAO;AAET,QAAO;;AAGT,MAAM,6BAA6B,QAAmC;CACpE,MAAM,CAAC,YAAY,iBAAiB,SAAqB,KAAK;AAC9D,uBAAsB;EACpB,MAAM,OAAO,IAAI;AACjB,MAAI,CAAC,K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