@companix/uikit 0.0.11 → 0.0.14
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 +0 -1
- package/dist/Input/index.d.ts +1 -1
- package/dist/Select/SelectInput.d.ts +1 -0
- package/dist/Select/index.d.ts +2 -5
- package/dist/SelectTags/index.d.ts +1 -0
- package/dist/TextArea/index.d.ts +2 -1
- package/dist/__hooks/use-loading.d.ts +2 -2
- package/dist/bundle.es.js +12 -10
- package/dist/bundle.es10.js +1 -1
- package/dist/bundle.es14.js +1 -1
- package/dist/bundle.es19.js +1 -1
- package/dist/bundle.es20.js +1 -1
- package/dist/bundle.es23.js +17 -15
- package/dist/bundle.es24.js +38 -36
- package/dist/bundle.es25.js +3 -3
- package/dist/bundle.es27.js +11 -10
- package/dist/bundle.es28.js +10 -24
- package/dist/bundle.es29.js +17 -28
- package/dist/bundle.es30.js +32 -20
- package/dist/bundle.es31.js +24 -81
- package/dist/bundle.es32.js +83 -18
- package/dist/bundle.es33.js +17 -13
- package/dist/bundle.es34.js +14 -22
- package/dist/bundle.es35.js +22 -5
- package/dist/bundle.es36.js +5 -21
- package/dist/bundle.es37.js +13 -13
- package/dist/bundle.es38.js +13 -69
- package/dist/bundle.es39.js +68 -66
- package/dist/bundle.es40.js +67 -31
- package/dist/bundle.es41.js +23 -59
- package/dist/bundle.es42.js +67 -30
- package/dist/bundle.es43.js +30 -74
- package/dist/bundle.es44.js +71 -45
- package/dist/bundle.es45.js +47 -41
- package/dist/bundle.es46.js +45 -0
- package/dist/bundle.es8.js +50 -54
- package/dist/bundle.es9.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.scss +1 -1
- package/package.json +1 -1
- /package/dist/{FormLabel/FormLabel.scss → FormGroup/FormGroup.scss} +0 -0
- /package/dist/{FormLabel → FormGroup}/index.d.ts +0 -0
|
@@ -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.es36.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
|
+
};
|
package/dist/bundle.es8.js
CHANGED
|
@@ -1,87 +1,83 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { OptionsList as
|
|
4
|
-
import { OptionItem as
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as S, useEffect as A } from "react";
|
|
3
|
+
import { OptionsList as E } from "./bundle.es12.js";
|
|
4
|
+
import { OptionItem as b } from "./bundle.es10.js";
|
|
5
5
|
import { Popover as F } from "./bundle.es6.js";
|
|
6
|
-
import { useFroozeClosing as
|
|
7
|
-
import { SelectInput as
|
|
8
|
-
import { useScrollListController as
|
|
9
|
-
const
|
|
6
|
+
import { useFroozeClosing as I } from "./bundle.es31.js";
|
|
7
|
+
import { SelectInput as z } from "./bundle.es32.js";
|
|
8
|
+
import { useScrollListController as D } from "./bundle.es33.js";
|
|
9
|
+
const M = (c) => {
|
|
10
10
|
const {
|
|
11
11
|
options: e,
|
|
12
|
-
onChange:
|
|
12
|
+
onChange: l,
|
|
13
|
+
value: s,
|
|
13
14
|
minimalOptions: a,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
...d
|
|
21
|
-
} = c, p = E(() => {
|
|
22
|
-
const o = e.findIndex((t) => t.value === l);
|
|
15
|
+
matchTarget: m = "width",
|
|
16
|
+
children: u,
|
|
17
|
+
disabled: p,
|
|
18
|
+
...n
|
|
19
|
+
} = c, t = S(() => {
|
|
20
|
+
const o = e.findIndex((r) => r.value === s);
|
|
23
21
|
return {
|
|
24
22
|
index: o,
|
|
25
23
|
option: e[o]
|
|
26
24
|
};
|
|
27
|
-
}, [e,
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
o.stopPropagation(),
|
|
31
|
-
},
|
|
32
|
-
|
|
25
|
+
}, [e, s]), f = t.option?.value ?? null, { popoverRef: d, froozePopoverPosition: v, handleAnimationEnd: h } = I(), { scrollToElement: x, optionsWrapperRef: O, scrollBoxRef: C } = D(), g = (o, r) => {
|
|
26
|
+
v(), l(o), r();
|
|
27
|
+
}, P = (o) => {
|
|
28
|
+
o.stopPropagation(), l(null);
|
|
29
|
+
}, R = () => {
|
|
30
|
+
t.index !== -1 && x(t.index, !0);
|
|
33
31
|
};
|
|
34
|
-
return /* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ i(
|
|
35
33
|
F,
|
|
36
34
|
{
|
|
37
35
|
minimal: !0,
|
|
38
|
-
ref:
|
|
36
|
+
ref: d,
|
|
39
37
|
sideOffset: 0,
|
|
40
|
-
matchTarget:
|
|
41
|
-
onAnimationEnd:
|
|
38
|
+
matchTarget: m,
|
|
39
|
+
onAnimationEnd: h,
|
|
42
40
|
onOpenAutoFocus: (o) => o.preventDefault(),
|
|
43
41
|
onCloseAutoFocus: (o) => o.preventDefault(),
|
|
44
|
-
disabled:
|
|
45
|
-
content: ({ close: o }) => /* @__PURE__ */
|
|
46
|
-
|
|
42
|
+
disabled: p,
|
|
43
|
+
content: ({ close: o }) => /* @__PURE__ */ i(
|
|
44
|
+
L,
|
|
47
45
|
{
|
|
48
46
|
options: e,
|
|
49
|
-
active:
|
|
50
|
-
scrollboxRef:
|
|
51
|
-
optionsWrapperRef:
|
|
47
|
+
active: f,
|
|
48
|
+
scrollboxRef: C,
|
|
49
|
+
optionsWrapperRef: O,
|
|
52
50
|
minimalOptions: a,
|
|
53
|
-
onOpened:
|
|
54
|
-
onSelect: (
|
|
51
|
+
onOpened: R,
|
|
52
|
+
onSelect: (r) => g(r, o)
|
|
55
53
|
}
|
|
56
54
|
),
|
|
57
|
-
children:
|
|
58
|
-
|
|
55
|
+
children: u ?? /* @__PURE__ */ i(
|
|
56
|
+
z,
|
|
59
57
|
{
|
|
60
|
-
...
|
|
61
|
-
disabled:
|
|
62
|
-
value:
|
|
63
|
-
onClear:
|
|
64
|
-
clearButton: m,
|
|
65
|
-
clearButtonIcon: u
|
|
58
|
+
...n,
|
|
59
|
+
disabled: p,
|
|
60
|
+
value: t.option?.title ?? "",
|
|
61
|
+
onClear: P
|
|
66
62
|
}
|
|
67
63
|
)
|
|
68
64
|
}
|
|
69
65
|
);
|
|
70
|
-
},
|
|
71
|
-
const { active: e, onOpened:
|
|
72
|
-
return
|
|
73
|
-
|
|
74
|
-
}, []), /* @__PURE__ */
|
|
75
|
-
|
|
66
|
+
}, L = (c) => {
|
|
67
|
+
const { active: e, onOpened: l, scrollboxRef: s, optionsWrapperRef: a, options: m, onSelect: u, minimalOptions: p } = c;
|
|
68
|
+
return A(() => {
|
|
69
|
+
l?.();
|
|
70
|
+
}, []), /* @__PURE__ */ i(E, { scrollboxRef: s, optionsWrapperRef: a, maxHeight: 300, children: m.map((n, t) => /* @__PURE__ */ i(
|
|
71
|
+
b,
|
|
76
72
|
{
|
|
77
73
|
active: e === n.value,
|
|
78
|
-
onClick: () =>
|
|
79
|
-
minimal:
|
|
74
|
+
onClick: () => u?.(n.value),
|
|
75
|
+
minimal: p,
|
|
80
76
|
...n
|
|
81
77
|
},
|
|
82
|
-
`option-item-${n.value}-${
|
|
78
|
+
`option-item-${n.value}-${t}`
|
|
83
79
|
)) });
|
|
84
80
|
};
|
|
85
81
|
export {
|
|
86
|
-
|
|
82
|
+
M as Select
|
|
87
83
|
};
|
package/dist/bundle.es9.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as z, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import A from "classnames";
|
|
3
3
|
import M from "react-input-mask";
|
|
4
|
-
import { useLayoutAndUpdate as U } from "./bundle.
|
|
4
|
+
import { useLayoutAndUpdate as U } from "./bundle.es34.js";
|
|
5
5
|
import { attr as c } from "@companix/utils-browser";
|
|
6
6
|
import { forwardRef as R, useRef as l, useCallback as g } from "react";
|
|
7
7
|
import { mergeRefs as v } from "react-merge-refs";
|
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { TextArea } from './TextArea';
|
|
|
23
23
|
export { SelectTags } from './SelectTags';
|
|
24
24
|
export { DatePicker } from './DatePicker';
|
|
25
25
|
export { FileOverlay } from './File';
|
|
26
|
+
export { FormGroup } from './FormGroup';
|
|
26
27
|
export * from './__hooks/use-local-storage';
|
|
27
28
|
export { createAlertAgent } from './DialogAlert';
|
|
28
29
|
export { createToaster } from './Toaster';
|
package/dist/index.scss
CHANGED
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|