@companix/uikit 0.0.28 → 0.0.30

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 (53) hide show
  1. package/dist/ButtonGroup/index.d.ts +1 -2
  2. package/dist/Checkbox/index.d.ts +1 -1
  3. package/dist/Countdown/index.d.ts +1 -2
  4. package/dist/DateInput/index.d.ts +2 -2
  5. package/dist/DatePicker/index.d.ts +1 -2
  6. package/dist/FormGroup/index.d.ts +2 -3
  7. package/dist/Input/Input.d.ts +1 -0
  8. package/dist/LoadingButton/index.d.ts +5 -0
  9. package/dist/OptionItem/OptionItem.d.ts +1 -2
  10. package/dist/OptionItem/OptionsList.d.ts +2 -3
  11. package/dist/Radio/index.d.ts +1 -1
  12. package/dist/Scrollable/ImitateScroll.d.ts +2 -2
  13. package/dist/Select/index.d.ts +1 -1
  14. package/dist/Spinner/index.d.ts +2 -3
  15. package/dist/Tabs/index.d.ts +2 -2
  16. package/dist/TextArea/index.d.ts +1 -2
  17. package/dist/Tooltip/index.d.ts +1 -2
  18. package/dist/bundle.es.js +26 -26
  19. package/dist/bundle.es10.js +37 -32
  20. package/dist/bundle.es11.js +32 -52
  21. package/dist/bundle.es12.js +54 -14
  22. package/dist/bundle.es13.js +20 -7
  23. package/dist/bundle.es2.js +1 -1
  24. package/dist/bundle.es20.js +1 -1
  25. package/dist/bundle.es24.js +3 -3
  26. package/dist/bundle.es25.js +2 -2
  27. package/dist/bundle.es26.js +1 -1
  28. package/dist/bundle.es29.js +2 -2
  29. package/dist/bundle.es3.js +7 -10
  30. package/dist/bundle.es38.js +1 -1
  31. package/dist/bundle.es4.js +11 -85
  32. package/dist/bundle.es42.js +2 -2
  33. package/dist/bundle.es45.js +1 -1
  34. package/dist/bundle.es49.js +1 -1
  35. package/dist/bundle.es5.js +82 -82
  36. package/dist/bundle.es50.js +1 -1
  37. package/dist/bundle.es51.js +2 -2
  38. package/dist/bundle.es6.js +81 -74
  39. package/dist/bundle.es61.js +20 -76
  40. package/dist/bundle.es62.js +2 -49
  41. package/dist/bundle.es63.js +10 -10
  42. package/dist/bundle.es64.js +2 -2
  43. package/dist/bundle.es65.js +18 -17
  44. package/dist/bundle.es66.js +2 -2
  45. package/dist/bundle.es67.js +17 -18
  46. package/dist/bundle.es68.js +76 -2
  47. package/dist/bundle.es69.js +49 -20
  48. package/dist/bundle.es7.js +78 -26
  49. package/dist/bundle.es8.js +21 -70
  50. package/dist/bundle.es9.js +75 -40
  51. package/dist/index.d.ts +31 -5
  52. package/package.json +1 -1
  53. package/dist/LoadButton/index.d.ts +0 -5
@@ -1,20 +1,20 @@
1
1
  import { __exports as e } from "./bundle.es64.js";
2
- var v;
2
+ var c;
3
3
  function d() {
4
- return v ? e : (v = 1, (function(a) {
4
+ return c ? e : (c = 1, (function(a) {
5
5
  Object.defineProperty(a, "__esModule", { value: !0 });
6
- var c = "fas", n = "check", r = 448, f = 512, i = [10003, 10004], h = "f00c", u = "M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z";
6
+ var n = "fas", r = "chevron-down", v = 448, o = 512, i = [], f = "f078", h = "M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z";
7
7
  a.definition = {
8
- prefix: c,
9
- iconName: n,
8
+ prefix: n,
9
+ iconName: r,
10
10
  icon: [
11
- r,
12
- f,
11
+ v,
12
+ o,
13
13
  i,
14
- h,
15
- u
14
+ f,
15
+ h
16
16
  ]
17
- }, a.faCheck = a.definition, a.prefix = c, a.iconName = n, a.width = r, a.height = f, a.ligatures = i, a.unicode = h, a.svgPathData = u, a.aliases = i;
17
+ }, a.faChevronDown = a.definition, a.prefix = n, a.iconName = r, a.width = v, a.height = o, a.ligatures = i, a.unicode = f, a.svgPathData = h, a.aliases = i;
18
18
  })(e), e);
19
19
  }
20
20
  export {
@@ -1,4 +1,4 @@
1
- var a = {};
1
+ var o = {};
2
2
  export {
3
- a as __exports
3
+ o as __exports
4
4
  };
@@ -1,22 +1,23 @@
1
- import { __exports as e } from "./bundle.es66.js";
2
- var c;
3
- function d() {
4
- return c ? e : (c = 1, (function(a) {
5
- Object.defineProperty(a, "__esModule", { value: !0 });
6
- var n = "fas", r = "chevron-down", v = 448, o = 512, i = [], f = "f078", h = "M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z";
7
- a.definition = {
8
- prefix: n,
9
- iconName: r,
1
+ import { __exports as a } from "./bundle.es66.js";
2
+ import { __require as n } from "./bundle.es67.js";
3
+ var r;
4
+ function f() {
5
+ return r ? a : (r = 1, (function(e) {
6
+ Object.defineProperty(e, "__esModule", { value: !0 });
7
+ var i = /* @__PURE__ */ n();
8
+ e.definition = {
9
+ prefix: i.prefix,
10
+ iconName: i.iconName,
10
11
  icon: [
11
- v,
12
- o,
13
- i,
14
- f,
15
- h
12
+ i.width,
13
+ i.height,
14
+ i.aliases,
15
+ i.unicode,
16
+ i.svgPathData
16
17
  ]
17
- }, a.faChevronDown = a.definition, a.prefix = n, a.iconName = r, a.width = v, a.height = o, a.ligatures = i, a.unicode = f, a.svgPathData = h, a.aliases = i;
18
- })(e), e);
18
+ }, e.faClose = e.definition, e.prefix = i.prefix, e.iconName = i.iconName, e.width = i.width, e.height = i.height, e.ligatures = i.aliases, e.unicode = i.unicode, e.svgPathData = i.svgPathData, e.aliases = i.aliases;
19
+ })(a), a);
19
20
  }
20
21
  export {
21
- d as __require
22
+ f as __require
22
23
  };
@@ -1,4 +1,4 @@
1
- var o = {};
1
+ var a = {};
2
2
  export {
3
- o as __exports
3
+ a as __exports
4
4
  };
@@ -1,23 +1,22 @@
1
- import { __exports as a } from "./bundle.es68.js";
2
- import { __require as n } from "./bundle.es69.js";
3
- var r;
4
- function f() {
5
- return r ? a : (r = 1, (function(e) {
6
- Object.defineProperty(e, "__esModule", { value: !0 });
7
- var i = /* @__PURE__ */ n();
8
- e.definition = {
9
- prefix: i.prefix,
10
- iconName: i.iconName,
1
+ import { __exports as e } from "./bundle.es70.js";
2
+ var t;
3
+ function d() {
4
+ return t ? e : (t = 1, (function(a) {
5
+ Object.defineProperty(a, "__esModule", { value: !0 });
6
+ var r = "fas", n = "xmark", c = 384, f = 512, i = [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], u = "f00d", m = "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z";
7
+ a.definition = {
8
+ prefix: r,
9
+ iconName: n,
11
10
  icon: [
12
- i.width,
13
- i.height,
14
- i.aliases,
15
- i.unicode,
16
- i.svgPathData
11
+ c,
12
+ f,
13
+ i,
14
+ u,
15
+ m
17
16
  ]
18
- }, e.faClose = e.definition, e.prefix = i.prefix, e.iconName = i.iconName, e.width = i.width, e.height = i.height, e.ligatures = i.aliases, e.unicode = i.unicode, e.svgPathData = i.svgPathData, e.aliases = i.aliases;
19
- })(a), a);
17
+ }, a.faXmark = a.definition, a.prefix = r, a.iconName = n, a.width = c, a.height = f, a.ligatures = i, a.unicode = u, a.svgPathData = m, a.aliases = i;
18
+ })(e), e);
20
19
  }
21
20
  export {
22
- f as __require
21
+ d as __require
23
22
  };
@@ -1,4 +1,78 @@
1
- var a = {};
1
+ import { jsxs as f, jsx as o } from "react/jsx-runtime";
2
+ import { useCallback as h, useMemo as d } from "react";
3
+ import { Select as p } from "./bundle.es9.js";
4
+ import { getMonths as Y, getYears as k, DEFAULT_MAX_YEAR as u, DEFAULT_MIN_YEAR as g } from "./bundle.es53.js";
5
+ import { Icon as C } from "./bundle.es30.js";
6
+ import { f as z } from "./bundle.es72.js";
7
+ import { f as L } from "./bundle.es73.js";
8
+ import { setMonth as R, setYear as T } from "./bundle.es52.js";
9
+ const S = ({
10
+ viewDate: n,
11
+ onChange: m,
12
+ isMonthDisabled: a,
13
+ isYearDisabled: c,
14
+ onNextMonth: v,
15
+ onPrevMonth: x
16
+ }) => {
17
+ const r = n.getFullYear(), e = n.getMonth(), i = "ru", N = h(
18
+ (t) => {
19
+ m(R(n, t));
20
+ },
21
+ [m, n]
22
+ ), E = h(
23
+ (t) => {
24
+ m(T(n, t));
25
+ },
26
+ [m, n]
27
+ ), M = d(() => Y(i).map((t) => ({
28
+ ...t,
29
+ className: "capitalize",
30
+ disabled: a && a(t.value)
31
+ })), [i, a]), A = d(() => k(r, 100).map((t) => ({
32
+ ...t,
33
+ disabled: c && c(t.value)
34
+ })), [r, c]);
35
+ let l = e === 11 && r === u;
36
+ a && !l && (l = a(
37
+ e === 11 ? 0 : e + 1,
38
+ e === 11 ? Math.min(r + 1, u) : r
39
+ ));
40
+ let s = e === 0 && r === g;
41
+ return a && !s && (s = a(
42
+ e === 0 ? 11 : e - 1,
43
+ e === 0 ? Math.max(r - 1, g) : r
44
+ )), /* @__PURE__ */ f("div", { className: "calendar-header", children: [
45
+ !s && /* @__PURE__ */ o("button", { className: "calendar-navigation", "data-side": "left", onClick: x, children: /* @__PURE__ */ o(C, { icon: L.faChevronLeft }) }),
46
+ /* @__PURE__ */ f("div", { className: "calendar-pickers", children: [
47
+ /* @__PURE__ */ o(
48
+ p,
49
+ {
50
+ fill: !0,
51
+ options: A,
52
+ size: "sm",
53
+ value: r,
54
+ minimalOptions: !0,
55
+ matchTarget: "min-width",
56
+ onChange: (t) => E(t)
57
+ }
58
+ ),
59
+ /* @__PURE__ */ o(
60
+ p,
61
+ {
62
+ fill: !0,
63
+ options: M,
64
+ size: "sm",
65
+ className: "capitalize",
66
+ value: e,
67
+ minimalOptions: !0,
68
+ matchTarget: "min-width",
69
+ onChange: (t) => N(t)
70
+ }
71
+ )
72
+ ] }),
73
+ !l && /* @__PURE__ */ o("button", { className: "calendar-navigation", "data-side": "right", onClick: v, children: /* @__PURE__ */ o(C, { icon: z.faChevronRight }) })
74
+ ] });
75
+ };
2
76
  export {
3
- a as __exports
77
+ S as CalendarHeader
4
78
  };
@@ -1,22 +1,51 @@
1
- import { __exports as e } from "./bundle.es70.js";
2
- var t;
3
- function d() {
4
- return t ? e : (t = 1, (function(a) {
5
- Object.defineProperty(a, "__esModule", { value: !0 });
6
- var r = "fas", n = "xmark", c = 384, f = 512, i = [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], u = "f00d", m = "M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z";
7
- a.definition = {
8
- prefix: r,
9
- iconName: n,
10
- icon: [
11
- c,
12
- f,
13
- i,
14
- u,
15
- m
16
- ]
17
- }, a.faXmark = a.definition, a.prefix = r, a.iconName = n, a.width = c, a.height = f, a.ligatures = i, a.unicode = u, a.svgPathData = m, a.aliases = i;
18
- })(e), e);
19
- }
1
+ import { subMonths as L, addMonths as N, useDayDisableCheker as R } from "./bundle.es52.js";
2
+ import { DEFAULT_MIN_YEAR as w, DEFAULT_MAX_YEAR as A } from "./bundle.es53.js";
3
+ import { useState as U, useCallback as M } from "react";
4
+ const X = ({
5
+ value: p,
6
+ disablePast: r,
7
+ disableFuture: c,
8
+ shouldDisableDate: E,
9
+ minDateTime: l,
10
+ maxDateTime: s
11
+ }) => {
12
+ const [e, u] = U(p || /* @__PURE__ */ new Date()), _ = M(() => {
13
+ u(L(e));
14
+ }, [e]), C = M(() => {
15
+ u(N(e, 1));
16
+ }, [e]), D = R({
17
+ disableFuture: c,
18
+ disablePast: r,
19
+ shouldDisableDate: E,
20
+ minDateTime: l,
21
+ maxDateTime: s
22
+ }), k = M(
23
+ (o, t) => {
24
+ const n = /* @__PURE__ */ new Date();
25
+ t = t || e.getFullYear();
26
+ const h = l ? l.getMonth() : 0, Y = s ? s.getMonth() : 11, F = l?.getFullYear() || w, f = s?.getFullYear() || A;
27
+ let g = t >= F && t <= f ? t === F && h > o || t === f && o > Y : !0;
28
+ return c && (g = g || (t === n.getFullYear() ? o > n.getMonth() : t > n.getFullYear())), r && (g = g || (t === n.getFullYear() ? o < n.getMonth() : t < n.getFullYear())), g;
29
+ },
30
+ [c, r, e, l, s]
31
+ ), v = M(
32
+ (o) => {
33
+ const t = /* @__PURE__ */ new Date(), n = l?.getFullYear() || w, h = s?.getFullYear() || A;
34
+ let Y = n > o || o > h;
35
+ return c && (Y = Y || o > t.getFullYear()), r && (Y = Y || o < t.getFullYear()), Y;
36
+ },
37
+ [c, r, l, s]
38
+ );
39
+ return {
40
+ viewDate: e,
41
+ setViewDate: u,
42
+ setPrevMonth: _,
43
+ setNextMonth: C,
44
+ isDayDisabled: D,
45
+ isMonthDisabled: k,
46
+ isYearDisabled: v
47
+ };
48
+ };
20
49
  export {
21
- d as __require
50
+ X as useCalendar
22
51
  };
@@ -1,28 +1,80 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { useState as p } from "react";
3
- import { Popover as m } from "./bundle.es6.js";
4
- const f = ({ children: e, content: t, side: r }) => {
5
- const [s, o] = p(!1);
6
- return /* @__PURE__ */ n(
7
- m,
8
- {
9
- showArrows: !0,
10
- className: "tooltip",
11
- open: s,
12
- side: r,
13
- content: () => t,
14
- triggerProps: {
15
- onMouseEnter: () => {
16
- o(!0);
17
- },
18
- onMouseLeave: () => {
19
- o(!1);
20
- }
21
- },
22
- children: e
23
- }
24
- );
25
- };
1
+ import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
+ import * as o from "@radix-ui/react-popover";
3
+ import { attr as y } from "@companix/utils-browser";
4
+ import B from "classnames";
5
+ import { forwardRef as M, useRef as j } from "react";
6
+ const D = M((a, i) => {
7
+ const {
8
+ children: n,
9
+ sideOffset: s,
10
+ matchTarget: l,
11
+ onAnimationEnd: c,
12
+ onAnimationStart: m,
13
+ onOpenAutoFocus: d,
14
+ onCloseAutoFocus: f,
15
+ triggerRef: p,
16
+ triggerProps: h,
17
+ open: g,
18
+ content: u,
19
+ onOpenChange: v,
20
+ align: C,
21
+ disabled: w,
22
+ minimal: x,
23
+ className: L,
24
+ fitMaxHeight: N = !0,
25
+ side: O,
26
+ showArrows: A
27
+ } = a, e = j(null), P = () => {
28
+ e.current && e.current.click();
29
+ }, b = (R) => {
30
+ w && R.preventDefault();
31
+ };
32
+ return /* @__PURE__ */ t(o.Root, { open: g, onOpenChange: v, children: [
33
+ /* @__PURE__ */ r(o.Trigger, { ref: p, ...h, onClick: b, asChild: !0, children: n }),
34
+ /* @__PURE__ */ r(o.Portal, { children: /* @__PURE__ */ t(
35
+ o.Content,
36
+ {
37
+ ref: i,
38
+ className: B("popover", L),
39
+ side: O,
40
+ align: C,
41
+ "data-appearance": x ? "minimal" : "default",
42
+ "data-match-target": l,
43
+ sideOffset: s ?? 6,
44
+ avoidCollisions: !0,
45
+ arrowPadding: 10,
46
+ onAnimationStart: m,
47
+ onAnimationEnd: c,
48
+ onOpenAutoFocus: d,
49
+ onCloseAutoFocus: f,
50
+ children: [
51
+ /* @__PURE__ */ r(o.Close, { ref: e, style: { display: "none" } }),
52
+ A && /* @__PURE__ */ r(o.Arrow, { width: 30, height: 11, asChild: !0, children: /* @__PURE__ */ r("div", { className: "popover-arrow", children: /* @__PURE__ */ t("svg", { className: "popover-arrow-icon", viewBox: "0 0 30 11", width: 30, height: 11, children: [
53
+ /* @__PURE__ */ r(
54
+ "path",
55
+ {
56
+ className: "popover-arrow-border",
57
+ d: "M 18.112 -2.704 C 19.127 -3.64 19.999 -5.626 19.999 -7.001 L 19.999 18.999 C 19.999 17.621 19.131 15.642 18.111 14.702 L 10.927 8.084 C 9.69 6.944 9.694 5.05 10.927 3.914 L 18.112 -2.704 Z",
58
+ style: { transformBox: "fill-box", transformOrigin: "50% 50%" },
59
+ transform: "matrix(0, -1, 1, 0, 0.000001, 0)"
60
+ }
61
+ ),
62
+ /* @__PURE__ */ r(
63
+ "path",
64
+ {
65
+ className: "popover-arrow-fill",
66
+ d: "M 17.789 -2.965 C 19.009 -4.09 19.999 -6.341 19.999 -7.995 L 19.999 -10.001 L 19.999 19.999 L 19.999 17.994 C 19.999 16.34 19.016 14.094 17.789 12.964 L 10.606 6.348 C 9.796 5.602 9.804 4.388 10.606 3.648 L 17.789 -2.966 L 17.789 -2.965 Z",
67
+ style: { transformBox: "fill-box", transformOrigin: "50% 50%" },
68
+ transform: "matrix(0, -1, 1, 0, 0, 0)"
69
+ }
70
+ )
71
+ ] }) }) }),
72
+ /* @__PURE__ */ r("div", { className: "popover-content", "data-fit-max-height": y(N), children: u({ close: P }) })
73
+ ]
74
+ }
75
+ ) })
76
+ ] });
77
+ });
26
78
  export {
27
- f as Tooltip
79
+ D as Popover
28
80
  };
@@ -1,77 +1,28 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { useMemo as F, useImperativeHandle as I } from "react";
3
- import { Popover as T } from "./bundle.es6.js";
4
- import { useFroozeClosing as b } from "./bundle.es39.js";
5
- import { SelectInput as z } from "./bundle.es40.js";
6
- import { useScrollListController as B } from "./bundle.es41.js";
7
- import { SelectOptions as D } from "./bundle.es42.js";
8
- import { mergeRefs as j } from "react-merge-refs";
9
- const G = (a) => {
10
- const {
11
- options: n,
12
- onChange: i,
13
- value: r,
14
- minimalOptions: m,
15
- matchTarget: f = "width",
16
- children: u,
17
- disabled: p,
18
- scrollRef: d,
19
- popoverRef: v,
20
- clearButton: s,
21
- ...h
22
- } = a, t = F(() => {
23
- const o = r === null ? -1 : n.findIndex((e) => e.value === r);
24
- return {
25
- index: o,
26
- option: n[o]
27
- };
28
- }, [n, r]), x = t.option?.value ?? null, { popoverRef: R, froozePopoverPosition: C, handleAnimationEnd: g } = b(), { scrollToElement: c, optionsWrapperRef: O, scrollBoxRef: P } = B();
29
- I(d, () => ({
30
- scrollTo: (o) => c(o, "top")
31
- }));
32
- const S = (o, e) => {
33
- C(), i(o), e();
34
- }, A = (o) => {
35
- o.stopPropagation(), s && i(null);
36
- }, E = () => {
37
- t.index !== -1 && c(t.index, "center");
38
- };
39
- return /* @__PURE__ */ l(
40
- T,
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { useState as p } from "react";
3
+ import { Popover as m } from "./bundle.es7.js";
4
+ const f = ({ children: e, content: t, side: r }) => {
5
+ const [s, o] = p(!1);
6
+ return /* @__PURE__ */ n(
7
+ m,
41
8
  {
42
- minimal: !0,
43
- ref: j([R, v]),
44
- sideOffset: 0,
45
- matchTarget: f,
46
- onAnimationEnd: g,
47
- onOpenAutoFocus: (o) => o.preventDefault(),
48
- onCloseAutoFocus: (o) => o.preventDefault(),
49
- disabled: p,
50
- content: ({ close: o }) => /* @__PURE__ */ l(
51
- D,
52
- {
53
- options: n,
54
- active: x,
55
- scrollboxRef: P,
56
- optionsWrapperRef: O,
57
- minimalOptions: m,
58
- onOpened: E,
59
- onSelect: (e) => S(e, o)
9
+ showArrows: !0,
10
+ className: "tooltip",
11
+ open: s,
12
+ side: r,
13
+ content: () => t,
14
+ triggerProps: {
15
+ onMouseEnter: () => {
16
+ o(!0);
17
+ },
18
+ onMouseLeave: () => {
19
+ o(!1);
60
20
  }
61
- ),
62
- children: u ?? /* @__PURE__ */ l(
63
- z,
64
- {
65
- ...h,
66
- disabled: p,
67
- clearButton: s,
68
- value: t.option?.title ?? "",
69
- onClear: A
70
- }
71
- )
21
+ },
22
+ children: e
72
23
  }
73
24
  );
74
25
  };
75
26
  export {
76
- G as Select
27
+ f as Tooltip
77
28
  };
@@ -1,42 +1,77 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as l, useRef as b } from "react";
3
- import { mergeRefs as R } from "react-merge-refs";
4
- import { InputElement as c } from "./bundle.es43.js";
5
- import { InputContainer as x } from "./bundle.es44.js";
6
- import I from "classnames";
7
- const E = l(
8
- ({
9
- onChange: m,
10
- onValueChange: f,
11
- readOnly: i,
12
- inputClassName: o,
13
- value: p,
14
- placeholder: n,
15
- mask: d,
16
- maskChar: s,
17
- inputRef: u,
18
- ...e
19
- }, a) => {
20
- const r = b(null);
21
- return /* @__PURE__ */ t(x, { ref: a, inputRef: r, ...e, children: /* @__PURE__ */ t(
22
- c,
23
- {
24
- type: "text",
25
- ref: R([r, u]),
26
- className: I("form-input form-input-base", o),
27
- "aria-disabled": e.disabled,
28
- onChange: m,
29
- onValueChange: f,
30
- value: p,
31
- placeholder: n,
32
- disabled: e.disabled,
33
- readOnly: i,
34
- maskChar: s,
35
- mask: d
36
- }
37
- ) });
38
- }
39
- );
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { useMemo as F, useImperativeHandle as I } from "react";
3
+ import { Popover as T } from "./bundle.es7.js";
4
+ import { useFroozeClosing as b } from "./bundle.es39.js";
5
+ import { SelectInput as z } from "./bundle.es40.js";
6
+ import { useScrollListController as B } from "./bundle.es41.js";
7
+ import { SelectOptions as D } from "./bundle.es42.js";
8
+ import { mergeRefs as j } from "react-merge-refs";
9
+ const G = (a) => {
10
+ const {
11
+ options: n,
12
+ onChange: i,
13
+ value: r,
14
+ minimalOptions: m,
15
+ matchTarget: f = "width",
16
+ children: u,
17
+ disabled: p,
18
+ scrollRef: d,
19
+ popoverRef: v,
20
+ clearButton: s,
21
+ ...h
22
+ } = a, t = F(() => {
23
+ const o = r === null ? -1 : n.findIndex((e) => e.value === r);
24
+ return {
25
+ index: o,
26
+ option: n[o]
27
+ };
28
+ }, [n, r]), x = t.option?.value ?? null, { popoverRef: R, froozePopoverPosition: C, handleAnimationEnd: g } = b(), { scrollToElement: c, optionsWrapperRef: O, scrollBoxRef: P } = B();
29
+ I(d, () => ({
30
+ scrollTo: (o) => c(o, "top")
31
+ }));
32
+ const S = (o, e) => {
33
+ C(), i(o), e();
34
+ }, A = (o) => {
35
+ o.stopPropagation(), s && i(null);
36
+ }, E = () => {
37
+ t.index !== -1 && c(t.index, "center");
38
+ };
39
+ return /* @__PURE__ */ l(
40
+ T,
41
+ {
42
+ minimal: !0,
43
+ ref: j([R, v]),
44
+ sideOffset: 0,
45
+ matchTarget: f,
46
+ onAnimationEnd: g,
47
+ onOpenAutoFocus: (o) => o.preventDefault(),
48
+ onCloseAutoFocus: (o) => o.preventDefault(),
49
+ disabled: p,
50
+ content: ({ close: o }) => /* @__PURE__ */ l(
51
+ D,
52
+ {
53
+ options: n,
54
+ active: x,
55
+ scrollboxRef: P,
56
+ optionsWrapperRef: O,
57
+ minimalOptions: m,
58
+ onOpened: E,
59
+ onSelect: (e) => S(e, o)
60
+ }
61
+ ),
62
+ children: u ?? /* @__PURE__ */ l(
63
+ z,
64
+ {
65
+ ...h,
66
+ disabled: p,
67
+ clearButton: s,
68
+ value: t.option?.title ?? "",
69
+ onClear: A
70
+ }
71
+ )
72
+ }
73
+ );
74
+ };
40
75
  export {
41
- E as Input
76
+ G as Select
42
77
  };