@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.
@@ -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-e85dd323.js";
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) => {
@@ -1,5 +1,5 @@
1
- import { D as t } from "./datePicker-fcff097b.js";
2
- import { r as A } from "./datePicker-fcff097b.js";
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-e85dd323.js";
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 Je, useState as oe, useRef as P, useMemo as y, useCallback as x, useLayoutEffect as Qe, useEffect as Oe } from "react";
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 Ze, offset as er, flip as rr } from "@floating-ui/react-dom";
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 tr } from "rc-scrollbars";
7
- import { u as nr } from "./useOnClickOutside-c332f7d3.js";
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 sr } from "./baseIconButton-251479f7.js";
10
- import { S as ar } from "./clear-53660571.js";
11
- import { S as or } from "./dropdown-0260bb66.js";
12
- import { Tooltip as lr } from "./tooltip.js";
13
- import { FieldLabel as cr } from "./fieldLabel.js";
14
- import { C as dr } from "./checkbox-ed6cc375.js";
15
- const ir = "_disabled_14s7v_12", ur = "_hidden_14s7v_16", hr = "_hover_14s7v_22", fr = "_selected_14s7v_38", _r = {
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: ir,
18
- hidden: ur,
19
- hover: hr,
17
+ disabled: hr,
18
+ hidden: fr,
19
+ hover: _r,
20
20
  "depth-1": "_depth-1_14s7v_32",
21
- selected: fr,
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(_r), Ne = Je(
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(dr, { value: !!R, partiallyChecked: H }),
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
- ), pr = [
72
+ ), wr = [
73
73
  w.ENTER_KEY_CODE,
74
74
  w.SPACE_KEY_CODE,
75
75
  w.ARROW_DOWN_KEY_CODE
76
- ], gr = [w.ESCAPE_KEY_CODE, w.TAB_KEY_CODE];
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 wr = 216, mr = (t, r) => {
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
- }, yr = (t, r) => (t % r + r) % r, ce = (t, r = 0, a = 1) => {
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
- yr(r + a, s),
90
+ Er(r + a, s),
91
91
  a
92
92
  );
93
- }, Cr = (t, r) => ce(t, r), Er = (t, r) => ce(t, r, -1), De = (t, r = 0, a) => !t || t.length === 0 ? [] : t.reduce((s, d) => {
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
- }, Or = "_container_owe49_1", vr = "_icon_owe49_7", Nr = "_arrow_owe49_13", br = "_dropdown_owe49_27", Dr = "_disabled_owe49_44", Ar = "_value_owe49_51", Kr = "_error_owe49_54", Ir = "_touched_owe49_54", Tr = "_opened_owe49_58", kr = "_placeholder_owe49_93", Pr = "_ghost_owe49_139", xr = "_divider_owe49_160", Rr = {
103
- container: Or,
104
- icon: vr,
105
- arrow: Nr,
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: br,
107
+ dropdown: Ar,
108
108
  "transparent-background": "_transparent-background_owe49_41",
109
- disabled: Dr,
110
- value: Ar,
111
- error: Kr,
112
- touched: Ir,
113
- opened: Tr,
114
- placeholder: kr,
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: Pr,
122
- divider: xr
123
- }, i = be.bind(Rr), Jr = ({
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), [Re, _e] = oe(!1), [Ve, $] = oe(null), E = P(null), k = y(() => De(a), [a]), _ = y(
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
- ), j = y(() => k.filter(({ option: e }) => {
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
- ), z = y(() => {
169
+ ), j = y(() => {
168
170
  const e = /* @__PURE__ */ new Map();
169
- return j.forEach((n) => {
171
+ return $.forEach((n) => {
170
172
  e.set(n.value, Ke(n));
171
173
  }), e;
172
- }, [j]), q = x(
173
- (e) => (j.forEach((n) => {
174
- const o = z.get(n.value) ?? [], c = o.length > 0 && o.every((h) => e.has(h));
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
- [j, ue, z]
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, Le = Pe && ge && !s, He = x((e) => {
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
- Qe(() => {
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: Ye } = Ze({
186
+ const { refs: B, floatingStyles: We } = rr({
185
187
  placement: "bottom-start",
186
188
  middleware: [
187
- er(5),
188
- rr({
189
+ tr(5),
190
+ nr({
189
191
  fallbackPlacements: ["bottom-start", "top-start", "bottom", "top"]
190
192
  })
191
193
  ]
192
- }), Me = () => {
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]), We = x(
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
- nr(fe, () => {
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 = z.get(e.value) ?? [], G = F.some((v) => !c.has(v));
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
- }, Se = () => _.find(({ value: e }) => e === r), me = mr(_, r), {
238
- getToggleButtonProps: $e,
239
- getLabelProps: je,
240
- getMenuProps: ze,
241
- getItemProps: qe,
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: Se(),
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 $(A.ON_KEY_DOWN), b(Er(_, e.highlightedIndex)), e;
257
+ return z(A.ON_KEY_DOWN), b(vr(_, e.highlightedIndex)), e;
256
258
  case le.stateChangeTypes.MenuKeyDownArrowDown:
257
- return $(A.ON_KEY_DOWN), b(Cr(_, e.highlightedIndex)), e;
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 Be = () => {
269
- s || (S((e) => !e), u ? p == null || p() : m == null || m(), $(A.ON_CLICK));
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 Ue = (e) => {
296
+ const Fe = (e) => {
295
297
  const { keyCode: n } = e;
296
- pr.includes(n) && e.target === e.currentTarget && (e.preventDefault(), e.stopPropagation(), !u && (b(me), S(!0), m == null || m(), $(A.ON_KEY_DOWN)));
297
- }, Xe = (e) => {
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
- gr.includes(n) && (e.stopPropagation(), N());
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: Me,
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 = z.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;
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
- ...qe({
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 && Ve !== A.ON_CLICK,
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
- ] }), Fe = () => {
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 && Re ? /* @__PURE__ */ l(lr, { content: e, placement: "top", wrapperClassName: i("value-tooltip"), children: n }) : n;
362
- }, Ge = $e({
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: Be,
372
- onKeyDown: Ue,
383
+ onClick: Xe,
384
+ onKeyDown: Fe,
373
385
  ref: B.setReference
374
- }), { type: Lr, ...Ce } = Ge;
386
+ }), { type: Yr, ...Ce } = Qe;
375
387
  return /* @__PURE__ */ D("div", { ref: fe, className: i("container", Z), title: K, children: [
376
- H && /* @__PURE__ */ l(cr, { ...je(), children: H }),
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: Fe() }),
387
- Le && /* @__PURE__ */ l(
388
- sr,
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: We,
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(ar, {})
409
+ children: /* @__PURE__ */ l(lr, {})
398
410
  }
399
411
  ),
400
- /* @__PURE__ */ l("span", { className: i("arrow"), "aria-hidden": "true", children: /* @__PURE__ */ l(or, {}) })
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: Ye,
419
+ style: We,
408
420
  className: i(
409
421
  "select-list",
410
422
  { opened: u, "limited-width": Te },
411
423
  Ie
412
424
  ),
413
- ...ze({
414
- onKeyDown: Xe,
425
+ ...Be({
426
+ onKeyDown: Ge,
415
427
  ref: B.setFloating
416
428
  }),
417
429
  children: I ? ye() : /* @__PURE__ */ l(
418
- tr,
430
+ sr,
419
431
  {
420
432
  autoHeight: !0,
421
- autoHeightMax: wr,
433
+ autoHeightMax: yr,
422
434
  hideTracksWhenNotNeeded: !0,
423
435
  ref: (e) => {
424
436
  T.current = e;
425
437
  },
426
- onScrollFrame: He,
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
- Jr as D
447
+ Zr as D
436
448
  };
package/dist/dropdown.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as r } from "./dropdown-e85dd323.js";
1
+ import { D as r } from "./dropdown-18c58189.js";
2
2
  import "react/jsx-runtime";
3
3
  import "react";
4
4
  import "./bind-06a7ff84.js";
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-fcff097b.js";
7
+ import { D as w } from "./datePicker-e400f01d.js";
8
8
  import "react-datepicker";
9
- import { D as E } from "./dropdown-e85dd323.js";
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 a, jsx as s, Fragment as f } from "react/jsx-runtime";
2
- import { useId as p } from "react";
3
- import { c as N } from "./bind-06a7ff84.js";
4
- import { S as b } from "./close-4d480ef7.js";
5
- import { B as u } from "./baseIconButton-251479f7.js";
6
- const x = "_active_12osg_15", I = "_header_12osg_35", y = "_title_12osg_62", B = "_description_12osg_73", S = "_content_12osg_82", j = "_footer_12osg_89", $ = "_divider_12osg_95", k = {
7
- "side-panel": "_side-panel_12osg_1",
8
- active: x,
9
- "side-right": "_side-right_12osg_19",
10
- "side-left": "_side-left_12osg_27",
11
- "header-section": "_header-section_12osg_35",
12
- header: I,
13
- "header-content": "_header-content_12osg_52",
14
- "close-button": "_close-button_12osg_56",
15
- title: y,
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: S,
18
- footer: j,
19
- divider: $
20
- }, e = N.bind(k), A = ({
21
- className: _,
22
- title: i,
23
- descriptionComponent: h,
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: c,
27
+ contentComponent: n,
26
28
  footerComponent: o,
27
- top: r = 0,
28
- side: g = "right",
29
- isOpen: n = !0,
29
+ top: _ = 0,
30
+ side: b = "right",
31
+ isOpen: a = !0,
30
32
  onClose: t,
31
- closeButtonAriaLabel: m = "Close panel"
33
+ closeButtonAriaLabel: v = "Close panel"
32
34
  }) => {
33
- const l = p(), v = () => {
35
+ const l = N(), f = () => {
34
36
  t == null || t();
35
37
  };
36
- return /* @__PURE__ */ a(
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-${g}`, { active: n }, _),
53
+ className: e("side-panel", `side-${b}`, { active: a }, h),
40
54
  role: "dialog",
41
55
  "aria-modal": "true",
42
- "aria-hidden": !n,
43
- "aria-labelledby": i ? l : void 0,
44
- style: { top: r, height: `calc(100vh - ${r}px)` },
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__ */ a("div", { className: e("header-section"), children: [
48
- (d || i) && /* @__PURE__ */ a("div", { className: e("header"), children: [
49
- i ? /* @__PURE__ */ s("span", { id: l, className: e("title"), children: i }) : d,
50
- t && /* @__PURE__ */ s(
51
- u,
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: v,
55
- "aria-label": m,
56
- children: /* @__PURE__ */ s(b, {})
68
+ onClick: f,
69
+ "aria-label": v,
70
+ children: /* @__PURE__ */ i(x, {})
57
71
  }
58
72
  )
59
73
  ] }),
60
- h
74
+ r
61
75
  ] }),
62
- /* @__PURE__ */ s("div", { className: e("divider") }),
63
- c && /* @__PURE__ */ s("div", { className: e("content"), children: c }),
64
- o && /* @__PURE__ */ a(f, { children: [
65
- /* @__PURE__ */ s("div", { className: e("divider") }),
66
- /* @__PURE__ */ s("div", { className: e("footer"), children: o })
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
- A as SidePanel
87
+ J as SidePanel
74
88
  };