@pismo/marola 0.0.1-alpha.26 → 0.0.1-alpha.27

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.
@@ -0,0 +1,26 @@
1
+ import './assets/Group.css';
2
+ import { jsxs as l, jsx as t } from "react/jsx-runtime";
3
+ import { forwardRef as i } from "react";
4
+ import { Icon as n } from "./components/Icon/Icon.js";
5
+ const c = "_toggle__input_guqvs_1", u = "_toggle__label_guqvs_8", o = {
6
+ toggle__input: c,
7
+ toggle__label: u,
8
+ "toggle__label--selected": "_toggle__label--selected_guqvs_15",
9
+ "toggle-group__fieldset": "_toggle-group__fieldset_guqvs_20",
10
+ "toggle-group__options": "_toggle-group__options_guqvs_25",
11
+ "toggle-group__error": "_toggle-group__error_guqvs_29"
12
+ }, f = i((e, r) => {
13
+ const { children: s, legend: g, error: _ } = e, d = e["data-testid"] ? `${e["data-testid"]}-legend` : void 0, a = e["data-testid"] ? `${e["data-testid"]}-error` : void 0;
14
+ return /* @__PURE__ */ l("fieldset", { ref: r, "data-testid": e["data-testid"], className: o["toggle-group__fieldset"], children: [
15
+ g && /* @__PURE__ */ t("legend", { "data-testid": d, children: g }),
16
+ /* @__PURE__ */ t("div", { className: o["toggle-group__options"], children: s }),
17
+ _ && /* @__PURE__ */ l("div", { className: o["toggle-group__error"], "data-testid": a, children: [
18
+ /* @__PURE__ */ t(n, { icon: "circle-exclamation", size: 24, color: "var(--alert)" }),
19
+ _
20
+ ] })
21
+ ] });
22
+ });
23
+ export {
24
+ f as G,
25
+ o as s
26
+ };
@@ -0,0 +1,143 @@
1
+ import './assets/Toggle.css';
2
+ import { jsx as r, jsxs as y } from "react/jsx-runtime";
3
+ import { forwardRef as u, cloneElement as m } from "react";
4
+ import { c as l } from "./clsx-DB4S2d7J.js";
5
+ import "./components/Button/Button.js";
6
+ import { Icon as g } from "./components/Icon/Icon.js";
7
+ import "./components/Dialog/Backdrop.js";
8
+ import { Typography as j } from "./components/Typography/Typography.js";
9
+ import "./components/IconButton/IconButton.js";
10
+ import "./components/Select/Select.js";
11
+ import { Skeleton as f } from "./components/Skeleton/Skeleton.js";
12
+ import "./components/Table/Table.js";
13
+ import "./components/Tabs/Tabs.js";
14
+ import { s as c } from "./Group-Dj___O8t.js";
15
+ import "./contexts/SnackbarProvider/SnackbarProvider.js";
16
+ import { B as k } from "./Button-2b1peDFT.js";
17
+ const x = "_chip_bu1ja_60", C = "_chip__adornment_bu1ja_114", N = "_chip__remove_bu1ja_119", v = "_chip__skeleton_bu1ja_133", _ = {
18
+ "u-typography-h1": "_u-typography-h1_bu1ja_1",
19
+ "u-typography-h2": "_u-typography-h2_bu1ja_8",
20
+ "u-typography-h3": "_u-typography-h3_bu1ja_15",
21
+ "u-typography-h4": "_u-typography-h4_bu1ja_22",
22
+ "u-typography-h5": "_u-typography-h5_bu1ja_29",
23
+ "u-typography-h6": "_u-typography-h6_bu1ja_36",
24
+ "u-typography-base": "_u-typography-base_bu1ja_43",
25
+ "u-typography-base--xxl": "_u-typography-base--xxl_bu1ja_48",
26
+ "u-typography-base--xl": "_u-typography-base--xl_bu1ja_52",
27
+ "u-typography-base--lg": "_u-typography-base--lg_bu1ja_56",
28
+ "u-typography-base--sm": "_u-typography-base--sm_bu1ja_60",
29
+ chip: x,
30
+ "u-typography-base--bold": "_u-typography-base--bold_bu1ja_64",
31
+ "u-typography-base--strikethrough": "_u-typography-base--strikethrough_bu1ja_67",
32
+ "u-typography-base--underlined": "_u-typography-base--underlined_bu1ja_70",
33
+ "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_bu1ja_73",
34
+ "chip--button": "_chip--button_bu1ja_89",
35
+ "chip--outlined": "_chip--outlined_bu1ja_102",
36
+ "chip--contained": "_chip--contained_bu1ja_108",
37
+ chip__adornment: C,
38
+ chip__remove: N,
39
+ "chip__remove--disabled": "_chip__remove--disabled_bu1ja_130",
40
+ chip__skeleton: v
41
+ }, T = u((a, t) => {
42
+ const { children: i, onClickContent: e, disabled: s, className: p, variant: h } = a;
43
+ let o = l(
44
+ _.chip,
45
+ { [_["chip--outlined"]]: h === "outlined" },
46
+ { [_["chip--contained"]]: h === "contained" },
47
+ p
48
+ );
49
+ return e ? (o += ` ${_["chip--button"]}`, /* @__PURE__ */ r(
50
+ k,
51
+ {
52
+ onClick: e,
53
+ disabled: s,
54
+ "data-testid": a["data-testid"],
55
+ ref: t,
56
+ className: o,
57
+ children: i
58
+ }
59
+ )) : /* @__PURE__ */ r("span", { "data-testid": a["data-testid"], ref: t, className: o, children: i });
60
+ }), R = (a) => {
61
+ const { icon: t, disabled: i = !1, className: e } = a;
62
+ if (t) {
63
+ const s = l(_.chip__adornment, e), p = i ? m(t, { color: "rgb(var(--gray-95-rgb), 0.4)" }) : t;
64
+ return /* @__PURE__ */ r("span", { className: s, children: p });
65
+ }
66
+ return null;
67
+ }, H = u((a, t) => {
68
+ const {
69
+ label: i,
70
+ className: e,
71
+ onClickContent: s,
72
+ leftAdornment: p,
73
+ loading: h = !1,
74
+ disabled: o = !1,
75
+ variant: b = "default",
76
+ onClickRemove: d
77
+ } = a;
78
+ return h ? /* @__PURE__ */ r(
79
+ f,
80
+ {
81
+ className: a["className-skeleton"],
82
+ style: { width: "6rem", height: "2rem", borderRadius: "4rem", display: "inline-flex" },
83
+ "data-testid": a["data-testid-skeleton"]
84
+ }
85
+ ) : /* @__PURE__ */ y(
86
+ T,
87
+ {
88
+ ref: t,
89
+ "data-testid": a["data-testid"],
90
+ onClickContent: s,
91
+ disabled: o,
92
+ className: e,
93
+ variant: b,
94
+ children: [
95
+ p && /* @__PURE__ */ r(R, { ...p, disabled: o }),
96
+ i,
97
+ d && /* @__PURE__ */ r(
98
+ "span",
99
+ {
100
+ className: l(_.chip__remove, { [_["chip__remove--disabled"]]: o }),
101
+ role: "button",
102
+ tabIndex: o ? -1 : 0,
103
+ "aria-label": "remove",
104
+ onClick: (n) => {
105
+ n == null || n.stopPropagation(), n == null || n.nativeEvent.stopImmediatePropagation(), d();
106
+ },
107
+ "aria-disabled": o,
108
+ children: /* @__PURE__ */ r(g, { icon: "circle-xmark", size: "1.125rem", color: "rgba(var(--gray-95-rgb), 0.45)" })
109
+ }
110
+ )
111
+ ]
112
+ }
113
+ );
114
+ }), J = u((a, t) => {
115
+ const { text: i, isSelected: e = !1, value: s, onChange: p } = a;
116
+ return /* @__PURE__ */ y(
117
+ "label",
118
+ {
119
+ className: l([c.toggle__label], { [c["toggle__label--selected"]]: e }),
120
+ "data-testid": a["data-testid"],
121
+ children: [
122
+ /* @__PURE__ */ r(
123
+ "input",
124
+ {
125
+ className: l([c.toggle__input]),
126
+ type: "radio",
127
+ ref: t,
128
+ value: s.toString(),
129
+ onChange: () => p(s),
130
+ role: "radio",
131
+ checked: e,
132
+ "aria-checked": e
133
+ }
134
+ ),
135
+ /* @__PURE__ */ r(j, { bold: !0, children: i })
136
+ ]
137
+ }
138
+ );
139
+ });
140
+ export {
141
+ H as C,
142
+ J as T
143
+ };
@@ -1 +1 @@
1
- ._toggle__input_1hgsq_1{position:absolute;opacity:0;width:0;height:0;margin:0}._toggle__label_1hgsq_8{border-radius:6px;border:solid 1px var(--gray-25);padding:.5rem 1rem;flex-grow:1;text-align:center}._toggle__label--selected_1hgsq_15{color:var(--accent);border-color:var(--accent)}._toggle-group__fieldset_1hgsq_20{border:none}._toggle-group__options_1hgsq_23{display:flex;gap:.5rem}._toggle-group__error_1hgsq_27{color:var(--alert);display:flex;gap:.5rem;margin-top:.5rem}
1
+ ._toggle__input_guqvs_1{position:absolute;opacity:0;width:0;height:0;margin:0}._toggle__label_guqvs_8{border-radius:6px;border:solid 1px var(--gray-25);padding:.5rem 1rem;flex-grow:1;text-align:center}._toggle__label--selected_guqvs_15{color:var(--accent);border-color:var(--accent)}._toggle-group__fieldset_guqvs_20{border:none;margin:0;padding:0}._toggle-group__options_guqvs_25{display:flex;gap:.5rem}._toggle-group__error_guqvs_29{color:var(--alert);display:flex;gap:.5rem;margin-top:.5rem}
@@ -1 +1 @@
1
- ._u-typography-h1_1j9h1_1{font-size:var(--heading-font-size-1);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-1);margin:0}._u-typography-h2_1j9h1_8{font-size:var(--heading-font-size-2);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-2);margin:0}._u-typography-h3_1j9h1_15{font-size:var(--heading-font-size-3);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-3);margin:0}._u-typography-h4_1j9h1_22{font-size:var(--heading-font-size-4);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-4);margin:0}._u-typography-h5_1j9h1_29{font-size:var(--heading-font-size-5);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-5);margin:0}._u-typography-h6_1j9h1_36{font-size:var(--heading-font-size-6);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-6);margin:0}._u-typography-base_1j9h1_43{font-size:var(--base-font-size);font-weight:var(--base-weight);line-height:var(--base-line-height)}._u-typography-base--xxl_1j9h1_48{font-size:var(--base-font-size-xxl);line-height:var(--base-line-height-xxl)}._u-typography-base--xl_1j9h1_52{font-size:var(--base-font-size-xl);line-height:var(--base-line-height-xl)}._u-typography-base--lg_1j9h1_56{font-size:var(--base-font-size-lg);line-height:var(--base-line-height-lg)}._u-typography-base--sm_1j9h1_60,._chip_1j9h1_60{font-size:var(--base-font-size-sm);line-height:var(--base-line-height-sm)}._u-typography-base--bold_1j9h1_64,._chip_1j9h1_60{font-weight:var(--base-bold)}._u-typography-base--strikethrough_1j9h1_67{text-decoration:line-through}._u-typography-base--underlined_1j9h1_70{text-decoration:underline}._u-typography-base--strikethrough-underlined_1j9h1_73{text-decoration:underline line-through}._chip_1j9h1_60{display:flex;align-items:center;width:fit-content;padding:.375rem .5rem;background-color:var(--cream);border-width:1px;border-radius:calc(var(--border-radius-soft) * 4)}._chip_1j9h1_60:not(:disabled){color:rgb(var(--gray-95-rgb) .65)}._chip--button_1j9h1_89{cursor:pointer;border-color:transparent}._chip--button_1j9h1_89:disabled{cursor:initial}._chip--button_1j9h1_89:focus-visible{outline:none}._chip--button_1j9h1_89:focus{outline:2px solid var(--black-100)}._chip--outlined_1j9h1_102{padding:.3125rem .5rem;background-color:var(--white-100);border:1px solid var(--border);border-radius:calc(var(--border-radius-soft) * 4)}._chip--contained_1j9h1_108{padding:.3125rem .5rem;border:1px solid var(--border);border-color:var(--accent);border-radius:calc(var(--border-radius-soft) * 4)}._chip__adornment_1j9h1_114{display:flex;align-items:center;margin-right:.5rem}._chip__remove_1j9h1_119{display:flex;margin-left:.5rem}._chip__remove_1j9h1_119:focus-visible{outline:none}._chip__remove_1j9h1_119:focus:not(:disabled){border-radius:calc(var(--border-radius-soft) * 4);outline:2px solid var(--black-100)}._chip__remove--disabled_1j9h1_130{cursor:default}
1
+ ._u-typography-h1_bu1ja_1{font-size:var(--heading-font-size-1);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-1);margin:0}._u-typography-h2_bu1ja_8{font-size:var(--heading-font-size-2);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-2);margin:0}._u-typography-h3_bu1ja_15{font-size:var(--heading-font-size-3);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-3);margin:0}._u-typography-h4_bu1ja_22{font-size:var(--heading-font-size-4);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-4);margin:0}._u-typography-h5_bu1ja_29{font-size:var(--heading-font-size-5);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-5);margin:0}._u-typography-h6_bu1ja_36{font-size:var(--heading-font-size-6);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-6);margin:0}._u-typography-base_bu1ja_43{font-size:var(--base-font-size);font-weight:var(--base-weight);line-height:var(--base-line-height)}._u-typography-base--xxl_bu1ja_48{font-size:var(--base-font-size-xxl);line-height:var(--base-line-height-xxl)}._u-typography-base--xl_bu1ja_52{font-size:var(--base-font-size-xl);line-height:var(--base-line-height-xl)}._u-typography-base--lg_bu1ja_56{font-size:var(--base-font-size-lg);line-height:var(--base-line-height-lg)}._u-typography-base--sm_bu1ja_60,._chip_bu1ja_60{font-size:var(--base-font-size-sm);line-height:var(--base-line-height-sm)}._u-typography-base--bold_bu1ja_64,._chip_bu1ja_60{font-weight:var(--base-bold)}._u-typography-base--strikethrough_bu1ja_67{text-decoration:line-through}._u-typography-base--underlined_bu1ja_70{text-decoration:underline}._u-typography-base--strikethrough-underlined_bu1ja_73{text-decoration:underline line-through}._chip_bu1ja_60{display:flex;align-items:center;width:fit-content;padding:.375rem .5rem;background-color:var(--cream);border-width:1px;border-radius:calc(var(--border-radius-soft) * 4)}._chip_bu1ja_60:not(:disabled){color:rgb(var(--gray-95-rgb) .65)}._chip--button_bu1ja_89{cursor:pointer;border-color:transparent}._chip--button_bu1ja_89:disabled{cursor:initial}._chip--button_bu1ja_89:focus-visible{outline:none}._chip--button_bu1ja_89:focus{outline:2px solid var(--black-100)}._chip--outlined_bu1ja_102{padding:.3125rem .5rem;background-color:var(--white-100);border:1px solid var(--border);border-radius:calc(var(--border-radius-soft) * 4)}._chip--contained_bu1ja_108{padding:.3125rem .5rem;border:1px solid var(--border);border-color:var(--accent);border-radius:calc(var(--border-radius-soft) * 4)}._chip__adornment_bu1ja_114{display:flex;align-items:center;margin-right:.5rem}._chip__remove_bu1ja_119{display:flex;margin-left:.5rem}._chip__remove_bu1ja_119:focus-visible{outline:none}._chip__remove_bu1ja_119:focus:not(:disabled){border-radius:calc(var(--border-radius-soft) * 4);outline:2px solid var(--black-100)}._chip__remove--disabled_bu1ja_130{cursor:default}._chip__skeleton_bu1ja_133{width:6rem;height:2rem;border-radius:4rem;display:inline-flex}
@@ -20,6 +20,8 @@ type ChipProps = {
20
20
  disabled?: boolean;
21
21
  /** Any additional classes to apply to the Chip wrapper */
22
22
  className?: string;
23
+ /** Any additional classes to apply to the chip skeleton */
24
+ 'className-skeleton'?: string;
23
25
  /** Which style of chip to show */
24
26
  variant?: Variant;
25
27
  /** Dataset test id only used for tests, used to hook onto the loading skeleton component for this chip */
@@ -3,7 +3,7 @@ import "react";
3
3
  import "../../clsx-DB4S2d7J.js";
4
4
  import "../Icon/Icon.js";
5
5
  import "../Button/Button.js";
6
- import { C as j } from "../../Toggle-9cd68he4.js";
6
+ import { C as j } from "../../Toggle-D4VPm4X_.js";
7
7
  import "../Dialog/Backdrop.js";
8
8
  import "../Typography/Typography.js";
9
9
  import "../IconButton/IconButton.js";
@@ -11,7 +11,7 @@ import "../Select/Select.js";
11
11
  import "../Skeleton/Skeleton.js";
12
12
  import "../Table/Table.js";
13
13
  import "../Tabs/Tabs.js";
14
- import "../../Group-CS_qGuuW.js";
14
+ import "../../Group-Dj___O8t.js";
15
15
  import "../../contexts/SnackbarProvider/SnackbarProvider.js";
16
16
  import "../../Button-2b1peDFT.js";
17
17
  export {
@@ -11,6 +11,7 @@ declare const meta: {
11
11
  onClickRemove?: (() => void) | undefined;
12
12
  disabled?: boolean | undefined;
13
13
  className?: string | undefined;
14
+ 'className-skeleton'?: string | undefined;
14
15
  variant?: import('./Chip').Variant | undefined;
15
16
  'data-testid-skeleton'?: string | undefined;
16
17
  } & import('react').RefAttributes<unknown>>;
@@ -24,6 +25,7 @@ declare const meta: {
24
25
  onClickRemove?: (() => void) | undefined;
25
26
  disabled?: boolean | undefined;
26
27
  className?: string | undefined;
28
+ 'className-skeleton'?: string | undefined;
27
29
  variant?: import('./Chip').Variant | undefined;
28
30
  'data-testid-skeleton'?: string | undefined;
29
31
  ref?: import('react').LegacyRef<unknown> | undefined;
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../Icon/Icon.js";
4
- import { G as i } from "../../Group-CS_qGuuW.js";
4
+ import { G as i } from "../../Group-Dj___O8t.js";
5
5
  export {
6
6
  i as default
7
7
  };
@@ -2,14 +2,14 @@ import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../clsx-DB4S2d7J.js";
4
4
  import "../Button/Button.js";
5
- import { T } from "../../Toggle-9cd68he4.js";
5
+ import { T } from "../../Toggle-D4VPm4X_.js";
6
6
  import "../Dialog/Backdrop.js";
7
7
  import "../Typography/Typography.js";
8
8
  import "../IconButton/IconButton.js";
9
9
  import "../Select/Select.js";
10
10
  import "../Table/Table.js";
11
11
  import "../Tabs/Tabs.js";
12
- import "../../Group-CS_qGuuW.js";
12
+ import "../../Group-Dj___O8t.js";
13
13
  import "../../contexts/SnackbarProvider/SnackbarProvider.js";
14
14
  export {
15
15
  T as default
@@ -1,5 +1,5 @@
1
- import { T as e } from "../../Toggle-9cd68he4.js";
2
- import { G as p } from "../../Group-CS_qGuuW.js";
1
+ import { T as e } from "../../Toggle-D4VPm4X_.js";
2
+ import { G as p } from "../../Group-Dj___O8t.js";
3
3
  export {
4
4
  p as ToggleGroup,
5
5
  e as ToggleGroupItem
package/dist/main.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Advice as e } from "./components/Advice/Advice.js";
2
2
  import { Button as p } from "./components/Button/Button.js";
3
3
  import { Checkbox as f } from "./components/Checkbox/Checkbox.js";
4
- import { C as m, T as n } from "./Toggle-9cd68he4.js";
4
+ import { C as m, T as n } from "./Toggle-D4VPm4X_.js";
5
5
  import { Dialog as i } from "./components/Dialog/Dialog.js";
6
6
  import { FamilyAndIcons as s, Icon as c } from "./components/Icon/Icon.js";
7
7
  import { IconButton as S } from "./components/IconButton/IconButton.js";
@@ -19,7 +19,7 @@ import { TBody as N, THead as Q, Table as R, Td as U, Th as V, Tr as W } from ".
19
19
  import { Tabs as Y } from "./components/Tabs/Tabs.js";
20
20
  import { TextDisplay as _ } from "./components/TextDisplay/TextDisplay.js";
21
21
  import { Toggle as oo } from "./components/Toggle/Toggle.js";
22
- import { G as eo } from "./Group-CS_qGuuW.js";
22
+ import { G as eo } from "./Group-Dj___O8t.js";
23
23
  import { Tooltip as po } from "./components/Tooltip/Tooltip.js";
24
24
  import { Typography as fo } from "./components/Typography/Typography.js";
25
25
  import { SnackbarContext as mo, SnackbarProvider as no, useSnackbar as lo } from "./contexts/SnackbarProvider/SnackbarProvider.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pismo/marola",
3
3
  "description": "CDX tribe component library",
4
- "version": "0.0.1-alpha.26",
4
+ "version": "0.0.1-alpha.27",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -1,26 +0,0 @@
1
- import './assets/Group.css';
2
- import { jsxs as l, jsx as t } from "react/jsx-runtime";
3
- import { forwardRef as a } from "react";
4
- import { Icon as i } from "./components/Icon/Icon.js";
5
- const d = "_toggle__input_1hgsq_1", n = "_toggle__label_1hgsq_8", o = {
6
- toggle__input: d,
7
- toggle__label: n,
8
- "toggle__label--selected": "_toggle__label--selected_1hgsq_15",
9
- "toggle-group__fieldset": "_toggle-group__fieldset_1hgsq_20",
10
- "toggle-group__options": "_toggle-group__options_1hgsq_23",
11
- "toggle-group__error": "_toggle-group__error_1hgsq_27"
12
- }, h = a((e, r) => {
13
- const { children: s, legend: g, error: _ } = e;
14
- return /* @__PURE__ */ l("fieldset", { ref: r, "data-testid": e["data-testid"], className: o["toggle-group__fieldset"], children: [
15
- g && /* @__PURE__ */ t("legend", { "data-testid": `${e["data-testid"]}-legend`, children: g }),
16
- /* @__PURE__ */ t("div", { className: o["toggle-group__options"], children: s }),
17
- _ && /* @__PURE__ */ l("div", { className: o["toggle-group__error"], "data-testid": `${e["data-testid"]}-error`, children: [
18
- /* @__PURE__ */ t(i, { icon: "circle-exclamation", size: 24, color: "var(--alert)" }),
19
- _
20
- ] })
21
- ] });
22
- });
23
- export {
24
- h as G,
25
- o as s
26
- };
@@ -1,141 +0,0 @@
1
- import './assets/Toggle.css';
2
- import { jsx as r, jsxs as u } from "react/jsx-runtime";
3
- import { forwardRef as c, cloneElement as m } from "react";
4
- import { c as _ } from "./clsx-DB4S2d7J.js";
5
- import "./components/Button/Button.js";
6
- import { Icon as b } from "./components/Icon/Icon.js";
7
- import "./components/Dialog/Backdrop.js";
8
- import { Typography as j } from "./components/Typography/Typography.js";
9
- import "./components/IconButton/IconButton.js";
10
- import "./components/Select/Select.js";
11
- import { Skeleton as f } from "./components/Skeleton/Skeleton.js";
12
- import "./components/Table/Table.js";
13
- import "./components/Tabs/Tabs.js";
14
- import { s as d } from "./Group-CS_qGuuW.js";
15
- import "./contexts/SnackbarProvider/SnackbarProvider.js";
16
- import { B as k } from "./Button-2b1peDFT.js";
17
- const x = "_chip_1j9h1_60", C = "_chip__adornment_1j9h1_114", N = "_chip__remove_1j9h1_119", s = {
18
- "u-typography-h1": "_u-typography-h1_1j9h1_1",
19
- "u-typography-h2": "_u-typography-h2_1j9h1_8",
20
- "u-typography-h3": "_u-typography-h3_1j9h1_15",
21
- "u-typography-h4": "_u-typography-h4_1j9h1_22",
22
- "u-typography-h5": "_u-typography-h5_1j9h1_29",
23
- "u-typography-h6": "_u-typography-h6_1j9h1_36",
24
- "u-typography-base": "_u-typography-base_1j9h1_43",
25
- "u-typography-base--xxl": "_u-typography-base--xxl_1j9h1_48",
26
- "u-typography-base--xl": "_u-typography-base--xl_1j9h1_52",
27
- "u-typography-base--lg": "_u-typography-base--lg_1j9h1_56",
28
- "u-typography-base--sm": "_u-typography-base--sm_1j9h1_60",
29
- chip: x,
30
- "u-typography-base--bold": "_u-typography-base--bold_1j9h1_64",
31
- "u-typography-base--strikethrough": "_u-typography-base--strikethrough_1j9h1_67",
32
- "u-typography-base--underlined": "_u-typography-base--underlined_1j9h1_70",
33
- "u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1j9h1_73",
34
- "chip--button": "_chip--button_1j9h1_89",
35
- "chip--outlined": "_chip--outlined_1j9h1_102",
36
- "chip--contained": "_chip--contained_1j9h1_108",
37
- chip__adornment: C,
38
- chip__remove: N,
39
- "chip__remove--disabled": "_chip__remove--disabled_1j9h1_130"
40
- }, v = c((t, a) => {
41
- const { children: i, onClickContent: e, disabled: h, className: p, variant: l } = t;
42
- let o = _(
43
- s.chip,
44
- { [s["chip--outlined"]]: l === "outlined" },
45
- { [s["chip--contained"]]: l === "contained" },
46
- p
47
- );
48
- return e ? (o += ` ${s["chip--button"]}`, /* @__PURE__ */ r(
49
- k,
50
- {
51
- onClick: e,
52
- disabled: h,
53
- "data-testid": t["data-testid"],
54
- ref: a,
55
- className: o,
56
- children: i
57
- }
58
- )) : /* @__PURE__ */ r("span", { "data-testid": t["data-testid"], ref: a, className: o, children: i });
59
- }), T = (t) => {
60
- const { icon: a, disabled: i = !1, className: e } = t;
61
- if (a) {
62
- const h = _(s.chip__adornment, e), p = i ? m(a, { color: "rgb(var(--gray-95-rgb), 0.4)" }) : a;
63
- return /* @__PURE__ */ r("span", { className: h, children: p });
64
- }
65
- return null;
66
- }, G = c((t, a) => {
67
- const {
68
- label: i,
69
- className: e,
70
- onClickContent: h,
71
- leftAdornment: p,
72
- loading: l = !1,
73
- disabled: o = !1,
74
- variant: g = "default",
75
- onClickRemove: y
76
- } = t;
77
- return l ? /* @__PURE__ */ r(
78
- f,
79
- {
80
- style: { width: "6rem", height: "2rem", borderRadius: "4rem", display: "inline-flex" },
81
- "data-testid": t["data-testid-skeleton"]
82
- }
83
- ) : /* @__PURE__ */ u(
84
- v,
85
- {
86
- ref: a,
87
- "data-testid": t["data-testid"],
88
- onClickContent: h,
89
- disabled: o,
90
- className: e,
91
- variant: g,
92
- children: [
93
- p && /* @__PURE__ */ r(T, { ...p, disabled: o }),
94
- i,
95
- y && /* @__PURE__ */ r(
96
- "span",
97
- {
98
- className: _(s.chip__remove, { [s["chip__remove--disabled"]]: o }),
99
- role: "button",
100
- tabIndex: o ? -1 : 0,
101
- "aria-label": "remove",
102
- onClick: (n) => {
103
- n == null || n.stopPropagation(), n == null || n.nativeEvent.stopImmediatePropagation(), y();
104
- },
105
- "aria-disabled": o,
106
- children: /* @__PURE__ */ r(b, { icon: "circle-xmark", size: "1.125rem", color: "rgba(var(--gray-95-rgb), 0.45)" })
107
- }
108
- )
109
- ]
110
- }
111
- );
112
- }), H = c((t, a) => {
113
- const { text: i, isSelected: e = !1, value: h, onChange: p } = t;
114
- return /* @__PURE__ */ u(
115
- "label",
116
- {
117
- className: _([d.toggle__label], { [d["toggle__label--selected"]]: e }),
118
- "data-testid": t["data-testid"],
119
- children: [
120
- /* @__PURE__ */ r(
121
- "input",
122
- {
123
- className: _([d.toggle__input]),
124
- type: "radio",
125
- ref: a,
126
- value: h.toString(),
127
- onChange: () => p(h),
128
- role: "radio",
129
- checked: e,
130
- "aria-checked": e
131
- }
132
- ),
133
- /* @__PURE__ */ r(j, { bold: !0, children: i })
134
- ]
135
- }
136
- );
137
- });
138
- export {
139
- G as C,
140
- H as T
141
- };