@reportportal/ui-kit 0.0.1-alpha.1 → 0.0.1-alpha.11
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/LICENSE +201 -201
- package/README.md +229 -3
- package/dist/baseIconButton-7bc53dec.js +25 -0
- package/dist/baseIconButton.js +7 -0
- package/dist/bind-06a7ff84.js +41 -0
- package/dist/bubblesLoader-a7e709d4.js +17 -0
- package/dist/bubblesLoader.js +7 -0
- package/dist/button-7fb84fde.js +62 -0
- package/dist/button.js +3 -3
- package/dist/checkbox-6777be17.js +73 -0
- package/dist/checkbox.js +4 -3
- package/dist/common/constants/keyCodes.d.ts +24 -0
- package/dist/common/hooks/index.d.ts +2 -0
- package/dist/common/hooks/useOnClickOutside.d.ts +2 -0
- package/dist/common/hooks/useWindowResize.d.ts +4 -0
- package/dist/components/bubblesLoader/bubblesLoader.d.ts +7 -0
- package/dist/components/bubblesLoader/index.d.ts +3 -0
- package/dist/components/button/button.d.ts +6 -7
- package/dist/components/button/index.d.ts +2 -1
- package/dist/components/checkbox/checkbox.d.ts +5 -7
- package/dist/components/dropdown/constants.d.ts +7 -0
- package/dist/components/dropdown/dropdown.d.ts +23 -0
- package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +3 -0
- package/dist/components/dropdown/dropdownOption/index.d.ts +3 -0
- package/dist/components/dropdown/index.d.ts +3 -0
- package/dist/components/dropdown/types.d.ts +20 -0
- package/dist/components/dropdown/utils.d.ts +4 -0
- package/dist/components/fieldNumber/constants.d.ts +4 -0
- package/dist/components/fieldNumber/fieldNumber.d.ts +18 -0
- package/dist/components/fieldNumber/index.d.ts +3 -0
- package/dist/components/fieldText/fieldText.d.ts +24 -0
- package/dist/components/fieldText/index.d.ts +3 -0
- package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +14 -0
- package/dist/components/fieldTextFlex/index.d.ts +3 -0
- package/dist/components/icons/baseIconButton/baseIconButton.d.ts +8 -0
- package/dist/components/icons/baseIconButton/index.d.ts +4 -0
- package/dist/components/icons/index.d.ts +12 -0
- package/dist/components/index.d.ts +13 -0
- package/dist/components/modal/index.d.ts +4 -0
- package/dist/components/modal/modal.d.ts +21 -0
- package/dist/components/modal/modalContent/index.d.ts +1 -0
- package/dist/components/modal/modalContent/modalContent.d.ts +6 -0
- package/dist/components/modal/modalFooter/index.d.ts +2 -0
- package/dist/components/modal/modalFooter/modalFooter.d.ts +12 -0
- package/dist/components/modal/modalHeader/index.d.ts +1 -0
- package/dist/components/modal/modalHeader/modalHeader.d.ts +8 -0
- package/dist/components/pagination/index.d.ts +4 -0
- package/dist/components/pagination/itemsCounter/index.d.ts +1 -0
- package/dist/components/pagination/itemsCounter/itemCounter.d.ts +9 -0
- package/dist/components/pagination/pageControls/activePage/activePage.d.ts +12 -0
- package/dist/components/pagination/pageControls/activePage/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/pageSelector/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +10 -0
- package/dist/components/pagination/pageControls/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageControls.d.ts +16 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +11 -0
- package/dist/components/pagination/pageControls/pageNavigator/bar/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +11 -0
- package/dist/components/pagination/pageSizeControl/index.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +10 -0
- package/dist/components/pagination/pageSizeControl/sizeSelector/index.d.ts +1 -0
- package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +8 -0
- package/dist/components/pagination/pagination.d.ts +22 -0
- package/dist/components/pagination/types.d.ts +2 -0
- package/dist/components/popover/index.d.ts +1 -0
- package/dist/components/popover/popover.d.ts +18 -0
- package/dist/components/radio/index.d.ts +4 -0
- package/dist/components/radio/radio.d.ts +16 -0
- package/dist/components/radio/radioGroup.d.ts +8 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/table.d.ts +3 -0
- package/dist/components/table/types.d.ts +49 -0
- package/dist/components/table/utils.d.ts +3 -0
- package/dist/components/themeProvider/themeProvider.d.ts +2 -1
- package/dist/components/toggle/index.d.ts +3 -0
- package/dist/components/toggle/toggle.d.ts +11 -0
- package/dist/components/tooltip/index.d.ts +1 -0
- package/dist/components/tooltip/tooltip.d.ts +13 -0
- package/dist/dropdown-e07f2a71.js +212 -0
- package/dist/dropdown.js +14 -0
- package/dist/fieldNumber-46fe79b9.js +127 -0
- package/dist/fieldNumber.js +10 -0
- package/dist/fieldText-d80b29ba.js +102 -0
- package/dist/fieldText.js +9 -0
- package/dist/fieldTextFlex-5bddf46a.js +67 -0
- package/dist/fieldTextFlex.js +8 -0
- package/dist/index-bb9b62ef.js +131 -0
- package/dist/index.js +56 -11
- package/dist/keyCodes-f63c0e11.js +4 -0
- package/dist/modal.js +16 -0
- package/dist/pagination-5449cd03.js +346 -0
- package/dist/pagination.js +15 -0
- package/dist/popover.js +95 -0
- package/dist/radio-fd49a09c.js +76 -0
- package/dist/radio.js +9 -0
- package/dist/style.css +1 -1
- package/dist/systemMessage-1ced6079.js +30 -0
- package/dist/systemMessage.js +5 -6
- package/dist/table-231fd19c.js +138 -0
- package/dist/table.js +11 -0
- package/dist/themeProvider-46c2be7b.js +23 -0
- package/dist/themeProvider.js +3 -3
- package/dist/toggle-707ecb74.js +67 -0
- package/dist/toggle.js +9 -0
- package/dist/tooltip.js +70 -0
- package/dist/useOnClickOutside-c332f7d3.js +16 -0
- package/package.json +93 -64
- package/dist/bind-e1346f99.js +0 -44
- package/dist/button-9e154905.js +0 -1867
- package/dist/checkbox-ae12c5f5.js +0 -74
- package/dist/constants/key-codes.d.ts +0 -4
- package/dist/jsx-runtime-2962e83b.js +0 -631
- package/dist/systemMessage-5dc0f1e6.js +0 -30
- package/dist/themeProvider-4c0ab2a2.js +0 -19
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { jsxs as K, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { useRef as A, useMemo as B } from "react";
|
|
4
|
+
import { c as T } from "./bind-06a7ff84.js";
|
|
5
|
+
import { K as e } from "./keyCodes-f63c0e11.js";
|
|
6
|
+
import { B as f } from "./baseIconButton-7bc53dec.js";
|
|
7
|
+
const W = (t) => /* @__PURE__ */ d.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#C1C7D0", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ d.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.00117 2.62046C7.63142 2.6189 7.33294 2.91738 7.3345 3.28712L7.35159 7.35159L3.28712 7.3345C2.91738 7.33295 2.6189 7.63142 2.62045 8.00117C2.62201 8.37091 2.92301 8.67191 3.29275 8.67346L7.35722 8.69056L7.37391 12.6599C7.37547 13.0296 7.67647 13.3306 8.04621 13.3322C8.41596 13.3337 8.71443 13.0352 8.71288 12.6655L8.69619 8.69619L12.6655 8.71288C13.0352 8.71444 13.3337 8.41596 13.3322 8.04621C13.3306 7.67647 13.0296 7.37547 12.6599 7.37392L8.69056 7.35722L8.67346 3.29275C8.67191 2.92301 8.37091 2.62201 8.00117 2.62046Z" })), v = (t) => /* @__PURE__ */ d.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#C1C7D0", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ d.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M3.31082 7.31081C2.94108 7.30926 2.6426 7.60773 2.64415 7.97748C2.64571 8.34722 2.9467 8.64822 3.31645 8.64977L12.6892 8.68919C13.0589 8.69074 13.3574 8.39227 13.3559 8.02252C13.3543 7.65278 13.0533 7.35178 12.6836 7.35023L3.31082 7.31081Z" })), y = 5, h = 16, S = [
|
|
8
|
+
e.TAB_KEY_CODE,
|
|
9
|
+
e.BACKSPACE_KEY_CODE,
|
|
10
|
+
e.ARROW_LEFT_KEY_CODE,
|
|
11
|
+
e.ARROW_UP_KEY_CODE,
|
|
12
|
+
e.ARROW_RIGHT_KEY_CODE,
|
|
13
|
+
e.ARROW_DOWN_KEY_CODE,
|
|
14
|
+
e.DELETE_KEY_CODE,
|
|
15
|
+
e.NUM_LOCK_0_KEY_CODE,
|
|
16
|
+
e.NUM_LOCK_1_KEY_CODE,
|
|
17
|
+
e.NUM_LOCK_2_KEY_CODE,
|
|
18
|
+
e.NUM_LOCK_3_KEY_CODE,
|
|
19
|
+
e.NUM_LOCK_4_KEY_CODE,
|
|
20
|
+
e.NUM_LOCK_5_KEY_CODE,
|
|
21
|
+
e.NUM_LOCK_6_KEY_CODE,
|
|
22
|
+
e.NUM_LOCK_7_KEY_CODE,
|
|
23
|
+
e.NUM_LOCK_8_KEY_CODE,
|
|
24
|
+
e.NUM_LOCK_9_KEY_CODE
|
|
25
|
+
], I = "_disabled_3tc9r_6", b = "_label_3tc9r_10", k = "_sign_3tc9r_21", F = "_error_3tc9r_36", H = "_touched_3tc9r_36", V = "_filled_3tc9r_41", P = "_input_3tc9r_26", j = {
|
|
26
|
+
"field-number": "_field-number_3tc9r_1",
|
|
27
|
+
disabled: I,
|
|
28
|
+
label: b,
|
|
29
|
+
sign: k,
|
|
30
|
+
"input-container": "_input-container_3tc9r_26",
|
|
31
|
+
error: F,
|
|
32
|
+
touched: H,
|
|
33
|
+
filled: V,
|
|
34
|
+
"input-field": "_input-field_3tc9r_48",
|
|
35
|
+
input: P
|
|
36
|
+
}, r = T.bind(j), z = ({
|
|
37
|
+
value: t = "",
|
|
38
|
+
placeholder: D = "0",
|
|
39
|
+
disabled: c = !1,
|
|
40
|
+
onChange: i,
|
|
41
|
+
onFocus: a,
|
|
42
|
+
onBlur: G,
|
|
43
|
+
label: O,
|
|
44
|
+
postfix: s = "",
|
|
45
|
+
min: o = 0,
|
|
46
|
+
max: E = Number.MAX_SAFE_INTEGER,
|
|
47
|
+
title: p,
|
|
48
|
+
error: m,
|
|
49
|
+
touched: L = !1,
|
|
50
|
+
...N
|
|
51
|
+
}) => {
|
|
52
|
+
const C = A(null), R = (_) => {
|
|
53
|
+
let n = _.target.value.replace(/^0(?=\d+|^\d)/g, "");
|
|
54
|
+
if (n === "") {
|
|
55
|
+
i("");
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
n = +n, n >= o && n <= E && i(n);
|
|
59
|
+
}, Y = (_) => {
|
|
60
|
+
const { keyCode: n } = _;
|
|
61
|
+
S.includes(n) || (n < e.NUMBER_START_KEY_CODE || n > e.NUMBER_END_KEY_CODE || _.shiftKey) && _.preventDefault();
|
|
62
|
+
}, w = () => {
|
|
63
|
+
const _ = +t - 1;
|
|
64
|
+
_ >= o && _ <= E && i(_);
|
|
65
|
+
}, g = () => {
|
|
66
|
+
const _ = +t + 1;
|
|
67
|
+
_ >= o && _ <= E && i(_);
|
|
68
|
+
}, u = D + s, M = B(() => {
|
|
69
|
+
let _ = (String(t) || u).length;
|
|
70
|
+
return s && !t && (_ += 1), _ > h ? `${h}ch` : `${_ || y}ch`;
|
|
71
|
+
}, [u, s, t]), U = () => {
|
|
72
|
+
C && C.current && C.current.focus(), a && a();
|
|
73
|
+
};
|
|
74
|
+
return /* @__PURE__ */ K("div", { className: r("field-number", { disabled: c }), children: [
|
|
75
|
+
O && /* @__PURE__ */ l("span", { className: r("label"), children: O }),
|
|
76
|
+
/* @__PURE__ */ K(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
className: r("input-container", {
|
|
80
|
+
filled: !!t || t === 0,
|
|
81
|
+
error: m,
|
|
82
|
+
disabled: c,
|
|
83
|
+
touched: L
|
|
84
|
+
}),
|
|
85
|
+
title: p,
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ l(
|
|
88
|
+
f,
|
|
89
|
+
{
|
|
90
|
+
className: r("sign", "minus"),
|
|
91
|
+
disabled: c,
|
|
92
|
+
onClick: w,
|
|
93
|
+
children: /* @__PURE__ */ l(v, {})
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ K("span", { className: r("input-field", { disabled: c }), onClick: U, children: [
|
|
97
|
+
/* @__PURE__ */ l(
|
|
98
|
+
"input",
|
|
99
|
+
{
|
|
100
|
+
ref: C,
|
|
101
|
+
className: r("input"),
|
|
102
|
+
type: "number",
|
|
103
|
+
value: t,
|
|
104
|
+
placeholder: u,
|
|
105
|
+
disabled: c,
|
|
106
|
+
min: o,
|
|
107
|
+
max: E,
|
|
108
|
+
onKeyDown: c ? void 0 : Y,
|
|
109
|
+
onChange: c ? void 0 : R,
|
|
110
|
+
onFocus: c ? void 0 : a,
|
|
111
|
+
style: { width: M },
|
|
112
|
+
...N
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
!!s && (t === 0 || !!t) && /* @__PURE__ */ l("span", { children: s.slice(0, 1) })
|
|
116
|
+
] }),
|
|
117
|
+
/* @__PURE__ */ l(f, { className: r("sign", "plus"), disabled: c, onClick: g, children: /* @__PURE__ */ l(W, {}) })
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
] });
|
|
122
|
+
};
|
|
123
|
+
export {
|
|
124
|
+
z as F,
|
|
125
|
+
W as S,
|
|
126
|
+
v as a
|
|
127
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { jsx as t, jsxs as n, Fragment as q } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { forwardRef as F } from "react";
|
|
4
|
+
import { c as R } from "./bind-06a7ff84.js";
|
|
5
|
+
import "./baseIconButton-7bc53dec.js";
|
|
6
|
+
const j = (c) => /* @__PURE__ */ l.createElement("svg", { width: 17, height: 17, viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...c }, /* @__PURE__ */ l.createElement("rect", { width: 16.2089, height: 16.1568, rx: 8.07842, fill: "#A2AAB5" }), /* @__PURE__ */ l.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5.14768 5.14645C4.95077 5.34171 4.95077 5.65829 5.14768 5.85355L7.49578 8.18198L5.35655 10.3033C5.15963 10.4986 5.15963 10.8151 5.35655 11.0104C5.55346 11.2057 5.87271 11.2057 6.06962 11.0104L8.20886 8.88909L10.1392 10.8033C10.3361 10.9986 10.6554 10.9986 10.8523 10.8033C11.0492 10.608 11.0492 10.2915 10.8523 10.0962L8.92193 8.18198L11.0612 6.06065C11.2581 5.86539 11.2581 5.54881 11.0612 5.35355C10.8643 5.15828 10.545 5.15828 10.3481 5.35355L8.20886 7.47487L5.86076 5.14645C5.66385 4.95118 5.34459 4.95118 5.14768 5.14645Z", fill: "white" })), y = "_label_18rqf_18", B = "_asterisk_18rqf_27", S = "_disabled_18rqf_33", M = "_field_18rqf_38", Z = "_error_18rqf_52", z = "_touched_18rqf_52", D = "_placeholder_18rqf_63", G = "_input_18rqf_70", H = "_icon_18rqf_1", J = "_text_18rqf_159", K = {
|
|
7
|
+
"icon-container": "_icon-container_18rqf_1",
|
|
8
|
+
"icon-container-end": "_icon-container-end_18rqf_1",
|
|
9
|
+
"icon-container-start": "_icon-container-start_18rqf_1",
|
|
10
|
+
label: y,
|
|
11
|
+
asterisk: B,
|
|
12
|
+
disabled: S,
|
|
13
|
+
field: M,
|
|
14
|
+
error: Z,
|
|
15
|
+
touched: z,
|
|
16
|
+
placeholder: D,
|
|
17
|
+
"default-width": "_default-width_18rqf_66",
|
|
18
|
+
"input-container": "_input-container_18rqf_70",
|
|
19
|
+
input: G,
|
|
20
|
+
icon: H,
|
|
21
|
+
"clear-icon": "_clear-icon_18rqf_116",
|
|
22
|
+
"additional-content": "_additional-content_18rqf_152",
|
|
23
|
+
text: J,
|
|
24
|
+
"error-text": "_error-text_18rqf_167",
|
|
25
|
+
"help-text": "_help-text_18rqf_171"
|
|
26
|
+
}, e = R.bind(K), U = F(
|
|
27
|
+
({
|
|
28
|
+
value: c,
|
|
29
|
+
className: u,
|
|
30
|
+
error: a,
|
|
31
|
+
placeholder: o,
|
|
32
|
+
disabled: r = !1,
|
|
33
|
+
onChange: N,
|
|
34
|
+
touched: _ = !1,
|
|
35
|
+
title: w,
|
|
36
|
+
label: s,
|
|
37
|
+
helpText: i,
|
|
38
|
+
defaultWidth: C = !0,
|
|
39
|
+
startIcon: d,
|
|
40
|
+
endIcon: f,
|
|
41
|
+
clearable: L = !1,
|
|
42
|
+
onClear: h,
|
|
43
|
+
isRequired: p = !1,
|
|
44
|
+
hasDoubleMessage: g = !1,
|
|
45
|
+
type: k = "text",
|
|
46
|
+
displayError: v = !0,
|
|
47
|
+
...E
|
|
48
|
+
}, b) => {
|
|
49
|
+
const A = () => {
|
|
50
|
+
h && h(c);
|
|
51
|
+
}, m = v && a && _, x = /* @__PURE__ */ t("span", { className: e("text", "help-text"), children: i });
|
|
52
|
+
return /* @__PURE__ */ n(q, { children: [
|
|
53
|
+
s && /* @__PURE__ */ n("span", { className: e("label", { disabled: r }), children: [
|
|
54
|
+
s,
|
|
55
|
+
p && /* @__PURE__ */ t("span", { className: e("asterisk"), children: "*" })
|
|
56
|
+
] }),
|
|
57
|
+
/* @__PURE__ */ n(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
className: e("field", u, {
|
|
61
|
+
error: a,
|
|
62
|
+
touched: _,
|
|
63
|
+
disabled: r,
|
|
64
|
+
"default-width": C
|
|
65
|
+
}),
|
|
66
|
+
title: w,
|
|
67
|
+
children: [
|
|
68
|
+
d && /* @__PURE__ */ t("span", { className: e("icon-container-start"), children: /* @__PURE__ */ t("span", { className: e("icon"), children: d }) }),
|
|
69
|
+
/* @__PURE__ */ n("span", { className: e("input-container"), children: [
|
|
70
|
+
/* @__PURE__ */ t(
|
|
71
|
+
"input",
|
|
72
|
+
{
|
|
73
|
+
ref: b,
|
|
74
|
+
type: k,
|
|
75
|
+
className: e("input"),
|
|
76
|
+
value: c,
|
|
77
|
+
disabled: r,
|
|
78
|
+
onChange: N,
|
|
79
|
+
...E
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
o && !c && /* @__PURE__ */ n("span", { className: e("placeholder"), children: [
|
|
83
|
+
o,
|
|
84
|
+
p && !s && /* @__PURE__ */ t("span", { className: e("asterisk") })
|
|
85
|
+
] })
|
|
86
|
+
] }),
|
|
87
|
+
f && /* @__PURE__ */ t("span", { className: e("icon-container-end"), children: /* @__PURE__ */ t("span", { className: e("icon"), children: f }) }),
|
|
88
|
+
L && /* @__PURE__ */ t("span", { className: e("icon-container-end"), children: /* @__PURE__ */ t("button", { type: "button", className: e("clear-icon", { disabled: r }), onClick: A, children: /* @__PURE__ */ t(j, {}) }) })
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
(m || i) && /* @__PURE__ */ t("div", { className: e("additional-content", { disabled: r }), children: m ? /* @__PURE__ */ n(q, { children: [
|
|
93
|
+
/* @__PURE__ */ t("span", { className: e("text", "error-text"), children: a }),
|
|
94
|
+
g && x
|
|
95
|
+
] }) : i && x })
|
|
96
|
+
] });
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
export {
|
|
100
|
+
U as F,
|
|
101
|
+
j as S
|
|
102
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsxs as _, Fragment as u, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { c as y } from "./bind-06a7ff84.js";
|
|
3
|
+
import { forwardRef as H, useId as I } from "react";
|
|
4
|
+
const E = "_error_cxv68_19", R = "_touched_cxv68_19", j = "_label_cxv68_30", O = "_disabled_cxv68_56", $ = {
|
|
5
|
+
"text-area": "_text-area_cxv68_1",
|
|
6
|
+
error: E,
|
|
7
|
+
touched: R,
|
|
8
|
+
label: j,
|
|
9
|
+
"additional-content": "_additional-content_cxv68_39",
|
|
10
|
+
"error-text": "_error-text_cxv68_39",
|
|
11
|
+
"help-text": "_help-text_cxv68_47",
|
|
12
|
+
disabled: O
|
|
13
|
+
}, t = y.bind($), w = 72, z = 2, G = H(
|
|
14
|
+
({
|
|
15
|
+
value: o = "",
|
|
16
|
+
readonly: d = !1,
|
|
17
|
+
error: a = "",
|
|
18
|
+
placeholder: h = "",
|
|
19
|
+
disabled: e = !1,
|
|
20
|
+
touched: l = !1,
|
|
21
|
+
className: m = "",
|
|
22
|
+
label: n = "",
|
|
23
|
+
helpText: s = "",
|
|
24
|
+
onChange: p,
|
|
25
|
+
onFocus: f,
|
|
26
|
+
onBlur: g,
|
|
27
|
+
onKeyUp: v,
|
|
28
|
+
...N
|
|
29
|
+
}, b) => {
|
|
30
|
+
const i = I(), x = a && l, F = (c) => {
|
|
31
|
+
c.target.style.height = `${w}px`, c.target.style.height = `${c.target.scrollHeight + z}px`;
|
|
32
|
+
};
|
|
33
|
+
return /* @__PURE__ */ _(u, { children: [
|
|
34
|
+
n && /* @__PURE__ */ r("label", { htmlFor: i, className: t("label", { disabled: e }), children: n }),
|
|
35
|
+
/* @__PURE__ */ r(
|
|
36
|
+
"textarea",
|
|
37
|
+
{
|
|
38
|
+
id: i,
|
|
39
|
+
ref: b,
|
|
40
|
+
className: t("text-area", m, {
|
|
41
|
+
disabled: e,
|
|
42
|
+
error: a,
|
|
43
|
+
touched: l
|
|
44
|
+
}),
|
|
45
|
+
value: o,
|
|
46
|
+
placeholder: h,
|
|
47
|
+
disabled: e,
|
|
48
|
+
readOnly: d,
|
|
49
|
+
onChange: p,
|
|
50
|
+
onFocus: f,
|
|
51
|
+
onBlur: g,
|
|
52
|
+
onKeyUp: v,
|
|
53
|
+
onInput: F,
|
|
54
|
+
...N,
|
|
55
|
+
children: o
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
(x || s) && /* @__PURE__ */ _("div", { className: t("additional-content", { disabled: e }), children: [
|
|
59
|
+
x && /* @__PURE__ */ r("span", { className: t("error-text"), children: a }),
|
|
60
|
+
s && /* @__PURE__ */ r("span", { className: t("help-text"), children: s })
|
|
61
|
+
] })
|
|
62
|
+
] });
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
export {
|
|
66
|
+
G as F
|
|
67
|
+
};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import * as y from "react";
|
|
3
|
+
import { useState as w, useEffect as g, useRef as j } from "react";
|
|
4
|
+
import { Scrollbars as B } from "rc-scrollbars";
|
|
5
|
+
import { AnimatePresence as D, motion as I } from "framer-motion";
|
|
6
|
+
import { c as m } from "./bind-06a7ff84.js";
|
|
7
|
+
import { u as K } from "./useOnClickOutside-c332f7d3.js";
|
|
8
|
+
import { K as F } from "./keyCodes-f63c0e11.js";
|
|
9
|
+
import { B as C } from "./button-7fb84fde.js";
|
|
10
|
+
import { B as P } from "./baseIconButton-7bc53dec.js";
|
|
11
|
+
const G = (t) => /* @__PURE__ */ y.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ y.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0.732179 15.2698C0.330639 14.8683 0.33064 14.2172 0.73218 13.8157L6.54858 7.99928L0.73218 2.18288C0.33064 1.78134 0.330639 1.13031 0.732179 0.728774C1.13372 0.327235 1.78474 0.327235 2.18628 0.728774L8.00269 6.54518L13.8191 0.728767C14.2206 0.327229 14.8717 0.327228 15.2732 0.728767C15.6747 1.13031 15.6747 1.78133 15.2732 2.18287L9.45679 7.99928L15.2732 13.8157C15.6747 14.2172 15.6747 14.8683 15.2732 15.2698C14.8717 15.6713 14.2206 15.6713 13.8191 15.2698L8.00269 9.45338L2.18628 15.2698C1.78474 15.6713 1.13372 15.6713 0.732179 15.2698Z", fill: "#A2AAB5" })), X = () => {
|
|
12
|
+
const [t, a] = w({ width: 0, height: 0 });
|
|
13
|
+
return g(() => {
|
|
14
|
+
const o = () => {
|
|
15
|
+
a({
|
|
16
|
+
width: window.innerWidth,
|
|
17
|
+
height: window.innerHeight
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
return window.addEventListener("resize", o), o(), () => window.removeEventListener("resize", o);
|
|
21
|
+
}, []), t;
|
|
22
|
+
}, Y = {
|
|
23
|
+
"modal-content": "_modal-content_ojybs_1"
|
|
24
|
+
}, Z = m.bind(Y), b = ({ children: t }) => /* @__PURE__ */ e("div", { className: Z("modal-content"), children: t }), q = {
|
|
25
|
+
"buttons-block": "_buttons-block_1dgm4_1",
|
|
26
|
+
"button-container": "_button-container_1dgm4_5",
|
|
27
|
+
"modal-footer": "_modal-footer_1dgm4_14",
|
|
28
|
+
"with-extra-node": "_with-extra-node_1dgm4_21",
|
|
29
|
+
"size-small": "_size-small_1dgm4_25"
|
|
30
|
+
}, c = m.bind(q), J = ({
|
|
31
|
+
footerNode: t,
|
|
32
|
+
closeHandler: a,
|
|
33
|
+
okButton: o,
|
|
34
|
+
cancelButton: l,
|
|
35
|
+
size: s
|
|
36
|
+
}) => /* @__PURE__ */ i("div", { className: c("modal-footer", { "with-extra-node": t, [`size-${s}`]: s }), children: [
|
|
37
|
+
t && t,
|
|
38
|
+
/* @__PURE__ */ i("div", { className: c("buttons-block"), children: [
|
|
39
|
+
l && /* @__PURE__ */ e("div", { className: c("button-container"), children: /* @__PURE__ */ e(
|
|
40
|
+
C,
|
|
41
|
+
{
|
|
42
|
+
variant: "ghost",
|
|
43
|
+
adjustWidthOn: s === "small" ? "parent" : "content",
|
|
44
|
+
onClick: a,
|
|
45
|
+
...l
|
|
46
|
+
}
|
|
47
|
+
) }),
|
|
48
|
+
o && /* @__PURE__ */ e("div", { className: c("button-container"), children: /* @__PURE__ */ e(C, { adjustWidthOn: s === "small" ? "parent" : "content", ...o }) })
|
|
49
|
+
] })
|
|
50
|
+
] }), Q = {
|
|
51
|
+
"modal-header": "_modal-header_11gdx_1",
|
|
52
|
+
"modal-header-content": "_modal-header-content_11gdx_11",
|
|
53
|
+
"modal-title": "_modal-title_11gdx_20",
|
|
54
|
+
"close-modal-icon": "_close-modal-icon_11gdx_28"
|
|
55
|
+
}, r = m.bind(Q), U = ({ title: t, onClose: a, headerNode: o }) => /* @__PURE__ */ i("div", { className: r("modal-header"), children: [
|
|
56
|
+
/* @__PURE__ */ i("div", { className: r("modal-header-content"), children: [
|
|
57
|
+
t && /* @__PURE__ */ e("span", { className: r("modal-title"), children: t }),
|
|
58
|
+
o && o
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ e(P, { className: r("close-modal-icon"), onClick: a, children: /* @__PURE__ */ e(G, {}) })
|
|
61
|
+
] }), V = "_modal_1kzzv_1", ee = {
|
|
62
|
+
modal: V,
|
|
63
|
+
"overlay-default": "_overlay-default_1kzzv_11",
|
|
64
|
+
"overlay-light-cyan": "_overlay-light-cyan_1kzzv_15",
|
|
65
|
+
"scrolling-content": "_scrolling-content_1kzzv_19",
|
|
66
|
+
"modal-window": "_modal-window_1kzzv_25",
|
|
67
|
+
"size-default": "_size-default_1kzzv_42",
|
|
68
|
+
"size-small": "_size-small_1kzzv_54",
|
|
69
|
+
"size-large": "_size-large_1kzzv_66"
|
|
70
|
+
}, k = m.bind(ee), te = 0.9, oe = 176, _e = ({
|
|
71
|
+
title: t,
|
|
72
|
+
headerNode: a,
|
|
73
|
+
children: o,
|
|
74
|
+
footerNode: l,
|
|
75
|
+
okButton: s,
|
|
76
|
+
cancelButton: E,
|
|
77
|
+
className: M,
|
|
78
|
+
size: _ = "default",
|
|
79
|
+
onClose: H = () => {
|
|
80
|
+
},
|
|
81
|
+
overlay: v = "default",
|
|
82
|
+
zIndex: L = 2,
|
|
83
|
+
allowCloseOutside: N = !0,
|
|
84
|
+
scrollable: A = !1
|
|
85
|
+
}) => {
|
|
86
|
+
const [O, f] = w(!1), [R, S] = w(0), n = j(null), z = X(), p = z.height, $ = p * te, h = (p - R) / 2, T = $ - oe, d = () => {
|
|
87
|
+
f(!1);
|
|
88
|
+
}, x = (u) => {
|
|
89
|
+
const { keyCode: W } = u;
|
|
90
|
+
W === F.ESCAPE_KEY_CODE && d();
|
|
91
|
+
};
|
|
92
|
+
return g(() => {
|
|
93
|
+
if (n && n.current) {
|
|
94
|
+
const { clientHeight: u } = n.current;
|
|
95
|
+
S(u);
|
|
96
|
+
}
|
|
97
|
+
}, [o, z]), g(() => (f(!0), n && n.current && n.current.focus(), document.addEventListener("keydown", x, !1), () => document.removeEventListener("keydown", x, !1)), []), K(n, N ? d : void 0), /* @__PURE__ */ e(D, { onExitComplete: H, children: O && /* @__PURE__ */ e("div", { className: k("modal", { [`overlay-${v}`]: v }), style: { zIndex: L }, children: /* @__PURE__ */ i(
|
|
98
|
+
I.div,
|
|
99
|
+
{
|
|
100
|
+
className: k("modal-window", { [`size-${_}`]: _ }, M),
|
|
101
|
+
ref: n,
|
|
102
|
+
tabIndex: 0,
|
|
103
|
+
initial: { opacity: 0, marginTop: -h },
|
|
104
|
+
animate: { opacity: 1, marginTop: h },
|
|
105
|
+
exit: { opacity: 0, marginTop: -h },
|
|
106
|
+
transition: { duration: 0.3 },
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ e(U, { title: t, headerNode: a, onClose: d }),
|
|
109
|
+
A ? /* @__PURE__ */ e(B, { autoHeight: !0, autoHeightMax: T, hideTracksWhenNotNeeded: !0, children: /* @__PURE__ */ e(b, { children: o }) }) : /* @__PURE__ */ e(b, { children: o }),
|
|
110
|
+
/* @__PURE__ */ e(
|
|
111
|
+
J,
|
|
112
|
+
{
|
|
113
|
+
size: _,
|
|
114
|
+
footerNode: l,
|
|
115
|
+
okButton: s,
|
|
116
|
+
cancelButton: E,
|
|
117
|
+
closeHandler: d
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"modal-window"
|
|
123
|
+
) }) });
|
|
124
|
+
};
|
|
125
|
+
export {
|
|
126
|
+
_e as M,
|
|
127
|
+
G as S,
|
|
128
|
+
b as a,
|
|
129
|
+
U as b,
|
|
130
|
+
J as c
|
|
131
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,58 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { C as
|
|
3
|
-
import { S as
|
|
4
|
-
import {
|
|
5
|
-
import "./
|
|
6
|
-
import "
|
|
7
|
-
import "./
|
|
1
|
+
import { B as d } from "./button-7fb84fde.js";
|
|
2
|
+
import { C as L } from "./checkbox-6777be17.js";
|
|
3
|
+
import { S as g } from "./systemMessage-1ced6079.js";
|
|
4
|
+
import { S as h, F as u } from "./fieldText-d80b29ba.js";
|
|
5
|
+
import { T as I } from "./themeProvider-46c2be7b.js";
|
|
6
|
+
import { S as H, M as S } from "./index-bb9b62ef.js";
|
|
7
|
+
import { D as P, S as b } from "./dropdown-e07f2a71.js";
|
|
8
|
+
import { T as R } from "./toggle-707ecb74.js";
|
|
9
|
+
import { F as D, a as E, S as V } from "./fieldNumber-46fe79b9.js";
|
|
10
|
+
import { B as y } from "./bubblesLoader-a7e709d4.js";
|
|
11
|
+
import { F as U } from "./fieldTextFlex-5bddf46a.js";
|
|
12
|
+
import { R as q } from "./radio-fd49a09c.js";
|
|
13
|
+
import { Tooltip as G } from "./tooltip.js";
|
|
14
|
+
import { Popover as K } from "./popover.js";
|
|
15
|
+
import { P as Q, a as W, S as X } from "./pagination-5449cd03.js";
|
|
16
|
+
import { S as _, a as $, T as e1 } from "./table-231fd19c.js";
|
|
17
|
+
import { B as r1 } from "./baseIconButton-7bc53dec.js";
|
|
18
|
+
import * as e from "react";
|
|
19
|
+
import "react/jsx-runtime";
|
|
20
|
+
import "./bind-06a7ff84.js";
|
|
21
|
+
import "./keyCodes-f63c0e11.js";
|
|
22
|
+
import "rc-scrollbars";
|
|
23
|
+
import "framer-motion";
|
|
24
|
+
import "./useOnClickOutside-c332f7d3.js";
|
|
25
|
+
import "@floating-ui/react-dom";
|
|
26
|
+
import "downshift";
|
|
27
|
+
import "@floating-ui/react";
|
|
28
|
+
const i = (o) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...o }, /* @__PURE__ */ e.createElement("path", { d: "M9.80051 6.3661C9.95672 6.20989 10.21 6.20989 10.3662 6.3661L10.6338 6.63375C10.7901 6.78996 10.7901 7.04323 10.6338 7.19944L8.83331 8.99996L10.6338 10.8005C10.79 10.9567 10.79 11.2099 10.6338 11.3662L10.3662 11.6338C10.21 11.79 9.95669 11.79 9.80048 11.6338L7.99998 9.8333L6.19953 11.6338C6.04332 11.79 5.79005 11.79 5.63384 11.6338L5.36619 11.3661C5.20998 11.2099 5.20998 10.9566 5.36619 10.8004L7.16665 8.99996L5.36617 7.19949C5.20996 7.04328 5.20996 6.79001 5.36617 6.6338L5.63382 6.36615C5.79003 6.20994 6.04329 6.20994 6.1995 6.36615L7.99998 8.16663L9.80051 6.3661Z", fill: "#A2AAB5" }), /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.99878 3V2C4.99878 1.44772 5.44649 1 5.99878 1H9.99878C10.5511 1 10.9988 1.44772 10.9988 2V3H14.5C14.7761 3 15 3.22386 15 3.5C15 3.77614 14.7761 4 14.5 4H13.4167L12.6146 13.6246C12.5498 14.402 11.8999 15 11.1198 15H4.8802C4.10007 15 3.45017 14.402 3.38538 13.6246L2.58333 4H1.5C1.22386 4 1 3.77614 1 3.5C1 3.22386 1.22386 3 1.5 3H4.99878ZM5.99878 2H9.99878V3H5.99878V2ZM3.5868 4L4.38193 13.5415C4.40352 13.8007 4.62016 14 4.8802 14H11.1198C11.3798 14 11.5965 13.8007 11.6181 13.5415L12.4132 4H3.5868Z", fill: "#A2AAB5" })), x = (o) => /* @__PURE__ */ e.createElement("svg", { width: 14, height: 3, viewBox: "0 0 14 3", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...o }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.30811 2.47803C1.72868 2.47803 2.05339 2.36206 2.28223 2.13013C2.51107 1.89819 2.62549 1.60596 2.62549 1.25342C2.62549 0.894694 2.51107 0.596273 2.28223 0.358154C2.05339 0.120036 1.72868 0.000976562 1.30811 0.000976562C0.893717 0.000976562 0.572103 0.120036 0.343262 0.358154C0.114421 0.596273 0 0.894694 0 1.25342C0 1.61214 0.117513 1.90592 0.352539 2.13477C0.587565 2.36361 0.906087 2.47803 1.30811 2.47803ZM6.61475 2.47803C7.03532 2.47803 7.36003 2.36206 7.58887 2.13013C7.81771 1.89819 7.93213 1.60596 7.93213 1.25342C7.93213 0.894694 7.81771 0.596273 7.58887 0.358154C7.36003 0.120036 7.03532 0.000976562 6.61475 0.000976562C6.20036 0.000976562 5.87874 0.120036 5.6499 0.358154C5.42106 0.596273 5.30664 0.894694 5.30664 1.25342C5.30664 1.61214 5.42415 1.90592 5.65918 2.13477C5.89421 2.36361 6.21273 2.47803 6.61475 2.47803ZM12.8955 2.13013C12.6667 2.36206 12.342 2.47803 11.9214 2.47803C11.5194 2.47803 11.2008 2.36361 10.9658 2.13477C10.7308 1.90592 10.6133 1.61214 10.6133 1.25342C10.6133 0.894694 10.7277 0.596273 10.9565 0.358154C11.1854 0.120036 11.507 0.000976562 11.9214 0.000976562C12.342 0.000976562 12.6667 0.120036 12.8955 0.358154C13.1243 0.596273 13.2388 0.894694 13.2388 1.25342C13.2388 1.60596 13.1243 1.89819 12.8955 2.13013Z", fill: "#A2AAB5" }));
|
|
8
29
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
30
|
+
_ as ArrowDownIcon,
|
|
31
|
+
$ as ArrowUpIcon,
|
|
32
|
+
r1 as BaseIconButton,
|
|
33
|
+
y as BubblesLoader,
|
|
34
|
+
d as Button,
|
|
35
|
+
L as Checkbox,
|
|
36
|
+
h as ClearIcon,
|
|
37
|
+
H as CloseIcon,
|
|
38
|
+
i as DeleteIcon,
|
|
39
|
+
P as Dropdown,
|
|
40
|
+
b as DropdownIcon,
|
|
41
|
+
D as FieldNumber,
|
|
42
|
+
u as FieldText,
|
|
43
|
+
U as FieldTextFlex,
|
|
44
|
+
x as MeatballMenuIcon,
|
|
45
|
+
E as MinusIcon,
|
|
46
|
+
S as Modal,
|
|
47
|
+
Q as Pagination,
|
|
48
|
+
V as PlusIcon,
|
|
49
|
+
K as Popover,
|
|
50
|
+
W as PrevChapterIcon,
|
|
51
|
+
X as PrevPageIcon,
|
|
52
|
+
q as Radio,
|
|
53
|
+
g as SystemMessage,
|
|
54
|
+
e1 as Table,
|
|
55
|
+
I as ThemeProvider,
|
|
56
|
+
R as Toggle,
|
|
57
|
+
G as Tooltip
|
|
13
58
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var E = /* @__PURE__ */ ((_) => (_[_.BACKSPACE_KEY_CODE = 8] = "BACKSPACE_KEY_CODE", _[_.TAB_KEY_CODE = 9] = "TAB_KEY_CODE", _[_.ENTER_KEY_CODE = 13] = "ENTER_KEY_CODE", _[_.ESCAPE_KEY_CODE = 27] = "ESCAPE_KEY_CODE", _[_.SPACE_KEY_CODE = 32] = "SPACE_KEY_CODE", _[_.ARROW_LEFT_KEY_CODE = 37] = "ARROW_LEFT_KEY_CODE", _[_.ARROW_UP_KEY_CODE = 38] = "ARROW_UP_KEY_CODE", _[_.ARROW_RIGHT_KEY_CODE = 39] = "ARROW_RIGHT_KEY_CODE", _[_.ARROW_DOWN_KEY_CODE = 40] = "ARROW_DOWN_KEY_CODE", _[_.DELETE_KEY_CODE = 46] = "DELETE_KEY_CODE", _[_.NUMBER_START_KEY_CODE = 48] = "NUMBER_START_KEY_CODE", _[_.NUMBER_END_KEY_CODE = 57] = "NUMBER_END_KEY_CODE", _[_.NUM_LOCK_0_KEY_CODE = 96] = "NUM_LOCK_0_KEY_CODE", _[_.NUM_LOCK_1_KEY_CODE = 97] = "NUM_LOCK_1_KEY_CODE", _[_.NUM_LOCK_2_KEY_CODE = 98] = "NUM_LOCK_2_KEY_CODE", _[_.NUM_LOCK_3_KEY_CODE = 99] = "NUM_LOCK_3_KEY_CODE", _[_.NUM_LOCK_4_KEY_CODE = 100] = "NUM_LOCK_4_KEY_CODE", _[_.NUM_LOCK_5_KEY_CODE = 101] = "NUM_LOCK_5_KEY_CODE", _[_.NUM_LOCK_6_KEY_CODE = 102] = "NUM_LOCK_6_KEY_CODE", _[_.NUM_LOCK_7_KEY_CODE = 103] = "NUM_LOCK_7_KEY_CODE", _[_.NUM_LOCK_8_KEY_CODE = 104] = "NUM_LOCK_8_KEY_CODE", _[_.NUM_LOCK_9_KEY_CODE = 105] = "NUM_LOCK_9_KEY_CODE", _))(E || {});
|
|
2
|
+
export {
|
|
3
|
+
E as K
|
|
4
|
+
};
|
package/dist/modal.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { M as s, a as n, c as b, b as c } from "./index-bb9b62ef.js";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
import "rc-scrollbars";
|
|
5
|
+
import "framer-motion";
|
|
6
|
+
import "./bind-06a7ff84.js";
|
|
7
|
+
import "./useOnClickOutside-c332f7d3.js";
|
|
8
|
+
import "./keyCodes-f63c0e11.js";
|
|
9
|
+
import "./button-7fb84fde.js";
|
|
10
|
+
import "./baseIconButton-7bc53dec.js";
|
|
11
|
+
export {
|
|
12
|
+
s as Modal,
|
|
13
|
+
n as ModalContent,
|
|
14
|
+
b as ModalFooter,
|
|
15
|
+
c as ModalHeader
|
|
16
|
+
};
|