mimir-ui-kit 1.37.2 → 1.37.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,16 +1,16 @@
1
1
  import { jsxs as x, Fragment as X, jsx as v } from "react/jsx-runtime";
2
2
  import { c as D } from "../../index-DIxK0V-G.js";
3
- import S, { createContext as F, useRef as oe, Fragment as ne, useReducer as de, useMemo as R, useId as re, useEffect as le, useState as se, useContext as L, forwardRef as pe } from "react";
3
+ import S, { createContext as F, useRef as oe, Fragment as ne, useReducer as de, useMemo as R, useId as re, useEffect as le, useState as se, useContext as H, forwardRef as pe } from "react";
4
4
  import { AccordionItem as me } from "./AccordionItem/AccordionItem.js";
5
5
  import { EAccordionButtonType as w, EAccordionSize as O, EAccordionLinkIconSize as G, EAccordionButtonStyle as fe, EAccordionIconType as J, EAccordionButtonIconSize as Y } from "./constants.js";
6
6
  import { useMediaQuery as _e } from "../../hooks/useMediaQuery/useMediaQuery.js";
7
7
  import { EMediaQuery as Ee } from "../../hooks/useMediaQuery/constants.js";
8
8
  import { Icon as ke } from "../../icons/Icon.js";
9
9
  import { Link as Se } from "../AnchorLink/Link.js";
10
- import { M as Z, W as K, y as U, T as Ie, o as $, a as q, H as j, I as ae, $ as be, b as ve, D as ee, u as he, c as N } from "../../keyboard-B0lm_zyn.js";
11
- import { w as ye } from "../../use-active-press-86hajhdd.js";
10
+ import { M as Z, W as K, y as U, T as Ie, o as $, a as q, H as j, I as ae, $ as be, b as ve, D as ee, u as he, c as N } from "../../keyboard-mgWkd2Vh.js";
11
+ import { w as ye } from "../../use-active-press-CqLGIFz7.js";
12
12
  import { e as De } from "../../use-resolve-button-type-DhFdPxnv.js";
13
- import { c as $e, i as M, u as Pe, R as ge, H as Te, s as we } from "../../open-closed-CdldUPoq.js";
13
+ import { c as $e, i as M, u as Pe, x as ge, R as Te, s as we } from "../../open-closed-D2VjDhAN.js";
14
14
  import { r as Ne } from "../../bugs-diTMAGNw.js";
15
15
  import '../../assets/Accordion.css';let Ce = F(() => {
16
16
  });
@@ -33,7 +33,7 @@ let Re = { 0: (e) => ({ ...e, disclosureState: q(e.disclosureState, { 0: 1, 1: 0
33
33
  } }, W = F(null);
34
34
  W.displayName = "DisclosureContext";
35
35
  function Q(e) {
36
- let t = L(W);
36
+ let t = H(W);
37
37
  if (t === null) {
38
38
  let a = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
39
39
  throw Error.captureStackTrace && Error.captureStackTrace(a, Q), a;
@@ -43,7 +43,7 @@ function Q(e) {
43
43
  let V = F(null);
44
44
  V.displayName = "DisclosureAPIContext";
45
45
  function ce(e) {
46
- let t = L(V);
46
+ let t = H(V);
47
47
  if (t === null) {
48
48
  let a = new Error(`<${e} /> is missing a parent <Disclosure /> component.`);
49
49
  throw Error.captureStackTrace && Error.captureStackTrace(a, ce), a;
@@ -53,13 +53,13 @@ function ce(e) {
53
53
  let z = F(null);
54
54
  z.displayName = "DisclosurePanelContext";
55
55
  function Me() {
56
- return L(z);
56
+ return H(z);
57
57
  }
58
58
  function Fe(e, t) {
59
59
  return q(t.type, Re, e, t);
60
60
  }
61
- let He = ne;
62
- function Le(e, t) {
61
+ let Le = ne;
62
+ function He(e, t) {
63
63
  let { defaultOpen: a = !1, ...d } = e, n = oe(null), p = U(t, Ie((c) => {
64
64
  n.current = c;
65
65
  }, e.as === void 0 || e.as === ne)), m = de(Fe, { disclosureState: a ? 0 : 1, buttonElement: null, panelElement: null, buttonId: null, panelId: null }), [{ disclosureState: o, buttonId: r }, k] = m, l = $((c) => {
@@ -69,7 +69,7 @@ function Le(e, t) {
69
69
  let u = c ? c instanceof HTMLElement ? c : c.current instanceof HTMLElement ? c.current : E.getElementById(r) : E.getElementById(r);
70
70
  u == null || u.focus();
71
71
  }), I = R(() => ({ close: l }), [l]), f = R(() => ({ open: o === 0, close: l }), [o, l]), _ = { ref: p };
72
- return S.createElement(W.Provider, { value: m }, S.createElement(V.Provider, { value: I }, S.createElement(Be, { value: l }, S.createElement($e, { value: q(o, { 0: M.Open, 1: M.Closed }) }, j({ ourProps: _, theirProps: d, slot: f, defaultTag: He, name: "Disclosure" })))));
72
+ return S.createElement(W.Provider, { value: m }, S.createElement(V.Provider, { value: I }, S.createElement(Be, { value: l }, S.createElement($e, { value: q(o, { 0: M.Open, 1: M.Closed }) }, j({ ourProps: _, theirProps: d, slot: f, defaultTag: Le, name: "Disclosure" })))));
73
73
  }
74
74
  let Ke = "button";
75
75
  function Ue(e, t) {
@@ -106,8 +106,8 @@ function Ue(e, t) {
106
106
  }), u = $((s) => {
107
107
  var T;
108
108
  Ne(s.currentTarget) || n || (l ? (r({ type: 0 }), (T = o.buttonElement) == null || T.focus()) : r({ type: 0 }));
109
- }), { isFocusVisible: h, focusProps: y } = be({ autoFocus: p }), { isHovered: b, hoverProps: P } = ve({ isDisabled: n }), { pressed: C, pressProps: B } = ye({ disabled: n }), H = R(() => ({ open: o.disclosureState === 0, hover: b, active: C, disabled: n, focus: h, autofocus: p }), [o, b, C, h, n, p]), A = De(e, o.buttonElement), g = l ? ee({ ref: f, type: A, disabled: n || void 0, autoFocus: p, onKeyDown: c, onClick: u }, y, P, B) : ee({ ref: f, id: d, type: A, "aria-expanded": o.disclosureState === 0, "aria-controls": o.panelElement ? o.panelId : void 0, disabled: n || void 0, autoFocus: p, onKeyDown: c, onKeyUp: E, onClick: u }, y, P, B);
110
- return j({ mergeRefs: _, ourProps: g, theirProps: m, slot: H, defaultTag: Ke, name: "Disclosure.Button" });
109
+ }), { isFocusVisible: h, focusProps: y } = be({ autoFocus: p }), { isHovered: b, hoverProps: P } = ve({ isDisabled: n }), { pressed: C, pressProps: B } = ye({ disabled: n }), L = R(() => ({ open: o.disclosureState === 0, hover: b, active: C, disabled: n, focus: h, autofocus: p }), [o, b, C, h, n, p]), A = De(e, o.buttonElement), g = l ? ee({ ref: f, type: A, disabled: n || void 0, autoFocus: p, onKeyDown: c, onClick: u }, y, P, B) : ee({ ref: f, id: d, type: A, "aria-expanded": o.disclosureState === 0, "aria-controls": o.panelElement ? o.panelId : void 0, disabled: n || void 0, autoFocus: p, onKeyDown: c, onKeyUp: E, onClick: u }, y, P, B);
110
+ return j({ mergeRefs: _, ourProps: g, theirProps: m, slot: L, defaultTag: Ke, name: "Disclosure.Button" });
111
111
  }
112
112
  let qe = "div", je = Z.RenderStrategy | Z.Static;
113
113
  function We(e, t) {
@@ -120,7 +120,7 @@ function We(e, t) {
120
120
  let _ = Pe(), [c, E] = ge(n, l, _ !== null ? (_ & M.Open) === M.Open : m.disclosureState === 0), u = R(() => ({ open: m.disclosureState === 0, close: r }), [m.disclosureState, r]), h = { ref: f, id: d, ...Te(E) };
121
121
  return S.createElement(we, null, S.createElement(z.Provider, { value: m.panelId }, j({ mergeRefs: k, ourProps: h, theirProps: p, slot: u, defaultTag: qe, features: je, visible: c, name: "Disclosure.Panel" })));
122
122
  }
123
- let Qe = K(Le), ie = K(Ue), ue = K(We), Ve = Object.assign(Qe, { Button: ie, Panel: ue });
123
+ let Qe = K(He), ie = K(Ue), ue = K(We), Ve = Object.assign(Qe, { Button: ie, Panel: ue });
124
124
  const ze = "_accordion_1k9to_2", Xe = "_header_1k9to_13", Ge = "_disabled_1k9to_25", Je = "_title_1k9to_29", Ye = "_icon_1k9to_36", Ze = "_circle_1k9to_46", et = "_square_1k9to_53", tt = "_panel_1k9to_73", ot = "_open_1k9to_80", nt = "_m_1k9to_106", rt = "_s_1k9to_53", i = {
125
125
  accordion: ze,
126
126
  "is-link": "_is-link_1k9to_9",
@@ -160,7 +160,7 @@ const ze = "_accordion_1k9to_2", Xe = "_header_1k9to_13", Ge = "_disabled_1k9to_
160
160
  [i["is-link"]]: b
161
161
  }, C = () => {
162
162
  t || h((g) => !g);
163
- }, B = n === O.S ? G.S : G.M, H = {
163
+ }, B = n === O.S ? G.S : G.M, L = {
164
164
  variant: "anchor",
165
165
  size: y ? "s" : "l",
166
166
  rightIcon: {
@@ -234,7 +234,7 @@ const ze = "_accordion_1k9to_2", Xe = "_header_1k9to_13", Ge = "_disabled_1k9to_
234
234
  [i.header]: !b,
235
235
  [i.disabled]: t
236
236
  }),
237
- ...b ? H : {},
237
+ ...b ? L : {},
238
238
  children: A(u)
239
239
  }
240
240
  ),
@@ -1,10 +1,10 @@
1
1
  import { jsxs as O, jsx as x } from "react/jsx-runtime";
2
- import { W as V, p as W, o as m, $ as X, b as q, D as z, H as J, c as y } from "../../keyboard-B0lm_zyn.js";
2
+ import { W as V, p as W, o as m, $ as X, b as q, D as z, H as J, c as y } from "../../keyboard-mgWkd2Vh.js";
3
3
  import $, { useId as Q, useState as F, useMemo as Y, useCallback as Z, forwardRef as ee, useEffect as ae } from "react";
4
- import { w as re } from "../../use-active-press-86hajhdd.js";
5
- import { u as oe, a as te, b as ce, T as se, I as ne, G as ie, j as de, p as le, K as be } from "../../label-y3ANLTNC.js";
4
+ import { w as re } from "../../use-active-press-CqLGIFz7.js";
5
+ import { u as oe, a as te, b as ce, T as se, I as ne, G as ie, j as de, p as le, K as be } from "../../label-D4GFpe5F.js";
6
6
  import { r as ue } from "../../bugs-diTMAGNw.js";
7
- import { H as fe } from "../../field-FJ34aSs4.js";
7
+ import { H as fe } from "../../field-C1kt7aNM.js";
8
8
  import { c as me } from "../../index-DIxK0V-G.js";
9
9
  import { Icon as pe } from "../../icons/Icon.js";
10
10
  import '../../assets/CheckboxMimir.css';let he = "span";
@@ -1,15 +1,15 @@
1
1
  import { jsxs as g, jsx as n, Fragment as B } from "react/jsx-runtime";
2
2
  import { c as l } from "../../index-DIxK0V-G.js";
3
- import { forwardRef as ie, useRef as R, useState as S, useEffect as E, useMemo as le } from "react";
3
+ import { forwardRef as ie, useRef as R, useState as S, useEffect as j, useMemo as le } from "react";
4
4
  import { EMultiSelectSearchSize as M } from "./constants.js";
5
- import { getInitialInputValue as F, mapSizeToInputSize as P, getDropdownArrowIcon as re, joinSelectedItems as j } from "./utils.js";
5
+ import { getInitialInputValue as E, mapSizeToInputSize as F, getDropdownArrowIcon as re, joinSelectedItems as P } from "./utils.js";
6
6
  import { Icon as ce } from "../../icons/Icon.js";
7
7
  import { Button as ae } from "../Button/Button.js";
8
8
  import { CheckboxMimir as ue } from "../CheckboxMimir/CheckboxMimir.js";
9
9
  import { Chip as de } from "../Chip/Chip.js";
10
10
  import { I as G } from "../../Input-BYrIS5GU.js";
11
11
  import { EInputVariant as pe } from "../Input/constants.js";
12
- import { H as me, U as W, G as H, K as _e, W as he } from "../../combobox-CDU06zJj.js";
12
+ import { H as me, U as H, G as J, K as _e, j as he } from "../../combobox-BpYucpxz.js";
13
13
  import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke = "_container_17kql_9", qe = "_full_17kql_27", ge = "_button_17kql_39", be = "_options_17kql_53", ve = "_top_17kql_64", Ne = "_bottom_17kql_69", Ie = "_m_17kql_2", we = "_l_17kql_111", Ce = "_focused_17kql_129", Se = "_option_17kql_53", Me = "_chip_17kql_158", xe = "_clear_17kql_183", e = {
14
14
  "multi-select-search": "_multi-select-search_17kql_2",
15
15
  disabled: fe,
@@ -40,14 +40,14 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
40
40
  "required-mark": "_required-mark_17kql_178",
41
41
  clear: xe,
42
42
  "icon-button": "_icon-button_17kql_192"
43
- }, Pe = ie(
44
- (J, K) => {
43
+ }, Fe = ie(
44
+ (K, U) => {
45
45
  const {
46
46
  placeholder: x,
47
47
  size: i = M.L,
48
48
  value: a,
49
49
  onChange: s,
50
- full: U,
50
+ full: W,
51
51
  showArrow: Q = !0,
52
52
  items: m = [],
53
53
  classNameOption: X,
@@ -63,13 +63,13 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
63
63
  chipVariant: Z = "sapphire",
64
64
  disableInput: _ = !1,
65
65
  autocomplete: O = "on"
66
- } = J, w = R(null), p = R(null), [b, h] = S(!1), [f, k] = S(
67
- () => F(a, d)
66
+ } = K, w = R(null), p = R(null), [b, h] = S(!1), [f, k] = S(
67
+ () => E(a, d)
68
68
  ), [u, q] = S(
69
69
  a || []
70
70
  );
71
- E(() => {
72
- a && (q(a), JSON.stringify(a) !== JSON.stringify(u) && k(F(a, d)));
71
+ j(() => {
72
+ a && (q(a), JSON.stringify(a) !== JSON.stringify(u) && k(E(a, d)));
73
73
  }, [a, d, u]);
74
74
  const A = le(() => {
75
75
  var o;
@@ -80,7 +80,7 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
80
80
  );
81
81
  }, [y, m, f]), $ = (t) => {
82
82
  q(t), s == null || s(t);
83
- const o = j(t, d);
83
+ const o = P(t, d);
84
84
  k(o), h(!0), setTimeout(() => {
85
85
  if (p.current) {
86
86
  p.current.focus(), p.current.scrollLeft = p.current.scrollWidth;
@@ -100,7 +100,7 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
100
100
  const o = u.filter(
101
101
  (c) => c.id !== t.id
102
102
  );
103
- q(o), s == null || s(o), k(j(o, d));
103
+ q(o), s == null || s(o), k(P(o, d));
104
104
  }, T = () => h((t) => !t), te = (t) => {
105
105
  t.preventDefault(), t.currentTarget.focus();
106
106
  const o = t.currentTarget.value.length;
@@ -112,7 +112,7 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
112
112
  }, se = (t) => {
113
113
  _ && t.target.blur();
114
114
  };
115
- return E(() => {
115
+ return j(() => {
116
116
  const t = (o) => {
117
117
  w.current && !w.current.contains(o.target) && !o.defaultPrevented && h(!1);
118
118
  };
@@ -127,11 +127,11 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
127
127
  as: "div",
128
128
  value: u,
129
129
  className: l(e["multi-select-search"], {
130
- [e.full]: U,
130
+ [e.full]: W,
131
131
  [e.disabled]: r
132
132
  }),
133
133
  onChange: $,
134
- ref: K,
134
+ ref: U,
135
135
  disabled: r,
136
136
  virtual: { options: A },
137
137
  children: /* @__PURE__ */ g(
@@ -143,17 +143,17 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
143
143
  children: [
144
144
  _ && /* @__PURE__ */ g("div", { className: e["input-container"], children: [
145
145
  /* @__PURE__ */ n(
146
- W,
146
+ H,
147
147
  {
148
148
  disabled: r,
149
149
  style: { width: "100%" },
150
150
  onClick: T,
151
151
  children: /* @__PURE__ */ n(
152
- H,
152
+ J,
153
153
  {
154
154
  as: G,
155
155
  label: x,
156
- size: P(i),
156
+ size: F(i),
157
157
  className: l(e["multi-select-input"], {
158
158
  [e["multi-select-input-disabled"]]: _ && I
159
159
  }),
@@ -195,11 +195,11 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
195
195
  )
196
196
  ] }),
197
197
  !_ && /* @__PURE__ */ n(
198
- H,
198
+ J,
199
199
  {
200
200
  as: G,
201
201
  label: x,
202
- size: P(i),
202
+ size: F(i),
203
203
  className: e["multi-select-input"],
204
204
  rightSlotClassName: e["right-slot"],
205
205
  requiredMarkClassName: e["required-mark"],
@@ -214,7 +214,7 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
214
214
  rightAddon: {
215
215
  addonType: "react-node",
216
216
  addonContent: Q && /* @__PURE__ */ n(
217
- W,
217
+ H,
218
218
  {
219
219
  className: l(e.button, {
220
220
  [e.disabled]: r
@@ -323,5 +323,5 @@ import '../../assets/MultiSelectSearch.css';const fe = "_disabled_17kql_5", ke =
323
323
  }
324
324
  );
325
325
  export {
326
- Pe as MultiSelectSearch
326
+ Fe as MultiSelectSearch
327
327
  };
@@ -1,10 +1,10 @@
1
1
  import { jsxs as ee, jsx as L, Fragment as _e } from "react/jsx-runtime";
2
- import { K as V, w as ye, a as oe, z as te, U as ie, b as ke, T as Oe, j as we, u as Pe, I as Ee, G as Te, p as De } from "../../label-y3ANLTNC.js";
3
- import { W, y as z, o as U, H as K, s as se, n as ne, $ as le, b as de, D as ue, a as Ce, u as Ge, c as N } from "../../keyboard-B0lm_zyn.js";
2
+ import { K as V, w as ye, a as oe, z as te, U as ie, b as ke, T as Oe, j as we, u as Pe, I as Ee, G as Te, p as De } from "../../label-D4GFpe5F.js";
3
+ import { W, y as z, o as U, H as K, s as se, n as ne, $ as le, b as de, D as ue, a as Ce, u as Ge, c as N } from "../../keyboard-mgWkd2Vh.js";
4
4
  import E, { createContext as ce, useId as q, useReducer as xe, useRef as B, useMemo as T, useCallback as Fe, useContext as pe, forwardRef as Ne } from "react";
5
5
  import { u as Ae } from "../../use-by-comparator-CVuf9KBq.js";
6
6
  import { r as fe } from "../../bugs-diTMAGNw.js";
7
- import { P as re, F as H, T as ae, _ as Ie } from "../../focus-management-XwV-9qkO.js";
7
+ import { P as re, F as H, T as ae, _ as Ie } from "../../focus-management-DOYCPyGg.js";
8
8
  import { c as M } from "../../index-DIxK0V-G.js";
9
9
  import '../../assets/RadioGroup.css';var Se = ((e) => (e[e.RegisterOption = 0] = "RegisterOption", e[e.UnregisterOption = 1] = "UnregisterOption", e))(Se || {});
10
10
  let Le = { 0(e, r) {
@@ -1,13 +1,13 @@
1
1
  import { jsx as s, jsxs as _, Fragment as z } from "react/jsx-runtime";
2
2
  import { c as i } from "../../index-DIxK0V-G.js";
3
- import { forwardRef as K, useState as D, useMemo as U, useCallback as W, useEffect as R } from "react";
3
+ import { forwardRef as K, useState as D, useMemo as U, useCallback as R, useEffect as $ } from "react";
4
4
  import { ESelectSearchSize as v } from "./constants.js";
5
- import { mapSizeToInputSize as q, getDropdownArrowIcon as $ } from "./utils.js";
6
- import { Icon as A } from "../../icons/Icon.js";
7
- import { Button as J } from "../Button/Button.js";
8
- import { I as O } from "../../Input-BYrIS5GU.js";
9
- import { EInputVariant as Q } from "../Input/constants.js";
10
- import { H as X, U as B, G as M, K as Y, W as Z } from "../../combobox-CDU06zJj.js";
5
+ import { mapSizeToInputSize as j, getDropdownArrowIcon as J } from "./utils.js";
6
+ import { Icon as q } from "../../icons/Icon.js";
7
+ import { Button as Q } from "../Button/Button.js";
8
+ import { I as A } from "../../Input-BYrIS5GU.js";
9
+ import { EInputVariant as W } from "../Input/constants.js";
10
+ import { H as X, U as O, G as B, K as Y, j as Z } from "../../combobox-BpYucpxz.js";
11
11
  import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_container_rphak_9", oe = "_full_rphak_22", ae = "_button_rphak_34", ne = "_options_rphak_48", se = "_top_rphak_59", re = "_bottom_rphak_64", ie = "_m_rphak_91", le = "_l_rphak_106", ce = "_option_rphak_48", pe = "_clear_rphak_160", e = {
12
12
  "select-search": "_select-search_rphak_2",
13
13
  disabled: ee,
@@ -34,7 +34,7 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
34
34
  clear: pe,
35
35
  "icon-button": "_icon-button_rphak_169"
36
36
  }, ge = K(
37
- (j, E) => {
37
+ (M, E) => {
38
38
  const {
39
39
  placeholder: g,
40
40
  size: r = v.L,
@@ -47,18 +47,18 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
47
47
  displayValue: G = "name",
48
48
  filterOnSearch: w = !0,
49
49
  onSearch: m,
50
- variant: C = Q.DefaultGray,
50
+ variant: C = W.DefaultGray,
51
51
  menuPlacement: b = "bottom",
52
52
  disabled: l = !1,
53
53
  searchProps: I,
54
54
  withClearButton: f = !1,
55
55
  disableInput: c = !1,
56
56
  autocomplete: S = "on"
57
- } = j, k = String((a == null ? void 0 : a[G]) || ""), [p, u] = D(k), [N, h] = D(a), y = U(() => !w || a && (a.id || a.name) ? d : p.trim().toLowerCase() ? d.filter(
57
+ } = M, k = String((a == null ? void 0 : a[G]) || ""), [p, u] = D(k), [N, h] = D(a), y = U(() => !w || a && (a.id || a.name) ? d : p.trim().toLowerCase() ? d.filter(
58
58
  (o) => o.name.toLowerCase().includes(p.toLowerCase())
59
59
  ) : d, [p, d, a, w]), P = (o) => {
60
60
  o ? (u(o.name), h(o), n == null || n(o)) : (u(""), h(null), n == null || n({ id: "", name: "" }));
61
- }, x = W(
61
+ }, x = R(
62
62
  (o) => {
63
63
  if (c) return;
64
64
  const t = o.target.value;
@@ -68,7 +68,7 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
68
68
  ), T = () => {
69
69
  u(""), h(null), n == null || n({ id: "", name: "" });
70
70
  };
71
- return R(() => {
71
+ return $(() => {
72
72
  const o = !a || typeof a == "object" && !Object.keys(a).length;
73
73
  u(o ? "" : k), h(o ? null : a);
74
74
  }, [a, k]), /* @__PURE__ */ s(
@@ -93,12 +93,12 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
93
93
  }),
94
94
  children: [
95
95
  c && /* @__PURE__ */ _("div", { style: { position: "relative", width: "100%" }, children: [
96
- /* @__PURE__ */ s(B, { disabled: l, style: { width: "100%" }, children: /* @__PURE__ */ s(
97
- M,
96
+ /* @__PURE__ */ s(O, { disabled: l, style: { width: "100%" }, children: /* @__PURE__ */ s(
97
+ B,
98
98
  {
99
- as: O,
99
+ as: A,
100
100
  label: g,
101
- size: q(r),
101
+ size: j(r),
102
102
  className: i(e["select-input"], {
103
103
  [e["select-input-disabled"]]: c && f
104
104
  }),
@@ -114,14 +114,14 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
114
114
  },
115
115
  rightAddon: {
116
116
  addonType: "icon",
117
- addonContent: $(o, r)
117
+ addonContent: J(o, r)
118
118
  },
119
119
  autocomplete: S,
120
120
  ...I
121
121
  }
122
122
  ) }),
123
123
  f && p && /* @__PURE__ */ s(
124
- J,
124
+ Q,
125
125
  {
126
126
  tabIndex: -1,
127
127
  className: i(e.clear, {
@@ -142,11 +142,11 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
142
142
  )
143
143
  ] }),
144
144
  !c && /* @__PURE__ */ s(
145
- M,
145
+ B,
146
146
  {
147
- as: O,
147
+ as: A,
148
148
  label: g,
149
- size: q(r),
149
+ size: j(r),
150
150
  className: e["select-input"],
151
151
  onChange: x,
152
152
  value: p,
@@ -159,14 +159,14 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
159
159
  rightAddon: {
160
160
  addonType: "react-node",
161
161
  addonContent: V && /* @__PURE__ */ s(
162
- B,
162
+ O,
163
163
  {
164
164
  className: i(e.button, {
165
165
  [e.disabled]: l
166
166
  }),
167
167
  disabled: l,
168
168
  children: /* @__PURE__ */ s(
169
- A,
169
+ q,
170
170
  {
171
171
  iconName: r == v.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
172
172
  className: i(e["selector-icon"], {
@@ -215,7 +215,7 @@ import '../../assets/SelectSearch.css';const ee = "_disabled_rphak_5", te = "_co
215
215
  t.bottom && /* @__PURE__ */ s("div", { children: t.bottom })
216
216
  ] }),
217
217
  N && N.id === t.id && /* @__PURE__ */ s(
218
- A,
218
+ q,
219
219
  {
220
220
  iconName: r === v.M ? "Done16px" : "Done24px",
221
221
  className: e["selected-icon"]
@@ -1,9 +1,9 @@
1
1
  import { jsxs as L, jsx as N } from "react/jsx-runtime";
2
- import { H as te } from "../../field-FJ34aSs4.js";
3
- import { K as I, w as re, z as se, U as ae, u as ce, a as le, b as oe, T as ie, I as ne, G as ue, j as he, p as me } from "../../label-y3ANLTNC.js";
4
- import { W as de, H as j, y as pe, p as fe, o as $, $ as be, b as we, D as _e, c as H } from "../../keyboard-B0lm_zyn.js";
2
+ import { H as te } from "../../field-C1kt7aNM.js";
3
+ import { K as I, w as re, z as se, U as ae, u as ce, a as le, b as oe, T as ie, I as ne, G as ue, j as he, p as me } from "../../label-D4GFpe5F.js";
4
+ import { W as de, H as j, y as pe, p as fe, o as $, $ as be, b as we, D as _e, c as H } from "../../keyboard-mgWkd2Vh.js";
5
5
  import u, { createContext as $e, useState as x, useMemo as G, useId as ge, useContext as ve, useRef as ke, useCallback as xe, Fragment as ye, forwardRef as Pe } from "react";
6
- import { w as Ce } from "../../use-active-press-86hajhdd.js";
6
+ import { w as Ce } from "../../use-active-press-CqLGIFz7.js";
7
7
  import { e as De } from "../../use-resolve-button-type-DhFdPxnv.js";
8
8
  import { r as Fe } from "../../bugs-diTMAGNw.js";
9
9
  import { c as g } from "../../index-DIxK0V-G.js";
@@ -5,11 +5,11 @@ import N, { useRef as U, useState as Q, createContext as oe, useReducer as ke, u
5
5
  import { ETabTrailSize as Ae } from "./constants.js";
6
6
  import { TabButtons as Se } from "./TabButtons/TabButtons.js";
7
7
  import { NotificationBadge as Fe } from "../NotificationBadge/NotificationBadge.js";
8
- import { n as W, M as se, W as q, s as H, y as z, o as E, H as V, $ as ce, b as De, D as de, a as B, u as Ne, c as h, t as Re } from "../../keyboard-B0lm_zyn.js";
9
- import { w as Me } from "../../use-active-press-86hajhdd.js";
8
+ import { n as W, M as se, W as q, s as H, y as z, o as E, H as V, $ as ce, b as De, D as de, a as B, u as Ne, c as h, t as Re } from "../../keyboard-mgWkd2Vh.js";
9
+ import { w as Me } from "../../use-active-press-CqLGIFz7.js";
10
10
  import { e as Ce } from "../../use-resolve-button-type-DhFdPxnv.js";
11
- import { T as pe, s as Le } from "../../hidden-DbgtYPOH.js";
12
- import { _ as G, T as J, P as D, F as T } from "../../focus-management-XwV-9qkO.js";
11
+ import { T as pe, s as Le } from "../../hidden-PvGXrYUY.js";
12
+ import { _ as G, T as J, P as D, F as T } from "../../focus-management-DOYCPyGg.js";
13
13
  import '../../assets/TabTrail.css';function Oe() {
14
14
  let e = U(!1);
15
15
  return W(() => (e.current = !0, () => {
@@ -1,3 +1,4 @@
1
+ import { EFileItemVariant } from '../ListFiles';
1
2
  import { TFilesDetail } from '../ListFiles/ListFiles';
2
3
  import { TPhotosDetail } from '../ListPhotos/ListPhotos';
3
4
 
@@ -5,4 +6,5 @@ export declare const UniversalUploader: import('react').ForwardRefExoticComponen
5
6
  type: "files" | "photos" | "all";
6
7
  onChange: (j: import('./types').TOnChangeUpdate) => void;
7
8
  value?: TFilesDetail[] | TPhotosDetail[];
9
+ variantListFiles?: EFileItemVariant | `${EFileItemVariant}`;
8
10
  } & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,38 +1,40 @@
1
- import { jsxs as h, jsx as p, Fragment as V } from "react/jsx-runtime";
2
- import { c as j } from "../../index-DIxK0V-G.js";
3
- import { forwardRef as B, useState as D, useEffect as T, useMemo as _ } from "react";
1
+ import { jsxs as h, jsx as p, Fragment as j } from "react/jsx-runtime";
2
+ import { c as B } from "../../index-DIxK0V-G.js";
3
+ import { forwardRef as D, useState as E, useEffect as T, useMemo as _ } from "react";
4
4
  import { imageTypes as y } from "./constants.js";
5
5
  import "../Button/Button.js";
6
6
  import { EButtonVariantDefault as C } from "../Button/constants.js";
7
- import { ListFiles as E } from "../ListFiles/ListFiles.js";
8
- import { ListPhotos as M } from "../ListPhotos/ListPhotos.js";
9
- import { Uploader as O } from "../Uploader/Uploader.js";
10
- import '../../assets/UploaderPhotos.css';const g = {
7
+ import { ListFiles as M } from "../ListFiles/ListFiles.js";
8
+ import { EFileItemVariant as O } from "../ListFiles/constants.js";
9
+ import { ListPhotos as P } from "../ListPhotos/ListPhotos.js";
10
+ import { Uploader as A } from "../Uploader/Uploader.js";
11
+ import '../../assets/UploaderPhotos.css';const v = {
11
12
  "upload-file-wrapper": "_upload-file-wrapper_1a115_2"
12
- }, f = (i) => "file" in i && i.file instanceof File ? y.includes(i.file.type) : "type" in i && typeof i.type == "string" ? y.includes(i.type) : !1, W = B(
13
- (i, v) => {
13
+ }, f = (i) => "file" in i && i.file instanceof File ? y.includes(i.file.type) : "type" in i && typeof i.type == "string" ? y.includes(i.type) : !1, Z = D(
14
+ (i, F) => {
14
15
  const {
15
- type: s,
16
- filesType: x,
17
- arrayName: F,
18
- maxSize: U,
19
- onChange: a,
20
- value: r,
21
- maxFiles: u,
22
- titleUploader: b,
23
- buttonText: w = "Выберите файлы",
24
- showOnlyUploadButton: d = !1,
16
+ type: a,
17
+ filesType: g,
18
+ arrayName: w,
19
+ maxSize: x,
20
+ onChange: s,
21
+ value: o,
22
+ maxFiles: m,
23
+ titleUploader: U,
24
+ buttonText: b = "Выберите файлы",
25
+ showOnlyUploadButton: u = !1,
25
26
  uploadButtonVariant: z = C.SecondaryAsphalt,
26
27
  buttonSize: I = "m",
27
- buttonClassName: L
28
- } = i, [l, n] = D(
29
- r || []
30
- ), m = l.length >= u;
28
+ buttonClassName: L,
29
+ variantListFiles: V = O.white
30
+ } = i, [l, n] = E(
31
+ o || []
32
+ ), d = l.length >= m;
31
33
  T(() => {
32
- r && n(r);
33
- }, [r]);
34
+ o && n(o);
35
+ }, [o]);
34
36
  const N = (t) => {
35
- const o = t.value.map((e) => f(e.file) ? {
37
+ const r = t.value.map((e) => f(e.file) ? {
36
38
  id: e.id,
37
39
  url: URL.createObjectURL(e.file),
38
40
  type: e.file.type,
@@ -45,50 +47,51 @@ import '../../assets/UploaderPhotos.css';const g = {
45
47
  name: e.file.name,
46
48
  type: e.file.type
47
49
  });
48
- n((e) => [...e, ...o]), a == null || a({ type: "add", data: t.value });
50
+ n((e) => [...e, ...r]), s == null || s({ type: "add", data: t.value });
49
51
  }, c = (t) => {
50
- n((o) => o.filter((e) => e.id !== t)), a == null || a({ type: "delete", data: t });
52
+ n((r) => r.filter((e) => e.id !== t)), s == null || s({ type: "delete", data: t });
51
53
  }, { photos: R, files: S } = _(() => {
52
- const t = () => l.filter((e) => !f(e)), o = () => l.filter(f);
53
- return s === "all" ? { files: t(), photos: o() } : s === "files" ? { photos: [], files: t() } : s === "photos" ? { files: [], photos: o() } : { files: [], photos: [] };
54
- }, [l, s]);
54
+ const t = () => l.filter((e) => !f(e)), r = () => l.filter(f);
55
+ return a === "all" ? { files: t(), photos: r() } : a === "files" ? { photos: [], files: t() } : a === "photos" ? { files: [], photos: r() } : { files: [], photos: [] };
56
+ }, [l, a]);
55
57
  return /* @__PURE__ */ h(
56
58
  "div",
57
59
  {
58
60
  "data-testid": "universal-uploader",
59
- className: j(
60
- g["upload-file-wrapper"],
61
- m && g.disabled
61
+ className: B(
62
+ v["upload-file-wrapper"],
63
+ d && v.disabled
62
64
  ),
63
65
  children: [
64
66
  /* @__PURE__ */ p(
65
- O,
67
+ A,
66
68
  {
67
- filesType: x,
68
- arrayName: F,
69
- maxSize: U,
69
+ filesType: g,
70
+ arrayName: w,
71
+ maxSize: x,
70
72
  onChangeValue: N,
71
- ref: v,
72
- maxFiles: u,
73
- isDisabled: m,
74
- titleUploader: b,
75
- showOnlyUploadButton: d,
76
- buttonText: w,
73
+ ref: F,
74
+ maxFiles: m,
75
+ isDisabled: d,
76
+ titleUploader: U,
77
+ showOnlyUploadButton: u,
78
+ buttonText: b,
77
79
  uploadButtonVariant: z,
78
80
  buttonSize: I,
79
81
  buttonClassName: L
80
82
  }
81
83
  ),
82
- !d && /* @__PURE__ */ h(V, { children: [
83
- (s === "files" || s === "all") && /* @__PURE__ */ p(
84
- E,
84
+ !u && /* @__PURE__ */ h(j, { children: [
85
+ (a === "files" || a === "all") && /* @__PURE__ */ p(
86
+ M,
85
87
  {
86
88
  value: S,
87
- onChange: (t) => c(t.deleteId)
89
+ onChange: (t) => c(t.deleteId),
90
+ variant: V
88
91
  }
89
92
  ),
90
- (s === "photos" || s === "all") && /* @__PURE__ */ p(
91
- M,
93
+ (a === "photos" || a === "all") && /* @__PURE__ */ p(
94
+ P,
92
95
  {
93
96
  value: R,
94
97
  onChange: (t) => c(t.deleteId)
@@ -101,5 +104,5 @@ import '../../assets/UploaderPhotos.css';const g = {
101
104
  }
102
105
  );
103
106
  export {
104
- W as UniversalUploader
107
+ Z as UniversalUploader
105
108
  };
@@ -1,3 +1,4 @@
1
+ import { EFileItemVariant } from '../ListFiles';
1
2
  import { TFilesDetail } from '../ListFiles/ListFiles';
2
3
  import { TPhotosDetail } from '../ListPhotos/ListPhotos';
3
4
  import { TFileItem, TUploader } from '../Uploader';
@@ -6,6 +7,7 @@ export type TUniversalUploader = Omit<TUploader, 'onChangeValue'> & {
6
7
  type: 'files' | 'photos' | 'all';
7
8
  onChange: (j: TOnChangeUpdate) => void;
8
9
  value?: TFilesDetail[] | TPhotosDetail[];
10
+ variantListFiles?: EFileItemVariant | `${EFileItemVariant}`;
9
11
  };
10
12
  export type TOnChangeUpdate = {
11
13
  type: string;
@@ -1,6 +1,6 @@
1
1
  import l, { useId as u, useMemo as f } from "react";
2
- import { z as p, U as h, a as v, l as E, f as b, W as $ } from "./label-y3ANLTNC.js";
3
- import { W as H, H as W } from "./keyboard-B0lm_zyn.js";
2
+ import { z as p, U as h, a as v, l as E, f as b, W as $ } from "./label-D4GFpe5F.js";
3
+ import { W as H, H as W } from "./keyboard-mgWkd2Vh.js";
4
4
  let P = "div";
5
5
  function _(a, i) {
6
6
  let d = `headlessui-control-${u()}`, [o, n] = p(), [m, s] = h(), c = v(), { disabled: e = c || !1, ...t } = a, r = f(() => ({ disabled: e }), [e]);