welcome-ui 0.0.0-dev.1763389246174 → 0.0.0-dev.1763736449682

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 (128) hide show
  1. package/dist/2W3RN7C5-DMC82gDP.js +61 -0
  2. package/dist/{4I4MLMKD-z3Xm3qCo.js → 4I4MLMKD-BO6Lcy7s.js} +17 -17
  3. package/dist/Accordion.js +11 -10
  4. package/dist/Alert.js +39 -31
  5. package/dist/Avatar.js +12 -11
  6. package/dist/{B7UTNDHN-BDa2-8JK.js → B7UTNDHN-BghjolIs.js} +30 -30
  7. package/dist/Breadcrumb.js +75 -71
  8. package/dist/Button.css +1 -1
  9. package/dist/Button.js +42 -41
  10. package/dist/ButtonGroup.js +5 -4
  11. package/dist/Card.css +1 -1
  12. package/dist/Card.js +67 -15
  13. package/dist/Checkbox.js +29 -29
  14. package/dist/CloseButton.js +6 -5
  15. package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
  16. package/dist/{DSAASPLT-C-2xDjIv.js → DSAASPLT-Fx1kuAsk.js} +3 -3
  17. package/dist/DatePicker.js +81 -78
  18. package/dist/DateTimePicker.js +22 -21
  19. package/dist/Drawer.js +100 -80
  20. package/dist/DropdownMenu.css +1 -1
  21. package/dist/DropdownMenu.js +898 -462
  22. package/dist/FieldGroup.js +8 -7
  23. package/dist/FileDrop.js +183 -176
  24. package/dist/FileUpload.js +42 -40
  25. package/dist/{GVVKDT6A-C66-lr0B.js → GVVKDT6A-CF9ejW_c.js} +103 -103
  26. package/dist/Hint.js +8 -7
  27. package/dist/Icon.js +20 -15
  28. package/dist/InputText.css +1 -1
  29. package/dist/InputText.js +63 -62
  30. package/dist/{KPUWHTQJ-Byij2al4.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
  31. package/dist/Label.js +8 -7
  32. package/dist/Link.css +1 -1
  33. package/dist/Link.js +51 -48
  34. package/dist/Loader.js +11 -10
  35. package/dist/Logo.js +20 -13
  36. package/dist/Modal.js +144 -114
  37. package/dist/{NI3IVY7K-DpF3td-7.js → NI3IVY7K-Dy240mkD.js} +160 -160
  38. package/dist/{NMGNQVTG-BgAqqGOq.js → NMGNQVTG-DRO2uXZT.js} +6 -6
  39. package/dist/{OE2EFRVA-DkdhQLJL.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
  40. package/dist/{OLVWQA7U-wHytlFYu.js → OLVWQA7U-Dia3UUnG.js} +36 -36
  41. package/dist/Pagination.js +38 -37
  42. package/dist/PasswordInput.js +20 -17
  43. package/dist/Popover.js +88 -72
  44. package/dist/{RTNCFSKZ-LcIdBwa8.js → RTNCFSKZ-BywELldk.js} +42 -42
  45. package/dist/Radio.js +19 -19
  46. package/dist/RadioGroup.js +28 -27
  47. package/dist/RadioTab.js +1 -1
  48. package/dist/{SBSPVDDI-BoxPz2JY.js → SBSPVDDI-CmtnvvUX.js} +46 -46
  49. package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
  50. package/dist/Search.css +1 -1
  51. package/dist/Search.js +107 -101
  52. package/dist/Select.css +1 -1
  53. package/dist/Select.js +203 -202
  54. package/dist/Slider.js +65 -61
  55. package/dist/Stepper.js +33 -27
  56. package/dist/StickyNote.js +29 -23
  57. package/dist/Swiper.js +51 -50
  58. package/dist/{T22PY7TE-CzEDuEn1.js → T22PY7TE-gLuJpoOm.js} +46 -46
  59. package/dist/Table.js +33 -21
  60. package/dist/Tabs.js +160 -152
  61. package/dist/Tag.css +1 -1
  62. package/dist/Tag.js +69 -65
  63. package/dist/Text.js +3 -2
  64. package/dist/Textarea.css +1 -1
  65. package/dist/Textarea.js +25 -18
  66. package/dist/TimePicker.js +22 -21
  67. package/dist/Toast.js +226 -201
  68. package/dist/Toggle.js +15 -14
  69. package/dist/Tooltip.js +28 -27
  70. package/dist/VariantIcon.js +6 -5
  71. package/dist/VisuallyHidden.js +7 -6
  72. package/dist/WelcomeLoader.js +3 -2
  73. package/dist/XCKGTAUF-CJwwVibW.js +25 -0
  74. package/dist/{Y67KZUMI-BDyUNSJw.js → Y67KZUMI-BwLWwpNF.js} +2 -2
  75. package/dist/{ZTXFEM5L-CjFLRObi.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
  76. package/dist/types/components/Alert/components/Title.d.ts +4 -1
  77. package/dist/types/components/Alert/index.d.ts +4 -1
  78. package/dist/types/components/Card/Body.d.ts +2 -3
  79. package/dist/types/components/Card/Footer.d.ts +6 -0
  80. package/dist/types/components/Card/Header.d.ts +5 -0
  81. package/dist/types/components/Card/index.d.ts +7 -8
  82. package/dist/types/components/Card/types.d.ts +16 -3
  83. package/dist/types/components/Checkbox/index.d.ts +1 -2
  84. package/dist/types/components/Checkbox/types.d.ts +3 -1
  85. package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
  86. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
  87. package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
  88. package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
  89. package/dist/types/components/Drawer/components/Close.d.ts +4 -1
  90. package/dist/types/components/Drawer/components/Title.d.ts +4 -1
  91. package/dist/types/components/Drawer/index.d.ts +12 -3
  92. package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
  93. package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
  94. package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
  95. package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
  96. package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
  97. package/dist/types/components/DropdownMenu/index.d.ts +11 -0
  98. package/dist/types/components/DropdownMenu/types.d.ts +26 -5
  99. package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
  100. package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
  101. package/dist/types/components/Icon/icons.d.ts +4 -3
  102. package/dist/types/components/Loader/index.d.ts +4 -1
  103. package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
  104. package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
  105. package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
  106. package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
  107. package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
  108. package/dist/types/components/Modal/Assets/index.d.ts +16 -4
  109. package/dist/types/components/Modal/components/Close.d.ts +4 -1
  110. package/dist/types/components/Modal/index.d.ts +16 -4
  111. package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
  112. package/dist/types/components/Popover/Arrow.d.ts +4 -1
  113. package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
  114. package/dist/types/components/RadioGroup/index.d.ts +4 -1
  115. package/dist/types/components/Stepper/index.d.ts +8 -2
  116. package/dist/types/components/StickyNote/components/Button.d.ts +4 -1
  117. package/dist/types/components/StickyNote/components/Title.d.ts +4 -1
  118. package/dist/types/components/StickyNote/index.d.ts +8 -2
  119. package/dist/types/components/Swiper/index.d.ts +4 -1
  120. package/dist/types/components/Table/index.d.ts +20 -5
  121. package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
  122. package/dist/types/components/Tag/types.d.ts +4 -2
  123. package/dist/types/components/Textarea/types.d.ts +1 -0
  124. package/dist/types/components/Toast/index.d.ts +4 -1
  125. package/package.json +1 -1
  126. package/dist/2W3RN7C5-uG7eBeTQ.js +0 -61
  127. package/dist/SQZLCNLX-CUlXoT69.js +0 -82
  128. package/dist/XCKGTAUF-CahZE721.js +0 -25
package/dist/Select.js CHANGED
@@ -1,18 +1,18 @@
1
1
  "use client";
2
2
  import './Select.css';
3
- import { jsx as k, jsxs as P } from "react/jsx-runtime";
4
- import { D as me } from "./downshift.esm-xtYanIDi.js";
5
- import { g as Le, c as Oe } from "./index-PAaZGbyz.js";
6
- import { forwardRef as Pe, useMemo as $e, useState as $, useEffect as he, useCallback as Ye, Fragment as Be } from "react";
7
- import { CloseButton as Xe } from "./CloseButton.js";
8
- import { useField as Ze } from "./Field.js";
3
+ import { jsx as v, jsxs as L } from "react/jsx-runtime";
4
+ import { D as fe } 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";
9
9
  import { Icon as _e } from "./Icon.js";
10
- import { c as Qe } from "./create-event-rXDe5aCQ.js";
11
- 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";
12
12
  import { Tag as Ge } from "./Tag.js";
13
- var T = { exports: {} }, pe;
13
+ var V = { exports: {} }, pe;
14
14
  function Je() {
15
- if (pe) return T.exports;
15
+ if (pe) return V.exports;
16
16
  pe = 1;
17
17
  var e = {
18
18
  À: "A",
@@ -483,10 +483,10 @@ function Je() {
483
483
  }, i = function(o) {
484
484
  return !!o.match(r);
485
485
  };
486
- 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;
487
487
  }
488
488
  var en = Je();
489
- const nn = /* @__PURE__ */ Le(en);
489
+ const nn = /* @__PURE__ */ Ke(en);
490
490
  /**
491
491
  * @name match-sorter
492
492
  * @license MIT license.
@@ -509,24 +509,24 @@ function G(e, n, t) {
509
509
  keys: r,
510
510
  threshold: s = g.MATCHES,
511
511
  baseSort: c = tn,
512
- sorter: i = (d) => d.sort((u, h) => on(u, h, c))
512
+ sorter: i = (m) => m.sort((u, h) => on(u, h, c))
513
513
  } = t, o = e.reduce(l, []);
514
- return i(o).map((d) => {
514
+ return i(o).map((m) => {
515
515
  let {
516
516
  item: u
517
- } = d;
517
+ } = m;
518
518
  return u;
519
519
  });
520
- function l(d, u, h) {
521
- const v = rn(u, r, n, t), {
520
+ function l(m, u, h) {
521
+ const E = rn(u, r, n, t), {
522
522
  rank: p,
523
- keyThreshold: m = s
524
- } = v;
525
- return p >= m && d.push({
526
- ...v,
523
+ keyThreshold: f = s
524
+ } = E;
525
+ return p >= f && m.push({
526
+ ...E,
527
527
  item: u,
528
528
  index: h
529
- }), d;
529
+ }), m;
530
530
  }
531
531
  }
532
532
  G.rankings = g;
@@ -544,20 +544,20 @@ function rn(e, n, t, r) {
544
544
  return un(e, n).reduce((c, i, o) => {
545
545
  let {
546
546
  rank: l,
547
- rankedValue: d,
547
+ rankedValue: m,
548
548
  keyIndex: u,
549
549
  keyThreshold: h
550
550
  } = c, {
551
- itemValue: v,
551
+ itemValue: E,
552
552
  attributes: p
553
- } = i, m = Ae(v, t, r), U = d;
553
+ } = i, f = Ae(E, t, r), k = m;
554
554
  const {
555
- minRanking: H,
556
- maxRanking: N,
557
- threshold: V
555
+ minRanking: T,
556
+ maxRanking: R,
557
+ threshold: S
558
558
  } = p;
559
- return m < H && m >= g.MATCHES ? m = H : m > N && (m = N), m > l && (l = m, u = o, h = V, U = v), {
560
- rankedValue: U,
559
+ return f < T && f >= g.MATCHES ? f = T : f > R && (f = R), f > l && (l = f, u = o, h = S, k = E), {
560
+ rankedValue: k,
561
561
  rank: l,
562
562
  keyIndex: u,
563
563
  keyThreshold: h
@@ -582,21 +582,21 @@ function sn(e) {
582
582
  }
583
583
  function an(e, n) {
584
584
  let t = 0, r = 0;
585
- function s(l, d, u) {
586
- for (let h = u, v = d.length; h < v; h++)
587
- if (d[h] === l)
585
+ function s(l, m, u) {
586
+ for (let h = u, E = m.length; h < E; h++)
587
+ if (m[h] === l)
588
588
  return t += 1, h + 1;
589
589
  return -1;
590
590
  }
591
591
  function c(l) {
592
- const d = 1 / l, u = t / n.length;
593
- return g.MATCHES + u * d;
592
+ const m = 1 / l, u = t / n.length;
593
+ return g.MATCHES + u * m;
594
594
  }
595
595
  const i = s(n[0], e, 0);
596
596
  if (i < 0)
597
597
  return g.NO_MATCH;
598
598
  r = i;
599
- for (let l = 1, d = n.length; l < d; l++) {
599
+ for (let l = 1, m = n.length; l < m; l++) {
600
600
  const u = n[l];
601
601
  if (r = s(u, e, r), !(r > -1))
602
602
  return g.NO_MATCH;
@@ -642,7 +642,7 @@ function cn(e, n) {
642
642
  for (let s = 0, c = t.length; s < c; s++) {
643
643
  const i = t[s];
644
644
  let o = [];
645
- for (let l = 0, d = r.length; l < d; l++) {
645
+ for (let l = 0, m = r.length; l < m; l++) {
646
646
  const u = r[l];
647
647
  if (u != null)
648
648
  if (Object.hasOwnProperty.call(u, i)) {
@@ -657,8 +657,8 @@ function cn(e, n) {
657
657
  function un(e, n) {
658
658
  const t = [];
659
659
  for (let r = 0, s = n.length; r < s; r++) {
660
- const c = n[r], i = dn(c), o = ln(e, c);
661
- for (let l = 0, d = o.length; l < d; l++)
660
+ const c = n[r], i = mn(c), o = ln(e, c);
661
+ for (let l = 0, m = o.length; l < m; l++)
662
662
  t.push({
663
663
  itemValue: o[l],
664
664
  attributes: i
@@ -670,50 +670,50 @@ const Ie = {
670
670
  maxRanking: 1 / 0,
671
671
  minRanking: -1 / 0
672
672
  };
673
- function dn(e) {
673
+ function mn(e) {
674
674
  return typeof e == "string" ? Ie : {
675
675
  ...Ie,
676
676
  ...e
677
677
  };
678
678
  }
679
- 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 = {
680
- indicators: fn,
681
- "size-xs": "_size-xs_83uuk_11",
682
- "dropdown-indicator": "_dropdown-indicator_83uuk_14",
683
- "styled-icon": "_styled-icon_83uuk_28",
684
- open: mn,
679
+ const dn = "_indicators_1q51m_2", fn = "_open_1q51m_34", hn = "_disabled_1q51m_40", _n = "_root_1q51m_51", pn = "_clearable_1q51m_86", An = "_transparent_1q51m_104", gn = "_wrapper_1q51m_200", In = "_menu_1q51m_207", vn = "_item_1q51m_235", En = "_highlighted_1q51m_249", On = "_selected_1q51m_252", yn = "_multiple_1q51m_252", wn = "_allowUnselectFromList_1q51m_256", Cn = "_tags_1q51m_264", we = {
680
+ indicators: dn,
681
+ "size-xs": "_size-xs_1q51m_11",
682
+ "dropdown-indicator": "_dropdown-indicator_1q51m_14",
683
+ "styled-icon": "_styled-icon_1q51m_28",
684
+ open: fn,
685
685
  disabled: hn,
686
- "input-wrapper": "_input-wrapper_83uuk_44",
687
- "icon-placement-right": "_icon-placement-right_83uuk_47",
686
+ "input-wrapper": "_input-wrapper_1q51m_44",
687
+ "icon-placement-right": "_icon-placement-right_1q51m_47",
688
688
  root: _n,
689
- "icon-placement-left": "_icon-placement-left_83uuk_83",
690
- "icon-placement-both": "_icon-placement-both_83uuk_83",
689
+ "icon-placement-left": "_icon-placement-left_1q51m_83",
690
+ "icon-placement-both": "_icon-placement-both_1q51m_83",
691
691
  clearable: pn,
692
692
  transparent: An,
693
- "variant-danger": "_variant-danger_83uuk_139",
694
- "variant-success": "_variant-success_83uuk_142",
695
- "variant-warning": "_variant-warning_83uuk_145",
696
- "size-lg": "_size-lg_83uuk_148",
697
- "size-md": "_size-md_83uuk_155",
698
- "size-sm": "_size-sm_83uuk_162",
699
- "icon-wrapper": "_icon-wrapper_83uuk_169",
693
+ "variant-danger": "_variant-danger_1q51m_139",
694
+ "variant-success": "_variant-success_1q51m_142",
695
+ "variant-warning": "_variant-warning_1q51m_145",
696
+ "size-lg": "_size-lg_1q51m_148",
697
+ "size-md": "_size-md_1q51m_155",
698
+ "size-sm": "_size-sm_1q51m_162",
699
+ "icon-wrapper": "_icon-wrapper_1q51m_169",
700
700
  wrapper: gn,
701
701
  menu: In,
702
- item: kn,
703
- highlighted: vn,
704
- selected: En,
705
- multiple: On,
706
- allowUnselectFromList: yn,
707
- tags: wn,
708
- "styled-tag": "_styled-tag_83uuk_267"
709
- }, ke = Oe(ye);
710
- function Cn(e, n) {
711
- return /* @__PURE__ */ k("div", { className: ke("tags"), role: "list", children: e.map((t) => (
702
+ item: vn,
703
+ highlighted: En,
704
+ selected: On,
705
+ multiple: yn,
706
+ allowUnselectFromList: wn,
707
+ tags: Cn,
708
+ "styled-tag": "_styled-tag_1q51m_267"
709
+ }, ve = ye(we);
710
+ function xn(e, n) {
711
+ return /* @__PURE__ */ v("div", { className: ve("tags"), role: "list", children: e.map((t) => (
712
712
  // TODO migrate after WUI-187/tag
713
- /* @__PURE__ */ k(
713
+ /* @__PURE__ */ v(
714
714
  Ge,
715
715
  {
716
- className: ke("styled-tag"),
716
+ className: ve("styled-tag"),
717
717
  onRemove: () => n(t.value.toString()),
718
718
  role: "listitem",
719
719
  children: t.label
@@ -722,27 +722,27 @@ function Cn(e, n) {
722
722
  )
723
723
  )) });
724
724
  }
725
- 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 = "", Nn = /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g, Ce = (e) => {
726
726
  if (typeof e == "number")
727
727
  return String(e);
728
728
  if (typeof e == "string") {
729
- const n = e.match(xn);
729
+ const n = e.match(Nn);
730
730
  return n && n.map((t) => t.toLowerCase()).join("-");
731
731
  }
732
- }, ve = (e) => e ? e.label : ee, bn = (e) => e.reduce(
732
+ }, Ee = (e) => e ? e.label : ee, bn = (e) => e.reduce(
733
733
  (n, t) => t.label && n.length > t.label.length ? n : t.label,
734
734
  ee
735
- ), Nn = (e, n, t) => {
735
+ ), Rn = (e, n, t) => {
736
736
  const r = n.find((s) => e.value === s.value);
737
737
  return r && t ? n.filter((s) => e.value !== s.value) : r ? n : [...n, e];
738
- }, q = (e, n) => !!n.find((t) => t.value === e), J = (e, n = []) => n.find(
738
+ }, Q = (e, n) => !!n.find((t) => t.value === e), J = (e, n = []) => n.find(
739
739
  (r) => r.label === (e.label || e) || r.value === (e.value || e)
740
- ) || { label: e, value: we(e) }, Rn = (e, n, t = !1) => {
740
+ ) || { label: e, value: Ce(e) }, qn = (e, n, t = !1) => {
741
741
  const r = t ? n.flatMap((s) => s.options) : n;
742
742
  return !e && e !== 0 ? [] : Array.isArray(e) ? e.map((s) => J(s, r)) : [J(e, r)];
743
- }, 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
+ }, kn = (e, n) => !!n.find((t) => t.value === e.value), Sn = (e, n) => kn(e, n) ? e.value : e.label, Oe = (e, n) => e ? e.map((t) => Sn(t, n)) : [], Un = (e, n) => e ? e.filter(
744
744
  (t) => !n.find((r) => r.value === t.value)
745
- ) : [], Tn = ({
745
+ ) : [], Vn = ({
746
746
  inputValue: e,
747
747
  isMultiple: n,
748
748
  isSearchable: t,
@@ -751,7 +751,7 @@ const ee = "", xn = /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|
751
751
  }) => {
752
752
  const c = J(e, r);
753
753
  return n ? e : c.label ? t ? c.label : s(c) : ee;
754
- }, y = Oe(ye), Hn = me.default || me, Yn = Pe(
754
+ }, w = ye(we), Tn = fe.default || fe, Hn = Le(
755
755
  ({
756
756
  allowUnselectFromList: e,
757
757
  autoComplete: n = "off",
@@ -762,250 +762,251 @@ const ee = "", xn = /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|
762
762
  disabled: i,
763
763
  groupsEnabled: o,
764
764
  icon: l,
765
- iconPlacement: d = "left",
765
+ iconPlacement: m = "left",
766
766
  id: u,
767
767
  isClearable: h,
768
- isCreatable: v,
768
+ isCreatable: E,
769
769
  isMultiple: p,
770
- isSearchable: m,
771
- name: U,
772
- onBlur: H,
773
- onChange: N,
774
- onClick: V,
775
- onCreate: Y,
776
- onFocus: Ce,
770
+ isSearchable: f,
771
+ name: k,
772
+ onBlur: T,
773
+ onChange: R,
774
+ onClick: S,
775
+ onCreate: $,
776
+ onFocus: xe,
777
777
  options: I = [],
778
778
  placeholder: ne = "Choose from…",
779
- renderCreateItem: xe = (D) => `Create "${D}"`,
779
+ renderCreateItem: Ne = (F) => `Create "${F}"`,
780
780
  renderGroupHeader: te,
781
- renderItem: z = ve,
782
- renderMultiple: be = Cn,
783
- size: F = "lg",
781
+ renderItem: H = Ee,
782
+ renderMultiple: be = xn,
783
+ size: z = "lg",
784
784
  transparent: re,
785
785
  value: se,
786
786
  variant: ae,
787
787
  ...oe
788
- }, Ne) => {
789
- const { getInputProps: D, variant: Re } = Ze(), le = Re || ae, M = $e(
790
- () => Rn(se, I, o),
788
+ }, Re) => {
789
+ const { getInputProps: F, variant: qe } = Xe(), le = qe || ae, D = Pe(
790
+ () => qn(se, I, o),
791
791
  [se, I, o]
792
- ), B = !p && M[0] || null, X = B ? B.label : "", [C, Z] = $(M), [w, S] = $(X), [j, W] = $(I), [x, R] = $(!1);
793
- m = v || m;
794
- 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
+ f = E || f;
794
+ const [Z, ke] = Qe(Re);
795
795
  he(() => {
796
- t && Q.current && (Q.current.focus(), m && R(!0));
797
- }, [m, t, Q]), he(() => {
798
- Z(M), S(X), W(I);
799
- }, [X, I, M]);
800
- const Ve = (a) => {
801
- if (m && a !== w) {
802
- let f = [];
803
- o ? f = G(I, a, {
796
+ t && Z.current && (Z.current.focus(), f && q(!0));
797
+ }, [f, t, Z]), he(() => {
798
+ X(D), U(B), j(I);
799
+ }, [B, I, D]);
800
+ const Se = (a) => {
801
+ if (f && a !== C) {
802
+ let d = [];
803
+ o ? d = G(I, a, {
804
804
  // should match on group.label OR group.options.label
805
- keys: [(A) => A.label, (A) => A.options.map((E) => E.label)]
806
- }) : f = G(I, a, { keys: ["label"] }), S(a), W(f);
805
+ keys: [(A) => A.label, (A) => A.options.map((O) => O.label)]
806
+ }) : d = G(I, a, { keys: ["label"] }), U(a), j(d);
807
807
  }
808
- }, Se = () => {
809
- m && !x && R(!0);
808
+ }, Ue = () => {
809
+ f && !N && q(!0);
810
810
  }, ce = (a) => {
811
- let f = [];
812
- o ? f = Ee(
811
+ let d = [];
812
+ o ? d = Oe(
813
813
  a,
814
814
  I.flatMap((_) => _.options)
815
- ) : f = Ee(a, I);
816
- const A = p ? f : f[0], E = Qe({ name: U, value: p ? a : a[0] });
817
- if (N == null || N(A, E), v) {
818
- const _ = Sn(a, I);
819
- _.length && (Y == null || Y(_[0].label, E));
815
+ ) : d = Oe(a, I);
816
+ const A = p ? d : d[0], O = Ze({ name: k, value: p ? a : a[0] });
817
+ if (R == null || R(A, O), E) {
818
+ const _ = Un(a, I);
819
+ _.length && ($ == null || $(_[0].label, O));
820
820
  }
821
+ }, Ve = (a) => {
822
+ let d, A;
823
+ !a || a != null && a.disabled ? (d = p ? x : [], A = !0) : (d = p ? Rn(a, x, e) : [a], A = p), A && U(""), j(I), X(d), ce(d), c || q(!1);
821
824
  }, Te = (a) => {
822
- let f, A;
823
- !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);
825
+ const d = x.filter((A) => A.value !== a);
826
+ X(d), ce(d);
824
827
  }, He = (a) => {
825
- const f = C.filter((A) => A.value !== a);
826
- Z(f), ce(f);
828
+ S == null || S(a), q(!N);
827
829
  }, ze = (a) => {
828
- V == null || V(a), R(!x);
829
- }, Fe = (a) => {
830
- p && a.selectedItem ? S("") : m && a.selectedItem && S(a.selectedItem.label), W(I), R(!1);
831
- }, De = bn(I), ie = Tn({
832
- inputValue: w,
830
+ p && a.selectedItem ? U("") : f && a.selectedItem && U(a.selectedItem.label), j(I), q(!1);
831
+ }, Fe = bn(I), ie = Vn({
832
+ inputValue: C,
833
833
  isMultiple: p,
834
- isSearchable: m,
834
+ isSearchable: f,
835
835
  options: I,
836
- renderItem: z
837
- }), Me = Ye(
836
+ renderItem: H
837
+ }), De = $e(
838
838
  ({
839
839
  getItemProps: a,
840
- highlightedIndex: f,
840
+ highlightedIndex: d,
841
841
  options: A
842
842
  }) => A.reduce(
843
- (E, _, K) => {
843
+ (O, _, W) => {
844
844
  if (o && "options" in _)
845
- E.itemsToRender.push(
846
- /* @__PURE__ */ P(Be, { children: [
845
+ O.itemsToRender.push(
846
+ /* @__PURE__ */ L(Ye, { children: [
847
847
  te(_),
848
- _.options ? _.options.map((O) => {
849
- const b = E.itemIndex++, L = q(O.value, C);
850
- return /* @__PURE__ */ k(
848
+ _.options ? _.options.map((y) => {
849
+ const b = O.itemIndex++, K = Q(y.value, x);
850
+ return /* @__PURE__ */ v(
851
851
  "li",
852
852
  {
853
- className: y(
853
+ className: w(
854
854
  "item",
855
- f === b && "highlighted",
855
+ d === b && "highlighted",
856
856
  p && "multiple",
857
857
  e && "allowUnselectFromList",
858
- O.disabled && "disabled",
859
- L && "selected"
858
+ y.disabled && "disabled",
859
+ K && "selected"
860
860
  ),
861
861
  ...a({
862
862
  index: b,
863
- item: O
863
+ item: y
864
864
  }),
865
- children: z(O, L)
865
+ children: H(y, K)
866
866
  },
867
- O.value
867
+ y.value
868
868
  );
869
869
  }) : null
870
870
  ] }, _.label)
871
871
  );
872
872
  else if ("value" in _) {
873
- const O = q(_.value, C), b = f === K;
874
- E.itemsToRender.push(
875
- /* @__PURE__ */ k(
873
+ const y = Q(_.value, x), b = d === W;
874
+ O.itemsToRender.push(
875
+ /* @__PURE__ */ v(
876
876
  "li",
877
877
  {
878
- className: y(
878
+ className: w(
879
879
  "item",
880
880
  b && "highlighted",
881
881
  p && "multiple",
882
882
  e && "allowUnselectFromList",
883
883
  _.disabled && "disabled",
884
- O && "selected"
884
+ y && "selected"
885
885
  ),
886
886
  ...a({
887
- index: K,
887
+ index: W,
888
888
  item: _
889
889
  }),
890
- children: z(_, O)
890
+ children: H(_, y)
891
891
  },
892
892
  _.value
893
893
  )
894
894
  );
895
895
  }
896
- return E;
896
+ return O;
897
897
  },
898
898
  { itemIndex: 0, itemsToRender: [] }
899
899
  ).itemsToRender,
900
- [p, e, C, o, te, z]
901
- ), ue = y(
900
+ [p, e, x, o, te, H]
901
+ ), ue = w(
902
902
  "root",
903
- `size-${F}`,
903
+ `size-${z}`,
904
904
  le && `variant-${le}`,
905
905
  h && "clearable",
906
906
  re && "transparent",
907
- l && `icon-placement-${d}`,
907
+ l && `icon-placement-${m}`,
908
908
  r,
909
909
  i && "disabled"
910
910
  );
911
- return /* @__PURE__ */ k(
912
- Hn,
911
+ return /* @__PURE__ */ v(
912
+ Tn,
913
913
  {
914
914
  id: u,
915
- inputValue: m ? ie : "",
916
- isOpen: x,
917
- itemToString: ve,
918
- onInputValueChange: Ve,
919
- onOuterClick: Fe,
920
- onSelect: Te,
921
- selectedItem: B,
915
+ inputValue: f ? ie : "",
916
+ isOpen: N,
917
+ itemToString: Ee,
918
+ onInputValueChange: Se,
919
+ onOuterClick: ze,
920
+ onSelect: Ve,
921
+ selectedItem: Y,
922
922
  children: ({
923
923
  clearSelection: a,
924
- getInputProps: f,
924
+ getInputProps: d,
925
925
  getItemProps: A,
926
- getMenuProps: E,
926
+ getMenuProps: O,
927
927
  getRootProps: _,
928
- getToggleButtonProps: K,
929
- highlightedIndex: O
928
+ getToggleButtonProps: W,
929
+ highlightedIndex: y
930
930
  }) => {
931
- 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(
932
- Xe,
931
+ const b = !!(E && C && !Q(C, x)), K = N && (M.length || b), me = h && C, Me = /* @__PURE__ */ v("div", { className: w("dropdown-indicator", N && "open"), children: /* @__PURE__ */ v(
932
+ Be,
933
933
  {
934
934
  animatePresence: !0,
935
935
  onClick: a,
936
936
  title: "Clear"
937
937
  }
938
- ) }), We = /* @__PURE__ */ k(
938
+ ) }), je = /* @__PURE__ */ v(
939
939
  "div",
940
940
  {
941
- className: y("dropdown-indicator", x && "open", i && "disabled"),
941
+ className: w("dropdown-indicator", N && "open", i && "disabled"),
942
942
  "data-testid": s ? `${s}-arrow-icon` : null,
943
943
  disabled: i,
944
944
  tabIndex: -1,
945
- ...K({
946
- onClick: () => !i && R(!x)
945
+ ...W({
946
+ onClick: () => !i && q(!N)
947
947
  }),
948
- 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" })
949
949
  }
950
- ), Ke = _(oe, { suppressRefError: !0 }), fe = f({
950
+ ), We = _(oe, { suppressRefError: !0 }), de = d({
951
951
  autoComplete: n,
952
952
  autoFocus: t,
953
- "data-spacer": De || ne,
953
+ "data-spacer": Fe || ne,
954
954
  "data-testid": s,
955
955
  disabled: i,
956
956
  id: u,
957
- name: U,
958
- onBlur: H,
959
- onClick: i ? void 0 : ze,
960
- onFocus: Ce,
961
- onKeyDown: Se,
957
+ name: k,
958
+ onBlur: T,
959
+ onClick: i ? void 0 : He,
960
+ onFocus: xe,
961
+ onKeyDown: Ue,
962
962
  placeholder: ne,
963
- ref: Ue,
964
- size: F,
963
+ ref: ke,
964
+ size: z,
965
965
  tabIndex: 0,
966
966
  transparent: re,
967
- variant: x ? "focused" : ae,
967
+ variant: N ? "focused" : ae,
968
968
  ...oe
969
969
  });
970
- return /* @__PURE__ */ P("div", { ...Ke, className: y("wrapper", i && "disabled"), children: [
971
- m ? /* @__PURE__ */ k(
970
+ return /* @__PURE__ */ L("div", { ...We, className: w("wrapper", i && "disabled"), children: [
971
+ f ? /* @__PURE__ */ v(
972
972
  "input",
973
973
  {
974
974
  className: ue,
975
975
  type: "text",
976
- ...D(fe)
976
+ ...F(de)
977
977
  }
978
- ) : /* @__PURE__ */ k("div", { className: ue, ...D(fe), children: ie }),
979
- l ? /* @__PURE__ */ k("div", { className: y("icon-wrapper", "icon-placement-left", `size-${F}`), children: /* @__PURE__ */ k(_e, { ...l.props, size: "md" }) }) : null,
980
- /* @__PURE__ */ P("div", { className: y("indicators", `size-${F}`), children: [
981
- de ? je : null,
982
- We
978
+ ) : /* @__PURE__ */ v("div", { className: ue, ...F(de), 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
+ me ? Me : null,
982
+ je
983
983
  ] }),
984
- L ? /* @__PURE__ */ P("ul", { className: y("menu"), ...E(), children: [
985
- Me({ getItemProps: A, highlightedIndex: O, options: j }),
986
- 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(
987
987
  "li",
988
988
  {
989
- className: y("item", O === j.length && "highlighted"),
989
+ className: w("item", y === M.length && "highlighted"),
990
990
  ...A({
991
- index: j.length,
991
+ index: M.length,
992
992
  item: {
993
- label: w,
994
- value: we(w)
993
+ label: C,
994
+ value: Ce(C)
995
995
  }
996
996
  }),
997
- children: xe(w)
997
+ children: Ne(C)
998
998
  },
999
999
  "add"
1000
1000
  ) : null
1001
1001
  ] }) : null,
1002
- p ? be(C, He) : null
1002
+ p ? be(x, Te) : null
1003
1003
  ] });
1004
1004
  }
1005
1005
  }
1006
1006
  );
1007
1007
  }
1008
1008
  );
1009
+ Hn.displayName = "Select";
1009
1010
  export {
1010
- Yn as Select
1011
+ Hn as Select
1011
1012
  };