welcome-ui 9.0.11 → 9.0.13

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/Modal.js CHANGED
@@ -95,7 +95,7 @@ const R = "_root_1vbnu_3", W = "_hideOnInteractOutside_1vbnu_19", F = "_dialog_1
95
95
  ({ children: t, className: e, withClosingButton: o = !0, ...r }, a) => /* @__PURE__ */ d(
96
96
  "div",
97
97
  {
98
- className: (ht("content", o && "with-close-button"), e),
98
+ className: ht("content", o && "with-close-button", e),
99
99
  ref: a,
100
100
  ...r,
101
101
  children: [
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_srf8a_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_srf8a_2._size-xs_srf8a_11{--indicators-right: var(--spacing-sm)}._dropdown-indicator_srf8a_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_srf8a_14 ._styled-icon_srf8a_27{transform:none;transition-property:transform;transition-duration:var(--duration-medium);transition-timing-function:var(--timing-primary)}._dropdown-indicator_srf8a_14._open_srf8a_33 ._styled-icon_srf8a_27{transform:rotate3d(0,0,1,180deg)}._dropdown-indicator_srf8a_14:not(:last-child){width:auto}._dropdown-indicator_srf8a_14:disabled{color:var(--color-beige-60)}._input-wrapper_srf8a_42{position:relative}._input-wrapper_srf8a_42:has(>._icon-placement-right_srf8a_45) ._indicators_srf8a_2{--indicators-right: calc(var(--spacing-lg) + var(--spacing-md) * 2)}._root_srf8a_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_srf8a_49._icon-placement-left_srf8a_80,._root_srf8a_49._icon-placement-both_srf8a_80{padding-left:calc(var(--select-padding-left) + var(--select-icon-size, 1rem) + var(--spacing-sm))}._root_srf8a_49._clearable_srf8a_83,._root_srf8a_49._icon-placement-right_srf8a_45,._root_srf8a_49._icon-placement-both_srf8a_80{padding-right:calc(var(--select-padding-right) + var(--select-icon-size, 1rem) + var(--spacing-sm))}._root_srf8a_49._clearable_srf8a_83._icon-placement-right_srf8a_45,._root_srf8a_49._clearable_srf8a_83._icon-placement-both_srf8a_80{padding-right:calc(var(--select-padding-right) + (var(--select-icon-size, 1rem) + var(--spacing-sm)) * 2)}._root_srf8a_49:disabled,._root_srf8a_49._disabled_srf8a_89{--select-background-color: var(--color-beige-30);--select-text-color: var(--color-beige-60);cursor:not-allowed}._root_srf8a_49:hover:not([class*=variant]){--select-border-color: var(--color-brand-40)}._root_srf8a_49:focus:not([class*=variant]){--select-outline-color: var(--color-brand-20);--select-border-color: var(--color-brand-40)}._root_srf8a_49._transparent_srf8a_101{--select-border-color: transparent;--select-background-color: transparent}._root_srf8a_49._transparent_srf8a_101:hover{--select-border-color: var(--color-neutral-20)}._root_srf8a_49::placeholder{color:var(--select-placeholder-color)}._root_srf8a_49 br{display:none}._root_srf8a_49:before{content:attr(data-spacer);visibility:hidden;display:block;height:0}._root_srf8a_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_srf8a_49:empty:before{height:auto}._variant-danger_srf8a_136{--select-border-color: var(--color-red-70);--select-outline-color: var(--color-red-30)}._variant-success_srf8a_140{--select-border-color: var(--color-green-60);--select-outline-color: var(--color-green-30)}._variant-warning_srf8a_144{--select-border-color: var(--color-orange-60);--select-outline-color: var(--color-orange-20)}._size-lg_srf8a_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_srf8a_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_srf8a_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_srf8a_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_srf8a_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_srf8a_177._icon-placement-left_srf8a_80{--icon-placement-left: var(--spacing-md)}._icon-wrapper_srf8a_177._icon-placement-left_srf8a_80._size-xs_srf8a_11{--icon-placement-left: var(--spacing-sm)}._icon-wrapper_srf8a_177._icon-placement-right_srf8a_45{--icon-placement-right: var(--spacing-md)}._icon-wrapper_srf8a_177._icon-placement-right_srf8a_45._size-xs_srf8a_11{--icon-placement-right: var(--spacing-sm)}._icon-wrapper_srf8a_177>button{pointer-events:auto}._wrapper_srf8a_208{position:relative;width:100%}._wrapper_srf8a_208._disabled_srf8a_89{pointer-events:none}._wrapper_srf8a_208._disabled_srf8a_89 ._icon-wrapper_srf8a_177{color:var(--color-beige-60)}._wrapper_srf8a_208._disabled_srf8a_89 ._root_srf8a_49{--select-background-color: var(--color-beige-30);--select-text-color: var(--color-beige-60);cursor:not-allowed}._menu_srf8a_223{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_srf8a_223:hover>*{cursor:pointer}._wrapper_srf8a_208._disabled_srf8a_89 ._menu_srf8a_223,._wrapper_srf8a_208[aria-disabled=true] ._menu_srf8a_223{pointer-events:none}._item_srf8a_255{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_srf8a_255._highlighted_srf8a_269{background-color:var(--color-beige-20)}._item_srf8a_255._selected_srf8a_272:not(._multiple_srf8a_272){--item-text-color: var(--color-neutral-90);font-weight:var(--font-weight-bold)}._item_srf8a_255._selected_srf8a_272._multiple_srf8a_272:not(._allowUnselectFromList_srf8a_276){--item-text-color: var(--color-beige-40);--item-cursor: not-allowed}._item_srf8a_255._disabled_srf8a_89{--item-text-color: var(--color-beige-60);--item-cursor: not-allowed}._tags_srf8a_284{margin-top:var(--spacing-lg)}._tags_srf8a_284 ._styled-tag_srf8a_287:not(:last-child){margin-right:var(--spacing-sm);margin-bottom:var(--spacing-sm)}._tags_srf8a_284: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 v, 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 ye } 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 H = { exports: {} }, pe;
14
+ function rn() {
15
+ if (pe) return H.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 a(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, a);
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 H.exports = i, H.exports.has = s, H.exports.remove = i, H.exports;
487
487
  }
488
- var rn = tn();
489
- const sn = /* @__PURE__ */ Pe(rn);
488
+ var sn = rn();
489
+ const an = /* @__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 g = {
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
+ }, on = (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: a = g.MATCHES,
511
+ baseSort: i = on,
512
+ sorter: s = (f) => f.sort((u, _) => fn(u, _, i))
513
+ } = t, c = e.reduce(l, []);
514
+ return s(c).map((f) => {
515
515
  let {
516
516
  item: u
517
- } = d;
517
+ } = f;
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
524
- } = x;
525
- return g >= m && d.push({
526
- ...x,
520
+ function l(f, u, _) {
521
+ const E = cn(u, r, n, t), {
522
+ rank: p,
523
+ keyThreshold: d = a
524
+ } = E;
525
+ return p >= d && f.push({
526
+ ...E,
527
527
  item: u,
528
528
  index: _
529
- }), d;
529
+ }), f;
530
530
  }
531
531
  }
532
- G.rankings = A;
533
- function an(e, n, t, r) {
532
+ G.rankings = g;
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,
547
- rankedValue: d,
546
+ rank: l,
547
+ rankedValue: f,
548
548
  keyIndex: u,
549
549
  keyThreshold: _
550
- } = l, {
551
- itemValue: x,
552
- attributes: g
553
- } = i, m = ge(x, t, r), k = d;
550
+ } = i, {
551
+ itemValue: E,
552
+ attributes: p
553
+ } = s, d = Ae(E, t, r), U = f;
554
554
  const {
555
555
  minRanking: D,
556
- maxRanking: R,
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), {
560
- rankedValue: k,
561
- rank: o,
556
+ maxRanking: S,
557
+ threshold: V
558
+ } = p;
559
+ return d < D && d >= g.MATCHES ? d = D : d > S && (d = S), d > l && (l = d, u = c, _ = V, U = E), {
560
+ rankedValue: U,
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: g.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 = 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 : ln(e).includes(n) ? g.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) {
586
- for (let _ = u, x = d.length; _ < x; _++)
587
- if (d[_] === o)
585
+ function a(l, f, u) {
586
+ for (let _ = u, E = f.length; _ < E; _++)
587
+ if (f[_] === 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 f = 1 / l, u = t / n.length;
593
+ return g.MATCHES + u * f;
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 = a(n[0], e, 0);
596
+ if (s < 0)
597
+ return g.NO_MATCH;
598
+ r = s;
599
+ for (let l = 1, f = n.length; l < f; l++) {
600
+ const u = n[l];
601
+ if (r = a(u, e, r), !(r > -1))
602
+ return g.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 fn(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 ge(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 = an(e)), e;
622
622
  }
623
- function dn(e, n) {
623
+ function mn(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 dn(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 dn(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 a = 0, i = t.length; a < i; a++) {
643
+ const s = t[a];
644
+ let c = [];
645
+ for (let l = 0, f = r.length; l < f; 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, a = n.length; r < a; r++) {
660
+ const i = n[r], s = hn(i), c = mn(e, i);
661
+ for (let l = 0, f = c.length; l < f; 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 Ie = {
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" ? Ie : {
675
+ ...Ie,
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,
701
- menu: En,
702
- item: vn,
703
- highlighted: On,
704
- selected: yn,
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) => (
679
+ const pn = "_indicators_srf8a_2", An = "_open_srf8a_33", gn = "_root_srf8a_49", In = "_clearable_srf8a_83", vn = "_disabled_srf8a_89", En = "_transparent_srf8a_101", On = "_wrapper_srf8a_208", yn = "_menu_srf8a_223", wn = "_item_srf8a_255", Cn = "_highlighted_srf8a_269", xn = "_selected_srf8a_272", Nn = "_multiple_srf8a_272", Rn = "_allowUnselectFromList_srf8a_276", Sn = "_tags_srf8a_284", we = {
680
+ indicators: pn,
681
+ "size-xs": "_size-xs_srf8a_11",
682
+ "dropdown-indicator": "_dropdown-indicator_srf8a_14",
683
+ "styled-icon": "_styled-icon_srf8a_27",
684
+ open: An,
685
+ "input-wrapper": "_input-wrapper_srf8a_42",
686
+ "icon-placement-right": "_icon-placement-right_srf8a_45",
687
+ root: gn,
688
+ "icon-placement-left": "_icon-placement-left_srf8a_80",
689
+ "icon-placement-both": "_icon-placement-both_srf8a_80",
690
+ clearable: In,
691
+ disabled: vn,
692
+ transparent: En,
693
+ "variant-danger": "_variant-danger_srf8a_136",
694
+ "variant-success": "_variant-success_srf8a_140",
695
+ "variant-warning": "_variant-warning_srf8a_144",
696
+ "size-lg": "_size-lg_srf8a_148",
697
+ "size-md": "_size-md_srf8a_155",
698
+ "size-sm": "_size-sm_srf8a_162",
699
+ "icon-wrapper": "_icon-wrapper_srf8a_177",
700
+ wrapper: On,
701
+ menu: yn,
702
+ item: wn,
703
+ highlighted: Cn,
704
+ selected: xn,
705
+ multiple: Nn,
706
+ allowUnselectFromList: Rn,
707
+ tags: Sn,
708
+ "styled-tag": "_styled-tag_srf8a_287"
709
+ }, ve = ye(we);
710
+ function kn(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__ */ I(
714
- nn,
713
+ /* @__PURE__ */ v(
714
+ tn,
715
715
  {
716
- className: we("styled-tag"),
716
+ className: ve("styled-tag"),
717
717
  onRemove: () => n(t.value.toString()),
718
718
  role: "listitem",
719
719
  children: t.label
@@ -722,289 +722,305 @@ 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 = "", Un = /[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(Sn);
729
+ const n = e.match(Un);
730
730
  return n && n.map((t) => t.toLowerCase()).join("-");
731
731
  }
732
- }, Ie = (e) => e ? e.label : ee, kn = (e) => e.reduce(
732
+ }, Ee = (e) => e ? e.label : ee, Vn = (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
+ ), bn = (e, n, t) => {
736
+ const r = n.find((a) => e.value === a.value);
737
+ return r && t ? n.filter((a) => e.value !== a.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: Ce(e) }, Tn = (e, n, t = !1) => {
741
+ const r = t ? n.flatMap((a) => a.options) : n;
742
+ return !e && e !== 0 ? [] : Array.isArray(e) ? e.map((a) => J(a, r)) : [J(e, r)];
743
+ }, Hn = (e, n) => !!n.find((t) => t.value === e.value), Dn = (e, n) => Hn(e, n) ? e.value : e.label, Oe = (e, n) => e ? e.map((t) => Dn(t, n)) : [], Fn = (e, n) => e ? e.filter(
744
744
  (t) => !n.find((r) => r.value === t.value)
745
- ) : [], Fn = ({
745
+ ) : [], zn = ({
746
746
  inputValue: e,
747
747
  isMultiple: n,
748
748
  isSearchable: t,
749
749
  options: r,
750
- renderItem: s
750
+ renderItem: a
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 : a(i) : ee;
754
+ }, w = ye(we), Mn = _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,
765
- iconPlacement: d = "left",
760
+ dataTestId: a,
761
+ disableCloseOnSelect: i,
762
+ disabled: s,
763
+ groupsEnabled: c,
764
+ icon: l,
765
+ iconPlacement: f = "left",
766
766
  id: u,
767
767
  isClearable: _,
768
- isCreatable: x,
769
- isMultiple: g,
770
- isSearchable: m,
771
- name: k,
768
+ isCreatable: E,
769
+ isMultiple: p,
770
+ isSearchable: d,
771
+ name: U,
772
772
  onBlur: D,
773
- onChange: R,
774
- onClick: U,
773
+ onChange: S,
774
+ onClick: V,
775
775
  onCreate: Y,
776
- onFocus: ye,
777
- options: w = [],
776
+ onFocus: xe,
777
+ options: I = [],
778
778
  placeholder: ne = "Choose from…",
779
- renderCreateItem: Ce = (z) => `Create "${z}"`,
779
+ renderCreateItem: Ne = (z) => `Create "${z}"`,
780
780
  renderGroupHeader: te,
781
- renderItem: F = Ie,
782
- renderMultiple: be = Rn,
783
- size: V = "md",
781
+ renderItem: F = Ee,
782
+ renderMultiple: Re = kn,
783
+ size: b = "md",
784
784
  transparent: re,
785
785
  value: se,
786
- variant: ce,
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);
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) {
802
- let f = [];
803
- a ? f = G(w, c, {
786
+ variant: ae,
787
+ ...oe
788
+ }, Se) => {
789
+ const { getInputProps: z, variant: ke } = Ge(), ce = ke || ae, M = Ze(
790
+ () => Tn(se, I, c),
791
+ [se, I, c]
792
+ ), B = !p && M[0] || null, Z = B ? B.label : "", [x, X] = $(M), [C, T] = $(Z), [j, W] = $(I), [N, k] = $(!1);
793
+ d = E || d;
794
+ const [Q, Ue] = nn(Se);
795
+ he(() => {
796
+ t && Q.current && !s && (Q.current.focus(), d && k(!0));
797
+ }, [d, t, Q, s]), he(() => {
798
+ X(M), T(Z), W(I);
799
+ }, [Z, I, M]);
800
+ const Ve = (o) => {
801
+ if (d && o !== C) {
802
+ let m = [];
803
+ c ? m = G(I, o, {
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((O) => O.label)]
806
+ }) : m = G(I, o, { keys: ["label"] }), T(o), W(m);
807
807
  }
808
- }, Ue = () => {
809
- m && !b && S(!0);
810
- }, le = (c) => {
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));
808
+ }, be = () => {
809
+ s || d && !N && k(!0);
810
+ }, le = (o) => {
811
+ let m = [];
812
+ c ? m = Oe(
813
+ o,
814
+ I.flatMap((h) => h.options)
815
+ ) : m = Oe(o, I);
816
+ const A = p ? m : m[0], O = en({ name: U, value: p ? o : o[0] });
817
+ if (S == null || S(A, O), E) {
818
+ const h = Fn(o, I);
819
+ h.length && (Y == null || Y(h[0].label, O));
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);
826
- 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,
834
- isSearchable: m,
835
- options: w,
821
+ }, Te = (o) => {
822
+ if (s) return;
823
+ let m, A;
824
+ !o || o != null && o.disabled ? (m = p ? x : [], A = !0) : (m = p ? bn(o, x, e) : [o], A = p), A && T(""), W(I), X(m), le(m), i || k(!1);
825
+ }, He = (o) => {
826
+ const m = x.filter((A) => A.value !== o);
827
+ X(m), le(m);
828
+ }, De = (o) => {
829
+ s || (V == null || V(o), k(!N));
830
+ }, Fe = (o) => {
831
+ s || (p && o.selectedItem ? T("") : d && o.selectedItem && T(o.selectedItem.label), W(I), k(!1));
832
+ }, ze = Vn(I), ie = zn({
833
+ inputValue: C,
834
+ isMultiple: p,
835
+ isSearchable: d,
836
+ options: I,
836
837
  renderItem: F
837
- }), ze = Ze(
838
+ }), Me = Xe(
838
839
  ({
839
- getItemProps: c,
840
- 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: [
840
+ getItemProps: o,
841
+ highlightedIndex: m,
842
+ options: A
843
+ }) => A.reduce(
844
+ (O, h, L) => {
845
+ if (c && "options" in h)
846
+ O.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);
850
- return /* @__PURE__ */ I(
849
+ h.options ? h.options.map((y) => {
850
+ const R = O.itemIndex++, P = q(y.value, x);
851
+ return /* @__PURE__ */ v(
851
852
  "li",
852
853
  {
853
- className: O(
854
+ className: w(
854
855
  "item",
855
- f === N && "highlighted",
856
- g && "multiple",
856
+ m === R && "highlighted",
857
+ p && "multiple",
857
858
  e && "allowUnselectFromList",
858
- v.disabled && "disabled",
859
- K && "selected"
859
+ y.disabled && "disabled",
860
+ P && "selected"
860
861
  ),
861
- ...c({
862
- index: N,
863
- item: v
862
+ ...o({
863
+ index: R,
864
+ item: y
864
865
  }),
865
- children: F(v, K)
866
+ children: F(y, P)
866
867
  },
867
- v.value
868
+ y.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(
875
- /* @__PURE__ */ I(
874
+ const y = q(h.value, x), R = m === L;
875
+ O.itemsToRender.push(
876
+ /* @__PURE__ */ v(
876
877
  "li",
877
878
  {
878
- className: O(
879
+ className: w(
879
880
  "item",
880
- N && "highlighted",
881
- g && "multiple",
881
+ R && "highlighted",
882
+ p && "multiple",
882
883
  e && "allowUnselectFromList",
883
884
  h.disabled && "disabled",
884
- v && "selected"
885
+ y && "selected"
885
886
  ),
886
- ...c({
887
+ ...o({
887
888
  index: L,
888
889
  item: h
889
890
  }),
890
- children: F(h, v)
891
+ children: F(h, y)
891
892
  },
892
893
  h.value
893
894
  )
894
895
  );
895
896
  }
896
- return E;
897
+ return O;
897
898
  },
898
899
  { itemIndex: 0, itemsToRender: [] }
899
900
  ).itemsToRender,
900
- [g, e, C, a, te, F]
901
- ), Me = Ke[V], ue = O(
901
+ [p, e, x, c, te, F]
902
+ ), je = Ke[b], ue = w(
902
903
  "root",
903
- `size-${V}`,
904
- oe && `variant-${oe}`,
904
+ `size-${b}`,
905
+ ce && `variant-${ce}`,
905
906
  _ && "clearable",
906
907
  re && "transparent",
907
- o && `icon-placement-${d}`,
908
+ l && `icon-placement-${f}`,
908
909
  r
909
910
  );
910
- return /* @__PURE__ */ I(
911
- zn,
911
+ return /* @__PURE__ */ v(
912
+ Mn,
912
913
  {
913
914
  id: u,
914
- inputValue: m ? ie : "",
915
- isOpen: b,
916
- itemToString: Ie,
917
- onInputValueChange: ke,
918
- onOuterClick: De,
919
- onSelect: Ve,
915
+ inputValue: d ? ie : "",
916
+ isOpen: N,
917
+ itemToString: Ee,
918
+ onInputValueChange: Ve,
919
+ onOuterClick: Fe,
920
+ onSelect: Te,
920
921
  selectedItem: B,
921
922
  children: ({
922
- clearSelection: c,
923
- getInputProps: f,
924
- getItemProps: p,
925
- getMenuProps: E,
923
+ clearSelection: o,
924
+ getInputProps: m,
925
+ getItemProps: A,
926
+ getMenuProps: O,
926
927
  getRootProps: h,
927
928
  getToggleButtonProps: L,
928
- highlightedIndex: v
929
+ highlightedIndex: y
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 R = !!(E && C && !q(C, x)), P = N && (j.length || R), fe = _ && C, We = /* @__PURE__ */ v("div", { className: w("dropdown-indicator", N && "open"), children: /* @__PURE__ */ v(
932
+ qe,
932
933
  {
933
934
  animatePresence: !0,
934
- onClick: c,
935
+ onClick: o,
935
936
  title: "Clear"
936
937
  }
937
- ) }), We = /* @__PURE__ */ I(
938
+ ) }), Le = /* @__PURE__ */ v(
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: w("dropdown-indicator", N && "open", s && "disabled"),
942
+ "data-testid": a ? `${a}-arrow-icon` : null,
943
943
  tabIndex: -1,
944
944
  ...L({
945
- onClick: () => S(!b)
945
+ onClick: (de) => {
946
+ if (s) {
947
+ de.preventDefault(), de.stopPropagation();
948
+ return;
949
+ }
950
+ k(!N);
951
+ }
946
952
  }),
947
- children: /* @__PURE__ */ I(Ge, { className: O("styled-icon"), size: "sm" })
953
+ children: /* @__PURE__ */ v(Je, { className: w("styled-icon"), size: "sm" })
948
954
  }
949
- ), Le = h(ae, { suppressRefError: !0 }), fe = f({
955
+ ), Pe = h(oe, { suppressRefError: !0 }), me = m({
950
956
  autoComplete: n,
951
957
  autoFocus: t,
952
- "data-spacer": Fe || ne,
953
- "data-testid": s,
954
- disabled: i,
958
+ "data-spacer": ze || ne,
959
+ "data-testid": a,
960
+ disabled: s,
955
961
  id: u,
956
- name: k,
962
+ name: U,
957
963
  onBlur: D,
958
- onClick: i ? void 0 : He,
959
- onFocus: ye,
960
- onKeyDown: Ue,
964
+ onClick: s ? void 0 : De,
965
+ onFocus: s ? void 0 : xe,
966
+ onKeyDown: be,
961
967
  placeholder: ne,
962
- ref: Se,
963
- size: V,
968
+ ref: Ue,
969
+ size: b,
964
970
  tabIndex: 0,
965
971
  transparent: re,
966
- variant: b ? "focused" : ce,
967
- ...ae
972
+ variant: N ? "focused" : ae,
973
+ ...oe
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: w("wrapper", s && "disabled"),
981
+ children: [
982
+ d ? /* @__PURE__ */ v(
983
+ "input",
984
+ {
985
+ className: ue,
986
+ type: "text",
987
+ ...z(me),
988
+ disabled: s,
989
+ tabIndex: s ? -1 : 0
990
+ }
991
+ ) : /* @__PURE__ */ v("div", { className: ue, ...z(me), children: ie }),
992
+ l ? /* @__PURE__ */ v("div", { className: w("icon-wrapper", "icon-placement-left", `size-${b}`), children: Ye.cloneElement(l, { ...l.props, size: je }) }) : null,
993
+ /* @__PURE__ */ K("div", { className: w("indicators", `size-${b}`), children: [
994
+ fe ? We : null,
995
+ Le
996
+ ] }),
997
+ P ? /* @__PURE__ */ K("ul", { className: w("menu"), ...O(), children: [
998
+ Me({ getItemProps: A, highlightedIndex: y, options: j }),
999
+ R && C.length ? /* @__PURE__ */ v(
1000
+ "li",
1001
+ {
1002
+ className: w("item", y === j.length && "highlighted"),
1003
+ ...A({
1004
+ index: j.length,
1005
+ item: {
1006
+ label: C,
1007
+ value: Ce(C)
1008
+ }
1009
+ }),
1010
+ children: Ne(C)
1011
+ },
1012
+ "add"
1013
+ ) : null
1014
+ ] }) : null,
1015
+ p ? Re(x, He) : 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.11",
3
+ "version": "9.0.13",
4
4
  "description": "Customizable design system with react, typescript, tailwindcss and ariakit.",
5
5
  "files": [
6
6
  "dist"