prometeo-design-system 4.6.3 → 4.6.5

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 (124) hide show
  1. package/dist/Avatar.es.js +1 -1
  2. package/dist/Button.es.js +1 -1
  3. package/dist/CardProfile.es.js +1 -1
  4. package/dist/CheckBox.es.js +1 -1
  5. package/dist/Chip.es.js +1 -1
  6. package/dist/DatePicker-n6qm0fey.js +3573 -0
  7. package/dist/DatePicker.es.js +1 -1
  8. package/dist/DialogModal.es.js +154 -69
  9. package/dist/DrawerDesktop.es.js +2 -2
  10. package/dist/DrawerMobile.es.js +1 -1
  11. package/dist/DropZone.es.js +1 -1
  12. package/dist/FAButton.es.js +1 -1
  13. package/dist/Header.es.js +8 -9
  14. package/dist/{HelperComponent-ljsn0xD6.js → HelperComponent-DhGU_ug-.js} +1 -1
  15. package/dist/IconButton.es.js +3 -3
  16. package/dist/Icons/AccountCircle.es.js +1 -1
  17. package/dist/Icons/Add.es.js +1 -1
  18. package/dist/Icons/ArrowDownward.es.js +1 -1
  19. package/dist/Icons/ArrowLeft.es.js +1 -1
  20. package/dist/Icons/ArrowUpDown.es.js +1 -1
  21. package/dist/Icons/ArrowUpward.es.js +1 -1
  22. package/dist/Icons/AttachFile.es.js +1 -1
  23. package/dist/Icons/Boards.es.js +1 -1
  24. package/dist/Icons/Calendar.es.js +1 -1
  25. package/dist/Icons/Cancel.es.js +1 -1
  26. package/dist/Icons/Check.es.js +1 -1
  27. package/dist/Icons/CheckCircle.es.js +1 -1
  28. package/dist/Icons/CheckList.es.js +1 -1
  29. package/dist/Icons/ChevronDown.es.js +1 -1
  30. package/dist/Icons/Clock.es.js +1 -1
  31. package/dist/Icons/Close.es.js +1 -1
  32. package/dist/Icons/CloseNavBarDesktop.es.js +1 -1
  33. package/dist/Icons/Collapse.es.js +1 -1
  34. package/dist/Icons/Company.es.js +1 -1
  35. package/dist/Icons/Copy.es.js +1 -1
  36. package/dist/Icons/CrevronLeft.es.js +1 -1
  37. package/dist/Icons/CrevronRight.es.js +1 -1
  38. package/dist/Icons/DocumentFill.es.js +1 -1
  39. package/dist/Icons/Download.es.js +1 -1
  40. package/dist/Icons/DragIndicator.es.js +1 -1
  41. package/dist/Icons/Edit.es.js +1 -1
  42. package/dist/Icons/EditFill.es.js +1 -1
  43. package/dist/Icons/Email.es.js +1 -1
  44. package/dist/Icons/Error.es.js +1 -1
  45. package/dist/Icons/EyeVisibility.es.js +1 -1
  46. package/dist/Icons/EyeVisibilityOff.es.js +1 -1
  47. package/dist/Icons/FaLock.es.js +1 -1
  48. package/dist/Icons/FastForward.es.js +1 -1
  49. package/dist/Icons/File.es.js +1 -1
  50. package/dist/Icons/Filter.es.js +1 -1
  51. package/dist/Icons/FormatColorText.es.js +1 -1
  52. package/dist/Icons/Help.es.js +1 -1
  53. package/dist/Icons/HistoryActivity.es.js +1 -1
  54. package/dist/Icons/Home.es.js +1 -1
  55. package/dist/Icons/Image.es.js +1 -1
  56. package/dist/Icons/Info.es.js +1 -1
  57. package/dist/Icons/Logout.es.js +1 -1
  58. package/dist/Icons/MessageSquare.es.js +1 -1
  59. package/dist/Icons/MessageSquareFill.es.js +1 -1
  60. package/dist/Icons/MoreVert.es.js +1 -1
  61. package/dist/Icons/Notifications.es.js +1 -1
  62. package/dist/Icons/Pause.es.js +1 -1
  63. package/dist/Icons/Reassignment.es.js +1 -1
  64. package/dist/Icons/ReassignmentFill.es.js +1 -1
  65. package/dist/Icons/Reload.es.js +1 -1
  66. package/dist/Icons/Search.es.js +1 -1
  67. package/dist/Icons/Send.es.js +1 -1
  68. package/dist/Icons/Settings.es.js +1 -1
  69. package/dist/Icons/Shared.es.js +1 -1
  70. package/dist/Icons/Sort.es.js +1 -1
  71. package/dist/Icons/StarFill.es.js +1 -1
  72. package/dist/Icons/Stars.es.js +1 -1
  73. package/dist/Icons/Ticket.es.js +1 -1
  74. package/dist/Icons/TicketFilled.es.js +1 -1
  75. package/dist/Icons/Trash.es.js +1 -1
  76. package/dist/Icons/TrashFill.es.js +1 -1
  77. package/dist/Icons/Upload.es.js +1 -1
  78. package/dist/Icons/UploadCloud.es.js +1 -1
  79. package/dist/Icons/UserAdd.es.js +1 -1
  80. package/dist/Icons/UserAddFill.es.js +1 -1
  81. package/dist/Icons/UserAvatar.es.js +1 -1
  82. package/dist/Icons/UserPerson.es.js +1 -1
  83. package/dist/Icons/WhatsApp.es.js +1 -1
  84. package/dist/Image.es.js +1 -1
  85. package/dist/{ImageGallery-DG9ovlQ-.js → ImageGallery-4DdXqwRy.js} +1 -1
  86. package/dist/ImageGallery.es.js +1 -1
  87. package/dist/Input.es.js +2 -2
  88. package/dist/InputMultiple.es.js +1 -1
  89. package/dist/Logo.es.js +1 -1
  90. package/dist/Menu.es.js +1 -1
  91. package/dist/NotificationCard.es.js +1 -1
  92. package/dist/OtpInput.es.js +1 -1
  93. package/dist/Pagination.es.js +1 -1
  94. package/dist/PlainTooltip.es.js +1 -1
  95. package/dist/ProfilePictureUpload.es.js +1 -1
  96. package/dist/ProgressBar.es.js +1 -1
  97. package/dist/PyrionLayout.es.js +333 -363
  98. package/dist/RadioButton.es.js +2 -2
  99. package/dist/RecurrentDatePicker.es.js +3 -3
  100. package/dist/RecurrentDatePickerRRule.es.js +4 -2
  101. package/dist/Scrollable.es.js +1 -1
  102. package/dist/SegmentedButton.es.js +1 -1
  103. package/dist/Select.es.js +558 -557
  104. package/dist/SelectSearch.es.js +1 -1
  105. package/dist/Skeleton.es.js +1 -1
  106. package/dist/Spinner.es.js +1 -1
  107. package/dist/Steps.es.js +1 -1
  108. package/dist/Switch.es.js +7 -7
  109. package/dist/{TabLinks-DnoWdrdk.js → TabLinks-C0ywjYt-.js} +2 -2
  110. package/dist/TabLinks.es.js +1 -1
  111. package/dist/Table.es.js +1 -1
  112. package/dist/TextArea.es.js +1 -1
  113. package/dist/TicketCard.es.js +1 -1
  114. package/dist/Toast.es.js +1 -1
  115. package/dist/ToastProvider.es.js +1 -1
  116. package/dist/Tooltip.es.js +1 -1
  117. package/dist/UserCard.es.js +1 -1
  118. package/dist/{badge-BEx-0Q-K.js → badge-CiiB9SGl.js} +1 -1
  119. package/dist/components/Dialog/Dialog.d.ts +15 -4
  120. package/dist/components/Select/Select.d.ts +1 -0
  121. package/dist/{jsx-runtime-GkKLlHH4.js → jsx-runtime-DKDX3adD.js} +20 -2
  122. package/dist/prometeo-design-system.es.js +5 -5
  123. package/package.json +1 -1
  124. package/dist/DatePicker-QuBgR5DQ.js +0 -3738
package/dist/Select.es.js CHANGED
@@ -1,124 +1,125 @@
1
- import { j as s } from "./jsx-runtime-GkKLlHH4.js";
2
- import { c as d } from "./cn-B6yFEsav.js";
3
- import Se, { memo as te, useState as Ne, useRef as ae, useMemo as ee, useCallback as _, useEffect as pe, useImperativeHandle as Je } from "react";
4
- import Qe from "./Spinner.es.js";
5
- import { createPortal as Xe } from "react-dom";
6
- import { u as Ye } from "./useDragScroll-CHN9OMwn.js";
7
- import { u as Ze } from "./useLabelBackground-D5SzHhl_.js";
8
- import { H as et } from "./HelperComponent-ljsn0xD6.js";
9
- import tt from "./Chip.es.js";
10
- import nt from "./CheckBox.es.js";
11
- import { g as E, h as Ue } from "./utils-X4-h3cum.js";
12
- import rt from "./Input.es.js";
13
- import qe from "./Skeleton.es.js";
14
- import { Cancel as lt } from "./Icons/Cancel.es.js";
15
- import { ChevronDown as Re } from "./Icons/ChevronDown.es.js";
16
- import { Search as ot } from "./Icons/Search.es.js";
17
- const at = (e) => {
18
- const n = [], h = (v) => {
19
- v.forEach((C) => {
20
- const N = C, g = typeof N == "object" ? N?.options : [];
21
- Array.isArray(g) && g.length > 0 ? h(g) : n.push(C);
1
+ import { j as s } from "./jsx-runtime-DKDX3adD.js";
2
+ import { c } from "./cn-B6yFEsav.js";
3
+ import we, { memo as ee, useState as Se, useRef as se, useMemo as Z, useCallback as _, useEffect as he, useImperativeHandle as Qe } from "react";
4
+ import Xe from "./Spinner.es.js";
5
+ import { createPortal as Ye } from "react-dom";
6
+ import { u as Ze } from "./useDragScroll-CHN9OMwn.js";
7
+ import { u as et } from "./useLabelBackground-D5SzHhl_.js";
8
+ import { H as tt } from "./HelperComponent-DhGU_ug-.js";
9
+ import nt from "./Chip.es.js";
10
+ import rt from "./CheckBox.es.js";
11
+ import { g as E, h as qe } from "./utils-X4-h3cum.js";
12
+ import lt from "./Input.es.js";
13
+ import Re from "./Skeleton.es.js";
14
+ import { Cancel as ot } from "./Icons/Cancel.es.js";
15
+ import { ChevronDown as Ve } from "./Icons/ChevronDown.es.js";
16
+ import { Search as at } from "./Icons/Search.es.js";
17
+ const st = (e) => {
18
+ const n = [], p = (x) => {
19
+ x.forEach((y) => {
20
+ const N = y, g = typeof N == "object" ? N?.options : [];
21
+ Array.isArray(g) && g.length > 0 ? p(g) : n.push(y);
22
22
  });
23
23
  };
24
- return h(e), n;
24
+ return p(e), n;
25
25
  }, Ke = {
26
26
  default: {
27
27
  container: "",
28
- input: d(
28
+ input: c(
29
29
  "border-neutral-default-default text-neutral-default-default",
30
30
  "focus:ring-primary-default-default focus:ring-[1px] focus:border-primary-default-default ",
31
31
  "hover:border-primary-default-default"
32
32
  ),
33
- label: d(
33
+ label: c(
34
34
  "text-neutral-medium-default",
35
35
  "peer-focus:text-primary-default-default"
36
36
  ),
37
- icon: d(
37
+ icon: c(
38
38
  "text-neutral-medium-default",
39
39
  "peer-focus:text-primary-default-default"
40
40
  )
41
41
  },
42
42
  error: {
43
43
  container: "",
44
- input: d(
44
+ input: c(
45
45
  "border-error-default-default text-neutral-default-default hover:border-error-default-hover",
46
46
  "focus:border-error-default focus:border-2",
47
47
  "focus:ring-0 focus:ring-error-default/20"
48
48
  ),
49
- label: d("text-error-light", "peer-focus:text-error-light"),
50
- icon: d("text-error-medium-default", "peer-focus:text-error-light")
49
+ label: c("text-error-light", "peer-focus:text-error-light"),
50
+ icon: c("text-error-medium-default", "peer-focus:text-error-light")
51
51
  },
52
52
  success: {
53
53
  container: "",
54
- input: d(
54
+ input: c(
55
55
  "border-success-default-default text-neutral-default-default",
56
56
  "focus:border-success-default focus:border-2",
57
57
  "focus:ring-0 focus:ring-success-default/20"
58
58
  ),
59
- label: d("text-success", "peer-focus:text-success-light"),
60
- icon: d("text-success-medium-default", "peer-focus:text-success-light")
59
+ label: c("text-success", "peer-focus:text-success-light"),
60
+ icon: c("text-success-medium-default", "peer-focus:text-success-light")
61
61
  }
62
62
  }, We = {
63
- input: d(
63
+ input: c(
64
64
  "border-neutral-strong-default text-neutral-default-default pointer-events-none",
65
65
  "focus:ring-0 focus:border-primary-default-disabled ",
66
66
  "hover:border-neutral-default-disabled"
67
67
  ),
68
- label: d(
68
+ label: c(
69
69
  "text-neutral-medium-disabled",
70
70
  "peer-focus:text-primary-default-default"
71
71
  ),
72
- icon: d(
72
+ icon: c(
73
73
  "text-neutral-medium-disabled",
74
74
  "peer-focus:text-primary-default-default"
75
75
  )
76
76
  };
77
- function st(e) {
78
- const [n, h] = Ne(!1), [v, C] = Ne([]), [N, g] = Ne(""), M = ae(null), f = ae(null), T = ae(null), $ = ae(null), F = ae(
77
+ function it(e) {
78
+ const [n, p] = Se(!1), [x, y] = Se([]), [N, g] = Se(""), z = se(null), m = se(null), A = se(null), $ = se(null), F = se(
79
79
  () => {
80
80
  }
81
- ), De = ae(null), ge = ae(/* @__PURE__ */ new Set()), {
82
- id: z,
81
+ ), Ne = se(null), pe = se(/* @__PURE__ */ new Set()), {
82
+ id: I,
83
83
  name: j,
84
- label: be,
85
- height: xe,
86
- options: J,
87
- controls: ne,
88
- className: K,
89
- placeholder: L,
90
- optionValue: H,
91
- optionLabel: se,
92
- renderOption: W,
93
- renderOptionGroupHeader: ie,
94
- renderSelection: je,
95
- renderOptionContext: ze,
96
- buttonClassName: He,
97
- dropdownClassName: re,
98
- containerClassName: B,
99
- dropdownOptions: k,
100
- helperComponent: Q,
101
- errorComponent: ye,
102
- onRemoveOption: ke,
103
- onOptionClick: U,
104
- onClose: Oe,
105
- onClear: ve,
106
- disabled: P = !1,
107
- overflow: Ae = "wrap",
108
- variant: Ce = "default",
109
- isLoading: le = !1,
110
- attachToParent: ue = !1,
111
- displayMode: Ee = "compact",
112
- labelVariant: X = "default",
113
- disableOpenOnFocus: Me = !1,
114
- emptyMessage: Te = "No hay opciones disponibles"
115
- } = e, { ref: Le } = Ze(), { bind: q, ref: Pe } = Ye({
84
+ label: ge,
85
+ height: be,
86
+ options: R,
87
+ controls: te,
88
+ tabIndex: K,
89
+ className: M,
90
+ placeholder: W,
91
+ optionValue: k,
92
+ optionLabel: V,
93
+ renderOption: B,
94
+ renderOptionGroupHeader: Ae,
95
+ renderSelection: De,
96
+ renderOptionContext: je,
97
+ buttonClassName: ne,
98
+ dropdownClassName: U,
99
+ containerClassName: He,
100
+ dropdownOptions: v,
101
+ helperComponent: xe,
102
+ errorComponent: ke,
103
+ onRemoveOption: re,
104
+ onOptionClick: ie,
105
+ onClose: ye,
106
+ onClear: ue,
107
+ disabled: J = !1,
108
+ overflow: Ue = "wrap",
109
+ variant: T = "default",
110
+ isLoading: ce = !1,
111
+ attachToParent: Me = !1,
112
+ displayMode: ve = "compact",
113
+ labelVariant: le = "default",
114
+ disableOpenOnFocus: Te = !1,
115
+ emptyMessage: Oe = "No hay opciones disponibles"
116
+ } = e, { ref: Ee } = et(), { bind: Q, ref: Pe } = Ze({
116
117
  axis: "x",
117
118
  cursor: { idle: "default", dragging: "grabbing" }
118
- }), ce = e.multiple ? Array.isArray(e.value) && e.value.length > 0 && e.value.every((t) => t != null && t !== "") : e.value !== void 0 && e.value !== null && e.value !== "", _e = {}, Ie = ee(() => X === "static" && L ? L : "", [X, L]), $e = ee(
119
- () => k?.controledSearchValue || N,
120
- [k?.controledSearchValue, N]
121
- ), Ge = () => {
119
+ }), de = e.multiple ? Array.isArray(e.value) && e.value.length > 0 && e.value.every((t) => t != null && t !== "") : e.value !== void 0 && e.value !== null && e.value !== "", Le = {}, _e = Z(() => le === "static" && W ? W : "", [le, W]), Ie = Z(
120
+ () => v?.controledSearchValue || N,
121
+ [v?.controledSearchValue, N]
122
+ ), $e = () => {
122
123
  const t = {
123
124
  static: {
124
125
  active: "relative prometeo-fonts-label-large",
@@ -128,351 +129,351 @@ function st(e) {
128
129
  active: "absolute top-0 -translate-y-1/2 left-3 px-1 prometeo-fonts-body-small",
129
130
  default: "absolute top-1/2 -translate-y-1/2 "
130
131
  }
131
- }, a = n || ce ? "active" : "default";
132
- return t[X][a];
133
- }, I = _(
132
+ }, l = n || de ? "active" : "default";
133
+ return t[le][l];
134
+ }, L = _(
134
135
  (t) => ({
135
- id: E(t, H),
136
- value: E(t, H),
137
- label: E(t, se)
136
+ id: E(t, k),
137
+ value: E(t, k),
138
+ label: E(t, V)
138
139
  }),
139
- [H, se]
140
- ), R = ee(() => at(J), [J]), we = ee(
141
- () => R.map(I),
142
- [R, I]
143
- ), de = ee(() => {
140
+ [k, V]
141
+ ), q = Z(() => st(R), [R]), fe = Z(
142
+ () => q.map(L),
143
+ [q, L]
144
+ ), r = Z(() => {
144
145
  const t = [];
145
146
  if (e.multiple)
146
- e.value?.forEach((a) => {
147
- const l = R?.find(
148
- (c) => E(c, H) === a
147
+ e.value?.forEach((l) => {
148
+ const a = q?.find(
149
+ (b) => E(b, k) === l
149
150
  );
150
- l && t.push(l);
151
+ a && t.push(a);
151
152
  });
152
153
  else {
153
- const a = R?.find(
154
- (l) => E(l, H) === e.value
154
+ const l = q?.find(
155
+ (a) => E(a, k) === e.value
155
156
  );
156
- a && t.push(a);
157
+ l && t.push(l);
157
158
  }
158
159
  return t;
159
- }, [e.value, H, R, e.multiple]), r = ee(
160
- () => de.map(I),
161
- [de, I]
162
- ), o = ee(
163
- () => new Set(r.map((t) => t.id)),
164
- [r]
165
- ), i = ee(() => {
160
+ }, [e.value, k, q, e.multiple]), o = Z(
161
+ () => r.map(L),
162
+ [r, L]
163
+ ), i = Z(
164
+ () => new Set(o.map((t) => t.id)),
165
+ [o]
166
+ ), u = Z(() => {
166
167
  const t = [];
167
- return J.forEach((a, l) => {
168
- const c = a, x = typeof c == "object" ? c?.options : [];
169
- if (Array.isArray(x) && x.length > 0) {
170
- const m = c.label, b = E(a, H), Z = `__group-${String(b ?? l)}`, me = {
171
- id: Z,
172
- value: Z,
173
- label: typeof m == "string" ? m : String(b ?? `Grupo ${l + 1}`),
168
+ return R.forEach((l, a) => {
169
+ const b = l, w = typeof b == "object" ? b?.options : [];
170
+ if (Array.isArray(w) && w.length > 0) {
171
+ const d = b.label, D = E(l, k), Y = `__group-${String(D ?? a)}`, me = {
172
+ id: Y,
173
+ value: Y,
174
+ label: typeof d == "string" ? d : String(D ?? `Grupo ${a + 1}`),
174
175
  isGroupHeader: !0,
175
- groupLabelNode: m,
176
- originalOption: a,
176
+ groupLabelNode: d,
177
+ originalOption: l,
177
178
  groupData: {
178
- groupOptions: x
179
+ groupOptions: w
179
180
  }
180
181
  };
181
- t.push(me), x.forEach((he) => {
182
- W ? t.push(he) : t.push(I(he));
182
+ t.push(me), w.forEach((O) => {
183
+ B ? t.push(O) : t.push(L(O));
183
184
  });
184
185
  } else
185
- W ? t.push(a) : t.push(I(a));
186
+ B ? t.push(l) : t.push(L(l));
186
187
  }), t;
187
- }, [J, H, W, I]), u = _(
188
- (t, a) => {
188
+ }, [R, k, B, L]), C = _(
189
+ (t, l) => {
189
190
  if (!t || t.length === 0) return;
190
- const l = t.map(
191
- (y) => I(y)
191
+ const a = t.map(
192
+ (f) => L(f)
192
193
  );
193
194
  if (!e.multiple) {
194
- const y = l[0];
195
- if (!y) return;
196
- const S = o.has(y.id), A = a ?? "toggle";
195
+ const f = a[0];
196
+ if (!f) return;
197
+ const S = i.has(f.id), ze = l ?? "toggle";
197
198
  let Fe;
198
- A === "select" || A === "toggle" && !S ? Fe = y : Fe = void 0, e.onChange?.(Fe, j);
199
+ ze === "select" || ze === "toggle" && !S ? Fe = f : Fe = void 0, e.onChange?.(Fe, j);
199
200
  return;
200
201
  }
201
- const c = e.value || [], x = [];
202
- c.forEach((y) => {
203
- const S = we.find((A) => A.value === y);
204
- S && x.push(S);
202
+ const b = e.value || [], w = [];
203
+ b.forEach((f) => {
204
+ const S = fe.find((ze) => ze.value === f);
205
+ S && w.push(S);
205
206
  });
206
- const m = new Set(x.map((y) => y.id)), b = new Set(l.map((y) => y.id)), Z = l.every(
207
- (y) => m.has(y.id)
208
- ), me = a ?? "toggle", he = me === "select" || me === "toggle" && !Z;
209
- let G;
210
- if (!he)
211
- G = x.filter((y) => !b.has(y.id));
207
+ const d = new Set(w.map((f) => f.id)), D = new Set(a.map((f) => f.id)), Y = a.every(
208
+ (f) => d.has(f.id)
209
+ ), me = l ?? "toggle", O = me === "select" || me === "toggle" && !Y;
210
+ let Ce;
211
+ if (!O)
212
+ Ce = w.filter((f) => !D.has(f.id));
212
213
  else {
213
- const y = new Map(
214
- x.map((S) => [S.id, S])
214
+ const f = new Map(
215
+ w.map((S) => [S.id, S])
215
216
  );
216
- l.forEach((S) => {
217
- y.set(S.id, S);
218
- }), G = Array.from(y.values());
217
+ a.forEach((S) => {
218
+ f.set(S.id, S);
219
+ }), Ce = Array.from(f.values());
219
220
  }
220
- e.onChange?.(G, j);
221
+ e.onChange?.(Ce, j);
221
222
  },
222
223
  [
223
224
  e.multiple,
224
225
  e.value,
225
226
  e.onChange,
226
- we,
227
- o,
228
- I,
227
+ fe,
228
+ i,
229
+ L,
229
230
  j
230
231
  ]
231
- ), w = _(() => {
232
- h((t) => !t);
232
+ ), H = _(() => {
233
+ p((t) => !t);
233
234
  }, []);
234
235
  F.current = (t) => {
235
236
  if (!e.multiple)
236
237
  e.onChange?.(t, j);
237
238
  else {
238
- const a = e.value || [], l = [], c = a.includes(t.value);
239
- a.forEach((m) => {
240
- const b = we.find(
241
- (Z) => Z.value === m
239
+ const l = e.value || [], a = [], b = l.includes(t.value);
240
+ l.forEach((d) => {
241
+ const D = fe.find(
242
+ (Y) => Y.value === d
242
243
  );
243
- b && l.push(b);
244
+ D && a.push(D);
244
245
  });
245
- const x = c ? l.filter((m) => m.value !== t.value) : [...l, t];
246
- e.onChange?.(x, j);
246
+ const w = b ? a.filter((d) => d.value !== t.value) : [...a, t];
247
+ e.onChange?.(w, j);
247
248
  }
248
249
  };
249
- const D = _(
250
- (t, a = !1) => {
251
- U?.(t, j), F.current?.(t), a && (h(!1), Oe?.());
250
+ const h = _(
251
+ (t, l = !1) => {
252
+ ie?.(t, j), F.current?.(t), l && (p(!1), ye?.());
252
253
  },
253
- [U, Oe, j]
254
- ), p = (t) => {
255
- if (t.preventDefault(), t.stopPropagation(), t.target.blur(), ve?.(), e.multiple) {
256
- const a = e.onChange;
257
- a?.([], j);
254
+ [ie, ye, j]
255
+ ), G = (t) => {
256
+ if (t.preventDefault(), t.stopPropagation(), t.target.blur(), ue?.(), e.multiple) {
257
+ const l = e.onChange;
258
+ l?.([], j);
258
259
  } else {
259
- const a = e.onChange;
260
- a?.(void 0, j);
260
+ const l = e.onChange;
261
+ l?.(void 0, j);
261
262
  }
262
- }, O = _(
263
+ }, P = _(
263
264
  (t) => {
264
265
  e.multiple || e.onChange?.(void 0, j);
265
- const a = R.find(
266
- (c) => E(c, H) === t
266
+ const l = q.find(
267
+ (b) => E(b, k) === t
267
268
  );
268
- if (!a) return;
269
- const l = I(a);
270
- U?.(l, j), F.current?.(l), ke?.(a);
269
+ if (!l) return;
270
+ const a = L(l);
271
+ ie?.(a, j), F.current?.(a), re?.(l);
271
272
  },
272
273
  [
273
- U,
274
- ke,
275
- R,
274
+ ie,
275
+ re,
276
+ q,
276
277
  j,
277
278
  e.multiple,
278
279
  e.onChange,
279
- I,
280
- H
280
+ L,
281
+ k
281
282
  ]
282
- ), Y = _(
283
+ ), X = _(
283
284
  (t) => {
284
- O(t);
285
+ P(t);
285
286
  },
286
- [O]
287
- ), V = (t) => t.tagName === "INPUT" && !["button", "submit", "checkbox", "file", "image"].includes(t.type) || t.hasAttribute("contenteditable");
288
- pe(() => {
287
+ [P]
288
+ ), oe = (t) => t.tagName === "INPUT" && !["button", "submit", "checkbox", "file", "image"].includes(t.type) || t.hasAttribute("contenteditable");
289
+ he(() => {
289
290
  if (!n) return;
290
- let t = !1, a = 0;
291
- const l = (m) => {
292
- const b = m.target;
293
- if (console.log("close dropdown target"), m.type === "mousedown") {
294
- if (M.current?.contains(b) || f.current?.contains(b)) return;
295
- h(!1);
291
+ let t = !1, l = 0;
292
+ const a = (d) => {
293
+ const D = d.target;
294
+ if (console.log("close dropdown target"), d.type === "mousedown") {
295
+ if (z.current?.contains(D) || m.current?.contains(D)) return;
296
+ p(!1);
296
297
  }
297
- if (m.type === "scroll") {
298
- if (console.log("close because scroll"), console.log(m, "event"), t || Date.now() - a < 500) {
298
+ if (d.type === "scroll") {
299
+ if (console.log("close because scroll"), console.log(d, "event"), t || Date.now() - l < 500) {
299
300
  console.log("ignoring scroll - keyboard related");
300
301
  return;
301
302
  }
302
- if (f.current?.contains(b)) return;
303
- h(!1);
303
+ if (m.current?.contains(D)) return;
304
+ p(!1);
304
305
  }
305
- m.type === "resize" && (console.log("close dropdown because resize"), console.log(m, "event"), h(!1));
306
- }, c = (m) => {
307
- const b = m.target;
308
- V(b) && (console.log("focus in keyboard"), t = !0, a = Date.now());
309
- }, x = (m) => {
310
- const b = m.target;
311
- V(b) && (console.log("focus out keyboard"), t = !1);
306
+ d.type === "resize" && (console.log("close dropdown because resize"), console.log(d, "event"), p(!1));
307
+ }, b = (d) => {
308
+ const D = d.target;
309
+ oe(D) && (console.log("focus in keyboard"), t = !0, l = Date.now());
310
+ }, w = (d) => {
311
+ const D = d.target;
312
+ oe(D) && (console.log("focus out keyboard"), t = !1);
312
313
  };
313
- return document.addEventListener("focusin", c), document.addEventListener("focusout", x), document.addEventListener("mousedown", l), window.addEventListener("scroll", l, !0), window.addEventListener("resize", l, !0), () => {
314
- document.removeEventListener("focusin", c), document.removeEventListener("focusout", x), document.removeEventListener("mousedown", l), window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l, !0);
314
+ return document.addEventListener("focusin", b), document.addEventListener("focusout", w), document.addEventListener("mousedown", a), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a, !0), () => {
315
+ document.removeEventListener("focusin", b), document.removeEventListener("focusout", w), document.removeEventListener("mousedown", a), window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", a, !0);
315
316
  };
316
- }, [n]), pe(() => {
317
- ge.current.forEach((t) => {
317
+ }, [n]), he(() => {
318
+ pe.current.forEach((t) => {
318
319
  try {
319
320
  t(n);
320
321
  } catch {
321
322
  }
322
323
  });
323
- }, [n]), Je(
324
- ne,
324
+ }, [n]), Qe(
325
+ te,
325
326
  () => ({
326
327
  open: () => {
327
- h(!0);
328
+ p(!0);
328
329
  },
329
330
  close: () => {
330
- h(!1);
331
+ p(!1);
331
332
  },
332
- toggle: () => h((t) => !t),
333
- handleOptionSelect: D,
334
- subscribeOpenChange: (t) => (ge.current.add(t), () => {
335
- ge.current.delete(t);
333
+ toggle: () => p((t) => !t),
334
+ handleOptionSelect: h,
335
+ subscribeOpenChange: (t) => (pe.current.add(t), () => {
336
+ pe.current.delete(t);
336
337
  }),
337
- searchInputRef: T
338
+ searchInputRef: A
338
339
  }),
339
- [n, D]
340
+ [n, h]
340
341
  );
341
- const fe = (t) => {
342
- t.preventDefault(), t.stopPropagation(), t.target.matches(":focus-visible") && !Me && !n && (h(!0), setTimeout(() => {
343
- T.current?.focus();
342
+ const ae = (t) => {
343
+ t.preventDefault(), t.stopPropagation(), t.target.matches(":focus-visible") && !Te && !n && (p(!0), setTimeout(() => {
344
+ A.current?.focus();
344
345
  }, 10));
345
- }, oe = (t) => {
346
- t.key === "Tab" && n && h(!1), (t.keyCode === 32 || t.key === "ArrowDown") && (h(!0), setTimeout(() => {
347
- T.current?.focus();
346
+ }, Ge = (t) => {
347
+ t.key === "Tab" && n && p(!1), (t.keyCode === 32 || t.key === "ArrowDown") && (p(!0), setTimeout(() => {
348
+ A.current?.focus();
348
349
  }, 10));
349
350
  };
350
351
  return /* @__PURE__ */ s.jsxs(
351
352
  "div",
352
353
  {
353
- className: d("relative bg-inherit select-none w-full", K),
354
- ref: M,
354
+ className: c("relative bg-inherit select-none w-full", M),
355
+ ref: z,
355
356
  draggable: !1,
356
- style: _e,
357
+ style: Le,
357
358
  children: [
358
- /* @__PURE__ */ s.jsxs("div", { className: d("relative bg-inherit ", B), children: [
359
+ /* @__PURE__ */ s.jsxs("div", { className: c("relative bg-inherit ", He), children: [
359
360
  /* @__PURE__ */ s.jsx(
360
361
  "label",
361
362
  {
362
- htmlFor: `select-${z}`,
363
- ref: Le,
364
- className: d(
363
+ htmlFor: `select-${I}`,
364
+ ref: Ee,
365
+ className: c(
365
366
  "left-3 pointer-events-none bg-inherit z-10 line-clamp-1 max-w-[calc(100%-2.5rem)] ",
366
- X === "default" && "transition-all duration-200 ease-in-out",
367
- Ge(),
368
- ce || n ? Ke[Ce].label : "text-neutral-medium-default",
369
- P && We.label,
367
+ le === "default" && "transition-all duration-200 ease-in-out",
368
+ $e(),
369
+ de || n ? Ke[T].label : "text-neutral-medium-default",
370
+ J && We.label,
370
371
  "mb-0.5"
371
372
  ),
372
- children: be
373
+ children: ge
373
374
  }
374
375
  ),
375
376
  /* @__PURE__ */ s.jsxs(
376
377
  "div",
377
378
  {
378
- id: z,
379
- tabIndex: 0,
379
+ id: I,
380
+ tabIndex: K ?? 0,
380
381
  role: "button",
381
382
  ref: $,
382
- onFocus: fe,
383
- onKeyDown: oe,
383
+ onFocus: ae,
384
+ onKeyDown: Ge,
384
385
  onClick: (t) => {
385
- t.preventDefault(), t.stopPropagation(), w();
386
+ t.preventDefault(), t.stopPropagation(), H();
386
387
  },
387
- className: d(
388
+ className: c(
388
389
  "w-full px-2 text-left border rounded-lg transition-all duration-200 ease-in-out",
389
390
  "flex items-center justify-start bg-inherit ",
390
391
  "focus:outline-none",
391
- Ee === "chips" && e.multiple && ce ? "min-h-12 py-2 " : !xe && "h-12 min-h-12",
392
- Ke[Ce].input,
393
- P && We.input,
394
- He
392
+ ve === "chips" && e.multiple && de ? "min-h-12 py-2 " : !be && "h-12 min-h-12",
393
+ Ke[T].input,
394
+ J && We.input,
395
+ ne
395
396
  ),
396
397
  children: [
397
398
  /* @__PURE__ */ s.jsx(
398
399
  "div",
399
400
  {
400
- className: d(
401
+ className: c(
401
402
  "flex-1 overflow-x-auto overflow-y-hidden px-1 prometeo-scrollbar-none! "
402
403
  ),
403
404
  ref: Pe,
404
- onPointerUp: q.onPointerUp,
405
- onPointerDown: q.onPointerDown,
406
- onPointerMove: q.onPointerMove,
407
- onPointerLeave: q.onPointerLeave,
408
- onPointerCancel: q.onPointerCancel,
409
- onClickCapture: q.onClickCapture,
410
- children: je ? Se.createElement(
411
- te(
412
- je,
413
- (t, a) => t.disabled === a.disabled && t.multiple === a.multiple
405
+ onPointerUp: Q.onPointerUp,
406
+ onPointerDown: Q.onPointerDown,
407
+ onPointerMove: Q.onPointerMove,
408
+ onPointerLeave: Q.onPointerLeave,
409
+ onPointerCancel: Q.onPointerCancel,
410
+ onClickCapture: Q.onClickCapture,
411
+ children: De ? we.createElement(
412
+ ee(
413
+ De,
414
+ (t, l) => t.disabled === l.disabled && t.multiple === l.multiple
414
415
  ),
415
416
  {
416
- disabled: P,
417
+ disabled: J,
417
418
  multiple: e.multiple || !1,
418
- placeholder: L,
419
- selectedOptions: de,
420
- onRemoveOption: Y
419
+ placeholder: W,
420
+ selectedOptions: r,
421
+ onRemoveOption: X
421
422
  }
422
423
  ) : /* @__PURE__ */ s.jsx(
423
- Ve,
424
+ Je,
424
425
  {
425
- displayMode: Ee,
426
- selectedOptions: r,
427
- placeholder: Ie,
428
- onRemoveOption: O,
426
+ displayMode: ve,
427
+ selectedOptions: o,
428
+ placeholder: _e,
429
+ onRemoveOption: P,
429
430
  multiple: e.multiple || !1,
430
- className: d(
431
- Ae === "scroll" ? "flex-nowrap" : "flex-wrap"
431
+ className: c(
432
+ Ue === "scroll" ? "flex-nowrap" : "flex-wrap"
432
433
  ),
433
- disabled: P
434
+ disabled: J
434
435
  }
435
436
  )
436
437
  }
437
438
  ),
438
439
  /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2", children: [
439
- le && /* @__PURE__ */ s.jsx(
440
- Qe,
440
+ ce && /* @__PURE__ */ s.jsx(
441
+ Xe,
441
442
  {
442
443
  size: "small",
443
444
  variant: "sync",
444
445
  className: " opacity-90"
445
446
  }
446
447
  ),
447
- ce && ve && /* @__PURE__ */ s.jsx(
448
+ de && ue && /* @__PURE__ */ s.jsx(
448
449
  "button",
449
450
  {
450
451
  className: "z-100",
451
452
  onClick: (t) => {
452
- t.preventDefault(), t.stopPropagation(), p(t);
453
+ t.preventDefault(), t.stopPropagation(), G(t);
453
454
  },
454
455
  type: "button",
455
456
  tabIndex: -1,
456
457
  children: /* @__PURE__ */ s.jsx(
457
- lt,
458
+ ot,
458
459
  {
459
460
  size: 20,
460
- className: d(
461
+ className: c(
461
462
  " cursor-pointer transition-all",
462
- Ke[Ce].icon
463
+ Ke[T].icon
463
464
  )
464
465
  }
465
466
  )
466
467
  }
467
468
  ),
468
469
  /* @__PURE__ */ s.jsx(
469
- Re,
470
+ Ve,
470
471
  {
471
472
  size: 20,
472
- className: d(
473
+ className: c(
473
474
  "transition-transform text-neutral-default-default min-w-max",
474
475
  n ? "rotate-180" : "",
475
- P && We.icon
476
+ J && We.icon
476
477
  )
477
478
  }
478
479
  )
@@ -482,260 +483,260 @@ function st(e) {
482
483
  )
483
484
  ] }),
484
485
  n && /* @__PURE__ */ s.jsx(
485
- ct,
486
+ dt,
486
487
  {
487
- label: be,
488
+ label: ge,
488
489
  isOpen: n,
489
- disabled: P,
490
- optionValue: H,
491
- optionLabel: se,
492
- emptyMessage: Te,
493
- labelVariant: X,
494
- renderOption: W,
495
- renderOptionGroupHeader: ie,
496
- attachToParent: ue,
497
- filteredOptions: v,
490
+ disabled: J,
491
+ optionValue: k,
492
+ optionLabel: V,
493
+ emptyMessage: Oe,
494
+ labelVariant: le,
495
+ renderOption: B,
496
+ renderOptionGroupHeader: Ae,
497
+ attachToParent: Me,
498
+ filteredOptions: x,
498
499
  multiple: e.multiple || !1,
499
- dropdownClassName: re,
500
- selectedOptionsIds: o,
501
- setFilteredOptions: C,
502
- renderOptionContext: ze,
503
- options: i,
504
- selectRef: M,
505
- dropdownRef: f,
500
+ dropdownClassName: U,
501
+ selectedOptionsIds: i,
502
+ setFilteredOptions: y,
503
+ renderOptionContext: je,
504
+ options: u,
505
+ selectRef: z,
506
+ dropdownRef: m,
506
507
  selectButtonRef: $,
507
- helperComponentRef: De,
508
- onOptionClick: D,
509
- onCloseDropdown: () => h(!1),
510
- searchValue: $e,
508
+ helperComponentRef: Ne,
509
+ onOptionClick: h,
510
+ onCloseDropdown: () => p(!1),
511
+ searchValue: Ie,
511
512
  setSearchValue: g,
512
- searchInputRef: T,
513
- isLoading: k?.isLoading,
514
- onSearchClear: k?.onSearchClear,
515
- hideSearchBar: k?.hideSearchBar,
516
- dropdownHeight: k?.dropdownHeight,
517
- onSearchValueChange: k?.onSearchValueChange,
518
- inputSearchPlaceholder: k?.inputSearchPlaceholder,
519
- footer: k?.footer,
520
- loadingComponent: k?.loadingComponent,
521
- inputProps: k?.inputProps,
522
- enableGroupToggle: k?.enableGroupToggle,
523
- focusSearchInputOnOpen: k?.focusSearchInputOnOpen,
524
- onGroupSelectChange: u
513
+ searchInputRef: A,
514
+ isLoading: v?.isLoading,
515
+ onSearchClear: v?.onSearchClear,
516
+ hideSearchBar: v?.hideSearchBar,
517
+ dropdownHeight: v?.dropdownHeight,
518
+ onSearchValueChange: v?.onSearchValueChange,
519
+ inputSearchPlaceholder: v?.inputSearchPlaceholder,
520
+ footer: v?.footer,
521
+ loadingComponent: v?.loadingComponent,
522
+ inputProps: v?.inputProps,
523
+ enableGroupToggle: v?.enableGroupToggle,
524
+ focusSearchInputOnOpen: v?.focusSearchInputOnOpen,
525
+ onGroupSelectChange: C
525
526
  }
526
527
  ),
527
- (ye || Q) && /* @__PURE__ */ s.jsx("div", { className: "min-h-6", children: /* @__PURE__ */ s.jsx(
528
- et,
528
+ (ke || xe) && /* @__PURE__ */ s.jsx("div", { className: "min-h-6", children: /* @__PURE__ */ s.jsx(
529
+ tt,
529
530
  {
530
- ref: De,
531
- variant: Ce,
531
+ ref: Ne,
532
+ variant: T,
532
533
  className: "absolute bottom-0 h-5 overflow-visible line-clamp-1!",
533
- children: ye || Q
534
+ children: ke || xe
534
535
  }
535
536
  ) })
536
537
  ]
537
538
  }
538
539
  );
539
540
  }
540
- const it = te(st, (e, n) => e.value === n.value && e.options === n.options && e.isLoading === n.isLoading && e.disabled === n.disabled && e.errorComponent === n.errorComponent && e.helperComponent === n.helperComponent && e.variant === n.variant && e.label === n.label && e.id === n.id && e.name === n.name && e.placeholder === n.placeholder && e.renderOptionContext === n.renderOptionContext && e.dropdownOptions?.controledSearchValue === n.dropdownOptions?.controledSearchValue && e.dropdownOptions?.isLoading === n.dropdownOptions?.isLoading), Ht = it;
541
- function ut({
541
+ const ut = ee(it, (e, n) => e.value === n.value && e.options === n.options && e.isLoading === n.isLoading && e.disabled === n.disabled && e.errorComponent === n.errorComponent && e.helperComponent === n.helperComponent && e.variant === n.variant && e.label === n.label && e.id === n.id && e.name === n.name && e.placeholder === n.placeholder && e.renderOptionContext === n.renderOptionContext && e.dropdownOptions?.controledSearchValue === n.dropdownOptions?.controledSearchValue && e.dropdownOptions?.isLoading === n.dropdownOptions?.isLoading), kt = ut;
542
+ function ct({
542
543
  footer: e,
543
544
  isOpen: n,
544
- label: h,
545
- options: v,
546
- multiple: C,
545
+ label: p,
546
+ options: x,
547
+ multiple: y,
547
548
  disabled: N,
548
549
  selectRef: g,
549
- inputProps: M,
550
- dropdownRef: f,
551
- optionLabel: T,
550
+ inputProps: z,
551
+ dropdownRef: m,
552
+ optionLabel: A,
552
553
  optionValue: $,
553
554
  searchValue: F,
554
- labelVariant: De,
555
- emptyMessage: ge,
556
- renderOption: z,
555
+ labelVariant: Ne,
556
+ emptyMessage: pe,
557
+ renderOption: I,
557
558
  renderOptionContext: j,
558
- renderOptionGroupHeader: be,
559
- onOptionClick: xe,
560
- onSearchClear: J,
561
- searchInputRef: ne,
559
+ renderOptionGroupHeader: ge,
560
+ onOptionClick: be,
561
+ onSearchClear: R,
562
+ searchInputRef: te,
562
563
  setSearchValue: K,
563
- dropdownHeight: L,
564
- attachToParent: H,
565
- filteredOptions: se,
566
- selectButtonRef: W,
567
- onCloseDropdown: ie,
568
- loadingComponent: je,
569
- dropdownClassName: ze,
570
- helperComponentRef: He,
571
- selectedOptionsIds: re,
572
- setFilteredOptions: B,
573
- onSearchValueChange: k,
574
- isLoading: Q = !1,
575
- hideSearchBar: ye = !1,
564
+ dropdownHeight: M,
565
+ attachToParent: W,
566
+ filteredOptions: k,
567
+ selectButtonRef: V,
568
+ onCloseDropdown: B,
569
+ loadingComponent: Ae,
570
+ dropdownClassName: De,
571
+ helperComponentRef: je,
572
+ selectedOptionsIds: ne,
573
+ setFilteredOptions: U,
574
+ onSearchValueChange: He,
575
+ isLoading: v = !1,
576
+ hideSearchBar: xe = !1,
576
577
  inputSearchPlaceholder: ke = "Buscar opciones",
577
- enableGroupToggle: U = !0,
578
- focusSearchInputOnOpen: Oe = !1,
579
- onGroupSelectChange: ve
578
+ enableGroupToggle: re = !0,
579
+ focusSearchInputOnOpen: ie = !1,
580
+ onGroupSelectChange: ye
580
581
  }) {
581
- const P = e ? 380 : 320, Ae = De === "static" ? h !== "" ? -20 : 4 : 7, le = _(() => L ? L.endsWith("px") ? Number(L.replace("px", "")) : L.endsWith("vh") ? window.innerHeight * Number(L.replace("vh", "")) / 100 : L.endsWith("%") ? window.innerHeight * Number(L.replace("%", "")) / 100 : P : P, [L, P])(), [ue, Ee] = Ne({
582
+ const ue = e ? 380 : 320, J = Ne === "static" ? p !== "" ? -20 : 4 : 7, T = _(() => M ? M.endsWith("px") ? Number(M.replace("px", "")) : M.endsWith("vh") ? window.innerHeight * Number(M.replace("vh", "")) / 100 : M.endsWith("%") ? window.innerHeight * Number(M.replace("%", "")) / 100 : ue : ue, [M, ue])(), [ce, Me] = Se({
582
583
  direction: "down",
583
- height: le
584
- }), [X, Me] = Ne(
584
+ height: T
585
+ }), [ve, le] = Se(
585
586
  () => /* @__PURE__ */ new Set()
586
587
  ), Te = _(
587
- (r) => !X.has(r),
588
- [X]
589
- ), Le = _(
588
+ (r) => !ve.has(r),
589
+ [ve]
590
+ ), Oe = _(
590
591
  (r, o) => {
591
- Me((i) => {
592
- const u = new Set(i), w = u.has(r);
593
- return (o === void 0 ? !w : !o) ? u.add(r) : u.delete(r), u;
592
+ le((i) => {
593
+ const u = new Set(i), C = u.has(r);
594
+ return (o === void 0 ? !C : !o) ? u.add(r) : u.delete(r), u;
594
595
  });
595
596
  },
596
597
  []
597
- ), q = (r) => {
598
- if (!f.current || !g.current) return;
598
+ ), Ee = (r) => {
599
+ if (!m.current || !g.current) return;
599
600
  const o = g.current.getBoundingClientRect();
600
- switch (r || ue.direction) {
601
+ switch (r || ce.direction) {
601
602
  case "down":
602
- f.current.style.top = `${o.top + o.height - (He?.current?.offsetHeight ? He?.current?.offsetHeight + 4 : 0)}px`;
603
+ m.current.style.top = `${o.top + o.height - (je?.current?.offsetHeight ? je?.current?.offsetHeight + 4 : 0)}px`;
603
604
  break;
604
605
  case "up":
605
- f.current.style.top = "auto", f.current.style.bottom = `${window.innerHeight - o.top + Ae}px`;
606
+ m.current.style.top = "auto", m.current.style.bottom = `${window.innerHeight - o.top + J}px`;
606
607
  break;
607
608
  }
608
- f.current.style.left = `${o.left}px`, f.current.style.width = `${o.width}px`;
609
- }, Pe = (r) => {
610
- f.current && (f.current.style.maxHeight = `${r}px`);
611
- }, ce = () => {
612
- if (!f.current || !g.current) return ue;
613
- const r = g.current.getBoundingClientRect(), o = window.innerHeight - (window.innerHeight - r.top), i = window.innerHeight - r.bottom, u = i >= le, w = o >= le;
614
- let D = "down", p;
615
- return u ? (D = "down", p = le) : w ? (D = "up", p = le) : i > o ? (D = "down", p = i - 16) : (D = "up", p = o - 16), { direction: D, height: p };
616
- }, _e = (r) => {
617
- if (!(!f.current || !g.current)) {
618
- if (f.current.style.transition = "max-height 0.2s ease,opacity 0.2s ease", !r) {
619
- f.current.style.maxHeight = "0", f.current.style.opacity = "0", f.current.style.pointerEvents = "none";
609
+ m.current.style.left = `${o.left}px`, m.current.style.width = `${o.width}px`;
610
+ }, Q = (r) => {
611
+ m.current && (m.current.style.maxHeight = `${r}px`);
612
+ }, Pe = () => {
613
+ if (!m.current || !g.current) return ce;
614
+ const r = g.current.getBoundingClientRect(), o = window.innerHeight - (window.innerHeight - r.top), i = window.innerHeight - r.bottom, u = i >= T, C = o >= T;
615
+ let H = "down", h;
616
+ return u ? (H = "down", h = T) : C ? (H = "up", h = T) : i > o ? (H = "down", h = i - 16) : (H = "up", h = o - 16), { direction: H, height: h };
617
+ }, de = (r) => {
618
+ if (!(!m.current || !g.current)) {
619
+ if (m.current.style.transition = "max-height 0.2s ease,opacity 0.2s ease", !r) {
620
+ m.current.style.maxHeight = "0", m.current.style.opacity = "0", m.current.style.pointerEvents = "none";
620
621
  return;
621
622
  }
622
- if (!H) {
623
- const o = ce();
624
- Ee(o), q(o.direction), Pe(o.height);
623
+ if (!W) {
624
+ const o = Pe();
625
+ Me(o), Ee(o.direction), Q(o.height);
625
626
  }
626
- f.current.style.opacity = "1", f.current.style.pointerEvents = "auto", Oe && ne?.current && ne.current?.focus();
627
+ m.current.style.opacity = "1", m.current.style.pointerEvents = "auto", ie && te?.current && te.current?.focus();
627
628
  }
628
629
  };
629
- pe(() => {
630
- H || !g.current || !n || q();
631
- }, [re]), pe(() => {
632
- _e(n);
633
- }, [n]), pe(() => {
634
- v && B(v);
635
- }, [v]), pe(() => {
636
- if (Q || !F) return;
637
- const r = Ie(v, F);
638
- B(r);
639
- }, [v]);
640
- const Ie = (r, o) => {
630
+ he(() => {
631
+ W || !g.current || !n || Ee();
632
+ }, [ne]), he(() => {
633
+ de(n);
634
+ }, [n]), he(() => {
635
+ x && U(x);
636
+ }, [x]), he(() => {
637
+ if (v || !F) return;
638
+ const r = Le(x, F);
639
+ U(r);
640
+ }, [x]);
641
+ const Le = (r, o) => {
641
642
  if (!o) return r;
642
- if (z) {
643
- const p = [];
644
- let O = null, Y = [];
645
- const V = () => {
646
- O && Y.length > 0 && p.push(O, ...Y), O = null, Y = [];
643
+ if (I) {
644
+ const h = [];
645
+ let G = null, P = [];
646
+ const X = () => {
647
+ G && P.length > 0 && h.push(G, ...P), G = null, P = [];
647
648
  };
648
- return r.forEach((fe) => {
649
- const oe = fe;
650
- if (!!(oe || {})?.isGroupHeader) {
651
- V(), O = oe;
649
+ return r.forEach((oe) => {
650
+ const ae = oe;
651
+ if (!!(ae || {})?.isGroupHeader) {
652
+ X(), G = ae;
652
653
  return;
653
654
  }
654
- const a = fe, l = E(
655
- a,
656
- T
657
- ), c = Ue(String(l ?? ""), o);
658
- O ? c && Y.push(a) : c && p.push(a);
659
- }), V(), p;
655
+ const t = oe, l = E(
656
+ t,
657
+ A
658
+ ), a = qe(String(l ?? ""), o);
659
+ G ? a && P.push(t) : a && h.push(t);
660
+ }), X(), h;
660
661
  }
661
662
  const i = [];
662
- let u = null, w = [];
663
- const D = () => {
664
- u && w.length > 0 && i.push(u, ...w), u = null, w = [];
663
+ let u = null, C = [];
664
+ const H = () => {
665
+ u && C.length > 0 && i.push(u, ...C), u = null, C = [];
665
666
  };
666
- return r.forEach((p) => {
667
- if (typeof p != "object" || p === null) return;
668
- if ((p || {})?.isGroupHeader) {
669
- D(), u = p;
667
+ return r.forEach((h) => {
668
+ if (typeof h != "object" || h === null) return;
669
+ if ((h || {})?.isGroupHeader) {
670
+ H(), u = h;
670
671
  return;
671
672
  }
672
- const O = Ue(p.label, o);
673
- u ? O && w.push(p) : O && i.push(p);
674
- }), D(), i;
675
- }, $e = (r) => {
676
- const o = Ie(v, r);
677
- if (B(o), k) {
673
+ const G = qe(h.label, o);
674
+ u ? G && C.push(h) : G && i.push(h);
675
+ }), H(), i;
676
+ }, _e = (r) => {
677
+ const o = Le(x, r);
678
+ if (U(o), He) {
678
679
  if (r === "") {
679
- Ge();
680
+ Ie();
680
681
  return;
681
682
  }
682
- k(r);
683
+ He(r);
683
684
  return;
684
685
  }
685
- K && v && K(r);
686
- }, Ge = _(() => {
687
- if (J) {
688
- J(), B(
689
- v.filter((r) => {
690
- const o = z ? E(r, $) : r.id;
691
- return re.has(o);
686
+ K && x && K(r);
687
+ }, Ie = _(() => {
688
+ if (R) {
689
+ R(), U(
690
+ x.filter((r) => {
691
+ const o = I ? E(r, $) : r.id;
692
+ return ne.has(o);
692
693
  })
693
694
  );
694
695
  return;
695
696
  }
696
- K && (K(""), B(v));
697
+ K && (K(""), U(x));
697
698
  }, [
698
- v,
699
- re,
699
+ x,
700
+ ne,
700
701
  $,
701
- J,
702
- B,
702
+ R,
703
+ U,
703
704
  K,
704
- z
705
- ]), I = (r) => {
706
- r.key === "ArrowDown" ? (r.preventDefault(), f.current?.querySelector(
705
+ I
706
+ ]), $e = (r) => {
707
+ r.key === "ArrowDown" ? (r.preventDefault(), m.current?.querySelector(
707
708
  "[role=listitem]"
708
709
  )?.focus()) : (r.key === "Tab" || r.key === "Escape") && setTimeout(() => {
709
- W.current?.focus(), ie();
710
+ V.current?.focus(), B();
710
711
  }, 10);
711
- }, R = (r, o) => {
712
+ }, L = (r, o) => {
712
713
  const i = Array.from(
713
- f.current?.querySelectorAll("[role=listitem]") || []
714
+ m.current?.querySelectorAll("[role=listitem]") || []
714
715
  ), u = i.indexOf(r.currentTarget);
715
716
  if (r.key === "ArrowDown") {
716
717
  r.preventDefault();
717
- const w = u < i.length - 1 ? u + 1 : u;
718
- i[w]?.focus();
718
+ const C = u < i.length - 1 ? u + 1 : u;
719
+ i[C]?.focus();
719
720
  } else if (r.key === "ArrowUp")
720
721
  if (r.preventDefault(), u === 0)
721
- ne && ne.current?.focus();
722
+ te && te.current?.focus();
722
723
  else {
723
- const w = u - 1;
724
- i[w]?.focus();
724
+ const C = u - 1;
725
+ i[C]?.focus();
725
726
  }
726
727
  else if (r.key === "Enter" || r.key === " ") {
727
728
  if (r.preventDefault(), (o || {})?.isGroupHeader || N) return;
728
- xe(o, !C), C || setTimeout(() => {
729
- W.current?.focus(), ie();
729
+ be(o, !y), y || setTimeout(() => {
730
+ V.current?.focus(), B();
730
731
  }, 10);
731
732
  } else r.key === "Escape" ? (r.preventDefault(), setTimeout(() => {
732
- W.current?.focus(), ie();
733
+ V.current?.focus(), B();
733
734
  }, 10)) : r.key === "Tab" && setTimeout(() => {
734
- W.current?.focus(), ie();
735
+ V.current?.focus(), B();
735
736
  }, 10);
736
- }, we = Array.from({ length: 5 }).map(
737
- (r, o) => z ? Se.createElement(
738
- te(z, (i, u) => i.isSelected === u.isSelected && i.option === u.option && i.disabled === u.disabled && i.multiple === u.multiple && i.renderContext === u.renderContext),
737
+ }, q = Array.from({ length: 5 }).map(
738
+ (r, o) => I ? we.createElement(
739
+ ee(I, (i, u) => i.isSelected === u.isSelected && i.option === u.option && i.disabled === u.disabled && i.multiple === u.multiple && i.renderContext === u.renderContext),
739
740
  {
740
741
  key: `skeleton-option-${o}`,
741
742
  option: { id: o, label: "", value: "" },
@@ -760,34 +761,34 @@ function ut({
760
761
  `skeleton-option-${// biome-ignore lint/suspicious/noArrayIndexKey: <>
761
762
  o}`
762
763
  )
763
- ), de = /* @__PURE__ */ s.jsx(
764
+ ), fe = /* @__PURE__ */ s.jsx(
764
765
  "div",
765
766
  {
766
767
  tabIndex: 0,
767
- ref: f,
768
+ ref: m,
768
769
  style: { opacity: "0" },
769
- className: d(
770
+ className: c(
770
771
  " z-100! w-full mt-1 bg-neutral-default-default border border-neutral-default-default rounded-lg shadow-lg",
771
772
  " overflow-hidden focus-visible:bg-neutral-default-hover ",
772
- H ? "absolute z-50 " : "fixed z-100 top-0 left-0",
773
- ue.direction === "up" ? "h-auto" : " h-max",
774
- ze,
773
+ W ? "absolute z-50 " : "fixed z-100 top-0 left-0",
774
+ ce.direction === "up" ? "h-auto" : " h-max",
775
+ De,
775
776
  "w-full max-w-[max(100%,20vw)] min-w-[min(100%,20vw)]"
776
777
  ),
777
778
  children: /* @__PURE__ */ s.jsxs(
778
779
  "div",
779
780
  {
780
- className: d(
781
+ className: c(
781
782
  "flex flex-col",
782
- ye ? "p-0" : "p-2 pt-0 gap-2"
783
+ xe ? "p-0" : "p-2 pt-0 gap-2"
783
784
  ),
784
785
  style: {
785
786
  height: "auto",
786
- maxHeight: ue.height
787
+ maxHeight: ce.height
787
788
  },
788
789
  children: [
789
- !ye && /* @__PURE__ */ s.jsx(
790
- rt,
790
+ !xe && /* @__PURE__ */ s.jsx(
791
+ lt,
791
792
  {
792
793
  name: "",
793
794
  label: "",
@@ -795,37 +796,37 @@ function ut({
795
796
  tabIndex: 0,
796
797
  value: F,
797
798
  disabled: N,
798
- ref: ne,
799
+ ref: te,
799
800
  labelVariant: "static",
800
- icon: /* @__PURE__ */ s.jsx(ot, {}),
801
- isFetching: Q,
802
- onKeyDown: I,
803
- onClear: Ge,
804
- onChange: (r) => $e(r.target.value),
801
+ icon: /* @__PURE__ */ s.jsx(at, {}),
802
+ isFetching: v,
803
+ onKeyDown: $e,
804
+ onClear: Ie,
805
+ onChange: (r) => _e(r.target.value),
805
806
  placeholder: ke,
806
807
  className: " bg-neutral-medium-pressed *:max-h-8",
807
- ...M
808
+ ...z
808
809
  }
809
810
  ),
810
- /* @__PURE__ */ s.jsx("div", { className: " overflow-y-auto flex-1 max-h-max ", children: se.length === 0 ? Q ? /* @__PURE__ */ s.jsx("div", { className: "flex flex-col gap-1 overflow-hidden w-full", children: je || we }) : /* @__PURE__ */ s.jsx("p", { className: "px-3 py-2 text-neutral-medium-default max-w-full text-pretty wrap-break-word ", children: F ? `No se encontraron resultados para "${F}"` : ge }) : (() => {
811
+ /* @__PURE__ */ s.jsx("div", { className: " overflow-y-auto flex-1 max-h-max ", children: k.length === 0 ? v ? /* @__PURE__ */ s.jsx("div", { className: "flex flex-col gap-1 overflow-hidden w-full", children: Ae || q }) : /* @__PURE__ */ s.jsx("p", { className: "px-3 py-2 text-neutral-medium-default max-w-full text-pretty wrap-break-word ", children: F ? `No se encontraron resultados para "${F}"` : pe }) : (() => {
811
812
  let r = !0;
812
- return se.map((o) => {
813
- const i = o, u = !!(i || {}).isGroupHeader, w = z && !u ? E(o, $) : i.id, D = re.has(w), p = (l) => !z || u ? l : {
814
- id: w,
815
- label: String(E(l, T)),
813
+ return k.map((o) => {
814
+ const i = o, u = !!(i || {}).isGroupHeader, C = I && !u ? E(o, $) : i.id, H = ne.has(C), h = (l) => !I || u ? l : {
815
+ id: C,
816
+ label: String(E(l, A)),
816
817
  value: E(l, $)
817
- }, O = (l) => {
818
- u || xe(
819
- p(o),
820
- l === void 0 ? !C : l
818
+ }, G = (l) => {
819
+ u || be(
820
+ h(o),
821
+ l === void 0 ? !y : l
821
822
  );
822
- }, Y = (l) => {
823
- if (xe(l, !C), !C) {
823
+ }, P = (l) => {
824
+ if (be(l, !y), !y) {
824
825
  if (!K) return;
825
- K(""), B(v);
826
+ K(""), U(x);
826
827
  }
827
- }, V = (l, c) => {
828
- const x = !!(c || {}).isGroupHeader;
828
+ }, X = (l, a) => {
829
+ const b = !!(a || {}).isGroupHeader;
829
830
  return (
830
831
  // biome-ignore lint/a11y/useSemanticElements: <>
831
832
  /* @__PURE__ */ s.jsx(
@@ -833,60 +834,60 @@ function ut({
833
834
  {
834
835
  tabIndex: 0,
835
836
  role: "listitem",
836
- onKeyDown: (m) => R(m, c),
837
- className: d(
838
- !x && !N && "focus-visible:bg-neutral-medium-hover outline-none hover:bg-neutral-medium-hover",
839
- D && "bg-neutral-medium-selected",
837
+ onKeyDown: (w) => L(w, a),
838
+ className: c(
839
+ !b && !N && "focus-visible:bg-neutral-medium-hover outline-none hover:bg-neutral-medium-hover",
840
+ H && "bg-neutral-medium-selected",
840
841
  N && "cursor-default pointer-events-none"
841
842
  ),
842
843
  children: l
843
844
  },
844
- c.id
845
+ a.id
845
846
  )
846
847
  );
847
848
  };
848
849
  if (u) {
849
- const l = i.groupLabelNode ?? i.label, c = String(i.id), x = U === !1 ? !0 : Te(c);
850
- r = x;
851
- const m = i.originalOption, b = i.groupData?.groupOptions ?? [], Z = (G) => {
852
- U && Le(c, G);
853
- }, me = (G) => {
854
- !b || b.length === 0 || ve && ve(b, G);
855
- }, he = b.filter(
856
- (G) => re.has(E(G, $))
857
- ).map((G) => String(E(G, $)));
858
- if (be) {
859
- const G = te(
860
- be,
861
- (S, A) => S.label === A.label && S.group === A.group && S.groupOptions === A.groupOptions && S.disabled === A.disabled && S.multiple === A.multiple && S.expanded === A.expanded && S.renderContext === A.renderContext
862
- ), y = Se.createElement(G, {
863
- group: m,
850
+ const l = i.groupLabelNode ?? i.label, a = String(i.id), b = re === !1 ? !0 : Te(a);
851
+ r = b;
852
+ const w = i.originalOption, d = i.groupData?.groupOptions ?? [], D = (O) => {
853
+ re && Oe(a, O);
854
+ }, Y = (O) => {
855
+ !d || d.length === 0 || ye && ye(d, O);
856
+ }, me = d.filter(
857
+ (O) => ne.has(E(O, $))
858
+ ).map((O) => String(E(O, $)));
859
+ if (ge) {
860
+ const O = ee(
861
+ ge,
862
+ (f, S) => f.label === S.label && f.group === S.group && f.groupOptions === S.groupOptions && f.disabled === S.disabled && f.multiple === S.multiple && f.expanded === S.expanded && f.renderContext === S.renderContext
863
+ ), Ce = we.createElement(O, {
864
+ group: w,
864
865
  label: l,
865
- groupOptions: b,
866
- multiple: C,
866
+ groupOptions: d,
867
+ multiple: y,
867
868
  disabled: N,
868
- expanded: x,
869
- toggleGroup: Z,
870
- selectGroup: me,
869
+ expanded: b,
870
+ toggleGroup: D,
871
+ selectGroup: Y,
871
872
  renderContext: j,
872
- groupSelectedIds: he
873
+ groupSelectedIds: me
873
874
  });
874
- return V(y, i);
875
+ return X(Ce, i);
875
876
  }
876
- return V(
877
+ return X(
877
878
  /* @__PURE__ */ s.jsxs("div", { className: "px-3 py-2 text-neutral-medium-default font-medium text-sm w-full flex justify-between", children: [
878
879
  /* @__PURE__ */ s.jsx("div", { children: l }),
879
- U && /* @__PURE__ */ s.jsx(
880
+ re && /* @__PURE__ */ s.jsx(
880
881
  "div",
881
882
  {
882
883
  className: "cursor-pointer",
883
- onClick: () => Le(c),
884
+ onClick: () => Oe(a),
884
885
  children: /* @__PURE__ */ s.jsx(
885
- Re,
886
+ Ve,
886
887
  {
887
- className: d(
888
+ className: c(
888
889
  "transition-transform duration-300 ease-out",
889
- x ? "rotate-180" : "rotate-0"
890
+ b ? "rotate-180" : "rotate-0"
890
891
  )
891
892
  }
892
893
  )
@@ -896,44 +897,44 @@ function ut({
896
897
  i
897
898
  );
898
899
  }
899
- const fe = z ? Se.createElement(
900
- te(
901
- z,
902
- (l, c) => l.isSelected === c.isSelected && l.option === c.option && l.disabled === c.disabled && l.multiple === c.multiple && l.renderContext === c.renderContext
900
+ const oe = I ? we.createElement(
901
+ ee(
902
+ I,
903
+ (l, a) => l.isSelected === a.isSelected && l.option === a.option && l.disabled === a.disabled && l.multiple === a.multiple && l.renderContext === a.renderContext
903
904
  ),
904
905
  {
905
- key: w,
906
+ key: C,
906
907
  option: o,
907
- isSelected: D,
908
- multiple: C,
909
- onSelect: O,
908
+ isSelected: H,
909
+ multiple: y,
910
+ onSelect: G,
910
911
  disabled: N,
911
- isLoading: Q,
912
+ isLoading: v,
912
913
  renderContext: j
913
914
  }
914
915
  ) : /* @__PURE__ */ s.jsx(
915
916
  Be,
916
917
  {
917
918
  disabled: N,
918
- multiple: C,
919
- isLoading: Q,
920
- isSelected: D,
921
- onSelect: Y,
919
+ multiple: y,
920
+ isLoading: v,
921
+ isSelected: H,
922
+ onSelect: P,
922
923
  option: o
923
924
  },
924
- w
925
- ), oe = V(
926
- fe,
927
- p(o)
925
+ C
926
+ ), ae = X(
927
+ oe,
928
+ h(o)
928
929
  );
929
- if (!U)
930
- return oe;
931
- const t = !r, a = oe;
932
- return Se.cloneElement(a, {
933
- className: d(
934
- a.props.className,
930
+ if (!re)
931
+ return ae;
932
+ const Ge = !r, t = ae;
933
+ return we.cloneElement(t, {
934
+ className: c(
935
+ t.props.className,
935
936
  "overflow-hidden transition-[max-height] duration-300 ease-out",
936
- t ? "max-h-0" : "max-h-[999px]"
937
+ Ge ? "max-h-0" : "max-h-[999px]"
937
938
  )
938
939
  });
939
940
  });
@@ -944,18 +945,18 @@ function ut({
944
945
  )
945
946
  }
946
947
  );
947
- return H ? de : Xe(de, document.body);
948
+ return W ? fe : Ye(fe, document.body);
948
949
  }
949
- const ct = te(
950
- ut,
950
+ const dt = ee(
951
+ ct,
951
952
  (e, n) => e.options === n.options && e.selectedOptionsIds === n.selectedOptionsIds && e.multiple === n.multiple && e.disabled === n.disabled && e.emptyMessage === n.emptyMessage && e.renderOption === n.renderOption && e.renderOptionContext === n.renderOptionContext && e.isOpen === n.isOpen && e.attachToParent === n.attachToParent && e.optionValue === n.optionValue && e.optionLabel === n.optionLabel && e.filteredOptions === n.filteredOptions && e.isLoading === n.isLoading
952
- ), Be = te(
953
+ ), Be = ee(
953
954
  ({
954
955
  option: e,
955
956
  isSelected: n,
956
- onSelect: h,
957
- multiple: v,
958
- disabled: C,
957
+ onSelect: p,
958
+ multiple: x,
959
+ disabled: y,
959
960
  isLoading: N
960
961
  }) => {
961
962
  const g = (e || {})?.isGroupHeader;
@@ -965,28 +966,28 @@ const ct = te(
965
966
  {
966
967
  className: "flex gap-2 w-full px-3 py-2 cursor-wait",
967
968
  children: [
968
- /* @__PURE__ */ s.jsx(qe, { className: "size-6 aspect-square" }),
969
- /* @__PURE__ */ s.jsx(qe, { className: "flex-1 h-6" })
969
+ /* @__PURE__ */ s.jsx(Re, { className: "size-6 aspect-square" }),
970
+ /* @__PURE__ */ s.jsx(Re, { className: "flex-1 h-6" })
970
971
  ]
971
972
  },
972
973
  e.id
973
974
  );
974
- const M = (T) => {
975
- T.preventDefault(), T.stopPropagation(), !(C || g) && h?.(e);
976
- }, f = g && e.groupLabelNode ? e.groupLabelNode : e.label;
975
+ const z = (A) => {
976
+ A.preventDefault(), A.stopPropagation(), !(y || g) && p?.(e);
977
+ }, m = g && e.groupLabelNode ? e.groupLabelNode : e.label;
977
978
  return /* @__PURE__ */ s.jsxs(
978
979
  "div",
979
980
  {
980
- onMouseDown: M,
981
- className: d(
981
+ onMouseDown: z,
982
+ className: c(
982
983
  "px-3 py-2 flex items-center transition-colors text-neutral-default-default ",
983
984
  g ? "cursor-default text-neutral-medium-default" : "cursor-pointer",
984
985
  !g && (n ? " text-primary-default-default" : "hover:bg-neutral-medium-hover text-neutral-default-hover"),
985
- C && !g && "text-neutral-default-disabled hover:bg-neutral-default-default"
986
+ y && !g && "text-neutral-default-disabled hover:bg-neutral-default-default"
986
987
  ),
987
988
  children: [
988
- v && !g && /* @__PURE__ */ s.jsx(nt, { checked: n, disabled: C }),
989
- /* @__PURE__ */ s.jsx("span", { children: f })
989
+ x && !g && /* @__PURE__ */ s.jsx(rt, { checked: n, disabled: y }),
990
+ /* @__PURE__ */ s.jsx("span", { children: m })
990
991
  ]
991
992
  },
992
993
  e.id
@@ -995,32 +996,32 @@ const ct = te(
995
996
  (e, n) => e.isSelected === n.isSelected && e.disabled === n.disabled
996
997
  );
997
998
  Be.displayName = "DefaultOptionRenderer";
998
- const Ve = te(
999
+ const Je = ee(
999
1000
  ({
1000
1001
  selectedOptions: e,
1001
1002
  placeholder: n,
1002
- onRemoveOption: h,
1003
- displayMode: v,
1004
- multiple: C,
1003
+ onRemoveOption: p,
1004
+ displayMode: x,
1005
+ multiple: y,
1005
1006
  className: N,
1006
1007
  disabled: g
1007
- }) => e?.length === 0 ? n ? /* @__PURE__ */ s.jsx("span", { className: "text-neutral-medium-default line-clamp-1", children: n }) : null : v === "chips" && C ? /* @__PURE__ */ s.jsx("div", { className: d("flex items-center gap-1 ", N), children: e.map((M) => /* @__PURE__ */ s.jsx(
1008
- tt,
1008
+ }) => e?.length === 0 ? n ? /* @__PURE__ */ s.jsx("span", { className: "text-neutral-medium-default line-clamp-1", children: n }) : null : x === "chips" && y ? /* @__PURE__ */ s.jsx("div", { className: c("flex items-center gap-1 ", N), children: e.map((z) => /* @__PURE__ */ s.jsx(
1009
+ nt,
1009
1010
  {
1010
1011
  tabIndex: -1,
1011
- id: M.id,
1012
- label: M.label,
1013
- onRemove: h,
1012
+ id: z.id,
1013
+ label: z.label,
1014
+ onRemove: p,
1014
1015
  disabled: g
1015
1016
  },
1016
- M.id
1017
+ z.id
1017
1018
  )) }) : e?.length === 1 ? /* @__PURE__ */ s.jsx("span", { className: "line-clamp-1", children: e[0].label }) : /* @__PURE__ */ s.jsxs("span", { className: "line-clamp-1", children: [
1018
1019
  e?.length,
1019
1020
  " seleccionados"
1020
1021
  ] }),
1021
1022
  (e, n) => e.selectedOptions === n.selectedOptions && e.disabled === n.disabled
1022
1023
  );
1023
- Ve.displayName = "DefaultSelectionDisplay";
1024
+ Je.displayName = "DefaultSelectionDisplay";
1024
1025
  export {
1025
- Ht as default
1026
+ kt as default
1026
1027
  };