welcome-ui 9.0.12 → 9.0.14

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/Select.css CHANGED
@@ -1 +1 @@
1
- @layer components{._indicators_cxg1w_2{position:absolute;padding:0;top:0;height:var(--select-height, 100%);right:var(--indicators-right, var(--spacing-md));display:flex;gap:var(--spacing-xs)}._indicators_cxg1w_2._size-xs_cxg1w_11{--indicators-right: var(--spacing-sm)}._dropdown-indicator_cxg1w_14{position:relative;height:100%;padding:0;outline:none!important;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;border:none;background:transparent;display:flex;align-items:center;justify-content:center}._dropdown-indicator_cxg1w_14 ._styled-icon_cxg1w_27{transform:none;transition-property:transform;transition-duration:var(--duration-medium);transition-timing-function:var(--timing-primary)}._dropdown-indicator_cxg1w_14._open_cxg1w_33 ._styled-icon_cxg1w_27{transform:rotate3d(0,0,1,180deg)}._dropdown-indicator_cxg1w_14:not(:last-child){width:auto}._dropdown-indicator_cxg1w_14:disabled{color:var(--color-beige-60)}._input-wrapper_cxg1w_42{position:relative}._input-wrapper_cxg1w_42:has(>._icon-placement-right_cxg1w_45) ._indicators_cxg1w_2{--indicators-right: calc(var(--spacing-lg) + var(--spacing-md) * 2)}._root_cxg1w_49{--select-placeholder-color: var(--color-neutral-60);background-color:var(--select-background-color, var(--color-neutral-10));border-color:var(--select-border-color, var(--color-neutral-30));border-radius:var(--radius-md);border-style:solid;border-width:var(--border-width-sm);color:var(--select-text-color, var(--color-neutral-90));font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:var(--line-height-16);outline:2px solid var(--select-outline-color, transparent);cursor:default;width:100%;transition-property:all;transition-timing-function:var(--timing-primary);transition-duration:var(--duration-medium);height:var(--select-height);padding-bottom:var(--select-padding-bottom);padding-left:var(--select-padding-left);padding-right:var(--select-padding-right);padding-top:var(--select-padding-top);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._root_cxg1w_49._icon-placement-left_cxg1w_80,._root_cxg1w_49._icon-placement-both_cxg1w_80{padding-left:calc(var(--select-padding-left) + var(--select-icon-size, 1rem) + var(--spacing-sm))}._root_cxg1w_49._clearable_cxg1w_83,._root_cxg1w_49._icon-placement-right_cxg1w_45,._root_cxg1w_49._icon-placement-both_cxg1w_80{padding-right:calc(var(--select-padding-right) + var(--select-icon-size, 1rem) + var(--spacing-sm))}._root_cxg1w_49._clearable_cxg1w_83._icon-placement-right_cxg1w_45,._root_cxg1w_49._clearable_cxg1w_83._icon-placement-both_cxg1w_80{padding-right:calc(var(--select-padding-right) + (var(--select-icon-size, 1rem) + var(--spacing-sm)) * 2)}._root_cxg1w_49:disabled{--select-background-color: var(--select-color-beige-40);--select-text-color: var(--select-color-beige-70);cursor:not-allowed}._root_cxg1w_49:hover:not([class*=variant]){--select-border-color: var(--color-brand-40)}._root_cxg1w_49:focus:not([class*=variant]){--select-outline-color: var(--color-brand-20);--select-border-color: var(--color-brand-40)}._root_cxg1w_49._transparent_cxg1w_101{--select-border-color: transparent;--select-background-color: transparent}._root_cxg1w_49._transparent_cxg1w_101:hover{--select-border-color: var(--color-neutral-20)}._root_cxg1w_49::placeholder{color:var(--select-placeholder-color)}._root_cxg1w_49 br{display:none}._root_cxg1w_49:before{content:attr(data-spacer);visibility:hidden;display:block;height:0}._root_cxg1w_49:empty:after{content:attr(placeholder);position:absolute;top:0;right:0;bottom:0;left:0;padding:inherit;color:var(--select-placeholder-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._root_cxg1w_49:empty:before{height:auto}._variant-danger_cxg1w_136{--select-border-color: var(--color-red-70);--select-outline-color: var(--color-red-30)}._variant-success_cxg1w_140{--select-border-color: var(--color-green-60);--select-outline-color: var(--color-green-30)}._variant-warning_cxg1w_144{--select-border-color: var(--color-orange-60);--select-outline-color: var(--color-orange-20)}._size-lg_cxg1w_148{--select-height: var(--height-48);--select-padding-bottom: var(--spacing-16);--select-padding-left: var(--spacing-12);--select-padding-right: var(--spacing-12);--select-padding-top: var(--spacing-16)}._size-md_cxg1w_155{--select-height: var(--height-40);--select-padding-bottom: var(--spacing-12);--select-padding-left: var(--spacing-12);--select-padding-right: var(--spacing-12);--select-padding-top: var(--spacing-12)}._size-sm_cxg1w_162{--select-height: var(--height-32);--select-padding-bottom: var(--spacing-8);--select-padding-left: var(--spacing-12);--select-padding-right: var(--spacing-12);--select-padding-top: var(--spacing-8)}._size-xs_cxg1w_11{--select-height: var(--height-24);--select-padding-bottom: var(--spacing-4);--select-padding-left: var(--spacing-8);--select-padding-right: var(--spacing-8);--select-padding-top: var(--spacing-4);--select-icon-size: .75rem}._icon-wrapper_cxg1w_177{position:absolute;top:0;left:var(--icon-placement-left, auto);right:var(--icon-placement-right, auto);bottom:0;display:flex;justify-content:center;align-items:center;pointer-events:none;transition-property:all;transition-timing-function:var(--timing-primary);transition-duration:var(--duration-medium);color:var(--color-neutral-90)}._icon-wrapper_cxg1w_177._icon-placement-left_cxg1w_80{--icon-placement-left: var(--spacing-md)}._icon-wrapper_cxg1w_177._icon-placement-left_cxg1w_80._size-xs_cxg1w_11{--icon-placement-left: var(--spacing-sm)}._icon-wrapper_cxg1w_177._icon-placement-right_cxg1w_45{--icon-placement-right: var(--spacing-md)}._icon-wrapper_cxg1w_177._icon-placement-right_cxg1w_45._size-xs_cxg1w_11{--icon-placement-right: var(--spacing-sm)}._icon-wrapper_cxg1w_177>button{pointer-events:auto}._wrapper_cxg1w_208{position:relative;width:100%}._wrapper_cxg1w_208._disabled_cxg1w_212 ._icon-wrapper_cxg1w_177{color:var(--color-beige-60)}._menu_cxg1w_215{max-height:9.6875rem;background-color:var(--color-neutral-10);border-color:var(--color-neutral-30);border-radius:var(--radius-md);border-style:solid;border-width:var(--border-width-sm);color:var(--color-neutral-90);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:var(--line-height-16);outline:none;position:absolute;z-index:2;right:0;left:0;margin:0;margin-top:var(--spacing-md);padding:0;transition-property:all;transition-timing-function:var(--timing-primary);transition-duration:var(--duration-medium);overflow:auto;-webkit-overflow-scrolling:touch}._menu_cxg1w_215:hover>*{cursor:pointer}._item_cxg1w_243{color:var(--item-text-color, var(--color-beige-70));cursor:var(--item-cursor, default);padding:var(--spacing-md);list-style:none;text-decoration:none;font-size:var(--font-size-sm);transition-property:background;transition-duration:var(--duration-medium);transition-timing-function:var(--timing-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._item_cxg1w_243._highlighted_cxg1w_257{background-color:var(--color-beige-20)}._item_cxg1w_243._selected_cxg1w_260:not(._multiple_cxg1w_260){--item-text-color: var(--color-neutral-90);font-weight:var(--font-weight-bold)}._item_cxg1w_243._selected_cxg1w_260._multiple_cxg1w_260:not(._allowUnselectFromList_cxg1w_264){--item-text-color: var(--color-beige-40);--item-cursor: not-allowed}._item_cxg1w_243._disabled_cxg1w_212{--item-text-color: var(--color-beige-60);--item-cursor: not-allowed}._tags_cxg1w_272{margin-top:var(--spacing-lg)}._tags_cxg1w_272 ._styled-tag_cxg1w_275:not(:last-child){margin-right:var(--spacing-sm);margin-bottom:var(--spacing-sm)}._tags_cxg1w_272:empty{display:none}}
1
+ @layer components{._indicators_yx7jd_2{position:absolute;padding:0;top:0;height:var(--select-height, 100%);right:var(--indicators-right, var(--spacing-md));display:flex;gap:var(--spacing-xs)}._indicators_yx7jd_2._size-xs_yx7jd_11{--indicators-right: var(--spacing-sm)}._dropdown-indicator_yx7jd_14{position:relative;height:100%;padding:0;outline:none!important;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;border:none;background:transparent;display:flex;align-items:center;justify-content:center}._dropdown-indicator_yx7jd_14 ._styled-icon_yx7jd_27{transform:none;transition-property:transform;transition-duration:var(--duration-medium);transition-timing-function:var(--timing-primary)}._dropdown-indicator_yx7jd_14._open_yx7jd_33 ._styled-icon_yx7jd_27{transform:rotate3d(0,0,1,180deg)}._dropdown-indicator_yx7jd_14:not(:last-child){width:auto}._dropdown-indicator_yx7jd_14:disabled{color:var(--color-beige-60)}._input-wrapper_yx7jd_42{position:relative}._input-wrapper_yx7jd_42:has(>._icon-placement-right_yx7jd_45) ._indicators_yx7jd_2{--indicators-right: calc(var(--spacing-lg) + var(--spacing-md) * 2)}._root_yx7jd_49{--select-placeholder-color: var(--color-neutral-60);background-color:var(--select-background-color, var(--color-neutral-10));border-color:var(--select-border-color, var(--color-neutral-30));border-radius:var(--radius-md);border-style:solid;border-width:var(--border-width-sm);color:var(--select-text-color, var(--color-neutral-90));font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:var(--line-height-16);outline:2px solid var(--select-outline-color, transparent);cursor:default;width:100%;transition-property:all;transition-timing-function:var(--timing-primary);transition-duration:var(--duration-medium);height:var(--select-height);padding-bottom:var(--select-padding-bottom);padding-left:var(--select-padding-left);padding-right:var(--select-padding-right);padding-top:var(--select-padding-top);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._root_yx7jd_49._icon-placement-left_yx7jd_80,._root_yx7jd_49._icon-placement-both_yx7jd_80{padding-left:calc(var(--select-padding-left) + var(--select-icon-size, 1rem) + var(--spacing-sm))}._root_yx7jd_49._clearable_yx7jd_83,._root_yx7jd_49._icon-placement-right_yx7jd_45,._root_yx7jd_49._icon-placement-both_yx7jd_80{padding-right:calc(var(--select-padding-right) + var(--select-icon-size, 1rem) + var(--spacing-sm))}._root_yx7jd_49._clearable_yx7jd_83._icon-placement-right_yx7jd_45,._root_yx7jd_49._clearable_yx7jd_83._icon-placement-both_yx7jd_80{padding-right:calc(var(--select-padding-right) + (var(--select-icon-size, 1rem) + var(--spacing-sm)) * 2)}._root_yx7jd_49:disabled,._root_yx7jd_49._disabled_yx7jd_89{--select-background-color: var(--color-beige-30);--select-text-color: var(--color-beige-60);cursor:not-allowed}._root_yx7jd_49:hover:not([class*=variant]){--select-border-color: var(--color-brand-40)}._root_yx7jd_49:focus:not([class*=variant]){--select-outline-color: var(--color-brand-20);--select-border-color: var(--color-brand-40)}._root_yx7jd_49._transparent_yx7jd_101{--select-border-color: transparent;--select-background-color: transparent}._root_yx7jd_49._transparent_yx7jd_101:hover{--select-border-color: var(--color-neutral-20)}._root_yx7jd_49::placeholder{color:var(--select-placeholder-color)}._root_yx7jd_49 br{display:none}._root_yx7jd_49:before{content:attr(data-spacer);visibility:hidden;display:block;height:0}._root_yx7jd_49:empty:after{content:attr(placeholder);position:absolute;top:0;right:0;bottom:0;left:0;padding:inherit;color:var(--select-placeholder-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._root_yx7jd_49:empty:before{height:auto}._variant-danger_yx7jd_136{--select-border-color: var(--color-red-70);--select-outline-color: var(--color-red-30)}._variant-success_yx7jd_140{--select-border-color: var(--color-green-60);--select-outline-color: var(--color-green-30)}._variant-warning_yx7jd_144{--select-border-color: var(--color-orange-60);--select-outline-color: var(--color-orange-20)}._size-lg_yx7jd_148{--select-height: var(--height-48);--select-padding-bottom: var(--spacing-16);--select-padding-left: var(--spacing-12);--select-padding-right: var(--spacing-12);--select-padding-top: var(--spacing-16)}._size-md_yx7jd_155{--select-height: var(--height-40);--select-padding-bottom: var(--spacing-12);--select-padding-left: var(--spacing-12);--select-padding-right: var(--spacing-12);--select-padding-top: var(--spacing-12)}._size-sm_yx7jd_162{--select-height: var(--height-32);--select-padding-bottom: var(--spacing-8);--select-padding-left: var(--spacing-12);--select-padding-right: var(--spacing-12);--select-padding-top: var(--spacing-8)}._size-xs_yx7jd_11{--select-height: var(--height-24);--select-padding-bottom: var(--spacing-4);--select-padding-left: var(--spacing-8);--select-padding-right: var(--spacing-8);--select-padding-top: var(--spacing-4);--select-icon-size: .75rem}._icon-wrapper_yx7jd_177{position:absolute;top:0;left:var(--icon-placement-left, auto);right:var(--icon-placement-right, auto);bottom:0;display:flex;justify-content:center;align-items:center;pointer-events:none;transition-property:all;transition-timing-function:var(--timing-primary);transition-duration:var(--duration-medium);color:var(--color-neutral-90);height:var(--select-height, 100%)}._icon-wrapper_yx7jd_177._icon-placement-left_yx7jd_80{--icon-placement-left: var(--spacing-md)}._icon-wrapper_yx7jd_177._icon-placement-left_yx7jd_80._size-xs_yx7jd_11{--icon-placement-left: var(--spacing-sm)}._icon-wrapper_yx7jd_177._icon-placement-right_yx7jd_45{--icon-placement-right: var(--spacing-md)}._icon-wrapper_yx7jd_177._icon-placement-right_yx7jd_45._size-xs_yx7jd_11{--icon-placement-right: var(--spacing-sm)}._icon-wrapper_yx7jd_177>button{pointer-events:auto}._wrapper_yx7jd_209{position:relative;width:100%}._wrapper_yx7jd_209._disabled_yx7jd_89{pointer-events:none}._wrapper_yx7jd_209._disabled_yx7jd_89 ._icon-wrapper_yx7jd_177{color:var(--color-beige-60)}._wrapper_yx7jd_209._disabled_yx7jd_89 ._root_yx7jd_49{--select-background-color: var(--color-beige-30);--select-text-color: var(--color-beige-60);cursor:not-allowed}._menu_yx7jd_224{max-height:9.6875rem;background-color:var(--color-neutral-10);border-color:var(--color-neutral-30);border-radius:var(--radius-md);border-style:solid;border-width:var(--border-width-sm);color:var(--color-neutral-90);font-size:var(--font-size-sm);font-weight:var(--font-weight-regular);line-height:var(--line-height-16);outline:none;position:absolute;z-index:2;right:0;left:0;margin:0;margin-top:var(--spacing-md);padding:0;transition-property:all;transition-timing-function:var(--timing-primary);transition-duration:var(--duration-medium);overflow:auto;-webkit-overflow-scrolling:touch}._menu_yx7jd_224:hover>*{cursor:pointer}._wrapper_yx7jd_209._disabled_yx7jd_89 ._menu_yx7jd_224,._wrapper_yx7jd_209[aria-disabled=true] ._menu_yx7jd_224{pointer-events:none}._item_yx7jd_256{color:var(--item-text-color, var(--color-beige-70));cursor:var(--item-cursor, default);padding:var(--spacing-md);list-style:none;text-decoration:none;font-size:var(--font-size-sm);transition-property:background;transition-duration:var(--duration-medium);transition-timing-function:var(--timing-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._item_yx7jd_256._highlighted_yx7jd_270{background-color:var(--color-beige-20)}._item_yx7jd_256._selected_yx7jd_273:not(._multiple_yx7jd_273){--item-text-color: var(--color-neutral-90);font-weight:var(--font-weight-bold)}._item_yx7jd_256._selected_yx7jd_273._multiple_yx7jd_273:not(._allowUnselectFromList_yx7jd_277){--item-text-color: var(--color-beige-40);--item-cursor: not-allowed}._item_yx7jd_256._disabled_yx7jd_89{--item-text-color: var(--color-beige-60);--item-cursor: not-allowed}._tags_yx7jd_285{margin-top:var(--spacing-lg)}._tags_yx7jd_285 ._styled-tag_yx7jd_288:not(:last-child){margin-right:var(--spacing-sm);margin-bottom:var(--spacing-sm)}._tags_yx7jd_285:empty{display:none}}
package/dist/Select.js CHANGED
@@ -1,19 +1,19 @@
1
1
  "use client";
2
- import { jsx as I, jsxs as P } from "react/jsx-runtime";
3
- import { D as me, F as Ke } from "./field-icon-size-Cj-yrCqM.js";
4
- import { g as Pe, c as Ee } from "./index-PAaZGbyz.js";
5
- import $e, { forwardRef as Ye, useMemo as Be, useState as $, useEffect as _e, useCallback as Ze, Fragment as Xe } from "react";
6
- import { CloseButton as Qe } from "./CloseButton.js";
7
- import { useField as qe } from "./Field.js";
2
+ import { jsx as I, jsxs as K } from "react/jsx-runtime";
3
+ import { D as _e, F as Ke } from "./field-icon-size-Cj-yrCqM.js";
4
+ import { g as $e, c as Ee } from "./index-PAaZGbyz.js";
5
+ import Ye, { forwardRef as Be, useMemo as Ze, useState as $, useEffect as he, useCallback as Xe, Fragment as Qe } from "react";
6
+ import { CloseButton as qe } from "./CloseButton.js";
7
+ import { useField as Ge } from "./Field.js";
8
8
  import "./Icon-BisRi8B3.js";
9
- import { D as Ge } from "./index-CTgip19b.js";
10
- import { c as Je } from "./create-event-rXDe5aCQ.js";
11
- import { u as en } from "./useForkRef-D807AV7D.js";
12
- import { Tag as nn } from "./Tag.js";
13
- var H = { exports: {} }, he;
14
- function tn() {
15
- if (he) return H.exports;
16
- he = 1;
9
+ import { D as Je } from "./index-CTgip19b.js";
10
+ import { c as en } from "./create-event-rXDe5aCQ.js";
11
+ import { u as nn } from "./useForkRef-D807AV7D.js";
12
+ import { Tag as tn } from "./Tag.js";
13
+ var T = { exports: {} }, pe;
14
+ function rn() {
15
+ if (pe) return T.exports;
16
+ pe = 1;
17
17
  var e = {
18
18
  À: "A",
19
19
  Á: "A",
@@ -475,25 +475,25 @@ function tn() {
475
475
  ё: "е",
476
476
  Ё: "Е"
477
477
  }, n = Object.keys(e).join("|"), t = new RegExp(n, "g"), r = new RegExp(n, "");
478
- function s(a) {
479
- return e[a];
478
+ function o(c) {
479
+ return e[c];
480
480
  }
481
- var l = function(a) {
482
- return a.replace(t, s);
483
- }, i = function(a) {
484
- return !!a.match(r);
481
+ var i = function(c) {
482
+ return c.replace(t, o);
483
+ }, s = function(c) {
484
+ return !!c.match(r);
485
485
  };
486
- return H.exports = l, H.exports.has = i, H.exports.remove = l, H.exports;
486
+ return T.exports = i, T.exports.has = s, T.exports.remove = i, T.exports;
487
487
  }
488
- var rn = tn();
489
- const sn = /* @__PURE__ */ Pe(rn);
488
+ var sn = rn();
489
+ const on = /* @__PURE__ */ $e(sn);
490
490
  /**
491
491
  * @name match-sorter
492
492
  * @license MIT license.
493
493
  * @copyright (c) 2020 Kent C. Dodds
494
494
  * @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)
495
495
  */
496
- const A = {
496
+ const y = {
497
497
  CASE_SENSITIVE_EQUAL: 7,
498
498
  EQUAL: 6,
499
499
  STARTS_WITH: 5,
@@ -502,125 +502,125 @@ const A = {
502
502
  ACRONYM: 2,
503
503
  MATCHES: 1,
504
504
  NO_MATCH: 0
505
- }, cn = (e, n) => String(e.rankedValue).localeCompare(String(n.rankedValue));
505
+ }, an = (e, n) => String(e.rankedValue).localeCompare(String(n.rankedValue));
506
506
  function G(e, n, t) {
507
507
  t === void 0 && (t = {});
508
508
  const {
509
509
  keys: r,
510
- threshold: s = A.MATCHES,
511
- baseSort: l = cn,
512
- sorter: i = (d) => d.sort((u, _) => un(u, _, l))
513
- } = t, a = e.reduce(o, []);
514
- return i(a).map((d) => {
510
+ threshold: o = y.MATCHES,
511
+ baseSort: i = an,
512
+ sorter: s = (d) => d.sort((u, _) => dn(u, _, i))
513
+ } = t, c = e.reduce(l, []);
514
+ return s(c).map((d) => {
515
515
  let {
516
516
  item: u
517
517
  } = d;
518
518
  return u;
519
519
  });
520
- function o(d, u, _) {
521
- const x = an(u, r, n, t), {
522
- rank: g,
523
- keyThreshold: m = s
520
+ function l(d, u, _) {
521
+ const x = cn(u, r, n, t), {
522
+ rank: p,
523
+ keyThreshold: m = o
524
524
  } = x;
525
- return g >= m && d.push({
525
+ return p >= m && d.push({
526
526
  ...x,
527
527
  item: u,
528
528
  index: _
529
529
  }), d;
530
530
  }
531
531
  }
532
- G.rankings = A;
533
- function an(e, n, t, r) {
532
+ G.rankings = y;
533
+ function cn(e, n, t, r) {
534
534
  if (!n) {
535
- const l = e;
535
+ const i = e;
536
536
  return {
537
537
  // ends up being duplicate of 'item' in matches but consistent
538
- rankedValue: l,
539
- rank: ge(l, t, r),
538
+ rankedValue: i,
539
+ rank: Ae(i, t, r),
540
540
  keyIndex: -1,
541
541
  keyThreshold: r.threshold
542
542
  };
543
543
  }
544
- return mn(e, n).reduce((l, i, a) => {
544
+ return _n(e, n).reduce((i, s, c) => {
545
545
  let {
546
- rank: o,
546
+ rank: l,
547
547
  rankedValue: d,
548
548
  keyIndex: u,
549
549
  keyThreshold: _
550
- } = l, {
550
+ } = i, {
551
551
  itemValue: x,
552
- attributes: g
553
- } = i, m = ge(x, t, r), k = d;
552
+ attributes: p
553
+ } = s, m = Ae(x, t, r), k = d;
554
554
  const {
555
- minRanking: D,
555
+ minRanking: H,
556
556
  maxRanking: R,
557
557
  threshold: U
558
- } = g;
559
- return m < D && m >= A.MATCHES ? m = D : m > R && (m = R), m > o && (o = m, u = a, _ = U, k = x), {
558
+ } = p;
559
+ return m < H && m >= y.MATCHES ? m = H : m > R && (m = R), m > l && (l = m, u = c, _ = U, k = x), {
560
560
  rankedValue: k,
561
- rank: o,
561
+ rank: l,
562
562
  keyIndex: u,
563
563
  keyThreshold: _
564
564
  };
565
565
  }, {
566
566
  rankedValue: e,
567
- rank: A.NO_MATCH,
567
+ rank: y.NO_MATCH,
568
568
  keyIndex: -1,
569
569
  keyThreshold: r.threshold
570
570
  });
571
571
  }
572
- function ge(e, n, t) {
573
- return e = pe(e, t), n = pe(n, t), n.length > e.length ? A.NO_MATCH : e === n ? A.CASE_SENSITIVE_EQUAL : (e = e.toLowerCase(), n = n.toLowerCase(), e === n ? A.EQUAL : e.startsWith(n) ? A.STARTS_WITH : e.includes(` ${n}`) ? A.WORD_STARTS_WITH : e.includes(n) ? A.CONTAINS : n.length === 1 ? A.NO_MATCH : on(e).includes(n) ? A.ACRONYM : ln(e, n));
572
+ function Ae(e, n, t) {
573
+ return e = ye(e, t), n = ye(n, t), n.length > e.length ? y.NO_MATCH : e === n ? y.CASE_SENSITIVE_EQUAL : (e = e.toLowerCase(), n = n.toLowerCase(), e === n ? y.EQUAL : e.startsWith(n) ? y.STARTS_WITH : e.includes(` ${n}`) ? y.WORD_STARTS_WITH : e.includes(n) ? y.CONTAINS : n.length === 1 ? y.NO_MATCH : ln(e).includes(n) ? y.ACRONYM : un(e, n));
574
574
  }
575
- function on(e) {
575
+ function ln(e) {
576
576
  let n = "";
577
577
  return e.split(" ").forEach((r) => {
578
- r.split("-").forEach((l) => {
579
- n += l.substr(0, 1);
578
+ r.split("-").forEach((i) => {
579
+ n += i.substr(0, 1);
580
580
  });
581
581
  }), n;
582
582
  }
583
- function ln(e, n) {
583
+ function un(e, n) {
584
584
  let t = 0, r = 0;
585
- function s(o, d, u) {
585
+ function o(l, d, u) {
586
586
  for (let _ = u, x = d.length; _ < x; _++)
587
- if (d[_] === o)
587
+ if (d[_] === l)
588
588
  return t += 1, _ + 1;
589
589
  return -1;
590
590
  }
591
- function l(o) {
592
- const d = 1 / o, u = t / n.length;
593
- return A.MATCHES + u * d;
591
+ function i(l) {
592
+ const d = 1 / l, u = t / n.length;
593
+ return y.MATCHES + u * d;
594
594
  }
595
- const i = s(n[0], e, 0);
596
- if (i < 0)
597
- return A.NO_MATCH;
598
- r = i;
599
- for (let o = 1, d = n.length; o < d; o++) {
600
- const u = n[o];
601
- if (r = s(u, e, r), !(r > -1))
602
- return A.NO_MATCH;
595
+ const s = o(n[0], e, 0);
596
+ if (s < 0)
597
+ return y.NO_MATCH;
598
+ r = s;
599
+ for (let l = 1, d = n.length; l < d; l++) {
600
+ const u = n[l];
601
+ if (r = o(u, e, r), !(r > -1))
602
+ return y.NO_MATCH;
603
603
  }
604
- const a = r - i;
605
- return l(a);
604
+ const c = r - s;
605
+ return i(c);
606
606
  }
607
- function un(e, n, t) {
607
+ function dn(e, n, t) {
608
608
  const {
609
- rank: l,
610
- keyIndex: i
609
+ rank: i,
610
+ keyIndex: s
611
611
  } = e, {
612
- rank: a,
613
- keyIndex: o
612
+ rank: c,
613
+ keyIndex: l
614
614
  } = n;
615
- return l === a ? i === o ? t(e, n) : i < o ? -1 : 1 : l > a ? -1 : 1;
615
+ return i === c ? s === l ? t(e, n) : s < l ? -1 : 1 : i > c ? -1 : 1;
616
616
  }
617
- function pe(e, n) {
617
+ function ye(e, n) {
618
618
  let {
619
619
  keepDiacritics: t
620
620
  } = n;
621
- return e = `${e}`, t || (e = sn(e)), e;
621
+ return e = `${e}`, t || (e = on(e)), e;
622
622
  }
623
- function dn(e, n) {
623
+ function fn(e, n) {
624
624
  typeof n == "object" && (n = n.key);
625
625
  let t;
626
626
  if (typeof n == "function")
@@ -631,89 +631,89 @@ function dn(e, n) {
631
631
  t = e[n];
632
632
  else {
633
633
  if (n.includes("."))
634
- return fn(n, e);
634
+ return mn(n, e);
635
635
  t = null;
636
636
  }
637
637
  return t == null ? [] : Array.isArray(t) ? t : [String(t)];
638
638
  }
639
- function fn(e, n) {
639
+ function mn(e, n) {
640
640
  const t = e.split(".");
641
641
  let r = [n];
642
- for (let s = 0, l = t.length; s < l; s++) {
643
- const i = t[s];
644
- let a = [];
645
- for (let o = 0, d = r.length; o < d; o++) {
646
- const u = r[o];
642
+ for (let o = 0, i = t.length; o < i; o++) {
643
+ const s = t[o];
644
+ let c = [];
645
+ for (let l = 0, d = r.length; l < d; l++) {
646
+ const u = r[l];
647
647
  if (u != null)
648
- if (Object.hasOwnProperty.call(u, i)) {
649
- const _ = u[i];
650
- _ != null && a.push(_);
651
- } else i === "*" && (a = a.concat(u));
648
+ if (Object.hasOwnProperty.call(u, s)) {
649
+ const _ = u[s];
650
+ _ != null && c.push(_);
651
+ } else s === "*" && (c = c.concat(u));
652
652
  }
653
- r = a;
653
+ r = c;
654
654
  }
655
655
  return Array.isArray(r[0]) ? [].concat(...r) : r;
656
656
  }
657
- function mn(e, n) {
657
+ function _n(e, n) {
658
658
  const t = [];
659
- for (let r = 0, s = n.length; r < s; r++) {
660
- const l = n[r], i = _n(l), a = dn(e, l);
661
- for (let o = 0, d = a.length; o < d; o++)
659
+ for (let r = 0, o = n.length; r < o; r++) {
660
+ const i = n[r], s = hn(i), c = fn(e, i);
661
+ for (let l = 0, d = c.length; l < d; l++)
662
662
  t.push({
663
- itemValue: a[o],
664
- attributes: i
663
+ itemValue: c[l],
664
+ attributes: s
665
665
  });
666
666
  }
667
667
  return t;
668
668
  }
669
- const Ae = {
669
+ const ge = {
670
670
  maxRanking: 1 / 0,
671
671
  minRanking: -1 / 0
672
672
  };
673
- function _n(e) {
674
- return typeof e == "string" ? Ae : {
675
- ...Ae,
673
+ function hn(e) {
674
+ return typeof e == "string" ? ge : {
675
+ ...ge,
676
676
  ...e
677
677
  };
678
678
  }
679
- const hn = "_indicators_cxg1w_2", gn = "_open_cxg1w_33", pn = "_root_cxg1w_49", An = "_clearable_cxg1w_83", wn = "_transparent_cxg1w_101", In = "_wrapper_cxg1w_208", xn = "_disabled_cxg1w_212", En = "_menu_cxg1w_215", vn = "_item_cxg1w_243", On = "_highlighted_cxg1w_257", yn = "_selected_cxg1w_260", Cn = "_multiple_cxg1w_260", bn = "_allowUnselectFromList_cxg1w_264", Nn = "_tags_cxg1w_272", ve = {
680
- indicators: hn,
681
- "size-xs": "_size-xs_cxg1w_11",
682
- "dropdown-indicator": "_dropdown-indicator_cxg1w_14",
683
- "styled-icon": "_styled-icon_cxg1w_27",
684
- open: gn,
685
- "input-wrapper": "_input-wrapper_cxg1w_42",
686
- "icon-placement-right": "_icon-placement-right_cxg1w_45",
687
- root: pn,
688
- "icon-placement-left": "_icon-placement-left_cxg1w_80",
689
- "icon-placement-both": "_icon-placement-both_cxg1w_80",
690
- clearable: An,
691
- transparent: wn,
692
- "variant-danger": "_variant-danger_cxg1w_136",
693
- "variant-success": "_variant-success_cxg1w_140",
694
- "variant-warning": "_variant-warning_cxg1w_144",
695
- "size-lg": "_size-lg_cxg1w_148",
696
- "size-md": "_size-md_cxg1w_155",
697
- "size-sm": "_size-sm_cxg1w_162",
698
- "icon-wrapper": "_icon-wrapper_cxg1w_177",
699
- wrapper: In,
700
- disabled: xn,
679
+ const pn = "_indicators_yx7jd_2", An = "_open_yx7jd_33", yn = "_root_yx7jd_49", gn = "_clearable_yx7jd_83", In = "_disabled_yx7jd_89", xn = "_transparent_yx7jd_101", vn = "_wrapper_yx7jd_209", En = "_menu_yx7jd_224", On = "_item_yx7jd_256", wn = "_highlighted_yx7jd_270", jn = "_selected_yx7jd_273", Cn = "_multiple_yx7jd_273", Nn = "_allowUnselectFromList_yx7jd_277", Rn = "_tags_yx7jd_285", Oe = {
680
+ indicators: pn,
681
+ "size-xs": "_size-xs_yx7jd_11",
682
+ "dropdown-indicator": "_dropdown-indicator_yx7jd_14",
683
+ "styled-icon": "_styled-icon_yx7jd_27",
684
+ open: An,
685
+ "input-wrapper": "_input-wrapper_yx7jd_42",
686
+ "icon-placement-right": "_icon-placement-right_yx7jd_45",
687
+ root: yn,
688
+ "icon-placement-left": "_icon-placement-left_yx7jd_80",
689
+ "icon-placement-both": "_icon-placement-both_yx7jd_80",
690
+ clearable: gn,
691
+ disabled: In,
692
+ transparent: xn,
693
+ "variant-danger": "_variant-danger_yx7jd_136",
694
+ "variant-success": "_variant-success_yx7jd_140",
695
+ "variant-warning": "_variant-warning_yx7jd_144",
696
+ "size-lg": "_size-lg_yx7jd_148",
697
+ "size-md": "_size-md_yx7jd_155",
698
+ "size-sm": "_size-sm_yx7jd_162",
699
+ "icon-wrapper": "_icon-wrapper_yx7jd_177",
700
+ wrapper: vn,
701
701
  menu: En,
702
- item: vn,
703
- highlighted: On,
704
- selected: yn,
702
+ item: On,
703
+ highlighted: wn,
704
+ selected: jn,
705
705
  multiple: Cn,
706
- allowUnselectFromList: bn,
707
- tags: Nn,
708
- "styled-tag": "_styled-tag_cxg1w_275"
709
- }, we = Ee(ve);
710
- function Rn(e, n) {
711
- return /* @__PURE__ */ I("div", { className: we("tags"), role: "list", children: e.map((t) => (
706
+ allowUnselectFromList: Nn,
707
+ tags: Rn,
708
+ "styled-tag": "_styled-tag_yx7jd_288"
709
+ }, Ie = Ee(Oe);
710
+ function Sn(e, n) {
711
+ return /* @__PURE__ */ I("div", { className: Ie("tags"), role: "list", children: e.map((t) => (
712
712
  // TODO migrate after WUI-187/tag
713
713
  /* @__PURE__ */ I(
714
- nn,
714
+ tn,
715
715
  {
716
- className: we("styled-tag"),
716
+ className: Ie("styled-tag"),
717
717
  onRemove: () => n(t.value.toString()),
718
718
  role: "listitem",
719
719
  children: t.label
@@ -722,189 +722,190 @@ function Rn(e, n) {
722
722
  )
723
723
  )) });
724
724
  }
725
- const ee = "", Sn = /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g, Oe = (e) => {
725
+ const ee = "", kn = /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g, we = (e) => {
726
726
  if (typeof e == "number")
727
727
  return String(e);
728
728
  if (typeof e == "string") {
729
- const n = e.match(Sn);
729
+ const n = e.match(kn);
730
730
  return n && n.map((t) => t.toLowerCase()).join("-");
731
731
  }
732
- }, Ie = (e) => e ? e.label : ee, kn = (e) => e.reduce(
732
+ }, xe = (e) => e ? e.label : ee, Un = (e) => e.reduce(
733
733
  (n, t) => t.label && n.length > t.label.length ? n : t.label,
734
734
  ee
735
- ), Un = (e, n, t) => {
736
- const r = n.find((s) => e.value === s.value);
737
- return r && t ? n.filter((s) => e.value !== s.value) : r ? n : [...n, e];
735
+ ), Vn = (e, n, t) => {
736
+ const r = n.find((o) => e.value === o.value);
737
+ return r && t ? n.filter((o) => e.value !== o.value) : r ? n : [...n, e];
738
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: Oe(e) }, Vn = (e, n, t = !1) => {
741
- const r = t ? n.flatMap((s) => s.options) : n;
742
- return !e && e !== 0 ? [] : Array.isArray(e) ? e.map((s) => J(s, r)) : [J(e, r)];
743
- }, Tn = (e, n) => !!n.find((t) => t.value === e.value), Hn = (e, n) => Tn(e, n) ? e.value : e.label, xe = (e, n) => e ? e.map((t) => Hn(t, n)) : [], Dn = (e, n) => e ? e.filter(
740
+ ) || { label: e, value: we(e) }, bn = (e, n, t = !1) => {
741
+ const r = t ? n.flatMap((o) => o.options) : n;
742
+ return !e && e !== 0 ? [] : Array.isArray(e) ? e.map((o) => J(o, r)) : [J(e, r)];
743
+ }, Tn = (e, n) => !!n.find((t) => t.value === e.value), Hn = (e, n) => Tn(e, n) ? e.value : e.label, ve = (e, n) => e ? e.map((t) => Hn(t, n)) : [], Dn = (e, n) => e ? e.filter(
744
744
  (t) => !n.find((r) => r.value === t.value)
745
745
  ) : [], Fn = ({
746
746
  inputValue: e,
747
747
  isMultiple: n,
748
748
  isSearchable: t,
749
749
  options: r,
750
- renderItem: s
750
+ renderItem: o
751
751
  }) => {
752
- const l = J(e, r);
753
- return n ? e : l.label ? t ? l.label : s(l) : ee;
754
- }, O = Ee(ve), zn = me.default || me, Qn = Ye(
752
+ const i = J(e, r);
753
+ return n ? e : i.label ? t ? i.label : o(i) : ee;
754
+ }, O = Ee(Oe), zn = _e.default || _e, qn = Be(
755
755
  ({
756
756
  allowUnselectFromList: e,
757
757
  autoComplete: n = "off",
758
758
  autoFocus: t,
759
759
  className: r,
760
- dataTestId: s,
761
- disableCloseOnSelect: l,
762
- disabled: i,
763
- groupsEnabled: a,
764
- icon: o,
760
+ dataTestId: o,
761
+ disableCloseOnSelect: i,
762
+ disabled: s,
763
+ groupsEnabled: c,
764
+ icon: l,
765
765
  iconPlacement: d = "left",
766
766
  id: u,
767
767
  isClearable: _,
768
768
  isCreatable: x,
769
- isMultiple: g,
769
+ isMultiple: p,
770
770
  isSearchable: m,
771
771
  name: k,
772
- onBlur: D,
772
+ onBlur: H,
773
773
  onChange: R,
774
774
  onClick: U,
775
775
  onCreate: Y,
776
- onFocus: ye,
777
- options: w = [],
776
+ onFocus: je,
777
+ options: g = [],
778
778
  placeholder: ne = "Choose from…",
779
- renderCreateItem: Ce = (z) => `Create "${z}"`,
779
+ renderCreateItem: Ce = (F) => `Create "${F}"`,
780
780
  renderGroupHeader: te,
781
- renderItem: F = Ie,
782
- renderMultiple: be = Rn,
781
+ renderItem: D = xe,
782
+ renderMultiple: Ne = Sn,
783
783
  size: V = "md",
784
784
  transparent: re,
785
785
  value: se,
786
- variant: ce,
786
+ variant: oe,
787
787
  ...ae
788
- }, Ne) => {
789
- const { getInputProps: z, variant: Re } = qe(), oe = Re || ce, M = Be(
790
- () => Vn(se, w, a),
791
- [se, w, a]
792
- ), B = !g && M[0] || null, Z = B ? B.label : "", [C, X] = $(M), [y, T] = $(Z), [j, W] = $(w), [b, S] = $(!1);
788
+ }, Re) => {
789
+ const { getInputProps: F, variant: Se } = Ge(), ce = Se || oe, z = Ze(
790
+ () => bn(se, g, c),
791
+ [se, g, c]
792
+ ), B = !p && z[0] || null, Z = B ? B.label : "", [j, X] = $(z), [w, b] = $(Z), [M, W] = $(g), [C, S] = $(!1);
793
793
  m = x || m;
794
- const [Q, Se] = en(Ne);
795
- _e(() => {
796
- t && Q.current && (Q.current.focus(), m && S(!0));
797
- }, [m, t, Q]), _e(() => {
798
- X(M), T(Z), W(w);
799
- }, [Z, w, M]);
800
- const ke = (c) => {
801
- if (m && c !== y) {
794
+ const [Q, ke] = nn(Re);
795
+ he(() => {
796
+ t && Q.current && !s && (Q.current.focus(), m && S(!0));
797
+ }, [m, t, Q, s]), he(() => {
798
+ X(z), b(Z), W(g);
799
+ }, [Z, g, z]);
800
+ const Ue = (a) => {
801
+ if (m && a !== w) {
802
802
  let f = [];
803
- a ? f = G(w, c, {
803
+ c ? f = G(g, a, {
804
804
  // should match on group.label OR group.options.label
805
- keys: [(p) => p.label, (p) => p.options.map((E) => E.label)]
806
- }) : f = G(w, c, { keys: ["label"] }), T(c), W(f);
805
+ keys: [(A) => A.label, (A) => A.options.map((v) => v.label)]
806
+ }) : f = G(g, a, { keys: ["label"] }), b(a), W(f);
807
807
  }
808
- }, Ue = () => {
809
- m && !b && S(!0);
810
- }, le = (c) => {
808
+ }, Ve = () => {
809
+ s || m && !C && S(!0);
810
+ }, le = (a) => {
811
811
  let f = [];
812
- a ? f = xe(
813
- c,
814
- w.flatMap((h) => h.options)
815
- ) : f = xe(c, w);
816
- const p = g ? f : f[0], E = Je({ name: k, value: g ? c : c[0] });
817
- if (R == null || R(p, E), x) {
818
- const h = Dn(c, w);
819
- h.length && (Y == null || Y(h[0].label, E));
812
+ c ? f = ve(
813
+ a,
814
+ g.flatMap((h) => h.options)
815
+ ) : f = ve(a, g);
816
+ const A = p ? f : f[0], v = en({ name: k, value: p ? a : a[0] });
817
+ if (R == null || R(A, v), x) {
818
+ const h = Dn(a, g);
819
+ h.length && (Y == null || Y(h[0].label, v));
820
820
  }
821
- }, Ve = (c) => {
822
- let f, p;
823
- !c || c != null && c.disabled ? (f = g ? C : [], p = !0) : (f = g ? Un(c, C, e) : [c], p = g), p && T(""), W(w), X(f), le(f), l || S(!1);
824
- }, Te = (c) => {
825
- const f = C.filter((p) => p.value !== c);
821
+ }, be = (a) => {
822
+ if (s) return;
823
+ let f, A;
824
+ !a || a != null && a.disabled ? (f = p ? j : [], A = !0) : (f = p ? Vn(a, j, e) : [a], A = p), A && b(""), W(g), X(f), le(f), i || S(!1);
825
+ }, Te = (a) => {
826
+ const f = j.filter((A) => A.value !== a);
826
827
  X(f), le(f);
827
- }, He = (c) => {
828
- U == null || U(c), S(!b);
829
- }, De = (c) => {
830
- g && c.selectedItem ? T("") : m && c.selectedItem && T(c.selectedItem.label), W(w), S(!1);
831
- }, Fe = kn(w), ie = Fn({
832
- inputValue: y,
833
- isMultiple: g,
828
+ }, He = (a) => {
829
+ s || (U == null || U(a), S(!C));
830
+ }, De = (a) => {
831
+ s || (p && a.selectedItem ? b("") : m && a.selectedItem && b(a.selectedItem.label), W(g), S(!1));
832
+ }, Fe = Un(g), ie = Fn({
833
+ inputValue: w,
834
+ isMultiple: p,
834
835
  isSearchable: m,
835
- options: w,
836
- renderItem: F
837
- }), ze = Ze(
836
+ options: g,
837
+ renderItem: D
838
+ }), ze = Xe(
838
839
  ({
839
- getItemProps: c,
840
+ getItemProps: a,
840
841
  highlightedIndex: f,
841
- options: p
842
- }) => p.reduce(
843
- (E, h, L) => {
844
- if (a && "options" in h)
845
- E.itemsToRender.push(
846
- /* @__PURE__ */ P(Xe, { children: [
842
+ options: A
843
+ }) => A.reduce(
844
+ (v, h, L) => {
845
+ if (c && "options" in h)
846
+ v.itemsToRender.push(
847
+ /* @__PURE__ */ K(Qe, { children: [
847
848
  te(h),
848
- h.options ? h.options.map((v) => {
849
- const N = E.itemIndex++, K = q(v.value, C);
849
+ h.options ? h.options.map((E) => {
850
+ const N = v.itemIndex++, P = q(E.value, j);
850
851
  return /* @__PURE__ */ I(
851
852
  "li",
852
853
  {
853
854
  className: O(
854
855
  "item",
855
856
  f === N && "highlighted",
856
- g && "multiple",
857
+ p && "multiple",
857
858
  e && "allowUnselectFromList",
858
- v.disabled && "disabled",
859
- K && "selected"
859
+ E.disabled && "disabled",
860
+ P && "selected"
860
861
  ),
861
- ...c({
862
+ ...a({
862
863
  index: N,
863
- item: v
864
+ item: E
864
865
  }),
865
- children: F(v, K)
866
+ children: D(E, P)
866
867
  },
867
- v.value
868
+ E.value
868
869
  );
869
870
  }) : null
870
871
  ] }, h.label)
871
872
  );
872
873
  else if ("value" in h) {
873
- const v = q(h.value, C), N = f === L;
874
- E.itemsToRender.push(
874
+ const E = q(h.value, j), N = f === L;
875
+ v.itemsToRender.push(
875
876
  /* @__PURE__ */ I(
876
877
  "li",
877
878
  {
878
879
  className: O(
879
880
  "item",
880
881
  N && "highlighted",
881
- g && "multiple",
882
+ p && "multiple",
882
883
  e && "allowUnselectFromList",
883
884
  h.disabled && "disabled",
884
- v && "selected"
885
+ E && "selected"
885
886
  ),
886
- ...c({
887
+ ...a({
887
888
  index: L,
888
889
  item: h
889
890
  }),
890
- children: F(h, v)
891
+ children: D(h, E)
891
892
  },
892
893
  h.value
893
894
  )
894
895
  );
895
896
  }
896
- return E;
897
+ return v;
897
898
  },
898
899
  { itemIndex: 0, itemsToRender: [] }
899
900
  ).itemsToRender,
900
- [g, e, C, a, te, F]
901
+ [p, e, j, c, te, D]
901
902
  ), Me = Ke[V], ue = O(
902
903
  "root",
903
904
  `size-${V}`,
904
- oe && `variant-${oe}`,
905
+ ce && `variant-${ce}`,
905
906
  _ && "clearable",
906
907
  re && "transparent",
907
- o && `icon-placement-${d}`,
908
+ l && `icon-placement-${d}`,
908
909
  r
909
910
  );
910
911
  return /* @__PURE__ */ I(
@@ -912,99 +913,114 @@ const ee = "", Sn = /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|
912
913
  {
913
914
  id: u,
914
915
  inputValue: m ? ie : "",
915
- isOpen: b,
916
- itemToString: Ie,
917
- onInputValueChange: ke,
916
+ isOpen: C,
917
+ itemToString: xe,
918
+ onInputValueChange: Ue,
918
919
  onOuterClick: De,
919
- onSelect: Ve,
920
+ onSelect: be,
920
921
  selectedItem: B,
921
922
  children: ({
922
- clearSelection: c,
923
+ clearSelection: a,
923
924
  getInputProps: f,
924
- getItemProps: p,
925
- getMenuProps: E,
925
+ getItemProps: A,
926
+ getMenuProps: v,
926
927
  getRootProps: h,
927
928
  getToggleButtonProps: L,
928
- highlightedIndex: v
929
+ highlightedIndex: E
929
930
  }) => {
930
- const N = !!(x && y && !q(y, C)), K = b && (j.length || N), de = _ && y, je = /* @__PURE__ */ I("div", { className: O("dropdown-indicator", b && "open"), children: /* @__PURE__ */ I(
931
- Qe,
931
+ const N = !!(x && w && !q(w, j)), P = C && (M.length || N), de = _ && w, We = /* @__PURE__ */ I("div", { className: O("dropdown-indicator", C && "open"), children: /* @__PURE__ */ I(
932
+ qe,
932
933
  {
933
934
  animatePresence: !0,
934
- onClick: c,
935
+ onClick: a,
935
936
  title: "Clear"
936
937
  }
937
- ) }), We = /* @__PURE__ */ I(
938
+ ) }), Le = /* @__PURE__ */ I(
938
939
  "div",
939
940
  {
940
- className: O("dropdown-indicator", b && "open"),
941
- "data-testid": s ? `${s}-arrow-icon` : null,
942
- disabled: i,
941
+ className: O("dropdown-indicator", C && "open", s && "disabled"),
942
+ "data-testid": o ? `${o}-arrow-icon` : null,
943
943
  tabIndex: -1,
944
944
  ...L({
945
- onClick: () => S(!b)
945
+ onClick: (me) => {
946
+ if (s) {
947
+ me.preventDefault(), me.stopPropagation();
948
+ return;
949
+ }
950
+ S(!C);
951
+ }
946
952
  }),
947
- children: /* @__PURE__ */ I(Ge, { className: O("styled-icon"), size: "sm" })
953
+ children: /* @__PURE__ */ I(Je, { className: O("styled-icon"), size: "sm" })
948
954
  }
949
- ), Le = h(ae, { suppressRefError: !0 }), fe = f({
955
+ ), Pe = h(ae, { suppressRefError: !0 }), fe = f({
950
956
  autoComplete: n,
951
957
  autoFocus: t,
952
958
  "data-spacer": Fe || ne,
953
- "data-testid": s,
954
- disabled: i,
959
+ "data-testid": o,
960
+ disabled: s,
955
961
  id: u,
956
962
  name: k,
957
- onBlur: D,
958
- onClick: i ? void 0 : He,
959
- onFocus: ye,
960
- onKeyDown: Ue,
963
+ onBlur: H,
964
+ onClick: s ? void 0 : He,
965
+ onFocus: s ? void 0 : je,
966
+ onKeyDown: Ve,
961
967
  placeholder: ne,
962
- ref: Se,
968
+ ref: ke,
963
969
  size: V,
964
970
  tabIndex: 0,
965
971
  transparent: re,
966
- variant: b ? "focused" : ce,
972
+ variant: C ? "focused" : oe,
967
973
  ...ae
968
974
  });
969
- return /* @__PURE__ */ P("div", { ...Le, className: O("wrapper", i && "disabled"), children: [
970
- m ? /* @__PURE__ */ I(
971
- "input",
972
- {
973
- className: ue,
974
- type: "text",
975
- ...z(fe)
976
- }
977
- ) : /* @__PURE__ */ I("div", { className: ue, ...z(fe), children: ie }),
978
- o ? /* @__PURE__ */ I("div", { className: O("icon-wrapper", "icon-placement-left", `size-${V}`), children: $e.cloneElement(o, { ...o.props, size: Me }) }) : null,
979
- /* @__PURE__ */ P("div", { className: O("indicators", `size-${V}`), children: [
980
- de ? je : null,
981
- We
982
- ] }),
983
- K ? /* @__PURE__ */ P("ul", { className: O("menu"), ...E(), children: [
984
- ze({ getItemProps: p, highlightedIndex: v, options: j }),
985
- N && y.length ? /* @__PURE__ */ I(
986
- "li",
987
- {
988
- className: O("item", v === j.length && "highlighted"),
989
- ...p({
990
- index: j.length,
991
- item: {
992
- label: y,
993
- value: Oe(y)
994
- }
995
- }),
996
- children: Ce(y)
997
- },
998
- "add"
999
- ) : null
1000
- ] }) : null,
1001
- g ? be(C, Te) : null
1002
- ] });
975
+ return /* @__PURE__ */ K(
976
+ "div",
977
+ {
978
+ ...Pe,
979
+ "aria-disabled": s,
980
+ className: O("wrapper", s && "disabled"),
981
+ children: [
982
+ m ? /* @__PURE__ */ I(
983
+ "input",
984
+ {
985
+ className: ue,
986
+ type: "text",
987
+ ...F(fe),
988
+ disabled: s,
989
+ tabIndex: s ? -1 : 0
990
+ }
991
+ ) : /* @__PURE__ */ I("div", { className: ue, ...F(fe), children: ie }),
992
+ l ? /* @__PURE__ */ I("div", { className: O("icon-wrapper", "icon-placement-left", `size-${V}`), children: Ye.cloneElement(l, { ...l.props, size: Me }) }) : null,
993
+ /* @__PURE__ */ K("div", { className: O("indicators", `size-${V}`), children: [
994
+ de ? We : null,
995
+ Le
996
+ ] }),
997
+ P ? /* @__PURE__ */ K("ul", { className: O("menu"), ...v(), children: [
998
+ ze({ getItemProps: A, highlightedIndex: E, options: M }),
999
+ N && w.length ? /* @__PURE__ */ I(
1000
+ "li",
1001
+ {
1002
+ className: O("item", E === M.length && "highlighted"),
1003
+ ...A({
1004
+ index: M.length,
1005
+ item: {
1006
+ label: w,
1007
+ value: we(w)
1008
+ }
1009
+ }),
1010
+ children: Ce(w)
1011
+ },
1012
+ "add"
1013
+ ) : null
1014
+ ] }) : null,
1015
+ p ? Ne(j, Te) : null
1016
+ ]
1017
+ }
1018
+ );
1003
1019
  }
1004
1020
  }
1005
1021
  );
1006
1022
  }
1007
1023
  );
1008
1024
  export {
1009
- Qn as Select
1025
+ qn as Select
1010
1026
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "welcome-ui",
3
- "version": "9.0.12",
3
+ "version": "9.0.14",
4
4
  "description": "Customizable design system with react, typescript, tailwindcss and ariakit.",
5
5
  "files": [
6
6
  "dist"