@ensi-platform/admin-ui 0.8.5 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Component-ZIAMtMpP.js → Component-BMol_xnR.js} +2 -2
- package/dist/{Component-ZIAMtMpP.js.map → Component-BMol_xnR.js.map} +1 -1
- package/dist/{Component-BnSNDZFt.js → Component-BO5LvfoO.js} +2 -2
- package/dist/{Component-BnSNDZFt.js.map → Component-BO5LvfoO.js.map} +1 -1
- package/dist/{Component-C6mp0LOp.js → Component-BjITARbg.js} +3 -3
- package/dist/{Component-C6mp0LOp.js.map → Component-BjITARbg.js.map} +1 -1
- package/dist/{Component-CBWeJZfB.js → Component-C24OpTxW.js} +2 -2
- package/dist/{Component-CBWeJZfB.js.map → Component-C24OpTxW.js.map} +1 -1
- package/dist/{Component-qJGssCB4.js → Component-CD81ynoG.js} +5 -5
- package/dist/{Component-qJGssCB4.js.map → Component-CD81ynoG.js.map} +1 -1
- package/dist/{Component-CIxKpL6s.js → Component-Cxk1CLsH.js} +2 -2
- package/dist/{Component-CIxKpL6s.js.map → Component-Cxk1CLsH.js.map} +1 -1
- package/dist/{Component-uHkw3SDR.js → Component-CzwTENBM.js} +2 -2
- package/dist/{Component-uHkw3SDR.js.map → Component-CzwTENBM.js.map} +1 -1
- package/dist/{Component-D310jlAj.js → Component-D9cY4WmP.js} +2 -2
- package/dist/{Component-D310jlAj.js.map → Component-D9cY4WmP.js.map} +1 -1
- package/dist/{Component-BPN5FgKq.js → Component-DSAL6avh.js} +2 -2
- package/dist/{Component-BPN5FgKq.js.map → Component-DSAL6avh.js.map} +1 -1
- package/dist/{Component-DU3MeOen.js → Component-DcSDEfYC.js} +2 -2
- package/dist/{Component-DU3MeOen.js.map → Component-DcSDEfYC.js.map} +1 -1
- package/dist/{Component-BRHoDRtF.js → Component-DxkpQKZ9.js} +2 -2
- package/dist/{Component-BRHoDRtF.js.map → Component-DxkpQKZ9.js.map} +1 -1
- package/dist/{Component-B1piMJHv.js → Component-MSGhHMYk.js} +2 -2
- package/dist/{Component-B1piMJHv.js.map → Component-MSGhHMYk.js.map} +1 -1
- package/dist/{Component-B73be-FU.js → Component-c2va6Tzq.js} +2 -2
- package/dist/{Component-B73be-FU.js.map → Component-c2va6Tzq.js.map} +1 -1
- package/dist/Component-uzbYiLD9.js +58 -0
- package/dist/Component-uzbYiLD9.js.map +1 -0
- package/dist/action-popup/index.js +2 -2
- package/dist/arrangement-settings/index.js +3 -3
- package/dist/assets/Component10.css +1 -1
- package/dist/assets/Component11.css +1 -1
- package/dist/assets/Component12.css +1 -1
- package/dist/assets/Component13.css +1 -1
- package/dist/assets/Component14.css +1 -1
- package/dist/assets/Component15.css +1 -1
- package/dist/assets/Component3.css +1 -1
- package/dist/assets/Component4.css +1 -1
- package/dist/assets/Component5.css +1 -1
- package/dist/assets/Component6.css +1 -1
- package/dist/assets/Component7.css +1 -1
- package/dist/assets/Component8.css +1 -1
- package/dist/assets/Component9.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/theme2.css +1 -0
- package/dist/autocomplete/index.js +2 -2
- package/dist/autocomplete-async/index.js +2 -2
- package/dist/button/index.js +1 -1
- package/dist/cascade-menu/index.js +2 -2
- package/dist/checkbox/index.js +2 -2
- package/dist/checkbox-group/index.js +1 -1
- package/dist/context-menu/index.js +1 -1
- package/dist/copy-button/index.js +1 -1
- package/dist/data-table/index.js +1 -1
- package/dist/date-picker/index.js +1 -1
- package/dist/date-range-picker/Component.d.ts.map +1 -1
- package/dist/date-range-picker/index.js +207 -179
- package/dist/date-range-picker/index.js.map +1 -1
- package/dist/date-range-picker/utils.d.ts +24 -0
- package/dist/date-range-picker/utils.d.ts.map +1 -0
- package/dist/drawer/index.js +1 -1
- package/dist/field/index.js +1 -1
- package/dist/grid-layout/index.js +1 -1
- package/dist/input/index.js +2 -2
- package/dist/menu-list/index.js +1 -1
- package/dist/modal/index.js +1 -1
- package/dist/multi-autocomplete/index.js +2 -2
- package/dist/multi-autocomplete-async/index.js +2 -2
- package/dist/multi-select/index.js +2 -2
- package/dist/number-input/index.js +2 -2
- package/dist/number-range/index.js +2 -2
- package/dist/select/index.js +2 -2
- package/dist/slider/Component.d.ts.map +1 -1
- package/dist/slider/index.js +110 -107
- package/dist/slider/index.js.map +1 -1
- package/dist/suggest-checklist/Component.d.ts.map +1 -1
- package/dist/suggest-checklist/index.js +78 -67
- package/dist/suggest-checklist/index.js.map +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/table/index.js +1 -1
- package/dist/test/axe.d.ts +16 -0
- package/dist/test/axe.d.ts.map +1 -0
- package/dist/textarea/index.js +2 -2
- package/dist/theme-C-N1qQjF.js +35 -0
- package/dist/theme-C-N1qQjF.js.map +1 -0
- package/dist/time-field/Component.d.ts.map +1 -1
- package/dist/time-field/index.js +122 -107
- package/dist/time-field/index.js.map +1 -1
- package/dist/tooltip/index.js +1 -1
- package/package.json +1 -1
- package/src/date-range-picker/docs/Description.md +2 -0
- package/src/time-field/docs/Description.md +2 -0
- package/dist/Component-u6K-ylDb.js +0 -85
- package/dist/Component-u6K-ylDb.js.map +0 -1
- package/dist/assets/Component16.css +0 -1
package/dist/checkbox/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C } from "../Component-
|
|
1
|
+
import { C } from "../Component-uzbYiLD9.js";
|
|
2
2
|
import { jsxs as k, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import { s as v } from "../index-h8z54aFR.js";
|
|
5
|
-
import { F as t, u as g } from "../Component-
|
|
5
|
+
import { F as t, u as g } from "../Component-DSAL6avh.js";
|
|
6
6
|
import { u as y, g as B } from "../useFieldHook-Bt9nST7g.js";
|
|
7
7
|
const H = v((o) => {
|
|
8
8
|
const { controlProps: r, size: i, invalid: a, disabled: s } = g(), { id: d, "aria-describedby": l, "aria-invalid": n } = r;
|
|
@@ -3,7 +3,7 @@ import g from "classnames";
|
|
|
3
3
|
import { CheckboxGroup as y } from "react-aria-components";
|
|
4
4
|
import { s as b } from "../index-h8z54aFR.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import { F as d, u as B } from "../Component-
|
|
6
|
+
import { F as d, u as B } from "../Component-DSAL6avh.js";
|
|
7
7
|
import { u as H, g as N } from "../useFieldHook-Bt9nST7g.js";
|
|
8
8
|
import '../assets/index7.css';const _ = "aub_styles-module_root_6f354", j = {
|
|
9
9
|
root: _
|
|
@@ -6,7 +6,7 @@ import { typographyStyles as $ } from "../typography/index.js";
|
|
|
6
6
|
import { C as D } from "../Check-deng4Zns.js";
|
|
7
7
|
import { C as V } from "../Copy-DBU7bgFo.js";
|
|
8
8
|
import { u as q } from "../hooks-BlX5Y4Zt.js";
|
|
9
|
-
import { T as y } from "../Component-
|
|
9
|
+
import { T as y } from "../Component-CzwTENBM.js";
|
|
10
10
|
import '../assets/index2.css';const z = "aub_styles-module_root_c67e4", G = "aub_styles-module_icon_e7237", g = {
|
|
11
11
|
root: z,
|
|
12
12
|
icon: G
|
package/dist/data-table/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as C, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useContext as x, createContext as N, Children as y, isValidElement as h, useMemo as _ } from "react";
|
|
3
3
|
import { s as F } from "../index-h8z54aFR.js";
|
|
4
|
-
import { T as t } from "../Component-
|
|
4
|
+
import { T as t } from "../Component-CD81ynoG.js";
|
|
5
5
|
import A from "classnames";
|
|
6
6
|
import { M as P } from "../SortDescending-DziKhSYN.js";
|
|
7
7
|
import { u as R } from "../hooks-BlX5Y4Zt.js";
|
|
@@ -10,7 +10,7 @@ import { C as _e } from "../Clear-DcxADxz6.js";
|
|
|
10
10
|
import { u as ye } from "../hooks-BlX5Y4Zt.js";
|
|
11
11
|
import { cva as fe } from "class-variance-authority";
|
|
12
12
|
import { typographyStyles as O } from "../typography/index.js";
|
|
13
|
-
import { F as N, u as he } from "../Component-
|
|
13
|
+
import { F as N, u as he } from "../Component-DSAL6avh.js";
|
|
14
14
|
import { u as De, g as ge } from "../useFieldHook-Bt9nST7g.js";
|
|
15
15
|
import '../assets/index15.css';const K = ({ scrollToDate: o, className: r, autoFocusDay: s = !1 }) => {
|
|
16
16
|
const { months: m, viewportRef: c, setMonthEl: d, scrollToMonth: p } = ce(o), i = Q(Z), t = ee(ae), b = M(i?.value ?? t?.value ?? null), y = M(t?.minValue ?? null), f = M(t?.maxValue ?? null), v = !!t?.isDisabled, h = t?.isDateUnavailable ? (n) => !!t.isDateUnavailable?.(n) : void 0, _ = (n) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/date-range-picker/Component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/date-range-picker/Component.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAYrD,eAAO,MAAM,eAAe,0PAqBrB,qBAAqB;;CAgL3B,CAAC"}
|
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { useContext as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { u as
|
|
8
|
-
import { C as
|
|
9
|
-
import { C as
|
|
10
|
-
import { u as
|
|
11
|
-
import { cva as
|
|
12
|
-
import { typographyStyles as
|
|
13
|
-
import { F as
|
|
14
|
-
import { u as
|
|
15
|
-
import '../assets/
|
|
16
|
-
const { months:
|
|
17
|
-
if (!
|
|
18
|
-
|
|
1
|
+
import { jsx as o, jsxs as Y } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as fe, useState as L, useRef as D, useEffect as ee } from "react";
|
|
3
|
+
import z from "classnames";
|
|
4
|
+
import { DateRangePickerStateContext as be, useSlottedContext as ge, RangeCalendarContext as _e, DateRangePicker as ye, Group as he, DateInput as ne, DateSegment as re, Button as te, Popover as De, Dialog as Ce } from "react-aria-components";
|
|
5
|
+
import { s as se } from "../index-h8z54aFR.js";
|
|
6
|
+
import { CalendarDate as le } from "@internationalized/date";
|
|
7
|
+
import { u as Re, t as M, a as ke, M as Ee, b as Ne, c as ve, D as Fe } from "../index-BXlN61PG.js";
|
|
8
|
+
import { C as Pe } from "../Calendar-CMg4K4oF.js";
|
|
9
|
+
import { C as Ve } from "../Clear-DcxADxz6.js";
|
|
10
|
+
import { u as Se } from "../hooks-BlX5Y4Zt.js";
|
|
11
|
+
import { cva as Be } from "class-variance-authority";
|
|
12
|
+
import { typographyStyles as J } from "../typography/index.js";
|
|
13
|
+
import { F as w, u as Me } from "../Component-DSAL6avh.js";
|
|
14
|
+
import { u as Ae, g as Le } from "../useFieldHook-Bt9nST7g.js";
|
|
15
|
+
import '../assets/index20.css';const ce = ({ scrollToDate: e, className: r, autoFocusDay: c = !1 }) => {
|
|
16
|
+
const { months: d, viewportRef: s, setMonthEl: p, scrollToMonth: b } = Re(e), l = fe(be), i = ge(_e), [u, C] = L(null), [P, R] = L(null), k = l?.value ?? i?.value ?? null, _ = M(k?.start ?? null), E = M(k?.end ?? null), y = M(i?.minValue ?? null), U = M(i?.maxValue ?? null), K = !!i?.isDisabled, I = i?.isDateUnavailable ? (t) => !!i.isDateUnavailable?.(t) : void 0, T = (t) => {
|
|
17
|
+
if (!u) {
|
|
18
|
+
C(t);
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
const m =
|
|
22
|
-
if (
|
|
23
|
-
|
|
21
|
+
const m = t.compare(u) <= 0 ? t : u, S = t.compare(u) <= 0 ? u : t, f = { start: m, end: S };
|
|
22
|
+
if (C(null), R(null), i?.onChange) {
|
|
23
|
+
i.onChange(f);
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
}, { focusedDate:
|
|
28
|
-
viewportRef:
|
|
26
|
+
l?.setValue(f), l?.close();
|
|
27
|
+
}, { focusedDate: h, onDayFocus: j, onDayBlur: G, onDayKeyDown: H, setFocusedDateFromParts: X, isGridEngaged: N } = ke({
|
|
28
|
+
viewportRef: s,
|
|
29
29
|
ensureMonthVisible: b,
|
|
30
|
-
preferredDate:
|
|
31
|
-
minValue:
|
|
32
|
-
maxValue:
|
|
33
|
-
isDateUnavailable:
|
|
34
|
-
onSelect:
|
|
30
|
+
preferredDate: E ?? _ ?? M(e),
|
|
31
|
+
minValue: y,
|
|
32
|
+
maxValue: U,
|
|
33
|
+
isDateUnavailable: I,
|
|
34
|
+
onSelect: T,
|
|
35
35
|
autoFocusDay: c
|
|
36
|
-
}),
|
|
37
|
-
b(
|
|
36
|
+
}), V = (t) => {
|
|
37
|
+
b(t), X(t.year, t.month);
|
|
38
38
|
};
|
|
39
|
-
return /* @__PURE__ */ o(
|
|
40
|
-
|
|
39
|
+
return /* @__PURE__ */ o(Ee, { months: d, viewportRef: s, setMonthEl: p, className: r, children: ({ monthKey: t, top: m, height: S }) => /* @__PURE__ */ o(
|
|
40
|
+
Ne,
|
|
41
41
|
{
|
|
42
|
-
monthKey:
|
|
42
|
+
monthKey: t,
|
|
43
43
|
monthTop: m,
|
|
44
|
-
monthHeight:
|
|
45
|
-
rangeStart:
|
|
46
|
-
rangeEnd:
|
|
47
|
-
rangeAnchor:
|
|
48
|
-
hoveredDate:
|
|
49
|
-
minValue:
|
|
50
|
-
maxValue:
|
|
51
|
-
isDateUnavailable:
|
|
52
|
-
isDisabled:
|
|
53
|
-
onSelect:
|
|
54
|
-
onHoverChange:
|
|
55
|
-
onMonthYearChange:
|
|
56
|
-
focusedDate:
|
|
57
|
-
isGridEngaged:
|
|
58
|
-
onFocusDate:
|
|
59
|
-
onBlurDate:
|
|
60
|
-
onDayKeyDown:
|
|
44
|
+
monthHeight: S,
|
|
45
|
+
rangeStart: u ? null : _,
|
|
46
|
+
rangeEnd: u ? null : E,
|
|
47
|
+
rangeAnchor: u,
|
|
48
|
+
hoveredDate: P,
|
|
49
|
+
minValue: y,
|
|
50
|
+
maxValue: U,
|
|
51
|
+
isDateUnavailable: I,
|
|
52
|
+
isDisabled: K,
|
|
53
|
+
onSelect: T,
|
|
54
|
+
onHoverChange: R,
|
|
55
|
+
onMonthYearChange: V,
|
|
56
|
+
focusedDate: h,
|
|
57
|
+
isGridEngaged: N,
|
|
58
|
+
onFocusDate: j,
|
|
59
|
+
onBlurDate: G,
|
|
60
|
+
onDayKeyDown: H
|
|
61
61
|
}
|
|
62
62
|
) });
|
|
63
63
|
};
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
root:
|
|
67
|
-
block:
|
|
68
|
-
group:
|
|
69
|
-
sm:
|
|
70
|
-
md:
|
|
71
|
-
lg:
|
|
72
|
-
primary:
|
|
73
|
-
input:
|
|
74
|
-
separator:
|
|
75
|
-
segment:
|
|
76
|
-
actions:
|
|
77
|
-
iconButton:
|
|
78
|
-
clear:
|
|
79
|
-
icon:
|
|
80
|
-
popover:
|
|
81
|
-
},
|
|
64
|
+
ce.displayName = "ScrollRangeCalendar";
|
|
65
|
+
const Ue = "aub_styles-module_root_17643", Ie = "aub_styles-module_block_765dd", Te = "aub_styles-module_group_a9356", Ge = "aub_styles-module_sm_99341", He = "aub_styles-module_md_78fb9", Oe = "aub_styles-module_lg_5c348", we = "aub_styles-module_primary_52851", xe = "aub_styles-module_input_f6008", Ye = "aub_styles-module_separator_3f960", ze = "aub_styles-module_segment_de749", Ke = "aub_styles-module_actions_340e3", je = "aub_styles-module_iconButton_ab98d", Xe = "aub_styles-module_clear_4c84c", qe = "aub_styles-module_icon_7a8c2", $e = "aub_styles-module_popover_9d08e", a = {
|
|
66
|
+
root: Ue,
|
|
67
|
+
block: Ie,
|
|
68
|
+
group: Te,
|
|
69
|
+
sm: Ge,
|
|
70
|
+
md: He,
|
|
71
|
+
lg: Oe,
|
|
72
|
+
primary: we,
|
|
73
|
+
input: xe,
|
|
74
|
+
separator: Ye,
|
|
75
|
+
segment: ze,
|
|
76
|
+
actions: Ke,
|
|
77
|
+
iconButton: je,
|
|
78
|
+
clear: Xe,
|
|
79
|
+
icon: qe,
|
|
80
|
+
popover: $e
|
|
81
|
+
}, Je = Be(a.group, {
|
|
82
82
|
variants: {
|
|
83
83
|
size: {
|
|
84
|
-
sm:
|
|
85
|
-
md:
|
|
86
|
-
lg:
|
|
84
|
+
sm: z(a.sm, J.bodyS),
|
|
85
|
+
md: z(a.md, J.bodyS),
|
|
86
|
+
lg: z(a.lg, J.bodyM)
|
|
87
87
|
},
|
|
88
88
|
variant: {
|
|
89
|
-
primary:
|
|
89
|
+
primary: a.primary
|
|
90
90
|
},
|
|
91
91
|
block: {
|
|
92
|
-
true:
|
|
92
|
+
true: a.block,
|
|
93
93
|
false: null
|
|
94
94
|
}
|
|
95
95
|
},
|
|
@@ -98,107 +98,135 @@ const ve = "aub_styles-module_root_17643", Re = "aub_styles-module_block_765dd",
|
|
|
98
98
|
variant: "primary",
|
|
99
99
|
block: !0
|
|
100
100
|
}
|
|
101
|
-
}),
|
|
101
|
+
}), Qe = new le(Fe, 1, 1), We = new le(ve, 12, 31), Ze = (e) => e?.start != null || e?.end != null, ae = (e, r) => e == null || r == null ? e == null && r == null : e.compare(r) === 0, oe = (e, r, c) => e.compare(r) >= 0 && e.compare(c) <= 0, A = (e, r, c) => e == null ? !0 : e.start == null || e.end == null || e.end.compare(e.start) < 0 ? !1 : oe(e.start, r, c) && oe(e.end, r, c), en = (e) => e.start != null && e.end != null && e.end.compare(e.start) < 0 ? { start: e.end, end: e.start } : e, x = (e, r) => e == null || r == null ? e == null && r == null : ae(e.start, r.start) && ae(e.end, r.end), nn = (e, r, c, d) => {
|
|
102
|
+
if (e?.start != null && e.end != null) {
|
|
103
|
+
const s = en(e);
|
|
104
|
+
return s.start != null && s.end != null && A(s, c, d) ? { start: s.start, end: s.end } : r;
|
|
105
|
+
}
|
|
106
|
+
return e == null ? null : r;
|
|
107
|
+
}, ue = se(
|
|
102
108
|
({
|
|
103
109
|
ref: e,
|
|
104
|
-
size:
|
|
110
|
+
size: r = "md",
|
|
105
111
|
variant: c = "primary",
|
|
106
|
-
block:
|
|
107
|
-
invalid:
|
|
112
|
+
block: d = !0,
|
|
113
|
+
invalid: s = !1,
|
|
108
114
|
disabled: p = !1,
|
|
109
115
|
clear: b = !1,
|
|
110
|
-
value:
|
|
111
|
-
defaultValue:
|
|
112
|
-
onChange:
|
|
113
|
-
onBlur:
|
|
114
|
-
className:
|
|
115
|
-
dataTestId:
|
|
116
|
-
minValue:
|
|
116
|
+
value: l,
|
|
117
|
+
defaultValue: i,
|
|
118
|
+
onChange: u,
|
|
119
|
+
onBlur: C,
|
|
120
|
+
className: P,
|
|
121
|
+
dataTestId: R,
|
|
122
|
+
minValue: k,
|
|
117
123
|
maxValue: _,
|
|
118
|
-
"aria-label":
|
|
119
|
-
"aria-labelledby":
|
|
120
|
-
"aria-describedby":
|
|
121
|
-
...
|
|
124
|
+
"aria-label": E,
|
|
125
|
+
"aria-labelledby": y,
|
|
126
|
+
"aria-describedby": U,
|
|
127
|
+
...K
|
|
122
128
|
}) => {
|
|
123
|
-
const { clear:
|
|
124
|
-
|
|
125
|
-
),
|
|
126
|
-
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
const
|
|
132
|
-
|
|
129
|
+
const { clear: I, openCalendar: T } = Se(), h = l !== void 0, [j, G] = L(() => i ?? null), [H, X] = L(!1), [N, V] = L(void 0), t = h ? l : j, m = N !== void 0 ? N : t, S = b && !p && Ze(m), f = k ?? Qe, v = _ ?? We, B = D(
|
|
130
|
+
A(t, f, v) ? t ?? null : null
|
|
131
|
+
), O = D(B.current), g = D(N);
|
|
132
|
+
g.current = N;
|
|
133
|
+
const F = D({ min: f, max: v });
|
|
134
|
+
F.current = { min: f, max: v };
|
|
135
|
+
const Q = D(m);
|
|
136
|
+
Q.current = m;
|
|
137
|
+
const W = D("pointer"), q = D(l);
|
|
138
|
+
ee(() => {
|
|
139
|
+
A(t, f, v) && (B.current = t ?? null);
|
|
140
|
+
}, [t, f, v]), ee(() => {
|
|
141
|
+
if (h) {
|
|
142
|
+
if (x(l ?? null, q.current ?? null)) {
|
|
143
|
+
q.current = l;
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
q.current = l, g.current !== void 0 && !x(l ?? null, g.current) && (g.current = void 0, V(void 0));
|
|
147
|
+
}
|
|
148
|
+
}, [h, l]);
|
|
149
|
+
const Z = (n) => {
|
|
150
|
+
g.current = void 0, V(void 0), h || G(n), A(n, F.current.min, F.current.max) && (B.current = n), !x(O.current, n) && (O.current = n, u?.(n));
|
|
151
|
+
}, de = (n) => {
|
|
152
|
+
Z(n);
|
|
153
|
+
}, $ = () => {
|
|
154
|
+
const n = g.current !== void 0 ? g.current : Q.current, { min: me, max: pe } = F.current;
|
|
155
|
+
Z(nn(n, B.current, me, pe));
|
|
133
156
|
};
|
|
134
|
-
return /* @__PURE__ */
|
|
135
|
-
|
|
157
|
+
return /* @__PURE__ */ Y(
|
|
158
|
+
ye,
|
|
136
159
|
{
|
|
137
|
-
...
|
|
138
|
-
value:
|
|
139
|
-
onChange:
|
|
160
|
+
...K,
|
|
161
|
+
value: m,
|
|
162
|
+
onChange: (n) => {
|
|
163
|
+
g.current = n, V(n), h || G(n), A(n, F.current.min, F.current.max) && (B.current = n, !x(O.current, n) && (O.current = n, u?.(n)));
|
|
164
|
+
},
|
|
140
165
|
isDisabled: p,
|
|
141
|
-
isInvalid:
|
|
142
|
-
isOpen:
|
|
143
|
-
onOpenChange: (
|
|
144
|
-
|
|
166
|
+
isInvalid: s,
|
|
167
|
+
isOpen: H,
|
|
168
|
+
onOpenChange: (n) => {
|
|
169
|
+
X(n), n || $();
|
|
145
170
|
},
|
|
146
|
-
onBlur: (
|
|
147
|
-
|
|
171
|
+
onBlur: (n) => {
|
|
172
|
+
$(), C?.(n);
|
|
148
173
|
},
|
|
149
|
-
minValue:
|
|
150
|
-
maxValue:
|
|
151
|
-
"aria-label":
|
|
152
|
-
"aria-labelledby":
|
|
153
|
-
"aria-describedby":
|
|
154
|
-
className:
|
|
174
|
+
minValue: f,
|
|
175
|
+
maxValue: v,
|
|
176
|
+
"aria-label": E,
|
|
177
|
+
"aria-labelledby": y,
|
|
178
|
+
"aria-describedby": U,
|
|
179
|
+
className: z(a.root, d && a.block, P),
|
|
155
180
|
children: [
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
|
|
181
|
+
/* @__PURE__ */ Y(
|
|
182
|
+
he,
|
|
158
183
|
{
|
|
159
184
|
ref: e,
|
|
160
|
-
className:
|
|
161
|
-
"data-invalid":
|
|
185
|
+
className: Je({ size: r, variant: c, block: d }),
|
|
186
|
+
"data-invalid": s || void 0,
|
|
162
187
|
"data-disabled": p || void 0,
|
|
163
|
-
"data-test-id":
|
|
188
|
+
"data-test-id": R,
|
|
189
|
+
onKeyDown: (n) => {
|
|
190
|
+
n.key === "Enter" && $();
|
|
191
|
+
},
|
|
164
192
|
children: [
|
|
165
|
-
/* @__PURE__ */ o(
|
|
166
|
-
/* @__PURE__ */ o("span", { "aria-hidden": !0, className:
|
|
167
|
-
/* @__PURE__ */ o(
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
|
|
170
|
-
|
|
193
|
+
/* @__PURE__ */ o(ne, { slot: "start", className: a.input, children: (n) => /* @__PURE__ */ o(re, { segment: n, className: a.segment }) }),
|
|
194
|
+
/* @__PURE__ */ o("span", { "aria-hidden": !0, className: a.separator, children: "–" }),
|
|
195
|
+
/* @__PURE__ */ o(ne, { slot: "end", className: a.input, children: (n) => /* @__PURE__ */ o(re, { segment: n, className: a.segment }) }),
|
|
196
|
+
/* @__PURE__ */ Y("span", { className: a.actions, children: [
|
|
197
|
+
S ? /* @__PURE__ */ o(
|
|
198
|
+
te,
|
|
171
199
|
{
|
|
172
200
|
slot: null,
|
|
173
|
-
className:
|
|
174
|
-
"aria-label":
|
|
201
|
+
className: a.clear,
|
|
202
|
+
"aria-label": I,
|
|
175
203
|
"data-test-id": "date-range-picker-clear",
|
|
176
204
|
excludeFromTabOrder: !0,
|
|
177
|
-
onPress: () =>
|
|
178
|
-
children: /* @__PURE__ */ o(
|
|
205
|
+
onPress: () => de(null),
|
|
206
|
+
children: /* @__PURE__ */ o(Ve, { className: a.icon })
|
|
179
207
|
}
|
|
180
208
|
) : null,
|
|
181
209
|
/* @__PURE__ */ o(
|
|
182
|
-
|
|
210
|
+
te,
|
|
183
211
|
{
|
|
184
|
-
className:
|
|
185
|
-
"aria-label":
|
|
212
|
+
className: a.iconButton,
|
|
213
|
+
"aria-label": T,
|
|
186
214
|
"data-test-id": "date-range-picker-calendar",
|
|
187
|
-
onPressStart: (
|
|
188
|
-
|
|
215
|
+
onPressStart: (n) => {
|
|
216
|
+
W.current = n.pointerType === "keyboard" ? "keyboard" : "pointer";
|
|
189
217
|
},
|
|
190
|
-
children: /* @__PURE__ */ o(
|
|
218
|
+
children: /* @__PURE__ */ o(Pe, { className: a.icon })
|
|
191
219
|
}
|
|
192
220
|
)
|
|
193
221
|
] })
|
|
194
222
|
]
|
|
195
223
|
}
|
|
196
224
|
),
|
|
197
|
-
/* @__PURE__ */ o(
|
|
198
|
-
|
|
225
|
+
/* @__PURE__ */ o(De, { className: a.popover, placement: "bottom start", children: /* @__PURE__ */ o(Ce, { children: /* @__PURE__ */ o(
|
|
226
|
+
ce,
|
|
199
227
|
{
|
|
200
|
-
scrollToDate:
|
|
201
|
-
autoFocusDay:
|
|
228
|
+
scrollToDate: m?.end ?? m?.start ?? null,
|
|
229
|
+
autoFocusDay: H && W.current === "keyboard"
|
|
202
230
|
}
|
|
203
231
|
) }) })
|
|
204
232
|
]
|
|
@@ -206,72 +234,72 @@ const ve = "aub_styles-module_root_17643", Re = "aub_styles-module_block_765dd",
|
|
|
206
234
|
);
|
|
207
235
|
}
|
|
208
236
|
);
|
|
209
|
-
|
|
210
|
-
const
|
|
211
|
-
({ ref: e, value:
|
|
212
|
-
const { controlProps: p, size: b, invalid:
|
|
237
|
+
ue.displayName = "DateRangePicker";
|
|
238
|
+
const ie = se(
|
|
239
|
+
({ ref: e, value: r, onChange: c, onBlur: d, ...s }) => {
|
|
240
|
+
const { controlProps: p, size: b, invalid: l, disabled: i } = Me();
|
|
213
241
|
return /* @__PURE__ */ o(
|
|
214
|
-
|
|
242
|
+
ue,
|
|
215
243
|
{
|
|
216
244
|
...p,
|
|
217
|
-
...
|
|
245
|
+
...s,
|
|
218
246
|
ref: e,
|
|
219
247
|
size: b,
|
|
220
|
-
invalid:
|
|
221
|
-
disabled:
|
|
222
|
-
value:
|
|
248
|
+
invalid: l,
|
|
249
|
+
disabled: i,
|
|
250
|
+
value: r,
|
|
223
251
|
onChange: c,
|
|
224
|
-
onBlur:
|
|
252
|
+
onBlur: d
|
|
225
253
|
}
|
|
226
254
|
);
|
|
227
255
|
}
|
|
228
256
|
);
|
|
229
|
-
|
|
230
|
-
const
|
|
257
|
+
ie.displayName = "FormDateRangePickerControl";
|
|
258
|
+
const rn = ({
|
|
231
259
|
name: e,
|
|
232
|
-
label:
|
|
260
|
+
label: r,
|
|
233
261
|
hint: c,
|
|
234
|
-
size:
|
|
235
|
-
block:
|
|
262
|
+
size: d = "md",
|
|
263
|
+
block: s = !0,
|
|
236
264
|
disabled: p,
|
|
237
265
|
className: b,
|
|
238
|
-
dataTestId:
|
|
239
|
-
...
|
|
266
|
+
dataTestId: l,
|
|
267
|
+
...i
|
|
240
268
|
}) => {
|
|
241
|
-
const { field:
|
|
242
|
-
return /* @__PURE__ */
|
|
243
|
-
|
|
269
|
+
const { field: u, fieldState: C, inputProps: P, onChange: R, onBlurHandler: k } = Ae({ name: e }), _ = Le(C.error)?.message, E = p ?? P.disabled;
|
|
270
|
+
return /* @__PURE__ */ Y(
|
|
271
|
+
w,
|
|
244
272
|
{
|
|
245
273
|
invalid: !!_,
|
|
246
|
-
disabled:
|
|
247
|
-
size:
|
|
248
|
-
block:
|
|
274
|
+
disabled: E,
|
|
275
|
+
size: d,
|
|
276
|
+
block: s,
|
|
249
277
|
className: b,
|
|
250
|
-
dataTestId:
|
|
278
|
+
dataTestId: l,
|
|
251
279
|
children: [
|
|
252
|
-
|
|
280
|
+
r ? /* @__PURE__ */ o(w.Label, { children: r }) : null,
|
|
253
281
|
/* @__PURE__ */ o(
|
|
254
|
-
|
|
282
|
+
ie,
|
|
255
283
|
{
|
|
256
|
-
...
|
|
257
|
-
block:
|
|
258
|
-
ref:
|
|
259
|
-
value:
|
|
260
|
-
onChange: (
|
|
261
|
-
|
|
284
|
+
...i,
|
|
285
|
+
block: s,
|
|
286
|
+
ref: u.ref,
|
|
287
|
+
value: u.value ?? null,
|
|
288
|
+
onChange: (y) => {
|
|
289
|
+
u.onChange(y), R(e, y);
|
|
262
290
|
},
|
|
263
|
-
onBlur: () =>
|
|
291
|
+
onBlur: () => k()
|
|
264
292
|
}
|
|
265
293
|
),
|
|
266
|
-
c ? /* @__PURE__ */ o(
|
|
267
|
-
/* @__PURE__ */ o(
|
|
294
|
+
c ? /* @__PURE__ */ o(w.Hint, { children: c }) : null,
|
|
295
|
+
/* @__PURE__ */ o(w.Error, { children: _ })
|
|
268
296
|
]
|
|
269
297
|
}
|
|
270
298
|
);
|
|
271
299
|
};
|
|
272
|
-
|
|
300
|
+
rn.displayName = "FormDateRangePicker";
|
|
273
301
|
export {
|
|
274
|
-
|
|
275
|
-
|
|
302
|
+
ue as DateRangePicker,
|
|
303
|
+
rn as FormDateRangePicker
|
|
276
304
|
};
|
|
277
305
|
//# sourceMappingURL=index.js.map
|