@emporix/cockpit-component-library 0.0.2 → 0.0.4

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/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
- import q, { useState as ae, useRef as ee, useMemo as Ie, useEffect as se, useId as Te } from "react";
2
- var _e = { exports: {} }, le = {};
1
+ import q, { useState as oe, useRef as ee, useMemo as Ie, useEffect as ie, useId as Ce } from "react";
2
+ var ve = { exports: {} }, le = {};
3
3
  /**
4
4
  * @license React
5
5
  * react-jsx-runtime.production.js
@@ -9,29 +9,29 @@ var _e = { exports: {} }, le = {};
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var je;
12
+ var ke;
13
13
  function De() {
14
- if (je) return le;
15
- je = 1;
14
+ if (ke) return le;
15
+ ke = 1;
16
16
  var t = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
17
- function n(a, l, i) {
18
- var u = null;
19
- if (i !== void 0 && (u = "" + i), l.key !== void 0 && (u = "" + l.key), "key" in l) {
20
- i = {};
21
- for (var b in l)
22
- b !== "key" && (i[b] = l[b]);
23
- } else i = l;
24
- return l = i.ref, {
17
+ function n(s, i, c) {
18
+ var d = null;
19
+ if (c !== void 0 && (d = "" + c), i.key !== void 0 && (d = "" + i.key), "key" in i) {
20
+ c = {};
21
+ for (var m in i)
22
+ m !== "key" && (c[m] = i[m]);
23
+ } else c = i;
24
+ return i = c.ref, {
25
25
  $$typeof: t,
26
- type: a,
27
- key: u,
28
- ref: l !== void 0 ? l : null,
29
- props: i
26
+ type: s,
27
+ key: d,
28
+ ref: i !== void 0 ? i : null,
29
+ props: c
30
30
  };
31
31
  }
32
32
  return le.Fragment = r, le.jsx = n, le.jsxs = n, le;
33
33
  }
34
- var ie = {};
34
+ var ce = {};
35
35
  /**
36
36
  * @license React
37
37
  * react-jsx-runtime.development.js
@@ -41,47 +41,47 @@ var ie = {};
41
41
  * This source code is licensed under the MIT license found in the
42
42
  * LICENSE file in the root directory of this source tree.
43
43
  */
44
- var ke;
45
- function $e() {
46
- return ke || (ke = 1, process.env.NODE_ENV !== "production" && (function() {
44
+ var Oe;
45
+ function Le() {
46
+ return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && (function() {
47
47
  function t(e) {
48
48
  if (e == null) return null;
49
49
  if (typeof e == "function")
50
- return e.$$typeof === Z ? null : e.displayName || e.name || null;
50
+ return e.$$typeof === K ? null : e.displayName || e.name || null;
51
51
  if (typeof e == "string") return e;
52
52
  switch (e) {
53
- case y:
53
+ case h:
54
54
  return "Fragment";
55
55
  case j:
56
56
  return "Profiler";
57
- case E:
57
+ case R:
58
58
  return "StrictMode";
59
- case L:
59
+ case $:
60
60
  return "Suspense";
61
- case P:
61
+ case S:
62
62
  return "SuspenseList";
63
- case ue:
63
+ case de:
64
64
  return "Activity";
65
65
  }
66
66
  if (typeof e == "object")
67
67
  switch (typeof e.tag == "number" && console.error(
68
68
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
69
69
  ), e.$$typeof) {
70
- case g:
70
+ case b:
71
71
  return "Portal";
72
- case R:
72
+ case E:
73
73
  return e.displayName || "Context";
74
- case C:
74
+ case N:
75
75
  return (e._context.displayName || "Context") + ".Consumer";
76
- case _:
77
- var s = e.render;
78
- return e = e.displayName, e || (e = s.displayName || s.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
79
- case ce:
80
- return s = e.displayName || null, s !== null ? s : t(e.type) || "Memo";
76
+ case p:
77
+ var l = e.render;
78
+ return e = e.displayName, e || (e = l.displayName || l.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
79
+ case fe:
80
+ return l = e.displayName || null, l !== null ? l : t(e.type) || "Memo";
81
81
  case V:
82
- s = e._payload, e = e._init;
82
+ l = e._payload, e = e._init;
83
83
  try {
84
- return t(e(s));
84
+ return t(e(l));
85
85
  } catch {
86
86
  }
87
87
  }
@@ -93,74 +93,74 @@ function $e() {
93
93
  function n(e) {
94
94
  try {
95
95
  r(e);
96
- var s = !1;
96
+ var l = !1;
97
97
  } catch {
98
- s = !0;
98
+ l = !0;
99
99
  }
100
- if (s) {
101
- s = console;
102
- var m = s.error, x = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
103
- return m.call(
104
- s,
100
+ if (l) {
101
+ l = console;
102
+ var v = l.error, g = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
103
+ return v.call(
104
+ l,
105
105
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
106
- x
106
+ g
107
107
  ), r(e);
108
108
  }
109
109
  }
110
- function a(e) {
111
- if (e === y) return "<>";
110
+ function s(e) {
111
+ if (e === h) return "<>";
112
112
  if (typeof e == "object" && e !== null && e.$$typeof === V)
113
113
  return "<...>";
114
114
  try {
115
- var s = t(e);
116
- return s ? "<" + s + ">" : "<...>";
115
+ var l = t(e);
116
+ return l ? "<" + l + ">" : "<...>";
117
117
  } catch {
118
118
  return "<...>";
119
119
  }
120
120
  }
121
- function l() {
121
+ function i() {
122
122
  var e = B.A;
123
123
  return e === null ? null : e.getOwner();
124
124
  }
125
- function i() {
125
+ function c() {
126
126
  return Error("react-stack-top-frame");
127
127
  }
128
- function u(e) {
128
+ function d(e) {
129
129
  if (M.call(e, "key")) {
130
- var s = Object.getOwnPropertyDescriptor(e, "key").get;
131
- if (s && s.isReactWarning) return !1;
130
+ var l = Object.getOwnPropertyDescriptor(e, "key").get;
131
+ if (l && l.isReactWarning) return !1;
132
132
  }
133
133
  return e.key !== void 0;
134
134
  }
135
- function b(e, s) {
136
- function m() {
137
- fe || (fe = !0, console.error(
135
+ function m(e, l) {
136
+ function v() {
137
+ _e || (_e = !0, console.error(
138
138
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
139
- s
139
+ l
140
140
  ));
141
141
  }
142
- m.isReactWarning = !0, Object.defineProperty(e, "key", {
143
- get: m,
142
+ v.isReactWarning = !0, Object.defineProperty(e, "key", {
143
+ get: v,
144
144
  configurable: !0
145
145
  });
146
146
  }
147
- function f() {
147
+ function u() {
148
148
  var e = t(this.type);
149
- return re[e] || (re[e] = !0, console.error(
149
+ return ne[e] || (ne[e] = !0, console.error(
150
150
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
151
151
  )), e = this.props.ref, e !== void 0 ? e : null;
152
152
  }
153
- function p(e, s, m, x, F, X) {
154
- var k = m.ref;
153
+ function f(e, l, v, g, F, Q) {
154
+ var k = v.ref;
155
155
  return e = {
156
- $$typeof: $,
156
+ $$typeof: L,
157
157
  type: e,
158
- key: s,
159
- props: m,
160
- _owner: x
158
+ key: l,
159
+ props: v,
160
+ _owner: g
161
161
  }, (k !== void 0 ? k : null) !== null ? Object.defineProperty(e, "ref", {
162
162
  enumerable: !1,
163
- get: f
163
+ get: u
164
164
  }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
165
165
  configurable: !1,
166
166
  enumerable: !1,
@@ -180,576 +180,594 @@ function $e() {
180
180
  configurable: !1,
181
181
  enumerable: !1,
182
182
  writable: !0,
183
- value: X
183
+ value: Q
184
184
  }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
185
185
  }
186
- function O(e, s, m, x, F, X) {
187
- var k = s.children;
186
+ function w(e, l, v, g, F, Q) {
187
+ var k = l.children;
188
188
  if (k !== void 0)
189
- if (x)
189
+ if (g)
190
190
  if (I(k)) {
191
- for (x = 0; x < k.length; x++)
192
- N(k[x]);
191
+ for (g = 0; g < k.length; g++)
192
+ T(k[g]);
193
193
  Object.freeze && Object.freeze(k);
194
194
  } else
195
195
  console.error(
196
196
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
197
  );
198
- else N(k);
199
- if (M.call(s, "key")) {
198
+ else T(k);
199
+ if (M.call(l, "key")) {
200
200
  k = t(e);
201
- var W = Object.keys(s).filter(function(ye) {
202
- return ye !== "key";
201
+ var W = Object.keys(l).filter(function(ge) {
202
+ return ge !== "key";
203
203
  });
204
- x = 0 < W.length ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}", K[k + x] || (W = 0 < W.length ? "{" + W.join(": ..., ") + ": ...}" : "{}", console.error(
204
+ g = 0 < W.length ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}", X[k + g] || (W = 0 < W.length ? "{" + W.join(": ..., ") + ": ...}" : "{}", console.error(
205
205
  `A props object containing a "key" prop is being spread into JSX:
206
206
  let props = %s;
207
207
  <%s {...props} />
208
208
  React keys must be passed directly to JSX without using spread:
209
209
  let props = %s;
210
210
  <%s key={someKey} {...props} />`,
211
- x,
211
+ g,
212
212
  k,
213
213
  W,
214
214
  k
215
- ), K[k + x] = !0);
215
+ ), X[k + g] = !0);
216
216
  }
217
- if (k = null, m !== void 0 && (n(m), k = "" + m), u(s) && (n(s.key), k = "" + s.key), "key" in s) {
218
- m = {};
219
- for (var oe in s)
220
- oe !== "key" && (m[oe] = s[oe]);
221
- } else m = s;
222
- return k && b(
223
- m,
217
+ if (k = null, v !== void 0 && (n(v), k = "" + v), d(l) && (n(l.key), k = "" + l.key), "key" in l) {
218
+ v = {};
219
+ for (var ae in l)
220
+ ae !== "key" && (v[ae] = l[ae]);
221
+ } else v = l;
222
+ return k && m(
223
+ v,
224
224
  typeof e == "function" ? e.displayName || e.name || "Unknown" : e
225
- ), p(
225
+ ), f(
226
226
  e,
227
227
  k,
228
- m,
229
- l(),
228
+ v,
229
+ i(),
230
230
  F,
231
- X
231
+ Q
232
232
  );
233
233
  }
234
- function N(e) {
235
- S(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === V && (e._payload.status === "fulfilled" ? S(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
234
+ function T(e) {
235
+ P(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === V && (e._payload.status === "fulfilled" ? P(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
236
236
  }
237
- function S(e) {
238
- return typeof e == "object" && e !== null && e.$$typeof === $;
237
+ function P(e) {
238
+ return typeof e == "object" && e !== null && e.$$typeof === L;
239
239
  }
240
- var T = q, $ = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), j = Symbol.for("react.profiler"), C = Symbol.for("react.consumer"), R = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), L = Symbol.for("react.suspense"), P = Symbol.for("react.suspense_list"), ce = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), ue = Symbol.for("react.activity"), Z = Symbol.for("react.client.reference"), B = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, I = Array.isArray, H = console.createTask ? console.createTask : function() {
240
+ var C = q, L = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), j = Symbol.for("react.profiler"), N = Symbol.for("react.consumer"), E = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), $ = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), fe = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), de = Symbol.for("react.activity"), K = Symbol.for("react.client.reference"), B = C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, M = Object.prototype.hasOwnProperty, I = Array.isArray, H = console.createTask ? console.createTask : function() {
241
241
  return null;
242
242
  };
243
- T = {
243
+ C = {
244
244
  react_stack_bottom_frame: function(e) {
245
245
  return e();
246
246
  }
247
247
  };
248
- var fe, re = {}, de = T.react_stack_bottom_frame.bind(
249
- T,
250
- i
251
- )(), ne = H(a(i)), K = {};
252
- ie.Fragment = y, ie.jsx = function(e, s, m) {
253
- var x = 1e4 > B.recentlyCreatedOwnerStacks++;
254
- return O(
248
+ var _e, ne = {}, pe = C.react_stack_bottom_frame.bind(
249
+ C,
250
+ c
251
+ )(), se = H(s(c)), X = {};
252
+ ce.Fragment = h, ce.jsx = function(e, l, v) {
253
+ var g = 1e4 > B.recentlyCreatedOwnerStacks++;
254
+ return w(
255
255
  e,
256
- s,
257
- m,
256
+ l,
257
+ v,
258
258
  !1,
259
- x ? Error("react-stack-top-frame") : de,
260
- x ? H(a(e)) : ne
259
+ g ? Error("react-stack-top-frame") : pe,
260
+ g ? H(s(e)) : se
261
261
  );
262
- }, ie.jsxs = function(e, s, m) {
263
- var x = 1e4 > B.recentlyCreatedOwnerStacks++;
264
- return O(
262
+ }, ce.jsxs = function(e, l, v) {
263
+ var g = 1e4 > B.recentlyCreatedOwnerStacks++;
264
+ return w(
265
265
  e,
266
- s,
267
- m,
266
+ l,
267
+ v,
268
268
  !0,
269
- x ? Error("react-stack-top-frame") : de,
270
- x ? H(a(e)) : ne
269
+ g ? Error("react-stack-top-frame") : pe,
270
+ g ? H(s(e)) : se
271
271
  );
272
272
  };
273
- })()), ie;
273
+ })()), ce;
274
274
  }
275
275
  var we;
276
- function Le() {
277
- return we || (we = 1, process.env.NODE_ENV === "production" ? _e.exports = De() : _e.exports = $e()), _e.exports;
276
+ function $e() {
277
+ return we || (we = 1, process.env.NODE_ENV === "production" ? ve.exports = De() : ve.exports = Le()), ve.exports;
278
278
  }
279
- var c = Le();
280
- const Fe = "_primaryButton_uyzzr_1", We = "_primaryButtonDisabled_uyzzr_34", ze = "_spinner_uyzzr_42", xe = {
279
+ var o = $e();
280
+ const Fe = "_primaryButton_3izpp_1", We = "_primaryButtonDisabled_3izpp_37", ze = "_spinner_3izpp_52", Ye = "_iconLeft_3izpp_56", qe = "_iconRight_3izpp_62", Ve = "_iconOnly_3izpp_68", te = {
281
281
  primaryButton: Fe,
282
282
  primaryButtonDisabled: We,
283
- spinner: ze
283
+ spinner: ze,
284
+ iconLeft: Ye,
285
+ iconRight: qe,
286
+ iconOnly: Ve
284
287
  };
285
- var Pe = {
288
+ var Se = {
286
289
  color: void 0,
287
290
  size: void 0,
288
291
  className: void 0,
289
292
  style: void 0,
290
293
  attr: void 0
291
- }, Oe = q.createContext && /* @__PURE__ */ q.createContext(Pe), Ye = ["attr", "size", "title"];
292
- function qe(t, r) {
294
+ }, Re = q.createContext && /* @__PURE__ */ q.createContext(Se), Me = ["attr", "size", "title"];
295
+ function He(t, r) {
293
296
  if (t == null) return {};
294
- var n, a, l = Ve(t, r);
297
+ var n, s, i = Ue(t, r);
295
298
  if (Object.getOwnPropertySymbols) {
296
- var i = Object.getOwnPropertySymbols(t);
297
- for (a = 0; a < i.length; a++) n = i[a], r.indexOf(n) === -1 && {}.propertyIsEnumerable.call(t, n) && (l[n] = t[n]);
299
+ var c = Object.getOwnPropertySymbols(t);
300
+ for (s = 0; s < c.length; s++) n = c[s], r.indexOf(n) === -1 && {}.propertyIsEnumerable.call(t, n) && (i[n] = t[n]);
298
301
  }
299
- return l;
302
+ return i;
300
303
  }
301
- function Ve(t, r) {
304
+ function Ue(t, r) {
302
305
  if (t == null) return {};
303
306
  var n = {};
304
- for (var a in t) if ({}.hasOwnProperty.call(t, a)) {
305
- if (r.indexOf(a) !== -1) continue;
306
- n[a] = t[a];
307
+ for (var s in t) if ({}.hasOwnProperty.call(t, s)) {
308
+ if (r.indexOf(s) !== -1) continue;
309
+ n[s] = t[s];
307
310
  }
308
311
  return n;
309
312
  }
310
- function me() {
311
- return me = Object.assign ? Object.assign.bind() : function(t) {
313
+ function ye() {
314
+ return ye = Object.assign ? Object.assign.bind() : function(t) {
312
315
  for (var r = 1; r < arguments.length; r++) {
313
316
  var n = arguments[r];
314
- for (var a in n) ({}).hasOwnProperty.call(n, a) && (t[a] = n[a]);
317
+ for (var s in n) ({}).hasOwnProperty.call(n, s) && (t[s] = n[s]);
315
318
  }
316
319
  return t;
317
- }, me.apply(null, arguments);
320
+ }, ye.apply(null, arguments);
318
321
  }
319
322
  function Ee(t, r) {
320
323
  var n = Object.keys(t);
321
324
  if (Object.getOwnPropertySymbols) {
322
- var a = Object.getOwnPropertySymbols(t);
323
- r && (a = a.filter(function(l) {
324
- return Object.getOwnPropertyDescriptor(t, l).enumerable;
325
- })), n.push.apply(n, a);
325
+ var s = Object.getOwnPropertySymbols(t);
326
+ r && (s = s.filter(function(i) {
327
+ return Object.getOwnPropertyDescriptor(t, i).enumerable;
328
+ })), n.push.apply(n, s);
326
329
  }
327
330
  return n;
328
331
  }
329
- function ve(t) {
332
+ function he(t) {
330
333
  for (var r = 1; r < arguments.length; r++) {
331
334
  var n = arguments[r] != null ? arguments[r] : {};
332
- r % 2 ? Ee(Object(n), !0).forEach(function(a) {
333
- Me(t, a, n[a]);
334
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Ee(Object(n)).forEach(function(a) {
335
- Object.defineProperty(t, a, Object.getOwnPropertyDescriptor(n, a));
335
+ r % 2 ? Ee(Object(n), !0).forEach(function(s) {
336
+ Je(t, s, n[s]);
337
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Ee(Object(n)).forEach(function(s) {
338
+ Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(n, s));
336
339
  });
337
340
  }
338
341
  return t;
339
342
  }
340
- function Me(t, r, n) {
341
- return (r = He(r)) in t ? Object.defineProperty(t, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[r] = n, t;
343
+ function Je(t, r, n) {
344
+ return (r = Ge(r)) in t ? Object.defineProperty(t, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[r] = n, t;
342
345
  }
343
- function He(t) {
344
- var r = Ue(t, "string");
346
+ function Ge(t) {
347
+ var r = Ke(t, "string");
345
348
  return typeof r == "symbol" ? r : r + "";
346
349
  }
347
- function Ue(t, r) {
350
+ function Ke(t, r) {
348
351
  if (typeof t != "object" || !t) return t;
349
352
  var n = t[Symbol.toPrimitive];
350
353
  if (n !== void 0) {
351
- var a = n.call(t, r);
352
- if (typeof a != "object") return a;
354
+ var s = n.call(t, r);
355
+ if (typeof s != "object") return s;
353
356
  throw new TypeError("@@toPrimitive must return a primitive value.");
354
357
  }
355
358
  return (r === "string" ? String : Number)(t);
356
359
  }
357
- function Se(t) {
358
- return t && t.map((r, n) => /* @__PURE__ */ q.createElement(r.tag, ve({
360
+ function Pe(t) {
361
+ return t && t.map((r, n) => /* @__PURE__ */ q.createElement(r.tag, he({
359
362
  key: n
360
- }, r.attr), Se(r.child)));
363
+ }, r.attr), Pe(r.child)));
361
364
  }
362
365
  function be(t) {
363
- return (r) => /* @__PURE__ */ q.createElement(Je, me({
364
- attr: ve({}, t.attr)
365
- }, r), Se(t.child));
366
+ return (r) => /* @__PURE__ */ q.createElement(Xe, ye({
367
+ attr: he({}, t.attr)
368
+ }, r), Pe(t.child));
366
369
  }
367
- function Je(t) {
370
+ function Xe(t) {
368
371
  var r = (n) => {
369
372
  var {
370
- attr: a,
371
- size: l,
372
- title: i
373
- } = t, u = qe(t, Ye), b = l || n.size || "1em", f;
374
- return n.className && (f = n.className), t.className && (f = (f ? f + " " : "") + t.className), /* @__PURE__ */ q.createElement("svg", me({
373
+ attr: s,
374
+ size: i,
375
+ title: c
376
+ } = t, d = He(t, Me), m = i || n.size || "1em", u;
377
+ return n.className && (u = n.className), t.className && (u = (u ? u + " " : "") + t.className), /* @__PURE__ */ q.createElement("svg", ye({
375
378
  stroke: "currentColor",
376
379
  fill: "currentColor",
377
380
  strokeWidth: "0"
378
- }, n.attr, a, u, {
379
- className: f,
380
- style: ve(ve({
381
+ }, n.attr, s, d, {
382
+ className: u,
383
+ style: he(he({
381
384
  color: t.color || n.color
382
385
  }, n.style), t.style),
383
- height: b,
384
- width: b,
386
+ height: m,
387
+ width: m,
385
388
  xmlns: "http://www.w3.org/2000/svg"
386
- }), i && /* @__PURE__ */ q.createElement("title", null, i), t.children);
389
+ }), c && /* @__PURE__ */ q.createElement("title", null, c), t.children);
387
390
  };
388
- return Oe !== void 0 ? /* @__PURE__ */ q.createElement(Oe.Consumer, null, (n) => r(n)) : r(Pe);
391
+ return Re !== void 0 ? /* @__PURE__ */ q.createElement(Re.Consumer, null, (n) => r(n)) : r(Se);
389
392
  }
390
- function Ge(t) {
391
- return be({ attr: { viewBox: "0 0 24 24", fill: "none" }, child: [{ tag: "path", attr: { opacity: "0.2", fillRule: "evenodd", clipRule: "evenodd", d: "M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z", fill: "currentColor" }, child: [] }, { tag: "path", attr: { d: "M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z", fill: "currentColor" }, child: [] }] })(t);
393
+ function Qe(t) {
394
+ return be({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M512 1024c-69.1 0-136.2-13.5-199.3-40.2C251.7 958 197 921 150 874c-47-47-84-101.7-109.8-162.7C13.5 648.2 0 581.1 0 512c0-19.9 16.1-36 36-36s36 16.1 36 36c0 59.4 11.6 117 34.6 171.3 22.2 52.4 53.9 99.5 94.3 139.9 40.4 40.4 87.5 72.2 139.9 94.3C395 940.4 452.6 952 512 952c59.4 0 117-11.6 171.3-34.6 52.4-22.2 99.5-53.9 139.9-94.3 40.4-40.4 72.2-87.5 94.3-139.9C940.4 629 952 571.4 952 512c0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.2C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3s-13.5 136.2-40.2 199.3C958 772.3 921 827 874 874c-47 47-101.8 83.9-162.7 109.7-63.1 26.8-130.2 40.3-199.3 40.3z" }, child: [] }] })(t);
392
395
  }
393
- const Ut = ({
394
- children: t,
396
+ const Zt = ({
397
+ label: t,
395
398
  disabled: r = !1,
396
399
  loading: n = !1,
397
- onClick: a,
398
- className: l = "",
399
- "data-testid": i,
400
+ icon: s,
401
+ iconPos: i = "left",
402
+ onClick: c,
403
+ className: d = "",
404
+ "data-testid": m,
400
405
  ...u
401
406
  }) => {
402
- const b = [
403
- xe.primaryButton,
404
- r ? xe.primaryButtonDisabled : "",
405
- l
406
- ].filter(Boolean).join(" ");
407
- return /* @__PURE__ */ c.jsxs(
407
+ const f = [
408
+ te.primaryButton,
409
+ r ? te.primaryButtonDisabled : "",
410
+ d
411
+ ].filter(Boolean).join(" "), w = !!t;
412
+ return /* @__PURE__ */ o.jsxs(
408
413
  "button",
409
414
  {
410
415
  type: "button",
411
- className: b,
416
+ className: f,
412
417
  disabled: r || n,
413
- onClick: a,
414
- "data-testid": i,
418
+ onClick: c,
419
+ "data-testid": m,
415
420
  ...u,
416
421
  children: [
417
- n && /* @__PURE__ */ c.jsx(Ge, { className: xe.spinner, size: 12 }),
418
- t
422
+ n && /* @__PURE__ */ o.jsx(Qe, { className: te.spinner, size: 16 }),
423
+ w ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
424
+ s && i === "left" && /* @__PURE__ */ o.jsx("span", { className: te.iconLeft, children: s }),
425
+ t,
426
+ s && i === "right" && /* @__PURE__ */ o.jsx("span", { className: te.iconRight, children: s })
427
+ ] }) : s && /* @__PURE__ */ o.jsx("span", { className: te.iconOnly, children: s })
419
428
  ]
420
429
  }
421
430
  );
422
- }, Ze = "_secondaryButton_1s7ft_1", Ke = "_secondaryButtonDisabled_1s7ft_33", Re = {
431
+ }, Ze = "_secondaryButton_1ct3d_1", et = "_iconLeft_1ct3d_34", tt = "_iconRight_1ct3d_40", rt = "_iconOnly_1ct3d_46", nt = "_secondaryButtonDisabled_1ct3d_58", ue = {
423
432
  secondaryButton: Ze,
424
- secondaryButtonDisabled: Ke
425
- }, Jt = ({
426
- children: t,
433
+ iconLeft: et,
434
+ iconRight: tt,
435
+ iconOnly: rt,
436
+ secondaryButtonDisabled: nt
437
+ }, er = ({
438
+ label: t,
427
439
  disabled: r = !1,
428
- onClick: n,
429
- className: a = "",
430
- "data-testid": l,
431
- ...i
440
+ icon: n,
441
+ iconPos: s = "left",
442
+ onClick: i,
443
+ className: c = "",
444
+ "data-testid": d,
445
+ ...m
432
446
  }) => {
433
447
  const u = [
434
- Re.secondaryButton,
435
- r ? Re.secondaryButtonDisabled : "",
436
- a
437
- ].filter(Boolean).join(" ");
438
- return /* @__PURE__ */ c.jsx(
448
+ ue.secondaryButton,
449
+ r ? ue.secondaryButtonDisabled : "",
450
+ c
451
+ ].filter(Boolean).join(" "), f = !!t;
452
+ return /* @__PURE__ */ o.jsx(
439
453
  "button",
440
454
  {
441
455
  type: "button",
442
456
  className: u,
443
457
  disabled: r,
444
- onClick: n,
445
- "data-testid": l,
446
- ...i,
447
- children: t
458
+ onClick: i,
459
+ "data-testid": d,
460
+ ...m,
461
+ children: f ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
462
+ n && s === "left" && /* @__PURE__ */ o.jsx("span", { className: ue.iconLeft, children: n }),
463
+ t,
464
+ n && s === "right" && /* @__PURE__ */ o.jsx("span", { className: ue.iconRight, children: n })
465
+ ] }) : n && /* @__PURE__ */ o.jsx("span", { className: ue.iconOnly, children: n })
448
466
  }
449
467
  );
450
- }, Xe = "_tabsContainer_m3c4e_1", Qe = "_tabsHeader_m3c4e_7", et = "_tabItem_m3c4e_13", tt = "_tabContent_m3c4e_29", rt = "_tabLabel_m3c4e_51", nt = "_tabLine_m3c4e_61", ot = "_active_m3c4e_68", at = "_inactive_m3c4e_76", st = "_tabPanels_m3c4e_84", D = {
451
- tabsContainer: Xe,
452
- tabsHeader: Qe,
453
- tabItem: et,
454
- tabContent: tt,
455
- tabLabel: rt,
456
- tabLine: nt,
457
- active: ot,
458
- inactive: at,
459
- tabPanels: st
460
- }, Gt = ({
468
+ }, st = "_tabsContainer_m3c4e_1", at = "_tabsHeader_m3c4e_7", ot = "_tabItem_m3c4e_13", it = "_tabContent_m3c4e_29", lt = "_tabLabel_m3c4e_51", ct = "_tabLine_m3c4e_61", ut = "_active_m3c4e_68", ft = "_inactive_m3c4e_76", dt = "_tabPanels_m3c4e_84", D = {
469
+ tabsContainer: st,
470
+ tabsHeader: at,
471
+ tabItem: ot,
472
+ tabContent: it,
473
+ tabLabel: lt,
474
+ tabLine: ct,
475
+ active: ut,
476
+ inactive: ft,
477
+ tabPanels: dt
478
+ }, tr = ({
461
479
  tabs: t,
462
480
  activeTabId: r,
463
481
  onTabChange: n,
464
- className: a = "",
465
- "data-testid": l,
466
- ...i
482
+ className: s = "",
483
+ "data-testid": i,
484
+ ...c
467
485
  }) => {
468
- var b;
469
- const u = [D.tabsContainer, a].filter(Boolean).join(" ");
470
- return /* @__PURE__ */ c.jsxs("div", { className: u, "data-testid": l, ...i, children: [
471
- /* @__PURE__ */ c.jsx("div", { className: D.tabsHeader, children: t.map((f) => {
472
- const p = f.id === r, O = [
486
+ var m;
487
+ const d = [D.tabsContainer, s].filter(Boolean).join(" ");
488
+ return /* @__PURE__ */ o.jsxs("div", { className: d, "data-testid": i, ...c, children: [
489
+ /* @__PURE__ */ o.jsx("div", { className: D.tabsHeader, children: t.map((u) => {
490
+ const f = u.id === r, w = [
473
491
  D.tabItem,
474
- p ? D.active : D.inactive
492
+ f ? D.active : D.inactive
475
493
  ].filter(Boolean).join(" ");
476
- return /* @__PURE__ */ c.jsxs(
494
+ return /* @__PURE__ */ o.jsxs(
477
495
  "button",
478
496
  {
479
497
  type: "button",
480
- className: O,
481
- onClick: () => n(f.id),
482
- "data-testid": `${l}-tab-${f.id}`,
498
+ className: w,
499
+ onClick: () => n(u.id),
500
+ "data-testid": `${i}-tab-${u.id}`,
483
501
  children: [
484
- /* @__PURE__ */ c.jsx("div", { className: D.tabContent, children: /* @__PURE__ */ c.jsx("span", { className: D.tabLabel, children: f.label }) }),
485
- /* @__PURE__ */ c.jsx("div", { className: D.tabLine })
502
+ /* @__PURE__ */ o.jsx("div", { className: D.tabContent, children: /* @__PURE__ */ o.jsx("span", { className: D.tabLabel, children: u.label }) }),
503
+ /* @__PURE__ */ o.jsx("div", { className: D.tabLine })
486
504
  ]
487
505
  },
488
- f.id
506
+ u.id
489
507
  );
490
508
  }) }),
491
- /* @__PURE__ */ c.jsx("div", { className: D.tabPanels, children: (b = t.find((f) => f.id === r)) == null ? void 0 : b.content })
509
+ /* @__PURE__ */ o.jsx("div", { className: D.tabPanels, children: (m = t.find((u) => u.id === r)) == null ? void 0 : m.content })
492
510
  ] });
493
511
  };
494
- function lt(t) {
512
+ function _t(t) {
495
513
  return be({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "circle", attr: { cx: "11", cy: "11", r: "8" }, child: [] }, { tag: "line", attr: { x1: "21", y1: "21", x2: "16.65", y2: "16.65" }, child: [] }] })(t);
496
514
  }
497
- function it(t) {
515
+ function pt(t) {
498
516
  return be({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "circle", attr: { cx: "12", cy: "12", r: "10" }, child: [] }, { tag: "line", attr: { x1: "12", y1: "16", x2: "12", y2: "12" }, child: [] }, { tag: "line", attr: { x1: "12", y1: "8", x2: "12.01", y2: "8" }, child: [] }] })(t);
499
517
  }
500
- function ct(t) {
518
+ function mt(t) {
501
519
  return be({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polyline", attr: { points: "6 9 12 15 18 9" }, child: [] }] })(t);
502
520
  }
503
- const ut = "_dropdown_1xupi_1", ft = "_label_1xupi_9", dt = "_required_1xupi_18", pt = "_trigger_1xupi_23", _t = "_triggerDisabled_1xupi_47", mt = "_triggerInput_1xupi_56", vt = "_value_1xupi_74", bt = "_placeholder_1xupi_82", yt = "_chevron_1xupi_86", gt = "_open_1xupi_93", xt = "_panel_1xupi_117", ht = "_panelClosing_1xupi_134", jt = "_filterWrapper_1xupi_138", kt = "_filterInput_1xupi_145", wt = "_filterIcon_1xupi_164", Ot = "_list_1xupi_175", Et = "_option_1xupi_184", Rt = "_optionSelected_1xupi_196", Ct = "_optionHighlighted_1xupi_200", Nt = "_optionDisabled_1xupi_204", Tt = "_empty_1xupi_213", Pt = "_disabled_1xupi_220", h = {
504
- dropdown: ut,
505
- label: ft,
506
- required: dt,
507
- trigger: pt,
508
- triggerDisabled: _t,
509
- triggerInput: mt,
510
- value: vt,
511
- placeholder: bt,
512
- chevron: yt,
513
- open: gt,
514
- panel: xt,
515
- panelClosing: ht,
516
- filterWrapper: jt,
517
- filterInput: kt,
518
- filterIcon: wt,
519
- list: Ot,
520
- option: Et,
521
- optionSelected: Rt,
522
- optionHighlighted: Ct,
523
- optionDisabled: Nt,
524
- empty: Tt,
525
- disabled: Pt
521
+ const vt = "_dropdown_mthi8_1", yt = "_label_mthi8_9", ht = "_required_mthi8_20", bt = "_trigger_mthi8_25", gt = "_triggerDisabled_mthi8_49", xt = "_triggerInput_mthi8_58", jt = "_value_mthi8_76", kt = "_placeholder_mthi8_84", Ot = "_chevron_mthi8_88", wt = "_open_mthi8_95", Rt = "_panel_mthi8_119", Et = "_panelClosing_mthi8_136", Nt = "_filterWrapper_mthi8_140", Tt = "_filterInput_mthi8_147", Ct = "_filterIcon_mthi8_166", St = "_list_mthi8_177", Pt = "_option_mthi8_186", At = "_optionSelected_mthi8_198", Bt = "_optionHighlighted_mthi8_202", It = "_optionDisabled_mthi8_206", Dt = "_empty_mthi8_215", Lt = "_disabled_mthi8_222", x = {
522
+ dropdown: vt,
523
+ label: yt,
524
+ required: ht,
525
+ trigger: bt,
526
+ triggerDisabled: gt,
527
+ triggerInput: xt,
528
+ value: jt,
529
+ placeholder: kt,
530
+ chevron: Ot,
531
+ open: wt,
532
+ panel: Rt,
533
+ panelClosing: Et,
534
+ filterWrapper: Nt,
535
+ filterInput: Tt,
536
+ filterIcon: Ct,
537
+ list: St,
538
+ option: Pt,
539
+ optionSelected: At,
540
+ optionHighlighted: Bt,
541
+ optionDisabled: It,
542
+ empty: Dt,
543
+ disabled: Lt
526
544
  }, U = (t, r) => {
527
- const a = t[r];
528
- return a != null ? String(a) : "";
529
- }, te = (t, r) => t[r], A = (t, r) => r == null ? !1 : !!t[r], Zt = ({
545
+ const s = t[r];
546
+ return s != null ? String(s) : "";
547
+ }, re = (t, r) => t[r], A = (t, r) => r == null ? !1 : !!t[r], rr = ({
530
548
  value: t,
531
549
  onChange: r,
532
550
  onEditEnd: n,
533
- options: a,
534
- optionLabel: l = "label",
535
- optionValue: i = "value",
536
- optionDisabled: u,
537
- placeholder: b = "Select",
538
- filter: f = !1,
539
- editable: p = !1,
540
- disabled: O = !1,
541
- required: N = !1,
542
- label: S,
543
- inputId: T,
544
- className: $ = "",
545
- panelClassName: g = "",
546
- valueTemplate: y,
547
- itemTemplate: E,
551
+ options: s,
552
+ optionLabel: i = "label",
553
+ optionValue: c = "value",
554
+ optionDisabled: d,
555
+ placeholder: m = "Select",
556
+ filter: u = !1,
557
+ editable: f = !1,
558
+ disabled: w = !1,
559
+ required: T = !1,
560
+ label: P,
561
+ inputId: C,
562
+ className: L = "",
563
+ panelClassName: b = "",
564
+ valueTemplate: h,
565
+ itemTemplate: R,
548
566
  "data-testid": j
549
567
  }) => {
550
- const C = a.find(
551
- (o) => te(o, i) === t
552
- ), R = C ? U(C, l) : "", [_, L] = ae(!1), [P, ce] = ae(!1), [V, ue] = ae(""), [Z, B] = ae(R), [M, I] = ae(0), H = ee(null), fe = ee(null), re = ee(null), de = ee(null), ne = ee(null), K = ee(!1), e = Ie(
553
- () => f && !p ? a.filter(
554
- (o) => U(o, l).toLowerCase().includes(V.toLowerCase())
555
- ) : a,
556
- [f, p, a, l, V]
568
+ const N = s.find(
569
+ (a) => re(a, c) === t
570
+ ), E = N ? U(N, i) : "", [p, $] = oe(!1), [S, fe] = oe(!1), [V, de] = oe(""), [K, B] = oe(E), [M, I] = oe(0), H = ee(null), _e = ee(null), ne = ee(null), pe = ee(null), se = ee(null), X = ee(!1), e = Ie(
571
+ () => u && !f ? s.filter(
572
+ (a) => U(a, i).toLowerCase().includes(V.toLowerCase())
573
+ ) : s,
574
+ [u, f, s, i, V]
557
575
  );
558
- se(() => {
559
- p && B(R);
560
- }, [p, t, R]), se(() => {
561
- _ && f && !p && (ue(""), I(0), setTimeout(() => {
562
- var o;
563
- return (o = re.current) == null ? void 0 : o.focus();
576
+ ie(() => {
577
+ f && B(E);
578
+ }, [f, t, E]), ie(() => {
579
+ p && u && !f && (de(""), I(0), setTimeout(() => {
580
+ var a;
581
+ return (a = ne.current) == null ? void 0 : a.focus();
564
582
  }, 0));
565
- }, [_, f, p]), se(() => {
566
- if (!_) return;
567
- const o = e.findIndex(
568
- (w) => te(w, i) === t
569
- ), d = e.findIndex(
570
- (w) => !A(w, u)
571
- ), v = o >= 0 && !A(e[o], u);
572
- I(v ? o : d >= 0 ? d : 0);
573
- }, [_, t, e, i, u]), se(() => {
574
- const o = ne.current;
575
- o != null && o.scrollIntoView && typeof o.scrollIntoView == "function" && o.scrollIntoView({ block: "nearest" });
583
+ }, [p, u, f]), ie(() => {
584
+ if (!p) return;
585
+ const a = e.findIndex(
586
+ (O) => re(O, c) === t
587
+ ), _ = e.findIndex(
588
+ (O) => !A(O, d)
589
+ ), y = a >= 0 && !A(e[a], d);
590
+ I(y ? a : _ >= 0 ? _ : 0);
591
+ }, [p, t, e, c, d]), ie(() => {
592
+ const a = se.current;
593
+ a != null && a.scrollIntoView && typeof a.scrollIntoView == "function" && a.scrollIntoView({ block: "nearest" });
576
594
  }, [M]);
577
- const s = () => {
578
- K.current = !0, ce(!0);
579
- }, m = (o) => {
580
- var d;
581
- (K.current || (d = o.animationName) != null && d.includes("menuOut")) && (K.current = !1, L(!1), ce(!1), p && B(R));
595
+ const l = () => {
596
+ X.current = !0, fe(!0);
597
+ }, v = (a) => {
598
+ var _;
599
+ (X.current || (_ = a.animationName) != null && _.includes("menuOut")) && (X.current = !1, $(!1), fe(!1), f && B(E));
582
600
  };
583
- se(() => {
584
- if (!_ && !P) return;
585
- const o = (d) => {
586
- H.current && !H.current.contains(d.target) && (p && B(R), s());
601
+ ie(() => {
602
+ if (!p && !S) return;
603
+ const a = (_) => {
604
+ H.current && !H.current.contains(_.target) && (f && B(E), l());
587
605
  };
588
- return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
589
- }, [_, P, p, R]);
590
- const x = () => {
591
- O || L((o) => !o);
592
- }, F = (o, d) => {
593
- if (A(o, u)) return;
594
- const v = te(o, i);
595
- p && B(U(o, l)), r == null || r({
596
- value: v ?? null,
597
- originalEvent: d
598
- }), s();
599
- }, X = (o) => {
600
- if (!_) {
601
- if (o.key === "Enter" && p && Z.trim()) {
602
- o.preventDefault();
603
- const d = Z.trim(), v = d.toLowerCase(), w = a.find((Q) => {
604
- const Y = U(Q, l).toLowerCase();
605
- return Y === v || Y.startsWith(v);
606
- }), z = w && !A(w, u) ? te(w, i) : null;
607
- w && !A(w, u) && (B(U(w, l)), r == null || r({
606
+ return document.addEventListener("mousedown", a), () => document.removeEventListener("mousedown", a);
607
+ }, [p, S, f, E]);
608
+ const g = () => {
609
+ w || $((a) => !a);
610
+ }, F = (a, _) => {
611
+ if (A(a, d)) return;
612
+ const y = re(a, c);
613
+ f && B(U(a, i)), r == null || r({
614
+ value: y ?? null,
615
+ originalEvent: _
616
+ }), l();
617
+ }, Q = (a) => {
618
+ if (!p) {
619
+ if (a.key === "Enter" && f && K.trim()) {
620
+ a.preventDefault();
621
+ const _ = K.trim(), y = _.toLowerCase(), O = s.find((Z) => {
622
+ const Y = U(Z, i).toLowerCase();
623
+ return Y === y || Y.startsWith(y);
624
+ }), z = O && !A(O, d) ? re(O, c) : null;
625
+ O && !A(O, d) && (B(U(O, i)), r == null || r({
608
626
  value: z,
609
- originalEvent: o
627
+ originalEvent: a
610
628
  })), n == null || n({
611
- value: d,
629
+ value: _,
612
630
  selectedValue: z,
613
- originalEvent: o
631
+ originalEvent: a
614
632
  });
615
633
  return;
616
634
  }
617
- (o.key === "Enter" || o.key === " " || o.key === "ArrowDown") && (o.preventDefault(), L(!0));
635
+ (a.key === "Enter" || a.key === " " || a.key === "ArrowDown") && (a.preventDefault(), $(!0));
618
636
  return;
619
637
  }
620
- if (o.key === "Escape") {
621
- o.preventDefault(), s();
638
+ if (a.key === "Escape") {
639
+ a.preventDefault(), l();
622
640
  return;
623
641
  }
624
- if (o.key === "ArrowDown") {
625
- o.preventDefault(), I((d) => {
626
- for (let v = d + 1; v < e.length; v++)
627
- if (!A(e[v], u))
628
- return v;
629
- return d;
642
+ if (a.key === "ArrowDown") {
643
+ a.preventDefault(), I((_) => {
644
+ for (let y = _ + 1; y < e.length; y++)
645
+ if (!A(e[y], d))
646
+ return y;
647
+ return _;
630
648
  });
631
649
  return;
632
650
  }
633
- if (o.key === "ArrowUp") {
634
- o.preventDefault(), I((d) => {
635
- for (let v = d - 1; v >= 0; v--)
636
- if (!A(e[v], u))
637
- return v;
638
- return d;
651
+ if (a.key === "ArrowUp") {
652
+ a.preventDefault(), I((_) => {
653
+ for (let y = _ - 1; y >= 0; y--)
654
+ if (!A(e[y], d))
655
+ return y;
656
+ return _;
639
657
  });
640
658
  return;
641
659
  }
642
- if (o.key === "Enter") {
643
- if (o.preventDefault(), p) {
644
- const d = Z.trim();
645
- if (d) {
646
- const v = d.toLowerCase(), w = a.find((Q) => {
647
- const Y = U(Q, l).toLowerCase();
648
- return Y === v || Y.startsWith(v);
649
- }), z = w && !A(w, u) ? te(w, i) : null;
650
- w && !A(w, u) && F(w, o), n == null || n({
651
- value: d,
660
+ if (a.key === "Enter") {
661
+ if (a.preventDefault(), f) {
662
+ const _ = K.trim();
663
+ if (_) {
664
+ const y = _.toLowerCase(), O = s.find((Z) => {
665
+ const Y = U(Z, i).toLowerCase();
666
+ return Y === y || Y.startsWith(y);
667
+ }), z = O && !A(O, d) ? re(O, c) : null;
668
+ O && !A(O, d) && F(O, a), n == null || n({
669
+ value: _,
652
670
  selectedValue: z,
653
- originalEvent: o
671
+ originalEvent: a
654
672
  });
655
673
  } else
656
- n == null || n({ value: "", selectedValue: null, originalEvent: o });
674
+ n == null || n({ value: "", selectedValue: null, originalEvent: a });
657
675
  } else if (e[M]) {
658
- const d = e[M];
659
- A(d, u) || F(d, o);
676
+ const _ = e[M];
677
+ A(_, d) || F(_, a);
660
678
  }
661
679
  }
662
680
  }, k = [
663
- h.dropdown,
664
- O ? h.disabled : "",
665
- _ ? h.open : "",
666
- $
681
+ x.dropdown,
682
+ w ? x.disabled : "",
683
+ p ? x.open : "",
684
+ L
667
685
  ].filter(Boolean).join(" "), W = [
668
- h.trigger,
669
- O ? h.triggerDisabled : ""
670
- ].filter(Boolean).join(" "), oe = [
671
- h.panel,
672
- P ? h.panelClosing : "",
673
- g
674
- ].filter(Boolean).join(" "), ye = Te(), pe = T ?? `dropdown-${ye.replace(/[^a-zA-Z0-9_-]/g, "")}`, ge = `${pe}-panel`;
675
- return /* @__PURE__ */ c.jsxs("div", { className: k, ref: H, "data-testid": j, children: [
676
- S != null && /* @__PURE__ */ c.jsxs("label", { htmlFor: pe, className: h.label, children: [
677
- S,
678
- N && /* @__PURE__ */ c.jsx("span", { className: h.required, children: "*" })
686
+ x.trigger,
687
+ w ? x.triggerDisabled : ""
688
+ ].filter(Boolean).join(" "), ae = [
689
+ x.panel,
690
+ S ? x.panelClosing : "",
691
+ b
692
+ ].filter(Boolean).join(" "), ge = Ce(), me = C ?? `dropdown-${ge.replace(/[^a-zA-Z0-9_-]/g, "")}`, xe = `${me}-panel`;
693
+ return /* @__PURE__ */ o.jsxs("div", { className: k, ref: H, "data-testid": j, children: [
694
+ P != null && /* @__PURE__ */ o.jsxs("label", { htmlFor: me, className: x.label, children: [
695
+ P,
696
+ T && /* @__PURE__ */ o.jsx("span", { className: x.required, children: "*" })
679
697
  ] }),
680
- /* @__PURE__ */ c.jsxs(
698
+ /* @__PURE__ */ o.jsxs(
681
699
  "div",
682
700
  {
683
- id: p ? void 0 : pe,
701
+ id: f ? void 0 : me,
684
702
  role: "combobox",
685
- "aria-expanded": _ || P,
703
+ "aria-expanded": p || S,
686
704
  "aria-haspopup": "listbox",
687
- "aria-controls": _ || P ? ge : void 0,
688
- "aria-disabled": O,
689
- "aria-label": typeof S == "string" ? S : void 0,
690
- tabIndex: p || O ? -1 : 0,
705
+ "aria-controls": p || S ? xe : void 0,
706
+ "aria-disabled": w,
707
+ "aria-label": typeof P == "string" ? P : void 0,
708
+ tabIndex: f || w ? -1 : 0,
691
709
  className: W,
692
- onClick: p ? void 0 : x,
693
- onKeyDown: p ? void 0 : X,
694
- "data-testid": j && !p ? `${j}-trigger` : void 0,
710
+ onClick: f ? void 0 : g,
711
+ onKeyDown: f ? void 0 : Q,
712
+ "data-testid": j && !f ? `${j}-trigger` : void 0,
695
713
  children: [
696
- p ? /* @__PURE__ */ c.jsx(
714
+ f ? /* @__PURE__ */ o.jsx(
697
715
  "input",
698
716
  {
699
- ref: de,
700
- id: pe,
717
+ ref: pe,
718
+ id: me,
701
719
  type: "text",
702
- className: h.triggerInput,
703
- value: Z,
704
- onChange: (o) => {
705
- B(o.target.value), !_ && !P && L(!0), I(0);
720
+ className: x.triggerInput,
721
+ value: K,
722
+ onChange: (a) => {
723
+ B(a.target.value), !p && !S && $(!0), I(0);
706
724
  },
707
725
  onFocus: () => {
708
- !O && !_ && !P && L(!0);
726
+ !w && !p && !S && $(!0);
709
727
  },
710
- onKeyDown: X,
711
- placeholder: b,
712
- disabled: O,
728
+ onKeyDown: Q,
729
+ placeholder: m,
730
+ disabled: w,
713
731
  "aria-autocomplete": "list",
714
- "aria-controls": _ || P ? ge : void 0,
715
- "aria-expanded": _ || P,
732
+ "aria-controls": p || S ? xe : void 0,
733
+ "aria-expanded": p || S,
716
734
  "data-testid": j ? `${j}-trigger` : void 0
717
735
  }
718
- ) : /* @__PURE__ */ c.jsx("span", { className: h.value, children: y ? y(C ?? null) : R || /* @__PURE__ */ c.jsx("span", { className: h.placeholder, children: b }) }),
719
- /* @__PURE__ */ c.jsx(
720
- ct,
736
+ ) : /* @__PURE__ */ o.jsx("span", { className: x.value, children: h ? h(N ?? null) : E || /* @__PURE__ */ o.jsx("span", { className: x.placeholder, children: m }) }),
737
+ /* @__PURE__ */ o.jsx(
738
+ mt,
721
739
  {
722
- className: h.chevron,
740
+ className: x.chevron,
723
741
  "aria-hidden": !0,
724
- onClick: p ? x : void 0
742
+ onClick: f ? g : void 0
725
743
  }
726
744
  )
727
745
  ]
728
746
  }
729
747
  ),
730
- (_ || P) && /* @__PURE__ */ c.jsxs(
748
+ (p || S) && /* @__PURE__ */ o.jsxs(
731
749
  "div",
732
750
  {
733
- ref: fe,
734
- id: ge,
735
- className: oe,
751
+ ref: _e,
752
+ id: xe,
753
+ className: ae,
736
754
  role: "presentation",
737
- onAnimationEnd: m,
755
+ onAnimationEnd: v,
738
756
  "data-testid": j ? `${j}-panel` : void 0,
739
757
  children: [
740
- f && !p && /* @__PURE__ */ c.jsxs("div", { className: h.filterWrapper, children: [
741
- /* @__PURE__ */ c.jsx(
758
+ u && !f && /* @__PURE__ */ o.jsxs("div", { className: x.filterWrapper, children: [
759
+ /* @__PURE__ */ o.jsx(
742
760
  "input",
743
761
  {
744
- ref: re,
762
+ ref: ne,
745
763
  type: "text",
746
- className: h.filterInput,
764
+ className: x.filterInput,
747
765
  value: V,
748
- onChange: (o) => {
749
- ue(o.target.value), I(0);
766
+ onChange: (a) => {
767
+ de(a.target.value), I(0);
750
768
  },
751
- onKeyDown: (o) => {
752
- o.key === "Escape" && L(!1), o.stopPropagation();
769
+ onKeyDown: (a) => {
770
+ a.key === "Escape" && $(!1), a.stopPropagation();
753
771
  },
754
772
  placeholder: "Search...",
755
773
  "aria-label": "Filter options",
@@ -757,27 +775,27 @@ const ut = "_dropdown_1xupi_1", ft = "_label_1xupi_9", dt = "_required_1xupi_18"
757
775
  "data-testid": j ? `${j}-filter` : void 0
758
776
  }
759
777
  ),
760
- /* @__PURE__ */ c.jsx(lt, { className: h.filterIcon, "aria-hidden": !0 })
778
+ /* @__PURE__ */ o.jsx(_t, { className: x.filterIcon, "aria-hidden": !0 })
761
779
  ] }),
762
- /* @__PURE__ */ c.jsx("ul", { className: h.list, role: "listbox", "aria-label": "Options", children: e.length === 0 ? /* @__PURE__ */ c.jsx("li", { className: h.empty, children: "No results" }) : e.map((o, d) => {
763
- const v = te(o, i), w = U(o, l), z = A(o, u), Q = t === v, Y = d === M, Ae = v != null ? String(v) : `option-${d}`;
764
- return /* @__PURE__ */ c.jsx(
780
+ /* @__PURE__ */ o.jsx("ul", { className: x.list, role: "listbox", "aria-label": "Options", children: e.length === 0 ? /* @__PURE__ */ o.jsx("li", { className: x.empty, children: "No results" }) : e.map((a, _) => {
781
+ const y = re(a, c), O = U(a, i), z = A(a, d), Z = t === y, Y = _ === M, Ae = y != null ? String(y) : `option-${_}`;
782
+ return /* @__PURE__ */ o.jsx(
765
783
  "li",
766
784
  {
767
- ref: Y ? ne : void 0,
785
+ ref: Y ? se : void 0,
768
786
  role: "option",
769
- "aria-selected": Q,
787
+ "aria-selected": Z,
770
788
  "aria-disabled": z,
771
789
  className: [
772
- h.option,
773
- Q ? h.optionSelected : "",
774
- Y ? h.optionHighlighted : "",
775
- z ? h.optionDisabled : ""
790
+ x.option,
791
+ Z ? x.optionSelected : "",
792
+ Y ? x.optionHighlighted : "",
793
+ z ? x.optionDisabled : ""
776
794
  ].filter(Boolean).join(" "),
777
- onMouseEnter: () => !z && I(d),
778
- onClick: (Be) => F(o, Be),
779
- "data-testid": j ? `${j}-option-${d}` : void 0,
780
- children: E ? E(o) : w
795
+ onMouseEnter: () => !z && I(_),
796
+ onClick: (Be) => F(a, Be),
797
+ "data-testid": j ? `${j}-option-${_}` : void 0,
798
+ children: R ? R(a) : O
781
799
  },
782
800
  Ae
783
801
  );
@@ -786,141 +804,141 @@ const ut = "_dropdown_1xupi_1", ft = "_label_1xupi_9", dt = "_required_1xupi_18"
786
804
  }
787
805
  )
788
806
  ] });
789
- }, St = "_inputText_1crp5_1", At = "_label_1crp5_9", Bt = "_required_1crp5_20", It = "_tooltipIcon_1crp5_25", Dt = "_input_1crp5_1", $t = "_inputTextarea_1crp5_72", Lt = "_inputTextDisabled_1crp5_79", J = {
790
- inputText: St,
791
- label: At,
792
- required: Bt,
793
- tooltipIcon: It,
794
- input: Dt,
795
- inputTextarea: $t,
796
- inputTextDisabled: Lt
797
- }, Kt = ({
807
+ }, $t = "_inputText_k5apy_1", Ft = "_label_k5apy_9", Wt = "_required_k5apy_20", zt = "_tooltipIcon_k5apy_25", Yt = "_input_k5apy_1", qt = "_inputTextarea_k5apy_72", Vt = "_inputTextDisabled_k5apy_79", J = {
808
+ inputText: $t,
809
+ label: Ft,
810
+ required: Wt,
811
+ tooltipIcon: zt,
812
+ input: Yt,
813
+ inputTextarea: qt,
814
+ inputTextDisabled: Vt
815
+ }, nr = ({
798
816
  label: t,
799
817
  tooltip: r,
800
818
  required: n = !1,
801
- inputId: a,
802
- textarea: l = !1,
803
- rows: i,
804
- className: u = "",
805
- "data-testid": b,
806
- disabled: f = !1,
807
- ...p
819
+ inputId: s,
820
+ textarea: i = !1,
821
+ rows: c,
822
+ className: d = "",
823
+ "data-testid": m,
824
+ disabled: u = !1,
825
+ ...f
808
826
  }) => {
809
- const { type: O = "text", ...N } = p, S = Te(), T = a || `input-text-${S.replace(/[^a-zA-Z0-9_-]/g, "")}`, $ = [
827
+ const { type: w = "text", ...T } = f, P = Ce(), C = s || `input-text-${P.replace(/[^a-zA-Z0-9_-]/g, "")}`, L = [
810
828
  J.inputText,
811
- f ? J.inputTextDisabled : "",
812
- u
813
- ].filter(Boolean).join(" "), g = N["aria-invalid"];
814
- let y;
815
- g === void 0 ? y = void 0 : g === !0 ? y = "true" : g === !1 ? y = "false" : y = g;
816
- const E = n ? { "aria-required": "true" } : { "aria-required": "false" }, j = y === void 0 ? {} : { "aria-invalid": y }, C = [J.input, l ? J.inputTextarea : ""].filter(Boolean).join(" "), R = {
817
- id: T,
818
- className: C,
819
- disabled: f,
820
- ...E,
829
+ u ? J.inputTextDisabled : "",
830
+ d
831
+ ].filter(Boolean).join(" "), b = T["aria-invalid"];
832
+ let h;
833
+ b === void 0 ? h = void 0 : b === !0 ? h = "true" : b === !1 ? h = "false" : h = b;
834
+ const R = n ? { "aria-required": "true" } : { "aria-required": "false" }, j = h === void 0 ? {} : { "aria-invalid": h }, N = [J.input, i ? J.inputTextarea : ""].filter(Boolean).join(" "), E = {
835
+ id: C,
836
+ className: N,
837
+ disabled: u,
838
+ ...R,
821
839
  ...j,
822
- "data-testid": b ? `${b}-input` : void 0
840
+ "data-testid": m ? `${m}-input` : void 0
823
841
  };
824
- return /* @__PURE__ */ c.jsxs("div", { className: $, "data-testid": b, children: [
825
- t != null && /* @__PURE__ */ c.jsxs("label", { htmlFor: T, className: J.label, children: [
842
+ return /* @__PURE__ */ o.jsxs("div", { className: L, "data-testid": m, children: [
843
+ t != null && /* @__PURE__ */ o.jsxs("label", { htmlFor: C, className: J.label, children: [
826
844
  t,
827
- n && /* @__PURE__ */ c.jsx("span", { className: J.required, children: "*" }),
828
- r != null && /* @__PURE__ */ c.jsx(
845
+ n && /* @__PURE__ */ o.jsx("span", { className: J.required, children: "*" }),
846
+ r != null && /* @__PURE__ */ o.jsx(
829
847
  "span",
830
848
  {
831
849
  className: J.tooltipIcon,
832
850
  title: r,
833
851
  "aria-label": r,
834
- children: /* @__PURE__ */ c.jsx(it, { "aria-hidden": !0 })
852
+ children: /* @__PURE__ */ o.jsx(pt, { "aria-hidden": !0 })
835
853
  }
836
854
  )
837
855
  ] }),
838
- l ? /* @__PURE__ */ c.jsx(
856
+ i ? /* @__PURE__ */ o.jsx(
839
857
  "textarea",
840
858
  {
841
- ...N,
842
- ...R,
843
- rows: i ?? 3
859
+ ...T,
860
+ ...E,
861
+ rows: c ?? 3
844
862
  }
845
- ) : /* @__PURE__ */ c.jsx("input", { ...N, ...R, type: O })
863
+ ) : /* @__PURE__ */ o.jsx("input", { ...T, ...E, type: w })
846
864
  ] });
847
- }, Ft = "_selectButton_1u3fo_1", Wt = "_selectButtonDisabled_1u3fo_9", zt = "_selectButtonInvalid_1u3fo_14", Yt = "_button_1u3fo_14", qt = "_buttonFirst_1u3fo_47", Vt = "_buttonLast_1u3fo_51", Mt = "_buttonSelected_1u3fo_59", G = {
848
- selectButton: Ft,
849
- selectButtonDisabled: Wt,
850
- selectButtonInvalid: zt,
851
- button: Yt,
852
- buttonFirst: qt,
853
- buttonLast: Vt,
854
- buttonSelected: Mt
855
- }, Ce = (t, r) => {
856
- const a = t[r];
857
- return a != null ? String(a) : "";
858
- }, he = (t, r) => t[r], Ne = (t, r) => r == null ? !1 : !!t[r], Xt = ({
865
+ }, Mt = "_selectButton_1u3fo_1", Ht = "_selectButtonDisabled_1u3fo_9", Ut = "_selectButtonInvalid_1u3fo_14", Jt = "_button_1u3fo_14", Gt = "_buttonFirst_1u3fo_47", Kt = "_buttonLast_1u3fo_51", Xt = "_buttonSelected_1u3fo_59", G = {
866
+ selectButton: Mt,
867
+ selectButtonDisabled: Ht,
868
+ selectButtonInvalid: Ut,
869
+ button: Jt,
870
+ buttonFirst: Gt,
871
+ buttonLast: Kt,
872
+ buttonSelected: Xt
873
+ }, Ne = (t, r) => {
874
+ const s = t[r];
875
+ return s != null ? String(s) : "";
876
+ }, je = (t, r) => t[r], Te = (t, r) => r == null ? !1 : !!t[r], sr = ({
859
877
  value: t,
860
878
  onChange: r,
861
879
  options: n,
862
- optionLabel: a = "label",
863
- optionValue: l = "value",
864
- optionDisabled: i,
865
- multiple: u = !1,
866
- itemTemplate: b,
867
- disabled: f = !1,
868
- invalid: p = !1,
869
- className: O = "",
870
- "data-testid": N
880
+ optionLabel: s = "label",
881
+ optionValue: i = "value",
882
+ optionDisabled: c,
883
+ multiple: d = !1,
884
+ itemTemplate: m,
885
+ disabled: u = !1,
886
+ invalid: f = !1,
887
+ className: w = "",
888
+ "data-testid": T
871
889
  }) => {
872
- const S = (g) => {
873
- const y = he(g, l);
874
- return u && Array.isArray(t) ? t.includes(y) : t === y;
875
- }, T = (g, y) => {
876
- if (f || Ne(g, i)) return;
877
- const E = he(g, l);
878
- if (E === void 0) return;
890
+ const P = (b) => {
891
+ const h = je(b, i);
892
+ return d && Array.isArray(t) ? t.includes(h) : t === h;
893
+ }, C = (b, h) => {
894
+ if (u || Te(b, c)) return;
895
+ const R = je(b, i);
896
+ if (R === void 0) return;
879
897
  let j;
880
- if (u) {
881
- const C = Array.isArray(t) ? t : [];
882
- j = C.includes(E) ? C.filter((_) => _ !== E) : [...C, E];
898
+ if (d) {
899
+ const N = Array.isArray(t) ? t : [];
900
+ j = N.includes(R) ? N.filter((p) => p !== R) : [...N, R];
883
901
  } else
884
- j = t === E ? null : E;
902
+ j = t === R ? null : R;
885
903
  r == null || r({
886
904
  value: j,
887
- originalEvent: y
905
+ originalEvent: h
888
906
  });
889
- }, $ = [
907
+ }, L = [
890
908
  G.selectButton,
891
- f ? G.selectButtonDisabled : "",
892
- p ? G.selectButtonInvalid : "",
893
- O
909
+ u ? G.selectButtonDisabled : "",
910
+ f ? G.selectButtonInvalid : "",
911
+ w
894
912
  ].filter(Boolean).join(" ");
895
- return /* @__PURE__ */ c.jsx(
913
+ return /* @__PURE__ */ o.jsx(
896
914
  "div",
897
915
  {
898
- className: $,
916
+ className: L,
899
917
  role: "group",
900
- "aria-disabled": f,
901
- "data-testid": N,
902
- children: n.map((g, y) => {
903
- const E = he(g, l), j = E != null ? String(E) : `option-${y}`, C = Ne(g, i), R = S(g);
904
- return /* @__PURE__ */ c.jsx(
918
+ "aria-disabled": u,
919
+ "data-testid": T,
920
+ children: n.map((b, h) => {
921
+ const R = je(b, i), j = R != null ? String(R) : `option-${h}`, N = Te(b, c), E = P(b);
922
+ return /* @__PURE__ */ o.jsx(
905
923
  "button",
906
924
  {
907
925
  type: "button",
908
- "aria-pressed": R,
909
- "aria-disabled": C || f,
910
- "aria-label": Ce(g, a),
911
- disabled: f || C,
926
+ "aria-pressed": E,
927
+ "aria-disabled": N || u,
928
+ "aria-label": Ne(b, s),
929
+ disabled: u || N,
912
930
  className: [
913
931
  G.button,
914
- R ? G.buttonSelected : "",
915
- y === 0 ? G.buttonFirst : "",
916
- y === n.length - 1 ? G.buttonLast : ""
932
+ E ? G.buttonSelected : "",
933
+ h === 0 ? G.buttonFirst : "",
934
+ h === n.length - 1 ? G.buttonLast : ""
917
935
  ].filter(Boolean).join(" "),
918
- onClick: (_) => T(g, _),
919
- onKeyDown: (_) => {
920
- (_.key === " " || _.key === "Enter") && (_.preventDefault(), T(g, _));
936
+ onClick: (p) => C(b, p),
937
+ onKeyDown: (p) => {
938
+ (p.key === " " || p.key === "Enter") && (p.preventDefault(), C(b, p));
921
939
  },
922
- "data-testid": N ? `${N}-option-${y}` : void 0,
923
- children: b ? b(g) : Ce(g, a)
940
+ "data-testid": T ? `${T}-option-${h}` : void 0,
941
+ children: m ? m(b) : Ne(b, s)
924
942
  },
925
943
  j
926
944
  );
@@ -929,10 +947,10 @@ const ut = "_dropdown_1xupi_1", ft = "_label_1xupi_9", dt = "_required_1xupi_18"
929
947
  );
930
948
  };
931
949
  export {
932
- Zt as Dropdown,
933
- Kt as InputText,
934
- Ut as PrimaryButton,
935
- Jt as SecondaryButton,
936
- Xt as SelectButton,
937
- Gt as Tabs
950
+ rr as Dropdown,
951
+ nr as InputText,
952
+ Zt as PrimaryButton,
953
+ er as SecondaryButton,
954
+ sr as SelectButton,
955
+ tr as Tabs
938
956
  };