@studiolxd/brand 41.0.0 → 42.0.0

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 (44) hide show
  1. package/CHANGELOG.md +119 -0
  2. package/dist/_shared/tokens.js +3 -0
  3. package/dist/_types/atoms/AsyncMultiSelect/AsyncMultiSelect.d.ts +28 -5
  4. package/dist/_types/atoms/AsyncSelect/AsyncSelect.d.ts +26 -6
  5. package/dist/_types/atoms/Button/Button.d.ts +17 -4
  6. package/dist/_types/atoms/InputPhone/InputPhone.d.ts +15 -4
  7. package/dist/_types/atoms/MultiSelect/MultiSelect.d.ts +20 -1
  8. package/dist/_types/atoms/NumberInput/NumberInput.d.ts +14 -4
  9. package/dist/_types/atoms/OtpInput/OtpInput.d.ts +15 -4
  10. package/dist/_types/atoms/Select/Select.d.ts +18 -1
  11. package/dist/_types/messages/BrandMessages.d.ts +25 -1
  12. package/dist/_types/messages/index.d.ts +1 -1
  13. package/dist/_types/molecules/Card/Card.d.ts +13 -4
  14. package/dist/_types/molecules/DocsSearch/DocsSearch.d.ts +31 -12
  15. package/dist/_types/molecules/FilterBar/FilterBar.d.ts +10 -1
  16. package/dist/_types/molecules/InputField/InputField.d.ts +16 -2
  17. package/dist/_types/molecules/MultiSelectField/MultiSelectField.d.ts +9 -1
  18. package/dist/_types/molecules/PasswordField/PasswordField.d.ts +22 -2
  19. package/dist/_types/molecules/SearchForm/SearchForm.d.ts +18 -6
  20. package/dist/_types/molecules/SelectField/SelectField.d.ts +5 -0
  21. package/dist/_types/organisms/AnnotationThread/AnnotationThread.d.ts +10 -1
  22. package/dist/annotation-thread.css +1 -1
  23. package/dist/async-multi-select.js +50 -49
  24. package/dist/async-select.js +89 -88
  25. package/dist/brand.css +4 -1
  26. package/dist/card.css +1 -1
  27. package/dist/docs-search.js +38 -37
  28. package/dist/filter-bar.css +1 -1
  29. package/dist/filter-bar.js +19 -17
  30. package/dist/input-field.js +66 -65
  31. package/dist/input-phone.js +39 -38
  32. package/dist/multi-select.js +109 -108
  33. package/dist/number-input.js +61 -60
  34. package/dist/otp-input.js +86 -85
  35. package/dist/password-field.js +46 -45
  36. package/dist/search-form.js +35 -34
  37. package/dist/select.js +75 -71
  38. package/dist/tokens.css +4 -1
  39. package/package.json +1 -1
  40. package/src/tokens/molecules/annotation-thread.css +1 -0
  41. package/src/tokens/molecules/filter-bar.css +2 -0
  42. package/src/tokens/scss/molecules/_annotation-thread.scss +1 -0
  43. package/src/tokens/scss/molecules/_filter-bar.scss +2 -0
  44. package/src/tokens/tokens.json +3 -0
@@ -1,5 +1,18 @@
1
1
  import { type ComponentPropsWithoutRef } from 'react';
2
2
  import './InputField.css';
3
+ /**
4
+ * El único texto que el campo emite por su cuenta: el nombre accesible del
5
+ * aspa de borrado. Es cromo —dice la misma cosa en toda la suite—, así que
6
+ * sale del catálogo común y no de quien monta el campo.
7
+ *
8
+ * El `label`, el `placeholder`, el `helperText` y el `errorMessage` NO están
9
+ * aquí: son el contenido de ESTE campo, y ningún catálogo común puede saber
10
+ * qué dicen.
11
+ */
12
+ export interface InputFieldMessages {
13
+ /** Nombre accesible del botón que vacía un campo de búsqueda. */
14
+ clear: string;
15
+ }
3
16
  export interface InputFieldProps extends Omit<ComponentPropsWithoutRef<'input'>, 'size' | 'type' | 'value' | 'defaultValue'> {
4
17
  id: string;
5
18
  label: string;
@@ -33,8 +46,9 @@ export interface InputFieldProps extends Omit<ComponentPropsWithoutRef<'input'>,
33
46
  */
34
47
  clearable?: boolean;
35
48
  /**
36
- * Nombre accesible del botón de borrado. Default castellano.
37
- * @default 'Borrar'
49
+ * Nombre accesible del botón de borrado. **Sin default**: sale de
50
+ * `inputField.clear` del `BrandMessagesProvider`, y esta prop es la
51
+ * anulación puntual de un uso concreto.
38
52
  */
39
53
  clearLabel?: string;
40
54
  /** Se llama tras vaciar el campo desde el aspa, ya con el foco devuelto. */
@@ -15,6 +15,11 @@ export interface MultiSelectFieldProps {
15
15
  options: MultiSelectOption[];
16
16
  value?: string[];
17
17
  defaultValue?: string[];
18
+ /**
19
+ * Marcador de sitio del control sin valor elegido. Reenvío puro al `MultiSelect`:
20
+ * sin él, el texto sale de `multiSelect.placeholder` del `BrandMessagesProvider`.
21
+ * Se pasa solo cuando el marcador dice algo de ESTE campo.
22
+ */
18
23
  placeholder?: string;
19
24
  /** Nombre del campo en el formulario: se monta un input oculto por valor elegido. */
20
25
  name?: string;
@@ -29,7 +34,10 @@ export interface MultiSelectFieldProps {
29
34
  size?: 'sm' | 'md' | 'lg';
30
35
  /** Se añade DESPUÉS de las clases propias (el consumidor añade, no sustituye). */
31
36
  className?: string;
32
- /** aria-label del botón que quita un valor. Default: `Quitar ${etiqueta}` (castellano). */
37
+ /**
38
+ * aria-label del botón que quita un valor. Reenvío puro al `MultiSelect`:
39
+ * sin él, el texto sale de `multiSelect.remove` del `BrandMessagesProvider`.
40
+ */
33
41
  removeLabel?: (label: string) => string;
34
42
  onValueChange?: (value: string[]) => void;
35
43
  onBlur?: React.FocusEventHandler<HTMLDivElement>;
@@ -1,4 +1,18 @@
1
1
  import './PasswordField.css';
2
+ /**
3
+ * Los dos textos que el campo emite por su cuenta: las dos caras del
4
+ * interruptor de mostrar/ocultar. Son cromo —dicen lo mismo en toda la
5
+ * suite—, y por eso salen del catálogo común.
6
+ *
7
+ * El `label`, el `placeholder`, el `helperText` y el `errorMessage` no están
8
+ * aquí: son el contenido de ESTE campo.
9
+ */
10
+ export interface PasswordFieldMessages {
11
+ /** Nombre accesible del interruptor con la contraseña oculta. */
12
+ show: string;
13
+ /** Nombre accesible del interruptor con la contraseña a la vista. */
14
+ hide: string;
15
+ }
2
16
  export interface PasswordFieldProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'size' | 'type'> {
3
17
  /**
4
18
  * Etiqueta del campo. **Opcional**: si se omite, el componente renderiza solo
@@ -18,9 +32,15 @@ export interface PasswordFieldProps extends Omit<React.ComponentPropsWithoutRef<
18
32
  action?: React.ReactNode;
19
33
  /** Tamaño del campo. */
20
34
  size?: 'sm' | 'md' | 'lg';
21
- /** aria-label del toggle cuando la contraseña está oculta. Default: "Mostrar contraseña". */
35
+ /**
36
+ * aria-label del toggle cuando la contraseña está oculta. **Sin default**:
37
+ * sale de `passwordField.show` del `BrandMessagesProvider`.
38
+ */
22
39
  showPasswordLabel?: string;
23
- /** aria-label del toggle cuando la contraseña es visible. Default: "Ocultar contraseña". */
40
+ /**
41
+ * aria-label del toggle cuando la contraseña es visible. **Sin default**:
42
+ * sale de `passwordField.hide` del `BrandMessagesProvider`.
43
+ */
24
44
  hidePasswordLabel?: string;
25
45
  /**
26
46
  * Se añade DESPUÉS de las clases propias, sobre el wrapper raíz `.password-field`.
@@ -1,4 +1,17 @@
1
1
  import './SearchForm.css';
2
+ /**
3
+ * Los tres textos que el buscador emite por su cuenta. Son cromo: el buscador
4
+ * de sitio se llama igual en toda la suite, y ni el rótulo ni la pista dicen
5
+ * nada de lo que se busca en ESTA pantalla.
6
+ */
7
+ export interface SearchFormMessages {
8
+ /** Etiqueta del campo; nombra también el punto de referencia `search`. */
9
+ label: string;
10
+ /** Pista dentro del campo. */
11
+ placeholder: string;
12
+ /** Nombre accesible del botón de envío. */
13
+ submit: string;
14
+ }
2
15
  export interface SearchFormProps {
3
16
  /** `id` del campo. Si no se pasa, el componente genera uno estable. */
4
17
  id?: string;
@@ -28,8 +41,7 @@ export interface SearchFormProps {
28
41
  method?: 'get' | 'post';
29
42
  /**
30
43
  * Etiqueta del campo. Nombra también el punto de referencia `search`.
31
- * Default castellano.
32
- * @default 'Buscar'
44
+ * **Sin default**: sale de `searchForm.label` del `BrandMessagesProvider`.
33
45
  */
34
46
  label?: string;
35
47
  /**
@@ -38,13 +50,13 @@ export interface SearchFormProps {
38
50
  */
39
51
  labelHidden?: boolean;
40
52
  /**
41
- * Pista dentro del campo. Default castellano.
42
- * @default 'Buscar…'
53
+ * Pista dentro del campo. **Sin default**: sale de
54
+ * `searchForm.placeholder`.
43
55
  */
44
56
  placeholder?: string;
45
57
  /**
46
- * Nombre accesible del botón de envío. Default castellano.
47
- * @default 'Buscar'
58
+ * Nombre accesible del botón de envío. **Sin default**: sale de
59
+ * `searchForm.submit`.
48
60
  */
49
61
  submitLabel?: string;
50
62
  /**
@@ -19,6 +19,11 @@ export interface SelectFieldProps {
19
19
  options: SelectOptionOrGroup[];
20
20
  value?: string;
21
21
  defaultValue?: string;
22
+ /**
23
+ * Marcador de sitio del control sin valor elegido. Reenvío puro al `Select`:
24
+ * sin él, el texto sale de `select.placeholder` del `BrandMessagesProvider`.
25
+ * Se pasa solo cuando el marcador dice algo de ESTE campo.
26
+ */
22
27
  placeholder?: string;
23
28
  /** Nombre del campo en el formulario: Base UI monta un input oculto con el valor. */
24
29
  name?: string;
@@ -43,7 +43,16 @@ export interface AnnotationThreadProps extends React.ComponentPropsWithoutRef<'a
43
43
  * `resolved` se retira visualmente sin desaparecer.
44
44
  */
45
45
  status?: AnnotationThreadStatus;
46
- /** Acciones del hilo entero: resolver, reabrir, seguir. Van al pie. */
46
+ /**
47
+ * Acciones del hilo entero: resolver, reabrir, seguir. Van al pie, **una por
48
+ * línea y a la línea entera**, siempre: el hilo vive en un panel de revisión
49
+ * —una columna estrecha también en escritorio—, así que el ancho de la
50
+ * ventana no dice nada de lo que mide este hueco.
51
+ *
52
+ * Se pasan sueltas (`<><Button/><Button/></>`), sin envolverlas en un
53
+ * `Inline`: el envoltorio se llevaría la línea y los botones se quedarían a
54
+ * su ancho natural dentro de él.
55
+ */
47
56
  actions?: ReactNode;
48
57
  /** Con qué se responde: un `MessageComposer`, un `TextareaField`, un `Button`. */
49
58
  reply?: ReactNode;
@@ -1 +1 @@
1
- .annotation-thread{gap:var(--annotation-thread-gap);padding-block:var(--annotation-thread-padding-block);padding-inline:var(--annotation-thread-padding-inline);border:var(--annotation-thread-border-width) var(--annotation-thread-border-style) var(--annotation-thread-border-color);flex-direction:column;display:flex}.annotation-thread.annotation-thread--acknowledged{opacity:var(--annotation-thread-acknowledged-opacity)}.annotation-thread.annotation-thread--resolved{opacity:var(--annotation-thread-resolved-opacity)}.annotation-thread__status{display:flex}.annotation-thread__item{gap:var(--annotation-thread-item-gap);flex-direction:column;display:flex}.annotation-thread__header{align-items:center;gap:var(--annotation-thread-header-gap);flex-wrap:wrap;display:flex}.annotation-thread__avatar{flex-shrink:0;display:inline-flex}.annotation-thread__author{font-family:var(--annotation-thread-author-font-family);font-size:var(--annotation-thread-author-font-size);font-weight:var(--annotation-thread-author-font-weight);color:var(--annotation-thread-author-color)}.annotation-thread__date,.annotation-thread__edited{font-size:var(--annotation-thread-meta-font-size);color:var(--annotation-thread-meta-color)}.annotation-thread__meta{align-items:center;gap:var(--annotation-thread-header-gap);overflow-wrap:anywhere;min-inline-size:0;font-size:var(--annotation-thread-meta-font-size);color:var(--annotation-thread-meta-color);flex-wrap:wrap;display:inline-flex}.annotation-thread__body{font-size:var(--annotation-thread-body-font-size);line-height:var(--annotation-thread-body-line-height);color:var(--annotation-thread-body-color)}.annotation-thread__item-actions{gap:var(--annotation-thread-header-gap);flex-wrap:wrap;display:flex}.annotation-thread__replies{gap:var(--annotation-thread-items-gap);border-inline-start:var(--annotation-thread-reply-guide-width) var(--annotation-thread-reply-guide-style) var(--annotation-thread-reply-guide-color);flex-direction:column;padding-inline-start:var(--annotation-thread-reply-indent);display:flex}.annotation-thread__replies-label{font-size:var(--annotation-thread-replies-label-font-size);color:var(--annotation-thread-replies-label-color);margin-block:0}.annotation-thread__actions{gap:var(--annotation-thread-header-gap);flex-wrap:wrap;display:flex}
1
+ .annotation-thread{gap:var(--annotation-thread-gap);padding-block:var(--annotation-thread-padding-block);padding-inline:var(--annotation-thread-padding-inline);border:var(--annotation-thread-border-width) var(--annotation-thread-border-style) var(--annotation-thread-border-color);flex-direction:column;display:flex}.annotation-thread.annotation-thread--acknowledged{opacity:var(--annotation-thread-acknowledged-opacity)}.annotation-thread.annotation-thread--resolved{opacity:var(--annotation-thread-resolved-opacity)}.annotation-thread__status{display:flex}.annotation-thread__item{gap:var(--annotation-thread-item-gap);flex-direction:column;display:flex}.annotation-thread__header{align-items:center;gap:var(--annotation-thread-header-gap);flex-wrap:wrap;display:flex}.annotation-thread__avatar{flex-shrink:0;display:inline-flex}.annotation-thread__author{font-family:var(--annotation-thread-author-font-family);font-size:var(--annotation-thread-author-font-size);font-weight:var(--annotation-thread-author-font-weight);color:var(--annotation-thread-author-color)}.annotation-thread__date,.annotation-thread__edited{font-size:var(--annotation-thread-meta-font-size);color:var(--annotation-thread-meta-color)}.annotation-thread__meta{align-items:center;gap:var(--annotation-thread-header-gap);overflow-wrap:anywhere;min-inline-size:0;font-size:var(--annotation-thread-meta-font-size);color:var(--annotation-thread-meta-color);flex-wrap:wrap;display:inline-flex}.annotation-thread__body{font-size:var(--annotation-thread-body-font-size);line-height:var(--annotation-thread-body-line-height);color:var(--annotation-thread-body-color)}.annotation-thread__item-actions{gap:var(--annotation-thread-header-gap);flex-wrap:wrap;display:flex}.annotation-thread__replies{gap:var(--annotation-thread-items-gap);border-inline-start:var(--annotation-thread-reply-guide-width) var(--annotation-thread-reply-guide-style) var(--annotation-thread-reply-guide-color);flex-direction:column;padding-inline-start:var(--annotation-thread-reply-indent);display:flex}.annotation-thread__replies-label{font-size:var(--annotation-thread-replies-label-font-size);color:var(--annotation-thread-replies-label-color);margin-block:0}.annotation-thread__actions{align-items:stretch;gap:var(--annotation-thread-actions-gap);flex-direction:column;display:flex}.annotation-thread__actions>*{inline-size:100%}
@@ -1,47 +1,48 @@
1
1
  'use client';
2
2
  import './async-multi-select.css';
3
- import { Icon as e } from "./icon.js";
4
- import { Spinner as t } from "./spinner.js";
5
- import { forwardRef as n, useCallback as r, useEffect as ee, useId as i, useRef as a, useState as o } from "react";
3
+ import { n as e } from "./_shared/brandmessagescontext.js";
4
+ import { Icon as t } from "./icon.js";
5
+ import { Spinner as n } from "./spinner.js";
6
+ import { forwardRef as r, useCallback as ee, useEffect as te, useId as i, useRef as a, useState as o } from "react";
6
7
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
8
  import { Popover as l } from "@base-ui/react/popover";
8
9
  //#region src/stories/atoms/AsyncMultiSelect/AsyncMultiSelect.tsx
9
- function te(e, t) {
10
+ function u(e, t) {
10
11
  typeof e == "function" ? e(t) : e && (e.current = t);
11
12
  }
12
- var u = n(function({ onSearch: n, value: u, defaultValue: d = [], onValueChange: f, selectedOptions: p, placeholder: m = "Buscar…", disabled: h, readOnly: g, size: _ = "md", debounceMs: v = 300, id: y, name: b, error: x = !1, required: S, onBlur: C, className: w, "aria-label": T, "aria-describedby": ne, removeLabel: re = (e) => `Quitar ${e}`, emptyMessage: ie = "Sin resultados", loadingLabel: E = "Buscando…", container: D }, O) {
13
- let [k, A] = o(!1), [j, M] = o(""), [N, P] = o(!1), [F, I] = o([]), [L, R] = o(!1), [z, B] = o(-1), [V, H] = o(d), [U, W] = o([]), G = a(null), K = a(0), q = a(null), J = a(null), Y = i(), ae = i(), X = u === void 0 ? V : u, oe = X.map((e) => p?.find((t) => t.value === e) ?? U.find((t) => t.value === e) ?? {
13
+ var d = r(function({ onSearch: r, value: d, defaultValue: f = [], onValueChange: p, selectedOptions: ne, placeholder: m, disabled: h, readOnly: g, size: _ = "md", debounceMs: v = 300, id: re, name: y, error: b = !1, required: ie, onBlur: ae, className: x, "aria-label": S, "aria-describedby": C, removeLabel: w, emptyMessage: T, loadingLabel: E, container: D }, oe) {
14
+ let O = e("asyncMultiSelect"), [k, A] = o(!1), [j, M] = o(""), [N, P] = o(!1), [F, I] = o([]), [L, R] = o(!1), [z, B] = o(-1), [V, H] = o(f), [U, W] = o([]), G = a(null), K = a(0), q = a(null), J = a(null), Y = i(), se = i(), X = d === void 0 ? V : d, ce = X.map((e) => ne?.find((t) => t.value === e) ?? U.find((t) => t.value === e) ?? {
14
15
  value: e,
15
16
  label: e
16
- }), Z = (e) => `${ae}-opt-${e}`, Q = r(async (e) => {
17
+ }), Z = (e) => `${se}-opt-${e}`, Q = ee(async (e) => {
17
18
  let t = ++K.current;
18
19
  P(!0), R(!1);
19
20
  try {
20
- let r = await n(e);
21
+ let n = await r(e);
21
22
  if (t !== K.current) return;
22
- I(r), B(-1);
23
+ I(n), B(-1);
23
24
  } catch {
24
25
  if (t !== K.current) return;
25
26
  I([]), B(-1);
26
27
  } finally {
27
28
  t === K.current && (P(!1), R(!0));
28
29
  }
29
- }, [n]);
30
- ee(() => () => {
30
+ }, [r]);
31
+ te(() => () => {
31
32
  K.current += 1, G.current && clearTimeout(G.current);
32
33
  }, []);
33
- function se(e) {
34
+ function le(e) {
34
35
  let t = e.target.value;
35
36
  M(t), k || A(!0), G.current && clearTimeout(G.current), G.current = setTimeout(() => void Q(t), v);
36
37
  }
37
- function ce(e) {
38
+ function ue(e) {
38
39
  h || g || k || (e.preventDefault(), q.current?.focus(), B(-1), M(""), I([]), R(!1), A(!0), Q(""));
39
40
  }
40
41
  function $(e, t) {
41
42
  let n = X.includes(e) ? X.filter((t) => t !== e) : [...X, e];
42
- t && W((e) => e.some((e) => e.value === t.value) ? e : [...e, t]), u === void 0 && H(n), f?.(n);
43
+ t && W((e) => e.some((e) => e.value === t.value) ? e : [...e, t]), d === void 0 && H(n), p?.(n);
43
44
  }
44
- function le(e) {
45
+ function de(e) {
45
46
  if (e.key === "ArrowDown") e.preventDefault(), k ? B((e) => Math.min(e + 1, F.length - 1)) : (A(!0), Q(j));
46
47
  else if (e.key === "ArrowUp") e.preventDefault(), B((e) => Math.max(e - 1, -1));
47
48
  else if (e.key === "Enter" && z >= 0 && F[z]) e.preventDefault(), $(F[z].value, F[z]), q.current?.focus();
@@ -52,7 +53,7 @@ var u = n(function({ onSearch: n, value: u, defaultValue: d = [], onValueChange:
52
53
  $(e);
53
54
  }
54
55
  }
55
- function ue(e, t) {
56
+ function fe(e, t) {
56
57
  if (!e) {
57
58
  if (t.reason === "outside-press") {
58
59
  let e = t.event?.target;
@@ -61,61 +62,61 @@ var u = n(function({ onSearch: n, value: u, defaultValue: d = [], onValueChange:
61
62
  A(!1), M(""), B(-1);
62
63
  }
63
64
  }
64
- let de = [
65
+ let pe = [
65
66
  "async-multi-select",
66
67
  _ === "md" ? "" : `async-multi-select--${_}`,
67
68
  h ? "async-multi-select--disabled" : "",
68
69
  k ? "async-multi-select--open" : "",
69
- x ? "async-multi-select--error" : "",
70
- w ?? ""
71
- ].filter(Boolean).join(" "), fe = ["async-multi-select__content", _ === "md" ? "" : `async-multi-select__content--${_}`].filter(Boolean).join(" ");
70
+ b ? "async-multi-select--error" : "",
71
+ x ?? ""
72
+ ].filter(Boolean).join(" "), me = ["async-multi-select__content", _ === "md" ? "" : `async-multi-select__content--${_}`].filter(Boolean).join(" ");
72
73
  return /* @__PURE__ */ c(l.Root, {
73
74
  open: k,
74
- onOpenChange: ue,
75
+ onOpenChange: fe,
75
76
  children: [/* @__PURE__ */ c("div", {
76
77
  ref: J,
77
- className: de,
78
+ className: pe,
78
79
  "data-popup-open": k || void 0,
79
80
  children: [/* @__PURE__ */ c("div", {
80
81
  className: "async-multi-select__input-area",
81
82
  children: [
82
- oe.map((t) => /* @__PURE__ */ c("span", {
83
+ ce.map((e) => /* @__PURE__ */ c("span", {
83
84
  className: "async-multi-select__pill",
84
85
  children: [/* @__PURE__ */ s("span", {
85
86
  className: "async-multi-select__pill-label",
86
- children: t.label
87
+ children: e.label
87
88
  }), !h && !g && /* @__PURE__ */ s("button", {
88
89
  type: "button",
89
90
  className: "async-multi-select__pill-remove",
90
- "aria-label": re(t.label),
91
+ "aria-label": O("remove", w)(e.label),
91
92
  tabIndex: -1,
92
- onMouseDown: (e) => {
93
- e.preventDefault(), $(t.value);
93
+ onMouseDown: (t) => {
94
+ t.preventDefault(), $(e.value);
94
95
  },
95
- children: /* @__PURE__ */ s(e, {
96
+ children: /* @__PURE__ */ s(t, {
96
97
  name: "close",
97
98
  size: "xs"
98
99
  })
99
100
  })]
100
- }, t.value)),
101
+ }, e.value)),
101
102
  /* @__PURE__ */ s("input", {
102
103
  ref: (e) => {
103
- q.current = e, te(O, e);
104
+ q.current = e, u(oe, e);
104
105
  },
105
- id: y,
106
+ id: re,
106
107
  type: "text",
107
108
  className: "async-multi-select__input",
108
109
  value: j,
109
- onChange: se,
110
- onPointerDown: ce,
111
- onKeyDown: le,
112
- placeholder: X.length === 0 ? m : void 0,
110
+ onChange: le,
111
+ onPointerDown: ue,
112
+ onKeyDown: de,
113
+ placeholder: X.length === 0 ? O("placeholder", m) : void 0,
113
114
  disabled: h,
114
115
  readOnly: g,
115
- "aria-label": T,
116
- "aria-describedby": ne,
117
- "aria-invalid": x || void 0,
118
- "aria-required": S || void 0,
116
+ "aria-label": S,
117
+ "aria-describedby": C,
118
+ "aria-invalid": b || void 0,
119
+ "aria-required": ie || void 0,
119
120
  "aria-expanded": k,
120
121
  "aria-haspopup": "listbox",
121
122
  "aria-controls": k ? Y : void 0,
@@ -123,15 +124,15 @@ var u = n(function({ onSearch: n, value: u, defaultValue: d = [], onValueChange:
123
124
  autoComplete: "off",
124
125
  role: "combobox",
125
126
  "aria-autocomplete": "list",
126
- onBlur: C
127
+ onBlur: ae
127
128
  }),
128
- b && X.map((e) => /* @__PURE__ */ s("input", {
129
+ y && X.map((e) => /* @__PURE__ */ s("input", {
129
130
  type: "hidden",
130
- name: b,
131
+ name: y,
131
132
  value: e
132
133
  }, e))
133
134
  ]
134
- }), N && /* @__PURE__ */ s(t, {
135
+ }), N && /* @__PURE__ */ s(n, {
135
136
  size: "sm",
136
137
  "aria-hidden": !0
137
138
  })]
@@ -143,25 +144,25 @@ var u = n(function({ onSearch: n, value: u, defaultValue: d = [], onValueChange:
143
144
  align: "start",
144
145
  sideOffset: -1,
145
146
  children: /* @__PURE__ */ s(l.Popup, {
146
- className: fe,
147
+ className: me,
147
148
  initialFocus: !1,
148
149
  finalFocus: !1,
149
150
  children: /* @__PURE__ */ c("div", {
150
151
  role: "listbox",
151
152
  "aria-multiselectable": "true",
152
- "aria-label": T ?? m,
153
+ "aria-label": S ?? O("placeholder", m),
153
154
  id: Y,
154
155
  children: [
155
156
  N && /* @__PURE__ */ s("div", {
156
157
  className: "async-multi-select__loading",
157
- children: /* @__PURE__ */ s(t, {
158
+ children: /* @__PURE__ */ s(n, {
158
159
  size: "sm",
159
- label: E
160
+ label: O("loading", E)
160
161
  })
161
162
  }),
162
163
  !N && L && F.length === 0 && /* @__PURE__ */ s("div", {
163
164
  className: "async-multi-select__empty",
164
- children: ie
165
+ children: O("empty", T)
165
166
  }),
166
167
  !N && F.map((e, t) => {
167
168
  let n = X.includes(e.value), r = z === t;
@@ -193,4 +194,4 @@ var u = n(function({ onSearch: n, value: u, defaultValue: d = [], onValueChange:
193
194
  });
194
195
  });
195
196
  //#endregion
196
- export { u as AsyncMultiSelect };
197
+ export { d as AsyncMultiSelect };