@midas-ds/components 1.0.2 → 1.0.3

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 (125) hide show
  1. package/Button-B4vMZbC6.js +182 -0
  2. package/CHANGELOG.md +10 -0
  3. package/Checkbox-DnKWanep.js +402 -0
  4. package/{Collection-B3xUVWPF.js → Collection-COLWgm24.js} +179 -152
  5. package/Dialog-Cb6toyXO.js +1951 -0
  6. package/DragAndDrop-B0T3WgjL.js +40 -0
  7. package/FocusScope-C8i7CH6y.js +513 -0
  8. package/Form-BQQs3jUk.js +238 -0
  9. package/Group-CdwXhx8Q.js +42 -0
  10. package/{Hidden-BQWDvze4.js → Hidden-DngIphiL.js} +1 -1
  11. package/Link-iAZLB3RI.js +75 -0
  12. package/ListBox-BKWkIIm6.js +474 -0
  13. package/ListKeyboardDelegate-BH-K5hyq.js +172 -0
  14. package/{PressResponder-DP8ZDNGy.js → PressResponder-Cz-TRBHO.js} +10 -10
  15. package/README.md +21 -3
  16. package/SelectionManager-8o40f7mx.js +1047 -0
  17. package/Separator-BlvmQjwz.js +49 -0
  18. package/Tag--W5TgxmK.js +728 -0
  19. package/Text-CQPW6xs7.js +15 -0
  20. package/TextField-DeK_yiK-.js +225 -0
  21. package/TextField.module-0-u4LVPp.js +143 -0
  22. package/{VisuallyHidden-B_XzVvlX.js → VisuallyHidden-CFx06Bae.js} +1 -1
  23. package/{context-ScOIq_Gu.js → context-Bnqknrce.js} +1 -1
  24. package/index-B-jHjTDC.js +120 -0
  25. package/{index-CorR1LBD.js → index-BPdc9gJ8.js} +3 -3
  26. package/index-DK9ZACEc.js +642 -0
  27. package/{index-Dl1Q-tbj.js → index-KSgQWWiy.js} +5315 -5315
  28. package/index.js +45 -47
  29. package/index15.js +1 -1
  30. package/index16.js +1 -1
  31. package/index25.js +1 -1
  32. package/index26.js +1 -1
  33. package/index3.js +2 -4
  34. package/index31.js +3 -3
  35. package/index32.js +2 -2
  36. package/index33.js +2 -2
  37. package/index34.js +1 -1
  38. package/index35.js +1 -1
  39. package/index36.js +1 -1
  40. package/index37.js +1 -1
  41. package/index38.js +1 -1
  42. package/index39.js +1 -1
  43. package/index40.js +1 -1
  44. package/index41.js +1 -1
  45. package/index42.js +1 -1
  46. package/index43.js +1 -1
  47. package/index45.js +3 -3
  48. package/index5.js +1 -1
  49. package/index50.js +1 -1
  50. package/index52.js +3 -3
  51. package/index53.js +3 -3
  52. package/index54.js +1 -1
  53. package/index55.js +4 -4
  54. package/index56.js +1 -1
  55. package/index57.js +1 -1
  56. package/index58.js +1 -1
  57. package/index59.js +3 -3
  58. package/index60.js +1 -1
  59. package/index61.js +1 -1
  60. package/index62.js +1 -1
  61. package/index63.js +4 -4
  62. package/index64.js +3 -3
  63. package/index65.js +3 -3
  64. package/index66.js +1 -1
  65. package/index67.js +3 -3
  66. package/index68.js +2 -2
  67. package/index69.js +1 -1
  68. package/index71.js +1 -1
  69. package/index76.js +5 -5
  70. package/index77.js +2 -2
  71. package/index78.js +2 -2
  72. package/index79.js +1 -1
  73. package/index80.js +226 -227
  74. package/index81.js +197 -199
  75. package/index82.js +192 -195
  76. package/index83.js +181 -183
  77. package/index84.js +52 -54
  78. package/index85.js +261 -262
  79. package/index86.js +262 -262
  80. package/index87.js +209 -211
  81. package/index88.js +436 -440
  82. package/index89.js +962 -964
  83. package/index90.js +2401 -2399
  84. package/index92.js +5 -5
  85. package/index93.js +1 -1
  86. package/index94.js +1 -1
  87. package/link/Link.d.ts +2 -2
  88. package/link-button/LinkButton.d.ts +1 -1
  89. package/package.json +7 -1
  90. package/{react.esm-D8HpDGKP.js → react.esm-sMU8Z7rL.js} +1872 -1872
  91. package/textfield/index.d.ts +0 -2
  92. package/{useControlledState-S_TYcV_c.js → useControlledState-DrAoodI6.js} +1 -1
  93. package/{useDescription-D4_zk_sA.js → useDescription-BPs7eRff.js} +1 -1
  94. package/useField-Dz62UHCP.js +67 -0
  95. package/{useFilter-BnJDBCkt.js → useFilter-ViwzkzZe.js} +1 -1
  96. package/useFocusRing-BKGhL91C.js +1297 -0
  97. package/{useFocusable-C-N9wcwm.js → useFocusable-CRSmYEQc.js} +11 -8
  98. package/{useGridSelectionCheckbox-i1rsjlC-.js → useGridSelectionCheckbox-CVEvUCJL.js} +3 -3
  99. package/useHasTabbableChild-C8y4fwiY.js +34 -0
  100. package/{useHighlightSelectionDescription-JVx2MW_e.js → useHighlightSelectionDescription-CD74uzLh.js} +19 -19
  101. package/useListState-DKnP5TB5.js +119 -0
  102. package/{useLocalizedStringFormatter-DVCAZqcL.js → useLocalizedStringFormatter-DsZ-ZWSk.js} +29 -29
  103. package/{useSingleSelectListState-CmX9_L5H.js → useSingleSelectListState-BHTLh8Ob.js} +5 -5
  104. package/Button-CCevm2s3.js +0 -183
  105. package/Checkbox-CllWDBxF.js +0 -405
  106. package/Dialog-CLTyYwkS.js +0 -1889
  107. package/DragAndDrop-OTN7La7U.js +0 -42
  108. package/FocusScope-BR0SJ-cZ.js +0 -512
  109. package/Form-DXLoQL91.js +0 -240
  110. package/Group-DPMuN3h8.js +0 -44
  111. package/Label-C18A_4Z5.js +0 -69
  112. package/Link-BU1h3K2a.js +0 -77
  113. package/ListBox-D21tdwTs.js +0 -463
  114. package/ListKeyboardDelegate-DxMjfMsI.js +0 -172
  115. package/SelectionManager-D4WtKtey.js +0 -988
  116. package/Separator-DLUHK9vv.js +0 -48
  117. package/Tag-CEd6WWSc.js +0 -725
  118. package/Text-DGLaY3HR.js +0 -17
  119. package/TextField-C_hq9WeT.js +0 -226
  120. package/TextField.module-Cwq1FAm7.js +0 -141
  121. package/index-CEg5vZQH.js +0 -132
  122. package/index-CgfokhRq.js +0 -674
  123. package/useFocusRing-D97-G3fT.js +0 -1324
  124. package/useHasTabbableChild-DeuCnGGv.js +0 -34
  125. package/useListState-DSOTbsL3.js +0 -119
package/index80.js CHANGED
@@ -1,42 +1,42 @@
1
- import { jsx as y, jsxs as C } from "react/jsx-runtime";
2
- import { a as de, $ as ne } from "./Button-CCevm2s3.js";
3
- import { i as X, b as se, c as Y, d as N, e as Z, n as ee, x as z, A as L, a as ce } from "./useFocusRing-D97-G3fT.js";
4
- import { d as fe, a as ue } from "./Dialog-CLTyYwkS.js";
5
- import { d as pe } from "./Form-DXLoQL91.js";
1
+ import { jsx as v, jsxs as C } from "react/jsx-runtime";
2
+ import { a as ne, $ as de } from "./Button-B4vMZbC6.js";
3
+ import { a as se, c as X, d as N, n as Y, e as Z, A as z, i as ee, b as ce, D as L } from "./useFocusRing-BKGhL91C.js";
4
+ import { d as fe, a as ue } from "./Dialog-Cb6toyXO.js";
5
+ import { a as pe } from "./Form-BQQs3jUk.js";
6
6
  import { $ as be } from "./RSPContexts-EOiWkKOf.js";
7
- import { $ as me, a as V, b as $e, c as ge, d as ve } from "./Collection-B3xUVWPF.js";
8
- import { $ as M, a as ye, b as xe, c as De } from "./DragAndDrop-OTN7La7U.js";
9
- import { $ as _ } from "./ListBox-D21tdwTs.js";
10
- import { $ as he } from "./Text-DGLaY3HR.js";
7
+ import { $ as me, a as ge, b as V, c as $e, d as ye } from "./Collection-COLWgm24.js";
8
+ import { $ as M, a as ve, b as xe, c as De } from "./DragAndDrop-B0T3WgjL.js";
9
+ import { $ as _ } from "./ListBox-BKWkIIm6.js";
10
+ import { $ as he } from "./Text-CQPW6xs7.js";
11
11
  import * as H from "react";
12
12
  import c, { useState as Se, useMemo as te, forwardRef as re, useContext as E, useRef as P, useEffect as F, createContext as Pe } from "react";
13
- import { $ as we, b as ke, c as Ie, a as Ee, T as Ke } from "./Tag-CEd6WWSc.js";
14
- import { $ as Te } from "./useGridSelectionCheckbox-i1rsjlC-.js";
15
- import { a as He } from "./FocusScope-BR0SJ-cZ.js";
16
- import { $ as G } from "./VisuallyHidden-B_XzVvlX.js";
17
- import { $ as Ae } from "./useListState-DSOTbsL3.js";
18
- import { $ as Be, a as J } from "./ListKeyboardDelegate-DxMjfMsI.js";
19
- import { $ as Re } from "./context-ScOIq_Gu.js";
20
- import { I as Ce } from "./TextField-C_hq9WeT.js";
21
- import { C as Me } from "./Checkbox-CllWDBxF.js";
13
+ import { $ as we } from "./useListState-DKnP5TB5.js";
14
+ import { $ as ke, a as J } from "./ListKeyboardDelegate-BH-K5hyq.js";
15
+ import { $ as Ie } from "./context-Bnqknrce.js";
16
+ import { $ as Ee, b as Ke, c as Te, a as He, T as Ae } from "./Tag--W5TgxmK.js";
17
+ import { $ as Be } from "./useGridSelectionCheckbox-CVEvUCJL.js";
18
+ import { a as Re } from "./FocusScope-C8i7CH6y.js";
19
+ import { $ as G } from "./VisuallyHidden-CFx06Bae.js";
20
+ import { I as Ce } from "./TextField-DeK_yiK-.js";
21
+ import { C as Me } from "./Checkbox-DnKWanep.js";
22
22
  import { C as Le } from "./chevron-down-Cd1bkzXT.js";
23
- import './MultiSelect.css';function Ve(l, i) {
24
- let { key: d } = l;
25
- const { checkboxProps: e } = Te(l, i);
23
+ import './MultiSelect.css';function Ve(n, a) {
24
+ let { key: l } = n;
25
+ const { checkboxProps: e } = Be(n, a);
26
26
  return {
27
27
  checkboxProps: {
28
28
  ...e,
29
- "aria-labelledby": `${e.id} ${we(i, d)}`
29
+ "aria-labelledby": `${e.id} ${Ee(a, l)}`
30
30
  }
31
31
  };
32
32
  }
33
- function _e(l) {
34
- let { initialItems: i = [], initialSelectedKeys: d, getKey: e = (f) => {
35
- var n;
36
- return (n = f.id) !== null && n !== void 0 ? n : f.key;
37
- }, filter: o, initialFilterText: t = "" } = l, [r, a] = Se({
38
- items: i,
39
- selectedKeys: d === "all" ? "all" : new Set(d || []),
33
+ function _e(n) {
34
+ let { initialItems: a = [], initialSelectedKeys: l, getKey: e = (f) => {
35
+ var d;
36
+ return (d = f.id) !== null && d !== void 0 ? d : f.key;
37
+ }, filter: o, initialFilterText: t = "" } = n, [r, i] = Se({
38
+ items: a,
39
+ selectedKeys: l === "all" ? "all" : new Set(l || []),
40
40
  filterText: t
41
41
  }), s = te(() => o ? r.items.filter((f) => o(f, r.filterText)) : r.items, [
42
42
  r.items,
@@ -48,76 +48,76 @@ function _e(l) {
48
48
  items: s,
49
49
  ...Fe({
50
50
  getKey: e
51
- }, a),
51
+ }, i),
52
52
  getItem(f) {
53
- return r.items.find((n) => e(n) === f);
53
+ return r.items.find((d) => e(d) === f);
54
54
  }
55
55
  };
56
56
  }
57
- function Fe(l, i) {
58
- let { cursor: d, getKey: e } = l;
57
+ function Fe(n, a) {
58
+ let { cursor: l, getKey: e } = n;
59
59
  return {
60
60
  setSelectedKeys(o) {
61
- i((t) => ({
61
+ a((t) => ({
62
62
  ...t,
63
63
  selectedKeys: o
64
64
  }));
65
65
  },
66
66
  setFilterText(o) {
67
- i((t) => ({
67
+ a((t) => ({
68
68
  ...t,
69
69
  filterText: o
70
70
  }));
71
71
  },
72
72
  insert(o, ...t) {
73
- i((r) => A(r, o, ...t));
73
+ a((r) => A(r, o, ...t));
74
74
  },
75
75
  insertBefore(o, ...t) {
76
- i((r) => {
77
- let a = r.items.findIndex((s) => (e == null ? void 0 : e(s)) === o);
78
- if (a === -1)
79
- if (r.items.length === 0) a = 0;
76
+ a((r) => {
77
+ let i = r.items.findIndex((s) => (e == null ? void 0 : e(s)) === o);
78
+ if (i === -1)
79
+ if (r.items.length === 0) i = 0;
80
80
  else return r;
81
- return A(r, a, ...t);
81
+ return A(r, i, ...t);
82
82
  });
83
83
  },
84
84
  insertAfter(o, ...t) {
85
- i((r) => {
86
- let a = r.items.findIndex((s) => (e == null ? void 0 : e(s)) === o);
87
- if (a === -1)
88
- if (r.items.length === 0) a = 0;
85
+ a((r) => {
86
+ let i = r.items.findIndex((s) => (e == null ? void 0 : e(s)) === o);
87
+ if (i === -1)
88
+ if (r.items.length === 0) i = 0;
89
89
  else return r;
90
- return A(r, a + 1, ...t);
90
+ return A(r, i + 1, ...t);
91
91
  });
92
92
  },
93
93
  prepend(...o) {
94
- i((t) => A(t, 0, ...o));
94
+ a((t) => A(t, 0, ...o));
95
95
  },
96
96
  append(...o) {
97
- i((t) => A(t, t.items.length, ...o));
97
+ a((t) => A(t, t.items.length, ...o));
98
98
  },
99
99
  remove(...o) {
100
- i((t) => {
101
- let r = new Set(o), a = t.items.filter((f) => !r.has(e(f))), s = "all";
100
+ a((t) => {
101
+ let r = new Set(o), i = t.items.filter((f) => !r.has(e(f))), s = "all";
102
102
  if (t.selectedKeys !== "all") {
103
103
  s = new Set(t.selectedKeys);
104
104
  for (let f of o) s.delete(f);
105
105
  }
106
- return d == null && a.length === 0 && (s = /* @__PURE__ */ new Set()), {
106
+ return l == null && i.length === 0 && (s = /* @__PURE__ */ new Set()), {
107
107
  ...t,
108
- items: a,
108
+ items: i,
109
109
  selectedKeys: s
110
110
  };
111
111
  });
112
112
  },
113
113
  removeSelectedItems() {
114
- i((o) => {
114
+ a((o) => {
115
115
  if (o.selectedKeys === "all") return {
116
116
  ...o,
117
117
  items: [],
118
118
  selectedKeys: /* @__PURE__ */ new Set()
119
119
  };
120
- let t = o.selectedKeys, r = o.items.filter((a) => !t.has(e(a)));
120
+ let t = o.selectedKeys, r = o.items.filter((i) => !t.has(e(i)));
121
121
  return {
122
122
  ...o,
123
123
  items: r,
@@ -126,10 +126,10 @@ function Fe(l, i) {
126
126
  });
127
127
  },
128
128
  move(o, t) {
129
- i((r) => {
130
- let a = r.items.findIndex((n) => e(n) === o);
131
- if (a === -1) return r;
132
- let s = r.items.slice(), [f] = s.splice(a, 1);
129
+ a((r) => {
130
+ let i = r.items.findIndex((d) => e(d) === o);
131
+ if (i === -1) return r;
132
+ let s = r.items.slice(), [f] = s.splice(i, 1);
133
133
  return s.splice(t, 0, f), {
134
134
  ...r,
135
135
  items: s
@@ -137,124 +137,123 @@ function Fe(l, i) {
137
137
  });
138
138
  },
139
139
  moveBefore(o, t) {
140
- i((r) => {
141
- let a = r.items.findIndex((n) => e(n) === o);
142
- if (a === -1) return r;
140
+ a((r) => {
141
+ let i = r.items.findIndex((d) => e(d) === o);
142
+ if (i === -1) return r;
143
143
  let f = (Array.isArray(t) ? t : [
144
144
  ...t
145
- ]).map((n) => r.items.findIndex((m) => e(m) === n)).sort((n, m) => n - m);
146
- return Q(r, f, a);
145
+ ]).map((d) => r.items.findIndex((m) => e(m) === d)).sort((d, m) => d - m);
146
+ return Q(r, f, i);
147
147
  });
148
148
  },
149
149
  moveAfter(o, t) {
150
- i((r) => {
151
- let a = r.items.findIndex((n) => e(n) === o);
152
- if (a === -1) return r;
150
+ a((r) => {
151
+ let i = r.items.findIndex((d) => e(d) === o);
152
+ if (i === -1) return r;
153
153
  let f = (Array.isArray(t) ? t : [
154
154
  ...t
155
- ]).map((n) => r.items.findIndex((m) => e(m) === n)).sort((n, m) => n - m);
156
- return Q(r, f, a + 1);
155
+ ]).map((d) => r.items.findIndex((m) => e(m) === d)).sort((d, m) => d - m);
156
+ return Q(r, f, i + 1);
157
157
  });
158
158
  },
159
159
  update(o, t) {
160
- i((r) => {
161
- let a = r.items.findIndex((s) => e(s) === o);
162
- return a === -1 ? r : {
160
+ a((r) => {
161
+ let i = r.items.findIndex((s) => e(s) === o);
162
+ return i === -1 ? r : {
163
163
  ...r,
164
164
  items: [
165
- ...r.items.slice(0, a),
165
+ ...r.items.slice(0, i),
166
166
  t,
167
- ...r.items.slice(a + 1)
167
+ ...r.items.slice(i + 1)
168
168
  ]
169
169
  };
170
170
  });
171
171
  }
172
172
  };
173
173
  }
174
- function A(l, i, ...d) {
174
+ function A(n, a, ...l) {
175
175
  return {
176
- ...l,
176
+ ...n,
177
177
  items: [
178
- ...l.items.slice(0, i),
179
- ...d,
180
- ...l.items.slice(i)
178
+ ...n.items.slice(0, a),
179
+ ...l,
180
+ ...n.items.slice(a)
181
181
  ]
182
182
  };
183
183
  }
184
- function Q(l, i, d) {
185
- d -= i.filter((t) => t < d).length;
186
- let e = i.map((t) => ({
184
+ function Q(n, a, l) {
185
+ l -= a.filter((t) => t < l).length;
186
+ let e = a.map((t) => ({
187
187
  from: t,
188
- to: d++
188
+ to: l++
189
189
  }));
190
190
  for (let t = 0; t < e.length; t++) {
191
191
  let r = e[t].from;
192
- for (let a = t; a < e.length; a++)
193
- e[a].from > r && e[a].from--;
192
+ for (let i = t; i < e.length; i++)
193
+ e[i].from > r && e[i].from--;
194
194
  }
195
195
  for (let t = 0; t < e.length; t++) {
196
196
  let r = e[t];
197
- for (let a = e.length - 1; a > t; a--) {
198
- let s = e[a];
197
+ for (let i = e.length - 1; i > t; i--) {
198
+ let s = e[i];
199
199
  s.from < r.to ? r.to++ : s.from++;
200
200
  }
201
201
  }
202
- let o = l.items.slice();
202
+ let o = n.items.slice();
203
203
  for (let t of e) {
204
204
  let [r] = o.splice(t.from, 1);
205
205
  o.splice(t.to, 0, r);
206
206
  }
207
207
  return {
208
- ...l,
208
+ ...n,
209
209
  items: o
210
210
  };
211
211
  }
212
- const Ne = /* @__PURE__ */ Pe(null);
213
- function ze(l, i) {
214
- return [l, i] = ce(l, i, Ne), /* @__PURE__ */ c.createElement(ge, {
215
- content: /* @__PURE__ */ c.createElement(ve, l)
216
- }, (d) => /* @__PURE__ */ c.createElement(Ge, {
217
- props: l,
218
- collection: d,
219
- gridListRef: i
212
+ const Ne = /* @__PURE__ */ Pe(null), ze = /* @__PURE__ */ re(function(a, l) {
213
+ return [a, l] = se(a, l, Ne), /* @__PURE__ */ c.createElement(me, {
214
+ content: /* @__PURE__ */ c.createElement(ge, a)
215
+ }, (e) => /* @__PURE__ */ c.createElement(Ge, {
216
+ props: a,
217
+ collection: e,
218
+ gridListRef: l
220
219
  }));
221
- }
222
- function Ge({ props: l, collection: i, gridListRef: d }) {
223
- let { dragAndDropHooks: e, keyboardNavigationBehavior: o = "arrow", layout: t = "stack" } = l, { CollectionRoot: r, isVirtualized: a, layoutDelegate: s, dropTargetDelegate: f } = E(V), n = Ae({
224
- ...l,
225
- collection: i,
220
+ });
221
+ function Ge({ props: n, collection: a, gridListRef: l }) {
222
+ let { dragAndDropHooks: e, keyboardNavigationBehavior: o = "arrow", layout: t = "stack" } = n, { CollectionRoot: r, isVirtualized: i, layoutDelegate: s, dropTargetDelegate: f } = E(V), d = we({
223
+ ...n,
224
+ collection: a,
226
225
  children: void 0,
227
226
  layoutDelegate: s
228
- }), m = Be({
227
+ }), m = ke({
229
228
  usage: "search",
230
229
  sensitivity: "base"
231
- }), { disabledBehavior: b, disabledKeys: g } = n.selectionManager, { direction: u } = Re(), p = te(() => new J({
232
- collection: i,
230
+ }), { disabledBehavior: b, disabledKeys: $ } = d.selectionManager, { direction: u } = Ie(), p = te(() => new J({
231
+ collection: a,
233
232
  collator: m,
234
- ref: d,
235
- disabledKeys: g,
233
+ ref: l,
234
+ disabledKeys: $,
236
235
  disabledBehavior: b,
237
236
  layoutDelegate: s,
238
237
  layout: t,
239
238
  direction: u
240
239
  }), [
241
- i,
242
- d,
240
+ a,
241
+ l,
243
242
  t,
244
- g,
243
+ $,
245
244
  b,
246
245
  s,
247
246
  m,
248
247
  u
249
- ]), { gridProps: R } = Ie({
250
- ...l,
248
+ ]), { gridProps: R } = Ke({
249
+ ...n,
251
250
  keyboardDelegate: p,
252
251
  // Only tab navigation is supported in grid layout.
253
252
  keyboardNavigationBehavior: t === "grid" ? "tab" : o,
254
- isVirtualized: a
255
- }, n, d), D = n.selectionManager, w = !!(e != null && e.useDraggableCollectionState), h = !!(e != null && e.useDroppableCollectionState), v = P(w), $ = P(h);
253
+ isVirtualized: i
254
+ }, d, l), D = d.selectionManager, w = !!(e != null && e.useDraggableCollectionState), h = !!(e != null && e.useDroppableCollectionState), y = P(w), g = P(h);
256
255
  F(() => {
257
- v.current !== w && console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."), $.current !== h && console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.");
256
+ y.current !== w && console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."), g.current !== h && console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.");
258
257
  }, [
259
258
  w,
260
259
  h
@@ -262,10 +261,10 @@ function Ge({ props: l, collection: i, gridListRef: d }) {
262
261
  let k, x, S, I = !1, K = null, W = P(null);
263
262
  if (w && e) {
264
263
  k = e.useDraggableCollectionState({
265
- collection: i,
264
+ collection: a,
266
265
  selectionManager: D,
267
266
  preview: e.renderDragPreview ? W : void 0
268
- }), e.useDraggableCollection({}, k, d);
267
+ }), e.useDraggableCollection({}, k, l);
269
268
  let T = e.DragPreview;
270
269
  K = e.renderDragPreview ? /* @__PURE__ */ c.createElement(T, {
271
270
  ref: W
@@ -273,40 +272,40 @@ function Ge({ props: l, collection: i, gridListRef: d }) {
273
272
  }
274
273
  if (h && e) {
275
274
  x = e.useDroppableCollectionState({
276
- collection: i,
275
+ collection: a,
277
276
  selectionManager: D
278
277
  });
279
278
  let T = new J({
280
- collection: i,
279
+ collection: a,
281
280
  disabledKeys: D.disabledKeys,
282
281
  disabledBehavior: D.disabledBehavior,
283
- ref: d
284
- }), le = e.dropTargetDelegate || f || new e.ListDropTargetDelegate(i, d, {
282
+ ref: l
283
+ }), le = e.dropTargetDelegate || f || new e.ListDropTargetDelegate(a, l, {
285
284
  layout: t,
286
285
  direction: u
287
286
  });
288
287
  S = e.useDroppableCollection({
289
288
  keyboardDelegate: T,
290
289
  dropTargetDelegate: le
291
- }, x, d), I = x.isDropTarget({
290
+ }, x, l), I = x.isDropTarget({
292
291
  type: "root"
293
292
  });
294
293
  }
295
- let { focusProps: oe, isFocused: j, isFocusVisible: O } = Y(), U = {
294
+ let { focusProps: oe, isFocused: j, isFocusVisible: O } = X(), U = {
296
295
  isDropTarget: I,
297
- isEmpty: n.collection.size === 0,
296
+ isEmpty: d.collection.size === 0,
298
297
  isFocused: j,
299
298
  isFocusVisible: O,
300
299
  layout: t,
301
- state: n
300
+ state: d
302
301
  }, ae = N({
303
- className: l.className,
304
- style: l.style,
302
+ className: n.className,
303
+ style: n.style,
305
304
  defaultClassName: "react-aria-GridList",
306
305
  values: U
307
306
  }), q = null, ie = null;
308
- if (n.collection.size === 0 && l.renderEmptyState) {
309
- let T = l.renderEmptyState(U);
307
+ if (d.collection.size === 0 && n.renderEmptyState) {
308
+ let T = n.renderEmptyState(U);
310
309
  q = /* @__PURE__ */ c.createElement("div", {
311
310
  role: "row",
312
311
  style: {
@@ -319,15 +318,15 @@ function Ge({ props: l, collection: i, gridListRef: d }) {
319
318
  }
320
319
  }, T));
321
320
  }
322
- return /* @__PURE__ */ c.createElement(He, null, /* @__PURE__ */ c.createElement("div", {
323
- ...ee(l),
321
+ return /* @__PURE__ */ c.createElement(Re, null, /* @__PURE__ */ c.createElement("div", {
322
+ ...Y(n),
324
323
  ...ae,
325
324
  ...Z(R, oe, S == null ? void 0 : S.collectionProps, ie),
326
- ref: d,
327
- slot: l.slot || void 0,
328
- onScroll: l.onScroll,
325
+ ref: l,
326
+ slot: n.slot || void 0,
327
+ onScroll: n.onScroll,
329
328
  "data-drop-target": I || void 0,
330
- "data-empty": n.collection.size === 0 || void 0,
329
+ "data-empty": d.collection.size === 0 || void 0,
331
330
  "data-focused": j || void 0,
332
331
  "data-focus-visible": O || void 0,
333
332
  "data-layout": t
@@ -335,7 +334,7 @@ function Ge({ props: l, collection: i, gridListRef: d }) {
335
334
  values: [
336
335
  [
337
336
  _,
338
- n
337
+ d
339
338
  ],
340
339
  [
341
340
  M,
@@ -346,60 +345,60 @@ function Ge({ props: l, collection: i, gridListRef: d }) {
346
345
  }
347
346
  ],
348
347
  [
349
- ye,
348
+ ve,
350
349
  {
351
- render: Oe
350
+ render: je
352
351
  }
353
352
  ]
354
353
  ]
355
- }, h && /* @__PURE__ */ c.createElement(Je, null), /* @__PURE__ */ c.createElement(r, {
356
- collection: i,
357
- scrollRef: d,
354
+ }, h && /* @__PURE__ */ c.createElement(qe, null), /* @__PURE__ */ c.createElement(r, {
355
+ collection: a,
356
+ scrollRef: l,
358
357
  persistedKeys: xe(D, e, x),
359
358
  renderDropIndicator: De(e, x)
360
359
  })), q, K));
361
360
  }
362
- const We = /* @__PURE__ */ re(ze), je = /* @__PURE__ */ me("item", function(i, d, e) {
363
- let o = E(_), { dragAndDropHooks: t, dragState: r, dropState: a } = E(M), s = X(d), { isVirtualized: f } = E(V), { rowProps: n, gridCellProps: m, descriptionProps: b, ...g } = ke({
361
+ const We = /* @__PURE__ */ $e("item", function(a, l, e) {
362
+ let o = E(_), { dragAndDropHooks: t, dragState: r, dropState: i } = E(M), s = ee(l), { isVirtualized: f } = E(V), { rowProps: d, gridCellProps: m, descriptionProps: b, ...$ } = Te({
364
363
  node: e,
365
364
  shouldSelectOnPressUp: !!r,
366
365
  isVirtualized: f
367
- }, o, s), { hoverProps: u, isHovered: p } = se({
368
- isDisabled: !g.allowsSelection && !g.hasAction,
366
+ }, o, s), { hoverProps: u, isHovered: p } = ce({
367
+ isDisabled: !$.allowsSelection && !$.hasAction,
369
368
  onHoverStart: e.props.onHoverStart,
370
369
  onHoverChange: e.props.onHoverChange,
371
370
  onHoverEnd: e.props.onHoverEnd
372
- }), { isFocusVisible: R, focusProps: D } = Y(), { checkboxProps: w } = Ve({
371
+ }), { isFocusVisible: R, focusProps: D } = X(), { checkboxProps: w } = Ve({
373
372
  key: e.key
374
- }, o), h = o.selectionManager.disabledBehavior === "all" && g.isDisabled ? {
373
+ }, o), h = o.selectionManager.disabledBehavior === "all" && $.isDisabled ? {
375
374
  isDisabled: !0
376
- } : {}, v = null;
377
- r && t && (v = t.useDraggableItem({
375
+ } : {}, y = null;
376
+ r && t && (y = t.useDraggableItem({
378
377
  key: e.key,
379
378
  hasDragButton: !0
380
379
  }, r));
381
- let $ = null, k = P(null), { visuallyHiddenProps: x } = G();
382
- a && t && ($ = t.useDropIndicator({
380
+ let g = null, k = P(null), { visuallyHiddenProps: x } = G();
381
+ i && t && (g = t.useDropIndicator({
383
382
  target: {
384
383
  type: "item",
385
384
  key: e.key,
386
385
  dropPosition: "on"
387
386
  }
388
- }, a, k));
387
+ }, i, k));
389
388
  let S = r && r.isDragging(e.key), I = N({
390
- ...i,
389
+ ...a,
391
390
  id: void 0,
392
391
  children: e.rendered,
393
392
  defaultClassName: "react-aria-GridListItem",
394
393
  values: {
395
- ...g,
394
+ ...$,
396
395
  isHovered: p,
397
396
  isFocusVisible: R,
398
397
  selectionMode: o.selectionManager.selectionMode,
399
398
  selectionBehavior: o.selectionManager.selectionBehavior,
400
399
  allowsDragging: !!r,
401
400
  isDragging: S,
402
- isDropTarget: $ == null ? void 0 : $.isDropTarget
401
+ isDropTarget: g == null ? void 0 : g.isDropTarget
403
402
  }
404
403
  }), K = P(null);
405
404
  return F(() => {
@@ -408,7 +407,7 @@ const We = /* @__PURE__ */ re(ze), je = /* @__PURE__ */ me("item", function(i, d
408
407
  e.textValue || console.warn("A `textValue` prop is required for <GridListItem> elements with non-plain text children in order to support accessibility features such as type to select.");
409
408
  }, [
410
409
  e.textValue
411
- ]), /* @__PURE__ */ c.createElement(c.Fragment, null, $ && !$.isHidden && /* @__PURE__ */ c.createElement("div", {
410
+ ]), /* @__PURE__ */ c.createElement(c.Fragment, null, g && !g.isHidden && /* @__PURE__ */ c.createElement("div", {
412
411
  role: "row",
413
412
  style: {
414
413
  position: "absolute"
@@ -418,21 +417,21 @@ const We = /* @__PURE__ */ re(ze), je = /* @__PURE__ */ me("item", function(i, d
418
417
  }, /* @__PURE__ */ c.createElement("div", {
419
418
  role: "button",
420
419
  ...x,
421
- ...$ == null ? void 0 : $.dropIndicatorProps,
420
+ ...g == null ? void 0 : g.dropIndicatorProps,
422
421
  ref: k
423
422
  }))), /* @__PURE__ */ c.createElement("div", {
424
- ...Z(ee(i), n, D, u, v == null ? void 0 : v.dragProps),
423
+ ...Z(Y(a), d, D, u, y == null ? void 0 : y.dragProps),
425
424
  ...I,
426
425
  ref: s,
427
- "data-selected": g.isSelected || void 0,
428
- "data-disabled": g.isDisabled || void 0,
426
+ "data-selected": $.isSelected || void 0,
427
+ "data-disabled": $.isDisabled || void 0,
429
428
  "data-hovered": p || void 0,
430
- "data-focused": g.isFocused || void 0,
429
+ "data-focused": $.isFocused || void 0,
431
430
  "data-focus-visible": R || void 0,
432
- "data-pressed": g.isPressed || void 0,
431
+ "data-pressed": $.isPressed || void 0,
433
432
  "data-allows-dragging": !!r || void 0,
434
433
  "data-dragging": S || void 0,
435
- "data-drop-target": ($ == null ? void 0 : $.isDropTarget) || void 0,
434
+ "data-drop-target": (g == null ? void 0 : g.isDropTarget) || void 0,
436
435
  "data-selection-mode": o.selectionManager.selectionMode === "none" ? void 0 : o.selectionManager.selectionMode
437
436
  }, /* @__PURE__ */ c.createElement("div", {
438
437
  ...m,
@@ -451,12 +450,12 @@ const We = /* @__PURE__ */ re(ze), je = /* @__PURE__ */ me("item", function(i, d
451
450
  }
452
451
  ],
453
452
  [
454
- de,
453
+ ne,
455
454
  {
456
455
  slots: {
457
456
  [L]: h,
458
457
  drag: {
459
- ...v == null ? void 0 : v.dragButtonProps,
458
+ ...y == null ? void 0 : y.dragButtonProps,
460
459
  ref: K,
461
460
  style: {
462
461
  pointerEvents: "none"
@@ -476,7 +475,7 @@ const We = /* @__PURE__ */ re(ze), je = /* @__PURE__ */ me("item", function(i, d
476
475
  ],
477
476
  [
478
477
  V,
479
- $e
478
+ ye
480
479
  ],
481
480
  [
482
481
  _,
@@ -485,19 +484,19 @@ const We = /* @__PURE__ */ re(ze), je = /* @__PURE__ */ me("item", function(i, d
485
484
  ]
486
485
  }, I.children))));
487
486
  });
488
- function Oe(l, i) {
489
- i = X(i);
490
- let { dragAndDropHooks: d, dropState: e } = E(M), o = P(null), { dropIndicatorProps: t, isHidden: r, isDropTarget: a } = d.useDropIndicator(l, e, o);
491
- return r ? null : /* @__PURE__ */ c.createElement(qe, {
492
- ...l,
487
+ function je(n, a) {
488
+ a = ee(a);
489
+ let { dragAndDropHooks: l, dropState: e } = E(M), o = P(null), { dropIndicatorProps: t, isHidden: r, isDropTarget: i } = l.useDropIndicator(n, e, o);
490
+ return r ? null : /* @__PURE__ */ c.createElement(Ue, {
491
+ ...n,
493
492
  dropIndicatorProps: t,
494
- isDropTarget: a,
493
+ isDropTarget: i,
495
494
  buttonRef: o,
496
- ref: i
495
+ ref: a
497
496
  });
498
497
  }
499
- function Ue(l, i) {
500
- let { dropIndicatorProps: d, isDropTarget: e, buttonRef: o, ...t } = l, { visuallyHiddenProps: r } = G(), a = N({
498
+ function Oe(n, a) {
499
+ let { dropIndicatorProps: l, isDropTarget: e, buttonRef: o, ...t } = n, { visuallyHiddenProps: r } = G(), i = N({
501
500
  ...t,
502
501
  defaultClassName: "react-aria-DropIndicator",
503
502
  values: {
@@ -505,26 +504,26 @@ function Ue(l, i) {
505
504
  }
506
505
  });
507
506
  return /* @__PURE__ */ c.createElement("div", {
508
- ...a,
507
+ ...i,
509
508
  role: "row",
510
- ref: i,
509
+ ref: a,
511
510
  "data-drop-target": e || void 0
512
511
  }, /* @__PURE__ */ c.createElement("div", {
513
512
  role: "gridcell"
514
513
  }, /* @__PURE__ */ c.createElement("div", {
515
514
  ...r,
516
515
  role: "button",
517
- ...d,
516
+ ...l,
518
517
  ref: o
519
- }), a.children));
518
+ }), i.children));
520
519
  }
521
- const qe = /* @__PURE__ */ re(Ue);
522
- function Je() {
523
- let { dragAndDropHooks: l, dropState: i } = E(M), d = P(null), { dropIndicatorProps: e } = l.useDropIndicator({
520
+ const Ue = /* @__PURE__ */ re(Oe);
521
+ function qe() {
522
+ let { dragAndDropHooks: n, dropState: a } = E(M), l = P(null), { dropIndicatorProps: e } = n.useDropIndicator({
524
523
  target: {
525
524
  type: "root"
526
525
  }
527
- }, i, d), o = i.isDropTarget({
526
+ }, a, l), o = a.isDropTarget({
528
527
  type: "root"
529
528
  }), { visuallyHiddenProps: t } = G();
530
529
  return !o && e["aria-hidden"] ? null : /* @__PURE__ */ c.createElement("div", {
@@ -539,38 +538,38 @@ function Je() {
539
538
  role: "button",
540
539
  ...t,
541
540
  ...e,
542
- ref: d
541
+ ref: l
543
542
  })));
544
543
  }
545
- const Qe = '"../theme/tokens.css"', Xe = '"Inter", sans-serif', Ye = "#000000", Ze = "#b31b1b", et = "(max-width: 767px)", tt = "#bfbfbf", rt = "#e6e6e6", ot = "#f2f2f2", at = "_button_1eb3v_4", it = "_icon_1eb3v_19", lt = "_multiSelect_1eb3v_44", dt = "_popover_1eb3v_60", nt = "_listBoxItem_1eb3v_73", B = {
546
- tokens: Qe,
547
- display: Xe,
548
- black: Ye,
549
- signalRed130: Ze,
550
- smBreakpoint: et,
551
- gray50: tt,
552
- gray20: rt,
553
- backgroundSecondary: ot,
554
- button: at,
555
- icon: it,
556
- multiSelect: lt,
557
- popover: dt,
544
+ const Je = '"../theme/tokens.css"', Qe = '"Inter", sans-serif', Xe = "#000000", Ye = "#b31b1b", Ze = "(max-width: 767px)", et = "#bfbfbf", tt = "#e6e6e6", rt = "#f2f2f2", ot = "_button_1eb3v_4", at = "_icon_1eb3v_19", it = "_multiSelect_1eb3v_44", lt = "_popover_1eb3v_60", nt = "_listBoxItem_1eb3v_73", B = {
545
+ tokens: Je,
546
+ display: Qe,
547
+ black: Xe,
548
+ signalRed130: Ye,
549
+ smBreakpoint: Ze,
550
+ gray50: et,
551
+ gray20: tt,
552
+ backgroundSecondary: rt,
553
+ button: ot,
554
+ icon: at,
555
+ multiSelect: it,
556
+ popover: lt,
558
557
  listBoxItem: nt
559
- }, Tt = ({
560
- label: l,
561
- description: i,
562
- items: d,
558
+ }, Kt = ({
559
+ label: n,
560
+ description: a,
561
+ items: l,
563
562
  onSelectionChange: e,
564
563
  selectedKeys: o,
565
564
  defaultSelectedKeys: t,
566
565
  isDisabled: r,
567
- isInvalid: a,
566
+ isInvalid: i,
568
567
  errorMessage: s
569
568
  }) => {
570
- const f = H.useRef(null), [n, m] = H.useState(
569
+ const f = H.useRef(null), [d, m] = H.useState(
571
570
  void 0
572
571
  ), b = _e({
573
- initialItems: d,
572
+ initialItems: l,
574
573
  initialSelectedKeys: t
575
574
  });
576
575
  H.useEffect(() => {
@@ -585,15 +584,15 @@ const Qe = '"../theme/tokens.css"', Xe = '"Inter", sans-serif', Ye = "#000000",
585
584
  }, [b.selectedKeys, e]), H.useEffect(() => {
586
585
  o && b.setSelectedKeys(new Set(o));
587
586
  }, [o]);
588
- const g = b.selectedKeys === "all" ? new Set(
587
+ const $ = b.selectedKeys === "all" ? new Set(
589
588
  b.items.map((u) => u.id)
590
589
  ) : b.selectedKeys;
591
- return /* @__PURE__ */ y(
590
+ return /* @__PURE__ */ v(
592
591
  "div",
593
592
  {
594
593
  className: B.multiSelect,
595
594
  "data-disabled": r,
596
- "data-invalid": a,
595
+ "data-invalid": i,
597
596
  children: /* @__PURE__ */ C(
598
597
  z,
599
598
  {
@@ -611,10 +610,10 @@ const Qe = '"../theme/tokens.css"', Xe = '"Inter", sans-serif', Ye = "#000000",
611
610
  // }],
612
611
  pe,
613
612
  {
614
- isInvalid: a || !1,
613
+ isInvalid: i || !1,
615
614
  validationErrors: [],
616
615
  validationDetails: {
617
- customError: a || !1,
616
+ customError: i || !1,
618
617
  badInput: !1,
619
618
  patternMismatch: !1,
620
619
  rangeOverflow: !1,
@@ -630,54 +629,54 @@ const Qe = '"../theme/tokens.css"', Xe = '"Inter", sans-serif', Ye = "#000000",
630
629
  ]
631
630
  ],
632
631
  children: [
633
- /* @__PURE__ */ y(
632
+ /* @__PURE__ */ v(
634
633
  Ce,
635
634
  {
636
- label: l,
637
- description: i,
635
+ label: n,
636
+ description: a,
638
637
  errorMessage: s,
639
638
  children: /* @__PURE__ */ C(fe, { children: [
640
639
  /* @__PURE__ */ C(
641
- ne,
640
+ de,
642
641
  {
643
642
  className: B.button,
644
643
  ref: f,
645
644
  isDisabled: r,
646
645
  children: [
647
646
  "Välj",
648
- /* @__PURE__ */ y(
647
+ /* @__PURE__ */ v(
649
648
  "div",
650
649
  {
651
650
  className: B.icon,
652
651
  "aria-hidden": "true",
653
- children: /* @__PURE__ */ y(Le, { size: 20 })
652
+ children: /* @__PURE__ */ v(Le, { size: 20 })
654
653
  }
655
654
  )
656
655
  ]
657
656
  }
658
657
  ),
659
- /* @__PURE__ */ y(
658
+ /* @__PURE__ */ v(
660
659
  ue,
661
660
  {
662
661
  className: B.popover,
663
- style: { width: n },
662
+ style: { width: d },
664
663
  offset: 0,
665
664
  UNSTABLE_portalContainer: f.current || void 0,
666
- children: /* @__PURE__ */ y(
667
- We,
665
+ children: /* @__PURE__ */ v(
666
+ ze,
668
667
  {
669
- "aria-label": l,
668
+ "aria-label": n,
670
669
  selectionMode: "multiple",
671
670
  selectedKeys: b.selectedKeys,
672
671
  onSelectionChange: b.setSelectedKeys,
673
672
  children: b.items.map((u) => /* @__PURE__ */ C(
674
- je,
673
+ We,
675
674
  {
676
675
  id: u.id,
677
676
  textValue: u.name,
678
677
  className: B.listBoxItem,
679
678
  children: [
680
- /* @__PURE__ */ y(Me, { slot: "selection" }),
679
+ /* @__PURE__ */ v(Me, { slot: "selection" }),
681
680
  u.name
682
681
  ]
683
682
  },
@@ -690,17 +689,17 @@ const Qe = '"../theme/tokens.css"', Xe = '"Inter", sans-serif', Ye = "#000000",
690
689
  ] })
691
690
  }
692
691
  ),
693
- /* @__PURE__ */ y(
694
- Ee,
692
+ /* @__PURE__ */ v(
693
+ He,
695
694
  {
696
695
  "aria-label": "Valda",
697
696
  onRemove: (u) => {
698
697
  b.setSelectedKeys(new Set(Array.from(b.selectedKeys).filter((p) => !u.has(p))));
699
698
  },
700
- children: Array.from(g).map((u) => {
699
+ children: Array.from($).map((u) => {
701
700
  const p = b.getItem(u);
702
- return /* @__PURE__ */ y(
703
- Ke,
701
+ return /* @__PURE__ */ v(
702
+ Ae,
704
703
  {
705
704
  id: p == null ? void 0 : p.id,
706
705
  textValue: p == null ? void 0 : p.name,
@@ -720,5 +719,5 @@ const Qe = '"../theme/tokens.css"', Xe = '"Inter", sans-serif', Ye = "#000000",
720
719
  );
721
720
  };
722
721
  export {
723
- Tt as MultiSelect
722
+ Kt as MultiSelect
724
723
  };