@companix/uikit 0.0.22 → 0.0.23

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.
package/dist/bundle.es.js CHANGED
@@ -3,10 +3,10 @@ import { Spinner as p } from "./bundle.es3.js";
3
3
  import { Scrollable as x } from "./bundle.es4.js";
4
4
  import { ImitateScroll as a } from "./bundle.es5.js";
5
5
  import { Popover as l } from "./bundle.es6.js";
6
- import { Tooltip as u } from "./bundle.es7.js";
6
+ import { Tooltip as c } from "./bundle.es7.js";
7
7
  import { Select as S } from "./bundle.es8.js";
8
- import { Input as T } from "./bundle.es9.js";
9
- import { OptionItem as D } from "./bundle.es10.js";
8
+ import { Input as I } from "./bundle.es9.js";
9
+ import { OptionItem as g } from "./bundle.es10.js";
10
10
  import { NumberInput as b } from "./bundle.es11.js";
11
11
  import { OptionsList as A } from "./bundle.es12.js";
12
12
  import { ButtonGroup as w } from "./bundle.es13.js";
@@ -26,9 +26,10 @@ import { DateInput as Z } from "./bundle.es26.js";
26
26
  import { FileOverlay as $ } from "./bundle.es27.js";
27
27
  import { FormGroup as ro } from "./bundle.es28.js";
28
28
  import { TimePicker as to } from "./bundle.es29.js";
29
- import { useLocalStorage as mo } from "./bundle.es30.js";
30
- import { createAlertAgent as fo } from "./bundle.es31.js";
31
- import { createToaster as io } from "./bundle.es32.js";
29
+ import { Icon as mo } from "./bundle.es30.js";
30
+ import { useLocalStorage as fo } from "./bundle.es31.js";
31
+ import { createAlertAgent as io } from "./bundle.es32.js";
32
+ import { createToaster as no } from "./bundle.es33.js";
32
33
  export {
33
34
  j as AlertDialog,
34
35
  e as Button,
@@ -41,11 +42,12 @@ export {
41
42
  F as Drawer,
42
43
  $ as FileOverlay,
43
44
  ro as FormGroup,
45
+ mo as Icon,
44
46
  a as ImitateScroll,
45
- T as Input,
47
+ I as Input,
46
48
  z as LoadButton,
47
49
  b as NumberInput,
48
- D as OptionItem,
50
+ g as OptionItem,
49
51
  A as OptionsList,
50
52
  l as Popover,
51
53
  h as Radio,
@@ -58,8 +60,8 @@ export {
58
60
  H as Tabs,
59
61
  Q as TextArea,
60
62
  to as TimePicker,
61
- u as Tooltip,
62
- fo as createAlertAgent,
63
- io as createToaster,
64
- mo as useLocalStorage
63
+ c as Tooltip,
64
+ io as createAlertAgent,
65
+ no as createToaster,
66
+ fo as useLocalStorage
65
67
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
2
  import N from "classnames";
3
- import { Icon as v } from "./bundle.es39.js";
3
+ import { Icon as v } from "./bundle.es30.js";
4
4
  import { attr as t } from "@companix/utils-browser";
5
5
  import { forwardRef as k } from "react";
6
6
  import { f as x } from "./bundle.es40.js";
@@ -2,7 +2,7 @@ import { jsx as t } from "react/jsx-runtime";
2
2
  import C from "classnames";
3
3
  import { forwardRef as j, useRef as w } from "react";
4
4
  import { mergeRefs as y } from "react-merge-refs";
5
- import { InputContainer as F } from "./bundle.es38.js";
5
+ import { InputContainer as F } from "./bundle.es39.js";
6
6
  import { NumericFormat as V } from "react-number-format";
7
7
  const D = j(
8
8
  ({
@@ -1,6 +1,6 @@
1
1
  import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
2
  import * as t from "@radix-ui/react-checkbox";
3
- import { Icon as h } from "./bundle.es39.js";
3
+ import { Icon as h } from "./bundle.es30.js";
4
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";
@@ -1,10 +1,10 @@
1
1
  import { jsx as o, jsxs as l } from "react/jsx-runtime";
2
- import { useFroozeClosing as M } from "./bundle.es33.js";
2
+ import { useFroozeClosing as M } from "./bundle.es34.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
- import { useState as B, useRef as d, useMemo as h } from "react";
7
- import { Icon as g } from "./bundle.es39.js";
6
+ import { Icon as d } from "./bundle.es30.js";
7
+ import { useState as B, useRef as h, useMemo as g } from "react";
8
8
  import { f as H } from "./bundle.es44.js";
9
9
  import { f as Q } from "./bundle.es45.js";
10
10
  import { attr as x, getActiveElementByAnotherElement as G, contains as J } from "@companix/utils-browser";
@@ -22,14 +22,14 @@ const se = (C) => {
22
22
  inputRef: A,
23
23
  disabled: u,
24
24
  required: D
25
- } = C, [a, E] = B(""), i = d(null), w = d(null), { popoverRef: f, froozePopoverPosition: y, handleAnimationEnd: b } = M(), O = h(() => {
25
+ } = C, [a, E] = B(""), i = h(null), w = h(null), { popoverRef: f, froozePopoverPosition: y, handleAnimationEnd: b } = M(), O = g(() => {
26
26
  const e = {};
27
27
  return r.forEach((t) => {
28
28
  e[t.value] = t;
29
29
  }), e;
30
30
  }, [r]), P = (e) => n.includes(e) ? [...n] : [...n, e], T = (e) => n.filter((t) => e !== t), k = (e, t) => {
31
31
  v ? (y(), c(e), t()) : c(e);
32
- }, p = h(() => a.trim() ? r.filter(({ title: e }) => {
32
+ }, p = g(() => a.trim() ? r.filter(({ title: e }) => {
33
33
  const t = e.toLowerCase(), s = a.trim().toLowerCase();
34
34
  return t.indexOf(s) >= 0;
35
35
  }) : r, [a, r]), I = (e) => {
@@ -84,7 +84,7 @@ const se = (C) => {
84
84
  "data-readonly": x(m),
85
85
  children: n.map((e, t) => /* @__PURE__ */ l("div", { className: "tag", children: [
86
86
  /* @__PURE__ */ o("span", { className: "tag-name", children: O[e].title }),
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
+ /* @__PURE__ */ o("button", { className: "tag-close-button", onClick: (s) => $(s, e), children: /* @__PURE__ */ o(d, { className: "tag-close-icon", icon: Q.faClose, size: "xxxs" }) })
88
88
  ] }, `tag-option-${e}-${t}`))
89
89
  }
90
90
  ),
@@ -106,7 +106,7 @@ const se = (C) => {
106
106
  }
107
107
  )
108
108
  ] }),
109
- /* @__PURE__ */ o(g, { className: "expand-icon", icon: H.faChevronDown, size: "xxxs" })
109
+ /* @__PURE__ */ o(d, { className: "expand-icon", icon: H.faChevronDown, size: "xxxs" })
110
110
  ] })
111
111
  }
112
112
  )
@@ -1,13 +1,24 @@
1
- import { useState as s, useEffect as c } from "react";
2
- const l = (e, a) => {
3
- const [t, o] = s(() => {
4
- const r = localStorage.getItem(e);
5
- return r ? JSON.parse(r) : a;
6
- });
7
- return c(() => {
8
- localStorage.setItem(e, JSON.stringify(t));
9
- }, [t]), [t, o];
10
- };
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import f from "classnames";
3
+ import { forwardRef as l } from "react";
4
+ const g = l(
5
+ ({ icon: r, className: t, size: i = "m", ...e }, a) => {
6
+ const [n, c, , , m] = r.icon;
7
+ return /* @__PURE__ */ o(
8
+ "svg",
9
+ {
10
+ ref: a,
11
+ "data-prefix": r.prefix,
12
+ "data-icon": r.iconName,
13
+ viewBox: `0 0 ${n} ${c}`,
14
+ className: f(`icon icon-size-${i}`, t),
15
+ ...e,
16
+ role: "img",
17
+ children: /* @__PURE__ */ o(s, { paths: m })
18
+ }
19
+ );
20
+ }
21
+ ), s = ({ paths: r }) => Array.isArray(r) ? /* @__PURE__ */ o("g", { children: r.map((t, i) => /* @__PURE__ */ o("path", { fill: "currentColor", d: t }, `-d-${i}`)) }) : /* @__PURE__ */ o("path", { fill: "currentColor", d: r });
11
22
  export {
12
- l as useLocalStorage
23
+ g as Icon
13
24
  };
@@ -1,27 +1,13 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { hash as m } from "@companix/utils-js";
3
- import { useRef as n, useMemo as s } from "react";
4
- import { Viewport as u } from "./bundle.es51.js";
5
- const h = (t = {}) => {
6
- const e = {
7
- emit: (r) => {
8
- console.error("uninitialized", r);
9
- }
10
- };
11
- return {
12
- show: (r) => {
13
- e.emit({ ...r, id: m() });
14
- },
15
- Viewport: () => {
16
- const r = n(null);
17
- return s(() => {
18
- e.emit = (o) => {
19
- r.current && r.current.showAlert(o);
20
- };
21
- }, []), /* @__PURE__ */ i(u, { ref: r, ...t });
22
- }
23
- };
1
+ import { useState as s, useEffect as c } from "react";
2
+ const l = (e, a) => {
3
+ const [t, o] = s(() => {
4
+ const r = localStorage.getItem(e);
5
+ return r ? JSON.parse(r) : a;
6
+ });
7
+ return c(() => {
8
+ localStorage.setItem(e, JSON.stringify(t));
9
+ }, [t]), [t, o];
24
10
  };
25
11
  export {
26
- h as createAlertAgent
12
+ l as useLocalStorage
27
13
  };
@@ -1,38 +1,27 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { hash as d } from "@companix/utils-js";
3
- import { Viewport as s } from "./bundle.es52.js";
4
- import { useRef as c, useMemo as l } from "react";
5
- const f = (i = {}) => {
6
- const t = {
7
- emit: (e) => {
8
- console.error("uninitialized", e);
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { hash as m } from "@companix/utils-js";
3
+ import { useRef as n, useMemo as s } from "react";
4
+ import { Viewport as u } from "./bundle.es51.js";
5
+ const h = (t = {}) => {
6
+ const e = {
7
+ emit: (r) => {
8
+ console.error("uninitialized", r);
9
9
  }
10
10
  };
11
11
  return {
12
- send: (e) => {
13
- t.emit({ ...e, id: d() });
12
+ show: (r) => {
13
+ e.emit({ ...r, id: m() });
14
14
  },
15
- Viewport: (e = {}) => {
16
- const n = c(null);
17
- return l(() => {
18
- t.emit = (r) => {
19
- n.current && n.current.addToast(r);
15
+ Viewport: () => {
16
+ const r = n(null);
17
+ return s(() => {
18
+ e.emit = (o) => {
19
+ r.current && r.current.showAlert(o);
20
20
  };
21
- }, []), /* @__PURE__ */ a(
22
- s,
23
- {
24
- ref: n,
25
- align: e.align ?? i.align,
26
- closeIcon: e.closeIcon ?? i.closeIcon,
27
- duration: e.duration ?? i.duration,
28
- gap: e.gap ?? i.gap,
29
- side: e.side ?? i.side,
30
- swipeThreshold: e.swipeThreshold ?? i.swipeThreshold
31
- }
32
- );
21
+ }, []), /* @__PURE__ */ i(u, { ref: r, ...t });
33
22
  }
34
23
  };
35
24
  };
36
25
  export {
37
- f as createToaster
26
+ h as createAlertAgent
38
27
  };
@@ -1,26 +1,38 @@
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 a } from "react/jsx-runtime";
2
+ import { hash as d } from "@companix/utils-js";
3
+ import { Viewport as s } from "./bundle.es52.js";
4
+ import { useRef as c, useMemo as l } from "react";
5
+ const f = (i = {}) => {
6
+ const t = {
7
+ emit: (e) => {
8
+ console.error("uninitialized", e);
14
9
  }
15
- }, []), l = c(() => {
16
- r.current.cb && (r.current.cb(), r.current.cb = null);
17
- }, []);
10
+ };
18
11
  return {
19
- popoverRef: t,
20
- handleAnimationEnd: l,
21
- froozePopoverPosition: i
12
+ send: (e) => {
13
+ t.emit({ ...e, id: d() });
14
+ },
15
+ Viewport: (e = {}) => {
16
+ const n = c(null);
17
+ return l(() => {
18
+ t.emit = (r) => {
19
+ n.current && n.current.addToast(r);
20
+ };
21
+ }, []), /* @__PURE__ */ a(
22
+ s,
23
+ {
24
+ ref: n,
25
+ align: e.align ?? i.align,
26
+ closeIcon: e.closeIcon ?? i.closeIcon,
27
+ duration: e.duration ?? i.duration,
28
+ gap: e.gap ?? i.gap,
29
+ side: e.side ?? i.side,
30
+ swipeThreshold: e.swipeThreshold ?? i.swipeThreshold
31
+ }
32
+ );
33
+ }
22
34
  };
23
35
  };
24
36
  export {
25
- p as useFroozeClosing
37
+ f as createToaster
26
38
  };
@@ -1,89 +1,26 @@
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 { 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
+ };
23
+ };
87
24
  export {
88
- V as SelectInput
25
+ p as useFroozeClosing
89
26
  };
@@ -1,20 +1,89 @@
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
- };
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
+ );
18
87
  export {
19
- g as useScrollListController
88
+ V as SelectInput
20
89
  };
@@ -1,22 +1,20 @@
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
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);
16
14
  },
17
- `select-option-${l}`
18
- )) });
15
+ [t, l]
16
+ ), scrollBoxRef: l, optionsWrapperRef: t };
19
17
  };
20
18
  export {
21
- h as SelectOptions
19
+ g as useScrollListController
22
20
  };
@@ -1,26 +1,22 @@
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 { 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
+ };
24
20
  export {
25
- I as InputElement
21
+ h as SelectOptions
26
22
  };