@companix/uikit 0.0.63 → 0.0.64
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/Select/OptionsPopover.d.ts +6 -4
- package/dist/Select/index.d.ts +7 -10
- package/dist/SelectTags/index.d.ts +4 -7
- package/dist/bundle.es.js +31 -31
- package/dist/bundle.es13.js +120 -41
- package/dist/bundle.es14.js +37 -32
- package/dist/bundle.es15.js +32 -52
- package/dist/bundle.es16.js +54 -19
- package/dist/bundle.es17.js +21 -33
- package/dist/bundle.es18.js +31 -23
- package/dist/bundle.es19.js +24 -44
- package/dist/bundle.es20.js +41 -19
- package/dist/bundle.es21.js +23 -29
- package/dist/bundle.es22.js +28 -37
- package/dist/bundle.es23.js +38 -16
- package/dist/bundle.es24.js +15 -18
- package/dist/bundle.es25.js +18 -20
- package/dist/bundle.es26.js +20 -41
- package/dist/bundle.es27.js +35 -113
- package/dist/bundle.es28.js +1 -1
- package/dist/bundle.es32.js +1 -1
- package/dist/bundle.es43.js +1 -1
- package/dist/bundle.es50.js +7 -7
- package/dist/bundle.es62.js +1 -1
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/bundle.es27.js
CHANGED
|
@@ -1,122 +1,44 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
inputRef: R,
|
|
22
|
-
disabled: u,
|
|
23
|
-
required: A,
|
|
24
|
-
// options popover
|
|
25
|
-
...P
|
|
26
|
-
} = a, [f, b] = q(""), s = h(null), z = h(null), { popoverRef: d, froozePopoverPosition: D, handleAnimationEnd: E } = M(), S = (e) => n.includes(e) ? [...n] : [...n, e], k = (e) => n.filter((t) => e !== t), I = (e, t) => {
|
|
27
|
-
v ? (D(), l(e), t()) : l(e);
|
|
28
|
-
}, w = (e) => {
|
|
29
|
-
if (u) return;
|
|
30
|
-
d.current && d.current.getAttribute("data-state") === "open" && e.preventDefault();
|
|
31
|
-
const t = $(e.currentTarget);
|
|
32
|
-
e.defaultPrevented || B(e.currentTarget, t) || s.current && s.current.focus();
|
|
33
|
-
}, y = (e) => {
|
|
34
|
-
e.target !== s.current && e.preventDefault();
|
|
35
|
-
}, F = (e, t) => {
|
|
36
|
-
e.stopPropagation(), l(k(t));
|
|
37
|
-
}, T = ({ target: e }) => {
|
|
38
|
-
b(e.value), x?.(e.value);
|
|
39
|
-
}, m = V(() => {
|
|
40
|
-
const e = {};
|
|
41
|
-
return (a.options ?? a.defaultOptions ?? []).forEach((r) => {
|
|
42
|
-
e[r.value] = r;
|
|
43
|
-
}), e;
|
|
44
|
-
}, [a.options, a.defaultOptions]);
|
|
45
|
-
return /* @__PURE__ */ o(
|
|
46
|
-
j,
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useResizeTextarea as x } from "./bundle.es55.js";
|
|
3
|
+
import { attr as e, callMultiple as u } from "@companix/utils-browser";
|
|
4
|
+
import { useEffect as z } from "react";
|
|
5
|
+
import { mergeRefs as R } from "react-merge-refs";
|
|
6
|
+
const q = ({
|
|
7
|
+
onResize: m,
|
|
8
|
+
grow: a = !1,
|
|
9
|
+
value: t,
|
|
10
|
+
onChange: s,
|
|
11
|
+
disabled: o,
|
|
12
|
+
required: i,
|
|
13
|
+
rows: l = 2,
|
|
14
|
+
fill: p = !1,
|
|
15
|
+
textAreaRef: c,
|
|
16
|
+
...d
|
|
17
|
+
}) => {
|
|
18
|
+
const [n, r] = x(m, a);
|
|
19
|
+
return z(r, [r, t]), /* @__PURE__ */ f(
|
|
20
|
+
"div",
|
|
47
21
|
{
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
55
|
-
content: ({ close: e }) => /* @__PURE__ */ o(
|
|
56
|
-
H,
|
|
22
|
+
className: "form form-textarea",
|
|
23
|
+
"data-required": e(i),
|
|
24
|
+
"data-disabled": e(o),
|
|
25
|
+
"data-fill": e(p),
|
|
26
|
+
children: /* @__PURE__ */ f(
|
|
27
|
+
"textarea",
|
|
57
28
|
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
),
|
|
70
|
-
children: /* @__PURE__ */ o(
|
|
71
|
-
"div",
|
|
72
|
-
{
|
|
73
|
-
className: "form",
|
|
74
|
-
onClick: w,
|
|
75
|
-
onMouseDown: y,
|
|
76
|
-
"data-size": N ?? "md",
|
|
77
|
-
"data-fill": i(O),
|
|
78
|
-
"data-required": i(A),
|
|
79
|
-
"data-disabled": i(u),
|
|
80
|
-
children: /* @__PURE__ */ p("div", { className: "select-tags-container", children: [
|
|
81
|
-
/* @__PURE__ */ p("div", { className: "select-tags", children: [
|
|
82
|
-
n.length > 0 && /* @__PURE__ */ o(
|
|
83
|
-
"div",
|
|
84
|
-
{
|
|
85
|
-
className: "tag-container",
|
|
86
|
-
ref: z,
|
|
87
|
-
role: "listbox",
|
|
88
|
-
"data-readonly": i(c),
|
|
89
|
-
children: n.map((e, t) => m[e] ? /* @__PURE__ */ p("div", { className: "tag", children: [
|
|
90
|
-
/* @__PURE__ */ o("span", { className: "tag-name", children: m[e].title }),
|
|
91
|
-
/* @__PURE__ */ o("button", { className: "tag-close-button", onClick: (r) => F(r, e), children: /* @__PURE__ */ o(g, { className: "tag-close-icon", icon: X, size: "xxxs" }) })
|
|
92
|
-
] }, `tag-option-${e}-${t}`) : null)
|
|
93
|
-
}
|
|
94
|
-
),
|
|
95
|
-
(!c || n.length === 0) && /* @__PURE__ */ o(
|
|
96
|
-
"input",
|
|
97
|
-
{
|
|
98
|
-
ref: L([R, s]),
|
|
99
|
-
type: "text",
|
|
100
|
-
autoCapitalize: "none",
|
|
101
|
-
autoComplete: "off",
|
|
102
|
-
autoCorrect: "off",
|
|
103
|
-
className: "form-input",
|
|
104
|
-
spellCheck: !1,
|
|
105
|
-
value: f,
|
|
106
|
-
disabled: u,
|
|
107
|
-
readOnly: c,
|
|
108
|
-
placeholder: C,
|
|
109
|
-
onChange: T
|
|
110
|
-
}
|
|
111
|
-
)
|
|
112
|
-
] }),
|
|
113
|
-
/* @__PURE__ */ o(g, { className: "expand-icon", icon: G, size: "xxxs" })
|
|
114
|
-
] })
|
|
29
|
+
className: "form-input",
|
|
30
|
+
"data-grow": e(a),
|
|
31
|
+
value: t,
|
|
32
|
+
ref: R([c, n]),
|
|
33
|
+
rows: l,
|
|
34
|
+
disabled: o,
|
|
35
|
+
onChange: u(s, r),
|
|
36
|
+
...d
|
|
115
37
|
}
|
|
116
38
|
)
|
|
117
39
|
}
|
|
118
40
|
);
|
|
119
41
|
};
|
|
120
42
|
export {
|
|
121
|
-
|
|
43
|
+
q as TextArea
|
|
122
44
|
};
|
package/dist/bundle.es28.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
2
|
import { Popover as T } from "./bundle.es10.js";
|
|
3
|
-
import { Input as w } from "./bundle.
|
|
3
|
+
import { Input as w } from "./bundle.es14.js";
|
|
4
4
|
import { useState as A, useRef as j } from "react";
|
|
5
5
|
import { Calendar as E } from "./bundle.es56.js";
|
|
6
6
|
import { useDayDisableCheker as N } from "./bundle.es57.js";
|
package/dist/bundle.es32.js
CHANGED
|
@@ -4,7 +4,7 @@ import { getNum as v } from "@companix/utils-js";
|
|
|
4
4
|
import { getTimesOptions as D, getTimeValue as A, removeDigits as W, convertTimeToOption as q } from "./bundle.es58.js";
|
|
5
5
|
import { SelectRightElements as w } from "./bundle.es59.js";
|
|
6
6
|
import { Select as y } from "./bundle.es12.js";
|
|
7
|
-
import { Input as z } from "./bundle.
|
|
7
|
+
import { Input as z } from "./bundle.es14.js";
|
|
8
8
|
const r = {
|
|
9
9
|
char: ":",
|
|
10
10
|
toString: (s) => s ? q(s, r.char) : "",
|
package/dist/bundle.es43.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r, Fragment as m } from "react/jsx-runtime";
|
|
2
2
|
import { useContext as C, createContext as g, useState as h, useEffect as x, useCallback as u } from "react";
|
|
3
|
-
import { Dialog as D } from "./bundle.
|
|
3
|
+
import { Dialog as D } from "./bundle.es22.js";
|
|
4
4
|
import { hash as v } from "@companix/utils-js";
|
|
5
5
|
const $ = (t) => {
|
|
6
6
|
const e = {}, n = {}, l = [], c = v();
|
package/dist/bundle.es50.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
1
|
+
import { jsx as i, jsxs as x } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as h, useEffect as O } from "react";
|
|
3
3
|
import { Spinner as L } from "./bundle.es6.js";
|
|
4
|
-
import { OptionItem as u } from "./bundle.
|
|
5
|
-
import { OptionsList as C } from "./bundle.
|
|
4
|
+
import { OptionItem as u } from "./bundle.es15.js";
|
|
5
|
+
import { OptionsList as C } from "./bundle.es17.js";
|
|
6
6
|
import { Icon as R } from "./bundle.es33.js";
|
|
7
7
|
import { faPlus as S } from "@companix/icons-solid";
|
|
8
8
|
const b = () => ({ isLoading: !1, options: [] }), k = (s) => {
|
|
@@ -23,11 +23,11 @@ const b = () => ({ isLoading: !1, options: [] }), k = (s) => {
|
|
|
23
23
|
filterOptions: l,
|
|
24
24
|
disableFiltering: e,
|
|
25
25
|
...d
|
|
26
|
-
} = s, { options: f, isLoading: v } = k(d),
|
|
26
|
+
} = s, { options: f, isLoading: v } = k(d), g = h(() => l && !e ? f.filter(l) : f, [f, l, e]);
|
|
27
27
|
return v ? /* @__PURE__ */ i("div", { className: "select-popover-loading", children: /* @__PURE__ */ i(L, { size: 24 }) }) : /* @__PURE__ */ i(
|
|
28
28
|
y,
|
|
29
29
|
{
|
|
30
|
-
options:
|
|
30
|
+
options: g,
|
|
31
31
|
isActive: n,
|
|
32
32
|
emptyText: r,
|
|
33
33
|
scrollboxRef: o,
|
|
@@ -51,8 +51,8 @@ const b = () => ({ isLoading: !1, options: [] }), k = (s) => {
|
|
|
51
51
|
emptyText: l = "Ничего не найдено"
|
|
52
52
|
} = s;
|
|
53
53
|
return O(() => {
|
|
54
|
-
r?.(p.findIndex((e) => n(e.value)));
|
|
55
|
-
}, []), /* @__PURE__ */
|
|
54
|
+
console.log("onOpened"), r?.(p.findIndex((e) => n(e.value)));
|
|
55
|
+
}, []), /* @__PURE__ */ x(C, { scrollboxRef: t, optionsWrapperRef: c, maxHeight: 300, children: [
|
|
56
56
|
o && /* @__PURE__ */ i(
|
|
57
57
|
u,
|
|
58
58
|
{
|
package/dist/bundle.es62.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s, Fragment as p } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as f, useState as u, useImperativeHandle as c } from "react";
|
|
3
|
-
import { AlertDialog as x } from "./bundle.
|
|
3
|
+
import { AlertDialog as x } from "./bundle.es23.js";
|
|
4
4
|
const g = f((a, l) => {
|
|
5
5
|
const [i, n] = u([]);
|
|
6
6
|
c(
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ export { Tooltip } from './Tooltip';
|
|
|
19
19
|
export type { TooltipProps } from './Tooltip';
|
|
20
20
|
export { Select } from './Select';
|
|
21
21
|
export type { SelectProps, SelectParams } from './Select';
|
|
22
|
+
export { SelectTags } from './SelectTags';
|
|
23
|
+
export type { SelectTagsProps, SelectTagsParams } from './SelectTags';
|
|
22
24
|
export { Input } from './Input/Input';
|
|
23
25
|
export type { InputProps } from './Input/Input';
|
|
24
26
|
export { OptionItem } from './OptionItem/OptionItem';
|
|
@@ -47,8 +49,6 @@ export { Countdown } from './Countdown';
|
|
|
47
49
|
export type { CountDownProps } from './Countdown';
|
|
48
50
|
export { TextArea } from './TextArea';
|
|
49
51
|
export type { TextAreaProps } from './TextArea';
|
|
50
|
-
export { SelectTags } from './SelectTags';
|
|
51
|
-
export type { SelectTagsProps } from './SelectTags';
|
|
52
52
|
export { DatePicker } from './DatePicker';
|
|
53
53
|
export type { DatePickerProps } from './DatePicker';
|
|
54
54
|
export { DateInput } from './DateInput';
|