@reportportal/ui-kit 0.0.1-alpha.155 → 0.0.1-alpha.157

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.
@@ -36,7 +36,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
36
36
  error: d = !1,
37
37
  editItem: v,
38
38
  editable: p = !1,
39
- getAdditionalCreationCondition: y = () => !0,
39
+ getAdditionalCreationCondition: w = () => !0,
40
40
  storedOption: g = !0,
41
41
  highlightUnStoredItem: f = !1,
42
42
  variant: k = "light",
@@ -45,12 +45,12 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
45
45
  className: R,
46
46
  textClassName: I
47
47
  }) => {
48
- const [w, b] = re(!1), [C, B] = re(""), [l, a] = re(!1), s = xe(null), i = () => {
48
+ const [y, b] = re(!1), [C, B] = re(""), [l, a] = re(!1), s = xe(null), i = () => {
49
49
  !c && p && !g && (B((x == null ? void 0 : x(t)) || (n == null ? void 0 : n(t)) || ""), b(!0));
50
50
  }, _ = (S) => {
51
51
  B(S.target.value);
52
52
  }, O = (S) => {
53
- const j = y(C);
53
+ const j = w(C);
54
54
  S.key === "Enter" && j && (v(t, C), b(!1), B(""));
55
55
  }, H = () => {
56
56
  b(!1), B("");
@@ -86,7 +86,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
86
86
  },
87
87
  R
88
88
  );
89
- return w ? /* @__PURE__ */ o(
89
+ return y ? /* @__PURE__ */ o(
90
90
  "input",
91
91
  {
92
92
  autoFocus: !0,
@@ -129,7 +129,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
129
129
  renderCustomSelectedItem: d,
130
130
  selectedItemSingleLine: v,
131
131
  selectedItemClassName: p,
132
- selectedItemTextClassName: y,
132
+ selectedItemTextClassName: w,
133
133
  ...g
134
134
  }) => t.map((f) => d ? d(f) : /* @__PURE__ */ o(
135
135
  Xe,
@@ -141,7 +141,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
141
141
  highlightUnStoredItem: n,
142
142
  singleLine: v,
143
143
  className: p,
144
- textClassName: y,
144
+ textClassName: w,
145
145
  ...g
146
146
  },
147
147
  e == null ? void 0 : e(f)
@@ -168,7 +168,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
168
168
  newItemButtonText: v = "",
169
169
  ...p
170
170
  }) => {
171
- const y = () => v || (d === "key-variant" ? "New key" : "New value");
171
+ const w = () => v || (d === "key-variant" ? "New key" : "New value");
172
172
  return c ? /* @__PURE__ */ $(ce, { children: [
173
173
  /* @__PURE__ */ o("div", { className: ee("divider") }),
174
174
  /* @__PURE__ */ $(
@@ -189,7 +189,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
189
189
  className: ee({ "button-active": t }),
190
190
  icon: /* @__PURE__ */ o(je, {}),
191
191
  variant: "text",
192
- children: y()
192
+ children: w()
193
193
  }
194
194
  )
195
195
  ]
@@ -219,7 +219,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
219
219
  createWithoutConfirmation: d,
220
220
  customEmptyListMessage: v,
221
221
  customNoMatchesMessage: p,
222
- optionVariant: y,
222
+ optionVariant: w,
223
223
  newItemButtonText: g,
224
224
  renderOption: f,
225
225
  getUniqKey: k,
@@ -229,7 +229,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
229
229
  (s, i, _ = !1) => f ? f(s, i, _, x) : /* @__PURE__ */ o(
230
230
  ye,
231
231
  {
232
- optionVariant: y,
232
+ optionVariant: w,
233
233
  ...x({ item: s, index: i }),
234
234
  isNew: _,
235
235
  newItemButtonText: g,
@@ -237,8 +237,8 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
237
237
  },
238
238
  (k == null ? void 0 : k(s)) || u(s)
239
239
  ),
240
- [x, k, g, y, u, f]
241
- ), w = V(
240
+ [x, k, g, w, u, f]
241
+ ), y = V(
242
242
  (s) => s.length ? s.map((i, _) => I(i, _)) : "",
243
243
  [I]
244
244
  ), b = V(
@@ -247,7 +247,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
247
247
  return /* @__PURE__ */ o("div", { className: _e({ container: !i }), children: /* @__PURE__ */ o(
248
248
  ye,
249
249
  {
250
- optionVariant: y,
250
+ optionVariant: w,
251
251
  isNew: !0,
252
252
  newItemButtonText: g,
253
253
  ...x({ item: r, index: i }),
@@ -256,7 +256,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
256
256
  u(r)
257
257
  ) });
258
258
  },
259
- [x, r, g, y, u]
259
+ [x, r, g, w, u]
260
260
  ), C = V(
261
261
  (s) => n ? /* @__PURE__ */ $(ce, { children: [
262
262
  /* @__PURE__ */ o(Ue, { children: /* @__PURE__ */ o(Pe, {}) }),
@@ -268,7 +268,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
268
268
  return /* @__PURE__ */ o("div", { className: _e("empty-list-message"), children: s });
269
269
  }, [v, p, e == null ? void 0 : e.length]), l = c ? e : R(), a = C(e);
270
270
  return a || /* @__PURE__ */ $("div", { className: _e({ container: e.length }), children: [
271
- /* @__PURE__ */ o($e, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: he(l) ? B() : w(l) }),
271
+ /* @__PURE__ */ o($e, { autoHeight: !0, autoHeightMax: 216, hideTracksWhenNotNeeded: !0, children: he(l) ? B() : y(l) }),
272
272
  !d && b(l)
273
273
  ] });
274
274
  }, it = "_menu_f64z5_16", dt = "_opened_f64z5_34", ut = "_dark_f64z5_37", mt = {
@@ -312,7 +312,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
312
312
  children: d,
313
313
  customizeNewSelectedValue: v = (f) => f,
314
314
  getOptionUniqKey: p,
315
- getOptionUniqKeyValue: y,
315
+ getOptionUniqKeyValue: w,
316
316
  ...g
317
317
  }) => {
318
318
  const [f, k] = re(n), x = (l, a) => {
@@ -338,16 +338,16 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
338
338
  }, I = (l, a) => {
339
339
  const s = c.indexOf(l), i = [...c];
340
340
  i.splice(s, 1, a), e == null || e(i, null);
341
- }, w = (l, a) => {
341
+ }, y = (l, a) => {
342
342
  const s = c.filter((_) => !ae(_, l));
343
343
  e == null || e(s, a), u(l, (_) => r == null ? void 0 : r(s, _));
344
344
  }, b = (l, a) => {
345
345
  l && R(l, a);
346
346
  }, C = (l) => ({
347
- removeItem: w,
347
+ removeItem: y,
348
348
  editItem: I,
349
349
  handleChange: e,
350
- getOptionUniqKeyValue: y,
350
+ getOptionUniqKeyValue: w,
351
351
  storedItemsMap: f,
352
352
  ...l
353
353
  });
@@ -399,7 +399,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
399
399
  placeholder: d = "",
400
400
  error: v = "",
401
401
  touched: p = !1,
402
- creatable: y = !1,
402
+ creatable: w = !1,
403
403
  editable: g = !1,
404
404
  onChange: f = () => {
405
405
  },
@@ -410,7 +410,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
410
410
  disabled: u = !1,
411
411
  isDropdownMode: R = !1,
412
412
  mobileDisabled: I = !1,
413
- inputProps: w = {},
413
+ inputProps: y = {},
414
414
  parseValueToString: b = (h) => h == null ? "" : String(h),
415
415
  maxLength: C = null,
416
416
  async: B = !1,
@@ -550,37 +550,37 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
550
550
  R && se(), k();
551
551
  },
552
552
  onKeyDown: (F) => {
553
- F.key === Re && m && y && _(m) && Y({
553
+ F.key === Re && m && w && _(m) && Y({
554
554
  inputValue: m,
555
555
  selectItem: be,
556
556
  clearSelection: ve
557
557
  }), me({ event: F, removeItem: A, inputValue: m });
558
558
  },
559
559
  onBlur: () => {
560
- x(), m && y && _(m) && Y({
560
+ x(), m && w && _(m) && Y({
561
561
  inputValue: m,
562
562
  selectItem: be,
563
563
  clearSelection: ve
564
564
  });
565
565
  },
566
566
  disabled: u,
567
- ...w
567
+ ...y
568
568
  }),
569
- className: X("input", { disabled: u }),
569
+ className: X("input", { disabled: u }, y.className),
570
570
  "data-automation-id": W
571
571
  }
572
572
  )
573
573
  ]
574
574
  }
575
575
  ),
576
- (w == null ? void 0 : w.clearable) && !he(n) && /* @__PURE__ */ o(
576
+ (y == null ? void 0 : y.clearable) && !he(n) && /* @__PURE__ */ o(
577
577
  "button",
578
578
  {
579
579
  type: "button",
580
580
  className: X("clear-icon", { "clear-icon--disabled": u }),
581
581
  onClick: () => {
582
582
  var F;
583
- return !u && ((F = w == null ? void 0 : w.onClear) == null ? void 0 : F.call(w));
583
+ return !u && ((F = y == null ? void 0 : y.onClear) == null ? void 0 : F.call(y));
584
584
  },
585
585
  onMouseDown: (F) => F.preventDefault(),
586
586
  children: /* @__PURE__ */ o(We, {})
@@ -641,7 +641,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
641
641
  onBlur: v = () => {
642
642
  },
643
643
  disabled: p = !1,
644
- inputProps: y = {},
644
+ inputProps: w = {},
645
645
  parseValueToString: g = (D) => D === null ? "" : String(D),
646
646
  minLength: f = 1,
647
647
  skipOptionCreation: k = !1,
@@ -649,7 +649,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
649
649
  optionVariant: u = "",
650
650
  isRequired: R = !1,
651
651
  error: I = "",
652
- touched: w = !1,
652
+ touched: y = !1,
653
653
  setTouch: b = () => {
654
654
  },
655
655
  createWithoutConfirmation: C = !1,
@@ -700,7 +700,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
700
700
  const oe = de(void 0, { suppressRefError: !0 }), ue = {
701
701
  ...oe,
702
702
  ref: (m) => (J.setReference(m), oe.ref(m))
703
- }, me = Z ?? "", { onClear: Y, clearable: fe, ...pe } = y, N = fe && c !== null, E = (...m) => {
703
+ }, me = Z ?? "", { onClear: Y, clearable: fe, ...pe } = w, N = fe && c !== null, E = (...m) => {
704
704
  z(null), Y == null || Y(...m);
705
705
  };
706
706
  return /* @__PURE__ */ o(ce, { children: /* @__PURE__ */ $("div", { className: Ne("input-wrapper"), ...ue, children: [
@@ -726,7 +726,7 @@ const Le = "_disabled_1rpph_43", Ke = "_input_1rpph_107", Te = {
726
726
  disabled: p,
727
727
  defaultWidth: !1,
728
728
  isRequired: R,
729
- touched: w,
729
+ touched: y,
730
730
  error: I,
731
731
  ...pe,
732
732
  clearable: N,
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Splits object properties into HTML attributes and remaining props.
3
+ * Transforms camelCase data-* and aria-* attributes to kebab-case format
4
+ * as required by HTML specification.
5
+ *
6
+ * @param attrs - Object containing properties to split
7
+ * @returns Object with two properties:
8
+ * - transformed: data-* and aria-* attributes converted to kebab-case
9
+ * - remaining: all other properties unchanged
10
+ *
11
+ * @example
12
+ * const props = { dataTestId: 'test', ariaLabel: 'Label', className: 'container' };
13
+ * const { transformed, remaining } = splitHtmlAttributes(props);
14
+ * // transformed: { 'data-test-id': 'test', 'aria-label': 'Label' }
15
+ * // remaining: { className: 'container' }
16
+ */
17
+ export declare const splitHtmlAttributes: (attrs: Record<string, unknown>) => {
18
+ transformed: Record<string, unknown>;
19
+ remaining: Record<string, unknown>;
20
+ };
@@ -1,3 +1,4 @@
1
1
  export { getFileExtension } from './getFileExtension';
2
2
  export { isString } from './isString';
3
3
  export { getAlignmentAxisOffset } from './floatingUi';
4
+ export { splitHtmlAttributes } from './htmlAttributes';
@@ -1,7 +1,7 @@
1
- import { ReactNode, FC } from 'react';
1
+ import { ReactNode, FC, ComponentPropsWithRef } from 'react';
2
2
  import { DropdownVariant, RenderDropdownOption, DropdownOptionType, DropdownValue } from './types';
3
3
 
4
- export interface DropdownProps {
4
+ export interface DropdownProps extends Omit<ComponentPropsWithRef<'div'>, 'onChange' | 'onFocus' | 'onBlur' | 'title'> {
5
5
  options: DropdownOptionType[];
6
6
  value: DropdownValue | DropdownValue[];
7
7
  disabled?: boolean;
@@ -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-1749da7a.js";
6
- import { D as E } from "./dropdown-b63f2137.js";
6
+ import { D as E } from "./dropdown-ae695766.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-3881a2d6.js";
2
- import { r as A } from "./datePicker-3881a2d6.js";
1
+ import { D as t } from "./datePicker-37854acd.js";
2
+ import { r as A } from "./datePicker-37854acd.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-b63f2137.js";
14
+ import "./dropdown-ae695766.js";
15
15
  import "react-dom";
16
16
  import "@floating-ui/react-dom";
17
17
  import "downshift";