@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
@@ -0,0 +1,15 @@
1
+ import { a as c } from "./useFocusRing-9PXyKy2A.js";
2
+ import o, { forwardRef as $, createContext as f } from "react";
3
+ const n = /* @__PURE__ */ f({}), s = /* @__PURE__ */ $(function(e, t) {
4
+ [e, t] = c(e, t, n);
5
+ let { elementType: a = "span", ...r } = e;
6
+ return /* @__PURE__ */ o.createElement(a, {
7
+ className: "react-aria-Text",
8
+ ...r,
9
+ ref: t
10
+ });
11
+ });
12
+ export {
13
+ n as $,
14
+ s as a
15
+ };
@@ -0,0 +1,225 @@
1
+ import { jsx as r, jsxs as $, Fragment as k } from "react/jsx-runtime";
2
+ import b, { forwardRef as y, createContext as N, useRef as A, useState as O, useCallback as _ } from "react";
3
+ import { $ as q, a as j, b as C } from "./Form-BWBjJC6v.js";
4
+ import { $ as w, a as W, T as n, b as z } from "./TextField.module-DdICj682.js";
5
+ import { $ as L, a as G } from "./useField-DMzJIIN4.js";
6
+ import { $ as J, a as H } from "./Text-BCF0xvqL.js";
7
+ import { a as g, b as K, c as M, d as I, e as B, y as Q, z as U, A as X, o as Y, B as Z } from "./useFocusRing-9PXyKy2A.js";
8
+ import { Button as ee } from "./index66.js";
9
+ import { c as te } from "./clsx-OuTLNxxd.js";
10
+ const S = /* @__PURE__ */ N({});
11
+ let ae = (s) => {
12
+ let { onHoverStart: e, onHoverChange: t, onHoverEnd: d, ...i } = s;
13
+ return i;
14
+ };
15
+ const xe = /* @__PURE__ */ y(function(e, t) {
16
+ [e, t] = g(e, t, S);
17
+ let { hoverProps: d, isHovered: i } = K(e), { isFocused: a, isFocusVisible: u, focusProps: f } = M({
18
+ isTextInput: !0,
19
+ autoFocus: e.autoFocus
20
+ }), l = !!e["aria-invalid"] && e["aria-invalid"] !== "false", c = I({
21
+ ...e,
22
+ values: {
23
+ isHovered: i,
24
+ isFocused: a,
25
+ isFocusVisible: u,
26
+ isDisabled: e.disabled || !1,
27
+ isInvalid: l
28
+ },
29
+ defaultClassName: "react-aria-TextArea"
30
+ });
31
+ return /* @__PURE__ */ b.createElement("textarea", {
32
+ ...B(ae(e), f, d),
33
+ ...c,
34
+ ref: t,
35
+ "data-focused": a || void 0,
36
+ "data-disabled": e.disabled || void 0,
37
+ "data-hovered": i || void 0,
38
+ "data-focus-visible": u || void 0,
39
+ "data-invalid": l || void 0
40
+ });
41
+ }), de = /* @__PURE__ */ N(null), ne = /* @__PURE__ */ y(function(e, t) {
42
+ [e, t] = g(e, t, de);
43
+ let { validationBehavior: d } = Q(q) || {};
44
+ var i, a;
45
+ let u = (a = (i = e.validationBehavior) !== null && i !== void 0 ? i : d) !== null && a !== void 0 ? a : "native", f = A(null), [l, c] = g({}, f, w), [p, v] = U(), [x, o] = O("input"), { labelProps: m, inputProps: F, descriptionProps: D, errorMessageProps: V, ...h } = W({
46
+ ...X(e),
47
+ inputElementType: x,
48
+ label: v,
49
+ validationBehavior: u
50
+ }, c), R = _((P) => {
51
+ c.current = P, P && o(P instanceof HTMLTextAreaElement ? "textarea" : "input");
52
+ }, [
53
+ c
54
+ ]), E = I({
55
+ ...e,
56
+ values: {
57
+ isDisabled: e.isDisabled || !1,
58
+ isInvalid: h.isInvalid,
59
+ isReadOnly: e.isReadOnly || !1,
60
+ isRequired: e.isRequired || !1
61
+ },
62
+ defaultClassName: "react-aria-TextField"
63
+ }), T = Y(e);
64
+ return delete T.id, /* @__PURE__ */ b.createElement("div", {
65
+ ...T,
66
+ ...E,
67
+ ref: t,
68
+ slot: e.slot || void 0,
69
+ "data-disabled": e.isDisabled || void 0,
70
+ "data-invalid": h.isInvalid || void 0,
71
+ "data-readonly": e.isReadOnly || void 0,
72
+ "data-required": e.isRequired || void 0
73
+ }, /* @__PURE__ */ b.createElement(Z, {
74
+ values: [
75
+ [
76
+ L,
77
+ {
78
+ ...m,
79
+ ref: p
80
+ }
81
+ ],
82
+ [
83
+ w,
84
+ {
85
+ ...B(F, l),
86
+ ref: R
87
+ }
88
+ ],
89
+ [
90
+ S,
91
+ {
92
+ ...F,
93
+ ref: R
94
+ }
95
+ ],
96
+ [
97
+ J,
98
+ {
99
+ slots: {
100
+ description: D,
101
+ errorMessage: V
102
+ }
103
+ }
104
+ ],
105
+ [
106
+ j,
107
+ h
108
+ ]
109
+ ]
110
+ }, E.children));
111
+ }), me = ({
112
+ label: s,
113
+ description: e,
114
+ errorMessage: t,
115
+ validationType: d,
116
+ validate: i,
117
+ maxCharacters: a,
118
+ showCounter: u,
119
+ ...f
120
+ }) => {
121
+ const [l, c] = b.useState(""), p = (o) => {
122
+ const m = o.target.value;
123
+ c(m);
124
+ }, v = (o) => d === "ssn" ? re.test(o) ? null : "Felaktigt personnummer" : d instanceof RegExp ? new RegExp(d).test(o) ? null : t == null ? void 0 : t.toString() : a ? a && o.length > a ? `Du har angett ${o.length - a} tecken för mycket. Fältet är begränsat till ${a} tecken.` : null : i ? i(o) : !0, x = () => a ? /* @__PURE__ */ $(
125
+ "span",
126
+ {
127
+ className: te(
128
+ n.count,
129
+ l.length > a && n.countExceeded
130
+ ),
131
+ children: [
132
+ l.length,
133
+ " / ",
134
+ a
135
+ ]
136
+ }
137
+ ) : u ? /* @__PURE__ */ r("span", { className: n.count, children: l.length }) : null;
138
+ return /* @__PURE__ */ r(
139
+ ne,
140
+ {
141
+ className: n.inputField,
142
+ validate: v,
143
+ ...f,
144
+ children: /* @__PURE__ */ $(
145
+ se,
146
+ {
147
+ label: s,
148
+ description: e,
149
+ errorMessage: t,
150
+ children: [
151
+ /* @__PURE__ */ r(x, {}),
152
+ /* @__PURE__ */ $("div", { className: n.wrap, children: [
153
+ /* @__PURE__ */ r(
154
+ z,
155
+ {
156
+ type: f.type,
157
+ className: n.input,
158
+ onChange: p,
159
+ onBlur: p
160
+ }
161
+ ),
162
+ /* @__PURE__ */ r(
163
+ ie,
164
+ {
165
+ type: f.type,
166
+ input: l
167
+ }
168
+ )
169
+ ] })
170
+ ]
171
+ }
172
+ )
173
+ }
174
+ );
175
+ }, ie = ({
176
+ type: s,
177
+ input: e
178
+ }) => {
179
+ const [t, d] = b.useState(!1);
180
+ return s === "password" ? /* @__PURE__ */ $(k, { children: [
181
+ t && /* @__PURE__ */ r(
182
+ H,
183
+ {
184
+ slot: "description",
185
+ className: n.passwordText,
186
+ children: e
187
+ }
188
+ ),
189
+ /* @__PURE__ */ r(
190
+ ee,
191
+ {
192
+ variant: "tertiary",
193
+ onPress: () => d(!t),
194
+ className: n.passwordButton,
195
+ children: t ? "Dölj" : "Visa"
196
+ }
197
+ )
198
+ ] }) : null;
199
+ }, se = ({
200
+ label: s,
201
+ description: e,
202
+ errorMessage: t,
203
+ children: d
204
+ }) => /* @__PURE__ */ $("div", { className: n.inputWrapper, children: [
205
+ s && /* @__PURE__ */ r(G, { className: n.label, children: s }),
206
+ e && /* @__PURE__ */ r(
207
+ H,
208
+ {
209
+ slot: "description",
210
+ className: n.text,
211
+ children: e
212
+ }
213
+ ),
214
+ /* @__PURE__ */ r(C, { className: n.fieldError, children: t }),
215
+ d
216
+ ] }), re = new RegExp(
217
+ "^(?:(?:19|20)?\\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\\d|3[01])(?:[-+ ]?\\d{4})?|\\d{4}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\\d|3[01])(?:[-+ ]?\\d{4}))$"
218
+ );
219
+ export {
220
+ ne as $,
221
+ se as I,
222
+ me as T,
223
+ xe as a,
224
+ re as s
225
+ };
@@ -0,0 +1,143 @@
1
+ import C, { useEffect as y, createContext as w } from "react";
2
+ import { o as k, s as E, e as p, a as I, b as F, c as T, d as H } from "./useFocusRing-9PXyKy2A.js";
3
+ import { c as R, d as S, e as M } from "./Form-BWBjJC6v.js";
4
+ import { $ as B } from "./useControlledState-Kv9K2AYu.js";
5
+ import { b as V } from "./useField-DMzJIIN4.js";
6
+ import { $ as W } from "./useFocusable-CcEBZe40.js";
7
+ import { $ as D } from "./Hidden-CVlUgUJM.js";
8
+ import './TextField.css';function me(e, a) {
9
+ let { inputElementType: o = "input", isDisabled: i = !1, isRequired: t = !1, isReadOnly: d = !1, type: r = "text", validationBehavior: s = "aria" } = e, [n, l] = B(e.value, e.defaultValue || "", e.onChange), { focusableProps: $ } = W(e, a), f = R({
10
+ ...e,
11
+ value: n
12
+ }), { isInvalid: u, validationErrors: b, validationDetails: v } = f.displayValidation, { labelProps: m, fieldProps: x, descriptionProps: _, errorMessageProps: g } = V({
13
+ ...e,
14
+ isInvalid: u,
15
+ errorMessage: e.errorMessage || b
16
+ }), P = k(e, {
17
+ labelable: !0
18
+ });
19
+ const h = {
20
+ type: r,
21
+ pattern: e.pattern
22
+ };
23
+ return S(a, n, l), M(e, f, a), y(() => {
24
+ if (a.current instanceof E(a.current).HTMLTextAreaElement) {
25
+ let c = a.current;
26
+ Object.defineProperty(c, "defaultValue", {
27
+ get: () => c.value,
28
+ set: () => {
29
+ },
30
+ configurable: !0
31
+ });
32
+ }
33
+ }, [
34
+ a
35
+ ]), {
36
+ labelProps: m,
37
+ inputProps: p(P, o === "input" ? h : void 0, {
38
+ disabled: i,
39
+ readOnly: d,
40
+ required: t && s === "native",
41
+ "aria-required": t && s === "aria" || void 0,
42
+ "aria-invalid": u || void 0,
43
+ "aria-errormessage": e["aria-errormessage"],
44
+ "aria-activedescendant": e["aria-activedescendant"],
45
+ "aria-autocomplete": e["aria-autocomplete"],
46
+ "aria-haspopup": e["aria-haspopup"],
47
+ "aria-controls": e["aria-controls"],
48
+ value: n,
49
+ onChange: (c) => l(c.target.value),
50
+ autoComplete: e.autoComplete,
51
+ autoCapitalize: e.autoCapitalize,
52
+ maxLength: e.maxLength,
53
+ minLength: e.minLength,
54
+ name: e.name,
55
+ placeholder: e.placeholder,
56
+ inputMode: e.inputMode,
57
+ autoCorrect: e.autoCorrect,
58
+ spellCheck: e.spellCheck,
59
+ // Clipboard events
60
+ onCopy: e.onCopy,
61
+ onCut: e.onCut,
62
+ onPaste: e.onPaste,
63
+ // Composition events
64
+ onCompositionEnd: e.onCompositionEnd,
65
+ onCompositionStart: e.onCompositionStart,
66
+ onCompositionUpdate: e.onCompositionUpdate,
67
+ // Selection events
68
+ onSelect: e.onSelect,
69
+ // Input events
70
+ onBeforeInput: e.onBeforeInput,
71
+ onInput: e.onInput,
72
+ ...$,
73
+ ...x
74
+ }),
75
+ descriptionProps: _,
76
+ errorMessageProps: g,
77
+ isInvalid: u,
78
+ validationErrors: b,
79
+ validationDetails: v
80
+ };
81
+ }
82
+ const L = /* @__PURE__ */ w({});
83
+ let O = (e) => {
84
+ let { onHoverStart: a, onHoverChange: o, onHoverEnd: i, ...t } = e;
85
+ return t;
86
+ };
87
+ const xe = /* @__PURE__ */ D(function(a, o) {
88
+ [a, o] = I(a, o, L);
89
+ let { hoverProps: i, isHovered: t } = F(a), { isFocused: d, isFocusVisible: r, focusProps: s } = T({
90
+ isTextInput: !0,
91
+ autoFocus: a.autoFocus
92
+ }), n = !!a["aria-invalid"] && a["aria-invalid"] !== "false", l = H({
93
+ ...a,
94
+ values: {
95
+ isHovered: t,
96
+ isFocused: d,
97
+ isFocusVisible: r,
98
+ isDisabled: a.disabled || !1,
99
+ isInvalid: n
100
+ },
101
+ defaultClassName: "react-aria-Input"
102
+ });
103
+ return /* @__PURE__ */ C.createElement("input", {
104
+ ...p(O(a), s, i),
105
+ ...l,
106
+ ref: o,
107
+ "data-focused": d || void 0,
108
+ "data-disabled": a.disabled || void 0,
109
+ "data-hovered": t || void 0,
110
+ "data-focus-visible": r || void 0,
111
+ "data-invalid": n || void 0
112
+ });
113
+ }), q = '"../theme/tokens.css"', z = '"Inter", sans-serif', U = "#ffdfdf", j = "#f2f2f2", A = "#e6e6e6", N = "#bfbfbf", G = "#000000", J = "#e62323", K = "500", Q = "400", X = "#1f1f1f", Y = "0 0 0 2px #ffffff, 0 0 0 4px #000000", Z = "_inputField_1kepw_4", ee = "_inputWrapper_1kepw_12", ae = "_label_1kepw_30", te = "_text_1kepw_36", oe = "_fieldError_1kepw_42", ne = "_passwordText_1kepw_66", ie = "_count_1kepw_79", de = "_countExceeded_1kepw_87", re = "_input_1kepw_4", se = "_wrap_1kepw_130", le = "_passwordButton_1kepw_135", _e = {
114
+ tokens: q,
115
+ display: z,
116
+ signalRed10: U,
117
+ gray10: j,
118
+ gray20: A,
119
+ gray50: N,
120
+ black: G,
121
+ signalRed100: J,
122
+ mediumWeight: K,
123
+ regularWeight: Q,
124
+ inputText: X,
125
+ focus: Y,
126
+ inputField: Z,
127
+ inputWrapper: ee,
128
+ label: ae,
129
+ text: te,
130
+ fieldError: oe,
131
+ passwordText: ne,
132
+ count: ie,
133
+ countExceeded: de,
134
+ input: re,
135
+ wrap: se,
136
+ passwordButton: le
137
+ };
138
+ export {
139
+ L as $,
140
+ _e as T,
141
+ me as a,
142
+ xe as b
143
+ };
@@ -1,4 +1,4 @@
1
- import { f as n, e as d } from "./useFocusRing-D97-G3fT.js";
1
+ import { f as n, e as d } from "./useFocusRing-9PXyKy2A.js";
2
2
  import u, { useState as f, useMemo as p } from "react";
3
3
  const a = {
4
4
  border: 0,
@@ -1,13 +1,13 @@
1
- import { default as React } from 'react';
2
- import { TextElementTag } from './AccordionTagContext';
3
- import * as RadixAccordion from '@radix-ui/react-accordion';
4
- type AccordionRootCombined = RadixAccordion.AccordionSingleProps | RadixAccordion.AccordionMultipleProps;
5
- interface AccordionProps {
6
- /** Pick a heading tag to be rendered as the title in each accordion */
7
- headingTag?: TextElementTag;
1
+ import { DisclosureGroupProps } from 'react-aria-components';
2
+ import * as React from 'react';
3
+ interface MidasAccordion extends DisclosureGroupProps {
4
+ /** Display either the larger contained variant or a smaller uncontained variant */
5
+ variant?: 'uncontained' | 'contained';
6
+ /** Weither to allow the user to have multiple accordions open at the same time */
7
+ type?: 'single' | 'multiple';
8
8
  }
9
9
  /**
10
10
  * Accordions are used primarily to reduce the direct amount of information on a page and to sort it clearly.
11
11
  */
12
- export declare const Accordion: React.ForwardRefExoticComponent<(AccordionRootCombined & AccordionProps) & React.RefAttributes<HTMLDivElement>>;
12
+ export declare const Accordion: React.FC<MidasAccordion>;
13
13
  export {};
@@ -1,3 +1,11 @@
1
- import { default as React } from 'react';
2
- import * as RadixAccordion from '@radix-ui/react-accordion';
3
- export declare const AccordionItem: React.ForwardRefExoticComponent<RadixAccordion.AccordionItemProps & React.RefAttributes<HTMLDivElement>>;
1
+ import { DisclosureProps, HeadingProps } from 'react-aria-components';
2
+ import * as React from 'react';
3
+ interface MidasAccordionItem extends Omit<DisclosureProps, 'children'> {
4
+ /** The text displayed in the collapsed state */
5
+ title?: string;
6
+ children?: React.ReactNode;
7
+ /** Adjust the titles heading level to your heading tag structure */
8
+ headingLevel?: HeadingProps['level'];
9
+ }
10
+ export declare const AccordionItem: React.FC<MidasAccordionItem>;
11
+ export {};
@@ -1,5 +1,2 @@
1
1
  export { Accordion } from './Accordion';
2
2
  export { AccordionItem } from './AccordionItem';
3
- export { AccordionTrigger } from './AccordionTrigger';
4
- export { AccordionContent } from './AccordionContent';
5
- export { AccordionTagContext } from './AccordionTagContext';
@@ -1,5 +1,5 @@
1
- import l, { useState as i, useEffect as d, useContext as $ } from "react";
2
- import { g as u } from "./useFocusRing-D97-G3fT.js";
1
+ import l, { useState as d, useEffect as i, useContext as $ } from "react";
2
+ import { g as u } from "./useFocusRing-9PXyKy2A.js";
3
3
  const s = /* @__PURE__ */ new Set([
4
4
  "Arab",
5
5
  "Syrc",
@@ -34,9 +34,9 @@ const s = /* @__PURE__ */ new Set([
34
34
  ]);
35
35
  function g(e) {
36
36
  if (Intl.Locale) {
37
- let t = new Intl.Locale(e).maximize(), r = typeof t.getTextInfo == "function" ? t.getTextInfo() : t.textInfo;
38
- if (r) return r.direction === "rtl";
39
- if (t.script) return s.has(t.script);
37
+ let a = new Intl.Locale(e).maximize(), o = typeof a.getTextInfo == "function" ? a.getTextInfo() : a.textInfo;
38
+ if (o) return o.direction === "rtl";
39
+ if (a.script) return s.has(a.script);
40
40
  }
41
41
  let n = e.split("-")[0];
42
42
  return b.has(n);
@@ -56,15 +56,15 @@ function c() {
56
56
  direction: g(e) ? "rtl" : "ltr"
57
57
  };
58
58
  }
59
- let o = c(), a = /* @__PURE__ */ new Set();
59
+ let r = c(), t = /* @__PURE__ */ new Set();
60
60
  function f() {
61
- o = c();
62
- for (let e of a) e(o);
61
+ r = c();
62
+ for (let e of t) e(r);
63
63
  }
64
64
  function x() {
65
- let e = u(), [n, t] = i(o);
66
- return d(() => (a.size === 0 && window.addEventListener("languagechange", f), a.add(t), () => {
67
- a.delete(t), a.size === 0 && window.removeEventListener("languagechange", f);
65
+ let e = u(), [n, a] = d(r);
66
+ return i(() => (t.size === 0 && window.addEventListener("languagechange", f), t.add(a), () => {
67
+ t.delete(a), t.size === 0 && window.removeEventListener("languagechange", f);
68
68
  }), []), e ? {
69
69
  locale: "en-US",
70
70
  direction: "ltr"
package/global.css ADDED
@@ -0,0 +1 @@
1
+ @font-face{font-family:Inter;font-style:normal;font-display:swap;font-weight:100 900;src:url(https://cdn.jsdelivr.net/fontsource/fonts/inter:vf@latest/latin-wght-normal.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}*{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
@@ -0,0 +1,120 @@
1
+ import w from "react";
2
+ var m = { exports: {} }, y = {};
3
+ /**
4
+ * @license React
5
+ * use-sync-external-store-shim.production.js
6
+ *
7
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+ var L;
13
+ function T() {
14
+ if (L) return y;
15
+ L = 1;
16
+ var s = w;
17
+ function l(t, o) {
18
+ return t === o && (t !== 0 || 1 / t === 1 / o) || t !== t && o !== o;
19
+ }
20
+ var c = typeof Object.is == "function" ? Object.is : l, _ = s.useState, u = s.useEffect, d = s.useLayoutEffect, p = s.useDebugValue;
21
+ function E(t, o) {
22
+ var e = o(), n = _({ inst: { value: e, getSnapshot: o } }), r = n[0].inst, a = n[1];
23
+ return d(
24
+ function() {
25
+ r.value = e, r.getSnapshot = o, f(r) && a({ inst: r });
26
+ },
27
+ [t, e, o]
28
+ ), u(
29
+ function() {
30
+ return f(r) && a({ inst: r }), t(function() {
31
+ f(r) && a({ inst: r });
32
+ });
33
+ },
34
+ [t]
35
+ ), p(e), e;
36
+ }
37
+ function f(t) {
38
+ var o = t.getSnapshot;
39
+ t = t.value;
40
+ try {
41
+ var e = o();
42
+ return !c(t, e);
43
+ } catch {
44
+ return !0;
45
+ }
46
+ }
47
+ function O(t, o) {
48
+ return o();
49
+ }
50
+ var S = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? O : E;
51
+ return y.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : S, y;
52
+ }
53
+ var h = {};
54
+ /**
55
+ * @license React
56
+ * use-sync-external-store-shim.development.js
57
+ *
58
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
59
+ *
60
+ * This source code is licensed under the MIT license found in the
61
+ * LICENSE file in the root directory of this source tree.
62
+ */
63
+ var x;
64
+ function A() {
65
+ return x || (x = 1, process.env.NODE_ENV !== "production" && function() {
66
+ function s(e, n) {
67
+ return e === n && (e !== 0 || 1 / e === 1 / n) || e !== e && n !== n;
68
+ }
69
+ function l(e, n) {
70
+ S || u.startTransition === void 0 || (S = !0, console.error(
71
+ "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
72
+ ));
73
+ var r = n();
74
+ if (!t) {
75
+ var a = n();
76
+ d(r, a) || (console.error(
77
+ "The result of getSnapshot should be cached to avoid an infinite loop"
78
+ ), t = !0);
79
+ }
80
+ a = p({
81
+ inst: { value: r, getSnapshot: n }
82
+ });
83
+ var i = a[0].inst, v = a[1];
84
+ return f(
85
+ function() {
86
+ i.value = r, i.getSnapshot = n, c(i) && v({ inst: i });
87
+ },
88
+ [e, r, n]
89
+ ), E(
90
+ function() {
91
+ return c(i) && v({ inst: i }), e(function() {
92
+ c(i) && v({ inst: i });
93
+ });
94
+ },
95
+ [e]
96
+ ), O(r), r;
97
+ }
98
+ function c(e) {
99
+ var n = e.getSnapshot;
100
+ e = e.value;
101
+ try {
102
+ var r = n();
103
+ return !d(e, r);
104
+ } catch {
105
+ return !0;
106
+ }
107
+ }
108
+ function _(e, n) {
109
+ return n();
110
+ }
111
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
112
+ var u = w, d = typeof Object.is == "function" ? Object.is : s, p = u.useState, E = u.useEffect, f = u.useLayoutEffect, O = u.useDebugValue, S = !1, t = !1, o = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? _ : l;
113
+ h.useSyncExternalStore = u.useSyncExternalStore !== void 0 ? u.useSyncExternalStore : o, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
114
+ }()), h;
115
+ }
116
+ process.env.NODE_ENV === "production" ? m.exports = T() : m.exports = A();
117
+ var D = m.exports;
118
+ export {
119
+ D as s
120
+ };
@@ -1,5 +1,5 @@
1
- import { g as X, c as W, e as cn, a as Ut } from "./react.esm-D8HpDGKP.js";
2
- import { a as ln, b as fn } from "./index-Dl1Q-tbj.js";
1
+ import { g as X, c as W, e as cn, a as Ut } from "./react.esm-sMU8Z7rL.js";
2
+ import { a as ln, b as fn } from "./index-KSgQWWiy.js";
3
3
  var dn = (e) => {
4
4
  const t = e.match(/^[ \t]*(?=\S)/gm);
5
5
  return t ? t.reduce((r, n) => Math.min(r, n.length), 1 / 0) : 0;
@@ -985,7 +985,7 @@ function Qc(e, t) {
985
985
  }
986
986
  }
987
987
  function el(e, t, r) {
988
- return t && Qc(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
988
+ return Qc(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
989
989
  }
990
990
  function tl(e, t, r) {
991
991
  return t = gr(t), t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;