@companix/uikit 0.0.23 → 0.0.25

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 (69) hide show
  1. package/dist/Button/index.d.ts +1 -0
  2. package/dist/File/index.d.ts +2 -2
  3. package/dist/Progress/Progress.scss +47 -0
  4. package/dist/Progress/index.d.ts +5 -0
  5. package/dist/Toaster/Toast.d.ts +10 -4
  6. package/dist/Toaster/Toaster.scss +6 -2
  7. package/dist/Toaster/Viewport.d.ts +1 -0
  8. package/dist/Toaster/index.d.ts +7 -1
  9. package/dist/bundle.es.js +22 -18
  10. package/dist/bundle.es10.js +1 -1
  11. package/dist/bundle.es11.js +1 -1
  12. package/dist/bundle.es14.js +1 -1
  13. package/dist/bundle.es19.js +1 -1
  14. package/dist/bundle.es2.js +34 -32
  15. package/dist/bundle.es20.js +1 -1
  16. package/dist/bundle.es23.js +1 -1
  17. package/dist/bundle.es24.js +3 -3
  18. package/dist/bundle.es25.js +4 -4
  19. package/dist/bundle.es26.js +2 -2
  20. package/dist/bundle.es27.js +24 -27
  21. package/dist/bundle.es29.js +2 -2
  22. package/dist/bundle.es31.js +6 -10
  23. package/dist/bundle.es32.js +10 -24
  24. package/dist/bundle.es33.js +17 -28
  25. package/dist/bundle.es34.js +43 -20
  26. package/dist/bundle.es35.js +51 -87
  27. package/dist/bundle.es36.js +23 -17
  28. package/dist/bundle.es37.js +87 -20
  29. package/dist/bundle.es38.js +18 -24
  30. package/dist/bundle.es39.js +20 -39
  31. package/dist/bundle.es40.js +24 -3
  32. package/dist/bundle.es41.js +39 -5
  33. package/dist/bundle.es42.js +3 -14
  34. package/dist/bundle.es43.js +5 -14
  35. package/dist/bundle.es44.js +14 -3
  36. package/dist/bundle.es45.js +14 -3
  37. package/dist/bundle.es46.js +3 -70
  38. package/dist/bundle.es47.js +3 -68
  39. package/dist/bundle.es48.js +69 -69
  40. package/dist/bundle.es49.js +67 -11
  41. package/dist/bundle.es50.js +69 -42
  42. package/dist/bundle.es51.js +12 -32
  43. package/dist/bundle.es52.js +42 -67
  44. package/dist/bundle.es53.js +32 -14
  45. package/dist/bundle.es54.js +72 -19
  46. package/dist/bundle.es55.js +20 -2
  47. package/dist/bundle.es56.js +2 -43
  48. package/dist/bundle.es57.js +13 -75
  49. package/dist/bundle.es58.js +20 -49
  50. package/dist/bundle.es59.js +2 -20
  51. package/dist/bundle.es60.js +21 -2
  52. package/dist/bundle.es61.js +2 -21
  53. package/dist/bundle.es62.js +20 -2
  54. package/dist/bundle.es63.js +76 -20
  55. package/dist/bundle.es64.js +49 -2
  56. package/dist/bundle.es65.js +2 -14
  57. package/dist/bundle.es66.js +14 -3
  58. package/dist/bundle.es67.js +1 -1
  59. package/dist/bundle.es68.js +3 -20
  60. package/dist/bundle.es69.js +20 -2
  61. package/dist/bundle.es70.js +2 -20
  62. package/dist/bundle.es71.js +20 -2
  63. package/dist/bundle.es72.js +4 -0
  64. package/dist/bundle.es8.js +4 -4
  65. package/dist/bundle.es9.js +2 -2
  66. package/dist/index.d.ts +2 -0
  67. package/dist/index.scss +1 -0
  68. package/dist/mixins.scss +2 -0
  69. package/package.json +1 -1
@@ -1,26 +1,49 @@
1
- import { useRef as s, useCallback as c } from "react";
2
- const p = () => {
3
- const t = s(null), r = s({ cb: null }), i = c(() => {
4
- if (t.current && t.current.parentElement) {
5
- const e = t.current.parentElement, u = e.style.getPropertyValue("--radix-popper-anchor-width"), n = e.style.getPropertyValue("transform"), o = new MutationObserver(() => {
6
- e.style.transform !== n && e.style.setProperty("transform", n);
7
- });
8
- o.observe(e, {
9
- attributes: !0,
10
- attributeFilter: ["style"]
11
- }), r.current.cb = () => {
12
- o.disconnect();
13
- }, t.current.style.setProperty("--radix-popover-trigger-width", u);
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { hash as r } from "@companix/utils-js";
3
+ import { Viewport as o } from "./bundle.es54.js";
4
+ import { useRef as s, useMemo as u } from "react";
5
+ const f = (t = {}) => {
6
+ const i = {
7
+ addToast: (e) => {
8
+ console.error("uninitialized", e);
9
+ },
10
+ updateToast: (e) => {
11
+ console.error("uninitialized", e);
14
12
  }
15
- }, []), l = c(() => {
16
- r.current.cb && (r.current.cb(), r.current.cb = null);
17
- }, []);
13
+ };
18
14
  return {
19
- popoverRef: t,
20
- handleAnimationEnd: l,
21
- froozePopoverPosition: i
15
+ api: {
16
+ add: (e) => {
17
+ const a = e.id ?? r();
18
+ return i.addToast({ ...e, id: a }), a;
19
+ },
20
+ update: (e) => {
21
+ i.updateToast(e);
22
+ }
23
+ },
24
+ Viewport: (e = {}) => {
25
+ const a = s(null);
26
+ return u(() => {
27
+ i.addToast = (d) => {
28
+ a.current && a.current.addToast(d);
29
+ }, i.updateToast = (d) => {
30
+ a.current && a.current.updateToast(d);
31
+ };
32
+ }, []), /* @__PURE__ */ n(
33
+ o,
34
+ {
35
+ ref: a,
36
+ align: e.align ?? t.align,
37
+ closeIcon: e.closeIcon ?? t.closeIcon,
38
+ duration: e.duration ?? t.duration,
39
+ gap: e.gap ?? t.gap,
40
+ side: e.side ?? t.side,
41
+ swipeThreshold: e.swipeThreshold ?? t.swipeThreshold
42
+ }
43
+ );
44
+ }
22
45
  };
23
46
  };
24
47
  export {
25
- p as useFroozeClosing
48
+ f as createToaster
26
49
  };
@@ -1,89 +1,53 @@
1
- import { jsxs as o, jsx as c } from "react/jsx-runtime";
2
- import A from "classnames";
3
- import { attr as l } from "@companix/utils-browser";
4
- import { forwardRef as y, useRef as S, useCallback as T } from "react";
5
- import { VisuallyHidden as j } from "@radix-ui/react-visually-hidden";
6
- import { mergeRefs as w } from "react-merge-refs";
7
- import { SelectRightElements as z } from "./bundle.es49.js";
8
- const V = y(
9
- ({
10
- required: a,
11
- size: u,
12
- fill: d,
13
- leftElement: s,
14
- className: m,
15
- value: n,
16
- clearButton: f,
17
- placeholder: p,
18
- clearButtonIcon: h,
19
- disabled: r,
20
- onClear: C,
21
- inputRef: I,
22
- ...i
23
- }, k) => {
24
- const e = S(null), N = T(
25
- (t) => {
26
- if (!e.current || !document)
27
- return;
28
- t.target !== e.current && (e.current.click(), document.activeElement !== e.current && e.current.focus());
29
- },
30
- [e]
31
- ), v = (t) => {
32
- document && document.activeElement === e.current && t.preventDefault();
33
- }, F = (t) => {
34
- r || N(t);
35
- }, g = (t) => {
36
- v(t);
37
- }, R = (t) => {
38
- e.current && e.current.focus(), C?.(t);
39
- };
40
- return /* @__PURE__ */ o(
41
- "div",
42
- {
43
- ref: k,
44
- className: A("form select", m),
45
- "data-size": u ?? "md",
46
- "data-fill": l(d),
47
- "data-required": l(a),
48
- "data-disabled": l(r),
49
- onMouseDown: g,
50
- ...i,
51
- onClick: F,
52
- children: [
53
- /* @__PURE__ */ o("div", { className: "select-layout form-input", children: [
54
- s && /* @__PURE__ */ c("div", { className: "select-element", children: s }),
55
- /* @__PURE__ */ c("div", { className: "select-content", children: /* @__PURE__ */ o("div", { className: "select-content-text", "aria-disabled": r, children: [
56
- !n && /* @__PURE__ */ c("span", { className: "select-placeholder", children: p }),
57
- n
58
- ] }) }),
59
- /* @__PURE__ */ c("div", { className: "select-element", children: /* @__PURE__ */ c(
60
- z,
61
- {
62
- clearButton: f,
63
- value: !!n,
64
- clearButtonIcon: h,
65
- onClear: R
66
- }
67
- ) })
68
- ] }),
69
- /* @__PURE__ */ c(j, { asChild: !0, children: /* @__PURE__ */ c(
70
- "input",
71
- {
72
- ref: w([I, e]),
73
- autoComplete: "off",
74
- autoCapitalize: "none",
75
- autoCorrect: "off",
76
- spellCheck: "false",
77
- "aria-autocomplete": "none",
78
- onClick: i.onClick,
79
- readOnly: !0
80
- }
81
- ) })
82
- ]
83
- }
84
- );
85
- }
86
- );
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
+ import * as t from "@radix-ui/react-toast";
3
+ import { attr as T } from "@companix/utils-browser";
4
+ import { useState as d, useRef as b, useEffect as j, useLayoutEffect as E } from "react";
5
+ import { RemoveListener as I } from "./bundle.es43.js";
6
+ const m = (o) => {
7
+ const [r, u] = d(!0), [p, f] = d(!1), s = b(null), {
8
+ appearance: C = "neutral",
9
+ icon: a,
10
+ title: n,
11
+ description: c,
12
+ duration: L,
13
+ closeIcon: h,
14
+ onClosing: v,
15
+ onClosed: N,
16
+ closable: x = !0,
17
+ onInitialized: g
18
+ } = o;
19
+ j(() => {
20
+ f(!0);
21
+ }, []), E(() => {
22
+ s.current && g(s.current);
23
+ }, []);
24
+ const R = (i) => {
25
+ i || v(), u(i);
26
+ };
27
+ return /* @__PURE__ */ l(
28
+ t.Root,
29
+ {
30
+ ref: s,
31
+ "data-expanded": !0,
32
+ "data-appearance": C,
33
+ "data-mounted": T(p),
34
+ className: "toaster",
35
+ open: r,
36
+ onOpenChange: R,
37
+ duration: L,
38
+ children: [
39
+ /* @__PURE__ */ e(I, { callback: N }),
40
+ a && /* @__PURE__ */ e("div", { className: "toaster-icon", children: a }),
41
+ /* @__PURE__ */ l("div", { className: "toaster-content", children: [
42
+ n && /* @__PURE__ */ e(t.Title, { className: "toaster-title", children: n }),
43
+ c && /* @__PURE__ */ e(t.Description, { className: "toaster-description", children: c })
44
+ ] }),
45
+ x && /* @__PURE__ */ e(m.Close, { className: "toaster-close toaster-close-placement", closeIcon: h })
46
+ ]
47
+ }
48
+ );
49
+ };
50
+ m.Close = ({ closeIcon: o, className: r } = {}) => /* @__PURE__ */ e(t.Close, { className: r, children: o ?? /* @__PURE__ */ e("svg", { viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M2.96967 2.96967C3.26256 2.67678 3.73744 2.67678 4.03033 2.96967L8 6.939L11.9697 2.96967C12.2626 2.67678 12.7374 2.67678 13.0303 2.96967C13.3232 3.26256 13.3232 3.73744 13.0303 4.03033L9.061 8L13.0303 11.9697C13.2966 12.2359 13.3208 12.6526 13.1029 12.9462L13.0303 13.0303C12.7374 13.3232 12.2626 13.3232 11.9697 13.0303L8 9.061L4.03033 13.0303C3.73744 13.3232 3.26256 13.3232 2.96967 13.0303C2.67678 12.7374 2.67678 12.2626 2.96967 11.9697L6.939 8L2.96967 4.03033C2.7034 3.76406 2.6792 3.3474 2.89705 3.05379L2.96967 2.96967Z" }) }) });
87
51
  export {
88
- V as SelectInput
52
+ m as Toast
89
53
  };
@@ -1,20 +1,26 @@
1
- import { useRef as u, useCallback as T } from "react";
2
- const g = () => {
3
- const l = u(null), t = u(null);
4
- return { scrollToElement: T(
5
- (r, f) => {
6
- const o = l.current, s = t.current;
7
- if (!o || !s || r < 0 || r > s.children.length)
8
- return;
9
- const c = s.children[r];
10
- if (!c)
11
- return;
12
- const n = o.offsetHeight, i = o.scrollTop, e = c.offsetTop, p = c.offsetHeight;
13
- f === "center" ? o.scrollTop = e - n / 2 + p / 2 : f === "top" ? o.scrollTop = e : e + p > n + i ? o.scrollTop = e - n + p : e < i && (o.scrollTop = e);
14
- },
15
- [t, l]
16
- ), scrollBoxRef: l, optionsWrapperRef: t };
1
+ import { useRef as s, useCallback as c } from "react";
2
+ const p = () => {
3
+ const t = s(null), r = s({ cb: null }), i = c(() => {
4
+ if (t.current && t.current.parentElement) {
5
+ const e = t.current.parentElement, u = e.style.getPropertyValue("--radix-popper-anchor-width"), n = e.style.getPropertyValue("transform"), o = new MutationObserver(() => {
6
+ e.style.transform !== n && e.style.setProperty("transform", n);
7
+ });
8
+ o.observe(e, {
9
+ attributes: !0,
10
+ attributeFilter: ["style"]
11
+ }), r.current.cb = () => {
12
+ o.disconnect();
13
+ }, t.current.style.setProperty("--radix-popover-trigger-width", u);
14
+ }
15
+ }, []), l = c(() => {
16
+ r.current.cb && (r.current.cb(), r.current.cb = null);
17
+ }, []);
18
+ return {
19
+ popoverRef: t,
20
+ handleAnimationEnd: l,
21
+ froozePopoverPosition: i
22
+ };
17
23
  };
18
24
  export {
19
- g as useScrollListController
25
+ p as useFroozeClosing
20
26
  };
@@ -1,22 +1,89 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { useEffect as a } from "react";
3
- import { OptionItem as f } from "./bundle.es10.js";
4
- import { OptionsList as O } from "./bundle.es12.js";
5
- const h = (t) => {
6
- const { active: i, onOpened: m, scrollboxRef: n, optionsWrapperRef: r, options: p, onSelect: s, minimalOptions: c } = t;
7
- return a(() => {
8
- m?.();
9
- }, []), /* @__PURE__ */ o(O, { scrollboxRef: n, optionsWrapperRef: r, maxHeight: 300, children: p.map((e, l) => /* @__PURE__ */ o(
10
- f,
11
- {
12
- active: i === e.value,
13
- onClick: () => s?.(e.value),
14
- minimal: c,
15
- ...e
16
- },
17
- `select-option-${l}`
18
- )) });
19
- };
1
+ import { jsxs as o, jsx as c } from "react/jsx-runtime";
2
+ import A from "classnames";
3
+ import { attr as l } from "@companix/utils-browser";
4
+ import { forwardRef as y, useRef as S, useCallback as T } from "react";
5
+ import { VisuallyHidden as j } from "@radix-ui/react-visually-hidden";
6
+ import { mergeRefs as w } from "react-merge-refs";
7
+ import { SelectRightElements as z } from "./bundle.es51.js";
8
+ const V = y(
9
+ ({
10
+ required: a,
11
+ size: u,
12
+ fill: d,
13
+ leftElement: s,
14
+ className: m,
15
+ value: n,
16
+ clearButton: f,
17
+ placeholder: p,
18
+ clearButtonIcon: h,
19
+ disabled: r,
20
+ onClear: C,
21
+ inputRef: I,
22
+ ...i
23
+ }, k) => {
24
+ const e = S(null), N = T(
25
+ (t) => {
26
+ if (!e.current || !document)
27
+ return;
28
+ t.target !== e.current && (e.current.click(), document.activeElement !== e.current && e.current.focus());
29
+ },
30
+ [e]
31
+ ), v = (t) => {
32
+ document && document.activeElement === e.current && t.preventDefault();
33
+ }, F = (t) => {
34
+ r || N(t);
35
+ }, g = (t) => {
36
+ v(t);
37
+ }, R = (t) => {
38
+ e.current && e.current.focus(), C?.(t);
39
+ };
40
+ return /* @__PURE__ */ o(
41
+ "div",
42
+ {
43
+ ref: k,
44
+ className: A("form select", m),
45
+ "data-size": u ?? "md",
46
+ "data-fill": l(d),
47
+ "data-required": l(a),
48
+ "data-disabled": l(r),
49
+ onMouseDown: g,
50
+ ...i,
51
+ onClick: F,
52
+ children: [
53
+ /* @__PURE__ */ o("div", { className: "select-layout form-input", children: [
54
+ s && /* @__PURE__ */ c("div", { className: "select-element", children: s }),
55
+ /* @__PURE__ */ c("div", { className: "select-content", children: /* @__PURE__ */ o("div", { className: "select-content-text", "aria-disabled": r, children: [
56
+ !n && /* @__PURE__ */ c("span", { className: "select-placeholder", children: p }),
57
+ n
58
+ ] }) }),
59
+ /* @__PURE__ */ c("div", { className: "select-element", children: /* @__PURE__ */ c(
60
+ z,
61
+ {
62
+ clearButton: f,
63
+ value: !!n,
64
+ clearButtonIcon: h,
65
+ onClear: R
66
+ }
67
+ ) })
68
+ ] }),
69
+ /* @__PURE__ */ c(j, { asChild: !0, children: /* @__PURE__ */ c(
70
+ "input",
71
+ {
72
+ ref: w([I, e]),
73
+ autoComplete: "off",
74
+ autoCapitalize: "none",
75
+ autoCorrect: "off",
76
+ spellCheck: "false",
77
+ "aria-autocomplete": "none",
78
+ onClick: i.onClick,
79
+ readOnly: !0
80
+ }
81
+ ) })
82
+ ]
83
+ }
84
+ );
85
+ }
86
+ );
20
87
  export {
21
- h as SelectOptions
88
+ V as SelectInput
22
89
  };
@@ -1,26 +1,20 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import { forwardRef as m, useCallback as i } from "react";
3
- import c from "react-input-mask";
4
- const I = m(
5
- ({ mask: r, maskChar: f = "_", onChange: n, onValueChange: o, ...a }, e) => {
6
- const p = i(
7
- (t) => {
8
- n?.(t), o?.(t.target.value, t.target);
9
- },
10
- [n, o]
11
- );
12
- return r ? /* @__PURE__ */ u(
13
- c,
14
- {
15
- inputRef: e,
16
- mask: r,
17
- maskChar: f,
18
- onChange: p,
19
- ...a
20
- }
21
- ) : /* @__PURE__ */ u("input", { ref: e, ...a, onChange: p });
22
- }
23
- );
1
+ import { useRef as u, useCallback as T } from "react";
2
+ const g = () => {
3
+ const l = u(null), t = u(null);
4
+ return { scrollToElement: T(
5
+ (r, f) => {
6
+ const o = l.current, s = t.current;
7
+ if (!o || !s || r < 0 || r > s.children.length)
8
+ return;
9
+ const c = s.children[r];
10
+ if (!c)
11
+ return;
12
+ const n = o.offsetHeight, i = o.scrollTop, e = c.offsetTop, p = c.offsetHeight;
13
+ f === "center" ? o.scrollTop = e - n / 2 + p / 2 : f === "top" ? o.scrollTop = e : e + p > n + i ? o.scrollTop = e - n + p : e < i && (o.scrollTop = e);
14
+ },
15
+ [t, l]
16
+ ), scrollBoxRef: l, optionsWrapperRef: t };
17
+ };
24
18
  export {
25
- I as InputElement
19
+ g as useScrollListController
26
20
  };
@@ -1,41 +1,22 @@
1
- import { jsxs as b, jsx as o } from "react/jsx-runtime";
2
- import h from "classnames";
3
- import { attr as e } from "@companix/utils-browser";
4
- import { forwardRef as x } from "react";
5
- import { useInputPadding as N } from "./bundle.es53.js";
6
- const v = x(
7
- ({
8
- required: s,
9
- disabled: t,
10
- size: i,
11
- fill: d,
12
- leftElement: r,
13
- rightElement: a,
14
- className: f,
15
- inputRef: m,
16
- children: n,
17
- ...p
18
- }, c) => {
19
- const { leftRef: l, rightRef: u } = N(m, [r, a]);
20
- return /* @__PURE__ */ b(
21
- "div",
22
- {
23
- ref: c,
24
- className: h("form", f),
25
- "data-size": i ?? "md",
26
- "data-fill": e(d),
27
- "data-required": e(s),
28
- "data-disabled": e(t),
29
- ...p,
30
- children: [
31
- r && /* @__PURE__ */ o("span", { ref: l, className: "form-input-base-left-element", children: r }),
32
- n,
33
- a && /* @__PURE__ */ o("span", { ref: u, className: "form-input-base-right-element", children: a })
34
- ]
35
- }
36
- );
37
- }
38
- );
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { useEffect as a } from "react";
3
+ import { OptionItem as f } from "./bundle.es10.js";
4
+ import { OptionsList as O } from "./bundle.es12.js";
5
+ const h = (t) => {
6
+ const { active: i, onOpened: m, scrollboxRef: n, optionsWrapperRef: r, options: p, onSelect: s, minimalOptions: c } = t;
7
+ return a(() => {
8
+ m?.();
9
+ }, []), /* @__PURE__ */ o(O, { scrollboxRef: n, optionsWrapperRef: r, maxHeight: 300, children: p.map((e, l) => /* @__PURE__ */ o(
10
+ f,
11
+ {
12
+ active: i === e.value,
13
+ onClick: () => s?.(e.value),
14
+ minimal: c,
15
+ ...e
16
+ },
17
+ `select-option-${l}`
18
+ )) });
19
+ };
39
20
  export {
40
- v as InputContainer
21
+ h as SelectOptions
41
22
  };
@@ -1,5 +1,26 @@
1
- import { __require as r } from "./bundle.es54.js";
2
- var a = /* @__PURE__ */ r();
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { forwardRef as m, useCallback as i } from "react";
3
+ import c from "react-input-mask";
4
+ const I = m(
5
+ ({ mask: r, maskChar: f = "_", onChange: n, onValueChange: o, ...a }, e) => {
6
+ const p = i(
7
+ (t) => {
8
+ n?.(t), o?.(t.target.value, t.target);
9
+ },
10
+ [n, o]
11
+ );
12
+ return r ? /* @__PURE__ */ u(
13
+ c,
14
+ {
15
+ inputRef: e,
16
+ mask: r,
17
+ maskChar: f,
18
+ onChange: p,
19
+ ...a
20
+ }
21
+ ) : /* @__PURE__ */ u("input", { ref: e, ...a, onChange: p });
22
+ }
23
+ );
3
24
  export {
4
- a as f
25
+ I as InputElement
5
26
  };
@@ -1,7 +1,41 @@
1
- import { useEffect as r } from "react";
2
- const n = ({ callback: e }) => (r(() => () => {
3
- e?.();
4
- }, []), null);
1
+ import { jsxs as b, jsx as o } from "react/jsx-runtime";
2
+ import h from "classnames";
3
+ import { attr as e } from "@companix/utils-browser";
4
+ import { forwardRef as x } from "react";
5
+ import { useInputPadding as N } from "./bundle.es57.js";
6
+ const v = x(
7
+ ({
8
+ required: s,
9
+ disabled: t,
10
+ size: i,
11
+ fill: d,
12
+ leftElement: r,
13
+ rightElement: a,
14
+ className: f,
15
+ inputRef: m,
16
+ children: n,
17
+ ...p
18
+ }, c) => {
19
+ const { leftRef: l, rightRef: u } = N(m, [r, a]);
20
+ return /* @__PURE__ */ b(
21
+ "div",
22
+ {
23
+ ref: c,
24
+ className: h("form", f),
25
+ "data-size": i ?? "md",
26
+ "data-fill": e(d),
27
+ "data-required": e(s),
28
+ "data-disabled": e(t),
29
+ ...p,
30
+ children: [
31
+ r && /* @__PURE__ */ o("span", { ref: l, className: "form-input-base-left-element", children: r }),
32
+ n,
33
+ a && /* @__PURE__ */ o("span", { ref: u, className: "form-input-base-right-element", children: a })
34
+ ]
35
+ }
36
+ );
37
+ }
38
+ );
5
39
  export {
6
- n as RemoveListener
40
+ v as InputContainer
7
41
  };
@@ -1,16 +1,5 @@
1
- import { useState as e } from "react";
2
- const d = ({ onClick: t }) => {
3
- const [a, s] = e({ isLoading: !1, isError: !1 });
4
- return { ...a, handleClick: (r) => {
5
- a.isLoading || t(() => {
6
- s({ isLoading: !0, isError: !1 });
7
- }, r).then(() => {
8
- s({ isLoading: !1, isError: !1 });
9
- }).catch(() => {
10
- s({ isLoading: !1, isError: !0 });
11
- });
12
- } };
13
- };
1
+ import { __require as r } from "./bundle.es55.js";
2
+ var a = /* @__PURE__ */ r();
14
3
  export {
15
- d as useLoading
4
+ a as f
16
5
  };
@@ -1,16 +1,7 @@
1
- import { useRef as i, useCallback as o } from "react";
2
- const f = (e, s) => {
3
- const r = i(null), c = i(void 0), n = o(
4
- (t) => {
5
- s && t.offsetParent && (t.style.height = "", t.style.height = `${t.scrollHeight}px`, t.scrollHeight !== c.current && e && (e(t), c.current = t.scrollHeight));
6
- },
7
- [s, e]
8
- ), l = o(() => {
9
- const t = r.current;
10
- t && n(t);
11
- }, [r, n]);
12
- return [r, l];
13
- };
1
+ import { useEffect as r } from "react";
2
+ const n = ({ callback: e }) => (r(() => () => {
3
+ e?.();
4
+ }, []), null);
14
5
  export {
15
- f as useResizeTextarea
6
+ n as RemoveListener
16
7
  };
@@ -1,5 +1,16 @@
1
- import { __require as r } from "./bundle.es59.js";
2
- var e = /* @__PURE__ */ r();
1
+ import { useState as e } from "react";
2
+ const d = ({ onClick: t }) => {
3
+ const [a, s] = e({ isLoading: !1, isError: !1 });
4
+ return { ...a, handleClick: (r) => {
5
+ a.isLoading || t(() => {
6
+ s({ isLoading: !0, isError: !1 });
7
+ }, r).then(() => {
8
+ s({ isLoading: !1, isError: !1 });
9
+ }).catch(() => {
10
+ s({ isLoading: !1, isError: !0 });
11
+ });
12
+ } };
13
+ };
3
14
  export {
4
- e as f
15
+ d as useLoading
5
16
  };
@@ -1,5 +1,16 @@
1
- import { __require as r } from "./bundle.es61.js";
2
- var o = /* @__PURE__ */ r();
1
+ import { useRef as i, useCallback as o } from "react";
2
+ const f = (e, s) => {
3
+ const r = i(null), c = i(void 0), n = o(
4
+ (t) => {
5
+ s && t.offsetParent && (t.style.height = "", t.style.height = `${t.scrollHeight}px`, t.scrollHeight !== c.current && e && (e(t), c.current = t.scrollHeight));
6
+ },
7
+ [s, e]
8
+ ), l = o(() => {
9
+ const t = r.current;
10
+ t && n(t);
11
+ }, [r, n]);
12
+ return [r, l];
13
+ };
3
14
  export {
4
- o as f
15
+ f as useResizeTextarea
5
16
  };