@povio/ui 3.3.0-rc.4 → 3.4.0-rc.1
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.
- package/README.md +15 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +55 -206
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
- package/dist/components/buttons/shared/ButtonContent.js +22 -80
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -2
- package/dist/components/inputs/Checkbox/Checkbox.js +93 -100
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +1 -2
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +109 -113
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +1 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +97 -238
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +1 -2
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +88 -214
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +1 -2
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +64 -143
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +1 -2
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +275 -294
- package/dist/components/inputs/DateTime/shared/Calendar.js +139 -339
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +114 -308
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +35 -150
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +95 -229
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +115 -296
- package/dist/components/inputs/DateTime/shared/DateField.js +135 -306
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +1 -2
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +136 -343
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +1 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +43 -46
- package/dist/components/inputs/File/FileUpload.d.ts +1 -1
- package/dist/components/inputs/File/FileUpload.js +18 -18
- package/dist/components/inputs/File/InputUpload.d.ts +1 -1
- package/dist/components/inputs/File/InputUpload.js +82 -278
- package/dist/components/inputs/File/fileUpload.types.d.ts +1 -1
- package/dist/components/inputs/File/inputUpload.types.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +48 -180
- package/dist/components/inputs/File/shared/FileUploadContentError.js +95 -265
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +99 -261
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +56 -234
- package/dist/components/inputs/File/shared/ProgressBar.js +15 -102
- package/dist/components/inputs/FormField/FormField.js +34 -47
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +19 -19
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +1 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +93 -331
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +1 -1
- package/dist/components/inputs/Input/TextArea/TextArea.js +18 -18
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -2
- package/dist/components/inputs/Input/TextInput/TextInput.js +36 -38
- package/dist/components/inputs/Inputs/Form.d.ts +4 -4
- package/dist/components/inputs/Inputs/InputItem.d.ts +22 -22
- package/dist/components/inputs/Inputs/InputItem.js +35 -36
- package/dist/components/inputs/Inputs/Inputs.d.ts +2 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.js +107 -111
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +26 -86
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +19 -19
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.js +49 -115
- package/dist/components/inputs/Selection/Select/Select.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/Select.js +22 -22
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +0 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +34 -37
- package/dist/components/inputs/Selection/shared/SelectInput.js +1 -0
- package/dist/components/inputs/Selection/shared/SelectListBox.js +51 -163
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/select.context.js +4 -8
- package/dist/components/inputs/Selection/shared/select.types.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/useSelectItems.js +48 -108
- package/dist/components/inputs/Skeleton/InputFrame.js +177 -552
- package/dist/components/inputs/Slider/Slider.d.ts +1 -1
- package/dist/components/inputs/Slider/Slider.js +18 -18
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +105 -407
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -2
- package/dist/components/inputs/Toggle/Toggle.js +59 -63
- package/dist/components/inputs/shared/InputClear.js +24 -40
- package/dist/components/inputs/shared/form.binding.d.ts +27 -0
- package/dist/components/inputs/shared/form.binding.js +57 -0
- package/dist/components/inputs/shared/form.types.d.ts +9 -8
- package/dist/components/inputs/shared/form.types.js +8 -0
- package/dist/components/navigation/Accordion/Accordion.js +22 -69
- package/dist/components/navigation/Accordion/AccordionItem.js +41 -86
- package/dist/components/navigation/Stepper/Stepper.js +22 -67
- package/dist/components/overlays/ActionModal/ActionModal.js +35 -169
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +29 -110
- package/dist/components/segment/Segment.d.ts +1 -1
- package/dist/components/segment/Segment.js +17 -17
- package/dist/components/segment/segment.types.d.ts +1 -1
- package/dist/components/shared/pagination/Pagination.js +22 -108
- package/dist/components/status/Alert/Alert.js +30 -97
- package/dist/components/table/InfiniteTable.js +16 -67
- package/dist/components/table/Table.d.ts +2 -8
- package/dist/components/table/Table.js +33 -55
- package/dist/components/text/Typography/Typography.js +8 -23
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/theme.context.js +45 -98
- package/dist/config/uiConfig.context.d.ts +5 -5
- package/dist/config/uiConfig.context.js +11 -51
- package/dist/config/uiOverrides.context.d.ts +0 -1
- package/dist/helpers/dynamicColumns.d.ts +1 -1
- package/dist/helpers/dynamicInputs.d.ts +7 -7
- package/dist/hooks/useAutosave.d.ts +4 -4
- package/dist/hooks/useAutosave.js +64 -49
- package/dist/hooks/useDebounceCallback.js +17 -51
- package/dist/hooks/useForm.d.ts +39 -15
- package/dist/hooks/useForm.js +96 -43
- package/dist/hooks/useFormAutosave.d.ts +8 -9
- package/dist/hooks/useFormAutosave.js +49 -122
- package/dist/hooks/useLongPressRepeat.js +20 -55
- package/dist/index.d.ts +2 -3
- package/dist/index.js +3 -4
- package/package.json +3 -4
- package/dist/components/inputs/FormField/formField.cva.d.ts +0 -11
- package/dist/components/inputs/FormField/formField.cva.js +0 -16
- package/dist/components/table/TableColumnFilterInput.d.ts +0 -9
- package/dist/components/table/TableColumnFilterInput.js +0 -108
- package/dist/components/table/TableColumnFilterPlaceholder.d.ts +0 -5
- package/dist/components/table/TableColumnFilterPlaceholder.js +0 -41
- package/dist/components/table/TableColumnFilterRow.d.ts +0 -16
- package/dist/components/table/TableColumnFilterRow.js +0 -68
- package/dist/hooks/useAutosave.spec.d.ts +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
2
|
+
import { FieldController } from "../../shared/form.binding.js";
|
|
2
3
|
import { FormField } from "../../FormField/FormField.js";
|
|
3
4
|
import { TimePickerForm } from "../shared/TimePickerForm.js";
|
|
4
5
|
import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
@@ -8,7 +9,6 @@ import { getStaticDateTimeFocusTarget, getStaticTimeSegments } from "../shared/s
|
|
|
8
9
|
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
9
10
|
import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
10
11
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
11
|
-
import { useDebounceCallback } from "../../../../hooks/useDebounceCallback.js";
|
|
12
12
|
import { TimePickerInput } from "../shared/TimePickerInput.js";
|
|
13
13
|
import { c } from "react/compiler-runtime";
|
|
14
14
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -16,13 +16,12 @@ import { clsx } from "clsx";
|
|
|
16
16
|
import { useEffect, useRef, useState } from "react";
|
|
17
17
|
import { useLocale, useTimeField } from "react-aria";
|
|
18
18
|
import { mergeRefs } from "@react-aria/utils";
|
|
19
|
-
import { Controller } from "react-hook-form";
|
|
20
19
|
import { getLocalTimeZone, now, toTime } from "@internationalized/date";
|
|
21
20
|
import { DateTime } from "luxon";
|
|
22
21
|
import { useTimeFieldState } from "react-stately";
|
|
23
22
|
//#region src/components/inputs/DateTime/TimePicker/TimePicker.tsx
|
|
24
23
|
var TimePickerBase = (props) => {
|
|
25
|
-
const $ = c(
|
|
24
|
+
const $ = c(140);
|
|
26
25
|
const ui = UIConfig.useConfig();
|
|
27
26
|
let asProp;
|
|
28
27
|
let className;
|
|
@@ -30,7 +29,6 @@ var TimePickerBase = (props) => {
|
|
|
30
29
|
let disableManualEntryProp;
|
|
31
30
|
let error;
|
|
32
31
|
let errorClassName;
|
|
33
|
-
let fireBlurOnChangeProp;
|
|
34
32
|
let headerClassName;
|
|
35
33
|
let helperText;
|
|
36
34
|
let hideLabelProp;
|
|
@@ -53,7 +51,7 @@ var TimePickerBase = (props) => {
|
|
|
53
51
|
let value;
|
|
54
52
|
let variantProp;
|
|
55
53
|
if ($[0] !== props) {
|
|
56
|
-
({ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, placeholder, className, inputClassName, variant: variantProp, as: asProp, size: sizeProp, hideLabel: hideLabelProp, isClearable: isClearableProp, disableManualEntry: disableManualEntryProp,
|
|
54
|
+
({ref, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, placeholder, className, inputClassName, variant: variantProp, as: asProp, size: sizeProp, hideLabel: hideLabelProp, isClearable: isClearableProp, disableManualEntry: disableManualEntryProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, ...rest} = props);
|
|
57
55
|
$[0] = props;
|
|
58
56
|
$[1] = asProp;
|
|
59
57
|
$[2] = className;
|
|
@@ -61,28 +59,27 @@ var TimePickerBase = (props) => {
|
|
|
61
59
|
$[4] = disableManualEntryProp;
|
|
62
60
|
$[5] = error;
|
|
63
61
|
$[6] = errorClassName;
|
|
64
|
-
$[7] =
|
|
65
|
-
$[8] =
|
|
66
|
-
$[9] =
|
|
67
|
-
$[10] =
|
|
68
|
-
$[11] =
|
|
69
|
-
$[12] =
|
|
70
|
-
$[13] =
|
|
71
|
-
$[14] =
|
|
72
|
-
$[15] =
|
|
73
|
-
$[16] =
|
|
74
|
-
$[17] =
|
|
75
|
-
$[18] =
|
|
76
|
-
$[19] =
|
|
77
|
-
$[20] =
|
|
78
|
-
$[21] =
|
|
79
|
-
$[22] =
|
|
80
|
-
$[23] =
|
|
81
|
-
$[24] =
|
|
82
|
-
$[25] =
|
|
83
|
-
$[26] =
|
|
84
|
-
$[27] =
|
|
85
|
-
$[28] = variantProp;
|
|
62
|
+
$[7] = headerClassName;
|
|
63
|
+
$[8] = helperText;
|
|
64
|
+
$[9] = hideLabelProp;
|
|
65
|
+
$[10] = inputClassName;
|
|
66
|
+
$[11] = isClearableProp;
|
|
67
|
+
$[12] = isDirty;
|
|
68
|
+
$[13] = isDisabled;
|
|
69
|
+
$[14] = isHeaderHidden;
|
|
70
|
+
$[15] = isRequired;
|
|
71
|
+
$[16] = label;
|
|
72
|
+
$[17] = onBlur;
|
|
73
|
+
$[18] = onChange;
|
|
74
|
+
$[19] = placeholder;
|
|
75
|
+
$[20] = ref;
|
|
76
|
+
$[21] = rest;
|
|
77
|
+
$[22] = rightContent;
|
|
78
|
+
$[23] = shouldForceLeadingZerosProp;
|
|
79
|
+
$[24] = sizeProp;
|
|
80
|
+
$[25] = tooltipText;
|
|
81
|
+
$[26] = value;
|
|
82
|
+
$[27] = variantProp;
|
|
86
83
|
} else {
|
|
87
84
|
asProp = $[1];
|
|
88
85
|
className = $[2];
|
|
@@ -90,28 +87,27 @@ var TimePickerBase = (props) => {
|
|
|
90
87
|
disableManualEntryProp = $[4];
|
|
91
88
|
error = $[5];
|
|
92
89
|
errorClassName = $[6];
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
variantProp = $[28];
|
|
90
|
+
headerClassName = $[7];
|
|
91
|
+
helperText = $[8];
|
|
92
|
+
hideLabelProp = $[9];
|
|
93
|
+
inputClassName = $[10];
|
|
94
|
+
isClearableProp = $[11];
|
|
95
|
+
isDirty = $[12];
|
|
96
|
+
isDisabled = $[13];
|
|
97
|
+
isHeaderHidden = $[14];
|
|
98
|
+
isRequired = $[15];
|
|
99
|
+
label = $[16];
|
|
100
|
+
onBlur = $[17];
|
|
101
|
+
onChange = $[18];
|
|
102
|
+
placeholder = $[19];
|
|
103
|
+
ref = $[20];
|
|
104
|
+
rest = $[21];
|
|
105
|
+
rightContent = $[22];
|
|
106
|
+
shouldForceLeadingZerosProp = $[23];
|
|
107
|
+
sizeProp = $[24];
|
|
108
|
+
tooltipText = $[25];
|
|
109
|
+
value = $[26];
|
|
110
|
+
variantProp = $[27];
|
|
115
111
|
}
|
|
116
112
|
const variant = variantProp ?? ui.input.variant;
|
|
117
113
|
const as = asProp ?? ui.input.as;
|
|
@@ -119,11 +115,10 @@ var TimePickerBase = (props) => {
|
|
|
119
115
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
120
116
|
const isClearable = isClearableProp ?? ui.input.isClearable;
|
|
121
117
|
const disableManualEntry = disableManualEntryProp ?? ui.dateInput.disableManualEntry;
|
|
122
|
-
const fireBlurOnChange = fireBlurOnChangeProp ?? ui.dateInput.fireBlurOnChange;
|
|
123
118
|
const shouldForceLeadingZeros = shouldForceLeadingZerosProp ?? ui.dateInput.shouldForceLeadingZeros;
|
|
124
119
|
const t0 = isHeaderHidden || as === "inline" || as === "filter" || as === "floating";
|
|
125
120
|
let t1;
|
|
126
|
-
if ($[
|
|
121
|
+
if ($[28] !== error || $[29] !== errorClassName || $[30] !== headerClassName || $[31] !== helperText || $[32] !== hideLabel || $[33] !== isDisabled || $[34] !== isRequired || $[35] !== label || $[36] !== rightContent || $[37] !== t0 || $[38] !== tooltipText) {
|
|
127
122
|
t1 = {
|
|
128
123
|
error,
|
|
129
124
|
label,
|
|
@@ -137,19 +132,19 @@ var TimePickerBase = (props) => {
|
|
|
137
132
|
headerClassName,
|
|
138
133
|
errorClassName
|
|
139
134
|
};
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
$[
|
|
149
|
-
$[
|
|
150
|
-
$[
|
|
151
|
-
$[
|
|
152
|
-
} else t1 = $[
|
|
135
|
+
$[28] = error;
|
|
136
|
+
$[29] = errorClassName;
|
|
137
|
+
$[30] = headerClassName;
|
|
138
|
+
$[31] = helperText;
|
|
139
|
+
$[32] = hideLabel;
|
|
140
|
+
$[33] = isDisabled;
|
|
141
|
+
$[34] = isRequired;
|
|
142
|
+
$[35] = label;
|
|
143
|
+
$[36] = rightContent;
|
|
144
|
+
$[37] = t0;
|
|
145
|
+
$[38] = tooltipText;
|
|
146
|
+
$[39] = t1;
|
|
147
|
+
} else t1 = $[39];
|
|
153
148
|
const formFieldProps = t1;
|
|
154
149
|
const [isOpen, setIsOpen] = useState(false);
|
|
155
150
|
const initialDateEmitRef = useRef(true);
|
|
@@ -157,222 +152,210 @@ var TimePickerBase = (props) => {
|
|
|
157
152
|
const normalizedValue = value ?? null;
|
|
158
153
|
const t2 = normalizedValue ?? rest.defaultValue ?? null;
|
|
159
154
|
let t3;
|
|
160
|
-
if ($[
|
|
155
|
+
if ($[40] !== locale || $[41] !== rest || $[42] !== shouldForceLeadingZeros || $[43] !== t2) {
|
|
161
156
|
t3 = {
|
|
162
157
|
...rest,
|
|
163
158
|
defaultValue: t2,
|
|
164
159
|
locale,
|
|
165
160
|
shouldForceLeadingZeros
|
|
166
161
|
};
|
|
167
|
-
$[
|
|
168
|
-
$[
|
|
169
|
-
$[
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
} else t3 = $[
|
|
162
|
+
$[40] = locale;
|
|
163
|
+
$[41] = rest;
|
|
164
|
+
$[42] = shouldForceLeadingZeros;
|
|
165
|
+
$[43] = t2;
|
|
166
|
+
$[44] = t3;
|
|
167
|
+
} else t3 = $[44];
|
|
173
168
|
const dialogState = useTimeFieldState(t3);
|
|
174
169
|
let t4;
|
|
175
|
-
if ($[
|
|
170
|
+
if ($[45] !== onBlur) {
|
|
176
171
|
t4 = (val) => {
|
|
177
172
|
onBlur?.({ target: { value: val } });
|
|
178
173
|
};
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
} else t4 = $[
|
|
174
|
+
$[45] = onBlur;
|
|
175
|
+
$[46] = t4;
|
|
176
|
+
} else t4 = $[46];
|
|
182
177
|
const handleBlur = t4;
|
|
183
178
|
let t5;
|
|
184
|
-
if ($[
|
|
185
|
-
t5 =
|
|
179
|
+
if ($[47] !== onChange) {
|
|
180
|
+
t5 = (val_0) => {
|
|
181
|
+
onChange?.(val_0);
|
|
182
|
+
};
|
|
183
|
+
$[47] = onChange;
|
|
186
184
|
$[48] = t5;
|
|
187
185
|
} else t5 = $[48];
|
|
188
|
-
const { callback: debouncedBlur } = useDebounceCallback(handleBlur, t5);
|
|
189
186
|
let t6;
|
|
190
|
-
if ($[49] !==
|
|
191
|
-
t6 =
|
|
192
|
-
onChange?.(val_0);
|
|
193
|
-
if (fireBlurOnChange) debouncedBlur(val_0);
|
|
194
|
-
};
|
|
195
|
-
$[49] = debouncedBlur;
|
|
196
|
-
$[50] = fireBlurOnChange;
|
|
197
|
-
$[51] = onChange;
|
|
198
|
-
$[52] = t6;
|
|
199
|
-
} else t6 = $[52];
|
|
200
|
-
let t7;
|
|
201
|
-
if ($[53] !== isDisabled || $[54] !== locale || $[55] !== normalizedValue || $[56] !== rest || $[57] !== shouldForceLeadingZeros || $[58] !== t6) {
|
|
202
|
-
t7 = {
|
|
187
|
+
if ($[49] !== isDisabled || $[50] !== locale || $[51] !== normalizedValue || $[52] !== rest || $[53] !== shouldForceLeadingZeros || $[54] !== t5) {
|
|
188
|
+
t6 = {
|
|
203
189
|
...rest,
|
|
204
190
|
isDisabled,
|
|
205
191
|
value: normalizedValue,
|
|
206
|
-
onChange:
|
|
192
|
+
onChange: t5,
|
|
207
193
|
locale,
|
|
208
194
|
shouldForceLeadingZeros
|
|
209
195
|
};
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
} else
|
|
218
|
-
const state = useTimeFieldState(
|
|
219
|
-
let
|
|
220
|
-
if ($[
|
|
221
|
-
|
|
196
|
+
$[49] = isDisabled;
|
|
197
|
+
$[50] = locale;
|
|
198
|
+
$[51] = normalizedValue;
|
|
199
|
+
$[52] = rest;
|
|
200
|
+
$[53] = shouldForceLeadingZeros;
|
|
201
|
+
$[54] = t5;
|
|
202
|
+
$[55] = t6;
|
|
203
|
+
} else t6 = $[55];
|
|
204
|
+
const state = useTimeFieldState(t6);
|
|
205
|
+
let t7;
|
|
206
|
+
if ($[56] !== onChange || $[57] !== state.timeValue) {
|
|
207
|
+
t7 = () => {
|
|
222
208
|
if (initialDateEmitRef.current) {
|
|
223
209
|
initialDateEmitRef.current = false;
|
|
224
210
|
return;
|
|
225
211
|
}
|
|
226
212
|
if (state.timeValue) onChange?.(state.timeValue);
|
|
227
213
|
};
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
} else
|
|
232
|
-
let
|
|
233
|
-
if ($[
|
|
234
|
-
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
} else
|
|
238
|
-
useEffect(
|
|
214
|
+
$[56] = onChange;
|
|
215
|
+
$[57] = state.timeValue;
|
|
216
|
+
$[58] = t7;
|
|
217
|
+
} else t7 = $[58];
|
|
218
|
+
let t8;
|
|
219
|
+
if ($[59] !== rest.date) {
|
|
220
|
+
t8 = [rest.date];
|
|
221
|
+
$[59] = rest.date;
|
|
222
|
+
$[60] = t8;
|
|
223
|
+
} else t8 = $[60];
|
|
224
|
+
useEffect(t7, t8);
|
|
239
225
|
const timeFieldRef = useRef(null);
|
|
240
|
-
let
|
|
241
|
-
if ($[
|
|
242
|
-
|
|
226
|
+
let t9;
|
|
227
|
+
if ($[61] !== disableManualEntry || $[62] !== label || $[63] !== rest || $[64] !== shouldForceLeadingZeros) {
|
|
228
|
+
t9 = {
|
|
243
229
|
...rest,
|
|
244
230
|
label,
|
|
245
231
|
isReadOnly: disableManualEntry,
|
|
246
232
|
shouldForceLeadingZeros
|
|
247
233
|
};
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
} else
|
|
254
|
-
const { labelProps, fieldProps } = useTimeField(
|
|
255
|
-
const
|
|
256
|
-
let
|
|
257
|
-
if ($[
|
|
258
|
-
|
|
234
|
+
$[61] = disableManualEntry;
|
|
235
|
+
$[62] = label;
|
|
236
|
+
$[63] = rest;
|
|
237
|
+
$[64] = shouldForceLeadingZeros;
|
|
238
|
+
$[65] = t9;
|
|
239
|
+
} else t9 = $[65];
|
|
240
|
+
const { labelProps, fieldProps } = useTimeField(t9, state, timeFieldRef);
|
|
241
|
+
const t10 = hideLabel || isHeaderHidden;
|
|
242
|
+
let t11;
|
|
243
|
+
if ($[66] !== headerClassName || $[67] !== helperText || $[68] !== isDisabled || $[69] !== isRequired || $[70] !== label || $[71] !== labelProps || $[72] !== rightContent || $[73] !== t10 || $[74] !== tooltipText) {
|
|
244
|
+
t11 = {
|
|
259
245
|
label,
|
|
260
246
|
tooltipText,
|
|
261
247
|
helperText,
|
|
262
248
|
isRequired,
|
|
263
249
|
rightContent,
|
|
264
|
-
isHeaderHidden:
|
|
250
|
+
isHeaderHidden: t10,
|
|
265
251
|
isDisabled,
|
|
266
252
|
className: headerClassName,
|
|
267
253
|
labelProps
|
|
268
254
|
};
|
|
269
|
-
$[
|
|
270
|
-
$[
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
} else
|
|
280
|
-
const headerProps =
|
|
281
|
-
let
|
|
282
|
-
if ($[
|
|
283
|
-
|
|
255
|
+
$[66] = headerClassName;
|
|
256
|
+
$[67] = helperText;
|
|
257
|
+
$[68] = isDisabled;
|
|
258
|
+
$[69] = isRequired;
|
|
259
|
+
$[70] = label;
|
|
260
|
+
$[71] = labelProps;
|
|
261
|
+
$[72] = rightContent;
|
|
262
|
+
$[73] = t10;
|
|
263
|
+
$[74] = tooltipText;
|
|
264
|
+
$[75] = t11;
|
|
265
|
+
} else t11 = $[75];
|
|
266
|
+
const headerProps = t11;
|
|
267
|
+
let t12;
|
|
268
|
+
if ($[76] !== dialogState.value || $[77] !== state) {
|
|
269
|
+
t12 = () => {
|
|
284
270
|
const newValue = dialogState.value;
|
|
285
271
|
state.setValue(newValue);
|
|
286
272
|
setIsOpen(false);
|
|
287
|
-
if (fireBlurOnChange) handleBlur(newValue);
|
|
288
273
|
};
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
$[
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
if ($[85] !== dialogState || $[86] !== isOpen || $[87] !== state.value) {
|
|
298
|
-
t14 = (open) => {
|
|
274
|
+
$[76] = dialogState.value;
|
|
275
|
+
$[77] = state;
|
|
276
|
+
$[78] = t12;
|
|
277
|
+
} else t12 = $[78];
|
|
278
|
+
const onApply = t12;
|
|
279
|
+
let t13;
|
|
280
|
+
if ($[79] !== dialogState || $[80] !== isOpen || $[81] !== state.value) {
|
|
281
|
+
t13 = (open) => {
|
|
299
282
|
setIsOpen(open);
|
|
300
283
|
if (!isOpen) dialogState.setValue(state.value);
|
|
301
284
|
};
|
|
302
|
-
$[
|
|
303
|
-
$[
|
|
304
|
-
$[
|
|
305
|
-
$[
|
|
306
|
-
} else
|
|
307
|
-
const onOpenChange =
|
|
308
|
-
let
|
|
309
|
-
if ($[
|
|
310
|
-
|
|
285
|
+
$[79] = dialogState;
|
|
286
|
+
$[80] = isOpen;
|
|
287
|
+
$[81] = state.value;
|
|
288
|
+
$[82] = t13;
|
|
289
|
+
} else t13 = $[82];
|
|
290
|
+
const onOpenChange = t13;
|
|
291
|
+
let t14;
|
|
292
|
+
if ($[83] !== dialogState || $[84] !== state.value) {
|
|
293
|
+
t14 = () => {
|
|
311
294
|
dialogState.setValue(state.value);
|
|
312
295
|
setIsOpen(true);
|
|
313
296
|
};
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
} else
|
|
318
|
-
const onOpen =
|
|
319
|
-
let
|
|
320
|
-
if ($[
|
|
321
|
-
|
|
297
|
+
$[83] = dialogState;
|
|
298
|
+
$[84] = state.value;
|
|
299
|
+
$[85] = t14;
|
|
300
|
+
} else t14 = $[85];
|
|
301
|
+
const onOpen = t14;
|
|
302
|
+
let t15;
|
|
303
|
+
if ($[86] !== onChange) {
|
|
304
|
+
t15 = () => {
|
|
322
305
|
onChange?.(null);
|
|
323
306
|
};
|
|
324
|
-
$[
|
|
325
|
-
$[
|
|
326
|
-
} else
|
|
327
|
-
const onInputClear =
|
|
328
|
-
const
|
|
329
|
-
let
|
|
330
|
-
if ($[
|
|
331
|
-
|
|
332
|
-
$[
|
|
333
|
-
$[
|
|
334
|
-
} else
|
|
335
|
-
const
|
|
307
|
+
$[86] = onChange;
|
|
308
|
+
$[87] = t15;
|
|
309
|
+
} else t15 = $[87];
|
|
310
|
+
const onInputClear = t15;
|
|
311
|
+
const t16 = as === "inline" ? -1 : void 0;
|
|
312
|
+
let t17;
|
|
313
|
+
if ($[88] !== className) {
|
|
314
|
+
t17 = clsx("group relative inline-flex w-full flex-col text-left", className);
|
|
315
|
+
$[88] = className;
|
|
316
|
+
$[89] = t17;
|
|
317
|
+
} else t17 = $[89];
|
|
318
|
+
const t18 = as === "inline" ? -1 : void 0;
|
|
319
|
+
let t19;
|
|
320
|
+
if ($[90] !== ref) {
|
|
321
|
+
t19 = mergeRefs(ref, timeFieldRef);
|
|
322
|
+
$[90] = ref;
|
|
323
|
+
$[91] = t19;
|
|
324
|
+
} else t19 = $[91];
|
|
336
325
|
let t20;
|
|
337
|
-
if ($[
|
|
338
|
-
t20 =
|
|
339
|
-
$[96] = ref;
|
|
340
|
-
$[97] = t20;
|
|
341
|
-
} else t20 = $[97];
|
|
342
|
-
let t21;
|
|
343
|
-
if ($[98] !== fieldProps || $[99] !== handleBlur || $[100] !== state.value) {
|
|
344
|
-
t21 = (event) => {
|
|
326
|
+
if ($[92] !== fieldProps || $[93] !== handleBlur || $[94] !== state.value) {
|
|
327
|
+
t20 = (event) => {
|
|
345
328
|
fieldProps.onBlur?.(event);
|
|
346
329
|
handleBlur(state.value);
|
|
347
330
|
};
|
|
348
|
-
$[
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
} else
|
|
353
|
-
let
|
|
354
|
-
if ($[
|
|
355
|
-
|
|
331
|
+
$[92] = fieldProps;
|
|
332
|
+
$[93] = handleBlur;
|
|
333
|
+
$[94] = state.value;
|
|
334
|
+
$[95] = t20;
|
|
335
|
+
} else t20 = $[95];
|
|
336
|
+
let t21;
|
|
337
|
+
if ($[96] !== fieldProps || $[97] !== t20) {
|
|
338
|
+
t21 = {
|
|
356
339
|
...fieldProps,
|
|
357
|
-
onBlur:
|
|
340
|
+
onBlur: t20
|
|
358
341
|
};
|
|
359
|
-
$[
|
|
360
|
-
$[
|
|
361
|
-
$[
|
|
362
|
-
} else
|
|
363
|
-
const
|
|
364
|
-
let
|
|
365
|
-
if ($[
|
|
366
|
-
|
|
367
|
-
ref:
|
|
342
|
+
$[96] = fieldProps;
|
|
343
|
+
$[97] = t20;
|
|
344
|
+
$[98] = t21;
|
|
345
|
+
} else t21 = $[98];
|
|
346
|
+
const t22 = !!error;
|
|
347
|
+
let t23;
|
|
348
|
+
if ($[99] !== as || $[100] !== disableDropdown || $[101] !== disableManualEntry || $[102] !== headerProps || $[103] !== inputClassName || $[104] !== isClearable || $[105] !== isDirty || $[106] !== isDisabled || $[107] !== isRequired || $[108] !== onInputClear || $[109] !== onOpen || $[110] !== placeholder || $[111] !== size || $[112] !== state || $[113] !== t19 || $[114] !== t21 || $[115] !== t22 || $[116] !== variant) {
|
|
349
|
+
t23 = /* @__PURE__ */ jsx(TimePickerInput, {
|
|
350
|
+
ref: t19,
|
|
368
351
|
as,
|
|
369
|
-
fieldProps:
|
|
352
|
+
fieldProps: t21,
|
|
370
353
|
state,
|
|
371
354
|
onPress: onOpen,
|
|
372
355
|
isDisabled,
|
|
373
356
|
isDirty,
|
|
374
357
|
isRequired,
|
|
375
|
-
isInvalid:
|
|
358
|
+
isInvalid: t22,
|
|
376
359
|
disableDropdown,
|
|
377
360
|
variant,
|
|
378
361
|
size,
|
|
@@ -381,33 +364,31 @@ var TimePickerBase = (props) => {
|
|
|
381
364
|
disableManualEntry,
|
|
382
365
|
placeholder,
|
|
383
366
|
className: inputClassName,
|
|
384
|
-
onClear: onInputClear
|
|
385
|
-
fireBlurOnChange
|
|
367
|
+
onClear: onInputClear
|
|
386
368
|
});
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
$[
|
|
390
|
-
$[
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
-
$[
|
|
397
|
-
$[
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
401
|
-
$[
|
|
402
|
-
$[
|
|
403
|
-
$[
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
t25 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(DateTimeDialog, {
|
|
369
|
+
$[99] = as;
|
|
370
|
+
$[100] = disableDropdown;
|
|
371
|
+
$[101] = disableManualEntry;
|
|
372
|
+
$[102] = headerProps;
|
|
373
|
+
$[103] = inputClassName;
|
|
374
|
+
$[104] = isClearable;
|
|
375
|
+
$[105] = isDirty;
|
|
376
|
+
$[106] = isDisabled;
|
|
377
|
+
$[107] = isRequired;
|
|
378
|
+
$[108] = onInputClear;
|
|
379
|
+
$[109] = onOpen;
|
|
380
|
+
$[110] = placeholder;
|
|
381
|
+
$[111] = size;
|
|
382
|
+
$[112] = state;
|
|
383
|
+
$[113] = t19;
|
|
384
|
+
$[114] = t21;
|
|
385
|
+
$[115] = t22;
|
|
386
|
+
$[116] = variant;
|
|
387
|
+
$[117] = t23;
|
|
388
|
+
} else t23 = $[117];
|
|
389
|
+
let t24;
|
|
390
|
+
if ($[118] !== dialogState || $[119] !== disableDropdown || $[120] !== disableManualEntry || $[121] !== isDisabled || $[122] !== isOpen || $[123] !== label || $[124] !== onApply || $[125] !== onOpenChange) {
|
|
391
|
+
t24 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(DateTimeDialog, {
|
|
411
392
|
footer: /* @__PURE__ */ jsx(DateTimeDialogFooter, {
|
|
412
393
|
isDisabled,
|
|
413
394
|
onApply,
|
|
@@ -419,50 +400,50 @@ var TimePickerBase = (props) => {
|
|
|
419
400
|
onOpenChange,
|
|
420
401
|
children: /* @__PURE__ */ jsx(TimePickerForm, { state: dialogState })
|
|
421
402
|
});
|
|
422
|
-
$[
|
|
423
|
-
$[
|
|
424
|
-
$[
|
|
425
|
-
$[
|
|
426
|
-
$[
|
|
427
|
-
$[
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
} else
|
|
432
|
-
let
|
|
433
|
-
if ($[
|
|
434
|
-
|
|
403
|
+
$[118] = dialogState;
|
|
404
|
+
$[119] = disableDropdown;
|
|
405
|
+
$[120] = disableManualEntry;
|
|
406
|
+
$[121] = isDisabled;
|
|
407
|
+
$[122] = isOpen;
|
|
408
|
+
$[123] = label;
|
|
409
|
+
$[124] = onApply;
|
|
410
|
+
$[125] = onOpenChange;
|
|
411
|
+
$[126] = t24;
|
|
412
|
+
} else t24 = $[126];
|
|
413
|
+
let t25;
|
|
414
|
+
if ($[127] !== as || $[128] !== formFieldProps || $[129] !== labelProps || $[130] !== t17 || $[131] !== t18 || $[132] !== t23 || $[133] !== t24) {
|
|
415
|
+
t25 = /* @__PURE__ */ jsxs(FormField, {
|
|
435
416
|
...formFieldProps,
|
|
436
417
|
as,
|
|
437
418
|
labelProps,
|
|
438
|
-
className:
|
|
439
|
-
tabIndex:
|
|
440
|
-
children: [
|
|
419
|
+
className: t17,
|
|
420
|
+
tabIndex: t18,
|
|
421
|
+
children: [t23, t24]
|
|
441
422
|
});
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
-
$[
|
|
445
|
-
$[
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
449
|
-
$[
|
|
450
|
-
} else
|
|
451
|
-
let
|
|
452
|
-
if ($[
|
|
453
|
-
|
|
423
|
+
$[127] = as;
|
|
424
|
+
$[128] = formFieldProps;
|
|
425
|
+
$[129] = labelProps;
|
|
426
|
+
$[130] = t17;
|
|
427
|
+
$[131] = t18;
|
|
428
|
+
$[132] = t23;
|
|
429
|
+
$[133] = t24;
|
|
430
|
+
$[134] = t25;
|
|
431
|
+
} else t25 = $[134];
|
|
432
|
+
let t26;
|
|
433
|
+
if ($[135] !== as || $[136] !== error || $[137] !== t16 || $[138] !== t25) {
|
|
434
|
+
t26 = /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
454
435
|
as,
|
|
455
436
|
error,
|
|
456
|
-
triggerTabIndex:
|
|
457
|
-
children:
|
|
437
|
+
triggerTabIndex: t16,
|
|
438
|
+
children: t25
|
|
458
439
|
});
|
|
459
|
-
$[
|
|
460
|
-
$[
|
|
461
|
-
$[
|
|
462
|
-
$[
|
|
463
|
-
$[
|
|
464
|
-
} else
|
|
465
|
-
return
|
|
440
|
+
$[135] = as;
|
|
441
|
+
$[136] = error;
|
|
442
|
+
$[137] = t16;
|
|
443
|
+
$[138] = t25;
|
|
444
|
+
$[139] = t26;
|
|
445
|
+
} else t26 = $[139];
|
|
446
|
+
return t26;
|
|
466
447
|
};
|
|
467
448
|
var TimePickerInner = (t0) => {
|
|
468
449
|
const $ = c(9);
|
|
@@ -583,35 +564,35 @@ var TimePicker = (t0) => {
|
|
|
583
564
|
props = $[1];
|
|
584
565
|
renderStaticInput = $[2];
|
|
585
566
|
}
|
|
586
|
-
if ("
|
|
587
|
-
let
|
|
567
|
+
if ("field" in props && props.field) {
|
|
568
|
+
let field;
|
|
588
569
|
let innerProps;
|
|
589
570
|
let ref;
|
|
590
571
|
if ($[3] !== props) {
|
|
591
|
-
({
|
|
572
|
+
({field, ref, ...innerProps} = props);
|
|
592
573
|
$[3] = props;
|
|
593
|
-
$[4] =
|
|
574
|
+
$[4] = field;
|
|
594
575
|
$[5] = innerProps;
|
|
595
576
|
$[6] = ref;
|
|
596
577
|
} else {
|
|
597
|
-
|
|
578
|
+
field = $[4];
|
|
598
579
|
innerProps = $[5];
|
|
599
580
|
ref = $[6];
|
|
600
581
|
}
|
|
601
|
-
const controlWithOptions =
|
|
582
|
+
const controlWithOptions = field.form;
|
|
602
583
|
let t1;
|
|
603
584
|
if ($[7] !== controlWithOptions._options?.disabled || $[8] !== innerProps || $[9] !== props.error || $[10] !== props.isDisabled || $[11] !== ref || $[12] !== renderStaticInput) {
|
|
604
585
|
t1 = (t2) => {
|
|
605
|
-
const { field, fieldState: t3 } = t2;
|
|
586
|
+
const { field: field_0, fieldState: t3 } = t2;
|
|
606
587
|
const { error, isDirty } = t3;
|
|
607
588
|
return /* @__PURE__ */ jsx(TimePickerInner, {
|
|
608
589
|
...innerProps,
|
|
609
|
-
ref: mergeRefs(ref,
|
|
610
|
-
value:
|
|
611
|
-
onChange:
|
|
612
|
-
onBlur:
|
|
590
|
+
ref: mergeRefs(ref, field_0.ref),
|
|
591
|
+
value: field_0.value ?? null,
|
|
592
|
+
onChange: field_0.onChange,
|
|
593
|
+
onBlur: field_0.onBlur,
|
|
613
594
|
isDirty,
|
|
614
|
-
isDisabled:
|
|
595
|
+
isDisabled: field_0.disabled || props.isDisabled,
|
|
615
596
|
isFormControlDisabled: !!controlWithOptions._options?.disabled,
|
|
616
597
|
error: props.error ?? error?.message,
|
|
617
598
|
renderStaticInput
|
|
@@ -626,14 +607,14 @@ var TimePicker = (t0) => {
|
|
|
626
607
|
$[13] = t1;
|
|
627
608
|
} else t1 = $[13];
|
|
628
609
|
let t2;
|
|
629
|
-
if ($[14] !==
|
|
630
|
-
t2 = /* @__PURE__ */ jsx(
|
|
631
|
-
control:
|
|
632
|
-
name:
|
|
610
|
+
if ($[14] !== field.form || $[15] !== field.name || $[16] !== t1) {
|
|
611
|
+
t2 = /* @__PURE__ */ jsx(FieldController, {
|
|
612
|
+
control: field.form,
|
|
613
|
+
name: field.name,
|
|
633
614
|
render: t1
|
|
634
615
|
});
|
|
635
|
-
$[14] =
|
|
636
|
-
$[15] =
|
|
616
|
+
$[14] = field.form;
|
|
617
|
+
$[15] = field.name;
|
|
637
618
|
$[16] = t1;
|
|
638
619
|
$[17] = t2;
|
|
639
620
|
} else t2 = $[17];
|