@companix/uikit 0.0.18 → 0.0.20

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 (56) hide show
  1. package/dist/Input/Input.d.ts +1 -1
  2. package/dist/Input/InputElement.d.ts +3 -1
  3. package/dist/NumberInput/index.d.ts +22 -5
  4. package/dist/Radio/index.d.ts +1 -1
  5. package/dist/bundle.es10.js +14 -14
  6. package/dist/bundle.es11.js +55 -30
  7. package/dist/bundle.es14.js +11 -11
  8. package/dist/bundle.es19.js +1 -1
  9. package/dist/bundle.es20.js +1 -1
  10. package/dist/bundle.es23.js +1 -1
  11. package/dist/bundle.es24.js +35 -34
  12. package/dist/bundle.es25.js +4 -4
  13. package/dist/bundle.es26.js +2 -2
  14. package/dist/bundle.es29.js +2 -2
  15. package/dist/bundle.es31.js +1 -1
  16. package/dist/bundle.es32.js +1 -1
  17. package/dist/bundle.es34.js +1 -1
  18. package/dist/bundle.es37.js +1 -1
  19. package/dist/bundle.es38.js +1 -1
  20. package/dist/bundle.es40.js +3 -5
  21. package/dist/bundle.es41.js +5 -14
  22. package/dist/bundle.es42.js +13 -13
  23. package/dist/bundle.es43.js +13 -69
  24. package/dist/bundle.es44.js +3 -68
  25. package/dist/bundle.es45.js +3 -70
  26. package/dist/bundle.es46.js +68 -9
  27. package/dist/bundle.es47.js +66 -41
  28. package/dist/bundle.es48.js +69 -31
  29. package/dist/bundle.es49.js +12 -68
  30. package/dist/bundle.es50.js +42 -74
  31. package/dist/bundle.es51.js +30 -47
  32. package/dist/bundle.es52.js +67 -13
  33. package/dist/bundle.es53.js +19 -42
  34. package/dist/bundle.es54.js +2 -14
  35. package/dist/bundle.es55.js +45 -0
  36. package/dist/bundle.es56.js +22 -0
  37. package/dist/bundle.es57.js +4 -0
  38. package/dist/bundle.es58.js +23 -0
  39. package/dist/bundle.es59.js +4 -0
  40. package/dist/bundle.es60.js +22 -0
  41. package/dist/bundle.es61.js +16 -0
  42. package/dist/bundle.es62.js +78 -0
  43. package/dist/bundle.es63.js +51 -0
  44. package/dist/bundle.es64.js +4 -0
  45. package/dist/bundle.es65.js +16 -0
  46. package/dist/bundle.es66.js +5 -0
  47. package/dist/bundle.es67.js +5 -0
  48. package/dist/bundle.es68.js +22 -0
  49. package/dist/bundle.es69.js +4 -0
  50. package/dist/bundle.es70.js +22 -0
  51. package/dist/bundle.es71.js +4 -0
  52. package/dist/index.d.ts +3 -1
  53. package/package.json +3 -2
  54. package/dist/Stepper/StepperInput.scss +0 -35
  55. package/dist/Stepper/index.d.ts +0 -8
  56. package/dist/__hooks/use-stepper-input.d.ts +0 -13
@@ -1,7 +1,7 @@
1
1
  import { InputContainerProps } from './InputContainer';
2
2
  export interface InputProps extends Omit<InputContainerProps, 'inputRef' | 'children'> {
3
3
  placeholder?: string;
4
- value?: string | number;
4
+ value?: string;
5
5
  readOnly?: boolean;
6
6
  onValueChange?: (value: string, targetElement: HTMLInputElement) => void;
7
7
  onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
@@ -1,4 +1,6 @@
1
- interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'children'> {
1
+ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'children' | 'value' | 'defaultValue'> {
2
+ defaultValue?: string;
3
+ value?: string;
2
4
  mask?: string;
3
5
  maskChar?: string;
4
6
  onValueChange?: (value: string, targetElement: HTMLInputElement) => void;
@@ -1,6 +1,23 @@
1
- import { InputProps } from '../Input/Input';
2
- export interface NumberInputProps extends Omit<InputProps, 'value' | 'onChange'> {
3
- value: number | null;
4
- onChange: (value: number | null) => void;
1
+ import { InputContainerProps } from '../Input/InputContainer';
2
+ export interface ReactNumberFormatParams {
3
+ thousandSeparator?: boolean | string;
4
+ decimalSeparator?: string;
5
+ allowedDecimalSeparators?: Array<string>;
6
+ thousandsGroupStyle?: 'thousand' | 'lakh' | 'wan' | 'none';
7
+ decimalScale?: number;
8
+ fixedDecimalScale?: boolean;
9
+ allowNegative?: boolean;
10
+ allowLeadingZeros?: boolean;
11
+ suffix?: string;
12
+ prefix?: string;
5
13
  }
6
- export declare const NumberInput: ({ value, onChange, ...props }: NumberInputProps) => import("react/jsx-runtime").JSX.Element;
14
+ export interface NumberInputProps extends Omit<InputContainerProps, 'inputRef' | 'children'>, ReactNumberFormatParams {
15
+ placeholder?: string;
16
+ value?: number | null;
17
+ readOnly?: boolean;
18
+ onValueChange?: (value: number | null) => void;
19
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
20
+ inputRef?: React.Ref<HTMLInputElement>;
21
+ inputClassName?: string;
22
+ }
23
+ export declare const NumberInput: import('react').ForwardRefExoticComponent<NumberInputProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,4 @@
1
- interface RadioOption<T> {
1
+ export interface RadioOption<T> {
2
2
  value: T;
3
3
  label: React.ReactNode;
4
4
  }
@@ -3,36 +3,36 @@ import N from "classnames";
3
3
  import { Icon as v } from "./bundle.es39.js";
4
4
  import { attr as t } from "@companix/utils-browser";
5
5
  import { forwardRef as k } from "react";
6
- import { faCheck as x } from "@fortawesome/free-solid-svg-icons";
7
- const O = k(
8
- ({ title: d, icon: n, active: c, label: e, disabled: r, minimal: a, onClick: l, className: m, ...s }, p) => {
6
+ import { f as x } from "./bundle.es40.js";
7
+ const E = k(
8
+ ({ title: s, icon: c, active: e, label: n, disabled: a, minimal: r, onClick: d, className: l, ...m }, p) => {
9
9
  const f = (h) => {
10
- r || l?.(h);
10
+ a || d?.(h);
11
11
  };
12
12
  return /* @__PURE__ */ i(
13
13
  "div",
14
14
  {
15
15
  ref: p,
16
- ...s,
17
- className: N("option", m),
18
- "data-selected": t(c),
19
- "data-disabled": t(r),
20
- "data-minimal": t(a),
16
+ ...m,
17
+ className: N("option", l),
18
+ "data-selected": t(e),
19
+ "data-disabled": t(a),
20
+ "data-minimal": t(r),
21
21
  onClick: f,
22
22
  children: [
23
23
  /* @__PURE__ */ i("div", { className: "option-content", children: [
24
- n && /* @__PURE__ */ o("div", { className: "option-icon", children: n }),
24
+ c && /* @__PURE__ */ o("div", { className: "option-icon", children: c }),
25
25
  /* @__PURE__ */ i("div", { className: "option-content-layout", children: [
26
- /* @__PURE__ */ o("div", { className: "option-title", children: d }),
27
- e && /* @__PURE__ */ o("div", { className: "option-label", children: e })
26
+ /* @__PURE__ */ o("div", { className: "option-title", children: s }),
27
+ n && /* @__PURE__ */ o("div", { className: "option-label", children: n })
28
28
  ] })
29
29
  ] }),
30
- c && !a && /* @__PURE__ */ o("div", { className: "option-check", children: /* @__PURE__ */ o(v, { icon: x }) })
30
+ e && !r && /* @__PURE__ */ o("div", { className: "option-check", children: /* @__PURE__ */ o(v, { icon: x.faCheck }) })
31
31
  ]
32
32
  }
33
33
  );
34
34
  }
35
35
  );
36
36
  export {
37
- O as OptionItem
37
+ E as OptionItem
38
38
  };
@@ -1,33 +1,58 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { useState as p, useRef as m } from "react";
3
- import { Input as l } from "./bundle.es9.js";
4
- const N = ({ value: r, onChange: u, ...e }) => {
5
- const [, t] = p([]), n = m(i(r));
6
- return +n.current !== r && (n.current = i(r)), /* @__PURE__ */ f(
7
- l,
8
- {
9
- ...e,
10
- value: n.current,
11
- onChange: (o) => {
12
- const s = o.currentTarget.value.trim();
13
- if (s === "")
14
- return n.current = "", u(null);
15
- if (!(s.startsWith(".") || s.replace(".", "").split("").some((c) => isNaN(parseInt(c))))) {
16
- if (n.current = a(s.split("")), +n.current === r)
17
- return t([]);
18
- u(+n.current);
19
- }
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import C from "classnames";
3
+ import { forwardRef as j, useRef as w } from "react";
4
+ import { mergeRefs as y } from "react-merge-refs";
5
+ import { InputContainer as F } from "./bundle.es38.js";
6
+ import { NumericFormat as V } from "react-number-format";
7
+ const D = j(
8
+ ({
9
+ onChange: m,
10
+ onValueChange: o,
11
+ readOnly: i,
12
+ inputClassName: f,
13
+ value: n,
14
+ placeholder: u,
15
+ thousandSeparator: p,
16
+ decimalSeparator: a,
17
+ allowedDecimalSeparators: l,
18
+ thousandsGroupStyle: d,
19
+ decimalScale: s,
20
+ fixedDecimalScale: b,
21
+ allowNegative: R,
22
+ allowLeadingZeros: c,
23
+ suffix: g,
24
+ prefix: x,
25
+ inputRef: I,
26
+ ...e
27
+ }, N) => {
28
+ const r = w(null);
29
+ return /* @__PURE__ */ t(F, { ref: N, inputRef: r, ...e, children: /* @__PURE__ */ t(
30
+ V,
31
+ {
32
+ type: "text",
33
+ getInputRef: y([r, I]),
34
+ className: C("form-input form-input-base", f),
35
+ "aria-disabled": e.disabled,
36
+ onChange: m,
37
+ onValueChange: ({ floatValue: h }) => o?.(h ?? null),
38
+ value: n,
39
+ placeholder: u,
40
+ disabled: e.disabled,
41
+ readOnly: i,
42
+ thousandSeparator: p,
43
+ decimalSeparator: a,
44
+ allowedDecimalSeparators: l,
45
+ thousandsGroupStyle: d,
46
+ decimalScale: s,
47
+ fixedDecimalScale: b,
48
+ allowNegative: R,
49
+ allowLeadingZeros: c,
50
+ suffix: g,
51
+ prefix: x
20
52
  }
21
- }
22
- );
23
- }, i = (r) => r === null ? "" : r.toString(), a = (r) => {
24
- const u = [...r], e = [...r];
25
- if (e.every((t) => t === "0"))
26
- return "0";
27
- for (let t = 0; t < e.length && e[t] === "0"; t++)
28
- e[t] === "0" && e[t + 1] !== "." && u.shift();
29
- return u.join("");
30
- };
53
+ ) });
54
+ }
55
+ );
31
56
  export {
32
- N as NumberInput
57
+ D as NumberInput
33
58
  };
@@ -1,35 +1,35 @@
1
- import { jsxs as x, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
2
  import * as t from "@radix-ui/react-checkbox";
3
3
  import { Icon as h } from "./bundle.es39.js";
4
- import { faCheck as l } from "@fortawesome/free-solid-svg-icons";
4
+ import { f as l } from "./bundle.es40.js";
5
5
  import { useId as n } from "react";
6
6
  import { attr as c } from "@companix/utils-browser";
7
- const u = ({ checked: e, required: m, disabled: r, onCheckedChange: s, size: d, label: a }) => {
7
+ const N = ({ checked: a, required: s, disabled: r, onCheckedChange: m, size: x, label: e }) => {
8
8
  const i = n();
9
- return /* @__PURE__ */ x(
9
+ return /* @__PURE__ */ d(
10
10
  "div",
11
11
  {
12
12
  className: "checkbox",
13
- "data-size": d ?? "md",
14
- "data-required": c(m && !e),
13
+ "data-size": x ?? "md",
14
+ "data-required": c(s && !a),
15
15
  "data-disabled": c(r),
16
16
  children: [
17
17
  /* @__PURE__ */ o(
18
18
  t.Root,
19
19
  {
20
20
  className: "checkbox-box",
21
- checked: e,
22
- onCheckedChange: s,
21
+ checked: a,
22
+ onCheckedChange: m,
23
23
  disabled: r,
24
24
  id: i,
25
- children: /* @__PURE__ */ o(t.Indicator, { className: "checkbox-icon", children: /* @__PURE__ */ o(h, { icon: l, size: "xxxs" }) })
25
+ children: /* @__PURE__ */ o(t.Indicator, { className: "checkbox-icon", children: /* @__PURE__ */ o(h, { icon: l.faCheck, size: "xxxs" }) })
26
26
  }
27
27
  ),
28
- a && /* @__PURE__ */ o("label", { className: "checkbox-label", htmlFor: i, "data-disabled": c(r), children: a })
28
+ e && /* @__PURE__ */ o("label", { className: "checkbox-label", htmlFor: i, "data-disabled": c(r), children: e })
29
29
  ]
30
30
  }
31
31
  );
32
32
  };
33
33
  export {
34
- u as Checkbox
34
+ N as Checkbox
35
35
  };
@@ -1,7 +1,7 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import * as r from "@radix-ui/react-alert-dialog";
3
3
  import { Button as c } from "./bundle.es2.js";
4
- import { RemoveListener as N } from "./bundle.es40.js";
4
+ import { RemoveListener as N } from "./bundle.es41.js";
5
5
  import { VisuallyHidden as u } from "@radix-ui/react-visually-hidden";
6
6
  const C = ({
7
7
  open: d,
@@ -1,6 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { Button as m } from "./bundle.es2.js";
3
- import { useLoading as p } from "./bundle.es41.js";
3
+ import { useLoading as p } from "./bundle.es42.js";
4
4
  const g = ({ onClick: o, appearance: r = "primary", ...i }) => {
5
5
  const { isLoading: n, isError: t, handleClick: a } = p({ onClick: o });
6
6
  return /* @__PURE__ */ e(
@@ -1,5 +1,5 @@
1
1
  import { jsx as f } from "react/jsx-runtime";
2
- import { useResizeTextarea as x } from "./bundle.es42.js";
2
+ import { useResizeTextarea as x } from "./bundle.es43.js";
3
3
  import { attr as e, callMultiple as u } from "@companix/utils-browser";
4
4
  import { useEffect as z } from "react";
5
5
  import { mergeRefs as R } from "react-merge-refs";
@@ -1,57 +1,58 @@
1
- import { jsx as o, jsxs as c } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as l } from "react/jsx-runtime";
2
2
  import { useFroozeClosing as M } from "./bundle.es33.js";
3
3
  import { Popover as j } from "./bundle.es6.js";
4
4
  import { OptionItem as q } from "./bundle.es10.js";
5
5
  import { OptionsList as V } from "./bundle.es12.js";
6
6
  import { useState as B, useRef as d, useMemo as h } from "react";
7
7
  import { Icon as g } from "./bundle.es39.js";
8
- import { faClose as H, faChevronDown as Q } from "@fortawesome/free-solid-svg-icons";
9
- import { attr as v, getActiveElementByAnotherElement as G, contains as J } from "@companix/utils-browser";
8
+ import { f as H } from "./bundle.es44.js";
9
+ import { f as Q } from "./bundle.es45.js";
10
+ import { attr as x, getActiveElementByAnotherElement as G, contains as J } from "@companix/utils-browser";
10
11
  import { mergeRefs as K } from "react-merge-refs";
11
- const re = (x) => {
12
+ const se = (C) => {
12
13
  const {
13
14
  options: r,
14
- closeAfterSelect: C,
15
+ closeAfterSelect: v,
15
16
  placeholder: N,
16
- onChange: l,
17
+ onChange: c,
17
18
  emptyText: R = "Ничего не найдено",
18
19
  readOnly: m,
19
20
  size: z = "md",
20
21
  value: n,
21
22
  inputRef: A,
22
- disabled: f,
23
- required: y
24
- } = x, [i, D] = B(""), a = d(null), b = d(null), { popoverRef: u, froozePopoverPosition: w, handleAnimationEnd: E } = M(), O = h(() => {
23
+ disabled: u,
24
+ required: D
25
+ } = C, [a, E] = B(""), i = d(null), w = d(null), { popoverRef: f, froozePopoverPosition: y, handleAnimationEnd: b } = M(), O = h(() => {
25
26
  const e = {};
26
27
  return r.forEach((t) => {
27
28
  e[t.value] = t;
28
29
  }), e;
29
30
  }, [r]), P = (e) => n.includes(e) ? [...n] : [...n, e], T = (e) => n.filter((t) => e !== t), k = (e, t) => {
30
- C ? (w(), l(e), t()) : l(e);
31
- }, p = h(() => i.trim() ? r.filter(({ title: e }) => {
32
- const t = e.toLowerCase(), s = i.trim().toLowerCase();
31
+ v ? (y(), c(e), t()) : c(e);
32
+ }, p = h(() => a.trim() ? r.filter(({ title: e }) => {
33
+ const t = e.toLowerCase(), s = a.trim().toLowerCase();
33
34
  return t.indexOf(s) >= 0;
34
- }) : r, [i, r]), I = (e) => {
35
- if (f) return;
36
- u.current && u.current.getAttribute("data-state") === "open" && e.preventDefault();
35
+ }) : r, [a, r]), I = (e) => {
36
+ if (u) return;
37
+ f.current && f.current.getAttribute("data-state") === "open" && e.preventDefault();
37
38
  const t = G(e.currentTarget);
38
- e.defaultPrevented || J(e.currentTarget, t) || a.current && a.current.focus();
39
+ e.defaultPrevented || J(e.currentTarget, t) || i.current && i.current.focus();
39
40
  }, S = (e) => {
40
- e.target !== a.current && e.preventDefault();
41
+ e.target !== i.current && e.preventDefault();
41
42
  }, $ = (e, t) => {
42
- e.stopPropagation(), l(T(t));
43
+ e.stopPropagation(), c(T(t));
43
44
  };
44
45
  return /* @__PURE__ */ o(
45
46
  j,
46
47
  {
47
48
  minimal: !0,
48
- ref: u,
49
+ ref: f,
49
50
  sideOffset: 0,
50
51
  matchTarget: "width",
51
- onAnimationEnd: E,
52
+ onAnimationEnd: b,
52
53
  onOpenAutoFocus: (e) => e.preventDefault(),
53
54
  onCloseAutoFocus: (e) => e.preventDefault(),
54
- content: ({ close: e }) => /* @__PURE__ */ c(V, { maxHeight: 300, children: [
55
+ content: ({ close: e }) => /* @__PURE__ */ l(V, { maxHeight: 300, children: [
55
56
  p.length === 0 && /* @__PURE__ */ o("div", { className: "select-tags-empty", children: R }),
56
57
  p.map(({ value: t, title: s, icon: F }, L) => /* @__PURE__ */ o(
57
58
  q,
@@ -71,41 +72,41 @@ const re = (x) => {
71
72
  onClick: I,
72
73
  onMouseDown: S,
73
74
  "data-size": z,
74
- "data-required": v(y),
75
- children: /* @__PURE__ */ c("div", { className: "select-tags-container", children: [
76
- /* @__PURE__ */ c("div", { className: "select-tags", children: [
75
+ "data-required": x(D),
76
+ children: /* @__PURE__ */ l("div", { className: "select-tags-container", children: [
77
+ /* @__PURE__ */ l("div", { className: "select-tags", children: [
77
78
  n.length > 0 && /* @__PURE__ */ o(
78
79
  "div",
79
80
  {
80
81
  className: "tag-container",
81
- ref: b,
82
+ ref: w,
82
83
  role: "listbox",
83
- "data-readonly": v(m),
84
- children: n.map((e, t) => /* @__PURE__ */ c("div", { className: "tag", children: [
84
+ "data-readonly": x(m),
85
+ children: n.map((e, t) => /* @__PURE__ */ l("div", { className: "tag", children: [
85
86
  /* @__PURE__ */ o("span", { className: "tag-name", children: O[e].title }),
86
- /* @__PURE__ */ o("button", { className: "tag-close-button", onClick: (s) => $(s, e), children: /* @__PURE__ */ o(g, { className: "tag-close-icon", icon: H, size: "xxxs" }) })
87
+ /* @__PURE__ */ o("button", { className: "tag-close-button", onClick: (s) => $(s, e), children: /* @__PURE__ */ o(g, { className: "tag-close-icon", icon: Q.faClose, size: "xxxs" }) })
87
88
  ] }, `tag-option-${e}-${t}`))
88
89
  }
89
90
  ),
90
91
  (!m || n.length === 0) && /* @__PURE__ */ o(
91
92
  "input",
92
93
  {
93
- ref: K([A, a]),
94
+ ref: K([A, i]),
94
95
  type: "text",
95
96
  autoCapitalize: "none",
96
97
  autoComplete: "off",
97
98
  autoCorrect: "off",
98
99
  className: "form-input",
99
100
  spellCheck: !1,
100
- value: i,
101
- disabled: f,
101
+ value: a,
102
+ disabled: u,
102
103
  readOnly: m,
103
104
  placeholder: N,
104
- onChange: ({ target: e }) => D(e.value)
105
+ onChange: ({ target: e }) => E(e.value)
105
106
  }
106
107
  )
107
108
  ] }),
108
- /* @__PURE__ */ o(g, { className: "expand-icon", icon: Q, size: "xxxs" })
109
+ /* @__PURE__ */ o(g, { className: "expand-icon", icon: H.faChevronDown, size: "xxxs" })
109
110
  ] })
110
111
  }
111
112
  )
@@ -113,5 +114,5 @@ const re = (x) => {
113
114
  );
114
115
  };
115
116
  export {
116
- re as SelectTags
117
+ se as SelectTags
117
118
  };
@@ -2,11 +2,11 @@ import { jsx as u } from "react/jsx-runtime";
2
2
  import { Popover as x } from "./bundle.es6.js";
3
3
  import { Input as A } from "./bundle.es9.js";
4
4
  import { useState as M, useRef as j } from "react";
5
- import { Calendar as E } from "./bundle.es43.js";
6
- import { useDayDisableCheker as N } from "./bundle.es44.js";
5
+ import { Calendar as E } from "./bundle.es46.js";
6
+ import { useDayDisableCheker as N } from "./bundle.es47.js";
7
7
  import { getNum as f, formatTime as v } from "@companix/utils-js";
8
- import { removeDigits as O } from "./bundle.es45.js";
9
- import { SelectRightElements as Y } from "./bundle.es46.js";
8
+ import { removeDigits as O } from "./bundle.es48.js";
9
+ import { SelectRightElements as Y } from "./bundle.es49.js";
10
10
  const i = {
11
11
  char: "-",
12
12
  toString: (e) => {
@@ -1,8 +1,8 @@
1
1
  import { jsxs as D, jsx as h } from "react/jsx-runtime";
2
2
  import { useMemo as M, useEffect as C } from "react";
3
3
  import { Select as c } from "./bundle.es8.js";
4
- import { createDateValidation as O, getMonthMaxDay as T } from "./bundle.es45.js";
5
- import { defaultMin as j, defaultMax as N, useCalendarOptions as V } from "./bundle.es47.js";
4
+ import { createDateValidation as O, getMonthMaxDay as T } from "./bundle.es48.js";
5
+ import { defaultMin as j, defaultMax as N, useCalendarOptions as V } from "./bundle.es50.js";
6
6
  const B = ({
7
7
  min: o = j,
8
8
  max: e = N,
@@ -1,8 +1,8 @@
1
1
  import { jsx as g } from "react/jsx-runtime";
2
2
  import { useRef as _, useMemo as b, useState as P, useEffect as j } from "react";
3
3
  import { getNum as v } from "@companix/utils-js";
4
- import { getTimesOptions as D, getTimeValue as A, removeDigits as W, convertTimeToOption as q } from "./bundle.es45.js";
5
- import { SelectRightElements as w } from "./bundle.es46.js";
4
+ import { getTimesOptions as D, getTimeValue as A, removeDigits as W, convertTimeToOption as q } from "./bundle.es48.js";
5
+ import { SelectRightElements as w } from "./bundle.es49.js";
6
6
  import { Select as y } from "./bundle.es8.js";
7
7
  import { Input as z } from "./bundle.es9.js";
8
8
  const r = {
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { hash as m } from "@companix/utils-js";
3
3
  import { useRef as n, useMemo as s } from "react";
4
- import { Viewport as u } from "./bundle.es48.js";
4
+ import { Viewport as u } from "./bundle.es51.js";
5
5
  const h = (t = {}) => {
6
6
  const e = {
7
7
  emit: (r) => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import { hash as d } from "@companix/utils-js";
3
- import { Viewport as s } from "./bundle.es49.js";
3
+ import { Viewport as s } from "./bundle.es52.js";
4
4
  import { useRef as c, useMemo as l } from "react";
5
5
  const f = (i = {}) => {
6
6
  const t = {
@@ -4,7 +4,7 @@ import { attr as l } from "@companix/utils-browser";
4
4
  import { forwardRef as y, useRef as S, useCallback as T } from "react";
5
5
  import { VisuallyHidden as j } from "@radix-ui/react-visually-hidden";
6
6
  import { mergeRefs as w } from "react-merge-refs";
7
- import { SelectRightElements as z } from "./bundle.es46.js";
7
+ import { SelectRightElements as z } from "./bundle.es49.js";
8
8
  const V = y(
9
9
  ({
10
10
  required: a,
@@ -2,7 +2,7 @@ import { jsx as u } from "react/jsx-runtime";
2
2
  import { forwardRef as m, useCallback as i } from "react";
3
3
  import c from "react-input-mask";
4
4
  const I = m(
5
- ({ mask: r, maskChar: f, onChange: n, onValueChange: o, ...a }, e) => {
5
+ ({ mask: r, maskChar: f = "_", onChange: n, onValueChange: o, ...a }, e) => {
6
6
  const p = i(
7
7
  (t) => {
8
8
  n?.(t), o?.(t.target.value, t.target);
@@ -2,7 +2,7 @@ import { jsxs as b, jsx as o } from "react/jsx-runtime";
2
2
  import h from "classnames";
3
3
  import { attr as e } from "@companix/utils-browser";
4
4
  import { forwardRef as x } from "react";
5
- import { useInputPadding as N } from "./bundle.es52.js";
5
+ import { useInputPadding as N } from "./bundle.es61.js";
6
6
  const v = x(
7
7
  ({
8
8
  required: s,
@@ -1,7 +1,5 @@
1
- import { useEffect as r } from "react";
2
- const n = ({ callback: e }) => (r(() => () => {
3
- e?.();
4
- }, []), null);
1
+ import { __require as r } from "./bundle.es53.js";
2
+ var a = /* @__PURE__ */ r();
5
3
  export {
6
- n as RemoveListener
4
+ a as f
7
5
  };
@@ -1,16 +1,7 @@
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 { useEffect as r } from "react";
2
+ const n = ({ callback: e }) => (r(() => () => {
3
+ e?.();
4
+ }, []), null);
14
5
  export {
15
- d as useLoading
6
+ n as RemoveListener
16
7
  };
@@ -1,16 +1,16 @@
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];
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
13
  };
14
14
  export {
15
- f as useResizeTextarea
15
+ d as useLoading
16
16
  };