@sisense/sdk-shared-ui 1.28.0 → 1.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/Breadcrumbs-B46ViOSv.cjs +3 -0
  2. package/dist/Breadcrumbs-CQNCIJ2Y.js +301 -0
  3. package/dist/Button-CoMaroSC.cjs +1 -0
  4. package/dist/Button-D5ZAS_sd.js +569 -0
  5. package/dist/ButtonBase-Camgk6s8.cjs +74 -0
  6. package/dist/{createSvgIcon-CXJWSg3i.js → ButtonBase-DPVWpC8-.js} +331 -350
  7. package/dist/{Checkbox-CrbGw8d7.js → Checkbox-3bG1OLg3.js} +21 -18
  8. package/dist/Checkbox-oJOn5Vb9.cjs +1 -0
  9. package/dist/{Icon-B1V-T6UH.cjs → Icon-CqoYg88-.cjs} +1 -1
  10. package/dist/{Icon-Cs6oGRgo.js → Icon-D0uZg6iJ.js} +31 -10
  11. package/dist/{SvgIcon-SnObJHZS.cjs → SvgIcon-Dg-EBYZz.cjs} +1 -1
  12. package/dist/{SvgIcon-LwOuESoH.js → SvgIcon-DsAvI5iY.js} +1 -1
  13. package/dist/{TablePagination-B8I5QURH.js → TablePagination-DUkJaWJG.js} +2133 -2304
  14. package/dist/TablePagination-Yp8eKLZB.cjs +15 -0
  15. package/dist/{ThemeProvider-aq1EWT1u.js → ThemeProvider-BCsnqK18.js} +1198 -1154
  16. package/dist/ThemeProvider-BjBWRt7C.cjs +114 -0
  17. package/dist/{Tooltip-vVc6Lxew.js → Tooltip-B0-7TF8b.js} +15 -13
  18. package/dist/Tooltip-DE1hlnS3.cjs +7 -0
  19. package/dist/{Typography-C891hjk2.js → Typography-BGFgTnYN.js} +3 -2
  20. package/dist/{Typography-vldQClJj.cjs → Typography-CGsd6zC4.cjs} +1 -1
  21. package/dist/createSvgIcon-DDrcw4wZ.cjs +1 -0
  22. package/dist/createSvgIcon-rAujRRtd.js +17 -0
  23. package/dist/deepmerge-BuAjuQR6.cjs +17 -0
  24. package/dist/deepmerge-DNqbOtFI.js +177 -0
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.js +30 -24
  27. package/dist/integerPropType-B8hl-7D0.js +180 -0
  28. package/dist/integerPropType-BGlNA6vX.cjs +17 -0
  29. package/dist/lib/Breadcrumbs/Breadcrumbs.cjs +1 -0
  30. package/dist/lib/Breadcrumbs/Breadcrumbs.d.ts +16 -0
  31. package/dist/lib/Breadcrumbs/Breadcrumbs.d.ts.map +1 -0
  32. package/dist/lib/Breadcrumbs/Breadcrumbs.js +7 -0
  33. package/dist/lib/Breadcrumbs/index.d.ts +5 -0
  34. package/dist/lib/Breadcrumbs/index.d.ts.map +1 -0
  35. package/dist/lib/Breadcrumbs/themes/breadcrumbsTheme.d.ts +4 -0
  36. package/dist/lib/Breadcrumbs/themes/breadcrumbsTheme.d.ts.map +1 -0
  37. package/dist/lib/Breadcrumbs/themes/index.d.ts +2 -0
  38. package/dist/lib/Breadcrumbs/themes/index.d.ts.map +1 -0
  39. package/dist/lib/Button/Button.cjs +1 -0
  40. package/dist/lib/Button/Button.d.ts +10 -0
  41. package/dist/lib/Button/Button.d.ts.map +1 -0
  42. package/dist/lib/Button/Button.js +7 -0
  43. package/dist/lib/Button/index.d.ts +5 -0
  44. package/dist/lib/Button/index.d.ts.map +1 -0
  45. package/dist/lib/Button/themes/buttonsTheme.d.ts +11 -0
  46. package/dist/lib/Button/themes/buttonsTheme.d.ts.map +1 -0
  47. package/dist/lib/Button/themes/index.d.ts +2 -0
  48. package/dist/lib/Button/themes/index.d.ts.map +1 -0
  49. package/dist/lib/Checkbox/Checkbox.cjs +1 -1
  50. package/dist/lib/Checkbox/Checkbox.js +1 -1
  51. package/dist/lib/DEPRECATED_Button/DEPRECATED_Button.d.ts +2 -2
  52. package/dist/lib/DEPRECATED_Button/DEPRECATED_Button.d.ts.map +1 -1
  53. package/dist/lib/Icon/Icon.cjs +1 -1
  54. package/dist/lib/Icon/Icon.d.ts +1 -1
  55. package/dist/lib/Icon/Icon.d.ts.map +1 -1
  56. package/dist/lib/Icon/Icon.js +1 -1
  57. package/dist/lib/TablePagination/TablePagination.cjs +1 -1
  58. package/dist/lib/TablePagination/TablePagination.js +1 -1
  59. package/dist/lib/Tooltip/Tooltip.cjs +1 -1
  60. package/dist/lib/Tooltip/Tooltip.js +2 -2
  61. package/dist/lib/Typography/Typography.cjs +1 -1
  62. package/dist/lib/Typography/Typography.js +2 -2
  63. package/dist/lib/index.d.ts +2 -0
  64. package/dist/lib/index.d.ts.map +1 -1
  65. package/dist/package.json +18 -1
  66. package/dist/useControlled-BYdyS7Pn.js +31 -0
  67. package/dist/useControlled-Ysk4KqoX.cjs +3 -0
  68. package/dist/useFormControl-CatNKXAi.js +10 -0
  69. package/dist/useFormControl-haP0iPhl.cjs +1 -0
  70. package/dist/useSlot-7x9FkqBW.js +720 -0
  71. package/dist/useSlot-B_P_o-pz.cjs +1 -0
  72. package/dist/useSlotProps-BpXHXb21.js +102 -0
  73. package/dist/useSlotProps-COvANhgg.cjs +1 -0
  74. package/dist/{useTheme-DJmNR5EL.cjs → useTheme-BN6DGaDZ.cjs} +1 -1
  75. package/dist/{useTheme-CtIZL8WJ.js → useTheme-eCVqNAnk.js} +1 -1
  76. package/dist/useTimeout-BG7TPjEm.js +92 -0
  77. package/dist/useTimeout-DQN9lwd_.cjs +2 -0
  78. package/package.json +18 -1
  79. package/dist/Checkbox-Dy9BTXfS.cjs +0 -1
  80. package/dist/TablePagination-DH0TZ21v.cjs +0 -31
  81. package/dist/ThemeProvider-sqppyE-5.cjs +0 -114
  82. package/dist/Tooltip-Dokek6y8.cjs +0 -7
  83. package/dist/TransitionGroupContext-BlR3HYBG.cjs +0 -4
  84. package/dist/TransitionGroupContext-Ci_clMyv.js +0 -120
  85. package/dist/createSvgIcon-DF4qzIJY.cjs +0 -74
  86. package/dist/useSlot-BfQr8KCN.js +0 -803
  87. package/dist/useSlot-C3-OaWva.cjs +0 -1
@@ -0,0 +1,569 @@
1
+ import { jsxs as G, jsx as y } from "react/jsx-runtime";
2
+ import * as b from "react";
3
+ import { forwardRef as U } from "react";
4
+ import { d as A } from "./deepmerge-DNqbOtFI.js";
5
+ import { siColors as i, sfColors as S } from "./lib/themes/themes.js";
6
+ import { g as F, b as K, s as C, r as Y, d as l, m as q, e as J, f as $, h as Q, j as g, a as X, T as Z } from "./ThemeProvider-BCsnqK18.js";
7
+ import { P as t } from "./index-D0lMis-I.js";
8
+ import { c as oo } from "./createSimplePaletteValueFilter-B7--0ryQ.js";
9
+ import { B as to } from "./ButtonBase-DPVWpC8-.js";
10
+ function k(o, r) {
11
+ const a = {
12
+ ...r
13
+ };
14
+ for (const e in o)
15
+ if (Object.prototype.hasOwnProperty.call(o, e)) {
16
+ const n = e;
17
+ if (n === "components" || n === "slots")
18
+ a[n] = {
19
+ ...o[n],
20
+ ...a[n]
21
+ };
22
+ else if (n === "componentsProps" || n === "slotProps") {
23
+ const s = o[n], d = r[n];
24
+ if (!d)
25
+ a[n] = s || {};
26
+ else if (!s)
27
+ a[n] = d;
28
+ else {
29
+ a[n] = {
30
+ ...d
31
+ };
32
+ for (const p in s)
33
+ if (Object.prototype.hasOwnProperty.call(s, p)) {
34
+ const c = p;
35
+ a[n][c] = k(s[c], d[c]);
36
+ }
37
+ }
38
+ } else a[n] === void 0 && (a[n] = o[n]);
39
+ }
40
+ return a;
41
+ }
42
+ function ao(o) {
43
+ return F("MuiButton", o);
44
+ }
45
+ const u = K("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorSuccess", "colorError", "colorInfo", "colorWarning", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "icon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge"]), T = /* @__PURE__ */ b.createContext({});
46
+ process.env.NODE_ENV !== "production" && (T.displayName = "ButtonGroupContext");
47
+ const R = /* @__PURE__ */ b.createContext(void 0);
48
+ process.env.NODE_ENV !== "production" && (R.displayName = "ButtonGroupButtonContext");
49
+ const ro = (o) => {
50
+ const {
51
+ color: r,
52
+ disableElevation: a,
53
+ fullWidth: e,
54
+ size: n,
55
+ variant: s,
56
+ classes: d
57
+ } = o, p = {
58
+ root: ["root", s, `${s}${l(r)}`, `size${l(n)}`, `${s}Size${l(n)}`, `color${l(r)}`, a && "disableElevation", e && "fullWidth"],
59
+ label: ["label"],
60
+ startIcon: ["icon", "startIcon", `iconSize${l(n)}`],
61
+ endIcon: ["icon", "endIcon", `iconSize${l(n)}`]
62
+ }, c = Q(p, ao, d);
63
+ return {
64
+ ...d,
65
+ // forward the focused, disabled, etc. classes to the ButtonBase
66
+ ...c
67
+ };
68
+ }, O = [{
69
+ props: {
70
+ size: "small"
71
+ },
72
+ style: {
73
+ "& > *:nth-of-type(1)": {
74
+ fontSize: 18
75
+ }
76
+ }
77
+ }, {
78
+ props: {
79
+ size: "medium"
80
+ },
81
+ style: {
82
+ "& > *:nth-of-type(1)": {
83
+ fontSize: 20
84
+ }
85
+ }
86
+ }, {
87
+ props: {
88
+ size: "large"
89
+ },
90
+ style: {
91
+ "& > *:nth-of-type(1)": {
92
+ fontSize: 22
93
+ }
94
+ }
95
+ }], no = C(to, {
96
+ shouldForwardProp: (o) => Y(o) || o === "classes",
97
+ name: "MuiButton",
98
+ slot: "Root",
99
+ overridesResolver: (o, r) => {
100
+ const {
101
+ ownerState: a
102
+ } = o;
103
+ return [r.root, r[a.variant], r[`${a.variant}${l(a.color)}`], r[`size${l(a.size)}`], r[`${a.variant}Size${l(a.size)}`], a.color === "inherit" && r.colorInherit, a.disableElevation && r.disableElevation, a.fullWidth && r.fullWidth];
104
+ }
105
+ })(q(({
106
+ theme: o
107
+ }) => {
108
+ const r = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], a = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
109
+ return {
110
+ ...o.typography.button,
111
+ minWidth: 64,
112
+ padding: "6px 16px",
113
+ border: 0,
114
+ borderRadius: (o.vars || o).shape.borderRadius,
115
+ transition: o.transitions.create(["background-color", "box-shadow", "border-color", "color"], {
116
+ duration: o.transitions.duration.short
117
+ }),
118
+ "&:hover": {
119
+ textDecoration: "none"
120
+ },
121
+ [`&.${u.disabled}`]: {
122
+ color: (o.vars || o).palette.action.disabled
123
+ },
124
+ variants: [{
125
+ props: {
126
+ variant: "contained"
127
+ },
128
+ style: {
129
+ color: "var(--variant-containedColor)",
130
+ backgroundColor: "var(--variant-containedBg)",
131
+ boxShadow: (o.vars || o).shadows[2],
132
+ "&:hover": {
133
+ boxShadow: (o.vars || o).shadows[4],
134
+ // Reset on touch devices, it doesn't add specificity
135
+ "@media (hover: none)": {
136
+ boxShadow: (o.vars || o).shadows[2]
137
+ }
138
+ },
139
+ "&:active": {
140
+ boxShadow: (o.vars || o).shadows[8]
141
+ },
142
+ [`&.${u.focusVisible}`]: {
143
+ boxShadow: (o.vars || o).shadows[6]
144
+ },
145
+ [`&.${u.disabled}`]: {
146
+ color: (o.vars || o).palette.action.disabled,
147
+ boxShadow: (o.vars || o).shadows[0],
148
+ backgroundColor: (o.vars || o).palette.action.disabledBackground
149
+ }
150
+ }
151
+ }, {
152
+ props: {
153
+ variant: "outlined"
154
+ },
155
+ style: {
156
+ padding: "5px 15px",
157
+ border: "1px solid currentColor",
158
+ borderColor: "var(--variant-outlinedBorder, currentColor)",
159
+ backgroundColor: "var(--variant-outlinedBg)",
160
+ color: "var(--variant-outlinedColor)",
161
+ [`&.${u.disabled}`]: {
162
+ border: `1px solid ${(o.vars || o).palette.action.disabledBackground}`
163
+ }
164
+ }
165
+ }, {
166
+ props: {
167
+ variant: "text"
168
+ },
169
+ style: {
170
+ padding: "6px 8px",
171
+ color: "var(--variant-textColor)",
172
+ backgroundColor: "var(--variant-textBg)"
173
+ }
174
+ }, ...Object.entries(o.palette).filter(oo()).map(([e]) => ({
175
+ props: {
176
+ color: e
177
+ },
178
+ style: {
179
+ "--variant-textColor": (o.vars || o).palette[e].main,
180
+ "--variant-outlinedColor": (o.vars || o).palette[e].main,
181
+ "--variant-outlinedBorder": o.vars ? `rgba(${o.vars.palette[e].mainChannel} / 0.5)` : g(o.palette[e].main, 0.5),
182
+ "--variant-containedColor": (o.vars || o).palette[e].contrastText,
183
+ "--variant-containedBg": (o.vars || o).palette[e].main,
184
+ "@media (hover: hover)": {
185
+ "&:hover": {
186
+ "--variant-containedBg": (o.vars || o).palette[e].dark,
187
+ "--variant-textBg": o.vars ? `rgba(${o.vars.palette[e].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : g(o.palette[e].main, o.palette.action.hoverOpacity),
188
+ "--variant-outlinedBorder": (o.vars || o).palette[e].main,
189
+ "--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette[e].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : g(o.palette[e].main, o.palette.action.hoverOpacity)
190
+ }
191
+ }
192
+ }
193
+ })), {
194
+ props: {
195
+ color: "inherit"
196
+ },
197
+ style: {
198
+ color: "inherit",
199
+ borderColor: "currentColor",
200
+ "--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedBg : r,
201
+ "@media (hover: hover)": {
202
+ "&:hover": {
203
+ "--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedHoverBg : a,
204
+ "--variant-textBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : g(o.palette.text.primary, o.palette.action.hoverOpacity),
205
+ "--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : g(o.palette.text.primary, o.palette.action.hoverOpacity)
206
+ }
207
+ }
208
+ }
209
+ }, {
210
+ props: {
211
+ size: "small",
212
+ variant: "text"
213
+ },
214
+ style: {
215
+ padding: "4px 5px",
216
+ fontSize: o.typography.pxToRem(13)
217
+ }
218
+ }, {
219
+ props: {
220
+ size: "large",
221
+ variant: "text"
222
+ },
223
+ style: {
224
+ padding: "8px 11px",
225
+ fontSize: o.typography.pxToRem(15)
226
+ }
227
+ }, {
228
+ props: {
229
+ size: "small",
230
+ variant: "outlined"
231
+ },
232
+ style: {
233
+ padding: "3px 9px",
234
+ fontSize: o.typography.pxToRem(13)
235
+ }
236
+ }, {
237
+ props: {
238
+ size: "large",
239
+ variant: "outlined"
240
+ },
241
+ style: {
242
+ padding: "7px 21px",
243
+ fontSize: o.typography.pxToRem(15)
244
+ }
245
+ }, {
246
+ props: {
247
+ size: "small",
248
+ variant: "contained"
249
+ },
250
+ style: {
251
+ padding: "4px 10px",
252
+ fontSize: o.typography.pxToRem(13)
253
+ }
254
+ }, {
255
+ props: {
256
+ size: "large",
257
+ variant: "contained"
258
+ },
259
+ style: {
260
+ padding: "8px 22px",
261
+ fontSize: o.typography.pxToRem(15)
262
+ }
263
+ }, {
264
+ props: {
265
+ disableElevation: !0
266
+ },
267
+ style: {
268
+ boxShadow: "none",
269
+ "&:hover": {
270
+ boxShadow: "none"
271
+ },
272
+ [`&.${u.focusVisible}`]: {
273
+ boxShadow: "none"
274
+ },
275
+ "&:active": {
276
+ boxShadow: "none"
277
+ },
278
+ [`&.${u.disabled}`]: {
279
+ boxShadow: "none"
280
+ }
281
+ }
282
+ }, {
283
+ props: {
284
+ fullWidth: !0
285
+ },
286
+ style: {
287
+ width: "100%"
288
+ }
289
+ }]
290
+ };
291
+ })), eo = C("span", {
292
+ name: "MuiButton",
293
+ slot: "StartIcon",
294
+ overridesResolver: (o, r) => {
295
+ const {
296
+ ownerState: a
297
+ } = o;
298
+ return [r.startIcon, r[`iconSize${l(a.size)}`]];
299
+ }
300
+ })({
301
+ display: "inherit",
302
+ marginRight: 8,
303
+ marginLeft: -4,
304
+ variants: [{
305
+ props: {
306
+ size: "small"
307
+ },
308
+ style: {
309
+ marginLeft: -2
310
+ }
311
+ }, ...O]
312
+ }), io = C("span", {
313
+ name: "MuiButton",
314
+ slot: "EndIcon",
315
+ overridesResolver: (o, r) => {
316
+ const {
317
+ ownerState: a
318
+ } = o;
319
+ return [r.endIcon, r[`iconSize${l(a.size)}`]];
320
+ }
321
+ })({
322
+ display: "inherit",
323
+ marginRight: -4,
324
+ marginLeft: 8,
325
+ variants: [{
326
+ props: {
327
+ size: "small"
328
+ },
329
+ style: {
330
+ marginRight: -2
331
+ }
332
+ }, ...O]
333
+ }), E = /* @__PURE__ */ b.forwardRef(function(r, a) {
334
+ const e = b.useContext(T), n = b.useContext(R), s = k(e, r), d = J({
335
+ props: s,
336
+ name: "MuiButton"
337
+ }), {
338
+ children: p,
339
+ color: c = "primary",
340
+ component: m = "button",
341
+ className: N,
342
+ disabled: B = !1,
343
+ disableElevation: P = !1,
344
+ disableFocusRipple: z = !1,
345
+ endIcon: w,
346
+ focusVisibleClassName: M,
347
+ fullWidth: W = !1,
348
+ size: H = "medium",
349
+ startIcon: h,
350
+ type: I,
351
+ variant: L = "text",
352
+ ...V
353
+ } = d, x = {
354
+ ...d,
355
+ color: c,
356
+ component: m,
357
+ disabled: B,
358
+ disableElevation: P,
359
+ disableFocusRipple: z,
360
+ fullWidth: W,
361
+ size: H,
362
+ type: I,
363
+ variant: L
364
+ }, v = ro(x), j = h && /* @__PURE__ */ y(eo, {
365
+ className: v.startIcon,
366
+ ownerState: x,
367
+ children: h
368
+ }), _ = w && /* @__PURE__ */ y(io, {
369
+ className: v.endIcon,
370
+ ownerState: x,
371
+ children: w
372
+ }), D = n || "";
373
+ return /* @__PURE__ */ G(no, {
374
+ ownerState: x,
375
+ className: $(e.className, v.root, N, D),
376
+ component: m,
377
+ disabled: B,
378
+ focusRipple: !z,
379
+ focusVisibleClassName: $(v.focusVisible, M),
380
+ ref: a,
381
+ type: I,
382
+ ...V,
383
+ classes: v,
384
+ children: [j, p, _]
385
+ });
386
+ });
387
+ process.env.NODE_ENV !== "production" && (E.propTypes = {
388
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
389
+ // │ These PropTypes are generated from the TypeScript type definitions. │
390
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
391
+ // └─────────────────────────────────────────────────────────────────────┘
392
+ /**
393
+ * The content of the component.
394
+ */
395
+ children: t.node,
396
+ /**
397
+ * Override or extend the styles applied to the component.
398
+ */
399
+ classes: t.object,
400
+ /**
401
+ * @ignore
402
+ */
403
+ className: t.string,
404
+ /**
405
+ * The color of the component.
406
+ * It supports both default and custom theme colors, which can be added as shown in the
407
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
408
+ * @default 'primary'
409
+ */
410
+ color: t.oneOfType([t.oneOf(["inherit", "primary", "secondary", "success", "error", "info", "warning"]), t.string]),
411
+ /**
412
+ * The component used for the root node.
413
+ * Either a string to use a HTML element or a component.
414
+ */
415
+ component: t.elementType,
416
+ /**
417
+ * If `true`, the component is disabled.
418
+ * @default false
419
+ */
420
+ disabled: t.bool,
421
+ /**
422
+ * If `true`, no elevation is used.
423
+ * @default false
424
+ */
425
+ disableElevation: t.bool,
426
+ /**
427
+ * If `true`, the keyboard focus ripple is disabled.
428
+ * @default false
429
+ */
430
+ disableFocusRipple: t.bool,
431
+ /**
432
+ * If `true`, the ripple effect is disabled.
433
+ *
434
+ * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
435
+ * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
436
+ * @default false
437
+ */
438
+ disableRipple: t.bool,
439
+ /**
440
+ * Element placed after the children.
441
+ */
442
+ endIcon: t.node,
443
+ /**
444
+ * @ignore
445
+ */
446
+ focusVisibleClassName: t.string,
447
+ /**
448
+ * If `true`, the button will take up the full width of its container.
449
+ * @default false
450
+ */
451
+ fullWidth: t.bool,
452
+ /**
453
+ * The URL to link to when the button is clicked.
454
+ * If defined, an `a` element will be used as the root node.
455
+ */
456
+ href: t.string,
457
+ /**
458
+ * The size of the component.
459
+ * `small` is equivalent to the dense button styling.
460
+ * @default 'medium'
461
+ */
462
+ size: t.oneOfType([t.oneOf(["small", "medium", "large"]), t.string]),
463
+ /**
464
+ * Element placed before the children.
465
+ */
466
+ startIcon: t.node,
467
+ /**
468
+ * The system prop that allows defining system overrides as well as additional CSS styles.
469
+ */
470
+ sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
471
+ /**
472
+ * @ignore
473
+ */
474
+ type: t.oneOfType([t.oneOf(["button", "reset", "submit"]), t.string]),
475
+ /**
476
+ * The variant to use.
477
+ * @default 'text'
478
+ */
479
+ variant: t.oneOfType([t.oneOf(["contained", "outlined", "text"]), t.string])
480
+ });
481
+ const f = X({
482
+ components: {
483
+ MuiButton: {
484
+ variants: [
485
+ {
486
+ props: { variant: "gray" },
487
+ style: {
488
+ backgroundColor: i.StUiColors.guiding,
489
+ color: i.StInteractionColors.linkHovered,
490
+ "&:hover": {
491
+ backgroundColor: i.StInteractionColors.guidingHover
492
+ },
493
+ "&:disabled": {
494
+ backgroundColor: i.StBackgroundColors.workspace
495
+ }
496
+ }
497
+ },
498
+ {
499
+ props: { variant: "primary" },
500
+ style: {
501
+ "&:disabled": {
502
+ backgroundColor: i.StPrimaryColors.primary
503
+ }
504
+ }
505
+ },
506
+ {
507
+ props: { variant: "secondary" },
508
+ style: {
509
+ backgroundColor: i.StBackgroundColors.workspace,
510
+ color: i.StInteractionColors.linkHovered,
511
+ border: `1px solid ${S.$SHUTTLE_GRAY_DARK}`,
512
+ "&:hover": {
513
+ backgroundColor: i.StBackgroundColors.workspace,
514
+ border: `1px solid ${S.$SHUTTLE_GRAY_DARK}`
515
+ },
516
+ "&:disabled": {
517
+ backgroundColor: i.StBackgroundColors.workspace
518
+ }
519
+ }
520
+ },
521
+ {
522
+ props: { variant: "text" },
523
+ style: {
524
+ color: i.StTextColors.link,
525
+ "&:hover": {
526
+ backgroundColor: i.StInteractionColors.guidingHover
527
+ },
528
+ "&:disabled": {
529
+ backgroundColor: i.StBackgroundColors.workspace
530
+ }
531
+ }
532
+ }
533
+ ],
534
+ styleOverrides: {
535
+ root: {
536
+ borderRadius: "4px",
537
+ height: "28px",
538
+ lineHeight: "24px",
539
+ minHeight: 0,
540
+ textTransform: "none",
541
+ color: i.StTextColors.active,
542
+ boxShadow: "none",
543
+ "&:hover": {
544
+ backgroundColor: i.StInteractionColors.primaryHovered,
545
+ boxShadow: "none"
546
+ },
547
+ "&:disabled": {
548
+ color: S.$SHUTTLE_GRAY_DARK,
549
+ opacity: ".3"
550
+ }
551
+ }
552
+ }
553
+ }
554
+ }
555
+ });
556
+ f.shadows[1] = "0px 0px 5px rgba(58, 67, 86, 0.2)";
557
+ f.shadows[2] = "0 1px 3px 1px rgba(58, 67, 86, 0.3)";
558
+ const xo = U((o, r) => {
559
+ const { children: a, theme: e, ...n } = o, s = e ? A(f, {
560
+ components: {
561
+ MuiButton: e
562
+ }
563
+ }) : f;
564
+ return /* @__PURE__ */ y(Z, { theme: s, children: /* @__PURE__ */ y(E, { ...n, ref: r, children: a }) });
565
+ });
566
+ export {
567
+ xo as B,
568
+ f as b
569
+ };
@@ -0,0 +1,74 @@
1
+ "use strict";var xe=Object.defineProperty;var Ee=(n,e,t)=>e in n?xe(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ne=(n,e,t)=>Ee(n,typeof e!="symbol"?e+"":e,t);const P=require("react"),o=require("./index-B-zZeebW.cjs"),h=require("./ThemeProvider-BjBWRt7C.cjs"),F=require("react/jsx-runtime"),b=require("./useTimeout-DQN9lwd_.cjs"),Ce=require("./setPrototypeOf-BmHXYjK5.cjs"),Ve=require("./extends-q0Hkx4pQ.cjs"),De=require("./assertThisInitialized-BSnhOY1M.cjs");function ve(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,l.get?l:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const d=ve(P);function Ne(n){const{prototype:e={}}=n;return!!e.isReactComponent}function Se(n,e,t,l,s){const r=n[e],i=s||e;if(r==null||typeof window>"u")return null;let u;return typeof r=="function"&&!Ne(r)&&(u="Did you accidentally provide a plain function component instead?"),u!==void 0?new Error(`Invalid ${l} \`${i}\` supplied to \`${t}\`. Expected an element type that can hold a ref. ${u} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const oe=b.chainPropTypes(o.PropTypes.elementType,Se);class G{constructor(){ne(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new G}static use(){const e=b.useLazyRef(G.create).current,[t,l]=d.useState(!1);return e.shouldMount=t,e.setShouldMount=l,d.useEffect(e.mountEffect,[t]),e}mount(){return this.mounted||(this.mounted=je(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...e){this.mount().then(()=>{var t;return(t=this.ref.current)==null?void 0:t.start(...e)})}stop(...e){this.mount().then(()=>{var t;return(t=this.ref.current)==null?void 0:t.stop(...e)})}pulsate(...e){this.mount().then(()=>{var t;return(t=this.ref.current)==null?void 0:t.pulsate(...e)})}}function we(){return G.use()}function je(){let n,e;const t=new Promise((l,s)=>{n=l,e=s});return t.resolve=n,t.reject=e,t}function Z(n,e){var t=function(r){return e&&P.isValidElement(r)?e(r):r},l=Object.create(null);return n&&P.Children.map(n,function(s){return s}).forEach(function(s){l[s.key]=t(s)}),l}function ke(n,e){n=n||{},e=e||{};function t(m){return m in e?e[m]:n[m]}var l=Object.create(null),s=[];for(var r in n)r in e?s.length&&(l[r]=s,s=[]):s.push(r);var i,u={};for(var p in e){if(l[p])for(i=0;i<l[p].length;i++){var f=l[p][i];u[l[p][i]]=t(f)}u[p]=t(p)}for(i=0;i<s.length;i++)u[s[i]]=t(s[i]);return u}function $(n,e,t){return t[e]!=null?t[e]:n.props[e]}function Be(n,e){return Z(n.children,function(t){return P.cloneElement(t,{onExited:e.bind(null,t),in:!0,appear:$(t,"appear",n),enter:$(t,"enter",n),exit:$(t,"exit",n)})})}function Oe(n,e,t){var l=Z(n.children),s=ke(e,l);return Object.keys(s).forEach(function(r){var i=s[r];if(P.isValidElement(i)){var u=r in e,p=r in l,f=e[r],m=P.isValidElement(f)&&!f.props.in;p&&(!u||m)?s[r]=P.cloneElement(i,{onExited:t.bind(null,i),in:!0,exit:$(i,"exit",n),enter:$(i,"enter",n)}):!p&&u&&!m?s[r]=P.cloneElement(i,{in:!1}):p&&u&&P.isValidElement(f)&&(s[r]=P.cloneElement(i,{onExited:t.bind(null,i),in:f.props.in,exit:$(i,"exit",n),enter:$(i,"enter",n)}))}}),s}var Le=Object.values||function(n){return Object.keys(n).map(function(e){return n[e]})},$e={component:"div",childFactory:function(e){return e}},ee=function(n){b._inheritsLoose(e,n);function e(l,s){var r;r=n.call(this,l,s)||this;var i=r.handleExited.bind(De._assertThisInitialized(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}var t=e.prototype;return t.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},t.componentWillUnmount=function(){this.mounted=!1},e.getDerivedStateFromProps=function(s,r){var i=r.children,u=r.handleExited,p=r.firstRender;return{children:p?Be(s,u):Oe(s,i,u),firstRender:!1}},t.handleExited=function(s,r){var i=Z(this.props.children);s.key in i||(s.props.onExited&&s.props.onExited(r),this.mounted&&this.setState(function(u){var p=Ve._extends({},u.children);return delete p[s.key],{children:p}}))},t.render=function(){var s=this.props,r=s.component,i=s.childFactory,u=Ce._objectWithoutPropertiesLoose(s,["component","childFactory"]),p=this.state.contextValue,f=Le(this.state.children).map(i);return delete u.appear,delete u.enter,delete u.exit,r===null?P.createElement(b.TransitionGroupContext.Provider,{value:p},f):P.createElement(b.TransitionGroupContext.Provider,{value:p},P.createElement(r,u,f))},e}(P.Component);ee.propTypes=process.env.NODE_ENV!=="production"?{component:o.PropTypes.any,children:o.PropTypes.node,appear:o.PropTypes.bool,enter:o.PropTypes.bool,exit:o.PropTypes.bool,childFactory:o.PropTypes.func}:{};ee.defaultProps=$e;function se(n){const{className:e,classes:t,pulsate:l=!1,rippleX:s,rippleY:r,rippleSize:i,in:u,onExited:p,timeout:f}=n,[m,y]=d.useState(!1),M=h.clsx(e,t.ripple,t.rippleVisible,l&&t.ripplePulsate),N={width:i,height:i,top:-(i/2)+r,left:-(i/2)+s},g=h.clsx(t.child,m&&t.childLeaving,l&&t.childPulsate);return!u&&!m&&y(!0),d.useEffect(()=>{if(!u&&p!=null){const k=setTimeout(p,f);return()=>{clearTimeout(k)}}},[p,u,f]),F.jsx("span",{className:M,style:N,children:F.jsx("span",{className:g})})}process.env.NODE_ENV!=="production"&&(se.propTypes={classes:o.PropTypes.object.isRequired,className:o.PropTypes.string,in:o.PropTypes.bool,onExited:o.PropTypes.func,pulsate:o.PropTypes.bool,rippleSize:o.PropTypes.number,rippleX:o.PropTypes.number,rippleY:o.PropTypes.number,timeout:o.PropTypes.number.isRequired});const R=h.generateUtilityClasses("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Q=550,Fe=80,Ie=h.keyframes`
2
+ 0% {
3
+ transform: scale(0);
4
+ opacity: 0.1;
5
+ }
6
+
7
+ 100% {
8
+ transform: scale(1);
9
+ opacity: 0.3;
10
+ }
11
+ `,Ue=h.keyframes`
12
+ 0% {
13
+ opacity: 1;
14
+ }
15
+
16
+ 100% {
17
+ opacity: 0;
18
+ }
19
+ `,qe=h.keyframes`
20
+ 0% {
21
+ transform: scale(1);
22
+ }
23
+
24
+ 50% {
25
+ transform: scale(0.92);
26
+ }
27
+
28
+ 100% {
29
+ transform: scale(1);
30
+ }
31
+ `,ze=h.styled("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),_e=h.styled(se,{name:"MuiTouchRipple",slot:"Ripple"})`
32
+ opacity: 0;
33
+ position: absolute;
34
+
35
+ &.${R.rippleVisible} {
36
+ opacity: 0.3;
37
+ transform: scale(1);
38
+ animation-name: ${Ie};
39
+ animation-duration: ${Q}ms;
40
+ animation-timing-function: ${({theme:n})=>n.transitions.easing.easeInOut};
41
+ }
42
+
43
+ &.${R.ripplePulsate} {
44
+ animation-duration: ${({theme:n})=>n.transitions.duration.shorter}ms;
45
+ }
46
+
47
+ & .${R.child} {
48
+ opacity: 1;
49
+ display: block;
50
+ width: 100%;
51
+ height: 100%;
52
+ border-radius: 50%;
53
+ background-color: currentColor;
54
+ }
55
+
56
+ & .${R.childLeaving} {
57
+ opacity: 0;
58
+ animation-name: ${Ue};
59
+ animation-duration: ${Q}ms;
60
+ animation-timing-function: ${({theme:n})=>n.transitions.easing.easeInOut};
61
+ }
62
+
63
+ & .${R.childPulsate} {
64
+ position: absolute;
65
+ /* @noflip */
66
+ left: 0px;
67
+ top: 0;
68
+ animation-name: ${qe};
69
+ animation-duration: 2500ms;
70
+ animation-timing-function: ${({theme:n})=>n.transitions.easing.easeInOut};
71
+ animation-iteration-count: infinite;
72
+ animation-delay: 200ms;
73
+ }
74
+ `,re=d.forwardRef(function(e,t){const l=h.useDefaultProps({props:e,name:"MuiTouchRipple"}),{center:s=!1,classes:r={},className:i,...u}=l,[p,f]=d.useState([]),m=d.useRef(0),y=d.useRef(null);d.useEffect(()=>{y.current&&(y.current(),y.current=null)},[p]);const M=d.useRef(!1),N=b.useTimeout(),g=d.useRef(null),k=d.useRef(null),V=d.useCallback(c=>{const{pulsate:E,rippleX:x,rippleY:q,rippleSize:B,cb:z}=c;f(C=>[...C,F.jsx(_e,{classes:{ripple:h.clsx(r.ripple,R.ripple),rippleVisible:h.clsx(r.rippleVisible,R.rippleVisible),ripplePulsate:h.clsx(r.ripplePulsate,R.ripplePulsate),child:h.clsx(r.child,R.child),childLeaving:h.clsx(r.childLeaving,R.childLeaving),childPulsate:h.clsx(r.childPulsate,R.childPulsate)},timeout:Q,pulsate:E,rippleX:x,rippleY:q,rippleSize:B},m.current)]),m.current+=1,y.current=z},[r]),I=d.useCallback((c={},E={},x=()=>{})=>{const{pulsate:q=!1,center:B=s||E.pulsate,fakeElement:z=!1}=E;if((c==null?void 0:c.type)==="mousedown"&&M.current){M.current=!1;return}(c==null?void 0:c.type)==="touchstart"&&(M.current=!0);const C=z?null:k.current,S=C?C.getBoundingClientRect():{width:0,height:0,left:0,top:0};let w,D,j;if(B||c===void 0||c.clientX===0&&c.clientY===0||!c.clientX&&!c.touches)w=Math.round(S.width/2),D=Math.round(S.height/2);else{const{clientX:_,clientY:O}=c.touches&&c.touches.length>0?c.touches[0]:c;w=Math.round(_-S.left),D=Math.round(O-S.top)}if(B)j=Math.sqrt((2*S.width**2+S.height**2)/3),j%2===0&&(j+=1);else{const _=Math.max(Math.abs((C?C.clientWidth:0)-w),w)*2+2,O=Math.max(Math.abs((C?C.clientHeight:0)-D),D)*2+2;j=Math.sqrt(_**2+O**2)}c!=null&&c.touches?g.current===null&&(g.current=()=>{V({pulsate:q,rippleX:w,rippleY:D,rippleSize:j,cb:x})},N.start(Fe,()=>{g.current&&(g.current(),g.current=null)})):V({pulsate:q,rippleX:w,rippleY:D,rippleSize:j,cb:x})},[s,V,N]),K=d.useCallback(()=>{I({},{pulsate:!0})},[I]),U=d.useCallback((c,E)=>{if(N.clear(),(c==null?void 0:c.type)==="touchend"&&g.current){g.current(),g.current=null,N.start(0,()=>{U(c,E)});return}g.current=null,f(x=>x.length>0?x.slice(1):x),y.current=E},[N]);return d.useImperativeHandle(t,()=>({pulsate:K,start:I,stop:U}),[K,I,U]),F.jsx(ze,{className:h.clsx(R.root,r.root,i),ref:k,...u,children:F.jsx(ee,{component:null,exit:!0,children:p})})});process.env.NODE_ENV!=="production"&&(re.propTypes={center:o.PropTypes.bool,classes:o.PropTypes.object,className:o.PropTypes.string});function Ae(n){return h.generateUtilityClass("MuiButtonBase",n)}const Xe=h.generateUtilityClasses("MuiButtonBase",["root","disabled","focusVisible"]),Ye=n=>{const{disabled:e,focusVisible:t,focusVisibleClassName:l,classes:s}=n,r={root:["root",e&&"disabled",t&&"focusVisible"]},i=h.composeClasses(r,Ae,s);return t&&l&&(i.root+=` ${l}`),i},Ke=h.styled("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(n,e)=>e.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Xe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ie=d.forwardRef(function(e,t){const l=h.useDefaultProps({props:e,name:"MuiButtonBase"}),{action:s,centerRipple:r=!1,children:i,className:u,component:p="button",disabled:f=!1,disableRipple:m=!1,disableTouchRipple:y=!1,focusRipple:M=!1,focusVisibleClassName:N,LinkComponent:g="a",onBlur:k,onClick:V,onContextMenu:I,onDragLeave:K,onFocus:U,onFocusVisible:c,onKeyDown:E,onKeyUp:x,onMouseDown:q,onMouseLeave:B,onMouseUp:z,onTouchEnd:C,onTouchMove:S,onTouchStart:w,tabIndex:D=0,TouchRippleProps:j,touchRippleRef:_,type:O,...A}=l,X=d.useRef(null),T=we(),le=b.useForkRef(T.ref,_),[L,H]=d.useState(!1);f&&L&&H(!1),d.useImperativeHandle(s,()=>({focusVisible:()=>{H(!0),X.current.focus()}}),[]);const ae=T.shouldMount&&!m&&!f;d.useEffect(()=>{L&&M&&!m&&T.pulsate()},[m,M,L,T]);const ue=v(T,"start",q,y),pe=v(T,"stop",I,y),ce=v(T,"stop",K,y),fe=v(T,"stop",z,y),de=v(T,"stop",a=>{L&&a.preventDefault(),B&&B(a)},y),he=v(T,"start",w,y),me=v(T,"stop",C,y),ye=v(T,"stop",S,y),Te=v(T,"stop",a=>{b.isFocusVisible(a.target)||H(!1),k&&k(a)},!1),be=b.useEventCallback(a=>{X.current||(X.current=a.currentTarget),b.isFocusVisible(a.target)&&(H(!0),c&&c(a)),U&&U(a)}),J=()=>{const a=X.current;return p&&p!=="button"&&!(a.tagName==="A"&&a.href)},Pe=b.useEventCallback(a=>{M&&!a.repeat&&L&&a.key===" "&&T.stop(a,()=>{T.start(a)}),a.target===a.currentTarget&&J()&&a.key===" "&&a.preventDefault(),E&&E(a),a.target===a.currentTarget&&J()&&a.key==="Enter"&&!f&&(a.preventDefault(),V&&V(a))}),ge=b.useEventCallback(a=>{M&&a.key===" "&&L&&!a.defaultPrevented&&T.stop(a,()=>{T.pulsate(a)}),x&&x(a),V&&a.target===a.currentTarget&&J()&&a.key===" "&&!a.defaultPrevented&&V(a)});let W=p;W==="button"&&(A.href||A.to)&&(W=g);const Y={};W==="button"?(Y.type=O===void 0?"button":O,Y.disabled=f):(!A.href&&!A.to&&(Y.role="button"),f&&(Y["aria-disabled"]=f));const Re=b.useForkRef(t,X),te={...l,centerRipple:r,component:p,disabled:f,disableRipple:m,disableTouchRipple:y,focusRipple:M,tabIndex:D,focusVisible:L},Me=Ye(te);return F.jsxs(Ke,{as:W,className:h.clsx(Me.root,u),ownerState:te,onBlur:Te,onClick:V,onContextMenu:pe,onFocus:be,onKeyDown:Pe,onKeyUp:ge,onMouseDown:ue,onMouseLeave:de,onMouseUp:fe,onDragLeave:ce,onTouchEnd:me,onTouchMove:ye,onTouchStart:he,ref:Re,tabIndex:f?-1:D,type:O,...Y,...A,children:[i,ae?F.jsx(re,{ref:le,center:r,...j}):null]})});function v(n,e,t,l=!1){return b.useEventCallback(s=>(t&&t(s),l||n[e](s),!0))}process.env.NODE_ENV!=="production"&&(ie.propTypes={action:b.refType,centerRipple:o.PropTypes.bool,children:o.PropTypes.node,classes:o.PropTypes.object,className:o.PropTypes.string,component:oe,disabled:o.PropTypes.bool,disableRipple:o.PropTypes.bool,disableTouchRipple:o.PropTypes.bool,focusRipple:o.PropTypes.bool,focusVisibleClassName:o.PropTypes.string,href:o.PropTypes.any,LinkComponent:o.PropTypes.elementType,onBlur:o.PropTypes.func,onClick:o.PropTypes.func,onContextMenu:o.PropTypes.func,onDragLeave:o.PropTypes.func,onFocus:o.PropTypes.func,onFocusVisible:o.PropTypes.func,onKeyDown:o.PropTypes.func,onKeyUp:o.PropTypes.func,onMouseDown:o.PropTypes.func,onMouseLeave:o.PropTypes.func,onMouseUp:o.PropTypes.func,onTouchEnd:o.PropTypes.func,onTouchMove:o.PropTypes.func,onTouchStart:o.PropTypes.func,sx:o.PropTypes.oneOfType([o.PropTypes.arrayOf(o.PropTypes.oneOfType([o.PropTypes.func,o.PropTypes.object,o.PropTypes.bool])),o.PropTypes.func,o.PropTypes.object]),tabIndex:o.PropTypes.number,TouchRippleProps:o.PropTypes.object,touchRippleRef:o.PropTypes.oneOfType([o.PropTypes.func,o.PropTypes.shape({current:o.PropTypes.shape({pulsate:o.PropTypes.func.isRequired,start:o.PropTypes.func.isRequired,stop:o.PropTypes.func.isRequired})})]),type:o.PropTypes.oneOfType([o.PropTypes.oneOf(["button","reset","submit"]),o.PropTypes.string])});exports.ButtonBase=ie;exports.elementTypeAcceptingRef=oe;