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/Button/Button.js CHANGED
@@ -1,39 +1,43 @@
1
- import { jsxs as _, jsx as i } from "react/jsx-runtime";
2
- import * as S from "react";
3
- import { g as A, a as q, s, r as J, c as p, j as K, u as Q, b as R, P as t, d as X, e as $ } from "../.chunks/DefaultPropsProvider.js";
4
- import { m as Y } from "../.chunks/memoTheme.js";
5
- import { c as Z } from "../.chunks/createSimplePaletteValueFilter.js";
6
- import { B as h } from "../.chunks/ButtonBase.js";
7
- import { i as oo } from "../.chunks/emotion-styled.browser.esm.js";
8
- import { c as v } from "../.chunks/emotion-react.browser.esm.js";
9
- import r from "../theme.js";
10
- function ro(o) {
11
- return A("MuiButton", o);
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 g = q("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"]), E = /* @__PURE__ */ S.createContext({});
14
- process.env.NODE_ENV !== "production" && (E.displayName = "ButtonGroupContext");
15
- const T = /* @__PURE__ */ S.createContext(void 0);
16
- process.env.NODE_ENV !== "production" && (T.displayName = "ButtonGroupButtonContext");
17
- const to = (o) => {
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: a,
20
- disableElevation: n,
21
- fullWidth: e,
22
- size: d,
23
+ color: r,
24
+ disableElevation: a,
25
+ fullWidth: n,
26
+ size: c,
23
27
  variant: u,
24
28
  classes: b
25
- } = o, x = {
26
- root: ["root", u, `${u}${p(a)}`, `size${p(d)}`, `${u}Size${p(d)}`, `color${p(a)}`, n && "disableElevation", e && "fullWidth"],
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(d)}`],
29
- endIcon: ["icon", "endIcon", `iconSize${p(d)}`]
30
- }, f = X(x, ro, b);
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
- }, P = [{
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
- }], ao = s(h, {
64
- shouldForwardProp: (o) => J(o) || o === "classes",
67
+ }], lo = s(k, {
68
+ shouldForwardProp: (o) => Q(o) || o === "classes",
65
69
  name: "MuiButton",
66
70
  slot: "Root",
67
- overridesResolver: (o, a) => {
71
+ overridesResolver: (o, r) => {
68
72
  const {
69
- ownerState: n
73
+ ownerState: a
70
74
  } = o;
71
- return [a.root, a[n.variant], a[`${n.variant}${p(n.color)}`], a[`size${p(n.size)}`], a[`${n.variant}Size${p(n.size)}`], n.color === "inherit" && a.colorInherit, n.disableElevation && a.disableElevation, n.fullWidth && a.fullWidth];
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
- })(Y(({
77
+ })(oo(({
74
78
  theme: o
75
79
  }) => {
76
- const a = o.palette.mode === "light" ? o.palette.grey[300] : o.palette.grey[800], n = o.palette.mode === "light" ? o.palette.grey.A100 : o.palette.grey[700];
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
- [`&.${g.disabled}`]: {
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
- [`&.${g.focusVisible}`]: {
114
+ [`&.${x.focusVisible}`]: {
111
115
  boxShadow: (o.vars || o).shadows[6]
112
116
  },
113
- [`&.${g.disabled}`]: {
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
- [`&.${g.disabled}`]: {
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(Z()).map(([e]) => ({
146
+ }, ...Object.entries(o.palette).filter(to()).map(([n]) => ({
143
147
  props: {
144
- color: e
148
+ color: n
145
149
  },
146
150
  style: {
147
- "--variant-textColor": (o.vars || o).palette[e].main,
148
- "--variant-outlinedColor": (o.vars || o).palette[e].main,
149
- "--variant-outlinedBorder": o.vars ? `rgba(${o.vars.palette[e].mainChannel} / 0.5)` : $(o.palette[e].main, 0.5),
150
- "--variant-containedColor": (o.vars || o).palette[e].contrastText,
151
- "--variant-containedBg": (o.vars || o).palette[e].main,
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[e].dark,
155
- "--variant-textBg": o.vars ? `rgba(${o.vars.palette[e].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : $(o.palette[e].main, o.palette.action.hoverOpacity),
156
- "--variant-outlinedBorder": (o.vars || o).palette[e].main,
157
- "--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette[e].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : $(o.palette[e].main, o.palette.action.hoverOpacity)
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 : a,
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 : n,
172
- "--variant-textBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : $(o.palette.text.primary, o.palette.action.hoverOpacity),
173
- "--variant-outlinedBg": o.vars ? `rgba(${o.vars.palette.text.primaryChannel} / ${o.vars.palette.action.hoverOpacity})` : $(o.palette.text.primary, o.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
- [`&.${g.focusVisible}`]: {
244
+ [`&.${x.focusVisible}`]: {
241
245
  boxShadow: "none"
242
246
  },
243
247
  "&:active": {
244
248
  boxShadow: "none"
245
249
  },
246
- [`&.${g.disabled}`]: {
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
- })), no = s("span", {
263
+ })), co = s("span", {
260
264
  name: "MuiButton",
261
265
  slot: "StartIcon",
262
- overridesResolver: (o, a) => {
266
+ overridesResolver: (o, r) => {
263
267
  const {
264
- ownerState: n
268
+ ownerState: a
265
269
  } = o;
266
- return [a.startIcon, a[`iconSize${p(n.size)}`]];
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
- }, ...P]
280
- }), eo = s("span", {
283
+ }, ...F]
284
+ }), po = s("span", {
281
285
  name: "MuiButton",
282
286
  slot: "EndIcon",
283
- overridesResolver: (o, a) => {
287
+ overridesResolver: (o, r) => {
284
288
  const {
285
- ownerState: n
289
+ ownerState: a
286
290
  } = o;
287
- return [a.endIcon, a[`iconSize${p(n.size)}`]];
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
- }, ...P]
301
- }), j = /* @__PURE__ */ S.forwardRef(function(a, n) {
302
- const e = S.useContext(E), d = S.useContext(T), u = K(e, a), b = Q({
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: x,
310
+ children: v,
307
311
  color: f = "primary",
308
312
  component: l = "button",
309
- className: m,
310
- disabled: c = !1,
311
- disableElevation: C = !1,
312
- disableFocusRipple: k = !1,
313
- endIcon: I,
314
- focusVisibleClassName: V,
315
- fullWidth: M = !1,
316
- size: F = "medium",
317
- startIcon: O,
318
- type: N,
319
- variant: G = "text",
320
- ...L
321
- } = b, w = {
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: c,
326
- disableElevation: C,
327
- disableFocusRipple: k,
328
- fullWidth: M,
329
- size: F,
330
- type: N,
331
- variant: G
332
- }, y = to(w), H = O && /* @__PURE__ */ i(no, {
333
- className: y.startIcon,
334
- ownerState: w,
335
- children: O
336
- }), D = I && /* @__PURE__ */ i(eo, {
337
- className: y.endIcon,
338
- ownerState: w,
339
- children: I
340
- }), U = d || "";
341
- return /* @__PURE__ */ _(ao, {
342
- ownerState: w,
343
- className: R(e.className, y.root, m, U),
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: c,
346
- focusRipple: !k,
347
- focusVisibleClassName: R(y.focusVisible, V),
348
- ref: n,
349
- type: N,
350
- ...L,
351
- classes: y,
352
- children: [H, x, D]
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" && (j.propTypes = {
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: t.node,
367
+ children: e.node,
364
368
  /**
365
369
  * Override or extend the styles applied to the component.
366
370
  */
367
- classes: t.object,
371
+ classes: e.object,
368
372
  /**
369
373
  * @ignore
370
374
  */
371
- className: t.string,
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: t.oneOfType([t.oneOf(["inherit", "primary", "secondary", "success", "error", "info", "warning"]), t.string]),
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: t.elementType,
387
+ component: e.elementType,
384
388
  /**
385
389
  * If `true`, the component is disabled.
386
390
  * @default false
387
391
  */
388
- disabled: t.bool,
392
+ disabled: e.bool,
389
393
  /**
390
394
  * If `true`, no elevation is used.
391
395
  * @default false
392
396
  */
393
- disableElevation: t.bool,
397
+ disableElevation: e.bool,
394
398
  /**
395
399
  * If `true`, the keyboard focus ripple is disabled.
396
400
  * @default false
397
401
  */
398
- disableFocusRipple: t.bool,
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: t.bool,
410
+ disableRipple: e.bool,
407
411
  /**
408
412
  * Element placed after the children.
409
413
  */
410
- endIcon: t.node,
414
+ endIcon: e.node,
411
415
  /**
412
416
  * @ignore
413
417
  */
414
- focusVisibleClassName: t.string,
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: t.bool,
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: t.string,
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: t.oneOfType([t.oneOf(["small", "medium", "large"]), t.string]),
434
+ size: e.oneOfType([e.oneOf(["small", "medium", "large"]), e.string]),
431
435
  /**
432
436
  * Element placed before the children.
433
437
  */
434
- startIcon: t.node,
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: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
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: t.oneOfType([t.oneOf(["button", "reset", "submit"]), t.string]),
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: t.oneOfType([t.oneOf(["contained", "outlined", "text"]), t.string])
451
+ variant: e.oneOfType([e.oneOf(["contained", "outlined", "text"]), e.string])
448
452
  });
449
- const W = [
453
+ const G = [
450
454
  "active",
451
455
  "customBackgroundColor",
452
456
  "customHoverColor",
453
457
  "customTextColor",
454
458
  "customShadow1",
455
459
  "customShadow2"
456
- ], B = s(j, { shouldForwardProp: (o) => !W.includes(o) })`
460
+ ], w = s(M, { shouldForwardProp: (o) => !G.includes(o) })`
457
461
  text-transform: none;
458
462
  &:disabled {
459
463
  opacity: 0.5;
460
- color: ${r.colors.black};
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
- `, io = s(B)`
470
- background-color: ${r.colors.green};
473
+ `, uo = s(w)`
474
+ background-color: ${t.colors.green};
471
475
  height: 2.5rem;
472
476
  border: 2px solid transparent;
473
- color: ${r.colors.white};
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: ${r.boxShadows.gray63};
483
+ box-shadow: ${t.boxShadows.gray63};
480
484
  &:hover,
481
485
  :focus-visible {
482
- background-color: ${r.colors.darkGreen};
483
- box-shadow: ${r.boxShadows.black63};
486
+ background-color: ${t.colors.darkGreen};
487
+ box-shadow: ${t.boxShadows.black63};
484
488
  }
485
489
  &:disabled {
486
- background-color: ${r.colors.darkGreen};
490
+ background-color: ${t.colors.darkGreen};
487
491
  }
488
- `, so = s(B, {
489
- shouldForwardProp: (o) => !W.includes(o)
492
+ `, bo = s(w, {
493
+ shouldForwardProp: (o) => !G.includes(o)
490
494
  })(
491
495
  ({
492
- customBackgroundColor: o = r.colors.green,
493
- customHoverColor: a = r.colors.darkGreen,
494
- customTextColor: n = r.colors.white,
495
- customShadow1: e = r.boxShadows.gray63,
496
- customShadow2: d = r.boxShadows.black63
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
- ...v`
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: ${n};
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: ${e};
513
+ box-shadow: ${n};
510
514
  &:hover,
511
515
  :focus-visible {
512
- background-color: ${a};
513
- box-shadow: ${d};
516
+ background-color: ${r};
517
+ box-shadow: ${c};
514
518
  }
515
519
  &:disabled {
516
- background-color: ${a};
520
+ background-color: ${r};
517
521
  }
518
522
  `
519
523
  })
520
- ), lo = s(B)`
521
- background-color: ${r.colors.gold};
524
+ ), go = s(w)`
525
+ background-color: ${t.colors.gold};
522
526
  height: 2.5rem;
523
527
  border: 2px solid transparent;
524
- color: ${r.colors.midnight};
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: ${r.boxShadows.gray63};
534
+ box-shadow: ${t.boxShadows.gray63};
531
535
  &:hover,
532
536
  :focus-visible {
533
- background-color: ${r.colors.goldHover};
534
- box-shadow: ${r.boxShadows.gray63};
537
+ background-color: ${t.colors.goldHover};
538
+ box-shadow: ${t.boxShadows.gray63};
535
539
  }
536
540
  &:disabled {
537
- background-color: ${r.colors.goldHover};
541
+ background-color: ${t.colors.goldHover};
538
542
  }
539
- `, z = s(B)(({ width: o = "114px" }) => ({
540
- ...v`
543
+ `, N = s(w)(({ width: o = "114px" }) => ({
544
+ ...g`
541
545
  box-sizing: border-box;
542
- background-color: ${r.colors.bibiBlue};
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: ${r.colors.white};
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: ${r.colors.bibiBlueHover};
558
+ background-color: ${t.colors.bibiBlueHover};
555
559
  }
556
560
  `
557
- })), co = s(z)(({ active: o }) => ({
558
- ...v`
559
- background-color: ${o && r.colors.white};
560
- color: ${o && r.colors.bibiBlue};
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: ${r.colors.white};
564
- color: ${r.colors.bibiBlue};
567
+ background-color: ${t.colors.white};
568
+ color: ${t.colors.bibiBlue};
565
569
  }
566
570
  `
567
- })), po = s(z)(() => ({
568
- ...v`
569
- background-color: ${r.colors.white};
570
- color: ${r.colors.bibiBlue};
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: ${r.colors.bibiBlue};
574
- border: 2px solid ${r.colors.white};
575
- color: ${r.colors.white};
577
+ background-color: ${t.colors.bibiBlue};
578
+ border: 2px solid ${t.colors.white};
579
+ color: ${t.colors.white};
576
580
  }
577
581
  `
578
- })), uo = s(h)`
582
+ })), L = s(k)`
579
583
  display: block;
580
- `, bo = s(h, {
581
- shouldForwardProp: (o) => typeof o == "string" && oo(o)
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: a, highlightColor: n, hoverColor: e }) => ({
584
- ...v`
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 ${n}) drop-shadow(0 0 6px ${n})
595
- drop-shadow(0 0 6px ${n}) drop-shadow(0 0 6px ${n});
596
- fill: ${e || a};
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: ${a};
625
+ fill: ${r};
603
626
  width: ${o}px;
604
627
  height: ${o}px;
605
628
  }
606
629
  `
607
630
  })
608
- ), go = s(B)(({ active: o }) => ({
609
- ...v`
631
+ ), $o = s(w)(({ active: o }) => ({
632
+ ...g`
610
633
  box-sizing: border-box;
611
- background-color: ${o ? r.colors.black : r.colors.white};
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" : r.colors.black};
618
- color: ${o ? r.colors.white : r.colors.black};
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 ? r.colors.charcoal : r.colors.gray2};
647
+ background-color: ${o ? t.colors.charcoal : t.colors.gray2};
625
648
  }
626
649
  `
627
- })), mo = ({
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: a = 50,
630
- color: n = r.colors.darkGreen,
631
- highlightColor: e = r.colors.dandelion,
632
- hoverColor: d = r.colors.green,
633
- backgroundColor: u = r.colors.darkGreen,
634
- textColor: b = r.colors.white,
635
- customShadow1: x = r.boxShadows.gray63,
636
- customShadow2: f = r.boxShadows.black63,
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
- active: m,
639
- ...c
640
- }) => o === "custom" ? /* @__PURE__ */ i(
641
- so,
642
- {
643
- customBackgroundColor: u,
644
- customHoverColor: d,
645
- customTextColor: b,
646
- customShadow1: x,
647
- customShadow2: f,
648
- className: "jcCustomButton",
649
- ...c,
650
- children: l
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
- ) : o === "bibi" ? /* @__PURE__ */ i(z, { ...c, children: l }) : o === "bibiOutlined" ? /* @__PURE__ */ i(co, { ...c, children: l }) : o === "bibiInverse" ? /* @__PURE__ */ i(po, { ...c, children: l }) : o === "unstyled" ? /* @__PURE__ */ i(uo, { ...c, children: l }) : o === 2 ? /* @__PURE__ */ i(lo, { ...c, children: /* @__PURE__ */ i("span", { children: l }) }) : o === "icon" ? /* @__PURE__ */ i(bo, { className: "jcIconButton", ...{ size: a, color: n, highlightColor: e, hoverColor: d }, ...c, children: l }) : o === "filter" ? /* @__PURE__ */ i(go, { className: "jcFilterButton", active: m, ...c, children: l }) : /* @__PURE__ */ i(io, { ...c, children: /* @__PURE__ */ i("span", { children: l }) });
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
- mo as Button,
655
- mo as default
751
+ Po as Button,
752
+ Po as default
656
753
  };