@companix/uikit 0.1.42 → 0.1.44
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/CounterInput/CounterInput.scss +29 -0
- package/dist/CounterInput/index.d.ts +14 -0
- package/dist/Select/index.d.ts +9 -1
- package/dist/bundle.es.js +122 -120
- package/dist/bundle.es10.js +1 -1
- package/dist/bundle.es13.js +82 -76
- package/dist/bundle.es14.js +4 -4
- package/dist/bundle.es15.js +2 -2
- package/dist/bundle.es16.js +1 -1
- package/dist/bundle.es17.js +1 -1
- package/dist/bundle.es18.js +105 -19
- package/dist/bundle.es19.js +21 -34
- package/dist/bundle.es20.js +33 -24
- package/dist/bundle.es21.js +24 -45
- package/dist/bundle.es22.js +46 -26
- package/dist/bundle.es23.js +24 -259
- package/dist/bundle.es24.js +260 -13
- package/dist/bundle.es25.js +14 -21
- package/dist/bundle.es26.js +20 -37
- package/dist/bundle.es27.js +38 -21
- package/dist/bundle.es28.js +20 -18
- package/dist/bundle.es29.js +18 -21
- package/dist/bundle.es30.js +21 -43
- package/dist/bundle.es31.js +37 -114
- package/dist/bundle.es32.js +119 -72
- package/dist/bundle.es33.js +68 -38
- package/dist/bundle.es34.js +42 -10
- package/dist/bundle.es35.js +11 -85
- package/dist/bundle.es36.js +85 -19
- package/dist/bundle.es37.js +20 -7
- package/dist/bundle.es38.js +7 -3
- package/dist/bundle.es39.js +3 -23
- package/dist/bundle.es40.js +16 -45
- package/dist/bundle.es41.js +51 -56
- package/dist/bundle.es42.js +57 -162
- package/dist/bundle.es43.js +160 -79
- package/dist/bundle.es44.js +81 -7
- package/dist/bundle.es45.js +7 -59
- package/dist/bundle.es46.js +58 -33
- package/dist/bundle.es47.js +33 -20
- package/dist/bundle.es48.js +19 -47
- package/dist/bundle.es49.js +49 -11
- package/dist/bundle.es50.js +11 -13
- package/dist/bundle.es51.js +13 -13
- package/dist/bundle.es52.js +13 -30
- package/dist/bundle.es53.js +30 -11
- package/dist/bundle.es54.js +10 -25
- package/dist/bundle.es55.js +17 -29
- package/dist/bundle.es56.js +36 -48
- package/dist/bundle.es57.js +49 -55
- package/dist/bundle.es58.js +56 -8
- package/dist/bundle.es59.js +8 -26
- package/dist/bundle.es60.js +27 -5
- package/dist/bundle.es61.js +5 -66
- package/dist/bundle.es62.js +66 -23
- package/dist/bundle.es63.js +22 -23
- package/dist/bundle.es64.js +24 -90
- package/dist/bundle.es65.js +90 -18
- package/dist/bundle.es66.js +17 -93
- package/dist/bundle.es67.js +93 -73
- package/dist/bundle.es68.js +73 -23
- package/dist/bundle.es69.js +20 -35
- package/dist/bundle.es70.js +39 -24
- package/dist/bundle.es71.js +24 -79
- package/dist/bundle.es72.js +71 -85
- package/dist/bundle.es73.js +93 -10
- package/dist/bundle.es74.js +10 -6
- package/dist/bundle.es75.js +5 -69
- package/dist/bundle.es76.js +68 -10
- package/dist/bundle.es77.js +11 -42
- package/dist/bundle.es78.js +42 -32
- package/dist/bundle.es79.js +31 -64
- package/dist/bundle.es80.js +65 -40
- package/dist/bundle.es81.js +40 -14
- package/dist/bundle.es82.js +15 -32
- package/dist/bundle.es83.js +23 -61
- package/dist/bundle.es84.js +69 -13
- package/dist/bundle.es85.js +13 -74
- package/dist/bundle.es86.js +71 -45
- package/dist/bundle.es87.js +48 -13
- package/dist/bundle.es88.js +16 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.scss +1 -0
- package/package.json +1 -1
package/dist/bundle.es33.js
CHANGED
|
@@ -1,46 +1,76 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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.es68.js";
|
|
5
|
+
import { defaultMin as j, defaultMax as N, useCalendarOptions as V } from "./bundle.es78.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
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
disabled:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
75
|
+
B as DateInput
|
|
46
76
|
};
|
package/dist/bundle.es34.js
CHANGED
|
@@ -1,14 +1,46 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
45
|
+
g as FileOverlay
|
|
14
46
|
};
|
package/dist/bundle.es35.js
CHANGED
|
@@ -1,88 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
13
|
+
u as FormGroup
|
|
88
14
|
};
|
package/dist/bundle.es36.js
CHANGED
|
@@ -1,22 +1,88 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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.es68.js";
|
|
5
|
+
import { SelectRightElements as z } from "./bundle.es77.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;
|
|
18
19
|
}
|
|
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
|
+
);
|
|
85
|
+
};
|
|
20
86
|
export {
|
|
21
|
-
|
|
87
|
+
Y as TimePicker
|
|
22
88
|
};
|
package/dist/bundle.es37.js
CHANGED
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import m from "classnames";
|
|
3
|
+
import { forwardRef as s } from "react";
|
|
4
|
+
const g = s(
|
|
5
|
+
({ icon: r, className: t, size: i = "m", ...e }, n) => {
|
|
6
|
+
const [c, a, , , l] = r;
|
|
7
|
+
return /* @__PURE__ */ o(
|
|
8
|
+
"svg",
|
|
9
|
+
{
|
|
10
|
+
ref: n,
|
|
11
|
+
viewBox: `0 0 ${c} ${a}`,
|
|
12
|
+
className: m(`icon icon-size-${i}`, t),
|
|
13
|
+
...e,
|
|
14
|
+
role: "img",
|
|
15
|
+
children: /* @__PURE__ */ o(f, { paths: l })
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
), f = ({ 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 });
|
|
7
20
|
export {
|
|
8
|
-
|
|
21
|
+
g as Icon
|
|
9
22
|
};
|
package/dist/bundle.es38.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { clamp as o, pc as p } from "@companix/utils-browser";
|
|
3
|
+
const i = ({ appearance: a = "primary", value: e }) => {
|
|
4
|
+
const s = 100 * o(e, 0, 1);
|
|
5
|
+
return /* @__PURE__ */ r("div", { "aria-valuemax": 100, "aria-valuemin": 0, role: "progressbar", className: "progress-bar", children: /* @__PURE__ */ r("div", { className: "progress-bar-thumb", "data-appearance": a, style: { width: p(s) } }) });
|
|
6
|
+
};
|
|
3
7
|
export {
|
|
4
|
-
|
|
8
|
+
i as ProgressBar
|
|
5
9
|
};
|
package/dist/bundle.es39.js
CHANGED
|
@@ -1,25 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { Icon as p } from "./bundle.es36.js";
|
|
4
|
-
const b = (c) => {
|
|
5
|
-
const { appearance: l, icon: s, className: r, iconSize: t, title: e, description: n, children: o, style: d } = c;
|
|
6
|
-
return /* @__PURE__ */ i(
|
|
7
|
-
"div",
|
|
8
|
-
{
|
|
9
|
-
className: m("blank", r),
|
|
10
|
-
"data-appearance": l ?? "neutral",
|
|
11
|
-
style: d,
|
|
12
|
-
children: [
|
|
13
|
-
/* @__PURE__ */ a("div", { className: "blank-icon", children: /* @__PURE__ */ a(p, { icon: s, size: t }) }),
|
|
14
|
-
(e || n) && /* @__PURE__ */ i("div", { className: "blank-text", children: [
|
|
15
|
-
e && /* @__PURE__ */ a("h4", { className: "blank-title", children: e }),
|
|
16
|
-
n && /* @__PURE__ */ a("div", { className: "blank-description", children: n })
|
|
17
|
-
] }),
|
|
18
|
-
o
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
};
|
|
1
|
+
import { jsx as e, Fragment as t } from "react/jsx-runtime";
|
|
2
|
+
const l = ({ ...r }) => /* @__PURE__ */ e("div", { className: "skeleton", style: r, children: /* @__PURE__ */ e(t, { children: "" }) });
|
|
23
3
|
export {
|
|
24
|
-
|
|
4
|
+
l as Skeleton
|
|
25
5
|
};
|
package/dist/bundle.es40.js
CHANGED
|
@@ -1,54 +1,25 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
5
|
-
appearance: o =
|
|
6
|
-
|
|
7
|
-
size: a = 80,
|
|
8
|
-
width: c = 6,
|
|
9
|
-
value: g
|
|
10
|
-
}) => {
|
|
11
|
-
const r = 100 * i(g, 0, 1);
|
|
12
|
-
return /* @__PURE__ */ e(
|
|
1
|
+
import { jsxs as i, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import m from "classnames";
|
|
3
|
+
import { Icon as p } from "./bundle.es37.js";
|
|
4
|
+
const b = (c) => {
|
|
5
|
+
const { appearance: l, icon: s, className: r, iconSize: t, title: e, description: n, children: o, style: d } = c;
|
|
6
|
+
return /* @__PURE__ */ i(
|
|
13
7
|
"div",
|
|
14
8
|
{
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
role: "progressbar",
|
|
19
|
-
className: "progress-ring",
|
|
20
|
-
"data-appearance": o,
|
|
9
|
+
className: m("blank", r),
|
|
10
|
+
"data-appearance": l ?? "neutral",
|
|
11
|
+
style: d,
|
|
21
12
|
children: [
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"--size": n(a),
|
|
29
|
-
"--track-width": n(c)
|
|
30
|
-
}),
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ s("circle", { className: "progress-ring-track" }),
|
|
33
|
-
/* @__PURE__ */ s("circle", { className: "progress-ring-indicator" })
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
),
|
|
37
|
-
t && /* @__PURE__ */ e(
|
|
38
|
-
"div",
|
|
39
|
-
{
|
|
40
|
-
className: "progress-ring-hint",
|
|
41
|
-
style: { fontSize: i(l(a) - 4, 0, 18) },
|
|
42
|
-
children: [
|
|
43
|
-
Math.round(r),
|
|
44
|
-
"%"
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
)
|
|
13
|
+
/* @__PURE__ */ a("div", { className: "blank-icon", children: /* @__PURE__ */ a(p, { icon: s, size: t }) }),
|
|
14
|
+
(e || n) && /* @__PURE__ */ i("div", { className: "blank-text", children: [
|
|
15
|
+
e && /* @__PURE__ */ a("h4", { className: "blank-title", children: e }),
|
|
16
|
+
n && /* @__PURE__ */ a("div", { className: "blank-description", children: n })
|
|
17
|
+
] }),
|
|
18
|
+
o
|
|
48
19
|
]
|
|
49
20
|
}
|
|
50
21
|
);
|
|
51
22
|
};
|
|
52
23
|
export {
|
|
53
|
-
|
|
24
|
+
b as Blank
|
|
54
25
|
};
|
package/dist/bundle.es41.js
CHANGED
|
@@ -1,59 +1,54 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
1
|
+
import { jsxs as e, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { getInitialsFontSize as l } from "./bundle.es4.js";
|
|
3
|
+
import { clamp as i, customCSS as m, px as n } from "@companix/utils-browser";
|
|
4
|
+
const u = ({
|
|
5
|
+
appearance: o = "primary",
|
|
6
|
+
hint: t,
|
|
7
|
+
size: a = 80,
|
|
8
|
+
width: c = 6,
|
|
9
|
+
value: g
|
|
10
|
+
}) => {
|
|
11
|
+
const r = 100 * i(g, 0, 1);
|
|
12
|
+
return /* @__PURE__ */ e(
|
|
13
|
+
"div",
|
|
14
|
+
{
|
|
15
|
+
"aria-valuemax": 100,
|
|
16
|
+
"aria-valuemin": 0,
|
|
17
|
+
"aria-valuenow": r,
|
|
18
|
+
role: "progressbar",
|
|
19
|
+
className: "progress-ring",
|
|
20
|
+
"data-appearance": o,
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ e(
|
|
23
|
+
"svg",
|
|
24
|
+
{
|
|
25
|
+
className: "progress-ring-image",
|
|
26
|
+
style: m({
|
|
27
|
+
"--percentage": r / 100,
|
|
28
|
+
"--size": n(a),
|
|
29
|
+
"--track-width": n(c)
|
|
30
|
+
}),
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ s("circle", { className: "progress-ring-track" }),
|
|
33
|
+
/* @__PURE__ */ s("circle", { className: "progress-ring-indicator" })
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
t && /* @__PURE__ */ e(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
className: "progress-ring-hint",
|
|
41
|
+
style: { fontSize: i(l(a) - 4, 0, 18) },
|
|
42
|
+
children: [
|
|
43
|
+
Math.round(r),
|
|
44
|
+
"%"
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
);
|
|
39
51
|
};
|
|
40
|
-
w.IconButton = ({
|
|
41
|
-
Component: a = "button",
|
|
42
|
-
icon: e,
|
|
43
|
-
mode: t,
|
|
44
|
-
onClick: i,
|
|
45
|
-
isLoading: o,
|
|
46
|
-
isHidden: n
|
|
47
|
-
}) => /* @__PURE__ */ r(
|
|
48
|
-
a,
|
|
49
|
-
{
|
|
50
|
-
onClick: i,
|
|
51
|
-
className: "write-bar-icon",
|
|
52
|
-
"data-mode": t,
|
|
53
|
-
"data-hidden": N(n),
|
|
54
|
-
children: o ? /* @__PURE__ */ r(b, { size: 18 }) : /* @__PURE__ */ r(h, { icon: e, size: "xxs" })
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
52
|
export {
|
|
58
|
-
|
|
53
|
+
u as ProgressRing
|
|
59
54
|
};
|