@midas-ds/components 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/Button-DL6nqUco.js +182 -0
  2. package/CHANGELOG.md +15 -0
  3. package/Checkbox-q0dugR2t.js +402 -0
  4. package/{Collection-B3xUVWPF.js → Collection-KMFfVuzU.js} +179 -152
  5. package/Dialog-D6Bqrpn-.js +1952 -0
  6. package/Disclosure-dAZYXyTH.js +225 -0
  7. package/Disclosure.css +1 -0
  8. package/DragAndDrop-B0T3WgjL.js +40 -0
  9. package/FocusScope-B7CkxXNC.js +513 -0
  10. package/{Form-DXLoQL91.js → Form-BWBjJC6v.js} +79 -81
  11. package/Group-D7_8007y.js +42 -0
  12. package/Heading-RCRHv6hd.js +15 -0
  13. package/{Hidden-BQWDvze4.js → Hidden-CVlUgUJM.js} +1 -1
  14. package/Link-BnQvB-hH.js +75 -0
  15. package/ListBox-DBBiqvcR.js +474 -0
  16. package/ListKeyboardDelegate-gCXy-Xnn.js +172 -0
  17. package/PressResponder-B4g56kDz.js +31 -0
  18. package/README.md +21 -3
  19. package/{RSPContexts-EOiWkKOf.js → RSPContexts-BW2SEIqe.js} +2 -2
  20. package/SelectionManager-BfXUE1qg.js +1031 -0
  21. package/Separator-BBX9m2O2.js +49 -0
  22. package/Tag-DWt0koFj.js +728 -0
  23. package/Text-BCF0xvqL.js +15 -0
  24. package/TextField-CX4eOQf6.js +225 -0
  25. package/TextField.module-DdICj682.js +143 -0
  26. package/{VisuallyHidden-B_XzVvlX.js → VisuallyHidden-Dhr5caPC.js} +1 -1
  27. package/accordion/Accordion.d.ts +8 -8
  28. package/accordion/AccordionItem.d.ts +11 -3
  29. package/accordion/index.d.ts +0 -3
  30. package/{context-ScOIq_Gu.js → context-BpJLnOuu.js} +11 -11
  31. package/global.css +1 -0
  32. package/index-B-jHjTDC.js +120 -0
  33. package/{index-CorR1LBD.js → index-BPdc9gJ8.js} +3 -3
  34. package/{index-Dl1Q-tbj.js → index-KSgQWWiy.js} +5315 -5315
  35. package/index.d.ts +1 -0
  36. package/index.js +105 -112
  37. package/index10.js +1 -1
  38. package/index11.js +1 -1
  39. package/index12.js +1 -1
  40. package/index13.js +1 -1
  41. package/index14.js +1 -1
  42. package/index15.js +2 -2
  43. package/index16.js +2 -2
  44. package/index17.js +1 -1
  45. package/index18.js +1 -1
  46. package/index19.js +2 -2
  47. package/index2.js +1 -1
  48. package/index20.js +2 -2
  49. package/index21.js +1 -1
  50. package/index22.js +1 -1
  51. package/index23.js +1 -1
  52. package/index24.js +1 -1
  53. package/index25.js +2 -2
  54. package/index26.js +2 -2
  55. package/index27.js +2 -2
  56. package/index28.js +1 -1
  57. package/index29.js +2 -8
  58. package/index3.js +2 -4
  59. package/index30.js +17 -16
  60. package/index31.js +3 -3
  61. package/index32.js +3 -3
  62. package/index33.js +2 -2
  63. package/index34.js +3 -3
  64. package/index35.js +1 -1
  65. package/index36.js +2 -2
  66. package/index37.js +2 -2
  67. package/index38.js +2 -2
  68. package/index39.js +2 -2
  69. package/index4.js +1 -1
  70. package/index40.js +19 -12
  71. package/index41.js +61 -14
  72. package/index42.js +44 -22
  73. package/index43.js +13 -11
  74. package/index44.js +25 -4
  75. package/index45.js +16 -51
  76. package/index46.js +19 -16
  77. package/index47.js +49 -27
  78. package/index48.js +5 -18
  79. package/index49.js +25 -21
  80. package/index5.js +1 -1
  81. package/index50.js +16 -47
  82. package/index51.js +7 -3
  83. package/index52.js +18 -18
  84. package/index53.js +16 -16
  85. package/index54.js +6 -4
  86. package/index55.js +8 -21
  87. package/index56.js +13 -16
  88. package/index57.js +6 -8
  89. package/index58.js +6 -9
  90. package/index59.js +17 -13
  91. package/index6.js +1 -1
  92. package/index60.js +20 -7
  93. package/index61.js +59 -7
  94. package/index62.js +13 -17
  95. package/index63.js +9 -20
  96. package/index64.js +40 -48
  97. package/index65.js +85 -15
  98. package/index66.js +74 -11
  99. package/index67.js +23 -62
  100. package/index68.js +64 -80
  101. package/index69.js +68 -62
  102. package/index7.js +1 -1
  103. package/index70.js +138 -22
  104. package/index71.js +66 -65
  105. package/index72.js +40 -78
  106. package/index73.js +75 -133
  107. package/index74.js +69 -68
  108. package/index75.js +96 -34
  109. package/index76.js +258 -65
  110. package/index77.js +715 -63
  111. package/index78.js +478 -93
  112. package/index79.js +303 -263
  113. package/index8.js +1 -1
  114. package/index80.js +343 -678
  115. package/index81.js +242 -481
  116. package/index82.js +1329 -282
  117. package/index83.js +968 -350
  118. package/index84.js +343 -211
  119. package/index85.js +2025 -1288
  120. package/index86.js +2313 -954
  121. package/index87.js +6782 -339
  122. package/index88.js +15 -2103
  123. package/index89.js +12 -2369
  124. package/index9.js +1 -1
  125. package/index90.js +4 -6832
  126. package/index91.js +7 -15
  127. package/link/Link.d.ts +2 -2
  128. package/link-button/LinkButton.d.ts +1 -1
  129. package/package.json +7 -1
  130. package/{react.esm-D8HpDGKP.js → react.esm-sMU8Z7rL.js} +1872 -1872
  131. package/textfield/index.d.ts +0 -2
  132. package/useControlledState-Kv9K2AYu.js +30 -0
  133. package/{useDescription-D4_zk_sA.js → useDescription-B7stiK3j.js} +1 -1
  134. package/useEvent-Xk5kn5Ns.js +21 -0
  135. package/useField-DMzJIIN4.js +67 -0
  136. package/{useFilter-BnJDBCkt.js → useFilter-Bt9dbV1U.js} +1 -1
  137. package/useFocusRing-9PXyKy2A.js +1297 -0
  138. package/{useFocusable-C-N9wcwm.js → useFocusable-CcEBZe40.js} +11 -8
  139. package/{useGridSelectionCheckbox-i1rsjlC-.js → useGridSelectionCheckbox-DYgEnElE.js} +3 -3
  140. package/useHasTabbableChild-D6DwR81L.js +34 -0
  141. package/{useHighlightSelectionDescription-JVx2MW_e.js → useHighlightSelectionDescription-WYAbP4No.js} +19 -19
  142. package/useLabels-9zaZ9oa0.js +17 -0
  143. package/useListState-BfTeKTk5.js +119 -0
  144. package/{useLocalizedStringFormatter-DVCAZqcL.js → useLocalizedStringFormatter-BlCbn-hX.js} +29 -29
  145. package/{useSingleSelectListState-CmX9_L5H.js → useSingleSelectListState-DPkaL0la.js} +5 -5
  146. package/Button-CCevm2s3.js +0 -183
  147. package/Checkbox-CllWDBxF.js +0 -405
  148. package/Dialog-CLTyYwkS.js +0 -1889
  149. package/DragAndDrop-OTN7La7U.js +0 -42
  150. package/FocusScope-BR0SJ-cZ.js +0 -512
  151. package/Group-DPMuN3h8.js +0 -44
  152. package/Label-C18A_4Z5.js +0 -69
  153. package/Link-BU1h3K2a.js +0 -77
  154. package/ListBox-D21tdwTs.js +0 -463
  155. package/ListKeyboardDelegate-DxMjfMsI.js +0 -172
  156. package/PressResponder-DP8ZDNGy.js +0 -31
  157. package/SelectionManager-D4WtKtey.js +0 -988
  158. package/Separator-DLUHK9vv.js +0 -48
  159. package/Tag-CEd6WWSc.js +0 -725
  160. package/Text-DGLaY3HR.js +0 -17
  161. package/TextField-C_hq9WeT.js +0 -226
  162. package/TextField.module-Cwq1FAm7.js +0 -141
  163. package/accordion/AccordionContent.d.ts +0 -3
  164. package/accordion/AccordionTagContext.d.ts +0 -3
  165. package/accordion/AccordionTrigger.d.ts +0 -3
  166. package/index-CEg5vZQH.js +0 -132
  167. package/index-CgfokhRq.js +0 -674
  168. package/index.css +0 -1
  169. package/index92.js +0 -14
  170. package/index93.js +0 -6
  171. package/index94.js +0 -9
  172. package/useControlledState-S_TYcV_c.js +0 -45
  173. package/useFocusRing-D97-G3fT.js +0 -1324
  174. package/useHasTabbableChild-DeuCnGGv.js +0 -34
  175. package/useListState-DSOTbsL3.js +0 -119
package/index80.js CHANGED
@@ -1,724 +1,389 @@
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";
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";
11
- import * as H from "react";
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";
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);
1
+ import { jsxs as B, jsx as F } from "react/jsx-runtime";
2
+ import * as S from "react";
3
+ import f, { useMemo as w, useRef as H, useEffect as O, forwardRef as M, useContext as p, createContext as T } from "react";
4
+ import { $ as z, a as _, b as N, f as q, c as W, d as j } from "./Collection-KMFfVuzU.js";
5
+ import { o as g, q as U, e as m, k as G, a as J, c as E, d as K, B as R, y as Q, i as C, b as X } from "./useFocusRing-9PXyKy2A.js";
6
+ import { $ as Y } from "./Hidden-CVlUgUJM.js";
7
+ import { $ as Z } from "./useSingleSelectListState-DPkaL0la.js";
8
+ import { $ as k } from "./useLabels-9zaZ9oa0.js";
9
+ import { $ as ee } from "./context-BpJLnOuu.js";
10
+ import { d as te, e as ie } from "./SelectionManager-BfXUE1qg.js";
11
+ import { $ as ae } from "./useHasTabbableChild-D6DwR81L.js";
12
+ import './Tabs.css';const V = /* @__PURE__ */ new WeakMap();
13
+ function P(t, e, i) {
14
+ return t ? (typeof e == "string" && (e = e.replace(/\s+/g, "")), `${V.get(t)}-${i}-${e}`) : "";
15
+ }
16
+ function ne(t, e, i) {
17
+ let { key: a, isDisabled: n, shouldSelectOnPressUp: l } = t, { selectionManager: s, selectedKey: r } = e, d = a === r, o = n || e.isDisabled || e.selectionManager.isDisabled(a), { itemProps: c, isPressed: u } = te({
18
+ selectionManager: s,
19
+ key: a,
20
+ ref: i,
21
+ isDisabled: o,
22
+ shouldSelectOnPressUp: l,
23
+ linkBehavior: "selection"
24
+ }), $ = P(e, a, "tab"), y = P(e, a, "tabpanel"), { tabIndex: D } = c, b = e.collection.getItem(a), L = g(b == null ? void 0 : b.props, {
25
+ labelable: !0
26
+ });
27
+ delete L.id;
28
+ let A = U(b == null ? void 0 : b.props);
26
29
  return {
27
- checkboxProps: {
28
- ...e,
29
- "aria-labelledby": `${e.id} ${we(i, d)}`
30
- }
30
+ tabProps: m(L, A, c, {
31
+ id: $,
32
+ "aria-selected": d,
33
+ "aria-disabled": o || void 0,
34
+ "aria-controls": d ? y : void 0,
35
+ tabIndex: o ? void 0 : D,
36
+ role: "tab"
37
+ }),
38
+ isSelected: d,
39
+ isDisabled: o,
40
+ isPressed: u
31
41
  };
32
42
  }
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 || []),
40
- filterText: t
41
- }), s = te(() => o ? r.items.filter((f) => o(f, r.filterText)) : r.items, [
42
- r.items,
43
- r.filterText,
44
- o
45
- ]);
43
+ function se(t, e, i) {
44
+ let a = ae(i) ? void 0 : 0;
45
+ var n;
46
+ const l = P(e, (n = t.id) !== null && n !== void 0 ? n : e == null ? void 0 : e.selectedKey, "tabpanel"), s = k({
47
+ ...t,
48
+ id: l,
49
+ "aria-labelledby": P(e, e == null ? void 0 : e.selectedKey, "tab")
50
+ });
46
51
  return {
47
- ...r,
48
- items: s,
49
- ...Fe({
50
- getKey: e
51
- }, a),
52
- getItem(f) {
53
- return r.items.find((n) => e(n) === f);
54
- }
52
+ tabPanelProps: m(s, {
53
+ tabIndex: a,
54
+ role: "tabpanel",
55
+ "aria-describedby": t["aria-describedby"],
56
+ "aria-details": t["aria-details"]
57
+ })
55
58
  };
56
59
  }
57
- function Fe(l, i) {
58
- let { cursor: d, getKey: e } = l;
60
+ class de {
61
+ getKeyLeftOf(e) {
62
+ return this.flipDirection ? this.getNextKey(e) : this.getPreviousKey(e);
63
+ }
64
+ getKeyRightOf(e) {
65
+ return this.flipDirection ? this.getPreviousKey(e) : this.getNextKey(e);
66
+ }
67
+ isDisabled(e) {
68
+ var i, a;
69
+ return this.disabledKeys.has(e) || !!(!((a = this.collection.getItem(e)) === null || a === void 0 || (i = a.props) === null || i === void 0) && i.isDisabled);
70
+ }
71
+ getFirstKey() {
72
+ let e = this.collection.getFirstKey();
73
+ return e != null && this.isDisabled(e) && (e = this.getNextKey(e)), e;
74
+ }
75
+ getLastKey() {
76
+ let e = this.collection.getLastKey();
77
+ return e != null && this.isDisabled(e) && (e = this.getPreviousKey(e)), e;
78
+ }
79
+ getKeyAbove(e) {
80
+ return this.tabDirection ? null : this.getPreviousKey(e);
81
+ }
82
+ getKeyBelow(e) {
83
+ return this.tabDirection ? null : this.getNextKey(e);
84
+ }
85
+ getNextKey(e) {
86
+ do
87
+ e = this.collection.getKeyAfter(e), e == null && (e = this.collection.getFirstKey());
88
+ while (this.isDisabled(e));
89
+ return e;
90
+ }
91
+ getPreviousKey(e) {
92
+ do
93
+ e = this.collection.getKeyBefore(e), e == null && (e = this.collection.getLastKey());
94
+ while (this.isDisabled(e));
95
+ return e;
96
+ }
97
+ constructor(e, i, a, n = /* @__PURE__ */ new Set()) {
98
+ this.collection = e, this.flipDirection = i === "rtl" && a === "horizontal", this.disabledKeys = n, this.tabDirection = a === "horizontal";
99
+ }
100
+ }
101
+ function le(t, e, i) {
102
+ let { orientation: a = "horizontal", keyboardActivation: n = "automatic" } = t, { collection: l, selectionManager: s, disabledKeys: r } = e, { direction: d } = ee(), o = w(() => new de(l, d, a, r), [
103
+ l,
104
+ r,
105
+ a,
106
+ d
107
+ ]), { collectionProps: c } = ie({
108
+ ref: i,
109
+ selectionManager: s,
110
+ keyboardDelegate: o,
111
+ selectOnFocus: n === "automatic",
112
+ disallowEmptySelection: !0,
113
+ scrollRef: i,
114
+ linkBehavior: "selection"
115
+ }), u = G();
116
+ V.set(e, u);
117
+ let $ = k({
118
+ ...t,
119
+ id: u
120
+ });
59
121
  return {
60
- setSelectedKeys(o) {
61
- i((t) => ({
62
- ...t,
63
- selectedKeys: o
64
- }));
65
- },
66
- setFilterText(o) {
67
- i((t) => ({
68
- ...t,
69
- filterText: o
70
- }));
71
- },
72
- insert(o, ...t) {
73
- i((r) => A(r, o, ...t));
74
- },
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;
80
- else return r;
81
- return A(r, a, ...t);
82
- });
83
- },
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;
89
- else return r;
90
- return A(r, a + 1, ...t);
91
- });
92
- },
93
- prepend(...o) {
94
- i((t) => A(t, 0, ...o));
95
- },
96
- append(...o) {
97
- i((t) => A(t, t.items.length, ...o));
98
- },
99
- remove(...o) {
100
- i((t) => {
101
- let r = new Set(o), a = t.items.filter((f) => !r.has(e(f))), s = "all";
102
- if (t.selectedKeys !== "all") {
103
- s = new Set(t.selectedKeys);
104
- for (let f of o) s.delete(f);
105
- }
106
- return d == null && a.length === 0 && (s = /* @__PURE__ */ new Set()), {
107
- ...t,
108
- items: a,
109
- selectedKeys: s
110
- };
111
- });
112
- },
113
- removeSelectedItems() {
114
- i((o) => {
115
- if (o.selectedKeys === "all") return {
116
- ...o,
117
- items: [],
118
- selectedKeys: /* @__PURE__ */ new Set()
119
- };
120
- let t = o.selectedKeys, r = o.items.filter((a) => !t.has(e(a)));
121
- return {
122
- ...o,
123
- items: r,
124
- selectedKeys: /* @__PURE__ */ new Set()
125
- };
126
- });
127
- },
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);
133
- return s.splice(t, 0, f), {
134
- ...r,
135
- items: s
136
- };
137
- });
138
- },
139
- moveBefore(o, t) {
140
- i((r) => {
141
- let a = r.items.findIndex((n) => e(n) === o);
142
- if (a === -1) return r;
143
- let f = (Array.isArray(t) ? t : [
144
- ...t
145
- ]).map((n) => r.items.findIndex((m) => e(m) === n)).sort((n, m) => n - m);
146
- return Q(r, f, a);
147
- });
148
- },
149
- moveAfter(o, t) {
150
- i((r) => {
151
- let a = r.items.findIndex((n) => e(n) === o);
152
- if (a === -1) return r;
153
- let f = (Array.isArray(t) ? t : [
154
- ...t
155
- ]).map((n) => r.items.findIndex((m) => e(m) === n)).sort((n, m) => n - m);
156
- return Q(r, f, a + 1);
157
- });
158
- },
159
- update(o, t) {
160
- i((r) => {
161
- let a = r.items.findIndex((s) => e(s) === o);
162
- return a === -1 ? r : {
163
- ...r,
164
- items: [
165
- ...r.items.slice(0, a),
166
- t,
167
- ...r.items.slice(a + 1)
168
- ]
169
- };
170
- });
122
+ tabListProps: {
123
+ ...m(c, $),
124
+ role: "tablist",
125
+ "aria-orientation": a,
126
+ tabIndex: void 0
171
127
  }
172
128
  };
173
129
  }
174
- function A(l, i, ...d) {
175
- return {
176
- ...l,
177
- items: [
178
- ...l.items.slice(0, i),
179
- ...d,
180
- ...l.items.slice(i)
181
- ]
130
+ function re(t) {
131
+ var e, i;
132
+ let a = Z({
133
+ ...t,
134
+ suppressTextValueWarning: !0,
135
+ defaultSelectedKey: (i = (e = t.defaultSelectedKey) !== null && e !== void 0 ? e : I(t.collection, t.disabledKeys ? new Set(t.disabledKeys) : /* @__PURE__ */ new Set())) !== null && i !== void 0 ? i : void 0
136
+ }), { selectionManager: n, collection: l, selectedKey: s } = a, r = H(s);
137
+ return O(() => {
138
+ let d = s;
139
+ (n.isEmpty || d == null || !l.getItem(d)) && (d = I(l, a.disabledKeys), d != null && n.setSelectedKeys([
140
+ d
141
+ ])), (d != null && n.focusedKey == null || !n.isFocused && d !== r.current) && n.setFocusedKey(d), r.current = d;
142
+ }), {
143
+ ...a,
144
+ isDisabled: t.isDisabled || !1
182
145
  };
183
146
  }
184
- function Q(l, i, d) {
185
- d -= i.filter((t) => t < d).length;
186
- let e = i.map((t) => ({
187
- from: t,
188
- to: d++
189
- }));
190
- for (let t = 0; t < e.length; t++) {
191
- let r = e[t].from;
192
- for (let a = t; a < e.length; a++)
193
- e[a].from > r && e[a].from--;
147
+ function I(t, e) {
148
+ let i = null;
149
+ if (t) {
150
+ var a, n, l, s;
151
+ for (i = t.getFirstKey(); i != null && (e.has(i) || !((n = t.getItem(i)) === null || n === void 0 || (a = n.props) === null || a === void 0) && a.isDisabled) && i !== t.getLastKey(); ) i = t.getKeyAfter(i);
152
+ i != null && (e.has(i) || !((s = t.getItem(i)) === null || s === void 0 || (l = s.props) === null || l === void 0) && l.isDisabled) && i === t.getLastKey() && (i = t.getFirstKey());
194
153
  }
195
- for (let t = 0; t < e.length; t++) {
196
- let r = e[t];
197
- for (let a = e.length - 1; a > t; a--) {
198
- let s = e[a];
199
- s.from < r.to ? r.to++ : s.from++;
200
- }
201
- }
202
- let o = l.items.slice();
203
- for (let t of e) {
204
- let [r] = o.splice(t.from, 1);
205
- o.splice(t.to, 0, r);
206
- }
207
- return {
208
- ...l,
209
- items: o
210
- };
154
+ return i;
211
155
  }
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
156
+ const v = /* @__PURE__ */ T(null), h = /* @__PURE__ */ T(null), oe = /* @__PURE__ */ M(function(e, i) {
157
+ [e, i] = J(e, i, v);
158
+ let { children: a, orientation: n = "horizontal" } = e;
159
+ return a = w(() => typeof a == "function" ? a({
160
+ orientation: n,
161
+ defaultChildren: null
162
+ }) : a, [
163
+ a,
164
+ n
165
+ ]), /* @__PURE__ */ f.createElement(z, {
166
+ content: a
167
+ }, (l) => /* @__PURE__ */ f.createElement(ce, {
168
+ props: e,
169
+ collection: l,
170
+ tabsRef: i
220
171
  }));
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,
226
- children: void 0,
227
- layoutDelegate: s
228
- }), m = Be({
229
- usage: "search",
230
- sensitivity: "base"
231
- }), { disabledBehavior: b, disabledKeys: g } = n.selectionManager, { direction: u } = Re(), p = te(() => new J({
172
+ });
173
+ function ce({ props: t, tabsRef: e, collection: i }) {
174
+ let { orientation: a = "horizontal" } = t, n = re({
175
+ ...t,
232
176
  collection: i,
233
- collator: m,
234
- ref: d,
235
- disabledKeys: g,
236
- disabledBehavior: b,
237
- layoutDelegate: s,
238
- layout: t,
239
- direction: u
177
+ children: void 0
178
+ }), { focusProps: l, isFocused: s, isFocusVisible: r } = E({
179
+ within: !0
180
+ }), d = w(() => ({
181
+ orientation: a,
182
+ isFocusWithin: s,
183
+ isFocusVisible: r
240
184
  }), [
241
- i,
242
- d,
243
- t,
244
- g,
245
- b,
185
+ a,
246
186
  s,
247
- m,
248
- u
249
- ]), { gridProps: R } = Ie({
187
+ r
188
+ ]), o = K({
189
+ ...t,
190
+ defaultClassName: "react-aria-Tabs",
191
+ values: d
192
+ });
193
+ return /* @__PURE__ */ f.createElement("div", {
194
+ ...g(t),
250
195
  ...l,
251
- keyboardDelegate: p,
252
- // Only tab navigation is supported in grid layout.
253
- 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);
256
- 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.");
258
- }, [
259
- w,
260
- h
261
- ]);
262
- let k, x, S, I = !1, K = null, W = P(null);
263
- if (w && e) {
264
- k = e.useDraggableCollectionState({
265
- collection: i,
266
- selectionManager: D,
267
- preview: e.renderDragPreview ? W : void 0
268
- }), e.useDraggableCollection({}, k, d);
269
- let T = e.DragPreview;
270
- K = e.renderDragPreview ? /* @__PURE__ */ c.createElement(T, {
271
- ref: W
272
- }, e.renderDragPreview) : null;
273
- }
274
- if (h && e) {
275
- x = e.useDroppableCollectionState({
276
- collection: i,
277
- selectionManager: D
278
- });
279
- let T = new J({
280
- collection: i,
281
- disabledKeys: D.disabledKeys,
282
- disabledBehavior: D.disabledBehavior,
283
- ref: d
284
- }), le = e.dropTargetDelegate || f || new e.ListDropTargetDelegate(i, d, {
285
- layout: t,
286
- direction: u
287
- });
288
- S = e.useDroppableCollection({
289
- keyboardDelegate: T,
290
- dropTargetDelegate: le
291
- }, x, d), I = x.isDropTarget({
292
- type: "root"
293
- });
294
- }
295
- let { focusProps: oe, isFocused: j, isFocusVisible: O } = Y(), U = {
296
- isDropTarget: I,
297
- isEmpty: n.collection.size === 0,
298
- isFocused: j,
299
- isFocusVisible: O,
300
- layout: t,
301
- state: n
302
- }, ae = N({
303
- className: l.className,
304
- style: l.style,
305
- defaultClassName: "react-aria-GridList",
306
- values: U
307
- }), q = null, ie = null;
308
- if (n.collection.size === 0 && l.renderEmptyState) {
309
- let T = l.renderEmptyState(U);
310
- q = /* @__PURE__ */ c.createElement("div", {
311
- role: "row",
312
- style: {
313
- display: "contents"
314
- }
315
- }, /* @__PURE__ */ c.createElement("div", {
316
- role: "gridcell",
317
- style: {
318
- display: "contents"
319
- }
320
- }, T));
321
- }
322
- return /* @__PURE__ */ c.createElement(He, null, /* @__PURE__ */ c.createElement("div", {
323
- ...ee(l),
324
- ...ae,
325
- ...Z(R, oe, S == null ? void 0 : S.collectionProps, ie),
326
- ref: d,
327
- slot: l.slot || void 0,
328
- onScroll: l.onScroll,
329
- "data-drop-target": I || void 0,
330
- "data-empty": n.collection.size === 0 || void 0,
331
- "data-focused": j || void 0,
332
- "data-focus-visible": O || void 0,
333
- "data-layout": t
334
- }, /* @__PURE__ */ c.createElement(z, {
196
+ ...o,
197
+ ref: e,
198
+ slot: t.slot || void 0,
199
+ "data-focused": s || void 0,
200
+ "data-orientation": a,
201
+ "data-focus-visible": r || void 0,
202
+ "data-disabled": n.isDisabled || void 0
203
+ }, /* @__PURE__ */ f.createElement(R, {
335
204
  values: [
336
205
  [
337
- _,
338
- n
339
- ],
340
- [
341
- M,
342
- {
343
- dragAndDropHooks: e,
344
- dragState: k,
345
- dropState: x
346
- }
206
+ v,
207
+ t
347
208
  ],
348
209
  [
349
- ye,
350
- {
351
- render: Oe
352
- }
210
+ h,
211
+ n
353
212
  ]
354
213
  ]
355
- }, h && /* @__PURE__ */ c.createElement(Je, null), /* @__PURE__ */ c.createElement(r, {
356
- collection: i,
357
- scrollRef: d,
358
- persistedKeys: xe(D, e, x),
359
- renderDropIndicator: De(e, x)
360
- })), q, K));
214
+ }, o.children));
361
215
  }
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({
364
- node: e,
365
- shouldSelectOnPressUp: !!r,
366
- isVirtualized: f
367
- }, o, s), { hoverProps: u, isHovered: p } = se({
368
- isDisabled: !g.allowsSelection && !g.hasAction,
369
- onHoverStart: e.props.onHoverStart,
370
- onHoverChange: e.props.onHoverChange,
371
- onHoverEnd: e.props.onHoverEnd
372
- }), { isFocusVisible: R, focusProps: D } = Y(), { checkboxProps: w } = Ve({
373
- key: e.key
374
- }, o), h = o.selectionManager.disabledBehavior === "all" && g.isDisabled ? {
375
- isDisabled: !0
376
- } : {}, v = null;
377
- r && t && (v = t.useDraggableItem({
378
- key: e.key,
379
- hasDragButton: !0
380
- }, r));
381
- let $ = null, k = P(null), { visuallyHiddenProps: x } = G();
382
- a && t && ($ = t.useDropIndicator({
383
- target: {
384
- type: "item",
385
- key: e.key,
386
- dropPosition: "on"
216
+ const fe = /* @__PURE__ */ M(function(e, i) {
217
+ return p(h) ? /* @__PURE__ */ f.createElement(ue, {
218
+ props: e,
219
+ forwardedRef: i
220
+ }) : /* @__PURE__ */ f.createElement(_, e);
221
+ });
222
+ function ue({ props: t, forwardedRef: e }) {
223
+ let i = p(h), { CollectionRoot: a } = p(N), { orientation: n = "horizontal", keyboardActivation: l = "automatic" } = Q(v), s = C(e), { tabListProps: r } = le({
224
+ ...t,
225
+ orientation: n,
226
+ keyboardActivation: l
227
+ }, i, s), d = K({
228
+ ...t,
229
+ children: null,
230
+ defaultClassName: "react-aria-TabList",
231
+ values: {
232
+ orientation: n,
233
+ state: i
387
234
  }
388
- }, a, k));
389
- let S = r && r.isDragging(e.key), I = N({
390
- ...i,
235
+ }), o = g(t);
236
+ return delete o.id, /* @__PURE__ */ f.createElement("div", {
237
+ ...o,
238
+ ...r,
239
+ ref: s,
240
+ ...d,
241
+ "data-orientation": n || void 0
242
+ }, /* @__PURE__ */ f.createElement(a, {
243
+ collection: i.collection,
244
+ persistedKeys: q(i.selectionManager.focusedKey)
245
+ }));
246
+ }
247
+ const be = /* @__PURE__ */ W("item", (t, e, i) => {
248
+ let a = p(h), n = C(e), { tabProps: l, isSelected: s, isDisabled: r, isPressed: d } = ne({
249
+ key: i.key,
250
+ ...t
251
+ }, a, n), { focusProps: o, isFocused: c, isFocusVisible: u } = E(), { hoverProps: $, isHovered: y } = X({
252
+ isDisabled: r,
253
+ onHoverStart: t.onHoverStart,
254
+ onHoverEnd: t.onHoverEnd,
255
+ onHoverChange: t.onHoverChange
256
+ }), D = K({
257
+ ...t,
391
258
  id: void 0,
392
- children: e.rendered,
393
- defaultClassName: "react-aria-GridListItem",
259
+ defaultClassName: "react-aria-Tab",
394
260
  values: {
395
- ...g,
396
- isHovered: p,
397
- isFocusVisible: R,
398
- selectionMode: o.selectionManager.selectionMode,
399
- selectionBehavior: o.selectionManager.selectionBehavior,
400
- allowsDragging: !!r,
401
- isDragging: S,
402
- isDropTarget: $ == null ? void 0 : $.isDropTarget
261
+ isSelected: s,
262
+ isDisabled: r,
263
+ isFocused: c,
264
+ isFocusVisible: u,
265
+ isPressed: d,
266
+ isHovered: y
403
267
  }
404
- }), K = P(null);
405
- return F(() => {
406
- r && !K.current && console.warn('Draggable items in a GridList must contain a <Button slot="drag"> element so that keyboard and screen reader users can drag them.');
407
- }, []), F(() => {
408
- 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
- }, [
410
- e.textValue
411
- ]), /* @__PURE__ */ c.createElement(c.Fragment, null, $ && !$.isHidden && /* @__PURE__ */ c.createElement("div", {
412
- role: "row",
413
- style: {
414
- position: "absolute"
415
- }
416
- }, /* @__PURE__ */ c.createElement("div", {
417
- role: "gridcell"
418
- }, /* @__PURE__ */ c.createElement("div", {
419
- role: "button",
420
- ...x,
421
- ...$ == null ? void 0 : $.dropIndicatorProps,
422
- ref: k
423
- }))), /* @__PURE__ */ c.createElement("div", {
424
- ...Z(ee(i), n, D, u, v == null ? void 0 : v.dragProps),
425
- ...I,
426
- ref: s,
427
- "data-selected": g.isSelected || void 0,
428
- "data-disabled": g.isDisabled || void 0,
429
- "data-hovered": p || void 0,
430
- "data-focused": g.isFocused || void 0,
431
- "data-focus-visible": R || void 0,
432
- "data-pressed": g.isPressed || void 0,
433
- "data-allows-dragging": !!r || void 0,
434
- "data-dragging": S || void 0,
435
- "data-drop-target": ($ == null ? void 0 : $.isDropTarget) || void 0,
436
- "data-selection-mode": o.selectionManager.selectionMode === "none" ? void 0 : o.selectionManager.selectionMode
437
- }, /* @__PURE__ */ c.createElement("div", {
438
- ...m,
439
- style: {
440
- display: "contents"
268
+ }), b = i.props.href ? "a" : "div";
269
+ return /* @__PURE__ */ f.createElement(b, {
270
+ ...m(l, o, $, D),
271
+ ref: n,
272
+ "data-selected": s || void 0,
273
+ "data-disabled": r || void 0,
274
+ "data-focused": c || void 0,
275
+ "data-focus-visible": u || void 0,
276
+ "data-pressed": d || void 0,
277
+ "data-hovered": y || void 0
278
+ });
279
+ }), $e = /* @__PURE__ */ Y(function(e, i) {
280
+ const a = p(h);
281
+ let n = C(i), { tabPanelProps: l } = se(e, a, n), { focusProps: s, isFocused: r, isFocusVisible: d } = E(), o = a.selectedKey === e.id, c = K({
282
+ ...e,
283
+ defaultClassName: "react-aria-TabPanel",
284
+ values: {
285
+ isFocused: r,
286
+ isFocusVisible: d,
287
+ isInert: !o,
288
+ state: a
441
289
  }
442
- }, /* @__PURE__ */ c.createElement(z, {
290
+ });
291
+ if (!o && !e.shouldForceMount) return null;
292
+ let u = g(e);
293
+ delete u.id;
294
+ let $ = o ? m(u, l, s, c) : c;
295
+ return /* @__PURE__ */ f.createElement("div", {
296
+ ...$,
297
+ ref: n,
298
+ "data-focused": r || void 0,
299
+ "data-focus-visible": d || void 0,
300
+ // @ts-ignore
301
+ inert: o ? void 0 : "true",
302
+ "data-inert": o ? void 0 : "true"
303
+ }, /* @__PURE__ */ f.createElement(R, {
443
304
  values: [
444
305
  [
445
- be,
446
- {
447
- slots: {
448
- [L]: {},
449
- selection: w
450
- }
451
- }
452
- ],
453
- [
454
- de,
455
- {
456
- slots: {
457
- [L]: h,
458
- drag: {
459
- ...v == null ? void 0 : v.dragButtonProps,
460
- ref: K,
461
- style: {
462
- pointerEvents: "none"
463
- }
464
- }
465
- }
466
- }
467
- ],
468
- [
469
- he,
470
- {
471
- slots: {
472
- [L]: {},
473
- description: b
474
- }
475
- }
476
- ],
477
- [
478
- V,
479
- $e
306
+ v,
307
+ null
480
308
  ],
481
309
  [
482
- _,
310
+ h,
483
311
  null
484
312
  ]
485
313
  ]
486
- }, I.children))));
487
- });
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,
493
- dropIndicatorProps: t,
494
- isDropTarget: a,
495
- buttonRef: o,
496
- ref: i
497
- });
498
- }
499
- function Ue(l, i) {
500
- let { dropIndicatorProps: d, isDropTarget: e, buttonRef: o, ...t } = l, { visuallyHiddenProps: r } = G(), a = N({
501
- ...t,
502
- defaultClassName: "react-aria-DropIndicator",
503
- values: {
504
- isDropTarget: e
505
- }
506
- });
507
- return /* @__PURE__ */ c.createElement("div", {
508
- ...a,
509
- role: "row",
510
- ref: i,
511
- "data-drop-target": e || void 0
512
- }, /* @__PURE__ */ c.createElement("div", {
513
- role: "gridcell"
514
- }, /* @__PURE__ */ c.createElement("div", {
515
- ...r,
516
- role: "button",
517
- ...d,
518
- ref: o
519
- }), a.children));
520
- }
521
- const qe = /* @__PURE__ */ re(Ue);
522
- function Je() {
523
- let { dragAndDropHooks: l, dropState: i } = E(M), d = P(null), { dropIndicatorProps: e } = l.useDropIndicator({
524
- target: {
525
- type: "root"
526
- }
527
- }, i, d), o = i.isDropTarget({
528
- type: "root"
529
- }), { visuallyHiddenProps: t } = G();
530
- return !o && e["aria-hidden"] ? null : /* @__PURE__ */ c.createElement("div", {
531
- role: "row",
532
- "aria-hidden": e["aria-hidden"],
533
- style: {
534
- position: "absolute"
535
- }
536
- }, /* @__PURE__ */ c.createElement("div", {
537
- role: "gridcell"
538
- }, /* @__PURE__ */ c.createElement("div", {
539
- role: "button",
540
- ...t,
541
- ...e,
542
- ref: d
543
- })));
544
- }
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,
558
- listBoxItem: nt
559
- }, Tt = ({
560
- label: l,
561
- description: i,
562
- items: d,
563
- onSelectionChange: e,
564
- selectedKeys: o,
565
- defaultSelectedKeys: t,
566
- isDisabled: r,
567
- isInvalid: a,
568
- errorMessage: s
314
+ }, /* @__PURE__ */ f.createElement(N.Provider, {
315
+ value: j
316
+ }, c.children)));
317
+ }), he = '"../theme/tokens.css"', pe = '"Inter", sans-serif', me = "#bfbfbf", ye = "600", xe = "#25607f", Pe = "0 0 0 2px #ffffff, 0 0 0 4px #000000", ge = "(max-width: 767px)", Ke = "_container_a0kqi_4", ve = "_list_a0kqi_8", De = "_listItem_a0kqi_14", Fe = "_panel_a0kqi_42", x = {
318
+ tokens: he,
319
+ display: pe,
320
+ gray50: me,
321
+ semiBoldWeight: ye,
322
+ blue130: xe,
323
+ focus: Pe,
324
+ smBreakpoint: ge,
325
+ container: Ke,
326
+ list: ve,
327
+ listItem: De,
328
+ panel: Fe
329
+ }, ke = ({
330
+ tabs: t,
331
+ label: e,
332
+ defaultSelected: i,
333
+ children: a
569
334
  }) => {
570
- const f = H.useRef(null), [n, m] = H.useState(
571
- void 0
572
- ), b = _e({
573
- initialItems: d,
574
- initialSelectedKeys: t
575
- });
576
- H.useEffect(() => {
577
- const u = () => {
578
- f.current && m(f.current.offsetWidth - 2);
579
- };
580
- return u(), window.addEventListener("resize", u), () => {
581
- window.removeEventListener("resize", u);
582
- };
583
- }, []), H.useEffect(() => {
584
- e && e(new Set(b.selectedKeys));
585
- }, [b.selectedKeys, e]), H.useEffect(() => {
586
- o && b.setSelectedKeys(new Set(o));
587
- }, [o]);
588
- const g = b.selectedKeys === "all" ? new Set(
589
- b.items.map((u) => u.id)
590
- ) : b.selectedKeys;
591
- return /* @__PURE__ */ y(
592
- "div",
335
+ const n = S.Children.toArray(a);
336
+ if (n.length !== t.length)
337
+ throw new Error(
338
+ `The number of children must match the number of tabs. Children: ${n.length} Tabs: ${t.length}`
339
+ );
340
+ const l = n.reduce(
341
+ (s, r, d) => {
342
+ var o;
343
+ if (S.isValidElement(r)) {
344
+ const c = (o = t[d]) == null ? void 0 : o.toLowerCase();
345
+ c && (s[c] = S.cloneElement(r, { id: c }));
346
+ }
347
+ return s;
348
+ },
349
+ {}
350
+ );
351
+ return /* @__PURE__ */ B(
352
+ oe,
593
353
  {
594
- className: B.multiSelect,
595
- "data-disabled": r,
596
- "data-invalid": a,
597
- children: /* @__PURE__ */ C(
598
- z,
599
- {
600
- values: [
601
- [
602
- // we should maybe add more here
603
- // [LabelContext, {...labelProps, ref: labelRef}],
604
- // [InputContext, {...inputProps, ref: inputOrTextAreaRef}],
605
- // [TextAreaContext, {...inputProps, ref: inputOrTextAreaRef}],
606
- // [TextContext, {
607
- // slots: {
608
- // description: descriptionProps,
609
- // errorMessage: errorMessageProps
610
- // }
611
- // }],
612
- pe,
613
- {
614
- isInvalid: a || !1,
615
- validationErrors: [],
616
- validationDetails: {
617
- customError: a || !1,
618
- badInput: !1,
619
- patternMismatch: !1,
620
- rangeOverflow: !1,
621
- rangeUnderflow: !1,
622
- stepMismatch: !1,
623
- tooLong: !1,
624
- tooShort: !1,
625
- typeMismatch: !1,
626
- valid: !1,
627
- valueMissing: !1
628
- }
629
- }
630
- ]
631
- ],
632
- children: [
633
- /* @__PURE__ */ y(
634
- Ce,
354
+ orientation: "vertical",
355
+ defaultSelectedKey: i && i.toLowerCase(),
356
+ className: x.container,
357
+ children: [
358
+ /* @__PURE__ */ F(
359
+ fe,
360
+ {
361
+ "aria-label": e,
362
+ className: x.list,
363
+ children: t.map((s) => /* @__PURE__ */ F(
364
+ be,
635
365
  {
636
- label: l,
637
- description: i,
638
- errorMessage: s,
639
- children: /* @__PURE__ */ C(fe, { children: [
640
- /* @__PURE__ */ C(
641
- ne,
642
- {
643
- className: B.button,
644
- ref: f,
645
- isDisabled: r,
646
- children: [
647
- "Välj",
648
- /* @__PURE__ */ y(
649
- "div",
650
- {
651
- className: B.icon,
652
- "aria-hidden": "true",
653
- children: /* @__PURE__ */ y(Le, { size: 20 })
654
- }
655
- )
656
- ]
657
- }
658
- ),
659
- /* @__PURE__ */ y(
660
- ue,
661
- {
662
- className: B.popover,
663
- style: { width: n },
664
- offset: 0,
665
- UNSTABLE_portalContainer: f.current || void 0,
666
- children: /* @__PURE__ */ y(
667
- We,
668
- {
669
- "aria-label": l,
670
- selectionMode: "multiple",
671
- selectedKeys: b.selectedKeys,
672
- onSelectionChange: b.setSelectedKeys,
673
- children: b.items.map((u) => /* @__PURE__ */ C(
674
- je,
675
- {
676
- id: u.id,
677
- textValue: u.name,
678
- className: B.listBoxItem,
679
- children: [
680
- /* @__PURE__ */ y(Me, { slot: "selection" }),
681
- u.name
682
- ]
683
- },
684
- u.id
685
- ))
686
- }
687
- )
688
- }
689
- )
690
- ] })
691
- }
692
- ),
693
- /* @__PURE__ */ y(
694
- Ee,
695
- {
696
- "aria-label": "Valda",
697
- onRemove: (u) => {
698
- b.setSelectedKeys(new Set(Array.from(b.selectedKeys).filter((p) => !u.has(p))));
699
- },
700
- children: Array.from(g).map((u) => {
701
- const p = b.getItem(u);
702
- return /* @__PURE__ */ y(
703
- Ke,
704
- {
705
- id: p == null ? void 0 : p.id,
706
- textValue: p == null ? void 0 : p.name,
707
- isDisabled: r,
708
- dismissable: !0,
709
- children: p == null ? void 0 : p.name
710
- },
711
- p == null ? void 0 : p.id
712
- );
713
- })
714
- }
715
- )
716
- ]
717
- }
718
- )
366
+ id: s.toLowerCase(),
367
+ className: x.listItem,
368
+ children: s
369
+ },
370
+ s
371
+ ))
372
+ }
373
+ ),
374
+ t.map((s) => /* @__PURE__ */ F(
375
+ $e,
376
+ {
377
+ id: s.toLowerCase(),
378
+ className: x.panel,
379
+ children: l[s.toLowerCase()]
380
+ },
381
+ s
382
+ ))
383
+ ]
719
384
  }
720
385
  );
721
386
  };
722
387
  export {
723
- Tt as MultiSelect
388
+ ke as Tabs
724
389
  };