jcicl 1.0.9 → 1.0.13
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.
- package/.chunks/DefaultPropsProvider.js +5 -5
- package/.chunks/Paper.js +1 -1
- package/.chunks/Popper.js +1 -1
- package/.chunks/Portal.js +205 -187
- package/.chunks/TextField.js +13 -15
- package/.chunks/check.js +11 -0
- package/.chunks/index.js +83 -6
- package/.chunks/useMediaQuery.js +1 -1
- package/.chunks/useSlot.js +1 -1
- package/.chunks/x.js +4 -12
- package/AppContainer/AppContainer.js +46 -47
- package/Button/Button.d.ts +2 -1
- package/Button/Button.js +311 -214
- package/EditableDetailItemWithIcon/EditableDetailItemWithIcon.d.ts +2 -0
- package/EditableDetailItemWithIcon/EditableDetailItemWithIcon.js +53 -41
- package/FormFields/FormFields.d.ts +1 -1
- package/FormFields/FormFields.js +52 -37
- package/LabeledDropdown/LabeledDropdown.js +4 -5
- package/Pill/Pill.js +1 -0
- package/Stepper/Stepper.js +1 -1
- package/Table/Table.js +299 -268
- package/Toast/Toast.js +8 -7
- package/Toast/ToastHelpers.d.ts +2 -0
- package/Toast/ToastHelpers.js +22 -7
- package/Toast/index.d.ts +1 -1
- package/Toast/index.js +8 -6
- package/Tooltip/Tooltip.js +18 -20
- package/package.json +1 -1
- package/utils.d.ts +1 -0
- package/utils.js +34 -15
- package/.chunks/resolveComponentProps.js +0 -80
- package/.chunks/useTheme.js +0 -23
package/Button/Button.js
CHANGED
|
@@ -1,39 +1,43 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsxs as T, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import * as B from "react";
|
|
3
|
+
import { useState as q } from "react";
|
|
4
|
+
import { g as J, a as K, s, r as Q, c as p, h as X, u as Y, b as W, P as e, d as Z, e as h } from "../.chunks/DefaultPropsProvider.js";
|
|
5
|
+
import { m as oo } from "../.chunks/memoTheme.js";
|
|
6
|
+
import { c as to } from "../.chunks/createSimplePaletteValueFilter.js";
|
|
7
|
+
import { B as k } from "../.chunks/ButtonBase.js";
|
|
8
|
+
import { i as ro } from "../.chunks/emotion-styled.browser.esm.js";
|
|
9
|
+
import { c as g } from "../.chunks/emotion-react.browser.esm.js";
|
|
10
|
+
import t from "../theme.js";
|
|
11
|
+
import { Tooltip as eo } from "../Tooltip/Tooltip.js";
|
|
12
|
+
import { useThemeColors as ao } from "../ThemeContext.js";
|
|
13
|
+
import { C as no } from "../.chunks/check.js";
|
|
14
|
+
function io(o) {
|
|
15
|
+
return J("MuiButton", o);
|
|
12
16
|
}
|
|
13
|
-
const
|
|
14
|
-
process.env.NODE_ENV !== "production" && (
|
|
15
|
-
const
|
|
16
|
-
process.env.NODE_ENV !== "production" && (
|
|
17
|
-
const
|
|
17
|
+
const x = 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"]), j = /* @__PURE__ */ B.createContext({});
|
|
18
|
+
process.env.NODE_ENV !== "production" && (j.displayName = "ButtonGroupContext");
|
|
19
|
+
const V = /* @__PURE__ */ B.createContext(void 0);
|
|
20
|
+
process.env.NODE_ENV !== "production" && (V.displayName = "ButtonGroupButtonContext");
|
|
21
|
+
const so = (o) => {
|
|
18
22
|
const {
|
|
19
|
-
color:
|
|
20
|
-
disableElevation:
|
|
21
|
-
fullWidth:
|
|
22
|
-
size:
|
|
23
|
+
color: r,
|
|
24
|
+
disableElevation: a,
|
|
25
|
+
fullWidth: n,
|
|
26
|
+
size: c,
|
|
23
27
|
variant: u,
|
|
24
28
|
classes: b
|
|
25
|
-
} = o,
|
|
26
|
-
root: ["root", u, `${u}${p(
|
|
29
|
+
} = o, v = {
|
|
30
|
+
root: ["root", u, `${u}${p(r)}`, `size${p(c)}`, `${u}Size${p(c)}`, `color${p(r)}`, a && "disableElevation", n && "fullWidth"],
|
|
27
31
|
label: ["label"],
|
|
28
|
-
startIcon: ["icon", "startIcon", `iconSize${p(
|
|
29
|
-
endIcon: ["icon", "endIcon", `iconSize${p(
|
|
30
|
-
}, f =
|
|
32
|
+
startIcon: ["icon", "startIcon", `iconSize${p(c)}`],
|
|
33
|
+
endIcon: ["icon", "endIcon", `iconSize${p(c)}`]
|
|
34
|
+
}, f = Z(v, io, b);
|
|
31
35
|
return {
|
|
32
36
|
...b,
|
|
33
37
|
// forward the focused, disabled, etc. classes to the ButtonBase
|
|
34
38
|
...f
|
|
35
39
|
};
|
|
36
|
-
},
|
|
40
|
+
}, F = [{
|
|
37
41
|
props: {
|
|
38
42
|
size: "small"
|
|
39
43
|
},
|
|
@@ -60,20 +64,20 @@ const to = (o) => {
|
|
|
60
64
|
fontSize: 22
|
|
61
65
|
}
|
|
62
66
|
}
|
|
63
|
-
}],
|
|
64
|
-
shouldForwardProp: (o) =>
|
|
67
|
+
}], lo = s(k, {
|
|
68
|
+
shouldForwardProp: (o) => Q(o) || o === "classes",
|
|
65
69
|
name: "MuiButton",
|
|
66
70
|
slot: "Root",
|
|
67
|
-
overridesResolver: (o,
|
|
71
|
+
overridesResolver: (o, r) => {
|
|
68
72
|
const {
|
|
69
|
-
ownerState:
|
|
73
|
+
ownerState: a
|
|
70
74
|
} = o;
|
|
71
|
-
return [
|
|
75
|
+
return [r.root, r[a.variant], r[`${a.variant}${p(a.color)}`], r[`size${p(a.size)}`], r[`${a.variant}Size${p(a.size)}`], a.color === "inherit" && r.colorInherit, a.disableElevation && r.disableElevation, a.fullWidth && r.fullWidth];
|
|
72
76
|
}
|
|
73
|
-
})(
|
|
77
|
+
})(oo(({
|
|
74
78
|
theme: o
|
|
75
79
|
}) => {
|
|
76
|
-
const
|
|
80
|
+
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];
|
|
77
81
|
return {
|
|
78
82
|
...o.typography.button,
|
|
79
83
|
minWidth: 64,
|
|
@@ -86,7 +90,7 @@ const to = (o) => {
|
|
|
86
90
|
"&:hover": {
|
|
87
91
|
textDecoration: "none"
|
|
88
92
|
},
|
|
89
|
-
[`&.${
|
|
93
|
+
[`&.${x.disabled}`]: {
|
|
90
94
|
color: (o.vars || o).palette.action.disabled
|
|
91
95
|
},
|
|
92
96
|
variants: [{
|
|
@@ -107,10 +111,10 @@ const to = (o) => {
|
|
|
107
111
|
"&:active": {
|
|
108
112
|
boxShadow: (o.vars || o).shadows[8]
|
|
109
113
|
},
|
|
110
|
-
[`&.${
|
|
114
|
+
[`&.${x.focusVisible}`]: {
|
|
111
115
|
boxShadow: (o.vars || o).shadows[6]
|
|
112
116
|
},
|
|
113
|
-
[`&.${
|
|
117
|
+
[`&.${x.disabled}`]: {
|
|
114
118
|
color: (o.vars || o).palette.action.disabled,
|
|
115
119
|
boxShadow: (o.vars || o).shadows[0],
|
|
116
120
|
backgroundColor: (o.vars || o).palette.action.disabledBackground
|
|
@@ -126,7 +130,7 @@ const to = (o) => {
|
|
|
126
130
|
borderColor: "var(--variant-outlinedBorder, currentColor)",
|
|
127
131
|
backgroundColor: "var(--variant-outlinedBg)",
|
|
128
132
|
color: "var(--variant-outlinedColor)",
|
|
129
|
-
[`&.${
|
|
133
|
+
[`&.${x.disabled}`]: {
|
|
130
134
|
border: `1px solid ${(o.vars || o).palette.action.disabledBackground}`
|
|
131
135
|
}
|
|
132
136
|
}
|
|
@@ -139,22 +143,22 @@ const to = (o) => {
|
|
|
139
143
|
color: "var(--variant-textColor)",
|
|
140
144
|
backgroundColor: "var(--variant-textBg)"
|
|
141
145
|
}
|
|
142
|
-
}, ...Object.entries(o.palette).filter(
|
|
146
|
+
}, ...Object.entries(o.palette).filter(to()).map(([n]) => ({
|
|
143
147
|
props: {
|
|
144
|
-
color:
|
|
148
|
+
color: n
|
|
145
149
|
},
|
|
146
150
|
style: {
|
|
147
|
-
"--variant-textColor": (o.vars || o).palette[
|
|
148
|
-
"--variant-outlinedColor": (o.vars || o).palette[
|
|
149
|
-
"--variant-outlinedBorder": o.vars ? `rgba(${o.vars.palette[
|
|
150
|
-
"--variant-containedColor": (o.vars || o).palette[
|
|
151
|
-
"--variant-containedBg": (o.vars || o).palette[
|
|
151
|
+
"--variant-textColor": (o.vars || o).palette[n].main,
|
|
152
|
+
"--variant-outlinedColor": (o.vars || o).palette[n].main,
|
|
153
|
+
"--variant-outlinedBorder": o.vars ? `rgba(${o.vars.palette[n].mainChannel} / 0.5)` : h(o.palette[n].main, 0.5),
|
|
154
|
+
"--variant-containedColor": (o.vars || o).palette[n].contrastText,
|
|
155
|
+
"--variant-containedBg": (o.vars || o).palette[n].main,
|
|
152
156
|
"@media (hover: hover)": {
|
|
153
157
|
"&:hover": {
|
|
154
|
-
"--variant-containedBg": (o.vars || o).palette[
|
|
155
|
-
"--variant-textBg": o.vars ? `rgba(${o.vars.palette[
|
|
156
|
-
"--variant-outlinedBorder": (o.vars || o).palette[
|
|
157
|
-
"--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette[
|
|
158
|
+
"--variant-containedBg": (o.vars || o).palette[n].dark,
|
|
159
|
+
"--variant-textBg": o.vars ? `rgba(${o.vars.palette[n].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : h(o.palette[n].main, o.palette.action.hoverOpacity),
|
|
160
|
+
"--variant-outlinedBorder": (o.vars || o).palette[n].main,
|
|
161
|
+
"--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette[n].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : h(o.palette[n].main, o.palette.action.hoverOpacity)
|
|
158
162
|
}
|
|
159
163
|
}
|
|
160
164
|
}
|
|
@@ -165,12 +169,12 @@ const to = (o) => {
|
|
|
165
169
|
style: {
|
|
166
170
|
color: "inherit",
|
|
167
171
|
borderColor: "currentColor",
|
|
168
|
-
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedBg :
|
|
172
|
+
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedBg : r,
|
|
169
173
|
"@media (hover: hover)": {
|
|
170
174
|
"&:hover": {
|
|
171
|
-
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedHoverBg :
|
|
172
|
-
"--variant-textBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` :
|
|
173
|
-
"--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` :
|
|
175
|
+
"--variant-containedBg": o.vars ? o.vars.palette.Button.inheritContainedHoverBg : a,
|
|
176
|
+
"--variant-textBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : h(o.palette.text.primary, o.palette.action.hoverOpacity),
|
|
177
|
+
"--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : h(o.palette.text.primary, o.palette.action.hoverOpacity)
|
|
174
178
|
}
|
|
175
179
|
}
|
|
176
180
|
}
|
|
@@ -237,13 +241,13 @@ const to = (o) => {
|
|
|
237
241
|
"&:hover": {
|
|
238
242
|
boxShadow: "none"
|
|
239
243
|
},
|
|
240
|
-
[`&.${
|
|
244
|
+
[`&.${x.focusVisible}`]: {
|
|
241
245
|
boxShadow: "none"
|
|
242
246
|
},
|
|
243
247
|
"&:active": {
|
|
244
248
|
boxShadow: "none"
|
|
245
249
|
},
|
|
246
|
-
[`&.${
|
|
250
|
+
[`&.${x.disabled}`]: {
|
|
247
251
|
boxShadow: "none"
|
|
248
252
|
}
|
|
249
253
|
}
|
|
@@ -256,14 +260,14 @@ const to = (o) => {
|
|
|
256
260
|
}
|
|
257
261
|
}]
|
|
258
262
|
};
|
|
259
|
-
})),
|
|
263
|
+
})), co = s("span", {
|
|
260
264
|
name: "MuiButton",
|
|
261
265
|
slot: "StartIcon",
|
|
262
|
-
overridesResolver: (o,
|
|
266
|
+
overridesResolver: (o, r) => {
|
|
263
267
|
const {
|
|
264
|
-
ownerState:
|
|
268
|
+
ownerState: a
|
|
265
269
|
} = o;
|
|
266
|
-
return [
|
|
270
|
+
return [r.startIcon, r[`iconSize${p(a.size)}`]];
|
|
267
271
|
}
|
|
268
272
|
})({
|
|
269
273
|
display: "inherit",
|
|
@@ -276,15 +280,15 @@ const to = (o) => {
|
|
|
276
280
|
style: {
|
|
277
281
|
marginLeft: -2
|
|
278
282
|
}
|
|
279
|
-
}, ...
|
|
280
|
-
}),
|
|
283
|
+
}, ...F]
|
|
284
|
+
}), po = s("span", {
|
|
281
285
|
name: "MuiButton",
|
|
282
286
|
slot: "EndIcon",
|
|
283
|
-
overridesResolver: (o,
|
|
287
|
+
overridesResolver: (o, r) => {
|
|
284
288
|
const {
|
|
285
|
-
ownerState:
|
|
289
|
+
ownerState: a
|
|
286
290
|
} = o;
|
|
287
|
-
return [
|
|
291
|
+
return [r.endIcon, r[`iconSize${p(a.size)}`]];
|
|
288
292
|
}
|
|
289
293
|
})({
|
|
290
294
|
display: "inherit",
|
|
@@ -297,62 +301,62 @@ const to = (o) => {
|
|
|
297
301
|
style: {
|
|
298
302
|
marginRight: -2
|
|
299
303
|
}
|
|
300
|
-
}, ...
|
|
301
|
-
}),
|
|
302
|
-
const
|
|
304
|
+
}, ...F]
|
|
305
|
+
}), M = /* @__PURE__ */ B.forwardRef(function(r, a) {
|
|
306
|
+
const n = B.useContext(j), c = B.useContext(V), u = X(n, r), b = Y({
|
|
303
307
|
props: u,
|
|
304
308
|
name: "MuiButton"
|
|
305
309
|
}), {
|
|
306
|
-
children:
|
|
310
|
+
children: v,
|
|
307
311
|
color: f = "primary",
|
|
308
312
|
component: l = "button",
|
|
309
|
-
className:
|
|
310
|
-
disabled:
|
|
311
|
-
disableElevation:
|
|
312
|
-
disableFocusRipple:
|
|
313
|
-
endIcon:
|
|
314
|
-
focusVisibleClassName:
|
|
315
|
-
fullWidth:
|
|
316
|
-
size:
|
|
317
|
-
startIcon:
|
|
318
|
-
type:
|
|
319
|
-
variant:
|
|
320
|
-
...
|
|
321
|
-
} = b,
|
|
313
|
+
className: I,
|
|
314
|
+
disabled: S = !1,
|
|
315
|
+
disableElevation: d = !1,
|
|
316
|
+
disableFocusRipple: y = !1,
|
|
317
|
+
endIcon: m,
|
|
318
|
+
focusVisibleClassName: z,
|
|
319
|
+
fullWidth: R = !1,
|
|
320
|
+
size: O = "medium",
|
|
321
|
+
startIcon: E,
|
|
322
|
+
type: P,
|
|
323
|
+
variant: H = "text",
|
|
324
|
+
...D
|
|
325
|
+
} = b, C = {
|
|
322
326
|
...b,
|
|
323
327
|
color: f,
|
|
324
328
|
component: l,
|
|
325
|
-
disabled:
|
|
326
|
-
disableElevation:
|
|
327
|
-
disableFocusRipple:
|
|
328
|
-
fullWidth:
|
|
329
|
-
size:
|
|
330
|
-
type:
|
|
331
|
-
variant:
|
|
332
|
-
},
|
|
333
|
-
className:
|
|
334
|
-
ownerState:
|
|
335
|
-
children:
|
|
336
|
-
}),
|
|
337
|
-
className:
|
|
338
|
-
ownerState:
|
|
339
|
-
children:
|
|
340
|
-
}),
|
|
341
|
-
return /* @__PURE__ */
|
|
342
|
-
ownerState:
|
|
343
|
-
className:
|
|
329
|
+
disabled: S,
|
|
330
|
+
disableElevation: d,
|
|
331
|
+
disableFocusRipple: y,
|
|
332
|
+
fullWidth: R,
|
|
333
|
+
size: O,
|
|
334
|
+
type: P,
|
|
335
|
+
variant: H
|
|
336
|
+
}, $ = so(C), U = E && /* @__PURE__ */ i(co, {
|
|
337
|
+
className: $.startIcon,
|
|
338
|
+
ownerState: C,
|
|
339
|
+
children: E
|
|
340
|
+
}), _ = m && /* @__PURE__ */ i(po, {
|
|
341
|
+
className: $.endIcon,
|
|
342
|
+
ownerState: C,
|
|
343
|
+
children: m
|
|
344
|
+
}), A = c || "";
|
|
345
|
+
return /* @__PURE__ */ T(lo, {
|
|
346
|
+
ownerState: C,
|
|
347
|
+
className: W(n.className, $.root, I, A),
|
|
344
348
|
component: l,
|
|
345
|
-
disabled:
|
|
346
|
-
focusRipple: !
|
|
347
|
-
focusVisibleClassName:
|
|
348
|
-
ref:
|
|
349
|
-
type:
|
|
350
|
-
...
|
|
351
|
-
classes:
|
|
352
|
-
children: [
|
|
349
|
+
disabled: S,
|
|
350
|
+
focusRipple: !y,
|
|
351
|
+
focusVisibleClassName: W($.focusVisible, z),
|
|
352
|
+
ref: a,
|
|
353
|
+
type: P,
|
|
354
|
+
...D,
|
|
355
|
+
classes: $,
|
|
356
|
+
children: [U, v, _]
|
|
353
357
|
});
|
|
354
358
|
});
|
|
355
|
-
process.env.NODE_ENV !== "production" && (
|
|
359
|
+
process.env.NODE_ENV !== "production" && (M.propTypes = {
|
|
356
360
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
357
361
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
358
362
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -360,42 +364,42 @@ process.env.NODE_ENV !== "production" && (j.propTypes = {
|
|
|
360
364
|
/**
|
|
361
365
|
* The content of the component.
|
|
362
366
|
*/
|
|
363
|
-
children:
|
|
367
|
+
children: e.node,
|
|
364
368
|
/**
|
|
365
369
|
* Override or extend the styles applied to the component.
|
|
366
370
|
*/
|
|
367
|
-
classes:
|
|
371
|
+
classes: e.object,
|
|
368
372
|
/**
|
|
369
373
|
* @ignore
|
|
370
374
|
*/
|
|
371
|
-
className:
|
|
375
|
+
className: e.string,
|
|
372
376
|
/**
|
|
373
377
|
* The color of the component.
|
|
374
378
|
* It supports both default and custom theme colors, which can be added as shown in the
|
|
375
379
|
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
376
380
|
* @default 'primary'
|
|
377
381
|
*/
|
|
378
|
-
color:
|
|
382
|
+
color: e.oneOfType([e.oneOf(["inherit", "primary", "secondary", "success", "error", "info", "warning"]), e.string]),
|
|
379
383
|
/**
|
|
380
384
|
* The component used for the root node.
|
|
381
385
|
* Either a string to use a HTML element or a component.
|
|
382
386
|
*/
|
|
383
|
-
component:
|
|
387
|
+
component: e.elementType,
|
|
384
388
|
/**
|
|
385
389
|
* If `true`, the component is disabled.
|
|
386
390
|
* @default false
|
|
387
391
|
*/
|
|
388
|
-
disabled:
|
|
392
|
+
disabled: e.bool,
|
|
389
393
|
/**
|
|
390
394
|
* If `true`, no elevation is used.
|
|
391
395
|
* @default false
|
|
392
396
|
*/
|
|
393
|
-
disableElevation:
|
|
397
|
+
disableElevation: e.bool,
|
|
394
398
|
/**
|
|
395
399
|
* If `true`, the keyboard focus ripple is disabled.
|
|
396
400
|
* @default false
|
|
397
401
|
*/
|
|
398
|
-
disableFocusRipple:
|
|
402
|
+
disableFocusRipple: e.bool,
|
|
399
403
|
/**
|
|
400
404
|
* If `true`, the ripple effect is disabled.
|
|
401
405
|
*
|
|
@@ -403,61 +407,61 @@ process.env.NODE_ENV !== "production" && (j.propTypes = {
|
|
|
403
407
|
* to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
|
|
404
408
|
* @default false
|
|
405
409
|
*/
|
|
406
|
-
disableRipple:
|
|
410
|
+
disableRipple: e.bool,
|
|
407
411
|
/**
|
|
408
412
|
* Element placed after the children.
|
|
409
413
|
*/
|
|
410
|
-
endIcon:
|
|
414
|
+
endIcon: e.node,
|
|
411
415
|
/**
|
|
412
416
|
* @ignore
|
|
413
417
|
*/
|
|
414
|
-
focusVisibleClassName:
|
|
418
|
+
focusVisibleClassName: e.string,
|
|
415
419
|
/**
|
|
416
420
|
* If `true`, the button will take up the full width of its container.
|
|
417
421
|
* @default false
|
|
418
422
|
*/
|
|
419
|
-
fullWidth:
|
|
423
|
+
fullWidth: e.bool,
|
|
420
424
|
/**
|
|
421
425
|
* The URL to link to when the button is clicked.
|
|
422
426
|
* If defined, an `a` element will be used as the root node.
|
|
423
427
|
*/
|
|
424
|
-
href:
|
|
428
|
+
href: e.string,
|
|
425
429
|
/**
|
|
426
430
|
* The size of the component.
|
|
427
431
|
* `small` is equivalent to the dense button styling.
|
|
428
432
|
* @default 'medium'
|
|
429
433
|
*/
|
|
430
|
-
size:
|
|
434
|
+
size: e.oneOfType([e.oneOf(["small", "medium", "large"]), e.string]),
|
|
431
435
|
/**
|
|
432
436
|
* Element placed before the children.
|
|
433
437
|
*/
|
|
434
|
-
startIcon:
|
|
438
|
+
startIcon: e.node,
|
|
435
439
|
/**
|
|
436
440
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
437
441
|
*/
|
|
438
|
-
sx:
|
|
442
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
439
443
|
/**
|
|
440
444
|
* @ignore
|
|
441
445
|
*/
|
|
442
|
-
type:
|
|
446
|
+
type: e.oneOfType([e.oneOf(["button", "reset", "submit"]), e.string]),
|
|
443
447
|
/**
|
|
444
448
|
* The variant to use.
|
|
445
449
|
* @default 'text'
|
|
446
450
|
*/
|
|
447
|
-
variant:
|
|
451
|
+
variant: e.oneOfType([e.oneOf(["contained", "outlined", "text"]), e.string])
|
|
448
452
|
});
|
|
449
|
-
const
|
|
453
|
+
const G = [
|
|
450
454
|
"active",
|
|
451
455
|
"customBackgroundColor",
|
|
452
456
|
"customHoverColor",
|
|
453
457
|
"customTextColor",
|
|
454
458
|
"customShadow1",
|
|
455
459
|
"customShadow2"
|
|
456
|
-
],
|
|
460
|
+
], w = s(M, { shouldForwardProp: (o) => !G.includes(o) })`
|
|
457
461
|
text-transform: none;
|
|
458
462
|
&:disabled {
|
|
459
463
|
opacity: 0.5;
|
|
460
|
-
color: ${
|
|
464
|
+
color: ${t.colors.black};
|
|
461
465
|
display: flex;
|
|
462
466
|
justify-content: center;
|
|
463
467
|
align-items: center;
|
|
@@ -466,122 +470,141 @@ const W = [
|
|
|
466
470
|
span {
|
|
467
471
|
align-items: center !important;
|
|
468
472
|
}
|
|
469
|
-
`,
|
|
470
|
-
background-color: ${
|
|
473
|
+
`, uo = s(w)`
|
|
474
|
+
background-color: ${t.colors.green};
|
|
471
475
|
height: 2.5rem;
|
|
472
476
|
border: 2px solid transparent;
|
|
473
|
-
color: ${
|
|
477
|
+
color: ${t.colors.white};
|
|
474
478
|
transition: 313ms all ease-in;
|
|
475
479
|
border-radius: 32px;
|
|
476
480
|
font-weight: 400;
|
|
477
481
|
padding: 0.75rem 2rem;
|
|
478
482
|
font-size: 1rem;
|
|
479
|
-
box-shadow: ${
|
|
483
|
+
box-shadow: ${t.boxShadows.gray63};
|
|
480
484
|
&:hover,
|
|
481
485
|
:focus-visible {
|
|
482
|
-
background-color: ${
|
|
483
|
-
box-shadow: ${
|
|
486
|
+
background-color: ${t.colors.darkGreen};
|
|
487
|
+
box-shadow: ${t.boxShadows.black63};
|
|
484
488
|
}
|
|
485
489
|
&:disabled {
|
|
486
|
-
background-color: ${
|
|
490
|
+
background-color: ${t.colors.darkGreen};
|
|
487
491
|
}
|
|
488
|
-
`,
|
|
489
|
-
shouldForwardProp: (o) => !
|
|
492
|
+
`, bo = s(w, {
|
|
493
|
+
shouldForwardProp: (o) => !G.includes(o)
|
|
490
494
|
})(
|
|
491
495
|
({
|
|
492
|
-
customBackgroundColor: o =
|
|
493
|
-
customHoverColor:
|
|
494
|
-
customTextColor:
|
|
495
|
-
customShadow1:
|
|
496
|
-
customShadow2:
|
|
496
|
+
customBackgroundColor: o = t.colors.green,
|
|
497
|
+
customHoverColor: r = t.colors.darkGreen,
|
|
498
|
+
customTextColor: a = t.colors.white,
|
|
499
|
+
customShadow1: n = t.boxShadows.gray63,
|
|
500
|
+
customShadow2: c = t.boxShadows.black63
|
|
497
501
|
}) => ({
|
|
498
|
-
...
|
|
502
|
+
...g`
|
|
499
503
|
background-color: ${o};
|
|
500
504
|
border-radius: 0;
|
|
501
505
|
height: 2.5rem;
|
|
502
506
|
border: 2px solid transparent;
|
|
503
|
-
color: ${
|
|
507
|
+
color: ${a};
|
|
504
508
|
transition: 313ms all ease-in;
|
|
505
509
|
border-radius: 32px;
|
|
506
510
|
font-weight: 400;
|
|
507
511
|
padding: 0.75rem 2rem;
|
|
508
512
|
font-size: 1rem;
|
|
509
|
-
box-shadow: ${
|
|
513
|
+
box-shadow: ${n};
|
|
510
514
|
&:hover,
|
|
511
515
|
:focus-visible {
|
|
512
|
-
background-color: ${
|
|
513
|
-
box-shadow: ${
|
|
516
|
+
background-color: ${r};
|
|
517
|
+
box-shadow: ${c};
|
|
514
518
|
}
|
|
515
519
|
&:disabled {
|
|
516
|
-
background-color: ${
|
|
520
|
+
background-color: ${r};
|
|
517
521
|
}
|
|
518
522
|
`
|
|
519
523
|
})
|
|
520
|
-
),
|
|
521
|
-
background-color: ${
|
|
524
|
+
), go = s(w)`
|
|
525
|
+
background-color: ${t.colors.gold};
|
|
522
526
|
height: 2.5rem;
|
|
523
527
|
border: 2px solid transparent;
|
|
524
|
-
color: ${
|
|
528
|
+
color: ${t.colors.midnight};
|
|
525
529
|
transition: 313ms all ease-in;
|
|
526
530
|
border-radius: 32px;
|
|
527
531
|
font-weight: 400;
|
|
528
532
|
padding: 0.75rem 2rem;
|
|
529
533
|
font-size: 1rem;
|
|
530
|
-
box-shadow: ${
|
|
534
|
+
box-shadow: ${t.boxShadows.gray63};
|
|
531
535
|
&:hover,
|
|
532
536
|
:focus-visible {
|
|
533
|
-
background-color: ${
|
|
534
|
-
box-shadow: ${
|
|
537
|
+
background-color: ${t.colors.goldHover};
|
|
538
|
+
box-shadow: ${t.boxShadows.gray63};
|
|
535
539
|
}
|
|
536
540
|
&:disabled {
|
|
537
|
-
background-color: ${
|
|
541
|
+
background-color: ${t.colors.goldHover};
|
|
538
542
|
}
|
|
539
|
-
`,
|
|
540
|
-
...
|
|
543
|
+
`, N = s(w)(({ width: o = "114px" }) => ({
|
|
544
|
+
...g`
|
|
541
545
|
box-sizing: border-box;
|
|
542
|
-
background-color: ${
|
|
546
|
+
background-color: ${t.colors.bibiBlue};
|
|
543
547
|
border-radius: 0;
|
|
544
548
|
height: 47px;
|
|
545
549
|
width: ${o};
|
|
546
550
|
border: 2px solid transparent;
|
|
547
|
-
color: ${
|
|
551
|
+
color: ${t.colors.white};
|
|
548
552
|
transition: 108ms all ease-in;
|
|
549
553
|
font-weight: 500;
|
|
550
554
|
padding: 0;
|
|
551
555
|
font-size: 19px;
|
|
552
556
|
&:hover,
|
|
553
557
|
:focus-visible {
|
|
554
|
-
background-color: ${
|
|
558
|
+
background-color: ${t.colors.bibiBlueHover};
|
|
555
559
|
}
|
|
556
560
|
`
|
|
557
|
-
})),
|
|
558
|
-
...
|
|
559
|
-
background-color: ${o &&
|
|
560
|
-
color: ${o &&
|
|
561
|
+
})), xo = s(N)(({ active: o }) => ({
|
|
562
|
+
...g`
|
|
563
|
+
background-color: ${o && t.colors.white};
|
|
564
|
+
color: ${o && t.colors.bibiBlue};
|
|
561
565
|
&:hover,
|
|
562
566
|
:focus-visible {
|
|
563
|
-
background-color: ${
|
|
564
|
-
color: ${
|
|
567
|
+
background-color: ${t.colors.white};
|
|
568
|
+
color: ${t.colors.bibiBlue};
|
|
565
569
|
}
|
|
566
570
|
`
|
|
567
|
-
})),
|
|
568
|
-
...
|
|
569
|
-
background-color: ${
|
|
570
|
-
color: ${
|
|
571
|
+
})), vo = s(N)(() => ({
|
|
572
|
+
...g`
|
|
573
|
+
background-color: ${t.colors.white};
|
|
574
|
+
color: ${t.colors.bibiBlue};
|
|
571
575
|
&:hover,
|
|
572
576
|
:focus-visible {
|
|
573
|
-
background-color: ${
|
|
574
|
-
border: 2px solid ${
|
|
575
|
-
color: ${
|
|
577
|
+
background-color: ${t.colors.bibiBlue};
|
|
578
|
+
border: 2px solid ${t.colors.white};
|
|
579
|
+
color: ${t.colors.white};
|
|
576
580
|
}
|
|
577
581
|
`
|
|
578
|
-
})),
|
|
582
|
+
})), L = s(k)`
|
|
579
583
|
display: block;
|
|
580
|
-
`,
|
|
581
|
-
|
|
584
|
+
`, fo = s(L)`
|
|
585
|
+
font-family: inherit;
|
|
586
|
+
font-size: inherit;
|
|
587
|
+
font-weight: inherit;
|
|
588
|
+
`, yo = s("div")`
|
|
589
|
+
display: flex;
|
|
590
|
+
.isCopied {
|
|
591
|
+
color: ${t.colors.gray};
|
|
592
|
+
display: inline;
|
|
593
|
+
margin-left: 8px;
|
|
594
|
+
font-size: smaller;
|
|
595
|
+
align-content: center;
|
|
596
|
+
}
|
|
597
|
+
.isCopied > svg {
|
|
598
|
+
vertical-align: middle;
|
|
599
|
+
height: 14px !important;
|
|
600
|
+
width: 14px !important;
|
|
601
|
+
margin: 0;
|
|
602
|
+
}
|
|
603
|
+
`, mo = s(k, {
|
|
604
|
+
shouldForwardProp: (o) => typeof o == "string" && ro(o)
|
|
582
605
|
})(
|
|
583
|
-
({ size: o, color:
|
|
584
|
-
...
|
|
606
|
+
({ size: o, color: r, highlightColor: a, hoverColor: n }) => ({
|
|
607
|
+
...g`
|
|
585
608
|
display: flex;
|
|
586
609
|
align-items: center;
|
|
587
610
|
justify-content: center;
|
|
@@ -591,66 +614,140 @@ const W = [
|
|
|
591
614
|
&:hover,
|
|
592
615
|
:focus-visible {
|
|
593
616
|
svg {
|
|
594
|
-
filter: drop-shadow(0 0 6px ${
|
|
595
|
-
drop-shadow(0 0 6px ${
|
|
596
|
-
fill: ${
|
|
617
|
+
filter: drop-shadow(0 0 6px ${a}) drop-shadow(0 0 6px ${a})
|
|
618
|
+
drop-shadow(0 0 6px ${a}) drop-shadow(0 0 6px ${a});
|
|
619
|
+
fill: ${n || r};
|
|
597
620
|
}
|
|
598
621
|
}
|
|
599
622
|
|
|
600
623
|
svg {
|
|
601
624
|
transition: 313ms all ease-in-out;
|
|
602
|
-
fill: ${
|
|
625
|
+
fill: ${r};
|
|
603
626
|
width: ${o}px;
|
|
604
627
|
height: ${o}px;
|
|
605
628
|
}
|
|
606
629
|
`
|
|
607
630
|
})
|
|
608
|
-
),
|
|
609
|
-
...
|
|
631
|
+
), $o = s(w)(({ active: o }) => ({
|
|
632
|
+
...g`
|
|
610
633
|
box-sizing: border-box;
|
|
611
|
-
background-color: ${o ?
|
|
634
|
+
background-color: ${o ? t.colors.black : t.colors.white};
|
|
612
635
|
height: 28px;
|
|
613
636
|
border-radius: 18px;
|
|
614
637
|
display: flex;
|
|
615
638
|
align-items: center;
|
|
616
639
|
justify-content: center;
|
|
617
|
-
border: 2px solid ${o ? "transparent" :
|
|
618
|
-
color: ${o ?
|
|
640
|
+
border: 2px solid ${o ? "transparent" : t.colors.black};
|
|
641
|
+
color: ${o ? t.colors.white : t.colors.black};
|
|
619
642
|
transition: 108ms all ease-in;
|
|
620
643
|
font-weight: 500;
|
|
621
644
|
|
|
622
645
|
&:hover,
|
|
623
646
|
:focus-visible {
|
|
624
|
-
background-color: ${o ?
|
|
647
|
+
background-color: ${o ? t.colors.charcoal : t.colors.gray2};
|
|
625
648
|
}
|
|
626
649
|
`
|
|
627
|
-
})),
|
|
650
|
+
})), ho = s(k)(
|
|
651
|
+
({ backgroundColor: o, borderColor: r }) => ({
|
|
652
|
+
...g`
|
|
653
|
+
height: 28px;
|
|
654
|
+
border-radius: 20px;
|
|
655
|
+
border-width: 2px;
|
|
656
|
+
border-style: solid;
|
|
657
|
+
border-color: ${r}aa ${r} ${r} ${r}aa;
|
|
658
|
+
background: ${o};
|
|
659
|
+
color: ${r};
|
|
660
|
+
padding: 10px;
|
|
661
|
+
font-size: 0.9rem !important;
|
|
662
|
+
font-weight: 500;
|
|
663
|
+
font-family: inherit;
|
|
664
|
+
transition: all 313ms ease;
|
|
665
|
+
|
|
666
|
+
span {
|
|
667
|
+
display: flex;
|
|
668
|
+
align-items: center !important;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
.lucide {
|
|
672
|
+
height: 15px;
|
|
673
|
+
margin-left: 5px;
|
|
674
|
+
margin-right: -8px;
|
|
675
|
+
stroke: ${r};
|
|
676
|
+
transition: all 313ms ease;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
&:hover .lucide {
|
|
680
|
+
height: 17px;
|
|
681
|
+
stroke-width: 3;
|
|
682
|
+
margin-left: 17px;
|
|
683
|
+
}
|
|
684
|
+
`
|
|
685
|
+
})
|
|
686
|
+
), Po = ({
|
|
628
687
|
variant: o = 1,
|
|
629
|
-
size:
|
|
630
|
-
color:
|
|
631
|
-
highlightColor:
|
|
632
|
-
hoverColor:
|
|
633
|
-
backgroundColor: u
|
|
634
|
-
textColor: b
|
|
635
|
-
customShadow1:
|
|
636
|
-
customShadow2: f
|
|
688
|
+
size: r = 50,
|
|
689
|
+
color: a,
|
|
690
|
+
highlightColor: n,
|
|
691
|
+
hoverColor: c,
|
|
692
|
+
backgroundColor: u,
|
|
693
|
+
textColor: b,
|
|
694
|
+
customShadow1: v,
|
|
695
|
+
customShadow2: f,
|
|
637
696
|
children: l,
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
697
|
+
textToCopy: I,
|
|
698
|
+
active: S,
|
|
699
|
+
...d
|
|
700
|
+
}) => {
|
|
701
|
+
const y = ao();
|
|
702
|
+
if (o === "custom")
|
|
703
|
+
return /* @__PURE__ */ i(
|
|
704
|
+
bo,
|
|
705
|
+
{
|
|
706
|
+
customBackgroundColor: u,
|
|
707
|
+
customHoverColor: c,
|
|
708
|
+
customTextColor: b,
|
|
709
|
+
customShadow1: v,
|
|
710
|
+
customShadow2: f,
|
|
711
|
+
className: "jcCustomButton",
|
|
712
|
+
...d,
|
|
713
|
+
children: l
|
|
714
|
+
}
|
|
715
|
+
);
|
|
716
|
+
if (o === "bibi")
|
|
717
|
+
return /* @__PURE__ */ i(N, { ...d, children: l });
|
|
718
|
+
if (o === "bibiOutlined")
|
|
719
|
+
return /* @__PURE__ */ i(xo, { ...d, children: l });
|
|
720
|
+
if (o === "bibiInverse")
|
|
721
|
+
return /* @__PURE__ */ i(vo, { ...d, children: l });
|
|
722
|
+
if (o === "unstyled")
|
|
723
|
+
return /* @__PURE__ */ i(L, { ...d, children: l });
|
|
724
|
+
if (o === "copy") {
|
|
725
|
+
const [m, z] = q(!1);
|
|
726
|
+
return /* @__PURE__ */ T(yo, { onClick: async () => {
|
|
727
|
+
try {
|
|
728
|
+
await navigator.clipboard.writeText(I || String(l)), z(!0), setTimeout(() => z(!1), 1100);
|
|
729
|
+
} catch (O) {
|
|
730
|
+
console.error("Failed to copy text: ", O);
|
|
731
|
+
}
|
|
732
|
+
}, children: [
|
|
733
|
+
/* @__PURE__ */ i(eo, { title: "Copy to clipboard", children: /* @__PURE__ */ i(fo, { ...d, children: l }) }),
|
|
734
|
+
m && /* @__PURE__ */ T("span", { className: "isCopied", children: [
|
|
735
|
+
/* @__PURE__ */ i(no, { size: 12 }),
|
|
736
|
+
" Copied"
|
|
737
|
+
] })
|
|
738
|
+
] });
|
|
651
739
|
}
|
|
652
|
-
|
|
740
|
+
return o === 2 ? /* @__PURE__ */ i(go, { ...d, children: /* @__PURE__ */ i("span", { children: l }) }) : o === "icon" ? (a = a || t.colors.green, n = n || t.colors.dandelion, c = c || t.colors.green, /* @__PURE__ */ i(mo, { className: "jcIconButton", ...{ size: r, color: a, highlightColor: n, hoverColor: c }, ...d, children: l })) : o === "filter" ? /* @__PURE__ */ i($o, { className: "jcFilterButton", active: S, ...d, children: l }) : o === "pill" ? /* @__PURE__ */ i(
|
|
741
|
+
ho,
|
|
742
|
+
{
|
|
743
|
+
backgroundColor: u || y.themeIconBackgroundB,
|
|
744
|
+
borderColor: b || y.themeIconBackgroundA,
|
|
745
|
+
...d,
|
|
746
|
+
children: /* @__PURE__ */ i("span", { children: l })
|
|
747
|
+
}
|
|
748
|
+
) : /* @__PURE__ */ i(uo, { ...d, children: /* @__PURE__ */ i("span", { children: l }) });
|
|
749
|
+
};
|
|
653
750
|
export {
|
|
654
|
-
|
|
655
|
-
|
|
751
|
+
Po as Button,
|
|
752
|
+
Po as default
|
|
656
753
|
};
|