@reportportal/ui-kit 0.0.1-alpha.46 → 0.0.1-alpha.47

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.
Files changed (62) hide show
  1. package/dist/arrowUp-4a5caee7.js +6 -0
  2. package/dist/clear-53660571.js +5 -0
  3. package/dist/close-4b33d7c1.js +5 -0
  4. package/dist/common/utils/index.d.ts +1 -0
  5. package/dist/common/utils/isPositiveInteger.d.ts +1 -0
  6. package/dist/components/fieldText/fieldText.d.ts +2 -0
  7. package/dist/components/icons/index.d.ts +0 -1
  8. package/dist/components/index.d.ts +1 -3
  9. package/dist/{datePicker-68379fe1.js → datePicker-81d77983.js} +4 -5
  10. package/dist/datePicker.js +7 -4
  11. package/dist/dropdown-0260bb66.js +5 -0
  12. package/dist/dropdown-5225df5e.js +263 -0
  13. package/dist/dropdown.js +2 -1
  14. package/dist/error-4f493850.js +7 -0
  15. package/dist/fieldNumber-6a5fdd15.js +125 -0
  16. package/dist/fieldNumber.js +2 -1
  17. package/dist/fieldText-df070a3c.js +135 -0
  18. package/dist/fieldText.js +3 -2
  19. package/dist/icons.js +32 -0
  20. package/dist/index.js +72 -114
  21. package/dist/minus-660ea0d6.js +6 -0
  22. package/dist/modal.js +144 -14
  23. package/dist/pagination-38898dc9.js +345 -0
  24. package/dist/pagination.js +5 -2
  25. package/dist/prevChapter-ebd5a3a7.js +6 -0
  26. package/dist/spinLoader-c4a53718.js +11 -0
  27. package/dist/spinLoader.js +7 -0
  28. package/dist/style.css +1 -1
  29. package/dist/systemAlert.js +51 -0
  30. package/dist/table-32fc8c70.js +144 -0
  31. package/dist/table.js +2 -2
  32. package/package.json +1 -1
  33. package/dist/components/dataPicker2/dataPicker2/datePicker.d.ts +0 -24
  34. package/dist/components/dataPicker2/dataPicker2/header/datePickerHeader.d.ts +0 -15
  35. package/dist/components/dataPicker2/dataPicker2/header/index.d.ts +0 -3
  36. package/dist/components/dataPicker2/dataPicker2/index.d.ts +0 -3
  37. package/dist/components/dataPicker2/dataPicker2/utils.d.ts +0 -3
  38. package/dist/components/date2/date2.d.ts +0 -24
  39. package/dist/components/date2/index.d.ts +0 -3
  40. package/dist/components/datePicker1/datePicker.d.ts +0 -24
  41. package/dist/components/datePicker1/header/datePickerHeader.d.ts +0 -15
  42. package/dist/components/datePicker1/header/index.d.ts +0 -3
  43. package/dist/components/datePicker1/index.d.ts +0 -3
  44. package/dist/components/datePicker1/utils.d.ts +0 -3
  45. package/dist/components/reactDatePicker/index.d.ts +0 -3
  46. package/dist/components/reactDatePicker/reactDatePicker.d.ts +0 -2
  47. package/dist/components/reactDatePicker2/index.d.ts +0 -3
  48. package/dist/components/reactDatePicker2/reactDatePicker2.d.ts +0 -2
  49. package/dist/date2-9273411e.js +0 -46
  50. package/dist/date2.js +0 -7
  51. package/dist/datePicker-89394dc8.js +0 -194
  52. package/dist/datePicker1.js +0 -19
  53. package/dist/dropdown-b9c6dc2f.js +0 -264
  54. package/dist/fieldNumber-1f286b40.js +0 -127
  55. package/dist/fieldText-65e4c614.js +0 -134
  56. package/dist/index-54e3bfc2.js +0 -147
  57. package/dist/pagination-4ae395bd.js +0 -347
  58. package/dist/reactDatePicker2-a31b070e.js +0 -5
  59. package/dist/reactDatePicker2.js +0 -6
  60. package/dist/table-9bf4ddab.js +0 -147
  61. /package/dist/components/{icons/baseIconButton → baseIconButton}/baseIconButton.d.ts +0 -0
  62. /package/dist/components/{icons/baseIconButton → baseIconButton}/index.d.ts +0 -0
@@ -0,0 +1,6 @@
1
+ import * as e from "react";
2
+ const t = (l) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.85355 12.8536C7.65829 13.0488 7.34171 13.0488 7.14645 12.8536L4.14645 9.85355C3.95118 9.65829 3.95118 9.34171 4.14645 9.14645C4.34171 8.95118 4.65829 8.95118 4.85355 9.14645L7 11.2929L7 3.5C7 3.22386 7.22386 3 7.5 3C7.77614 3 8 3.22386 8 3.5L8 11.2929L10.1464 9.14645C10.3417 8.95119 10.6583 8.95118 10.8536 9.14645C11.0488 9.34171 11.0488 9.65829 10.8536 9.85355L7.85355 12.8536Z", fill: "#A2AAB5" })), o = (l) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.14645 3.14645C7.34171 2.95118 7.65829 2.95118 7.85355 3.14645L10.8536 6.14645C11.0488 6.34171 11.0488 6.65829 10.8536 6.85355C10.6583 7.04882 10.3417 7.04882 10.1464 6.85355L8 4.70711V12.5C8 12.7761 7.77614 13 7.5 13C7.22386 13 7 12.7761 7 12.5L7 4.70711L4.85355 6.85355C4.65829 7.04882 4.34171 7.04882 4.14645 6.85355C3.95118 6.65829 3.95118 6.34171 4.14645 6.14645L7.14645 3.14645Z", fill: "#A2AAB5" }));
3
+ export {
4
+ t as S,
5
+ o as a
6
+ };
@@ -0,0 +1,5 @@
1
+ import * as e from "react";
2
+ const t = (l) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ e.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" }));
3
+ export {
4
+ t as S
5
+ };
@@ -0,0 +1,5 @@
1
+ import * as e from "react";
2
+ const t = (l) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...l }, /* @__PURE__ */ e.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" }));
3
+ export {
4
+ t as S
5
+ };
@@ -0,0 +1 @@
1
+ export * from './isPositiveInteger';
@@ -0,0 +1 @@
1
+ export declare const isPositiveInteger: (value?: number) => boolean;
@@ -2,6 +2,7 @@ import { ChangeEventHandler, ReactNode, InputHTMLAttributes } from 'react';
2
2
  interface FieldTextProps extends InputHTMLAttributes<HTMLInputElement> {
3
3
  value?: string;
4
4
  className?: string;
5
+ classNameHelpText?: string;
5
6
  error?: string;
6
7
  placeholder?: string;
7
8
  disabled?: boolean;
@@ -21,6 +22,7 @@ interface FieldTextProps extends InputHTMLAttributes<HTMLInputElement> {
21
22
  hasDoubleMessage?: boolean;
22
23
  type?: string;
23
24
  displayError?: boolean;
25
+ maxLengthDisplay?: number;
24
26
  collapsible?: boolean;
25
27
  loading?: boolean;
26
28
  }
@@ -1,4 +1,3 @@
1
- export { BaseIconButton } from './baseIconButton';
2
1
  export { default as ClearIcon } from './svg/clear.svg';
3
2
  export { default as CloseIcon } from './svg/close.svg';
4
3
  export { default as PlusIcon } from './svg/plus.svg';
@@ -1,4 +1,5 @@
1
1
  export { Button } from './button';
2
+ export { BaseIconButton } from './baseIconButton';
2
3
  export { Checkbox } from './checkbox';
3
4
  export { SystemMessage } from './systemMessage';
4
5
  export { FieldText } from './fieldText';
@@ -16,8 +17,5 @@ export { Popover } from './popover';
16
17
  export { Pagination } from './pagination';
17
18
  export { Table } from './table';
18
19
  export { DatePicker } from './datePicker';
19
- export { DatePicker1 } from './datePicker1';
20
- export { Date2 } from './date2';
21
- export { ReactDatePicker2 } from './reactDatePicker2';
22
20
  export { SystemAlert } from './systemAlert';
23
21
  export * from './icons';
@@ -2,10 +2,9 @@ import { jsxs as S, Fragment as U, jsx as o } from "react/jsx-runtime";
2
2
  import $ from "react-datepicker";
3
3
  import { c as Y } from "./bind-06a7ff84.js";
4
4
  import { useMemo as E, useRef as B } from "react";
5
- import { F as D } from "./fieldText-65e4c614.js";
6
- import "./baseIconButton-b6adc843.js";
5
+ import { F as D } from "./fieldText-df070a3c.js";
7
6
  import { S as T, a as G } from "./calendar-f154eb78.js";
8
- import { D as P } from "./dropdown-b9c6dc2f.js";
7
+ import { D as P } from "./dropdown-5225df5e.js";
9
8
  const H = (a, c = 20) => {
10
9
  const l = a + c;
11
10
  return new Array(l - a).fill(void 0).map((g, e) => a - e);
@@ -109,7 +108,7 @@ const H = (a, c = 20) => {
109
108
  disabled: Q,
110
109
  popper: X,
111
110
  input: Z
112
- }, _ = Y.bind(ee), ne = "en", R = "MM-dd-yyyy", ie = ({
111
+ }, _ = Y.bind(ee), ne = "en", R = "MM-dd-yyyy", le = ({
113
112
  onChange: a = () => {
114
113
  },
115
114
  disabled: c = !1,
@@ -190,5 +189,5 @@ const H = (a, c = 20) => {
190
189
  );
191
190
  };
192
191
  export {
193
- ie as D
192
+ le as D
194
193
  };
@@ -1,17 +1,20 @@
1
- import { D as t } from "./datePicker-89394dc8.js";
1
+ import { D as t } from "./datePicker-81d77983.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react-datepicker";
4
4
  import "./bind-06a7ff84.js";
5
5
  import "react";
6
- import "./fieldText-65e4c614.js";
7
- import "./baseIconButton-b6adc843.js";
6
+ import "./fieldText-df070a3c.js";
7
+ import "./clear-53660571.js";
8
+ import "./spinLoader-c4a53718.js";
8
9
  import "./calendar-f154eb78.js";
9
- import "./dropdown-b9c6dc2f.js";
10
+ import "./dropdown-5225df5e.js";
10
11
  import "@floating-ui/react-dom";
11
12
  import "downshift";
12
13
  import "rc-scrollbars";
13
14
  import "./useOnClickOutside-c332f7d3.js";
14
15
  import "./keyCodes-f63c0e11.js";
16
+ import "./baseIconButton-b6adc843.js";
17
+ import "./dropdown-0260bb66.js";
15
18
  import "./checkbox-9a6c7ce1.js";
16
19
  export {
17
20
  t as DatePicker,
@@ -0,0 +1,5 @@
1
+ import * as e from "react";
2
+ const o = (t) => /* @__PURE__ */ e.createElement("svg", { width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...t }, /* @__PURE__ */ e.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" }));
3
+ export {
4
+ o as S
5
+ };
@@ -0,0 +1,263 @@
1
+ import { jsxs as f, jsx as d, Fragment as S } from "react/jsx-runtime";
2
+ import { forwardRef as ie, useState as V, useRef as le } from "react";
3
+ import { c as q } from "./bind-06a7ff84.js";
4
+ import { useFloating as oe, offset as ce, flip as _e } from "@floating-ui/react-dom";
5
+ import { useSelect as k } from "downshift";
6
+ import { Scrollbars as he } from "rc-scrollbars";
7
+ import { u as fe } from "./useOnClickOutside-c332f7d3.js";
8
+ import { K as g } from "./keyCodes-f63c0e11.js";
9
+ import { B as ye } from "./baseIconButton-b6adc843.js";
10
+ import { S as ge } from "./dropdown-0260bb66.js";
11
+ import { C as ue } from "./checkbox-9a6c7ce1.js";
12
+ const pe = "_disabled_t3cjj_12", me = "_hidden_t3cjj_16", Ce = "_hover_t3cjj_22", Oe = {
13
+ "dropdown-option": "_dropdown-option_t3cjj_1",
14
+ disabled: pe,
15
+ hidden: me,
16
+ hover: Ce,
17
+ "single-option": "_single-option_t3cjj_35",
18
+ "sub-option": "_sub-option_t3cjj_42"
19
+ }, $ = q.bind(Oe), U = ie(
20
+ (t, e) => {
21
+ const {
22
+ option: { value: n, disabled: l, hidden: w, label: u, title: c, groupRef: a },
23
+ selected: A,
24
+ onChange: p,
25
+ render: m,
26
+ highlightHovered: C,
27
+ onMouseEnter: K,
28
+ multiSelect: O,
29
+ isPartiallyChecked: v = !1
30
+ } = t, x = (b) => {
31
+ (b.target instanceof HTMLDivElement || b.target instanceof HTMLInputElement) && (p == null || p(n));
32
+ };
33
+ return /* @__PURE__ */ f(
34
+ "div",
35
+ {
36
+ className: $("dropdown-option", {
37
+ disabled: l,
38
+ hidden: w,
39
+ hover: C
40
+ }),
41
+ title: c,
42
+ onClick: x,
43
+ ref: e,
44
+ onMouseEnter: K,
45
+ children: [
46
+ O && /* @__PURE__ */ d(ue, { value: !!A, partiallyChecked: v }),
47
+ /* @__PURE__ */ d("div", { className: $("single-option", { "sub-option": !!a }), children: m ? m(t) : u })
48
+ ]
49
+ }
50
+ );
51
+ }
52
+ ), be = [
53
+ g.ENTER_KEY_CODE,
54
+ g.SPACE_KEY_CODE,
55
+ g.ARROW_DOWN_KEY_CODE
56
+ ], Ne = [g.ESCAPE_KEY_CODE, g.TAB_KEY_CODE];
57
+ var y = /* @__PURE__ */ ((t) => (t.ON_KEY_DOWN = "onKeyDown", t.ON_CLICK = "onClick", t))(y || {});
58
+ const De = (t, e) => {
59
+ const n = Array.isArray(e) ? e : [e];
60
+ return t.findIndex(({ value: l }) => n.includes(l));
61
+ }, Ee = (t, e) => (t % e + e) % e, j = (t, e = 0, n = 1) => {
62
+ if (!t[e].disabled)
63
+ return e;
64
+ const l = t.length;
65
+ return j(
66
+ t,
67
+ Ee(e + n, l),
68
+ n
69
+ );
70
+ }, we = (t, e) => j(t, e), Ae = (t, e) => j(t, e, -1), Ke = "_container_1yr7u_1", ve = "_icon_1yr7u_7", xe = "_arrow_1yr7u_13", Ie = "_dropdown_1yr7u_19", ke = "_disabled_1yr7u_36", je = "_value_1yr7u_43", Pe = "_error_1yr7u_46", Ye = "_touched_1yr7u_46", Re = "_opened_1yr7u_50", Te = "_placeholder_1yr7u_83", He = "_ghost_1yr7u_118", Me = "_divider_1yr7u_132", We = {
71
+ container: Ke,
72
+ icon: ve,
73
+ arrow: xe,
74
+ dropdown: Ie,
75
+ "transparent-background": "_transparent-background_1yr7u_33",
76
+ disabled: ke,
77
+ value: je,
78
+ error: Pe,
79
+ touched: Ye,
80
+ opened: Re,
81
+ placeholder: Te,
82
+ "mobile-disabled": "_mobile-disabled_1yr7u_87",
83
+ "select-list": "_select-list_1yr7u_92",
84
+ "limited-width": "_limited-width_1yr7u_109",
85
+ "options-container": "_options-container_1yr7u_113",
86
+ ghost: He,
87
+ divider: Me
88
+ }, o = q.bind(We), Fe = ({
89
+ multiSelect: t = !1,
90
+ value: e = t ? [] : "",
91
+ options: n = [],
92
+ disabled: l = !1,
93
+ error: w,
94
+ onChange: u,
95
+ onFocus: c,
96
+ onBlur: a,
97
+ mobileDisabled: A,
98
+ title: p,
99
+ touched: m = !1,
100
+ icon: C,
101
+ variant: K,
102
+ placeholder: O = "",
103
+ renderOption: v,
104
+ transparentBackground: x = !1,
105
+ className: b,
106
+ toggleButtonClassName: z,
107
+ isListWidthLimited: G = !1,
108
+ optionAll: P = { value: "all", label: "All" },
109
+ isOptionAllVisible: Y = !1,
110
+ onSelectAll: J = () => {
111
+ },
112
+ footer: R
113
+ }) => {
114
+ const [_, h] = V(!1), T = le(null), [Q, N] = V(null), I = t && Array.isArray(e) ? n.filter((r) => e.includes(r.value)) : null, { refs: H, floatingStyles: X } = oe({
115
+ middleware: [
116
+ ce(5),
117
+ _e({
118
+ fallbackPlacements: ["bottom", "top"]
119
+ })
120
+ ]
121
+ }), Z = () => {
122
+ if (Y && Array.isArray(e)) {
123
+ const r = n.map((s) => s.value);
124
+ u(e.length === n.length ? [] : r), J();
125
+ }
126
+ };
127
+ fe(T, () => {
128
+ _ && (h(!1), a == null || a());
129
+ });
130
+ const M = (r) => {
131
+ if (!r.disabled) {
132
+ if (t) {
133
+ const s = Array.isArray(e) ? [...e] : [], i = s.indexOf(r.value);
134
+ i === -1 ? s.push(r.value) : s.splice(i, 1), u(s);
135
+ } else
136
+ u(r.value);
137
+ h((s) => t || !s);
138
+ }
139
+ }, F = () => n.find(({ value: r }) => r === e), W = De(n, e), {
140
+ getToggleButtonProps: B,
141
+ getMenuProps: ee,
142
+ getItemProps: re,
143
+ setHighlightedIndex: D,
144
+ highlightedIndex: L,
145
+ selectedItem: E
146
+ } = k({
147
+ items: n,
148
+ itemToString: (r) => (r != null && r.label ? String(r.label) : O) || "",
149
+ selectedItem: F(),
150
+ isOpen: _,
151
+ circularNavigation: !0,
152
+ defaultHighlightedIndex: W,
153
+ onHighlightedIndexChange: (r) => {
154
+ switch (r.type) {
155
+ case k.stateChangeTypes.MenuKeyDownArrowUp:
156
+ return N(y.ON_KEY_DOWN), D(Ae(n, r.highlightedIndex)), r;
157
+ case k.stateChangeTypes.MenuKeyDownArrowDown:
158
+ return N(y.ON_KEY_DOWN), D(we(n, r.highlightedIndex)), r;
159
+ default:
160
+ return r;
161
+ }
162
+ }
163
+ }), te = () => {
164
+ l || (h((r) => !r), _ ? a == null || a() : c == null || c(), N(y.ON_CLICK));
165
+ }, ne = () => !e && e !== !1 && e !== 0 || Array.isArray(e) && !e.length ? O : t && Array.isArray(e) && n.length === e.length ? P.label : n.reduce((s, i) => ((Array.isArray(e) && e.includes(i.value) || i.value === e) && s.push(i.label), s), []).join(", "), se = (r) => {
166
+ const { keyCode: s } = r;
167
+ be.includes(s) && !_ && (r.preventDefault(), D(W), h(!0), c == null || c(), N(y.ON_KEY_DOWN));
168
+ }, ae = (r) => {
169
+ const { keyCode: s } = r;
170
+ if (s === g.ENTER_KEY_CODE) {
171
+ const i = n[L];
172
+ M(i), t || (h(!1), a == null || a());
173
+ return;
174
+ }
175
+ Ne.includes(s) && (r.stopPropagation(), h(!1), a == null || a());
176
+ }, de = () => /* @__PURE__ */ f("div", { className: o("options-container"), children: [
177
+ t && Y && Array.isArray(e) && /* @__PURE__ */ f(S, { children: [
178
+ /* @__PURE__ */ d(
179
+ U,
180
+ {
181
+ option: P,
182
+ selected: e.length === n.length,
183
+ onChange: Z,
184
+ multiSelect: t,
185
+ isPartiallyChecked: !!e.length
186
+ }
187
+ ),
188
+ /* @__PURE__ */ d("div", { className: o("divider") }),
189
+ " "
190
+ ] }),
191
+ n.map((r, s) => /* @__PURE__ */ d(
192
+ U,
193
+ {
194
+ ...re({
195
+ item: r,
196
+ index: s
197
+ }),
198
+ multiSelect: t,
199
+ selected: t ? I == null ? void 0 : I.some((i) => i.value === r.value) : r.value === ((E == null ? void 0 : E.value) ?? E),
200
+ option: { title: r.label, ...r },
201
+ highlightHovered: L === s && Q !== y.ON_CLICK,
202
+ render: v,
203
+ onChange: r.disabled ? null : () => M(r),
204
+ onMouseEnter: () => D(s)
205
+ },
206
+ r.value
207
+ )),
208
+ R && /* @__PURE__ */ f(S, { children: [
209
+ /* @__PURE__ */ d("div", { className: o("divider") }),
210
+ R
211
+ ] })
212
+ ] });
213
+ return /* @__PURE__ */ f("div", { ref: T, className: o("container", b), title: p, children: [
214
+ /* @__PURE__ */ f(
215
+ "button",
216
+ {
217
+ disabled: l,
218
+ ...B({
219
+ className: o("dropdown", K, z, {
220
+ "transparent-background": x,
221
+ opened: _,
222
+ disabled: l,
223
+ error: w,
224
+ touched: m,
225
+ "mobile-disabled": A
226
+ }),
227
+ onClick: te,
228
+ onKeyDown: se,
229
+ ref: H.setReference
230
+ }),
231
+ type: "button",
232
+ children: [
233
+ C && /* @__PURE__ */ d("span", { className: o("icon"), children: C }),
234
+ /* @__PURE__ */ d(
235
+ "span",
236
+ {
237
+ className: o("value", {
238
+ placeholder: !e || Array.isArray(e) && !e.length
239
+ }),
240
+ children: ne()
241
+ }
242
+ ),
243
+ /* @__PURE__ */ d(ye, { className: o("arrow"), tabIndex: -1, children: /* @__PURE__ */ d(ge, {}) })
244
+ ]
245
+ }
246
+ ),
247
+ _ && /* @__PURE__ */ d(
248
+ "div",
249
+ {
250
+ style: X,
251
+ className: o("select-list", { opened: _, "limited-width": G }),
252
+ ...ee({
253
+ onKeyDown: ae,
254
+ ref: H.setFloating
255
+ }),
256
+ children: /* @__PURE__ */ d(he, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: de() })
257
+ }
258
+ )
259
+ ] });
260
+ };
261
+ export {
262
+ Fe as D
263
+ };
package/dist/dropdown.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as r } from "./dropdown-b9c6dc2f.js";
1
+ import { D as r } from "./dropdown-5225df5e.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
4
  import "./bind-06a7ff84.js";
@@ -8,6 +8,7 @@ import "rc-scrollbars";
8
8
  import "./useOnClickOutside-c332f7d3.js";
9
9
  import "./keyCodes-f63c0e11.js";
10
10
  import "./baseIconButton-b6adc843.js";
11
+ import "./dropdown-0260bb66.js";
11
12
  import "./checkbox-9a6c7ce1.js";
12
13
  export {
13
14
  r as Dropdown,
@@ -0,0 +1,7 @@
1
+ import * as e from "react";
2
+ const t = (l) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17.2 9.99999C17.2 13.9764 13.9765 17.2 10 17.2C6.0236 17.2 2.80005 13.9764 2.80005 9.99999C2.80005 6.02354 6.0236 2.79999 10 2.79999C13.9765 2.79999 17.2 6.02354 17.2 9.99999ZM11 6.59999C11 7.15227 10.5523 7.59999 10 7.59999C9.44776 7.59999 9.00005 7.15227 9.00005 6.59999C9.00005 6.0477 9.44776 5.59999 10 5.59999C10.5523 5.59999 11 6.0477 11 6.59999ZM10.8 13.6C10.8 14.0418 10.4419 14.4 10 14.4C9.55822 14.4 9.20005 14.0418 9.20005 13.6L9.20005 9.19999C9.20005 8.75816 9.55822 8.39999 10 8.39999C10.4419 8.39999 10.8 8.75816 10.8 9.19999V13.6Z", fill: "white" })), C = (l) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17.2 9.99999C17.2 13.9764 13.9765 17.2 10 17.2C6.0236 17.2 2.80005 13.9764 2.80005 9.99999C2.80005 6.02354 6.0236 2.79999 10 2.79999C13.9765 2.79999 17.2 6.02354 17.2 9.99999ZM13.8146 8.11216C14.0975 7.77273 14.0516 7.26828 13.7122 6.98543C13.3728 6.70258 12.8683 6.74844 12.5855 7.08786L9.14629 11.2149L7.36573 9.43432C7.05331 9.1219 6.54678 9.1219 6.23436 9.43432C5.92194 9.74674 5.92194 10.2533 6.23436 10.5657L8.63436 12.9657C8.7933 13.1246 9.01176 13.2094 9.2363 13.1992C9.46084 13.189 9.67073 13.0848 9.81463 12.9122L13.8146 8.11216Z", fill: "white" })), i = (l) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", ...l }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.0449 3.41275C10.5805 2.59573 9.41952 2.59573 8.95513 3.41275L2.16344 15.3617C1.69905 16.1787 2.27954 17.2 3.20832 17.2H16.7917C17.7205 17.2 18.3009 16.1787 17.8366 15.3617L11.0449 3.41275ZM10.9325 6.41163C10.9391 6.18625 10.7582 5.99999 10.5327 5.99999H9.46161C9.236 5.99999 9.05502 6.18647 9.06179 6.41198L9.24768 12.612C9.25416 12.8281 9.43125 13 9.6475 13H10.3523C10.5686 13 10.7458 12.8279 10.7521 12.6116L10.9325 6.41163ZM10 16C10.5523 16 11 15.5523 11 15C11 14.4477 10.5523 14 10 14C9.44771 14 9 14.4477 9 15C9 15.5523 9.44771 16 10 16Z", fill: "white" }));
3
+ export {
4
+ t as S,
5
+ C as a,
6
+ i as b
7
+ };
@@ -0,0 +1,125 @@
1
+ import { jsxs as O, jsx as c } from "react/jsx-runtime";
2
+ import { useRef as U, useMemo as A } from "react";
3
+ import { c as T } from "./bind-06a7ff84.js";
4
+ import { K as _ } from "./keyCodes-f63c0e11.js";
5
+ import { B as d } from "./baseIconButton-b6adc843.js";
6
+ import { a as W, S as y } from "./minus-660ea0d6.js";
7
+ const B = 5, D = 16, S = [
8
+ _.TAB_KEY_CODE,
9
+ _.BACKSPACE_KEY_CODE,
10
+ _.ARROW_LEFT_KEY_CODE,
11
+ _.ARROW_UP_KEY_CODE,
12
+ _.ARROW_RIGHT_KEY_CODE,
13
+ _.ARROW_DOWN_KEY_CODE,
14
+ _.DELETE_KEY_CODE,
15
+ _.NUM_LOCK_0_KEY_CODE,
16
+ _.NUM_LOCK_1_KEY_CODE,
17
+ _.NUM_LOCK_2_KEY_CODE,
18
+ _.NUM_LOCK_3_KEY_CODE,
19
+ _.NUM_LOCK_4_KEY_CODE,
20
+ _.NUM_LOCK_5_KEY_CODE,
21
+ _.NUM_LOCK_6_KEY_CODE,
22
+ _.NUM_LOCK_7_KEY_CODE,
23
+ _.NUM_LOCK_8_KEY_CODE,
24
+ _.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: e = "",
38
+ placeholder: f = "0",
39
+ disabled: t = !1,
40
+ onChange: l,
41
+ onFocus: C,
42
+ onBlur: G,
43
+ label: a,
44
+ postfix: r = "",
45
+ min: o = 0,
46
+ max: E = Number.MAX_SAFE_INTEGER,
47
+ title: w,
48
+ error: p,
49
+ touched: N = !1,
50
+ ...h
51
+ }) => {
52
+ const u = U(null), m = (n) => {
53
+ let s = n.target.value.replace(/^0(?=\d+|^\d)/g, "");
54
+ if (s === "") {
55
+ l("");
56
+ return;
57
+ }
58
+ s = +s, s >= o && s <= E && l(s);
59
+ }, g = (n) => {
60
+ const { keyCode: s } = n;
61
+ S.includes(s) || (s < _.NUMBER_START_KEY_CODE || s > _.NUMBER_END_KEY_CODE || n.shiftKey) && n.preventDefault();
62
+ }, Y = () => {
63
+ const n = +e - 1;
64
+ n >= o && n <= E && l(n);
65
+ }, M = () => {
66
+ const n = +e + 1;
67
+ n >= o && n <= E && l(n);
68
+ }, K = f + r, L = A(() => {
69
+ let n = (String(e) || K).length;
70
+ return r && !e && (n += 1), n > D ? `${D}ch` : `${n || B}ch`;
71
+ }, [K, r, e]), R = () => {
72
+ u && u.current && u.current.focus(), C && C();
73
+ };
74
+ return /* @__PURE__ */ O("div", { className: i("field-number", { disabled: t }), children: [
75
+ a && /* @__PURE__ */ c("span", { className: i("label"), children: a }),
76
+ /* @__PURE__ */ O(
77
+ "div",
78
+ {
79
+ className: i("input-container", {
80
+ filled: !!e || e === 0,
81
+ error: p,
82
+ disabled: t,
83
+ touched: N
84
+ }),
85
+ title: w,
86
+ children: [
87
+ /* @__PURE__ */ c(
88
+ d,
89
+ {
90
+ className: i("sign", "minus"),
91
+ disabled: t,
92
+ onClick: Y,
93
+ children: /* @__PURE__ */ c(W, {})
94
+ }
95
+ ),
96
+ /* @__PURE__ */ O("span", { className: i("input-field", { disabled: t }), onClick: R, children: [
97
+ /* @__PURE__ */ c(
98
+ "input",
99
+ {
100
+ ref: u,
101
+ className: i("input"),
102
+ type: "number",
103
+ value: e,
104
+ placeholder: K,
105
+ disabled: t,
106
+ min: o,
107
+ max: E,
108
+ onKeyDown: t ? void 0 : g,
109
+ onChange: t ? void 0 : m,
110
+ onFocus: t ? void 0 : C,
111
+ style: { width: L },
112
+ ...h
113
+ }
114
+ ),
115
+ !!r && (e === 0 || !!e) && /* @__PURE__ */ c("span", { children: r.slice(0, 1) })
116
+ ] }),
117
+ /* @__PURE__ */ c(d, { className: i("sign", "plus"), disabled: t, onClick: M, children: /* @__PURE__ */ c(y, {}) })
118
+ ]
119
+ }
120
+ )
121
+ ] });
122
+ };
123
+ export {
124
+ Z as F
125
+ };
@@ -1,9 +1,10 @@
1
- import { F as m } from "./fieldNumber-1f286b40.js";
1
+ import { F as m } from "./fieldNumber-6a5fdd15.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
4
  import "./bind-06a7ff84.js";
5
5
  import "./keyCodes-f63c0e11.js";
6
6
  import "./baseIconButton-b6adc843.js";
7
+ import "./minus-660ea0d6.js";
7
8
  export {
8
9
  m as FieldNumber,
9
10
  m as default