@companix/uikit 0.0.16 → 0.0.18
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/DatePicker/index.d.ts +2 -3
- package/dist/Input/Form.scss +1 -4
- package/dist/Input/InlineInput.d.ts +0 -0
- package/dist/Input/{index.d.ts → Input.d.ts} +4 -8
- package/dist/Input/Input.scss +23 -0
- package/dist/Input/InputContainer.d.ts +11 -0
- package/dist/Input/InputElement.d.ts +7 -0
- package/dist/NumberInput/index.d.ts +2 -2
- package/dist/Select/SelectOptions.d.ts +12 -0
- package/dist/Select/SelectRight.d.ts +8 -0
- package/dist/Select/index.d.ts +4 -0
- package/dist/TimePicker/index.d.ts +10 -0
- package/dist/__hooks/use-input-padding.d.ts +5 -0
- package/dist/__hooks/use-scrollbox.d.ts +1 -1
- package/dist/__hooks/use-update.d.ts +1 -1
- package/dist/__utils/utils.d.ts +15 -1
- package/dist/bundle.es.js +51 -46
- package/dist/bundle.es10.js +1 -1
- package/dist/bundle.es14.js +1 -1
- package/dist/bundle.es16.js +37 -13
- package/dist/bundle.es19.js +1 -1
- package/dist/bundle.es20.js +1 -1
- package/dist/bundle.es23.js +1 -1
- package/dist/bundle.es24.js +2 -2
- package/dist/bundle.es25.js +93 -85
- package/dist/bundle.es26.js +67 -29
- package/dist/bundle.es27.js +34 -10
- package/dist/bundle.es28.js +11 -10
- package/dist/bundle.es29.js +82 -21
- package/dist/bundle.es30.js +10 -35
- package/dist/bundle.es31.js +21 -20
- package/dist/bundle.es32.js +36 -83
- package/dist/bundle.es33.js +23 -17
- package/dist/bundle.es34.js +87 -14
- package/dist/bundle.es35.js +18 -22
- package/dist/bundle.es36.js +20 -5
- package/dist/bundle.es37.js +24 -14
- package/dist/bundle.es38.js +39 -14
- package/dist/bundle.es39.js +20 -68
- package/dist/bundle.es40.js +5 -68
- package/dist/bundle.es41.js +13 -31
- package/dist/bundle.es42.js +14 -68
- package/dist/bundle.es43.js +66 -39
- package/dist/bundle.es44.js +67 -30
- package/dist/bundle.es45.js +69 -74
- package/dist/bundle.es46.js +10 -48
- package/dist/bundle.es47.js +45 -0
- package/dist/bundle.es48.js +34 -0
- package/dist/bundle.es49.js +70 -0
- package/dist/bundle.es50.js +77 -0
- package/dist/bundle.es51.js +51 -0
- package/dist/bundle.es52.js +16 -0
- package/dist/bundle.es53.js +45 -0
- package/dist/bundle.es54.js +16 -0
- package/dist/bundle.es8.js +54 -62
- package/dist/bundle.es9.js +35 -70
- package/dist/index.d.ts +4 -2
- package/dist/index.scss +2 -2
- package/dist/types.d.ts +4 -0
- package/package.json +2 -3
package/dist/bundle.es25.js
CHANGED
|
@@ -1,114 +1,122 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Popover as
|
|
3
|
-
import { Input as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { Popover as x } from "./bundle.es6.js";
|
|
3
|
+
import { Input as A } from "./bundle.es9.js";
|
|
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";
|
|
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";
|
|
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] = [f(n[0]), f(n[1]), f(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
|
+
}
|
|
24
28
|
}
|
|
29
|
+
return null;
|
|
25
30
|
}
|
|
26
|
-
|
|
27
|
-
}, te = (t) => {
|
|
31
|
+
}, U = (e) => {
|
|
28
32
|
const {
|
|
29
|
-
minimalOptions: i,
|
|
30
33
|
clearButton: n,
|
|
31
34
|
clearButtonIcon: r,
|
|
32
|
-
children:
|
|
35
|
+
children: l,
|
|
33
36
|
disabled: a,
|
|
34
37
|
// calendar props
|
|
35
38
|
value: o,
|
|
36
|
-
enableTime:
|
|
37
|
-
disablePickers:
|
|
38
|
-
showNeighboringMonth:
|
|
39
|
-
onChange:
|
|
40
|
-
shouldDisableDate:
|
|
41
|
-
viewDate:
|
|
42
|
-
disablePast:
|
|
43
|
-
disableFuture:
|
|
44
|
-
minDateTime:
|
|
45
|
-
maxDateTime:
|
|
39
|
+
enableTime: y,
|
|
40
|
+
disablePickers: I,
|
|
41
|
+
showNeighboringMonth: P,
|
|
42
|
+
onChange: c,
|
|
43
|
+
shouldDisableDate: d,
|
|
44
|
+
viewDate: S,
|
|
45
|
+
disablePast: g,
|
|
46
|
+
disableFuture: D,
|
|
47
|
+
minDateTime: C,
|
|
48
|
+
maxDateTime: b,
|
|
46
49
|
// input props
|
|
47
|
-
...
|
|
48
|
-
} =
|
|
49
|
-
disableFuture:
|
|
50
|
-
disablePast:
|
|
51
|
-
shouldDisableDate:
|
|
52
|
-
minDateTime:
|
|
53
|
-
maxDateTime:
|
|
54
|
-
}),
|
|
55
|
-
a || p.current && p.current.getAttribute("data-state") === "open" &&
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
const
|
|
64
|
-
(!
|
|
65
|
-
},
|
|
66
|
-
|
|
50
|
+
...V
|
|
51
|
+
} = e, [m, s] = M(() => i.toString(o ?? null)), p = j(null), k = N({
|
|
52
|
+
disableFuture: D,
|
|
53
|
+
disablePast: g,
|
|
54
|
+
shouldDisableDate: d,
|
|
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
|
+
}, R = (t) => {
|
|
62
|
+
s(t);
|
|
63
|
+
const h = i.toValue(t);
|
|
64
|
+
h && !k(h) && c?.(h);
|
|
65
|
+
}, T = () => {
|
|
66
|
+
const t = i.toValue(m);
|
|
67
|
+
(!t || k(t)) && s(i.toString(o ?? null));
|
|
68
|
+
}, w = (t) => {
|
|
69
|
+
c?.(t), s(i.toString(t));
|
|
67
70
|
};
|
|
68
|
-
return /* @__PURE__ */
|
|
69
|
-
|
|
71
|
+
return /* @__PURE__ */ u(
|
|
72
|
+
x,
|
|
70
73
|
{
|
|
71
74
|
minimal: !0,
|
|
72
75
|
ref: p,
|
|
73
76
|
sideOffset: 0,
|
|
74
|
-
onOpenAutoFocus: (
|
|
75
|
-
onCloseAutoFocus: (
|
|
77
|
+
onOpenAutoFocus: (t) => t.preventDefault(),
|
|
78
|
+
onCloseAutoFocus: (t) => t.preventDefault(),
|
|
76
79
|
disabled: a,
|
|
77
|
-
content: () => /* @__PURE__ */
|
|
78
|
-
|
|
80
|
+
content: () => /* @__PURE__ */ u(
|
|
81
|
+
E,
|
|
79
82
|
{
|
|
80
83
|
value: o,
|
|
81
|
-
disablePast:
|
|
82
|
-
disableFuture:
|
|
83
|
-
enableTime:
|
|
84
|
-
disablePickers:
|
|
85
|
-
showNeighboringMonth:
|
|
86
|
-
onChange:
|
|
87
|
-
shouldDisableDate:
|
|
88
|
-
viewDate:
|
|
89
|
-
minDateTime:
|
|
90
|
-
maxDateTime:
|
|
84
|
+
disablePast: g,
|
|
85
|
+
disableFuture: D,
|
|
86
|
+
enableTime: y,
|
|
87
|
+
disablePickers: I,
|
|
88
|
+
showNeighboringMonth: P,
|
|
89
|
+
onChange: w,
|
|
90
|
+
shouldDisableDate: d,
|
|
91
|
+
viewDate: S,
|
|
92
|
+
minDateTime: C,
|
|
93
|
+
maxDateTime: b
|
|
91
94
|
}
|
|
92
95
|
),
|
|
93
|
-
children: /* @__PURE__ */
|
|
94
|
-
|
|
96
|
+
children: /* @__PURE__ */ u(
|
|
97
|
+
A,
|
|
95
98
|
{
|
|
96
|
-
...
|
|
99
|
+
...V,
|
|
97
100
|
value: m,
|
|
98
101
|
disabled: a,
|
|
99
|
-
onClick:
|
|
100
|
-
onValueChange:
|
|
101
|
-
onBlur:
|
|
102
|
+
onClick: B,
|
|
103
|
+
onValueChange: R,
|
|
104
|
+
onBlur: T,
|
|
102
105
|
mask: "99-99-9999",
|
|
103
|
-
rightElement: /* @__PURE__ */
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
rightElement: /* @__PURE__ */ u(
|
|
107
|
+
Y,
|
|
108
|
+
{
|
|
109
|
+
clearButton: n,
|
|
110
|
+
clearButtonIcon: r,
|
|
111
|
+
value: !!O(m, ["-", "_"]),
|
|
112
|
+
onClear: F
|
|
113
|
+
}
|
|
114
|
+
)
|
|
107
115
|
}
|
|
108
116
|
)
|
|
109
117
|
}
|
|
110
118
|
);
|
|
111
|
-
}
|
|
119
|
+
};
|
|
112
120
|
export {
|
|
113
|
-
|
|
121
|
+
U as DatePicker
|
|
114
122
|
};
|
package/dist/bundle.es26.js
CHANGED
|
@@ -1,38 +1,76 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
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.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";
|
|
6
|
+
const B = ({
|
|
7
|
+
min: o = j,
|
|
8
|
+
max: e = N,
|
|
6
9
|
disabled: r,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
value: a,
|
|
11
|
+
noDaySelect: g,
|
|
12
|
+
noYearSelect: u,
|
|
13
|
+
onChange: l,
|
|
14
|
+
required: m,
|
|
15
|
+
size: i
|
|
11
16
|
}) => {
|
|
12
|
-
const
|
|
13
|
-
|
|
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);
|
|
14
27
|
};
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"input",
|
|
28
|
+
return /* @__PURE__ */ D("div", { className: "data-input", children: [
|
|
29
|
+
!u && p.length > 0 && /* @__PURE__ */ h(
|
|
30
|
+
c,
|
|
19
31
|
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
accept: (l ?? []).join(", "),
|
|
30
|
-
onChange: u,
|
|
31
|
-
disabled: r
|
|
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"
|
|
32
41
|
}
|
|
33
|
-
)
|
|
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"
|
|
70
|
+
}
|
|
71
|
+
)
|
|
34
72
|
] });
|
|
35
73
|
};
|
|
36
74
|
export {
|
|
37
|
-
|
|
75
|
+
B as DateInput
|
|
38
76
|
};
|
package/dist/bundle.es27.js
CHANGED
|
@@ -1,14 +1,38 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { VisuallyHidden as s } from "@radix-ui/react-visually-hidden";
|
|
3
|
+
import { useRef as p } from "react";
|
|
4
|
+
const d = ({
|
|
5
|
+
onChange: n,
|
|
6
|
+
disabled: r,
|
|
7
|
+
mimes: l,
|
|
8
|
+
children: a,
|
|
9
|
+
multiple: i,
|
|
10
|
+
className: f
|
|
11
|
+
}) => {
|
|
12
|
+
const e = p(null), u = (t) => {
|
|
13
|
+
r || (t.target.files && n?.(Array.from(t.target.files)), e.current && (e.current.value = ""));
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ c("label", { className: f, children: [
|
|
16
|
+
a,
|
|
17
|
+
/* @__PURE__ */ o(s, { asChild: !0, children: /* @__PURE__ */ o(
|
|
18
|
+
"input",
|
|
19
|
+
{
|
|
20
|
+
ref: e,
|
|
21
|
+
hidden: !0,
|
|
22
|
+
type: "file",
|
|
23
|
+
autoComplete: "off",
|
|
24
|
+
autoCapitalize: "none",
|
|
25
|
+
autoCorrect: "off",
|
|
26
|
+
spellCheck: "false",
|
|
27
|
+
"aria-autocomplete": "none",
|
|
28
|
+
multiple: i,
|
|
29
|
+
accept: (l ?? []).join(", "),
|
|
30
|
+
onChange: u,
|
|
31
|
+
disabled: r
|
|
32
|
+
}
|
|
33
|
+
) })
|
|
10
34
|
] });
|
|
11
35
|
};
|
|
12
36
|
export {
|
|
13
|
-
|
|
37
|
+
d as FileOverlay
|
|
14
38
|
};
|
package/dist/bundle.es28.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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, apperance: 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
|
+
] });
|
|
10
11
|
};
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
u as FormGroup
|
|
13
14
|
};
|
package/dist/bundle.es29.js
CHANGED
|
@@ -1,27 +1,88 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as _, useMemo as b, useState as P, useEffect as j } from "react";
|
|
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";
|
|
6
|
+
import { Select as y } from "./bundle.es8.js";
|
|
7
|
+
import { Input as z } from "./bundle.es9.js";
|
|
8
|
+
const r = {
|
|
9
|
+
char: ":",
|
|
10
|
+
toString: (s) => s ? q(s, r.char) : "",
|
|
11
|
+
toValue: (s) => {
|
|
12
|
+
const n = s.split(r.char);
|
|
13
|
+
if (n.length === 2) {
|
|
14
|
+
const [e, i] = [v(n[0]), v(n[1])];
|
|
15
|
+
if (e !== null && i !== null && e < 24 && e >= 0 && i < 60 && i >= 0)
|
|
16
|
+
return { hours: e, minutes: i };
|
|
9
17
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return s(() => {
|
|
18
|
-
e.emit = (o) => {
|
|
19
|
-
r.current && r.current.showAlert(o);
|
|
20
|
-
};
|
|
21
|
-
}, []), /* @__PURE__ */ i(u, { ref: r, ...t });
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
}, U = (s) => {
|
|
21
|
+
const { value: n, onChange: e, clearButton: i, clearButtonIcon: I, disabled: a, ...T } = s, m = _(null), p = _(null), h = b(() => D(10), []), d = b(() => {
|
|
22
|
+
if (n && !n.minutes.toString().endsWith("0")) {
|
|
23
|
+
const t = n.hours * 6 + Math.trunc(n.minutes / 10), u = [...h];
|
|
24
|
+
return u.splice(t + 1, 0, A(n)), u;
|
|
22
25
|
}
|
|
26
|
+
return h;
|
|
27
|
+
}, [h, n]), [o, l] = P(() => r.toString(n)), x = (t) => {
|
|
28
|
+
l(t);
|
|
29
|
+
const u = r.toValue(t);
|
|
30
|
+
u && e?.(u);
|
|
31
|
+
}, B = (t) => {
|
|
32
|
+
a || m.current && m.current.getAttribute("data-state") === "open" && t.preventDefault();
|
|
33
|
+
}, O = () => {
|
|
34
|
+
r.toValue(o) === null && l(r.toString(n ?? null));
|
|
35
|
+
}, R = (t) => {
|
|
36
|
+
e?.(r.toValue(t)), l(t);
|
|
37
|
+
}, k = (t) => {
|
|
38
|
+
t.stopPropagation(), l(""), e?.(null);
|
|
23
39
|
};
|
|
40
|
+
return j(() => {
|
|
41
|
+
if (o && o !== "__:__") {
|
|
42
|
+
const [t, u] = o.split(":"), V = (c) => {
|
|
43
|
+
const [C, S] = c.split(""), [E, M] = [C === "_" ? "0" : C, S === "_" ? "0" : S];
|
|
44
|
+
return E + M;
|
|
45
|
+
}, N = [V(t), V(u)].join(":"), f = r.toValue(N);
|
|
46
|
+
if (f) {
|
|
47
|
+
const c = f.hours * 6 + Math.trunc(f.minutes / 10);
|
|
48
|
+
c !== -1 && p.current && p.current.scrollTo(c);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}, [d, o]), /* @__PURE__ */ g(
|
|
52
|
+
y,
|
|
53
|
+
{
|
|
54
|
+
minimalOptions: !0,
|
|
55
|
+
options: d,
|
|
56
|
+
onChange: R,
|
|
57
|
+
value: o,
|
|
58
|
+
popoverRef: m,
|
|
59
|
+
scrollRef: p,
|
|
60
|
+
disabled: a,
|
|
61
|
+
children: /* @__PURE__ */ g(
|
|
62
|
+
z,
|
|
63
|
+
{
|
|
64
|
+
...T,
|
|
65
|
+
value: o,
|
|
66
|
+
disabled: a,
|
|
67
|
+
onClick: B,
|
|
68
|
+
onValueChange: x,
|
|
69
|
+
onBlur: O,
|
|
70
|
+
mask: "99:99",
|
|
71
|
+
placeholder: "00:00",
|
|
72
|
+
rightElement: /* @__PURE__ */ g(
|
|
73
|
+
w,
|
|
74
|
+
{
|
|
75
|
+
clearButton: i,
|
|
76
|
+
clearButtonIcon: I,
|
|
77
|
+
value: !!W(o, [":", "_"]),
|
|
78
|
+
onClear: k
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
);
|
|
24
85
|
};
|
|
25
86
|
export {
|
|
26
|
-
|
|
87
|
+
U as TimePicker
|
|
27
88
|
};
|
package/dist/bundle.es30.js
CHANGED
|
@@ -1,38 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
return {
|
|
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
|
-
}
|
|
34
|
-
};
|
|
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];
|
|
35
10
|
};
|
|
36
11
|
export {
|
|
37
|
-
|
|
12
|
+
l as useLocalStorage
|
|
38
13
|
};
|
package/dist/bundle.es31.js
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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 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.es48.js";
|
|
5
|
+
const h = (t = {}) => {
|
|
6
|
+
const e = {
|
|
7
|
+
emit: (r) => {
|
|
8
|
+
console.error("uninitialized", r);
|
|
14
9
|
}
|
|
15
|
-
}
|
|
16
|
-
r.current.cb && (r.current.cb(), r.current.cb = null);
|
|
17
|
-
}, []);
|
|
10
|
+
};
|
|
18
11
|
return {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
+
}
|
|
22
23
|
};
|
|
23
24
|
};
|
|
24
25
|
export {
|
|
25
|
-
|
|
26
|
+
h as createAlertAgent
|
|
26
27
|
};
|