welcome-ui 10.0.0-alpha.1 → 10.0.0-alpha.10

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.
Files changed (176) hide show
  1. package/README.md +1 -1
  2. package/dist/2W3RN7C5-DMC82gDP.js +61 -0
  3. package/dist/4I4MLMKD-BO6Lcy7s.js +150 -0
  4. package/dist/Accordion.js +20 -18
  5. package/dist/Alert.css +1 -1
  6. package/dist/Alert.js +93 -87
  7. package/dist/AspectRatio.js +2 -1
  8. package/dist/Avatar.js +14 -12
  9. package/dist/{B7UTNDHN-BlIblHCu.js → B7UTNDHN-BghjolIs.js} +30 -30
  10. package/dist/Badge.js +2 -1
  11. package/dist/Breadcrumb.css +1 -1
  12. package/dist/Breadcrumb.js +175 -154
  13. package/dist/Button.css +1 -1
  14. package/dist/Button.js +43 -41
  15. package/dist/ButtonGroup.js +7 -5
  16. package/dist/Card.css +1 -1
  17. package/dist/Card.js +68 -15
  18. package/dist/Checkbox.js +30 -29
  19. package/dist/CloseButton.css +1 -1
  20. package/dist/CloseButton.js +15 -13
  21. package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
  22. package/dist/{DSAASPLT-BaaCUKsb.js → DSAASPLT-Fx1kuAsk.js} +3 -3
  23. package/dist/DatePicker.js +82 -78
  24. package/dist/DateTimePicker.js +23 -22
  25. package/dist/Drawer.js +141 -96
  26. package/dist/DropdownMenu.css +1 -1
  27. package/dist/DropdownMenu.js +902 -462
  28. package/dist/Field.js +2 -1
  29. package/dist/FieldGroup.js +9 -7
  30. package/dist/FileDrop.css +1 -1
  31. package/dist/FileDrop.js +427 -398
  32. package/dist/FileUpload.js +44 -41
  33. package/dist/GVVKDT6A-CF9ejW_c.js +619 -0
  34. package/dist/Hint.js +10 -8
  35. package/dist/Icon.css +1 -1
  36. package/dist/Icon.js +36 -22
  37. package/dist/InputText.css +1 -1
  38. package/dist/InputText.js +59 -57
  39. package/dist/{KPUWHTQJ-D2TPji47.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
  40. package/dist/Label.js +9 -7
  41. package/dist/Link.css +1 -1
  42. package/dist/Link.js +54 -49
  43. package/dist/Loader.js +13 -11
  44. package/dist/Logo.js +21 -13
  45. package/dist/Modal.js +145 -114
  46. package/dist/{NI3IVY7K-Ztb3-XAv.js → NI3IVY7K-Dy240mkD.js} +53 -53
  47. package/dist/{NMGNQVTG-C6TqBngP.js → NMGNQVTG-DRO2uXZT.js} +8 -8
  48. package/dist/{OE2EFRVA-C3721cM3.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
  49. package/dist/{OLVWQA7U-DysaSaZj.js → OLVWQA7U-Dia3UUnG.js} +51 -51
  50. package/dist/Pagination.css +1 -1
  51. package/dist/Pagination.js +157 -76
  52. package/dist/PasswordInput.js +20 -17
  53. package/dist/Popover.js +89 -72
  54. package/dist/{RTNCFSKZ-qpPg689E.js → RTNCFSKZ-BywELldk.js} +47 -47
  55. package/dist/Radio.css +1 -1
  56. package/dist/Radio.js +39 -40
  57. package/dist/RadioGroup.js +29 -27
  58. package/dist/RadioTab.js +3 -2
  59. package/dist/{SBSPVDDI-DJKkC1eb.js → SBSPVDDI-CmtnvvUX.js} +42 -42
  60. package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
  61. package/dist/Search.css +1 -1
  62. package/dist/Search.js +136 -129
  63. package/dist/Select.css +1 -1
  64. package/dist/Select.js +259 -257
  65. package/dist/Slider.js +67 -62
  66. package/dist/Stepper.js +34 -27
  67. package/dist/StickyNote.css +1 -0
  68. package/dist/StickyNote.js +49 -0
  69. package/dist/Swiper.js +53 -51
  70. package/dist/{T22PY7TE-C1N0q8Kn.js → T22PY7TE-gLuJpoOm.js} +46 -46
  71. package/dist/Table.js +34 -21
  72. package/dist/Tabs.js +165 -156
  73. package/dist/Tag.css +1 -1
  74. package/dist/Tag.js +67 -62
  75. package/dist/Text.js +5 -3
  76. package/dist/Textarea.css +1 -1
  77. package/dist/Textarea.js +26 -18
  78. package/dist/TimePicker.js +24 -23
  79. package/dist/Toast.css +1 -1
  80. package/dist/Toast.js +275 -165
  81. package/dist/Toggle.js +16 -14
  82. package/dist/Tooltip.css +1 -1
  83. package/dist/Tooltip.js +120 -129
  84. package/dist/VariantIcon.js +8 -6
  85. package/dist/VisuallyHidden.js +9 -7
  86. package/dist/WelcomeLoader.js +4 -3
  87. package/dist/XCKGTAUF-CJwwVibW.js +25 -0
  88. package/dist/{Y67KZUMI-DFEgrUv2.js → Y67KZUMI-BwLWwpNF.js} +5 -5
  89. package/dist/{ZTXFEM5L-CkrIQCN1.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
  90. package/dist/{downshift.esm-D_6pHXkq.js → downshift.esm-xtYanIDi.js} +1 -1
  91. package/dist/scss/breakpoints.scss +9 -0
  92. package/dist/scss/text-ellipsis.scss +5 -0
  93. package/dist/scss/texts.scss +108 -0
  94. package/dist/theme.css +1 -1
  95. package/dist/theme.js +1 -0
  96. package/dist/{tslib.es6-DpB4Y59c.js → tslib.es6-C80jYMbM.js} +1 -1
  97. package/dist/types/components/Alert/components/Buttons.d.ts +3 -0
  98. package/dist/types/components/Alert/components/Title.d.ts +5 -0
  99. package/dist/types/components/Alert/index.d.ts +7 -3
  100. package/dist/types/components/Alert/types.d.ts +3 -9
  101. package/dist/types/components/Breadcrumb/Item.d.ts +2 -2
  102. package/dist/types/components/Breadcrumb/index.d.ts +1 -1
  103. package/dist/types/components/Breadcrumb/types.d.ts +6 -3
  104. package/dist/types/components/Card/Body.d.ts +2 -3
  105. package/dist/types/components/Card/Footer.d.ts +6 -0
  106. package/dist/types/components/Card/Header.d.ts +5 -0
  107. package/dist/types/components/Card/index.d.ts +7 -8
  108. package/dist/types/components/Card/types.d.ts +16 -3
  109. package/dist/types/components/Checkbox/index.d.ts +1 -2
  110. package/dist/types/components/Checkbox/types.d.ts +3 -1
  111. package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
  112. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
  113. package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
  114. package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
  115. package/dist/types/components/Drawer/AssetDrawer/types.d.ts +3 -0
  116. package/dist/types/components/Drawer/components/Backdrop.d.ts +1 -1
  117. package/dist/types/components/Drawer/components/Close.d.ts +4 -1
  118. package/dist/types/components/Drawer/components/Title.d.ts +4 -1
  119. package/dist/types/components/Drawer/index.d.ts +13 -4
  120. package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
  121. package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
  122. package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
  123. package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
  124. package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
  125. package/dist/types/components/DropdownMenu/index.d.ts +11 -0
  126. package/dist/types/components/DropdownMenu/types.d.ts +26 -5
  127. package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
  128. package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
  129. package/dist/types/components/FileDrop/types.d.ts +2 -0
  130. package/dist/types/components/Icon/icons.d.ts +6 -6
  131. package/dist/types/components/Icon/types.d.ts +2 -0
  132. package/dist/types/components/Loader/index.d.ts +4 -1
  133. package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
  134. package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
  135. package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
  136. package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
  137. package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
  138. package/dist/types/components/Modal/Assets/index.d.ts +16 -4
  139. package/dist/types/components/Modal/components/Close.d.ts +4 -1
  140. package/dist/types/components/Modal/index.d.ts +16 -4
  141. package/dist/types/components/Pagination/types.d.ts +11 -0
  142. package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
  143. package/dist/types/components/Popover/Arrow.d.ts +4 -1
  144. package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
  145. package/dist/types/components/Radio/types.d.ts +1 -1
  146. package/dist/types/components/RadioGroup/index.d.ts +4 -1
  147. package/dist/types/components/Stepper/index.d.ts +8 -2
  148. package/dist/types/components/StickyNote/components/Button.d.ts +5 -0
  149. package/dist/types/components/StickyNote/components/Title.d.ts +5 -0
  150. package/dist/types/components/StickyNote/index.d.ts +11 -0
  151. package/dist/types/components/StickyNote/index.test.d.ts +1 -0
  152. package/dist/types/components/StickyNote/types.d.ts +15 -0
  153. package/dist/types/components/Swiper/index.d.ts +4 -1
  154. package/dist/types/components/Table/index.d.ts +20 -5
  155. package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
  156. package/dist/types/components/Tag/types.d.ts +4 -2
  157. package/dist/types/components/Textarea/types.d.ts +1 -0
  158. package/dist/types/components/Toast/components/Growl.d.ts +2 -0
  159. package/dist/types/components/Toast/index.d.ts +8 -2
  160. package/dist/types/components/Toast/types.d.ts +8 -9
  161. package/dist/types/components/Tooltip/types.d.ts +1 -1
  162. package/dist/types/theme/types.d.ts +255 -218
  163. package/dist/types/utils/index.d.ts +0 -1
  164. package/dist/{utils-DileZjMm.js → utils-BD597oo6.js} +1 -1
  165. package/dist/utils.js +3 -2
  166. package/package.json +3 -2
  167. package/dist/2W3RN7C5-bkX-rIa3.js +0 -61
  168. package/dist/4I4MLMKD-BLxAidnq.js +0 -43
  169. package/dist/GVVKDT6A-bET6V7Py.js +0 -724
  170. package/dist/SQZLCNLX-CHDXnZ16.js +0 -82
  171. package/dist/XCKGTAUF-DkxWCbaW.js +0 -25
  172. package/dist/index.css +0 -0
  173. package/dist/types/components/Icon/Icon.d.ts +0 -2
  174. package/dist/types/utils/theme/index.d.ts +0 -0
  175. /package/dist/{index-CdiHdiVB.js → index-PAaZGbyz.js} +0 -0
  176. /package/dist/types/components/Icon/{Icon.test.d.ts → index.test.d.ts} +0 -0
package/dist/Select.js CHANGED
@@ -1,17 +1,18 @@
1
1
  "use client";
2
- import { jsx as k, jsxs as P } from "react/jsx-runtime";
3
- import { D as me } from "./downshift.esm-D_6pHXkq.js";
4
- import { g as Le, c as Oe } from "./index-CdiHdiVB.js";
5
- import { forwardRef as Pe, useMemo as $e, useState as $, useEffect as he, useCallback as Ye, Fragment as Be } from "react";
6
- import { CloseButton as Xe } from "./CloseButton.js";
7
- import { useField as Ze } from "./Field.js";
2
+ import './Select.css';
3
+ import { jsx as v, jsxs as L } from "react/jsx-runtime";
4
+ import { D as me } from "./downshift.esm-xtYanIDi.js";
5
+ import { g as Ke, c as ye } from "./index-PAaZGbyz.js";
6
+ import { forwardRef as Le, useMemo as Pe, useState as P, useEffect as he, useCallback as $e, Fragment as Ye } from "react";
7
+ import { CloseButton as Be } from "./CloseButton.js";
8
+ import { useField as Xe } from "./Field.js";
8
9
  import { Icon as _e } from "./Icon.js";
9
- import { c as Qe } from "./create-event-rXDe5aCQ.js";
10
- import { u as qe } from "./useForkRef-D807AV7D.js";
10
+ import { c as Ze } from "./create-event-rXDe5aCQ.js";
11
+ import { u as Qe } from "./useForkRef-D807AV7D.js";
11
12
  import { Tag as Ge } from "./Tag.js";
12
- var T = { exports: {} }, pe;
13
+ var V = { exports: {} }, pe;
13
14
  function Je() {
14
- if (pe) return T.exports;
15
+ if (pe) return V.exports;
15
16
  pe = 1;
16
17
  var e = {
17
18
  À: "A",
@@ -473,19 +474,19 @@ function Je() {
473
474
  Й: "И",
474
475
  ё: "е",
475
476
  Ё: "Е"
476
- }, n = Object.keys(e).join("|"), t = new RegExp(n, "g"), r = new RegExp(n, "");
477
+ }, t = Object.keys(e).join("|"), n = new RegExp(t, "g"), r = new RegExp(t, "");
477
478
  function s(o) {
478
479
  return e[o];
479
480
  }
480
481
  var c = function(o) {
481
- return o.replace(t, s);
482
+ return o.replace(n, s);
482
483
  }, i = function(o) {
483
484
  return !!o.match(r);
484
485
  };
485
- return T.exports = c, T.exports.has = i, T.exports.remove = c, T.exports;
486
+ return V.exports = c, V.exports.has = i, V.exports.remove = c, V.exports;
486
487
  }
487
- var en = Je();
488
- const nn = /* @__PURE__ */ Le(en);
488
+ var et = Je();
489
+ const tt = /* @__PURE__ */ Ke(et);
489
490
  /**
490
491
  * @name match-sorter
491
492
  * @license MIT license.
@@ -501,15 +502,15 @@ const g = {
501
502
  ACRONYM: 2,
502
503
  MATCHES: 1,
503
504
  NO_MATCH: 0
504
- }, tn = (e, n) => String(e.rankedValue).localeCompare(String(n.rankedValue));
505
- function G(e, n, t) {
506
- t === void 0 && (t = {});
505
+ }, nt = (e, t) => String(e.rankedValue).localeCompare(String(t.rankedValue));
506
+ function G(e, t, n) {
507
+ n === void 0 && (n = {});
507
508
  const {
508
509
  keys: r,
509
510
  threshold: s = g.MATCHES,
510
- baseSort: c = tn,
511
- sorter: i = (d) => d.sort((u, h) => on(u, h, c))
512
- } = t, o = e.reduce(l, []);
511
+ baseSort: c = nt,
512
+ sorter: i = (d) => d.sort((u, h) => ot(u, h, c))
513
+ } = n, o = e.reduce(l, []);
513
514
  return i(o).map((d) => {
514
515
  let {
515
516
  item: u
@@ -517,46 +518,46 @@ function G(e, n, t) {
517
518
  return u;
518
519
  });
519
520
  function l(d, u, h) {
520
- const v = rn(u, r, n, t), {
521
+ const E = rt(u, r, t, n), {
521
522
  rank: p,
522
523
  keyThreshold: m = s
523
- } = v;
524
+ } = E;
524
525
  return p >= m && d.push({
525
- ...v,
526
+ ...E,
526
527
  item: u,
527
528
  index: h
528
529
  }), d;
529
530
  }
530
531
  }
531
532
  G.rankings = g;
532
- function rn(e, n, t, r) {
533
- if (!n) {
533
+ function rt(e, t, n, r) {
534
+ if (!t) {
534
535
  const c = e;
535
536
  return {
536
537
  // ends up being duplicate of 'item' in matches but consistent
537
538
  rankedValue: c,
538
- rank: Ae(c, t, r),
539
+ rank: Ae(c, n, r),
539
540
  keyIndex: -1,
540
541
  keyThreshold: r.threshold
541
542
  };
542
543
  }
543
- return un(e, n).reduce((c, i, o) => {
544
+ return it(e, t).reduce((c, i, o) => {
544
545
  let {
545
546
  rank: l,
546
547
  rankedValue: d,
547
548
  keyIndex: u,
548
549
  keyThreshold: h
549
550
  } = c, {
550
- itemValue: v,
551
+ itemValue: E,
551
552
  attributes: p
552
- } = i, m = Ae(v, t, r), U = d;
553
+ } = i, m = Ae(E, n, r), k = d;
553
554
  const {
554
- minRanking: H,
555
- maxRanking: N,
556
- threshold: V
555
+ minRanking: T,
556
+ maxRanking: R,
557
+ threshold: S
557
558
  } = p;
558
- return m < H && m >= g.MATCHES ? m = H : m > N && (m = N), m > l && (l = m, u = o, h = V, U = v), {
559
- rankedValue: U,
559
+ return m < T && m >= g.MATCHES ? m = T : m > R && (m = R), m > l && (l = m, u = o, h = S, k = E), {
560
+ rankedValue: k,
560
561
  rank: l,
561
562
  keyIndex: u,
562
563
  keyThreshold: h
@@ -568,78 +569,78 @@ function rn(e, n, t, r) {
568
569
  keyThreshold: r.threshold
569
570
  });
570
571
  }
571
- function Ae(e, n, t) {
572
- return e = ge(e, t), n = ge(n, t), n.length > e.length ? g.NO_MATCH : e === n ? g.CASE_SENSITIVE_EQUAL : (e = e.toLowerCase(), n = n.toLowerCase(), e === n ? g.EQUAL : e.startsWith(n) ? g.STARTS_WITH : e.includes(` ${n}`) ? g.WORD_STARTS_WITH : e.includes(n) ? g.CONTAINS : n.length === 1 ? g.NO_MATCH : sn(e).includes(n) ? g.ACRONYM : an(e, n));
572
+ function Ae(e, t, n) {
573
+ return e = ge(e, n), t = ge(t, n), t.length > e.length ? g.NO_MATCH : e === t ? g.CASE_SENSITIVE_EQUAL : (e = e.toLowerCase(), t = t.toLowerCase(), e === t ? g.EQUAL : e.startsWith(t) ? g.STARTS_WITH : e.includes(` ${t}`) ? g.WORD_STARTS_WITH : e.includes(t) ? g.CONTAINS : t.length === 1 ? g.NO_MATCH : st(e).includes(t) ? g.ACRONYM : at(e, t));
573
574
  }
574
- function sn(e) {
575
- let n = "";
575
+ function st(e) {
576
+ let t = "";
576
577
  return e.split(" ").forEach((r) => {
577
578
  r.split("-").forEach((c) => {
578
- n += c.substr(0, 1);
579
+ t += c.substr(0, 1);
579
580
  });
580
- }), n;
581
+ }), t;
581
582
  }
582
- function an(e, n) {
583
- let t = 0, r = 0;
583
+ function at(e, t) {
584
+ let n = 0, r = 0;
584
585
  function s(l, d, u) {
585
- for (let h = u, v = d.length; h < v; h++)
586
+ for (let h = u, E = d.length; h < E; h++)
586
587
  if (d[h] === l)
587
- return t += 1, h + 1;
588
+ return n += 1, h + 1;
588
589
  return -1;
589
590
  }
590
591
  function c(l) {
591
- const d = 1 / l, u = t / n.length;
592
+ const d = 1 / l, u = n / t.length;
592
593
  return g.MATCHES + u * d;
593
594
  }
594
- const i = s(n[0], e, 0);
595
+ const i = s(t[0], e, 0);
595
596
  if (i < 0)
596
597
  return g.NO_MATCH;
597
598
  r = i;
598
- for (let l = 1, d = n.length; l < d; l++) {
599
- const u = n[l];
599
+ for (let l = 1, d = t.length; l < d; l++) {
600
+ const u = t[l];
600
601
  if (r = s(u, e, r), !(r > -1))
601
602
  return g.NO_MATCH;
602
603
  }
603
604
  const o = r - i;
604
605
  return c(o);
605
606
  }
606
- function on(e, n, t) {
607
+ function ot(e, t, n) {
607
608
  const {
608
609
  rank: c,
609
610
  keyIndex: i
610
611
  } = e, {
611
612
  rank: o,
612
613
  keyIndex: l
613
- } = n;
614
- return c === o ? i === l ? t(e, n) : i < l ? -1 : 1 : c > o ? -1 : 1;
614
+ } = t;
615
+ return c === o ? i === l ? n(e, t) : i < l ? -1 : 1 : c > o ? -1 : 1;
615
616
  }
616
- function ge(e, n) {
617
+ function ge(e, t) {
617
618
  let {
618
- keepDiacritics: t
619
- } = n;
620
- return e = `${e}`, t || (e = nn(e)), e;
619
+ keepDiacritics: n
620
+ } = t;
621
+ return e = `${e}`, n || (e = tt(e)), e;
621
622
  }
622
- function ln(e, n) {
623
- typeof n == "object" && (n = n.key);
624
- let t;
625
- if (typeof n == "function")
626
- t = n(e);
623
+ function lt(e, t) {
624
+ typeof t == "object" && (t = t.key);
625
+ let n;
626
+ if (typeof t == "function")
627
+ n = t(e);
627
628
  else if (e == null)
628
- t = null;
629
- else if (Object.hasOwnProperty.call(e, n))
630
- t = e[n];
629
+ n = null;
630
+ else if (Object.hasOwnProperty.call(e, t))
631
+ n = e[t];
631
632
  else {
632
- if (n.includes("."))
633
- return cn(n, e);
634
- t = null;
633
+ if (t.includes("."))
634
+ return ct(t, e);
635
+ n = null;
635
636
  }
636
- return t == null ? [] : Array.isArray(t) ? t : [String(t)];
637
+ return n == null ? [] : Array.isArray(n) ? n : [String(n)];
637
638
  }
638
- function cn(e, n) {
639
- const t = e.split(".");
640
- let r = [n];
641
- for (let s = 0, c = t.length; s < c; s++) {
642
- const i = t[s];
639
+ function ct(e, t) {
640
+ const n = e.split(".");
641
+ let r = [t];
642
+ for (let s = 0, c = n.length; s < c; s++) {
643
+ const i = n[s];
643
644
  let o = [];
644
645
  for (let l = 0, d = r.length; l < d; l++) {
645
646
  const u = r[l];
@@ -653,108 +654,108 @@ function cn(e, n) {
653
654
  }
654
655
  return Array.isArray(r[0]) ? [].concat(...r) : r;
655
656
  }
656
- function un(e, n) {
657
- const t = [];
658
- for (let r = 0, s = n.length; r < s; r++) {
659
- const c = n[r], i = dn(c), o = ln(e, c);
657
+ function it(e, t) {
658
+ const n = [];
659
+ for (let r = 0, s = t.length; r < s; r++) {
660
+ const c = t[r], i = ut(c), o = lt(e, c);
660
661
  for (let l = 0, d = o.length; l < d; l++)
661
- t.push({
662
+ n.push({
662
663
  itemValue: o[l],
663
664
  attributes: i
664
665
  });
665
666
  }
666
- return t;
667
+ return n;
667
668
  }
668
669
  const Ie = {
669
670
  maxRanking: 1 / 0,
670
671
  minRanking: -1 / 0
671
672
  };
672
- function dn(e) {
673
+ function ut(e) {
673
674
  return typeof e == "string" ? Ie : {
674
675
  ...Ie,
675
676
  ...e
676
677
  };
677
678
  }
678
- const fn = "_indicators_83uuk_2", mn = "_open_83uuk_34", hn = "_disabled_83uuk_40", _n = "_root_83uuk_51", pn = "_clearable_83uuk_86", An = "_transparent_83uuk_104", gn = "_wrapper_83uuk_200", In = "_menu_83uuk_207", kn = "_item_83uuk_235", vn = "_highlighted_83uuk_249", En = "_selected_83uuk_252", On = "_multiple_83uuk_252", yn = "_allowUnselectFromList_83uuk_256", wn = "_tags_83uuk_264", ye = {
679
- indicators: fn,
680
- "size-xs": "_size-xs_83uuk_11",
681
- "dropdown-indicator": "_dropdown-indicator_83uuk_14",
682
- "styled-icon": "_styled-icon_83uuk_28",
683
- open: mn,
684
- disabled: hn,
685
- "input-wrapper": "_input-wrapper_83uuk_44",
686
- "icon-placement-right": "_icon-placement-right_83uuk_47",
687
- root: _n,
688
- "icon-placement-left": "_icon-placement-left_83uuk_83",
689
- "icon-placement-both": "_icon-placement-both_83uuk_83",
690
- clearable: pn,
691
- transparent: An,
692
- "variant-danger": "_variant-danger_83uuk_139",
693
- "variant-success": "_variant-success_83uuk_142",
694
- "variant-warning": "_variant-warning_83uuk_145",
695
- "size-lg": "_size-lg_83uuk_148",
696
- "size-md": "_size-md_83uuk_155",
697
- "size-sm": "_size-sm_83uuk_162",
698
- "icon-wrapper": "_icon-wrapper_83uuk_169",
699
- wrapper: gn,
700
- menu: In,
701
- item: kn,
702
- highlighted: vn,
703
- selected: En,
704
- multiple: On,
705
- allowUnselectFromList: yn,
706
- tags: wn,
707
- "styled-tag": "_styled-tag_83uuk_267"
708
- }, ke = Oe(ye);
709
- function Cn(e, n) {
710
- return /* @__PURE__ */ k("div", { className: ke("tags"), role: "list", children: e.map((t) => (
679
+ const dt = "_indicators_1tqnt_2", ft = "_open_1tqnt_34", mt = "_disabled_1tqnt_40", ht = "_root_1tqnt_51", _t = "_clearable_1tqnt_86", pt = "_transparent_1tqnt_104", At = "_wrapper_1tqnt_204", gt = "_menu_1tqnt_211", It = "_item_1tqnt_239", vt = "_highlighted_1tqnt_253", Et = "_selected_1tqnt_256", Ot = "_multiple_1tqnt_256", yt = "_allowUnselectFromList_1tqnt_260", wt = "_tags_1tqnt_268", we = {
680
+ indicators: dt,
681
+ "size-xs": "_size-xs_1tqnt_11",
682
+ "dropdown-indicator": "_dropdown-indicator_1tqnt_14",
683
+ "styled-icon": "_styled-icon_1tqnt_28",
684
+ open: ft,
685
+ disabled: mt,
686
+ "input-wrapper": "_input-wrapper_1tqnt_44",
687
+ "icon-placement-right": "_icon-placement-right_1tqnt_47",
688
+ root: ht,
689
+ "icon-placement-left": "_icon-placement-left_1tqnt_83",
690
+ "icon-placement-both": "_icon-placement-both_1tqnt_83",
691
+ clearable: _t,
692
+ transparent: pt,
693
+ "variant-danger": "_variant-danger_1tqnt_140",
694
+ "variant-success": "_variant-success_1tqnt_143",
695
+ "variant-warning": "_variant-warning_1tqnt_146",
696
+ "size-lg": "_size-lg_1tqnt_149",
697
+ "size-md": "_size-md_1tqnt_157",
698
+ "size-sm": "_size-sm_1tqnt_165",
699
+ "icon-wrapper": "_icon-wrapper_1tqnt_173",
700
+ wrapper: At,
701
+ menu: gt,
702
+ item: It,
703
+ highlighted: vt,
704
+ selected: Et,
705
+ multiple: Ot,
706
+ allowUnselectFromList: yt,
707
+ tags: wt,
708
+ "styled-tag": "_styled-tag_1tqnt_271"
709
+ }, ve = ye(we);
710
+ function Ct(e, t) {
711
+ return /* @__PURE__ */ v("div", { className: ve("tags"), role: "list", children: e.map((n) => (
711
712
  // TODO migrate after WUI-187/tag
712
- /* @__PURE__ */ k(
713
+ /* @__PURE__ */ v(
713
714
  Ge,
714
715
  {
715
- className: ke("styled-tag"),
716
- onRemove: () => n(t.value.toString()),
716
+ className: ve("styled-tag"),
717
+ onRemove: () => t(n.value.toString()),
717
718
  role: "listitem",
718
- children: t.label
719
+ children: n.label
719
720
  },
720
- t.value
721
+ n.value
721
722
  )
722
723
  )) });
723
724
  }
724
- const ee = "", xn = /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g, we = (e) => {
725
+ const ee = "", xt = /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g, Ce = (e) => {
725
726
  if (typeof e == "number")
726
727
  return String(e);
727
728
  if (typeof e == "string") {
728
- const n = e.match(xn);
729
- return n && n.map((t) => t.toLowerCase()).join("-");
729
+ const t = e.match(xt);
730
+ return t && t.map((n) => n.toLowerCase()).join("-");
730
731
  }
731
- }, ve = (e) => e ? e.label : ee, bn = (e) => e.reduce(
732
- (n, t) => t.label && n.length > t.label.length ? n : t.label,
732
+ }, Ee = (e) => e ? e.label : ee, Nt = (e) => e.reduce(
733
+ (t, n) => n.label && t.length > n.label.length ? t : n.label,
733
734
  ee
734
- ), Nn = (e, n, t) => {
735
- const r = n.find((s) => e.value === s.value);
736
- return r && t ? n.filter((s) => e.value !== s.value) : r ? n : [...n, e];
737
- }, q = (e, n) => !!n.find((t) => t.value === e), J = (e, n = []) => n.find(
735
+ ), bt = (e, t, n) => {
736
+ const r = t.find((s) => e.value === s.value);
737
+ return r && n ? t.filter((s) => e.value !== s.value) : r ? t : [...t, e];
738
+ }, Q = (e, t) => !!t.find((n) => n.value === e), J = (e, t = []) => t.find(
738
739
  (r) => r.label === (e.label || e) || r.value === (e.value || e)
739
- ) || { label: e, value: we(e) }, Rn = (e, n, t = !1) => {
740
- const r = t ? n.flatMap((s) => s.options) : n;
740
+ ) || { label: e, value: Ce(e) }, Rt = (e, t, n = !1) => {
741
+ const r = n ? t.flatMap((s) => s.options) : t;
741
742
  return !e && e !== 0 ? [] : Array.isArray(e) ? e.map((s) => J(s, r)) : [J(e, r)];
742
- }, Un = (e, n) => !!n.find((t) => t.value === e.value), Vn = (e, n) => Un(e, n) ? e.value : e.label, Ee = (e, n) => e ? e.map((t) => Vn(t, n)) : [], Sn = (e, n) => e ? e.filter(
743
- (t) => !n.find((r) => r.value === t.value)
744
- ) : [], Tn = ({
743
+ }, qt = (e, t) => !!t.find((n) => n.value === e.value), kt = (e, t) => qt(e, t) ? e.value : e.label, Oe = (e, t) => e ? e.map((n) => kt(n, t)) : [], St = (e, t) => e ? e.filter(
744
+ (n) => !t.find((r) => r.value === n.value)
745
+ ) : [], Ut = ({
745
746
  inputValue: e,
746
- isMultiple: n,
747
- isSearchable: t,
747
+ isMultiple: t,
748
+ isSearchable: n,
748
749
  options: r,
749
750
  renderItem: s
750
751
  }) => {
751
752
  const c = J(e, r);
752
- return n ? e : c.label ? t ? c.label : s(c) : ee;
753
- }, y = Oe(ye), Hn = me.default || me, Yn = Pe(
753
+ return t ? e : c.label ? n ? c.label : s(c) : ee;
754
+ }, w = ye(we), Vt = me.default || me, Tt = Le(
754
755
  ({
755
756
  allowUnselectFromList: e,
756
- autoComplete: n = "off",
757
- autoFocus: t,
757
+ autoComplete: t = "off",
758
+ autoFocus: n,
758
759
  className: r,
759
760
  dataTestId: s,
760
761
  disableCloseOnSelect: c,
@@ -764,142 +765,142 @@ const ee = "", xn = /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|
764
765
  iconPlacement: d = "left",
765
766
  id: u,
766
767
  isClearable: h,
767
- isCreatable: v,
768
+ isCreatable: E,
768
769
  isMultiple: p,
769
770
  isSearchable: m,
770
- name: U,
771
- onBlur: H,
772
- onChange: N,
773
- onClick: V,
774
- onCreate: Y,
775
- onFocus: Ce,
771
+ name: k,
772
+ onBlur: T,
773
+ onChange: R,
774
+ onClick: S,
775
+ onCreate: $,
776
+ onFocus: xe,
776
777
  options: I = [],
777
- placeholder: ne = "Choose from…",
778
- renderCreateItem: xe = (D) => `Create "${D}"`,
779
- renderGroupHeader: te,
780
- renderItem: z = ve,
781
- renderMultiple: be = Cn,
782
- size: F = "lg",
778
+ placeholder: te = "Choose from…",
779
+ renderCreateItem: Ne = (F) => `Create "${F}"`,
780
+ renderGroupHeader: ne,
781
+ renderItem: H = Ee,
782
+ renderMultiple: be = Ct,
783
+ size: z = "lg",
783
784
  transparent: re,
784
785
  value: se,
785
786
  variant: ae,
786
787
  ...oe
787
- }, Ne) => {
788
- const { getInputProps: D, variant: Re } = Ze(), le = Re || ae, M = $e(
789
- () => Rn(se, I, o),
788
+ }, Re) => {
789
+ const { getInputProps: F, variant: qe } = Xe(), le = qe || ae, D = Pe(
790
+ () => Rt(se, I, o),
790
791
  [se, I, o]
791
- ), B = !p && M[0] || null, X = B ? B.label : "", [C, Z] = $(M), [w, S] = $(X), [j, W] = $(I), [x, R] = $(!1);
792
- m = v || m;
793
- const [Q, Ue] = qe(Ne);
792
+ ), Y = !p && D[0] || null, B = Y ? Y.label : "", [x, X] = P(D), [C, U] = P(B), [M, j] = P(I), [N, q] = P(!1);
793
+ m = E || m;
794
+ const [Z, ke] = Qe(Re);
794
795
  he(() => {
795
- t && Q.current && (Q.current.focus(), m && R(!0));
796
- }, [m, t, Q]), he(() => {
797
- Z(M), S(X), W(I);
798
- }, [X, I, M]);
799
- const Ve = (a) => {
800
- if (m && a !== w) {
796
+ n && Z.current && (Z.current.focus(), m && q(!0));
797
+ }, [m, n, Z]), he(() => {
798
+ X(D), U(B), j(I);
799
+ }, [B, I, D]);
800
+ const Se = (a) => {
801
+ if (m && a !== C) {
801
802
  let f = [];
802
803
  o ? f = G(I, a, {
803
804
  // should match on group.label OR group.options.label
804
- keys: [(A) => A.label, (A) => A.options.map((E) => E.label)]
805
- }) : f = G(I, a, { keys: ["label"] }), S(a), W(f);
805
+ keys: [(A) => A.label, (A) => A.options.map((O) => O.label)]
806
+ }) : f = G(I, a, { keys: ["label"] }), U(a), j(f);
806
807
  }
807
- }, Se = () => {
808
- m && !x && R(!0);
808
+ }, Ue = () => {
809
+ m && !N && q(!0);
809
810
  }, ce = (a) => {
810
811
  let f = [];
811
- o ? f = Ee(
812
+ o ? f = Oe(
812
813
  a,
813
814
  I.flatMap((_) => _.options)
814
- ) : f = Ee(a, I);
815
- const A = p ? f : f[0], E = Qe({ name: U, value: p ? a : a[0] });
816
- if (N == null || N(A, E), v) {
817
- const _ = Sn(a, I);
818
- _.length && (Y == null || Y(_[0].label, E));
815
+ ) : f = Oe(a, I);
816
+ const A = p ? f : f[0], O = Ze({ name: k, value: p ? a : a[0] });
817
+ if (R == null || R(A, O), E) {
818
+ const _ = St(a, I);
819
+ _.length && ($ == null || $(_[0].label, O));
819
820
  }
820
- }, Te = (a) => {
821
+ }, Ve = (a) => {
821
822
  let f, A;
822
- !a || a != null && a.disabled ? (f = p ? C : [], A = !0) : (f = p ? Nn(a, C, e) : [a], A = p), A && S(""), W(I), Z(f), ce(f), c || R(!1);
823
+ !a || a != null && a.disabled ? (f = p ? x : [], A = !0) : (f = p ? bt(a, x, e) : [a], A = p), A && U(""), j(I), X(f), ce(f), c || q(!1);
824
+ }, Te = (a) => {
825
+ const f = x.filter((A) => A.value !== a);
826
+ X(f), ce(f);
823
827
  }, He = (a) => {
824
- const f = C.filter((A) => A.value !== a);
825
- Z(f), ce(f);
828
+ S == null || S(a), q(!N);
826
829
  }, ze = (a) => {
827
- V == null || V(a), R(!x);
828
- }, Fe = (a) => {
829
- p && a.selectedItem ? S("") : m && a.selectedItem && S(a.selectedItem.label), W(I), R(!1);
830
- }, De = bn(I), ie = Tn({
831
- inputValue: w,
830
+ p && a.selectedItem ? U("") : m && a.selectedItem && U(a.selectedItem.label), j(I), q(!1);
831
+ }, Fe = Nt(I), ie = Ut({
832
+ inputValue: C,
832
833
  isMultiple: p,
833
834
  isSearchable: m,
834
835
  options: I,
835
- renderItem: z
836
- }), Me = Ye(
836
+ renderItem: H
837
+ }), De = $e(
837
838
  ({
838
839
  getItemProps: a,
839
840
  highlightedIndex: f,
840
841
  options: A
841
842
  }) => A.reduce(
842
- (E, _, K) => {
843
+ (O, _, W) => {
843
844
  if (o && "options" in _)
844
- E.itemsToRender.push(
845
- /* @__PURE__ */ P(Be, { children: [
846
- te(_),
847
- _.options ? _.options.map((O) => {
848
- const b = E.itemIndex++, L = q(O.value, C);
849
- return /* @__PURE__ */ k(
845
+ O.itemsToRender.push(
846
+ /* @__PURE__ */ L(Ye, { children: [
847
+ ne(_),
848
+ _.options ? _.options.map((y) => {
849
+ const b = O.itemIndex++, K = Q(y.value, x);
850
+ return /* @__PURE__ */ v(
850
851
  "li",
851
852
  {
852
- className: y(
853
+ className: w(
853
854
  "item",
854
855
  f === b && "highlighted",
855
856
  p && "multiple",
856
857
  e && "allowUnselectFromList",
857
- O.disabled && "disabled",
858
- L && "selected"
858
+ y.disabled && "disabled",
859
+ K && "selected"
859
860
  ),
860
861
  ...a({
861
862
  index: b,
862
- item: O
863
+ item: y
863
864
  }),
864
- children: z(O, L)
865
+ children: H(y, K)
865
866
  },
866
- O.value
867
+ y.value
867
868
  );
868
869
  }) : null
869
870
  ] }, _.label)
870
871
  );
871
872
  else if ("value" in _) {
872
- const O = q(_.value, C), b = f === K;
873
- E.itemsToRender.push(
874
- /* @__PURE__ */ k(
873
+ const y = Q(_.value, x), b = f === W;
874
+ O.itemsToRender.push(
875
+ /* @__PURE__ */ v(
875
876
  "li",
876
877
  {
877
- className: y(
878
+ className: w(
878
879
  "item",
879
880
  b && "highlighted",
880
881
  p && "multiple",
881
882
  e && "allowUnselectFromList",
882
883
  _.disabled && "disabled",
883
- O && "selected"
884
+ y && "selected"
884
885
  ),
885
886
  ...a({
886
- index: K,
887
+ index: W,
887
888
  item: _
888
889
  }),
889
- children: z(_, O)
890
+ children: H(_, y)
890
891
  },
891
892
  _.value
892
893
  )
893
894
  );
894
895
  }
895
- return E;
896
+ return O;
896
897
  },
897
898
  { itemIndex: 0, itemsToRender: [] }
898
899
  ).itemsToRender,
899
- [p, e, C, o, te, z]
900
- ), ue = y(
900
+ [p, e, x, o, ne, H]
901
+ ), ue = w(
901
902
  "root",
902
- `size-${F}`,
903
+ `size-${z}`,
903
904
  le && `variant-${le}`,
904
905
  h && "clearable",
905
906
  re && "transparent",
@@ -907,104 +908,105 @@ const ee = "", xn = /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|
907
908
  r,
908
909
  i && "disabled"
909
910
  );
910
- return /* @__PURE__ */ k(
911
- Hn,
911
+ return /* @__PURE__ */ v(
912
+ Vt,
912
913
  {
913
914
  id: u,
914
915
  inputValue: m ? ie : "",
915
- isOpen: x,
916
- itemToString: ve,
917
- onInputValueChange: Ve,
918
- onOuterClick: Fe,
919
- onSelect: Te,
920
- selectedItem: B,
916
+ isOpen: N,
917
+ itemToString: Ee,
918
+ onInputValueChange: Se,
919
+ onOuterClick: ze,
920
+ onSelect: Ve,
921
+ selectedItem: Y,
921
922
  children: ({
922
923
  clearSelection: a,
923
924
  getInputProps: f,
924
925
  getItemProps: A,
925
- getMenuProps: E,
926
+ getMenuProps: O,
926
927
  getRootProps: _,
927
- getToggleButtonProps: K,
928
- highlightedIndex: O
928
+ getToggleButtonProps: W,
929
+ highlightedIndex: y
929
930
  }) => {
930
- const b = !!(v && w && !q(w, C)), L = x && (j.length || b), de = h && w, je = /* @__PURE__ */ k("div", { className: y("dropdown-indicator", x && "open"), children: /* @__PURE__ */ k(
931
- Xe,
931
+ const b = !!(E && C && !Q(C, x)), K = N && (M.length || b), de = h && C, Me = /* @__PURE__ */ v("div", { className: w("dropdown-indicator", N && "open"), children: /* @__PURE__ */ v(
932
+ Be,
932
933
  {
933
934
  animatePresence: !0,
934
935
  onClick: a,
935
936
  title: "Clear"
936
937
  }
937
- ) }), We = /* @__PURE__ */ k(
938
+ ) }), je = /* @__PURE__ */ v(
938
939
  "div",
939
940
  {
940
- className: y("dropdown-indicator", x && "open", i && "disabled"),
941
+ className: w("dropdown-indicator", N && "open", i && "disabled"),
941
942
  "data-testid": s ? `${s}-arrow-icon` : null,
942
943
  disabled: i,
943
944
  tabIndex: -1,
944
- ...K({
945
- onClick: () => !i && R(!x)
945
+ ...W({
946
+ onClick: () => !i && q(!N)
946
947
  }),
947
- children: /* @__PURE__ */ k(_e, { className: y("styled-icon"), name: "angle-down", size: "lg" })
948
+ children: /* @__PURE__ */ v(_e, { className: w("styled-icon"), name: "angle-down", size: "lg" })
948
949
  }
949
- ), Ke = _(oe, { suppressRefError: !0 }), fe = f({
950
- autoComplete: n,
951
- autoFocus: t,
952
- "data-spacer": De || ne,
950
+ ), We = _(oe, { suppressRefError: !0 }), fe = f({
951
+ autoComplete: t,
952
+ autoFocus: n,
953
+ "data-spacer": Fe || te,
953
954
  "data-testid": s,
954
955
  disabled: i,
955
956
  id: u,
956
- name: U,
957
- onBlur: H,
958
- onClick: i ? void 0 : ze,
959
- onFocus: Ce,
960
- onKeyDown: Se,
961
- placeholder: ne,
962
- ref: Ue,
963
- size: F,
957
+ name: k,
958
+ onBlur: T,
959
+ onClick: i ? void 0 : He,
960
+ onFocus: xe,
961
+ onKeyDown: Ue,
962
+ placeholder: te,
963
+ ref: ke,
964
+ size: z,
964
965
  tabIndex: 0,
965
966
  transparent: re,
966
- variant: x ? "focused" : ae,
967
+ variant: N ? "focused" : ae,
967
968
  ...oe
968
969
  });
969
- return /* @__PURE__ */ P("div", { ...Ke, className: y("wrapper", i && "disabled"), children: [
970
- m ? /* @__PURE__ */ k(
970
+ return /* @__PURE__ */ L("div", { ...We, className: w("wrapper", i && "disabled"), children: [
971
+ m ? /* @__PURE__ */ v(
971
972
  "input",
972
973
  {
973
974
  className: ue,
974
975
  type: "text",
975
- ...D(fe)
976
+ ...F(fe)
976
977
  }
977
- ) : /* @__PURE__ */ k("div", { className: ue, ...D(fe), children: ie }),
978
- l ? /* @__PURE__ */ k("div", { className: y("icon-wrapper", "icon-placement-left", `size-${F}`), children: /* @__PURE__ */ k(_e, { ...l.props, size: "md" }) }) : null,
979
- /* @__PURE__ */ P("div", { className: y("indicators", `size-${F}`), children: [
980
- de ? je : null,
981
- We
978
+ ) : /* @__PURE__ */ v("div", { className: ue, ...F(fe), children: ie }),
979
+ l ? /* @__PURE__ */ v("div", { className: w("icon-wrapper", "icon-placement-left", `size-${z}`), children: /* @__PURE__ */ v(_e, { ...l.props, size: "md" }) }) : null,
980
+ /* @__PURE__ */ L("div", { className: w("indicators", `size-${z}`), children: [
981
+ de ? Me : null,
982
+ je
982
983
  ] }),
983
- L ? /* @__PURE__ */ P("ul", { className: y("menu"), ...E(), children: [
984
- Me({ getItemProps: A, highlightedIndex: O, options: j }),
985
- b && w.length ? /* @__PURE__ */ k(
984
+ K ? /* @__PURE__ */ L("ul", { className: w("menu"), ...O(), children: [
985
+ De({ getItemProps: A, highlightedIndex: y, options: M }),
986
+ b && C.length ? /* @__PURE__ */ v(
986
987
  "li",
987
988
  {
988
- className: y("item", O === j.length && "highlighted"),
989
+ className: w("item", y === M.length && "highlighted"),
989
990
  ...A({
990
- index: j.length,
991
+ index: M.length,
991
992
  item: {
992
- label: w,
993
- value: we(w)
993
+ label: C,
994
+ value: Ce(C)
994
995
  }
995
996
  }),
996
- children: xe(w)
997
+ children: Ne(C)
997
998
  },
998
999
  "add"
999
1000
  ) : null
1000
1001
  ] }) : null,
1001
- p ? be(C, He) : null
1002
+ p ? be(x, Te) : null
1002
1003
  ] });
1003
1004
  }
1004
1005
  }
1005
1006
  );
1006
1007
  }
1007
1008
  );
1009
+ Tt.displayName = "Select";
1008
1010
  export {
1009
- Yn as Select
1011
+ Tt as Select
1010
1012
  };