@reportportal/ui-kit 0.0.1-alpha.3 → 0.0.1-alpha.31
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-b6adc843.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-33c88abf.js +62 -0
- package/dist/button.js +2 -2
- package/dist/checkbox-9a6c7ce1.js +73 -0
- package/dist/checkbox.js +3 -3
- package/dist/common/constants/keyCodes.d.ts +24 -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 +2 -3
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/checkbox/checkbox.d.ts +2 -1
- package/dist/components/datePicker/datePicker.d.ts +24 -0
- package/dist/components/datePicker/header/datePickerHeader.d.ts +15 -0
- package/dist/components/datePicker/header/index.d.ts +3 -0
- package/dist/components/datePicker/index.d.ts +3 -0
- package/dist/components/datePicker/utils.d.ts +3 -0
- package/dist/components/dropdown/constants.d.ts +7 -0
- package/dist/components/dropdown/dropdown.d.ts +24 -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 +8 -3
- 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 +15 -0
- package/dist/components/index.d.ts +13 -0
- package/dist/components/modal/modal.d.ts +6 -2
- package/dist/components/modal/modalContent/modalContent.d.ts +1 -0
- package/dist/components/modal/modalHeader/modalHeader.d.ts +1 -1
- 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/spinLoader/index.d.ts +3 -0
- package/dist/components/spinLoader/spinLoader.d.ts +7 -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 +19 -0
- package/dist/dropdown-c21b0d67.js +216 -0
- package/dist/dropdown.js +14 -0
- package/dist/fieldNumber-1f286b40.js +127 -0
- package/dist/fieldNumber.js +10 -0
- package/dist/fieldText-14bf032f.js +133 -0
- package/dist/fieldText.js +3 -2
- package/dist/fieldTextFlex-5bddf46a.js +67 -0
- package/dist/fieldTextFlex.js +8 -0
- package/dist/index-54e3bfc2.js +147 -0
- package/dist/index.js +245 -16
- package/dist/keyCodes-f63c0e11.js +4 -0
- package/dist/modal.js +14 -135
- package/dist/pagination-ac3ea7c4.js +346 -0
- package/dist/pagination.js +14 -0
- package/dist/popover.js +95 -0
- package/dist/radio-bccc84f2.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 +2 -2
- package/dist/table-cb8f9516.js +147 -0
- package/dist/table.js +11 -0
- package/dist/themeProvider-46c2be7b.js +23 -0
- package/dist/themeProvider.js +4 -3
- package/dist/toggle-4cdbcc42.js +59 -0
- package/dist/toggle.js +9 -0
- package/dist/tooltip.js +96 -0
- package/dist/useOnClickOutside-c332f7d3.js +16 -0
- package/package.json +96 -66
- package/dist/button-15f7c4a6.js +0 -64
- package/dist/checkbox-e6a5c84a.js +0 -70
- package/dist/common/constants/key-codes.d.ts +0 -5
- package/dist/fieldText-dc43f641.js +0 -99
- package/dist/key-codes-abbe7725.js +0 -4
- package/dist/systemMessage-dd6e4795.js +0 -30
- package/dist/themeProvider-5800417e.js +0 -19
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { jsxs as w, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import * as u 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 O } from "./baseIconButton-b6adc843.js";
|
|
7
|
+
const W = (n) => /* @__PURE__ */ u.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#C1C7D0", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ u.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 = (n) => /* @__PURE__ */ u.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#C1C7D0", xmlns: "http://www.w3.org/2000/svg", ...n }, /* @__PURE__ */ u.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, f = 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_wswgu_6", b = "_label_wswgu_10", k = "_sign_wswgu_21", F = "_error_wswgu_36", H = "_touched_wswgu_36", V = "_filled_wswgu_44", P = "_input_wswgu_26", j = {
|
|
26
|
+
"field-number": "_field-number_wswgu_1",
|
|
27
|
+
disabled: I,
|
|
28
|
+
label: b,
|
|
29
|
+
sign: k,
|
|
30
|
+
"input-container": "_input-container_wswgu_26",
|
|
31
|
+
error: F,
|
|
32
|
+
touched: H,
|
|
33
|
+
filled: V,
|
|
34
|
+
"input-field": "_input-field_wswgu_51",
|
|
35
|
+
input: P
|
|
36
|
+
}, i = T.bind(j), z = ({
|
|
37
|
+
value: n = "",
|
|
38
|
+
placeholder: h = "0",
|
|
39
|
+
disabled: s = !1,
|
|
40
|
+
onChange: o,
|
|
41
|
+
onFocus: d,
|
|
42
|
+
onBlur: G,
|
|
43
|
+
label: K,
|
|
44
|
+
postfix: c = "",
|
|
45
|
+
min: r = 0,
|
|
46
|
+
max: E = Number.MAX_SAFE_INTEGER,
|
|
47
|
+
title: D,
|
|
48
|
+
error: p,
|
|
49
|
+
touched: g = !1,
|
|
50
|
+
...m
|
|
51
|
+
}) => {
|
|
52
|
+
const C = A(null), L = (_) => {
|
|
53
|
+
let t = _.target.value.replace(/^0(?=\d+|^\d)/g, "");
|
|
54
|
+
if (t === "") {
|
|
55
|
+
o("");
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
t = +t, t >= r && t <= E && o(t);
|
|
59
|
+
}, N = (_) => {
|
|
60
|
+
const { keyCode: t } = _;
|
|
61
|
+
S.includes(t) || (t < e.NUMBER_START_KEY_CODE || t > e.NUMBER_END_KEY_CODE || _.shiftKey) && _.preventDefault();
|
|
62
|
+
}, R = () => {
|
|
63
|
+
const _ = +n - 1;
|
|
64
|
+
_ >= r && _ <= E && o(_);
|
|
65
|
+
}, Y = () => {
|
|
66
|
+
const _ = +n + 1;
|
|
67
|
+
_ >= r && _ <= E && o(_);
|
|
68
|
+
}, a = h + c, M = B(() => {
|
|
69
|
+
let _ = (String(n) || a).length;
|
|
70
|
+
return c && !n && (_ += 1), _ > f ? `${f}ch` : `${_ || y}ch`;
|
|
71
|
+
}, [a, c, n]), U = () => {
|
|
72
|
+
C && C.current && C.current.focus(), d && d();
|
|
73
|
+
};
|
|
74
|
+
return /* @__PURE__ */ w("div", { className: i("field-number", { disabled: s }), children: [
|
|
75
|
+
K && /* @__PURE__ */ l("span", { className: i("label"), children: K }),
|
|
76
|
+
/* @__PURE__ */ w(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
className: i("input-container", {
|
|
80
|
+
filled: !!n || n === 0,
|
|
81
|
+
error: p,
|
|
82
|
+
disabled: s,
|
|
83
|
+
touched: g
|
|
84
|
+
}),
|
|
85
|
+
title: D,
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ l(
|
|
88
|
+
O,
|
|
89
|
+
{
|
|
90
|
+
className: i("sign", "minus"),
|
|
91
|
+
disabled: s,
|
|
92
|
+
onClick: R,
|
|
93
|
+
children: /* @__PURE__ */ l(v, {})
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ w("span", { className: i("input-field", { disabled: s }), onClick: U, children: [
|
|
97
|
+
/* @__PURE__ */ l(
|
|
98
|
+
"input",
|
|
99
|
+
{
|
|
100
|
+
ref: C,
|
|
101
|
+
className: i("input"),
|
|
102
|
+
type: "number",
|
|
103
|
+
value: n,
|
|
104
|
+
placeholder: a,
|
|
105
|
+
disabled: s,
|
|
106
|
+
min: r,
|
|
107
|
+
max: E,
|
|
108
|
+
onKeyDown: s ? void 0 : N,
|
|
109
|
+
onChange: s ? void 0 : L,
|
|
110
|
+
onFocus: s ? void 0 : d,
|
|
111
|
+
style: { width: M },
|
|
112
|
+
...m
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
!!c && (n === 0 || !!n) && /* @__PURE__ */ l("span", { children: c.slice(0, 1) })
|
|
116
|
+
] }),
|
|
117
|
+
/* @__PURE__ */ l(O, { className: i("sign", "plus"), disabled: s, onClick: Y, 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,133 @@
|
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as w } from "react/jsx-runtime";
|
|
2
|
+
import * as k from "react";
|
|
3
|
+
import { forwardRef as K, useRef as O, useState as P } from "react";
|
|
4
|
+
import { c as C } from "./bind-06a7ff84.js";
|
|
5
|
+
import "./baseIconButton-b6adc843.js";
|
|
6
|
+
const Q = (c) => /* @__PURE__ */ k.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...c }, /* @__PURE__ */ k.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1 8C1 4.14001 4.14001 1 8 1C11.86 1 15 4.14001 15 8C15 11.8595 11.86 15 8 15C4.14001 15 1 11.8595 1 8ZM5 5.54545L5.54545 5L8 7.45455L10.4545 5L11 5.54545L8.54545 8L11 10.4545L10.4545 11L8 8.54545L5.54545 11L5 10.4545L7.45455 8L5 5.54545Z", fill: "#A2AAB5" })), T = "_collapsed_1fglc_13", U = "_label_1fglc_21", V = "_asterisk_1fglc_30", W = "_disabled_1fglc_36", X = "_field_1fglc_41", Y = "_placeholder_1fglc_62", I = "_error_1fglc_69", nn = "_touched_1fglc_69", en = "_input_1fglc_84", cn = "_icon_1fglc_1", tn = "_text_1fglc_168", sn = {
|
|
7
|
+
"icon-container": "_icon-container_1fglc_1",
|
|
8
|
+
"icon-container-end": "_icon-container-end_1fglc_1",
|
|
9
|
+
"icon-container-start": "_icon-container-start_1fglc_1",
|
|
10
|
+
collapsed: T,
|
|
11
|
+
label: U,
|
|
12
|
+
asterisk: V,
|
|
13
|
+
disabled: W,
|
|
14
|
+
field: X,
|
|
15
|
+
"default-width": "_default-width_1fglc_53",
|
|
16
|
+
placeholder: Y,
|
|
17
|
+
error: I,
|
|
18
|
+
touched: nn,
|
|
19
|
+
"input-container": "_input-container_1fglc_84",
|
|
20
|
+
input: en,
|
|
21
|
+
icon: cn,
|
|
22
|
+
"clear-icon": "_clear-icon_1fglc_131",
|
|
23
|
+
"additional-content": "_additional-content_1fglc_161",
|
|
24
|
+
text: tn,
|
|
25
|
+
"error-text": "_error-text_1fglc_176",
|
|
26
|
+
"help-text": "_help-text_1fglc_180"
|
|
27
|
+
}, ln = "_spinner_qn4ih_8", an = "_spin_qn4ih_1", on = {
|
|
28
|
+
"spin-loader": "_spin-loader_qn4ih_1",
|
|
29
|
+
spinner: ln,
|
|
30
|
+
spin: an,
|
|
31
|
+
"color-topaz": "_color-topaz_qn4ih_20"
|
|
32
|
+
}, v = C.bind(on), rn = ({ color: c = "topaz", className: a }) => /* @__PURE__ */ e("div", { className: v("spin-loader", a), children: /* @__PURE__ */ e("div", { className: v("spinner", { [`color-${c}`]: c }) }) }), n = C.bind(sn), hn = K(
|
|
33
|
+
({
|
|
34
|
+
value: c = "",
|
|
35
|
+
className: a,
|
|
36
|
+
error: o,
|
|
37
|
+
placeholder: p,
|
|
38
|
+
disabled: l = !1,
|
|
39
|
+
onChange: F,
|
|
40
|
+
touched: f = !1,
|
|
41
|
+
title: R,
|
|
42
|
+
label: i,
|
|
43
|
+
helpText: r,
|
|
44
|
+
defaultWidth: b = !0,
|
|
45
|
+
startIcon: h,
|
|
46
|
+
endIcon: u,
|
|
47
|
+
clearable: B = !1,
|
|
48
|
+
onClear: m,
|
|
49
|
+
isRequired: g = !1,
|
|
50
|
+
hasDoubleMessage: E = !1,
|
|
51
|
+
type: S = "text",
|
|
52
|
+
displayError: q = !0,
|
|
53
|
+
collapsible: y = !1,
|
|
54
|
+
loading: z = !1,
|
|
55
|
+
onFocus: A = () => {
|
|
56
|
+
},
|
|
57
|
+
onBlur: $ = () => {
|
|
58
|
+
},
|
|
59
|
+
...j
|
|
60
|
+
}, H) => {
|
|
61
|
+
const M = O(null), _ = H || M, [Z, x] = P(!1), D = (t) => {
|
|
62
|
+
x(!0), A(t);
|
|
63
|
+
}, G = (t) => {
|
|
64
|
+
x(!1), $(t);
|
|
65
|
+
}, J = () => {
|
|
66
|
+
var t;
|
|
67
|
+
m && (m(c), (t = _.current) == null || t.focus());
|
|
68
|
+
}, N = q && o && f, L = /* @__PURE__ */ e("span", { className: n("text", "help-text"), children: r });
|
|
69
|
+
return /* @__PURE__ */ s(w, { children: [
|
|
70
|
+
i && /* @__PURE__ */ s("span", { className: n("label", { disabled: l }), children: [
|
|
71
|
+
i,
|
|
72
|
+
g && /* @__PURE__ */ e("span", { className: n("asterisk"), children: "*" })
|
|
73
|
+
] }),
|
|
74
|
+
/* @__PURE__ */ s(
|
|
75
|
+
"div",
|
|
76
|
+
{
|
|
77
|
+
className: n("field", a, {
|
|
78
|
+
error: o,
|
|
79
|
+
touched: f,
|
|
80
|
+
disabled: l,
|
|
81
|
+
"default-width": b,
|
|
82
|
+
collapsed: y && !Z && !c
|
|
83
|
+
}),
|
|
84
|
+
title: R,
|
|
85
|
+
children: [
|
|
86
|
+
z ? /* @__PURE__ */ e(rn, {}) : h && /* @__PURE__ */ e(
|
|
87
|
+
"span",
|
|
88
|
+
{
|
|
89
|
+
className: n("icon-container-start"),
|
|
90
|
+
onClick: () => {
|
|
91
|
+
var d;
|
|
92
|
+
(d = _.current) == null || d.focus();
|
|
93
|
+
},
|
|
94
|
+
children: /* @__PURE__ */ e("span", { className: n("icon"), children: h })
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
/* @__PURE__ */ s("span", { className: n("input-container"), children: [
|
|
98
|
+
/* @__PURE__ */ e(
|
|
99
|
+
"input",
|
|
100
|
+
{
|
|
101
|
+
ref: _,
|
|
102
|
+
type: S,
|
|
103
|
+
className: n("input"),
|
|
104
|
+
value: c,
|
|
105
|
+
disabled: l,
|
|
106
|
+
onChange: F,
|
|
107
|
+
onFocus: D,
|
|
108
|
+
onBlur: G,
|
|
109
|
+
...j
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
p && !c && /* @__PURE__ */ s("span", { className: n("placeholder"), children: [
|
|
113
|
+
p,
|
|
114
|
+
g && !i && /* @__PURE__ */ e("span", { className: n("asterisk") })
|
|
115
|
+
] })
|
|
116
|
+
] }),
|
|
117
|
+
u && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("span", { className: n("icon"), children: u }) }),
|
|
118
|
+
B && c.length > 0 && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("button", { type: "button", className: n("clear-icon", { disabled: l }), onClick: J, children: /* @__PURE__ */ e(Q, {}) }) })
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
(N || r) && /* @__PURE__ */ e("div", { className: n("additional-content", { disabled: l }), children: N ? /* @__PURE__ */ s(w, { children: [
|
|
123
|
+
/* @__PURE__ */ e("span", { className: n("text", "error-text"), children: o }),
|
|
124
|
+
E && L
|
|
125
|
+
] }) : r && L })
|
|
126
|
+
] });
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
export {
|
|
130
|
+
hn as F,
|
|
131
|
+
rn as S,
|
|
132
|
+
Q as a
|
|
133
|
+
};
|
package/dist/fieldText.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { F as o } from "./fieldText-
|
|
1
|
+
import { F as o } from "./fieldText-14bf032f.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
|
-
import "
|
|
4
|
+
import "./bind-06a7ff84.js";
|
|
5
|
+
import "./baseIconButton-b6adc843.js";
|
|
5
6
|
export {
|
|
6
7
|
o as FieldText,
|
|
7
8
|
o as default
|
|
@@ -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,147 @@
|
|
|
1
|
+
import { jsx as e, jsxs as c, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import * as M from "react";
|
|
3
|
+
import { useState as g, useEffect as b, useRef as j } from "react";
|
|
4
|
+
import { Scrollbars as G } from "rc-scrollbars";
|
|
5
|
+
import { AnimatePresence as K, motion as P } from "framer-motion";
|
|
6
|
+
import { c as u } from "./bind-06a7ff84.js";
|
|
7
|
+
import { u as q } from "./useOnClickOutside-c332f7d3.js";
|
|
8
|
+
import { K as Y } from "./keyCodes-f63c0e11.js";
|
|
9
|
+
import { B as L } from "./button-33c88abf.js";
|
|
10
|
+
import { B as F } from "./baseIconButton-b6adc843.js";
|
|
11
|
+
const U = (t) => /* @__PURE__ */ M.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ M.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, n] = g({ width: 0, height: 0 });
|
|
13
|
+
return b(() => {
|
|
14
|
+
const l = () => {
|
|
15
|
+
n({
|
|
16
|
+
width: window.innerWidth,
|
|
17
|
+
height: window.innerHeight
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
return window.addEventListener("resize", l), l(), () => window.removeEventListener("resize", l);
|
|
21
|
+
}, []), t;
|
|
22
|
+
}, Z = "_scrollable_qziry_12", J = {
|
|
23
|
+
"modal-content": "_modal-content_qziry_1",
|
|
24
|
+
scrollable: Z
|
|
25
|
+
}, Q = u.bind(J), A = ({ scrollable: t = !1, children: n }) => /* @__PURE__ */ e("div", { className: Q("modal-content", { scrollable: t }), children: n }), V = {
|
|
26
|
+
"buttons-block": "_buttons-block_1dgm4_1",
|
|
27
|
+
"button-container": "_button-container_1dgm4_5",
|
|
28
|
+
"modal-footer": "_modal-footer_1dgm4_14",
|
|
29
|
+
"with-extra-node": "_with-extra-node_1dgm4_21",
|
|
30
|
+
"size-small": "_size-small_1dgm4_25"
|
|
31
|
+
}, m = u.bind(V), ee = ({
|
|
32
|
+
footerNode: t,
|
|
33
|
+
closeHandler: n,
|
|
34
|
+
okButton: l,
|
|
35
|
+
cancelButton: r,
|
|
36
|
+
size: a
|
|
37
|
+
}) => /* @__PURE__ */ c("div", { className: m("modal-footer", { "with-extra-node": t, [`size-${a}`]: a }), children: [
|
|
38
|
+
t && t,
|
|
39
|
+
/* @__PURE__ */ c("div", { className: m("buttons-block"), children: [
|
|
40
|
+
r && /* @__PURE__ */ e("div", { className: m("button-container"), children: /* @__PURE__ */ e(
|
|
41
|
+
L,
|
|
42
|
+
{
|
|
43
|
+
variant: "ghost",
|
|
44
|
+
adjustWidthOn: a === "small" ? "parent" : "content",
|
|
45
|
+
onClick: n,
|
|
46
|
+
...r
|
|
47
|
+
}
|
|
48
|
+
) }),
|
|
49
|
+
l && /* @__PURE__ */ e("div", { className: m("button-container"), children: /* @__PURE__ */ e(L, { adjustWidthOn: a === "small" ? "parent" : "content", ...l }) })
|
|
50
|
+
] })
|
|
51
|
+
] }), te = {
|
|
52
|
+
"modal-header": "_modal-header_68lru_1",
|
|
53
|
+
"width-description": "_width-description_68lru_10",
|
|
54
|
+
"modal-header-content": "_modal-header-content_68lru_14",
|
|
55
|
+
"modal-title": "_modal-title_68lru_20",
|
|
56
|
+
"close-modal-icon": "_close-modal-icon_68lru_29"
|
|
57
|
+
}, _ = u.bind(te), oe = ({ title: t, onClose: n, withDescription: l = !1 }) => /* @__PURE__ */ c("div", { className: _("modal-header", { "width-description": l }), children: [
|
|
58
|
+
/* @__PURE__ */ e("div", { className: _("modal-header-content"), children: t && /* @__PURE__ */ e("div", { className: _("modal-title"), children: t }) }),
|
|
59
|
+
/* @__PURE__ */ e(F, { className: _("close-modal-icon"), onClick: n, children: /* @__PURE__ */ e(U, {}) })
|
|
60
|
+
] }), ne = "_modal_f3ckb_1", le = "_description_f3ckb_43", ae = "_scrollable_f3ckb_53", se = {
|
|
61
|
+
modal: ne,
|
|
62
|
+
"overlay-default": "_overlay-default_f3ckb_12",
|
|
63
|
+
"overlay-light-cyan": "_overlay-light-cyan_f3ckb_16",
|
|
64
|
+
"scrolling-content": "_scrolling-content_f3ckb_20",
|
|
65
|
+
"modal-window": "_modal-window_f3ckb_26",
|
|
66
|
+
description: le,
|
|
67
|
+
scrollable: ae,
|
|
68
|
+
"size-default": "_size-default_f3ckb_57",
|
|
69
|
+
"size-small": "_size-small_f3ckb_69",
|
|
70
|
+
"size-large": "_size-large_f3ckb_81"
|
|
71
|
+
}, h = u.bind(se), ie = 0.9, ce = 32 + 24, de = 32 + 8, re = 36 + 16, me = 32 * 2, ye = ({
|
|
72
|
+
title: t,
|
|
73
|
+
children: n,
|
|
74
|
+
footerNode: l,
|
|
75
|
+
okButton: r,
|
|
76
|
+
cancelButton: a,
|
|
77
|
+
className: N,
|
|
78
|
+
size: f = "default",
|
|
79
|
+
onClose: O = () => {
|
|
80
|
+
},
|
|
81
|
+
overlay: p = "default",
|
|
82
|
+
zIndex: z = 2,
|
|
83
|
+
allowCloseOutside: D = !0,
|
|
84
|
+
scrollable: v = !1,
|
|
85
|
+
withoutFooter: y = !1,
|
|
86
|
+
createFooter: C = null,
|
|
87
|
+
description: s = null
|
|
88
|
+
}) => {
|
|
89
|
+
const [R, E] = g(!1), [S, T] = g(0), i = j(null), H = X(), k = H.height, I = k * ie, w = (k - S) / 2, $ = () => {
|
|
90
|
+
let o = I - me;
|
|
91
|
+
return y || (o = o - re), s ? o = o - de : o = o - ce, o;
|
|
92
|
+
}, d = () => {
|
|
93
|
+
E(!1);
|
|
94
|
+
}, x = (o) => {
|
|
95
|
+
const { keyCode: W } = o;
|
|
96
|
+
W === Y.ESCAPE_KEY_CODE && d();
|
|
97
|
+
};
|
|
98
|
+
return b(() => {
|
|
99
|
+
if (i && i.current) {
|
|
100
|
+
const { clientHeight: o } = i.current;
|
|
101
|
+
T(o);
|
|
102
|
+
}
|
|
103
|
+
}, [n, H]), b(() => (E(!0), document.addEventListener("keydown", x, !1), () => document.removeEventListener("keydown", x, !1)), []), q(i, D ? d : void 0), /* @__PURE__ */ e(K, { onExitComplete: O, children: R && /* @__PURE__ */ e("div", { className: h("modal", { [`overlay-${p}`]: p }), style: { zIndex: z }, children: /* @__PURE__ */ c(
|
|
104
|
+
P.div,
|
|
105
|
+
{
|
|
106
|
+
className: h("modal-window", { [`size-${f}`]: f }, N),
|
|
107
|
+
ref: i,
|
|
108
|
+
tabIndex: 0,
|
|
109
|
+
initial: { opacity: 0, marginTop: -w },
|
|
110
|
+
animate: { opacity: 1, marginTop: w },
|
|
111
|
+
exit: { opacity: 0, marginTop: -w },
|
|
112
|
+
transition: { duration: 0.3 },
|
|
113
|
+
onAnimationStart: () => {
|
|
114
|
+
var o;
|
|
115
|
+
return (o = i.current) == null ? void 0 : o.focus();
|
|
116
|
+
},
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ e(oe, { title: t, onClose: d, withDescription: !!s }),
|
|
119
|
+
v ? /* @__PURE__ */ c(G, { autoHeight: !0, autoHeightMax: $(), hideTracksWhenNotNeeded: !0, children: [
|
|
120
|
+
s && /* @__PURE__ */ e("span", { className: h("description", { scrollable: v }), children: s }),
|
|
121
|
+
/* @__PURE__ */ e(A, { scrollable: !0, children: n })
|
|
122
|
+
] }) : /* @__PURE__ */ c(B, { children: [
|
|
123
|
+
s && /* @__PURE__ */ e("span", { className: h("description"), children: s }),
|
|
124
|
+
/* @__PURE__ */ e(A, { children: n })
|
|
125
|
+
] }),
|
|
126
|
+
!y && (C ? C(d) : /* @__PURE__ */ e(
|
|
127
|
+
ee,
|
|
128
|
+
{
|
|
129
|
+
size: f,
|
|
130
|
+
footerNode: l,
|
|
131
|
+
okButton: r,
|
|
132
|
+
cancelButton: a,
|
|
133
|
+
closeHandler: d
|
|
134
|
+
}
|
|
135
|
+
))
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
"modal-window"
|
|
139
|
+
) }) });
|
|
140
|
+
};
|
|
141
|
+
export {
|
|
142
|
+
ye as M,
|
|
143
|
+
U as S,
|
|
144
|
+
A as a,
|
|
145
|
+
oe as b,
|
|
146
|
+
ee as c
|
|
147
|
+
};
|