@jigowatts/jigowatts-ui 0.0.1-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 (199) hide show
  1. package/README.md +50 -0
  2. package/dist/AccordionSummary-B4zooGpd.js +831 -0
  3. package/dist/ButtonBase-pxtIu13Q.js +866 -0
  4. package/dist/DateTimePicker-DJSOr5wM.js +4653 -0
  5. package/dist/ListContext-DOVwHqy-.js +180 -0
  6. package/dist/MenuItem-yBaT3_db.js +470 -0
  7. package/dist/Paper-COvYqxZa.js +522 -0
  8. package/dist/Tabs-D3lJRumZ.js +1085 -0
  9. package/dist/_commonjsHelpers-CT_km90n.js +30 -0
  10. package/dist/assets/index.css +1 -0
  11. package/dist/assets/index10.css +1 -0
  12. package/dist/assets/index11.css +1 -0
  13. package/dist/assets/index12.css +1 -0
  14. package/dist/assets/index13.css +1 -0
  15. package/dist/assets/index14.css +1 -0
  16. package/dist/assets/index15.css +1 -0
  17. package/dist/assets/index16.css +1 -0
  18. package/dist/assets/index17.css +1 -0
  19. package/dist/assets/index18.css +1 -0
  20. package/dist/assets/index19.css +1 -0
  21. package/dist/assets/index2.css +1 -0
  22. package/dist/assets/index20.css +1 -0
  23. package/dist/assets/index21.css +1 -0
  24. package/dist/assets/index22.css +1 -0
  25. package/dist/assets/index23.css +1 -0
  26. package/dist/assets/index24.css +1 -0
  27. package/dist/assets/index25.css +1 -0
  28. package/dist/assets/index26.css +1 -0
  29. package/dist/assets/index27.css +1 -0
  30. package/dist/assets/index3.css +1 -0
  31. package/dist/assets/index4.css +1 -0
  32. package/dist/assets/index5.css +1 -0
  33. package/dist/assets/index6.css +1 -0
  34. package/dist/assets/index7.css +1 -0
  35. package/dist/assets/index8.css +1 -0
  36. package/dist/assets/index9.css +1 -0
  37. package/dist/browser-DxfwT6rn.js +656 -0
  38. package/dist/components/Button/index.d.ts +28 -0
  39. package/dist/components/Button/index.js +18 -0
  40. package/dist/components/Button/index.test.d.ts +1 -0
  41. package/dist/components/Button/index.test.js +23 -0
  42. package/dist/components/Card/index.d.ts +16 -0
  43. package/dist/components/Card/index.js +37 -0
  44. package/dist/components/Card/index.test.d.ts +1 -0
  45. package/dist/components/Card/index.test.js +35 -0
  46. package/dist/components/CustomLink/index.d.ts +11 -0
  47. package/dist/components/CustomLink/index.js +1670 -0
  48. package/dist/components/CustomLink/index.test.d.ts +1 -0
  49. package/dist/components/CustomLink/index.test.js +40 -0
  50. package/dist/components/DataTable/index.d.ts +28 -0
  51. package/dist/components/DataTable/index.js +137 -0
  52. package/dist/components/DataTable/index.test.d.ts +1 -0
  53. package/dist/components/DataTable/index.test.js +3010 -0
  54. package/dist/components/DatePickerController/index.d.ts +16 -0
  55. package/dist/components/DatePickerController/index.js +83 -0
  56. package/dist/components/DatePickerController/index.test.d.ts +1 -0
  57. package/dist/components/DatePickerController/index.test.js +24 -0
  58. package/dist/components/ErrorMessage/index.d.ts +5 -0
  59. package/dist/components/ErrorMessage/index.js +11 -0
  60. package/dist/components/ErrorMessage/index.test.d.ts +1 -0
  61. package/dist/components/ErrorMessage/index.test.js +17 -0
  62. package/dist/components/EvseStateLabel/index.d.ts +5 -0
  63. package/dist/components/EvseStateLabel/index.js +36 -0
  64. package/dist/components/FlexButtons/index.d.ts +9 -0
  65. package/dist/components/FlexButtons/index.js +13 -0
  66. package/dist/components/Form/index.d.ts +8 -0
  67. package/dist/components/Form/index.js +11 -0
  68. package/dist/components/Form/index.test.d.ts +1 -0
  69. package/dist/components/Form/index.test.js +25 -0
  70. package/dist/components/FormItem/index.d.ts +9 -0
  71. package/dist/components/FormItem/index.js +19 -0
  72. package/dist/components/FormItem/index.test.d.ts +1 -0
  73. package/dist/components/FormItem/index.test.js +15 -0
  74. package/dist/components/FormTitle/index.d.ts +5 -0
  75. package/dist/components/FormTitle/index.js +11 -0
  76. package/dist/components/FormTitle/index.test.d.ts +1 -0
  77. package/dist/components/FormTitle/index.test.js +15 -0
  78. package/dist/components/Input/index.d.ts +15 -0
  79. package/dist/components/Input/index.js +39 -0
  80. package/dist/components/Input/index.test.d.ts +1 -0
  81. package/dist/components/Input/index.test.js +39 -0
  82. package/dist/components/InputController/index.d.ts +20 -0
  83. package/dist/components/InputController/index.js +81 -0
  84. package/dist/components/InputController/index.test.d.ts +1 -0
  85. package/dist/components/InputController/index.test.js +56 -0
  86. package/dist/components/InputGroup/index.d.ts +7 -0
  87. package/dist/components/InputGroup/index.js +11 -0
  88. package/dist/components/InputGroup/index.test.d.ts +1 -0
  89. package/dist/components/InputGroup/index.test.js +15 -0
  90. package/dist/components/Label/index.d.ts +7 -0
  91. package/dist/components/Label/index.js +14 -0
  92. package/dist/components/Label/index.test.d.ts +1 -0
  93. package/dist/components/Label/index.test.js +25 -0
  94. package/dist/components/LabeledContent/index.d.ts +15 -0
  95. package/dist/components/LabeledContent/index.js +28 -0
  96. package/dist/components/LabeledContent/index.test.d.ts +1 -0
  97. package/dist/components/LabeledContent/index.test.js +19 -0
  98. package/dist/components/LoadingOverlay/index.d.ts +2 -0
  99. package/dist/components/LoadingOverlay/index.js +134 -0
  100. package/dist/components/LoadingOverlay/index.test.d.ts +1 -0
  101. package/dist/components/LoadingOverlay/index.test.js +12 -0
  102. package/dist/components/Map/index.d.ts +8 -0
  103. package/dist/components/Map/index.js +6575 -0
  104. package/dist/components/MaxWidthContainer/index.d.ts +13 -0
  105. package/dist/components/MaxWidthContainer/index.js +15 -0
  106. package/dist/components/MaxWidthContainer/index.test.d.ts +1 -0
  107. package/dist/components/MaxWidthContainer/index.test.js +24 -0
  108. package/dist/components/NumericFieldController/index.d.ts +53 -0
  109. package/dist/components/NumericFieldController/index.js +620 -0
  110. package/dist/components/NumericFieldController/index.test.d.ts +1 -0
  111. package/dist/components/NumericFieldController/index.test.js +24 -0
  112. package/dist/components/OfflineLabel/index.d.ts +5 -0
  113. package/dist/components/OfflineLabel/index.js +34 -0
  114. package/dist/components/PageSizeSelector/index.d.ts +15 -0
  115. package/dist/components/PageSizeSelector/index.js +43 -0
  116. package/dist/components/Pagination/index.d.ts +9 -0
  117. package/dist/components/Pagination/index.js +7 -0
  118. package/dist/components/Pagination/index.test.d.ts +1 -0
  119. package/dist/components/Pagination/index.test.js +34 -0
  120. package/dist/components/PasswordInputController/index.d.ts +17 -0
  121. package/dist/components/PasswordInputController/index.js +78 -0
  122. package/dist/components/PasswordInputController/index.test.d.ts +1 -0
  123. package/dist/components/PasswordInputController/index.test.js +37 -0
  124. package/dist/components/RadioButton/index.d.ts +13 -0
  125. package/dist/components/RadioButton/index.js +7 -0
  126. package/dist/components/RadioButton/index.test.d.ts +1 -0
  127. package/dist/components/RadioButton/index.test.js +38 -0
  128. package/dist/components/RadioGroupController/index.d.ts +15 -0
  129. package/dist/components/RadioGroupController/index.js +48 -0
  130. package/dist/components/RadioGroupController/index.test.d.ts +1 -0
  131. package/dist/components/RadioGroupController/index.test.js +48 -0
  132. package/dist/components/RangeDatePicker/index.d.ts +14 -0
  133. package/dist/components/RangeDatePicker/index.js +1594 -0
  134. package/dist/components/RangeDatePickerController/index.d.ts +21 -0
  135. package/dist/components/RangeDatePickerController/index.js +123 -0
  136. package/dist/components/RangeDatePickerController/index.test.d.ts +1 -0
  137. package/dist/components/RangeDatePickerController/index.test.js +24 -0
  138. package/dist/components/ReportCard/index.d.ts +12 -0
  139. package/dist/components/ReportCard/index.js +18 -0
  140. package/dist/components/ReportCard/index.test.d.ts +1 -0
  141. package/dist/components/ReportCard/index.test.js +27 -0
  142. package/dist/components/ReportChart/index.d.ts +22 -0
  143. package/dist/components/ReportChart/index.js +23101 -0
  144. package/dist/components/ScrollableDialog/index.d.ts +19 -0
  145. package/dist/components/ScrollableDialog/index.js +42 -0
  146. package/dist/components/ScrollableDialog/index.test.d.ts +1 -0
  147. package/dist/components/ScrollableDialog/index.test.js +59 -0
  148. package/dist/components/SearchForm/index.d.ts +13 -0
  149. package/dist/components/SearchForm/index.js +86 -0
  150. package/dist/components/SelectBox/index.d.ts +18 -0
  151. package/dist/components/SelectBox/index.js +7 -0
  152. package/dist/components/SelectBox/index.test.d.ts +1 -0
  153. package/dist/components/SelectBox/index.test.js +34 -0
  154. package/dist/components/SelectBoxController/index.d.ts +20 -0
  155. package/dist/components/SelectBoxController/index.js +87 -0
  156. package/dist/components/SelectBoxController/index.test.d.ts +1 -0
  157. package/dist/components/SelectBoxController/index.test.js +52 -0
  158. package/dist/components/SubMenu/index.d.ts +22 -0
  159. package/dist/components/SubMenu/index.js +278 -0
  160. package/dist/components/SubMenu/index.test.d.ts +1 -0
  161. package/dist/components/SubMenu/index.test.js +41 -0
  162. package/dist/components/Tabs/index.d.ts +21 -0
  163. package/dist/components/Tabs/index.js +100 -0
  164. package/dist/components/Tabs/index.test.d.ts +1 -0
  165. package/dist/components/Tabs/index.test.js +24 -0
  166. package/dist/components/Textarea/index.d.ts +18 -0
  167. package/dist/components/Textarea/index.js +34 -0
  168. package/dist/components/Textarea/index.test.d.ts +1 -0
  169. package/dist/components/Textarea/index.test.js +25 -0
  170. package/dist/components/ToggleButton/index.d.ts +16 -0
  171. package/dist/components/ToggleButton/index.js +39 -0
  172. package/dist/components/ToggleButton/index.test.d.ts +1 -0
  173. package/dist/components/ToggleButton/index.test.js +49 -0
  174. package/dist/constants/datetime.d.ts +2 -0
  175. package/dist/constants/datetime.js +5 -0
  176. package/dist/createSvgIcon-B53UOwxg.js +183 -0
  177. package/dist/createSvgIcon-Dj8zNxRS.js +72 -0
  178. package/dist/index-BLPOOjNr.js +184 -0
  179. package/dist/index-BOjtnFU5.js +34 -0
  180. package/dist/index-Bs3JCwgu.js +689 -0
  181. package/dist/index-CICI7n5Y.js +19688 -0
  182. package/dist/index-CQDJfJT1.js +50 -0
  183. package/dist/index-C_i0-R5C.js +393 -0
  184. package/dist/index-DWRHnq8_.js +42 -0
  185. package/dist/index-Di2gTfPF.js +25175 -0
  186. package/dist/index-VF82hRp0.js +2522 -0
  187. package/dist/index-kvi6aotO.js +39 -0
  188. package/dist/index.d.ts +38 -0
  189. package/dist/index.esm-ChwJSgnF.js +1052 -0
  190. package/dist/index.js +77 -0
  191. package/dist/isEqual-BBhdD79C.js +667 -0
  192. package/dist/mergeSlotProps-J197zKan.js +63 -0
  193. package/dist/react.esm-C8amP77L.js +11182 -0
  194. package/dist/styled-CWju4EfZ.js +2702 -0
  195. package/dist/unsupportedProp-DZaWZqWQ.js +30 -0
  196. package/dist/useControlled-BQCJRJNJ.js +64 -0
  197. package/dist/useIsFocusVisible-BxB-Hdhb.js +124 -0
  198. package/dist/useSlotProps-Bh7akxXV.js +33 -0
  199. package/package.json +360 -0
@@ -0,0 +1,866 @@
1
+ import { a as Y, _ as re, b as Te, s as se, u as Me, g as Xe, c as Ye } from "./styled-CWju4EfZ.js";
2
+ import * as p from "react";
3
+ import X, { Children as qe, isValidElement as G, cloneElement as J } from "react";
4
+ import { P as e, c as C } from "./index-Bs3JCwgu.js";
5
+ import { jsx as j, jsxs as He } from "react/jsx-runtime";
6
+ import { d as We, u as he, c as Ge, b as W } from "./useIsFocusVisible-BxB-Hdhb.js";
7
+ import { keyframes as ae } from "@emotion/react";
8
+ function Je(t, n) {
9
+ return process.env.NODE_ENV === "production" ? () => null : function(...l) {
10
+ return t(...l) || n(...l);
11
+ };
12
+ }
13
+ function Qe(t) {
14
+ const {
15
+ prototype: n = {}
16
+ } = t;
17
+ return !!n.isReactComponent;
18
+ }
19
+ function Ze(t, n, s, l, i) {
20
+ const o = t[n], r = i || n;
21
+ if (o == null || // When server-side rendering React doesn't warn either.
22
+ // This is not an accurate check for SSR.
23
+ // This is only in place for emotion compat.
24
+ // TODO: Revisit once https://github.com/facebook/react/issues/20047 is resolved.
25
+ typeof window > "u")
26
+ return null;
27
+ let u;
28
+ return typeof o == "function" && !Qe(o) && (u = "Did you accidentally provide a plain function component instead?"), u !== void 0 ? new Error(`Invalid ${l} \`${r}\` supplied to \`${s}\`. Expected an element type that can hold a ref. ${u} For more information see https://mui.com/r/caveat-with-refs-guide`) : null;
29
+ }
30
+ const et = Je(e.elementType, Ze), tt = e.oneOfType([e.func, e.object]), nt = tt;
31
+ function oe(t, n) {
32
+ return oe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(l, i) {
33
+ return l.__proto__ = i, l;
34
+ }, oe(t, n);
35
+ }
36
+ function ot(t, n) {
37
+ t.prototype = Object.create(n.prototype), t.prototype.constructor = t, oe(t, n);
38
+ }
39
+ const me = X.createContext(null);
40
+ function it(t) {
41
+ if (t === void 0)
42
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
43
+ return t;
44
+ }
45
+ function le(t, n) {
46
+ var s = function(o) {
47
+ return n && G(o) ? n(o) : o;
48
+ }, l = /* @__PURE__ */ Object.create(null);
49
+ return t && qe.map(t, function(i) {
50
+ return i;
51
+ }).forEach(function(i) {
52
+ l[i.key] = s(i);
53
+ }), l;
54
+ }
55
+ function rt(t, n) {
56
+ t = t || {}, n = n || {};
57
+ function s(h) {
58
+ return h in n ? n[h] : t[h];
59
+ }
60
+ var l = /* @__PURE__ */ Object.create(null), i = [];
61
+ for (var o in t)
62
+ o in n ? i.length && (l[o] = i, i = []) : i.push(o);
63
+ var r, u = {};
64
+ for (var c in n) {
65
+ if (l[c])
66
+ for (r = 0; r < l[c].length; r++) {
67
+ var f = l[c][r];
68
+ u[l[c][r]] = s(f);
69
+ }
70
+ u[c] = s(c);
71
+ }
72
+ for (r = 0; r < i.length; r++)
73
+ u[i[r]] = s(i[r]);
74
+ return u;
75
+ }
76
+ function $(t, n, s) {
77
+ return s[n] != null ? s[n] : t.props[n];
78
+ }
79
+ function st(t, n) {
80
+ return le(t.children, function(s) {
81
+ return J(s, {
82
+ onExited: n.bind(null, s),
83
+ in: !0,
84
+ appear: $(s, "appear", t),
85
+ enter: $(s, "enter", t),
86
+ exit: $(s, "exit", t)
87
+ });
88
+ });
89
+ }
90
+ function at(t, n, s) {
91
+ var l = le(t.children), i = rt(n, l);
92
+ return Object.keys(i).forEach(function(o) {
93
+ var r = i[o];
94
+ if (G(r)) {
95
+ var u = o in n, c = o in l, f = n[o], h = G(f) && !f.props.in;
96
+ c && (!u || h) ? i[o] = J(r, {
97
+ onExited: s.bind(null, r),
98
+ in: !0,
99
+ exit: $(r, "exit", t),
100
+ enter: $(r, "enter", t)
101
+ }) : !c && u && !h ? i[o] = J(r, {
102
+ in: !1
103
+ }) : c && u && G(f) && (i[o] = J(r, {
104
+ onExited: s.bind(null, r),
105
+ in: f.props.in,
106
+ exit: $(r, "exit", t),
107
+ enter: $(r, "enter", t)
108
+ }));
109
+ }
110
+ }), i;
111
+ }
112
+ var lt = Object.values || function(t) {
113
+ return Object.keys(t).map(function(n) {
114
+ return t[n];
115
+ });
116
+ }, ut = {
117
+ component: "div",
118
+ childFactory: function(n) {
119
+ return n;
120
+ }
121
+ }, ue = /* @__PURE__ */ function(t) {
122
+ ot(n, t);
123
+ function n(l, i) {
124
+ var o;
125
+ o = t.call(this, l, i) || this;
126
+ var r = o.handleExited.bind(it(o));
127
+ return o.state = {
128
+ contextValue: {
129
+ isMounting: !0
130
+ },
131
+ handleExited: r,
132
+ firstRender: !0
133
+ }, o;
134
+ }
135
+ var s = n.prototype;
136
+ return s.componentDidMount = function() {
137
+ this.mounted = !0, this.setState({
138
+ contextValue: {
139
+ isMounting: !1
140
+ }
141
+ });
142
+ }, s.componentWillUnmount = function() {
143
+ this.mounted = !1;
144
+ }, n.getDerivedStateFromProps = function(i, o) {
145
+ var r = o.children, u = o.handleExited, c = o.firstRender;
146
+ return {
147
+ children: c ? st(i, u) : at(i, r, u),
148
+ firstRender: !1
149
+ };
150
+ }, s.handleExited = function(i, o) {
151
+ var r = le(this.props.children);
152
+ i.key in r || (i.props.onExited && i.props.onExited(o), this.mounted && this.setState(function(u) {
153
+ var c = Y({}, u.children);
154
+ return delete c[i.key], {
155
+ children: c
156
+ };
157
+ }));
158
+ }, s.render = function() {
159
+ var i = this.props, o = i.component, r = i.childFactory, u = re(i, ["component", "childFactory"]), c = this.state.contextValue, f = lt(this.state.children).map(r);
160
+ return delete u.appear, delete u.enter, delete u.exit, o === null ? /* @__PURE__ */ X.createElement(me.Provider, {
161
+ value: c
162
+ }, f) : /* @__PURE__ */ X.createElement(me.Provider, {
163
+ value: c
164
+ }, /* @__PURE__ */ X.createElement(o, u, f));
165
+ }, n;
166
+ }(X.Component);
167
+ ue.propTypes = process.env.NODE_ENV !== "production" ? {
168
+ /**
169
+ * `<TransitionGroup>` renders a `<div>` by default. You can change this
170
+ * behavior by providing a `component` prop.
171
+ * If you use React v16+ and would like to avoid a wrapping `<div>` element
172
+ * you can pass in `component={null}`. This is useful if the wrapping div
173
+ * borks your css styles.
174
+ */
175
+ component: e.any,
176
+ /**
177
+ * A set of `<Transition>` components, that are toggled `in` and out as they
178
+ * leave. the `<TransitionGroup>` will inject specific transition props, so
179
+ * remember to spread them through if you are wrapping the `<Transition>` as
180
+ * with our `<Fade>` example.
181
+ *
182
+ * While this component is meant for multiple `Transition` or `CSSTransition`
183
+ * children, sometimes you may want to have a single transition child with
184
+ * content that you want to be transitioned out and in when you change it
185
+ * (e.g. routes, images etc.) In that case you can change the `key` prop of
186
+ * the transition child as you change its content, this will cause
187
+ * `TransitionGroup` to transition the child out and back in.
188
+ */
189
+ children: e.node,
190
+ /**
191
+ * A convenience prop that enables or disables appear animations
192
+ * for all children. Note that specifying this will override any defaults set
193
+ * on individual children Transitions.
194
+ */
195
+ appear: e.bool,
196
+ /**
197
+ * A convenience prop that enables or disables enter animations
198
+ * for all children. Note that specifying this will override any defaults set
199
+ * on individual children Transitions.
200
+ */
201
+ enter: e.bool,
202
+ /**
203
+ * A convenience prop that enables or disables exit animations
204
+ * for all children. Note that specifying this will override any defaults set
205
+ * on individual children Transitions.
206
+ */
207
+ exit: e.bool,
208
+ /**
209
+ * You may need to apply reactive updates to a child as it is exiting.
210
+ * This is generally done by using `cloneElement` however in the case of an exiting
211
+ * child the element has already been removed and not accessible to the consumer.
212
+ *
213
+ * If you do need to update a child as it leaves you can provide a `childFactory`
214
+ * to wrap every child, even the ones that are leaving.
215
+ *
216
+ * @type Function(child: ReactElement) -> ReactElement
217
+ */
218
+ childFactory: e.func
219
+ } : {};
220
+ ue.defaultProps = ut;
221
+ const ct = ue;
222
+ function Ee(t) {
223
+ const {
224
+ className: n,
225
+ classes: s,
226
+ pulsate: l = !1,
227
+ rippleX: i,
228
+ rippleY: o,
229
+ rippleSize: r,
230
+ in: u,
231
+ onExited: c,
232
+ timeout: f
233
+ } = t, [h, R] = p.useState(!1), g = C(n, s.ripple, s.rippleVisible, l && s.ripplePulsate), x = {
234
+ width: r,
235
+ height: r,
236
+ top: -(r / 2) + o,
237
+ left: -(r / 2) + i
238
+ }, m = C(s.child, h && s.childLeaving, l && s.childPulsate);
239
+ return !u && !h && R(!0), p.useEffect(() => {
240
+ if (!u && c != null) {
241
+ const T = setTimeout(c, f);
242
+ return () => {
243
+ clearTimeout(T);
244
+ };
245
+ }
246
+ }, [c, u, f]), /* @__PURE__ */ j("span", {
247
+ className: g,
248
+ style: x,
249
+ children: /* @__PURE__ */ j("span", {
250
+ className: m
251
+ })
252
+ });
253
+ }
254
+ process.env.NODE_ENV !== "production" && (Ee.propTypes = {
255
+ /**
256
+ * Override or extend the styles applied to the component.
257
+ */
258
+ classes: e.object.isRequired,
259
+ className: e.string,
260
+ /**
261
+ * @ignore - injected from TransitionGroup
262
+ */
263
+ in: e.bool,
264
+ /**
265
+ * @ignore - injected from TransitionGroup
266
+ */
267
+ onExited: e.func,
268
+ /**
269
+ * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
270
+ */
271
+ pulsate: e.bool,
272
+ /**
273
+ * Diameter of the ripple.
274
+ */
275
+ rippleSize: e.number,
276
+ /**
277
+ * Horizontal position of the ripple center.
278
+ */
279
+ rippleX: e.number,
280
+ /**
281
+ * Vertical position of the ripple center.
282
+ */
283
+ rippleY: e.number,
284
+ /**
285
+ * exit delay
286
+ */
287
+ timeout: e.number.isRequired
288
+ });
289
+ const b = Te("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]), pt = ["center", "classes", "className"];
290
+ let Q = (t) => t, be, ge, ye, Re;
291
+ const ie = 550, ft = 80, dt = ae(be || (be = Q`
292
+ 0% {
293
+ transform: scale(0);
294
+ opacity: 0.1;
295
+ }
296
+
297
+ 100% {
298
+ transform: scale(1);
299
+ opacity: 0.3;
300
+ }
301
+ `)), ht = ae(ge || (ge = Q`
302
+ 0% {
303
+ opacity: 1;
304
+ }
305
+
306
+ 100% {
307
+ opacity: 0;
308
+ }
309
+ `)), mt = ae(ye || (ye = Q`
310
+ 0% {
311
+ transform: scale(1);
312
+ }
313
+
314
+ 50% {
315
+ transform: scale(0.92);
316
+ }
317
+
318
+ 100% {
319
+ transform: scale(1);
320
+ }
321
+ `)), bt = se("span", {
322
+ name: "MuiTouchRipple",
323
+ slot: "Root"
324
+ })({
325
+ overflow: "hidden",
326
+ pointerEvents: "none",
327
+ position: "absolute",
328
+ zIndex: 0,
329
+ top: 0,
330
+ right: 0,
331
+ bottom: 0,
332
+ left: 0,
333
+ borderRadius: "inherit"
334
+ }), gt = se(Ee, {
335
+ name: "MuiTouchRipple",
336
+ slot: "Ripple"
337
+ })(Re || (Re = Q`
338
+ opacity: 0;
339
+ position: absolute;
340
+
341
+ &.${0} {
342
+ opacity: 0.3;
343
+ transform: scale(1);
344
+ animation-name: ${0};
345
+ animation-duration: ${0}ms;
346
+ animation-timing-function: ${0};
347
+ }
348
+
349
+ &.${0} {
350
+ animation-duration: ${0}ms;
351
+ }
352
+
353
+ & .${0} {
354
+ opacity: 1;
355
+ display: block;
356
+ width: 100%;
357
+ height: 100%;
358
+ border-radius: 50%;
359
+ background-color: currentColor;
360
+ }
361
+
362
+ & .${0} {
363
+ opacity: 0;
364
+ animation-name: ${0};
365
+ animation-duration: ${0}ms;
366
+ animation-timing-function: ${0};
367
+ }
368
+
369
+ & .${0} {
370
+ position: absolute;
371
+ /* @noflip */
372
+ left: 0px;
373
+ top: 0;
374
+ animation-name: ${0};
375
+ animation-duration: 2500ms;
376
+ animation-timing-function: ${0};
377
+ animation-iteration-count: infinite;
378
+ animation-delay: 200ms;
379
+ }
380
+ `), b.rippleVisible, dt, ie, ({
381
+ theme: t
382
+ }) => t.transitions.easing.easeInOut, b.ripplePulsate, ({
383
+ theme: t
384
+ }) => t.transitions.duration.shorter, b.child, b.childLeaving, ht, ie, ({
385
+ theme: t
386
+ }) => t.transitions.easing.easeInOut, b.childPulsate, mt, ({
387
+ theme: t
388
+ }) => t.transitions.easing.easeInOut), ve = /* @__PURE__ */ p.forwardRef(function(n, s) {
389
+ const l = Me({
390
+ props: n,
391
+ name: "MuiTouchRipple"
392
+ }), {
393
+ center: i = !1,
394
+ classes: o = {},
395
+ className: r
396
+ } = l, u = re(l, pt), [c, f] = p.useState([]), h = p.useRef(0), R = p.useRef(null);
397
+ p.useEffect(() => {
398
+ R.current && (R.current(), R.current = null);
399
+ }, [c]);
400
+ const g = p.useRef(!1), x = We(), m = p.useRef(null), T = p.useRef(null), I = p.useCallback((d) => {
401
+ const {
402
+ pulsate: M,
403
+ rippleX: E,
404
+ rippleY: O,
405
+ rippleSize: F,
406
+ cb: z
407
+ } = d;
408
+ f((v) => [...v, /* @__PURE__ */ j(gt, {
409
+ classes: {
410
+ ripple: C(o.ripple, b.ripple),
411
+ rippleVisible: C(o.rippleVisible, b.rippleVisible),
412
+ ripplePulsate: C(o.ripplePulsate, b.ripplePulsate),
413
+ child: C(o.child, b.child),
414
+ childLeaving: C(o.childLeaving, b.childLeaving),
415
+ childPulsate: C(o.childPulsate, b.childPulsate)
416
+ },
417
+ timeout: ie,
418
+ pulsate: M,
419
+ rippleX: E,
420
+ rippleY: O,
421
+ rippleSize: F
422
+ }, h.current)]), h.current += 1, R.current = z;
423
+ }, [o]), L = p.useCallback((d = {}, M = {}, E = () => {
424
+ }) => {
425
+ const {
426
+ pulsate: O = !1,
427
+ center: F = i || M.pulsate,
428
+ fakeElement: z = !1
429
+ // For test purposes
430
+ } = M;
431
+ if ((d == null ? void 0 : d.type) === "mousedown" && g.current) {
432
+ g.current = !1;
433
+ return;
434
+ }
435
+ (d == null ? void 0 : d.type) === "touchstart" && (g.current = !0);
436
+ const v = z ? null : T.current, D = v ? v.getBoundingClientRect() : {
437
+ width: 0,
438
+ height: 0,
439
+ left: 0,
440
+ top: 0
441
+ };
442
+ let P, B, w;
443
+ if (F || d === void 0 || d.clientX === 0 && d.clientY === 0 || !d.clientX && !d.touches)
444
+ P = Math.round(D.width / 2), B = Math.round(D.height / 2);
445
+ else {
446
+ const {
447
+ clientX: _,
448
+ clientY: V
449
+ } = d.touches && d.touches.length > 0 ? d.touches[0] : d;
450
+ P = Math.round(_ - D.left), B = Math.round(V - D.top);
451
+ }
452
+ if (F)
453
+ w = Math.sqrt((2 * D.width ** 2 + D.height ** 2) / 3), w % 2 === 0 && (w += 1);
454
+ else {
455
+ const _ = Math.max(Math.abs((v ? v.clientWidth : 0) - P), P) * 2 + 2, V = Math.max(Math.abs((v ? v.clientHeight : 0) - B), B) * 2 + 2;
456
+ w = Math.sqrt(_ ** 2 + V ** 2);
457
+ }
458
+ d != null && d.touches ? m.current === null && (m.current = () => {
459
+ I({
460
+ pulsate: O,
461
+ rippleX: P,
462
+ rippleY: B,
463
+ rippleSize: w,
464
+ cb: E
465
+ });
466
+ }, x.start(ft, () => {
467
+ m.current && (m.current(), m.current = null);
468
+ })) : I({
469
+ pulsate: O,
470
+ rippleX: P,
471
+ rippleY: B,
472
+ rippleSize: w,
473
+ cb: E
474
+ });
475
+ }, [i, I, x]), U = p.useCallback(() => {
476
+ L({}, {
477
+ pulsate: !0
478
+ });
479
+ }, [L]), k = p.useCallback((d, M) => {
480
+ if (x.clear(), (d == null ? void 0 : d.type) === "touchend" && m.current) {
481
+ m.current(), m.current = null, x.start(0, () => {
482
+ k(d, M);
483
+ });
484
+ return;
485
+ }
486
+ m.current = null, f((E) => E.length > 0 ? E.slice(1) : E), R.current = M;
487
+ }, [x]);
488
+ return p.useImperativeHandle(s, () => ({
489
+ pulsate: U,
490
+ start: L,
491
+ stop: k
492
+ }), [U, L, k]), /* @__PURE__ */ j(bt, Y({
493
+ className: C(b.root, o.root, r),
494
+ ref: T
495
+ }, u, {
496
+ children: /* @__PURE__ */ j(ct, {
497
+ component: null,
498
+ exit: !0,
499
+ children: c
500
+ })
501
+ }));
502
+ });
503
+ process.env.NODE_ENV !== "production" && (ve.propTypes = {
504
+ /**
505
+ * If `true`, the ripple starts at the center of the component
506
+ * rather than at the point of interaction.
507
+ */
508
+ center: e.bool,
509
+ /**
510
+ * Override or extend the styles applied to the component.
511
+ */
512
+ classes: e.object,
513
+ /**
514
+ * @ignore
515
+ */
516
+ className: e.string
517
+ });
518
+ const yt = ve;
519
+ function Rt(t) {
520
+ return Xe("MuiButtonBase", t);
521
+ }
522
+ const Tt = Te("MuiButtonBase", ["root", "disabled", "focusVisible"]), Mt = ["action", "centerRipple", "children", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "LinkComponent", "onBlur", "onClick", "onContextMenu", "onDragLeave", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "tabIndex", "TouchRippleProps", "touchRippleRef", "type"], Et = (t) => {
523
+ const {
524
+ disabled: n,
525
+ focusVisible: s,
526
+ focusVisibleClassName: l,
527
+ classes: i
528
+ } = t, r = Ye({
529
+ root: ["root", n && "disabled", s && "focusVisible"]
530
+ }, Rt, i);
531
+ return s && l && (r.root += ` ${l}`), r;
532
+ }, vt = se("button", {
533
+ name: "MuiButtonBase",
534
+ slot: "Root",
535
+ overridesResolver: (t, n) => n.root
536
+ })({
537
+ display: "inline-flex",
538
+ alignItems: "center",
539
+ justifyContent: "center",
540
+ position: "relative",
541
+ boxSizing: "border-box",
542
+ WebkitTapHighlightColor: "transparent",
543
+ backgroundColor: "transparent",
544
+ // Reset default value
545
+ // We disable the focus ring for mouse, touch and keyboard users.
546
+ outline: 0,
547
+ border: 0,
548
+ margin: 0,
549
+ // Remove the margin in Safari
550
+ borderRadius: 0,
551
+ padding: 0,
552
+ // Remove the padding in Firefox
553
+ cursor: "pointer",
554
+ userSelect: "none",
555
+ verticalAlign: "middle",
556
+ MozAppearance: "none",
557
+ // Reset
558
+ WebkitAppearance: "none",
559
+ // Reset
560
+ textDecoration: "none",
561
+ // So we take precedent over the style of a native <a /> element.
562
+ color: "inherit",
563
+ "&::-moz-focus-inner": {
564
+ borderStyle: "none"
565
+ // Remove Firefox dotted outline.
566
+ },
567
+ [`&.${Tt.disabled}`]: {
568
+ pointerEvents: "none",
569
+ // Disable link interactions
570
+ cursor: "default"
571
+ },
572
+ "@media print": {
573
+ colorAdjust: "exact"
574
+ }
575
+ }), Ce = /* @__PURE__ */ p.forwardRef(function(n, s) {
576
+ const l = Me({
577
+ props: n,
578
+ name: "MuiButtonBase"
579
+ }), {
580
+ action: i,
581
+ centerRipple: o = !1,
582
+ children: r,
583
+ className: u,
584
+ component: c = "button",
585
+ disabled: f = !1,
586
+ disableRipple: h = !1,
587
+ disableTouchRipple: R = !1,
588
+ focusRipple: g = !1,
589
+ LinkComponent: x = "a",
590
+ onBlur: m,
591
+ onClick: T,
592
+ onContextMenu: I,
593
+ onDragLeave: L,
594
+ onFocus: U,
595
+ onFocusVisible: k,
596
+ onKeyDown: d,
597
+ onKeyUp: M,
598
+ onMouseDown: E,
599
+ onMouseLeave: O,
600
+ onMouseUp: F,
601
+ onTouchEnd: z,
602
+ onTouchMove: v,
603
+ onTouchStart: D,
604
+ tabIndex: P = 0,
605
+ TouchRippleProps: B,
606
+ touchRippleRef: w,
607
+ type: _
608
+ } = l, V = re(l, Mt), K = p.useRef(null), y = p.useRef(null), xe = he(y, w), {
609
+ isFocusVisibleRef: ce,
610
+ onFocus: Pe,
611
+ onBlur: Ve,
612
+ ref: Ne
613
+ } = Ge(), [S, q] = p.useState(!1);
614
+ f && S && q(!1), p.useImperativeHandle(i, () => ({
615
+ focusVisible: () => {
616
+ q(!0), K.current.focus();
617
+ }
618
+ }), []);
619
+ const [Z, De] = p.useState(!1);
620
+ p.useEffect(() => {
621
+ De(!0);
622
+ }, []);
623
+ const ee = Z && !h && !f;
624
+ p.useEffect(() => {
625
+ S && g && !h && Z && y.current.pulsate();
626
+ }, [h, g, S, Z]);
627
+ function N(a, fe, Ae = R) {
628
+ return W((de) => (fe && fe(de), !Ae && y.current && y.current[a](de), !0));
629
+ }
630
+ const Be = N("start", E), we = N("stop", I), Oe = N("stop", L), _e = N("stop", F), Se = N("stop", (a) => {
631
+ S && a.preventDefault(), O && O(a);
632
+ }), $e = N("start", D), Le = N("stop", z), ke = N("stop", v), Fe = N("stop", (a) => {
633
+ Ve(a), ce.current === !1 && q(!1), m && m(a);
634
+ }, !1), je = W((a) => {
635
+ K.current || (K.current = a.currentTarget), Pe(a), ce.current === !0 && (q(!0), k && k(a)), U && U(a);
636
+ }), te = () => {
637
+ const a = K.current;
638
+ return c && c !== "button" && !(a.tagName === "A" && a.href);
639
+ }, ne = p.useRef(!1), Ie = W((a) => {
640
+ g && !ne.current && S && y.current && a.key === " " && (ne.current = !0, y.current.stop(a, () => {
641
+ y.current.start(a);
642
+ })), a.target === a.currentTarget && te() && a.key === " " && a.preventDefault(), d && d(a), a.target === a.currentTarget && te() && a.key === "Enter" && !f && (a.preventDefault(), T && T(a));
643
+ }), Ue = W((a) => {
644
+ g && a.key === " " && y.current && S && !a.defaultPrevented && (ne.current = !1, y.current.stop(a, () => {
645
+ y.current.pulsate(a);
646
+ })), M && M(a), T && a.target === a.currentTarget && te() && a.key === " " && !a.defaultPrevented && T(a);
647
+ });
648
+ let H = c;
649
+ H === "button" && (V.href || V.to) && (H = x);
650
+ const A = {};
651
+ H === "button" ? (A.type = _ === void 0 ? "button" : _, A.disabled = f) : (!V.href && !V.to && (A.role = "button"), f && (A["aria-disabled"] = f));
652
+ const ze = he(s, Ne, K);
653
+ process.env.NODE_ENV !== "production" && p.useEffect(() => {
654
+ ee && !y.current && console.error(["MUI: The `component` prop provided to ButtonBase is invalid.", "Please make sure the children prop is rendered in this custom component."].join(`
655
+ `));
656
+ }, [ee]);
657
+ const pe = Y({}, l, {
658
+ centerRipple: o,
659
+ component: c,
660
+ disabled: f,
661
+ disableRipple: h,
662
+ disableTouchRipple: R,
663
+ focusRipple: g,
664
+ tabIndex: P,
665
+ focusVisible: S
666
+ }), Ke = Et(pe);
667
+ return /* @__PURE__ */ He(vt, Y({
668
+ as: H,
669
+ className: C(Ke.root, u),
670
+ ownerState: pe,
671
+ onBlur: Fe,
672
+ onClick: T,
673
+ onContextMenu: we,
674
+ onFocus: je,
675
+ onKeyDown: Ie,
676
+ onKeyUp: Ue,
677
+ onMouseDown: Be,
678
+ onMouseLeave: Se,
679
+ onMouseUp: _e,
680
+ onDragLeave: Oe,
681
+ onTouchEnd: Le,
682
+ onTouchMove: ke,
683
+ onTouchStart: $e,
684
+ ref: ze,
685
+ tabIndex: f ? -1 : P,
686
+ type: _
687
+ }, A, V, {
688
+ children: [r, ee ? (
689
+ /* TouchRipple is only needed client-side, x2 boost on the server. */
690
+ /* @__PURE__ */ j(yt, Y({
691
+ ref: xe,
692
+ center: o
693
+ }, B))
694
+ ) : null]
695
+ }));
696
+ });
697
+ process.env.NODE_ENV !== "production" && (Ce.propTypes = {
698
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
699
+ // │ These PropTypes are generated from the TypeScript type definitions. │
700
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
701
+ // └─────────────────────────────────────────────────────────────────────┘
702
+ /**
703
+ * A ref for imperative actions.
704
+ * It currently only supports `focusVisible()` action.
705
+ */
706
+ action: nt,
707
+ /**
708
+ * If `true`, the ripples are centered.
709
+ * They won't start at the cursor interaction position.
710
+ * @default false
711
+ */
712
+ centerRipple: e.bool,
713
+ /**
714
+ * The content of the component.
715
+ */
716
+ children: e.node,
717
+ /**
718
+ * Override or extend the styles applied to the component.
719
+ */
720
+ classes: e.object,
721
+ /**
722
+ * @ignore
723
+ */
724
+ className: e.string,
725
+ /**
726
+ * The component used for the root node.
727
+ * Either a string to use a HTML element or a component.
728
+ */
729
+ component: et,
730
+ /**
731
+ * If `true`, the component is disabled.
732
+ * @default false
733
+ */
734
+ disabled: e.bool,
735
+ /**
736
+ * If `true`, the ripple effect is disabled.
737
+ *
738
+ * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
739
+ * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
740
+ * @default false
741
+ */
742
+ disableRipple: e.bool,
743
+ /**
744
+ * If `true`, the touch ripple effect is disabled.
745
+ * @default false
746
+ */
747
+ disableTouchRipple: e.bool,
748
+ /**
749
+ * If `true`, the base button will have a keyboard focus ripple.
750
+ * @default false
751
+ */
752
+ focusRipple: e.bool,
753
+ /**
754
+ * This prop can help identify which element has keyboard focus.
755
+ * The class name will be applied when the element gains the focus through keyboard interaction.
756
+ * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).
757
+ * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).
758
+ * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components
759
+ * if needed.
760
+ */
761
+ focusVisibleClassName: e.string,
762
+ /**
763
+ * @ignore
764
+ */
765
+ href: e.any,
766
+ /**
767
+ * The component used to render a link when the `href` prop is provided.
768
+ * @default 'a'
769
+ */
770
+ LinkComponent: e.elementType,
771
+ /**
772
+ * @ignore
773
+ */
774
+ onBlur: e.func,
775
+ /**
776
+ * @ignore
777
+ */
778
+ onClick: e.func,
779
+ /**
780
+ * @ignore
781
+ */
782
+ onContextMenu: e.func,
783
+ /**
784
+ * @ignore
785
+ */
786
+ onDragLeave: e.func,
787
+ /**
788
+ * @ignore
789
+ */
790
+ onFocus: e.func,
791
+ /**
792
+ * Callback fired when the component is focused with a keyboard.
793
+ * We trigger a `onFocus` callback too.
794
+ */
795
+ onFocusVisible: e.func,
796
+ /**
797
+ * @ignore
798
+ */
799
+ onKeyDown: e.func,
800
+ /**
801
+ * @ignore
802
+ */
803
+ onKeyUp: e.func,
804
+ /**
805
+ * @ignore
806
+ */
807
+ onMouseDown: e.func,
808
+ /**
809
+ * @ignore
810
+ */
811
+ onMouseLeave: e.func,
812
+ /**
813
+ * @ignore
814
+ */
815
+ onMouseUp: e.func,
816
+ /**
817
+ * @ignore
818
+ */
819
+ onTouchEnd: e.func,
820
+ /**
821
+ * @ignore
822
+ */
823
+ onTouchMove: e.func,
824
+ /**
825
+ * @ignore
826
+ */
827
+ onTouchStart: e.func,
828
+ /**
829
+ * The system prop that allows defining system overrides as well as additional CSS styles.
830
+ */
831
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
832
+ /**
833
+ * @default 0
834
+ */
835
+ tabIndex: e.number,
836
+ /**
837
+ * Props applied to the `TouchRipple` element.
838
+ */
839
+ TouchRippleProps: e.object,
840
+ /**
841
+ * A ref that points to the `TouchRipple` element.
842
+ */
843
+ touchRippleRef: e.oneOfType([e.func, e.shape({
844
+ current: e.shape({
845
+ pulsate: e.func.isRequired,
846
+ start: e.func.isRequired,
847
+ stop: e.func.isRequired
848
+ })
849
+ })]),
850
+ /**
851
+ * @ignore
852
+ */
853
+ type: e.oneOfType([e.oneOf(["button", "reset", "submit"]), e.string])
854
+ });
855
+ const wt = Ce;
856
+ export {
857
+ wt as B,
858
+ me as T,
859
+ ot as _,
860
+ ct as a,
861
+ oe as b,
862
+ Je as c,
863
+ it as d,
864
+ et as e,
865
+ nt as r
866
+ };