@povio/ui 3.3.0 → 3.3.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 +1 -1
- package/dist/browser-tests/checkbox/CheckboxGroupHarness.d.ts +10 -0
- package/dist/browser-tests/checkbox/CheckboxHarness.d.ts +10 -0
- package/dist/browser-tests/checkbox/checkbox-group.spec.d.ts +1 -0
- package/dist/browser-tests/checkbox/checkbox.spec.d.ts +1 -0
- package/dist/browser-tests/datetime-picker/DateTimeHarnesses.d.ts +43 -0
- package/dist/browser-tests/datetime-picker/assertions.d.ts +9 -0
- package/dist/browser-tests/datetime-picker/date-input-focus.firefox.spec.d.ts +1 -0
- package/dist/browser-tests/datetime-picker/date-picker.spec.d.ts +1 -0
- package/dist/browser-tests/datetime-picker/date-range-picker.spec.d.ts +1 -0
- package/dist/browser-tests/datetime-picker/date-time-picker.spec.d.ts +1 -0
- package/dist/browser-tests/datetime-picker/time-picker.spec.d.ts +1 -0
- package/dist/browser-tests/file-upload/FileUploadHarness.d.ts +4 -0
- package/dist/browser-tests/file-upload/file-upload.spec.d.ts +1 -0
- package/dist/browser-tests/file-upload-container/FileUploadContainerHarness.d.ts +4 -0
- package/dist/browser-tests/file-upload-container/file-upload-container.spec.d.ts +1 -0
- package/dist/browser-tests/input-upload/InputUploadHarness.d.ts +9 -0
- package/dist/browser-tests/input-upload/input-upload.spec.d.ts +1 -0
- package/dist/browser-tests/modal/ModalHarness.d.ts +5 -0
- package/dist/browser-tests/modal/modal.spec.d.ts +1 -0
- package/dist/browser-tests/number-input/NumberInputHarness.d.ts +10 -0
- package/dist/browser-tests/number-input/number-input.spec.d.ts +1 -0
- package/dist/browser-tests/number-range-input/NumberRangeInputHarness.d.ts +10 -0
- package/dist/browser-tests/number-range-input/number-range-input.spec.d.ts +1 -0
- package/dist/browser-tests/password-input/PasswordInputHarness.d.ts +6 -0
- package/dist/browser-tests/password-input/password-input.spec.d.ts +1 -0
- package/dist/browser-tests/radio-group/RadioGroupHarness.d.ts +15 -0
- package/dist/browser-tests/radio-group/radio-group.spec.d.ts +1 -0
- package/dist/browser-tests/selection/SelectionHarnesses.d.ts +61 -0
- package/dist/browser-tests/selection/autocomplete.spec.d.ts +1 -0
- package/dist/browser-tests/selection/interactions.d.ts +2 -0
- package/dist/browser-tests/selection/query-autocomplete.spec.d.ts +1 -0
- package/dist/browser-tests/selection/query-select.spec.d.ts +1 -0
- package/dist/browser-tests/selection/select.spec.d.ts +1 -0
- package/dist/browser-tests/slider/SliderHarness.d.ts +11 -0
- package/dist/browser-tests/slider/slider.spec.d.ts +1 -0
- package/dist/browser-tests/text-area/TextAreaHarness.d.ts +10 -0
- package/dist/browser-tests/text-area/text-area.spec.d.ts +1 -0
- package/dist/browser-tests/text-input/TextInputHarness.d.ts +10 -0
- package/dist/browser-tests/text-input/text-input.spec.d.ts +1 -0
- package/dist/browser-tests/toggle/ToggleHarness.d.ts +10 -0
- package/dist/browser-tests/toggle/toggle.spec.d.ts +1 -0
- package/dist/browser-tests/utils/blur.d.ts +22 -0
- package/dist/browser-tests/utils/events.d.ts +4 -0
- package/dist/browser-tests/utils/input.d.ts +10 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +206 -55
- package/dist/components/buttons/Button/button.cva.d.ts +1 -1
- package/dist/components/buttons/Button/button.cva.js +4 -4
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/pillButton.cva.js +4 -4
- package/dist/components/buttons/shared/ButtonContent.js +80 -22
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +24 -10
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +222 -74
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +182 -56
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +128 -41
- package/dist/components/inputs/DateTime/shared/Calendar.js +339 -139
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +308 -114
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -35
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +229 -95
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +296 -115
- package/dist/components/inputs/DateTime/shared/DateField.js +306 -135
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +338 -140
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
- package/dist/components/inputs/File/FileUpload.js +1 -1
- package/dist/components/inputs/File/InputUpload.js +261 -65
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +180 -48
- package/dist/components/inputs/File/shared/FileUploadContentError.js +265 -95
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +261 -99
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +234 -56
- package/dist/components/inputs/File/shared/ProgressBar.js +102 -15
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +313 -75
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +83 -23
- package/dist/components/inputs/Selection/Select/QuerySelect.js +96 -30
- package/dist/components/inputs/Selection/shared/SelectListBox.js +163 -51
- package/dist/components/inputs/Selection/shared/useSelectItems.js +108 -48
- package/dist/components/inputs/Skeleton/InputFrame.js +550 -177
- package/dist/components/inputs/TextEditor/TextEditor.js +389 -87
- package/dist/components/navigation/Accordion/Accordion.js +69 -22
- package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
- package/dist/components/navigation/Stepper/Stepper.js +67 -22
- package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
- package/dist/components/overlays/BottomSheet/BottomSheet.js +1 -1
- package/dist/components/overlays/Modal/Modal.d.ts +3 -2
- package/dist/components/overlays/Modal/Modal.js +3 -1
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +110 -29
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/minWidth.cva.d.ts +1 -1
- package/dist/components/status/Alert/Alert.js +97 -30
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/text/Typography/Typography.js +23 -8
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/theme.context.js +98 -45
- package/dist/config/uiConfig.context.js +39 -8
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useFormAutosave.js +120 -33
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/vitest.setup.browser.d.ts +6 -0
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
|
13
13
|
import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
14
14
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
15
15
|
import { useDebounceCallback } from "../../../../hooks/useDebounceCallback.js";
|
|
16
|
+
import { c } from "react/compiler-runtime";
|
|
16
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
18
|
import { clsx } from "clsx";
|
|
18
19
|
import { useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
@@ -253,7 +254,9 @@ var DateTimePickerBase = (props) => {
|
|
|
253
254
|
})
|
|
254
255
|
});
|
|
255
256
|
};
|
|
256
|
-
var DateTimePickerInner = (
|
|
257
|
+
var DateTimePickerInner = (t0) => {
|
|
258
|
+
const $ = c(9);
|
|
259
|
+
const { fullIso: t1, renderStaticInput, isFormControlDisabled, ...props } = t0;
|
|
257
260
|
const ui = UIConfig.useConfig();
|
|
258
261
|
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRowDefinition);
|
|
259
262
|
const { locale } = useLocale();
|
|
@@ -264,15 +267,8 @@ var DateTimePickerInner = ({ fullIso: _fullIso = true, renderStaticInput, isForm
|
|
|
264
267
|
inputRef,
|
|
265
268
|
renderInput,
|
|
266
269
|
setRenderInput,
|
|
267
|
-
getFocusTarget:
|
|
268
|
-
|
|
269
|
-
return container instanceof HTMLElement ? getStaticDateTimeFocusTarget(container, staticTarget) : null;
|
|
270
|
-
},
|
|
271
|
-
getPressTarget: (input_0) => {
|
|
272
|
-
const container_0 = input_0.getContainer?.() ?? input_0;
|
|
273
|
-
if (!(container_0 instanceof HTMLElement)) return null;
|
|
274
|
-
return container_0.querySelector("[data-static-press-action]");
|
|
275
|
-
}
|
|
270
|
+
getFocusTarget: _temp,
|
|
271
|
+
getPressTarget: _temp2
|
|
276
272
|
});
|
|
277
273
|
const normalizedValue = props.value ?? null;
|
|
278
274
|
const timeZone = props.timeZone ?? ui.dateInput.timeZone;
|
|
@@ -342,46 +338,137 @@ var DateTimePickerInner = ({ fullIso: _fullIso = true, renderStaticInput, isForm
|
|
|
342
338
|
trailingClassName: "py-0! pl-0!",
|
|
343
339
|
action: showDropdown ? {
|
|
344
340
|
icon: ui.dateInput.dateTimeIcon,
|
|
345
|
-
onClick:
|
|
341
|
+
onClick: _temp3,
|
|
346
342
|
altText: ""
|
|
347
343
|
} : void 0,
|
|
348
344
|
children: staticSegments
|
|
349
345
|
});
|
|
350
346
|
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
347
|
+
const T0 = DateTimePickerBase;
|
|
348
|
+
const t2 = mergeRefs(props.ref, inputRef);
|
|
349
|
+
const t3 = parseDateValue(normalizedValue);
|
|
350
|
+
let t4;
|
|
351
|
+
if ($[0] !== formatDateValue || $[1] !== props) {
|
|
352
|
+
t4 = (value) => props.onChange?.(formatDateValue(value));
|
|
353
|
+
$[0] = formatDateValue;
|
|
354
|
+
$[1] = props;
|
|
355
|
+
$[2] = t4;
|
|
356
|
+
} else t4 = $[2];
|
|
357
|
+
let t5;
|
|
358
|
+
if ($[3] !== T0 || $[4] !== props || $[5] !== t2 || $[6] !== t3 || $[7] !== t4) {
|
|
359
|
+
t5 = /* @__PURE__ */ jsx(T0, {
|
|
360
|
+
...props,
|
|
361
|
+
ref: t2,
|
|
362
|
+
value: t3,
|
|
363
|
+
onChange: t4
|
|
364
|
+
});
|
|
365
|
+
$[3] = T0;
|
|
366
|
+
$[4] = props;
|
|
367
|
+
$[5] = t2;
|
|
368
|
+
$[6] = t3;
|
|
369
|
+
$[7] = t4;
|
|
370
|
+
$[8] = t5;
|
|
371
|
+
} else t5 = $[8];
|
|
372
|
+
return t5;
|
|
357
373
|
};
|
|
358
|
-
var DateTimePicker = (
|
|
374
|
+
var DateTimePicker = (t0) => {
|
|
375
|
+
const $ = c(24);
|
|
376
|
+
let props;
|
|
377
|
+
let renderStaticInput;
|
|
378
|
+
let t1;
|
|
379
|
+
if ($[0] !== t0) {
|
|
380
|
+
({fullIso: t1, renderStaticInput, ...props} = t0);
|
|
381
|
+
$[0] = t0;
|
|
382
|
+
$[1] = props;
|
|
383
|
+
$[2] = renderStaticInput;
|
|
384
|
+
$[3] = t1;
|
|
385
|
+
} else {
|
|
386
|
+
props = $[1];
|
|
387
|
+
renderStaticInput = $[2];
|
|
388
|
+
t1 = $[3];
|
|
389
|
+
}
|
|
390
|
+
const fullIso = t1 === void 0 ? true : t1;
|
|
359
391
|
if ("formControl" in props && props.formControl) {
|
|
360
|
-
|
|
392
|
+
let formControl;
|
|
393
|
+
let innerProps;
|
|
394
|
+
let ref;
|
|
395
|
+
if ($[4] !== props) {
|
|
396
|
+
({formControl, ref, ...innerProps} = props);
|
|
397
|
+
$[4] = props;
|
|
398
|
+
$[5] = formControl;
|
|
399
|
+
$[6] = innerProps;
|
|
400
|
+
$[7] = ref;
|
|
401
|
+
} else {
|
|
402
|
+
formControl = $[5];
|
|
403
|
+
innerProps = $[6];
|
|
404
|
+
ref = $[7];
|
|
405
|
+
}
|
|
361
406
|
const controlWithOptions = formControl.control;
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
407
|
+
let t2;
|
|
408
|
+
if ($[8] !== controlWithOptions._options?.disabled || $[9] !== fullIso || $[10] !== innerProps || $[11] !== props.error || $[12] !== props.isDisabled || $[13] !== ref || $[14] !== renderStaticInput) {
|
|
409
|
+
t2 = (t3) => {
|
|
410
|
+
const { field, fieldState: t4 } = t3;
|
|
411
|
+
const { error, isDirty } = t4;
|
|
412
|
+
return /* @__PURE__ */ jsx(DateTimePickerInner, {
|
|
413
|
+
...innerProps,
|
|
414
|
+
ref: mergeRefs(ref, field.ref),
|
|
415
|
+
value: field.value ?? null,
|
|
416
|
+
onChange: field.onChange,
|
|
417
|
+
onBlur: field.onBlur,
|
|
418
|
+
isDirty,
|
|
419
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
420
|
+
isFormControlDisabled: !!controlWithOptions._options?.disabled,
|
|
421
|
+
error: props.error ?? error?.message,
|
|
422
|
+
fullIso,
|
|
423
|
+
renderStaticInput
|
|
424
|
+
});
|
|
425
|
+
};
|
|
426
|
+
$[8] = controlWithOptions._options?.disabled;
|
|
427
|
+
$[9] = fullIso;
|
|
428
|
+
$[10] = innerProps;
|
|
429
|
+
$[11] = props.error;
|
|
430
|
+
$[12] = props.isDisabled;
|
|
431
|
+
$[13] = ref;
|
|
432
|
+
$[14] = renderStaticInput;
|
|
433
|
+
$[15] = t2;
|
|
434
|
+
} else t2 = $[15];
|
|
435
|
+
let t3;
|
|
436
|
+
if ($[16] !== formControl.control || $[17] !== formControl.name || $[18] !== t2) {
|
|
437
|
+
t3 = /* @__PURE__ */ jsx(Controller, {
|
|
438
|
+
control: formControl.control,
|
|
439
|
+
name: formControl.name,
|
|
440
|
+
render: t2
|
|
441
|
+
});
|
|
442
|
+
$[16] = formControl.control;
|
|
443
|
+
$[17] = formControl.name;
|
|
444
|
+
$[18] = t2;
|
|
445
|
+
$[19] = t3;
|
|
446
|
+
} else t3 = $[19];
|
|
447
|
+
return t3;
|
|
379
448
|
}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
449
|
+
let t2;
|
|
450
|
+
if ($[20] !== fullIso || $[21] !== props || $[22] !== renderStaticInput) {
|
|
451
|
+
t2 = /* @__PURE__ */ jsx(DateTimePickerInner, {
|
|
452
|
+
...props,
|
|
453
|
+
fullIso,
|
|
454
|
+
renderStaticInput
|
|
455
|
+
});
|
|
456
|
+
$[20] = fullIso;
|
|
457
|
+
$[21] = props;
|
|
458
|
+
$[22] = renderStaticInput;
|
|
459
|
+
$[23] = t2;
|
|
460
|
+
} else t2 = $[23];
|
|
461
|
+
return t2;
|
|
385
462
|
};
|
|
463
|
+
function _temp(input, staticTarget) {
|
|
464
|
+
const container = input.getContainer?.() ?? input;
|
|
465
|
+
return container instanceof HTMLElement ? getStaticDateTimeFocusTarget(container, staticTarget) : null;
|
|
466
|
+
}
|
|
467
|
+
function _temp2(input_0) {
|
|
468
|
+
const container_0 = input_0.getContainer?.() ?? input_0;
|
|
469
|
+
if (!(container_0 instanceof HTMLElement)) return null;
|
|
470
|
+
return container_0.querySelector("[data-static-press-action]");
|
|
471
|
+
}
|
|
472
|
+
function _temp3() {}
|
|
386
473
|
//#endregion
|
|
387
474
|
export { DateTimePicker };
|