@reportportal/ui-kit 0.0.1-alpha.122 → 0.0.1-alpha.124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/dropdown/dropdown.d.ts +4 -0
- package/dist/{datePicker-fcff097b.js → datePicker-e400f01d.js} +1 -1
- package/dist/datePicker.js +3 -3
- package/dist/{dropdown-e85dd323.js → dropdown-18c58189.js} +105 -93
- package/dist/dropdown.js +1 -1
- package/dist/index.js +2 -2
- package/dist/sidePanel.js +62 -48
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -40,5 +40,9 @@ export interface DropdownProps {
|
|
|
40
40
|
onClear?: () => void;
|
|
41
41
|
/** ARIA label for the clear button */
|
|
42
42
|
clearButtonAriaLabel?: string;
|
|
43
|
+
/** Portal root element for tooltip rendering (e.g., document.body to prevent clipping) */
|
|
44
|
+
tooltipPortalRoot?: Element;
|
|
45
|
+
/** Z-index for tooltip when rendered in portal (default: 9) */
|
|
46
|
+
tooltipZIndex?: number;
|
|
43
47
|
}
|
|
44
48
|
export declare const Dropdown: FC<DropdownProps>;
|
|
@@ -3,7 +3,7 @@ import B from "react-datepicker/dist/es/index.js";
|
|
|
3
3
|
import { c as R } from "./bind-06a7ff84.js";
|
|
4
4
|
import { useMemo as P, useRef as D } from "react";
|
|
5
5
|
import { F as I } from "./fieldText-2c4790e1.js";
|
|
6
|
-
import { D as E } from "./dropdown-
|
|
6
|
+
import { D as E } from "./dropdown-18c58189.js";
|
|
7
7
|
import { S as T } from "./calendarArrow-44c7e60e.js";
|
|
8
8
|
import { registerLocale as j } from "react-datepicker";
|
|
9
9
|
const ie = (n, s) => {
|
package/dist/datePicker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as t } from "./datePicker-
|
|
2
|
-
import { r as A } from "./datePicker-
|
|
1
|
+
import { D as t } from "./datePicker-e400f01d.js";
|
|
2
|
+
import { r as A } from "./datePicker-e400f01d.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react-datepicker/dist/es/index.js";
|
|
5
5
|
import "./bind-06a7ff84.js";
|
|
@@ -11,7 +11,7 @@ import "./baseIconButton-251479f7.js";
|
|
|
11
11
|
import "./spinLoader-c4a53718.js";
|
|
12
12
|
import "./maxValueDisplay-9be01a75.js";
|
|
13
13
|
import "./fieldLabel.js";
|
|
14
|
-
import "./dropdown-
|
|
14
|
+
import "./dropdown-18c58189.js";
|
|
15
15
|
import "@floating-ui/react-dom";
|
|
16
16
|
import "downshift";
|
|
17
17
|
import "rc-scrollbars";
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsxs as D, jsx as l, Fragment as Ee } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as Ze, useState as oe, useRef as P, useMemo as y, useCallback as x, useLayoutEffect as er, useEffect as Oe } from "react";
|
|
3
3
|
import { c as be } from "./bind-06a7ff84.js";
|
|
4
|
-
import { useFloating as
|
|
4
|
+
import { useFloating as rr, offset as tr, flip as nr } from "@floating-ui/react-dom";
|
|
5
5
|
import { useSelect as le } from "downshift";
|
|
6
|
-
import { Scrollbars as
|
|
7
|
-
import { u as
|
|
6
|
+
import { Scrollbars as sr } from "rc-scrollbars";
|
|
7
|
+
import { u as ar } from "./useOnClickOutside-c332f7d3.js";
|
|
8
8
|
import { K as w } from "./keyCodes-f63c0e11.js";
|
|
9
|
-
import { B as
|
|
10
|
-
import { S as
|
|
11
|
-
import { S as
|
|
12
|
-
import { Tooltip as
|
|
13
|
-
import { FieldLabel as
|
|
14
|
-
import { C as
|
|
15
|
-
const
|
|
9
|
+
import { B as or } from "./baseIconButton-251479f7.js";
|
|
10
|
+
import { S as lr } from "./clear-53660571.js";
|
|
11
|
+
import { S as cr } from "./dropdown-0260bb66.js";
|
|
12
|
+
import { Tooltip as dr } from "./tooltip.js";
|
|
13
|
+
import { FieldLabel as ir } from "./fieldLabel.js";
|
|
14
|
+
import { C as ur } from "./checkbox-ed6cc375.js";
|
|
15
|
+
const hr = "_disabled_14s7v_12", fr = "_hidden_14s7v_16", _r = "_hover_14s7v_22", pr = "_selected_14s7v_38", gr = {
|
|
16
16
|
"dropdown-option": "_dropdown-option_14s7v_1",
|
|
17
|
-
disabled:
|
|
18
|
-
hidden:
|
|
19
|
-
hover:
|
|
17
|
+
disabled: hr,
|
|
18
|
+
hidden: fr,
|
|
19
|
+
hover: _r,
|
|
20
20
|
"depth-1": "_depth-1_14s7v_32",
|
|
21
|
-
selected:
|
|
21
|
+
selected: pr,
|
|
22
22
|
"multi-select": "_multi-select_14s7v_38",
|
|
23
23
|
"single-option": "_single-option_14s7v_43",
|
|
24
24
|
"sub-option": "_sub-option_14s7v_50"
|
|
25
|
-
}, ve = be.bind(
|
|
25
|
+
}, ve = be.bind(gr), Ne = Ze(
|
|
26
26
|
(t, r) => {
|
|
27
27
|
const {
|
|
28
28
|
option: { value: a, disabled: s, hidden: d, label: f, title: m, groupRef: p },
|
|
@@ -55,7 +55,7 @@ const ir = "_disabled_14s7v_12", ur = "_hidden_14s7v_16", hr = "_hover_14s7v_22"
|
|
|
55
55
|
ref: r,
|
|
56
56
|
onMouseEnter: J,
|
|
57
57
|
children: [
|
|
58
|
-
C && /* @__PURE__ */ l(
|
|
58
|
+
C && /* @__PURE__ */ l(ur, { value: !!R, partiallyChecked: H }),
|
|
59
59
|
/* @__PURE__ */ l(
|
|
60
60
|
"div",
|
|
61
61
|
{
|
|
@@ -69,16 +69,16 @@ const ir = "_disabled_14s7v_12", ur = "_hidden_14s7v_16", hr = "_hover_14s7v_22"
|
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
|
-
),
|
|
72
|
+
), wr = [
|
|
73
73
|
w.ENTER_KEY_CODE,
|
|
74
74
|
w.SPACE_KEY_CODE,
|
|
75
75
|
w.ARROW_DOWN_KEY_CODE
|
|
76
|
-
],
|
|
76
|
+
], mr = [w.ESCAPE_KEY_CODE, w.TAB_KEY_CODE];
|
|
77
77
|
var A = /* @__PURE__ */ ((t) => (t.ON_KEY_DOWN = "onKeyDown", t.ON_CLICK = "onClick", t))(A || {});
|
|
78
|
-
const
|
|
78
|
+
const yr = 216, Cr = (t, r) => {
|
|
79
79
|
const a = Array.isArray(r) ? r : [r];
|
|
80
80
|
return t.findIndex(({ value: s }) => a.includes(s));
|
|
81
|
-
},
|
|
81
|
+
}, Er = (t, r) => (t % r + r) % r, ce = (t, r = 0, a = 1) => {
|
|
82
82
|
var d;
|
|
83
83
|
if (t.length === 0)
|
|
84
84
|
return 0;
|
|
@@ -87,10 +87,10 @@ const wr = 216, mr = (t, r) => {
|
|
|
87
87
|
const s = t.length;
|
|
88
88
|
return ce(
|
|
89
89
|
t,
|
|
90
|
-
|
|
90
|
+
Er(r + a, s),
|
|
91
91
|
a
|
|
92
92
|
);
|
|
93
|
-
},
|
|
93
|
+
}, Or = (t, r) => ce(t, r), vr = (t, r) => ce(t, r, -1), De = (t, r = 0, a) => !t || t.length === 0 ? [] : t.reduce((s, d) => {
|
|
94
94
|
var f;
|
|
95
95
|
return d && (s.push({ option: d, depth: r, parent: a }), (f = d.children) != null && f.length && s.push(...De(d.children, r + 1, d))), s;
|
|
96
96
|
}, []), Ae = (t) => !t || t.length === 0 ? [] : t.reduce((r, a) => {
|
|
@@ -99,28 +99,28 @@ const wr = 216, mr = (t, r) => {
|
|
|
99
99
|
}, []), Ke = (t) => {
|
|
100
100
|
var r;
|
|
101
101
|
return t ? (r = t.children) != null && r.length ? t.children.reduce((a, s) => (s && a.push(...Ke(s)), a), []) : [t.value] : [];
|
|
102
|
-
},
|
|
103
|
-
container:
|
|
104
|
-
icon:
|
|
105
|
-
arrow:
|
|
102
|
+
}, Nr = "_container_owe49_1", br = "_icon_owe49_7", Dr = "_arrow_owe49_13", Ar = "_dropdown_owe49_27", Kr = "_disabled_owe49_44", Ir = "_value_owe49_51", Tr = "_error_owe49_54", kr = "_touched_owe49_54", Pr = "_opened_owe49_58", xr = "_placeholder_owe49_93", Rr = "_ghost_owe49_139", Vr = "_divider_owe49_160", Lr = {
|
|
103
|
+
container: Nr,
|
|
104
|
+
icon: br,
|
|
105
|
+
arrow: Dr,
|
|
106
106
|
"clear-button": "_clear-button_owe49_19",
|
|
107
|
-
dropdown:
|
|
107
|
+
dropdown: Ar,
|
|
108
108
|
"transparent-background": "_transparent-background_owe49_41",
|
|
109
|
-
disabled:
|
|
110
|
-
value:
|
|
111
|
-
error:
|
|
112
|
-
touched:
|
|
113
|
-
opened:
|
|
114
|
-
placeholder:
|
|
109
|
+
disabled: Kr,
|
|
110
|
+
value: Ir,
|
|
111
|
+
error: Tr,
|
|
112
|
+
touched: kr,
|
|
113
|
+
opened: Pr,
|
|
114
|
+
placeholder: xr,
|
|
115
115
|
"mobile-disabled": "_mobile-disabled_owe49_97",
|
|
116
116
|
"value-wrapper": "_value-wrapper_owe49_102",
|
|
117
117
|
"value-tooltip": "_value-tooltip_owe49_108",
|
|
118
118
|
"select-list": "_select-list_owe49_113",
|
|
119
119
|
"limited-width": "_limited-width_owe49_130",
|
|
120
120
|
"options-container": "_options-container_owe49_134",
|
|
121
|
-
ghost:
|
|
122
|
-
divider:
|
|
123
|
-
}, i = be.bind(
|
|
121
|
+
ghost: Rr,
|
|
122
|
+
divider: Vr
|
|
123
|
+
}, i = be.bind(Lr), Zr = ({
|
|
124
124
|
multiSelect: t = !1,
|
|
125
125
|
value: r = t ? [] : "",
|
|
126
126
|
options: a = [],
|
|
@@ -153,43 +153,45 @@ const wr = 216, mr = (t, r) => {
|
|
|
153
153
|
clearable: Pe = !1,
|
|
154
154
|
onClear: he = () => {
|
|
155
155
|
},
|
|
156
|
-
clearButtonAriaLabel: xe = "Clear selection"
|
|
156
|
+
clearButtonAriaLabel: xe = "Clear selection",
|
|
157
|
+
tooltipPortalRoot: Re,
|
|
158
|
+
tooltipZIndex: Ve
|
|
157
159
|
}) => {
|
|
158
|
-
const [u, S] = oe(!1), fe = P(null), T = P(null), re = P(0), te = P(null), [
|
|
160
|
+
const [u, S] = oe(!1), fe = P(null), T = P(null), re = P(0), te = P(null), [Le, _e] = oe(!1), [He, z] = oe(null), E = P(null), k = y(() => De(a), [a]), _ = y(
|
|
159
161
|
() => k.map(({ option: e }) => e),
|
|
160
162
|
[k]
|
|
161
|
-
),
|
|
163
|
+
), $ = y(() => k.filter(({ option: e }) => {
|
|
162
164
|
var n;
|
|
163
165
|
return (n = e.children) == null ? void 0 : n.length;
|
|
164
166
|
}).map(({ option: e }) => e), [k]), pe = y(() => Ae(a), [a]), g = y(
|
|
165
167
|
() => pe.map(({ value: e }) => e),
|
|
166
168
|
[pe]
|
|
167
|
-
),
|
|
169
|
+
), j = y(() => {
|
|
168
170
|
const e = /* @__PURE__ */ new Map();
|
|
169
|
-
return
|
|
171
|
+
return $.forEach((n) => {
|
|
170
172
|
e.set(n.value, Ke(n));
|
|
171
173
|
}), e;
|
|
172
|
-
}, [
|
|
173
|
-
(e) => (
|
|
174
|
-
const o =
|
|
174
|
+
}, [$]), q = x(
|
|
175
|
+
(e) => ($.forEach((n) => {
|
|
176
|
+
const o = j.get(n.value) ?? [], c = o.length > 0 && o.every((h) => e.has(h));
|
|
175
177
|
ue && c ? e.add(n.value) : e.delete(n.value);
|
|
176
178
|
}), e),
|
|
177
|
-
[
|
|
178
|
-
), O = y(() => !t || !Array.isArray(r) ? /* @__PURE__ */ new Set() : q(new Set(r)), [t, r, q]), ge = t ? Array.isArray(r) && r.length > 0 : r || r === !1 || r === 0,
|
|
179
|
+
[$, ue, j]
|
|
180
|
+
), O = y(() => !t || !Array.isArray(r) ? /* @__PURE__ */ new Set() : q(new Set(r)), [t, r, q]), ge = t ? Array.isArray(r) && r.length > 0 : r || r === !1 || r === 0, Ye = Pe && ge && !s, Me = x((e) => {
|
|
179
181
|
re.current = e.scrollTop;
|
|
180
182
|
}, []);
|
|
181
|
-
|
|
183
|
+
er(() => {
|
|
182
184
|
u && !I && T.current && !(t && E.current !== null) && T.current.scrollTop(re.current);
|
|
183
185
|
}, [u, I, r, t]);
|
|
184
|
-
const { refs: B, floatingStyles:
|
|
186
|
+
const { refs: B, floatingStyles: We } = rr({
|
|
185
187
|
placement: "bottom-start",
|
|
186
188
|
middleware: [
|
|
187
|
-
|
|
188
|
-
|
|
189
|
+
tr(5),
|
|
190
|
+
nr({
|
|
189
191
|
fallbackPlacements: ["bottom-start", "top-start", "bottom", "top"]
|
|
190
192
|
})
|
|
191
193
|
]
|
|
192
|
-
}),
|
|
194
|
+
}), Se = () => {
|
|
193
195
|
if (!de)
|
|
194
196
|
return;
|
|
195
197
|
const e = Array.isArray(r) ? r : [], n = new Set(e), o = g.some((h) => !n.has(h));
|
|
@@ -207,13 +209,13 @@ const wr = 216, mr = (t, r) => {
|
|
|
207
209
|
const n = B.reference.current;
|
|
208
210
|
n && n instanceof HTMLElement && n.focus();
|
|
209
211
|
});
|
|
210
|
-
}, [s, t, f, he, N, B]),
|
|
212
|
+
}, [s, t, f, he, N, B]), ze = x(
|
|
211
213
|
(e) => {
|
|
212
214
|
e.preventDefault(), e.stopPropagation(), ne();
|
|
213
215
|
},
|
|
214
216
|
[ne]
|
|
215
217
|
);
|
|
216
|
-
|
|
218
|
+
ar(fe, () => {
|
|
217
219
|
u && N();
|
|
218
220
|
});
|
|
219
221
|
const we = (e) => {
|
|
@@ -222,7 +224,7 @@ const wr = 216, mr = (t, r) => {
|
|
|
222
224
|
if (t) {
|
|
223
225
|
const o = Array.isArray(r) ? r : [], c = new Set(o);
|
|
224
226
|
if ((n = e.children) != null && n.length) {
|
|
225
|
-
const F =
|
|
227
|
+
const F = j.get(e.value) ?? [], G = F.some((v) => !c.has(v));
|
|
226
228
|
F.forEach((v) => {
|
|
227
229
|
G ? c.add(v) : c.delete(v);
|
|
228
230
|
});
|
|
@@ -234,27 +236,27 @@ const wr = 216, mr = (t, r) => {
|
|
|
234
236
|
f(e.value);
|
|
235
237
|
S((o) => t || !o);
|
|
236
238
|
}
|
|
237
|
-
},
|
|
238
|
-
getToggleButtonProps:
|
|
239
|
-
getLabelProps:
|
|
240
|
-
getMenuProps:
|
|
241
|
-
getItemProps:
|
|
239
|
+
}, $e = () => _.find(({ value: e }) => e === r), me = Cr(_, r), {
|
|
240
|
+
getToggleButtonProps: je,
|
|
241
|
+
getLabelProps: qe,
|
|
242
|
+
getMenuProps: Be,
|
|
243
|
+
getItemProps: Ue,
|
|
242
244
|
setHighlightedIndex: b,
|
|
243
245
|
highlightedIndex: se,
|
|
244
246
|
selectedItem: U
|
|
245
247
|
} = le({
|
|
246
248
|
items: _,
|
|
247
249
|
itemToString: (e) => (e != null && e.label ? String(e.label) : C) || "",
|
|
248
|
-
selectedItem:
|
|
250
|
+
selectedItem: $e(),
|
|
249
251
|
isOpen: u,
|
|
250
252
|
circularNavigation: !0,
|
|
251
253
|
defaultHighlightedIndex: me,
|
|
252
254
|
onHighlightedIndexChange: (e) => {
|
|
253
255
|
switch (e.type) {
|
|
254
256
|
case le.stateChangeTypes.MenuKeyDownArrowUp:
|
|
255
|
-
return
|
|
257
|
+
return z(A.ON_KEY_DOWN), b(vr(_, e.highlightedIndex)), e;
|
|
256
258
|
case le.stateChangeTypes.MenuKeyDownArrowDown:
|
|
257
|
-
return
|
|
259
|
+
return z(A.ON_KEY_DOWN), b(Or(_, e.highlightedIndex)), e;
|
|
258
260
|
default:
|
|
259
261
|
return e;
|
|
260
262
|
}
|
|
@@ -265,8 +267,8 @@ const wr = 216, mr = (t, r) => {
|
|
|
265
267
|
T.current && !I && T.current.scrollTop(re.current);
|
|
266
268
|
}));
|
|
267
269
|
}, [t, u, r, _.length, b, I]);
|
|
268
|
-
const
|
|
269
|
-
s || (S((e) => !e), u ? p == null || p() : m == null || m(),
|
|
270
|
+
const Xe = () => {
|
|
271
|
+
s || (S((e) => !e), u ? p == null || p() : m == null || m(), z(A.ON_CLICK));
|
|
270
272
|
}, X = y(() => {
|
|
271
273
|
if (t && Array.isArray(r) && g.length > 0 && g.every((n) => O.has(n)))
|
|
272
274
|
return ee.label;
|
|
@@ -291,10 +293,10 @@ const wr = 216, mr = (t, r) => {
|
|
|
291
293
|
} else
|
|
292
294
|
_e(!1);
|
|
293
295
|
}, [X]);
|
|
294
|
-
const
|
|
296
|
+
const Fe = (e) => {
|
|
295
297
|
const { keyCode: n } = e;
|
|
296
|
-
|
|
297
|
-
},
|
|
298
|
+
wr.includes(n) && e.target === e.currentTarget && (e.preventDefault(), e.stopPropagation(), !u && (b(me), S(!0), m == null || m(), z(A.ON_KEY_DOWN)));
|
|
299
|
+
}, Ge = (e) => {
|
|
298
300
|
const { keyCode: n } = e;
|
|
299
301
|
if (n === w.ENTER_KEY_CODE || n === w.SPACE_KEY_CODE) {
|
|
300
302
|
const o = _[se];
|
|
@@ -303,7 +305,7 @@ const wr = 216, mr = (t, r) => {
|
|
|
303
305
|
t && (E.current = se), we(o), t || N();
|
|
304
306
|
return;
|
|
305
307
|
}
|
|
306
|
-
|
|
308
|
+
mr.includes(n) && (e.stopPropagation(), N());
|
|
307
309
|
}, ye = () => /* @__PURE__ */ D("div", { className: i("options-container"), children: [
|
|
308
310
|
t && de && /* @__PURE__ */ D(Ee, { children: [
|
|
309
311
|
/* @__PURE__ */ l(
|
|
@@ -311,7 +313,7 @@ const wr = 216, mr = (t, r) => {
|
|
|
311
313
|
{
|
|
312
314
|
option: ee,
|
|
313
315
|
selected: Array.isArray(r) && g.length > 0 && g.every((e) => O.has(e)),
|
|
314
|
-
onChange:
|
|
316
|
+
onChange: Se,
|
|
315
317
|
multiSelect: t,
|
|
316
318
|
isPartiallyChecked: g.some((e) => O.has(e)) && !g.every((e) => O.has(e))
|
|
317
319
|
}
|
|
@@ -321,18 +323,18 @@ const wr = 216, mr = (t, r) => {
|
|
|
321
323
|
] }),
|
|
322
324
|
k.map(({ option: e, depth: n }, o) => {
|
|
323
325
|
var G, v;
|
|
324
|
-
const c =
|
|
326
|
+
const c = j.get(e.value) ?? [e.value], h = t && c.every((ae) => O.has(ae)), F = t && ((G = e.children) == null ? void 0 : G.length) && c.some((ae) => O.has(ae)) && !h;
|
|
325
327
|
return /* @__PURE__ */ l(
|
|
326
328
|
Ne,
|
|
327
329
|
{
|
|
328
|
-
...
|
|
330
|
+
...Ue({
|
|
329
331
|
item: e,
|
|
330
332
|
index: o
|
|
331
333
|
}),
|
|
332
334
|
multiSelect: t,
|
|
333
335
|
selected: t ? h : e.value === ((U == null ? void 0 : U.value) ?? U),
|
|
334
336
|
option: { title: e.label, ...e },
|
|
335
|
-
highlightHovered: se === o &&
|
|
337
|
+
highlightHovered: se === o && He !== A.ON_CLICK,
|
|
336
338
|
render: Y,
|
|
337
339
|
onChange: e.disabled ? null : () => we(e),
|
|
338
340
|
onMouseEnter: () => b(o),
|
|
@@ -347,7 +349,7 @@ const wr = 216, mr = (t, r) => {
|
|
|
347
349
|
/* @__PURE__ */ l("div", { className: i("divider") }),
|
|
348
350
|
typeof W == "function" ? W(N) : W
|
|
349
351
|
] })
|
|
350
|
-
] }),
|
|
352
|
+
] }), Je = () => {
|
|
351
353
|
const e = ie ? ie(X) : X, n = /* @__PURE__ */ l(
|
|
352
354
|
"span",
|
|
353
355
|
{
|
|
@@ -358,8 +360,18 @@ const wr = 216, mr = (t, r) => {
|
|
|
358
360
|
children: e
|
|
359
361
|
}
|
|
360
362
|
);
|
|
361
|
-
return ge && !!e &&
|
|
362
|
-
|
|
363
|
+
return ge && !!e && Le ? /* @__PURE__ */ l(
|
|
364
|
+
dr,
|
|
365
|
+
{
|
|
366
|
+
content: e,
|
|
367
|
+
placement: "top",
|
|
368
|
+
wrapperClassName: i("value-tooltip"),
|
|
369
|
+
portalRoot: Re,
|
|
370
|
+
zIndex: Ve,
|
|
371
|
+
children: n
|
|
372
|
+
}
|
|
373
|
+
) : n;
|
|
374
|
+
}, Qe = je({
|
|
363
375
|
className: i("dropdown", J, M, {
|
|
364
376
|
"transparent-background": Q,
|
|
365
377
|
opened: u,
|
|
@@ -368,12 +380,12 @@ const wr = 216, mr = (t, r) => {
|
|
|
368
380
|
touched: V,
|
|
369
381
|
"mobile-disabled": R
|
|
370
382
|
}),
|
|
371
|
-
onClick:
|
|
372
|
-
onKeyDown:
|
|
383
|
+
onClick: Xe,
|
|
384
|
+
onKeyDown: Fe,
|
|
373
385
|
ref: B.setReference
|
|
374
|
-
}), { type:
|
|
386
|
+
}), { type: Yr, ...Ce } = Qe;
|
|
375
387
|
return /* @__PURE__ */ D("div", { ref: fe, className: i("container", Z), title: K, children: [
|
|
376
|
-
H && /* @__PURE__ */ l(
|
|
388
|
+
H && /* @__PURE__ */ l(ir, { ...qe(), children: H }),
|
|
377
389
|
/* @__PURE__ */ D(
|
|
378
390
|
"div",
|
|
379
391
|
{
|
|
@@ -383,47 +395,47 @@ const wr = 216, mr = (t, r) => {
|
|
|
383
395
|
tabIndex: s ? -1 : Ce.tabIndex ?? 0,
|
|
384
396
|
children: [
|
|
385
397
|
L && /* @__PURE__ */ l("span", { className: i("icon"), children: L }),
|
|
386
|
-
/* @__PURE__ */ l("div", { className: i("value-wrapper"), children:
|
|
387
|
-
|
|
388
|
-
|
|
398
|
+
/* @__PURE__ */ l("div", { className: i("value-wrapper"), children: Je() }),
|
|
399
|
+
Ye && /* @__PURE__ */ l(
|
|
400
|
+
or,
|
|
389
401
|
{
|
|
390
402
|
className: i("clear-button"),
|
|
391
|
-
onClick:
|
|
403
|
+
onClick: ze,
|
|
392
404
|
onKeyDown: (e) => {
|
|
393
405
|
const { keyCode: n } = e;
|
|
394
406
|
(n === w.ENTER_KEY_CODE || n === w.SPACE_KEY_CODE) && (e.preventDefault(), e.stopPropagation(), ne());
|
|
395
407
|
},
|
|
396
408
|
"aria-label": xe,
|
|
397
|
-
children: /* @__PURE__ */ l(
|
|
409
|
+
children: /* @__PURE__ */ l(lr, {})
|
|
398
410
|
}
|
|
399
411
|
),
|
|
400
|
-
/* @__PURE__ */ l("span", { className: i("arrow"), "aria-hidden": "true", children: /* @__PURE__ */ l(
|
|
412
|
+
/* @__PURE__ */ l("span", { className: i("arrow"), "aria-hidden": "true", children: /* @__PURE__ */ l(cr, {}) })
|
|
401
413
|
]
|
|
402
414
|
}
|
|
403
415
|
),
|
|
404
416
|
u && /* @__PURE__ */ l(
|
|
405
417
|
"div",
|
|
406
418
|
{
|
|
407
|
-
style:
|
|
419
|
+
style: We,
|
|
408
420
|
className: i(
|
|
409
421
|
"select-list",
|
|
410
422
|
{ opened: u, "limited-width": Te },
|
|
411
423
|
Ie
|
|
412
424
|
),
|
|
413
|
-
...
|
|
414
|
-
onKeyDown:
|
|
425
|
+
...Be({
|
|
426
|
+
onKeyDown: Ge,
|
|
415
427
|
ref: B.setFloating
|
|
416
428
|
}),
|
|
417
429
|
children: I ? ye() : /* @__PURE__ */ l(
|
|
418
|
-
|
|
430
|
+
sr,
|
|
419
431
|
{
|
|
420
432
|
autoHeight: !0,
|
|
421
|
-
autoHeightMax:
|
|
433
|
+
autoHeightMax: yr,
|
|
422
434
|
hideTracksWhenNotNeeded: !0,
|
|
423
435
|
ref: (e) => {
|
|
424
436
|
T.current = e;
|
|
425
437
|
},
|
|
426
|
-
onScrollFrame:
|
|
438
|
+
onScrollFrame: Me,
|
|
427
439
|
children: ye()
|
|
428
440
|
}
|
|
429
441
|
)
|
|
@@ -432,5 +444,5 @@ const wr = 216, mr = (t, r) => {
|
|
|
432
444
|
] });
|
|
433
445
|
};
|
|
434
446
|
export {
|
|
435
|
-
|
|
447
|
+
Zr as D
|
|
436
448
|
};
|
package/dist/dropdown.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -4,9 +4,9 @@ import { B as y } from "./breadcrumbs-8e5ca8d7.js";
|
|
|
4
4
|
import { B as T } from "./bubblesLoader-f3ffa240.js";
|
|
5
5
|
import { B as h } from "./button-97d9e587.js";
|
|
6
6
|
import { C as v } from "./checkbox-ed6cc375.js";
|
|
7
|
-
import { D as w } from "./datePicker-
|
|
7
|
+
import { D as w } from "./datePicker-e400f01d.js";
|
|
8
8
|
import "react-datepicker";
|
|
9
|
-
import { D as E } from "./dropdown-
|
|
9
|
+
import { D as E } from "./dropdown-18c58189.js";
|
|
10
10
|
import { FieldLabel as R } from "./fieldLabel.js";
|
|
11
11
|
import { F as U } from "./fieldNumber-d1b5a7a1.js";
|
|
12
12
|
import { F as J } from "./fieldText-2c4790e1.js";
|
package/dist/sidePanel.js
CHANGED
|
@@ -1,74 +1,88 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"side-
|
|
11
|
-
"
|
|
12
|
-
header:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { jsxs as s, jsx as i, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { useId as N, useEffect as y } from "react";
|
|
3
|
+
import { c as g } from "./bind-06a7ff84.js";
|
|
4
|
+
import { K as E } from "./keyCodes-f63c0e11.js";
|
|
5
|
+
import { S as x } from "./close-4d480ef7.js";
|
|
6
|
+
import { B as k } from "./baseIconButton-251479f7.js";
|
|
7
|
+
const I = "_active_6bj2z_15", K = "_compact_6bj2z_39", S = "_header_6bj2z_35", w = "_title_6bj2z_65", B = "_description_6bj2z_76", D = "_content_6bj2z_85", L = "_footer_6bj2z_92", P = "_divider_6bj2z_98", $ = {
|
|
8
|
+
"side-panel": "_side-panel_6bj2z_1",
|
|
9
|
+
active: I,
|
|
10
|
+
"side-right": "_side-right_6bj2z_19",
|
|
11
|
+
"side-left": "_side-left_6bj2z_27",
|
|
12
|
+
"header-section": "_header-section_6bj2z_35",
|
|
13
|
+
compact: K,
|
|
14
|
+
header: S,
|
|
15
|
+
"header-content": "_header-content_6bj2z_55",
|
|
16
|
+
"close-button": "_close-button_6bj2z_59",
|
|
17
|
+
title: w,
|
|
16
18
|
description: B,
|
|
17
|
-
content:
|
|
18
|
-
footer:
|
|
19
|
-
divider:
|
|
20
|
-
}, e =
|
|
21
|
-
className:
|
|
22
|
-
title:
|
|
23
|
-
descriptionComponent:
|
|
19
|
+
content: D,
|
|
20
|
+
footer: L,
|
|
21
|
+
divider: P
|
|
22
|
+
}, e = g.bind($), J = ({
|
|
23
|
+
className: h,
|
|
24
|
+
title: c,
|
|
25
|
+
descriptionComponent: r,
|
|
24
26
|
headerComponent: d,
|
|
25
|
-
contentComponent:
|
|
27
|
+
contentComponent: n,
|
|
26
28
|
footerComponent: o,
|
|
27
|
-
top:
|
|
28
|
-
side:
|
|
29
|
-
isOpen:
|
|
29
|
+
top: _ = 0,
|
|
30
|
+
side: b = "right",
|
|
31
|
+
isOpen: a = !0,
|
|
30
32
|
onClose: t,
|
|
31
|
-
closeButtonAriaLabel:
|
|
33
|
+
closeButtonAriaLabel: v = "Close panel"
|
|
32
34
|
}) => {
|
|
33
|
-
const l =
|
|
35
|
+
const l = N(), f = () => {
|
|
34
36
|
t == null || t();
|
|
35
37
|
};
|
|
36
|
-
|
|
38
|
+
y(() => {
|
|
39
|
+
if (!a || !t)
|
|
40
|
+
return;
|
|
41
|
+
const m = (z) => {
|
|
42
|
+
const { keyCode: u } = z;
|
|
43
|
+
u === E.ESCAPE_KEY_CODE && t();
|
|
44
|
+
};
|
|
45
|
+
return document.addEventListener("keydown", m, !1), () => {
|
|
46
|
+
document.removeEventListener("keydown", m, !1);
|
|
47
|
+
};
|
|
48
|
+
}, [a, t]);
|
|
49
|
+
const j = !!(d || r);
|
|
50
|
+
return /* @__PURE__ */ s(
|
|
37
51
|
"aside",
|
|
38
52
|
{
|
|
39
|
-
className: e("side-panel", `side-${
|
|
53
|
+
className: e("side-panel", `side-${b}`, { active: a }, h),
|
|
40
54
|
role: "dialog",
|
|
41
55
|
"aria-modal": "true",
|
|
42
|
-
"aria-hidden": !
|
|
43
|
-
"aria-labelledby":
|
|
44
|
-
style: { top:
|
|
56
|
+
"aria-hidden": !a,
|
|
57
|
+
"aria-labelledby": c ? l : void 0,
|
|
58
|
+
style: { top: _, height: `calc(100vh - ${_}px)` },
|
|
45
59
|
tabIndex: -1,
|
|
46
60
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
(d ||
|
|
49
|
-
|
|
50
|
-
t && /* @__PURE__ */
|
|
51
|
-
|
|
61
|
+
/* @__PURE__ */ s("div", { className: e("header-section", { compact: !j }), children: [
|
|
62
|
+
(d || c) && /* @__PURE__ */ s("div", { className: e("header"), children: [
|
|
63
|
+
c ? /* @__PURE__ */ i("span", { id: l, className: e("title"), children: c }) : d,
|
|
64
|
+
t && /* @__PURE__ */ i(
|
|
65
|
+
k,
|
|
52
66
|
{
|
|
53
67
|
className: e("close-button"),
|
|
54
|
-
onClick:
|
|
55
|
-
"aria-label":
|
|
56
|
-
children: /* @__PURE__ */
|
|
68
|
+
onClick: f,
|
|
69
|
+
"aria-label": v,
|
|
70
|
+
children: /* @__PURE__ */ i(x, {})
|
|
57
71
|
}
|
|
58
72
|
)
|
|
59
73
|
] }),
|
|
60
|
-
|
|
74
|
+
r
|
|
61
75
|
] }),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
|
|
64
|
-
o && /* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ i("div", { className: e("divider") }),
|
|
77
|
+
n && /* @__PURE__ */ i("div", { className: e("content"), children: n }),
|
|
78
|
+
o && /* @__PURE__ */ s(p, { children: [
|
|
79
|
+
/* @__PURE__ */ i("div", { className: e("divider") }),
|
|
80
|
+
/* @__PURE__ */ i("div", { className: e("footer"), children: o })
|
|
67
81
|
] })
|
|
68
82
|
]
|
|
69
83
|
}
|
|
70
84
|
);
|
|
71
85
|
};
|
|
72
86
|
export {
|
|
73
|
-
|
|
87
|
+
J as SidePanel
|
|
74
88
|
};
|