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