@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.
- package/README.md +15 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +55 -206
- package/dist/components/buttons/Button/button.cva.d.ts +1 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +9 -34
- package/dist/components/buttons/shared/ButtonContent.js +22 -80
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +10 -24
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +5 -1
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +234 -201
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +93 -227
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +170 -273
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +60 -147
- 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 -301
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +142 -338
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +10 -59
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +144 -134
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.d.ts +2 -0
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +33 -0
- package/dist/components/inputs/File/FileUpload.js +1 -1
- package/dist/components/inputs/File/InputUpload.js +65 -261
- 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.js +2 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +77 -314
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +23 -83
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +56 -2
- package/dist/components/inputs/Selection/Select/QuerySelect.js +82 -94
- package/dist/components/inputs/Selection/Select/Select.js +3 -3
- 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/querySelect.utils.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +1 -0
- package/dist/components/inputs/Selection/shared/select.context.js +19 -9
- package/dist/components/inputs/Selection/shared/useSelectItems.js +48 -108
- package/dist/components/inputs/Skeleton/InputFrame.js +177 -552
- package/dist/components/inputs/TextEditor/TextEditor.js +87 -389
- package/dist/components/inputs/shared/InputClear.js +24 -40
- package/dist/components/inputs/shared/input.cva.js +1 -1
- 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/shared/pagination/Pagination.js +22 -108
- package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
- 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 +1 -0
- package/dist/config/uiConfig.context.js +10 -40
- package/dist/config/uiOverrides.context.d.ts +0 -1
- package/dist/helpers/dynamicColumns.js +2 -1
- package/dist/hooks/useDebounceCallback.js +17 -51
- package/dist/hooks/useFormAutosave.js +33 -120
- package/dist/hooks/useLongPressRepeat.js +20 -55
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/utils/date-time.utils.d.ts +0 -1
- package/dist/utils/date-time.utils.js +21 -45
- package/dist/utils/intl.utils.d.ts +7 -0
- package/dist/utils/intl.utils.js +38 -0
- package/dist/utils/intl.utils.spec.d.ts +1 -0
- package/package.json +2 -2
- 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
|
@@ -6,216 +6,64 @@ import "../../../../config/i18n.js";
|
|
|
6
6
|
import { FileUtils } from "../../../../utils/file.utils.js";
|
|
7
7
|
import { FileIcon } from "../../../../assets/icons/File.js";
|
|
8
8
|
import { ProgressBar } from "./ProgressBar.js";
|
|
9
|
-
import { c } from "react/compiler-runtime";
|
|
10
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
import { clsx } from "clsx";
|
|
12
11
|
import { useTranslation } from "react-i18next";
|
|
13
12
|
//#region src/components/inputs/File/shared/FileUploadContentLoading.tsx
|
|
14
|
-
var FileUploadContentLoading = (
|
|
15
|
-
const $ = c(70);
|
|
16
|
-
const { index, variant, as, state, isDisabled, singleFile, onCancel, cancelButtonProps } = t0;
|
|
13
|
+
var FileUploadContentLoading = ({ index, variant, as, state, isDisabled, singleFile, onCancel, cancelButtonProps }) => {
|
|
17
14
|
const { t } = useTranslation("ui");
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"opacity-50": isDisabled
|
|
71
|
-
});
|
|
72
|
-
$[12] = isDisabled;
|
|
73
|
-
$[13] = t10;
|
|
74
|
-
$[14] = t11;
|
|
75
|
-
$[15] = t12;
|
|
76
|
-
} else t12 = $[15];
|
|
77
|
-
const t13 = variant === "vertical";
|
|
78
|
-
const t14 = variant === "horizontal";
|
|
79
|
-
let t15;
|
|
80
|
-
if ($[16] !== t13 || $[17] !== t14) {
|
|
81
|
-
t15 = clsx("flex items-center gap-file-upload-content-gap-icon-to-content", {
|
|
82
|
-
"w-full flex-col": t13,
|
|
83
|
-
"w-1/2": t14
|
|
84
|
-
});
|
|
85
|
-
$[16] = t13;
|
|
86
|
-
$[17] = t14;
|
|
87
|
-
$[18] = t15;
|
|
88
|
-
} else t15 = $[18];
|
|
89
|
-
let t16;
|
|
90
|
-
if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
|
|
91
|
-
t16 = /* @__PURE__ */ jsx(FileIcon, { className: "h-6 w-6 text-text-default-1" });
|
|
92
|
-
$[19] = t16;
|
|
93
|
-
} else t16 = $[19];
|
|
94
|
-
const t17 = variant === "vertical";
|
|
95
|
-
const t18 = variant === "horizontal";
|
|
96
|
-
let t19;
|
|
97
|
-
if ($[20] !== t17 || $[21] !== t18) {
|
|
98
|
-
t19 = clsx("flex flex-col", {
|
|
99
|
-
"max-w-full gap-file-upload-content-gap-icon-to-content text-center": t17,
|
|
100
|
-
"max-w-[calc(100%-32px)] gap-file-upload-content-gap-text-to-text": t18
|
|
101
|
-
});
|
|
102
|
-
$[20] = t17;
|
|
103
|
-
$[21] = t18;
|
|
104
|
-
$[22] = t19;
|
|
105
|
-
} else t19 = $[22];
|
|
106
|
-
const t20 = state.file?.name ?? state.displayName ?? "";
|
|
107
|
-
let t21;
|
|
108
|
-
if ($[23] !== t20) {
|
|
109
|
-
t21 = /* @__PURE__ */ jsx(Typography, {
|
|
110
|
-
variant: "prominent-1",
|
|
111
|
-
size: "label-1",
|
|
112
|
-
as: "span",
|
|
113
|
-
className: "self-stretch truncate text-center text-text-default-1",
|
|
114
|
-
children: t20
|
|
115
|
-
});
|
|
116
|
-
$[23] = t20;
|
|
117
|
-
$[24] = t21;
|
|
118
|
-
} else t21 = $[24];
|
|
119
|
-
const t22 = singleFile ? "label-2" : "label-3";
|
|
120
|
-
let t23;
|
|
121
|
-
if ($[25] !== state) {
|
|
122
|
-
t23 = FileUtils.getFileDisplaySize(state);
|
|
123
|
-
$[25] = state;
|
|
124
|
-
$[26] = t23;
|
|
125
|
-
} else t23 = $[26];
|
|
126
|
-
let t24;
|
|
127
|
-
if ($[27] !== t22 || $[28] !== t23) {
|
|
128
|
-
t24 = /* @__PURE__ */ jsx(Typography, {
|
|
129
|
-
variant: "default",
|
|
130
|
-
size: t22,
|
|
131
|
-
as: "span",
|
|
132
|
-
className: "text-text-default-2",
|
|
133
|
-
children: t23
|
|
134
|
-
});
|
|
135
|
-
$[27] = t22;
|
|
136
|
-
$[28] = t23;
|
|
137
|
-
$[29] = t24;
|
|
138
|
-
} else t24 = $[29];
|
|
139
|
-
let t25;
|
|
140
|
-
if ($[30] !== t19 || $[31] !== t21 || $[32] !== t24) {
|
|
141
|
-
t25 = /* @__PURE__ */ jsxs("div", {
|
|
142
|
-
className: t19,
|
|
143
|
-
children: [t21, t24]
|
|
144
|
-
});
|
|
145
|
-
$[30] = t19;
|
|
146
|
-
$[31] = t21;
|
|
147
|
-
$[32] = t24;
|
|
148
|
-
$[33] = t25;
|
|
149
|
-
} else t25 = $[33];
|
|
150
|
-
let t26;
|
|
151
|
-
if ($[34] !== t15 || $[35] !== t25) {
|
|
152
|
-
t26 = /* @__PURE__ */ jsxs("div", {
|
|
153
|
-
className: t15,
|
|
154
|
-
children: [t16, t25]
|
|
155
|
-
});
|
|
156
|
-
$[34] = t15;
|
|
157
|
-
$[35] = t25;
|
|
158
|
-
$[36] = t26;
|
|
159
|
-
} else t26 = $[36];
|
|
160
|
-
const t27 = variant === "horizontal";
|
|
161
|
-
const t28 = variant === "vertical";
|
|
162
|
-
let t29;
|
|
163
|
-
if ($[37] !== t27 || $[38] !== t28) {
|
|
164
|
-
t29 = clsx("flex items-center gap-1", {
|
|
165
|
-
"w-1/2": t27,
|
|
166
|
-
"w-full": t28
|
|
167
|
-
});
|
|
168
|
-
$[37] = t27;
|
|
169
|
-
$[38] = t28;
|
|
170
|
-
$[39] = t29;
|
|
171
|
-
} else t29 = $[39];
|
|
172
|
-
let t30;
|
|
173
|
-
if ($[40] !== state.progress) {
|
|
174
|
-
t30 = /* @__PURE__ */ jsx(ProgressBar, { progress: state.progress });
|
|
175
|
-
$[40] = state.progress;
|
|
176
|
-
$[41] = t30;
|
|
177
|
-
} else t30 = $[41];
|
|
178
|
-
let t31;
|
|
179
|
-
if ($[42] !== as || $[43] !== index || $[44] !== onCancel || $[45] !== variant) {
|
|
180
|
-
t31 = (as === "link" || variant === "horizontal") && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
181
|
-
label: "Cancel",
|
|
182
|
-
color: "secondary",
|
|
183
|
-
onPress: () => {
|
|
184
|
-
onCancel(index);
|
|
185
|
-
},
|
|
186
|
-
icon: CloseIcon
|
|
187
|
-
});
|
|
188
|
-
$[42] = as;
|
|
189
|
-
$[43] = index;
|
|
190
|
-
$[44] = onCancel;
|
|
191
|
-
$[45] = variant;
|
|
192
|
-
$[46] = t31;
|
|
193
|
-
} else t31 = $[46];
|
|
194
|
-
let t32;
|
|
195
|
-
if ($[47] !== t29 || $[48] !== t30 || $[49] !== t31) {
|
|
196
|
-
t32 = /* @__PURE__ */ jsxs("div", {
|
|
197
|
-
className: t29,
|
|
198
|
-
children: [t30, t31]
|
|
199
|
-
});
|
|
200
|
-
$[47] = t29;
|
|
201
|
-
$[48] = t30;
|
|
202
|
-
$[49] = t31;
|
|
203
|
-
$[50] = t32;
|
|
204
|
-
} else t32 = $[50];
|
|
205
|
-
let t33;
|
|
206
|
-
if ($[51] !== t12 || $[52] !== t26 || $[53] !== t32) {
|
|
207
|
-
t33 = /* @__PURE__ */ jsxs("div", {
|
|
208
|
-
className: t12,
|
|
209
|
-
children: [t26, t32]
|
|
210
|
-
});
|
|
211
|
-
$[51] = t12;
|
|
212
|
-
$[52] = t26;
|
|
213
|
-
$[53] = t32;
|
|
214
|
-
$[54] = t33;
|
|
215
|
-
} else t33 = $[54];
|
|
216
|
-
let t34;
|
|
217
|
-
if ($[55] !== as || $[56] !== cancelButtonColor || $[57] !== cancelButtonRestProps || $[58] !== cancelButtonSize || $[59] !== cancelButtonVariant || $[60] !== cancelButtonWidth || $[61] !== index || $[62] !== onCancel || $[63] !== t || $[64] !== variant) {
|
|
218
|
-
t34 = as === "button" && variant === "vertical" && /* @__PURE__ */ jsx(Button, {
|
|
15
|
+
const { color: cancelButtonColor = "secondary", size: cancelButtonSize = "xs", variant: cancelButtonVariant = "outlined", width: cancelButtonWidth = "hug", ...cancelButtonRestProps } = cancelButtonProps ?? {};
|
|
16
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
17
|
+
className: clsx("flex w-full flex-col items-center", {
|
|
18
|
+
"flex-col": variant === "vertical",
|
|
19
|
+
"flex-row": variant === "horizontal",
|
|
20
|
+
"gap-file-upload-content-gap-content-to-button": as === "button"
|
|
21
|
+
}),
|
|
22
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
23
|
+
className: clsx("flex w-full items-center justify-between", {
|
|
24
|
+
"flex-col gap-file-upload-content-gap-text-to-progress": variant === "vertical",
|
|
25
|
+
"flex-row gap-file-upload-content-gap-left-to-right-content": variant === "horizontal",
|
|
26
|
+
"opacity-50": isDisabled
|
|
27
|
+
}),
|
|
28
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
29
|
+
className: clsx("flex items-center gap-file-upload-content-gap-icon-to-content", {
|
|
30
|
+
"w-full flex-col": variant === "vertical",
|
|
31
|
+
"w-1/2": variant === "horizontal"
|
|
32
|
+
}),
|
|
33
|
+
children: [/* @__PURE__ */ jsx(FileIcon, { className: "h-6 w-6 text-text-default-1" }), /* @__PURE__ */ jsxs("div", {
|
|
34
|
+
className: clsx("flex flex-col", {
|
|
35
|
+
"max-w-full gap-file-upload-content-gap-icon-to-content text-center": variant === "vertical",
|
|
36
|
+
"max-w-[calc(100%-32px)] gap-file-upload-content-gap-text-to-text": variant === "horizontal"
|
|
37
|
+
}),
|
|
38
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
39
|
+
variant: "prominent-1",
|
|
40
|
+
size: "label-1",
|
|
41
|
+
as: "span",
|
|
42
|
+
className: "self-stretch truncate text-center text-text-default-1",
|
|
43
|
+
children: state.file?.name ?? state.displayName ?? ""
|
|
44
|
+
}), /* @__PURE__ */ jsx(Typography, {
|
|
45
|
+
variant: "default",
|
|
46
|
+
size: singleFile ? "label-2" : "label-3",
|
|
47
|
+
as: "span",
|
|
48
|
+
className: "text-text-default-2",
|
|
49
|
+
children: FileUtils.getFileDisplaySize(state)
|
|
50
|
+
})]
|
|
51
|
+
})]
|
|
52
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
53
|
+
className: clsx("flex items-center gap-1", {
|
|
54
|
+
"w-1/2": variant === "horizontal",
|
|
55
|
+
"w-full": variant === "vertical"
|
|
56
|
+
}),
|
|
57
|
+
children: [/* @__PURE__ */ jsx(ProgressBar, { progress: state.progress }), (as === "link" || variant === "horizontal") && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
58
|
+
label: "Cancel",
|
|
59
|
+
color: "secondary",
|
|
60
|
+
onPress: () => {
|
|
61
|
+
onCancel(index);
|
|
62
|
+
},
|
|
63
|
+
icon: CloseIcon
|
|
64
|
+
})]
|
|
65
|
+
})]
|
|
66
|
+
}), as === "button" && variant === "vertical" && /* @__PURE__ */ jsx(Button, {
|
|
219
67
|
variant: cancelButtonVariant,
|
|
220
68
|
size: cancelButtonSize,
|
|
221
69
|
color: cancelButtonColor,
|
|
@@ -224,35 +72,9 @@ var FileUploadContentLoading = (t0) => {
|
|
|
224
72
|
onPress: () => {
|
|
225
73
|
onCancel(index);
|
|
226
74
|
},
|
|
227
|
-
children: t(
|
|
228
|
-
})
|
|
229
|
-
|
|
230
|
-
$[56] = cancelButtonColor;
|
|
231
|
-
$[57] = cancelButtonRestProps;
|
|
232
|
-
$[58] = cancelButtonSize;
|
|
233
|
-
$[59] = cancelButtonVariant;
|
|
234
|
-
$[60] = cancelButtonWidth;
|
|
235
|
-
$[61] = index;
|
|
236
|
-
$[62] = onCancel;
|
|
237
|
-
$[63] = t;
|
|
238
|
-
$[64] = variant;
|
|
239
|
-
$[65] = t34;
|
|
240
|
-
} else t34 = $[65];
|
|
241
|
-
let t35;
|
|
242
|
-
if ($[66] !== t33 || $[67] !== t34 || $[68] !== t9) {
|
|
243
|
-
t35 = /* @__PURE__ */ jsxs("div", {
|
|
244
|
-
className: t9,
|
|
245
|
-
children: [t33, t34]
|
|
246
|
-
});
|
|
247
|
-
$[66] = t33;
|
|
248
|
-
$[67] = t34;
|
|
249
|
-
$[68] = t9;
|
|
250
|
-
$[69] = t35;
|
|
251
|
-
} else t35 = $[69];
|
|
252
|
-
return t35;
|
|
75
|
+
children: t(($) => $.ui.fileUpload.cancel)
|
|
76
|
+
})]
|
|
77
|
+
});
|
|
253
78
|
};
|
|
254
|
-
function _temp($) {
|
|
255
|
-
return $.ui.fileUpload.cancel;
|
|
256
|
-
}
|
|
257
79
|
//#endregion
|
|
258
80
|
export { FileUploadContentLoading };
|
|
@@ -1,120 +1,33 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
2
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
3
3
|
import { progressBarDefinition, progressBarFillDefinition, progressBarTrackDefinition, progressBarTrackWrapperDefinition, progressBarValueDefinition } from "./progressBar.cva.js";
|
|
4
|
-
import { c } from "react/compiler-runtime";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
//#region src/components/inputs/File/shared/ProgressBar.tsx
|
|
7
|
-
var ProgressBar = (
|
|
8
|
-
const $ = c(33);
|
|
9
|
-
const { progress: t1, valueLabel: t2 } = t0;
|
|
10
|
-
const progress = t1 === void 0 ? 0 : t1;
|
|
11
|
-
const valueLabel = t2 === void 0 ? "trailing" : t2;
|
|
6
|
+
var ProgressBar = ({ progress = 0, valueLabel = "trailing" }) => {
|
|
12
7
|
const progressBarCva = UIOverrides.useCva("progressBar.cva", progressBarDefinition);
|
|
13
8
|
const progressBarTrackWrapperCva = UIOverrides.useCva("progressBar.trackWrapperCva", progressBarTrackWrapperDefinition);
|
|
14
9
|
const progressBarTrackCva = UIOverrides.useCva("progressBar.trackCva", progressBarTrackDefinition);
|
|
15
10
|
const progressBarFillCva = UIOverrides.useCva("progressBar.fillCva", progressBarFillDefinition);
|
|
16
11
|
const progressBarValueCva = UIOverrides.useCva("progressBar.valueCva", progressBarValueDefinition);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} else t4 = $[4];
|
|
30
|
-
let t5;
|
|
31
|
-
if ($[5] !== progressBarTrackCva) {
|
|
32
|
-
t5 = progressBarTrackCva({ part: "container" });
|
|
33
|
-
$[5] = progressBarTrackCva;
|
|
34
|
-
$[6] = t5;
|
|
35
|
-
} else t5 = $[6];
|
|
36
|
-
let t6;
|
|
37
|
-
if ($[7] !== progressBarTrackCva) {
|
|
38
|
-
t6 = progressBarTrackCva({ part: "background" });
|
|
39
|
-
$[7] = progressBarTrackCva;
|
|
40
|
-
$[8] = t6;
|
|
41
|
-
} else t6 = $[8];
|
|
42
|
-
let t7;
|
|
43
|
-
if ($[9] !== t6) {
|
|
44
|
-
t7 = /* @__PURE__ */ jsx("div", { className: t6 });
|
|
45
|
-
$[9] = t6;
|
|
46
|
-
$[10] = t7;
|
|
47
|
-
} else t7 = $[10];
|
|
48
|
-
let t8;
|
|
49
|
-
if ($[11] !== progressBarFillCva) {
|
|
50
|
-
t8 = progressBarFillCva();
|
|
51
|
-
$[11] = progressBarFillCva;
|
|
52
|
-
$[12] = t8;
|
|
53
|
-
} else t8 = $[12];
|
|
54
|
-
const t9 = `${progress}%`;
|
|
55
|
-
let t10;
|
|
56
|
-
if ($[13] !== t9) {
|
|
57
|
-
t10 = { width: t9 };
|
|
58
|
-
$[13] = t9;
|
|
59
|
-
$[14] = t10;
|
|
60
|
-
} else t10 = $[14];
|
|
61
|
-
let t11;
|
|
62
|
-
if ($[15] !== t10 || $[16] !== t8) {
|
|
63
|
-
t11 = /* @__PURE__ */ jsx("div", {
|
|
64
|
-
className: t8,
|
|
65
|
-
style: t10
|
|
66
|
-
});
|
|
67
|
-
$[15] = t10;
|
|
68
|
-
$[16] = t8;
|
|
69
|
-
$[17] = t11;
|
|
70
|
-
} else t11 = $[17];
|
|
71
|
-
let t12;
|
|
72
|
-
if ($[18] !== t11 || $[19] !== t5 || $[20] !== t7) {
|
|
73
|
-
t12 = /* @__PURE__ */ jsxs("div", {
|
|
74
|
-
className: t5,
|
|
75
|
-
children: [t7, t11]
|
|
76
|
-
});
|
|
77
|
-
$[18] = t11;
|
|
78
|
-
$[19] = t5;
|
|
79
|
-
$[20] = t7;
|
|
80
|
-
$[21] = t12;
|
|
81
|
-
} else t12 = $[21];
|
|
82
|
-
let t13;
|
|
83
|
-
if ($[22] !== t12 || $[23] !== t4) {
|
|
84
|
-
t13 = /* @__PURE__ */ jsx("div", {
|
|
85
|
-
className: t4,
|
|
86
|
-
children: t12
|
|
87
|
-
});
|
|
88
|
-
$[22] = t12;
|
|
89
|
-
$[23] = t4;
|
|
90
|
-
$[24] = t13;
|
|
91
|
-
} else t13 = $[24];
|
|
92
|
-
let t14;
|
|
93
|
-
if ($[25] !== progress || $[26] !== progressBarValueCva || $[27] !== valueLabel) {
|
|
94
|
-
t14 = valueLabel !== "none" && /* @__PURE__ */ jsxs(Typography, {
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
13
|
+
className: progressBarCva({ valueLabel }),
|
|
14
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
15
|
+
className: progressBarTrackWrapperCva(),
|
|
16
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
17
|
+
className: progressBarTrackCva({ part: "container" }),
|
|
18
|
+
children: [/* @__PURE__ */ jsx("div", { className: progressBarTrackCva({ part: "background" }) }), /* @__PURE__ */ jsx("div", {
|
|
19
|
+
className: progressBarFillCva(),
|
|
20
|
+
style: { width: `${progress}%` }
|
|
21
|
+
})]
|
|
22
|
+
})
|
|
23
|
+
}), valueLabel !== "none" && /* @__PURE__ */ jsxs(Typography, {
|
|
95
24
|
variant: "default",
|
|
96
25
|
size: "label-2",
|
|
97
26
|
as: "span",
|
|
98
27
|
className: progressBarValueCva(),
|
|
99
28
|
children: [progress, "%"]
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
$[26] = progressBarValueCva;
|
|
103
|
-
$[27] = valueLabel;
|
|
104
|
-
$[28] = t14;
|
|
105
|
-
} else t14 = $[28];
|
|
106
|
-
let t15;
|
|
107
|
-
if ($[29] !== t13 || $[30] !== t14 || $[31] !== t3) {
|
|
108
|
-
t15 = /* @__PURE__ */ jsxs("div", {
|
|
109
|
-
className: t3,
|
|
110
|
-
children: [t13, t14]
|
|
111
|
-
});
|
|
112
|
-
$[29] = t13;
|
|
113
|
-
$[30] = t14;
|
|
114
|
-
$[31] = t3;
|
|
115
|
-
$[32] = t15;
|
|
116
|
-
} else t15 = $[32];
|
|
117
|
-
return t15;
|
|
29
|
+
})]
|
|
30
|
+
});
|
|
118
31
|
};
|
|
119
32
|
//#endregion
|
|
120
33
|
export { ProgressBar };
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
1
|
import { FormFieldError } from "./FormFieldError.js";
|
|
3
2
|
import { FormFieldHeader } from "./FormFieldHeader.js";
|
|
4
3
|
import { FormFieldHelper } from "./FormFieldHelper.js";
|
|
5
|
-
import { formFieldDefinition } from "./formField.cva.js";
|
|
6
4
|
import { c } from "react/compiler-runtime";
|
|
7
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { clsx } from "clsx";
|
|
9
6
|
//#region src/components/inputs/FormField/FormField.tsx
|
|
10
7
|
var FormField = (t0) => {
|
|
11
|
-
const $ = c(
|
|
8
|
+
const $ = c(39);
|
|
12
9
|
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);
|
|
14
10
|
const t1 = hideLabel || isHeaderHidden;
|
|
15
11
|
let t2;
|
|
16
12
|
if ($[0] !== headerClassName || $[1] !== helperText || $[2] !== isDisabled || $[3] !== isRequired || $[4] !== label || $[5] !== labelProps || $[6] !== rightContent || $[7] !== t1 || $[8] !== tooltipText) {
|
|
@@ -80,61 +76,52 @@ var FormField = (t0) => {
|
|
|
80
76
|
$[21] = t9;
|
|
81
77
|
} else t9 = $[21];
|
|
82
78
|
const errorProps = t9;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
$[
|
|
88
|
-
$[23] = formFieldCva;
|
|
79
|
+
let t10;
|
|
80
|
+
if ($[22] !== as || $[23] !== headerProps) {
|
|
81
|
+
t10 = !["filter", "floating"].includes(as ?? "") && /* @__PURE__ */ jsx(FormFieldHeader, { ...headerProps });
|
|
82
|
+
$[22] = as;
|
|
83
|
+
$[23] = headerProps;
|
|
89
84
|
$[24] = t10;
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
} else t10 = $[24];
|
|
86
|
+
let t11;
|
|
87
|
+
if ($[25] !== helperProps) {
|
|
88
|
+
t11 = /* @__PURE__ */ jsx(FormFieldHelper, { ...helperProps });
|
|
89
|
+
$[25] = helperProps;
|
|
90
|
+
$[26] = t11;
|
|
91
|
+
} else t11 = $[26];
|
|
92
92
|
let t12;
|
|
93
|
-
if ($[
|
|
94
|
-
t12 =
|
|
95
|
-
$[
|
|
96
|
-
$[27] = headerProps;
|
|
93
|
+
if ($[27] !== errorProps) {
|
|
94
|
+
t12 = /* @__PURE__ */ jsx(FormFieldError, { ...errorProps });
|
|
95
|
+
$[27] = errorProps;
|
|
97
96
|
$[28] = t12;
|
|
98
97
|
} else t12 = $[28];
|
|
99
98
|
let t13;
|
|
100
|
-
if ($[29] !==
|
|
101
|
-
t13 = /* @__PURE__ */
|
|
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", {
|
|
99
|
+
if ($[29] !== children || $[30] !== className || $[31] !== onFocusCapture || $[32] !== onMouseEnter || $[33] !== ref || $[34] !== t10 || $[35] !== t11 || $[36] !== t12 || $[37] !== tabIndex) {
|
|
100
|
+
t13 = /* @__PURE__ */ jsxs("div", {
|
|
114
101
|
ref,
|
|
115
|
-
className
|
|
102
|
+
className,
|
|
116
103
|
tabIndex,
|
|
117
104
|
onMouseEnter,
|
|
118
105
|
onFocusCapture,
|
|
119
106
|
children: [
|
|
120
|
-
|
|
107
|
+
t10,
|
|
121
108
|
children,
|
|
122
|
-
|
|
123
|
-
|
|
109
|
+
t11,
|
|
110
|
+
t12
|
|
124
111
|
]
|
|
125
112
|
});
|
|
126
|
-
$[
|
|
127
|
-
$[
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
$[
|
|
133
|
-
$[
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
} else
|
|
137
|
-
return
|
|
113
|
+
$[29] = children;
|
|
114
|
+
$[30] = className;
|
|
115
|
+
$[31] = onFocusCapture;
|
|
116
|
+
$[32] = onMouseEnter;
|
|
117
|
+
$[33] = ref;
|
|
118
|
+
$[34] = t10;
|
|
119
|
+
$[35] = t11;
|
|
120
|
+
$[36] = t12;
|
|
121
|
+
$[37] = tabIndex;
|
|
122
|
+
$[38] = t13;
|
|
123
|
+
} else t13 = $[38];
|
|
124
|
+
return t13;
|
|
138
125
|
};
|
|
139
126
|
//#endregion
|
|
140
127
|
export { FormField };
|
|
@@ -2,6 +2,7 @@ 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";
|
|
5
6
|
import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
6
7
|
import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
7
8
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
@@ -338,7 +339,7 @@ var NumberInputInner = (t0) => {
|
|
|
338
339
|
if (!renderInput) {
|
|
339
340
|
const staticValue = props.value ?? props.defaultValue;
|
|
340
341
|
const formatOptions = props.formatOptions ?? ui.numberInput.formatOptions;
|
|
341
|
-
const displayValue = getStaticNumberDisplayValue(staticValue,
|
|
342
|
+
const displayValue = getStaticNumberDisplayValue(staticValue, IntlUtils.getNumberFormatter(locale, formatOptions)) ?? "";
|
|
342
343
|
const hasValue = displayValue !== "";
|
|
343
344
|
const as = props.as ?? ui.input.as;
|
|
344
345
|
let isDisabled = !!props.isDisabled;
|