@midas-ds/components 1.1.0 → 1.3.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 (183) hide show
  1. package/CHANGELOG.md +63 -1
  2. package/accordion/AccordionItem.d.ts +2 -2
  3. package/index.cjs +138 -0
  4. package/index.css +1 -0
  5. package/index.d.ts +0 -2
  6. package/index.js +27094 -105
  7. package/package.json +22 -4
  8. package/table/Table.d.ts +3 -4
  9. package/textfield/TextField.d.ts +15 -4
  10. package/theme.cjs +1 -0
  11. package/theme.js +20 -0
  12. package/tokens-BskyMDHv.cjs +1 -0
  13. package/Breadcrumbs.css +0 -1
  14. package/Button-DL6nqUco.js +0 -182
  15. package/Button.css +0 -1
  16. package/ButtonGroup.css +0 -1
  17. package/Card.css +0 -1
  18. package/Checkbox-q0dugR2t.js +0 -402
  19. package/Checkbox.css +0 -1
  20. package/Collection-KMFfVuzU.js +0 -510
  21. package/ComboBox.css +0 -1
  22. package/DatePicker.css +0 -1
  23. package/Dialog-D6Bqrpn-.js +0 -1952
  24. package/Disclosure-dAZYXyTH.js +0 -225
  25. package/Disclosure.css +0 -1
  26. package/DragAndDrop-B0T3WgjL.js +0 -40
  27. package/Dropdown.css +0 -1
  28. package/FileUpload.css +0 -1
  29. package/Flex.css +0 -1
  30. package/Flex.module-CpoxBzQX.js +0 -37
  31. package/FocusScope-B7CkxXNC.js +0 -513
  32. package/Form-BWBjJC6v.js +0 -238
  33. package/Grid.css +0 -1
  34. package/Grid.module-Ia0e9Dix.js +0 -36
  35. package/Group-D7_8007y.js +0 -42
  36. package/Heading-RCRHv6hd.js +0 -15
  37. package/Hidden-CVlUgUJM.js +0 -37
  38. package/InfoBanner.css +0 -1
  39. package/Layout.css +0 -1
  40. package/Link-BnQvB-hH.js +0 -75
  41. package/Link.css +0 -1
  42. package/LinkButton.css +0 -1
  43. package/ListBox-DBBiqvcR.js +0 -474
  44. package/ListKeyboardDelegate-gCXy-Xnn.js +0 -172
  45. package/Logo.css +0 -1
  46. package/Modal.css +0 -1
  47. package/MultiSelect.css +0 -1
  48. package/PressResponder-B4g56kDz.js +0 -31
  49. package/RSPContexts-BW2SEIqe.js +0 -11
  50. package/Radio.css +0 -1
  51. package/SearchField.css +0 -1
  52. package/Select.css +0 -1
  53. package/SelectionManager-BfXUE1qg.js +0 -1031
  54. package/Separator-BBX9m2O2.js +0 -49
  55. package/Spinner.css +0 -1
  56. package/Table.css +0 -1
  57. package/Tabs.css +0 -1
  58. package/Tag-DWt0koFj.js +0 -728
  59. package/Tag.css +0 -1
  60. package/Text-BCF0xvqL.js +0 -15
  61. package/TextArea.css +0 -1
  62. package/TextField-CX4eOQf6.js +0 -225
  63. package/TextField.css +0 -1
  64. package/TextField.module-DdICj682.js +0 -143
  65. package/Toast.css +0 -1
  66. package/VisuallyHidden-Dhr5caPC.js +0 -39
  67. package/chevron-down-Cd1bkzXT.js +0 -13
  68. package/chevron-right-DBMc9VMi.js +0 -23
  69. package/clsx-OuTLNxxd.js +0 -16
  70. package/context-BpJLnOuu.js +0 -80
  71. package/createLucideIcon-DeWljiyi.js +0 -79
  72. package/index-B-jHjTDC.js +0 -120
  73. package/index-BPdc9gJ8.js +0 -3122
  74. package/index-KSgQWWiy.js +0 -26984
  75. package/index10.js +0 -4
  76. package/index11.js +0 -5
  77. package/index12.js +0 -4
  78. package/index13.js +0 -4
  79. package/index14.js +0 -4
  80. package/index15.js +0 -6
  81. package/index16.js +0 -6
  82. package/index17.js +0 -6
  83. package/index18.js +0 -4
  84. package/index19.js +0 -6
  85. package/index2.js +0 -8
  86. package/index20.js +0 -6
  87. package/index21.js +0 -4
  88. package/index22.js +0 -5
  89. package/index23.js +0 -5
  90. package/index24.js +0 -5
  91. package/index25.js +0 -6
  92. package/index26.js +0 -6
  93. package/index27.js +0 -6
  94. package/index28.js +0 -4
  95. package/index29.js +0 -6
  96. package/index3.js +0 -6
  97. package/index30.js +0 -21
  98. package/index31.js +0 -22
  99. package/index32.js +0 -14
  100. package/index33.js +0 -11
  101. package/index34.js +0 -31
  102. package/index35.js +0 -8
  103. package/index36.js +0 -9
  104. package/index37.js +0 -19
  105. package/index38.js +0 -9
  106. package/index39.js +0 -9
  107. package/index4.js +0 -4
  108. package/index40.js +0 -23
  109. package/index41.js +0 -63
  110. package/index42.js +0 -53
  111. package/index43.js +0 -18
  112. package/index44.js +0 -27
  113. package/index45.js +0 -18
  114. package/index46.js +0 -21
  115. package/index47.js +0 -49
  116. package/index48.js +0 -5
  117. package/index49.js +0 -25
  118. package/index5.js +0 -5
  119. package/index50.js +0 -18
  120. package/index51.js +0 -9
  121. package/index52.js +0 -25
  122. package/index53.js +0 -18
  123. package/index54.js +0 -11
  124. package/index55.js +0 -12
  125. package/index56.js +0 -15
  126. package/index57.js +0 -9
  127. package/index58.js +0 -9
  128. package/index59.js +0 -19
  129. package/index6.js +0 -4
  130. package/index60.js +0 -22
  131. package/index61.js +0 -61
  132. package/index62.js +0 -15
  133. package/index63.js +0 -11
  134. package/index64.js +0 -53
  135. package/index65.js +0 -85
  136. package/index66.js +0 -74
  137. package/index67.js +0 -24
  138. package/index68.js +0 -69
  139. package/index69.js +0 -80
  140. package/index7.js +0 -9
  141. package/index70.js +0 -140
  142. package/index71.js +0 -70
  143. package/index72.js +0 -42
  144. package/index73.js +0 -82
  145. package/index74.js +0 -71
  146. package/index75.js +0 -104
  147. package/index76.js +0 -275
  148. package/index77.js +0 -723
  149. package/index78.js +0 -489
  150. package/index79.js +0 -314
  151. package/index8.js +0 -4
  152. package/index80.js +0 -389
  153. package/index81.js +0 -252
  154. package/index82.js +0 -1364
  155. package/index83.js +0 -1009
  156. package/index84.js +0 -386
  157. package/index85.js +0 -2101
  158. package/index86.js +0 -2368
  159. package/index87.js +0 -6831
  160. package/index88.js +0 -17
  161. package/index89.js +0 -14
  162. package/index9.js +0 -5
  163. package/index90.js +0 -6
  164. package/index91.js +0 -9
  165. package/intlStrings-Cd44R5hT.js +0 -278
  166. package/react.esm-sMU8Z7rL.js +0 -11060
  167. package/triangle-alert-1OYl9KWz.js +0 -56
  168. package/useControlledState-Kv9K2AYu.js +0 -30
  169. package/useDescription-B7stiK3j.js +0 -32
  170. package/useEvent-Xk5kn5Ns.js +0 -21
  171. package/useField-DMzJIIN4.js +0 -67
  172. package/useFilter-Bt9dbV1U.js +0 -35
  173. package/useFocusRing-9PXyKy2A.js +0 -1297
  174. package/useFocusable-CcEBZe40.js +0 -59
  175. package/useGridSelectionCheckbox-DYgEnElE.js +0 -22
  176. package/useHasTabbableChild-D6DwR81L.js +0 -34
  177. package/useHighlightSelectionDescription-WYAbP4No.js +0 -552
  178. package/useLabels-9zaZ9oa0.js +0 -17
  179. package/useListState-BfTeKTk5.js +0 -119
  180. package/useLocalizedStringFormatter-BlCbn-hX.js +0 -96
  181. package/useSingleSelectListState-DPkaL0la.js +0 -34
  182. package/useUpdateEffect-Dtz-i14F.js +0 -12
  183. package/x-JK7i-TQC.js +0 -14
@@ -1,510 +0,0 @@
1
- import { a as P } from "./Hidden-CVlUgUJM.js";
2
- import { createPortal as _ } from "react-dom";
3
- import u, { useMemo as S, cloneElement as z, forwardRef as $, useContext as y, createContext as p, useRef as A, useCallback as m, useState as I } from "react";
4
- import { g as w, l as T } from "./useFocusRing-9PXyKy2A.js";
5
- import { s as V } from "./index-B-jHjTDC.js";
6
- class x {
7
- get childNodes() {
8
- throw new Error("childNodes is not supported");
9
- }
10
- clone() {
11
- let e = new x(this.type, this.key);
12
- return e.value = this.value, e.level = this.level, e.hasChildNodes = this.hasChildNodes, e.rendered = this.rendered, e.textValue = this.textValue, e["aria-label"] = this["aria-label"], e.index = this.index, e.parentKey = this.parentKey, e.prevKey = this.prevKey, e.nextKey = this.nextKey, e.firstChildKey = this.firstChildKey, e.lastChildKey = this.lastChildKey, e.props = this.props, e.render = this.render, e;
13
- }
14
- constructor(e, t) {
15
- this.value = null, this.level = 0, this.hasChildNodes = !1, this.rendered = null, this.textValue = "", this["aria-label"] = void 0, this.index = 0, this.parentKey = null, this.prevKey = null, this.nextKey = null, this.firstChildKey = null, this.lastChildKey = null, this.props = {}, this.type = e, this.key = t;
16
- }
17
- }
18
- class b {
19
- get size() {
20
- return this.keyMap.size;
21
- }
22
- getKeys() {
23
- return this.keyMap.keys();
24
- }
25
- *[Symbol.iterator]() {
26
- let e = this.firstKey != null ? this.keyMap.get(this.firstKey) : void 0;
27
- for (; e; )
28
- yield e, e = e.nextKey != null ? this.keyMap.get(e.nextKey) : void 0;
29
- }
30
- getChildren(e) {
31
- let t = this.keyMap;
32
- return {
33
- *[Symbol.iterator]() {
34
- let n = t.get(e), l = (n == null ? void 0 : n.firstChildKey) != null ? t.get(n.firstChildKey) : null;
35
- for (; l; )
36
- yield l, l = l.nextKey != null ? t.get(l.nextKey) : void 0;
37
- }
38
- };
39
- }
40
- getKeyBefore(e) {
41
- let t = this.keyMap.get(e);
42
- if (!t) return null;
43
- if (t.prevKey != null) {
44
- for (t = this.keyMap.get(t.prevKey); t && t.type !== "item" && t.lastChildKey != null; ) t = this.keyMap.get(t.lastChildKey);
45
- var n;
46
- return (n = t == null ? void 0 : t.key) !== null && n !== void 0 ? n : null;
47
- }
48
- return t.parentKey;
49
- }
50
- getKeyAfter(e) {
51
- let t = this.keyMap.get(e);
52
- if (!t) return null;
53
- if (t.type !== "item" && t.firstChildKey != null) return t.firstChildKey;
54
- for (; t; ) {
55
- if (t.nextKey != null) return t.nextKey;
56
- if (t.parentKey != null) t = this.keyMap.get(t.parentKey);
57
- else return null;
58
- }
59
- return null;
60
- }
61
- getFirstKey() {
62
- return this.firstKey;
63
- }
64
- getLastKey() {
65
- let e = this.lastKey != null ? this.keyMap.get(this.lastKey) : null;
66
- for (; (e == null ? void 0 : e.lastChildKey) != null; ) e = this.keyMap.get(e.lastChildKey);
67
- var t;
68
- return (t = e == null ? void 0 : e.key) !== null && t !== void 0 ? t : null;
69
- }
70
- getItem(e) {
71
- var t;
72
- return (t = this.keyMap.get(e)) !== null && t !== void 0 ? t : null;
73
- }
74
- at() {
75
- throw new Error("Not implemented");
76
- }
77
- clone() {
78
- let e = this.constructor, t = new e();
79
- return t.keyMap = new Map(this.keyMap), t.firstKey = this.firstKey, t.lastKey = this.lastKey, t;
80
- }
81
- addNode(e) {
82
- if (this.frozen) throw new Error("Cannot add a node to a frozen collection");
83
- this.keyMap.set(e.key, e);
84
- }
85
- removeNode(e) {
86
- if (this.frozen) throw new Error("Cannot remove a node to a frozen collection");
87
- this.keyMap.delete(e);
88
- }
89
- commit(e, t, n = !1) {
90
- if (this.frozen) throw new Error("Cannot commit a frozen collection");
91
- this.firstKey = e, this.lastKey = t, this.frozen = !n;
92
- }
93
- // TODO: this is pretty specific to menu, will need to check if it is generic enough
94
- // Will need to handle varying levels I assume but will revisit after I get searchable menu working for base menu
95
- // TODO: an alternative is to simply walk the collection and add all item nodes that match the filter and any sections/separators we encounter
96
- // to an array, then walk that new array and fix all the next/Prev keys while adding them to the new collection
97
- filter(e) {
98
- let t = new b(), n = null;
99
- for (let l of this)
100
- if (l.type === "section" && l.hasChildNodes) {
101
- let i = l.clone(), s = null;
102
- for (let d of this.getChildren(l.key)) if (e(d.textValue) || d.type === "header") {
103
- let o = d.clone();
104
- s == null && (i.firstChildKey = o.key), t.firstKey == null && (t.firstKey = i.key), s && s.parentKey === o.parentKey ? (s.nextKey = o.key, o.prevKey = s.key) : o.prevKey = null, o.nextKey = null, t.addNode(o), s = o;
105
- }
106
- s && (s.type !== "header" ? (i.lastChildKey = s.key, n == null ? i.prevKey = null : (n.type === "section" || n.type === "separator") && (n.nextKey = i.key, i.prevKey = n.key), i.nextKey = null, n = i, t.addNode(i)) : (t.firstKey === i.key && (t.firstKey = null), t.removeNode(s.key)));
107
- } else if (l.type === "separator") {
108
- let i = l.clone();
109
- i.nextKey = null, (n == null ? void 0 : n.type) === "section" && (n.nextKey = i.key, i.prevKey = n.key, n = i, t.addNode(i));
110
- } else if (e(l.textValue)) {
111
- let i = l.clone();
112
- t.firstKey == null && (t.firstKey = i.key), n != null && n.type !== "section" && n.type !== "separator" && n.parentKey === i.parentKey ? (n.nextKey = i.key, i.prevKey = n.key) : i.prevKey = null, i.nextKey = null, t.addNode(i), n = i;
113
- }
114
- if ((n == null ? void 0 : n.type) === "separator" && n.nextKey === null) {
115
- let l;
116
- n.prevKey != null && (l = t.getItem(n.prevKey), l.nextKey = null), t.removeNode(n.key), n = l;
117
- }
118
- return t.lastKey = (n == null ? void 0 : n.key) || null, t;
119
- }
120
- constructor() {
121
- this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.frozen = !1;
122
- }
123
- }
124
- class N {
125
- *[Symbol.iterator]() {
126
- let e = this.firstChild;
127
- for (; e; )
128
- yield e, e = e.nextSibling;
129
- }
130
- get firstChild() {
131
- return this._firstChild;
132
- }
133
- set firstChild(e) {
134
- this._firstChild = e, this.ownerDocument.markDirty(this);
135
- }
136
- get lastChild() {
137
- return this._lastChild;
138
- }
139
- set lastChild(e) {
140
- this._lastChild = e, this.ownerDocument.markDirty(this);
141
- }
142
- get previousSibling() {
143
- return this._previousSibling;
144
- }
145
- set previousSibling(e) {
146
- this._previousSibling = e, this.ownerDocument.markDirty(this);
147
- }
148
- get nextSibling() {
149
- return this._nextSibling;
150
- }
151
- set nextSibling(e) {
152
- this._nextSibling = e, this.ownerDocument.markDirty(this);
153
- }
154
- get parentNode() {
155
- return this._parentNode;
156
- }
157
- set parentNode(e) {
158
- this._parentNode = e, this.ownerDocument.markDirty(this);
159
- }
160
- get isConnected() {
161
- var e;
162
- return ((e = this.parentNode) === null || e === void 0 ? void 0 : e.isConnected) || !1;
163
- }
164
- appendChild(e) {
165
- this.ownerDocument.startTransaction(), e.parentNode && e.parentNode.removeChild(e), this.firstChild == null && (this.firstChild = e), this.lastChild ? (this.lastChild.nextSibling = e, e.index = this.lastChild.index + 1, e.previousSibling = this.lastChild) : (e.previousSibling = null, e.index = 0), e.parentNode = this, e.nextSibling = null, this.lastChild = e, this.ownerDocument.markDirty(this), e.hasSetProps && this.ownerDocument.addNode(e), this.ownerDocument.endTransaction(), this.ownerDocument.queueUpdate();
166
- }
167
- insertBefore(e, t) {
168
- if (t == null) return this.appendChild(e);
169
- this.ownerDocument.startTransaction(), e.parentNode && e.parentNode.removeChild(e), e.nextSibling = t, e.previousSibling = t.previousSibling, e.index = t.index, this.firstChild === t ? this.firstChild = e : t.previousSibling && (t.previousSibling.nextSibling = e), t.previousSibling = e, e.parentNode = t.parentNode;
170
- let n = t;
171
- for (; n; )
172
- n.index++, n = n.nextSibling;
173
- e.hasSetProps && this.ownerDocument.addNode(e), this.ownerDocument.endTransaction(), this.ownerDocument.queueUpdate();
174
- }
175
- removeChild(e) {
176
- if (e.parentNode !== this || !this.ownerDocument.isMounted) return;
177
- this.ownerDocument.startTransaction();
178
- let t = e.nextSibling;
179
- for (; t; )
180
- t.index--, t = t.nextSibling;
181
- e.nextSibling && (e.nextSibling.previousSibling = e.previousSibling), e.previousSibling && (e.previousSibling.nextSibling = e.nextSibling), this.firstChild === e && (this.firstChild = e.nextSibling), this.lastChild === e && (this.lastChild = e.previousSibling), e.parentNode = null, e.nextSibling = null, e.previousSibling = null, e.index = 0, this.ownerDocument.removeNode(e), this.ownerDocument.endTransaction(), this.ownerDocument.queueUpdate();
182
- }
183
- addEventListener() {
184
- }
185
- removeEventListener() {
186
- }
187
- constructor(e) {
188
- this._firstChild = null, this._lastChild = null, this._previousSibling = null, this._nextSibling = null, this._parentNode = null, this.ownerDocument = e;
189
- }
190
- }
191
- class C extends N {
192
- get index() {
193
- return this._index;
194
- }
195
- set index(e) {
196
- this._index = e, this.ownerDocument.markDirty(this);
197
- }
198
- get level() {
199
- return this.parentNode instanceof C ? this.parentNode.level + (this.node.type === "item" ? 1 : 0) : 0;
200
- }
201
- updateNode() {
202
- var e, t, n, l;
203
- let i = this.ownerDocument.getMutableNode(this);
204
- i.index = this.index, i.level = this.level, i.parentKey = this.parentNode instanceof C ? this.parentNode.node.key : null;
205
- var s;
206
- i.prevKey = (s = (e = this.previousSibling) === null || e === void 0 ? void 0 : e.node.key) !== null && s !== void 0 ? s : null;
207
- var d;
208
- i.nextKey = (d = (t = this.nextSibling) === null || t === void 0 ? void 0 : t.node.key) !== null && d !== void 0 ? d : null, i.hasChildNodes = !!this.firstChild;
209
- var o;
210
- i.firstChildKey = (o = (n = this.firstChild) === null || n === void 0 ? void 0 : n.node.key) !== null && o !== void 0 ? o : null;
211
- var a;
212
- i.lastChildKey = (a = (l = this.lastChild) === null || l === void 0 ? void 0 : l.node.key) !== null && a !== void 0 ? a : null;
213
- }
214
- setProps(e, t, n, l) {
215
- let i = this.ownerDocument.getMutableNode(this), { value: s, textValue: d, id: o, ...a } = e;
216
- if (a.ref = t, i.props = a, i.rendered = n, i.render = l, i.value = s, i.textValue = d || (typeof a.children == "string" ? a.children : "") || e["aria-label"] || "", o != null && o !== i.key) {
217
- if (this.hasSetProps) throw new Error("Cannot change the id of an item");
218
- i.key = o;
219
- }
220
- this.hasSetProps || (this.ownerDocument.addNode(this), this.ownerDocument.endTransaction(), this.hasSetProps = !0), this.ownerDocument.queueUpdate();
221
- }
222
- get style() {
223
- return {};
224
- }
225
- hasAttribute() {
226
- }
227
- setAttribute() {
228
- }
229
- setAttributeNS() {
230
- }
231
- removeAttribute() {
232
- }
233
- constructor(e, t) {
234
- super(t), this.nodeType = 8, this._index = 0, this.hasSetProps = !1, this.node = new x(e, `react-aria-${++t.nodeId}`), this.ownerDocument.startTransaction();
235
- }
236
- }
237
- class B extends N {
238
- get isConnected() {
239
- return this.isMounted;
240
- }
241
- createElement(e) {
242
- return new C(e, this);
243
- }
244
- /**
245
- * Lazily gets a mutable instance of a Node. If the node has already
246
- * been cloned during this update cycle, it just returns the existing one.
247
- */
248
- getMutableNode(e) {
249
- let t = e.node;
250
- return this.mutatedNodes.has(e) || (t = e.node.clone(), this.mutatedNodes.add(e), e.node = t), this.markDirty(e), t;
251
- }
252
- getMutableCollection() {
253
- return !this.isSSR && !this.collectionMutated && (this.collection = this.collection.clone(), this.collectionMutated = !0), this.collection;
254
- }
255
- markDirty(e) {
256
- this.dirtyNodes.add(e);
257
- }
258
- startTransaction() {
259
- this.transactionCount++;
260
- }
261
- endTransaction() {
262
- this.transactionCount--;
263
- }
264
- addNode(e) {
265
- let t = this.getMutableCollection();
266
- if (!t.getItem(e.node.key)) {
267
- t.addNode(e.node);
268
- for (let n of e) this.addNode(n);
269
- }
270
- this.markDirty(e);
271
- }
272
- removeNode(e) {
273
- for (let n of e) this.removeNode(n);
274
- this.getMutableCollection().removeNode(e.node.key), this.markDirty(e);
275
- }
276
- /** Finalizes the collection update, updating all nodes and freezing the collection. */
277
- getCollection() {
278
- return this.transactionCount > 0 ? this.collection : (this.updateCollection(), this.collection);
279
- }
280
- updateCollection() {
281
- for (let i of this.dirtyNodes) i instanceof C && i.isConnected && i.updateNode();
282
- if (this.dirtyNodes.clear(), this.mutatedNodes.size || this.collectionMutated) {
283
- var e, t;
284
- let i = this.getMutableCollection();
285
- for (let s of this.mutatedNodes) s.isConnected && i.addNode(s.node);
286
- var n, l;
287
- i.commit((n = (e = this.firstChild) === null || e === void 0 ? void 0 : e.node.key) !== null && n !== void 0 ? n : null, (l = (t = this.lastChild) === null || t === void 0 ? void 0 : t.node.key) !== null && l !== void 0 ? l : null, this.isSSR), this.mutatedNodes.clear();
288
- }
289
- this.collectionMutated = !1;
290
- }
291
- queueUpdate() {
292
- if (!(this.dirtyNodes.size === 0 || this.transactionCount > 0))
293
- for (let e of this.subscriptions) e();
294
- }
295
- subscribe(e) {
296
- return this.subscriptions.add(e), () => this.subscriptions.delete(e);
297
- }
298
- resetAfterSSR() {
299
- this.isSSR && (this.isSSR = !1, this.firstChild = null, this.lastChild = null, this.nodeId = 0);
300
- }
301
- constructor(e) {
302
- super(null), this.nodeType = 11, this.ownerDocument = this, this.dirtyNodes = /* @__PURE__ */ new Set(), this.isSSR = !1, this.nodeId = 0, this.nodesByProps = /* @__PURE__ */ new WeakMap(), this.isMounted = !0, this.mutatedNodes = /* @__PURE__ */ new Set(), this.subscriptions = /* @__PURE__ */ new Set(), this.transactionCount = 0, this.collection = e, this.collectionMutated = !0;
303
- }
304
- }
305
- function D(r) {
306
- let { children: e, items: t, idScope: n, addIdAndValue: l, dependencies: i = [] } = r, s = S(() => /* @__PURE__ */ new WeakMap(), i);
307
- return S(() => {
308
- if (t && typeof e == "function") {
309
- let a = [];
310
- for (let c of t) {
311
- let h = s.get(c);
312
- if (!h) {
313
- h = e(c);
314
- var d, o;
315
- let f = (o = (d = h.props.id) !== null && d !== void 0 ? d : c.key) !== null && o !== void 0 ? o : c.id;
316
- if (f == null) throw new Error("Could not determine key for item");
317
- n && (f = n + ":" + f), h = z(h, l ? {
318
- key: f,
319
- id: f,
320
- value: c
321
- } : {
322
- key: f
323
- }), s.set(c, h);
324
- }
325
- a.push(h);
326
- }
327
- return a;
328
- } else if (typeof e != "function") return e;
329
- }, [
330
- e,
331
- t,
332
- s,
333
- n,
334
- l
335
- ]);
336
- }
337
- const M = /* @__PURE__ */ p(!1), g = /* @__PURE__ */ p(null);
338
- function X(r) {
339
- if (y(g))
340
- return r.content;
341
- let { collection: t, document: n } = L(r.createCollection);
342
- return /* @__PURE__ */ u.createElement(u.Fragment, null, /* @__PURE__ */ u.createElement(P, null, /* @__PURE__ */ u.createElement(g.Provider, {
343
- value: n
344
- }, r.content)), /* @__PURE__ */ u.createElement(q, {
345
- render: r.children,
346
- collection: t
347
- }));
348
- }
349
- function q({ collection: r, render: e }) {
350
- return e(r);
351
- }
352
- function U(r, e, t) {
353
- let n = w(), l = A(n);
354
- l.current = n;
355
- let i = m(() => l.current ? t() : e(), [
356
- e,
357
- t
358
- ]);
359
- return V.useSyncExternalStore(r, i);
360
- }
361
- const F = typeof u.useSyncExternalStore == "function" ? u.useSyncExternalStore : U;
362
- function L(r) {
363
- let [e] = I(() => new B((r == null ? void 0 : r()) || new b())), t = m((s) => e.subscribe(s), [
364
- e
365
- ]), n = m(() => {
366
- let s = e.getCollection();
367
- return e.isSSR && e.resetAfterSSR(), s;
368
- }, [
369
- e
370
- ]), l = m(() => (e.isSSR = !0, e.getCollection()), [
371
- e
372
- ]), i = F(t, n, l);
373
- return T(() => (e.isMounted = !0, () => {
374
- e.isMounted = !1;
375
- }), [
376
- e
377
- ]), {
378
- collection: i,
379
- document: e
380
- };
381
- }
382
- const v = /* @__PURE__ */ p(null);
383
- function E(r, e, t, n, l, i) {
384
- let s = m((o) => {
385
- o == null || o.setProps(e, t, n, i);
386
- }, [
387
- e,
388
- t,
389
- n,
390
- i
391
- ]), d = y(v);
392
- if (d) {
393
- let o = d.ownerDocument.nodesByProps.get(e);
394
- return o || (o = d.ownerDocument.createElement(r), o.setProps(e, t, n, i), d.appendChild(o), d.ownerDocument.updateCollection(), d.ownerDocument.nodesByProps.set(e, o)), l ? /* @__PURE__ */ u.createElement(v.Provider, {
395
- value: o
396
- }, l) : null;
397
- }
398
- return /* @__PURE__ */ u.createElement(r, {
399
- ref: s
400
- }, l);
401
- }
402
- function Y(r, e) {
403
- let t = ({ node: l }) => e(l.props, l.props.ref, l), n = $((l, i) => {
404
- if (!y(M)) {
405
- if (e.length >= 3) throw new Error(e.name + " cannot be rendered outside a collection.");
406
- return e(l, i);
407
- }
408
- return E(r, l, i, "children" in l ? l.children : null, null, (d) => /* @__PURE__ */ u.createElement(t, {
409
- node: d
410
- }));
411
- });
412
- return n.displayName = e.name, n;
413
- }
414
- function Z(r, e, t = R) {
415
- let n = ({ node: i }) => e(i.props, i.props.ref, i), l = $((i, s) => {
416
- let d = t(i);
417
- var o;
418
- return (o = E(r, i, s, null, d, (a) => /* @__PURE__ */ u.createElement(n, {
419
- node: a
420
- }))) !== null && o !== void 0 ? o : /* @__PURE__ */ u.createElement(u.Fragment, null);
421
- });
422
- return l.displayName = e.name, l;
423
- }
424
- function R(r) {
425
- return D({
426
- ...r,
427
- addIdAndValue: !0
428
- });
429
- }
430
- const K = /* @__PURE__ */ p(null);
431
- function ee(r) {
432
- let e = y(K), t = ((e == null ? void 0 : e.dependencies) || []).concat(r.dependencies), n = r.idScope || (e == null ? void 0 : e.idScope), l = R({
433
- ...r,
434
- idScope: n,
435
- dependencies: t
436
- });
437
- return y(g) && (l = /* @__PURE__ */ u.createElement(W, null, l)), e = S(() => ({
438
- dependencies: t,
439
- idScope: n
440
- }), [
441
- n,
442
- ...t
443
- ]), /* @__PURE__ */ u.createElement(K.Provider, {
444
- value: e
445
- }, l);
446
- }
447
- function W({ children: r }) {
448
- let e = y(g), t = S(() => /* @__PURE__ */ u.createElement(g.Provider, {
449
- value: null
450
- }, /* @__PURE__ */ u.createElement(M.Provider, {
451
- value: !0
452
- }, r)), [
453
- r
454
- ]);
455
- return w() ? /* @__PURE__ */ u.createElement(v.Provider, {
456
- value: e
457
- }, t) : /* @__PURE__ */ _(t, e);
458
- }
459
- const te = /* @__PURE__ */ p(null), j = {
460
- CollectionRoot({ collection: r, renderDropIndicator: e }) {
461
- return k(r, null, e);
462
- },
463
- CollectionBranch({ collection: r, parent: e, renderDropIndicator: t }) {
464
- return k(r, e, t);
465
- }
466
- };
467
- function k(r, e, t) {
468
- return D({
469
- items: e ? r.getChildren(e.key) : r,
470
- dependencies: [
471
- t
472
- ],
473
- children(n) {
474
- var l;
475
- let i = n.render(n);
476
- if (!t || n.type !== "item") return i;
477
- let s = n.key, d = r.getKeyAfter(s);
478
- return /* @__PURE__ */ u.createElement(u.Fragment, null, t({
479
- type: "item",
480
- key: s,
481
- dropPosition: "before"
482
- }), i, (d == null || ((l = r.getItem(d)) === null || l === void 0 ? void 0 : l.type) !== "item") && t({
483
- type: "item",
484
- key: s,
485
- dropPosition: "after"
486
- }));
487
- }
488
- });
489
- }
490
- const ne = /* @__PURE__ */ p(j);
491
- function ie(r) {
492
- return S(() => r != null ? /* @__PURE__ */ new Set([
493
- r
494
- ]) : null, [
495
- r
496
- ]);
497
- }
498
- export {
499
- X as $,
500
- ee as a,
501
- ne as b,
502
- Y as c,
503
- j as d,
504
- te as e,
505
- ie as f,
506
- Z as g,
507
- D as h,
508
- b as i,
509
- x as j
510
- };
package/ComboBox.css DELETED
@@ -1 +0,0 @@
1
- ._input_1ek0k_4{width:-webkit-fill-available;padding-left:1rem;border:none;border-radius:0;font-size:1rem;color:#000;height:3rem;background-color:#f2f2f2;box-shadow:0 1px #000}._input_1ek0k_4:hover{background-color:#e6e6e6}._input_1ek0k_4[data-focus-visible],._input_1ek0k_4:focus-visible{border:none;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #000}._input_1ek0k_4[data-disabled]{background:#f2f2f2;box-shadow:none;border-bottom:.063rem solid #bfbfbf}._combobox_1ek0k_33{font-family:Inter,sans-serif;display:flex;flex-direction:column;width:100%}._combobox_1ek0k_33[data-disabled]{color:#bfbfbf}._combobox_1ek0k_33[data-invalid] ._input_1ek0k_4{border:.125rem solid #b31b1b;box-shadow:none}._text_1ek0k_49{font-size:.875rem;margin-bottom:.5rem}._wrap_1ek0k_54{grid-area:Input;position:relative}._button_1ek0k_59{display:flex;align-items:center;border:none;padding:1rem;color:#000;background-color:transparent;position:absolute;top:0;right:0;height:100%;transition:transform .3s ease}._button_1ek0k_59[aria-expanded=true]{transform:rotate(180deg)}._icon_1ek0k_77{display:flex;align-items:center;transition:transform .3s ease}._popover_1ek0k_83{font-family:Inter,sans-serif;border:.063rem solid #000000;width:calc(var(--trigger-width) - .125rem);background:#fff;overflow-y:auto}._fieldError_1ek0k_91{margin-top:.625rem;display:flex;gap:.625rem;font-size:.875rem}._fieldError_1ek0k_91 svg{color:#b31b1b}._listBoxItem_1ek0k_102{margin:auto;padding:1rem;background-color:#fff;outline:none;cursor:default;color:#000;position:relative}._listBoxItem_1ek0k_102[data-selected=true]{background:#bfbfbf}._listBoxItem_1ek0k_102[data-focused=true]{background:#e6e6e6}
package/DatePicker.css DELETED
@@ -1 +0,0 @@
1
- ._datePicker_10zzh_4{font-family:Inter,sans-serif;display:flex;flex-direction:column;align-items:flex-start}._datePickerTextfield_10zzh_11{display:flex;justify-content:flex-start;align-items:center;gap:1rem}._datePickerTextfield_10zzh_11:focus-visible,._datePickerTextfield_10zzh_11[data-focus-visible]{outline:none}._datePickerTextfield_10zzh_11 button{border:none;margin-left:auto;height:100%;padding-right:1rem;padding-left:1rem;color:#000;background-color:#f2f2f2}._datePickerTextfield_10zzh_11 button:hover{background-color:#e6e6e6}._datePickerTextfield_10zzh_11 button:focus-visible,._datePickerTextfield_10zzh_11 button[data-focus-visible]{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #000}._date_10zzh_4{display:flex}._date_10zzh_4 div[aria-valuetext=Tomt]{color:#b3b3b3;text-transform:uppercase}._date_10zzh_4 div[data-readonly=true]{color:#b3b3b3;padding:0 2px}._date_10zzh_4 div:focus-visible,._date_10zzh_4 div[data-focus-visible]{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #000}._dialog_10zzh_63{background-color:#f2f2f2;font-family:Inter,sans-serif}._dialogHeader_10zzh_68{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:1rem}._dialogHeader_10zzh_68 button{border:none;color:#000;background-color:#f2f2f2}._dialogHeader_10zzh_68 button:focus-visible,._dialogHeader_10zzh_68 button[data-focus-visible]{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #000}._dialogHeading_10zzh_88{font-size:1rem;margin:0}._day_10zzh_93{border:solid 2px #f2f2f2}._day_10zzh_93:hover{background-color:#e6e6e6;border-color:#e6e6e6}._day_10zzh_93[data-selected=true]{background-color:#d5e5ed;border-color:#d5e5ed}._day_10zzh_93[data-selection-start=true]{color:#fff;background-color:#143c50;border-color:#143c50}._day_10zzh_93[data-selection-end=true]{color:inherit;background-color:#f2f2f2;border-color:#143c50}._day_10zzh_93[aria-label^=Idag]{text-decoration:underline;text-underline-offset:3px;font-weight:600}._day_10zzh_93[data-outside-month=true]{display:none}._calendar_10zzh_129 *{background:unset;background-color:unset;color:unset;padding:unset}._calendar_10zzh_129 thead tr,._calendar_10zzh_129 tbody tr{background-color:unset}._calendar_10zzh_129 th{font-weight:500}._calendar_10zzh_129 ._day_10zzh_93,._calendar_10zzh_129 th{text-align:center;padding:.75rem}._calendar_10zzh_129 div:focus-visible,._calendar_10zzh_129 div[data-focus-visible]{outline:2px solid #000000}