@midas-ds/components 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/Button-B4vMZbC6.js +182 -0
  2. package/CHANGELOG.md +10 -0
  3. package/Checkbox-DnKWanep.js +402 -0
  4. package/{Collection-B3xUVWPF.js → Collection-COLWgm24.js} +179 -152
  5. package/Dialog-Cb6toyXO.js +1951 -0
  6. package/DragAndDrop-B0T3WgjL.js +40 -0
  7. package/FocusScope-C8i7CH6y.js +513 -0
  8. package/Form-BQQs3jUk.js +238 -0
  9. package/Group-CdwXhx8Q.js +42 -0
  10. package/{Hidden-BQWDvze4.js → Hidden-DngIphiL.js} +1 -1
  11. package/Link-iAZLB3RI.js +75 -0
  12. package/ListBox-BKWkIIm6.js +474 -0
  13. package/ListKeyboardDelegate-BH-K5hyq.js +172 -0
  14. package/{PressResponder-DP8ZDNGy.js → PressResponder-Cz-TRBHO.js} +10 -10
  15. package/README.md +21 -3
  16. package/SelectionManager-8o40f7mx.js +1047 -0
  17. package/Separator-BlvmQjwz.js +49 -0
  18. package/Tag--W5TgxmK.js +728 -0
  19. package/Text-CQPW6xs7.js +15 -0
  20. package/TextField-DeK_yiK-.js +225 -0
  21. package/TextField.module-0-u4LVPp.js +143 -0
  22. package/{VisuallyHidden-B_XzVvlX.js → VisuallyHidden-CFx06Bae.js} +1 -1
  23. package/{context-ScOIq_Gu.js → context-Bnqknrce.js} +1 -1
  24. package/index-B-jHjTDC.js +120 -0
  25. package/{index-CorR1LBD.js → index-BPdc9gJ8.js} +3 -3
  26. package/index-DK9ZACEc.js +642 -0
  27. package/{index-Dl1Q-tbj.js → index-KSgQWWiy.js} +5315 -5315
  28. package/index.js +45 -47
  29. package/index15.js +1 -1
  30. package/index16.js +1 -1
  31. package/index25.js +1 -1
  32. package/index26.js +1 -1
  33. package/index3.js +2 -4
  34. package/index31.js +3 -3
  35. package/index32.js +2 -2
  36. package/index33.js +2 -2
  37. package/index34.js +1 -1
  38. package/index35.js +1 -1
  39. package/index36.js +1 -1
  40. package/index37.js +1 -1
  41. package/index38.js +1 -1
  42. package/index39.js +1 -1
  43. package/index40.js +1 -1
  44. package/index41.js +1 -1
  45. package/index42.js +1 -1
  46. package/index43.js +1 -1
  47. package/index45.js +3 -3
  48. package/index5.js +1 -1
  49. package/index50.js +1 -1
  50. package/index52.js +3 -3
  51. package/index53.js +3 -3
  52. package/index54.js +1 -1
  53. package/index55.js +4 -4
  54. package/index56.js +1 -1
  55. package/index57.js +1 -1
  56. package/index58.js +1 -1
  57. package/index59.js +3 -3
  58. package/index60.js +1 -1
  59. package/index61.js +1 -1
  60. package/index62.js +1 -1
  61. package/index63.js +4 -4
  62. package/index64.js +3 -3
  63. package/index65.js +3 -3
  64. package/index66.js +1 -1
  65. package/index67.js +3 -3
  66. package/index68.js +2 -2
  67. package/index69.js +1 -1
  68. package/index71.js +1 -1
  69. package/index76.js +5 -5
  70. package/index77.js +2 -2
  71. package/index78.js +2 -2
  72. package/index79.js +1 -1
  73. package/index80.js +226 -227
  74. package/index81.js +197 -199
  75. package/index82.js +192 -195
  76. package/index83.js +181 -183
  77. package/index84.js +52 -54
  78. package/index85.js +261 -262
  79. package/index86.js +262 -262
  80. package/index87.js +209 -211
  81. package/index88.js +436 -440
  82. package/index89.js +962 -964
  83. package/index90.js +2401 -2399
  84. package/index92.js +5 -5
  85. package/index93.js +1 -1
  86. package/index94.js +1 -1
  87. package/link/Link.d.ts +2 -2
  88. package/link-button/LinkButton.d.ts +1 -1
  89. package/package.json +7 -1
  90. package/{react.esm-D8HpDGKP.js → react.esm-sMU8Z7rL.js} +1872 -1872
  91. package/textfield/index.d.ts +0 -2
  92. package/{useControlledState-S_TYcV_c.js → useControlledState-DrAoodI6.js} +1 -1
  93. package/{useDescription-D4_zk_sA.js → useDescription-BPs7eRff.js} +1 -1
  94. package/useField-Dz62UHCP.js +67 -0
  95. package/{useFilter-BnJDBCkt.js → useFilter-ViwzkzZe.js} +1 -1
  96. package/useFocusRing-BKGhL91C.js +1297 -0
  97. package/{useFocusable-C-N9wcwm.js → useFocusable-CRSmYEQc.js} +11 -8
  98. package/{useGridSelectionCheckbox-i1rsjlC-.js → useGridSelectionCheckbox-CVEvUCJL.js} +3 -3
  99. package/useHasTabbableChild-C8y4fwiY.js +34 -0
  100. package/{useHighlightSelectionDescription-JVx2MW_e.js → useHighlightSelectionDescription-CD74uzLh.js} +19 -19
  101. package/useListState-DKnP5TB5.js +119 -0
  102. package/{useLocalizedStringFormatter-DVCAZqcL.js → useLocalizedStringFormatter-DsZ-ZWSk.js} +29 -29
  103. package/{useSingleSelectListState-CmX9_L5H.js → useSingleSelectListState-BHTLh8Ob.js} +5 -5
  104. package/Button-CCevm2s3.js +0 -183
  105. package/Checkbox-CllWDBxF.js +0 -405
  106. package/Dialog-CLTyYwkS.js +0 -1889
  107. package/DragAndDrop-OTN7La7U.js +0 -42
  108. package/FocusScope-BR0SJ-cZ.js +0 -512
  109. package/Form-DXLoQL91.js +0 -240
  110. package/Group-DPMuN3h8.js +0 -44
  111. package/Label-C18A_4Z5.js +0 -69
  112. package/Link-BU1h3K2a.js +0 -77
  113. package/ListBox-D21tdwTs.js +0 -463
  114. package/ListKeyboardDelegate-DxMjfMsI.js +0 -172
  115. package/SelectionManager-D4WtKtey.js +0 -988
  116. package/Separator-DLUHK9vv.js +0 -48
  117. package/Tag-CEd6WWSc.js +0 -725
  118. package/Text-DGLaY3HR.js +0 -17
  119. package/TextField-C_hq9WeT.js +0 -226
  120. package/TextField.module-Cwq1FAm7.js +0 -141
  121. package/index-CEg5vZQH.js +0 -132
  122. package/index-CgfokhRq.js +0 -674
  123. package/useFocusRing-D97-G3fT.js +0 -1324
  124. package/useHasTabbableChild-DeuCnGGv.js +0 -34
  125. package/useListState-DSOTbsL3.js +0 -119
package/Text-DGLaY3HR.js DELETED
@@ -1,17 +0,0 @@
1
- import { a as r } from "./useFocusRing-D97-G3fT.js";
2
- import o, { forwardRef as $, createContext as f } from "react";
3
- const n = /* @__PURE__ */ f({});
4
- function m(e, t) {
5
- [e, t] = r(e, t, n);
6
- let { elementType: a = "span", ...c } = e;
7
- return /* @__PURE__ */ o.createElement(a, {
8
- className: "react-aria-Text",
9
- ...c,
10
- ref: t
11
- });
12
- }
13
- const s = /* @__PURE__ */ $(m);
14
- export {
15
- n as $,
16
- s as a
17
- };
@@ -1,226 +0,0 @@
1
- import { jsx as r, jsxs as u, Fragment as I } from "react/jsx-runtime";
2
- import $, { forwardRef as E, createContext as w, useRef as B, useState as S, useCallback as D } from "react";
3
- import { c as V, d as k, e as O } from "./Form-DXLoQL91.js";
4
- import { $ as _, a as q, T as i, b as A } from "./TextField.module-Cwq1FAm7.js";
5
- import { a as j, b as C } from "./Label-C18A_4Z5.js";
6
- import { $ as W, a as T } from "./Text-DGLaY3HR.js";
7
- import { a as N, b as L, c as z, d as y, e as G, u as J, v as K, w as M, n as Q, x as U } from "./useFocusRing-D97-G3fT.js";
8
- import { Button as X } from "./index69.js";
9
- import { c as Y } from "./clsx-OuTLNxxd.js";
10
- const H = /* @__PURE__ */ w({});
11
- let Z = (e) => {
12
- let { onHoverStart: t, onHoverChange: a, onHoverEnd: d, ...s } = e;
13
- return s;
14
- };
15
- function ee(e, t) {
16
- [e, t] = N(e, t, H);
17
- let { hoverProps: a, isHovered: d } = L(e), { isFocused: s, isFocusVisible: n, focusProps: c } = z({
18
- isTextInput: !0,
19
- autoFocus: e.autoFocus
20
- }), o = !!e["aria-invalid"] && e["aria-invalid"] !== "false", f = y({
21
- ...e,
22
- values: {
23
- isHovered: d,
24
- isFocused: s,
25
- isFocusVisible: n,
26
- isDisabled: e.disabled || !1,
27
- isInvalid: o
28
- },
29
- defaultClassName: "react-aria-TextArea"
30
- });
31
- return /* @__PURE__ */ $.createElement("textarea", {
32
- ...G(Z(e), c, a),
33
- ...f,
34
- ref: t,
35
- "data-focused": s || void 0,
36
- "data-disabled": e.disabled || void 0,
37
- "data-hovered": d || void 0,
38
- "data-focus-visible": n || void 0,
39
- "data-invalid": o || void 0
40
- });
41
- }
42
- const pe = /* @__PURE__ */ E(ee), te = /* @__PURE__ */ w(null);
43
- function ae(e, t) {
44
- [e, t] = N(e, t, te);
45
- let { validationBehavior: a } = J(V) || {};
46
- var d, s;
47
- let n = (s = (d = e.validationBehavior) !== null && d !== void 0 ? d : a) !== null && s !== void 0 ? s : "native", c = B(null), [o, f] = K(), [p, b] = S("input"), { labelProps: x, inputProps: v, descriptionProps: l, errorMessageProps: m, ...h } = _({
48
- ...M(e),
49
- inputElementType: p,
50
- label: f,
51
- validationBehavior: n
52
- }, c), g = D((P) => {
53
- c.current = P, P && b(P instanceof HTMLTextAreaElement ? "textarea" : "input");
54
- }, []), F = y({
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
- }), R = Q(e);
64
- return delete R.id, /* @__PURE__ */ $.createElement("div", {
65
- ...R,
66
- ...F,
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__ */ $.createElement(U, {
74
- values: [
75
- [
76
- j,
77
- {
78
- ...x,
79
- ref: o
80
- }
81
- ],
82
- [
83
- q,
84
- {
85
- ...v,
86
- ref: g
87
- }
88
- ],
89
- [
90
- H,
91
- {
92
- ...v,
93
- ref: g
94
- }
95
- ],
96
- [
97
- W,
98
- {
99
- slots: {
100
- description: l,
101
- errorMessage: m
102
- }
103
- }
104
- ],
105
- [
106
- k,
107
- h
108
- ]
109
- ]
110
- }, F.children));
111
- }
112
- const de = /* @__PURE__ */ E(ae), xe = ({
113
- label: e,
114
- description: t,
115
- errorMessage: a,
116
- validationType: d,
117
- validate: s,
118
- maxCharacters: n,
119
- showCounter: c,
120
- ...o
121
- }) => {
122
- const [f, p] = $.useState(""), b = (l) => {
123
- const m = l.target.value;
124
- p(m);
125
- }, x = (l) => d === "ssn" ? se.test(l) ? null : "Felaktigt personnummer" : d instanceof RegExp ? new RegExp(d).test(l) ? null : a == null ? void 0 : a.toString() : n ? n && l.length > n ? `Du har angett ${l.length - n} tecken för mycket. Fältet är begränsat till ${n} tecken.` : null : s ? s(l) : !0, v = () => n ? /* @__PURE__ */ u(
126
- "span",
127
- {
128
- className: Y(
129
- i.count,
130
- f.length > n && i.countExceeded
131
- ),
132
- children: [
133
- f.length,
134
- " / ",
135
- n
136
- ]
137
- }
138
- ) : c ? /* @__PURE__ */ r("span", { className: i.count, children: f.length }) : null;
139
- return /* @__PURE__ */ r(
140
- de,
141
- {
142
- className: i.inputField,
143
- validate: x,
144
- ...o,
145
- children: /* @__PURE__ */ u(
146
- ie,
147
- {
148
- label: e,
149
- description: t,
150
- errorMessage: a,
151
- children: [
152
- /* @__PURE__ */ r(v, {}),
153
- /* @__PURE__ */ u("div", { className: i.wrap, children: [
154
- /* @__PURE__ */ r(
155
- A,
156
- {
157
- type: o.type,
158
- className: i.input,
159
- onChange: b,
160
- onBlur: b
161
- }
162
- ),
163
- /* @__PURE__ */ r(
164
- ne,
165
- {
166
- type: o.type,
167
- input: f
168
- }
169
- )
170
- ] })
171
- ]
172
- }
173
- )
174
- }
175
- );
176
- }, ne = ({
177
- type: e,
178
- input: t
179
- }) => {
180
- const [a, d] = $.useState(!1);
181
- return e === "password" ? /* @__PURE__ */ u(I, { children: [
182
- a && /* @__PURE__ */ r(
183
- T,
184
- {
185
- slot: "description",
186
- className: i.passwordText,
187
- children: t
188
- }
189
- ),
190
- /* @__PURE__ */ r(
191
- X,
192
- {
193
- variant: "tertiary",
194
- onPress: () => d(!a),
195
- className: i.passwordButton,
196
- children: a ? "Dölj" : "Visa"
197
- }
198
- )
199
- ] }) : null;
200
- }, ie = ({
201
- label: e,
202
- description: t,
203
- errorMessage: a,
204
- children: d
205
- }) => /* @__PURE__ */ u("div", { className: i.inputWrapper, children: [
206
- e && /* @__PURE__ */ r(C, { className: i.label, children: e }),
207
- t && /* @__PURE__ */ r(
208
- T,
209
- {
210
- slot: "description",
211
- className: i.text,
212
- children: t
213
- }
214
- ),
215
- /* @__PURE__ */ r(O, { className: i.fieldError, children: a }),
216
- d
217
- ] }), se = new RegExp(
218
- "^(?:(?: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}))$"
219
- );
220
- export {
221
- de as $,
222
- ie as I,
223
- xe as T,
224
- pe as a,
225
- se as s
226
- };
@@ -1,141 +0,0 @@
1
- import y, { useEffect as w, createContext as C } from "react";
2
- import { n as E, r as k, e as $, a as I, b as F, c as T, d as H } from "./useFocusRing-D97-G3fT.js";
3
- import { $ as R, a as M, b as S } from "./Form-DXLoQL91.js";
4
- import { $ as B } from "./useControlledState-S_TYcV_c.js";
5
- import { $ as V } from "./Label-C18A_4Z5.js";
6
- import { $ as W } from "./useFocusable-C-N9wcwm.js";
7
- import { $ as D } from "./Hidden-BQWDvze4.js";
8
- import './TextField.css';function xe(e, a) {
9
- let { inputElementType: d = "input", isDisabled: n = !1, isRequired: t = !1, isReadOnly: r = !1, type: l = "text", validationBehavior: o = "aria" } = e, [i, u] = B(e.value, e.defaultValue || "", e.onChange), { focusableProps: b } = W(e, a), f = R({
10
- ...e,
11
- value: i
12
- }), { isInvalid: c, validationErrors: p, validationDetails: v } = f.displayValidation, { labelProps: m, fieldProps: x, descriptionProps: _, errorMessageProps: g } = V({
13
- ...e,
14
- isInvalid: c,
15
- errorMessage: e.errorMessage || p
16
- }), P = E(e, {
17
- labelable: !0
18
- });
19
- const h = {
20
- type: l,
21
- pattern: e.pattern
22
- };
23
- return M(a, i, u), S(e, f, a), w(() => {
24
- if (a.current instanceof k(a.current).HTMLTextAreaElement) {
25
- let s = a.current;
26
- Object.defineProperty(s, "defaultValue", {
27
- get: () => s.value,
28
- set: () => {
29
- },
30
- configurable: !0
31
- });
32
- }
33
- }, [
34
- a
35
- ]), {
36
- labelProps: m,
37
- inputProps: $(P, d === "input" ? h : void 0, {
38
- disabled: n,
39
- readOnly: r,
40
- required: t && o === "native",
41
- "aria-required": t && o === "aria" || void 0,
42
- "aria-invalid": c || 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
- value: i,
48
- onChange: (s) => u(s.target.value),
49
- autoComplete: e.autoComplete,
50
- autoCapitalize: e.autoCapitalize,
51
- maxLength: e.maxLength,
52
- minLength: e.minLength,
53
- name: e.name,
54
- placeholder: e.placeholder,
55
- inputMode: e.inputMode,
56
- // Clipboard events
57
- onCopy: e.onCopy,
58
- onCut: e.onCut,
59
- onPaste: e.onPaste,
60
- // Composition events
61
- onCompositionEnd: e.onCompositionEnd,
62
- onCompositionStart: e.onCompositionStart,
63
- onCompositionUpdate: e.onCompositionUpdate,
64
- // Selection events
65
- onSelect: e.onSelect,
66
- // Input events
67
- onBeforeInput: e.onBeforeInput,
68
- onInput: e.onInput,
69
- ...b,
70
- ...x
71
- }),
72
- descriptionProps: _,
73
- errorMessageProps: g,
74
- isInvalid: c,
75
- validationErrors: p,
76
- validationDetails: v
77
- };
78
- }
79
- const L = /* @__PURE__ */ C({});
80
- let O = (e) => {
81
- let { onHoverStart: a, onHoverChange: d, onHoverEnd: n, ...t } = e;
82
- return t;
83
- };
84
- function q(e, a) {
85
- [e, a] = I(e, a, L);
86
- let { hoverProps: d, isHovered: n } = F(e), { isFocused: t, isFocusVisible: r, focusProps: l } = T({
87
- isTextInput: !0,
88
- autoFocus: e.autoFocus
89
- }), o = !!e["aria-invalid"] && e["aria-invalid"] !== "false", i = H({
90
- ...e,
91
- values: {
92
- isHovered: n,
93
- isFocused: t,
94
- isFocusVisible: r,
95
- isDisabled: e.disabled || !1,
96
- isInvalid: o
97
- },
98
- defaultClassName: "react-aria-Input"
99
- });
100
- return /* @__PURE__ */ y.createElement("input", {
101
- ...$(O(e), l, d),
102
- ...i,
103
- ref: a,
104
- "data-focused": t || void 0,
105
- "data-disabled": e.disabled || void 0,
106
- "data-hovered": n || void 0,
107
- "data-focus-visible": r || void 0,
108
- "data-invalid": o || void 0
109
- });
110
- }
111
- const _e = /* @__PURE__ */ D(q), z = '"../theme/tokens.css"', U = '"Inter", sans-serif', j = "#ffdfdf", A = "#f2f2f2", N = "#e6e6e6", G = "#bfbfbf", J = "#000000", K = "#e62323", Q = "500", X = "400", Y = "#1f1f1f", Z = "0 0 0 2px #ffffff, 0 0 0 4px #000000", ee = "_inputField_1kepw_4", ae = "_inputWrapper_1kepw_12", te = "_label_1kepw_30", ne = "_text_1kepw_36", oe = "_fieldError_1kepw_42", ie = "_passwordText_1kepw_66", de = "_count_1kepw_79", re = "_countExceeded_1kepw_87", se = "_input_1kepw_4", le = "_wrap_1kepw_130", ce = "_passwordButton_1kepw_135", ge = {
112
- tokens: z,
113
- display: U,
114
- signalRed10: j,
115
- gray10: A,
116
- gray20: N,
117
- gray50: G,
118
- black: J,
119
- signalRed100: K,
120
- mediumWeight: Q,
121
- regularWeight: X,
122
- inputText: Y,
123
- focus: Z,
124
- inputField: ee,
125
- inputWrapper: ae,
126
- label: te,
127
- text: ne,
128
- fieldError: oe,
129
- passwordText: ie,
130
- count: de,
131
- countExceeded: re,
132
- input: se,
133
- wrap: le,
134
- passwordButton: ce
135
- };
136
- export {
137
- xe as $,
138
- ge as T,
139
- L as a,
140
- _e as b
141
- };
package/index-CEg5vZQH.js DELETED
@@ -1,132 +0,0 @@
1
- import V from "react";
2
- var R = { exports: {} }, w = {};
3
- /**
4
- * @license React
5
- * use-sync-external-store-shim.production.min.js
6
- *
7
- * Copyright (c) Facebook, Inc. and its 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 A;
13
- function G() {
14
- if (A) return w;
15
- A = 1;
16
- var r = V;
17
- function O(t, o) {
18
- return t === o && (t !== 0 || 1 / t === 1 / o) || t !== t && o !== o;
19
- }
20
- var p = typeof Object.is == "function" ? Object.is : O, h = r.useState, y = r.useEffect, v = r.useLayoutEffect, m = r.useDebugValue;
21
- function L(t, o) {
22
- var a = o(), S = h({ inst: { value: a, getSnapshot: o } }), i = S[0].inst, d = S[1];
23
- return v(function() {
24
- i.value = a, i.getSnapshot = o, f(i) && d({ inst: i });
25
- }, [t, a, o]), y(function() {
26
- return f(i) && d({ inst: i }), t(function() {
27
- f(i) && d({ inst: i });
28
- });
29
- }, [t]), m(a), a;
30
- }
31
- function f(t) {
32
- var o = t.getSnapshot;
33
- t = t.value;
34
- try {
35
- var a = o();
36
- return !p(t, a);
37
- } catch {
38
- return !0;
39
- }
40
- }
41
- function g(t, o) {
42
- return o();
43
- }
44
- var E = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? g : L;
45
- return w.useSyncExternalStore = r.useSyncExternalStore !== void 0 ? r.useSyncExternalStore : E, w;
46
- }
47
- var T = {};
48
- /**
49
- * @license React
50
- * use-sync-external-store-shim.development.js
51
- *
52
- * Copyright (c) Facebook, Inc. and its affiliates.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE file in the root directory of this source tree.
56
- */
57
- var D;
58
- function B() {
59
- return D || (D = 1, process.env.NODE_ENV !== "production" && function() {
60
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
61
- var r = V, O = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
62
- function p(n) {
63
- {
64
- for (var e = arguments.length, s = new Array(e > 1 ? e - 1 : 0), u = 1; u < e; u++)
65
- s[u - 1] = arguments[u];
66
- h("error", n, s);
67
- }
68
- }
69
- function h(n, e, s) {
70
- {
71
- var u = O.ReactDebugCurrentFrame, l = u.getStackAddendum();
72
- l !== "" && (e += "%s", s = s.concat([l]));
73
- var _ = s.map(function(c) {
74
- return String(c);
75
- });
76
- _.unshift("Warning: " + e), Function.prototype.apply.call(console[n], console, _);
77
- }
78
- }
79
- function y(n, e) {
80
- return n === e && (n !== 0 || 1 / n === 1 / e) || n !== n && e !== e;
81
- }
82
- var v = typeof Object.is == "function" ? Object.is : y, m = r.useState, L = r.useEffect, f = r.useLayoutEffect, g = r.useDebugValue, E = !1, t = !1;
83
- function o(n, e, s) {
84
- E || r.startTransition !== void 0 && (E = !0, p("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."));
85
- var u = e();
86
- if (!t) {
87
- var l = e();
88
- v(u, l) || (p("The result of getSnapshot should be cached to avoid an infinite loop"), t = !0);
89
- }
90
- var _ = m({
91
- inst: {
92
- value: u,
93
- getSnapshot: e
94
- }
95
- }), c = _[0].inst, x = _[1];
96
- return f(function() {
97
- c.value = u, c.getSnapshot = e, a(c) && x({
98
- inst: c
99
- });
100
- }, [n, u, e]), L(function() {
101
- a(c) && x({
102
- inst: c
103
- });
104
- var U = function() {
105
- a(c) && x({
106
- inst: c
107
- });
108
- };
109
- return n(U);
110
- }, [n]), g(u), u;
111
- }
112
- function a(n) {
113
- var e = n.getSnapshot, s = n.value;
114
- try {
115
- var u = e();
116
- return !v(s, u);
117
- } catch {
118
- return !0;
119
- }
120
- }
121
- function S(n, e, s) {
122
- return e();
123
- }
124
- var i = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", d = !i, C = d ? S : o, I = r.useSyncExternalStore !== void 0 ? r.useSyncExternalStore : C;
125
- T.useSyncExternalStore = I, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
126
- }()), T;
127
- }
128
- process.env.NODE_ENV === "production" ? R.exports = G() : R.exports = B();
129
- var H = R.exports;
130
- export {
131
- H as s
132
- };