@povio/ui 3.3.0-rc.2 → 3.3.0-rc.4
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/Checkbox/CheckboxGroup.d.ts +5 -1
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +234 -201
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +1 -0
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +142 -127
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +2 -17
- package/dist/components/inputs/DateTime/shared/DateField.js +92 -87
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +2 -0
- 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/Input/NumberInput/NumberInput.js +2 -1
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +2 -1
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +56 -2
- package/dist/components/inputs/Selection/Select/QuerySelect.js +69 -15
- package/dist/components/inputs/Selection/Select/Select.js +3 -3
- 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/Skeleton/InputFrame.js +156 -154
- package/dist/components/inputs/shared/input.cva.js +1 -1
- package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
- package/dist/config/uiConfig.context.d.ts +1 -0
- package/dist/config/uiConfig.context.js +2 -1
- package/dist/helpers/dynamicColumns.js +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- 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 +1 -1
|
@@ -26,6 +26,7 @@ var getSelectionIdsToResolve = ({ initialSelection, value, mapInitialToSelectIte
|
|
|
26
26
|
const items = Array.from(new Set([...missingLabelInitialSelectionIds, ...values.filter((id) => !labeledInitialSelectionIds.has(id))]));
|
|
27
27
|
return {
|
|
28
28
|
count: items.length,
|
|
29
|
+
isResolvedByInitialSelection: values.length > 0 && values.every((id) => labeledInitialSelectionIds.has(id)),
|
|
29
30
|
items
|
|
30
31
|
};
|
|
31
32
|
};
|
|
@@ -135,16 +135,26 @@ var SelectContext;
|
|
|
135
135
|
triggerBlurOnChange
|
|
136
136
|
]);
|
|
137
137
|
const onClear = useCallback(() => {
|
|
138
|
-
if (
|
|
139
|
-
|
|
140
|
-
...
|
|
141
|
-
inputValue: ""
|
|
142
|
-
|
|
138
|
+
if (selectedIds.length === 0) {
|
|
139
|
+
const newFieldState_2 = {
|
|
140
|
+
...fieldState,
|
|
141
|
+
inputValue: "",
|
|
142
|
+
searchValue: ""
|
|
143
|
+
};
|
|
144
|
+
setFieldState(newFieldState_2);
|
|
145
|
+
emitStateChanges(newFieldState_2, true);
|
|
146
|
+
setShowAll(true);
|
|
143
147
|
return;
|
|
144
148
|
}
|
|
145
149
|
if (isMultiple) onChange([]);
|
|
146
150
|
else onChange(null);
|
|
147
|
-
}, [
|
|
151
|
+
}, [
|
|
152
|
+
emitStateChanges,
|
|
153
|
+
fieldState,
|
|
154
|
+
isMultiple,
|
|
155
|
+
onChange,
|
|
156
|
+
selectedIds.length
|
|
157
|
+
]);
|
|
148
158
|
const onSelectAll = useCallback(() => {
|
|
149
159
|
onChange(selectableListItems.map(({ id: id_4 }) => id_4));
|
|
150
160
|
}, [selectableListItems, onChange]);
|
|
@@ -157,13 +167,13 @@ var SelectContext;
|
|
|
157
167
|
]);
|
|
158
168
|
const onBlur = useCallback(() => {
|
|
159
169
|
if (props.isSearchable && isMultiple && fieldState.searchValue !== "") {
|
|
160
|
-
const
|
|
170
|
+
const newFieldState_3 = {
|
|
161
171
|
...fieldState,
|
|
162
172
|
inputValue: "",
|
|
163
173
|
searchValue: ""
|
|
164
174
|
};
|
|
165
|
-
setFieldState(
|
|
166
|
-
emitStateChanges(
|
|
175
|
+
setFieldState(newFieldState_3);
|
|
176
|
+
emitStateChanges(newFieldState_3);
|
|
167
177
|
setShowAll(true);
|
|
168
178
|
}
|
|
169
179
|
fieldOnBlur?.({});
|
|
@@ -14,7 +14,7 @@ import { clsx } from "clsx";
|
|
|
14
14
|
import { isValidElement, useId, useRef } from "react";
|
|
15
15
|
//#region src/components/inputs/Skeleton/InputFrame.tsx
|
|
16
16
|
var InputFrame = (props) => {
|
|
17
|
-
const $ = c(
|
|
17
|
+
const $ = c(203);
|
|
18
18
|
const ui = UIConfig.useConfig();
|
|
19
19
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
20
20
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
@@ -174,37 +174,39 @@ var InputFrame = (props) => {
|
|
|
174
174
|
isInputContentGroup = contentGroup === "input";
|
|
175
175
|
t11 = dataAttributeProps;
|
|
176
176
|
const t25 = isInputContentGroup && inputFrameContentGroupClassNames.input;
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
$[99] =
|
|
183
|
-
$[100] =
|
|
184
|
-
|
|
185
|
-
|
|
177
|
+
const t26 = contentGroup === "select" ? "flex-1" : "w-full";
|
|
178
|
+
if ($[90] !== as || $[91] !== contentClassName || $[92] !== inputSizeCva || $[93] !== size || $[94] !== t25 || $[95] !== t26 || $[96] !== typographyCva || $[97] !== typographySize) {
|
|
179
|
+
let t27;
|
|
180
|
+
if ($[99] !== typographyCva || $[100] !== typographySize) {
|
|
181
|
+
t27 = typographySize && typographyCva({ size: typographySize });
|
|
182
|
+
$[99] = typographyCva;
|
|
183
|
+
$[100] = typographySize;
|
|
184
|
+
$[101] = t27;
|
|
185
|
+
} else t27 = $[101];
|
|
186
|
+
t12 = clsx(t25, "group/input-frame flex min-w-0 items-center gap-input-gap-input-text-to-elements", t26, inputSizeCva({
|
|
186
187
|
size,
|
|
187
188
|
as
|
|
188
|
-
}),
|
|
189
|
+
}), t27, contentClassName);
|
|
189
190
|
$[90] = as;
|
|
190
191
|
$[91] = contentClassName;
|
|
191
192
|
$[92] = inputSizeCva;
|
|
192
193
|
$[93] = size;
|
|
193
194
|
$[94] = t25;
|
|
194
|
-
$[95] =
|
|
195
|
-
$[96] =
|
|
196
|
-
$[97] =
|
|
197
|
-
|
|
195
|
+
$[95] = t26;
|
|
196
|
+
$[96] = typographyCva;
|
|
197
|
+
$[97] = typographySize;
|
|
198
|
+
$[98] = t12;
|
|
199
|
+
} else t12 = $[98];
|
|
198
200
|
t13 = leadingContent;
|
|
199
|
-
if ($[
|
|
201
|
+
if ($[102] !== isLeadingIconElement || $[103] !== leadingIcon) {
|
|
200
202
|
t14 = leadingIcon && /* @__PURE__ */ jsx("div", {
|
|
201
203
|
className: clsx(!isLeadingIconElement && "pointer-events-none"),
|
|
202
204
|
children: renderIconVisual(leadingIcon)
|
|
203
205
|
});
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
} else t14 = $[
|
|
206
|
+
$[102] = isLeadingIconElement;
|
|
207
|
+
$[103] = leadingIcon;
|
|
208
|
+
$[104] = t14;
|
|
209
|
+
} else t14 = $[104];
|
|
208
210
|
t15 = labelPlacement === "content-row" && labelContent;
|
|
209
211
|
t16 = actionContentPlacement === "content-row" && actionContent;
|
|
210
212
|
t7 = resolvedContentWrapperClassName;
|
|
@@ -278,7 +280,7 @@ var InputFrame = (props) => {
|
|
|
278
280
|
t9 = $[50];
|
|
279
281
|
}
|
|
280
282
|
let t17;
|
|
281
|
-
if ($[
|
|
283
|
+
if ($[105] !== t10 || $[106] !== t7 || $[107] !== t8 || $[108] !== t9) {
|
|
282
284
|
t17 = /* @__PURE__ */ jsxs("div", {
|
|
283
285
|
className: t7,
|
|
284
286
|
children: [
|
|
@@ -287,14 +289,14 @@ var InputFrame = (props) => {
|
|
|
287
289
|
t10
|
|
288
290
|
]
|
|
289
291
|
});
|
|
290
|
-
$[
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
} else t17 = $[
|
|
292
|
+
$[105] = t10;
|
|
293
|
+
$[106] = t7;
|
|
294
|
+
$[107] = t8;
|
|
295
|
+
$[108] = t9;
|
|
296
|
+
$[109] = t17;
|
|
297
|
+
} else t17 = $[109];
|
|
296
298
|
let t18;
|
|
297
|
-
if ($[
|
|
299
|
+
if ($[110] !== t11 || $[111] !== t12 || $[112] !== t13 || $[113] !== t14 || $[114] !== t15 || $[115] !== t16 || $[116] !== t17) {
|
|
298
300
|
t18 = /* @__PURE__ */ jsxs("div", {
|
|
299
301
|
...t11,
|
|
300
302
|
className: t12,
|
|
@@ -306,18 +308,18 @@ var InputFrame = (props) => {
|
|
|
306
308
|
t17
|
|
307
309
|
]
|
|
308
310
|
});
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
} else t18 = $[
|
|
311
|
+
$[110] = t11;
|
|
312
|
+
$[111] = t12;
|
|
313
|
+
$[112] = t13;
|
|
314
|
+
$[113] = t14;
|
|
315
|
+
$[114] = t15;
|
|
316
|
+
$[115] = t16;
|
|
317
|
+
$[116] = t17;
|
|
318
|
+
$[117] = t18;
|
|
319
|
+
} else t18 = $[117];
|
|
318
320
|
const contentRow = t18;
|
|
319
321
|
let t19;
|
|
320
|
-
if ($[
|
|
322
|
+
if ($[118] !== action || $[119] !== clearClassName || $[120] !== hasClear || $[121] !== hasTrailingContent || $[122] !== isDisabled || $[123] !== isLoading || $[124] !== onClear || $[125] !== onStaticPress || $[126] !== showClear || $[127] !== trailingAction || $[128] !== trailingContent || $[129] !== trailingIcon || $[130] !== typographyCva || $[131] !== unit) {
|
|
321
323
|
t19 = hasTrailingContent ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
322
324
|
hasClear && /* @__PURE__ */ jsx(InputClear, {
|
|
323
325
|
onClear: () => onClear?.(),
|
|
@@ -358,25 +360,25 @@ var InputFrame = (props) => {
|
|
|
358
360
|
!isLoading && !action && trailingIcon && renderIconVisual(trailingIcon),
|
|
359
361
|
trailingAction
|
|
360
362
|
] }) : null;
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
364
|
-
$[
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
$[
|
|
370
|
-
$[
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
} else t19 = $[
|
|
363
|
+
$[118] = action;
|
|
364
|
+
$[119] = clearClassName;
|
|
365
|
+
$[120] = hasClear;
|
|
366
|
+
$[121] = hasTrailingContent;
|
|
367
|
+
$[122] = isDisabled;
|
|
368
|
+
$[123] = isLoading;
|
|
369
|
+
$[124] = onClear;
|
|
370
|
+
$[125] = onStaticPress;
|
|
371
|
+
$[126] = showClear;
|
|
372
|
+
$[127] = trailingAction;
|
|
373
|
+
$[128] = trailingContent;
|
|
374
|
+
$[129] = trailingIcon;
|
|
375
|
+
$[130] = typographyCva;
|
|
376
|
+
$[131] = unit;
|
|
377
|
+
$[132] = t19;
|
|
378
|
+
} else t19 = $[132];
|
|
377
379
|
const trailingContentNodes = t19;
|
|
378
380
|
let t20;
|
|
379
|
-
if ($[
|
|
381
|
+
if ($[133] !== as || $[134] !== inputSizeCva || $[135] !== isDisabled || $[136] !== isTrailingInteractive || $[137] !== size || $[138] !== trailingClassName || $[139] !== trailingContentNodes || $[140] !== wrapTrailingContent) {
|
|
380
382
|
t20 = wrapTrailingContent && trailingContentNodes ? /* @__PURE__ */ jsx("div", {
|
|
381
383
|
className: clsx("flex items-center gap-input-gap-trailing-elements", inputSizeCva({
|
|
382
384
|
size,
|
|
@@ -384,86 +386,86 @@ var InputFrame = (props) => {
|
|
|
384
386
|
}), !isTrailingInteractive && "pointer-events-none", isDisabled && "text-interactive-text-secondary-disabled", trailingClassName),
|
|
385
387
|
children: trailingContentNodes
|
|
386
388
|
}) : trailingContentNodes;
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
$[
|
|
390
|
-
$[
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
-
} else t20 = $[
|
|
389
|
+
$[133] = as;
|
|
390
|
+
$[134] = inputSizeCva;
|
|
391
|
+
$[135] = isDisabled;
|
|
392
|
+
$[136] = isTrailingInteractive;
|
|
393
|
+
$[137] = size;
|
|
394
|
+
$[138] = trailingClassName;
|
|
395
|
+
$[139] = trailingContentNodes;
|
|
396
|
+
$[140] = wrapTrailingContent;
|
|
397
|
+
$[141] = t20;
|
|
398
|
+
} else t20 = $[141];
|
|
397
399
|
const trailingRow = t20;
|
|
398
400
|
let t21;
|
|
399
|
-
if ($[
|
|
401
|
+
if ($[142] !== contentAndTrailingClassName || $[143] !== contentRow || $[144] !== trailingRow || $[145] !== wrapContentAndTrailing) {
|
|
400
402
|
t21 = wrapContentAndTrailing ? /* @__PURE__ */ jsxs("div", {
|
|
401
403
|
className: clsx("flex w-full items-center gap-input-gap-input-text-to-elements", contentAndTrailingClassName),
|
|
402
404
|
children: [contentRow, trailingRow]
|
|
403
405
|
}) : /* @__PURE__ */ jsxs(Fragment, { children: [contentRow, trailingRow] });
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
407
|
-
$[
|
|
408
|
-
$[
|
|
409
|
-
} else t21 = $[
|
|
406
|
+
$[142] = contentAndTrailingClassName;
|
|
407
|
+
$[143] = contentRow;
|
|
408
|
+
$[144] = trailingRow;
|
|
409
|
+
$[145] = wrapContentAndTrailing;
|
|
410
|
+
$[146] = t21;
|
|
411
|
+
} else t21 = $[146];
|
|
410
412
|
const inputFrameContent = t21;
|
|
411
413
|
let t22;
|
|
412
|
-
if ($[
|
|
414
|
+
if ($[147] !== staticPressTarget) {
|
|
413
415
|
t22 = (target) => staticPressTarget === "frame" || target instanceof Element && !!target.closest("[data-static-press-action]");
|
|
414
|
-
$[
|
|
415
|
-
$[
|
|
416
|
-
} else t22 = $[
|
|
416
|
+
$[147] = staticPressTarget;
|
|
417
|
+
$[148] = t22;
|
|
418
|
+
} else t22 = $[148];
|
|
417
419
|
const shouldReplayStaticPress = t22;
|
|
418
420
|
const isStaticPressActionTarget = _temp;
|
|
419
421
|
const t23 = as === "inline" ? -1 : void 0;
|
|
420
422
|
const t24 = as === "inline" ? -1 : void 0;
|
|
421
423
|
let t25;
|
|
422
|
-
if ($[
|
|
424
|
+
if ($[149] !== onMouseEnter || $[150] !== onStaticInteract) {
|
|
423
425
|
t25 = (event) => {
|
|
424
426
|
onMouseEnter?.(event);
|
|
425
427
|
if (isStaticPressActionTarget(event.target)) return;
|
|
426
428
|
onStaticInteract?.(false, event.target);
|
|
427
429
|
};
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
} else t25 = $[
|
|
430
|
+
$[149] = onMouseEnter;
|
|
431
|
+
$[150] = onStaticInteract;
|
|
432
|
+
$[151] = t25;
|
|
433
|
+
} else t25 = $[151];
|
|
432
434
|
let t26;
|
|
433
|
-
if ($[
|
|
435
|
+
if ($[152] !== onFocusCapture || $[153] !== onStaticInteract) {
|
|
434
436
|
t26 = (event_0) => {
|
|
435
437
|
onFocusCapture?.(event_0);
|
|
436
438
|
if (pendingStaticPressPointerIdRef.current == null) onStaticInteract?.(true, event_0.target);
|
|
437
439
|
};
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
} else t26 = $[
|
|
440
|
+
$[152] = onFocusCapture;
|
|
441
|
+
$[153] = onStaticInteract;
|
|
442
|
+
$[154] = t26;
|
|
443
|
+
} else t26 = $[154];
|
|
442
444
|
const t27 = !isInputContentGroup && inputFrameContentGroupClassNames[contentGroup];
|
|
443
445
|
let t28;
|
|
444
|
-
if ($[
|
|
446
|
+
if ($[155] !== as || $[156] !== inputBaseCva || $[157] !== inputClassName || $[158] !== t27 || $[159] !== variant) {
|
|
445
447
|
t28 = clsx("relative flex cursor-text has-disabled:cursor-default", t27, inputBaseCva({
|
|
446
448
|
variant,
|
|
447
449
|
as
|
|
448
450
|
}), inputClassName);
|
|
449
|
-
$[
|
|
450
|
-
$[
|
|
451
|
-
$[
|
|
452
|
-
$[
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
455
|
-
} else t28 = $[
|
|
451
|
+
$[155] = as;
|
|
452
|
+
$[156] = inputBaseCva;
|
|
453
|
+
$[157] = inputClassName;
|
|
454
|
+
$[158] = t27;
|
|
455
|
+
$[159] = variant;
|
|
456
|
+
$[160] = t28;
|
|
457
|
+
} else t28 = $[160];
|
|
456
458
|
const t29 = isDisabled ? -1 : 0;
|
|
457
459
|
let t30;
|
|
458
|
-
if ($[
|
|
460
|
+
if ($[161] !== onStaticInteract) {
|
|
459
461
|
t30 = (event_1) => {
|
|
460
462
|
if (pendingStaticPressPointerIdRef.current == null) onStaticInteract?.(true, event_1.target);
|
|
461
463
|
};
|
|
462
|
-
$[
|
|
463
|
-
$[
|
|
464
|
-
} else t30 = $[
|
|
464
|
+
$[161] = onStaticInteract;
|
|
465
|
+
$[162] = t30;
|
|
466
|
+
} else t30 = $[162];
|
|
465
467
|
let t31;
|
|
466
|
-
if ($[
|
|
468
|
+
if ($[163] !== onStaticInteract || $[164] !== onStaticPress || $[165] !== shouldReplayStaticPress) {
|
|
467
469
|
t31 = (event_2) => {
|
|
468
470
|
if (onStaticPress && shouldReplayStaticPress(event_2.target)) {
|
|
469
471
|
onStaticPress();
|
|
@@ -471,22 +473,22 @@ var InputFrame = (props) => {
|
|
|
471
473
|
}
|
|
472
474
|
onStaticInteract?.(true, event_2.target);
|
|
473
475
|
};
|
|
474
|
-
$[
|
|
475
|
-
$[
|
|
476
|
-
$[
|
|
477
|
-
$[
|
|
478
|
-
} else t31 = $[
|
|
476
|
+
$[163] = onStaticInteract;
|
|
477
|
+
$[164] = onStaticPress;
|
|
478
|
+
$[165] = shouldReplayStaticPress;
|
|
479
|
+
$[166] = t31;
|
|
480
|
+
} else t31 = $[166];
|
|
479
481
|
let t32;
|
|
480
|
-
if ($[
|
|
482
|
+
if ($[167] !== onStaticPress || $[168] !== shouldReplayStaticPress) {
|
|
481
483
|
t32 = (event_3) => {
|
|
482
484
|
if (onStaticPress && shouldReplayStaticPress(event_3.target) || isStaticPressActionTarget(event_3.target)) pendingStaticPressPointerIdRef.current = event_3.pointerId;
|
|
483
485
|
};
|
|
484
|
-
$[
|
|
485
|
-
$[
|
|
486
|
-
$[
|
|
487
|
-
} else t32 = $[
|
|
486
|
+
$[167] = onStaticPress;
|
|
487
|
+
$[168] = shouldReplayStaticPress;
|
|
488
|
+
$[169] = t32;
|
|
489
|
+
} else t32 = $[169];
|
|
488
490
|
let t33;
|
|
489
|
-
if ($[
|
|
491
|
+
if ($[170] !== onStaticInteract || $[171] !== onStaticPress || $[172] !== shouldReplayStaticPress) {
|
|
490
492
|
t33 = (event_4) => {
|
|
491
493
|
if (pendingStaticPressPointerIdRef.current === event_4.pointerId) return;
|
|
492
494
|
if (onStaticPress && shouldReplayStaticPress(event_4.target)) {
|
|
@@ -495,30 +497,30 @@ var InputFrame = (props) => {
|
|
|
495
497
|
}
|
|
496
498
|
onStaticInteract?.(true, event_4.target);
|
|
497
499
|
};
|
|
498
|
-
$[
|
|
499
|
-
$[
|
|
500
|
-
$[
|
|
501
|
-
$[
|
|
502
|
-
} else t33 = $[
|
|
500
|
+
$[170] = onStaticInteract;
|
|
501
|
+
$[171] = onStaticPress;
|
|
502
|
+
$[172] = shouldReplayStaticPress;
|
|
503
|
+
$[173] = t33;
|
|
504
|
+
} else t33 = $[173];
|
|
503
505
|
let t34;
|
|
504
|
-
if ($[
|
|
506
|
+
if ($[174] === Symbol.for("react.memo_cache_sentinel")) {
|
|
505
507
|
t34 = (event_5) => {
|
|
506
508
|
if (pendingStaticPressPointerIdRef.current === event_5.pointerId) pendingStaticPressPointerIdRef.current = null;
|
|
507
509
|
};
|
|
508
|
-
$[
|
|
509
|
-
} else t34 = $[
|
|
510
|
+
$[174] = t34;
|
|
511
|
+
} else t34 = $[174];
|
|
510
512
|
let t35;
|
|
511
|
-
if ($[
|
|
513
|
+
if ($[175] !== onStaticPress) {
|
|
512
514
|
t35 = (event_6) => {
|
|
513
515
|
if (pendingStaticPressPointerIdRef.current !== event_6.pointerId) return;
|
|
514
516
|
pendingStaticPressPointerIdRef.current = null;
|
|
515
517
|
onStaticPress?.();
|
|
516
518
|
};
|
|
517
|
-
$[
|
|
518
|
-
$[
|
|
519
|
-
} else t35 = $[
|
|
519
|
+
$[175] = onStaticPress;
|
|
520
|
+
$[176] = t35;
|
|
521
|
+
} else t35 = $[176];
|
|
520
522
|
let t36;
|
|
521
|
-
if ($[
|
|
523
|
+
if ($[177] !== dataAttributeProps || $[178] !== inputFrameContent || $[179] !== ref || $[180] !== t28 || $[181] !== t29 || $[182] !== t30 || $[183] !== t31 || $[184] !== t32 || $[185] !== t33 || $[186] !== t35) {
|
|
522
524
|
t36 = /* @__PURE__ */ jsx("div", {
|
|
523
525
|
ref,
|
|
524
526
|
...dataAttributeProps,
|
|
@@ -533,20 +535,20 @@ var InputFrame = (props) => {
|
|
|
533
535
|
"data-rac": "",
|
|
534
536
|
children: inputFrameContent
|
|
535
537
|
});
|
|
536
|
-
$[
|
|
537
|
-
$[
|
|
538
|
-
$[
|
|
539
|
-
$[
|
|
540
|
-
$[
|
|
541
|
-
$[
|
|
542
|
-
$[
|
|
543
|
-
$[
|
|
544
|
-
$[
|
|
545
|
-
$[
|
|
546
|
-
$[
|
|
547
|
-
} else t36 = $[
|
|
538
|
+
$[177] = dataAttributeProps;
|
|
539
|
+
$[178] = inputFrameContent;
|
|
540
|
+
$[179] = ref;
|
|
541
|
+
$[180] = t28;
|
|
542
|
+
$[181] = t29;
|
|
543
|
+
$[182] = t30;
|
|
544
|
+
$[183] = t31;
|
|
545
|
+
$[184] = t32;
|
|
546
|
+
$[185] = t33;
|
|
547
|
+
$[186] = t35;
|
|
548
|
+
$[187] = t36;
|
|
549
|
+
} else t36 = $[187];
|
|
548
550
|
let t37;
|
|
549
|
-
if ($[
|
|
551
|
+
if ($[188] !== as || $[189] !== dataAttributeProps || $[190] !== formFieldProps || $[191] !== formFieldRef || $[192] !== labelProps || $[193] !== t24 || $[194] !== t25 || $[195] !== t26 || $[196] !== t36) {
|
|
550
552
|
t37 = /* @__PURE__ */ jsx(FormField, {
|
|
551
553
|
...formFieldProps,
|
|
552
554
|
...dataAttributeProps,
|
|
@@ -558,31 +560,31 @@ var InputFrame = (props) => {
|
|
|
558
560
|
onFocusCapture: t26,
|
|
559
561
|
children: t36
|
|
560
562
|
});
|
|
561
|
-
$[
|
|
562
|
-
$[
|
|
563
|
-
$[
|
|
564
|
-
$[
|
|
565
|
-
$[
|
|
566
|
-
$[
|
|
567
|
-
$[
|
|
568
|
-
$[
|
|
569
|
-
$[
|
|
570
|
-
$[
|
|
571
|
-
} else t37 = $[
|
|
563
|
+
$[188] = as;
|
|
564
|
+
$[189] = dataAttributeProps;
|
|
565
|
+
$[190] = formFieldProps;
|
|
566
|
+
$[191] = formFieldRef;
|
|
567
|
+
$[192] = labelProps;
|
|
568
|
+
$[193] = t24;
|
|
569
|
+
$[194] = t25;
|
|
570
|
+
$[195] = t26;
|
|
571
|
+
$[196] = t36;
|
|
572
|
+
$[197] = t37;
|
|
573
|
+
} else t37 = $[197];
|
|
572
574
|
let t38;
|
|
573
|
-
if ($[
|
|
575
|
+
if ($[198] !== as || $[199] !== error || $[200] !== t23 || $[201] !== t37) {
|
|
574
576
|
t38 = /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
575
577
|
as,
|
|
576
578
|
error,
|
|
577
579
|
triggerTabIndex: t23,
|
|
578
580
|
children: t37
|
|
579
581
|
});
|
|
580
|
-
$[
|
|
581
|
-
$[
|
|
582
|
-
$[
|
|
583
|
-
$[
|
|
584
|
-
$[
|
|
585
|
-
} else t38 = $[
|
|
582
|
+
$[198] = as;
|
|
583
|
+
$[199] = error;
|
|
584
|
+
$[200] = t23;
|
|
585
|
+
$[201] = t37;
|
|
586
|
+
$[202] = t38;
|
|
587
|
+
} else t38 = $[202];
|
|
586
588
|
return t38;
|
|
587
589
|
};
|
|
588
590
|
var inputFrameContentGroupClassNames = {
|
|
@@ -48,6 +48,7 @@ export declare namespace UIConfig {
|
|
|
48
48
|
setDateValueOnDateSelection?: boolean;
|
|
49
49
|
timeZone?: string;
|
|
50
50
|
todayIconButtonComponent?: DatePickerProps["todayIconButtonComponent"];
|
|
51
|
+
allowPartialRange?: boolean;
|
|
51
52
|
};
|
|
52
53
|
actionModal: Pick<ActionModalProps, "titleTypography" | "descriptionTypography">;
|
|
53
54
|
bottomSheet: Pick<BottomSheetProps, "closeDragThreshold" | "closeVelocityThreshold" | "hideThumb" | "headerTypography">;
|
|
@@ -78,7 +78,8 @@ var UIConfig;
|
|
|
78
78
|
setDateValueOnDateSelection: false,
|
|
79
79
|
timeZone: "clientLocal",
|
|
80
80
|
granularity: "day",
|
|
81
|
-
shouldUpdateDateOnMonthYearChange: false
|
|
81
|
+
shouldUpdateDateOnMonthYearChange: false,
|
|
82
|
+
allowPartialRange: false
|
|
82
83
|
},
|
|
83
84
|
actionModal: {
|
|
84
85
|
titleTypography: {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IntlUtils } from "../utils/intl.utils.js";
|
|
1
2
|
import { StringUtils } from "../utils/string.utils.js";
|
|
2
3
|
import { ZodUtils } from "../utils/zod.utils.js";
|
|
3
4
|
import { DateUtils } from "../utils/date.utils.js";
|
|
@@ -11,7 +12,7 @@ var FORMAT_MAP = {
|
|
|
11
12
|
return `${DateUtils.formatDate(new Date(value.start))} - ${DateUtils.formatDate(new Date(value.end))}`;
|
|
12
13
|
},
|
|
13
14
|
enum: (value) => StringUtils.capitalize(value),
|
|
14
|
-
number: (value) =>
|
|
15
|
+
number: (value) => IntlUtils.getNumberFormatter(i18next.language).format(value),
|
|
15
16
|
string: (value) => String(value),
|
|
16
17
|
boolean: (value) => {
|
|
17
18
|
const key = `${DEFAULT_NAMESPACE}.${value ? "yes" : "no"}`;
|
package/dist/index.d.ts
CHANGED
|
@@ -254,6 +254,7 @@ export { DateTimeUtils } from './utils/date-time.utils';
|
|
|
254
254
|
export { DomUtils } from './utils/dom.utils';
|
|
255
255
|
export { FileUtils } from './utils/file.utils';
|
|
256
256
|
export { isEqual } from './utils/isEqual';
|
|
257
|
+
export { IntlUtils } from './utils/intl.utils';
|
|
257
258
|
export { logger } from './utils/logger';
|
|
258
259
|
export { ObjectUtils } from './utils/object.utils';
|
|
259
260
|
export { QueriesUtils } from './utils/queries.utils';
|
package/dist/index.js
CHANGED
|
@@ -83,6 +83,7 @@ import { inputBaseDefinition, inputClearClassDefinition, inputContentWrapperDefi
|
|
|
83
83
|
import { CheckboxGroup } from "./components/inputs/Checkbox/CheckboxGroup.js";
|
|
84
84
|
import { useLongPressRepeat } from "./hooks/useLongPressRepeat.js";
|
|
85
85
|
import { useScrollableListBox } from "./hooks/useScrollableListBox.js";
|
|
86
|
+
import { IntlUtils } from "./utils/intl.utils.js";
|
|
86
87
|
import { DateTimeUtils } from "./utils/date-time.utils.js";
|
|
87
88
|
import { datePickerInputContentRowDefinition } from "./components/inputs/DateTime/shared/datePickerInput.cva.js";
|
|
88
89
|
import { popoverDefinition } from "./components/shared/popover.cva.js";
|
|
@@ -177,4 +178,4 @@ import { useSorting } from "./hooks/useSorting.js";
|
|
|
177
178
|
import { useTableColumnConfig } from "./hooks/useTableColumnConfig.js";
|
|
178
179
|
import { ArrayUtils } from "./utils/array.utils.js";
|
|
179
180
|
import { QueriesUtils } from "./utils/queries.utils.js";
|
|
180
|
-
export { Accordion, ActionModal, Alert, AlignCenterIcon, AlignLeftIcon, AlignLeftRightIcon, AlignRightIcon, ArrayUtils, ArrowDropDownIcon, ArrowDropUpIcon, ArrowLeftIcon, ArrowRightIcon, Autocomplete, BoldIcon, BottomSheet, Breadcrumbs, BulletedListIcon, Button, CalendarIcon, CellText, CheckIcon, Checkbox, CheckboxCheckmarkIcon, CheckboxGroup, CheckboxIndeterminateIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ClockIcon, CloseIcon, ColumnConfigModal, Confirmation, DatePicker, DateRangePicker, DateTimeIcon, DateTimePicker, DateTimeUtils, DateUtils, DomUtils, Drawer, FileUpload, FileUploadContainer, FileUtils, Form, FormField, HeaderText, HighlightIcon, HighlightOnIcon, HomeIcon, IconButton, InfiniteTable, InfoIcon, InlineIconButton, InputUpload, Inputs, ItalicIcon, Link, LinkContext, LinkIcon, Loader, Menu, MenuIcon, MenuItem, MenuPopover, Modal, NumberInput, NumberRangeInput, NumberedListIcon, ObjectUtils, PaginatedTable, Pagination, PaginationList, PasswordInput, Pill, PillButton, PointerHorizontalIcon, PointerVerticalIcon, ProgressBar, QueriesUtils, QueryAutocomplete, QuerySelect, RadioGroup, ResponsivePopover, RestUtils, RoutingUtils, Segment, Select, SendIcon, Slider, SplitButton, Stepper, StrikethroughIcon, StringUtils, Table, Tag, TextArea, TextButton, TextColorIcon, TextInput, ThemeContext, TimePicker, Toast, ToastContainer, Toggle, ToggleButton, Tooltip, TooltipEllipsis, Typography, UIConfig, UIOverrides, UIRouter, UnderlinedIcon, VisibilityIcon, VisibilityOffIcon, ZodUtils, accordionChevronDefinition, accordionDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition, alertDefinition, breadcrumbChevronDefinition, breadcrumbIconDefinition, breadcrumbItemDefinition, breadcrumbSegmentDefinition, breadcrumbsDefinition, buttonContentDefinition, buttonDefinition, buttonIconSizeDefinition, buttonSizeDefinition, checkboxContentRowDefinition, checkboxContentWrapperDefinition, checkboxDefinition, checkboxGroupLabelDefinition, checkboxIconDefinition, compoundMapper, createKeyInteractionsHandler, datePickerInputContentRowDefinition, dynamicColumns, dynamicInputs, fileUploadDropZoneDefinition, formFieldDefinition, formFieldErrorDefinition, formFieldHeaderDefinition, formFieldHelperDefinition, getKeyInteractionAction, inputBaseDefinition, inputClearClassDefinition, inputContentWrapperDefinition, inputSideDefinition, inputSizeDefinition, inputUploadButtonDefinition, inputUploadDropZoneDefinition, isEqual, labelDefinition, linkDefinition, loaderDefinition, loaderWrapperDefinition, logger, menuDefinition, menuItemDefinition, menuPopoverDefinition, menuPopoverWrapperDefinition, modalContentDefinition, modalMainDefinition, modalOverlayDefinition, ns, pillButtonContentDefinition, pillButtonDefinition, popoverDefinition, progressBarDefinition, progressBarFillDefinition, progressBarTrackDefinition, progressBarTrackWrapperDefinition, progressBarValueDefinition, radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition, resources, segmentDefinition, segmentItemDefinition, selectInputTagsContentWrapperDefinition, selectListBoxItemDefinition, selectPopoverDefinition, statusIconDefinition, statusSeparatorDefinition, stepperDefinition, stepperIconDefinition, stepperItemDefinition, stepperNumberDefinition, stepperSeparatorDefinition, stepperSubtextDefinition, stepperTitleDefinition, tableCellTextDefinition, tableDataDefinition, tableHeadDataDefinition, tableHeadRowDefinition, tableHeaderTextDefinition, tableRowDefinition, tagDefinition, textAreaWrapperDefinition, toastDefinition, statusIconDefinition$1 as toastStatusIconDefinition, statusSeparatorDefinition$1 as toastStatusSeparatorDefinition, toggleDefinition, tooltipDefinition, tooltipPointerHorizontalDefinition, tooltipPointerVerticalDefinition, tooltipTextDefinition, tooltipWrapperTriggerDefinition, typographyDefinition, uiOutlineClass, useAutosave, useBreakpoint, useDebounceCallback, useDeepCompareEffect, useDeepCompareLayoutEffect, useDeepCompareMemo, useFilters, useForm, useFormAutosave, useIntersectionObserver, useKeyInteractions, useLocalStorage, useLongPressRepeat, usePagination, useScrollableListBox, useSorting, useStateAndRef, useTableColumnConfig, useTableNav, useToast, useTranslationMemo };
|
|
181
|
+
export { Accordion, ActionModal, Alert, AlignCenterIcon, AlignLeftIcon, AlignLeftRightIcon, AlignRightIcon, ArrayUtils, ArrowDropDownIcon, ArrowDropUpIcon, ArrowLeftIcon, ArrowRightIcon, Autocomplete, BoldIcon, BottomSheet, Breadcrumbs, BulletedListIcon, Button, CalendarIcon, CellText, CheckIcon, Checkbox, CheckboxCheckmarkIcon, CheckboxGroup, CheckboxIndeterminateIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsLeftIcon, ChevronsRightIcon, ClockIcon, CloseIcon, ColumnConfigModal, Confirmation, DatePicker, DateRangePicker, DateTimeIcon, DateTimePicker, DateTimeUtils, DateUtils, DomUtils, Drawer, FileUpload, FileUploadContainer, FileUtils, Form, FormField, HeaderText, HighlightIcon, HighlightOnIcon, HomeIcon, IconButton, InfiniteTable, InfoIcon, InlineIconButton, InputUpload, Inputs, IntlUtils, ItalicIcon, Link, LinkContext, LinkIcon, Loader, Menu, MenuIcon, MenuItem, MenuPopover, Modal, NumberInput, NumberRangeInput, NumberedListIcon, ObjectUtils, PaginatedTable, Pagination, PaginationList, PasswordInput, Pill, PillButton, PointerHorizontalIcon, PointerVerticalIcon, ProgressBar, QueriesUtils, QueryAutocomplete, QuerySelect, RadioGroup, ResponsivePopover, RestUtils, RoutingUtils, Segment, Select, SendIcon, Slider, SplitButton, Stepper, StrikethroughIcon, StringUtils, Table, Tag, TextArea, TextButton, TextColorIcon, TextInput, ThemeContext, TimePicker, Toast, ToastContainer, Toggle, ToggleButton, Tooltip, TooltipEllipsis, Typography, UIConfig, UIOverrides, UIRouter, UnderlinedIcon, VisibilityIcon, VisibilityOffIcon, ZodUtils, accordionChevronDefinition, accordionDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition, alertDefinition, breadcrumbChevronDefinition, breadcrumbIconDefinition, breadcrumbItemDefinition, breadcrumbSegmentDefinition, breadcrumbsDefinition, buttonContentDefinition, buttonDefinition, buttonIconSizeDefinition, buttonSizeDefinition, checkboxContentRowDefinition, checkboxContentWrapperDefinition, checkboxDefinition, checkboxGroupLabelDefinition, checkboxIconDefinition, compoundMapper, createKeyInteractionsHandler, datePickerInputContentRowDefinition, dynamicColumns, dynamicInputs, fileUploadDropZoneDefinition, formFieldDefinition, formFieldErrorDefinition, formFieldHeaderDefinition, formFieldHelperDefinition, getKeyInteractionAction, inputBaseDefinition, inputClearClassDefinition, inputContentWrapperDefinition, inputSideDefinition, inputSizeDefinition, inputUploadButtonDefinition, inputUploadDropZoneDefinition, isEqual, labelDefinition, linkDefinition, loaderDefinition, loaderWrapperDefinition, logger, menuDefinition, menuItemDefinition, menuPopoverDefinition, menuPopoverWrapperDefinition, modalContentDefinition, modalMainDefinition, modalOverlayDefinition, ns, pillButtonContentDefinition, pillButtonDefinition, popoverDefinition, progressBarDefinition, progressBarFillDefinition, progressBarTrackDefinition, progressBarTrackWrapperDefinition, progressBarValueDefinition, radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition, resources, segmentDefinition, segmentItemDefinition, selectInputTagsContentWrapperDefinition, selectListBoxItemDefinition, selectPopoverDefinition, statusIconDefinition, statusSeparatorDefinition, stepperDefinition, stepperIconDefinition, stepperItemDefinition, stepperNumberDefinition, stepperSeparatorDefinition, stepperSubtextDefinition, stepperTitleDefinition, tableCellTextDefinition, tableDataDefinition, tableHeadDataDefinition, tableHeadRowDefinition, tableHeaderTextDefinition, tableRowDefinition, tagDefinition, textAreaWrapperDefinition, toastDefinition, statusIconDefinition$1 as toastStatusIconDefinition, statusSeparatorDefinition$1 as toastStatusSeparatorDefinition, toggleDefinition, tooltipDefinition, tooltipPointerHorizontalDefinition, tooltipPointerVerticalDefinition, tooltipTextDefinition, tooltipWrapperTriggerDefinition, typographyDefinition, uiOutlineClass, useAutosave, useBreakpoint, useDebounceCallback, useDeepCompareEffect, useDeepCompareLayoutEffect, useDeepCompareMemo, useFilters, useForm, useFormAutosave, useIntersectionObserver, useKeyInteractions, useLocalStorage, useLongPressRepeat, usePagination, useScrollableListBox, useSorting, useStateAndRef, useTableColumnConfig, useTableNav, useToast, useTranslationMemo };
|
|
@@ -38,6 +38,5 @@ export declare namespace DateTimeUtils {
|
|
|
38
38
|
export function fromUTCISOToCalendarDate(isoString: string): CalendarDate;
|
|
39
39
|
export function fromCalendarDateTimeToUTCISO(calendarDateTime: CalendarDateTime): string;
|
|
40
40
|
export function fromUTCISOToCalendarDateTime(isoString: string, timeZone?: string): CalendarDateTime;
|
|
41
|
-
export function formatTextDateToCalendarDateTime(textDate: string | null, timeZone?: string, locale?: string): CalendarDateTime | null;
|
|
42
41
|
export {};
|
|
43
42
|
}
|