@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
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as u, useMemo as h } from "react";
|
|
3
|
+
import { Select as p } from "./bundle.es8.js";
|
|
4
|
+
import { getMonths as k, getYears as z, DEFAULT_MAX_YEAR as f, DEFAULT_MIN_YEAR as g } from "./bundle.es45.js";
|
|
5
|
+
import { Icon as C } from "./bundle.es39.js";
|
|
6
|
+
import { faChevronLeft as E, faChevronRight as T } from "@fortawesome/free-solid-svg-icons";
|
|
7
|
+
import { setMonth as _, setYear as F } from "./bundle.es44.js";
|
|
8
|
+
const y = ({
|
|
9
|
+
viewDate: n,
|
|
10
|
+
onChange: c,
|
|
11
|
+
isMonthDisabled: a,
|
|
12
|
+
isYearDisabled: m,
|
|
13
|
+
onNextMonth: N,
|
|
14
|
+
onPrevMonth: v
|
|
15
|
+
}) => {
|
|
16
|
+
const e = n.getFullYear(), r = n.getMonth(), s = "ru", M = u(
|
|
17
|
+
(t) => {
|
|
18
|
+
c(_(n, t));
|
|
19
|
+
},
|
|
20
|
+
[c, n]
|
|
21
|
+
), x = u(
|
|
22
|
+
(t) => {
|
|
23
|
+
c(F(n, t));
|
|
24
|
+
},
|
|
25
|
+
[c, n]
|
|
26
|
+
), A = h(() => k(s).map((t) => ({
|
|
27
|
+
...t,
|
|
28
|
+
className: "capitalize",
|
|
29
|
+
disabled: a && a(t.value)
|
|
30
|
+
})), [s, a]), Y = h(() => z(e, 100).map((t) => ({
|
|
31
|
+
...t,
|
|
32
|
+
disabled: m && m(t.value)
|
|
33
|
+
})), [e, m]);
|
|
34
|
+
let l = r === 11 && e === f;
|
|
35
|
+
a && !l && (l = a(
|
|
36
|
+
r === 11 ? 0 : r + 1,
|
|
37
|
+
r === 11 ? Math.min(e + 1, f) : e
|
|
38
|
+
));
|
|
39
|
+
let i = r === 0 && e === g;
|
|
40
|
+
return a && !i && (i = a(
|
|
41
|
+
r === 0 ? 11 : r - 1,
|
|
42
|
+
r === 0 ? Math.max(e - 1, g) : e
|
|
43
|
+
)), /* @__PURE__ */ d("div", { className: "calendar-header", children: [
|
|
44
|
+
!i && /* @__PURE__ */ o("button", { className: "calendar-navigation", "data-side": "left", onClick: v, children: /* @__PURE__ */ o(C, { icon: E }) }),
|
|
45
|
+
/* @__PURE__ */ d("div", { className: "calendar-pickers", children: [
|
|
46
|
+
/* @__PURE__ */ o(
|
|
47
|
+
p,
|
|
48
|
+
{
|
|
49
|
+
fill: !0,
|
|
50
|
+
options: Y,
|
|
51
|
+
size: "sm",
|
|
52
|
+
value: e,
|
|
53
|
+
minimalOptions: !0,
|
|
54
|
+
matchTarget: "min-width",
|
|
55
|
+
onChange: (t) => x(t)
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
/* @__PURE__ */ o(
|
|
59
|
+
p,
|
|
60
|
+
{
|
|
61
|
+
fill: !0,
|
|
62
|
+
options: A,
|
|
63
|
+
size: "sm",
|
|
64
|
+
className: "capitalize",
|
|
65
|
+
value: r,
|
|
66
|
+
minimalOptions: !0,
|
|
67
|
+
matchTarget: "min-width",
|
|
68
|
+
onChange: (t) => M(t)
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
] }),
|
|
72
|
+
!l && /* @__PURE__ */ o("button", { className: "calendar-navigation", "data-side": "right", onClick: N, children: /* @__PURE__ */ o(C, { icon: T }) })
|
|
73
|
+
] });
|
|
74
|
+
};
|
|
75
|
+
export {
|
|
76
|
+
y as CalendarHeader
|
|
77
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { subMonths as L, addMonths as N, useDayDisableCheker as R } from "./bundle.es44.js";
|
|
2
|
+
import { DEFAULT_MIN_YEAR as w, DEFAULT_MAX_YEAR as A } from "./bundle.es45.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
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
X as useCalendar
|
|
51
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useRef as l, useCallback as p } from "react";
|
|
2
|
+
import { useEffectWithLayout as d } from "./bundle.es54.js";
|
|
3
|
+
const g = (r, f) => {
|
|
4
|
+
const c = l(null), i = l(null), o = { Right: c, Left: i }, u = p((t) => {
|
|
5
|
+
if (r.current) {
|
|
6
|
+
const n = r.current.style, e = o[t];
|
|
7
|
+
e.current && e.current.clientWidth ? n[`padding${t}`] !== `${e.current.clientWidth}px` && (n[`padding${t}`] = `${e.current.clientWidth}px`) : n[`padding${t}`] && (n[`padding${t}`] = "");
|
|
8
|
+
}
|
|
9
|
+
}, []);
|
|
10
|
+
return d(() => {
|
|
11
|
+
u("Left"), u("Right");
|
|
12
|
+
}, f), { rightRef: c, leftRef: i };
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
g as useInputPadding
|
|
16
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "@radix-ui/react-toast";
|
|
3
|
+
import { attr as C } from "@companix/utils-browser";
|
|
4
|
+
import { useState as h, useRef as v, useEffect as N, useLayoutEffect as x } from "react";
|
|
5
|
+
import { RemoveListener as R } from "./bundle.es40.js";
|
|
6
|
+
const E = (i) => {
|
|
7
|
+
const [c, l] = h(!1), o = v(null), {
|
|
8
|
+
appearance: d = "neutral",
|
|
9
|
+
icon: r,
|
|
10
|
+
title: a,
|
|
11
|
+
description: s,
|
|
12
|
+
duration: m,
|
|
13
|
+
closeIcon: u,
|
|
14
|
+
onRemoving: p,
|
|
15
|
+
onRemoved: f,
|
|
16
|
+
onInitialized: L
|
|
17
|
+
} = i;
|
|
18
|
+
return N(() => {
|
|
19
|
+
l(!0);
|
|
20
|
+
}, []), x(() => {
|
|
21
|
+
o.current && L(o.current);
|
|
22
|
+
}, []), /* @__PURE__ */ n(
|
|
23
|
+
t.Root,
|
|
24
|
+
{
|
|
25
|
+
ref: o,
|
|
26
|
+
"data-expanded": !0,
|
|
27
|
+
"data-appearance": d,
|
|
28
|
+
"data-mounted": C(c),
|
|
29
|
+
className: "toaster",
|
|
30
|
+
duration: m,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ e(R, { callback: f }),
|
|
33
|
+
r && /* @__PURE__ */ e("div", { className: "toaster-icon", children: r }),
|
|
34
|
+
/* @__PURE__ */ n("div", { className: "toaster-content", children: [
|
|
35
|
+
a && /* @__PURE__ */ e(t.Title, { className: "toaster-title", children: a }),
|
|
36
|
+
s && /* @__PURE__ */ e(t.Description, { className: "toaster-description", children: s })
|
|
37
|
+
] }),
|
|
38
|
+
/* @__PURE__ */ e(t.Close, { className: "toaster-close", onClick: p, children: u ?? /* @__PURE__ */ e("svg", { viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ e("path", { d: "M2.96967 2.96967C3.26256 2.67678 3.73744 2.67678 4.03033 2.96967L8 6.939L11.9697 2.96967C12.2626 2.67678 12.7374 2.67678 13.0303 2.96967C13.3232 3.26256 13.3232 3.73744 13.0303 4.03033L9.061 8L13.0303 11.9697C13.2966 12.2359 13.3208 12.6526 13.1029 12.9462L13.0303 13.0303C12.7374 13.3232 12.2626 13.3232 11.9697 13.0303L8 9.061L4.03033 13.0303C3.73744 13.3232 3.26256 13.3232 2.96967 13.0303C2.67678 12.7374 2.67678 12.2626 2.96967 11.9697L6.939 8L2.96967 4.03033C2.7034 3.76406 2.6792 3.3474 2.89705 3.05379L2.96967 2.96967Z" }) }) })
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
E as Toast
|
|
45
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useRef as f, useLayoutEffect as u, useEffect as s } from "react";
|
|
2
|
+
const o = (t, r) => {
|
|
3
|
+
const e = f(!1);
|
|
4
|
+
u(() => {
|
|
5
|
+
e.current = !0, t();
|
|
6
|
+
}, []), s(() => {
|
|
7
|
+
if (e.current) {
|
|
8
|
+
e.current = !1;
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
t();
|
|
12
|
+
}, r);
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
o as useEffectWithLayout
|
|
16
|
+
};
|
package/dist/bundle.es8.js
CHANGED
|
@@ -1,85 +1,77 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
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.es33.js";
|
|
5
|
+
import { SelectInput as z } from "./bundle.es34.js";
|
|
6
|
+
import { useScrollListController as B } from "./bundle.es35.js";
|
|
7
|
+
import { SelectOptions as D } from "./bundle.es36.js";
|
|
8
|
+
import { mergeRefs as j } from "react-merge-refs";
|
|
9
|
+
const G = (a) => {
|
|
10
10
|
const {
|
|
11
|
-
options:
|
|
11
|
+
options: n,
|
|
12
12
|
onChange: i,
|
|
13
|
-
value:
|
|
14
|
-
minimalOptions:
|
|
15
|
-
matchTarget:
|
|
13
|
+
value: r,
|
|
14
|
+
minimalOptions: m,
|
|
15
|
+
matchTarget: f = "width",
|
|
16
16
|
children: u,
|
|
17
|
-
disabled:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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);
|
|
22
24
|
return {
|
|
23
25
|
index: o,
|
|
24
|
-
option:
|
|
26
|
+
option: n[o]
|
|
25
27
|
};
|
|
26
|
-
}, [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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");
|
|
32
38
|
};
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
|
|
39
|
+
return /* @__PURE__ */ l(
|
|
40
|
+
T,
|
|
35
41
|
{
|
|
36
42
|
minimal: !0,
|
|
37
|
-
ref: v,
|
|
43
|
+
ref: j([R, v]),
|
|
38
44
|
sideOffset: 0,
|
|
39
|
-
matchTarget:
|
|
40
|
-
onAnimationEnd:
|
|
45
|
+
matchTarget: f,
|
|
46
|
+
onAnimationEnd: g,
|
|
41
47
|
onOpenAutoFocus: (o) => o.preventDefault(),
|
|
42
48
|
onCloseAutoFocus: (o) => o.preventDefault(),
|
|
43
|
-
disabled:
|
|
44
|
-
content: ({ close: o }) => /* @__PURE__ */
|
|
45
|
-
|
|
49
|
+
disabled: p,
|
|
50
|
+
content: ({ close: o }) => /* @__PURE__ */ l(
|
|
51
|
+
D,
|
|
46
52
|
{
|
|
47
|
-
options:
|
|
48
|
-
active:
|
|
49
|
-
scrollboxRef:
|
|
50
|
-
optionsWrapperRef:
|
|
51
|
-
minimalOptions:
|
|
52
|
-
onOpened:
|
|
53
|
-
onSelect: (
|
|
53
|
+
options: n,
|
|
54
|
+
active: x,
|
|
55
|
+
scrollboxRef: P,
|
|
56
|
+
optionsWrapperRef: O,
|
|
57
|
+
minimalOptions: m,
|
|
58
|
+
onOpened: E,
|
|
59
|
+
onSelect: (e) => S(e, o)
|
|
54
60
|
}
|
|
55
61
|
),
|
|
56
|
-
children: u ?? /* @__PURE__ */
|
|
57
|
-
|
|
62
|
+
children: u ?? /* @__PURE__ */ l(
|
|
63
|
+
z,
|
|
58
64
|
{
|
|
59
|
-
...
|
|
60
|
-
disabled:
|
|
61
|
-
clearButton:
|
|
62
|
-
value:
|
|
63
|
-
onClear:
|
|
65
|
+
...h,
|
|
66
|
+
disabled: p,
|
|
67
|
+
clearButton: s,
|
|
68
|
+
value: t.option?.title ?? "",
|
|
69
|
+
onClear: A
|
|
64
70
|
}
|
|
65
71
|
)
|
|
66
72
|
}
|
|
67
73
|
);
|
|
68
|
-
}, L = (c) => {
|
|
69
|
-
const { active: t, onOpened: i, scrollboxRef: l, optionsWrapperRef: a, options: m, onSelect: u, minimalOptions: s } = c;
|
|
70
|
-
return E(() => {
|
|
71
|
-
i?.();
|
|
72
|
-
}, []), /* @__PURE__ */ r(b, { scrollboxRef: l, optionsWrapperRef: a, maxHeight: 300, children: m.map((e, f) => /* @__PURE__ */ r(
|
|
73
|
-
F,
|
|
74
|
-
{
|
|
75
|
-
active: t === e.value,
|
|
76
|
-
onClick: () => u?.(e.value),
|
|
77
|
-
minimal: s,
|
|
78
|
-
...e
|
|
79
|
-
},
|
|
80
|
-
`option-item-${e.value}-${f}`
|
|
81
|
-
)) });
|
|
82
74
|
};
|
|
83
75
|
export {
|
|
84
|
-
|
|
76
|
+
G as Select
|
|
85
77
|
};
|
package/dist/bundle.es9.js
CHANGED
|
@@ -1,77 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
const Q = R(
|
|
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.es37.js";
|
|
5
|
+
import { InputContainer as x } from "./bundle.es38.js";
|
|
6
|
+
import I from "classnames";
|
|
7
|
+
const E = l(
|
|
9
8
|
({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
inputRef: L,
|
|
25
|
-
...j
|
|
26
|
-
}, k) => {
|
|
27
|
-
const s = l(null), m = l(null), d = l(null), q = { Right: m, Left: d }, h = g((t) => {
|
|
28
|
-
if (s.current) {
|
|
29
|
-
const i = s.current.style, o = q[t];
|
|
30
|
-
o.current && o.current.clientWidth ? i[`padding${t}`] !== `${o.current.clientWidth}px` && (i[`padding${t}`] = `${o.current.clientWidth}px`) : i[`padding${t}`] && (i[`padding${t}`] = "");
|
|
31
|
-
}
|
|
32
|
-
}, []);
|
|
33
|
-
U(() => {
|
|
34
|
-
h("Left"), h("Right");
|
|
35
|
-
}, [f, e]);
|
|
36
|
-
const w = g((t) => {
|
|
37
|
-
x?.(t), $?.(t.target.value, t.target);
|
|
38
|
-
}, []);
|
|
39
|
-
return /* @__PURE__ */ z(
|
|
40
|
-
"div",
|
|
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,
|
|
41
23
|
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
type: "text",
|
|
55
|
-
ref: v([s, L]),
|
|
56
|
-
className: "form-input form-input-base",
|
|
57
|
-
"aria-disabled": p,
|
|
58
|
-
onChange: w,
|
|
59
|
-
value: N,
|
|
60
|
-
placeholder: W,
|
|
61
|
-
disabled: p,
|
|
62
|
-
readOnly: I,
|
|
63
|
-
maskChar: C,
|
|
64
|
-
mask: y
|
|
65
|
-
}
|
|
66
|
-
),
|
|
67
|
-
f && /* @__PURE__ */ n("span", { ref: m, className: "form-input-base-right-element", children: f })
|
|
68
|
-
]
|
|
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
|
|
69
36
|
}
|
|
70
|
-
);
|
|
37
|
+
) });
|
|
71
38
|
}
|
|
72
|
-
), B = R(
|
|
73
|
-
({ mask: r, maskChar: u, ...a }, e) => r ? /* @__PURE__ */ n(M, { inputRef: e, mask: r, maskChar: u, ...a }) : /* @__PURE__ */ n("input", { ref: e, ...a })
|
|
74
39
|
);
|
|
75
40
|
export {
|
|
76
|
-
|
|
41
|
+
E as Input
|
|
77
42
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -5,14 +5,14 @@ export { ImitateScroll } from './Scrollable/ImitateScroll';
|
|
|
5
5
|
export { Popover } from './Popover';
|
|
6
6
|
export { Tooltip } from './Tooltip';
|
|
7
7
|
export { Select } from './Select';
|
|
8
|
-
export { Input } from './Input';
|
|
8
|
+
export { Input } from './Input/Input';
|
|
9
9
|
export { OptionItem } from './OptionItem/OptionItem';
|
|
10
10
|
export { NumberInput } from './NumberInput';
|
|
11
11
|
export { OptionsList } from './OptionItem/OptionsList';
|
|
12
12
|
export { ButtonGroup } from './ButtonGroup';
|
|
13
13
|
export { Checkbox } from './Checkbox';
|
|
14
14
|
export { Switch } from './Switch';
|
|
15
|
-
export { Radio } from './Radio';
|
|
15
|
+
export { Radio, RadioGroup } from './Radio';
|
|
16
16
|
export { Drawer } from './Drawer';
|
|
17
17
|
export { Dialog } from './Dialog';
|
|
18
18
|
export { AlertDialog } from './DialogAlert/Alert';
|
|
@@ -22,8 +22,10 @@ export { Countdown } from './Countdown';
|
|
|
22
22
|
export { TextArea } from './TextArea';
|
|
23
23
|
export { SelectTags } from './SelectTags';
|
|
24
24
|
export { DatePicker } from './DatePicker';
|
|
25
|
+
export { DateInput } from './DateInput';
|
|
25
26
|
export { FileOverlay } from './File';
|
|
26
27
|
export { FormGroup } from './FormGroup';
|
|
28
|
+
export { TimePicker } from './TimePicker';
|
|
27
29
|
export * from './__hooks/use-local-storage';
|
|
28
30
|
export { createAlertAgent } from './DialogAlert';
|
|
29
31
|
export { createToaster } from './Toaster';
|
package/dist/index.scss
CHANGED
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
@use './TextArea/TextArea.scss';
|
|
15
15
|
@use './SelectTags/SelectTags.scss';
|
|
16
16
|
@use './OptionItem/Option.scss';
|
|
17
|
+
@use './Input/Input.scss';
|
|
18
|
+
@use './Input/Form.scss';
|
|
17
19
|
@use './DateInput/DateInput.scss';
|
|
18
20
|
@use './DatePicker/DatePicker.scss';
|
|
19
21
|
@use './DatePicker/Calendar.scss';
|
|
20
|
-
@use './Input/Input.scss';
|
|
21
|
-
@use './Input/Form.scss';
|
|
22
22
|
@use './Switch/Switch.scss';
|
|
23
23
|
@use './Spinner/Spinner.scss';
|
|
24
24
|
@use './ButtonGroup/ButtonGroup.scss';
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@companix/uikit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"module": "./dist/bundle.es.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@companix/utils-browser": "*",
|
|
26
26
|
"@companix/utils-js": "*",
|
|
27
|
+
"@fortawesome/free-regular-svg-icons": "^7.1.0",
|
|
27
28
|
"@fortawesome/free-solid-svg-icons": "^7.1.0",
|
|
28
|
-
"@fortawesome/react-fontawesome": "^3.1.1",
|
|
29
29
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
30
30
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
31
31
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
"@radix-ui/react-toast": "^1.2.15",
|
|
37
37
|
"@radix-ui/react-visually-hidden": "^1.2.4",
|
|
38
38
|
"classnames": "^2.5.1",
|
|
39
|
-
"font-awesome": "^4.7.0",
|
|
40
39
|
"react-input-mask": "^2.0.4",
|
|
41
40
|
"react-merge-refs": "^3.0.2"
|
|
42
41
|
},
|