@midas-ds/components 1.0.2
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.
- package/Breadcrumbs.css +1 -0
- package/Button-CCevm2s3.js +183 -0
- package/Button.css +1 -0
- package/ButtonGroup.css +1 -0
- package/CHANGELOG.md +76 -0
- package/Card.css +1 -0
- package/Checkbox-CllWDBxF.js +405 -0
- package/Checkbox.css +1 -0
- package/Collection-B3xUVWPF.js +483 -0
- package/ComboBox.css +1 -0
- package/DatePicker.css +1 -0
- package/Dialog-CLTyYwkS.js +1889 -0
- package/DragAndDrop-OTN7La7U.js +42 -0
- package/Dropdown.css +1 -0
- package/FileUpload.css +1 -0
- package/Flex.css +1 -0
- package/Flex.module-CpoxBzQX.js +37 -0
- package/FocusScope-BR0SJ-cZ.js +512 -0
- package/Form-DXLoQL91.js +240 -0
- package/Grid.css +1 -0
- package/Grid.module-Ia0e9Dix.js +36 -0
- package/Group-DPMuN3h8.js +44 -0
- package/Hidden-BQWDvze4.js +37 -0
- package/InfoBanner.css +1 -0
- package/Label-C18A_4Z5.js +69 -0
- package/Layout.css +1 -0
- package/Link-BU1h3K2a.js +77 -0
- package/Link.css +1 -0
- package/LinkButton.css +1 -0
- package/ListBox-D21tdwTs.js +463 -0
- package/ListKeyboardDelegate-DxMjfMsI.js +172 -0
- package/Logo.css +1 -0
- package/Modal.css +1 -0
- package/MultiSelect.css +1 -0
- package/PressResponder-DP8ZDNGy.js +31 -0
- package/README.md +7 -0
- package/RSPContexts-EOiWkKOf.js +11 -0
- package/Radio.css +1 -0
- package/SearchField.css +1 -0
- package/Select.css +1 -0
- package/SelectionManager-D4WtKtey.js +988 -0
- package/Separator-DLUHK9vv.js +48 -0
- package/Spinner.css +1 -0
- package/Table.css +1 -0
- package/Tabs.css +1 -0
- package/Tag-CEd6WWSc.js +725 -0
- package/Tag.css +1 -0
- package/Text-DGLaY3HR.js +17 -0
- package/TextArea.css +1 -0
- package/TextField-C_hq9WeT.js +226 -0
- package/TextField.css +1 -0
- package/TextField.module-Cwq1FAm7.js +141 -0
- package/Toast.css +1 -0
- package/VisuallyHidden-B_XzVvlX.js +39 -0
- package/accordion/Accordion.d.ts +13 -0
- package/accordion/AccordionContent.d.ts +3 -0
- package/accordion/AccordionItem.d.ts +3 -0
- package/accordion/AccordionTagContext.d.ts +3 -0
- package/accordion/AccordionTrigger.d.ts +3 -0
- package/accordion/index.d.ts +5 -0
- package/breadcrumbs/Breadcrumbs.d.ts +9 -0
- package/breadcrumbs/index.d.ts +1 -0
- package/button/Button.d.ts +41 -0
- package/button/ButtonGroup.d.ts +12 -0
- package/button/index.d.ts +2 -0
- package/card/Card.d.ts +34 -0
- package/card/index.d.ts +1 -0
- package/checkbox/Checkbox.d.ts +2 -0
- package/checkbox/CheckboxGroup.d.ts +10 -0
- package/checkbox/index.d.ts +2 -0
- package/chevron-down-Cd1bkzXT.js +13 -0
- package/chevron-right-DBMc9VMi.js +23 -0
- package/clsx-OuTLNxxd.js +16 -0
- package/combobox/ComboBox.d.ts +12 -0
- package/combobox/index.d.ts +1 -0
- package/context-ScOIq_Gu.js +80 -0
- package/createLucideIcon-DeWljiyi.js +79 -0
- package/date-picker/DatePicker.d.ts +14 -0
- package/date-picker/index.d.ts +2 -0
- package/dropdown/Dropdown.d.ts +8 -0
- package/dropdown/index.d.ts +1 -0
- package/file-upload/FileUpload.d.ts +11 -0
- package/file-upload/index.d.ts +1 -0
- package/flex/Flex.d.ts +17 -0
- package/flex/FlexItem.d.ts +15 -0
- package/flex/index.d.ts +2 -0
- package/grid/Grid.d.ts +16 -0
- package/grid/GridItem.d.ts +7 -0
- package/grid/index.d.ts +2 -0
- package/index-CEg5vZQH.js +132 -0
- package/index-CgfokhRq.js +674 -0
- package/index-CorR1LBD.js +3122 -0
- package/index-Dl1Q-tbj.js +26984 -0
- package/index.css +1 -0
- package/index.d.ts +29 -0
- package/index.js +114 -0
- package/index10.js +4 -0
- package/index11.js +5 -0
- package/index12.js +4 -0
- package/index13.js +4 -0
- package/index14.js +4 -0
- package/index15.js +6 -0
- package/index16.js +6 -0
- package/index17.js +6 -0
- package/index18.js +4 -0
- package/index19.js +6 -0
- package/index2.js +8 -0
- package/index20.js +6 -0
- package/index21.js +4 -0
- package/index22.js +5 -0
- package/index23.js +5 -0
- package/index24.js +5 -0
- package/index25.js +6 -0
- package/index26.js +6 -0
- package/index27.js +6 -0
- package/index28.js +4 -0
- package/index29.js +12 -0
- package/index3.js +8 -0
- package/index30.js +20 -0
- package/index31.js +22 -0
- package/index32.js +14 -0
- package/index33.js +11 -0
- package/index34.js +31 -0
- package/index35.js +8 -0
- package/index36.js +9 -0
- package/index37.js +19 -0
- package/index38.js +9 -0
- package/index39.js +9 -0
- package/index4.js +4 -0
- package/index40.js +16 -0
- package/index41.js +16 -0
- package/index42.js +31 -0
- package/index43.js +16 -0
- package/index44.js +6 -0
- package/index45.js +53 -0
- package/index46.js +18 -0
- package/index47.js +27 -0
- package/index48.js +18 -0
- package/index49.js +21 -0
- package/index5.js +5 -0
- package/index50.js +49 -0
- package/index51.js +5 -0
- package/index52.js +25 -0
- package/index53.js +18 -0
- package/index54.js +9 -0
- package/index55.js +25 -0
- package/index56.js +18 -0
- package/index57.js +11 -0
- package/index58.js +12 -0
- package/index59.js +15 -0
- package/index6.js +4 -0
- package/index60.js +9 -0
- package/index61.js +9 -0
- package/index62.js +19 -0
- package/index63.js +22 -0
- package/index64.js +61 -0
- package/index65.js +15 -0
- package/index66.js +11 -0
- package/index67.js +63 -0
- package/index68.js +85 -0
- package/index69.js +74 -0
- package/index7.js +9 -0
- package/index70.js +24 -0
- package/index71.js +69 -0
- package/index72.js +80 -0
- package/index73.js +140 -0
- package/index74.js +70 -0
- package/index75.js +42 -0
- package/index76.js +82 -0
- package/index77.js +71 -0
- package/index78.js +104 -0
- package/index79.js +274 -0
- package/index8.js +4 -0
- package/index80.js +724 -0
- package/index81.js +491 -0
- package/index82.js +317 -0
- package/index83.js +391 -0
- package/index84.js +254 -0
- package/index85.js +1364 -0
- package/index86.js +1009 -0
- package/index87.js +388 -0
- package/index88.js +2105 -0
- package/index89.js +2371 -0
- package/index9.js +5 -0
- package/index90.js +6834 -0
- package/index91.js +17 -0
- package/index92.js +14 -0
- package/index93.js +6 -0
- package/index94.js +9 -0
- package/info-banner/InfoBanner.d.ts +21 -0
- package/info-banner/index.d.ts +1 -0
- package/intlStrings-Cd44R5hT.js +278 -0
- package/layout/Layout.d.ts +51 -0
- package/layout/index.d.ts +1 -0
- package/link/Link.d.ts +13 -0
- package/link/index.d.ts +1 -0
- package/link-button/LinkButton.d.ts +18 -0
- package/link-button/index.d.ts +1 -0
- package/logo/Logo.d.ts +16 -0
- package/logo/index.d.ts +1 -0
- package/modal/Modal.d.ts +13 -0
- package/modal/index.d.ts +1 -0
- package/multi-select/MultiSelect.d.ts +28 -0
- package/multi-select/index.d.ts +1 -0
- package/package.json +29 -0
- package/radio/Radio.d.ts +20 -0
- package/radio/index.d.ts +1 -0
- package/react.esm-D8HpDGKP.js +11060 -0
- package/search-field/SearchField.d.ts +13 -0
- package/search-field/index.d.ts +1 -0
- package/select/Select.d.ts +11 -0
- package/select/index.d.ts +1 -0
- package/spinner/Spinner.d.ts +11 -0
- package/spinner/index.d.ts +1 -0
- package/table/Table.d.ts +12 -0
- package/table/index.d.ts +1 -0
- package/tabs/Tabs.d.ts +12 -0
- package/tabs/index.d.ts +1 -0
- package/tag/Tag.d.ts +11 -0
- package/tag/index.d.ts +1 -0
- package/textarea/TextArea.d.ts +20 -0
- package/textarea/index.d.ts +1 -0
- package/textfield/TextField.d.ts +16 -0
- package/textfield/index.d.ts +3 -0
- package/theme/index.d.ts +138 -0
- package/theme/tokens.d.ts +135 -0
- package/toast/Toast.d.ts +25 -0
- package/toast/index.d.ts +1 -0
- package/tokens-CjXmpXTi.js +160 -0
- package/triangle-alert-1OYl9KWz.js +56 -0
- package/useControlledState-S_TYcV_c.js +45 -0
- package/useDescription-D4_zk_sA.js +32 -0
- package/useFilter-BnJDBCkt.js +35 -0
- package/useFocusRing-D97-G3fT.js +1324 -0
- package/useFocusable-C-N9wcwm.js +56 -0
- package/useGridSelectionCheckbox-i1rsjlC-.js +22 -0
- package/useHasTabbableChild-DeuCnGGv.js +34 -0
- package/useHighlightSelectionDescription-JVx2MW_e.js +552 -0
- package/useListState-DSOTbsL3.js +119 -0
- package/useLocalizedStringFormatter-DVCAZqcL.js +96 -0
- package/useSingleSelectListState-CmX9_L5H.js +34 -0
- package/useUpdateEffect-Dtz-i14F.js +12 -0
- package/x-JK7i-TQC.js +14 -0
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
import { a as R } from "./Hidden-BQWDvze4.js";
|
|
2
|
+
import { createPortal as P } from "react-dom";
|
|
3
|
+
import u, { useMemo as m, cloneElement as _, forwardRef as k, useContext as p, createContext as y, useRef as z, useCallback as v, useState as A } from "react";
|
|
4
|
+
import { g as w, l as T } from "./useFocusRing-D97-G3fT.js";
|
|
5
|
+
import { s as I } from "./index-CEg5vZQH.js";
|
|
6
|
+
class b {
|
|
7
|
+
get childNodes() {
|
|
8
|
+
throw new Error("childNodes is not supported");
|
|
9
|
+
}
|
|
10
|
+
clone() {
|
|
11
|
+
let e = new b(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 V {
|
|
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 i = t.get(e), n = (i == null ? void 0 : i.firstChildKey) != null ? t.get(i.firstChildKey) : null;
|
|
35
|
+
for (; n; )
|
|
36
|
+
yield n, n = n.nextKey != null ? t.get(n.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 i;
|
|
46
|
+
return (i = t == null ? void 0 : t.key) !== null && i !== void 0 ? i : 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, i = !1) {
|
|
90
|
+
if (this.frozen) throw new Error("Cannot commit a frozen collection");
|
|
91
|
+
this.firstKey = e, this.lastKey = t, this.frozen = !i;
|
|
92
|
+
}
|
|
93
|
+
constructor() {
|
|
94
|
+
this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.frozen = !1;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
class K {
|
|
98
|
+
*[Symbol.iterator]() {
|
|
99
|
+
let e = this.firstChild;
|
|
100
|
+
for (; e; )
|
|
101
|
+
yield e, e = e.nextSibling;
|
|
102
|
+
}
|
|
103
|
+
get firstChild() {
|
|
104
|
+
return this._firstChild;
|
|
105
|
+
}
|
|
106
|
+
set firstChild(e) {
|
|
107
|
+
this._firstChild = e, this.ownerDocument.markDirty(this);
|
|
108
|
+
}
|
|
109
|
+
get lastChild() {
|
|
110
|
+
return this._lastChild;
|
|
111
|
+
}
|
|
112
|
+
set lastChild(e) {
|
|
113
|
+
this._lastChild = e, this.ownerDocument.markDirty(this);
|
|
114
|
+
}
|
|
115
|
+
get previousSibling() {
|
|
116
|
+
return this._previousSibling;
|
|
117
|
+
}
|
|
118
|
+
set previousSibling(e) {
|
|
119
|
+
this._previousSibling = e, this.ownerDocument.markDirty(this);
|
|
120
|
+
}
|
|
121
|
+
get nextSibling() {
|
|
122
|
+
return this._nextSibling;
|
|
123
|
+
}
|
|
124
|
+
set nextSibling(e) {
|
|
125
|
+
this._nextSibling = e, this.ownerDocument.markDirty(this);
|
|
126
|
+
}
|
|
127
|
+
get parentNode() {
|
|
128
|
+
return this._parentNode;
|
|
129
|
+
}
|
|
130
|
+
set parentNode(e) {
|
|
131
|
+
this._parentNode = e, this.ownerDocument.markDirty(this);
|
|
132
|
+
}
|
|
133
|
+
get isConnected() {
|
|
134
|
+
var e;
|
|
135
|
+
return ((e = this.parentNode) === null || e === void 0 ? void 0 : e.isConnected) || !1;
|
|
136
|
+
}
|
|
137
|
+
appendChild(e) {
|
|
138
|
+
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();
|
|
139
|
+
}
|
|
140
|
+
insertBefore(e, t) {
|
|
141
|
+
if (t == null) return this.appendChild(e);
|
|
142
|
+
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;
|
|
143
|
+
let i = t;
|
|
144
|
+
for (; i; )
|
|
145
|
+
i.index++, i = i.nextSibling;
|
|
146
|
+
e.hasSetProps && this.ownerDocument.addNode(e), this.ownerDocument.endTransaction(), this.ownerDocument.queueUpdate();
|
|
147
|
+
}
|
|
148
|
+
removeChild(e) {
|
|
149
|
+
if (e.parentNode !== this || !this.ownerDocument.isMounted) return;
|
|
150
|
+
this.ownerDocument.startTransaction();
|
|
151
|
+
let t = e.nextSibling;
|
|
152
|
+
for (; t; )
|
|
153
|
+
t.index--, t = t.nextSibling;
|
|
154
|
+
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();
|
|
155
|
+
}
|
|
156
|
+
addEventListener() {
|
|
157
|
+
}
|
|
158
|
+
removeEventListener() {
|
|
159
|
+
}
|
|
160
|
+
constructor(e) {
|
|
161
|
+
this._firstChild = null, this._lastChild = null, this._previousSibling = null, this._nextSibling = null, this._parentNode = null, this.ownerDocument = e;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
class S extends K {
|
|
165
|
+
get index() {
|
|
166
|
+
return this._index;
|
|
167
|
+
}
|
|
168
|
+
set index(e) {
|
|
169
|
+
this._index = e, this.ownerDocument.markDirty(this);
|
|
170
|
+
}
|
|
171
|
+
get level() {
|
|
172
|
+
return this.parentNode instanceof S ? this.parentNode.level + (this.node.type === "item" ? 1 : 0) : 0;
|
|
173
|
+
}
|
|
174
|
+
updateNode() {
|
|
175
|
+
var e, t, i, n;
|
|
176
|
+
let l = this.ownerDocument.getMutableNode(this);
|
|
177
|
+
l.index = this.index, l.level = this.level, l.parentKey = this.parentNode instanceof S ? this.parentNode.node.key : null;
|
|
178
|
+
var s;
|
|
179
|
+
l.prevKey = (s = (e = this.previousSibling) === null || e === void 0 ? void 0 : e.node.key) !== null && s !== void 0 ? s : null;
|
|
180
|
+
var a;
|
|
181
|
+
l.nextKey = (a = (t = this.nextSibling) === null || t === void 0 ? void 0 : t.node.key) !== null && a !== void 0 ? a : null, l.hasChildNodes = !!this.firstChild;
|
|
182
|
+
var r;
|
|
183
|
+
l.firstChildKey = (r = (i = this.firstChild) === null || i === void 0 ? void 0 : i.node.key) !== null && r !== void 0 ? r : null;
|
|
184
|
+
var d;
|
|
185
|
+
l.lastChildKey = (d = (n = this.lastChild) === null || n === void 0 ? void 0 : n.node.key) !== null && d !== void 0 ? d : null;
|
|
186
|
+
}
|
|
187
|
+
setProps(e, t, i, n) {
|
|
188
|
+
let l = this.ownerDocument.getMutableNode(this), { value: s, textValue: a, id: r, ...d } = e;
|
|
189
|
+
if (d.ref = t, l.props = d, l.rendered = i, l.render = n, l.value = s, l.textValue = a || (typeof d.children == "string" ? d.children : "") || e["aria-label"] || "", r != null && r !== l.key) {
|
|
190
|
+
if (this.hasSetProps) throw new Error("Cannot change the id of an item");
|
|
191
|
+
l.key = r;
|
|
192
|
+
}
|
|
193
|
+
this.hasSetProps || (this.ownerDocument.addNode(this), this.ownerDocument.endTransaction(), this.hasSetProps = !0), this.ownerDocument.queueUpdate();
|
|
194
|
+
}
|
|
195
|
+
get style() {
|
|
196
|
+
return {};
|
|
197
|
+
}
|
|
198
|
+
hasAttribute() {
|
|
199
|
+
}
|
|
200
|
+
setAttribute() {
|
|
201
|
+
}
|
|
202
|
+
setAttributeNS() {
|
|
203
|
+
}
|
|
204
|
+
removeAttribute() {
|
|
205
|
+
}
|
|
206
|
+
constructor(e, t) {
|
|
207
|
+
super(t), this.nodeType = 8, this._index = 0, this.hasSetProps = !1, this.node = new b(e, `react-aria-${++t.nodeId}`), this.ownerDocument.startTransaction();
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
class B extends K {
|
|
211
|
+
get isConnected() {
|
|
212
|
+
return this.isMounted;
|
|
213
|
+
}
|
|
214
|
+
createElement(e) {
|
|
215
|
+
return new S(e, this);
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Lazily gets a mutable instance of a Node. If the node has already
|
|
219
|
+
* been cloned during this update cycle, it just returns the existing one.
|
|
220
|
+
*/
|
|
221
|
+
getMutableNode(e) {
|
|
222
|
+
let t = e.node;
|
|
223
|
+
return this.mutatedNodes.has(e) || (t = e.node.clone(), this.mutatedNodes.add(e), e.node = t), this.markDirty(e), t;
|
|
224
|
+
}
|
|
225
|
+
getMutableCollection() {
|
|
226
|
+
return !this.isSSR && !this.collectionMutated && (this.collection = this.collection.clone(), this.collectionMutated = !0), this.collection;
|
|
227
|
+
}
|
|
228
|
+
markDirty(e) {
|
|
229
|
+
this.dirtyNodes.add(e);
|
|
230
|
+
}
|
|
231
|
+
startTransaction() {
|
|
232
|
+
this.transactionCount++;
|
|
233
|
+
}
|
|
234
|
+
endTransaction() {
|
|
235
|
+
this.transactionCount--;
|
|
236
|
+
}
|
|
237
|
+
addNode(e) {
|
|
238
|
+
let t = this.getMutableCollection();
|
|
239
|
+
if (!t.getItem(e.node.key)) {
|
|
240
|
+
t.addNode(e.node);
|
|
241
|
+
for (let i of e) this.addNode(i);
|
|
242
|
+
}
|
|
243
|
+
this.markDirty(e);
|
|
244
|
+
}
|
|
245
|
+
removeNode(e) {
|
|
246
|
+
for (let i of e) this.removeNode(i);
|
|
247
|
+
this.getMutableCollection().removeNode(e.node.key), this.markDirty(e);
|
|
248
|
+
}
|
|
249
|
+
/** Finalizes the collection update, updating all nodes and freezing the collection. */
|
|
250
|
+
getCollection() {
|
|
251
|
+
return this.transactionCount > 0 ? this.collection : (this.updateCollection(), this.collection);
|
|
252
|
+
}
|
|
253
|
+
updateCollection() {
|
|
254
|
+
for (let l of this.dirtyNodes) l instanceof S && l.isConnected && l.updateNode();
|
|
255
|
+
if (this.dirtyNodes.clear(), this.mutatedNodes.size || this.collectionMutated) {
|
|
256
|
+
var e, t;
|
|
257
|
+
let l = this.getMutableCollection();
|
|
258
|
+
for (let s of this.mutatedNodes) s.isConnected && l.addNode(s.node);
|
|
259
|
+
var i, n;
|
|
260
|
+
l.commit((i = (e = this.firstChild) === null || e === void 0 ? void 0 : e.node.key) !== null && i !== void 0 ? i : null, (n = (t = this.lastChild) === null || t === void 0 ? void 0 : t.node.key) !== null && n !== void 0 ? n : null, this.isSSR), this.mutatedNodes.clear();
|
|
261
|
+
}
|
|
262
|
+
this.collectionMutated = !1;
|
|
263
|
+
}
|
|
264
|
+
queueUpdate() {
|
|
265
|
+
if (!(this.dirtyNodes.size === 0 || this.transactionCount > 0))
|
|
266
|
+
for (let e of this.subscriptions) e();
|
|
267
|
+
}
|
|
268
|
+
subscribe(e) {
|
|
269
|
+
return this.subscriptions.add(e), () => this.subscriptions.delete(e);
|
|
270
|
+
}
|
|
271
|
+
resetAfterSSR() {
|
|
272
|
+
this.isSSR && (this.isSSR = !1, this.firstChild = null, this.lastChild = null, this.nodeId = 0);
|
|
273
|
+
}
|
|
274
|
+
constructor(e) {
|
|
275
|
+
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;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
function D(o) {
|
|
279
|
+
let { children: e, items: t, idScope: i, addIdAndValue: n, dependencies: l = [] } = o, s = m(() => /* @__PURE__ */ new WeakMap(), l);
|
|
280
|
+
return m(() => {
|
|
281
|
+
if (t && typeof e == "function") {
|
|
282
|
+
let d = [];
|
|
283
|
+
for (let c of t) {
|
|
284
|
+
let h = s.get(c);
|
|
285
|
+
if (!h) {
|
|
286
|
+
h = e(c);
|
|
287
|
+
var a, r;
|
|
288
|
+
let f = (r = (a = h.props.id) !== null && a !== void 0 ? a : c.key) !== null && r !== void 0 ? r : c.id;
|
|
289
|
+
if (f == null) throw new Error("Could not determine key for item");
|
|
290
|
+
i && (f = i + ":" + f), h = _(h, n ? {
|
|
291
|
+
key: f,
|
|
292
|
+
id: f,
|
|
293
|
+
value: c
|
|
294
|
+
} : {
|
|
295
|
+
key: f
|
|
296
|
+
}), s.set(c, h);
|
|
297
|
+
}
|
|
298
|
+
d.push(h);
|
|
299
|
+
}
|
|
300
|
+
return d;
|
|
301
|
+
} else if (typeof e != "function") return e;
|
|
302
|
+
}, [
|
|
303
|
+
e,
|
|
304
|
+
t,
|
|
305
|
+
s,
|
|
306
|
+
i,
|
|
307
|
+
n
|
|
308
|
+
]);
|
|
309
|
+
}
|
|
310
|
+
const M = /* @__PURE__ */ y(!1), g = /* @__PURE__ */ y(null);
|
|
311
|
+
function X(o) {
|
|
312
|
+
if (p(g))
|
|
313
|
+
return o.content;
|
|
314
|
+
let { collection: t, document: i } = L(o.createCollection);
|
|
315
|
+
return /* @__PURE__ */ u.createElement(u.Fragment, null, /* @__PURE__ */ u.createElement(R, null, /* @__PURE__ */ u.createElement(g.Provider, {
|
|
316
|
+
value: i
|
|
317
|
+
}, o.content)), /* @__PURE__ */ u.createElement(q, {
|
|
318
|
+
render: o.children,
|
|
319
|
+
collection: t
|
|
320
|
+
}));
|
|
321
|
+
}
|
|
322
|
+
function q({ collection: o, render: e }) {
|
|
323
|
+
return e(o);
|
|
324
|
+
}
|
|
325
|
+
function F(o, e, t) {
|
|
326
|
+
let i = w(), n = z(i);
|
|
327
|
+
n.current = i;
|
|
328
|
+
let l = v(() => n.current ? t() : e(), [
|
|
329
|
+
e,
|
|
330
|
+
t
|
|
331
|
+
]);
|
|
332
|
+
return I.useSyncExternalStore(o, l);
|
|
333
|
+
}
|
|
334
|
+
const U = typeof u.useSyncExternalStore == "function" ? u.useSyncExternalStore : F;
|
|
335
|
+
function L(o) {
|
|
336
|
+
let [e] = A(() => new B((o == null ? void 0 : o()) || new V())), t = v((s) => e.subscribe(s), [
|
|
337
|
+
e
|
|
338
|
+
]), i = v(() => {
|
|
339
|
+
let s = e.getCollection();
|
|
340
|
+
return e.isSSR && e.resetAfterSSR(), s;
|
|
341
|
+
}, [
|
|
342
|
+
e
|
|
343
|
+
]), n = v(() => (e.isSSR = !0, e.getCollection()), [
|
|
344
|
+
e
|
|
345
|
+
]), l = U(t, i, n);
|
|
346
|
+
return T(() => (e.isMounted = !0, () => {
|
|
347
|
+
e.isMounted = !1;
|
|
348
|
+
}), [
|
|
349
|
+
e
|
|
350
|
+
]), {
|
|
351
|
+
collection: l,
|
|
352
|
+
document: e
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
const C = /* @__PURE__ */ y(null);
|
|
356
|
+
function N(o, e, t, i, n, l) {
|
|
357
|
+
let s = v((r) => {
|
|
358
|
+
r == null || r.setProps(e, t, i, l);
|
|
359
|
+
}, [
|
|
360
|
+
e,
|
|
361
|
+
t,
|
|
362
|
+
i,
|
|
363
|
+
l
|
|
364
|
+
]), a = p(C);
|
|
365
|
+
if (a) {
|
|
366
|
+
let r = a.ownerDocument.nodesByProps.get(e);
|
|
367
|
+
return r || (r = a.ownerDocument.createElement(o), r.setProps(e, t, i, l), a.appendChild(r), a.ownerDocument.updateCollection(), a.ownerDocument.nodesByProps.set(e, r)), n ? /* @__PURE__ */ u.createElement(C.Provider, {
|
|
368
|
+
value: r
|
|
369
|
+
}, n) : null;
|
|
370
|
+
}
|
|
371
|
+
return /* @__PURE__ */ u.createElement(o, {
|
|
372
|
+
ref: s
|
|
373
|
+
}, n);
|
|
374
|
+
}
|
|
375
|
+
function Y(o, e) {
|
|
376
|
+
let t = ({ node: n }) => e(n.props, n.props.ref, n), i = k((n, l) => {
|
|
377
|
+
if (!p(M)) {
|
|
378
|
+
if (e.length >= 3) throw new Error(e.name + " cannot be rendered outside a collection.");
|
|
379
|
+
return e(n, l);
|
|
380
|
+
}
|
|
381
|
+
return N(o, n, l, "children" in n ? n.children : null, null, (a) => /* @__PURE__ */ u.createElement(t, {
|
|
382
|
+
node: a
|
|
383
|
+
}));
|
|
384
|
+
});
|
|
385
|
+
return i.displayName = e.name, i;
|
|
386
|
+
}
|
|
387
|
+
function Z(o, e, t = E) {
|
|
388
|
+
let i = ({ node: l }) => e(l.props, l.props.ref, l), n = k((l, s) => {
|
|
389
|
+
let a = t(l);
|
|
390
|
+
var r;
|
|
391
|
+
return (r = N(o, l, s, null, a, (d) => /* @__PURE__ */ u.createElement(i, {
|
|
392
|
+
node: d
|
|
393
|
+
}))) !== null && r !== void 0 ? r : /* @__PURE__ */ u.createElement(u.Fragment, null);
|
|
394
|
+
});
|
|
395
|
+
return n.displayName = e.name, n;
|
|
396
|
+
}
|
|
397
|
+
function E(o) {
|
|
398
|
+
return D({
|
|
399
|
+
...o,
|
|
400
|
+
addIdAndValue: !0
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
const x = /* @__PURE__ */ y(null);
|
|
404
|
+
function ee(o) {
|
|
405
|
+
let e = p(x), t = ((e == null ? void 0 : e.dependencies) || []).concat(o.dependencies), i = o.idScope || (e == null ? void 0 : e.idScope), n = E({
|
|
406
|
+
...o,
|
|
407
|
+
idScope: i,
|
|
408
|
+
dependencies: t
|
|
409
|
+
});
|
|
410
|
+
return p(g) && (n = /* @__PURE__ */ u.createElement(W, null, n)), e = m(() => ({
|
|
411
|
+
dependencies: t,
|
|
412
|
+
idScope: i
|
|
413
|
+
}), [
|
|
414
|
+
i,
|
|
415
|
+
...t
|
|
416
|
+
]), /* @__PURE__ */ u.createElement(x.Provider, {
|
|
417
|
+
value: e
|
|
418
|
+
}, n);
|
|
419
|
+
}
|
|
420
|
+
function W({ children: o }) {
|
|
421
|
+
let e = p(g), t = m(() => /* @__PURE__ */ u.createElement(g.Provider, {
|
|
422
|
+
value: null
|
|
423
|
+
}, /* @__PURE__ */ u.createElement(M.Provider, {
|
|
424
|
+
value: !0
|
|
425
|
+
}, o)), [
|
|
426
|
+
o
|
|
427
|
+
]);
|
|
428
|
+
return w() ? /* @__PURE__ */ u.createElement(C.Provider, {
|
|
429
|
+
value: e
|
|
430
|
+
}, t) : /* @__PURE__ */ P(t, e);
|
|
431
|
+
}
|
|
432
|
+
const te = /* @__PURE__ */ y(null), j = {
|
|
433
|
+
CollectionRoot({ collection: o, renderDropIndicator: e }) {
|
|
434
|
+
return $(o, null, e);
|
|
435
|
+
},
|
|
436
|
+
CollectionBranch({ collection: o, parent: e, renderDropIndicator: t }) {
|
|
437
|
+
return $(o, e, t);
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
function $(o, e, t) {
|
|
441
|
+
return D({
|
|
442
|
+
items: e ? o.getChildren(e.key) : o,
|
|
443
|
+
dependencies: [
|
|
444
|
+
t
|
|
445
|
+
],
|
|
446
|
+
children(i) {
|
|
447
|
+
var n;
|
|
448
|
+
let l = i.render(i);
|
|
449
|
+
if (!t || i.type !== "item") return l;
|
|
450
|
+
let s = i.key, a = o.getKeyAfter(s);
|
|
451
|
+
return /* @__PURE__ */ u.createElement(u.Fragment, null, t({
|
|
452
|
+
type: "item",
|
|
453
|
+
key: s,
|
|
454
|
+
dropPosition: "before"
|
|
455
|
+
}), l, (a == null || ((n = o.getItem(a)) === null || n === void 0 ? void 0 : n.type) !== "item") && t({
|
|
456
|
+
type: "item",
|
|
457
|
+
key: s,
|
|
458
|
+
dropPosition: "after"
|
|
459
|
+
}));
|
|
460
|
+
}
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
const ie = /* @__PURE__ */ y(j);
|
|
464
|
+
function ne(o) {
|
|
465
|
+
return m(() => o != null ? /* @__PURE__ */ new Set([
|
|
466
|
+
o
|
|
467
|
+
]) : null, [
|
|
468
|
+
o
|
|
469
|
+
]);
|
|
470
|
+
}
|
|
471
|
+
export {
|
|
472
|
+
Y as $,
|
|
473
|
+
ie as a,
|
|
474
|
+
j as b,
|
|
475
|
+
X as c,
|
|
476
|
+
ee as d,
|
|
477
|
+
te as e,
|
|
478
|
+
ne as f,
|
|
479
|
+
Z as g,
|
|
480
|
+
D as h,
|
|
481
|
+
V as i,
|
|
482
|
+
b as j
|
|
483
|
+
};
|
package/ComboBox.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
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
ADDED
|
@@ -0,0 +1 @@
|
|
|
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}
|