@memobit/libs 3.8.3 → 3.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 (33) hide show
  1. package/README.md +96 -95
  2. package/dist/components/Confetti/Confetti2.js +26 -25
  3. package/dist/components/ErrorBoundary/ErrorBoundary2.js +9 -8
  4. package/dist/components/Icon/Icon2.js +34 -17
  5. package/dist/components/IconPicker/IconPicker2.js +43 -29
  6. package/dist/components/InputDate/InputDate2.js +16 -15
  7. package/dist/components/InputEmail/InputEmail2.js +22 -21
  8. package/dist/components/InputFile/InputFile2.js +9 -8
  9. package/dist/components/InputNumber/InputNumber2.js +7 -6
  10. package/dist/components/InputPassword/InputPassword2.js +6 -5
  11. package/dist/components/InputSearch/InputSearch2.js +18 -17
  12. package/dist/components/InputText/InputText2.js +6 -5
  13. package/dist/components/InputTextarea/InputTextarea2.js +11 -10
  14. package/dist/components/InputTime/InputTime2.js +35 -34
  15. package/dist/components/InputUrl/InputUrl2.js +20 -19
  16. package/dist/components/QuantitySelector/QuantitySelector2.js +19 -18
  17. package/dist/errors.d.ts +78 -0
  18. package/dist/errors.js +9 -0
  19. package/dist/helpers/ErrorReporting.js +179 -0
  20. package/dist/helpers/Logger.js +31 -0
  21. package/dist/helpers/VersionInfo.js +1 -1
  22. package/dist/index.d.ts +3 -3
  23. package/dist/memobit-icons.json +1 -41
  24. package/dist/styles/base.scss +36 -36
  25. package/dist/styles/effects.scss +72 -72
  26. package/dist/styles/highlight.scss +6 -6
  27. package/dist/styles/scrollbars.scss +30 -30
  28. package/dist/styles/utilities.scss +238 -238
  29. package/dist/styles/utility-classes.scss +93 -93
  30. package/dist/styles/variables.scss +73 -73
  31. package/dist/version.js +2 -2
  32. package/dist/version.json +4 -4
  33. package/package.json +148 -142
@@ -2,27 +2,27 @@ import './InputEmail.css';
2
2
  /* empty css */
3
3
  import { forwardRef as F, useEffect as G, useState as N } from "react";
4
4
  import { jsx as n, jsxs as b } from "react/jsx-runtime";
5
- var L = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, M = (r) => !r || r.trim() === "" ? !0 : L.test(r.trim()), k = F(({ autoComplete: r = "on", autoFocus: A, disabled: I, error: $ = "Please enter a valid email address", highlighted: v, id: o, label: p, maxLength: x, onBlur: z, onChange: Z, onClick: j, onKeyDown: B, onKeyUp: C, onValidate: s, placeholder: R, readOnly: T = !1, required: a = !1, showValidation: h = !1, success: m, validateOn: i = "blur", value: l }, _) => {
6
- const [f, u] = N(!0), [d, g] = N(!1), c = (e) => a && (!e || e.trim() === "") ? !1 : !e || e.trim() === "" ? !0 : M(e);
5
+ var L = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, M = (r) => !r || r.trim() === "" ? !0 : L.test(r.trim()), P = F(({ autoComplete: r = "on", autoFocus: I, disabled: A, error: $ = "Please enter a valid email address", highlighted: v, id: o, label: p, maxLength: x, onBlur: z, onChange: Z, onClick: j, onKeyDown: y, onKeyUp: B, onValidate: a, placeholder: C, readOnly: R = !1, required: s = !1, showValidation: h = !1, success: m, validateOn: i = "blur", value: l }, T) => {
6
+ const [f, u] = N(!0), [d, g] = N(!1), c = (e) => s && (!e || e.trim() === "") ? !1 : !e || e.trim() === "" ? !0 : M(e);
7
7
  G(() => {
8
8
  if (l !== void 0) {
9
9
  const e = c(l);
10
- u(e), s?.(e);
10
+ u(e), a?.(e);
11
11
  }
12
12
  }, [
13
13
  l,
14
- s,
15
- a
14
+ a,
15
+ s
16
16
  ]);
17
- const w = (e) => {
17
+ const _ = (e) => {
18
18
  if (Z?.(e), i === "change" || i === "both") {
19
19
  const t = c(e);
20
- u(t), g(!0), s?.(t);
20
+ u(t), g(!0), a?.(t);
21
21
  }
22
- }, y = (e) => {
22
+ }, w = (e) => {
23
23
  if (g(!0), i === "blur" || i === "both") {
24
24
  const t = c(e.target.value);
25
- u(t), s?.(t);
25
+ u(t), a?.(t);
26
26
  }
27
27
  z?.(e);
28
28
  }, E = h && d && !f;
@@ -32,29 +32,29 @@ var L = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, M = (r) => !r || r.t
32
32
  p && /* @__PURE__ */ b("label", {
33
33
  htmlFor: o,
34
34
  className: "input-email-label",
35
- children: [p, a && /* @__PURE__ */ n("span", {
35
+ children: [p, s && /* @__PURE__ */ n("span", {
36
36
  className: "input-email-required",
37
37
  children: "*"
38
38
  })]
39
39
  }),
40
40
  /* @__PURE__ */ n("input", {
41
41
  autoComplete: r,
42
- autoFocus: A,
43
- disabled: I,
42
+ autoFocus: I,
43
+ disabled: A,
44
44
  type: "email",
45
45
  className: `input-email${E ? " input-email--error" : ""}${m ? " input-email-success" : f && d && h ? " input-email--valid" : ""}`,
46
46
  id: o,
47
47
  maxLength: x,
48
- placeholder: R,
49
- ref: _,
48
+ placeholder: C,
49
+ ref: T,
50
50
  value: l,
51
- onBlur: y,
52
- onChange: (e) => w(e.target.value),
51
+ onBlur: w,
52
+ onChange: (e) => _(e.target.value),
53
53
  onClick: j,
54
- onKeyDown: B,
55
- onKeyUp: C,
56
- readOnly: T,
57
- required: a
54
+ onKeyDown: y,
55
+ onKeyUp: B,
56
+ readOnly: R,
57
+ required: s
58
58
  }),
59
59
  E && /* @__PURE__ */ n("span", {
60
60
  className: "input-email-error-message",
@@ -67,7 +67,8 @@ var L = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, M = (r) => !r || r.t
67
67
  ]
68
68
  });
69
69
  });
70
+ P.displayName = "InputEmail";
70
71
  export {
71
- k as InputEmail,
72
+ P as InputEmail,
72
73
  M as validateEmail
73
74
  };
@@ -1,8 +1,8 @@
1
1
  import './InputFile.css';
2
2
  /* empty css */
3
- import { forwardRef as N } from "react";
3
+ import { forwardRef as g } from "react";
4
4
  import { jsx as e, jsxs as n } from "react/jsx-runtime";
5
- var v = N(({ accept: r, disabled: p, error: i, highlighted: t, id: a, label: s, onChange: f, onClick: m, onKeyDown: u, placeholder: c, required: h, success: l, value: o }, d) => /* @__PURE__ */ n("div", {
5
+ var x = g(({ accept: p, disabled: r, error: i, highlighted: t, id: a, label: s, onChange: f, onClick: m, onKeyDown: u, placeholder: c, required: h, success: l, value: d }, o) => /* @__PURE__ */ n("div", {
6
6
  className: `input-file-wrapper${t ? " input-file-highlighted" : ""}`,
7
7
  children: [
8
8
  s && /* @__PURE__ */ n("label", {
@@ -14,15 +14,15 @@ var v = N(({ accept: r, disabled: p, error: i, highlighted: t, id: a, label: s,
14
14
  })]
15
15
  }),
16
16
  /* @__PURE__ */ e("input", {
17
- accept: r,
18
- disabled: p,
17
+ accept: p,
18
+ disabled: r,
19
19
  type: "file",
20
20
  className: `input-file${i ? " input-file-error" : ""}${l ? " input-file-success" : ""}`,
21
21
  id: a,
22
22
  placeholder: c,
23
- ref: d,
24
- value: o,
25
- onChange: (g) => f?.(g.target.files),
23
+ ref: o,
24
+ value: d,
25
+ onChange: (N) => f?.(N.target.files),
26
26
  onClick: m,
27
27
  onKeyDown: u
28
28
  }),
@@ -36,6 +36,7 @@ var v = N(({ accept: r, disabled: p, error: i, highlighted: t, id: a, label: s,
36
36
  })
37
37
  ]
38
38
  }));
39
+ x.displayName = "InputFile";
39
40
  export {
40
- v as InputFile
41
+ x as InputFile
41
42
  };
@@ -2,7 +2,7 @@ import './InputNumber.css';
2
2
  /* empty css */
3
3
  import { forwardRef as V } from "react";
4
4
  import { jsx as i, jsxs as o } from "react/jsx-runtime";
5
- var E = V(({ autoComplete: c = "on", autoFocus: d, disabled: b, error: a, hideNativeControls: h, highlighted: f, id: p, label: s, onChange: m, onClick: v, onKeyDown: N, required: g, success: l, value: n, min: u, max: t, placeholder: y, step: $ }, w) => {
5
+ var j = V(({ autoComplete: d = "on", autoFocus: c, disabled: b, error: a, hideNativeControls: h, highlighted: f, id: p, label: s, onChange: m, onClick: N, onKeyDown: v, required: g, success: l, value: n, min: u, max: t, placeholder: y, step: $ }, w) => {
6
6
  const B = (e) => {
7
7
  if (e === void 0) return;
8
8
  let r = e;
@@ -20,8 +20,8 @@ var E = V(({ autoComplete: c = "on", autoFocus: d, disabled: b, error: a, hideNa
20
20
  })]
21
21
  }),
22
22
  /* @__PURE__ */ i("input", {
23
- autoComplete: c,
24
- autoFocus: d,
23
+ autoComplete: d,
24
+ autoFocus: c,
25
25
  disabled: b,
26
26
  className: `input-number${a ? " input-number-error" : ""}${l ? " input-number-success" : ""}${h ? " input-number-hide-native-controls" : ""}`,
27
27
  id: p,
@@ -34,9 +34,9 @@ var E = V(({ autoComplete: c = "on", autoFocus: d, disabled: b, error: a, hideNa
34
34
  }
35
35
  },
36
36
  onChange: (e) => m?.(e.target.value ? Number(e.target.value) : void 0),
37
- onClick: v,
37
+ onClick: N,
38
38
  onKeyDown: (e) => {
39
- (e.key === "e" || e.key === "E") && e.preventDefault(), N?.(e);
39
+ (e.key === "e" || e.key === "E") && e.preventDefault(), v?.(e);
40
40
  },
41
41
  placeholder: y,
42
42
  ref: w,
@@ -55,6 +55,7 @@ var E = V(({ autoComplete: c = "on", autoFocus: d, disabled: b, error: a, hideNa
55
55
  ]
56
56
  });
57
57
  });
58
+ j.displayName = "InputNumber";
58
59
  export {
59
- E as InputNumber
60
+ j as InputNumber
60
61
  };
@@ -2,7 +2,7 @@ import './InputPassword.css';
2
2
  /* empty css */
3
3
  import { forwardRef as j } from "react";
4
4
  import { jsx as s, jsxs as o } from "react/jsx-runtime";
5
- var F = j(({ autoComplete: t = "on", autoFocus: i, disabled: d, error: a, highlighted: l, id: r, label: e, maxLength: m, onBlur: u, onChange: w, onClick: c, onKeyDown: h, onKeyUp: f, placeholder: g, readOnly: N = !1, required: n = !1, success: p, value: v }, x) => /* @__PURE__ */ o("div", {
5
+ var y = j(({ autoComplete: t = "on", autoFocus: i, disabled: d, error: a, highlighted: l, id: r, label: e, maxLength: m, onBlur: u, onChange: w, onClick: c, onKeyDown: h, onKeyUp: N, placeholder: f, readOnly: g = !1, required: n = !1, success: p, value: v }, x) => /* @__PURE__ */ o("div", {
6
6
  className: `input-password-wrapper${l ? " input-password-highlighted" : ""}`,
7
7
  children: [
8
8
  e && /* @__PURE__ */ o("label", {
@@ -21,15 +21,15 @@ var F = j(({ autoComplete: t = "on", autoFocus: i, disabled: d, error: a, highli
21
21
  className: `input-password${a ? " input-password-error" : ""}${p ? " input-password-success" : ""}`,
22
22
  id: r,
23
23
  maxLength: m,
24
- placeholder: g,
24
+ placeholder: f,
25
25
  ref: x,
26
26
  value: v,
27
27
  onBlur: u,
28
28
  onChange: ($) => w?.($.target.value),
29
29
  onClick: c,
30
30
  onKeyDown: h,
31
- onKeyUp: f,
32
- readOnly: N,
31
+ onKeyUp: N,
32
+ readOnly: g,
33
33
  required: n
34
34
  }),
35
35
  a && /* @__PURE__ */ s("span", {
@@ -42,6 +42,7 @@ var F = j(({ autoComplete: t = "on", autoFocus: i, disabled: d, error: a, highli
42
42
  })
43
43
  ]
44
44
  }));
45
+ y.displayName = "InputPassword";
45
46
  export {
46
- F as InputPassword
47
+ y as InputPassword
47
48
  };
@@ -1,22 +1,22 @@
1
1
  import './InputSearch.css';
2
- import { Icon as a } from "../Icon/Icon2.js";
3
- import { Tooltip as N } from "../Tooltip/Tooltip2.js";
4
- import { InputText as j } from "../InputText/InputText2.js";
2
+ import { Icon as c } from "../Icon/Icon2.js";
3
+ import { Tooltip as C } from "../Tooltip/Tooltip2.js";
4
+ import { InputText as S } from "../InputText/InputText2.js";
5
5
  /* empty css */
6
- import { forwardRef as w } from "react";
7
- import { jsx as r, jsxs as S } from "react/jsx-runtime";
8
- var R = w(({ autoComplete: s = "off", autoFocus: i, disabled: t, id: n, label: m, onBlur: l, onChange: o, onClick: p, onKeyDown: h, onKeyUp: f, placeholder: u = "Search...", readOnly: c = !1, required: d = !1, value: e, className: x = "" }, _) => {
9
- const C = () => {
6
+ import { forwardRef as j } from "react";
7
+ import { jsx as r, jsxs as w } from "react/jsx-runtime";
8
+ var T = j(({ autoComplete: s = "off", autoFocus: i, disabled: t, id: n, label: m, onBlur: l, onChange: o, onClick: p, onKeyDown: h, onKeyUp: f, placeholder: u = "Search...", readOnly: a = !1, required: d = !1, value: e, className: x = "" }, I) => {
9
+ const N = () => {
10
10
  o?.("");
11
- }, I = e && e.length > 0 && !t && !c;
12
- return /* @__PURE__ */ S("div", {
11
+ }, _ = e && e.length > 0 && !t && !a;
12
+ return /* @__PURE__ */ w("div", {
13
13
  className: `input-search ${x}`,
14
14
  children: [
15
15
  /* @__PURE__ */ r("div", {
16
16
  className: "input-search__icon",
17
- children: /* @__PURE__ */ r(a, { name: "search" })
17
+ children: /* @__PURE__ */ r(c, { name: "search" })
18
18
  }),
19
- /* @__PURE__ */ r(j, {
19
+ /* @__PURE__ */ r(S, {
20
20
  autoComplete: s,
21
21
  autoFocus: i,
22
22
  disabled: t,
@@ -28,18 +28,18 @@ var R = w(({ autoComplete: s = "off", autoFocus: i, disabled: t, id: n, label: m
28
28
  onKeyDown: h,
29
29
  onKeyUp: f,
30
30
  placeholder: u,
31
- readOnly: c,
31
+ readOnly: a,
32
32
  required: d,
33
33
  value: e,
34
- ref: _
34
+ ref: I
35
35
  }),
36
- I && /* @__PURE__ */ r(N, {
36
+ _ && /* @__PURE__ */ r(C, {
37
37
  title: "Clear search",
38
38
  children: /* @__PURE__ */ r("button", {
39
39
  type: "button",
40
40
  className: "input-search__clear",
41
- onClick: C,
42
- children: /* @__PURE__ */ r(a, {
41
+ onClick: N,
42
+ children: /* @__PURE__ */ r(c, {
43
43
  name: "clear",
44
44
  size: "sm"
45
45
  })
@@ -48,6 +48,7 @@ var R = w(({ autoComplete: s = "off", autoFocus: i, disabled: t, id: n, label: m
48
48
  ]
49
49
  });
50
50
  });
51
+ T.displayName = "InputSearch";
51
52
  export {
52
- R as InputSearch
53
+ T as InputSearch
53
54
  };
@@ -2,7 +2,7 @@ import './InputText.css';
2
2
  /* empty css */
3
3
  import { forwardRef as w } from "react";
4
4
  import { jsx as t, jsxs as i } from "react/jsx-runtime";
5
- var F = w(({ autoComplete: r = "on", autoFocus: l, disabled: m, error: e, highlighted: x, id: s, label: n, maxLength: u, onBlur: c, onChange: h, onClick: o, onKeyDown: d, onKeyUp: f, placeholder: g, readOnly: N = !1, required: p = !1, success: a, value: v }, $) => /* @__PURE__ */ i("div", {
5
+ var y = w(({ autoComplete: r = "on", autoFocus: l, disabled: m, error: e, highlighted: x, id: s, label: n, maxLength: u, onBlur: c, onChange: h, onClick: o, onKeyDown: d, onKeyUp: N, placeholder: f, readOnly: g = !1, required: p = !1, success: a, value: v }, $) => /* @__PURE__ */ i("div", {
6
6
  className: `input-text-wrapper${x ? " input-text-highlighted" : ""}`,
7
7
  children: [
8
8
  n && /* @__PURE__ */ i("label", {
@@ -21,15 +21,15 @@ var F = w(({ autoComplete: r = "on", autoFocus: l, disabled: m, error: e, highli
21
21
  className: `input-text ${e ? "input-text-error" : ""} ${a ? "input-text-success" : ""}`,
22
22
  id: s,
23
23
  maxLength: u,
24
- placeholder: g,
24
+ placeholder: f,
25
25
  ref: $,
26
26
  value: v,
27
27
  onBlur: c,
28
28
  onChange: (j) => h?.(j.target.value),
29
29
  onClick: o,
30
30
  onKeyDown: d,
31
- onKeyUp: f,
32
- readOnly: N,
31
+ onKeyUp: N,
32
+ readOnly: g,
33
33
  required: p
34
34
  }),
35
35
  e && /* @__PURE__ */ t("span", {
@@ -42,6 +42,7 @@ var F = w(({ autoComplete: r = "on", autoFocus: l, disabled: m, error: e, highli
42
42
  })
43
43
  ]
44
44
  }));
45
+ y.displayName = "InputText";
45
46
  export {
46
- F as InputText
47
+ y as InputText
47
48
  };
@@ -1,22 +1,22 @@
1
1
  import './InputTextarea.css';
2
2
  /* empty css */
3
- import { forwardRef as $ } from "react";
4
- import { jsx as e, jsxs as n } from "react/jsx-runtime";
5
- var F = $(({ autoComplete: p = "on", autoFocus: i, cols: l, disabled: m, error: a, id: r, label: s, maxLength: x, onBlur: u, onChange: c, onClick: o, onKeyDown: d, onKeyUp: h, placeholder: N, required: f, rows: g, success: t, value: v }, j) => /* @__PURE__ */ n("div", {
3
+ import { forwardRef as I } from "react";
4
+ import { jsx as a, jsxs as n } from "react/jsx-runtime";
5
+ var T = I(({ autoComplete: p = "on", autoFocus: i, cols: l, disabled: m, error: e, id: r, label: s, maxLength: x, onBlur: u, onChange: c, onClick: o, onKeyDown: d, onKeyUp: h, placeholder: N, required: f, rows: g, success: t, value: v }, j) => /* @__PURE__ */ n("div", {
6
6
  className: "input-textarea-wrapper",
7
7
  children: [
8
8
  s && /* @__PURE__ */ n("label", {
9
9
  htmlFor: r,
10
10
  className: "input-textarea-label",
11
- children: [s, f && /* @__PURE__ */ e("span", {
11
+ children: [s, f && /* @__PURE__ */ a("span", {
12
12
  className: "input-textarea-required",
13
13
  children: "*"
14
14
  })]
15
15
  }),
16
- /* @__PURE__ */ e("textarea", {
16
+ /* @__PURE__ */ a("textarea", {
17
17
  autoComplete: p,
18
18
  autoFocus: i,
19
- className: `input-textarea${a ? " input-textarea-error" : ""}${t ? " input-textarea-success" : ""}`,
19
+ className: `input-textarea${e ? " input-textarea-error" : ""}${t ? " input-textarea-success" : ""}`,
20
20
  cols: l,
21
21
  disabled: m,
22
22
  id: r,
@@ -31,16 +31,17 @@ var F = $(({ autoComplete: p = "on", autoFocus: i, cols: l, disabled: m, error:
31
31
  rows: g,
32
32
  value: v
33
33
  }),
34
- a && /* @__PURE__ */ e("span", {
34
+ e && /* @__PURE__ */ a("span", {
35
35
  className: "input-textarea-error-message",
36
- children: a
36
+ children: e
37
37
  }),
38
- t && /* @__PURE__ */ e("span", {
38
+ t && /* @__PURE__ */ a("span", {
39
39
  className: "input-textarea-success-message",
40
40
  children: t
41
41
  })
42
42
  ]
43
43
  }));
44
+ T.displayName = "InputTextarea";
44
45
  export {
45
- F as InputTextarea
46
+ T as InputTextarea
46
47
  };
@@ -1,85 +1,86 @@
1
1
  import './InputTime.css';
2
- import { Icon as S } from "../Icon/Icon2.js";
3
- import { Popover as T } from "../Popover/Popover2.js";
2
+ import { Icon as R } from "../Icon/Icon2.js";
3
+ import { Popover as S } from "../Popover/Popover2.js";
4
4
  import { TimePicker as j } from "../TimePicker/TimePicker2.js";
5
5
  /* empty css */
6
6
  import { forwardRef as w, useRef as y, useState as E } from "react";
7
- import { jsx as e, jsxs as m } from "react/jsx-runtime";
8
- var v = (i) => i.toString().padStart(2, "0"), O = (i) => {
7
+ import { jsx as e, jsxs as r } from "react/jsx-runtime";
8
+ var b = (i) => i.toString().padStart(2, "0"), O = (i) => {
9
9
  const [n, t] = (i ?? "").split(":").map(Number);
10
10
  return {
11
11
  hours: Number.isFinite(n) ? n : 0,
12
12
  minutes: Number.isFinite(t) ? t : 0,
13
13
  seconds: 0
14
14
  };
15
- }, H = w(({ autoFocus: i, disabled: n, error: t, highlighted: N, id: o, label: c, max: k, min: g, minuteStep: C = 1, onBlur: $, onChange: p, onClick: x, onKeyDown: F, onKeyUp: I, readOnly: u = !1, required: f = !1, success: l, value: h, withClock: a = !1 }, P) => {
16
- const [r, d] = E(!1), b = y(null), R = (s) => {
17
- p?.(`${v(s.hours)}:${v(s.minutes)}`);
15
+ }, q = w(({ autoFocus: i, disabled: n, error: t, highlighted: v, id: o, label: c, max: k, min: g, minuteStep: C = 1, onBlur: $, onChange: p, onClick: I, onKeyDown: T, onKeyUp: x, readOnly: u = !1, required: d = !1, success: a, value: f, withClock: l = !1 }, F) => {
16
+ const [m, h] = E(!1), N = y(null), P = (s) => {
17
+ p?.(`${b(s.hours)}:${b(s.minutes)}`);
18
18
  };
19
- return /* @__PURE__ */ m("div", {
20
- className: `input-time-wrapper${N ? " input-time-highlighted" : ""}`,
19
+ return /* @__PURE__ */ r("div", {
20
+ className: `input-time-wrapper${v ? " input-time-highlighted" : ""}`,
21
21
  children: [
22
- c && /* @__PURE__ */ m("label", {
22
+ c && /* @__PURE__ */ r("label", {
23
23
  htmlFor: o,
24
24
  className: "input-time-label",
25
- children: [c, f && /* @__PURE__ */ e("span", {
25
+ children: [c, d && /* @__PURE__ */ e("span", {
26
26
  className: "input-time-required",
27
27
  children: "*"
28
28
  })]
29
29
  }),
30
- /* @__PURE__ */ m("div", {
31
- ref: b,
32
- className: `input-time-field${a ? " input-time-field--with-clock" : ""}`,
30
+ /* @__PURE__ */ r("div", {
31
+ ref: N,
32
+ className: `input-time-field${l ? " input-time-field--with-clock" : ""}`,
33
33
  children: [/* @__PURE__ */ e("input", {
34
34
  autoFocus: i,
35
35
  disabled: n,
36
36
  type: "time",
37
- className: `input-time${t ? " input-time-error" : ""}${l ? " input-time-success" : ""}`,
37
+ className: `input-time${t ? " input-time-error" : ""}${a ? " input-time-success" : ""}`,
38
38
  id: o,
39
39
  max: k,
40
40
  min: g,
41
- ref: P,
42
- value: h ?? "",
41
+ ref: F,
42
+ value: f ?? "",
43
43
  onBlur: $,
44
44
  onChange: (s) => p?.(s.target.value || void 0),
45
- onClick: x,
46
- onKeyDown: F,
47
- onKeyUp: I,
45
+ onClick: I,
46
+ onKeyDown: T,
47
+ onKeyUp: x,
48
48
  readOnly: u,
49
- required: f
50
- }), a && /* @__PURE__ */ e("button", {
51
- className: `input-time-clock-button${r ? " input-time-clock-button--active" : ""}`,
49
+ required: d
50
+ }), l && /* @__PURE__ */ e("button", {
51
+ className: `input-time-clock-button${m ? " input-time-clock-button--active" : ""}`,
52
52
  disabled: n || u,
53
- onClick: () => d(!r),
53
+ onClick: () => h(!m),
54
54
  title: "Pick on a clock",
55
55
  type: "button",
56
- children: /* @__PURE__ */ e(S, { name: "time" })
56
+ children: /* @__PURE__ */ e(R, { name: "time" })
57
57
  })]
58
58
  }),
59
59
  t && /* @__PURE__ */ e("span", {
60
60
  className: "input-time-error-message",
61
61
  children: t
62
62
  }),
63
- l && /* @__PURE__ */ e("span", {
63
+ a && /* @__PURE__ */ e("span", {
64
64
  className: "input-time-success-message",
65
- children: l
65
+ children: a
66
66
  }),
67
- a && /* @__PURE__ */ e(T, {
68
- visible: r,
69
- onClose: () => d(!1),
70
- anchorEl: b.current,
67
+ l && /* @__PURE__ */ e(S, {
68
+ visible: m,
69
+ onClose: () => h(!1),
70
+ anchorEl: N.current,
71
71
  children: /* @__PURE__ */ e(j, {
72
72
  collapsibleClock: !1,
73
73
  label: "",
74
74
  minuteStep: C,
75
- onChange: R,
76
- value: O(h),
75
+ onChange: P,
76
+ value: O(f),
77
77
  withClock: !0
78
78
  })
79
79
  })
80
80
  ]
81
81
  });
82
82
  });
83
+ q.displayName = "InputTime";
83
84
  export {
84
- H as InputTime
85
+ q as InputTime
85
86
  };
@@ -1,23 +1,23 @@
1
1
  import './InputUrl.css';
2
2
  /* empty css */
3
- import { forwardRef as A, useState as B } from "react";
3
+ import { forwardRef as j, useState as A } from "react";
4
4
  import { jsx as t, jsxs as m } from "react/jsx-runtime";
5
- var F = "Please enter a valid URL (e.g. https://example.com)", I = (l) => {
5
+ var B = "Please enter a valid URL (e.g. https://example.com)", F = (l) => {
6
6
  try {
7
7
  const e = new URL(l);
8
8
  return e.protocol === "http:" || e.protocol === "https:";
9
9
  } catch {
10
10
  return !1;
11
11
  }
12
- }, G = A(({ autoFocus: l, disabled: e, error: f, highlighted: v, id: u, label: i, maxLength: g, onBlur: E, onChange: R, onClick: N, onKeyDown: U, onKeyUp: x, onValidationChange: o, placeholder: L = "https://...", readOnly: w = !1, required: p = !1, success: a, validationErrorMessage: y, value: S }, _) => {
13
- const [c, d] = B(void 0), h = (r) => {
12
+ }, b = j(({ autoFocus: l, disabled: e, error: f, highlighted: v, id: u, label: i, maxLength: g, onBlur: E, onChange: N, onClick: R, onKeyDown: U, onKeyUp: x, onValidationChange: p, placeholder: y = "https://...", readOnly: L = !1, required: o = !1, success: a, validationErrorMessage: w, value: I }, S) => {
13
+ const [c, d] = A(void 0), h = (r) => {
14
14
  if (!r)
15
- return d(void 0), o?.(!0), !0;
16
- const n = I(r);
17
- return d(n ? void 0 : y ?? F), o?.(n), n;
15
+ return d(void 0), p?.(!0), !0;
16
+ const n = F(r);
17
+ return d(n ? void 0 : w ?? B), p?.(n), n;
18
+ }, _ = (r) => {
19
+ N?.(r), c && h(r);
18
20
  }, $ = (r) => {
19
- R?.(r), c && h(r);
20
- }, j = (r) => {
21
21
  h(r.target.value), E?.(r);
22
22
  }, s = f ?? c;
23
23
  return /* @__PURE__ */ m("div", {
@@ -26,7 +26,7 @@ var F = "Please enter a valid URL (e.g. https://example.com)", I = (l) => {
26
26
  i && /* @__PURE__ */ m("label", {
27
27
  htmlFor: u,
28
28
  className: "input-url-label",
29
- children: [i, p && /* @__PURE__ */ t("span", {
29
+ children: [i, o && /* @__PURE__ */ t("span", {
30
30
  className: "input-url-required",
31
31
  children: "*"
32
32
  })]
@@ -38,16 +38,16 @@ var F = "Please enter a valid URL (e.g. https://example.com)", I = (l) => {
38
38
  className: `input-url${s ? " input-url-error" : ""}${a ? " input-url-success" : ""}`,
39
39
  id: u,
40
40
  maxLength: g,
41
- placeholder: L,
42
- ref: _,
43
- value: S,
44
- onBlur: j,
45
- onChange: (r) => $(r.target.value),
46
- onClick: N,
41
+ placeholder: y,
42
+ ref: S,
43
+ value: I,
44
+ onBlur: $,
45
+ onChange: (r) => _(r.target.value),
46
+ onClick: R,
47
47
  onKeyDown: U,
48
48
  onKeyUp: x,
49
- readOnly: w,
50
- required: p
49
+ readOnly: L,
50
+ required: o
51
51
  }),
52
52
  s && /* @__PURE__ */ t("span", {
53
53
  className: "input-url-error-message",
@@ -60,6 +60,7 @@ var F = "Please enter a valid URL (e.g. https://example.com)", I = (l) => {
60
60
  ]
61
61
  });
62
62
  });
63
+ b.displayName = "InputUrl";
63
64
  export {
64
- G as InputUrl
65
+ b as InputUrl
65
66
  };
@@ -1,20 +1,20 @@
1
1
  import './QuantitySelector.css';
2
- import { Button as h } from "../Button/Button2.js";
2
+ import { Button as q } from "../Button/Button2.js";
3
3
  import { InputNumber as I } from "../InputNumber/InputNumber2.js";
4
4
  /* empty css */
5
5
  import { forwardRef as S } from "react";
6
6
  import { jsx as s, jsxs as u } from "react/jsx-runtime";
7
- var D = S(({ disabled: n = !1, error: l, id: d, inputWidth: f, label: y, max: t, min: r = 0, onChange: i, readOnlyInput: q = !1, required: p = !1, step: o = 1, success: a, value: c }, v) => {
7
+ var $ = S(({ disabled: n = !1, error: c, id: d, inputWidth: f, label: y, max: t, min: r = 0, onChange: i, readOnlyInput: p = !1, required: h = !1, step: a = 1, success: o, value: l }, v) => {
8
8
  const N = f || (t !== void 0 ? Math.max(String(t).length, String(r).length, 3) : 3), m = () => {
9
9
  if (n) return;
10
- const e = (c ?? 0) - o;
10
+ const e = (l ?? 0) - a;
11
11
  r !== void 0 && e < r || i?.(e);
12
12
  }, b = () => {
13
13
  if (n) return;
14
- const e = (c ?? 0) + o;
14
+ const e = (l ?? 0) + a;
15
15
  t !== void 0 && e > t || i?.(e);
16
16
  }, g = (e) => {
17
- if (!q) {
17
+ if (!p) {
18
18
  if (e === void 0) {
19
19
  i?.(void 0);
20
20
  return;
@@ -36,18 +36,18 @@ var D = S(({ disabled: n = !1, error: l, id: d, inputWidth: f, label: y, max: t,
36
36
  y && /* @__PURE__ */ u("label", {
37
37
  htmlFor: d,
38
38
  className: "quantity-selector-label",
39
- children: [y, p && /* @__PURE__ */ s("span", {
39
+ children: [y, h && /* @__PURE__ */ s("span", {
40
40
  className: "quantity-selector-required",
41
41
  children: "*"
42
42
  })]
43
43
  }),
44
44
  /* @__PURE__ */ u("div", {
45
- className: `quantity-selector${q ? " quantity-selector-readonly" : ""}${l ? " quantity-selector-error" : ""}${a ? " quantity-selector-success" : ""}`,
45
+ className: `quantity-selector${p ? " quantity-selector-readonly" : ""}${c ? " quantity-selector-error" : ""}${o ? " quantity-selector-success" : ""}`,
46
46
  style: { "--digits": N },
47
47
  children: [
48
- /* @__PURE__ */ s(h, {
48
+ /* @__PURE__ */ s(q, {
49
49
  className: "quantity-selector-button quantity-selector-button-decrease",
50
- disabled: n || r !== void 0 && (c ?? 0) <= r,
50
+ disabled: n || r !== void 0 && (l ?? 0) <= r,
51
51
  onClick: m,
52
52
  size: "small",
53
53
  variant: "default",
@@ -63,13 +63,13 @@ var D = S(({ disabled: n = !1, error: l, id: d, inputWidth: f, label: y, max: t,
63
63
  min: r,
64
64
  onChange: g,
65
65
  ref: v,
66
- step: o,
67
- value: c
66
+ step: a,
67
+ value: l
68
68
  })
69
69
  }),
70
- /* @__PURE__ */ s(h, {
70
+ /* @__PURE__ */ s(q, {
71
71
  className: "quantity-selector-button quantity-selector-button-increase",
72
- disabled: n || t !== void 0 && (c ?? 0) >= t,
72
+ disabled: n || t !== void 0 && (l ?? 0) >= t,
73
73
  onClick: b,
74
74
  size: "small",
75
75
  variant: "default",
@@ -78,17 +78,18 @@ var D = S(({ disabled: n = !1, error: l, id: d, inputWidth: f, label: y, max: t,
78
78
  })
79
79
  ]
80
80
  }),
81
- l && /* @__PURE__ */ s("span", {
81
+ c && /* @__PURE__ */ s("span", {
82
82
  className: "quantity-selector-error-message",
83
- children: l
83
+ children: c
84
84
  }),
85
- a && /* @__PURE__ */ s("span", {
85
+ o && /* @__PURE__ */ s("span", {
86
86
  className: "quantity-selector-success-message",
87
- children: a
87
+ children: o
88
88
  })
89
89
  ]
90
90
  });
91
91
  });
92
+ $.displayName = "QuantitySelector";
92
93
  export {
93
- D as QuantitySelector
94
+ $ as QuantitySelector
94
95
  };