@povio/ui 4.0.3 → 5.0.0-rc.10

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 (436) hide show
  1. package/.rulesync/rules/ui-buttons-and-content.md +56 -0
  2. package/.rulesync/rules/ui-inputs-and-forms.md +62 -0
  3. package/.rulesync/rules/ui-overlays-navigation-and-styling.md +49 -0
  4. package/.rulesync/rules/ui-overview.md +33 -0
  5. package/README.md +128 -10
  6. package/dist/{Accordion-CB1F5YAY.js → Accordion-BzwO4_ml.js} +22 -140
  7. package/dist/{Alert-BALBsBrP.js → Alert-CnvEb1D_.js} +34 -30
  8. package/dist/{Alert-CbEhRaU5.d.ts → Alert-DfiJbKH0.d.ts} +4 -3
  9. package/dist/{AlertDialog-PjYM6lDo.d.ts → AlertDialog-OWTbR4km.d.ts} +3 -3
  10. package/dist/AppCanvasPage-BEER5hHp.js +2421 -0
  11. package/dist/AppCanvasPage-BIFYeEeS.d.ts +80 -0
  12. package/dist/{Autocomplete-DE2lQi5o.d.ts → Autocomplete-C6RRxImn.d.ts} +1 -1
  13. package/dist/{Badge-CjPpYa50.d.ts → Badge-CBNpj823.d.ts} +8 -6
  14. package/dist/BadgeButton-Ccgt3oGO.d.ts +15 -0
  15. package/dist/{BottomSheet-CVTF1wQe.js → BottomSheet-BXLE3161.js} +15 -14
  16. package/dist/{BottomSheet-CT0zuola.d.ts → BottomSheet-DbQuzfAB.d.ts} +1 -1
  17. package/dist/{BottomSheet.lazy-7AwnB4vS.d.ts → BottomSheet.lazy-D9LCEo7s.d.ts} +1 -1
  18. package/dist/{Breadcrumbs-D-3YEuem.d.ts → Breadcrumbs-CUV6CU8Q.d.ts} +1 -1
  19. package/dist/{Breadcrumbs-C-mZtdCc.js → Breadcrumbs-FF8hMfXd.js} +26 -42
  20. package/dist/Button-C5rv4Cr2.js +506 -0
  21. package/dist/{Button-DTNjsGx5.d.ts → Button-D-4qb0IR.d.ts} +3 -3
  22. package/dist/{ButtonContent-CohuJJzG.js → ButtonContent-c7lJayVQ.js} +12 -10
  23. package/dist/{Calendar-BYcN64W5.js → Calendar-DRHruqr_.js} +28 -20
  24. package/dist/{CheckContent-DzWpxKGq.js → CheckContent-D7sZPmzx.js} +4 -5
  25. package/dist/{Checkbox-DBV_Nxtq.js → Checkbox-D3f2Plbc.js} +6 -6
  26. package/dist/{Checkbox-CBybJbLm.d.ts → Checkbox-x2MuL477.d.ts} +1 -1
  27. package/dist/{CheckboxCheckmark-DJue5Aej.js → CheckboxCheckmark-FwKjPVbV.js} +34 -55
  28. package/dist/{CheckboxGroup-4xoWgmxr.d.ts → CheckboxGroup-Dio2rvF5.d.ts} +3 -3
  29. package/dist/ComponentGallery-CMFrbwEN.js +3513 -0
  30. package/dist/{DatePicker-CjmXaZ9T.d.ts → DatePicker-1LJ2LqST.d.ts} +3 -3
  31. package/dist/{DatePicker-DGlMtlvy.js → DatePicker-xDEqzNJv.js} +12 -11
  32. package/dist/{DatePickerInput-Nj_rVUyU.js → DatePickerInput-B0fEeCOf.js} +27 -40
  33. package/dist/{DatePickerInput-CdCtVE9z.d.ts → DatePickerInput-ai4apf8B.d.ts} +3 -3
  34. package/dist/{DateRangePicker-D1kjkFfS.d.ts → DateRangePicker-Dfptit_Z.d.ts} +3 -3
  35. package/dist/{DateRangePicker-CE9XvAy9.js → DateRangePicker-DxuVhRaf.js} +25 -22
  36. package/dist/{DateTimePicker-CtUPjVp1.js → DateTimePicker-4N1Pka07.js} +11 -10
  37. package/dist/{DateTimePicker-CT_Pm3KB.d.ts → DateTimePicker-DpsfukpQ.d.ts} +3 -3
  38. package/dist/{Dialog-BE9BSDDl.js → Dialog-9manOgMA.js} +4 -4
  39. package/dist/{Dialog-CXoVeIkU.js → Dialog-CKLkS00H.js} +10 -2
  40. package/dist/{Dialog-DEbI_9S-.d.ts → Dialog-CW93T9X1.d.ts} +3 -2
  41. package/dist/{DropdownMenu-tuf1W-IL.js → DropdownMenu-5jmtgLXd.js} +8 -6
  42. package/dist/{DropdownMenu-CZQRzOBb.d.ts → DropdownMenu-JNpYT4-3.d.ts} +4 -3
  43. package/dist/{DropdownMenuDesktop-C9ttysuk.js → DropdownMenuDesktop-Cl9gZVq0.js} +9 -38
  44. package/dist/{FileInput-BUs7wL0_.js → FileInput-DUyc_sVu.js} +20 -22
  45. package/dist/{FileInput-CI8D_wf_.d.ts → FileInput-Dt3UDg2s.d.ts} +7 -6
  46. package/dist/{FileTrigger-CDXcQthK.js → FileTrigger-Cthk5_Wp.js} +1 -30
  47. package/dist/{FileUpload-BrnJdN3M.d.ts → FileUpload-BXlKtQ4L.d.ts} +1 -1
  48. package/dist/{FileUpload-C3HzeFeb.js → FileUpload-Cx98L1jz.js} +76 -173
  49. package/dist/{FileUploadContainer-CkBENy6n.d.ts → FileUploadContainer-BURZAS2M.d.ts} +1 -1
  50. package/dist/{Form-mzpVGNjX.d.ts → Form-DmcByQts.d.ts} +1 -1
  51. package/dist/{FormField-DTO2cbXC.js → FormField-9h3JAhaY.js} +40 -38
  52. package/dist/{FormField-DTDj3F0A.d.ts → FormField-C8_T6by9.d.ts} +1 -1
  53. package/dist/{FormFieldError-CFg0Wn3i.js → FormFieldError-DeOHHLo2.js} +3 -3
  54. package/dist/FormFieldHeaderTooltip-BV2Ju4oB.js +17 -0
  55. package/dist/{IconButton-CYazzM7I.d.ts → IconButton-D4thBurp.d.ts} +2 -2
  56. package/dist/IconSlot-DSK7qNxc.js +79 -0
  57. package/dist/{InlineIconButton-Rp5bXWcQ.d.ts → InlineIconButton-BeJCjl-q.d.ts} +2 -2
  58. package/dist/{InlineTooltipWrapper-Ct6zi24f.js → InlineTooltipWrapper-BpApaGXV.js} +3 -3
  59. package/dist/{Input-DSHFNEVl.d.ts → Input-CHD67H4o.d.ts} +3 -3
  60. package/dist/{InputContent-CvWm6GAv.d.ts → InputContent-B6CIQNnE.d.ts} +3 -3
  61. package/dist/{InputItem-DAunP0iy.js → InputItem-Cv19Hwnx.js} +11 -11
  62. package/dist/{Inputs-CHEDcuP0.d.ts → Inputs-C0sUmuPv.d.ts} +1 -1
  63. package/dist/{Inputs-_IqA6JRE.js → Inputs-D1aE_J9f.js} +1 -1
  64. package/dist/{Link-DS9-0Ijl.d.ts → Link-Ow9H7kNv.d.ts} +3 -2
  65. package/dist/{ListBox-B7DW1S7n.js → ListBox-CL8Ar4Q_.js} +5 -4
  66. package/dist/{MenuItem-CROWrE2A.d.ts → MenuItem-DHyqOqln.d.ts} +1 -1
  67. package/dist/{Modal-CoFt5PGP.js → Modal-w60dVQcb.js} +1 -1
  68. package/dist/{NumberField-BICDQ2gN.d.ts → NumberField-4SX3R6IR.d.ts} +3 -3
  69. package/dist/{NumberRangeInput-Bu-3Y0zf.js → NumberRangeInput-Bzfe-RlV.js} +8 -8
  70. package/dist/{NumberRangeInput-BlGXChNR.d.ts → NumberRangeInput-CKmLfgVD.d.ts} +2 -2
  71. package/dist/{Pagination-CumQED8X.d.ts → Pagination-CwQu5Py8.d.ts} +1 -1
  72. package/dist/{PaginationList-D79ApWLm.d.ts → PaginationList-DMRUGtf8.d.ts} +2 -2
  73. package/dist/{PaginationList-CmOJo2r2.js → PaginationList-DtvuP63b.js} +13 -21
  74. package/dist/{PasswordInput-BdrYD1D3.d.ts → PasswordInput-tLGcHS6H.d.ts} +1 -1
  75. package/dist/{Popover-C0_-TLl_.d.ts → Popover-BTHPteIh.d.ts} +2 -2
  76. package/dist/{Progress-_jkt2pQw.js → Progress-B3mY9rIP.js} +6 -7
  77. package/dist/{Progress-CYfDXJKs.d.ts → Progress-CjWOR38H.d.ts} +3 -2
  78. package/dist/{QuerySelect-Bpz-qI9h.d.ts → QuerySelect-CgfnA3d-.d.ts} +2 -2
  79. package/dist/{RadioGroup-WHWosz7K.d.ts → RadioGroup-CvmI9i_U.d.ts} +3 -3
  80. package/dist/{RadioGroup-DiF7ILto.js → RadioGroup-efBKgTYA.js} +21 -24
  81. package/dist/{RichTextEditor-eM9d2umr.js → RichTextEditor-Bd7F5D8f.js} +68 -141
  82. package/dist/{RichTextEditor-CbgjRfiU.d.ts → RichTextEditor-CsDZcgyf.d.ts} +1 -1
  83. package/dist/{Select-CyBtGHk9.js → Select-CgIhoWgk.js} +10 -15
  84. package/dist/{Select-wzB2aQ_X.d.ts → Select-DKBPfNUe.d.ts} +1 -1
  85. package/dist/{SelectBase-DefgAEzh.d.ts → SelectBase-BkIhS9Dg.d.ts} +3 -3
  86. package/dist/{Slider-CZMNmk6P.d.ts → Slider-BtUXzztJ.d.ts} +1 -1
  87. package/dist/{Slider-KkWtEm09.js → Slider-CMg0BXJO.js} +12 -12
  88. package/dist/{Spinner-owSXOEzg.js → Spinner-BeVTUzzx.js} +2 -2
  89. package/dist/{Spinner-BOgO9bS6.d.ts → Spinner-DbXeDOa2.d.ts} +3 -2
  90. package/dist/{SplitButton-BPZbQeYC.d.ts → SplitButton-D9ngY1rJ.d.ts} +3 -3
  91. package/dist/{Stepper-BbO9TlOM.js → Stepper-Cp5vbL5g.js} +9 -125
  92. package/dist/{Stepper-PcHlxDD5.d.ts → Stepper-TATlHZhQ.d.ts} +13 -12
  93. package/dist/{Switch-Cylpjatb.js → Switch-CqnGEdeD.js} +17 -25
  94. package/dist/{Switch-C0S5Juhf.d.ts → Switch-s_EPn0Jz.d.ts} +1 -1
  95. package/dist/Table-BN2_J_Ne.js +636 -0
  96. package/dist/Tag-AHfV_XSf.d.ts +44 -0
  97. package/dist/Tag-DPg5sL1Z.js +146 -0
  98. package/dist/{TextArea-CBWJ7w-p.d.ts → TextArea-D6kcAwGn.d.ts} +2 -2
  99. package/dist/{TextArea-DvqDGp4M.js → TextArea-uPffb457.js} +9 -9
  100. package/dist/{TextButton-D7e_YBLe.d.ts → TextButton-XUhV_1s0.d.ts} +4 -4
  101. package/dist/{TimePicker-WirUMDrH.js → TimePicker-DN-i98z5.js} +12 -12
  102. package/dist/{TimePicker-BZ4WrI5Z.d.ts → TimePicker-Dex9aU7D.d.ts} +2 -2
  103. package/dist/Toast-DtG3pA61.js +53 -0
  104. package/dist/{Toast-DIlYlUQk.d.ts → Toast-ruXqONDA.d.ts} +1 -1
  105. package/dist/{ToastContainer-8X5jGBe7.js → ToastContainer-qgpzMFD4.js} +4 -3
  106. package/dist/{ToggleButton-D4y2fLmN.d.ts → ToggleButton-7aP8Jb11.d.ts} +2 -2
  107. package/dist/{ToggleGroup-D9CFdM5-.d.ts → ToggleGroup-CRFDIPGZ.d.ts} +1 -1
  108. package/dist/{ToggleGroup-BK6Ka7WA.js → ToggleGroup-DmVPNWok.js} +27 -55
  109. package/dist/{Tooltip--PSxkQA3.js → Tooltip-CpG1nz7Y.js} +7 -49
  110. package/dist/{Tooltip-B-2AxyjP.d.ts → Tooltip-DHv6vAqW.d.ts} +10 -9
  111. package/dist/{TooltipWrapper-BVc_Aln-.js → TooltipWrapper-CDHFaUKZ.js} +5 -5
  112. package/dist/{Typography-AcUd9df8.js → Typography-LU4z2pR1.js} +2 -2
  113. package/dist/{Typography-BWmZd20e.d.ts → Typography-XljT9s02.d.ts} +1 -1
  114. package/dist/UIConfigurator-CTlq-hrG.js +6704 -0
  115. package/dist/accordion.cva-CL1bVscW.js +129 -0
  116. package/dist/{autocomplete-CaQSVRrw.d.ts → autocomplete-B-JuxTYN.d.ts} +2 -2
  117. package/dist/badgeButton.cva-B2bgCQP6.d.ts +41 -0
  118. package/dist/badgeButton.cva-CvN4CTx5.js +300 -0
  119. package/dist/breadcrumbs.cva-7zzdDhVR.js +27 -0
  120. package/dist/{button.cva-ChabF4Am.d.ts → button.cva-C7kEhgoA.d.ts} +15 -32
  121. package/dist/{buttonContent.cva-CP857foM.d.ts → buttonContent.cva-DPIlROA9.d.ts} +2 -2
  122. package/dist/{checkbox-D8CPWRlM.d.ts → checkbox-CRP4QRfP.d.ts} +1 -1
  123. package/dist/{checkbox-group-BuPUA_Qj.d.ts → checkbox-group-BI_RwIJ4.d.ts} +1 -1
  124. package/dist/{checkbox.cva-DwnPS5df.d.ts → checkbox.cva-DBqfmYHY.d.ts} +6 -7
  125. package/dist/components/accordion.js +1 -1
  126. package/dist/components/alert-dialog.d.ts +1 -1
  127. package/dist/components/alert-dialog.js +7 -7
  128. package/dist/components/alert.d.ts +1 -1
  129. package/dist/components/alert.js +1 -1
  130. package/dist/components/autocomplete.d.ts +1 -1
  131. package/dist/components/autocomplete.js +6 -5
  132. package/dist/components/badge-button.d.ts +2 -0
  133. package/dist/components/{pill-button.js → badge-button.js} +13 -12
  134. package/dist/components/badge.d.ts +1 -1
  135. package/dist/components/badge.js +56 -40
  136. package/dist/components/bottom-sheet.d.ts +2 -2
  137. package/dist/components/bottom-sheet.js +2 -2
  138. package/dist/components/breadcrumbs.d.ts +1 -1
  139. package/dist/components/breadcrumbs.js +1 -1
  140. package/dist/components/button.d.ts +2 -2
  141. package/dist/components/button.js +1 -1
  142. package/dist/components/checkbox-group.d.ts +1 -1
  143. package/dist/components/checkbox-group.js +6 -6
  144. package/dist/components/checkbox.d.ts +1 -1
  145. package/dist/components/checkbox.js +1 -1
  146. package/dist/components/date-picker.d.ts +1 -1
  147. package/dist/components/date-picker.js +1 -1
  148. package/dist/components/date-range-picker.d.ts +1 -1
  149. package/dist/components/date-range-picker.js +1 -1
  150. package/dist/components/date-time-picker.d.ts +1 -1
  151. package/dist/components/date-time-picker.js +1 -1
  152. package/dist/components/dialog.d.ts +1 -1
  153. package/dist/components/dialog.js +1 -1
  154. package/dist/components/drawer.js +4 -4
  155. package/dist/components/dropdown-menu.d.ts +2 -2
  156. package/dist/components/dropdown-menu.js +2 -2
  157. package/dist/components/file-input.d.ts +1 -1
  158. package/dist/components/file-input.js +1 -1
  159. package/dist/components/file-upload-container.d.ts +2 -2
  160. package/dist/components/file-upload-container.js +1 -1
  161. package/dist/components/file-upload.d.ts +2 -2
  162. package/dist/components/file-upload.js +1 -1
  163. package/dist/components/form-field.d.ts +1 -1
  164. package/dist/components/form-field.js +1 -1
  165. package/dist/components/icon-button.d.ts +1 -1
  166. package/dist/components/icon-button.js +2 -2
  167. package/dist/components/icon-slot.d.ts +2 -0
  168. package/dist/components/icon-slot.js +2 -0
  169. package/dist/components/inline-icon-button.d.ts +1 -1
  170. package/dist/components/inline-icon-button.js +2 -2
  171. package/dist/components/input.d.ts +1 -1
  172. package/dist/components/input.js +7 -7
  173. package/dist/components/link.d.ts +1 -1
  174. package/dist/components/link.js +32 -1
  175. package/dist/components/number-field.d.ts +1 -1
  176. package/dist/components/number-field.js +7 -7
  177. package/dist/components/number-range-input.d.ts +1 -1
  178. package/dist/components/number-range-input.js +1 -1
  179. package/dist/components/pagination-list.d.ts +1 -1
  180. package/dist/components/pagination-list.js +1 -1
  181. package/dist/components/pagination.d.ts +1 -1
  182. package/dist/components/pagination.js +36 -33
  183. package/dist/components/password-input.d.ts +1 -1
  184. package/dist/components/popover.d.ts +1 -1
  185. package/dist/components/popover.js +6 -5
  186. package/dist/components/progress.d.ts +1 -1
  187. package/dist/components/progress.js +1 -1
  188. package/dist/components/query-autocomplete.d.ts +2 -2
  189. package/dist/components/query-autocomplete.js +10 -5
  190. package/dist/components/query-select.d.ts +1 -1
  191. package/dist/components/query-select.js +3 -3
  192. package/dist/components/radio-group.d.ts +1 -1
  193. package/dist/components/radio-group.js +1 -1
  194. package/dist/components/select.d.ts +2 -2
  195. package/dist/components/select.js +1 -1
  196. package/dist/components/slider.d.ts +1 -1
  197. package/dist/components/slider.js +1 -1
  198. package/dist/components/spinner.d.ts +1 -1
  199. package/dist/components/spinner.js +1 -1
  200. package/dist/components/split-button.d.ts +1 -1
  201. package/dist/components/split-button.js +3 -3
  202. package/dist/components/stepper.d.ts +1 -1
  203. package/dist/components/stepper.js +1 -1
  204. package/dist/components/switch.d.ts +1 -1
  205. package/dist/components/switch.js +1 -1
  206. package/dist/components/tag.d.ts +1 -1
  207. package/dist/components/tag.js +1 -1
  208. package/dist/components/text-area.d.ts +1 -1
  209. package/dist/components/text-area.js +1 -1
  210. package/dist/components/text-button.d.ts +1 -1
  211. package/dist/components/text-button.js +1 -2
  212. package/dist/components/time-picker.d.ts +1 -1
  213. package/dist/components/time-picker.js +1 -1
  214. package/dist/components/toast.d.ts +2 -2
  215. package/dist/components/toast.js +2 -2
  216. package/dist/components/toggle-button.d.ts +1 -1
  217. package/dist/components/toggle-button.js +1 -1
  218. package/dist/components/toggle-group.d.ts +2 -2
  219. package/dist/components/toggle-group.js +1 -1
  220. package/dist/components/tooltip-ellipsis.js +1 -1
  221. package/dist/components/tooltip.d.ts +1 -1
  222. package/dist/components/tooltip.js +1 -1
  223. package/dist/components/typography.d.ts +2 -2
  224. package/dist/components/typography.js +1 -1
  225. package/dist/components/use-toast.d.ts +1 -1
  226. package/dist/components/use-toast.js +2 -2
  227. package/dist/config/app-canvas-tanstack.d.ts +23 -0
  228. package/dist/config/app-canvas-tanstack.js +62 -0
  229. package/dist/config/app-canvas.d.ts +12 -0
  230. package/dist/config/app-canvas.js +2 -0
  231. package/dist/config/confirmation.d.ts +1 -1
  232. package/dist/config/link-context.d.ts +2 -2
  233. package/dist/config/ui-config.d.ts +2 -2
  234. package/dist/config/ui-config.js +1 -1
  235. package/dist/config/ui-configurator-theme.d.ts +2 -0
  236. package/dist/config/ui-configurator-theme.js +2 -0
  237. package/dist/config/ui-configurator-vite.d.ts +10 -0
  238. package/dist/config/ui-configurator-vite.js +174 -0
  239. package/dist/config/ui-configurator.d.ts +15 -0
  240. package/dist/config/ui-configurator.js +3 -0
  241. package/dist/config/ui-overrides.d.ts +1 -1
  242. package/dist/config/ui-overrides.js +1 -1
  243. package/dist/configuration.context-DP4p1cIe.d.ts +926 -0
  244. package/dist/{confirmation.context-fKfUTsLF.d.ts → confirmation.context-BOeEVczb.d.ts} +1 -1
  245. package/dist/{date-picker-MXt02b7Z.d.ts → date-picker-BhIA01qs.d.ts} +1 -1
  246. package/dist/{date-range-picker-BjT0t21q.d.ts → date-range-picker-BsuZ2h_3.d.ts} +1 -1
  247. package/dist/{date-time-picker-CMmIuZtT.d.ts → date-time-picker-Bi-qW6vO.d.ts} +1 -1
  248. package/dist/datePickerInput.cva-Cd7UUN61.js +14 -0
  249. package/dist/{datePickerValue.utils-1z4mwZZs.js → datePickerValue.utils-QWR2q5Vv.js} +9 -11
  250. package/dist/{dialog.cva-5qNq9YfM.js → dialog.cva-COhDZaVl.js} +4 -4
  251. package/dist/{dist-C6GfeeEC.js → dist-CAdwxJbe.js} +1 -256
  252. package/dist/{dom.utils-D3mELNBA.js → dom.utils-D1AopHx9.js} +1 -1
  253. package/dist/dropdownMenu.cva-DvEmX0bs.js +34 -0
  254. package/dist/{dynamicInputs-CQMTixlW.d.ts → dynamicInputs-DdcsSoYu.d.ts} +112 -111
  255. package/dist/{fieldAdapter-BYVPxvYi.js → fieldAdapter-DjYls12j.js} +1 -1
  256. package/dist/{file-input-D-46wS5j.d.ts → file-input-BTYsGgr7.d.ts} +1 -1
  257. package/dist/{file-upload-BG20Bhrn.d.ts → file-upload-CqGdt1Ue.d.ts} +2 -2
  258. package/dist/fileUpload.cva-ujmStxB1.js +42 -0
  259. package/dist/{fileUpload.types-xFzuCT_m.d.ts → fileUpload.types-rIGu4MgY.d.ts} +2 -2
  260. package/dist/iconSlot.cva-CnpFzAOR.d.ts +21 -0
  261. package/dist/icons.d.ts +2 -1
  262. package/dist/icons.js +2 -1
  263. package/dist/index.d.ts +87 -86
  264. package/dist/index.js +55 -44
  265. package/dist/info-iUmX3uDk.js +32 -0
  266. package/dist/{input-CKGPYwfB.d.ts → input-CqNMORk8.d.ts} +1 -1
  267. package/dist/{input.cva-ByFuAEIS.d.ts → input.cva-CQPV5gW7.d.ts} +6 -9
  268. package/dist/input.cva-CbMTwuQU.js +227 -0
  269. package/dist/{link.context-C5ZgwVM5.d.ts → link.context-D5qyz9Rf.d.ts} +1 -1
  270. package/dist/link.cva-DMTHZiJG.js +12 -0
  271. package/dist/{number-field-CyP6XgJh.d.ts → number-field-BcMnahI8.d.ts} +1 -1
  272. package/dist/{number-range-input-DMmlk7Bl.d.ts → number-range-input-CLfuacKv.d.ts} +1 -1
  273. package/dist/{password-input-BWpfQe0G.d.ts → password-input-BV1Amdc8.d.ts} +1 -1
  274. package/dist/popover.cva-Bhud1wnp.js +5 -0
  275. package/dist/popoverAnimation-DEZSvKP8.js +4 -0
  276. package/dist/{query-autocomplete-DV8fEkK2.d.ts → query-autocomplete-CJSJeSXW.d.ts} +2 -2
  277. package/dist/{query-select-BZ3-5WTu.d.ts → query-select-B-VLz1PW.d.ts} +2 -2
  278. package/dist/{queryAutocomplete.types-Dm8Ttx4v.d.ts → queryAutocomplete.types-D2w1_hau.d.ts} +2 -2
  279. package/dist/{radio-group-CmUtsjqP.d.ts → radio-group-DZZdQMub.d.ts} +1 -1
  280. package/dist/{radio.cva-DAq2M13H.d.ts → radio.cva-DN9VQ3Kb.d.ts} +4 -3
  281. package/dist/rhf/autocomplete.d.ts +2 -2
  282. package/dist/rhf/autocomplete.js +1 -1
  283. package/dist/rhf/checkbox-group.d.ts +2 -2
  284. package/dist/rhf/checkbox-group.js +1 -1
  285. package/dist/rhf/checkbox.d.ts +2 -2
  286. package/dist/rhf/checkbox.js +2 -2
  287. package/dist/rhf/date-picker.d.ts +2 -2
  288. package/dist/rhf/date-picker.js +2 -2
  289. package/dist/rhf/date-range-picker.d.ts +2 -2
  290. package/dist/rhf/date-range-picker.js +2 -2
  291. package/dist/rhf/date-time-picker.d.ts +2 -2
  292. package/dist/rhf/date-time-picker.js +2 -2
  293. package/dist/rhf/file-input.d.ts +2 -2
  294. package/dist/rhf/file-input.js +2 -2
  295. package/dist/rhf/file-upload.d.ts +2 -2
  296. package/dist/rhf/file-upload.js +2 -2
  297. package/dist/rhf/input.d.ts +2 -2
  298. package/dist/rhf/input.js +1 -1
  299. package/dist/rhf/inputs.d.ts +2 -2
  300. package/dist/rhf/number-field.d.ts +2 -2
  301. package/dist/rhf/number-field.js +1 -1
  302. package/dist/rhf/number-range-input.d.ts +2 -2
  303. package/dist/rhf/number-range-input.js +2 -2
  304. package/dist/rhf/password-input.d.ts +2 -2
  305. package/dist/rhf/password-input.js +1 -1
  306. package/dist/rhf/query-autocomplete.d.ts +1 -1
  307. package/dist/rhf/query-autocomplete.js +1 -1
  308. package/dist/rhf/query-select.d.ts +1 -1
  309. package/dist/rhf/query-select.js +1 -1
  310. package/dist/rhf/radio-group.d.ts +2 -2
  311. package/dist/rhf/radio-group.js +2 -2
  312. package/dist/rhf/rich-text-editor.d.ts +2 -2
  313. package/dist/rhf/rich-text-editor.js +2 -2
  314. package/dist/rhf/select.d.ts +2 -2
  315. package/dist/rhf/select.js +2 -2
  316. package/dist/rhf/slider.d.ts +2 -2
  317. package/dist/rhf/slider.js +2 -2
  318. package/dist/rhf/switch.d.ts +2 -2
  319. package/dist/rhf/switch.js +2 -2
  320. package/dist/rhf/text-area.d.ts +2 -2
  321. package/dist/rhf/text-area.js +2 -2
  322. package/dist/rhf/time-picker.d.ts +2 -2
  323. package/dist/rhf/time-picker.js +2 -2
  324. package/dist/rhf/toggle-group.d.ts +2 -2
  325. package/dist/rhf/toggle-group.js +2 -2
  326. package/dist/{rhf-1_ZO8GhU.js → rhf-t348TCCL.js} +1 -1
  327. package/dist/rhf.d.ts +87 -86
  328. package/dist/rhf.js +55 -44
  329. package/dist/{rich-text-editor-Db3XWWFo.d.ts → rich-text-editor-Cp5dYHQI.d.ts} +1 -1
  330. package/dist/rich-text-editor.d.ts +1 -1
  331. package/dist/rich-text-editor.js +1 -1
  332. package/dist/{select-DXGbGkZM.d.ts → select-FjDx5oe4.d.ts} +2 -2
  333. package/dist/selectDesktop.cva-CHAMxhfO.js +69 -0
  334. package/dist/{slider-JQh0ypfU.d.ts → slider-BVJiBswZ.d.ts} +1 -1
  335. package/dist/{staticDateTimeSegments-vP2f1woD.js → staticDateTimeSegments-BWea3HAt.js} +34 -33
  336. package/dist/{staticSelect.utils-DOt6f-ck.js → staticSelect.utils-BfTCi26B.js} +41 -92
  337. package/dist/stepper.cva-CZ0Kj-s7.js +116 -0
  338. package/dist/style-merge.util-zLimKwt6.d.ts +40 -0
  339. package/dist/styles/app-canvas.css +740 -0
  340. package/dist/styles/color-utilities.css +20 -0
  341. package/dist/styles/configurator.css +3280 -0
  342. package/dist/styles/editor.css +9 -9
  343. package/dist/styles/input.d.ts +1 -1
  344. package/dist/{switch-Lm3xl1rQ.d.ts → switch-C--iWnY8.d.ts} +1 -1
  345. package/dist/switch.cva-CWNzmdRc.d.ts +16 -0
  346. package/dist/table.cva-D5oQ-QvA.js +101 -0
  347. package/dist/tanstack/autocomplete.d.ts +1 -1
  348. package/dist/tanstack/checkbox-group.d.ts +1 -1
  349. package/dist/tanstack/checkbox.d.ts +1 -1
  350. package/dist/tanstack/checkbox.js +1 -1
  351. package/dist/tanstack/date-picker.d.ts +1 -1
  352. package/dist/tanstack/date-picker.js +1 -1
  353. package/dist/tanstack/date-range-picker.d.ts +1 -1
  354. package/dist/tanstack/date-range-picker.js +1 -1
  355. package/dist/tanstack/date-time-picker.d.ts +1 -1
  356. package/dist/tanstack/date-time-picker.js +1 -1
  357. package/dist/tanstack/file-input.d.ts +1 -1
  358. package/dist/tanstack/file-input.js +1 -1
  359. package/dist/tanstack/file-upload.d.ts +2 -2
  360. package/dist/tanstack/file-upload.js +1 -1
  361. package/dist/tanstack/form.d.ts +1 -1
  362. package/dist/tanstack/form.js +1 -1
  363. package/dist/tanstack/input.d.ts +1 -1
  364. package/dist/tanstack/inputs.d.ts +3 -3
  365. package/dist/tanstack/inputs.js +1 -1
  366. package/dist/tanstack/number-field.d.ts +1 -1
  367. package/dist/tanstack/number-range-input.d.ts +1 -1
  368. package/dist/tanstack/number-range-input.js +1 -1
  369. package/dist/tanstack/password-input.d.ts +1 -1
  370. package/dist/tanstack/query-select.d.ts +1 -1
  371. package/dist/tanstack/radio-group.d.ts +1 -1
  372. package/dist/tanstack/radio-group.js +1 -1
  373. package/dist/tanstack/rich-text-editor.d.ts +1 -1
  374. package/dist/tanstack/rich-text-editor.js +1 -1
  375. package/dist/tanstack/select.d.ts +1 -1
  376. package/dist/tanstack/select.js +1 -1
  377. package/dist/tanstack/slider.d.ts +1 -1
  378. package/dist/tanstack/slider.js +1 -1
  379. package/dist/tanstack/switch.d.ts +1 -1
  380. package/dist/tanstack/switch.js +1 -1
  381. package/dist/tanstack/table.d.ts +1 -1
  382. package/dist/tanstack/table.js +2 -1
  383. package/dist/tanstack/text-area.d.ts +1 -1
  384. package/dist/tanstack/text-area.js +1 -1
  385. package/dist/tanstack/time-picker.d.ts +1 -1
  386. package/dist/tanstack/time-picker.js +1 -1
  387. package/dist/tanstack/toggle-group.d.ts +2 -2
  388. package/dist/tanstack/toggle-group.js +1 -1
  389. package/dist/tanstack.d.ts +71 -70
  390. package/dist/tanstack.js +66 -53
  391. package/dist/{text-area-I5MNcGp_.d.ts → text-area-DhSVRB6X.d.ts} +1 -1
  392. package/dist/theme-model-DtYPxNvH.js +406 -0
  393. package/dist/theme-model-T1zIdBg8.d.ts +12 -0
  394. package/dist/{time-picker-DdhW8GmD.d.ts → time-picker-DhnDKh97.d.ts} +1 -1
  395. package/dist/{toast.cva-LU7TGprV.d.ts → toast.cva-By5lvAfr.d.ts} +10 -9
  396. package/dist/toast.cva-C_L_RffH.js +163 -0
  397. package/dist/{toast.runtime-QMYrNvoQ.js → toast.runtime-cxex9e4E.js} +2 -1
  398. package/dist/{toggle-group-CPkKHm1t.d.ts → toggle-group-C1nMDOwz.d.ts} +1 -1
  399. package/dist/toggleGroup.cva-MbpaEBg1.js +35 -0
  400. package/dist/{toggleGroup.types-DD6uRI5G.d.ts → toggleGroup.types-Bp43zbSQ.d.ts} +2 -1
  401. package/dist/tooltip.cva-BIzlOXHH.js +48 -0
  402. package/dist/{tooltipWrapper.cva-CUu8pI-a.js → tooltipWrapper.cva-BBQ4ic3D.js} +1 -1
  403. package/dist/typography.cva-D1JOEYl-.d.ts +36 -0
  404. package/dist/typography.cva-iD15k56p.js +51 -0
  405. package/dist/{uiConfig.context-RFvaQYzD.js → uiConfig.context-BS3r_kTS.js} +12 -21
  406. package/dist/{uiConfig.context-CIoMqe1_.d.ts → uiConfig.context-BqKWd_MO.d.ts} +11 -12
  407. package/dist/{uiOverrides.context-Bfm2n-n8.js → uiOverrides.context-BTCH9y5a.js} +2 -2
  408. package/dist/{uiOverrides.context-C3xb4Ttq.d.ts → uiOverrides.context-DEp139He.d.ts} +11 -44
  409. package/dist/underline-66hmELxa.js +81 -0
  410. package/dist/upload-CXU83BJ4.js +30 -0
  411. package/dist/{useBreakpoint-3kpqzjoC.js → useBreakpoint-DQoMN-BG.js} +1 -1
  412. package/dist/{useFieldAccessibility-BTs_WC_5.js → useFieldAccessibility-B-bjtrNw.js} +18 -12
  413. package/dist/{useFormAutosave-BRlM0nmq.js → useFormAutosave-pmh35PXp.js} +2 -2
  414. package/dist/{useStaticInputHandoff-_stbpoX4.js → useStaticInputHandoff-B7DEm75m.js} +18 -16
  415. package/dist/useTableColumnConfig-6zn3zKl3.js +892 -0
  416. package/dist/{useTableNav-Tu8UZxHA.d.ts → useTableNav-Ckj5PBRk.d.ts} +9 -8
  417. package/dist/{useToast-NBGlVeFP.d.ts → useToast-yreVCUer.d.ts} +1 -1
  418. package/package.json +54 -6
  419. package/rulesync.jsonc +11 -0
  420. package/scripts/generate-rules.mjs +34 -0
  421. package/src/configurator/README.md +77 -0
  422. package/dist/Button-CcZBqoQp.js +0 -761
  423. package/dist/FormFieldHeaderTooltip-h6e5hq9V.js +0 -45
  424. package/dist/Link-C5YsZ4pr.js +0 -42
  425. package/dist/PillButton-CihEPQye.d.ts +0 -15
  426. package/dist/Tag-CgPeLVXM.d.ts +0 -44
  427. package/dist/Tag-DNuHvt6J.js +0 -148
  428. package/dist/components/pill-button.d.ts +0 -2
  429. package/dist/input.cva-KYGD4Bdz.js +0 -324
  430. package/dist/pillButton.cva-6tjADUQ6.js +0 -265
  431. package/dist/pillButton.cva-BVsxGnqF.d.ts +0 -36
  432. package/dist/popover.cva-CXha_UMQ.js +0 -5
  433. package/dist/switch.cva-BIioyegR.d.ts +0 -15
  434. package/dist/typography.cva-BI0FyIqm.js +0 -129
  435. package/dist/typography.cva-YaO6JLqU.d.ts +0 -51
  436. package/dist/useTableColumnConfig-CiAr7Dbi.js +0 -1627
@@ -0,0 +1,636 @@
1
+ import { t as logger } from "./logger-CqZjM-sn.js";
2
+ import { t as UIConfig } from "./uiConfig.context-BS3r_kTS.js";
3
+ import { t as ChevronDown } from "./chevron-down-B4Pr8bD3.js";
4
+ import { t as ChevronUp } from "./chevron-up-D_Gqpb5M.js";
5
+ import { a as tableHeaderTextDefinition, c as GripVertical, i as tableHeadRowDefinition, n as tableDataDefinition, o as tableRowDefinition, r as tableHeadDataDefinition, s as theadDefinition, t as tableCellTextDefinition } from "./table.cva-D5oQ-QvA.js";
6
+ import { t as clsx } from "./clsx-CnD0nOiA.js";
7
+ import { t as UIOverrides } from "./uiOverrides.context-BTCH9y5a.js";
8
+ import { t as IconSlot } from "./IconSlot-DSK7qNxc.js";
9
+ import { t as Typography } from "./Typography-LU4z2pR1.js";
10
+ import { InlineIconButton } from "./components/inline-icon-button.js";
11
+ import { t as useIntersectionObserver } from "./useIntersectionObserver-DYfHnGGU.js";
12
+ import { Suspense, lazy, useCallback, useMemo, useRef, useState } from "react";
13
+ import { jsx, jsxs } from "react/jsx-runtime";
14
+ import { createPaginatedRowModel, createSortedRowModel, flexRender, stockFeatures, tableFeatures, useTable } from "@tanstack/react-table";
15
+ import i18next from "i18next";
16
+ //#region src/components/table/CellText.tsx
17
+ const CellText = (props) => {
18
+ const uiConfig = UIConfig.useConfig();
19
+ const { size = uiConfig.tableCellText.size, children, style, className } = props;
20
+ const cellTextCva = UIOverrides.useCva("table.cellTextCva", tableCellTextDefinition);
21
+ return /* @__PURE__ */ jsx(Typography, {
22
+ className: cellTextCva({ className }),
23
+ as: "span",
24
+ size,
25
+ style,
26
+ "data-rac": true,
27
+ children
28
+ });
29
+ };
30
+ //#endregion
31
+ //#region src/components/table/HeaderText.tsx
32
+ const HeaderText = (props) => {
33
+ const uiConfig = UIConfig.useConfig();
34
+ const { size = uiConfig.tableHeaderText.size, children, style, className } = props;
35
+ const headerTextCva = UIOverrides.useCva("table.headerTextCva", tableHeaderTextDefinition);
36
+ return /* @__PURE__ */ jsx(Typography, {
37
+ className: headerTextCva({ className }),
38
+ as: "span",
39
+ size,
40
+ style,
41
+ children
42
+ });
43
+ };
44
+ //#endregion
45
+ //#region src/hooks/useTableNav.ts
46
+ const Selectors = {
47
+ Cell: "[role=\"cell\"],[role=\"gridcell\"],[role=\"columnheader\"],[role=\"rowheader\"],td,th",
48
+ Row: "[role=\"row\"],tr",
49
+ RowGroup: "[role=\"rowgroup\"],thead,tbody,tfoot",
50
+ /** Selector from here: https://github.com/Shopify/polaris/blob/main/polaris-react/src/utilities/focus.ts#L10 */
51
+ Focusable: "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not([aria-disabled=\"true\"]):not([tabindex=\"-1\"]):not(:disabled),*[tabindex]"
52
+ };
53
+ var DataGridNav = class {
54
+ constructor(config = {}) {
55
+ this.keys = [];
56
+ this.activeCell = null;
57
+ this.debugLog = (functionName, message) => {
58
+ if (this.debug) logger.info(`[${functionName}]: ${message}`);
59
+ };
60
+ const { selectors = {}, pageUpDown, debug = false } = config;
61
+ this.selectors = {
62
+ ...Selectors,
63
+ ...selectors
64
+ };
65
+ this.pageUpDown = pageUpDown;
66
+ this.keys = [];
67
+ this.debug = debug;
68
+ this.disabled = false;
69
+ }
70
+ /**
71
+ * Disables the keyboard listener in cases
72
+ * that elements inside the grid need to use
73
+ * arrows keys etc., like select dropdowns
74
+ */
75
+ disable() {
76
+ this.disabled = true;
77
+ }
78
+ /**
79
+ * Enables the keyboard listeners
80
+ */
81
+ enable() {
82
+ this.disabled = false;
83
+ }
84
+ isFocusable(el) {
85
+ return el instanceof HTMLElement || el instanceof SVGElement;
86
+ }
87
+ getActiveCell() {
88
+ return this.activeCell;
89
+ }
90
+ /** Used as a keyboard listener for key up */
91
+ tableKeyUp() {
92
+ this.keys = [];
93
+ }
94
+ /** Used as a keyboard listener for key down */
95
+ tableKeyDown(e) {
96
+ if (this.disabled) return;
97
+ /**
98
+ * Avoid page scrolling etc.
99
+ * Enable default behavior for:
100
+ * Tab, Shift + Tab
101
+ * TODO: Actually it will be better to just prevent
102
+ * in ArrowKeys and PageKeys maybe?
103
+ * Or should the consumer stop propagation?!
104
+ * Cannot work with preventDefault as it will
105
+ * first capture the event from an input in cell for example
106
+ */
107
+ if ("ArrowDown" === e.key || "ArrowUp" === e.key || "ArrowLeft" === e.key || "ArrowRight" === e.key) e.preventDefault();
108
+ /**
109
+ * Add key to the stack if it's
110
+ * not the same with the last (long press)
111
+ */
112
+ if (this.keys.length === 0 || this.keys[this.keys.length - 1] !== e.key) this.keys.push(e.key);
113
+ /**
114
+ * Need to check if we are inside a grid cell
115
+ * or not to enable/disable Grid Navigation
116
+ */
117
+ if (!(e.target instanceof Element)) return;
118
+ const cell = e.target.parentElement?.closest(`${this.selectors.Cell},${this.selectors.Row}`);
119
+ if (!cell) return;
120
+ if (cell.matches(this.selectors.Cell)) this.cellNavigation(e);
121
+ else this.gridNavigation(e);
122
+ }
123
+ /**
124
+ * Handles the navigation inside a cell
125
+ */
126
+ cellNavigation(e) {
127
+ if (!(e.target instanceof Element)) return;
128
+ /**
129
+ * Keys: Escape
130
+ * Restore grid navigation
131
+ */
132
+ if (e.key === "Escape") {
133
+ const cell = e.target.closest(this.selectors.Cell);
134
+ if (cell && this.isFocusable(cell)) {
135
+ cell.focus();
136
+ return;
137
+ }
138
+ }
139
+ /**
140
+ * Keys: ArrowRight, ArrowDown
141
+ * Move to the next focusable cell, or the first one
142
+ *
143
+ * Arrow Down disabled:
144
+ * https://github.com/w3c/aria-practices/issues/2739#issuecomment-1613538972
145
+ */
146
+ if (e.key === "ArrowRight" || e.key === "ArrowDown") {
147
+ const cell = e.target.closest(this.selectors.Cell);
148
+ if (!cell) return;
149
+ const focusableWidgets = [...cell.querySelectorAll(this.selectors.Focusable)];
150
+ const widgetIdx = focusableWidgets.findIndex((el) => el === e.target);
151
+ const widgetToFocus = focusableWidgets[widgetIdx === focusableWidgets.length - 1 ? 0 : widgetIdx + 1];
152
+ if (this.isFocusable(widgetToFocus)) widgetToFocus.focus();
153
+ return;
154
+ }
155
+ /**
156
+ * Keys: ArrowLeft, ArrowUp
157
+ * Move to the previous focusable cell, or the last one
158
+ *
159
+ * Arrow Up disabled:
160
+ * https://github.com/w3c/aria-practices/issues/2739#issuecomment-1613538972
161
+ */
162
+ if (e.key === "ArrowLeft" || e.key === "ArrowUp") {
163
+ const cell = e.target.closest(this.selectors.Cell);
164
+ if (!cell) return;
165
+ const focusableWidgets = [...cell.querySelectorAll(this.selectors.Focusable)];
166
+ const widgetIdx = focusableWidgets.findIndex((el) => el === e.target);
167
+ const widgetToFocus = focusableWidgets[widgetIdx === 0 ? focusableWidgets.length - 1 : widgetIdx - 1];
168
+ if (this.isFocusable(widgetToFocus)) widgetToFocus.focus();
169
+ }
170
+ }
171
+ /**
172
+ * Handles the navigation outside a cell
173
+ * on the grid level
174
+ */
175
+ gridNavigation(e) {
176
+ const { target } = e;
177
+ if (!(e.target instanceof Element)) return;
178
+ if (!(target instanceof Element)) return;
179
+ if (this.keys.length === 1) {
180
+ /**
181
+ * Keys: Enter
182
+ * Should move focus inside the cell to the first focusable element:
183
+ * https://www.w3.org/WAI/ARIA/apg/patterns/grid/#gridNav_inside
184
+ */
185
+ if (/^[a-zA-Z0-9]$/.test(e.key)) {
186
+ const cell = e.target.querySelector(this.selectors.Focusable);
187
+ if (cell && this.isFocusable(cell) && cell instanceof HTMLInputElement) {
188
+ cell.focus();
189
+ cell.value = `${cell.value}${e.key}`;
190
+ e.preventDefault();
191
+ }
192
+ return;
193
+ }
194
+ if (e.key === "Backspace") {
195
+ const cell = e.target.querySelector(this.selectors.Focusable);
196
+ if (cell && this.isFocusable(cell) && cell instanceof HTMLInputElement) {
197
+ const nativeInputValueSetter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set;
198
+ if (nativeInputValueSetter) {
199
+ nativeInputValueSetter.call(cell, "");
200
+ const ev = new Event("input", { bubbles: true });
201
+ cell.dispatchEvent(ev);
202
+ }
203
+ }
204
+ return;
205
+ }
206
+ if (e.key === "Enter") {
207
+ const cell = e.target.querySelector(this.selectors.Focusable);
208
+ if (cell && this.isFocusable(cell)) {
209
+ if (cell.getAttribute("data-type") === "select-trigger") {
210
+ cell.click();
211
+ return;
212
+ }
213
+ cell.focus();
214
+ e.preventDefault();
215
+ }
216
+ return;
217
+ }
218
+ /**
219
+ * Keys: ArrowLeft, ArrowRight
220
+ * Should move focus to the next/previous cell
221
+ */
222
+ if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
223
+ const direction = e.key === "ArrowLeft" ? "prev" : "next";
224
+ const cell = e.target.closest(this.selectors.Cell);
225
+ let nextCell = null;
226
+ if (direction === "next" && cell?.nextElementSibling instanceof HTMLElement) nextCell = cell.nextElementSibling;
227
+ if (direction === "prev" && cell?.previousElementSibling instanceof HTMLElement) nextCell = cell.previousElementSibling;
228
+ if (nextCell && this.isFocusable(nextCell)) {
229
+ nextCell.focus();
230
+ e.preventDefault();
231
+ }
232
+ }
233
+ /**
234
+ * Keys: Up,Down
235
+ * Should move focus to the same column of the next/previous row
236
+ */
237
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
238
+ this.verticalCellNavigation(e);
239
+ return;
240
+ }
241
+ /**
242
+ * Keys: PageUp, PageDown
243
+ * Should move focus to the first/last row
244
+ * or a predefined number of rows if user provides a value
245
+ */
246
+ if (e.key === "PageUp" || e.key === "PageDown") {
247
+ this.pageCellNavigation(e);
248
+ return;
249
+ }
250
+ /**
251
+ * Keys: Home, End
252
+ * Should move focus to the first/last cell of the current row
253
+ */
254
+ if (e.key === "Home" || e.key === "End") {
255
+ const rowChildren = [...e.target.closest(this.selectors.Row)?.children || []];
256
+ if (e.key === "End") rowChildren.reverse();
257
+ this.focusOnFirstCell(rowChildren);
258
+ }
259
+ } else {
260
+ /**
261
+ * Keys: Control + Home, Control + End
262
+ * Should move focus to the first/last cell of the first/last row
263
+ */
264
+ const [firstKey, secondKey] = this.keys;
265
+ if (firstKey === "Control" && (secondKey === "Home" || secondKey === "End")) {
266
+ const siblings = e.target.closest(this.selectors.Row).parentElement?.children;
267
+ if (!siblings) return;
268
+ const rowChildren = [...(secondKey === "Home" ? siblings[0] : siblings[siblings.length - 1])?.children || []];
269
+ if (secondKey === "End") rowChildren.reverse();
270
+ this.focusOnFirstCell(rowChildren);
271
+ }
272
+ }
273
+ }
274
+ pageCellNavigation(e) {
275
+ if (!(e.target instanceof Element)) return;
276
+ const row = e.target.closest(this.selectors.Row);
277
+ const cell = e.target.closest(this.selectors.Cell);
278
+ if (row && cell) {
279
+ const position = this.getColumnIndex(cell);
280
+ if (position === void 0) return;
281
+ const direction = e.key === "PageUp" ? "prev" : "next";
282
+ const siblings = row.parentElement?.children;
283
+ if (!siblings) return;
284
+ let destinationRow;
285
+ if (this.pageUpDown) {
286
+ const methodClbk = direction === "prev" ? "previousSibling" : "nextSibling";
287
+ let sibling = row[methodClbk];
288
+ if (sibling === null) return;
289
+ let lastVisitedSibling = sibling;
290
+ for (let i = 0; i < this.pageUpDown - 1 && sibling; i++) {
291
+ sibling = sibling[methodClbk];
292
+ if (sibling) lastVisitedSibling = sibling;
293
+ }
294
+ destinationRow = sibling || lastVisitedSibling;
295
+ } else destinationRow = direction === "prev" ? siblings[0] : siblings[siblings.length - 1];
296
+ if (!destinationRow || !(destinationRow instanceof Element)) return;
297
+ const child = destinationRow.children[position];
298
+ if (child && this.isFocusable(child)) child.focus();
299
+ }
300
+ }
301
+ verticalCellNavigation(e) {
302
+ if (!(e.target instanceof Element)) return;
303
+ const row = e.target.closest(this.selectors.Row);
304
+ const cell = e.target.closest(this.selectors.Cell);
305
+ if (row && cell) {
306
+ const cellPosition = this.getColumnIndex(cell);
307
+ const rowPosition = this.getRowIndex(row);
308
+ if (cellPosition === void 0 || rowPosition === void 0) return;
309
+ const direction = e.key === "ArrowUp" ? "prev" : "next";
310
+ /** Find previous rowgroup and focus on the proper cell */
311
+ if (rowPosition === 0 && direction === "prev") {
312
+ const currentRowGroup = row.parentElement?.closest(this.selectors.RowGroup);
313
+ const siblingRowGroups = [...currentRowGroup?.parentElement?.children || []];
314
+ const currentRowGroupIdx = siblingRowGroups.findIndex((el) => el === currentRowGroup);
315
+ if (currentRowGroupIdx !== 0) {
316
+ const rows = [...siblingRowGroups[currentRowGroupIdx - 1].querySelectorAll(this.selectors.Row)];
317
+ const child = rows[rows.length - 1].children[cellPosition];
318
+ if (child && this.isFocusable(child)) child.focus();
319
+ return;
320
+ }
321
+ }
322
+ /** Find next rowgroup and focus on the proper cell */
323
+ if (rowPosition === [...row.parentElement?.querySelectorAll(this.selectors.Row) || []].length - 1 && direction === "next") {
324
+ const currentRowGroup = row.parentElement?.closest(this.selectors.RowGroup);
325
+ const siblingRowGroups = [...currentRowGroup?.parentElement?.children || []];
326
+ const currentRowGroupIdx = siblingRowGroups.findIndex((el) => el === currentRowGroup);
327
+ if (currentRowGroupIdx !== siblingRowGroups.length - 1) {
328
+ const child = [...siblingRowGroups[currentRowGroupIdx + 1].querySelectorAll(this.selectors.Row)][0].children[cellPosition];
329
+ if (child && this.isFocusable(child)) child.focus();
330
+ return;
331
+ }
332
+ return;
333
+ }
334
+ /** Navigation in the same rowgroup */
335
+ const destinationRow = this.findUntil(direction, row, this.selectors.Row);
336
+ if (!destinationRow) return;
337
+ const child = destinationRow.children[cellPosition];
338
+ if (child && this.isFocusable(child)) child.focus();
339
+ }
340
+ }
341
+ /**
342
+ * Sending a row `Element` and then the first cell will be focused.
343
+ *
344
+ * If you want to focus the last cell then the row children can be passed in
345
+ * reversed order
346
+ */
347
+ focusOnFirstCell(el) {
348
+ for (let i = 0; i < el.length; i++) {
349
+ const child = el[i];
350
+ if (this.isFocusable(child)) {
351
+ child.focus();
352
+ return;
353
+ }
354
+ }
355
+ }
356
+ /**
357
+ * Get the column index of a `cell` based on the first `row` parent.
358
+ * `cellIndex` could be used, but it's not supported in HTML tables.
359
+ */
360
+ getColumnIndex(cell) {
361
+ let position = 0;
362
+ const siblings = cell?.parentNode?.children;
363
+ if (!siblings) return;
364
+ while (cell !== siblings[position] && siblings[position] !== void 0) position++;
365
+ if (siblings[position] === void 0) return;
366
+ return position;
367
+ }
368
+ /**
369
+ * Get the row index of a `row` based
370
+ * on its sibling rows
371
+ */
372
+ getRowIndex(row) {
373
+ let position = 0;
374
+ const siblings = row?.parentNode?.children;
375
+ if (!siblings) return;
376
+ while (row !== siblings[position] && siblings[position] !== void 0) position++;
377
+ if (siblings[position] === void 0) return;
378
+ return position;
379
+ }
380
+ /**
381
+ * Equivalent to prevUntil/nextUntil in jQuery
382
+ * https://api.jquery.com/prevUntil/
383
+ */
384
+ findUntil(direction, el, matchSelector, exitSelector) {
385
+ let element = el;
386
+ const method = direction === "next" ? "nextSibling" : "previousSibling";
387
+ while (element[method]) {
388
+ const sibling = element[method];
389
+ if (!sibling) return null;
390
+ if (exitSelector && sibling instanceof Element && sibling.matches(exitSelector)) return null;
391
+ if (sibling instanceof Element && sibling.matches(matchSelector)) return sibling;
392
+ element = sibling;
393
+ }
394
+ return null;
395
+ }
396
+ };
397
+ function useTableNav(options) {
398
+ const nav = new DataGridNav(options);
399
+ return {
400
+ listeners: {
401
+ onKeyDown: (e) => nav.tableKeyDown(e),
402
+ onKeyUp: () => nav.tableKeyUp()
403
+ },
404
+ tableNav: nav
405
+ };
406
+ }
407
+ //#endregion
408
+ //#region src/components/table/Table.tsx
409
+ const DndProvider = lazy(() => import("./TableDnd-CuHxANWh.js").then((module) => ({ default: module.DndProvider })));
410
+ const SortableRows = lazy(() => import("./TableDnd-CuHxANWh.js").then((module) => ({ default: module.SortableRows })));
411
+ const DraggableRow = lazy(() => import("./TableDnd-CuHxANWh.js").then((module) => ({ default: module.DraggableRow })));
412
+ const DragHandle = lazy(() => import("./TableDnd-CuHxANWh.js").then((module) => ({ default: module.DragHandle })));
413
+ const tableFeaturesConfig = tableFeatures({
414
+ ...stockFeatures,
415
+ sortedRowModel: createSortedRowModel(),
416
+ paginatedRowModel: createPaginatedRowModel()
417
+ });
418
+ const CustomCellContext = (context) => {
419
+ return {
420
+ ...context,
421
+ original: context.row.original,
422
+ data: context.row.original,
423
+ value: context.getValue()
424
+ };
425
+ };
426
+ const renderCell = (Comp, props) => {
427
+ const rendered = flexRender(Comp, props);
428
+ return typeof rendered === "string" ? /* @__PURE__ */ jsx(CellText, { children: rendered }) : rendered;
429
+ };
430
+ const RowDragHandleCell = ({ rowId }) => {
431
+ return /* @__PURE__ */ jsx(DragHandle, {
432
+ id: rowId,
433
+ children: (dragProps) => /* @__PURE__ */ jsx(InlineIconButton, {
434
+ ...dragProps,
435
+ className: "cursor-move p-1",
436
+ label: "Drag handle",
437
+ icon: GripVertical
438
+ })
439
+ });
440
+ };
441
+ const AutoDragHandleCell = ({ row }) => /* @__PURE__ */ jsx(RowDragHandleCell, { rowId: row.id });
442
+ const Table = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, className, sorting, setSorting, columnOrder, setColumnOrder, columnVisibility, setColumnVisibility, bulkSelectionActions: ActionHeader, enableDragDrop = false, onDragEnd, onReorder, getRowId, enableRowSelection, enableMultiRowSelection = false, defaultSelectedRows, onRowSelectionChange, ...props }) => {
443
+ const tableRowCva = UIOverrides.useCva("table.rowCva", tableRowDefinition);
444
+ const theadCva = UIOverrides.useCva("table.theadCva", theadDefinition);
445
+ const tableHeadRowCva = UIOverrides.useCva("table.headRowCva", tableHeadRowDefinition);
446
+ const tableHeadDataCva = UIOverrides.useCva("table.headDataCva", tableHeadDataDefinition);
447
+ const tableDataCva = UIOverrides.useCva("table.dataCva", tableDataDefinition);
448
+ const ref = useRef(null);
449
+ const { listeners } = useTableNav();
450
+ const data = useMemo(() => items ?? [], [items]);
451
+ const [internalSelectedRows, setInternalSelectedRows] = useState({});
452
+ const { rowSelection, handleRowSelectionChange } = useMemo(() => {
453
+ const hasExternalRowSelection = defaultSelectedRows !== void 0 && onRowSelectionChange !== void 0;
454
+ return {
455
+ rowSelection: hasExternalRowSelection ? defaultSelectedRows : internalSelectedRows,
456
+ handleRowSelectionChange: hasExternalRowSelection ? onRowSelectionChange : setInternalSelectedRows
457
+ };
458
+ }, [
459
+ defaultSelectedRows,
460
+ onRowSelectionChange,
461
+ internalSelectedRows
462
+ ]);
463
+ const baseColumns = useMemo(() => typeof columns === "function" ? columns(i18next.t) : columns, [columns]);
464
+ const tableColumns = useMemo(() => {
465
+ if (enableDragDrop && getRowId) return [{
466
+ id: "drag-handle",
467
+ header: "",
468
+ meta: { width: "w-12" },
469
+ cell: AutoDragHandleCell,
470
+ enableSorting: false
471
+ }, ...baseColumns];
472
+ return baseColumns;
473
+ }, [
474
+ baseColumns,
475
+ enableDragDrop,
476
+ getRowId
477
+ ]);
478
+ const [isSticky, setIsSticky] = useState(false);
479
+ const onIntersectionChange = useCallback((entry) => {
480
+ setIsSticky(entry.intersectionRatio < 1);
481
+ }, []);
482
+ const { ref: stickyRef } = useIntersectionObserver({ onIntersectionChange });
483
+ const table = useTable({
484
+ features: tableFeaturesConfig,
485
+ data,
486
+ columns: tableColumns,
487
+ state: {
488
+ sorting,
489
+ columnOrder,
490
+ columnVisibility,
491
+ rowSelection
492
+ },
493
+ rowCount: items.length,
494
+ manualPagination: true,
495
+ onColumnOrderChange: setColumnOrder,
496
+ onColumnVisibilityChange: setColumnVisibility,
497
+ onSortingChange: setSorting,
498
+ onRowSelectionChange: handleRowSelectionChange,
499
+ manualSorting: true,
500
+ autoResetPageIndex: false,
501
+ autoResetExpanded: false,
502
+ defaultColumn: { sortDescFirst: true },
503
+ enableRowSelection,
504
+ enableMultiRowSelection,
505
+ getRowId: getRowId ? (row) => String(getRowId(row)) : void 0
506
+ });
507
+ const dataIds = useMemo(() => {
508
+ if (!enableDragDrop || !getRowId) return [];
509
+ return data.map((item) => getRowId(item));
510
+ }, [
511
+ data,
512
+ enableDragDrop,
513
+ getRowId
514
+ ]);
515
+ const handleDragEnd = useCallback((event) => {
516
+ const { active, over } = event;
517
+ if (!active || !over || active.id === over.id) return;
518
+ if (getRowId && (onReorder || onDragEnd)) {
519
+ if (onReorder) {
520
+ const oldIndex = items.findIndex((item_0) => getRowId(item_0) === active.id);
521
+ const newIndex = items.findIndex((item_1) => getRowId(item_1) === over.id);
522
+ if (oldIndex !== -1 && newIndex !== -1) {
523
+ const reorderedItems = [...items];
524
+ const [movedItem] = reorderedItems.splice(oldIndex, 1);
525
+ reorderedItems.splice(newIndex, 0, movedItem);
526
+ onReorder(reorderedItems);
527
+ }
528
+ }
529
+ onDragEnd?.(event);
530
+ }
531
+ }, [
532
+ onDragEnd,
533
+ onReorder,
534
+ items,
535
+ getRowId
536
+ ]);
537
+ const selectedRows = table.getSelectedRowModel().rows;
538
+ const columnCount = table.getHeaderGroups()[0].headers.length;
539
+ const isAnyRowSelected = selectedRows.length > 0 && !!ActionHeader;
540
+ const hasOnClick = !!onRowClick || !!onDoubleClick;
541
+ const tableElement = /* @__PURE__ */ jsxs("table", {
542
+ className: clsx("w-full", className),
543
+ ...listeners,
544
+ children: [/* @__PURE__ */ jsxs("thead", {
545
+ className: clsx(theadCva({})),
546
+ "data-is-sticky": isSticky || void 0,
547
+ children: [/* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("th", {
548
+ ref: stickyRef,
549
+ className: "-mt-px block"
550
+ }) }), table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx("tr", {
551
+ className: clsx(tableHeadRowCva({})),
552
+ children: headerGroup.headers.filter((header) => {
553
+ if (isAnyRowSelected && header.index > 0) return false;
554
+ return header.column.getIsVisible();
555
+ }).map((header_0, index) => {
556
+ const columnMeta = header_0.column.columnDef.meta ?? {};
557
+ return /* @__PURE__ */ jsx("th", {
558
+ colSpan: isAnyRowSelected ? columnCount : header_0.colSpan,
559
+ tabIndex: -1,
560
+ className: clsx(tableHeadDataCva({ hasRightBorder: index > 0 && showCellBorder }), columnMeta.headerClass, columnMeta.width),
561
+ children: isAnyRowSelected ? /* @__PURE__ */ jsx(ActionHeader, { table }) : /* @__PURE__ */ jsxs("button", {
562
+ type: "button",
563
+ "aria-label": "Sort column",
564
+ className: clsx("flex select-none items-center gap-1 text-surface-default-card-foreground", header_0.column.getCanSort() ? "h-6 cursor-pointer rounded-xs px-1 hover:bg-surface-default-background" : "cursor-default", columnMeta.sortClass),
565
+ onClick: header_0.column.getToggleSortingHandler(),
566
+ children: [typeof header_0.column.columnDef.header === "function" ? flexRender(header_0.column.columnDef.header, header_0.getContext()) : /* @__PURE__ */ jsx(HeaderText, { children: header_0.column.columnDef.header }), {
567
+ asc: /* @__PURE__ */ jsx(IconSlot, { icon: ChevronUp }),
568
+ desc: /* @__PURE__ */ jsx(IconSlot, { icon: ChevronDown })
569
+ }[header_0.column.getIsSorted()] ?? null]
570
+ })
571
+ }, header_0.id);
572
+ })
573
+ }, headerGroup.id))]
574
+ }), /* @__PURE__ */ jsx("tbody", {
575
+ ref,
576
+ className: "relative",
577
+ children: enableDragDrop ? /* @__PURE__ */ jsx(SortableRows, {
578
+ items: dataIds,
579
+ children: table.getRowModel().rows.map((row_0) => /* @__PURE__ */ jsx(DraggableRow, {
580
+ id: row_0.id,
581
+ className: clsx(tableRowCva({ ...props })),
582
+ isClickable: hasOnClick || row_0.getCanSelect(),
583
+ isSelected: row_0.getIsSelected(),
584
+ onClick: () => {
585
+ if (onRowClick) {
586
+ onRowClick(row_0.original);
587
+ return;
588
+ }
589
+ if (row_0.getCanSelect()) row_0.toggleSelected();
590
+ },
591
+ onDoubleClick: () => onDoubleClick?.(row_0.original),
592
+ children: row_0.getVisibleCells().map((cell, cellIndex) => {
593
+ const columnMeta_0 = cell.column.columnDef.meta ?? {};
594
+ return /* @__PURE__ */ jsx("td", {
595
+ tabIndex: -1,
596
+ className: clsx(tableDataCva({ hasRightBorder: cellIndex > 0 && showCellBorder }), columnMeta_0.cellClass, columnMeta_0.width),
597
+ children: renderCell(cell.column.columnDef.cell, CustomCellContext(cell.getContext()))
598
+ }, cell.id);
599
+ })
600
+ }, row_0.id))
601
+ }) : table.getRowModel().rows.map((row_1) => {
602
+ return /* @__PURE__ */ jsx("tr", {
603
+ className: clsx(tableRowCva({ ...props })),
604
+ onClick: () => {
605
+ if (onRowClick) {
606
+ onRowClick(row_1.original);
607
+ return;
608
+ }
609
+ if (row_1.getCanSelect()) row_1.toggleSelected();
610
+ },
611
+ onDoubleClick: () => onDoubleClick?.(row_1.original),
612
+ "data-clickable": hasOnClick || row_1.getCanSelect() || void 0,
613
+ "data-selected": row_1.getIsSelected() || void 0,
614
+ children: row_1.getVisibleCells().map((cell_0, cellIndex_0) => {
615
+ const columnMeta_1 = cell_0.column.columnDef.meta ?? {};
616
+ return /* @__PURE__ */ jsx("td", {
617
+ tabIndex: -1,
618
+ className: clsx(tableDataCva({ hasRightBorder: cellIndex_0 > 0 && showCellBorder }), columnMeta_1.cellClass, columnMeta_1.width),
619
+ children: renderCell(cell_0.column.columnDef.cell, CustomCellContext(cell_0.getContext()))
620
+ }, cell_0.id);
621
+ })
622
+ }, row_1.id);
623
+ })
624
+ })]
625
+ });
626
+ if (enableDragDrop) return /* @__PURE__ */ jsx(Suspense, {
627
+ fallback: null,
628
+ children: /* @__PURE__ */ jsx(DndProvider, {
629
+ onDragEnd: handleDragEnd,
630
+ children: tableElement
631
+ })
632
+ });
633
+ return tableElement;
634
+ };
635
+ //#endregion
636
+ export { CellText as i, useTableNav as n, HeaderText as r, Table as t };
@@ -0,0 +1,44 @@
1
+ import { t as StyleMergeUtils } from "./style-merge.util-zLimKwt6.js";
2
+ import { t as UIOverrides } from "./uiOverrides.context-DEp139He.js";
3
+ import { n as TypographyProps } from "./Typography-XljT9s02.js";
4
+ import { Ref } from "react";
5
+ import { ButtonProps } from "react-aria-components";
6
+ //#region src/components/text/Tag/tag.cva.d.ts
7
+ declare const tagDefinition: {
8
+ base: string[];
9
+ config: StyleMergeUtils.Config<{
10
+ readonly color: {
11
+ primary: ["bg-interactive-subtle-primary-background text-interactive-subtle-primary-foreground", "not-disabled:not-pressed:hover:bg-state-interactive-subtle-primary-background/hover not-disabled:not-pressed:hover:text-state-interactive-subtle-primary-foreground/hover", "not-disabled:pressed:bg-state-interactive-subtle-primary-background/pressed not-disabled:pressed:text-state-interactive-subtle-primary-foreground/pressed", "disabled:bg-state-interactive-subtle-primary-background/disabled disabled:text-state-interactive-subtle-primary-foreground/disabled", "focus-visible:outline-interactive-ring"];
12
+ secondary: ["bg-interactive-subtle-secondary-background text-interactive-subtle-secondary-foreground", "not-disabled:not-pressed:hover:bg-state-interactive-subtle-secondary-background/hover not-disabled:not-pressed:hover:text-state-interactive-subtle-secondary-foreground/hover", "not-disabled:pressed:bg-state-interactive-subtle-secondary-background/pressed not-disabled:pressed:text-state-interactive-subtle-secondary-foreground/pressed", "disabled:bg-state-interactive-subtle-secondary-background/disabled disabled:text-state-interactive-subtle-secondary-foreground/disabled", "focus-visible:outline-interactive-ring"];
13
+ success: ["bg-surface-success-inverted-base text-surface-success-base", "not-disabled:not-pressed:hover:bg-state-surface-success-inverted-base/hover not-disabled:not-pressed:hover:text-state-surface-success-base/hover", "not-disabled:pressed:bg-state-surface-success-inverted-base/pressed not-disabled:pressed:text-state-surface-success-base/pressed", "disabled:bg-state-surface-success-inverted-base/disabled disabled:text-state-surface-success-base/disabled", "focus-visible:outline-interactive-ring"];
14
+ warning: ["bg-surface-warning-inverted-base text-surface-warning-base", "not-disabled:not-pressed:hover:bg-state-surface-warning-inverted-base/hover not-disabled:not-pressed:hover:text-state-surface-warning-base/hover", "not-disabled:pressed:bg-state-surface-warning-inverted-base/pressed not-disabled:pressed:text-state-surface-warning-base/pressed", "disabled:bg-state-surface-warning-inverted-base/disabled disabled:text-state-surface-warning-base/disabled", "focus-visible:outline-interactive-ring"];
15
+ error: ["bg-interactive-subtle-destructive-background text-interactive-subtle-destructive-foreground", "not-disabled:not-pressed:hover:bg-state-interactive-subtle-destructive-background/hover not-disabled:not-pressed:hover:text-state-interactive-subtle-destructive-foreground/hover", "not-disabled:pressed:bg-state-interactive-subtle-destructive-background/pressed not-disabled:pressed:text-state-interactive-subtle-destructive-foreground/pressed", "disabled:bg-state-interactive-subtle-destructive-background/disabled disabled:text-state-interactive-subtle-destructive-foreground/disabled", "focus-visible:outline-interactive-ring"];
16
+ };
17
+ }>;
18
+ };
19
+ type TagConfig = NonNullable<typeof tagDefinition.config>;
20
+ interface TagVariantProps extends UIOverrides.VariantProps<TagConfig> {}
21
+ //#endregion
22
+ //#region src/components/text/Tag/Tag.d.ts
23
+ interface TagProps extends TagVariantProps {
24
+ className?: string;
25
+ children: string;
26
+ /** Preferred spelling. `dismissable` remains supported. */
27
+ dismissible?: boolean;
28
+ dismissable?: boolean;
29
+ isDisabled?: boolean;
30
+ disabled?: boolean;
31
+ contentRef?: Ref<HTMLElement>;
32
+ textSize?: TypographyProps["size"];
33
+ /** Preferred callback name. */
34
+ onRemove?: () => void;
35
+ onDismiss?: () => void;
36
+ /** Props applied to the actual dismiss button, when one is rendered. */
37
+ dismissButtonProps?: Omit<ButtonProps, "children" | "onPress">;
38
+ excludeFromTabOrder?: boolean;
39
+ /** Compatibility callback for the historical button-like prop surface. */
40
+ onPress?: ButtonProps["onPress"];
41
+ }
42
+ declare const Tag: ({ className, children, dismissible, dismissable, isDisabled, disabled, onRemove, onDismiss, dismissButtonProps, excludeFromTabOrder, onPress, contentRef, textSize: textSizeProp, ...appearanceProps }: TagProps) => import("react").JSX.Element;
43
+ //#endregion
44
+ export { tagDefinition as i, TagProps as n, TagVariantProps as r, Tag as t };