@prokodo/ui 0.0.24 → 0.0.26

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 (63) hide show
  1. package/dist/components/accordion/Accordion.js +65 -65
  2. package/dist/components/animated/Animated.js +17 -17
  3. package/dist/components/animatedText/AnimatedText.js +4 -4
  4. package/dist/components/avatar/Avatar.js +34 -34
  5. package/dist/components/base-link/BaseLink.js +12 -12
  6. package/dist/components/button/Button.js +48 -48
  7. package/dist/components/calendly/Calendly.js +32 -32
  8. package/dist/components/card/Card.js +107 -107
  9. package/dist/components/carousel/Carousel.js +106 -106
  10. package/dist/components/chip/Chip.js +26 -26
  11. package/dist/components/datePicker/DatePicker.js +37 -37
  12. package/dist/components/dialog/Dialog.js +82 -82
  13. package/dist/components/drawer/Drawer.js +48 -48
  14. package/dist/components/form/Form.js +94 -94
  15. package/dist/components/form/FormField.js +41 -41
  16. package/dist/components/form/FormResponse.js +22 -22
  17. package/dist/components/grid/Grid.js +8 -8
  18. package/dist/components/grid/GridRow.js +10 -10
  19. package/dist/components/headline/Headline.js +28 -28
  20. package/dist/components/icon/Icon.js +4 -4
  21. package/dist/components/image/Image.js +15 -15
  22. package/dist/components/image-text/ImageText.js +48 -48
  23. package/dist/components/input/Input.js +121 -121
  24. package/dist/components/inputOTP/InputOTP.js +24 -24
  25. package/dist/components/label/Label.js +26 -26
  26. package/dist/components/link/Link.js +27 -27
  27. package/dist/components/list/List.js +75 -75
  28. package/dist/components/loading/Loading.js +17 -17
  29. package/dist/components/lottie/Lottie.js +23 -23
  30. package/dist/components/map/Map.js +19 -19
  31. package/dist/components/post-item/PostItem.js +73 -73
  32. package/dist/components/post-item/PostItemAuthor.js +16 -16
  33. package/dist/components/post-item/index.js +4 -2
  34. package/dist/components/post-teaser/PostTeaser.js +76 -76
  35. package/dist/components/post-widget/PostWidget.js +63 -63
  36. package/dist/components/post-widget-carousel/PostWidgetCarousel.js +67 -67
  37. package/dist/components/quote/Quote.js +40 -40
  38. package/dist/components/rich-text/RichText.js +76 -76
  39. package/dist/components/select/Select.js +92 -92
  40. package/dist/components/skeleton/Skeleton.js +8 -8
  41. package/dist/components/slider/Slider.js +50 -50
  42. package/dist/components/stepper/Stepper.js +41 -41
  43. package/dist/components/switch/Switch.js +32 -32
  44. package/dist/components/table/Table.js +31 -31
  45. package/dist/components/teaser/Teaser.js +55 -55
  46. package/dist/constants/project.js +1 -1
  47. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Option/Option.js +23 -23
  48. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Portal/Portal.js +22 -22
  49. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Select/Select.js +46 -46
  50. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Slider/Slider.js +141 -141
  51. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Switch/Switch.js +33 -33
  52. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/Unstable_Popup/Popup.js +31 -31
  53. package/dist/node_modules/.pnpm/@mui_base@5.0.0-beta.58_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@mui/base/useSelect/SelectProvider.js +14 -14
  54. package/dist/tsconfig.build.tsbuildinfo +1 -1
  55. package/dist/types/components/post-item/index.d.ts +1 -0
  56. package/package.json +7 -3
  57. package/dist/_virtual/jsx-runtime.js +0 -5
  58. package/dist/_virtual/jsx-runtime2.js +0 -4
  59. package/dist/_virtual/react-jsx-runtime.development.js +0 -4
  60. package/dist/_virtual/react-jsx-runtime.production.js +0 -4
  61. package/dist/node_modules/.pnpm/react@19.1.0/node_modules/react/cjs/react-jsx-runtime.development.js +0 -247
  62. package/dist/node_modules/.pnpm/react@19.1.0/node_modules/react/cjs/react-jsx-runtime.production.js +0 -35
  63. package/dist/node_modules/.pnpm/react@19.1.0/node_modules/react/jsx-runtime.js +0 -10
@@ -1,180 +1,180 @@
1
- import { j as i } from "../../_virtual/jsx-runtime.js";
2
- import { useRef as x, useState as f, Children as ae, useEffect as P, useCallback as b, useImperativeHandle as le } from "react";
3
- import { create as ne } from "../../helpers/bem.js";
4
- import ce from "./Carousel.module.scss.js";
5
- import { NEXT as p, PREV as R, handleTouchStart as de, handleTouchMove as oe, handleTouchEnd as fe, handleMouseUp as me, handleMouseDown as ue } from "./Carousel.services.js";
6
- import { Lottie as xe } from "../lottie/Lottie.js";
7
- import { Button as J } from "../button/Button.js";
8
- const l = ne(ce, "Carousel"), be = ({
9
- ref: L,
1
+ import { jsx as l, jsxs as J } from "react/jsx-runtime";
2
+ import { useRef as b, useState as f, Children as le, useEffect as X, useCallback as v, useImperativeHandle as ne } from "react";
3
+ import { create as ce } from "../../helpers/bem.js";
4
+ import de from "./Carousel.module.scss.js";
5
+ import { NEXT as N, PREV as R, handleTouchStart as oe, handleTouchMove as fe, handleTouchEnd as me, handleMouseUp as ue, handleMouseDown as be } from "./Carousel.services.js";
6
+ import { Lottie as ve } from "../lottie/Lottie.js";
7
+ import { Button as L } from "../button/Button.js";
8
+ const a = ce(de, "Carousel"), Ie = ({
9
+ ref: O,
10
10
  autoplay: m,
11
- enableControl: X,
12
- itemsToShow: s = 1,
13
- className: O,
14
- classNameControls: Q,
15
- classNameButtons: y,
16
- classNameWrapper: W,
17
- classNameItem: Y,
18
- classNameDots: V,
19
- classNameDot: h,
20
- onKeyDown: j,
21
- onMouseEnter: v,
22
- onMouseLeave: I,
23
- onTouchEnd: N,
24
- onTouchMove: C,
25
- onTouchStart: g,
26
- onMouseDown: k,
27
- onMouseUp: A,
28
- children: Z,
29
- ...K
11
+ enableControl: y,
12
+ itemsToShow: r = 1,
13
+ className: Q,
14
+ classNameControls: W,
15
+ classNameButtons: V,
16
+ classNameWrapper: Y,
17
+ classNameItem: Z,
18
+ classNameDots: h,
19
+ classNameDot: B,
20
+ onKeyDown: x,
21
+ onMouseEnter: I,
22
+ onMouseLeave: p,
23
+ onTouchEnd: C,
24
+ onTouchMove: g,
25
+ onTouchStart: k,
26
+ onMouseDown: A,
27
+ onMouseUp: _,
28
+ children: K,
29
+ ...U
30
30
  }) => {
31
- const B = x(null), E = x(0), $ = x(0), z = x(0), U = x(0), [w, D] = f(!0), [c, d] = f(s), [M, H] = f(!1), [q, F] = f(!!m), [u, n] = f(!1), o = ae.toArray(Z), [G, T] = f([]), r = o.length;
32
- P(() => {
31
+ const $ = b(null), E = b(0), j = b(0), z = b(0), w = b(0), [D, M] = f(!0), [c, d] = f(r), [T, H] = f(!1), [q, F] = f(!!m), [u, n] = f(!1), o = le.toArray(K), [G, S] = f([]), s = o.length;
32
+ X(() => {
33
33
  const e = [
34
- ...o.slice(-s),
34
+ ...o.slice(-r),
35
35
  ...o,
36
- ...o.slice(0, s)
36
+ ...o.slice(0, r)
37
37
  ];
38
- e !== G && (T(e), d(s));
39
- }, [s]), P(() => {
38
+ e !== G && (S(e), d(r));
39
+ }, [r]), X(() => {
40
40
  const e = setTimeout(() => {
41
- D(!1);
41
+ M(!1);
42
42
  }, 1500);
43
43
  return () => clearTimeout(e);
44
44
  }, []);
45
- const a = b(
45
+ const i = v(
46
46
  (e) => {
47
47
  if (u) return;
48
48
  n(!0);
49
49
  let t = c;
50
- e === p ? t = c + 1 : e === R && (t = c - 1), d(t), setTimeout(() => {
51
- t >= r + s ? (d(s), n(!1)) : (t < s && d(r), n(!1));
50
+ e === N ? t = c + 1 : e === R && (t = c - 1), d(t), setTimeout(() => {
51
+ t >= s + r ? (d(r), n(!1)) : (t < r && d(s), n(!1));
52
52
  }, 300);
53
53
  },
54
- [u, c, s, r]
54
+ [u, c, r, s]
55
55
  );
56
- P(() => {
56
+ X(() => {
57
57
  if (typeof m != "number" || m <= 0) return;
58
58
  let e;
59
59
  return q && (e = setInterval(() => {
60
- a(p);
60
+ i(N);
61
61
  }, m)), () => {
62
62
  clearInterval(e);
63
63
  };
64
- }, [a, q, m]);
65
- const _ = b(
64
+ }, [i, q, m]);
65
+ const P = v(
66
66
  (e) => {
67
67
  if (u) return;
68
68
  n(!0);
69
- const t = e + s;
69
+ const t = e + r;
70
70
  d(t), setTimeout(() => {
71
- t >= r + s ? (d(t - r), n(!1)) : (t < s && d(r + t), n(!1));
71
+ t >= s + r ? (d(t - s), n(!1)) : (t < r && d(s + t), n(!1));
72
72
  }, 300);
73
73
  },
74
- [u, s, r]
74
+ [u, r, s]
75
75
  );
76
- le(L, () => ({
77
- slidePrev: () => a(R),
78
- slideNext: () => a(p),
79
- carouselContainer: B.current
76
+ ne(O, () => ({
77
+ slidePrev: () => i(R),
78
+ slideNext: () => i(N),
79
+ carouselContainer: $.current
80
80
  }));
81
- const S = b(
81
+ const ee = v(
82
82
  (e) => {
83
- v == null || v(e), F(!1);
83
+ I == null || I(e), F(!1);
84
84
  },
85
- [v]
86
- ), ee = b(
85
+ [I]
86
+ ), te = v(
87
87
  (e) => {
88
- I == null || I(e), F(!0);
88
+ p == null || p(e), F(!0);
89
89
  },
90
- [I]
91
- ), te = () => `translateX(${-c * (100 / s)}%)`, se = b(
92
- () => r > 0 && /* @__PURE__ */ i.jsx("span", { className: l("dots", void 0, V), children: o.map((e, t) => {
93
- const re = t === (c - s + r) % r;
94
- return /* @__PURE__ */ i.jsx(
90
+ [p]
91
+ ), re = () => `translateX(${-c * (100 / r)}%)`, se = v(
92
+ () => s > 0 && /* @__PURE__ */ l("span", { className: a("dots", void 0, h), children: o.map((e, t) => {
93
+ const ie = t === (c - r + s) % s;
94
+ return /* @__PURE__ */ l(
95
95
  "button",
96
96
  {
97
97
  tabIndex: 0,
98
- className: l(
98
+ className: a(
99
99
  "dots__dot",
100
100
  {
101
- "is-active": re
101
+ "is-active": ie
102
102
  },
103
- h
103
+ B
104
104
  ),
105
- onClick: () => _(t),
106
- onKeyDown: (ie) => ie.key === "Enter" && _(t)
105
+ onClick: () => P(t),
106
+ onKeyDown: (ae) => ae.key === "Enter" && P(t)
107
107
  },
108
108
  `carousel-dot-${t}`
109
109
  );
110
110
  }) }),
111
111
  [
112
- r,
112
+ s,
113
113
  o,
114
114
  c,
115
- V,
116
115
  h,
117
- s,
118
- _
116
+ B,
117
+ r,
118
+ P
119
119
  ]
120
120
  );
121
- return r === 0 ? null : /* @__PURE__ */ i.jsxs(
121
+ return s === 0 ? null : /* @__PURE__ */ J(
122
122
  "div",
123
123
  {
124
124
  "aria-label": "Carousel",
125
125
  role: "button",
126
126
  tabIndex: 0,
127
- ...K,
128
- ref: B,
129
- className: l(
127
+ ...U,
128
+ ref: $,
129
+ className: a(
130
130
  void 0,
131
131
  {
132
- "is-active": M
132
+ "is-active": T
133
133
  },
134
- O
134
+ Q
135
135
  ),
136
- onMouseEnter: S,
137
- onMouseLeave: ee,
136
+ onMouseEnter: ee,
137
+ onMouseLeave: te,
138
138
  onKeyDown: (e) => {
139
- switch (j == null || j(e), e.key) {
139
+ switch (x == null || x(e), e.key) {
140
140
  case "ArrowLeft":
141
- a("NEXT");
141
+ i("NEXT");
142
142
  break;
143
143
  case "ArrowRight":
144
- a("PREV");
144
+ i("PREV");
145
145
  break;
146
146
  }
147
147
  },
148
148
  onMouseDown: (e) => {
149
- k == null || k(e), ue(e, z), H(!0);
149
+ A == null || A(e), be(e, z), H(!0);
150
150
  },
151
151
  onMouseUp: (e) => {
152
- A == null || A(e), me(e, z, U, a), H(!1);
152
+ _ == null || _(e), ue(e, z, w, i), H(!1);
153
153
  },
154
154
  onTouchEnd: (e) => {
155
- N == null || N(e), fe(E, $, a);
155
+ C == null || C(e), me(E, j, i);
156
156
  },
157
157
  onTouchMove: (e) => {
158
- C == null || C(e), oe(e, $);
158
+ g == null || g(e), fe(e, j);
159
159
  },
160
160
  onTouchStart: (e) => {
161
- g == null || g(e), de(e, E);
161
+ k == null || k(e), oe(e, E);
162
162
  },
163
163
  children: [
164
- /* @__PURE__ */ i.jsx(
164
+ /* @__PURE__ */ l(
165
165
  "div",
166
166
  {
167
- className: l("wrapper", void 0, W),
167
+ className: a("wrapper", void 0, Y),
168
168
  style: {
169
- transform: te(),
169
+ transform: re(),
170
170
  transition: u ? "transform 0.3s ease-in-out" : "none"
171
171
  },
172
- children: G.map((e, t) => /* @__PURE__ */ i.jsx(
172
+ children: G.map((e, t) => /* @__PURE__ */ l(
173
173
  "div",
174
174
  {
175
- className: l("item", void 0, Y),
175
+ className: a("item", void 0, Z),
176
176
  style: {
177
- width: `${100 / s}%`
177
+ width: `${100 / r}%`
178
178
  },
179
179
  children: e
180
180
  },
@@ -182,43 +182,43 @@ const l = ne(ce, "Carousel"), be = ({
182
182
  ))
183
183
  }
184
184
  ),
185
- /* @__PURE__ */ i.jsx(
185
+ /* @__PURE__ */ l(
186
186
  "div",
187
187
  {
188
- className: l("mobile__tutorial", {
189
- "is-hidden": !w
188
+ className: a("mobile__tutorial", {
189
+ "is-hidden": !D
190
190
  }),
191
- children: /* @__PURE__ */ i.jsx("div", { className: l("mobile__tutorial__animation"), children: /* @__PURE__ */ i.jsx(xe, { animationName: "Swipe" }) })
191
+ children: /* @__PURE__ */ l("div", { className: a("mobile__tutorial__animation"), children: /* @__PURE__ */ l(ve, { animationName: "Swipe" }) })
192
192
  }
193
193
  ),
194
- /* @__PURE__ */ i.jsxs("footer", { className: l("controls", void 0, Q), children: [
195
- !!X && /* @__PURE__ */ i.jsx(
196
- J,
194
+ /* @__PURE__ */ J("footer", { className: a("controls", void 0, W), children: [
195
+ !!y && /* @__PURE__ */ l(
196
+ L,
197
197
  {
198
198
  "aria-label": "Swipe one slide backwards",
199
- className: l("button", void 0, y),
199
+ className: a("button", void 0, V),
200
200
  variant: "outlined",
201
201
  iconProps: {
202
202
  name: "ArrowLeft01Icon",
203
203
  size: "md",
204
204
  color: "white"
205
205
  },
206
- onClick: () => a(R)
206
+ onClick: () => i(R)
207
207
  }
208
208
  ),
209
209
  se(),
210
- !!X && /* @__PURE__ */ i.jsx(
211
- J,
210
+ !!y && /* @__PURE__ */ l(
211
+ L,
212
212
  {
213
213
  "aria-label": "Swipe one slide forwards",
214
- className: l("button", void 0, y),
214
+ className: a("button", void 0, V),
215
215
  variant: "outlined",
216
216
  iconProps: {
217
217
  name: "ArrowRight01Icon",
218
218
  size: "md",
219
219
  color: "white"
220
220
  },
221
- onClick: () => a(p)
221
+ onClick: () => i(N)
222
222
  }
223
223
  )
224
224
  ] })
@@ -226,7 +226,7 @@ const l = ne(ce, "Carousel"), be = ({
226
226
  }
227
227
  );
228
228
  };
229
- be.displayName = "Carousel";
229
+ Ie.displayName = "Carousel";
230
230
  export {
231
- be as Carousel
231
+ Ie as Carousel
232
232
  };
@@ -1,50 +1,50 @@
1
- import { j as i } from "../../_virtual/jsx-runtime.js";
2
- import { memo as f, useCallback as h } from "react";
3
- import { create as u } from "../../helpers/bem.js";
4
- import x from "./Chip.module.scss.js";
5
- const m = u(x, "Chip"), j = f(
1
+ import { jsxs as f, jsx as d } from "react/jsx-runtime";
2
+ import { memo as h, useCallback as u } from "react";
3
+ import { create as v } from "../../helpers/bem.js";
4
+ import n from "./Chip.module.scss.js";
5
+ const s = v(n, "Chip"), x = h(
6
6
  ({
7
- label: r,
7
+ label: i,
8
8
  icon: o,
9
- variant: p = "filled",
10
- color: l = "primary",
9
+ variant: l = "filled",
10
+ color: m = "primary",
11
11
  className: c,
12
- onDelete: d,
13
- onClick: s,
12
+ onDelete: p,
13
+ onClick: a,
14
14
  onKeyDown: e
15
15
  }) => {
16
- const b = h(
16
+ const b = u(
17
17
  (t) => {
18
18
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), e == null || e(t));
19
19
  },
20
20
  [e]
21
- ), a = !!s;
21
+ ), r = !!a;
22
22
  return (
23
23
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
24
- /* @__PURE__ */ i.jsxs(
24
+ /* @__PURE__ */ f(
25
25
  "div",
26
26
  {
27
- "aria-label": typeof r == "string" ? r : void 0,
28
- role: a ? "button" : void 0,
29
- tabIndex: a ? 0 : -1,
30
- className: m(
27
+ "aria-label": typeof i == "string" ? i : void 0,
28
+ role: r ? "button" : void 0,
29
+ tabIndex: r ? 0 : -1,
30
+ className: s(
31
31
  void 0,
32
- { [p]: !!p, [l]: !!l },
32
+ { [l]: !!l, [m]: !!m },
33
33
  c
34
34
  ),
35
- onClick: (t) => a && (s == null ? void 0 : s(t)),
36
- onKeyDown: a || e ? b : void 0,
35
+ onClick: (t) => r && (a == null ? void 0 : a(t)),
36
+ onKeyDown: r || e ? b : void 0,
37
37
  children: [
38
38
  o,
39
- /* @__PURE__ */ i.jsx("span", { className: m("label"), children: r }),
40
- d && /* @__PURE__ */ i.jsx(
39
+ /* @__PURE__ */ d("span", { className: s("label"), children: i }),
40
+ p && /* @__PURE__ */ d(
41
41
  "button",
42
42
  {
43
43
  "aria-label": "delete",
44
- className: m("delete"),
44
+ className: s("delete"),
45
45
  type: "button",
46
46
  onClick: (t) => {
47
- t.stopPropagation(), d(t);
47
+ t.stopPropagation(), p(t);
48
48
  },
49
49
  children: "× "
50
50
  }
@@ -55,7 +55,7 @@ const m = u(x, "Chip"), j = f(
55
55
  );
56
56
  }
57
57
  );
58
- j.displayName = "Chip";
58
+ x.displayName = "Chip";
59
59
  export {
60
- j as Chip
60
+ x as Chip
61
61
  };
@@ -1,10 +1,10 @@
1
- import { j as G } from "../../_virtual/jsx-runtime.js";
2
- import y, { isDayjs as w } from "dayjs";
1
+ import { jsx as G } from "react/jsx-runtime";
2
+ import y, { isDayjs as E } from "dayjs";
3
3
  import { useRef as H, useState as I, useEffect as J } from "react";
4
4
  import { Input as K } from "../input/Input.js";
5
5
  const L = ({
6
6
  name: D,
7
- value: v,
7
+ value: s,
8
8
  // Dayjs | null from parent
9
9
  onChange: f,
10
10
  // (value: Dayjs | null) => void
@@ -13,60 +13,60 @@ const L = ({
13
13
  label: S,
14
14
  errorText: k,
15
15
  helperText: P,
16
- format: i = "YYYY-MM-DD",
16
+ format: b = "YYYY-MM-DD",
17
17
  minDate: $,
18
18
  maxDate: A,
19
- errorTranslations: t,
19
+ errorTranslations: c,
20
20
  ...B
21
21
  }) => {
22
- const N = H(null), M = (c) => {
23
- if (!c) return null;
24
- if (w(c)) return c;
25
- const s = y(c);
26
- return s.isValid() ? s : null;
27
- }, x = M($), Y = M(A), [R, p] = I(null), [q, m] = I(k);
22
+ const N = H(null), i = (t) => {
23
+ if (!t) return null;
24
+ if (E(t)) return t;
25
+ const v = y(t);
26
+ return v.isValid() ? v : null;
27
+ }, Y = i($), x = i(A), [R, p] = I(null), [q, m] = I(k);
28
28
  J(() => {
29
- if (!v) {
29
+ if (!s) {
30
30
  p(null), m(void 0), u == null || u(D, void 0);
31
31
  return;
32
32
  }
33
- if (w(v))
34
- p(v), m(void 0), u == null || u(D, void 0);
33
+ if (E(s))
34
+ p(s), m(void 0), u == null || u(D, void 0);
35
35
  else {
36
- const c = M(v);
37
- if (c)
38
- p(c), m(void 0), u == null || u(D, void 0);
36
+ const t = i(s);
37
+ if (t)
38
+ p(t), m(void 0), u == null || u(D, void 0);
39
39
  else {
40
- const s = "Invalid initial date.";
41
- p(null), m(s), u == null || u(D, s);
40
+ const v = "Invalid initial date.";
41
+ p(null), m(v), u == null || u(D, v);
42
42
  }
43
43
  }
44
- }, [v]);
45
- const z = (c) => {
46
- if (x && c.isBefore(x, "day"))
47
- return x.isSame(y(), "day") ? (t == null ? void 0 : t.minDate) ?? "Date cannot be in the past." : (t == null ? void 0 : t.minDate) ?? `Date cannot be before ${x.format(i)}.`;
48
- if (Y && c.isAfter(Y, "day"))
49
- return Y.isSame(y(), "day") ? (t == null ? void 0 : t.maxDate) ?? "Date cannot be in the future." : (t == null ? void 0 : t.maxDate) ?? `Date cannot be after ${Y.format(i)}.`;
50
- }, F = (c) => {
51
- const s = c.target.value.trim();
52
- if (!s) {
44
+ }, [s]);
45
+ const z = (t) => {
46
+ if (Y && t.isBefore(Y, "day"))
47
+ return Y.isSame(y(), "day") ? (c == null ? void 0 : c.minDate) ?? "Date cannot be in the past." : (c == null ? void 0 : c.minDate) ?? `Date cannot be before ${Y.format(b)}.`;
48
+ if (x && t.isAfter(x, "day"))
49
+ return x.isSame(y(), "day") ? (c == null ? void 0 : c.maxDate) ?? "Date cannot be in the future." : (c == null ? void 0 : c.maxDate) ?? `Date cannot be after ${x.format(b)}.`;
50
+ }, F = (t) => {
51
+ const v = t.target.value.trim();
52
+ if (!v) {
53
53
  p(null), m(void 0), u == null || u(D, void 0), f == null || f(null);
54
54
  return;
55
55
  }
56
- const j = y(s, i, !0);
57
- if (!j.isValid()) {
58
- const E = "Invalid date format.";
59
- p(null), m(E), u == null || u(D, E), f == null || f(null);
56
+ const M = y(v, b, !0);
57
+ if (!M.isValid()) {
58
+ const w = "Invalid date format.";
59
+ p(null), m(w), u == null || u(D, w), f == null || f(null);
60
60
  return;
61
61
  }
62
- const b = z(j);
63
- if (b !== void 0) {
64
- p(null), m(b), u == null || u(D, b), f == null || f(null);
62
+ const j = z(M);
63
+ if (j !== void 0) {
64
+ p(null), m(j), u == null || u(D, j), f == null || f(null);
65
65
  return;
66
66
  }
67
- p(j), m(void 0), u == null || u(D, void 0), f == null || f(j);
67
+ p(M), m(void 0), u == null || u(D, void 0), f == null || f(M);
68
68
  };
69
- return /* @__PURE__ */ G.jsx(
69
+ return /* @__PURE__ */ G(
70
70
  K,
71
71
  {
72
72
  ...B,