@companix/uikit 0.1.15 → 0.1.16

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 (83) hide show
  1. package/dist/DrawerMobile/MobileDrawer.scss +71 -0
  2. package/dist/DrawerMobile/constants.d.ts +9 -0
  3. package/dist/DrawerMobile/context.d.ts +18 -0
  4. package/dist/DrawerMobile/helpers.d.ts +13 -0
  5. package/dist/DrawerMobile/index.d.ts +17 -0
  6. package/dist/DrawerMobile/types.d.ts +5 -0
  7. package/dist/DrawerMobile/use-prevent-scroll.d.ts +5 -0
  8. package/dist/Popup/index.d.ts +4 -2
  9. package/dist/__helpers/createPopupRegistry.d.ts +4 -0
  10. package/dist/bundle.es.js +112 -109
  11. package/dist/bundle.es10.js +1 -1
  12. package/dist/bundle.es13.js +4 -4
  13. package/dist/bundle.es14.js +4 -4
  14. package/dist/bundle.es15.js +2 -2
  15. package/dist/bundle.es16.js +1 -1
  16. package/dist/bundle.es17.js +1 -1
  17. package/dist/bundle.es19.js +1 -1
  18. package/dist/bundle.es22.js +1 -1
  19. package/dist/bundle.es23.js +260 -13
  20. package/dist/bundle.es24.js +14 -21
  21. package/dist/bundle.es25.js +20 -37
  22. package/dist/bundle.es26.js +38 -21
  23. package/dist/bundle.es27.js +20 -18
  24. package/dist/bundle.es28.js +18 -20
  25. package/dist/bundle.es29.js +20 -43
  26. package/dist/bundle.es30.js +37 -114
  27. package/dist/bundle.es31.js +119 -72
  28. package/dist/bundle.es32.js +68 -38
  29. package/dist/bundle.es33.js +42 -10
  30. package/dist/bundle.es34.js +11 -85
  31. package/dist/bundle.es35.js +85 -19
  32. package/dist/bundle.es36.js +20 -7
  33. package/dist/bundle.es37.js +7 -3
  34. package/dist/bundle.es38.js +3 -23
  35. package/dist/bundle.es39.js +16 -45
  36. package/dist/bundle.es40.js +51 -56
  37. package/dist/bundle.es41.js +57 -162
  38. package/dist/bundle.es42.js +160 -79
  39. package/dist/bundle.es43.js +81 -7
  40. package/dist/bundle.es44.js +7 -35
  41. package/dist/bundle.es45.js +33 -20
  42. package/dist/bundle.es46.js +19 -47
  43. package/dist/bundle.es47.js +49 -11
  44. package/dist/bundle.es48.js +11 -13
  45. package/dist/bundle.es49.js +13 -13
  46. package/dist/bundle.es50.js +13 -30
  47. package/dist/bundle.es51.js +29 -25
  48. package/dist/bundle.es52.js +17 -29
  49. package/dist/bundle.es53.js +36 -48
  50. package/dist/bundle.es54.js +49 -50
  51. package/dist/bundle.es55.js +56 -8
  52. package/dist/bundle.es56.js +8 -26
  53. package/dist/bundle.es57.js +27 -5
  54. package/dist/bundle.es58.js +5 -66
  55. package/dist/bundle.es59.js +66 -23
  56. package/dist/bundle.es60.js +22 -23
  57. package/dist/bundle.es61.js +24 -88
  58. package/dist/bundle.es62.js +88 -18
  59. package/dist/bundle.es63.js +17 -92
  60. package/dist/bundle.es64.js +92 -73
  61. package/dist/bundle.es65.js +73 -23
  62. package/dist/bundle.es66.js +20 -35
  63. package/dist/bundle.es67.js +37 -68
  64. package/dist/bundle.es68.js +23 -10
  65. package/dist/bundle.es69.js +78 -42
  66. package/dist/bundle.es70.js +93 -33
  67. package/dist/bundle.es71.js +10 -66
  68. package/dist/bundle.es72.js +69 -40
  69. package/dist/bundle.es73.js +10 -14
  70. package/dist/bundle.es74.js +43 -32
  71. package/dist/bundle.es75.js +32 -69
  72. package/dist/bundle.es76.js +65 -74
  73. package/dist/bundle.es77.js +39 -47
  74. package/dist/bundle.es78.js +14 -13
  75. package/dist/bundle.es79.js +32 -14
  76. package/dist/bundle.es80.js +72 -0
  77. package/dist/bundle.es81.js +77 -0
  78. package/dist/bundle.es82.js +51 -0
  79. package/dist/bundle.es83.js +16 -0
  80. package/dist/bundle.es84.js +16 -0
  81. package/dist/index.d.ts +3 -1
  82. package/dist/index.scss +1 -0
  83. package/package.json +1 -1
@@ -1,123 +1,46 @@
1
- import { jsx as u } from "react/jsx-runtime";
2
- import { Popover as T } from "./bundle.es11.js";
3
- import { Input as w } from "./bundle.es15.js";
4
- import { useState as A, useRef as j } from "react";
5
- import { Calendar as E } from "./bundle.es67.js";
6
- import { useDayDisableCheker as N } from "./bundle.es58.js";
7
- import { getNum as h, formatTime as v } from "@companix/utils-js";
8
- import { removeDigits as O } from "./bundle.es64.js";
9
- import { SelectRightElements as Y } from "./bundle.es68.js";
10
- const i = {
11
- char: "-",
12
- toString: (e) => {
13
- if (e) {
14
- const n = v(e.getDate()), r = v(e.getMonth() + 1), l = e.getFullYear();
15
- return [n, r, l].join(i.char);
16
- }
17
- return "";
18
- },
19
- toValue: (e) => {
20
- const n = e.split(i.char);
21
- if (n.length === 3) {
22
- const [r, l, a] = [h(n[0]), h(n[1]), h(n[2])];
23
- if (r && l && a) {
24
- const o = new Date(a, l - 1, r);
25
- if (o.getFullYear() === a && o.getDate() === r && o.getMonth() === l - 1)
26
- return o;
27
- }
28
- }
29
- return null;
30
- }
31
- }, U = (e) => {
32
- const {
33
- clearButton: n,
34
- clearButtonIcon: r,
35
- children: l,
36
- disabled: a,
37
- // calendar props
38
- value: o,
39
- enableTime: y,
40
- disablePickers: I,
41
- showNeighboringMonth: P,
42
- onChange: c,
43
- shouldDisableDate: g,
44
- viewDate: S,
45
- disablePast: d,
46
- disableFuture: D,
47
- minDateTime: C,
48
- maxDateTime: b,
49
- // input props
50
- ...V
51
- } = e, [m, s] = A(() => i.toString(o ?? null)), p = j(null), k = N({
52
- disableFuture: D,
53
- disablePast: d,
54
- shouldDisableDate: g,
55
- minDateTime: C,
56
- maxDateTime: b
57
- }), B = (t) => {
58
- a || p.current && p.current.getAttribute("data-state") === "open" && t.preventDefault();
59
- }, F = (t) => {
60
- t.stopPropagation(), s(""), c?.(null);
61
- }, x = (t) => {
62
- s(t);
63
- const f = i.toValue(t);
64
- f && !k(f) && c?.(f);
65
- }, M = () => {
66
- const t = i.toValue(m);
67
- (!t || k(t)) && s(i.toString(o ?? null));
68
- }, R = (t) => {
69
- c?.(t), s(i.toString(t));
70
- };
71
- return /* @__PURE__ */ u(
72
- T,
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import u from "classnames";
3
+ import { useResizeTextarea as z } from "./bundle.es49.js";
4
+ import { attr as e, callMultiple as R } from "@companix/utils-browser";
5
+ import { useEffect as T } from "react";
6
+ import { mergeRefs as g } from "react-merge-refs";
7
+ const E = ({
8
+ onResize: f,
9
+ grow: t = !1,
10
+ value: a,
11
+ onChange: i,
12
+ disabled: o,
13
+ required: s,
14
+ rows: l = 2,
15
+ fill: p = !1,
16
+ textAreaRef: c,
17
+ className: n,
18
+ ...d
19
+ }) => {
20
+ const [x, r] = z(f, t);
21
+ return T(r, [r, a]), /* @__PURE__ */ m(
22
+ "div",
73
23
  {
74
- minimal: !0,
75
- ref: p,
76
- sideOffset: 0,
77
- onOpenAutoFocus: (t) => t.preventDefault(),
78
- onCloseAutoFocus: (t) => t.preventDefault(),
79
- disabled: a,
80
- fitMaxHeight: !1,
81
- content: () => /* @__PURE__ */ u(
82
- E,
83
- {
84
- value: o,
85
- disablePast: d,
86
- disableFuture: D,
87
- enableTime: y,
88
- disablePickers: I,
89
- showNeighboringMonth: P,
90
- onChange: R,
91
- shouldDisableDate: g,
92
- viewDate: S,
93
- minDateTime: C,
94
- maxDateTime: b
95
- }
96
- ),
97
- children: /* @__PURE__ */ u(
98
- w,
24
+ className: "form form-textarea",
25
+ "data-required": e(s),
26
+ "data-disabled": e(o),
27
+ "data-fill": e(p),
28
+ children: /* @__PURE__ */ m(
29
+ "textarea",
99
30
  {
100
- ...V,
101
- value: m,
102
- disabled: a,
103
- onClick: B,
104
- onValueChange: x,
105
- onBlur: M,
106
- mask: "99-99-9999",
107
- rightElement: /* @__PURE__ */ u(
108
- Y,
109
- {
110
- clearButton: n,
111
- clearButtonIcon: r,
112
- value: !!O(m, ["-", "_"]),
113
- onClear: F
114
- }
115
- )
31
+ className: u("form-input", n),
32
+ "data-grow": e(t),
33
+ value: a,
34
+ ref: g([c, x]),
35
+ rows: l,
36
+ disabled: o,
37
+ onChange: R(i, r),
38
+ ...d
116
39
  }
117
40
  )
118
41
  }
119
42
  );
120
43
  };
121
44
  export {
122
- U as DatePicker
45
+ E as TextArea
123
46
  };
@@ -1,76 +1,123 @@
1
- import { jsxs as D, jsx as h } from "react/jsx-runtime";
2
- import { useMemo as M, useEffect as C } from "react";
3
- import { Select as c } from "./bundle.es13.js";
4
- import { createDateValidation as O, getMonthMaxDay as T } from "./bundle.es64.js";
5
- import { defaultMin as j, defaultMax as N, useCalendarOptions as V } from "./bundle.es69.js";
6
- const B = ({
7
- min: o = j,
8
- max: e = N,
9
- disabled: r,
10
- value: a,
11
- noDaySelect: g,
12
- noYearSelect: u,
13
- onChange: l,
14
- required: m,
15
- size: i
16
- }) => {
17
- const d = M(() => O({ min: o, max: e }), [o, e]);
18
- C(() => {
19
- const t = d(a);
20
- t && l(t);
21
- }, [d, a]);
22
- const { years: p, months: w, days: f } = V({ min: o, max: e, now: a }), s = (t, x) => {
23
- const n = { ...a };
24
- n[t] = x;
25
- const y = T(n.month, n.year);
26
- n.day = n.day > y ? y : n.day, l(n);
27
- };
28
- return /* @__PURE__ */ D("div", { className: "data-input", children: [
29
- !u && p.length > 0 && /* @__PURE__ */ h(
30
- c,
31
- {
32
- placeholder: "Год",
33
- options: p,
34
- onChange: (t) => s("year", t),
35
- value: a.year,
36
- required: m,
37
- disabled: r,
38
- size: i,
39
- minimalOptions: !0,
40
- matchTarget: "min-width"
41
- }
42
- ),
43
- /* @__PURE__ */ h(
44
- c,
45
- {
46
- placeholder: "Месяц",
47
- className: "w-full",
48
- options: w,
49
- onChange: (t) => s("month", t),
50
- value: a.month,
51
- disabled: r,
52
- required: m,
53
- size: i,
54
- minimalOptions: !0,
55
- matchTarget: "min-width"
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { Popover as T } from "./bundle.es11.js";
3
+ import { Input as w } from "./bundle.es15.js";
4
+ import { useState as A, useRef as j } from "react";
5
+ import { Calendar as E } from "./bundle.es72.js";
6
+ import { useDayDisableCheker as N } from "./bundle.es59.js";
7
+ import { getNum as h, formatTime as v } from "@companix/utils-js";
8
+ import { removeDigits as O } from "./bundle.es65.js";
9
+ import { SelectRightElements as Y } from "./bundle.es73.js";
10
+ const i = {
11
+ char: "-",
12
+ toString: (e) => {
13
+ if (e) {
14
+ const n = v(e.getDate()), r = v(e.getMonth() + 1), l = e.getFullYear();
15
+ return [n, r, l].join(i.char);
16
+ }
17
+ return "";
18
+ },
19
+ toValue: (e) => {
20
+ const n = e.split(i.char);
21
+ if (n.length === 3) {
22
+ const [r, l, a] = [h(n[0]), h(n[1]), h(n[2])];
23
+ if (r && l && a) {
24
+ const o = new Date(a, l - 1, r);
25
+ if (o.getFullYear() === a && o.getDate() === r && o.getMonth() === l - 1)
26
+ return o;
56
27
  }
57
- ),
58
- !g && /* @__PURE__ */ h(
59
- c,
60
- {
61
- placeholder: "День",
62
- options: f,
63
- disabled: r || f.length === 0,
64
- onChange: (t) => s("day", t),
65
- value: a.day,
66
- required: m,
67
- size: i,
68
- minimalOptions: !0,
69
- matchTarget: "min-width"
70
- }
71
- )
72
- ] });
28
+ }
29
+ return null;
30
+ }
31
+ }, U = (e) => {
32
+ const {
33
+ clearButton: n,
34
+ clearButtonIcon: r,
35
+ children: l,
36
+ disabled: a,
37
+ // calendar props
38
+ value: o,
39
+ enableTime: y,
40
+ disablePickers: I,
41
+ showNeighboringMonth: P,
42
+ onChange: c,
43
+ shouldDisableDate: g,
44
+ viewDate: S,
45
+ disablePast: d,
46
+ disableFuture: D,
47
+ minDateTime: C,
48
+ maxDateTime: b,
49
+ // input props
50
+ ...V
51
+ } = e, [m, s] = A(() => i.toString(o ?? null)), p = j(null), k = N({
52
+ disableFuture: D,
53
+ disablePast: d,
54
+ shouldDisableDate: g,
55
+ minDateTime: C,
56
+ maxDateTime: b
57
+ }), B = (t) => {
58
+ a || p.current && p.current.getAttribute("data-state") === "open" && t.preventDefault();
59
+ }, F = (t) => {
60
+ t.stopPropagation(), s(""), c?.(null);
61
+ }, x = (t) => {
62
+ s(t);
63
+ const f = i.toValue(t);
64
+ f && !k(f) && c?.(f);
65
+ }, M = () => {
66
+ const t = i.toValue(m);
67
+ (!t || k(t)) && s(i.toString(o ?? null));
68
+ }, R = (t) => {
69
+ c?.(t), s(i.toString(t));
70
+ };
71
+ return /* @__PURE__ */ u(
72
+ T,
73
+ {
74
+ minimal: !0,
75
+ ref: p,
76
+ sideOffset: 0,
77
+ onOpenAutoFocus: (t) => t.preventDefault(),
78
+ onCloseAutoFocus: (t) => t.preventDefault(),
79
+ disabled: a,
80
+ fitMaxHeight: !1,
81
+ content: () => /* @__PURE__ */ u(
82
+ E,
83
+ {
84
+ value: o,
85
+ disablePast: d,
86
+ disableFuture: D,
87
+ enableTime: y,
88
+ disablePickers: I,
89
+ showNeighboringMonth: P,
90
+ onChange: R,
91
+ shouldDisableDate: g,
92
+ viewDate: S,
93
+ minDateTime: C,
94
+ maxDateTime: b
95
+ }
96
+ ),
97
+ children: /* @__PURE__ */ u(
98
+ w,
99
+ {
100
+ ...V,
101
+ value: m,
102
+ disabled: a,
103
+ onClick: B,
104
+ onValueChange: x,
105
+ onBlur: M,
106
+ mask: "99-99-9999",
107
+ rightElement: /* @__PURE__ */ u(
108
+ Y,
109
+ {
110
+ clearButton: n,
111
+ clearButtonIcon: r,
112
+ value: !!O(m, ["-", "_"]),
113
+ onClear: F
114
+ }
115
+ )
116
+ }
117
+ )
118
+ }
119
+ );
73
120
  };
74
121
  export {
75
- B as DateInput
122
+ U as DatePicker
76
123
  };
@@ -1,46 +1,76 @@
1
- import { jsxs as x, jsx as c } from "react/jsx-runtime";
2
- import { useRef as s, useMemo as u } from "react";
3
- const g = ({
4
- onChange: o,
5
- disabled: n,
6
- children: p,
7
- multiple: i,
8
- mimes: r,
9
- className: a
1
+ import { jsxs as D, jsx as h } from "react/jsx-runtime";
2
+ import { useMemo as M, useEffect as C } from "react";
3
+ import { Select as c } from "./bundle.es13.js";
4
+ import { createDateValidation as O, getMonthMaxDay as T } from "./bundle.es65.js";
5
+ import { defaultMin as j, defaultMax as N, useCalendarOptions as V } from "./bundle.es74.js";
6
+ const B = ({
7
+ min: o = j,
8
+ max: e = N,
9
+ disabled: r,
10
+ value: a,
11
+ noDaySelect: g,
12
+ noYearSelect: u,
13
+ onChange: l,
14
+ required: m,
15
+ size: i
10
16
  }) => {
11
- const t = s(null), l = (e) => {
12
- n || (e.target.files && o?.(Array.from(e.target.files)), t.current && (t.current.value = ""));
13
- }, f = u(() => {
14
- if (r)
15
- return r.map((e) => `${e}/*`).join(",");
16
- }, [r]);
17
- return /* @__PURE__ */ x("label", { className: a, children: [
18
- p,
19
- /* @__PURE__ */ c(
20
- "input",
17
+ const d = M(() => O({ min: o, max: e }), [o, e]);
18
+ C(() => {
19
+ const t = d(a);
20
+ t && l(t);
21
+ }, [d, a]);
22
+ const { years: p, months: w, days: f } = V({ min: o, max: e, now: a }), s = (t, x) => {
23
+ const n = { ...a };
24
+ n[t] = x;
25
+ const y = T(n.month, n.year);
26
+ n.day = n.day > y ? y : n.day, l(n);
27
+ };
28
+ return /* @__PURE__ */ D("div", { className: "data-input", children: [
29
+ !u && p.length > 0 && /* @__PURE__ */ h(
30
+ c,
21
31
  {
22
- ref: t,
23
- type: "file",
24
- multiple: i,
25
- accept: f,
26
- onChange: l,
27
- disabled: n,
28
- style: {
29
- position: "fixed",
30
- border: "0px",
31
- width: "1px",
32
- height: "1px",
33
- padding: "0px",
34
- margin: "-1px",
35
- overflow: "hidden",
36
- clip: "rect(0px, 0px, 0px, 0px)",
37
- whiteSpace: "nowrap",
38
- overflowWrap: "normal"
39
- }
32
+ placeholder: "Год",
33
+ options: p,
34
+ onChange: (t) => s("year", t),
35
+ value: a.year,
36
+ required: m,
37
+ disabled: r,
38
+ size: i,
39
+ minimalOptions: !0,
40
+ matchTarget: "min-width"
41
+ }
42
+ ),
43
+ /* @__PURE__ */ h(
44
+ c,
45
+ {
46
+ placeholder: "Месяц",
47
+ className: "w-full",
48
+ options: w,
49
+ onChange: (t) => s("month", t),
50
+ value: a.month,
51
+ disabled: r,
52
+ required: m,
53
+ size: i,
54
+ minimalOptions: !0,
55
+ matchTarget: "min-width"
56
+ }
57
+ ),
58
+ !g && /* @__PURE__ */ h(
59
+ c,
60
+ {
61
+ placeholder: "День",
62
+ options: f,
63
+ disabled: r || f.length === 0,
64
+ onChange: (t) => s("day", t),
65
+ value: a.day,
66
+ required: m,
67
+ size: i,
68
+ minimalOptions: !0,
69
+ matchTarget: "min-width"
40
70
  }
41
71
  )
42
72
  ] });
43
73
  };
44
74
  export {
45
- g as FileOverlay
75
+ B as DateInput
46
76
  };
@@ -1,14 +1,46 @@
1
- import { jsxs as p, jsx as a } from "react/jsx-runtime";
2
- import t from "classnames";
3
- import { attr as n } from "@companix/utils-browser";
4
- const u = (o) => {
5
- const { fill: e, className: l, label: c, children: i, caption: r, appearance: m = "neutral" } = o;
6
- return /* @__PURE__ */ p("div", { className: t("form-group", l), "data-fill": n(e), children: [
7
- /* @__PURE__ */ a("div", { className: "form-group-label", children: c }),
8
- i,
9
- r && /* @__PURE__ */ a("div", { className: "form-group-caption", "data-appearance": m, children: r })
1
+ import { jsxs as x, jsx as c } from "react/jsx-runtime";
2
+ import { useRef as s, useMemo as u } from "react";
3
+ const g = ({
4
+ onChange: o,
5
+ disabled: n,
6
+ children: p,
7
+ multiple: i,
8
+ mimes: r,
9
+ className: a
10
+ }) => {
11
+ const t = s(null), l = (e) => {
12
+ n || (e.target.files && o?.(Array.from(e.target.files)), t.current && (t.current.value = ""));
13
+ }, f = u(() => {
14
+ if (r)
15
+ return r.map((e) => `${e}/*`).join(",");
16
+ }, [r]);
17
+ return /* @__PURE__ */ x("label", { className: a, children: [
18
+ p,
19
+ /* @__PURE__ */ c(
20
+ "input",
21
+ {
22
+ ref: t,
23
+ type: "file",
24
+ multiple: i,
25
+ accept: f,
26
+ onChange: l,
27
+ disabled: n,
28
+ style: {
29
+ position: "fixed",
30
+ border: "0px",
31
+ width: "1px",
32
+ height: "1px",
33
+ padding: "0px",
34
+ margin: "-1px",
35
+ overflow: "hidden",
36
+ clip: "rect(0px, 0px, 0px, 0px)",
37
+ whiteSpace: "nowrap",
38
+ overflowWrap: "normal"
39
+ }
40
+ }
41
+ )
10
42
  ] });
11
43
  };
12
44
  export {
13
- u as FormGroup
45
+ g as FileOverlay
14
46
  };
@@ -1,88 +1,14 @@
1
- import { jsx as g } from "react/jsx-runtime";
2
- import { useRef as b, useMemo as I, useState as E, useCallback as A } from "react";
3
- import { getNum as S } from "@companix/utils-js";
4
- import { getTimesOptions as W, getTimeValue as q, removeDigits as w, convertTimeToOption as y } from "./bundle.es64.js";
5
- import { SelectRightElements as z } from "./bundle.es68.js";
6
- import { Select as F } from "./bundle.es13.js";
7
- import { Input as G } from "./bundle.es15.js";
8
- const o = {
9
- char: ":",
10
- toString: (s) => s ? y(s, o.char) : "",
11
- toValue: (s) => {
12
- const n = s.split(o.char);
13
- if (n.length === 2) {
14
- const [e, u] = [S(n[0]), S(n[1])];
15
- if (e !== null && u !== null && e < 24 && e >= 0 && u < 60 && u >= 0)
16
- return { hours: e, minutes: u };
17
- }
18
- return null;
19
- }
20
- }, Y = (s) => {
21
- const { value: n, onChange: e, clearButton: u, clearButtonIcon: _, disabled: a, ...T } = s, m = b(null), p = b(null), h = I(() => W(10), []), k = I(() => {
22
- if (n && !n.minutes.toString().endsWith("0")) {
23
- const t = n.hours * 6 + Math.trunc(n.minutes / 10), r = [...h];
24
- return r.splice(t + 1, 0, q(n)), r;
25
- }
26
- return h;
27
- }, [h, n]), [i, l] = E(() => o.toString(n)), v = (t) => {
28
- l(t), N(t);
29
- const r = o.toValue(t);
30
- r && e?.(r);
31
- }, x = (t) => {
32
- a || m.current && m.current.getAttribute("data-state") === "open" && t.preventDefault();
33
- }, B = () => {
34
- o.toValue(i) === null && l(o.toString(n ?? null));
35
- }, O = (t) => {
36
- e?.(o.toValue(t)), l(t);
37
- }, R = (t) => {
38
- t.stopPropagation(), l(""), e?.(null);
39
- }, N = A((t) => {
40
- if (t && t !== "__:__") {
41
- const [r, M] = t.split(":"), d = (c) => {
42
- const [C, V] = c.split(""), [j, D] = [C === "_" ? "0" : C, V === "_" ? "0" : V];
43
- return j + D;
44
- }, P = [d(r), d(M)].join(":"), f = o.toValue(P);
45
- if (f) {
46
- const c = f.hours * 6 + Math.trunc(f.minutes / 10);
47
- c !== -1 && p.current && p.current.scrollTo(c);
48
- }
49
- }
50
- }, []);
51
- return /* @__PURE__ */ g(
52
- F,
53
- {
54
- minimalOptions: !0,
55
- options: k,
56
- onChange: O,
57
- value: i,
58
- popoverRef: m,
59
- scrollRef: p,
60
- disabled: a,
61
- children: /* @__PURE__ */ g(
62
- G,
63
- {
64
- ...T,
65
- value: i,
66
- disabled: a,
67
- onClick: x,
68
- onValueChange: v,
69
- onBlur: B,
70
- mask: "99:99",
71
- placeholder: "00:00",
72
- rightElement: /* @__PURE__ */ g(
73
- z,
74
- {
75
- clearButton: u,
76
- clearButtonIcon: _,
77
- value: !!w(i, [":", "_"]),
78
- onClear: R
79
- }
80
- )
81
- }
82
- )
83
- }
84
- );
1
+ import { jsxs as p, jsx as a } from "react/jsx-runtime";
2
+ import t from "classnames";
3
+ import { attr as n } from "@companix/utils-browser";
4
+ const u = (o) => {
5
+ const { fill: e, className: l, label: c, children: i, caption: r, appearance: m = "neutral" } = o;
6
+ return /* @__PURE__ */ p("div", { className: t("form-group", l), "data-fill": n(e), children: [
7
+ /* @__PURE__ */ a("div", { className: "form-group-label", children: c }),
8
+ i,
9
+ r && /* @__PURE__ */ a("div", { className: "form-group-caption", "data-appearance": m, children: r })
10
+ ] });
85
11
  };
86
12
  export {
87
- Y as TimePicker
13
+ u as FormGroup
88
14
  };