@pibit.ai/cure-design-system 0.6.4 → 0.6.5

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 (32) hide show
  1. package/dist/applications/date-picker/calendar.d.ts +1 -1
  2. package/dist/applications/date-picker/calendar.d.ts.map +1 -1
  3. package/dist/applications/date-picker/calendar.js +162 -157
  4. package/dist/applications/date-picker/cell.d.ts.map +1 -1
  5. package/dist/applications/date-picker/cell.js +58 -51
  6. package/dist/applications/date-picker/date-input.d.ts +2 -2
  7. package/dist/applications/date-picker/date-input.d.ts.map +1 -1
  8. package/dist/applications/date-picker/date-input.js +21 -17
  9. package/dist/applications/date-picker/date-picker.d.ts +4 -1
  10. package/dist/applications/date-picker/date-picker.d.ts.map +1 -1
  11. package/dist/applications/date-picker/date-picker.js +136 -116
  12. package/dist/applications/date-picker/date-range-picker.d.ts +4 -0
  13. package/dist/applications/date-picker/date-range-picker.d.ts.map +1 -1
  14. package/dist/applications/date-picker/date-range-picker.js +245 -197
  15. package/dist/applications/date-picker/date-time-calendar.d.ts +1 -1
  16. package/dist/applications/date-picker/date-time-calendar.d.ts.map +1 -1
  17. package/dist/applications/date-picker/date-time-calendar.js +70 -60
  18. package/dist/applications/date-picker/range-calendar.d.ts +1 -1
  19. package/dist/applications/date-picker/range-calendar.d.ts.map +1 -1
  20. package/dist/applications/date-picker/range-calendar.js +99 -90
  21. package/dist/applications/date-picker/range-preset.d.ts +4 -1
  22. package/dist/applications/date-picker/range-preset.d.ts.map +1 -1
  23. package/dist/applications/date-picker/range-preset.js +23 -17
  24. package/dist/applications/date-picker/sizes.d.ts +12 -0
  25. package/dist/applications/date-picker/sizes.d.ts.map +1 -0
  26. package/dist/applications/date-picker/sizes.js +22 -0
  27. package/dist/applications/date-picker/styles.js +1 -1
  28. package/dist/applications/date-picker/time-field.js +21 -21
  29. package/dist/primitives/select/multi-select.d.ts.map +1 -1
  30. package/dist/primitives/select/multi-select.js +419 -422
  31. package/dist/styles/components.css +1 -1
  32. package/package.json +1 -1
@@ -35,7 +35,7 @@ export declare const CalendarMonthYearHeader: ({ size, }: {
35
35
  export interface CalendarProps extends AriaCalendarProps<DateValue> {
36
36
  /** The dates to highlight. */
37
37
  highlightedDates?: DateValue[];
38
- /** Visual size: "xs" (compact, for popovers/small screens) or "sm" (default). */
38
+ /** Visual size: "xs" (compact, default) or "sm". */
39
39
  size?: CalendarSize;
40
40
  }
41
41
  export declare const Calendar: ({ highlightedDates, size, className, ...props }: CalendarProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/applications/date-picker/calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,iBAAiB,EAAgB,MAAM,OAAO,CAAC;AAW7E,OAAO,KAAK,EACV,aAAa,IAAI,iBAAiB,EAClC,SAAS,EACV,MAAM,uBAAuB,CAAC;AA6E/B,eAAO,MAAM,uBAAuB,GAAI,cAAc,iBAAiB,4CAgBtE,CAAC;AAEF,wJAAwJ;AACxJ,eAAO,MAAM,yBAAyB,kCAC5B,SAAS,KAAK,IAAI,SACrB,CAAC;AAER,mIAAmI;AACnI,MAAM,WAAW,sCAAuC,SAAQ,iBAAiB;IAC/E,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IACxB,yHAAyH;IACzH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,0HAA0H;IAC1H,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C,yOAAyO;IACzO,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,eAAO,MAAM,iCAAiC,GAAI,kEAM/C,sCAAsC,4CAmCxC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AA8ErD,MAAM,WAAW,oBAAoB;IACnC,oCAAoC;IACpC,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAC;IAC/B,sDAAsD;IACtD,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CAC1C;AAED,qFAAqF;AACrF,eAAO,MAAM,eAAe,GAAI,2CAI7B,oBAAoB,4CAiCtB,CAAC;AA4DF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAAI,WAErC;IACD,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB,4CA0EA,CAAC;AAEF,MAAM,WAAW,aAAc,SAAQ,iBAAiB,CAAC,SAAS,CAAC;IACjE,8BAA8B;IAC9B,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAC;IAC/B,iFAAiF;IACjF,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,eAAO,MAAM,QAAQ,GAAI,iDAKtB,aAAa,4CA+Cf,CAAC"}
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/applications/date-picker/calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,iBAAiB,EAAgB,MAAM,OAAO,CAAC;AAW7E,OAAO,KAAK,EACV,aAAa,IAAI,iBAAiB,EAClC,SAAS,EACV,MAAM,uBAAuB,CAAC;AA8E/B,eAAO,MAAM,uBAAuB,GAAI,cAAc,iBAAiB,4CAgBtE,CAAC;AAEF,wJAAwJ;AACxJ,eAAO,MAAM,yBAAyB,kCAC5B,SAAS,KAAK,IAAI,SACrB,CAAC;AAER,mIAAmI;AACnI,MAAM,WAAW,sCAAuC,SAAQ,iBAAiB;IAC/E,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IACxB,yHAAyH;IACzH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,0HAA0H;IAC1H,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C,yOAAyO;IACzO,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,eAAO,MAAM,iCAAiC,GAAI,kEAM/C,sCAAsC,4CAmCxC,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AA8ErD,MAAM,WAAW,oBAAoB;IACnC,oCAAoC;IACpC,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAC;IAC/B,sDAAsD;IACtD,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CAC1C;AAED,qFAAqF;AACrF,eAAO,MAAM,eAAe,GAAI,2CAI7B,oBAAoB,4CAkCtB,CAAC;AA+DF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,GAAI,WAErC;IACD,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB,4CA0EA,CAAC;AAEF,MAAM,WAAW,aAAc,SAAQ,iBAAiB,CAAC,SAAS,CAAC;IACjE,8BAA8B;IAC9B,gBAAgB,CAAC,EAAE,SAAS,EAAE,CAAC;IAC/B,oDAAoD;IACpD,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,eAAO,MAAM,QAAQ,GAAI,iDAKtB,aAAa,4CA+Cf,CAAC"}
@@ -1,286 +1,291 @@
1
- import { jsx as n, jsxs as u } from "react/jsx-runtime";
2
- import { createContext as B, useContext as h, Fragment as R, useState as p, useMemo as k, useEffect as W, cloneElement as E } from "react";
3
- import { ChevronLeft as G, ChevronRight as L, ChevronDown as Y } from "@untitledui/icons";
4
- import { useSlottedContext as N, CalendarContext as b, Calendar as j, Heading as O, CalendarGrid as K, CalendarGridHeader as T, CalendarHeaderCell as X, CalendarStateContext as g, DateField as Z, RangeCalendarStateContext as $, RangeCalendarContext as q, Select as z, Button as V, SelectValue as J, ListBox as Q, ListBoxItem as U } from "react-aria-components";
5
- import { useDateFormatter as w, useCalendarGrid as ee } from "react-aria";
6
- import { today as P, getLocalTimeZone as te, endOfMonth as re } from "@internationalized/date";
1
+ import { jsx as a, jsxs as u } from "react/jsx-runtime";
2
+ import { createContext as I, useContext as h, Fragment as W, useState as p, useMemo as k, useEffect as E, cloneElement as G } from "react";
3
+ import { ChevronLeft as L, ChevronRight as Y, ChevronDown as j } from "@untitledui/icons";
4
+ import { useSlottedContext as N, CalendarContext as b, Calendar as O, Heading as K, CalendarGrid as T, CalendarGridHeader as X, CalendarHeaderCell as Z, CalendarStateContext as g, DateField as $, RangeCalendarStateContext as q, RangeCalendarContext as V, Select as J, Button as Q, SelectValue as U, ListBox as z, ListBoxItem as ee } from "react-aria-components";
5
+ import { useDateFormatter as w, useCalendarGrid as te } from "react-aria";
6
+ import { today as P, getLocalTimeZone as re, endOfMonth as ae } from "@internationalized/date";
7
7
  import { cx as x } from "../../utils/cn.js";
8
8
  import { CalendarCell as ne } from "./cell.js";
9
- import { DateInput as M } from "./date-input.js";
9
+ import { DateInput as F } from "./date-input.js";
10
10
  import { Button as A } from "../../primitives/button/button.js";
11
- import { Popover as ae } from "../../primitives/select/popover.js";
12
- import { pickerOptionStyles as oe } from "./styles.js";
11
+ import { Popover as oe } from "../../primitives/select/popover.js";
12
+ import { pickerOptionStyles as se } from "./styles.js";
13
13
  import { toSingleDate as D } from "./calendar-value.js";
14
- const se = 6;
15
- function le({
16
- children: t,
17
- className: r
14
+ import { dayBoxSizes as le, dateInputSizeFor as M } from "./sizes.js";
15
+ const ce = 6;
16
+ function ie({
17
+ children: r,
18
+ className: e
18
19
  }) {
19
- const e = h(g), s = h($), o = e ?? s, a = N(b), c = N(q), d = o.visibleRange.start, m = (a == null ? void 0 : a.firstDayOfWeek) ?? (c == null ? void 0 : c.firstDayOfWeek), { weeksInMonth: C } = ee(
20
+ const t = h(g), s = h(q), n = t ?? s, o = N(b), c = N(V), d = n.visibleRange.start, m = (o == null ? void 0 : o.firstDayOfWeek) ?? (c == null ? void 0 : c.firstDayOfWeek), { weeksInMonth: C } = te(
20
21
  {
21
22
  startDate: d,
22
- endDate: re(d),
23
+ endDate: ae(d),
23
24
  weekdayStyle: "short",
24
25
  firstDayOfWeek: m
25
26
  },
26
- o
27
- ), i = Math.max(se, C);
28
- return /* @__PURE__ */ n("tbody", { className: r, children: [...new Array(i).keys()].map((l) => /* @__PURE__ */ n("tr", { children: o.getDatesInWeek(l, d).map(
29
- (f, v) => f ? E(t(f), { key: v }) : /* @__PURE__ */ n("td", {}, v)
27
+ n
28
+ ), i = Math.max(ce, C);
29
+ return /* @__PURE__ */ a("tbody", { className: e, children: [...new Array(i).keys()].map((l) => /* @__PURE__ */ a("tr", { children: n.getDatesInWeek(l, d).map(
30
+ (f, v) => f ? G(r(f), { key: v }) : /* @__PURE__ */ a("td", {}, v)
30
31
  ) }, l)) });
31
32
  }
32
- const ce = ({ children: t }) => {
33
- const [r, e] = p(null), [s, o] = p();
34
- return /* @__PURE__ */ n(
33
+ const de = ({ children: r }) => {
34
+ const [e, t] = p(null), [s, n] = p();
35
+ return /* @__PURE__ */ a(
35
36
  b.Provider,
36
37
  {
37
38
  value: {
38
- value: r,
39
- onChange: (a) => e(D(a)),
39
+ value: e,
40
+ onChange: (o) => t(D(o)),
40
41
  focusedValue: s,
41
- onFocusChange: o
42
+ onFocusChange: n
42
43
  },
43
- children: t
44
+ children: r
44
45
  }
45
46
  );
46
- }, H = B(null), ke = ({
47
- value: t,
48
- onSelect: r,
49
- onChange: e,
47
+ }, H = I(null), Me = ({
48
+ value: r,
49
+ onSelect: e,
50
+ onChange: t,
50
51
  onlyNotifyOnGridSelect: s = !1,
51
- children: o
52
+ children: n
52
53
  }) => {
53
- const [a, c] = p(t), [d, m] = p();
54
- W(() => {
55
- c(t), t != null && m(t);
56
- }, [t]);
54
+ const [o, c] = p(r), [d, m] = p();
55
+ E(() => {
56
+ c(r), r != null && m(r);
57
+ }, [r]);
57
58
  const C = (l) => {
58
- c(l), l && m(l), e == null || e(l), l && !s && (r == null || r(l));
59
- }, i = s && r ? r : null;
60
- return /* @__PURE__ */ n(H.Provider, { value: i, children: /* @__PURE__ */ n(
59
+ c(l), l && m(l), t == null || t(l), l && !s && (e == null || e(l));
60
+ }, i = s && e ? e : null;
61
+ return /* @__PURE__ */ a(H.Provider, { value: i, children: /* @__PURE__ */ a(
61
62
  b.Provider,
62
63
  {
63
64
  value: {
64
- value: a,
65
+ value: o,
65
66
  onChange: (l) => C(D(l)),
66
67
  focusedValue: d,
67
68
  onFocusChange: m
68
69
  },
69
- children: o
70
+ children: n
70
71
  }
71
72
  ) });
72
- }, I = B("sm"), ie = () => {
73
- const t = h(g), r = h(I);
74
- return t ? /* @__PURE__ */ n(
75
- Z,
73
+ }, R = I("xs"), me = () => {
74
+ const r = h(g), e = h(R);
75
+ return r ? /* @__PURE__ */ a(
76
+ $,
76
77
  {
77
- value: D(t.value) ?? void 0,
78
- onChange: (e) => t.setValue(e),
79
- children: /* @__PURE__ */ n(M, { className: "flex-1", size: r === "xs" ? "sm" : "md" })
78
+ value: D(r.value) ?? void 0,
79
+ onChange: (t) => r.setValue(t),
80
+ children: /* @__PURE__ */ a(F, { className: "flex-1", size: M(e) })
80
81
  }
81
- ) : /* @__PURE__ */ n(M, { className: "flex-1", size: r === "xs" ? "sm" : "md" });
82
- }, de = ({
83
- value: t,
84
- children: r,
85
- size: e = "sm",
82
+ ) : /* @__PURE__ */ a(F, { className: "flex-1", size: M(e) });
83
+ }, ue = ({
84
+ value: r,
85
+ children: e,
86
+ size: t = "xs",
86
87
  ...s
87
88
  }) => {
88
- const o = h(g);
89
- if (!o)
89
+ const n = h(g);
90
+ if (!n)
90
91
  throw new Error("Preset must be used within a Calendar component");
91
- return /* @__PURE__ */ n(
92
+ return /* @__PURE__ */ a(
92
93
  A,
93
94
  {
94
95
  ...s,
95
96
  slot: null,
96
- size: e,
97
+ size: t,
97
98
  color: "secondary",
98
99
  onClick: () => {
99
- o.setValue(t), o.setFocusedDate(t);
100
+ n.setValue(r), n.setFocusedDate(r);
100
101
  },
101
102
  className: x(
102
103
  "w-full h-full bg-secondary font-semibold",
103
- e === "xs" ? "text-xs" : "text-sm"
104
+ t === "xs" ? "text-xs" : "text-sm"
104
105
  ),
105
- children: r
106
+ children: e
106
107
  }
107
108
  );
108
109
  }, y = ({
109
- slot: t,
110
- size: r
111
- }) => /* @__PURE__ */ n(
110
+ slot: r,
111
+ size: e
112
+ }) => /* @__PURE__ */ a(
112
113
  A,
113
114
  {
114
- slot: t,
115
- iconLeading: t === "previous" ? G : L,
116
- size: "sm",
115
+ slot: r,
116
+ iconLeading: r === "previous" ? L : Y,
117
+ size: e === "xs" ? "xs" : "sm",
117
118
  color: "tertiary",
118
- className: r === "xs" ? "size-6" : "size-8"
119
+ className: e === "xs" ? "size-6" : "size-8"
119
120
  }
120
- ), me = ({
121
- highlightedDates: t,
122
- size: r = "sm",
123
- onDateSelect: e
121
+ ), fe = ({
122
+ highlightedDates: r,
123
+ size: e = "xs",
124
+ onDateSelect: t
124
125
  }) => {
125
- const s = r === "xs";
126
- return /* @__PURE__ */ u(K, { weekdayStyle: "short", className: "w-max", children: [
127
- /* @__PURE__ */ n(T, { className: "border-b-4 border-transparent", children: (o) => /* @__PURE__ */ n(X, { className: "p-0", children: /* @__PURE__ */ n(
126
+ const s = e === "xs";
127
+ return /* @__PURE__ */ u(T, { weekdayStyle: "short", className: "w-max", children: [
128
+ /* @__PURE__ */ a(X, { className: "border-b-2 border-transparent", children: (n) => /* @__PURE__ */ a(Z, { className: "p-0", children: /* @__PURE__ */ a(
128
129
  "div",
129
130
  {
130
131
  className: x(
131
132
  "flex items-center justify-center font-medium text-secondary",
132
- s ? "size-7 text-xs" : "size-10 text-sm"
133
+ le[e],
134
+ s ? "text-xs" : "text-sm"
133
135
  ),
134
- children: o.slice(0, 2)
136
+ children: n.slice(0, 2)
135
137
  }
136
138
  ) }) }),
137
- /* @__PURE__ */ n(le, { className: "[&_td]:p-0 [&_tr]:border-b-4 [&_tr]:border-transparent [&_tr:last-of-type]:border-none", children: (o) => /* @__PURE__ */ n(
139
+ /* @__PURE__ */ a(ie, { className: "[&_td]:p-0 [&_tr]:border-b-2 [&_tr]:border-transparent [&_tr:last-of-type]:border-none", children: (n) => /* @__PURE__ */ a(
138
140
  ne,
139
141
  {
140
- date: o,
141
- size: r,
142
- isHighlighted: t == null ? void 0 : t.some(
143
- (a) => o.compare(a) === 0
142
+ date: n,
143
+ size: e,
144
+ isHighlighted: r == null ? void 0 : r.some(
145
+ (o) => n.compare(o) === 0
144
146
  ),
145
- onDateSelect: e
147
+ onDateSelect: t
146
148
  }
147
149
  ) })
148
150
  ] });
149
- }, _ = 100, F = ({
150
- "aria-label": t,
151
- items: r,
152
- selectedKey: e,
151
+ }, _ = 100, B = ({
152
+ "aria-label": r,
153
+ items: e,
154
+ selectedKey: t,
153
155
  onChange: s,
154
- size: o
156
+ size: n
155
157
  }) => /* @__PURE__ */ u(
156
- z,
158
+ J,
157
159
  {
158
- "aria-label": t,
159
- selectedKey: e,
160
- onSelectionChange: (a) => {
161
- a != null && s(Number(a));
160
+ "aria-label": r,
161
+ selectedKey: t,
162
+ onSelectionChange: (o) => {
163
+ o != null && s(Number(o));
162
164
  },
163
165
  children: [
164
166
  /* @__PURE__ */ u(
165
- V,
167
+ Q,
166
168
  {
167
- className: ({ isFocusVisible: a, isPressed: c }) => x(
169
+ className: ({ isFocusVisible: o, isPressed: c }) => x(
168
170
  "flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 font-semibold text-fg-secondary outline-hidden transition duration-100 ease-linear hover:bg-primary_hover",
169
- o === "xs" ? "text-xs" : "text-sm",
171
+ n === "xs" ? "text-xs" : "text-sm",
170
172
  c && "bg-primary_hover",
171
- a && "outline-2 outline-offset-2 outline-focus-ring"
173
+ o && "outline-2 outline-offset-2 outline-focus-ring"
172
174
  ),
173
175
  children: [
174
- /* @__PURE__ */ n(J, {}),
175
- /* @__PURE__ */ n(
176
- Y,
176
+ /* @__PURE__ */ a(U, {}),
177
+ /* @__PURE__ */ a(
178
+ j,
177
179
  {
178
180
  "aria-hidden": "true",
179
- className: "size-4 shrink-0 text-fg-quaternary"
181
+ className: x(
182
+ "shrink-0 text-fg-quaternary",
183
+ n === "xs" ? "size-3.5" : "size-4"
184
+ )
180
185
  }
181
186
  )
182
187
  ]
183
188
  }
184
189
  ),
185
- /* @__PURE__ */ n(ae, { size: "sm", placement: "bottom start", className: "w-36", children: /* @__PURE__ */ n(Q, { items: r, className: "outline-hidden", children: (a) => /* @__PURE__ */ n(
186
- U,
190
+ /* @__PURE__ */ a(oe, { size: "sm", placement: "bottom start", className: "w-36", children: /* @__PURE__ */ a(z, { items: e, className: "outline-hidden", children: (o) => /* @__PURE__ */ a(
191
+ ee,
187
192
  {
188
- id: a.id,
189
- textValue: a.label,
190
- className: oe,
191
- children: a.label
193
+ id: o.id,
194
+ textValue: o.label,
195
+ className: se,
196
+ children: o.label
192
197
  }
193
198
  ) }) })
194
199
  ]
195
200
  }
196
- ), we = ({
197
- size: t = "sm"
201
+ ), _e = ({
202
+ size: r = "xs"
198
203
  }) => {
199
- const r = h(g);
200
- if (!r)
204
+ const e = h(g);
205
+ if (!e)
201
206
  throw new Error(
202
207
  "<CalendarMonthYearHeader /> must be used within a <Calendar /> component."
203
208
  );
204
- const { focusedDate: e, timeZone: s, minValue: o, maxValue: a } = r, c = w({
209
+ const { focusedDate: t, timeZone: s, minValue: n, maxValue: o } = e, c = w({
205
210
  month: "long",
206
- calendar: e.calendar.identifier,
211
+ calendar: t.calendar.identifier,
207
212
  timeZone: s
208
213
  }), d = w({
209
214
  year: "numeric",
210
- calendar: e.calendar.identifier,
215
+ calendar: t.calendar.identifier,
211
216
  timeZone: s
212
217
  }), m = k(() => {
213
- const i = e.calendar.getMonthsInYear(e);
218
+ const i = t.calendar.getMonthsInYear(t);
214
219
  return Array.from({ length: i }, (l, f) => ({
215
220
  id: f + 1,
216
221
  label: c.format(
217
- e.set({ month: f + 1, day: 1 }).toDate(s)
222
+ t.set({ month: f + 1, day: 1 }).toDate(s)
218
223
  )
219
224
  }));
220
- }, [e, c, s]), C = k(() => {
225
+ }, [t, c, s]), C = k(() => {
221
226
  const i = P(s).year, l = Math.min(
222
- (o == null ? void 0 : o.year) ?? i - _,
223
- e.year
227
+ (n == null ? void 0 : n.year) ?? i - _,
228
+ t.year
224
229
  ), f = Math.max(
225
- (a == null ? void 0 : a.year) ?? i + _,
226
- e.year
230
+ (o == null ? void 0 : o.year) ?? i + _,
231
+ t.year
227
232
  );
228
233
  return Array.from({ length: f - l + 1 }, (v, S) => ({
229
234
  id: l + S,
230
235
  label: d.format(
231
- e.set({ year: l + S, month: 1, day: 1 }).toDate(s)
236
+ t.set({ year: l + S, month: 1, day: 1 }).toDate(s)
232
237
  )
233
238
  }));
234
- }, [e, a, o, s, d]);
239
+ }, [t, o, n, s, d]);
235
240
  return /* @__PURE__ */ u("header", { className: "flex items-center justify-between gap-2", children: [
236
241
  /* @__PURE__ */ u("div", { className: "-ml-1.5 flex items-center gap-1", children: [
237
- /* @__PURE__ */ n(
238
- F,
242
+ /* @__PURE__ */ a(
243
+ B,
239
244
  {
240
245
  "aria-label": "Month",
241
- size: t,
246
+ size: r,
242
247
  items: m,
243
- selectedKey: e.month,
244
- onChange: (i) => r.setFocusedDate(e.set({ month: i }))
248
+ selectedKey: t.month,
249
+ onChange: (i) => e.setFocusedDate(t.set({ month: i }))
245
250
  }
246
251
  ),
247
- /* @__PURE__ */ n(
248
- F,
252
+ /* @__PURE__ */ a(
253
+ B,
249
254
  {
250
255
  "aria-label": "Year",
251
- size: t,
256
+ size: r,
252
257
  items: C,
253
- selectedKey: e.year,
254
- onChange: (i) => r.setFocusedDate(e.set({ year: i }))
258
+ selectedKey: t.year,
259
+ onChange: (i) => e.setFocusedDate(t.set({ year: i }))
255
260
  }
256
261
  )
257
262
  ] }),
258
263
  /* @__PURE__ */ u("div", { className: "flex items-center gap-1", children: [
259
- /* @__PURE__ */ n(y, { slot: "previous", size: t }),
260
- /* @__PURE__ */ n(y, { slot: "next", size: t })
264
+ /* @__PURE__ */ a(y, { slot: "previous", size: r }),
265
+ /* @__PURE__ */ a(y, { slot: "next", size: r })
261
266
  ] })
262
267
  ] });
263
- }, Me = ({
264
- highlightedDates: t,
265
- size: r = "sm",
266
- className: e,
268
+ }, Be = ({
269
+ highlightedDates: r,
270
+ size: e = "xs",
271
+ className: t,
267
272
  ...s
268
273
  }) => {
269
- const o = N(b), a = h(H), c = r === "xs";
270
- return /* @__PURE__ */ n(o ? R : ce, { children: /* @__PURE__ */ n(I.Provider, { value: r, children: /* @__PURE__ */ u(
271
- j,
274
+ const n = N(b), o = h(H), c = e === "xs";
275
+ return /* @__PURE__ */ a(n ? W : de, { children: /* @__PURE__ */ a(R.Provider, { value: e, children: /* @__PURE__ */ u(
276
+ O,
272
277
  {
273
278
  ...s,
274
279
  className: (m) => x(
275
280
  "flex flex-col w-max",
276
281
  c ? "gap-2" : "gap-3",
277
- typeof e == "function" ? e(m) : e
282
+ typeof t == "function" ? t(m) : t
278
283
  ),
279
284
  children: [
280
285
  /* @__PURE__ */ u("header", { className: "flex items-center justify-between", children: [
281
- /* @__PURE__ */ n(y, { slot: "previous", size: r }),
282
- /* @__PURE__ */ n(
283
- O,
286
+ /* @__PURE__ */ a(y, { slot: "previous", size: e }),
287
+ /* @__PURE__ */ a(
288
+ K,
284
289
  {
285
290
  className: x(
286
291
  "font-semibold text-fg-secondary",
@@ -288,18 +293,18 @@ const ce = ({ children: t }) => {
288
293
  )
289
294
  }
290
295
  ),
291
- /* @__PURE__ */ n(y, { slot: "next", size: r })
296
+ /* @__PURE__ */ a(y, { slot: "next", size: e })
292
297
  ] }),
293
298
  /* @__PURE__ */ u("div", { className: x("flex", c ? "gap-2" : "gap-3"), children: [
294
- /* @__PURE__ */ n(ie, {}),
295
- /* @__PURE__ */ n(de, { size: r, value: P(te()), children: "Today" })
299
+ /* @__PURE__ */ a(me, {}),
300
+ /* @__PURE__ */ a(ue, { size: e, value: P(re()), children: "Today" })
296
301
  ] }),
297
- /* @__PURE__ */ n(
298
- me,
302
+ /* @__PURE__ */ a(
303
+ fe,
299
304
  {
300
- highlightedDates: t,
301
- size: r,
302
- onDateSelect: a ?? void 0
305
+ highlightedDates: r,
306
+ size: e,
307
+ onDateSelect: o ?? void 0
303
308
  }
304
309
  )
305
310
  ]
@@ -307,10 +312,10 @@ const ce = ({ children: t }) => {
307
312
  ) }) });
308
313
  };
309
314
  export {
310
- Me as Calendar,
311
- ce as CalendarContextProvider,
312
- me as CalendarDayGrid,
315
+ Be as Calendar,
316
+ de as CalendarContextProvider,
317
+ fe as CalendarDayGrid,
313
318
  H as CalendarGridSelectContext,
314
- we as CalendarMonthYearHeader,
315
- ke as ControlledCalendarContextProvider
319
+ _e as CalendarMonthYearHeader,
320
+ Me as ControlledCalendarContextProvider
316
321
  };
@@ -1 +1 @@
1
- {"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../../src/applications/date-picker/cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAMzD,OAAO,KAAK,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAQxF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D,gDAAgD;IAChD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uCAAuC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,sEAAsE;IACtE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,kIAAkI;IAClI,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CAC1C;AAED,eAAO,MAAM,YAAY,GAAI,uDAM1B,iBAAiB,4CA8HnB,CAAC"}
1
+ {"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../../src/applications/date-picker/cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAMzD,OAAO,KAAK,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAQxF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D,gDAAgD;IAChD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uCAAuC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,sEAAsE;IACtE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,kIAAkI;IAClI,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;CAC1C;AAED,eAAO,MAAM,YAAY,GAAI,uDAM1B,iBAAiB,4CAyInB,CAAC"}