@povio/ui 3.4.0-rc.24 → 3.4.0-rc.26

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 (197) hide show
  1. package/dist/{Autocomplete-Ce3ygKxG.d.ts → Autocomplete-0tckACUz.d.ts} +1 -1
  2. package/dist/{BottomSheet-BWKej2PR.d.ts → BottomSheet-BZXBtOHF.d.ts} +1 -2
  3. package/dist/{BottomSheet-DNnVqMw9.js → BottomSheet-CEyxZ2Nd.js} +6 -50
  4. package/dist/BottomSheet.lazy-DT02808T.d.ts +5 -0
  5. package/dist/{Breadcrumbs-DentRJc_.js → Breadcrumbs-Cbl2-M7J.js} +2 -2
  6. package/dist/{Button-B8T7AjGP.js → Button-CtPMeT8f.js} +1 -1
  7. package/dist/{Calendar-B7OLjVV9.js → Calendar-Dc1UbbAq.js} +5 -5
  8. package/dist/{Checkbox-B7f8NgnO.js → Checkbox-Feyideqw.js} +1 -1
  9. package/dist/{DatePicker-p5zEtFfc.js → DatePicker-BdRp_rG7.js} +7 -7
  10. package/dist/{DatePickerInput-BLL4-Sqj.js → DatePickerInput-D3kmFpMZ.js} +16 -9
  11. package/dist/{DateRangePicker-CjOo8S9R.d.ts → DateRangePicker-CMWUdyh1.d.ts} +25 -12
  12. package/dist/{DateRangePicker-BELkyFZ3.js → DateRangePicker-XhfuEunT.js} +123 -32
  13. package/dist/{DateTimePicker-YxEZH7Kk.js → DateTimePicker-_PD3JGVy.js} +7 -7
  14. package/dist/{Dialog-DpLXaUXz.js → Dialog-CXVxCqvL.js} +1 -1
  15. package/dist/Drawer-XaAwht0J.js +98 -0
  16. package/dist/{FileUpload-uqaBcMUE.js → FileUpload-CNM9dv4D.js} +3 -3
  17. package/dist/{Form-BO5xLioQ.d.ts → Form-BX_x2VGS.d.ts} +1 -1
  18. package/dist/{InputItem-C_njDXaE.js → InputItem-DWuSzs16.js} +10 -10
  19. package/dist/{InputUpload-BEda9AO8.js → InputUpload-BQpUaRQl.js} +3 -3
  20. package/dist/{Inputs-6bq2_53x.d.ts → Inputs-B5F_klPo.d.ts} +1 -1
  21. package/dist/{Inputs-CTywD5sa.js → Inputs-D4duTr-F.js} +1 -1
  22. package/dist/{ListBox-BCW74bzR.js → ListBox-lSDt9Q4j.js} +1 -1
  23. package/dist/{Menu-DTiZS3t_.js → Menu-DDKo6fUO.js} +4 -4
  24. package/dist/{Menu-CVgRPAB3.d.ts → Menu-ucX0h-jq.d.ts} +1 -1
  25. package/dist/{MenuDesktop-CEftscnb.js → MenuDesktop-AnvU8TNb.js} +1 -1
  26. package/dist/{MenuItem-xJq_qdIf.d.ts → MenuItem--lQvt0VV.d.ts} +1 -1
  27. package/dist/{Modal-DdKOgTpG.js → Modal-BrOOpTQ4.js} +2 -2
  28. package/dist/{Modal-HBOqpsZ3.js → Modal-CAAJgOQb.js} +1 -1
  29. package/dist/{NumberRangeInput-vrceL7KX.js → NumberRangeInput-CBM_ycX_.js} +3 -3
  30. package/dist/{PaginationList-DwPkbMEh.js → PaginationList-B27QL6gG.js} +1 -1
  31. package/dist/{QuerySelect-CuZjxrle.d.ts → QuerySelect-tupQOlAT.d.ts} +2 -2
  32. package/dist/{RadioGroup-DopLBNzi.js → RadioGroup-DbMmwkLQ.js} +1 -1
  33. package/dist/{ResponsivePopover-C8IriWcI.d.ts → ResponsivePopover-B-Z9sFxq.d.ts} +2 -1
  34. package/dist/{Select-T4am7u5p.js → Select-BXhqcKAI.js} +3 -3
  35. package/dist/{Select-BQ9YJzFg.d.ts → Select-Do5qWHLj.d.ts} +1 -1
  36. package/dist/{SelectBase-Ds3nqzVg.d.ts → SelectBase-aSvWd7Cx.d.ts} +1 -1
  37. package/dist/{Slider-RhB5Rcwv.js → Slider-YdD68ygp.js} +1 -1
  38. package/dist/{SplitButton-Cv9ej6Or.d.ts → SplitButton-DxrWH3EX.d.ts} +1 -1
  39. package/dist/TableDnd-CuHxANWh.js +133 -0
  40. package/dist/{Tag-BspEXTbs.js → Tag-BAFkwLDe.js} +1 -1
  41. package/dist/{TextArea-Dqg717Gx.js → TextArea-B8TIZZ5i.js} +2 -2
  42. package/dist/{TextEditor-DXFlGnkW.js → TextEditor-Co_gbkPT.js} +6 -6
  43. package/dist/{TimePicker-lAn8yzYJ.js → TimePicker-dftQtlWT.js} +5 -5
  44. package/dist/Toast-BDoTQFr5.js +49 -0
  45. package/dist/{Toast-DDkev3SZ.d.ts → Toast-JL9yaI35.d.ts} +1 -2
  46. package/dist/ToastContainer-9OS5SK5K.d.ts +5 -0
  47. package/dist/ToastContainer-TRM91co1.js +23 -0
  48. package/dist/ToastRenderer-Dpax9sKV.js +40 -0
  49. package/dist/{Toggle-BZCEmMGO.js → Toggle-Bw15KIly.js} +1 -1
  50. package/dist/{TooltipWrapper-D8gfa-pC.js → TooltipWrapper-eCF5-eNP.js} +1 -1
  51. package/dist/{autocomplete-NiLahf70.d.ts → autocomplete-bNuG6_dG.d.ts} +2 -2
  52. package/dist/components/action-modal.js +3 -3
  53. package/dist/components/autocomplete.d.ts +1 -1
  54. package/dist/components/autocomplete.js +3 -3
  55. package/dist/components/bottom-sheet.d.ts +3 -2
  56. package/dist/components/bottom-sheet.js +108 -1
  57. package/dist/components/breadcrumbs.js +1 -1
  58. package/dist/components/button.js +1 -1
  59. package/dist/components/checkbox-group.js +2 -2
  60. package/dist/components/checkbox.js +1 -1
  61. package/dist/components/date-picker.js +1 -1
  62. package/dist/components/date-range-picker.d.ts +2 -2
  63. package/dist/components/date-range-picker.js +1 -1
  64. package/dist/components/date-time-picker.js +1 -1
  65. package/dist/components/drawer.d.ts +5 -2
  66. package/dist/components/drawer.js +80 -87
  67. package/dist/components/file-upload-container.js +1 -1
  68. package/dist/components/file-upload.js +1 -1
  69. package/dist/components/icon-button.js +1 -1
  70. package/dist/components/inline-icon-button.js +1 -1
  71. package/dist/components/input-upload.js +1 -1
  72. package/dist/components/menu.d.ts +2 -2
  73. package/dist/components/menu.js +2 -2
  74. package/dist/components/modal.js +1 -1
  75. package/dist/components/number-input.js +4 -4
  76. package/dist/components/number-range-input.js +1 -1
  77. package/dist/components/pagination-list.js +1 -1
  78. package/dist/components/pagination.js +1 -1
  79. package/dist/components/pill.js +1 -1
  80. package/dist/components/query-autocomplete.d.ts +2 -2
  81. package/dist/components/query-autocomplete.js +1 -1
  82. package/dist/components/query-select.d.ts +1 -1
  83. package/dist/components/query-select.js +2 -2
  84. package/dist/components/radio-group.js +1 -1
  85. package/dist/components/responsive-popover.d.ts +1 -1
  86. package/dist/components/responsive-popover.js +3 -3
  87. package/dist/components/select.d.ts +2 -2
  88. package/dist/components/select.js +1 -1
  89. package/dist/components/slider.js +1 -1
  90. package/dist/components/split-button.d.ts +1 -1
  91. package/dist/components/split-button.js +2 -2
  92. package/dist/components/tag.js +1 -1
  93. package/dist/components/text-area.js +1 -1
  94. package/dist/components/text-button.js +1 -1
  95. package/dist/components/text-input.js +4 -4
  96. package/dist/components/time-picker.js +1 -1
  97. package/dist/components/toast.d.ts +3 -2
  98. package/dist/components/toast.js +3 -2
  99. package/dist/components/toggle-button.js +1 -1
  100. package/dist/components/toggle.js +1 -1
  101. package/dist/components/use-toast.d.ts +1 -1
  102. package/dist/components/use-toast.js +37 -64
  103. package/dist/config/confirmation.js +1 -1
  104. package/dist/config/ui-config.d.ts +3 -2
  105. package/dist/config/ui-config.js +1 -1
  106. package/dist/confirmation.context-2-6G831n.js +117 -0
  107. package/dist/confirmation.dialog-Cveu3s5D.js +16 -0
  108. package/dist/{date-range-picker-DaLQYShd.d.ts → date-range-picker-BYdeSyMU.d.ts} +1 -1
  109. package/dist/{datePickerValue.utils-BqdbvGFL.js → datePickerValue.utils-469FeRCl.js} +2 -2
  110. package/dist/{Toast-DycxJVq5.js → dist-B4xyoAhc.js} +1 -288
  111. package/dist/dom.utils-CeVnXH-T.js +49 -0
  112. package/dist/{dynamicInputs-BoAqswLw.d.ts → dynamicInputs-CecPNXsF.d.ts} +21 -21
  113. package/dist/{fieldAdapter-C_3uizcT.js → fieldAdapter-C1EWUhUl.js} +1 -1
  114. package/dist/index.d.ts +22 -20
  115. package/dist/index.js +31 -28
  116. package/dist/{logger-BPhG2izn.js → logger-WPC6ostp.js} +1 -1
  117. package/dist/{query-autocomplete-B3qBhSDk.d.ts → query-autocomplete-CHtcx_ND.d.ts} +2 -2
  118. package/dist/{query-select-BNNjF0Bc.d.ts → query-select-CD0iFQqR.d.ts} +2 -2
  119. package/dist/{queryAutocomplete.types-CpLHyvqN.d.ts → queryAutocomplete.types-DaTDttX5.d.ts} +2 -2
  120. package/dist/rhf/autocomplete.d.ts +2 -2
  121. package/dist/rhf/autocomplete.js +1 -1
  122. package/dist/rhf/checkbox-group.js +1 -1
  123. package/dist/rhf/checkbox.js +2 -2
  124. package/dist/rhf/date-picker.js +2 -2
  125. package/dist/rhf/date-range-picker.d.ts +3 -3
  126. package/dist/rhf/date-range-picker.js +2 -2
  127. package/dist/rhf/date-time-picker.js +2 -2
  128. package/dist/rhf/file-upload.js +2 -2
  129. package/dist/rhf/input-upload.js +2 -2
  130. package/dist/rhf/inputs.d.ts +1 -1
  131. package/dist/rhf/number-input.js +1 -1
  132. package/dist/rhf/number-range-input.js +2 -2
  133. package/dist/rhf/password-input.js +1 -1
  134. package/dist/rhf/query-autocomplete.d.ts +1 -1
  135. package/dist/rhf/query-autocomplete.js +1 -1
  136. package/dist/rhf/query-select.d.ts +1 -1
  137. package/dist/rhf/query-select.js +1 -1
  138. package/dist/rhf/radio-group.js +2 -2
  139. package/dist/rhf/segment.js +1 -1
  140. package/dist/rhf/select.d.ts +2 -2
  141. package/dist/rhf/select.js +2 -2
  142. package/dist/rhf/slider.js +2 -2
  143. package/dist/rhf/text-area.js +2 -2
  144. package/dist/rhf/text-editor.js +2 -2
  145. package/dist/rhf/text-input.js +1 -1
  146. package/dist/rhf/time-picker.js +2 -2
  147. package/dist/rhf/toggle.js +2 -2
  148. package/dist/{rhf-Ca72CryM.js → rhf-oYBHBWj-.js} +1 -1
  149. package/dist/rhf.d.ts +22 -20
  150. package/dist/rhf.js +31 -28
  151. package/dist/{rolldown-runtime-DUp30N8C.js → rolldown-runtime-B-lAHAz2.js} +10 -1
  152. package/dist/{select-CYuTeweS.d.ts → select-D80pWSgi.d.ts} +2 -2
  153. package/dist/{staticDateTimeSegments-C8AOKnEO.js → staticDateTimeSegments-BOFCK9Ub.js} +5 -5
  154. package/dist/{staticSelect.utils-CYV-eubF.js → staticSelect.utils-Bh1OVHuT.js} +9 -9
  155. package/dist/tanstack/autocomplete.d.ts +1 -1
  156. package/dist/tanstack/checkbox.js +1 -1
  157. package/dist/tanstack/date-picker.js +1 -1
  158. package/dist/tanstack/date-range-picker.d.ts +2 -2
  159. package/dist/tanstack/date-range-picker.js +1 -1
  160. package/dist/tanstack/date-time-picker.js +1 -1
  161. package/dist/tanstack/file-upload.js +1 -1
  162. package/dist/tanstack/form.d.ts +1 -1
  163. package/dist/tanstack/form.js +1 -1
  164. package/dist/tanstack/input-upload.js +1 -1
  165. package/dist/tanstack/inputs.d.ts +2 -2
  166. package/dist/tanstack/inputs.js +1 -1
  167. package/dist/tanstack/number-range-input.js +1 -1
  168. package/dist/tanstack/query-select.d.ts +1 -1
  169. package/dist/tanstack/radio-group.js +1 -1
  170. package/dist/tanstack/select.d.ts +1 -1
  171. package/dist/tanstack/select.js +1 -1
  172. package/dist/tanstack/slider.js +1 -1
  173. package/dist/tanstack/table.d.ts +1 -1
  174. package/dist/tanstack/table.js +1 -1
  175. package/dist/tanstack/text-area.js +1 -1
  176. package/dist/tanstack/text-editor.js +1 -1
  177. package/dist/tanstack/time-picker.js +1 -1
  178. package/dist/tanstack/toggle.js +1 -1
  179. package/dist/tanstack.d.ts +20 -18
  180. package/dist/tanstack.js +40 -37
  181. package/dist/text-editor.js +1 -1
  182. package/dist/toast.cva-BGJCi2qq.js +211 -0
  183. package/dist/toast.runtime--mTw_-fT.js +18 -0
  184. package/dist/toastActivation.store-BELtcr76.js +16 -0
  185. package/dist/{uiConfig.context-DyCOXtaZ.d.ts → uiConfig.context-B27wINPD.d.ts} +6 -3
  186. package/dist/{uiConfig.context-SBtRegKv.js → uiConfig.context-B_wBkrQZ.js} +2 -1
  187. package/dist/{useBreakpoint-D0s71F97.js → useBreakpoint-YuMYUdpG.js} +1 -1
  188. package/dist/{useFieldAccessibility-Bdt6GY7h.js → useFieldAccessibility-BsEP3ts2.js} +1 -1
  189. package/dist/{useFilter-BQRb0JpC.js → useFilter-DjR64hmy.js} +1 -1
  190. package/dist/{useFormAutosave-CyuAM0Mh.js → useFormAutosave-DtYELduH.js} +2 -2
  191. package/dist/{useStaticInputHandoff-pnEcfX_d.js → useStaticInputHandoff-ClwANfo-.js} +2 -2
  192. package/dist/{useTableColumnConfig-BZ4H6gha.js → useTableColumnConfig-CR0gk7hI.js} +55 -73
  193. package/dist/{useTableNav-BoQOVqZF.d.ts → useTableNav-CFHbvYvu.d.ts} +1 -1
  194. package/dist/{useToast-gQ9gzrbt.d.ts → useToast-B55ZUvwy.d.ts} +1 -1
  195. package/dist/utils/logger.js +1 -1
  196. package/package.json +1 -1
  197. package/dist/confirmation.context-C1-ZF9CW.js +0 -80
@@ -1,17 +1,18 @@
1
- import { n as BottomSheetProps } from "./BottomSheet-BWKej2PR.js";
1
+ import { t as BottomSheetProps } from "./BottomSheet-BZXBtOHF.js";
2
2
  import { r as ButtonProps } from "./Button-OxjPE7Hf.js";
3
3
  import { i as CheckboxProps } from "./Checkbox-Di3VlWJj.js";
4
4
  import { o as TextInputProps } from "./FormField-CpPQoyv_.js";
5
5
  import { i as NumberInputProps } from "./NumberInput-Cr_nD98h.js";
6
6
  import { r as RadioGroupProps } from "./RadioGroup-iry4UYlW.js";
7
- import { t as SelectBaseProps } from "./SelectBase-Ds3nqzVg.js";
7
+ import { t as SelectBaseProps } from "./SelectBase-aSvWd7Cx.js";
8
8
  import { r as SliderProps } from "./Slider-CdZdFERe.js";
9
9
  import { r as ToggleProps } from "./Toggle-vHKDihtx.js";
10
10
  import { n as ActionModalProps } from "./ActionModal-C4lfhfPx.js";
11
11
  import { r as ToastPosition } from "./index-B8r_kiw4.js";
12
- import { i as ToastProps } from "./Toast-DDkev3SZ.js";
12
+ import { r as ToastProps } from "./Toast-JL9yaI35.js";
13
13
  import { n as TagProps } from "./Tag-DkTx1S7H.js";
14
14
  import { r as DatePickerProps } from "./DatePicker-EJTAeVRc.js";
15
+ import { i as DateRangeRelativeOption } from "./DateRangePicker-CMWUdyh1.js";
15
16
  import { i as CellTextProps, n as HeaderTextProps } from "./HeaderText-BrZaEuIn.js";
16
17
  import { PropsWithChildren, ReactElement } from "react";
17
18
  //#region src/hooks/useBreakpoint.d.ts
@@ -63,6 +64,8 @@ declare namespace UIConfig {
63
64
  todayIconButtonComponent?: DatePickerProps["todayIconButtonComponent"];
64
65
  allowPartialRange?: boolean;
65
66
  fireBlurOnChange?: boolean;
67
+ /** Additional choices shown by DateRangePicker in `relative` mode. */
68
+ dateRangeOptions?: DateRangeRelativeOption[];
66
69
  };
67
70
  actionModal: Pick<ActionModalProps, "titleTypography" | "descriptionTypography">;
68
71
  bottomSheet: Pick<BottomSheetProps, "closeDragThreshold" | "closeVelocityThreshold" | "hideThumb" | "headerTypography">;
@@ -273,7 +273,8 @@ let UIConfig;
273
273
  granularity: "day",
274
274
  shouldUpdateDateOnMonthYearChange: false,
275
275
  allowPartialRange: false,
276
- fireBlurOnChange: false
276
+ fireBlurOnChange: false,
277
+ dateRangeOptions: []
277
278
  },
278
279
  actionModal: {
279
280
  titleTypography: {
@@ -1,4 +1,4 @@
1
- import { t as UIConfig } from "./uiConfig.context-SBtRegKv.js";
1
+ import { t as UIConfig } from "./uiConfig.context-B_wBkrQZ.js";
2
2
  import { useSyncExternalStore } from "react";
3
3
  import { c } from "react/compiler-runtime";
4
4
  //#region src/hooks/useBreakpoint.ts
@@ -4,7 +4,7 @@ import { t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
4
4
  import { t as typographyDefinition } from "./typography.cva-BI0FyIqm.js";
5
5
  import { t as Loader } from "./Loader-C6YkWZOO.js";
6
6
  import { InlineIconButton } from "./components/inline-icon-button.js";
7
- import { r as InputClear } from "./TooltipWrapper-D8gfa-pC.js";
7
+ import { r as InputClear } from "./TooltipWrapper-eCF5-eNP.js";
8
8
  import { a as inputSizeDefinition, r as inputContentWrapperDefinition } from "./input.cva-KYGD4Bdz.js";
9
9
  import { isValidElement, useId } from "react";
10
10
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { R as $325a3faab7a68acd$export$a16aca283550c30d } from "./Dialog-DpLXaUXz.js";
1
+ import { R as $325a3faab7a68acd$export$a16aca283550c30d } from "./Dialog-CXVxCqvL.js";
2
2
  import { useCallback, useMemo } from "react";
3
3
  //#region ../../node_modules/.bun/@react-aria+i18n@3.12.15+67f6792bdf102c28/node_modules/@react-aria/i18n/dist/useFilter.mjs
4
4
  function $bb77f239b46e8c72$export$3274cf84b703fff(options) {
@@ -1,9 +1,9 @@
1
- import { a as isEqual, o as ObjectUtils } from "./uiConfig.context-SBtRegKv.js";
1
+ import { a as isEqual, o as ObjectUtils } from "./uiConfig.context-B_wBkrQZ.js";
2
2
  import { t as ZodArray } from "./schemas-BkfyFvBp.js";
3
3
  import { t as StringUtils } from "./string.utils-BPgv6QwA.js";
4
4
  import { t as ZodUtils } from "./zod.utils-Nz_Tbo_v.js";
5
5
  import { n as getDefaultInputComponentType } from "./dynamicInputs-D8j0ko24.js";
6
- import { t as InputItem } from "./InputItem-C_njDXaE.js";
6
+ import { t as InputItem } from "./InputItem-DWuSzs16.js";
7
7
  import { useCallback, useEffect, useMemo, useRef } from "react";
8
8
  import { c } from "react/compiler-runtime";
9
9
  import { jsx } from "react/jsx-runtime";
@@ -1,11 +1,11 @@
1
- import { t as UIConfig } from "./uiConfig.context-SBtRegKv.js";
1
+ import { t as UIConfig } from "./uiConfig.context-B_wBkrQZ.js";
2
2
  import { r as FormFieldLabel, t as FormField } from "./FormField-ChDNTHr4.js";
3
3
  import { t as clsx } from "./clsx-CnD0nOiA.js";
4
4
  import { t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
5
5
  import { t as typographyDefinition } from "./typography.cva-BI0FyIqm.js";
6
6
  import { t as Loader } from "./Loader-C6YkWZOO.js";
7
7
  import { InlineIconButton } from "./components/inline-icon-button.js";
8
- import { r as InputClear, t as TooltipWrapper } from "./TooltipWrapper-D8gfa-pC.js";
8
+ import { r as InputClear, t as TooltipWrapper } from "./TooltipWrapper-eCF5-eNP.js";
9
9
  import { a as inputSizeDefinition, r as inputContentWrapperDefinition, t as inputBaseDefinition } from "./input.cva-KYGD4Bdz.js";
10
10
  import { isValidElement, useId, useLayoutEffect, useRef, useState } from "react";
11
11
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -1,9 +1,9 @@
1
1
  import { t as createLucideIcon } from "./createLucideIcon-CskCrR9z.js";
2
- import { t as UIConfig } from "./uiConfig.context-SBtRegKv.js";
2
+ import { t as UIConfig } from "./uiConfig.context-B_wBkrQZ.js";
3
3
  import { t as ChevronDown } from "./chevron-down-Ciz9yP9R.js";
4
4
  import { t as ChevronUp } from "./chevron-up-CHRnDSA3.js";
5
5
  import { t as clsx } from "./clsx-CnD0nOiA.js";
6
- import { t as Checkbox } from "./Checkbox-B7f8NgnO.js";
6
+ import { t as Checkbox } from "./Checkbox-Feyideqw.js";
7
7
  import { t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
8
8
  import { t as Typography } from "./Typography-AcUd9df8.js";
9
9
  import { t as Loader } from "./Loader-C6YkWZOO.js";
@@ -15,20 +15,16 @@ import { t as DateUtils } from "./date.utils-B8_QF9y6.js";
15
15
  import { f as ZodISODateTime, i as ZodEnum, l as ZodString, n as ZodBoolean, o as ZodNumber, s as ZodObject, t as ZodArray } from "./schemas-BkfyFvBp.js";
16
16
  import { t as StringUtils } from "./string.utils-BPgv6QwA.js";
17
17
  import { t as ZodUtils } from "./zod.utils-Nz_Tbo_v.js";
18
- import { t as Modal } from "./Modal-DdKOgTpG.js";
18
+ import { t as Modal } from "./Modal-BrOOpTQ4.js";
19
19
  import { Pagination } from "./components/pagination.js";
20
- import { t as logger } from "./logger-BPhG2izn.js";
20
+ import { t as logger } from "./logger-WPC6ostp.js";
21
21
  import { t as useTranslationMemo } from "./useTranslationMemo-CrZbeyBv.js";
22
22
  import { t as UIRouter } from "./router.context-VhvhlIvV.js";
23
23
  import { t as RoutingUtils } from "./routing.utils-UTQonIhB.js";
24
- import { useCallback, useEffect, useMemo, useRef, useState } from "react";
24
+ import { Suspense, lazy, useCallback, useEffect, useMemo, useRef, useState } from "react";
25
25
  import { c } from "react/compiler-runtime";
26
26
  import { jsx, jsxs } from "react/jsx-runtime";
27
27
  import { useTranslation } from "react-i18next";
28
- import { DndContext, KeyboardSensor, MouseSensor, TouchSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
29
- import { restrictToVerticalAxis } from "@dnd-kit/modifiers";
30
- import { SortableContext, arrayMove, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
31
- import { CSS } from "@dnd-kit/utilities";
32
28
  import { createPaginatedRowModel, createSortedRowModel, flexRender, stockFeatures, tableFeatures, useTable } from "@tanstack/react-table";
33
29
  import i18next from "i18next";
34
30
  /**
@@ -518,6 +514,10 @@ function useTableNav(options) {
518
514
  }
519
515
  //#endregion
520
516
  //#region src/components/table/Table.tsx
517
+ const DndProvider = lazy(() => import("./TableDnd-CuHxANWh.js").then((module) => ({ default: module.DndProvider })));
518
+ const SortableRows = lazy(() => import("./TableDnd-CuHxANWh.js").then((module) => ({ default: module.SortableRows })));
519
+ const DraggableRow = lazy(() => import("./TableDnd-CuHxANWh.js").then((module) => ({ default: module.DraggableRow })));
520
+ const DragHandle = lazy(() => import("./TableDnd-CuHxANWh.js").then((module) => ({ default: module.DragHandle })));
521
521
  const tableFeaturesConfig = tableFeatures({
522
522
  ...stockFeatures,
523
523
  sortedRowModel: createSortedRowModel(),
@@ -536,49 +536,17 @@ const renderCell = (Comp, props) => {
536
536
  return typeof rendered === "string" ? /* @__PURE__ */ jsx(CellText, { children: rendered }) : rendered;
537
537
  };
538
538
  const RowDragHandleCell = ({ rowId }) => {
539
- const { attributes, listeners } = useSortable({ id: rowId });
540
- return /* @__PURE__ */ jsx(InlineIconButton, {
541
- ...attributes,
542
- ...listeners,
543
- className: "cursor-move p-1",
544
- label: "Drag handle",
545
- icon: GripVertical
546
- });
547
- };
548
- const AutoDragHandleCell = ({ row }) => /* @__PURE__ */ jsx(RowDragHandleCell, { rowId: row.id });
549
- const DraggableRow = ({ row, showCellBorder, onRowClick, onDoubleClick, tableRowCva, tableDataCva, hasOnClick, ...props }) => {
550
- const { transform, transition, setNodeRef, isDragging } = useSortable({ id: row.id });
551
- const style = {
552
- transform: CSS.Transform.toString(transform),
553
- transition,
554
- opacity: isDragging ? .8 : 1,
555
- zIndex: isDragging ? 1 : 0,
556
- position: "relative"
557
- };
558
- return /* @__PURE__ */ jsx("tr", {
559
- ref: setNodeRef,
560
- style,
561
- "data-clickable": hasOnClick || row.getCanSelect() || void 0,
562
- "data-selected": row.getIsSelected() || void 0,
563
- className: clsx(tableRowCva(props)),
564
- onClick: () => {
565
- if (onRowClick) {
566
- onRowClick(row.original);
567
- return;
568
- }
569
- if (row.getCanSelect()) row.toggleSelected();
570
- },
571
- onDoubleClick: () => onDoubleClick?.(row.original),
572
- children: row.getVisibleCells().map((cell, cellIndex) => {
573
- const columnMeta = cell.column.columnDef.meta ?? {};
574
- return /* @__PURE__ */ jsx("td", {
575
- tabIndex: -1,
576
- className: clsx(tableDataCva({ hasRightBorder: cellIndex > 0 && showCellBorder }), columnMeta.cellClass, columnMeta.width),
577
- children: renderCell(cell.column.columnDef.cell, CustomCellContext(cell.getContext()))
578
- }, cell.id);
539
+ return /* @__PURE__ */ jsx(DragHandle, {
540
+ id: rowId,
541
+ children: (dragProps) => /* @__PURE__ */ jsx(InlineIconButton, {
542
+ ...dragProps,
543
+ className: "cursor-move p-1",
544
+ label: "Drag handle",
545
+ icon: GripVertical
579
546
  })
580
547
  });
581
548
  };
549
+ const AutoDragHandleCell = ({ row }) => /* @__PURE__ */ jsx(RowDragHandleCell, { rowId: row.id });
582
550
  const Table$1 = ({ 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 }) => {
583
551
  const tableRowCva = UIOverrides.useCva("table.rowCva", tableRowDefinition);
584
552
  const theadCva = UIOverrides.useCva("table.theadCva", theadDefinition);
@@ -659,7 +627,12 @@ const Table$1 = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, cl
659
627
  if (onReorder) {
660
628
  const oldIndex = items.findIndex((item_0) => getRowId(item_0) === active.id);
661
629
  const newIndex = items.findIndex((item_1) => getRowId(item_1) === over.id);
662
- if (oldIndex !== -1 && newIndex !== -1) onReorder(arrayMove(items, oldIndex, newIndex));
630
+ if (oldIndex !== -1 && newIndex !== -1) {
631
+ const reorderedItems = [...items];
632
+ const [movedItem] = reorderedItems.splice(oldIndex, 1);
633
+ reorderedItems.splice(newIndex, 0, movedItem);
634
+ onReorder(reorderedItems);
635
+ }
663
636
  }
664
637
  onDragEnd?.(event);
665
638
  }
@@ -669,7 +642,6 @@ const Table$1 = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, cl
669
642
  items,
670
643
  getRowId
671
644
  ]);
672
- const sensors = useSensors(useSensor(MouseSensor, {}), useSensor(TouchSensor, {}), useSensor(KeyboardSensor, {}));
673
645
  const selectedRows = table.getSelectedRowModel().rows;
674
646
  const columnCount = table.getHeaderGroups()[0].headers.length;
675
647
  const isAnyRowSelected = selectedRows.length > 0 && !!ActionHeader;
@@ -716,19 +688,29 @@ const Table$1 = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, cl
716
688
  }), /* @__PURE__ */ jsx("tbody", {
717
689
  ref,
718
690
  className: "relative",
719
- children: enableDragDrop ? /* @__PURE__ */ jsx(SortableContext, {
691
+ children: enableDragDrop ? /* @__PURE__ */ jsx(SortableRows, {
720
692
  items: dataIds,
721
- strategy: verticalListSortingStrategy,
722
693
  children: table.getRowModel().rows.map((row_0) => /* @__PURE__ */ jsx(DraggableRow, {
723
- row: row_0,
724
- showCellBorder,
725
- onRowClick,
726
- onDoubleClick,
727
- tableRowCva,
728
- tableHeadDataCva,
729
- tableDataCva,
730
- hasOnClick,
731
- ...props
694
+ id: row_0.id,
695
+ className: clsx(tableRowCva({ ...props })),
696
+ isClickable: hasOnClick || row_0.getCanSelect(),
697
+ isSelected: row_0.getIsSelected(),
698
+ onClick: () => {
699
+ if (onRowClick) {
700
+ onRowClick(row_0.original);
701
+ return;
702
+ }
703
+ if (row_0.getCanSelect()) row_0.toggleSelected();
704
+ },
705
+ onDoubleClick: () => onDoubleClick?.(row_0.original),
706
+ children: row_0.getVisibleCells().map((cell, cellIndex) => {
707
+ const columnMeta_0 = cell.column.columnDef.meta ?? {};
708
+ return /* @__PURE__ */ jsx("td", {
709
+ tabIndex: -1,
710
+ className: clsx(tableDataCva({ hasRightBorder: cellIndex > 0 && showCellBorder }), columnMeta_0.cellClass, columnMeta_0.width),
711
+ children: renderCell(cell.column.columnDef.cell, CustomCellContext(cell.getContext()))
712
+ }, cell.id);
713
+ })
732
714
  }, row_0.id))
733
715
  }) : table.getRowModel().rows.map((row_1) => {
734
716
  return /* @__PURE__ */ jsx("tr", {
@@ -743,24 +725,24 @@ const Table$1 = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, cl
743
725
  onDoubleClick: () => onDoubleClick?.(row_1.original),
744
726
  "data-clickable": hasOnClick || row_1.getCanSelect() || void 0,
745
727
  "data-selected": row_1.getIsSelected() || void 0,
746
- children: row_1.getVisibleCells().map((cell, cellIndex) => {
747
- const columnMeta_0 = cell.column.columnDef.meta ?? {};
728
+ children: row_1.getVisibleCells().map((cell_0, cellIndex_0) => {
729
+ const columnMeta_1 = cell_0.column.columnDef.meta ?? {};
748
730
  return /* @__PURE__ */ jsx("td", {
749
731
  tabIndex: -1,
750
- className: clsx(tableDataCva({ hasRightBorder: cellIndex > 0 && showCellBorder }), columnMeta_0.cellClass, columnMeta_0.width),
751
- children: renderCell(cell.column.columnDef.cell, CustomCellContext(cell.getContext()))
752
- }, cell.id);
732
+ className: clsx(tableDataCva({ hasRightBorder: cellIndex_0 > 0 && showCellBorder }), columnMeta_1.cellClass, columnMeta_1.width),
733
+ children: renderCell(cell_0.column.columnDef.cell, CustomCellContext(cell_0.getContext()))
734
+ }, cell_0.id);
753
735
  })
754
736
  }, row_1.id);
755
737
  })
756
738
  })]
757
739
  });
758
- if (enableDragDrop) return /* @__PURE__ */ jsx(DndContext, {
759
- collisionDetection: closestCenter,
760
- modifiers: [restrictToVerticalAxis],
761
- onDragEnd: handleDragEnd,
762
- sensors,
763
- children: tableElement
740
+ if (enableDragDrop) return /* @__PURE__ */ jsx(Suspense, {
741
+ fallback: null,
742
+ children: /* @__PURE__ */ jsx(DndProvider, {
743
+ onDragEnd: handleDragEnd,
744
+ children: tableElement
745
+ })
764
746
  });
765
747
  return tableElement;
766
748
  };
@@ -2,9 +2,9 @@ import { n as StyleMergeUtils, t as UIOverrides } from "./uiOverrides.context-Bd
2
2
  import { c as ZodObject, h as output, i as ZodEnum } from "./schemas-CAtYiHoz.js";
3
3
  import { t as FieldPath } from "./form.binding-DWlFTecs.js";
4
4
  import { ComponentType, Dispatch, KeyboardEvent, ReactNode, SetStateAction } from "react";
5
- import { DragEndEvent, UniqueIdentifier } from "@dnd-kit/core";
6
5
  import { CellContext, ColumnDef, ColumnMeta, ColumnOrderState, ColumnVisibilityState, OnChangeFn, PaginationState, Row, RowData, RowSelectionState, SortingState, StockFeatures, Table } from "@tanstack/react-table";
7
6
  import { TFunction } from "i18next";
7
+ import { DragEndEvent, UniqueIdentifier } from "@dnd-kit/core";
8
8
  //#region src/components/table/ColumnConfig.d.ts
9
9
  type ColumnDef$4<TData extends RowData, TValue = unknown> = ColumnDef<StockFeatures, TData, TValue>;
10
10
  type VisibilityState$2 = ColumnVisibilityState;
@@ -1,5 +1,5 @@
1
1
  import { n as ToastOptions$1, r as ToastPosition, t as Id } from "./index-B8r_kiw4.js";
2
- import { i as ToastProps } from "./Toast-DDkev3SZ.js";
2
+ import { r as ToastProps } from "./Toast-JL9yaI35.js";
3
3
  //#region src/components/status/Toast/useToast.d.ts
4
4
  interface ToastParams extends Omit<ToastProps, "color"> {
5
5
  position?: ToastPosition;
@@ -1,2 +1,2 @@
1
- import { t as logger } from "../logger-BPhG2izn.js";
1
+ import { t as logger } from "../logger-WPC6ostp.js";
2
2
  export { logger };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@povio/ui",
3
- "version": "3.4.0-rc.24",
3
+ "version": "3.4.0-rc.26",
4
4
  "type": "module",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,80 +0,0 @@
1
- import "./i18n-C2TBJvnh.js";
2
- import { ActionModal } from "./components/action-modal.js";
3
- import { createContext, use, useCallback, useMemo, useState } from "react";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- import { useTranslation } from "react-i18next";
6
- //#region src/config/confirmation.context.tsx
7
- let Confirmation;
8
- (function(_Confirmation) {
9
- const DEFAULT_STATE = {
10
- heading: "",
11
- description: "",
12
- isOpen: false,
13
- primaryAction: {
14
- label: "",
15
- onPress: () => {}
16
- },
17
- secondaryAction: {
18
- label: "",
19
- onPress: () => {}
20
- }
21
- };
22
- const Context = createContext(null);
23
- _Confirmation.Provider = ({ children }) => {
24
- const [state, setState] = useState(DEFAULT_STATE);
25
- const { t } = useTranslation("ui");
26
- const onCancel = () => setState(DEFAULT_STATE);
27
- const confirm = useCallback(async ({ heading, description, buttonSize, textAlign, modalClassName, cancelLabel = t(($) => $.ui.confirmation.cancel), confirmLabel = t(($_0) => $_0.ui.confirmation.confirm), confirmVariant, confirmColor, cancelVariant, cancelColor }) => {
28
- return new Promise((resolve) => {
29
- setState({
30
- heading,
31
- description,
32
- buttonSize,
33
- textAlign,
34
- modalClassName,
35
- primaryAction: {
36
- label: confirmLabel,
37
- onPress() {
38
- setState({
39
- ...state,
40
- isOpen: false,
41
- heading: "",
42
- description: ""
43
- });
44
- resolve(true);
45
- },
46
- variant: confirmVariant,
47
- color: confirmColor
48
- },
49
- secondaryAction: {
50
- label: cancelLabel,
51
- onPress() {
52
- onCancel();
53
- resolve(false);
54
- },
55
- variant: cancelVariant,
56
- color: cancelColor
57
- },
58
- isOpen: !state.isOpen
59
- });
60
- });
61
- }, [state, t]);
62
- const value = useMemo(() => ({ confirm }), [confirm]);
63
- return /* @__PURE__ */ jsxs(Context.Provider, {
64
- value,
65
- children: [/* @__PURE__ */ jsx(ActionModal, {
66
- ...state,
67
- onClose: state.secondaryAction?.onPress ?? onCancel,
68
- primaryAction: state.primaryAction,
69
- secondaryAction: state.secondaryAction
70
- }), children]
71
- });
72
- };
73
- _Confirmation.useConfirmation = () => {
74
- const context = use(Context);
75
- if (!context) throw new Error("Confirmation.useConfirmation must be used within a Confirmation.Provider");
76
- return context;
77
- };
78
- })(Confirmation || (Confirmation = {}));
79
- //#endregion
80
- export { Confirmation as t };