@reportportal/ui-kit 0.0.1-alpha.7 → 0.0.1-alpha.9
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 +197 -3
- package/dist/baseIconButton-7bc53dec.js +25 -0
- package/dist/baseIconButton.js +7 -0
- package/dist/bubblesLoader-a7e709d4.js +17 -0
- package/dist/bubblesLoader.js +1 -1
- package/dist/button-7fb84fde.js +62 -0
- package/dist/button.js +1 -1
- package/dist/checkbox-4143390f.js +70 -0
- package/dist/checkbox.js +1 -1
- package/dist/components/button/button.d.ts +0 -1
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/checkbox/checkbox.d.ts +1 -0
- package/dist/components/dropdown/constants.d.ts +4 -0
- package/dist/components/dropdown/dropdown.d.ts +0 -1
- package/dist/components/fieldText/fieldText.d.ts +1 -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 +6 -1
- package/dist/components/modal/modal.d.ts +3 -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/index.d.ts +1 -0
- package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +8 -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 +46 -0
- package/dist/components/table/utils.d.ts +2 -0
- package/dist/components/themeProvider/themeProvider.d.ts +2 -1
- 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 +3 -4
- package/dist/fieldNumber-46fe79b9.js +127 -0
- package/dist/fieldNumber.js +2 -3
- package/dist/fieldText-d80b29ba.js +102 -0
- package/dist/fieldText.js +2 -2
- package/dist/fieldTextFlex-5bddf46a.js +67 -0
- package/dist/fieldTextFlex.js +8 -0
- package/dist/index-bb9b62ef.js +131 -0
- package/dist/index.js +46 -24
- package/dist/modal.js +14 -126
- package/dist/pagination-a36bc786.js +274 -0
- package/dist/pagination.js +13 -0
- package/dist/popover.js +95 -0
- package/dist/radio-fd49a09c.js +76 -0
- package/dist/{icon.js → radio.js} +4 -4
- package/dist/style.css +1 -1
- package/dist/systemMessage-1ced6079.js +30 -0
- package/dist/systemMessage.js +1 -1
- package/dist/themeProvider-46c2be7b.js +23 -0
- package/dist/themeProvider.js +4 -3
- package/dist/toggle-707ecb74.js +67 -0
- package/dist/toggle.js +1 -1
- package/dist/tooltip.js +70 -0
- package/package.json +30 -6
- package/dist/bubblesLoader-9bec3797.js +0 -17
- package/dist/button-d4944dbc.js +0 -64
- package/dist/checkbox-fdc44740.js +0 -68
- package/dist/clear-4963efcd.js +0 -5
- package/dist/components/icon/icon.d.ts +0 -11
- package/dist/components/icon/icons.d.ts +0 -21
- package/dist/components/icon/index.d.ts +0 -3
- package/dist/dropdown-45e7bc7d.js +0 -204
- package/dist/fieldNumber-27e69676.js +0 -132
- package/dist/fieldText-c7085849.js +0 -99
- package/dist/icon-71262f5c.js +0 -26
- package/dist/systemMessage-62c3133d.js +0 -30
- package/dist/themeProvider-5800417e.js +0 -19
- package/dist/toggle-5b3d8333.js +0 -67
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { c as r } from "./bind-06a7ff84.js";
|
|
3
|
-
const a = "_bubble_1wrm9_1", c = "_bubbles_1wrm9_1", _ = {
|
|
4
|
-
"bubbles-loader": "_bubbles-loader_1wrm9_1",
|
|
5
|
-
"color-topaz": "_color-topaz_1wrm9_4",
|
|
6
|
-
bubble: a,
|
|
7
|
-
bubbles: c
|
|
8
|
-
}, l = r.bind(_), t = 7, i = ({
|
|
9
|
-
color: b = "topaz",
|
|
10
|
-
className: o
|
|
11
|
-
}) => /* @__PURE__ */ s("div", { className: l("bubbles-loader", o, { [`color-${b}`]: b }), children: Array(t).fill(void 0).map((m, e) => (
|
|
12
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
13
|
-
/* @__PURE__ */ s("div", { className: l("bubble") }, e)
|
|
14
|
-
)) });
|
|
15
|
-
export {
|
|
16
|
-
i as B
|
|
17
|
-
};
|
package/dist/button-d4944dbc.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { jsxs as h, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as x } from "react";
|
|
3
|
-
import { c as f } from "./bind-06a7ff84.js";
|
|
4
|
-
const g = "_button_wutm5_1", y = "_primary_wutm5_19", N = "_disabled_wutm5_24", B = "_ghost_wutm5_36", $ = "_danger_wutm5_51", j = "_text_wutm5_67", I = "_icon_wutm5_113", R = {
|
|
5
|
-
button: g,
|
|
6
|
-
primary: y,
|
|
7
|
-
disabled: N,
|
|
8
|
-
ghost: B,
|
|
9
|
-
danger: $,
|
|
10
|
-
text: j,
|
|
11
|
-
"width-wide-content": "_width-wide-content_wutm5_103",
|
|
12
|
-
"width-parent": "_width-parent_wutm5_108",
|
|
13
|
-
icon: I,
|
|
14
|
-
"icon-start": "_icon-start_wutm5_119",
|
|
15
|
-
"icon-end": "_icon-end_wutm5_123"
|
|
16
|
-
}, c = f.bind(R), A = x(
|
|
17
|
-
({
|
|
18
|
-
variant: t = "primary",
|
|
19
|
-
icon: e,
|
|
20
|
-
iconPlace: n = "start",
|
|
21
|
-
adjustWidthOn: o = "content",
|
|
22
|
-
type: i = "button",
|
|
23
|
-
children: r,
|
|
24
|
-
disabled: s = !1,
|
|
25
|
-
onClick: a,
|
|
26
|
-
title: m,
|
|
27
|
-
className: d,
|
|
28
|
-
dataAutomationId: u,
|
|
29
|
-
...w
|
|
30
|
-
}, b) => {
|
|
31
|
-
const p = c("button", t, d, {
|
|
32
|
-
disabled: s,
|
|
33
|
-
[`width-${o}`]: o
|
|
34
|
-
}), _ = t === "text" && e;
|
|
35
|
-
return /* @__PURE__ */ h(
|
|
36
|
-
"button",
|
|
37
|
-
{
|
|
38
|
-
ref: b,
|
|
39
|
-
type: i,
|
|
40
|
-
disabled: s,
|
|
41
|
-
className: p,
|
|
42
|
-
onClick: a,
|
|
43
|
-
title: m,
|
|
44
|
-
"data-automation-id": u,
|
|
45
|
-
...w,
|
|
46
|
-
children: [
|
|
47
|
-
_ && /* @__PURE__ */ l(
|
|
48
|
-
"i",
|
|
49
|
-
{
|
|
50
|
-
className: c("icon", {
|
|
51
|
-
[`icon-${n}`]: n
|
|
52
|
-
}),
|
|
53
|
-
children: _
|
|
54
|
-
}
|
|
55
|
-
),
|
|
56
|
-
r
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
export {
|
|
63
|
-
A as B
|
|
64
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { c as x } from "./bind-06a7ff84.js";
|
|
3
|
-
import { useRef as d } from "react";
|
|
4
|
-
import { K as p } from "./keyCodes-f63c0e11.js";
|
|
5
|
-
const m = "_checkbox_1ggpr_1", f = "_disabled_1ggpr_12", g = "_input_1ggpr_17", y = "_control_1ggpr_24", C = "_children_1ggpr_78", E = {
|
|
6
|
-
checkbox: m,
|
|
7
|
-
disabled: f,
|
|
8
|
-
input: g,
|
|
9
|
-
control: y,
|
|
10
|
-
children: C
|
|
11
|
-
}, e = x.bind(E), j = ({
|
|
12
|
-
children: t,
|
|
13
|
-
disabled: c = !1,
|
|
14
|
-
onChange: _,
|
|
15
|
-
className: b,
|
|
16
|
-
value: s,
|
|
17
|
-
...h
|
|
18
|
-
}) => {
|
|
19
|
-
const o = d(null), k = (n) => {
|
|
20
|
-
var a, i;
|
|
21
|
-
const { keyCode: l } = n;
|
|
22
|
-
if (l === p.SPACE_KEY_CODE) {
|
|
23
|
-
n.preventDefault(), (a = o.current) == null || a.click();
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
l === p.ENTER_KEY_CODE && (n.preventDefault(), (i = o.current) == null || i.click());
|
|
27
|
-
};
|
|
28
|
-
return /* @__PURE__ */ u(
|
|
29
|
-
"label",
|
|
30
|
-
{
|
|
31
|
-
id: "rp-ui-kit-checkbox-label",
|
|
32
|
-
className: e("checkbox", b, {
|
|
33
|
-
disabled: c
|
|
34
|
-
}),
|
|
35
|
-
children: [
|
|
36
|
-
/* @__PURE__ */ r(
|
|
37
|
-
"input",
|
|
38
|
-
{
|
|
39
|
-
ref: o,
|
|
40
|
-
tabIndex: 0,
|
|
41
|
-
type: "checkbox",
|
|
42
|
-
onKeyDown: k,
|
|
43
|
-
className: e("input"),
|
|
44
|
-
disabled: c,
|
|
45
|
-
onChange: _,
|
|
46
|
-
checked: s,
|
|
47
|
-
...h
|
|
48
|
-
}
|
|
49
|
-
),
|
|
50
|
-
/* @__PURE__ */ r(
|
|
51
|
-
"span",
|
|
52
|
-
{
|
|
53
|
-
"aria-labelledby": "rp-ui-kit-checkbox-label",
|
|
54
|
-
role: "checkbox",
|
|
55
|
-
"aria-checked": s,
|
|
56
|
-
className: e("control", {
|
|
57
|
-
disabled: c
|
|
58
|
-
})
|
|
59
|
-
}
|
|
60
|
-
),
|
|
61
|
-
t && /* @__PURE__ */ r("span", { className: e("children", { disabled: c }), children: t })
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
export {
|
|
67
|
-
j as C
|
|
68
|
-
};
|
package/dist/clear-4963efcd.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as e from "react";
|
|
2
|
-
const l = (t) => /* @__PURE__ */ e.createElement("svg", { width: 17, height: 17, viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.createElement("rect", { width: 16.2089, height: 16.1568, rx: 8.07842, fill: "#A2AAB5" }), /* @__PURE__ */ e.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" }));
|
|
3
|
-
export {
|
|
4
|
-
l as S
|
|
5
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FC, MouseEventHandler } from 'react';
|
|
2
|
-
import { icons } from './icons';
|
|
3
|
-
type IconName = keyof typeof icons;
|
|
4
|
-
interface IconProps {
|
|
5
|
-
icon: IconName;
|
|
6
|
-
className?: string;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
onClick?: MouseEventHandler<HTMLSpanElement>;
|
|
9
|
-
}
|
|
10
|
-
export declare const Icon: FC<IconProps>;
|
|
11
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const icons: {
|
|
3
|
-
clear: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
4
|
-
title?: string | undefined;
|
|
5
|
-
}>;
|
|
6
|
-
close: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
7
|
-
title?: string | undefined;
|
|
8
|
-
}>;
|
|
9
|
-
dropdown: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
10
|
-
title?: string | undefined;
|
|
11
|
-
}>;
|
|
12
|
-
delete: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
13
|
-
title?: string | undefined;
|
|
14
|
-
}>;
|
|
15
|
-
plus: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
16
|
-
title?: string | undefined;
|
|
17
|
-
}>;
|
|
18
|
-
minus: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
19
|
-
title?: string | undefined;
|
|
20
|
-
}>;
|
|
21
|
-
};
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { jsx as d, jsxs as R } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as Q, useState as X, useRef as S } from "react";
|
|
3
|
-
import { c as H } from "./bind-06a7ff84.js";
|
|
4
|
-
import { Manager as Z, Reference as U, Popper as F } from "react-popper";
|
|
5
|
-
import { useSelect as N } from "downshift";
|
|
6
|
-
import { Scrollbars as B } from "rc-scrollbars";
|
|
7
|
-
import { u as ee } from "./useOnClickOutside-c332f7d3.js";
|
|
8
|
-
import { K as u } from "./keyCodes-f63c0e11.js";
|
|
9
|
-
import { I as ne } from "./icon-71262f5c.js";
|
|
10
|
-
const te = "_disabled_ev7l2_13", oe = "_hidden_ev7l2_17", de = "_selected_ev7l2_23", re = "_hover_ev7l2_26", le = {
|
|
11
|
-
"dropdown-option": "_dropdown-option_ev7l2_1",
|
|
12
|
-
disabled: te,
|
|
13
|
-
hidden: oe,
|
|
14
|
-
selected: de,
|
|
15
|
-
hover: re,
|
|
16
|
-
"single-option": "_single-option_ev7l2_39",
|
|
17
|
-
"sub-option": "_sub-option_ev7l2_45"
|
|
18
|
-
}, T = H.bind(le), se = Q(
|
|
19
|
-
(t, n) => {
|
|
20
|
-
const {
|
|
21
|
-
option: { value: l, disabled: a, hidden: m, label: i, title: r, groupRef: b },
|
|
22
|
-
selected: w,
|
|
23
|
-
onChange: g,
|
|
24
|
-
render: f,
|
|
25
|
-
highlightHovered: E,
|
|
26
|
-
onMouseEnter: p
|
|
27
|
-
} = t, C = () => {
|
|
28
|
-
g && g(l);
|
|
29
|
-
};
|
|
30
|
-
return /* @__PURE__ */ d(
|
|
31
|
-
"div",
|
|
32
|
-
{
|
|
33
|
-
className: T("dropdown-option", {
|
|
34
|
-
selected: w,
|
|
35
|
-
disabled: a,
|
|
36
|
-
hidden: m,
|
|
37
|
-
hover: E
|
|
38
|
-
}),
|
|
39
|
-
title: a && r || void 0,
|
|
40
|
-
onClick: C,
|
|
41
|
-
ref: n,
|
|
42
|
-
onMouseEnter: p,
|
|
43
|
-
children: /* @__PURE__ */ d("div", { className: T("single-option", { "sub-option": !!b }), children: f ? f(t) : i })
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
), ae = [
|
|
48
|
-
u.ENTER_KEY_CODE,
|
|
49
|
-
u.SPACE_KEY_CODE,
|
|
50
|
-
u.ARROW_DOWN_KEY_CODE
|
|
51
|
-
], ie = [u.ESCAPE_KEY_CODE, u.TAB_KEY_CODE], ce = (t, n) => t.map(({ value: l }) => l).indexOf(n), _e = (t, n) => (t % n + n) % n, x = (t, n = 0, l = 1) => {
|
|
52
|
-
if (!t[n].disabled)
|
|
53
|
-
return n;
|
|
54
|
-
const a = t.length;
|
|
55
|
-
return x(t, _e(n + l, a));
|
|
56
|
-
}, he = (t, n) => x(t, n), ue = (t, n) => x(t, n, -1), fe = "_container_1d54v_1", ge = "_icon_1d54v_10", pe = "_arrow_1d54v_16", ve = "_dropdown_1d54v_22", me = "_disabled_1d54v_39", be = "_error_1d54v_43", we = "_touched_1d54v_43", Ee = "_opened_1d54v_47", Ce = "_placeholder_1d54v_72", De = "_value_1d54v_75", Oe = "_ghost_1d54v_113", Ne = {
|
|
57
|
-
container: fe,
|
|
58
|
-
"default-width": "_default-width_1d54v_6",
|
|
59
|
-
icon: ge,
|
|
60
|
-
arrow: pe,
|
|
61
|
-
dropdown: ve,
|
|
62
|
-
"transparent-background": "_transparent-background_1d54v_36",
|
|
63
|
-
disabled: me,
|
|
64
|
-
error: be,
|
|
65
|
-
touched: we,
|
|
66
|
-
opened: Ee,
|
|
67
|
-
placeholder: Ce,
|
|
68
|
-
value: De,
|
|
69
|
-
"mobile-disabled": "_mobile-disabled_1d54v_87",
|
|
70
|
-
"select-list": "_select-list_1d54v_92",
|
|
71
|
-
ghost: Oe
|
|
72
|
-
}, h = H.bind(Ne), Pe = ({
|
|
73
|
-
value: t = "",
|
|
74
|
-
options: n = [],
|
|
75
|
-
disabled: l = !1,
|
|
76
|
-
error: a,
|
|
77
|
-
onChange: m,
|
|
78
|
-
onFocus: i,
|
|
79
|
-
onBlur: r,
|
|
80
|
-
mobileDisabled: b,
|
|
81
|
-
title: w,
|
|
82
|
-
touched: g = !1,
|
|
83
|
-
icon: f,
|
|
84
|
-
variant: E,
|
|
85
|
-
placeholder: p = "",
|
|
86
|
-
defaultWidth: C = !0,
|
|
87
|
-
renderOption: M,
|
|
88
|
-
transparentBackground: P = !1,
|
|
89
|
-
className: Y,
|
|
90
|
-
toggleButtonClassName: A
|
|
91
|
-
}) => {
|
|
92
|
-
const [c, _] = X(!1), y = S(null), s = S(null);
|
|
93
|
-
ee(y, () => {
|
|
94
|
-
c && (_(!1), r && r());
|
|
95
|
-
});
|
|
96
|
-
const I = (e) => {
|
|
97
|
-
e.disabled || (m(e.value), _((o) => !o));
|
|
98
|
-
}, W = () => n.find(({ value: e }) => e === t), K = ce(n, t), {
|
|
99
|
-
getToggleButtonProps: $,
|
|
100
|
-
getMenuProps: j,
|
|
101
|
-
getItemProps: V,
|
|
102
|
-
setHighlightedIndex: v,
|
|
103
|
-
highlightedIndex: k,
|
|
104
|
-
selectedItem: D
|
|
105
|
-
} = N({
|
|
106
|
-
items: n,
|
|
107
|
-
itemToString: (e) => (e != null && e.label ? String(e.label) : p) || "",
|
|
108
|
-
selectedItem: W(),
|
|
109
|
-
isOpen: c,
|
|
110
|
-
circularNavigation: !0,
|
|
111
|
-
defaultHighlightedIndex: K,
|
|
112
|
-
onHighlightedIndexChange: (e) => {
|
|
113
|
-
switch (e.type) {
|
|
114
|
-
case N.stateChangeTypes.MenuKeyDownArrowUp:
|
|
115
|
-
return v(ue(n, e.highlightedIndex)), e;
|
|
116
|
-
case N.stateChangeTypes.MenuKeyDownArrowDown:
|
|
117
|
-
return v(he(n, e.highlightedIndex)), e;
|
|
118
|
-
default:
|
|
119
|
-
return e;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}), L = () => {
|
|
123
|
-
l || (s != null && s.current && s.current(), _((e) => !e), c ? r && r() : i && i());
|
|
124
|
-
}, q = () => {
|
|
125
|
-
if (!t && t !== !1)
|
|
126
|
-
return p;
|
|
127
|
-
let e = t;
|
|
128
|
-
return n.forEach((o) => {
|
|
129
|
-
o.value === t && (e = o.label);
|
|
130
|
-
}), e;
|
|
131
|
-
}, z = (e) => {
|
|
132
|
-
const { keyCode: o } = e;
|
|
133
|
-
ae.includes(o) && !c && (e.preventDefault(), v(K), s != null && s.current && s.current(), _(!0), i && i());
|
|
134
|
-
}, G = (e) => {
|
|
135
|
-
const { keyCode: o } = e;
|
|
136
|
-
if (o === u.ENTER_KEY_CODE) {
|
|
137
|
-
const O = n[k];
|
|
138
|
-
I(O), _(!1), r && r();
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
ie.includes(o) && (e.stopPropagation(), _(!1), r && r());
|
|
142
|
-
}, J = () => n.map((e, o) => /* @__PURE__ */ d(
|
|
143
|
-
se,
|
|
144
|
-
{
|
|
145
|
-
...V({
|
|
146
|
-
item: e,
|
|
147
|
-
index: o
|
|
148
|
-
}),
|
|
149
|
-
selected: e.value === (D == null ? void 0 : D.value),
|
|
150
|
-
option: e,
|
|
151
|
-
highlightHovered: k === o,
|
|
152
|
-
render: M,
|
|
153
|
-
onChange: e.disabled ? null : () => I(e),
|
|
154
|
-
onMouseEnter: () => v(o)
|
|
155
|
-
},
|
|
156
|
-
e.value
|
|
157
|
-
));
|
|
158
|
-
return /* @__PURE__ */ d(Z, { children: /* @__PURE__ */ R(
|
|
159
|
-
"div",
|
|
160
|
-
{
|
|
161
|
-
ref: y,
|
|
162
|
-
className: h("container", { "default-width": C }, Y),
|
|
163
|
-
title: w,
|
|
164
|
-
children: [
|
|
165
|
-
/* @__PURE__ */ d(U, { children: ({ ref: e }) => /* @__PURE__ */ R(
|
|
166
|
-
"button",
|
|
167
|
-
{
|
|
168
|
-
...$({
|
|
169
|
-
ref: e,
|
|
170
|
-
tabIndex: l ? -1 : 0,
|
|
171
|
-
className: h("dropdown", E, A, {
|
|
172
|
-
"transparent-background": P,
|
|
173
|
-
opened: c,
|
|
174
|
-
disabled: l,
|
|
175
|
-
error: a,
|
|
176
|
-
touched: g,
|
|
177
|
-
"mobile-disabled": b
|
|
178
|
-
}),
|
|
179
|
-
onClick: L,
|
|
180
|
-
onKeyDown: z
|
|
181
|
-
}),
|
|
182
|
-
children: [
|
|
183
|
-
f && /* @__PURE__ */ d("span", { className: h("icon"), children: f }),
|
|
184
|
-
/* @__PURE__ */ d("span", { className: h("value", { placeholder: !t }), children: q() }),
|
|
185
|
-
/* @__PURE__ */ d(ne, { icon: "dropdown", className: h("arrow") })
|
|
186
|
-
]
|
|
187
|
-
}
|
|
188
|
-
) }),
|
|
189
|
-
/* @__PURE__ */ d(F, { placement: "bottom-start", children: ({ ref: e, style: o, update: O }) => (s.current = O, /* @__PURE__ */ d(
|
|
190
|
-
"div",
|
|
191
|
-
{
|
|
192
|
-
className: h("select-list", { opened: c }),
|
|
193
|
-
style: o,
|
|
194
|
-
...j({ ref: e, onKeyDown: G }),
|
|
195
|
-
children: /* @__PURE__ */ d(B, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: J() })
|
|
196
|
-
}
|
|
197
|
-
)) })
|
|
198
|
-
]
|
|
199
|
-
}
|
|
200
|
-
) });
|
|
201
|
-
};
|
|
202
|
-
export {
|
|
203
|
-
Pe as D
|
|
204
|
-
};
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { jsxs as O, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as A, useMemo as T } from "react";
|
|
3
|
-
import { c as W } from "./bind-06a7ff84.js";
|
|
4
|
-
import { K as _ } from "./keyCodes-f63c0e11.js";
|
|
5
|
-
import { I as d } from "./icon-71262f5c.js";
|
|
6
|
-
const y = 5, D = 16, I = [
|
|
7
|
-
_.TAB_KEY_CODE,
|
|
8
|
-
_.BACKSPACE_KEY_CODE,
|
|
9
|
-
_.ARROW_LEFT_KEY_CODE,
|
|
10
|
-
_.ARROW_UP_KEY_CODE,
|
|
11
|
-
_.ARROW_RIGHT_KEY_CODE,
|
|
12
|
-
_.ARROW_DOWN_KEY_CODE,
|
|
13
|
-
_.DELETE_KEY_CODE,
|
|
14
|
-
_.NUM_LOCK_0_KEY_CODE,
|
|
15
|
-
_.NUM_LOCK_1_KEY_CODE,
|
|
16
|
-
_.NUM_LOCK_2_KEY_CODE,
|
|
17
|
-
_.NUM_LOCK_3_KEY_CODE,
|
|
18
|
-
_.NUM_LOCK_4_KEY_CODE,
|
|
19
|
-
_.NUM_LOCK_5_KEY_CODE,
|
|
20
|
-
_.NUM_LOCK_6_KEY_CODE,
|
|
21
|
-
_.NUM_LOCK_7_KEY_CODE,
|
|
22
|
-
_.NUM_LOCK_8_KEY_CODE,
|
|
23
|
-
_.NUM_LOCK_9_KEY_CODE
|
|
24
|
-
], w = "_disabled_12fgx_6", x = "_label_12fgx_10", b = "_sign_12fgx_21", k = "_error_12fgx_36", B = "_touched_12fgx_36", F = "_filled_12fgx_41", H = "_input_12fgx_26", S = {
|
|
25
|
-
"field-number": "_field-number_12fgx_1",
|
|
26
|
-
disabled: w,
|
|
27
|
-
label: x,
|
|
28
|
-
sign: b,
|
|
29
|
-
"input-container": "_input-container_12fgx_26",
|
|
30
|
-
error: k,
|
|
31
|
-
touched: B,
|
|
32
|
-
filled: F,
|
|
33
|
-
"input-field": "_input-field_12fgx_48",
|
|
34
|
-
input: H
|
|
35
|
-
}, c = W.bind(S), q = ({
|
|
36
|
-
value: e = "",
|
|
37
|
-
placeholder: a = "0",
|
|
38
|
-
disabled: s = !1,
|
|
39
|
-
onChange: l,
|
|
40
|
-
onFocus: f,
|
|
41
|
-
onBlur: V,
|
|
42
|
-
label: u,
|
|
43
|
-
postfix: i = "",
|
|
44
|
-
min: o = 0,
|
|
45
|
-
max: E = Number.MAX_SAFE_INTEGER,
|
|
46
|
-
title: p,
|
|
47
|
-
error: N,
|
|
48
|
-
touched: h = !1,
|
|
49
|
-
...m
|
|
50
|
-
}) => {
|
|
51
|
-
const C = A(null), Y = (n) => {
|
|
52
|
-
let t = n.target.value.replace(/^0(?=\d+|^\d)/g, "");
|
|
53
|
-
if (t === "") {
|
|
54
|
-
l("");
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
t = +t, t >= o && t <= E && l(t);
|
|
58
|
-
}, g = (n) => {
|
|
59
|
-
const { keyCode: t } = n;
|
|
60
|
-
I.includes(t) || (t < _.NUMBER_START_KEY_CODE || t > _.NUMBER_END_KEY_CODE || n.shiftKey) && n.preventDefault();
|
|
61
|
-
}, L = () => {
|
|
62
|
-
const n = +e - 1;
|
|
63
|
-
n >= o && n <= E && l(n);
|
|
64
|
-
}, M = () => {
|
|
65
|
-
const n = +e + 1;
|
|
66
|
-
n >= o && n <= E && l(n);
|
|
67
|
-
}, K = a + i, R = T(() => {
|
|
68
|
-
let n = (String(e) || K).length;
|
|
69
|
-
return i && !e && (n += 1), n > D ? `${D}ch` : `${n || y}ch`;
|
|
70
|
-
}, [K, i, e]), U = () => {
|
|
71
|
-
C && C.current && C.current.focus(), f && f();
|
|
72
|
-
};
|
|
73
|
-
return /* @__PURE__ */ O("div", { className: c("field-number", { disabled: s }), children: [
|
|
74
|
-
u && /* @__PURE__ */ r("span", { className: c("label"), children: u }),
|
|
75
|
-
/* @__PURE__ */ O(
|
|
76
|
-
"div",
|
|
77
|
-
{
|
|
78
|
-
className: c("input-container", {
|
|
79
|
-
filled: !!e || e === 0,
|
|
80
|
-
error: N,
|
|
81
|
-
disabled: s,
|
|
82
|
-
touched: h
|
|
83
|
-
}),
|
|
84
|
-
title: p,
|
|
85
|
-
children: [
|
|
86
|
-
/* @__PURE__ */ r(
|
|
87
|
-
d,
|
|
88
|
-
{
|
|
89
|
-
icon: "minus",
|
|
90
|
-
className: c("sign", "minus"),
|
|
91
|
-
disabled: s,
|
|
92
|
-
onClick: L
|
|
93
|
-
}
|
|
94
|
-
),
|
|
95
|
-
/* @__PURE__ */ O("span", { className: c("input-field", { disabled: s }), onClick: U, children: [
|
|
96
|
-
/* @__PURE__ */ r(
|
|
97
|
-
"input",
|
|
98
|
-
{
|
|
99
|
-
ref: C,
|
|
100
|
-
className: c("input"),
|
|
101
|
-
type: "number",
|
|
102
|
-
value: e,
|
|
103
|
-
placeholder: K,
|
|
104
|
-
disabled: s,
|
|
105
|
-
min: o,
|
|
106
|
-
max: E,
|
|
107
|
-
onKeyDown: s ? void 0 : g,
|
|
108
|
-
onChange: s ? void 0 : Y,
|
|
109
|
-
onFocus: s ? void 0 : f,
|
|
110
|
-
style: { width: R },
|
|
111
|
-
...m
|
|
112
|
-
}
|
|
113
|
-
),
|
|
114
|
-
!!i && (e === 0 || !!e) && /* @__PURE__ */ r("span", { children: i.slice(0, 1) })
|
|
115
|
-
] }),
|
|
116
|
-
/* @__PURE__ */ r(
|
|
117
|
-
d,
|
|
118
|
-
{
|
|
119
|
-
icon: "plus",
|
|
120
|
-
className: c("sign", "plus"),
|
|
121
|
-
disabled: s,
|
|
122
|
-
onClick: M
|
|
123
|
-
}
|
|
124
|
-
)
|
|
125
|
-
]
|
|
126
|
-
}
|
|
127
|
-
)
|
|
128
|
-
] });
|
|
129
|
-
};
|
|
130
|
-
export {
|
|
131
|
-
q as F
|
|
132
|
-
};
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as t, Fragment as h } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as S } from "react";
|
|
3
|
-
import { c as v } from "./bind-06a7ff84.js";
|
|
4
|
-
import { S as C } from "./clear-4963efcd.js";
|
|
5
|
-
const E = "_label_11rxn_18", z = "_asterisk_11rxn_27", A = "_disabled_11rxn_33", B = "_field_11rxn_37", D = "_error_11rxn_51", G = "_touched_11rxn_51", H = "_input_11rxn_65", J = "_placeholder_11rxn_88", K = "_icon_11rxn_1", L = "_text_11rxn_151", M = {
|
|
6
|
-
"icon-container": "_icon-container_11rxn_1",
|
|
7
|
-
"icon-container-end": "_icon-container-end_11rxn_1",
|
|
8
|
-
"icon-container-start": "_icon-container-start_11rxn_1",
|
|
9
|
-
label: E,
|
|
10
|
-
asterisk: z,
|
|
11
|
-
disabled: A,
|
|
12
|
-
field: B,
|
|
13
|
-
error: D,
|
|
14
|
-
touched: G,
|
|
15
|
-
"default-width": "_default-width_11rxn_61",
|
|
16
|
-
"input-container": "_input-container_11rxn_65",
|
|
17
|
-
input: H,
|
|
18
|
-
placeholder: J,
|
|
19
|
-
icon: K,
|
|
20
|
-
"clear-icon": "_clear-icon_11rxn_108",
|
|
21
|
-
"additional-content": "_additional-content_11rxn_144",
|
|
22
|
-
text: L,
|
|
23
|
-
"error-text": "_error-text_11rxn_159",
|
|
24
|
-
"help-text": "_help-text_11rxn_163"
|
|
25
|
-
}, n = v.bind(M), T = S(
|
|
26
|
-
({
|
|
27
|
-
value: s,
|
|
28
|
-
className: f,
|
|
29
|
-
error: c,
|
|
30
|
-
placeholder: l,
|
|
31
|
-
disabled: a = !1,
|
|
32
|
-
onChange: N,
|
|
33
|
-
touched: r = !1,
|
|
34
|
-
title: u,
|
|
35
|
-
label: i,
|
|
36
|
-
helpText: o,
|
|
37
|
-
defaultWidth: k = !0,
|
|
38
|
-
startIcon: _,
|
|
39
|
-
endIcon: d,
|
|
40
|
-
clearable: b = !1,
|
|
41
|
-
onClear: x,
|
|
42
|
-
isRequired: p = !1,
|
|
43
|
-
hasDoubleMessage: w = !1,
|
|
44
|
-
type: F = "text",
|
|
45
|
-
...g
|
|
46
|
-
}, j) => {
|
|
47
|
-
const y = () => {
|
|
48
|
-
x && x(s);
|
|
49
|
-
}, m = /* @__PURE__ */ e("span", { className: n("text", "help-text"), children: o });
|
|
50
|
-
return /* @__PURE__ */ t(h, { children: [
|
|
51
|
-
i && /* @__PURE__ */ t("span", { className: n("label", { disabled: a }), children: [
|
|
52
|
-
i,
|
|
53
|
-
p && /* @__PURE__ */ e("span", { className: n("asterisk"), children: "*" })
|
|
54
|
-
] }),
|
|
55
|
-
/* @__PURE__ */ t(
|
|
56
|
-
"div",
|
|
57
|
-
{
|
|
58
|
-
className: n("field", f, {
|
|
59
|
-
error: c,
|
|
60
|
-
touched: r,
|
|
61
|
-
disabled: a,
|
|
62
|
-
"default-width": k
|
|
63
|
-
}),
|
|
64
|
-
title: u,
|
|
65
|
-
children: [
|
|
66
|
-
_ && /* @__PURE__ */ e("span", { className: n("icon-container-start"), children: /* @__PURE__ */ e("span", { className: n("icon"), children: _ }) }),
|
|
67
|
-
/* @__PURE__ */ t("span", { className: n("input-container"), children: [
|
|
68
|
-
/* @__PURE__ */ e(
|
|
69
|
-
"input",
|
|
70
|
-
{
|
|
71
|
-
ref: j,
|
|
72
|
-
type: F,
|
|
73
|
-
className: n("input"),
|
|
74
|
-
value: s,
|
|
75
|
-
disabled: a,
|
|
76
|
-
onChange: N,
|
|
77
|
-
...g
|
|
78
|
-
}
|
|
79
|
-
),
|
|
80
|
-
l && !s && /* @__PURE__ */ t("span", { className: n("placeholder"), children: [
|
|
81
|
-
l,
|
|
82
|
-
p && !i && /* @__PURE__ */ e("span", { className: n("asterisk") })
|
|
83
|
-
] })
|
|
84
|
-
] }),
|
|
85
|
-
d && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("span", { className: n("icon"), children: d }) }),
|
|
86
|
-
b && /* @__PURE__ */ e("span", { className: n("icon-container-end"), children: /* @__PURE__ */ e("button", { type: "button", className: n("clear-icon", { disabled: a }), onClick: y, children: /* @__PURE__ */ e(C, {}) }) })
|
|
87
|
-
]
|
|
88
|
-
}
|
|
89
|
-
),
|
|
90
|
-
(c && r || o) && /* @__PURE__ */ e("div", { className: n("additional-content", { disabled: a }), children: c && r ? /* @__PURE__ */ t(h, { children: [
|
|
91
|
-
/* @__PURE__ */ e("span", { className: n("text", "error-text"), children: c }),
|
|
92
|
-
w && m
|
|
93
|
-
] }) : o && m })
|
|
94
|
-
] });
|
|
95
|
-
}
|
|
96
|
-
);
|
|
97
|
-
export {
|
|
98
|
-
T as F
|
|
99
|
-
};
|
package/dist/icon-71262f5c.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { c as i } from "./bind-06a7ff84.js";
|
|
3
|
-
import { S as c } from "./clear-4963efcd.js";
|
|
4
|
-
import * as l from "react";
|
|
5
|
-
const L = (e) => /* @__PURE__ */ l.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ l.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" })), d = (e) => /* @__PURE__ */ l.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ l.createElement("path", { d: "M14.2174 5.82426C14.3736 5.66805 14.3736 5.41479 14.2174 5.25858L14.0759 5.11716C13.9197 4.96095 13.6665 4.96095 13.5103 5.11716L8.16726 10.4602L2.82426 5.11716C2.66805 4.96095 2.41479 4.96095 2.25858 5.11716L2.11716 5.25858C1.96095 5.41479 1.96095 5.66805 2.11716 5.82426L7.89176 11.5989C8.04797 11.7551 8.30124 11.7551 8.45745 11.5989L8.88171 11.1746L8.87436 11.1673L14.2174 5.82426Z", fill: "#A2AAB5" })), a = (e) => /* @__PURE__ */ l.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ l.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__ */ l.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" })), r = (e) => /* @__PURE__ */ l.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#C1C7D0", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ l.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" })), w = (e) => /* @__PURE__ */ l.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "#C1C7D0", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ l.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" })), v = {
|
|
6
|
-
clear: c,
|
|
7
|
-
close: L,
|
|
8
|
-
dropdown: d,
|
|
9
|
-
delete: a,
|
|
10
|
-
plus: r,
|
|
11
|
-
minus: w
|
|
12
|
-
}, g = "_icon_pgc7q_1", h = "_disabled_pgc7q_4", m = {
|
|
13
|
-
icon: g,
|
|
14
|
-
disabled: h
|
|
15
|
-
}, p = i.bind(m), A = ({
|
|
16
|
-
icon: e,
|
|
17
|
-
className: o,
|
|
18
|
-
disabled: t = !1,
|
|
19
|
-
onClick: s
|
|
20
|
-
}) => {
|
|
21
|
-
const C = v[e];
|
|
22
|
-
return /* @__PURE__ */ n("span", { className: p("icon", o, { disabled: t }), onClick: t ? void 0 : s, children: /* @__PURE__ */ n(C, {}) });
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
A as I
|
|
26
|
-
};
|