@povio/ui 3.3.0-rc.3 → 3.3.0

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 (84) hide show
  1. package/README.md +15 -1
  2. package/dist/components/Breadcrumbs/Breadcrumbs.js +55 -206
  3. package/dist/components/buttons/Button/button.cva.d.ts +1 -1
  4. package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
  5. package/dist/components/buttons/shared/ButtonContent.js +22 -80
  6. package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
  7. package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +5 -1
  8. package/dist/components/inputs/Checkbox/CheckboxGroup.js +234 -201
  9. package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +93 -227
  10. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +1 -0
  11. package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +170 -273
  12. package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +60 -147
  13. package/dist/components/inputs/DateTime/shared/Calendar.js +139 -339
  14. package/dist/components/inputs/DateTime/shared/CalendarCell.js +114 -308
  15. package/dist/components/inputs/DateTime/shared/CalendarGrid.js +35 -150
  16. package/dist/components/inputs/DateTime/shared/CalendarHeader.js +95 -229
  17. package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +115 -296
  18. package/dist/components/inputs/DateTime/shared/DateField.js +135 -301
  19. package/dist/components/inputs/DateTime/shared/DatePickerInput.js +142 -338
  20. package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
  21. package/dist/components/inputs/DateTime/shared/TimePickerInput.js +144 -134
  22. package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.d.ts +2 -0
  23. package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +33 -0
  24. package/dist/components/inputs/File/FileUpload.js +1 -1
  25. package/dist/components/inputs/File/InputUpload.js +65 -261
  26. package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +48 -180
  27. package/dist/components/inputs/File/shared/FileUploadContentError.js +95 -265
  28. package/dist/components/inputs/File/shared/FileUploadContentFilled.js +99 -261
  29. package/dist/components/inputs/File/shared/FileUploadContentLoading.js +56 -234
  30. package/dist/components/inputs/File/shared/ProgressBar.js +15 -102
  31. package/dist/components/inputs/FormField/FormField.js +34 -47
  32. package/dist/components/inputs/Input/NumberInput/NumberInput.js +2 -1
  33. package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +77 -314
  34. package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +23 -83
  35. package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +56 -2
  36. package/dist/components/inputs/Selection/Select/QuerySelect.js +82 -94
  37. package/dist/components/inputs/Selection/Select/Select.js +3 -3
  38. package/dist/components/inputs/Selection/shared/SelectInput.js +1 -0
  39. package/dist/components/inputs/Selection/shared/SelectListBox.js +51 -163
  40. package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +1 -0
  41. package/dist/components/inputs/Selection/shared/querySelect.utils.js +1 -0
  42. package/dist/components/inputs/Selection/shared/select.context.js +19 -9
  43. package/dist/components/inputs/Selection/shared/useSelectItems.js +48 -108
  44. package/dist/components/inputs/Skeleton/InputFrame.js +177 -552
  45. package/dist/components/inputs/TextEditor/TextEditor.js +87 -389
  46. package/dist/components/inputs/shared/InputClear.js +24 -40
  47. package/dist/components/inputs/shared/input.cva.js +1 -1
  48. package/dist/components/navigation/Accordion/Accordion.js +22 -69
  49. package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
  50. package/dist/components/navigation/Stepper/Stepper.js +22 -67
  51. package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
  52. package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +29 -110
  53. package/dist/components/shared/pagination/Pagination.js +22 -108
  54. package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
  55. package/dist/components/status/Alert/Alert.js +30 -97
  56. package/dist/components/table/InfiniteTable.js +16 -67
  57. package/dist/components/table/Table.d.ts +2 -8
  58. package/dist/components/table/Table.js +33 -55
  59. package/dist/components/text/Typography/Typography.js +8 -23
  60. package/dist/config/confirmation.context.js +1 -1
  61. package/dist/config/theme.context.js +45 -98
  62. package/dist/config/uiConfig.context.d.ts +1 -0
  63. package/dist/config/uiConfig.context.js +10 -40
  64. package/dist/config/uiOverrides.context.d.ts +0 -1
  65. package/dist/helpers/dynamicColumns.js +2 -1
  66. package/dist/hooks/useDebounceCallback.js +17 -51
  67. package/dist/hooks/useFormAutosave.js +33 -120
  68. package/dist/hooks/useLongPressRepeat.js +20 -55
  69. package/dist/index.d.ts +1 -1
  70. package/dist/index.js +2 -2
  71. package/dist/utils/date-time.utils.d.ts +0 -1
  72. package/dist/utils/date-time.utils.js +21 -45
  73. package/dist/utils/intl.utils.d.ts +7 -0
  74. package/dist/utils/intl.utils.js +38 -0
  75. package/dist/utils/intl.utils.spec.d.ts +1 -0
  76. package/package.json +2 -2
  77. package/dist/components/inputs/FormField/formField.cva.d.ts +0 -11
  78. package/dist/components/inputs/FormField/formField.cva.js +0 -16
  79. package/dist/components/table/TableColumnFilterInput.d.ts +0 -9
  80. package/dist/components/table/TableColumnFilterInput.js +0 -108
  81. package/dist/components/table/TableColumnFilterPlaceholder.d.ts +0 -5
  82. package/dist/components/table/TableColumnFilterPlaceholder.js +0 -41
  83. package/dist/components/table/TableColumnFilterRow.d.ts +0 -16
  84. package/dist/components/table/TableColumnFilterRow.js +0 -68
@@ -4,17 +4,19 @@ import { UIConfig } from "../../../../config/uiConfig.context.js";
4
4
  import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
5
5
  import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
6
6
  import { inputBaseDefinition, inputSizeDefinition } from "../../shared/input.cva.js";
7
+ import { useFirefoxDateSegmentSelectionGuard } from "./useFirefoxDateSegmentSelectionGuard.js";
7
8
  import { InputClear } from "../../shared/InputClear.js";
8
9
  import { TimeField } from "./TimeField.js";
9
10
  import { c } from "react/compiler-runtime";
10
11
  import { jsx, jsxs } from "react/jsx-runtime";
11
12
  import { clsx } from "clsx";
12
- import { useState } from "react";
13
+ import { useRef, useState } from "react";
13
14
  import { Button } from "react-aria-components";
14
15
  import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
16
+ import { mergeRefs } from "@react-aria/utils";
15
17
  //#region src/components/inputs/DateTime/shared/TimePickerInput.tsx
16
18
  var TimePickerInput = (t0) => {
17
- const $ = c(67);
19
+ const $ = c(69);
18
20
  const { ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, className, onPress, onClear, fireBlurOnChange, ...props } = t0;
19
21
  const uiConfig = UIConfig.useConfig();
20
22
  const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
@@ -34,6 +36,8 @@ var TimePickerInput = (t0) => {
34
36
  } else t2 = $[2];
35
37
  const { focusWithinProps } = useFocusWithin(t2);
36
38
  const { isFocusVisible } = useFocusVisible();
39
+ const containerRef = useRef(null);
40
+ useFirefoxDateSegmentSelectionGuard(containerRef);
37
41
  const hidePlaceholder = as === "floating" && !state.value && !isFocused;
38
42
  let t3;
39
43
  if ($[3] !== state.segments) {
@@ -42,56 +46,62 @@ var TimePickerInput = (t0) => {
42
46
  $[4] = t3;
43
47
  } else t3 = $[4];
44
48
  const canClear = t3;
45
- const t4 = clsx(inputBaseCva({
49
+ let t4;
50
+ if ($[5] !== ref) {
51
+ t4 = mergeRefs(ref, containerRef);
52
+ $[5] = ref;
53
+ $[6] = t4;
54
+ } else t4 = $[6];
55
+ const t5 = clsx(inputBaseCva({
46
56
  variant,
47
57
  as,
48
58
  ...props
49
59
  }), "group/date-picker-content relative min-w-input-width-min-width", "flex items-center justify-between gap-input-gap-input-text-to-elements", className);
50
- const t5 = isHovered || void 0;
51
- const t6 = isDisabled || void 0;
60
+ const t6 = isHovered || void 0;
52
61
  const t7 = isDisabled || void 0;
53
- const t8 = isInvalid || void 0;
54
- const t9 = state.value === null || void 0;
55
- const t10 = isFocused || void 0;
56
- const t11 = isFocused && isFocusVisible || void 0;
57
- const t12 = state.value !== null || void 0;
58
- const t13 = isDirty || void 0;
59
- const t14 = isRequired || void 0;
60
- const t15 = state.value !== null || void 0;
61
- let t16;
62
- if ($[5] !== as || $[6] !== inputSizeCva || $[7] !== size) {
63
- t16 = clsx(inputSizeCva({
62
+ const t8 = isDisabled || void 0;
63
+ const t9 = isInvalid || void 0;
64
+ const t10 = state.value === null || void 0;
65
+ const t11 = isFocused || void 0;
66
+ const t12 = isFocused && isFocusVisible || void 0;
67
+ const t13 = state.value !== null || void 0;
68
+ const t14 = isDirty || void 0;
69
+ const t15 = isRequired || void 0;
70
+ const t16 = state.value !== null || void 0;
71
+ let t17;
72
+ if ($[7] !== as || $[8] !== inputSizeCva || $[9] !== size) {
73
+ t17 = clsx(inputSizeCva({
64
74
  size,
65
75
  as
66
76
  }), "flex w-full items-center gap-input-gap-input-text-to-elements pr-0!");
67
- $[5] = as;
68
- $[6] = inputSizeCva;
69
- $[7] = size;
70
- $[8] = t16;
71
- } else t16 = $[8];
72
- let t17;
73
- if ($[9] !== disableManualEntry || $[10] !== onPress) {
74
- t17 = disableManualEntry && /* @__PURE__ */ jsx(Button, {
77
+ $[7] = as;
78
+ $[8] = inputSizeCva;
79
+ $[9] = size;
80
+ $[10] = t17;
81
+ } else t17 = $[10];
82
+ let t18;
83
+ if ($[11] !== disableManualEntry || $[12] !== onPress) {
84
+ t18 = disableManualEntry && /* @__PURE__ */ jsx(Button, {
75
85
  onPress,
76
86
  className: "absolute inset-0 z-base"
77
87
  });
78
- $[9] = disableManualEntry;
79
- $[10] = onPress;
80
- $[11] = t17;
81
- } else t17 = $[11];
82
- let t18;
83
- if ($[12] !== as || $[13] !== headerProps) {
84
- t18 = as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
88
+ $[11] = disableManualEntry;
89
+ $[12] = onPress;
90
+ $[13] = t18;
91
+ } else t18 = $[13];
92
+ let t19;
93
+ if ($[14] !== as || $[15] !== headerProps) {
94
+ t19 = as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
85
95
  as,
86
96
  ...headerProps
87
97
  });
88
- $[12] = as;
89
- $[13] = headerProps;
90
- $[14] = t18;
91
- } else t18 = $[14];
92
- let t19;
93
- if ($[15] !== disableManualEntry || $[16] !== fieldProps || $[17] !== hidePlaceholder || $[18] !== isDisabled || $[19] !== placeholder || $[20] !== state) {
94
- t19 = /* @__PURE__ */ jsx("div", { children: disableManualEntry && placeholder && !state.value ? /* @__PURE__ */ jsx(Typography, {
98
+ $[14] = as;
99
+ $[15] = headerProps;
100
+ $[16] = t19;
101
+ } else t19 = $[16];
102
+ let t20;
103
+ if ($[17] !== disableManualEntry || $[18] !== fieldProps || $[19] !== hidePlaceholder || $[20] !== isDisabled || $[21] !== placeholder || $[22] !== state) {
104
+ t20 = /* @__PURE__ */ jsx("div", { children: disableManualEntry && placeholder && !state.value ? /* @__PURE__ */ jsx(Typography, {
95
105
  size: "label-1",
96
106
  className: "text-text-default-3",
97
107
  children: placeholder
@@ -101,44 +111,44 @@ var TimePickerInput = (t0) => {
101
111
  isDisabled,
102
112
  hidePlaceholder
103
113
  }) });
104
- $[15] = disableManualEntry;
105
- $[16] = fieldProps;
106
- $[17] = hidePlaceholder;
107
- $[18] = isDisabled;
108
- $[19] = placeholder;
109
- $[20] = state;
110
- $[21] = t19;
111
- } else t19 = $[21];
112
- let t20;
113
- if ($[22] !== t16 || $[23] !== t17 || $[24] !== t18 || $[25] !== t19) {
114
- t20 = /* @__PURE__ */ jsxs("div", {
115
- className: t16,
114
+ $[17] = disableManualEntry;
115
+ $[18] = fieldProps;
116
+ $[19] = hidePlaceholder;
117
+ $[20] = isDisabled;
118
+ $[21] = placeholder;
119
+ $[22] = state;
120
+ $[23] = t20;
121
+ } else t20 = $[23];
122
+ let t21;
123
+ if ($[24] !== t17 || $[25] !== t18 || $[26] !== t19 || $[27] !== t20) {
124
+ t21 = /* @__PURE__ */ jsxs("div", {
125
+ className: t17,
116
126
  children: [
117
- t17,
118
127
  t18,
119
- t19
128
+ t19,
129
+ t20
120
130
  ]
121
131
  });
122
- $[22] = t16;
123
- $[23] = t17;
124
- $[24] = t18;
125
- $[25] = t19;
126
- $[26] = t20;
127
- } else t20 = $[26];
128
- let t21;
129
- if ($[27] !== as || $[28] !== inputSizeCva || $[29] !== size) {
130
- t21 = clsx(inputSizeCva({
132
+ $[24] = t17;
133
+ $[25] = t18;
134
+ $[26] = t19;
135
+ $[27] = t20;
136
+ $[28] = t21;
137
+ } else t21 = $[28];
138
+ let t22;
139
+ if ($[29] !== as || $[30] !== inputSizeCva || $[31] !== size) {
140
+ t22 = clsx(inputSizeCva({
131
141
  size,
132
142
  as
133
143
  }), "flex items-center gap-input-gap-trailing-elements py-0! pl-0!");
134
- $[27] = as;
135
- $[28] = inputSizeCva;
136
- $[29] = size;
137
- $[30] = t21;
138
- } else t21 = $[30];
139
- let t22;
140
- if ($[31] !== canClear || $[32] !== fieldProps || $[33] !== fireBlurOnChange || $[34] !== isClearable || $[35] !== onClear || $[36] !== state) {
141
- t22 = isClearable && /* @__PURE__ */ jsx(InputClear, {
144
+ $[29] = as;
145
+ $[30] = inputSizeCva;
146
+ $[31] = size;
147
+ $[32] = t22;
148
+ } else t22 = $[32];
149
+ let t23;
150
+ if ($[33] !== canClear || $[34] !== fieldProps || $[35] !== fireBlurOnChange || $[36] !== isClearable || $[37] !== onClear || $[38] !== state) {
151
+ t23 = isClearable && /* @__PURE__ */ jsx(InputClear, {
142
152
  onClear: () => {
143
153
  state.setValue(null);
144
154
  onClear?.();
@@ -146,17 +156,17 @@ var TimePickerInput = (t0) => {
146
156
  },
147
157
  show: canClear
148
158
  });
149
- $[31] = canClear;
150
- $[32] = fieldProps;
151
- $[33] = fireBlurOnChange;
152
- $[34] = isClearable;
153
- $[35] = onClear;
154
- $[36] = state;
155
- $[37] = t22;
156
- } else t22 = $[37];
157
- let t23;
158
- if ($[38] !== disableDropdown || $[39] !== disableManualEntry || $[40] !== isDisabled || $[41] !== onPress || $[42] !== uiConfig) {
159
- t23 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
159
+ $[33] = canClear;
160
+ $[34] = fieldProps;
161
+ $[35] = fireBlurOnChange;
162
+ $[36] = isClearable;
163
+ $[37] = onClear;
164
+ $[38] = state;
165
+ $[39] = t23;
166
+ } else t23 = $[39];
167
+ let t24;
168
+ if ($[40] !== disableDropdown || $[41] !== disableManualEntry || $[42] !== isDisabled || $[43] !== onPress || $[44] !== uiConfig) {
169
+ t24 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
160
170
  label: "",
161
171
  color: "secondary",
162
172
  onPress,
@@ -165,68 +175,68 @@ var TimePickerInput = (t0) => {
165
175
  className: "border-0!",
166
176
  "data-static-press-action": ""
167
177
  });
168
- $[38] = disableDropdown;
169
- $[39] = disableManualEntry;
170
- $[40] = isDisabled;
171
- $[41] = onPress;
172
- $[42] = uiConfig;
173
- $[43] = t23;
174
- } else t23 = $[43];
175
- let t24;
176
- if ($[44] !== t21 || $[45] !== t22 || $[46] !== t23) {
177
- t24 = /* @__PURE__ */ jsxs("div", {
178
- className: t21,
179
- children: [t22, t23]
180
- });
181
- $[44] = t21;
182
- $[45] = t22;
183
- $[46] = t23;
184
- $[47] = t24;
185
- } else t24 = $[47];
178
+ $[40] = disableDropdown;
179
+ $[41] = disableManualEntry;
180
+ $[42] = isDisabled;
181
+ $[43] = onPress;
182
+ $[44] = uiConfig;
183
+ $[45] = t24;
184
+ } else t24 = $[45];
186
185
  let t25;
187
- if ($[48] !== fieldProps || $[49] !== focusWithinProps || $[50] !== hoverProps || $[51] !== ref || $[52] !== t10 || $[53] !== t11 || $[54] !== t12 || $[55] !== t13 || $[56] !== t14 || $[57] !== t15 || $[58] !== t20 || $[59] !== t24 || $[60] !== t4 || $[61] !== t5 || $[62] !== t6 || $[63] !== t7 || $[64] !== t8 || $[65] !== t9) {
186
+ if ($[46] !== t22 || $[47] !== t23 || $[48] !== t24) {
188
187
  t25 = /* @__PURE__ */ jsxs("div", {
189
- ref,
190
- className: t4,
188
+ className: t22,
189
+ children: [t23, t24]
190
+ });
191
+ $[46] = t22;
192
+ $[47] = t23;
193
+ $[48] = t24;
194
+ $[49] = t25;
195
+ } else t25 = $[49];
196
+ let t26;
197
+ if ($[50] !== fieldProps || $[51] !== focusWithinProps || $[52] !== hoverProps || $[53] !== t10 || $[54] !== t11 || $[55] !== t12 || $[56] !== t13 || $[57] !== t14 || $[58] !== t15 || $[59] !== t16 || $[60] !== t21 || $[61] !== t25 || $[62] !== t4 || $[63] !== t5 || $[64] !== t6 || $[65] !== t7 || $[66] !== t8 || $[67] !== t9) {
198
+ t26 = /* @__PURE__ */ jsxs("div", {
199
+ ref: t4,
200
+ className: t5,
191
201
  "data-rac": "",
192
202
  "data-datetime-input": "",
193
- "data-hovered": t5,
194
- "data-disabled": t6,
195
- "data-is-disabled": t7,
196
- "data-invalid": t8,
197
- "data-is-empty": t9,
198
- "data-focus-within": t10,
199
- "data-focus-visible": t11,
200
- "data-has-selection": t12,
201
- "data-is-dirty": t13,
202
- "data-is-required": t14,
203
- "data-is-filled": t15,
203
+ "data-hovered": t6,
204
+ "data-disabled": t7,
205
+ "data-is-disabled": t8,
206
+ "data-invalid": t9,
207
+ "data-is-empty": t10,
208
+ "data-focus-within": t11,
209
+ "data-focus-visible": t12,
210
+ "data-has-selection": t13,
211
+ "data-is-dirty": t14,
212
+ "data-is-required": t15,
213
+ "data-is-filled": t16,
204
214
  ...fieldProps,
205
215
  ...focusWithinProps,
206
216
  ...hoverProps,
207
- children: [t20, t24]
217
+ children: [t21, t25]
208
218
  });
209
- $[48] = fieldProps;
210
- $[49] = focusWithinProps;
211
- $[50] = hoverProps;
212
- $[51] = ref;
213
- $[52] = t10;
214
- $[53] = t11;
215
- $[54] = t12;
216
- $[55] = t13;
217
- $[56] = t14;
218
- $[57] = t15;
219
- $[58] = t20;
220
- $[59] = t24;
221
- $[60] = t4;
222
- $[61] = t5;
223
- $[62] = t6;
224
- $[63] = t7;
225
- $[64] = t8;
226
- $[65] = t9;
227
- $[66] = t25;
228
- } else t25 = $[66];
229
- return t25;
219
+ $[50] = fieldProps;
220
+ $[51] = focusWithinProps;
221
+ $[52] = hoverProps;
222
+ $[53] = t10;
223
+ $[54] = t11;
224
+ $[55] = t12;
225
+ $[56] = t13;
226
+ $[57] = t14;
227
+ $[58] = t15;
228
+ $[59] = t16;
229
+ $[60] = t21;
230
+ $[61] = t25;
231
+ $[62] = t4;
232
+ $[63] = t5;
233
+ $[64] = t6;
234
+ $[65] = t7;
235
+ $[66] = t8;
236
+ $[67] = t9;
237
+ $[68] = t26;
238
+ } else t26 = $[68];
239
+ return t26;
230
240
  };
231
241
  function _temp(segment) {
232
242
  return segment.type !== "literal" && segment.isPlaceholder === false;
@@ -0,0 +1,2 @@
1
+ import { RefObject } from 'react';
2
+ export declare const useFirefoxDateSegmentSelectionGuard: (containerRef: RefObject<HTMLElement | null>) => void;
@@ -0,0 +1,33 @@
1
+ import { c } from "react/compiler-runtime";
2
+ import { useLayoutEffect } from "react";
3
+ import { isFirefox } from "@react-aria/utils";
4
+ //#region src/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.ts
5
+ var isEditableElement = (element) => element instanceof HTMLElement && (element.matches("input, textarea") || element.isContentEditable);
6
+ var useFirefoxDateSegmentSelectionGuard = (containerRef) => {
7
+ const $ = c(3);
8
+ let t0;
9
+ let t1;
10
+ if ($[0] !== containerRef) {
11
+ t0 = () => {
12
+ const container = containerRef.current;
13
+ if (!container || !isFirefox()) return;
14
+ const onSelectionChange = (event) => {
15
+ const activeElement = document.activeElement;
16
+ const selection = window.getSelection();
17
+ if (isEditableElement(activeElement) && !container.contains(activeElement) && selection?.anchorNode && container.contains(selection.anchorNode)) event.stopImmediatePropagation();
18
+ };
19
+ document.addEventListener("selectionchange", onSelectionChange, true);
20
+ return () => document.removeEventListener("selectionchange", onSelectionChange, true);
21
+ };
22
+ t1 = [containerRef];
23
+ $[0] = containerRef;
24
+ $[1] = t0;
25
+ $[2] = t1;
26
+ } else {
27
+ t0 = $[1];
28
+ t1 = $[2];
29
+ }
30
+ useLayoutEffect(t0, t1);
31
+ };
32
+ //#endregion
33
+ export { useFirefoxDateSegmentSelectionGuard };
@@ -18,7 +18,7 @@ import { Controller } from "react-hook-form";
18
18
  //#region src/components/inputs/File/FileUpload.tsx
19
19
  var FileUploadBase = (props) => {
20
20
  const { t } = useTranslation("ui");
21
- const { ref: _ref, label, tooltipText, variant = "vertical", as = "button", helperText, isRequired, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, className, allowsMultiple = false, hideLabel, acceptedFileTypes, clearOnSuccess, emptyText = t(($) => $.ui.fileUpload.emptyText), uploadText = t(($_0) => $_0.ui.fileUpload.uploadText), browseText = t(($_1) => $_1.ui.fileUpload.browse), fileUpload, fileRemove, children, listRenderer, browseButtonProps, cancelButtonProps, onInvalidFileType, defaultState, ...rest } = props;
21
+ const { ref: _ref, label, tooltipText, variant = "vertical", as = "button", helperText, isRequired, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, className, allowsMultiple = false, hideLabel, acceptedFileTypes, clearOnSuccess, emptyText = t(($) => $.ui.fileUpload.emptyText), uploadText = t(($) => $.ui.fileUpload.uploadText), browseText = t(($) => $.ui.fileUpload.browse), fileUpload, fileRemove, children, listRenderer, browseButtonProps, cancelButtonProps, onInvalidFileType, defaultState, ...rest } = props;
22
22
  const ui = UIConfig.useConfig();
23
23
  const fileUploadDropZoneCva = UIOverrides.useCva("fileUpload.dropZoneCva", fileUploadDropZoneDefinition);
24
24
  const getInitialState = () => {