@pismo/marola 0.0.1-alpha.1 → 0.0.1-alpha.12

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 (136) hide show
  1. package/README.md +17 -5
  2. package/dist/Button-B1umG8kJ.js +131 -0
  3. package/dist/ClickAwayListener-HI1G6ob9.js +107 -0
  4. package/dist/Dialog.module-CGVM5V_D.js +15 -0
  5. package/dist/Popup-DFJQc_jn.js +1249 -0
  6. package/dist/Portal-D__zvwbZ.js +73 -0
  7. package/dist/SelectButton-DWtqAiwt.js +45 -0
  8. package/dist/Tabs.module-jkH1Qjn7.js +22 -0
  9. package/dist/_commonjsHelpers-CT_km90n.js +30 -0
  10. package/dist/assets/Advice.css +1 -0
  11. package/dist/assets/Button.css +1 -0
  12. package/dist/assets/Checkbox.css +1 -0
  13. package/dist/assets/Dialog.css +1 -1
  14. package/dist/assets/IconButton.css +1 -0
  15. package/dist/assets/Input.css +1 -0
  16. package/dist/assets/InputSearch.css +1 -0
  17. package/dist/assets/LoadingSpinner.css +1 -1
  18. package/dist/assets/PageHeader.css +1 -0
  19. package/dist/assets/Pagination.css +1 -0
  20. package/dist/assets/SelectButton.css +1 -0
  21. package/dist/assets/Skeleton.css +1 -0
  22. package/dist/assets/Snackbar.css +1 -0
  23. package/dist/assets/SortTooltip.css +1 -0
  24. package/dist/assets/Stepper.css +1 -0
  25. package/dist/assets/Table.css +1 -0
  26. package/dist/assets/Tabs.css +1 -0
  27. package/dist/assets/Toggle.css +1 -0
  28. package/dist/assets/Tooltip.css +1 -0
  29. package/dist/assets/Typography.css +1 -1
  30. package/dist/assets/global.css +1 -0
  31. package/dist/combineHooksSlotProps-BHqhiBfc.js +81 -0
  32. package/dist/components/Advice/Advice.d.ts +16 -0
  33. package/dist/components/Advice/Advice.js +25 -0
  34. package/dist/components/Button/Button.d.ts +29 -0
  35. package/dist/components/Button/Button.js +70 -0
  36. package/dist/components/Button/Button.stories.d.ts +60 -0
  37. package/dist/components/Button/Button.stories.js +41 -0
  38. package/dist/components/Checkbox/Checkbox.d.ts +19 -0
  39. package/dist/components/Checkbox/Checkbox.js +56 -0
  40. package/dist/components/Dialog/Actions.js +1 -1
  41. package/dist/components/Dialog/Backdrop.d.ts +1 -1
  42. package/dist/components/Dialog/Backdrop.js +2 -9
  43. package/dist/components/Dialog/CloseIconButton.js +11 -10
  44. package/dist/components/Dialog/Dialog.d.ts +5 -4
  45. package/dist/components/Dialog/Dialog.js +420 -20077
  46. package/dist/components/Dialog/Dialog.stories.d.ts +343 -0
  47. package/dist/components/Dialog/Dialog.stories.js +60 -0
  48. package/dist/components/Dialog/Title.js +22 -7
  49. package/dist/components/Icon/Icon.d.ts +18 -0
  50. package/dist/components/Icon/Icon.js +95 -0
  51. package/dist/components/IconButton/IconButton.d.ts +22 -0
  52. package/dist/components/IconButton/IconButton.js +68 -0
  53. package/dist/components/Input/Input.d.ts +44 -0
  54. package/dist/components/Input/Input.js +497 -0
  55. package/dist/components/Input/Input.stories.d.ts +43 -0
  56. package/dist/components/Input/Input.stories.js +106 -0
  57. package/dist/components/InputSearch/InputSearch.d.ts +11 -0
  58. package/dist/components/InputSearch/InputSearch.js +29 -0
  59. package/dist/components/InputSearch/InputSearch.stories.d.ts +22 -0
  60. package/dist/components/InputSearch/InputSearch.stories.js +36 -0
  61. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +2 -0
  62. package/dist/components/LoadingSpinner/LoadingSpinner.js +12 -13
  63. package/dist/components/LoadingSpinner/LoadingSpinner.stories.d.ts +14 -0
  64. package/dist/components/LoadingSpinner/LoadingSpinner.stories.js +39 -0
  65. package/dist/components/PageHeader/PageHeader.d.ts +36 -0
  66. package/dist/components/PageHeader/PageHeader.js +51 -0
  67. package/dist/components/PageHeader/PageHeader.stories.d.ts +43 -0
  68. package/dist/components/PageHeader/PageHeader.stories.js +49 -0
  69. package/dist/components/Pagination/Pagination.d.ts +36 -0
  70. package/dist/components/Pagination/Pagination.js +219 -0
  71. package/dist/components/Select/Select.d.ts +25 -0
  72. package/dist/components/Select/Select.js +860 -0
  73. package/dist/components/Select/Select.stories.d.ts +31 -0
  74. package/dist/components/Select/Select.stories.js +66 -0
  75. package/dist/components/Select/SelectButton.d.ts +13 -0
  76. package/dist/components/Select/SelectButton.js +8 -0
  77. package/dist/components/Skeleton/Skeleton.d.ts +18 -0
  78. package/dist/components/Skeleton/Skeleton.js +26 -0
  79. package/dist/components/Snackbar/Snackbar.d.ts +13 -0
  80. package/dist/components/Snackbar/Snackbar.js +623 -0
  81. package/dist/components/SortTooltip/SortTooltip.d.ts +26 -0
  82. package/dist/components/SortTooltip/SortTooltip.js +67 -0
  83. package/dist/components/Stepper/Stepper.d.ts +16 -0
  84. package/dist/components/Stepper/Stepper.js +33 -0
  85. package/dist/components/Table/Table.d.ts +39 -0
  86. package/dist/components/Table/Table.js +122 -0
  87. package/dist/components/Table/TableContext.d.ts +19 -0
  88. package/dist/components/Table/TableContext.js +21 -0
  89. package/dist/components/Tabs/Tab.d.ts +9 -0
  90. package/dist/components/Tabs/Tab.js +182 -0
  91. package/dist/components/Tabs/TabPanel.d.ts +8 -0
  92. package/dist/components/Tabs/TabPanel.js +119 -0
  93. package/dist/components/Tabs/Tabs.d.ts +11 -0
  94. package/dist/components/Tabs/Tabs.js +402 -0
  95. package/dist/components/Toggle/Toggle.d.ts +11 -0
  96. package/dist/components/Toggle/Toggle.js +252 -0
  97. package/dist/components/Toggle/Toggle.stories.d.ts +21 -0
  98. package/dist/components/Toggle/Toggle.stories.js +33 -0
  99. package/dist/components/Tooltip/Tooltip.d.ts +17 -0
  100. package/dist/components/Tooltip/Tooltip.js +127 -0
  101. package/dist/components/Typography/Typography.d.ts +15 -6
  102. package/dist/components/Typography/Typography.js +75 -67
  103. package/dist/components/Typography/Typography.stories.d.ts +31 -0
  104. package/dist/components/Typography/Typography.stories.js +31 -0
  105. package/dist/components/Typography/typography.test.d.ts +1 -0
  106. package/dist/components/Typography/typography.test.js +11358 -0
  107. package/dist/index-BJ8HbRCy.js +19585 -0
  108. package/dist/index-CqjC7P5Y.js +814 -0
  109. package/dist/magic-string.es-O_8lTkE3.js +738 -0
  110. package/dist/main.d.ts +19 -2
  111. package/dist/main.js +60 -15
  112. package/dist/objectWithoutPropertiesLoose-D7Cp0Pg_.js +26 -0
  113. package/dist/test-utils/assertStyles.d.ts +1 -0
  114. package/dist/test-utils/assertStyles.js +11 -0
  115. package/dist/types/helpers.d.ts +14 -7
  116. package/dist/useButton-Bc8IAgyk.js +106 -0
  117. package/dist/useCompoundItem-D1iRfg8D.js +84 -0
  118. package/dist/useControlled-CCMYYdCM.js +31 -0
  119. package/dist/useEnhancedEffect-CJGo-L3B.js +5 -0
  120. package/dist/useEventCallback-vAfOD-oT.js +45 -0
  121. package/dist/useIsFocusVisible-BH4IAdcw.js +69 -0
  122. package/dist/useList-ByMguSS_.js +437 -0
  123. package/dist/useTimeout-DxF9kiZL.js +36 -0
  124. package/dist/utils/styleStrings.d.ts +6 -0
  125. package/dist/utils/styleStrings.js +10 -0
  126. package/dist/utils/styleStrings.test.d.ts +1 -0
  127. package/dist/utils/styleStrings.test.js +41 -0
  128. package/dist/vi.Y_w82WR8-Df0JUamG.js +9860 -0
  129. package/package.json +53 -10
  130. package/dist/Button-REznN-RP.js +0 -1139
  131. package/dist/Dialog.module-BO0mdB7d.js +0 -15
  132. package/dist/assets/CallToActionButton.css +0 -1
  133. package/dist/assets/main.css +0 -1
  134. package/dist/components/CallToActionButton/CallToActionButton.d.ts +0 -23
  135. package/dist/components/CallToActionButton/CallToActionButton.js +0 -57
  136. package/src/playground/Playground.tsx +0 -58
@@ -1,1139 +0,0 @@
1
- import * as q from "react";
2
- import { jsx as De } from "react/jsx-runtime";
3
- import { c as be } from "./clsx-DB4S2d7J.js";
4
- function V() {
5
- return V = Object.assign ? Object.assign.bind() : function(e) {
6
- for (var t = 1; t < arguments.length; t++) {
7
- var r = arguments[t];
8
- for (var o in r)
9
- Object.prototype.hasOwnProperty.call(r, o) && (e[o] = r[o]);
10
- }
11
- return e;
12
- }, V.apply(this, arguments);
13
- }
14
- function ke(e) {
15
- return typeof e == "string";
16
- }
17
- function Fe(e, t, r) {
18
- return e === void 0 || ke(e) ? t : V({}, t, {
19
- ownerState: V({}, t.ownerState, r)
20
- });
21
- }
22
- const Ve = {
23
- disableDefaultClasses: !1
24
- }, xe = /* @__PURE__ */ q.createContext(Ve);
25
- process.env.NODE_ENV !== "production" && (xe.displayName = "ClassNameConfiguratorContext");
26
- function Le(e) {
27
- const {
28
- disableDefaultClasses: t
29
- } = q.useContext(xe);
30
- return (r) => t ? "" : e(r);
31
- }
32
- function fe(e, t = []) {
33
- if (e === void 0)
34
- return {};
35
- const r = {};
36
- return Object.keys(e).filter((o) => o.match(/^on[A-Z]/) && typeof e[o] == "function" && !t.includes(o)).forEach((o) => {
37
- r[o] = e[o];
38
- }), r;
39
- }
40
- function qe(e, t, r) {
41
- return typeof e == "function" ? e(t, r) : e;
42
- }
43
- function Ue(e) {
44
- const {
45
- rootElementName: t = "",
46
- componentName: r
47
- } = e, [o, c] = q.useState(t.toUpperCase());
48
- process.env.NODE_ENV !== "production" && q.useEffect(() => {
49
- t && o !== t.toUpperCase() && console.error(`useRootElementName: the \`rootElementName\` prop of ${r ? `the ${r} component` : "a component"} expected the '${t}' element, but a '${o.toLowerCase()}' was rendered instead`, "This may cause hydration issues in an SSR context, for example in a Next.js app");
50
- }, [t, o, r]);
51
- const s = q.useCallback((d) => {
52
- var f;
53
- c((f = d == null ? void 0 : d.tagName) != null ? f : "");
54
- }, []);
55
- return [o, s];
56
- }
57
- function we(e, t) {
58
- if (e == null)
59
- return {};
60
- var r = {}, o = Object.keys(e), c, s;
61
- for (s = 0; s < o.length; s++)
62
- c = o[s], !(t.indexOf(c) >= 0) && (r[c] = e[c]);
63
- return r;
64
- }
65
- function We(e) {
66
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
67
- }
68
- var de = { exports: {} }, te = { exports: {} }, w = {};
69
- /** @license React v16.13.1
70
- * react-is.production.min.js
71
- *
72
- * Copyright (c) Facebook, Inc. and its affiliates.
73
- *
74
- * This source code is licensed under the MIT license found in the
75
- * LICENSE file in the root directory of this source tree.
76
- */
77
- var he;
78
- function Ye() {
79
- if (he)
80
- return w;
81
- he = 1;
82
- var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, c = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, d = e ? Symbol.for("react.provider") : 60109, f = e ? Symbol.for("react.context") : 60110, P = e ? Symbol.for("react.async_mode") : 60111, y = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, S = e ? Symbol.for("react.suspense_list") : 60120, N = e ? Symbol.for("react.memo") : 60115, D = e ? Symbol.for("react.lazy") : 60116, _ = e ? Symbol.for("react.block") : 60121, $ = e ? Symbol.for("react.fundamental") : 60117, k = e ? Symbol.for("react.responder") : 60118, U = e ? Symbol.for("react.scope") : 60119;
83
- function M(a) {
84
- if (typeof a == "object" && a !== null) {
85
- var K = a.$$typeof;
86
- switch (K) {
87
- case t:
88
- switch (a = a.type, a) {
89
- case P:
90
- case y:
91
- case o:
92
- case s:
93
- case c:
94
- case m:
95
- return a;
96
- default:
97
- switch (a = a && a.$$typeof, a) {
98
- case f:
99
- case p:
100
- case D:
101
- case N:
102
- case d:
103
- return a;
104
- default:
105
- return K;
106
- }
107
- }
108
- case r:
109
- return K;
110
- }
111
- }
112
- }
113
- function j(a) {
114
- return M(a) === y;
115
- }
116
- return w.AsyncMode = P, w.ConcurrentMode = y, w.ContextConsumer = f, w.ContextProvider = d, w.Element = t, w.ForwardRef = p, w.Fragment = o, w.Lazy = D, w.Memo = N, w.Portal = r, w.Profiler = s, w.StrictMode = c, w.Suspense = m, w.isAsyncMode = function(a) {
117
- return j(a) || M(a) === P;
118
- }, w.isConcurrentMode = j, w.isContextConsumer = function(a) {
119
- return M(a) === f;
120
- }, w.isContextProvider = function(a) {
121
- return M(a) === d;
122
- }, w.isElement = function(a) {
123
- return typeof a == "object" && a !== null && a.$$typeof === t;
124
- }, w.isForwardRef = function(a) {
125
- return M(a) === p;
126
- }, w.isFragment = function(a) {
127
- return M(a) === o;
128
- }, w.isLazy = function(a) {
129
- return M(a) === D;
130
- }, w.isMemo = function(a) {
131
- return M(a) === N;
132
- }, w.isPortal = function(a) {
133
- return M(a) === r;
134
- }, w.isProfiler = function(a) {
135
- return M(a) === s;
136
- }, w.isStrictMode = function(a) {
137
- return M(a) === c;
138
- }, w.isSuspense = function(a) {
139
- return M(a) === m;
140
- }, w.isValidElementType = function(a) {
141
- return typeof a == "string" || typeof a == "function" || a === o || a === y || a === s || a === c || a === m || a === S || typeof a == "object" && a !== null && (a.$$typeof === D || a.$$typeof === N || a.$$typeof === d || a.$$typeof === f || a.$$typeof === p || a.$$typeof === $ || a.$$typeof === k || a.$$typeof === U || a.$$typeof === _);
142
- }, w.typeOf = M, w;
143
- }
144
- var A = {};
145
- /** @license React v16.13.1
146
- * react-is.development.js
147
- *
148
- * Copyright (c) Facebook, Inc. and its affiliates.
149
- *
150
- * This source code is licensed under the MIT license found in the
151
- * LICENSE file in the root directory of this source tree.
152
- */
153
- var Ee;
154
- function Be() {
155
- return Ee || (Ee = 1, process.env.NODE_ENV !== "production" && function() {
156
- var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, c = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, d = e ? Symbol.for("react.provider") : 60109, f = e ? Symbol.for("react.context") : 60110, P = e ? Symbol.for("react.async_mode") : 60111, y = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, S = e ? Symbol.for("react.suspense_list") : 60120, N = e ? Symbol.for("react.memo") : 60115, D = e ? Symbol.for("react.lazy") : 60116, _ = e ? Symbol.for("react.block") : 60121, $ = e ? Symbol.for("react.fundamental") : 60117, k = e ? Symbol.for("react.responder") : 60118, U = e ? Symbol.for("react.scope") : 60119;
157
- function M(i) {
158
- return typeof i == "string" || typeof i == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
159
- i === o || i === y || i === s || i === c || i === m || i === S || typeof i == "object" && i !== null && (i.$$typeof === D || i.$$typeof === N || i.$$typeof === d || i.$$typeof === f || i.$$typeof === p || i.$$typeof === $ || i.$$typeof === k || i.$$typeof === U || i.$$typeof === _);
160
- }
161
- function j(i) {
162
- if (typeof i == "object" && i !== null) {
163
- var B = i.$$typeof;
164
- switch (B) {
165
- case t:
166
- var ee = i.type;
167
- switch (ee) {
168
- case P:
169
- case y:
170
- case o:
171
- case s:
172
- case c:
173
- case m:
174
- return ee;
175
- default:
176
- var me = ee && ee.$$typeof;
177
- switch (me) {
178
- case f:
179
- case p:
180
- case D:
181
- case N:
182
- case d:
183
- return me;
184
- default:
185
- return B;
186
- }
187
- }
188
- case r:
189
- return B;
190
- }
191
- }
192
- }
193
- var a = P, K = y, z = f, Z = d, G = t, Q = p, X = o, J = D, L = N, H = r, b = s, l = c, x = m, Y = !1;
194
- function ne(i) {
195
- return Y || (Y = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), n(i) || j(i) === P;
196
- }
197
- function n(i) {
198
- return j(i) === y;
199
- }
200
- function u(i) {
201
- return j(i) === f;
202
- }
203
- function T(i) {
204
- return j(i) === d;
205
- }
206
- function E(i) {
207
- return typeof i == "object" && i !== null && i.$$typeof === t;
208
- }
209
- function v(i) {
210
- return j(i) === p;
211
- }
212
- function R(i) {
213
- return j(i) === o;
214
- }
215
- function h(i) {
216
- return j(i) === D;
217
- }
218
- function g(i) {
219
- return j(i) === N;
220
- }
221
- function O(i) {
222
- return j(i) === r;
223
- }
224
- function I(i) {
225
- return j(i) === s;
226
- }
227
- function C(i) {
228
- return j(i) === c;
229
- }
230
- function W(i) {
231
- return j(i) === m;
232
- }
233
- A.AsyncMode = a, A.ConcurrentMode = K, A.ContextConsumer = z, A.ContextProvider = Z, A.Element = G, A.ForwardRef = Q, A.Fragment = X, A.Lazy = J, A.Memo = L, A.Portal = H, A.Profiler = b, A.StrictMode = l, A.Suspense = x, A.isAsyncMode = ne, A.isConcurrentMode = n, A.isContextConsumer = u, A.isContextProvider = T, A.isElement = E, A.isForwardRef = v, A.isFragment = R, A.isLazy = h, A.isMemo = g, A.isPortal = O, A.isProfiler = I, A.isStrictMode = C, A.isSuspense = W, A.isValidElementType = M, A.typeOf = j;
234
- }()), A;
235
- }
236
- var ge;
237
- function Ae() {
238
- return ge || (ge = 1, process.env.NODE_ENV === "production" ? te.exports = Ye() : te.exports = Be()), te.exports;
239
- }
240
- /*
241
- object-assign
242
- (c) Sindre Sorhus
243
- @license MIT
244
- */
245
- var oe, Te;
246
- function Ke() {
247
- if (Te)
248
- return oe;
249
- Te = 1;
250
- var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
251
- function o(s) {
252
- if (s == null)
253
- throw new TypeError("Object.assign cannot be called with null or undefined");
254
- return Object(s);
255
- }
256
- function c() {
257
- try {
258
- if (!Object.assign)
259
- return !1;
260
- var s = new String("abc");
261
- if (s[5] = "de", Object.getOwnPropertyNames(s)[0] === "5")
262
- return !1;
263
- for (var d = {}, f = 0; f < 10; f++)
264
- d["_" + String.fromCharCode(f)] = f;
265
- var P = Object.getOwnPropertyNames(d).map(function(p) {
266
- return d[p];
267
- });
268
- if (P.join("") !== "0123456789")
269
- return !1;
270
- var y = {};
271
- return "abcdefghijklmnopqrst".split("").forEach(function(p) {
272
- y[p] = p;
273
- }), Object.keys(Object.assign({}, y)).join("") === "abcdefghijklmnopqrst";
274
- } catch {
275
- return !1;
276
- }
277
- }
278
- return oe = c() ? Object.assign : function(s, d) {
279
- for (var f, P = o(s), y, p = 1; p < arguments.length; p++) {
280
- f = Object(arguments[p]);
281
- for (var m in f)
282
- t.call(f, m) && (P[m] = f[m]);
283
- if (e) {
284
- y = e(f);
285
- for (var S = 0; S < y.length; S++)
286
- r.call(f, y[S]) && (P[y[S]] = f[y[S]]);
287
- }
288
- }
289
- return P;
290
- }, oe;
291
- }
292
- var ae, Pe;
293
- function ye() {
294
- if (Pe)
295
- return ae;
296
- Pe = 1;
297
- var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
298
- return ae = e, ae;
299
- }
300
- var ie, Se;
301
- function Ie() {
302
- return Se || (Se = 1, ie = Function.call.bind(Object.prototype.hasOwnProperty)), ie;
303
- }
304
- var se, Re;
305
- function ze() {
306
- if (Re)
307
- return se;
308
- Re = 1;
309
- var e = function() {
310
- };
311
- if (process.env.NODE_ENV !== "production") {
312
- var t = ye(), r = {}, o = Ie();
313
- e = function(s) {
314
- var d = "Warning: " + s;
315
- typeof console < "u" && console.error(d);
316
- try {
317
- throw new Error(d);
318
- } catch {
319
- }
320
- };
321
- }
322
- function c(s, d, f, P, y) {
323
- if (process.env.NODE_ENV !== "production") {
324
- for (var p in s)
325
- if (o(s, p)) {
326
- var m;
327
- try {
328
- if (typeof s[p] != "function") {
329
- var S = Error(
330
- (P || "React class") + ": " + f + " type `" + p + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[p] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
331
- );
332
- throw S.name = "Invariant Violation", S;
333
- }
334
- m = s[p](d, p, P, f, null, t);
335
- } catch (D) {
336
- m = D;
337
- }
338
- if (m && !(m instanceof Error) && e(
339
- (P || "React class") + ": type specification of " + f + " `" + p + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof m + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
340
- ), m instanceof Error && !(m.message in r)) {
341
- r[m.message] = !0;
342
- var N = y ? y() : "";
343
- e(
344
- "Failed " + f + " type: " + m.message + (N ?? "")
345
- );
346
- }
347
- }
348
- }
349
- }
350
- return c.resetWarningCache = function() {
351
- process.env.NODE_ENV !== "production" && (r = {});
352
- }, se = c, se;
353
- }
354
- var ue, Oe;
355
- function He() {
356
- if (Oe)
357
- return ue;
358
- Oe = 1;
359
- var e = Ae(), t = Ke(), r = ye(), o = Ie(), c = ze(), s = function() {
360
- };
361
- process.env.NODE_ENV !== "production" && (s = function(f) {
362
- var P = "Warning: " + f;
363
- typeof console < "u" && console.error(P);
364
- try {
365
- throw new Error(P);
366
- } catch {
367
- }
368
- });
369
- function d() {
370
- return null;
371
- }
372
- return ue = function(f, P) {
373
- var y = typeof Symbol == "function" && Symbol.iterator, p = "@@iterator";
374
- function m(n) {
375
- var u = n && (y && n[y] || n[p]);
376
- if (typeof u == "function")
377
- return u;
378
- }
379
- var S = "<<anonymous>>", N = {
380
- array: k("array"),
381
- bigint: k("bigint"),
382
- bool: k("boolean"),
383
- func: k("function"),
384
- number: k("number"),
385
- object: k("object"),
386
- string: k("string"),
387
- symbol: k("symbol"),
388
- any: U(),
389
- arrayOf: M,
390
- element: j(),
391
- elementType: a(),
392
- instanceOf: K,
393
- node: Q(),
394
- objectOf: Z,
395
- oneOf: z,
396
- oneOfType: G,
397
- shape: J,
398
- exact: L
399
- };
400
- function D(n, u) {
401
- return n === u ? n !== 0 || 1 / n === 1 / u : n !== n && u !== u;
402
- }
403
- function _(n, u) {
404
- this.message = n, this.data = u && typeof u == "object" ? u : {}, this.stack = "";
405
- }
406
- _.prototype = Error.prototype;
407
- function $(n) {
408
- if (process.env.NODE_ENV !== "production")
409
- var u = {}, T = 0;
410
- function E(R, h, g, O, I, C, W) {
411
- if (O = O || S, C = C || g, W !== r) {
412
- if (P) {
413
- var i = new Error(
414
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
415
- );
416
- throw i.name = "Invariant Violation", i;
417
- } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
418
- var B = O + ":" + g;
419
- !u[B] && // Avoid spamming the console because they are often not actionable except for lib authors
420
- T < 3 && (s(
421
- "You are manually calling a React.PropTypes validation function for the `" + C + "` prop on `" + O + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
422
- ), u[B] = !0, T++);
423
- }
424
- }
425
- return h[g] == null ? R ? h[g] === null ? new _("The " + I + " `" + C + "` is marked as required " + ("in `" + O + "`, but its value is `null`.")) : new _("The " + I + " `" + C + "` is marked as required in " + ("`" + O + "`, but its value is `undefined`.")) : null : n(h, g, O, I, C);
426
- }
427
- var v = E.bind(null, !1);
428
- return v.isRequired = E.bind(null, !0), v;
429
- }
430
- function k(n) {
431
- function u(T, E, v, R, h, g) {
432
- var O = T[E], I = l(O);
433
- if (I !== n) {
434
- var C = x(O);
435
- return new _(
436
- "Invalid " + R + " `" + h + "` of type " + ("`" + C + "` supplied to `" + v + "`, expected ") + ("`" + n + "`."),
437
- { expectedType: n }
438
- );
439
- }
440
- return null;
441
- }
442
- return $(u);
443
- }
444
- function U() {
445
- return $(d);
446
- }
447
- function M(n) {
448
- function u(T, E, v, R, h) {
449
- if (typeof n != "function")
450
- return new _("Property `" + h + "` of component `" + v + "` has invalid PropType notation inside arrayOf.");
451
- var g = T[E];
452
- if (!Array.isArray(g)) {
453
- var O = l(g);
454
- return new _("Invalid " + R + " `" + h + "` of type " + ("`" + O + "` supplied to `" + v + "`, expected an array."));
455
- }
456
- for (var I = 0; I < g.length; I++) {
457
- var C = n(g, I, v, R, h + "[" + I + "]", r);
458
- if (C instanceof Error)
459
- return C;
460
- }
461
- return null;
462
- }
463
- return $(u);
464
- }
465
- function j() {
466
- function n(u, T, E, v, R) {
467
- var h = u[T];
468
- if (!f(h)) {
469
- var g = l(h);
470
- return new _("Invalid " + v + " `" + R + "` of type " + ("`" + g + "` supplied to `" + E + "`, expected a single ReactElement."));
471
- }
472
- return null;
473
- }
474
- return $(n);
475
- }
476
- function a() {
477
- function n(u, T, E, v, R) {
478
- var h = u[T];
479
- if (!e.isValidElementType(h)) {
480
- var g = l(h);
481
- return new _("Invalid " + v + " `" + R + "` of type " + ("`" + g + "` supplied to `" + E + "`, expected a single ReactElement type."));
482
- }
483
- return null;
484
- }
485
- return $(n);
486
- }
487
- function K(n) {
488
- function u(T, E, v, R, h) {
489
- if (!(T[E] instanceof n)) {
490
- var g = n.name || S, O = ne(T[E]);
491
- return new _("Invalid " + R + " `" + h + "` of type " + ("`" + O + "` supplied to `" + v + "`, expected ") + ("instance of `" + g + "`."));
492
- }
493
- return null;
494
- }
495
- return $(u);
496
- }
497
- function z(n) {
498
- if (!Array.isArray(n))
499
- return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s(
500
- "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
501
- ) : s("Invalid argument supplied to oneOf, expected an array.")), d;
502
- function u(T, E, v, R, h) {
503
- for (var g = T[E], O = 0; O < n.length; O++)
504
- if (D(g, n[O]))
505
- return null;
506
- var I = JSON.stringify(n, function(W, i) {
507
- var B = x(i);
508
- return B === "symbol" ? String(i) : i;
509
- });
510
- return new _("Invalid " + R + " `" + h + "` of value `" + String(g) + "` " + ("supplied to `" + v + "`, expected one of " + I + "."));
511
- }
512
- return $(u);
513
- }
514
- function Z(n) {
515
- function u(T, E, v, R, h) {
516
- if (typeof n != "function")
517
- return new _("Property `" + h + "` of component `" + v + "` has invalid PropType notation inside objectOf.");
518
- var g = T[E], O = l(g);
519
- if (O !== "object")
520
- return new _("Invalid " + R + " `" + h + "` of type " + ("`" + O + "` supplied to `" + v + "`, expected an object."));
521
- for (var I in g)
522
- if (o(g, I)) {
523
- var C = n(g, I, v, R, h + "." + I, r);
524
- if (C instanceof Error)
525
- return C;
526
- }
527
- return null;
528
- }
529
- return $(u);
530
- }
531
- function G(n) {
532
- if (!Array.isArray(n))
533
- return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), d;
534
- for (var u = 0; u < n.length; u++) {
535
- var T = n[u];
536
- if (typeof T != "function")
537
- return s(
538
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Y(T) + " at index " + u + "."
539
- ), d;
540
- }
541
- function E(v, R, h, g, O) {
542
- for (var I = [], C = 0; C < n.length; C++) {
543
- var W = n[C], i = W(v, R, h, g, O, r);
544
- if (i == null)
545
- return null;
546
- i.data && o(i.data, "expectedType") && I.push(i.data.expectedType);
547
- }
548
- var B = I.length > 0 ? ", expected one of type [" + I.join(", ") + "]" : "";
549
- return new _("Invalid " + g + " `" + O + "` supplied to " + ("`" + h + "`" + B + "."));
550
- }
551
- return $(E);
552
- }
553
- function Q() {
554
- function n(u, T, E, v, R) {
555
- return H(u[T]) ? null : new _("Invalid " + v + " `" + R + "` supplied to " + ("`" + E + "`, expected a ReactNode."));
556
- }
557
- return $(n);
558
- }
559
- function X(n, u, T, E, v) {
560
- return new _(
561
- (n || "React class") + ": " + u + " type `" + T + "." + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + v + "`."
562
- );
563
- }
564
- function J(n) {
565
- function u(T, E, v, R, h) {
566
- var g = T[E], O = l(g);
567
- if (O !== "object")
568
- return new _("Invalid " + R + " `" + h + "` of type `" + O + "` " + ("supplied to `" + v + "`, expected `object`."));
569
- for (var I in n) {
570
- var C = n[I];
571
- if (typeof C != "function")
572
- return X(v, R, h, I, x(C));
573
- var W = C(g, I, v, R, h + "." + I, r);
574
- if (W)
575
- return W;
576
- }
577
- return null;
578
- }
579
- return $(u);
580
- }
581
- function L(n) {
582
- function u(T, E, v, R, h) {
583
- var g = T[E], O = l(g);
584
- if (O !== "object")
585
- return new _("Invalid " + R + " `" + h + "` of type `" + O + "` " + ("supplied to `" + v + "`, expected `object`."));
586
- var I = t({}, T[E], n);
587
- for (var C in I) {
588
- var W = n[C];
589
- if (o(n, C) && typeof W != "function")
590
- return X(v, R, h, C, x(W));
591
- if (!W)
592
- return new _(
593
- "Invalid " + R + " `" + h + "` key `" + C + "` supplied to `" + v + "`.\nBad object: " + JSON.stringify(T[E], null, " ") + `
594
- Valid keys: ` + JSON.stringify(Object.keys(n), null, " ")
595
- );
596
- var i = W(g, C, v, R, h + "." + C, r);
597
- if (i)
598
- return i;
599
- }
600
- return null;
601
- }
602
- return $(u);
603
- }
604
- function H(n) {
605
- switch (typeof n) {
606
- case "number":
607
- case "string":
608
- case "undefined":
609
- return !0;
610
- case "boolean":
611
- return !n;
612
- case "object":
613
- if (Array.isArray(n))
614
- return n.every(H);
615
- if (n === null || f(n))
616
- return !0;
617
- var u = m(n);
618
- if (u) {
619
- var T = u.call(n), E;
620
- if (u !== n.entries) {
621
- for (; !(E = T.next()).done; )
622
- if (!H(E.value))
623
- return !1;
624
- } else
625
- for (; !(E = T.next()).done; ) {
626
- var v = E.value;
627
- if (v && !H(v[1]))
628
- return !1;
629
- }
630
- } else
631
- return !1;
632
- return !0;
633
- default:
634
- return !1;
635
- }
636
- }
637
- function b(n, u) {
638
- return n === "symbol" ? !0 : u ? u["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && u instanceof Symbol : !1;
639
- }
640
- function l(n) {
641
- var u = typeof n;
642
- return Array.isArray(n) ? "array" : n instanceof RegExp ? "object" : b(u, n) ? "symbol" : u;
643
- }
644
- function x(n) {
645
- if (typeof n > "u" || n === null)
646
- return "" + n;
647
- var u = l(n);
648
- if (u === "object") {
649
- if (n instanceof Date)
650
- return "date";
651
- if (n instanceof RegExp)
652
- return "regexp";
653
- }
654
- return u;
655
- }
656
- function Y(n) {
657
- var u = x(n);
658
- switch (u) {
659
- case "array":
660
- case "object":
661
- return "an " + u;
662
- case "boolean":
663
- case "date":
664
- case "regexp":
665
- return "a " + u;
666
- default:
667
- return u;
668
- }
669
- }
670
- function ne(n) {
671
- return !n.constructor || !n.constructor.name ? S : n.constructor.name;
672
- }
673
- return N.checkPropTypes = c, N.resetWarningCache = c.resetWarningCache, N.PropTypes = N, N;
674
- }, ue;
675
- }
676
- var ce, Ce;
677
- function Xe() {
678
- if (Ce)
679
- return ce;
680
- Ce = 1;
681
- var e = ye();
682
- function t() {
683
- }
684
- function r() {
685
- }
686
- return r.resetWarningCache = t, ce = function() {
687
- function o(d, f, P, y, p, m) {
688
- if (m !== e) {
689
- var S = new Error(
690
- "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
691
- );
692
- throw S.name = "Invariant Violation", S;
693
- }
694
- }
695
- o.isRequired = o;
696
- function c() {
697
- return o;
698
- }
699
- var s = {
700
- array: o,
701
- bigint: o,
702
- bool: o,
703
- func: o,
704
- number: o,
705
- object: o,
706
- string: o,
707
- symbol: o,
708
- any: o,
709
- arrayOf: c,
710
- element: o,
711
- elementType: o,
712
- instanceOf: c,
713
- node: o,
714
- objectOf: c,
715
- oneOf: c,
716
- oneOfType: c,
717
- shape: c,
718
- exact: c,
719
- checkPropTypes: r,
720
- resetWarningCache: t
721
- };
722
- return s.PropTypes = s, s;
723
- }, ce;
724
- }
725
- if (process.env.NODE_ENV !== "production") {
726
- var Je = Ae(), Ze = !0;
727
- de.exports = He()(Je.isElement, Ze);
728
- } else
729
- de.exports = Xe()();
730
- var Ge = de.exports;
731
- const F = /* @__PURE__ */ We(Ge);
732
- function Qe(e, t) {
733
- typeof e == "function" ? e(t) : e && (e.current = t);
734
- }
735
- function Ne(...e) {
736
- return q.useMemo(() => e.every((t) => t == null) ? null : (t) => {
737
- e.forEach((r) => {
738
- Qe(r, t);
739
- });
740
- }, e);
741
- }
742
- class ve {
743
- constructor() {
744
- this.currentId = null, this.clear = () => {
745
- this.currentId !== null && (clearTimeout(this.currentId), this.currentId = null);
746
- }, this.disposeEffect = () => this.clear;
747
- }
748
- static create() {
749
- return new ve();
750
- }
751
- /**
752
- * Executes `fn` after `delay`, clearing any previously scheduled call.
753
- */
754
- start(t, r) {
755
- this.clear(), this.currentId = setTimeout(() => {
756
- this.currentId = null, r();
757
- }, t);
758
- }
759
- }
760
- let re = !0, pe = !1;
761
- const et = new ve(), tt = {
762
- text: !0,
763
- search: !0,
764
- url: !0,
765
- tel: !0,
766
- email: !0,
767
- password: !0,
768
- number: !0,
769
- date: !0,
770
- month: !0,
771
- week: !0,
772
- time: !0,
773
- datetime: !0,
774
- "datetime-local": !0
775
- };
776
- function rt(e) {
777
- const {
778
- type: t,
779
- tagName: r
780
- } = e;
781
- return !!(r === "INPUT" && tt[t] && !e.readOnly || r === "TEXTAREA" && !e.readOnly || e.isContentEditable);
782
- }
783
- function nt(e) {
784
- e.metaKey || e.altKey || e.ctrlKey || (re = !0);
785
- }
786
- function le() {
787
- re = !1;
788
- }
789
- function ot() {
790
- this.visibilityState === "hidden" && pe && (re = !0);
791
- }
792
- function at(e) {
793
- e.addEventListener("keydown", nt, !0), e.addEventListener("mousedown", le, !0), e.addEventListener("pointerdown", le, !0), e.addEventListener("touchstart", le, !0), e.addEventListener("visibilitychange", ot, !0);
794
- }
795
- function it(e) {
796
- const {
797
- target: t
798
- } = e;
799
- try {
800
- return t.matches(":focus-visible");
801
- } catch {
802
- }
803
- return re || rt(t);
804
- }
805
- function st() {
806
- const e = q.useCallback((c) => {
807
- c != null && at(c.ownerDocument);
808
- }, []), t = q.useRef(!1);
809
- function r() {
810
- return t.current ? (pe = !0, et.start(100, () => {
811
- pe = !1;
812
- }), t.current = !1, !0) : !1;
813
- }
814
- function o(c) {
815
- return it(c) ? (t.current = !0, !0) : !1;
816
- }
817
- return {
818
- isFocusVisibleRef: t,
819
- onFocus: o,
820
- onBlur: r,
821
- ref: e
822
- };
823
- }
824
- function ut(e, t, r = void 0) {
825
- const o = {};
826
- return Object.keys(e).forEach(
827
- // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
828
- // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
829
- (c) => {
830
- o[c] = e[c].reduce((s, d) => {
831
- if (d) {
832
- const f = t(d);
833
- f !== "" && s.push(f), r && r[d] && s.push(r[d]);
834
- }
835
- return s;
836
- }, []).join(" ");
837
- }
838
- ), o;
839
- }
840
- const ct = {
841
- active: "active",
842
- checked: "checked",
843
- completed: "completed",
844
- disabled: "disabled",
845
- error: "error",
846
- expanded: "expanded",
847
- focused: "focused",
848
- focusVisible: "focusVisible",
849
- open: "open",
850
- readOnly: "readOnly",
851
- required: "required",
852
- selected: "selected"
853
- };
854
- function _e(e) {
855
- if (e === void 0)
856
- return {};
857
- const t = {};
858
- return Object.keys(e).filter((r) => !(r.match(/^on[A-Z]/) && typeof e[r] == "function")).forEach((r) => {
859
- t[r] = e[r];
860
- }), t;
861
- }
862
- function lt(e) {
863
- const {
864
- getSlotProps: t,
865
- additionalProps: r,
866
- externalSlotProps: o,
867
- externalForwardedProps: c,
868
- className: s
869
- } = e;
870
- if (!t) {
871
- const N = be(r == null ? void 0 : r.className, s, c == null ? void 0 : c.className, o == null ? void 0 : o.className), D = V({}, r == null ? void 0 : r.style, c == null ? void 0 : c.style, o == null ? void 0 : o.style), _ = V({}, r, c, o);
872
- return N.length > 0 && (_.className = N), Object.keys(D).length > 0 && (_.style = D), {
873
- props: _,
874
- internalRef: void 0
875
- };
876
- }
877
- const d = fe(V({}, c, o)), f = _e(o), P = _e(c), y = t(d), p = be(y == null ? void 0 : y.className, r == null ? void 0 : r.className, s, c == null ? void 0 : c.className, o == null ? void 0 : o.className), m = V({}, y == null ? void 0 : y.style, r == null ? void 0 : r.style, c == null ? void 0 : c.style, o == null ? void 0 : o.style), S = V({}, y, r, P, f);
878
- return p.length > 0 && (S.className = p), Object.keys(m).length > 0 && (S.style = m), {
879
- props: S,
880
- internalRef: y.ref
881
- };
882
- }
883
- const ft = ["elementType", "externalSlotProps", "ownerState", "skipResolvingSlotProps"];
884
- function dt(e) {
885
- var t;
886
- const {
887
- elementType: r,
888
- externalSlotProps: o,
889
- ownerState: c,
890
- skipResolvingSlotProps: s = !1
891
- } = e, d = we(e, ft), f = s ? {} : qe(o, c), {
892
- props: P,
893
- internalRef: y
894
- } = lt(V({}, d, {
895
- externalSlotProps: f
896
- })), p = Ne(y, f == null ? void 0 : f.ref, (t = e.additionalProps) == null ? void 0 : t.ref);
897
- return Fe(r, V({}, P, {
898
- ref: p
899
- }), c);
900
- }
901
- const $e = "base";
902
- function pt(e) {
903
- return `${$e}--${e}`;
904
- }
905
- function yt(e, t) {
906
- return `${$e}-${e}-${t}`;
907
- }
908
- function je(e, t) {
909
- const r = ct[t];
910
- return r ? pt(r) : yt(e, t);
911
- }
912
- function vt(e, t) {
913
- const r = {};
914
- return t.forEach((o) => {
915
- r[o] = je(e, o);
916
- }), r;
917
- }
918
- const Me = "Button";
919
- function mt(e) {
920
- return je(Me, e);
921
- }
922
- vt(Me, ["root", "active", "disabled", "focusVisible"]);
923
- function bt(e = {}) {
924
- const {
925
- disabled: t = !1,
926
- focusableWhenDisabled: r,
927
- href: o,
928
- rootRef: c,
929
- tabIndex: s,
930
- to: d,
931
- type: f,
932
- rootElementName: P
933
- } = e, y = q.useRef(), [p, m] = q.useState(!1), {
934
- isFocusVisibleRef: S,
935
- onFocus: N,
936
- onBlur: D,
937
- ref: _
938
- } = st(), [$, k] = q.useState(!1);
939
- t && !r && $ && k(!1), q.useEffect(() => {
940
- S.current = $;
941
- }, [$, S]);
942
- const [U, M] = Ue({
943
- rootElementName: P ?? (o || d ? "a" : void 0),
944
- componentName: "Button"
945
- }), j = (b) => (l) => {
946
- var x;
947
- $ && l.preventDefault(), (x = b.onMouseLeave) == null || x.call(b, l);
948
- }, a = (b) => (l) => {
949
- var x;
950
- D(l), S.current === !1 && k(!1), (x = b.onBlur) == null || x.call(b, l);
951
- }, K = (b) => (l) => {
952
- var x;
953
- if (y.current || (y.current = l.currentTarget), N(l), S.current === !0) {
954
- var Y;
955
- k(!0), (Y = b.onFocusVisible) == null || Y.call(b, l);
956
- }
957
- (x = b.onFocus) == null || x.call(b, l);
958
- }, z = () => {
959
- const b = y.current;
960
- return U === "BUTTON" || U === "INPUT" && ["button", "submit", "reset"].includes(b == null ? void 0 : b.type) || U === "A" && (b == null ? void 0 : b.href);
961
- }, Z = (b) => (l) => {
962
- if (!t) {
963
- var x;
964
- (x = b.onClick) == null || x.call(b, l);
965
- }
966
- }, G = (b) => (l) => {
967
- var x;
968
- t || (m(!0), document.addEventListener("mouseup", () => {
969
- m(!1);
970
- }, {
971
- once: !0
972
- })), (x = b.onMouseDown) == null || x.call(b, l);
973
- }, Q = (b) => (l) => {
974
- var x;
975
- if ((x = b.onKeyDown) == null || x.call(b, l), !l.defaultMuiPrevented && (l.target === l.currentTarget && !z() && l.key === " " && l.preventDefault(), l.target === l.currentTarget && l.key === " " && !t && m(!0), l.target === l.currentTarget && !z() && l.key === "Enter" && !t)) {
976
- var Y;
977
- (Y = b.onClick) == null || Y.call(b, l), l.preventDefault();
978
- }
979
- }, X = (b) => (l) => {
980
- var x;
981
- if (l.target === l.currentTarget && m(!1), (x = b.onKeyUp) == null || x.call(b, l), l.target === l.currentTarget && !z() && !t && l.key === " " && !l.defaultMuiPrevented) {
982
- var Y;
983
- (Y = b.onClick) == null || Y.call(b, l);
984
- }
985
- }, J = Ne(M, c, _, y), L = {};
986
- return s !== void 0 && (L.tabIndex = s), U === "BUTTON" ? (L.type = f ?? "button", r ? L["aria-disabled"] = t : L.disabled = t) : U === "INPUT" ? f && ["button", "submit", "reset"].includes(f) && (r ? L["aria-disabled"] = t : L.disabled = t) : U !== "" && (!o && !d && (L.role = "button", L.tabIndex = s ?? 0), t && (L["aria-disabled"] = t, L.tabIndex = r ? s ?? 0 : -1)), {
987
- getRootProps: (b = {}) => {
988
- const l = V({}, fe(e), fe(b)), x = V({
989
- type: f
990
- }, l, L, b, {
991
- onBlur: a(l),
992
- onClick: Z(l),
993
- onFocus: K(l),
994
- onKeyDown: Q(l),
995
- onKeyUp: X(l),
996
- onMouseDown: G(l),
997
- onMouseLeave: j(l),
998
- ref: J
999
- });
1000
- return delete x.onFocusVisible, x;
1001
- },
1002
- focusVisible: $,
1003
- setFocusVisible: k,
1004
- active: p,
1005
- rootRef: J
1006
- };
1007
- }
1008
- const ht = ["action", "children", "disabled", "focusableWhenDisabled", "onFocusVisible", "slotProps", "slots", "rootElementName"], Et = (e) => {
1009
- const {
1010
- active: t,
1011
- disabled: r,
1012
- focusVisible: o
1013
- } = e;
1014
- return ut({
1015
- root: ["root", r && "disabled", o && "focusVisible", t && "active"]
1016
- }, Le(mt));
1017
- }, gt = /* @__PURE__ */ q.forwardRef(function(t, r) {
1018
- var o;
1019
- const {
1020
- action: c,
1021
- children: s,
1022
- focusableWhenDisabled: d = !1,
1023
- slotProps: f = {},
1024
- slots: P = {},
1025
- rootElementName: y = "button"
1026
- } = t, p = we(t, ht), m = q.useRef();
1027
- let S = y;
1028
- typeof P.root == "string" ? S = P.root : (p.href || p.to) && (S = "a");
1029
- const {
1030
- active: N,
1031
- focusVisible: D,
1032
- setFocusVisible: _,
1033
- getRootProps: $
1034
- } = bt(V({}, t, {
1035
- focusableWhenDisabled: d,
1036
- rootElementName: S
1037
- }));
1038
- q.useImperativeHandle(c, () => ({
1039
- focusVisible: () => {
1040
- _(!0), m.current.focus();
1041
- }
1042
- }), [_]);
1043
- const k = V({}, t, {
1044
- active: N,
1045
- focusableWhenDisabled: d,
1046
- focusVisible: D
1047
- }), U = Et(k), M = p.href || p.to ? "a" : "button", j = (o = P.root) != null ? o : M, a = dt({
1048
- elementType: j,
1049
- getSlotProps: $,
1050
- externalForwardedProps: p,
1051
- externalSlotProps: f.root,
1052
- additionalProps: {
1053
- ref: r
1054
- },
1055
- ownerState: k,
1056
- className: U.root
1057
- });
1058
- return /* @__PURE__ */ De(j, V({}, a, {
1059
- children: s
1060
- }));
1061
- });
1062
- process.env.NODE_ENV !== "production" && (gt.propTypes = {
1063
- // ┌────────────────────────────── Warning ──────────────────────────────┐
1064
- // │ These PropTypes are generated from the TypeScript type definitions. │
1065
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
1066
- // └─────────────────────────────────────────────────────────────────────┘
1067
- /**
1068
- * A ref for imperative actions. It currently only supports `focusVisible()` action.
1069
- */
1070
- action: F.oneOfType([F.func, F.shape({
1071
- current: F.shape({
1072
- focusVisible: F.func.isRequired
1073
- })
1074
- })]),
1075
- /**
1076
- * @ignore
1077
- */
1078
- children: F.node,
1079
- /**
1080
- * @ignore
1081
- */
1082
- className: F.string,
1083
- /**
1084
- * If `true`, the component is disabled.
1085
- * @default false
1086
- */
1087
- disabled: F.bool,
1088
- /**
1089
- * If `true`, allows a disabled button to receive focus.
1090
- * @default false
1091
- */
1092
- focusableWhenDisabled: F.bool,
1093
- /**
1094
- * @ignore
1095
- */
1096
- href: F.string,
1097
- /**
1098
- * @ignore
1099
- */
1100
- onFocusVisible: F.func,
1101
- /**
1102
- * The HTML element that is ultimately rendered, for example 'button' or 'a'
1103
- * @default 'button'
1104
- */
1105
- rootElementName: F.string,
1106
- /**
1107
- * The props used for each slot inside the Button.
1108
- * @default {}
1109
- */
1110
- slotProps: F.shape({
1111
- root: F.oneOfType([F.func, F.object])
1112
- }),
1113
- /**
1114
- * The components used for each slot inside the Button.
1115
- * Either a string to use a HTML element or a component.
1116
- * @default {}
1117
- */
1118
- slots: F.shape({
1119
- root: F.elementType
1120
- }),
1121
- /**
1122
- * @ignore
1123
- */
1124
- to: F.string
1125
- });
1126
- export {
1127
- gt as B,
1128
- F as P,
1129
- V as _,
1130
- vt as a,
1131
- we as b,
1132
- dt as c,
1133
- ut as d,
1134
- fe as e,
1135
- Le as f,
1136
- je as g,
1137
- Qe as s,
1138
- Ne as u
1139
- };