@povio/ui 4.0.2-rc.1 → 4.0.3
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 +5 -1
- package/dist/{Breadcrumbs-BibAIBhY.js → Breadcrumbs-C-mZtdCc.js} +1 -1
- package/dist/{Calendar-kSEji28A.js → Calendar-BYcN64W5.js} +6 -136
- package/dist/{DatePicker-BbdtBAGN.js → DatePicker-DGlMtlvy.js} +12 -12
- package/dist/{DatePickerInput-eyHwzKPm.js → DatePickerInput-Nj_rVUyU.js} +8 -7
- package/dist/{DateRangePicker-Ct182qur.js → DateRangePicker-CE9XvAy9.js} +13 -185
- package/dist/{DateTimePicker-taYHMMYi.js → DateTimePicker-CtUPjVp1.js} +12 -12
- package/dist/{FileInput-B-ADr0B3.js → FileInput-BUs7wL0_.js} +1 -1
- package/dist/{FileUpload-3-4Vt4f1.js → FileUpload-C3HzeFeb.js} +1 -1
- package/dist/{FormField-CAcDJ4HC.js → FormField-DTO2cbXC.js} +1 -1
- package/dist/{FormFieldHeaderTooltip-C2IDI4ac.js → FormFieldHeaderTooltip-h6e5hq9V.js} +1 -1
- package/dist/{InlineTooltipWrapper-7HG-g2X3.js → InlineTooltipWrapper-Ct6zi24f.js} +1 -1
- package/dist/{InputItem-B3PlrjuD.js → InputItem-DAunP0iy.js} +9 -9
- package/dist/{Inputs-WZmrBWrL.js → Inputs-_IqA6JRE.js} +1 -1
- package/dist/NumberFormatter-CLDS_LRZ.js +265 -0
- package/dist/{NumberRangeInput-X8G1zfNM.js → NumberRangeInput-Bu-3Y0zf.js} +6 -5
- package/dist/{RadioGroup-DW_OQQDu.js → RadioGroup-DiF7ILto.js} +1 -1
- package/dist/{RichTextEditor-BOTitK7E.js → RichTextEditor-eM9d2umr.js} +2 -2
- package/dist/{Select-DmLkOMr1.js → Select-CyBtGHk9.js} +2 -2
- package/dist/{Slider-Q87Hg_V2.js → Slider-KkWtEm09.js} +1 -1
- package/dist/{TextArea-DZv6XaT0.js → TextArea-DvqDGp4M.js} +2 -2
- package/dist/{TimePicker-DAoHgk8U.js → TimePicker-WirUMDrH.js} +10 -9
- package/dist/{ToggleGroup-Cho_oRZh.js → ToggleGroup-BK6Ka7WA.js} +5 -66
- package/dist/{Tooltip-D94a1IQl.js → Tooltip--PSxkQA3.js} +2 -2
- package/dist/{TooltipWrapper-S2JC-w4e.js → TooltipWrapper-BVc_Aln-.js} +1 -1
- package/dist/components/autocomplete.js +2 -2
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/checkbox-group.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload-container.js +1 -1
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.js +1 -1
- package/dist/components/icon-button.js +1 -1
- package/dist/components/input.js +4 -4
- package/dist/components/number-field.js +7 -6
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/query-autocomplete.js +1 -1
- package/dist/components/query-select.js +2 -2
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip-ellipsis.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/config/ui-router.js +1 -1
- package/dist/{datePickerValue.utils-GADbSu7a.js → datePickerValue.utils-1z4mwZZs.js} +5 -5
- package/dist/hooks/use-filters.js +1 -1
- package/dist/index.js +15 -15
- package/dist/numberStatic.utils-BX50PSee.js +421 -0
- package/dist/rhf/date-picker.js +1 -1
- package/dist/rhf/date-range-picker.js +1 -1
- package/dist/rhf/date-time-picker.js +1 -1
- package/dist/rhf/file-input.js +1 -1
- package/dist/rhf/file-upload.js +1 -1
- package/dist/rhf/number-range-input.js +1 -1
- package/dist/rhf/radio-group.js +1 -1
- package/dist/rhf/rich-text-editor.js +1 -1
- package/dist/rhf/select.js +1 -1
- package/dist/rhf/slider.js +1 -1
- package/dist/rhf/text-area.js +1 -1
- package/dist/rhf/time-picker.js +1 -1
- package/dist/rhf/toggle-group.js +1 -1
- package/dist/rhf.js +15 -15
- package/dist/rich-text-editor.js +1 -1
- package/dist/{router.context-B0jTMtE0.js → router.context-B4FvsTim.js} +2 -2
- package/dist/staticDateTimeSegments-vP2f1woD.js +1763 -0
- package/dist/{staticSelect.utils-ad60elvT.js → staticSelect.utils-DOt6f-ck.js} +4 -143
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-input.js +1 -1
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.js +1 -1
- package/dist/tanstack/inputs.js +1 -1
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/rich-text-editor.js +1 -1
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/table.js +1 -1
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle-group.js +1 -1
- package/dist/tanstack.js +24 -24
- package/dist/useControlledState-CzXkZCX8.js +30 -0
- package/dist/{useFieldAccessibility-CtTdRX2u.js → useFieldAccessibility-BTs_WC_5.js} +2 -2
- package/dist/{useFilters-kkEUFKmQ.js → useFilters-XNH27Md2.js} +1 -1
- package/dist/{useFormAutosave-DqP6lB4l.js → useFormAutosave-BRlM0nmq.js} +1 -1
- package/dist/{useStaticInputHandoff-BAaDW_0z.js → useStaticInputHandoff-_stbpoX4.js} +2 -2
- package/dist/{useTableColumnConfig-DVI_jVHz.js → useTableColumnConfig-CiAr7Dbi.js} +1 -1
- package/package.json +1 -1
- package/dist/FocusScope-CO9oJ1sc.js +0 -343
- package/dist/chain-DIXr2VAT.js +0 -10
- package/dist/focusSafely-DCGrr2bb.js +0 -447
- package/dist/getScrollParent-kSR7EtoT.js +0 -47
- package/dist/numberStatic.utils-BMgRzyd3.js +0 -902
- package/dist/openLink-CQhMhfzO.js +0 -121
- package/dist/platform-BXNIIAfU.js +0 -42
- package/dist/staticDateTimeSegments-BQoA94W-.js +0 -3603
- package/dist/useControlledState-DQxX6LMN.js +0 -189
- package/dist/useFocusable-Bd0UsrQ7.js +0 -63
- package/dist/useFormValidationState-D3z-gafz.js +0 -1341
- package/dist/useLayoutEffect-B2-1tbPJ.js +0 -83
- package/dist/useSyncRef-RGMv0rXK.js +0 -338
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ The broad `@povio/ui`, `@povio/ui/rhf`, and `@povio/ui/tanstack` entries remain
|
|
|
25
25
|
|
|
26
26
|
Feature dependencies are optional peers. Install the matching packages when using date/calendar entries, `@povio/ui/tanstack/table`, RHF/TanStack Form inputs, or the rich text editor. Basic components such as Button, Typography, and Dialog do not require table, drag-and-drop, calendar, or TipTap packages.
|
|
27
27
|
|
|
28
|
-
React Aria is an internal `@povio/ui` dependency and does not need to be installed separately.
|
|
28
|
+
React Aria is an internal `@povio/ui` dependency and does not need to be installed separately. The build keeps `react-aria` and all its subpaths external so providers and Povio components share the installed module contexts. Component-scoped escape-hatch entries expose only the corresponding React Aria primitive and its types for custom implementations:
|
|
29
29
|
|
|
30
30
|
```tsx
|
|
31
31
|
import { Link, type LinkProps } from "@povio/ui/link/react-aria";
|
|
@@ -40,6 +40,10 @@ The React Aria hooks used by Povio are similarly isolated under `use-text-field`
|
|
|
40
40
|
|
|
41
41
|
Each emitted entry is independently bundled and tree-shaken; it does not forward React Aria's aggregate barrel or share a generated aggregate chunk with unrelated controls. Ordinary Povio component imports do not include the escape-hatch entries.
|
|
42
42
|
|
|
43
|
+
## Built-package tests
|
|
44
|
+
|
|
45
|
+
From `packages/ui`, run `bun run test:package` to build the publishable package and run its Chromium regressions. The tests resolve public imports through `dist/package.json`, covering both date pickers with empty and populated values in static and editable modes, including locale switches without remounting.
|
|
46
|
+
|
|
43
47
|
## Versioning
|
|
44
48
|
|
|
45
49
|
`^2.1` still corresponds to Atlas 2.1. All versions after that currently target Atlas 2.2 and follow semantic versioning — breaking changes bump the major version.
|
|
@@ -5,7 +5,7 @@ import { l as $7230ffa83bc0c2cf$export$fabf2dc03a41866e, n as $7230ffa83bc0c2cf$
|
|
|
5
5
|
import { p as $263ab7fc0f95ccdb$export$4feb769f8ddf26c5 } from "./Dialog-CXoVeIkU.js";
|
|
6
6
|
import { n as $984a1fc08f87e4f3$export$e2509388b49734e7, t as $984a1fc08f87e4f3$export$a6c7ac8248d6e38a } from "./Link-FupWOW1f.js";
|
|
7
7
|
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-D6KlWSFL.js";
|
|
8
|
-
import { t as Tooltip } from "./Tooltip
|
|
8
|
+
import { t as Tooltip } from "./Tooltip--PSxkQA3.js";
|
|
9
9
|
import { t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
|
|
10
10
|
import { t as Typography } from "./Typography-AcUd9df8.js";
|
|
11
11
|
import { t as LinkContext } from "./link.context-J7aQtMOr.js";
|
|
@@ -2,153 +2,23 @@ import { t as ChevronDown } from "./chevron-down-B4Pr8bD3.js";
|
|
|
2
2
|
import { t as ChevronLeft } from "./chevron-left-Dgo_b9wJ.js";
|
|
3
3
|
import { t as ChevronRight } from "./chevron-right-3nKJR5Bb.js";
|
|
4
4
|
import { t as ChevronUp } from "./chevron-up-D_Gqpb5M.js";
|
|
5
|
-
import { a as CalendarGrid, i as $1697a7ad3db7b79f$re_export$useDateFormatter, o as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6 } from "./DatePickerInput-
|
|
5
|
+
import { a as CalendarGrid, i as $1697a7ad3db7b79f$re_export$useDateFormatter, o as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6 } from "./DatePickerInput-Nj_rVUyU.js";
|
|
6
6
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
7
7
|
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-D6KlWSFL.js";
|
|
8
8
|
import { i as $928221da08ecbc62$export$a11e76429ed99b4, t as $928221da08ecbc62$export$41f133550aa26f48 } from "./ListBox-B7DW1S7n.js";
|
|
9
9
|
import { n as $bc25b811ec97a172$export$40258cc1d95ff477 } from "./ToggleButton-BW1ensey.js";
|
|
10
|
-
import { n as $23f2114a1b82827e$export$4282f70798064fe0 } from "./useLayoutEffect-B2-1tbPJ.js";
|
|
11
|
-
import { a as $390e54f620492c70$export$f680877a34711e37, r as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./useSyncRef-RGMv0rXK.js";
|
|
12
|
-
import { c as $191c9b6d48a0a4e2$export$294aa081a6c6f55d, m as $cf2482eff2eeeec2$export$f12b703ca79dfbb1, r as $fd2148440a13ec26$export$fc1a364ae1f3ff10, s as $2c9edc598a03d523$export$420e68273165f4ec } from "./useFormValidationState-D3z-gafz.js";
|
|
13
|
-
import { n as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f, r as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7, t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-DQxX6LMN.js";
|
|
14
|
-
import { C as $0014db39426443c5$exports, S as $6a440d0e2d99dd46$export$4a931266a3838b86, f as $8b141f2f71e88f85$export$2440da353cedad43, g as $8b141f2f71e88f85$export$f18627323ab57ac0, h as $8b141f2f71e88f85$export$c5221a78ef73c5e9, p as $8b141f2f71e88f85$export$7e319ea407e63bc0, v as $7541913c0284d84b$export$300019f83c56d282, w as $121970af65029459$export$f8aeda7b10753fa1 } from "./staticDateTimeSegments-BQoA94W-.js";
|
|
15
|
-
import { n as $535772f9d2c1f38d$export$c5251b9e124bf29 } from "./FocusScope-CO9oJ1sc.js";
|
|
16
10
|
import { t as Typography } from "./Typography-AcUd9df8.js";
|
|
17
11
|
import { PillButton } from "./components/pill-button.js";
|
|
18
12
|
import { t as useBreakpoint } from "./useBreakpoint-3kpqzjoC.js";
|
|
19
|
-
import {
|
|
13
|
+
import { t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-CzXkZCX8.js";
|
|
14
|
+
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10 } from "./NumberFormatter-CLDS_LRZ.js";
|
|
15
|
+
import { f as $8b141f2f71e88f85$export$2440da353cedad43, g as $8b141f2f71e88f85$export$f18627323ab57ac0, h as $8b141f2f71e88f85$export$c5221a78ef73c5e9, p as $8b141f2f71e88f85$export$7e319ea407e63bc0 } from "./staticDateTimeSegments-vP2f1woD.js";
|
|
16
|
+
import { n as TimePickerForm } from "./datePickerValue.utils-1z4mwZZs.js";
|
|
20
17
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
21
18
|
import { c } from "react/compiler-runtime";
|
|
22
19
|
import { CalendarDateTime, DateFormatter, Time, toCalendarDate, toCalendarDateTime, today } from "@internationalized/date";
|
|
23
|
-
import { privateValidationStateProp } from "react-stately/private/form/useFormValidationState";
|
|
24
20
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
25
21
|
import { useCalendar } from "@react-aria/calendar";
|
|
26
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/datepicker/useDatePicker.mjs
|
|
27
|
-
function $parcel$interopDefault(a) {
|
|
28
|
-
return a && a.__esModule ? a.default : a;
|
|
29
|
-
}
|
|
30
|
-
function $6902a2bb26917a07$export$42df105a73306d51(props, state, ref) {
|
|
31
|
-
let buttonId = $390e54f620492c70$export$f680877a34711e37();
|
|
32
|
-
let dialogId = $390e54f620492c70$export$f680877a34711e37();
|
|
33
|
-
let fieldId = $390e54f620492c70$export$f680877a34711e37();
|
|
34
|
-
let stringFormatter = $cf2482eff2eeeec2$export$f12b703ca79dfbb1($parcel$interopDefault($0014db39426443c5$exports), "@react-aria/datepicker");
|
|
35
|
-
let { isInvalid, validationErrors, validationDetails } = state.displayValidation;
|
|
36
|
-
let { labelProps, fieldProps, descriptionProps, errorMessageProps } = $191c9b6d48a0a4e2$export$294aa081a6c6f55d({
|
|
37
|
-
...props,
|
|
38
|
-
labelElementType: "span",
|
|
39
|
-
isInvalid,
|
|
40
|
-
errorMessage: props.errorMessage || validationErrors
|
|
41
|
-
});
|
|
42
|
-
let groupProps = $6a440d0e2d99dd46$export$4a931266a3838b86(state, ref);
|
|
43
|
-
let labelledBy = fieldProps["aria-labelledby"] || fieldProps.id;
|
|
44
|
-
let { locale } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
45
|
-
let date = state.formatValue(locale, { month: "long" });
|
|
46
|
-
let description = date ? stringFormatter.format("selectedDateDescription", { date }) : "";
|
|
47
|
-
let descProps = $121970af65029459$export$f8aeda7b10753fa1(description);
|
|
48
|
-
let ariaDescribedBy = [descProps["aria-describedby"], fieldProps["aria-describedby"]].filter(Boolean).join(" ") || void 0;
|
|
49
|
-
let domProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props);
|
|
50
|
-
let focusManager = useMemo(() => $535772f9d2c1f38d$export$c5251b9e124bf29(ref), [ref]);
|
|
51
|
-
let isFocused = useRef(false);
|
|
52
|
-
let { focusWithinProps } = $2c9edc598a03d523$export$420e68273165f4ec({
|
|
53
|
-
...props,
|
|
54
|
-
isDisabled: state.isOpen,
|
|
55
|
-
onBlurWithin: (e) => {
|
|
56
|
-
let dialog = document.getElementById(dialogId);
|
|
57
|
-
if (!$23f2114a1b82827e$export$4282f70798064fe0(dialog, e.relatedTarget)) {
|
|
58
|
-
isFocused.current = false;
|
|
59
|
-
props.onBlur?.(e);
|
|
60
|
-
props.onFocusChange?.(false);
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
onFocusWithin: (e) => {
|
|
64
|
-
if (!isFocused.current) {
|
|
65
|
-
isFocused.current = true;
|
|
66
|
-
props.onFocus?.(e);
|
|
67
|
-
props.onFocusChange?.(true);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
return {
|
|
72
|
-
groupProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(domProps, groupProps, fieldProps, descProps, focusWithinProps, {
|
|
73
|
-
role: "group",
|
|
74
|
-
"aria-disabled": props.isDisabled || null,
|
|
75
|
-
"aria-labelledby": labelledBy,
|
|
76
|
-
"aria-describedby": ariaDescribedBy,
|
|
77
|
-
onKeyDown(e) {
|
|
78
|
-
if (state.isOpen) return;
|
|
79
|
-
if (props.onKeyDown) props.onKeyDown(e);
|
|
80
|
-
},
|
|
81
|
-
onKeyUp(e) {
|
|
82
|
-
if (state.isOpen) return;
|
|
83
|
-
if (props.onKeyUp) props.onKeyUp(e);
|
|
84
|
-
}
|
|
85
|
-
}),
|
|
86
|
-
labelProps: {
|
|
87
|
-
...labelProps,
|
|
88
|
-
onClick: () => {
|
|
89
|
-
focusManager.focusFirst();
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
fieldProps: {
|
|
93
|
-
...fieldProps,
|
|
94
|
-
id: fieldId,
|
|
95
|
-
[$7541913c0284d84b$export$300019f83c56d282]: "presentation",
|
|
96
|
-
"aria-describedby": ariaDescribedBy,
|
|
97
|
-
value: state.value,
|
|
98
|
-
defaultValue: state.defaultValue,
|
|
99
|
-
onChange: state.setValue,
|
|
100
|
-
placeholderValue: props.placeholderValue,
|
|
101
|
-
hideTimeZone: props.hideTimeZone,
|
|
102
|
-
hourCycle: props.hourCycle,
|
|
103
|
-
shouldForceLeadingZeros: props.shouldForceLeadingZeros,
|
|
104
|
-
granularity: props.granularity,
|
|
105
|
-
isDisabled: props.isDisabled,
|
|
106
|
-
isReadOnly: props.isReadOnly,
|
|
107
|
-
isRequired: props.isRequired,
|
|
108
|
-
validationBehavior: props.validationBehavior,
|
|
109
|
-
[privateValidationStateProp]: state,
|
|
110
|
-
autoFocus: props.autoFocus,
|
|
111
|
-
name: props.name,
|
|
112
|
-
form: props.form
|
|
113
|
-
},
|
|
114
|
-
descriptionProps,
|
|
115
|
-
errorMessageProps,
|
|
116
|
-
buttonProps: {
|
|
117
|
-
...descProps,
|
|
118
|
-
id: buttonId,
|
|
119
|
-
"aria-haspopup": "dialog",
|
|
120
|
-
"aria-label": stringFormatter.format("calendar"),
|
|
121
|
-
"aria-labelledby": `${buttonId} ${labelledBy}`,
|
|
122
|
-
"aria-describedby": ariaDescribedBy,
|
|
123
|
-
"aria-expanded": state.isOpen,
|
|
124
|
-
isDisabled: props.isDisabled || props.isReadOnly,
|
|
125
|
-
onPress: () => state.setOpen(true)
|
|
126
|
-
},
|
|
127
|
-
dialogProps: {
|
|
128
|
-
id: dialogId,
|
|
129
|
-
"aria-labelledby": `${buttonId} ${labelledBy}`
|
|
130
|
-
},
|
|
131
|
-
calendarProps: {
|
|
132
|
-
autoFocus: true,
|
|
133
|
-
value: state.dateValue,
|
|
134
|
-
onChange: state.setDateValue,
|
|
135
|
-
minValue: props.minValue,
|
|
136
|
-
maxValue: props.maxValue,
|
|
137
|
-
isDisabled: props.isDisabled,
|
|
138
|
-
isReadOnly: props.isReadOnly,
|
|
139
|
-
isDateUnavailable: props.isDateUnavailable,
|
|
140
|
-
defaultFocusedValue: state.dateValue ? void 0 : props.placeholderValue,
|
|
141
|
-
isInvalid: state.isInvalid,
|
|
142
|
-
errorMessage: typeof props.errorMessage === "function" ? props.errorMessage(state.displayValidation) : props.errorMessage || state.displayValidation.validationErrors.join(" "),
|
|
143
|
-
firstDayOfWeek: props.firstDayOfWeek,
|
|
144
|
-
pageBehavior: props.pageBehavior
|
|
145
|
-
},
|
|
146
|
-
isInvalid,
|
|
147
|
-
validationErrors,
|
|
148
|
-
validationDetails
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
//#endregion
|
|
152
22
|
//#region ../../node_modules/.bun/react-stately@3.50.0+83d5fd7b249dbeef/node_modules/react-stately/dist/private/datepicker/useDatePickerState.mjs
|
|
153
23
|
function $28aae683a942e141$export$87194bb378cc3ac2(props) {
|
|
154
24
|
let overlayState = $f11fb0bcf1b2687a$export$61c6a8c84e605fb6(props);
|
|
@@ -751,4 +621,4 @@ const Calendar = ({ showWeekNumbers, className, includesTime, datePickerState, h
|
|
|
751
621
|
});
|
|
752
622
|
};
|
|
753
623
|
//#endregion
|
|
754
|
-
export {
|
|
624
|
+
export { useScrollableListBox as n, $28aae683a942e141$export$87194bb378cc3ac2 as r, Calendar as t };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { t as UIConfig } from "./uiConfig.context-RFvaQYzD.js";
|
|
2
|
-
import { n as renderDatePickerTodayIcon, r as datePickerInputContentRowDefinition, s as $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f, t as DatePickerInput } from "./DatePickerInput-
|
|
2
|
+
import { n as renderDatePickerTodayIcon, r as datePickerInputContentRowDefinition, s as $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f, t as DatePickerInput } from "./DatePickerInput-Nj_rVUyU.js";
|
|
3
3
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
4
4
|
import { t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
|
|
5
|
-
import { r as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./useControlledState-DQxX6LMN.js";
|
|
6
|
-
import { i as getStaticDateTimeFocusTarget, o as DateTimeDialogFooter, s as DateTimeDialog, t as getStaticCalendarDateSegments } from "./staticDateTimeSegments-BQoA94W-.js";
|
|
7
|
-
import { i as $6902a2bb26917a07$export$42df105a73306d51, r as $28aae683a942e141$export$87194bb378cc3ac2, t as Calendar } from "./Calendar-kSEji28A.js";
|
|
8
5
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-BE0r63d8.js";
|
|
9
6
|
import { t as FieldController } from "./form.binding-CG1RPv6o.js";
|
|
10
|
-
import { t as FormField } from "./FormField-
|
|
11
|
-
import { t as TooltipWrapper } from "./TooltipWrapper-
|
|
12
|
-
import { i as InputFrame, n as useStaticInputHandoff } from "./useStaticInputHandoff-
|
|
13
|
-
import { t as
|
|
7
|
+
import { t as FormField } from "./FormField-DTO2cbXC.js";
|
|
8
|
+
import { t as TooltipWrapper } from "./TooltipWrapper-BVc_Aln-.js";
|
|
9
|
+
import { i as InputFrame, n as useStaticInputHandoff } from "./useStaticInputHandoff-_stbpoX4.js";
|
|
10
|
+
import { i as getStaticDateTimeFocusTarget, o as DateTimeDialogFooter, s as DateTimeDialog, t as getStaticCalendarDateSegments } from "./staticDateTimeSegments-vP2f1woD.js";
|
|
11
|
+
import { r as $28aae683a942e141$export$87194bb378cc3ac2, t as Calendar } from "./Calendar-BYcN64W5.js";
|
|
12
|
+
import { t as normalizeDatePickerValue } from "./datePickerValue.utils-1z4mwZZs.js";
|
|
14
13
|
import { t as DateTimeUtils } from "./date-time.utils-0F9qduim.js";
|
|
15
14
|
import { memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
16
15
|
import { createCalendar, getLocalTimeZone, toCalendarDate, today } from "@internationalized/date";
|
|
17
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { useDatePicker, useLocale } from "react-aria";
|
|
18
18
|
//#region src/components/inputs/DateTime/DatePicker/DatePicker.tsx
|
|
19
19
|
const DatePickerBase = (props) => {
|
|
20
20
|
const ui = UIConfig.useConfig();
|
|
@@ -98,17 +98,17 @@ const DatePickerBase = (props) => {
|
|
|
98
98
|
},
|
|
99
99
|
shouldCloseOnSelect: false
|
|
100
100
|
});
|
|
101
|
-
const { groupProps, labelProps, fieldProps, buttonProps, dialogProps } =
|
|
101
|
+
const { groupProps, labelProps, fieldProps, buttonProps, dialogProps } = useDatePicker({
|
|
102
102
|
...rest,
|
|
103
103
|
label,
|
|
104
104
|
shouldForceLeadingZeros
|
|
105
105
|
}, state, datePickerRef);
|
|
106
|
-
const { calendarProps } =
|
|
106
|
+
const { calendarProps } = useDatePicker({
|
|
107
107
|
...rest,
|
|
108
108
|
label,
|
|
109
109
|
shouldForceLeadingZeros
|
|
110
110
|
}, dialogState, datePickerRef);
|
|
111
|
-
const { locale } =
|
|
111
|
+
const { locale } = useLocale();
|
|
112
112
|
const calendarState = $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f({
|
|
113
113
|
...calendarProps,
|
|
114
114
|
locale,
|
|
@@ -269,7 +269,7 @@ const DatePickerBase = (props) => {
|
|
|
269
269
|
const DatePickerInner = ({ fullIso = true, granularity = "day", minValue, maxValue, renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
270
270
|
const ui = UIConfig.useConfig();
|
|
271
271
|
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRowDefinition);
|
|
272
|
-
const { locale } =
|
|
272
|
+
const { locale } = useLocale();
|
|
273
273
|
const shouldForceLeadingZeros = props.shouldForceLeadingZeros ?? ui.dateInput.shouldForceLeadingZeros;
|
|
274
274
|
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
275
275
|
const inputRef = useRef(null);
|
|
@@ -3,17 +3,17 @@ import { t as UIConfig } from "./uiConfig.context-RFvaQYzD.js";
|
|
|
3
3
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
4
4
|
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-D6KlWSFL.js";
|
|
5
5
|
import { t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
|
|
6
|
-
import { r as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7, t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-DQxX6LMN.js";
|
|
7
|
-
import { b as $7541913c0284d84b$export$5591b0b878c1a989, c as useFirefoxDateSegmentSelectionGuard, d as $8e7461aabf74661f$export$60e84778edff6d26, l as DateSegmentItem } from "./staticDateTimeSegments-BQoA94W-.js";
|
|
8
6
|
import { t as Typography } from "./Typography-AcUd9df8.js";
|
|
9
7
|
import { IconButton } from "./components/icon-button.js";
|
|
10
8
|
import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
11
9
|
import { n as $a8ea2faf2ebe4d2f$re_export$mergeProps } from "./import-BE0r63d8.js";
|
|
12
|
-
import { r as FormFieldLabel } from "./FormField-
|
|
10
|
+
import { r as FormFieldLabel } from "./FormField-DTO2cbXC.js";
|
|
13
11
|
import "./i18n-CX2EjhJI.js";
|
|
14
12
|
import { a as inputSizeDefinition, t as inputBaseDefinition } from "./input.cva-KYGD4Bdz.js";
|
|
15
|
-
import { n as InputClear } from "./TooltipWrapper-
|
|
16
|
-
import { r as $32daac5f69beb98a$re_export$useFocusRing } from "./useStaticInputHandoff-
|
|
13
|
+
import { n as InputClear } from "./TooltipWrapper-BVc_Aln-.js";
|
|
14
|
+
import { r as $32daac5f69beb98a$re_export$useFocusRing } from "./useStaticInputHandoff-_stbpoX4.js";
|
|
15
|
+
import { t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-CzXkZCX8.js";
|
|
16
|
+
import { c as useFirefoxDateSegmentSelectionGuard, d as $8e7461aabf74661f$export$60e84778edff6d26, l as DateSegmentItem } from "./staticDateTimeSegments-vP2f1woD.js";
|
|
17
17
|
import { t as DateTimeUtils } from "./date-time.utils-0F9qduim.js";
|
|
18
18
|
import { t as DateUtils } from "./date.utils-B8_QF9y6.js";
|
|
19
19
|
import { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
@@ -25,6 +25,7 @@ import "react-aria/useLocalizedStringFormatter";
|
|
|
25
25
|
import "react-aria/useFilter";
|
|
26
26
|
import "react-aria/useListFormatter";
|
|
27
27
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
28
|
+
import { useDateField, useLocale as useLocale$1 } from "react-aria";
|
|
28
29
|
import { useFocusVisible, useFocusWithin, useHover } from "@react-aria/interactions";
|
|
29
30
|
import { useTranslation } from "react-i18next";
|
|
30
31
|
import { useCalendarCell, useCalendarGrid } from "@react-aria/calendar";
|
|
@@ -620,7 +621,7 @@ const CalendarGrid = ({ state, showWeekNumbers = false, onApply, onDoubleClickAp
|
|
|
620
621
|
//#region src/components/inputs/DateTime/shared/DateField.tsx
|
|
621
622
|
const omitNullValue = ({ value: _value, ...props }) => props;
|
|
622
623
|
const DateField = ({ ref, onClearChange, hidePlaceholder, isDisabled, disableManualEntry, dateGranularity = "day", isTimeOptional = false, format, timeZone, segmentGroup, shouldAutoFixYear = false, preserveNullValue = false, ...props }) => {
|
|
623
|
-
const { locale } = $
|
|
624
|
+
const { locale } = useLocale$1();
|
|
624
625
|
const previousValueRef = useRef(props.value);
|
|
625
626
|
const dateFieldProps = props.value == null && !preserveNullValue ? omitNullValue(props) : props;
|
|
626
627
|
const state = $8e7461aabf74661f$export$60e84778edff6d26({
|
|
@@ -631,7 +632,7 @@ const DateField = ({ ref, onClearChange, hidePlaceholder, isDisabled, disableMan
|
|
|
631
632
|
createCalendar
|
|
632
633
|
});
|
|
633
634
|
const dataFieldRef = useRef(null);
|
|
634
|
-
const { fieldProps } =
|
|
635
|
+
const { fieldProps } = useDateField({
|
|
635
636
|
...dateFieldProps,
|
|
636
637
|
isDisabled,
|
|
637
638
|
isReadOnly: disableManualEntry
|
|
@@ -3,203 +3,31 @@ import { t as ChevronDown } from "./chevron-down-B4Pr8bD3.js";
|
|
|
3
3
|
import { t as ChevronLeft } from "./chevron-left-Dgo_b9wJ.js";
|
|
4
4
|
import { t as ChevronRight } from "./chevron-right-3nKJR5Bb.js";
|
|
5
5
|
import { n as ChevronsLeft, t as ChevronsRight } from "./chevrons-right-DJPPn2fD.js";
|
|
6
|
-
import { a as CalendarGrid, c as $dd602d3c757202f2$export$4f5203c0d889109e, d as $dd602d3c757202f2$export$f4a51ff076cc9a09, i as $1697a7ad3db7b79f$re_export$useDateFormatter, l as $dd602d3c757202f2$export$a1d3911297b952d7, n as renderDatePickerTodayIcon, o as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6, r as datePickerInputContentRowDefinition, s as $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f, t as DatePickerInput, u as $dd602d3c757202f2$export$eac50920cf2fd59a } from "./DatePickerInput-
|
|
6
|
+
import { a as CalendarGrid, c as $dd602d3c757202f2$export$4f5203c0d889109e, d as $dd602d3c757202f2$export$f4a51ff076cc9a09, i as $1697a7ad3db7b79f$re_export$useDateFormatter, l as $dd602d3c757202f2$export$a1d3911297b952d7, n as renderDatePickerTodayIcon, o as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6, r as datePickerInputContentRowDefinition, s as $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f, t as DatePickerInput, u as $dd602d3c757202f2$export$eac50920cf2fd59a } from "./DatePickerInput-Nj_rVUyU.js";
|
|
7
7
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
8
8
|
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-D6KlWSFL.js";
|
|
9
9
|
import { t as Switch } from "./Switch-Cylpjatb.js";
|
|
10
10
|
import { t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
|
|
11
|
-
import { n as $23f2114a1b82827e$export$4282f70798064fe0 } from "./useLayoutEffect-B2-1tbPJ.js";
|
|
12
|
-
import { a as $390e54f620492c70$export$f680877a34711e37, r as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./useSyncRef-RGMv0rXK.js";
|
|
13
|
-
import { c as $191c9b6d48a0a4e2$export$294aa081a6c6f55d, m as $cf2482eff2eeeec2$export$f12b703ca79dfbb1, r as $fd2148440a13ec26$export$fc1a364ae1f3ff10, s as $2c9edc598a03d523$export$420e68273165f4ec } from "./useFormValidationState-D3z-gafz.js";
|
|
14
|
-
import { n as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f, r as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7, t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-DQxX6LMN.js";
|
|
15
|
-
import { C as $0014db39426443c5$exports, S as $6a440d0e2d99dd46$export$4a931266a3838b86, f as $8b141f2f71e88f85$export$2440da353cedad43, h as $8b141f2f71e88f85$export$c5221a78ef73c5e9, i as getStaticDateTimeFocusTarget, m as $8b141f2f71e88f85$export$80ff8fc0ae339c13, o as DateTimeDialogFooter, p as $8b141f2f71e88f85$export$7e319ea407e63bc0, r as getStaticDateRangeSegments, s as DateTimeDialog, v as $7541913c0284d84b$export$300019f83c56d282, w as $121970af65029459$export$f8aeda7b10753fa1, x as $7541913c0284d84b$export$7b3062cd49e80452 } from "./staticDateTimeSegments-BQoA94W-.js";
|
|
16
|
-
import { n as $535772f9d2c1f38d$export$c5251b9e124bf29 } from "./FocusScope-CO9oJ1sc.js";
|
|
17
11
|
import { t as Typography } from "./Typography-AcUd9df8.js";
|
|
18
12
|
import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
19
13
|
import { PillButton } from "./components/pill-button.js";
|
|
20
14
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-BE0r63d8.js";
|
|
21
15
|
import { t as FieldController } from "./form.binding-CG1RPv6o.js";
|
|
22
|
-
import { t as FormField } from "./FormField-
|
|
16
|
+
import { t as FormField } from "./FormField-DTO2cbXC.js";
|
|
23
17
|
import "./i18n-CX2EjhJI.js";
|
|
24
|
-
import { t as TooltipWrapper } from "./TooltipWrapper-
|
|
25
|
-
import { i as InputFrame, n as useStaticInputHandoff } from "./useStaticInputHandoff-
|
|
18
|
+
import { t as TooltipWrapper } from "./TooltipWrapper-BVc_Aln-.js";
|
|
19
|
+
import { i as InputFrame, n as useStaticInputHandoff } from "./useStaticInputHandoff-_stbpoX4.js";
|
|
20
|
+
import { t as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useControlledState-CzXkZCX8.js";
|
|
21
|
+
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10 } from "./NumberFormatter-CLDS_LRZ.js";
|
|
22
|
+
import { f as $8b141f2f71e88f85$export$2440da353cedad43, h as $8b141f2f71e88f85$export$c5221a78ef73c5e9, i as getStaticDateTimeFocusTarget, m as $8b141f2f71e88f85$export$80ff8fc0ae339c13, o as DateTimeDialogFooter, p as $8b141f2f71e88f85$export$7e319ea407e63bc0, r as getStaticDateRangeSegments, s as DateTimeDialog } from "./staticDateTimeSegments-vP2f1woD.js";
|
|
26
23
|
import { t as DateTimeUtils } from "./date-time.utils-0F9qduim.js";
|
|
27
|
-
import { t as Select } from "./Select-
|
|
24
|
+
import { t as Select } from "./Select-CyBtGHk9.js";
|
|
28
25
|
import { memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
29
26
|
import { DateFormatter, GregorianCalendar, createCalendar, endOfMonth, endOfWeek, endOfYear, getLocalTimeZone, maxDate, minDate, startOfMonth, startOfWeek, startOfYear, toCalendar, toCalendarDate, toCalendarDateTime, today } from "@internationalized/date";
|
|
30
|
-
import { DEFAULT_VALIDATION_RESULT, mergeValidation, privateValidationStateProp } from "react-stately/private/form/useFormValidationState";
|
|
31
27
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
28
|
+
import { useDateRangePicker, useLocale } from "react-aria";
|
|
32
29
|
import { useTranslation } from "react-i18next";
|
|
33
30
|
import { useRangeCalendar } from "@react-aria/calendar";
|
|
34
|
-
//#region ../../node_modules/.bun/react-aria@3.52.1+67f6792bdf102c28/node_modules/react-aria/dist/private/datepicker/useDateRangePicker.mjs
|
|
35
|
-
function $parcel$interopDefault(a) {
|
|
36
|
-
return a && a.__esModule ? a.default : a;
|
|
37
|
-
}
|
|
38
|
-
function $cccdba1b2bb08448$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
39
|
-
let stringFormatter = $cf2482eff2eeeec2$export$f12b703ca79dfbb1($parcel$interopDefault($0014db39426443c5$exports), "@react-aria/datepicker");
|
|
40
|
-
let { isInvalid, validationErrors, validationDetails } = state.displayValidation;
|
|
41
|
-
let { labelProps, fieldProps, descriptionProps, errorMessageProps } = $191c9b6d48a0a4e2$export$294aa081a6c6f55d({
|
|
42
|
-
...props,
|
|
43
|
-
labelElementType: "span",
|
|
44
|
-
isInvalid,
|
|
45
|
-
errorMessage: props.errorMessage || validationErrors
|
|
46
|
-
});
|
|
47
|
-
let labelledBy = fieldProps["aria-labelledby"] || fieldProps.id;
|
|
48
|
-
let { locale } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
49
|
-
let range = state.formatValue(locale, { month: "long" });
|
|
50
|
-
let description = range ? stringFormatter.format("selectedRangeDescription", {
|
|
51
|
-
startDate: range.start,
|
|
52
|
-
endDate: range.end
|
|
53
|
-
}) : "";
|
|
54
|
-
let descProps = $121970af65029459$export$f8aeda7b10753fa1(description);
|
|
55
|
-
let startFieldProps = {
|
|
56
|
-
"aria-label": stringFormatter.format("startDate"),
|
|
57
|
-
"aria-labelledby": labelledBy
|
|
58
|
-
};
|
|
59
|
-
let endFieldProps = {
|
|
60
|
-
"aria-label": stringFormatter.format("endDate"),
|
|
61
|
-
"aria-labelledby": labelledBy
|
|
62
|
-
};
|
|
63
|
-
let buttonId = $390e54f620492c70$export$f680877a34711e37();
|
|
64
|
-
let dialogId = $390e54f620492c70$export$f680877a34711e37();
|
|
65
|
-
let groupProps = $6a440d0e2d99dd46$export$4a931266a3838b86(state, ref);
|
|
66
|
-
let ariaDescribedBy = [descProps["aria-describedby"], fieldProps["aria-describedby"]].filter(Boolean).join(" ") || void 0;
|
|
67
|
-
let focusManager = useMemo(() => $535772f9d2c1f38d$export$c5251b9e124bf29(ref, { accept: (element) => element.id !== buttonId }), [ref, buttonId]);
|
|
68
|
-
let commonFieldProps = {
|
|
69
|
-
[$7541913c0284d84b$export$7b3062cd49e80452]: focusManager,
|
|
70
|
-
[$7541913c0284d84b$export$300019f83c56d282]: "presentation",
|
|
71
|
-
"aria-describedby": ariaDescribedBy,
|
|
72
|
-
placeholderValue: props.placeholderValue,
|
|
73
|
-
hideTimeZone: props.hideTimeZone,
|
|
74
|
-
hourCycle: props.hourCycle,
|
|
75
|
-
granularity: props.granularity,
|
|
76
|
-
shouldForceLeadingZeros: props.shouldForceLeadingZeros,
|
|
77
|
-
isDisabled: props.isDisabled,
|
|
78
|
-
isReadOnly: props.isReadOnly,
|
|
79
|
-
isRequired: props.isRequired,
|
|
80
|
-
validationBehavior: props.validationBehavior
|
|
81
|
-
};
|
|
82
|
-
let domProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props);
|
|
83
|
-
let isFocused = useRef(false);
|
|
84
|
-
let { focusWithinProps } = $2c9edc598a03d523$export$420e68273165f4ec({
|
|
85
|
-
...props,
|
|
86
|
-
isDisabled: state.isOpen,
|
|
87
|
-
onBlurWithin: (e) => {
|
|
88
|
-
let dialog = document.getElementById(dialogId);
|
|
89
|
-
if (!$23f2114a1b82827e$export$4282f70798064fe0(dialog, e.relatedTarget)) {
|
|
90
|
-
isFocused.current = false;
|
|
91
|
-
props.onBlur?.(e);
|
|
92
|
-
props.onFocusChange?.(false);
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
onFocusWithin: (e) => {
|
|
96
|
-
if (!isFocused.current) {
|
|
97
|
-
isFocused.current = true;
|
|
98
|
-
props.onFocus?.(e);
|
|
99
|
-
props.onFocusChange?.(true);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
let startFieldValidation = useRef(DEFAULT_VALIDATION_RESULT);
|
|
104
|
-
let endFieldValidation = useRef(DEFAULT_VALIDATION_RESULT);
|
|
105
|
-
return {
|
|
106
|
-
groupProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(domProps, groupProps, fieldProps, descProps, focusWithinProps, {
|
|
107
|
-
role: "group",
|
|
108
|
-
"aria-disabled": props.isDisabled || null,
|
|
109
|
-
"aria-describedby": ariaDescribedBy,
|
|
110
|
-
onKeyDown(e) {
|
|
111
|
-
if (state.isOpen) return;
|
|
112
|
-
if (props.onKeyDown) props.onKeyDown(e);
|
|
113
|
-
},
|
|
114
|
-
onKeyUp(e) {
|
|
115
|
-
if (state.isOpen) return;
|
|
116
|
-
if (props.onKeyUp) props.onKeyUp(e);
|
|
117
|
-
}
|
|
118
|
-
}),
|
|
119
|
-
labelProps: {
|
|
120
|
-
...labelProps,
|
|
121
|
-
onClick: () => {
|
|
122
|
-
focusManager.focusFirst();
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
buttonProps: {
|
|
126
|
-
...descProps,
|
|
127
|
-
id: buttonId,
|
|
128
|
-
"aria-haspopup": "dialog",
|
|
129
|
-
"aria-label": stringFormatter.format("calendar"),
|
|
130
|
-
"aria-labelledby": `${buttonId} ${labelledBy}`,
|
|
131
|
-
"aria-describedby": ariaDescribedBy,
|
|
132
|
-
"aria-expanded": state.isOpen,
|
|
133
|
-
isDisabled: props.isDisabled || props.isReadOnly,
|
|
134
|
-
onPress: () => state.setOpen(true)
|
|
135
|
-
},
|
|
136
|
-
dialogProps: {
|
|
137
|
-
id: dialogId,
|
|
138
|
-
"aria-labelledby": `${buttonId} ${labelledBy}`
|
|
139
|
-
},
|
|
140
|
-
startFieldProps: {
|
|
141
|
-
...startFieldProps,
|
|
142
|
-
...commonFieldProps,
|
|
143
|
-
value: state.value?.start ?? null,
|
|
144
|
-
defaultValue: state.defaultValue?.start,
|
|
145
|
-
onChange: (start) => state.setDateTime("start", start),
|
|
146
|
-
autoFocus: props.autoFocus,
|
|
147
|
-
name: props.startName,
|
|
148
|
-
form: props.form,
|
|
149
|
-
[privateValidationStateProp]: {
|
|
150
|
-
realtimeValidation: state.realtimeValidation,
|
|
151
|
-
displayValidation: state.displayValidation,
|
|
152
|
-
updateValidation(e) {
|
|
153
|
-
startFieldValidation.current = e;
|
|
154
|
-
state.updateValidation(mergeValidation(e, endFieldValidation.current));
|
|
155
|
-
},
|
|
156
|
-
resetValidation: state.resetValidation,
|
|
157
|
-
commitValidation: state.commitValidation
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
endFieldProps: {
|
|
161
|
-
...endFieldProps,
|
|
162
|
-
...commonFieldProps,
|
|
163
|
-
value: state.value?.end ?? null,
|
|
164
|
-
defaultValue: state.defaultValue?.end,
|
|
165
|
-
onChange: (end) => state.setDateTime("end", end),
|
|
166
|
-
name: props.endName,
|
|
167
|
-
form: props.form,
|
|
168
|
-
[privateValidationStateProp]: {
|
|
169
|
-
realtimeValidation: state.realtimeValidation,
|
|
170
|
-
displayValidation: state.displayValidation,
|
|
171
|
-
updateValidation(e) {
|
|
172
|
-
endFieldValidation.current = e;
|
|
173
|
-
state.updateValidation(mergeValidation(startFieldValidation.current, e));
|
|
174
|
-
},
|
|
175
|
-
resetValidation: state.resetValidation,
|
|
176
|
-
commitValidation: state.commitValidation
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
descriptionProps,
|
|
180
|
-
errorMessageProps,
|
|
181
|
-
calendarProps: {
|
|
182
|
-
autoFocus: true,
|
|
183
|
-
value: state.dateRange?.start && state.dateRange.end ? state.dateRange : null,
|
|
184
|
-
onChange: state.setDateRange,
|
|
185
|
-
minValue: props.minValue,
|
|
186
|
-
maxValue: props.maxValue,
|
|
187
|
-
isDisabled: props.isDisabled,
|
|
188
|
-
isReadOnly: props.isReadOnly,
|
|
189
|
-
isDateUnavailable: props.isDateUnavailable,
|
|
190
|
-
allowsNonContiguousRanges: props.allowsNonContiguousRanges,
|
|
191
|
-
defaultFocusedValue: state.dateRange ? void 0 : props.placeholderValue,
|
|
192
|
-
isInvalid: state.isInvalid,
|
|
193
|
-
errorMessage: typeof props.errorMessage === "function" ? props.errorMessage(state.displayValidation) : props.errorMessage || state.displayValidation.validationErrors.join(" "),
|
|
194
|
-
firstDayOfWeek: props.firstDayOfWeek,
|
|
195
|
-
pageBehavior: props.pageBehavior
|
|
196
|
-
},
|
|
197
|
-
isInvalid,
|
|
198
|
-
validationErrors,
|
|
199
|
-
validationDetails
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
//#endregion
|
|
203
31
|
//#region ../../node_modules/.bun/react-stately@3.50.0+83d5fd7b249dbeef/node_modules/react-stately/dist/private/calendar/useRangeCalendarState.mjs
|
|
204
32
|
function $a0a87fb6fcfb22ec$export$9a987164d97ecc90(props) {
|
|
205
33
|
let { value: valueProp, defaultValue, onChange, createCalendar, locale, visibleDuration = { months: 1 }, minValue, maxValue, ...calendarProps } = props;
|
|
@@ -929,14 +757,14 @@ const DateRangePickerBase = (props) => {
|
|
|
929
757
|
},
|
|
930
758
|
shouldCloseOnSelect: false
|
|
931
759
|
});
|
|
932
|
-
const { groupProps, labelProps, startFieldProps, endFieldProps, buttonProps, dialogProps } =
|
|
760
|
+
const { groupProps, labelProps, startFieldProps, endFieldProps, buttonProps, dialogProps } = useDateRangePicker({
|
|
933
761
|
...rest,
|
|
934
762
|
label,
|
|
935
763
|
shouldForceLeadingZeros,
|
|
936
764
|
minValue,
|
|
937
765
|
maxValue
|
|
938
766
|
}, state, dateRangePickerRef);
|
|
939
|
-
const { calendarProps } =
|
|
767
|
+
const { calendarProps } = useDateRangePicker({
|
|
940
768
|
...rest,
|
|
941
769
|
label,
|
|
942
770
|
shouldForceLeadingZeros,
|
|
@@ -954,7 +782,7 @@ const DateRangePickerBase = (props) => {
|
|
|
954
782
|
const newValue = partialRange.start || partialRange.end ? partialRange : null;
|
|
955
783
|
onChange?.(newValue);
|
|
956
784
|
};
|
|
957
|
-
const { locale } =
|
|
785
|
+
const { locale } = useLocale();
|
|
958
786
|
useImperativeHandle(ref, () => ({
|
|
959
787
|
clear: () => {
|
|
960
788
|
datePickerInputRef.current?.clear();
|
|
@@ -1612,7 +1440,7 @@ const DateRangePickerInner = ({ fullIso = true, minValue, maxValue, renderStatic
|
|
|
1612
1440
|
const ui = UIConfig.useConfig();
|
|
1613
1441
|
const { t } = useTranslation();
|
|
1614
1442
|
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRowDefinition);
|
|
1615
|
-
const { locale } =
|
|
1443
|
+
const { locale } = useLocale();
|
|
1616
1444
|
const shouldForceLeadingZeros = props.shouldForceLeadingZeros ?? ui.dateInput.shouldForceLeadingZeros;
|
|
1617
1445
|
const allowPartialRange = props.allowPartialRange ?? ui.dateInput.allowPartialRange;
|
|
1618
1446
|
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { t as UIConfig } from "./uiConfig.context-RFvaQYzD.js";
|
|
2
|
-
import { n as renderDatePickerTodayIcon, r as datePickerInputContentRowDefinition, s as $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f, t as DatePickerInput } from "./DatePickerInput-
|
|
2
|
+
import { n as renderDatePickerTodayIcon, r as datePickerInputContentRowDefinition, s as $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f, t as DatePickerInput } from "./DatePickerInput-Nj_rVUyU.js";
|
|
3
3
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
4
4
|
import { t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
|
|
5
|
-
import { r as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./useControlledState-DQxX6LMN.js";
|
|
6
|
-
import { i as getStaticDateTimeFocusTarget, n as getStaticCalendarDateTimeSegments, o as DateTimeDialogFooter, s as DateTimeDialog } from "./staticDateTimeSegments-BQoA94W-.js";
|
|
7
|
-
import { i as $6902a2bb26917a07$export$42df105a73306d51, r as $28aae683a942e141$export$87194bb378cc3ac2, t as Calendar } from "./Calendar-kSEji28A.js";
|
|
8
5
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-BE0r63d8.js";
|
|
9
6
|
import { t as FieldController } from "./form.binding-CG1RPv6o.js";
|
|
10
|
-
import { t as FormField } from "./FormField-
|
|
11
|
-
import { t as TooltipWrapper } from "./TooltipWrapper-
|
|
12
|
-
import { i as InputFrame, n as useStaticInputHandoff } from "./useStaticInputHandoff-
|
|
13
|
-
import {
|
|
7
|
+
import { t as FormField } from "./FormField-DTO2cbXC.js";
|
|
8
|
+
import { t as TooltipWrapper } from "./TooltipWrapper-BVc_Aln-.js";
|
|
9
|
+
import { i as InputFrame, n as useStaticInputHandoff } from "./useStaticInputHandoff-_stbpoX4.js";
|
|
10
|
+
import { i as getStaticDateTimeFocusTarget, n as getStaticCalendarDateTimeSegments, o as DateTimeDialogFooter, s as DateTimeDialog } from "./staticDateTimeSegments-vP2f1woD.js";
|
|
11
|
+
import { r as $28aae683a942e141$export$87194bb378cc3ac2, t as Calendar } from "./Calendar-BYcN64W5.js";
|
|
12
|
+
import { t as normalizeDatePickerValue } from "./datePickerValue.utils-1z4mwZZs.js";
|
|
14
13
|
import { t as DateTimeUtils } from "./date-time.utils-0F9qduim.js";
|
|
15
14
|
import { memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
16
15
|
import { Time, createCalendar, getLocalTimeZone, toCalendarDate, toCalendarDateTime, today } from "@internationalized/date";
|
|
17
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
import { useDatePicker, useLocale } from "react-aria";
|
|
18
18
|
//#region src/components/inputs/DateTime/DateTimePicker/DateTimePicker.tsx
|
|
19
19
|
const DateTimePickerBase = (props) => {
|
|
20
20
|
const ui = UIConfig.useConfig();
|
|
@@ -88,19 +88,19 @@ const DateTimePickerBase = (props) => {
|
|
|
88
88
|
granularity: "minute",
|
|
89
89
|
hideTimeZone: true
|
|
90
90
|
});
|
|
91
|
-
const { groupProps, labelProps, fieldProps, buttonProps, dialogProps } =
|
|
91
|
+
const { groupProps, labelProps, fieldProps, buttonProps, dialogProps } = useDatePicker({
|
|
92
92
|
...rest,
|
|
93
93
|
label,
|
|
94
94
|
granularity: "minute",
|
|
95
95
|
hideTimeZone: true,
|
|
96
96
|
shouldForceLeadingZeros
|
|
97
97
|
}, state, datePickerRef);
|
|
98
|
-
const { calendarProps } =
|
|
98
|
+
const { calendarProps } = useDatePicker({
|
|
99
99
|
...rest,
|
|
100
100
|
label,
|
|
101
101
|
shouldForceLeadingZeros
|
|
102
102
|
}, dialogState, datePickerRef);
|
|
103
|
-
const { locale } =
|
|
103
|
+
const { locale } = useLocale();
|
|
104
104
|
const calendarState = $ea0ea6e62ae0d7ca$export$6d095e787d2b5e1f({
|
|
105
105
|
...calendarProps,
|
|
106
106
|
locale,
|
|
@@ -252,7 +252,7 @@ const DateTimePickerBase = (props) => {
|
|
|
252
252
|
const DateTimePickerInner = ({ fullIso: _fullIso = true, renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
253
253
|
const ui = UIConfig.useConfig();
|
|
254
254
|
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRowDefinition);
|
|
255
|
-
const { locale } =
|
|
255
|
+
const { locale } = useLocale();
|
|
256
256
|
const shouldForceLeadingZeros = props.shouldForceLeadingZeros ?? ui.dateInput.shouldForceLeadingZeros;
|
|
257
257
|
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
258
258
|
const inputRef = useRef(null);
|
|
@@ -9,7 +9,7 @@ import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
|
9
9
|
import { TextButton } from "./components/text-button.js";
|
|
10
10
|
import { i as $a8ea2faf2ebe4d2f$re_export$useLabels, r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-BE0r63d8.js";
|
|
11
11
|
import { t as FieldController } from "./form.binding-CG1RPv6o.js";
|
|
12
|
-
import { t as FormField } from "./FormField-
|
|
12
|
+
import { t as FormField } from "./FormField-DTO2cbXC.js";
|
|
13
13
|
import "./i18n-CX2EjhJI.js";
|
|
14
14
|
import { a as inputSizeDefinition } from "./input.cva-KYGD4Bdz.js";
|
|
15
15
|
import { t as FileUtils } from "./file.utils-DqQxnuAm.js";
|
|
@@ -10,7 +10,7 @@ import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
|
10
10
|
import { TextButton } from "./components/text-button.js";
|
|
11
11
|
import { i as $a8ea2faf2ebe4d2f$re_export$useLabels, r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-BE0r63d8.js";
|
|
12
12
|
import { t as FieldController } from "./form.binding-CG1RPv6o.js";
|
|
13
|
-
import { t as FormField } from "./FormField-
|
|
13
|
+
import { t as FormField } from "./FormField-DTO2cbXC.js";
|
|
14
14
|
import "./i18n-CX2EjhJI.js";
|
|
15
15
|
import { t as FileUtils } from "./file.utils-DqQxnuAm.js";
|
|
16
16
|
import { t as Progress } from "./Progress-_jkt2pQw.js";
|
|
@@ -112,7 +112,7 @@ const FormFieldLabel = ({ ref, as, label, isRequired, isDisabled, labelProps, cl
|
|
|
112
112
|
};
|
|
113
113
|
//#endregion
|
|
114
114
|
//#region src/components/inputs/FormField/FormFieldHeader.tsx
|
|
115
|
-
const FormFieldHeaderTooltip = lazy(() => import("./FormFieldHeaderTooltip-
|
|
115
|
+
const FormFieldHeaderTooltip = lazy(() => import("./FormFieldHeaderTooltip-h6e5hq9V.js"));
|
|
116
116
|
const FormFieldHeader = ({ label, tooltipText, helperText, isRequired, rightContent, isHeaderHidden, isDisabled, className, labelProps }) => {
|
|
117
117
|
const formFieldHeaderCva = UIOverrides.useCva("formField.headerCva", formFieldHeaderDefinition);
|
|
118
118
|
return /* @__PURE__ */ jsxs("div", {
|