@povio/ui 3.2.4-rc.4 → 3.3.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/dist/components/buttons/Button/button.cva.d.ts +1 -1
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +0 -1
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +127 -142
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +17 -2
- package/dist/components/inputs/DateTime/shared/DateField.js +87 -92
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +0 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +134 -144
- package/dist/components/inputs/FormField/FormField.js +47 -34
- package/dist/components/inputs/FormField/formField.cva.d.ts +11 -0
- package/dist/components/inputs/FormField/formField.cva.js +16 -0
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +1 -2
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +1 -2
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +2 -54
- package/dist/components/inputs/Selection/Select/QuerySelect.js +46 -99
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +0 -1
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +0 -1
- package/dist/components/inputs/Selection/shared/select.context.js +9 -19
- package/dist/components/inputs/shared/input.cva.js +1 -1
- package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
- package/dist/components/table/Table.d.ts +8 -2
- package/dist/components/table/Table.js +55 -33
- package/dist/components/table/TableColumnFilterInput.d.ts +9 -0
- package/dist/components/table/TableColumnFilterInput.js +108 -0
- package/dist/components/table/TableColumnFilterPlaceholder.d.ts +5 -0
- package/dist/components/table/TableColumnFilterPlaceholder.js +41 -0
- package/dist/components/table/TableColumnFilterRow.d.ts +16 -0
- package/dist/components/table/TableColumnFilterRow.js +68 -0
- package/dist/config/uiConfig.context.d.ts +0 -1
- package/dist/config/uiConfig.context.js +1 -2
- package/dist/config/uiOverrides.context.d.ts +1 -0
- package/dist/helpers/dynamicColumns.js +1 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/utils/date-time.utils.d.ts +1 -0
- package/dist/utils/date-time.utils.js +45 -21
- package/package.json +1 -1
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +0 -33
- package/dist/utils/intl.utils.d.ts +0 -7
- package/dist/utils/intl.utils.js +0 -38
- package/dist/utils/intl.utils.spec.d.ts +0 -1
|
@@ -4,19 +4,17 @@ 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";
|
|
8
7
|
import { InputClear } from "../../shared/InputClear.js";
|
|
9
8
|
import { TimeField } from "./TimeField.js";
|
|
10
9
|
import { c } from "react/compiler-runtime";
|
|
11
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
11
|
import { clsx } from "clsx";
|
|
13
|
-
import {
|
|
12
|
+
import { useState } from "react";
|
|
14
13
|
import { Button } from "react-aria-components";
|
|
15
14
|
import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
16
|
-
import { mergeRefs } from "@react-aria/utils";
|
|
17
15
|
//#region src/components/inputs/DateTime/shared/TimePickerInput.tsx
|
|
18
16
|
var TimePickerInput = (t0) => {
|
|
19
|
-
const $ = c(
|
|
17
|
+
const $ = c(67);
|
|
20
18
|
const { ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, headerProps, disableManualEntry, placeholder, className, onPress, onClear, fireBlurOnChange, ...props } = t0;
|
|
21
19
|
const uiConfig = UIConfig.useConfig();
|
|
22
20
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
@@ -36,8 +34,6 @@ var TimePickerInput = (t0) => {
|
|
|
36
34
|
} else t2 = $[2];
|
|
37
35
|
const { focusWithinProps } = useFocusWithin(t2);
|
|
38
36
|
const { isFocusVisible } = useFocusVisible();
|
|
39
|
-
const containerRef = useRef(null);
|
|
40
|
-
useFirefoxDateSegmentSelectionGuard(containerRef);
|
|
41
37
|
const hidePlaceholder = as === "floating" && !state.value && !isFocused;
|
|
42
38
|
let t3;
|
|
43
39
|
if ($[3] !== state.segments) {
|
|
@@ -46,62 +42,56 @@ var TimePickerInput = (t0) => {
|
|
|
46
42
|
$[4] = t3;
|
|
47
43
|
} else t3 = $[4];
|
|
48
44
|
const canClear = t3;
|
|
49
|
-
|
|
50
|
-
if ($[5] !== ref) {
|
|
51
|
-
t4 = mergeRefs(ref, containerRef);
|
|
52
|
-
$[5] = ref;
|
|
53
|
-
$[6] = t4;
|
|
54
|
-
} else t4 = $[6];
|
|
55
|
-
const t5 = clsx(inputBaseCva({
|
|
45
|
+
const t4 = clsx(inputBaseCva({
|
|
56
46
|
variant,
|
|
57
47
|
as,
|
|
58
48
|
...props
|
|
59
49
|
}), "group/date-picker-content relative min-w-input-width-min-width", "flex items-center justify-between gap-input-gap-input-text-to-elements", className);
|
|
60
|
-
const
|
|
50
|
+
const t5 = isHovered || void 0;
|
|
51
|
+
const t6 = isDisabled || void 0;
|
|
61
52
|
const t7 = isDisabled || void 0;
|
|
62
|
-
const t8 =
|
|
63
|
-
const t9 =
|
|
64
|
-
const t10 =
|
|
65
|
-
const t11 = isFocused || void 0;
|
|
66
|
-
const t12 =
|
|
67
|
-
const t13 =
|
|
68
|
-
const t14 =
|
|
69
|
-
const t15 =
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
t17 = clsx(inputSizeCva({
|
|
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({
|
|
74
64
|
size,
|
|
75
65
|
as
|
|
76
66
|
}), "flex w-full items-center gap-input-gap-input-text-to-elements pr-0!");
|
|
77
|
-
$[
|
|
78
|
-
$[
|
|
79
|
-
$[
|
|
80
|
-
$[
|
|
81
|
-
} else
|
|
82
|
-
let
|
|
83
|
-
if ($[
|
|
84
|
-
|
|
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, {
|
|
85
75
|
onPress,
|
|
86
76
|
className: "absolute inset-0 z-base"
|
|
87
77
|
});
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
} else
|
|
92
|
-
let
|
|
93
|
-
if ($[
|
|
94
|
-
|
|
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, {
|
|
95
85
|
as,
|
|
96
86
|
...headerProps
|
|
97
87
|
});
|
|
98
|
-
$[
|
|
99
|
-
$[
|
|
100
|
-
$[
|
|
101
|
-
} else
|
|
102
|
-
let
|
|
103
|
-
if ($[
|
|
104
|
-
|
|
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, {
|
|
105
95
|
size: "label-1",
|
|
106
96
|
className: "text-text-default-3",
|
|
107
97
|
children: placeholder
|
|
@@ -111,44 +101,44 @@ var TimePickerInput = (t0) => {
|
|
|
111
101
|
isDisabled,
|
|
112
102
|
hidePlaceholder
|
|
113
103
|
}) });
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
} else
|
|
122
|
-
let
|
|
123
|
-
if ($[
|
|
124
|
-
|
|
125
|
-
className:
|
|
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,
|
|
126
116
|
children: [
|
|
117
|
+
t17,
|
|
127
118
|
t18,
|
|
128
|
-
t19
|
|
129
|
-
t20
|
|
119
|
+
t19
|
|
130
120
|
]
|
|
131
121
|
});
|
|
132
|
-
$[
|
|
133
|
-
$[
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
$[
|
|
137
|
-
} else
|
|
138
|
-
let
|
|
139
|
-
if ($[
|
|
140
|
-
|
|
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({
|
|
141
131
|
size,
|
|
142
132
|
as
|
|
143
133
|
}), "flex items-center gap-input-gap-trailing-elements py-0! pl-0!");
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
} else
|
|
149
|
-
let
|
|
150
|
-
if ($[
|
|
151
|
-
|
|
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, {
|
|
152
142
|
onClear: () => {
|
|
153
143
|
state.setValue(null);
|
|
154
144
|
onClear?.();
|
|
@@ -156,17 +146,17 @@ var TimePickerInput = (t0) => {
|
|
|
156
146
|
},
|
|
157
147
|
show: canClear
|
|
158
148
|
});
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
165
|
-
$[
|
|
166
|
-
} else
|
|
167
|
-
let
|
|
168
|
-
if ($[
|
|
169
|
-
|
|
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, {
|
|
170
160
|
label: "",
|
|
171
161
|
color: "secondary",
|
|
172
162
|
onPress,
|
|
@@ -175,68 +165,68 @@ var TimePickerInput = (t0) => {
|
|
|
175
165
|
className: "border-0!",
|
|
176
166
|
"data-static-press-action": ""
|
|
177
167
|
});
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
$[
|
|
184
|
-
} else
|
|
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];
|
|
185
186
|
let t25;
|
|
186
|
-
if ($[
|
|
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) {
|
|
187
188
|
t25 = /* @__PURE__ */ jsxs("div", {
|
|
188
|
-
|
|
189
|
-
|
|
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,
|
|
189
|
+
ref,
|
|
190
|
+
className: t4,
|
|
201
191
|
"data-rac": "",
|
|
202
192
|
"data-datetime-input": "",
|
|
203
|
-
"data-hovered":
|
|
204
|
-
"data-disabled":
|
|
205
|
-
"data-is-disabled":
|
|
206
|
-
"data-invalid":
|
|
207
|
-
"data-is-empty":
|
|
208
|
-
"data-focus-within":
|
|
209
|
-
"data-focus-visible":
|
|
210
|
-
"data-has-selection":
|
|
211
|
-
"data-is-dirty":
|
|
212
|
-
"data-is-required":
|
|
213
|
-
"data-is-filled":
|
|
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,
|
|
214
204
|
...fieldProps,
|
|
215
205
|
...focusWithinProps,
|
|
216
206
|
...hoverProps,
|
|
217
|
-
children: [
|
|
207
|
+
children: [t20, t24]
|
|
218
208
|
});
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
} else
|
|
239
|
-
return
|
|
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;
|
|
240
230
|
};
|
|
241
231
|
function _temp(segment) {
|
|
242
232
|
return segment.type !== "literal" && segment.isPlaceholder === false;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
1
2
|
import { FormFieldError } from "./FormFieldError.js";
|
|
2
3
|
import { FormFieldHeader } from "./FormFieldHeader.js";
|
|
3
4
|
import { FormFieldHelper } from "./FormFieldHelper.js";
|
|
5
|
+
import { formFieldDefinition } from "./formField.cva.js";
|
|
4
6
|
import { c } from "react/compiler-runtime";
|
|
5
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { clsx } from "clsx";
|
|
6
9
|
//#region src/components/inputs/FormField/FormField.tsx
|
|
7
10
|
var FormField = (t0) => {
|
|
8
|
-
const $ = c(
|
|
11
|
+
const $ = c(43);
|
|
9
12
|
const { ref, as, label, tooltipText, helperText, isRequired, rightContent, isDisabled, error, hideLabel, headerClassName, errorClassName, children, className, labelProps, isHeaderHidden, tabIndex, onMouseEnter, onFocusCapture } = t0;
|
|
13
|
+
const formFieldCva = UIOverrides.useCva("formField.cva", formFieldDefinition);
|
|
10
14
|
const t1 = hideLabel || isHeaderHidden;
|
|
11
15
|
let t2;
|
|
12
16
|
if ($[0] !== headerClassName || $[1] !== helperText || $[2] !== isDisabled || $[3] !== isRequired || $[4] !== label || $[5] !== labelProps || $[6] !== rightContent || $[7] !== t1 || $[8] !== tooltipText) {
|
|
@@ -76,52 +80,61 @@ var FormField = (t0) => {
|
|
|
76
80
|
$[21] = t9;
|
|
77
81
|
} else t9 = $[21];
|
|
78
82
|
const errorProps = t9;
|
|
79
|
-
|
|
80
|
-
if ($[22] !== as || $[23] !== headerProps) {
|
|
81
|
-
t10 = !["filter", "floating"].includes(as ?? "") && /* @__PURE__ */ jsx(FormFieldHeader, { ...headerProps });
|
|
82
|
-
$[22] = as;
|
|
83
|
-
$[23] = headerProps;
|
|
84
|
-
$[24] = t10;
|
|
85
|
-
} else t10 = $[24];
|
|
83
|
+
const t10 = as ?? "default";
|
|
86
84
|
let t11;
|
|
87
|
-
if ($[
|
|
88
|
-
t11 =
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
|
|
85
|
+
if ($[22] !== className || $[23] !== formFieldCva || $[24] !== t10) {
|
|
86
|
+
t11 = clsx(formFieldCva({ as: t10 }), className);
|
|
87
|
+
$[22] = className;
|
|
88
|
+
$[23] = formFieldCva;
|
|
89
|
+
$[24] = t10;
|
|
90
|
+
$[25] = t11;
|
|
91
|
+
} else t11 = $[25];
|
|
92
92
|
let t12;
|
|
93
|
-
if ($[27] !==
|
|
94
|
-
t12 = /* @__PURE__ */ jsx(
|
|
95
|
-
$[
|
|
93
|
+
if ($[26] !== as || $[27] !== headerProps) {
|
|
94
|
+
t12 = !["filter", "floating"].includes(as ?? "") && /* @__PURE__ */ jsx(FormFieldHeader, { ...headerProps });
|
|
95
|
+
$[26] = as;
|
|
96
|
+
$[27] = headerProps;
|
|
96
97
|
$[28] = t12;
|
|
97
98
|
} else t12 = $[28];
|
|
98
99
|
let t13;
|
|
99
|
-
if ($[29] !==
|
|
100
|
-
t13 = /* @__PURE__ */
|
|
100
|
+
if ($[29] !== helperProps) {
|
|
101
|
+
t13 = /* @__PURE__ */ jsx(FormFieldHelper, { ...helperProps });
|
|
102
|
+
$[29] = helperProps;
|
|
103
|
+
$[30] = t13;
|
|
104
|
+
} else t13 = $[30];
|
|
105
|
+
let t14;
|
|
106
|
+
if ($[31] !== errorProps) {
|
|
107
|
+
t14 = /* @__PURE__ */ jsx(FormFieldError, { ...errorProps });
|
|
108
|
+
$[31] = errorProps;
|
|
109
|
+
$[32] = t14;
|
|
110
|
+
} else t14 = $[32];
|
|
111
|
+
let t15;
|
|
112
|
+
if ($[33] !== children || $[34] !== onFocusCapture || $[35] !== onMouseEnter || $[36] !== ref || $[37] !== t11 || $[38] !== t12 || $[39] !== t13 || $[40] !== t14 || $[41] !== tabIndex) {
|
|
113
|
+
t15 = /* @__PURE__ */ jsxs("div", {
|
|
101
114
|
ref,
|
|
102
|
-
className,
|
|
115
|
+
className: t11,
|
|
103
116
|
tabIndex,
|
|
104
117
|
onMouseEnter,
|
|
105
118
|
onFocusCapture,
|
|
106
119
|
children: [
|
|
107
|
-
|
|
120
|
+
t12,
|
|
108
121
|
children,
|
|
109
|
-
|
|
110
|
-
|
|
122
|
+
t13,
|
|
123
|
+
t14
|
|
111
124
|
]
|
|
112
125
|
});
|
|
113
|
-
$[
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
} else
|
|
124
|
-
return
|
|
126
|
+
$[33] = children;
|
|
127
|
+
$[34] = onFocusCapture;
|
|
128
|
+
$[35] = onMouseEnter;
|
|
129
|
+
$[36] = ref;
|
|
130
|
+
$[37] = t11;
|
|
131
|
+
$[38] = t12;
|
|
132
|
+
$[39] = t13;
|
|
133
|
+
$[40] = t14;
|
|
134
|
+
$[41] = tabIndex;
|
|
135
|
+
$[42] = t15;
|
|
136
|
+
} else t15 = $[42];
|
|
137
|
+
return t15;
|
|
125
138
|
};
|
|
126
139
|
//#endregion
|
|
127
140
|
export { FormField };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const formFieldDefinition: {
|
|
2
|
+
base: string[];
|
|
3
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
4
|
+
readonly as: {
|
|
5
|
+
readonly default: "";
|
|
6
|
+
readonly filter: "";
|
|
7
|
+
readonly floating: "";
|
|
8
|
+
readonly inline: "";
|
|
9
|
+
};
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
|
+
//#region src/components/inputs/FormField/formField.cva.ts
|
|
3
|
+
var formFieldDefinition = UIOverrides.defineConfig({
|
|
4
|
+
base: [""],
|
|
5
|
+
config: {
|
|
6
|
+
variants: { as: {
|
|
7
|
+
default: "",
|
|
8
|
+
filter: "",
|
|
9
|
+
floating: "",
|
|
10
|
+
inline: ""
|
|
11
|
+
} },
|
|
12
|
+
defaultVariants: { as: "default" }
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { formFieldDefinition };
|
|
@@ -2,7 +2,6 @@ import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
|
2
2
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
3
3
|
import { FormField } from "../../FormField/FormField.js";
|
|
4
4
|
import { inputBaseDefinition } from "../../shared/input.cva.js";
|
|
5
|
-
import { IntlUtils } from "../../../../utils/intl.utils.js";
|
|
6
5
|
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
7
6
|
import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
8
7
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
@@ -339,7 +338,7 @@ var NumberInputInner = (t0) => {
|
|
|
339
338
|
if (!renderInput) {
|
|
340
339
|
const staticValue = props.value ?? props.defaultValue;
|
|
341
340
|
const formatOptions = props.formatOptions ?? ui.numberInput.formatOptions;
|
|
342
|
-
const displayValue = getStaticNumberDisplayValue(staticValue,
|
|
341
|
+
const displayValue = getStaticNumberDisplayValue(staticValue, new Intl.NumberFormat(locale, formatOptions)) ?? "";
|
|
343
342
|
const hasValue = displayValue !== "";
|
|
344
343
|
const as = props.as ?? ui.input.as;
|
|
345
344
|
let isDisabled = !!props.isDisabled;
|
|
@@ -2,7 +2,6 @@ import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
|
2
2
|
import { UIConfig } from "../../../../config/uiConfig.context.js";
|
|
3
3
|
import { FormFieldLabel } from "../../FormField/FormFieldLabel.js";
|
|
4
4
|
import { inputBaseDefinition, inputSizeDefinition } from "../../shared/input.cva.js";
|
|
5
|
-
import { IntlUtils } from "../../../../utils/intl.utils.js";
|
|
6
5
|
import { InputClear } from "../../shared/InputClear.js";
|
|
7
6
|
import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
8
7
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
@@ -382,7 +381,7 @@ var NumberRangeInputInner = (t0) => {
|
|
|
382
381
|
if (!renderInput) {
|
|
383
382
|
const staticValue = normalizeRangeValue(props.value, props.minValue, props.maxValue);
|
|
384
383
|
const formatOptions = props.formatOptions ?? ui.numberInput.formatOptions;
|
|
385
|
-
const formatter =
|
|
384
|
+
const formatter = new Intl.NumberFormat(locale, formatOptions);
|
|
386
385
|
const minDisplay = getStaticNumberDisplayValue(staticValue.min, formatter);
|
|
387
386
|
const maxDisplay = getStaticNumberDisplayValue(staticValue.max, formatter);
|
|
388
387
|
const hasValue = minDisplay !== null || maxDisplay !== null;
|
|
@@ -8,7 +8,7 @@ import { useState } from "react";
|
|
|
8
8
|
import { mergeRefs } from "@react-aria/utils";
|
|
9
9
|
import { Controller } from "react-hook-form";
|
|
10
10
|
//#region src/components/inputs/Selection/Autocomplete/QueryAutocomplete.tsx
|
|
11
|
-
var
|
|
11
|
+
var QueryAutocompleteContent = ({ query, queryParams, queryOptions, queryMap, resolveSelectedItemsWithIds, leadingContent, ...props }) => {
|
|
12
12
|
"use no memo";
|
|
13
13
|
const ui = UIConfig.useConfig();
|
|
14
14
|
const [search, setSearch] = useState("");
|
|
@@ -27,7 +27,7 @@ var LoadedQueryAutocompleteContent = ({ query, queryParams, queryOptions, queryM
|
|
|
27
27
|
mapItems: (data) => getQueryItems(data, queryMap),
|
|
28
28
|
resolveSelectedItemsWithIds: resolveSelectedItemsWithIds ?? ui.queryAutocomplete?.resolveSelectedItemsWithIds,
|
|
29
29
|
search,
|
|
30
|
-
initialQueryState:
|
|
30
|
+
initialQueryState: shouldEnableInitialQuery ? false : props.isInitialQueryDisabled ?? ui.queryAutocomplete?.isInitialQueryDisabled,
|
|
31
31
|
selectedIdsToResolve: selectedIdsToResolve.items
|
|
32
32
|
});
|
|
33
33
|
const handleChange = (value_0) => {
|
|
@@ -55,58 +55,6 @@ var LoadedQueryAutocompleteContent = ({ query, queryParams, queryOptions, queryM
|
|
|
55
55
|
onLoadMore: fetchNextPage
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
|
-
var QueryAutocompleteContent = (props) => {
|
|
59
|
-
const $ = c(9);
|
|
60
|
-
const [isQueryMounted, setIsQueryMounted] = useState(false);
|
|
61
|
-
const value = "value" in props ? props.value : void 0;
|
|
62
|
-
if (!getSelectionIdsToResolve({
|
|
63
|
-
initialSelection: props.initialSelection,
|
|
64
|
-
value,
|
|
65
|
-
mapInitialToSelectItem: props.mapInitialToSelectItem
|
|
66
|
-
}).isResolvedByInitialSelection || isQueryMounted) {
|
|
67
|
-
let t0;
|
|
68
|
-
if ($[0] !== isQueryMounted || $[1] !== props) {
|
|
69
|
-
t0 = /* @__PURE__ */ jsx(LoadedQueryAutocompleteContent, {
|
|
70
|
-
...props,
|
|
71
|
-
isQueryEnabledInitially: isQueryMounted
|
|
72
|
-
});
|
|
73
|
-
$[0] = isQueryMounted;
|
|
74
|
-
$[1] = props;
|
|
75
|
-
$[2] = t0;
|
|
76
|
-
} else t0 = $[2];
|
|
77
|
-
return t0;
|
|
78
|
-
}
|
|
79
|
-
let autocompleteProps;
|
|
80
|
-
if ($[3] !== props) {
|
|
81
|
-
const { query: _, queryParams: _queryParams, queryOptions: _queryOptions, queryMap: _queryMap, resolveSelectedItemsWithIds: _resolveSelectedItemsWithIds, isInitialQueryDisabled: _isInitialQueryDisabled, ...t0 } = props;
|
|
82
|
-
autocompleteProps = t0;
|
|
83
|
-
$[3] = props;
|
|
84
|
-
$[4] = autocompleteProps;
|
|
85
|
-
} else autocompleteProps = $[4];
|
|
86
|
-
let t0;
|
|
87
|
-
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
88
|
-
t0 = () => setIsQueryMounted(true);
|
|
89
|
-
$[5] = t0;
|
|
90
|
-
} else t0 = $[5];
|
|
91
|
-
const mountQuery = t0;
|
|
92
|
-
let t1;
|
|
93
|
-
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
94
|
-
t1 = [];
|
|
95
|
-
$[6] = t1;
|
|
96
|
-
} else t1 = $[6];
|
|
97
|
-
let t2;
|
|
98
|
-
if ($[7] !== autocompleteProps) {
|
|
99
|
-
t2 = /* @__PURE__ */ jsx(Autocomplete, {
|
|
100
|
-
...autocompleteProps,
|
|
101
|
-
items: t1,
|
|
102
|
-
onMouseEnter: mountQuery,
|
|
103
|
-
onFocusCapture: mountQuery
|
|
104
|
-
});
|
|
105
|
-
$[7] = autocompleteProps;
|
|
106
|
-
$[8] = t2;
|
|
107
|
-
} else t2 = $[8];
|
|
108
|
-
return t2;
|
|
109
|
-
};
|
|
110
58
|
var QueryAutocomplete = (props) => {
|
|
111
59
|
const $ = c(16);
|
|
112
60
|
if ("formControl" in props && props.formControl) {
|