@pismo/marola 1.0.0-beta.13 → 1.0.0-beta.15
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/dist/Toggle-BQPzu8NV.js +181 -0
- package/dist/assets/ResultWithChips.css +1 -0
- package/dist/assets/Table.css +1 -1
- package/dist/assets/Toggle2.css +1 -1
- package/dist/components/Chip/Chip.d.ts +4 -2
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/Chip/Chip.stories.d.ts +1 -13
- package/dist/components/EllipsisTooltip/EllipsisTooltip.js +30 -17
- package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -0
- package/dist/components/ResultWithChips/ResultWithChips.d.ts +12 -0
- package/dist/components/ResultWithChips/ResultWithChips.js +33 -0
- package/dist/components/RowItem/RowItem.js +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +3 -1
- package/dist/components/Skeleton/Skeleton.js +18 -12
- package/dist/components/Skeleton/SkeletonTable.stories.d.ts +1 -1
- package/dist/components/Table/Table.js +84 -84
- package/dist/components/ToggleGroup/Toggle.js +1 -1
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +3 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +59 -57
- package/package.json +2 -2
- package/dist/Toggle-uBAGft1J.js +0 -181
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import './assets/Toggle2.css';
|
|
2
|
+
import { jsx as i, jsxs as j } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as y } from "react";
|
|
4
|
+
import { c as r } from "./clsx-DB4S2d7J.js";
|
|
5
|
+
import { Icon as N } from "./components/Icon/Icon.js";
|
|
6
|
+
import { Typography as w } from "./components/Typography/Typography.js";
|
|
7
|
+
import "./components/Button/Button.js";
|
|
8
|
+
import { Adornment as C } from "./components/Adornment/Adornment.js";
|
|
9
|
+
import "./components/Dialog/Backdrop.js";
|
|
10
|
+
import "./components/IconButton/IconButton.js";
|
|
11
|
+
import "./components/Select/Select.js";
|
|
12
|
+
import "./components/Table/Table.js";
|
|
13
|
+
import "./components/Tabs/Tabs.js";
|
|
14
|
+
import { s as k } from "./Group-B3p31ftp.js";
|
|
15
|
+
import "./contexts/SnackbarProvider/SnackbarProvider.js";
|
|
16
|
+
import { Skeleton as f } from "./components/Skeleton/Skeleton.js";
|
|
17
|
+
import { B as x } from "./Button-DiLqcAJG.js";
|
|
18
|
+
const I = "_chip_k90cj_61", P = "_chip__adornment_k90cj_115", z = "_chip__remove_k90cj_120", n = {
|
|
19
|
+
"u-typography-h1": "_u-typography-h1_k90cj_1",
|
|
20
|
+
"u-typography-h2": "_u-typography-h2_k90cj_8",
|
|
21
|
+
"u-typography-h3": "_u-typography-h3_k90cj_15",
|
|
22
|
+
"u-typography-h4": "_u-typography-h4_k90cj_22",
|
|
23
|
+
"u-typography-h5": "_u-typography-h5_k90cj_29",
|
|
24
|
+
"u-typography-h6": "_u-typography-h6_k90cj_36",
|
|
25
|
+
"u-typography-base": "_u-typography-base_k90cj_43",
|
|
26
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_k90cj_49",
|
|
27
|
+
"u-typography-base--xl": "_u-typography-base--xl_k90cj_53",
|
|
28
|
+
"u-typography-base--lg": "_u-typography-base--lg_k90cj_57",
|
|
29
|
+
"u-typography-base--sm": "_u-typography-base--sm_k90cj_61",
|
|
30
|
+
chip: I,
|
|
31
|
+
"u-typography-base--bold": "_u-typography-base--bold_k90cj_65",
|
|
32
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_k90cj_68",
|
|
33
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_k90cj_71",
|
|
34
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_k90cj_74",
|
|
35
|
+
"chip--button": "_chip--button_k90cj_90",
|
|
36
|
+
"chip--outlined": "_chip--outlined_k90cj_103",
|
|
37
|
+
"chip--contained": "_chip--contained_k90cj_109",
|
|
38
|
+
chip__adornment: P,
|
|
39
|
+
chip__remove: z,
|
|
40
|
+
"chip__remove--disabled": "_chip__remove--disabled_k90cj_131",
|
|
41
|
+
"chip-loading": "_chip-loading_k90cj_135"
|
|
42
|
+
}, S = y((o, s) => {
|
|
43
|
+
const { children: _, onClickContent: t, disabled: c, className: a, variant: d } = o;
|
|
44
|
+
let e = r(
|
|
45
|
+
n.chip,
|
|
46
|
+
{ [n["chip--outlined"]]: d === "outlined" },
|
|
47
|
+
{ [n["chip--contained"]]: d === "contained" },
|
|
48
|
+
a
|
|
49
|
+
);
|
|
50
|
+
return t ? (e += ` ${n["chip--button"]}`, /* @__PURE__ */ i(
|
|
51
|
+
x,
|
|
52
|
+
{
|
|
53
|
+
onClick: t,
|
|
54
|
+
disabled: c,
|
|
55
|
+
"data-testid": o["data-testid"],
|
|
56
|
+
ref: s,
|
|
57
|
+
className: e,
|
|
58
|
+
children: _
|
|
59
|
+
}
|
|
60
|
+
)) : /* @__PURE__ */ i("span", { "data-testid": o["data-testid"], ref: s, className: e, children: _ });
|
|
61
|
+
}), M = y((o, s) => {
|
|
62
|
+
const {
|
|
63
|
+
label: _,
|
|
64
|
+
className: t,
|
|
65
|
+
onClickContent: c,
|
|
66
|
+
leftAdornment: a,
|
|
67
|
+
loading: d = !1,
|
|
68
|
+
disabled: e = !1,
|
|
69
|
+
variant: u = "default",
|
|
70
|
+
onClickRemove: m
|
|
71
|
+
} = o;
|
|
72
|
+
if (d)
|
|
73
|
+
return /* @__PURE__ */ i(
|
|
74
|
+
f,
|
|
75
|
+
{
|
|
76
|
+
className: r(n["chip-loading"], o["className-skeleton"]),
|
|
77
|
+
"data-testid": o["data-testid-skeleton"]
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
const g = r(a == null ? void 0 : a.className, n.chip__adornment), b = a != null && a.customIcon ? { ...a, className: g } : { ...a, disabled: e, className: g };
|
|
81
|
+
return /* @__PURE__ */ j(
|
|
82
|
+
S,
|
|
83
|
+
{
|
|
84
|
+
ref: s,
|
|
85
|
+
"data-testid": o["data-testid"],
|
|
86
|
+
onClickContent: c,
|
|
87
|
+
disabled: e,
|
|
88
|
+
className: t,
|
|
89
|
+
variant: u,
|
|
90
|
+
children: [
|
|
91
|
+
a && /* @__PURE__ */ i(C, { ...b }),
|
|
92
|
+
_,
|
|
93
|
+
m && /* @__PURE__ */ i(
|
|
94
|
+
"span",
|
|
95
|
+
{
|
|
96
|
+
className: r(n.chip__remove, { [n["chip__remove--disabled"]]: e }),
|
|
97
|
+
role: "button",
|
|
98
|
+
tabIndex: e ? -1 : 0,
|
|
99
|
+
"aria-label": "remove",
|
|
100
|
+
onClick: (l) => {
|
|
101
|
+
l == null || l.stopPropagation(), l == null || l.nativeEvent.stopImmediatePropagation(), m();
|
|
102
|
+
},
|
|
103
|
+
"aria-disabled": e,
|
|
104
|
+
children: /* @__PURE__ */ i(N, { icon: "circle-xmark", size: "1.125rem", color: "rgba(var(--gray-95-rgb), 0.45)" })
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
}), h = {
|
|
111
|
+
"row-item": "_row-item_8z1a0_1",
|
|
112
|
+
"row-item--clickable": "_row-item--clickable_8z1a0_13",
|
|
113
|
+
"row-item--disabled": "_row-item--disabled_8z1a0_19",
|
|
114
|
+
"row-item__content": "_row-item__content_8z1a0_22"
|
|
115
|
+
}, O = y((o, s) => {
|
|
116
|
+
const { children: _, leftAdornment: t, disabled: c, onClick: a, buttons: d, ariaLabel: e, className: u } = o, m = r(t == null ? void 0 : t.className, h["row-item__adornment"]), b = {
|
|
117
|
+
onClick: (p) => {
|
|
118
|
+
c || a && a(p);
|
|
119
|
+
},
|
|
120
|
+
tabIndex: 0,
|
|
121
|
+
"aria-label": e,
|
|
122
|
+
role: "button"
|
|
123
|
+
}, l = t != null && t.customIcon ? t : { size: "1rem", ...t };
|
|
124
|
+
return /* @__PURE__ */ j(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
"data-testid": o["data-testid"],
|
|
128
|
+
className: r(
|
|
129
|
+
h["row-item"],
|
|
130
|
+
a && h["row-item--clickable"],
|
|
131
|
+
a && c && h["row-item--disabled"],
|
|
132
|
+
u
|
|
133
|
+
),
|
|
134
|
+
...!!a && b,
|
|
135
|
+
ref: s,
|
|
136
|
+
children: [
|
|
137
|
+
t && /* @__PURE__ */ i(C, { ...l, className: m, disabled: c }),
|
|
138
|
+
/* @__PURE__ */ i("span", { className: r(h["row-item__content"]), children: _ }),
|
|
139
|
+
d && /* @__PURE__ */ i(
|
|
140
|
+
"div",
|
|
141
|
+
{
|
|
142
|
+
onClick: (p) => {
|
|
143
|
+
p == null || p.stopPropagation(), p == null || p.nativeEvent.stopImmediatePropagation();
|
|
144
|
+
},
|
|
145
|
+
children: d
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
}), Q = y((o, s) => {
|
|
152
|
+
const { text: _, isSelected: t = !1, value: c, onChange: a } = o;
|
|
153
|
+
return /* @__PURE__ */ j(
|
|
154
|
+
"label",
|
|
155
|
+
{
|
|
156
|
+
className: r([k.toggle__label], { [k["toggle__label--selected"]]: t }),
|
|
157
|
+
"data-testid": o["data-testid"],
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ i(
|
|
160
|
+
"input",
|
|
161
|
+
{
|
|
162
|
+
className: r([k.toggle__input]),
|
|
163
|
+
type: "radio",
|
|
164
|
+
ref: s,
|
|
165
|
+
value: c.toString(),
|
|
166
|
+
onChange: () => a(c),
|
|
167
|
+
role: "radio",
|
|
168
|
+
checked: t,
|
|
169
|
+
"aria-checked": t
|
|
170
|
+
}
|
|
171
|
+
),
|
|
172
|
+
/* @__PURE__ */ i(w, { bold: !0, children: _ })
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
});
|
|
177
|
+
export {
|
|
178
|
+
M as C,
|
|
179
|
+
O as R,
|
|
180
|
+
Q as T
|
|
181
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._container_hgp0p_1{position:relative;padding:1.5rem 1rem;background:var(--white-100);border:1px solid var(--gray-50);border-radius:.375rem}._container_hgp0p_1 ._chip-item-wrapper_hgp0p_8{display:flex;gap:.5rem}._container_hgp0p_1:not(first-child){min-height:4.125rem;padding:1rem;margin-top:1.5rem}._container_hgp0p_1 ._label_hgp0p_17{position:absolute;top:-1px;left:1.18rem;display:flex;align-items:center;justify-content:center;padding:0 .25rem;font-family:Lato;font-size:.6875rem;font-style:normal;font-weight:400;line-height:1rem;color:var(--gray-75);background:var(--white-100);transform:translateY(-50%)}._chips-container_hgp0p_35{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}._chip-content_hgp0p_42{display:block;font-family:Lato;font-size:.6875rem;font-style:normal;line-height:1rem;color:var(--gray-90)}._chip-label_hgp0p_51{font-weight:700}
|
package/dist/assets/Table.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._u-typography-
|
|
1
|
+
._u-typography-h1_pknqm_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_pknqm_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_pknqm_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_pknqm_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_pknqm_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_pknqm_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_pknqm_43,._table_pknqm_43 tbody{margin:0;font-size:var(--base-font-size);font-weight:var(--base-weight);line-height:var(--base-line-height)}._u-typography-base--xxl_pknqm_49{font-size:var(--base-font-size-xxl);line-height:var(--base-line-height-xxl)}._u-typography-base--xl_pknqm_53{font-size:var(--base-font-size-xl);line-height:var(--base-line-height-xl)}._u-typography-base--lg_pknqm_57{font-size:var(--base-font-size-lg);line-height:var(--base-line-height-lg)}._u-typography-base--sm_pknqm_61,._table_pknqm_43 thead{font-size:var(--base-font-size-sm);line-height:var(--base-line-height-sm)}._u-typography-base--bold_pknqm_65,._table_pknqm_43 thead{font-weight:var(--base-bold)}._u-typography-base--strikethrough_pknqm_68{text-decoration:line-through}._u-typography-base--underlined_pknqm_71{text-decoration:underline}._u-typography-base--strikethrough-underlined_pknqm_74{text-decoration:underline line-through}._table_pknqm_43{color:var(--secondary-orange);border-spacing:0;table-layout:fixed}._table--full-width_pknqm_83{width:100%}._table--white-theme_pknqm_86{background:var(--white-100)}._table--transparent-theme_pknqm_89{background:transparent}._table_pknqm_43 th._cell--left-alignment_pknqm_92,._table_pknqm_43 td._cell--left-alignment_pknqm_92{text-align:left}._table_pknqm_43 th._cell--center-alignment_pknqm_96,._table_pknqm_43 td._cell--center-alignment_pknqm_96{text-align:center}._table_pknqm_43 th._cell--right-alignment_pknqm_100,._table_pknqm_43 td._cell--right-alignment_pknqm_100{text-align:right}._table_pknqm_43 thead{color:var(--gray-90);text-transform:uppercase}._table_pknqm_43 thead tr th{--children-pv: 4px;--children-ph: 8px;align-items:center;padding:calc(1.5rem - var(--children-pv)) calc(.75rem - var(--children-ph));line-height:1rem;border-bottom:1px solid var(--gray-25)}._table_pknqm_43 thead tr th ._th__wrapper_pknqm_116{padding:var(--children-pv) var(--children-ph)}._table_pknqm_43 thead tr th ._th__wrapper--pressed_pknqm_119{background-color:var(--gray-10);border-radius:6px}._table_pknqm_43 thead tr th ._th__wrapper--clickable_pknqm_123{cursor:pointer}._table_pknqm_43 thead tr th ._th__wrapper_pknqm_116 ._th__sort-icon-container_pknqm_126{padding-left:4px}._table_pknqm_43 tbody{color:var(--gray-90)}._table_pknqm_43 tbody tr:hover:not(._tr__row-or-cell--disabled_pknqm_132){background-color:rgb(var(--gray-5-rgb),.5)}._table_pknqm_43 tbody ._tr_pknqm_132,._table_pknqm_43 tbody ._td_pknqm_136{padding:16px 12px;line-height:var(--body-line-height);border-bottom:1px solid var(--gray-10)}._table_pknqm_43 tbody ._tr__row-or-cell--clickable_pknqm_141,._table_pknqm_43 tbody ._td__row-or-cell--clickable_pknqm_142{cursor:pointer}._table_pknqm_43 tbody ._tr__row-or-cell--disabled_pknqm_132,._table_pknqm_43 tbody ._td__row-or-cell--disabled_pknqm_146{background:var(--cream);filter:grayscale(1)}._table_pknqm_43 tbody ._tr__row-or-cell--disabled_pknqm_132 ._td-wrapper_pknqm_150,._table_pknqm_43 tbody ._td__row-or-cell--disabled_pknqm_146 ._td-wrapper_pknqm_150{opacity:.25}
|
package/dist/assets/Toggle2.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._u-typography-
|
|
1
|
+
._u-typography-h1_k90cj_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_k90cj_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_k90cj_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_k90cj_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_k90cj_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_k90cj_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_k90cj_43{margin:0;font-size:var(--base-font-size);font-weight:var(--base-weight);line-height:var(--base-line-height)}._u-typography-base--xxl_k90cj_49{font-size:var(--base-font-size-xxl);line-height:var(--base-line-height-xxl)}._u-typography-base--xl_k90cj_53{font-size:var(--base-font-size-xl);line-height:var(--base-line-height-xl)}._u-typography-base--lg_k90cj_57{font-size:var(--base-font-size-lg);line-height:var(--base-line-height-lg)}._u-typography-base--sm_k90cj_61,._chip_k90cj_61{font-size:var(--base-font-size-sm);line-height:var(--base-line-height-sm)}._u-typography-base--bold_k90cj_65,._chip_k90cj_61{font-weight:var(--base-bold)}._u-typography-base--strikethrough_k90cj_68{text-decoration:line-through}._u-typography-base--underlined_k90cj_71{text-decoration:underline}._u-typography-base--strikethrough-underlined_k90cj_74{text-decoration:underline line-through}._chip_k90cj_61{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_k90cj_61:not(:disabled){color:rgb(var(--gray-95-rgb) .65)}._chip--button_k90cj_90{cursor:pointer;border-color:transparent}._chip--button_k90cj_90:disabled{cursor:initial}._chip--button_k90cj_90:focus-visible{outline:none}._chip--button_k90cj_90:focus{outline:2px solid var(--black-100)}._chip--outlined_k90cj_103{padding:.3125rem .5rem;background-color:var(--white-100);border:1px solid var(--border);border-radius:calc(var(--border-radius-soft) * 4)}._chip--contained_k90cj_109{padding:.3125rem .5rem;border:1px solid var(--border);border-color:var(--accent);border-radius:calc(var(--border-radius-soft) * 4)}._chip__adornment_k90cj_115{display:flex;align-items:center;margin-right:.5rem}._chip__remove_k90cj_120{display:flex;margin-left:.5rem}._chip__remove_k90cj_120:focus-visible{outline:none}._chip__remove_k90cj_120:focus:not(:disabled){border-radius:calc(var(--border-radius-soft) * 4);outline:2px solid var(--black-100)}._chip__remove--disabled_k90cj_131{cursor:default}._chip-loading_k90cj_135{display:inline-flex;min-width:6rem;height:2rem;border-radius:4rem}._row-item_8z1a0_1{display:flex;align-items:center;justify-content:space-between;padding:.5rem 1rem;border:1px solid var(--gray-10);border-radius:6px;outline:none}._row-item_8z1a0_1:focus-visible{outline:none}._row-item--clickable_8z1a0_13{cursor:pointer}._row-item--clickable_8z1a0_13:focus{outline:2px solid var(--black-100)}._row-item--disabled_8z1a0_19{cursor:not-allowed}._row-item__content_8z1a0_22{display:flex;flex-grow:1;align-items:center;justify-content:space-between;padding-right:1rem;padding-left:1rem;margin:0;text-align:center}._row-item__content_8z1a0_22:focus-visible{outline:none}._row-item__content_8z1a0_22:focus{outline:2px solid var(--black-100)}
|
|
@@ -2,7 +2,7 @@ import { AdornmentProps } from '../../main';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
export type Variant = 'default' | 'contained' | 'outlined';
|
|
5
|
-
type ChipProps = {
|
|
5
|
+
export type ChipProps = {
|
|
6
6
|
/** Main content to display, typically just some text */
|
|
7
7
|
label: ReactNode;
|
|
8
8
|
/** Whether to show loading state (skeleton) */
|
|
@@ -27,5 +27,7 @@ type ChipProps = {
|
|
|
27
27
|
/** Dataset test id only used for tests, used to hook onto the loading skeleton component for this chip */
|
|
28
28
|
'data-testid-skeleton'?: string;
|
|
29
29
|
};
|
|
30
|
+
export type ChipWrapperProps = Pick<ChipProps, 'data-testid' | 'onClickContent' | 'disabled' | 'className' | 'variant'> & {
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
};
|
|
30
33
|
export declare const Chip: import('react').ForwardRefExoticComponent<ChipProps & import('react').RefAttributes<unknown>>;
|
|
31
|
-
export {};
|
|
@@ -5,7 +5,7 @@ import "../Adornment/Adornment.js";
|
|
|
5
5
|
import "../Icon/Icon.js";
|
|
6
6
|
import "../Typography/Typography.js";
|
|
7
7
|
import "../Button/Button.js";
|
|
8
|
-
import { C as k } from "../../Toggle-
|
|
8
|
+
import { C as k } from "../../Toggle-BQPzu8NV.js";
|
|
9
9
|
import "../Dialog/Backdrop.js";
|
|
10
10
|
import "../IconButton/IconButton.js";
|
|
11
11
|
import "../Select/Select.js";
|
|
@@ -2,19 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: import('react').ForwardRefExoticComponent<
|
|
6
|
-
label: import('react').ReactNode;
|
|
7
|
-
loading?: boolean | undefined;
|
|
8
|
-
leftAdornment?: import('../Adornment/Adornment').AdornmentProps | undefined;
|
|
9
|
-
'data-testid'?: string | undefined;
|
|
10
|
-
onClickContent?: (() => void) | undefined;
|
|
11
|
-
onClickRemove?: (() => void) | undefined;
|
|
12
|
-
disabled?: boolean | undefined;
|
|
13
|
-
className?: string | undefined;
|
|
14
|
-
'className-skeleton'?: string | undefined;
|
|
15
|
-
variant?: import('./Chip').Variant | undefined;
|
|
16
|
-
'data-testid-skeleton'?: string | undefined;
|
|
17
|
-
} & import('react').RefAttributes<unknown>>;
|
|
5
|
+
component: import('react').ForwardRefExoticComponent<import('./Chip').ChipProps & import('react').RefAttributes<unknown>>;
|
|
18
6
|
tags: string[];
|
|
19
7
|
decorators: ((Story: import('@storybook/types').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
20
8
|
label: import('react').ReactNode;
|
|
@@ -1,23 +1,36 @@
|
|
|
1
1
|
import '../../assets/EllipsisTooltip.css';
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { c as
|
|
5
|
-
import { Tooltip as
|
|
6
|
-
const
|
|
2
|
+
import { jsx as o, jsxs as d, Fragment as f } from "react/jsx-runtime";
|
|
3
|
+
import { useState as g } from "react";
|
|
4
|
+
import { c as x } from "../../clsx-DB4S2d7J.js";
|
|
5
|
+
import { Tooltip as H } from "../Tooltip/Tooltip.js";
|
|
6
|
+
const T = {
|
|
7
7
|
"ellipsis-tooltip": "_ellipsis-tooltip_krf68_1"
|
|
8
|
-
},
|
|
9
|
-
lineClamp:
|
|
10
|
-
children:
|
|
11
|
-
className:
|
|
12
|
-
disableHoverListener:
|
|
13
|
-
...
|
|
8
|
+
}, W = ({
|
|
9
|
+
lineClamp: e = 1,
|
|
10
|
+
children: i,
|
|
11
|
+
className: r,
|
|
12
|
+
disableHoverListener: t,
|
|
13
|
+
...a
|
|
14
14
|
}) => {
|
|
15
|
-
const [
|
|
16
|
-
const m =
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
return /* @__PURE__ */
|
|
15
|
+
const [s, c] = g(!1), n = (l) => {
|
|
16
|
+
const m = l.scrollWidth > l.clientWidth, h = l.scrollHeight > l.clientHeight;
|
|
17
|
+
c(m || h);
|
|
18
|
+
}, p = typeof t == "boolean" ? t : !s;
|
|
19
|
+
return /* @__PURE__ */ o(
|
|
20
|
+
H,
|
|
21
|
+
{
|
|
22
|
+
className: x(r),
|
|
23
|
+
...a,
|
|
24
|
+
onTargetCreated: n,
|
|
25
|
+
disableHoverListener: p,
|
|
26
|
+
disablePortal: !1,
|
|
27
|
+
children: /* @__PURE__ */ d("span", { style: { "--line-clamp": e }, className: T["ellipsis-tooltip"], children: [
|
|
28
|
+
i,
|
|
29
|
+
s && /* @__PURE__ */ o(f, { children: " " })
|
|
30
|
+
] })
|
|
31
|
+
}
|
|
32
|
+
);
|
|
20
33
|
};
|
|
21
34
|
export {
|
|
22
|
-
|
|
35
|
+
W as EllipsisTooltip
|
|
23
36
|
};
|
|
@@ -19,6 +19,7 @@ declare const meta: {
|
|
|
19
19
|
position?: import('@floating-ui/utils').Placement | undefined;
|
|
20
20
|
padding?: "small" | "normal" | undefined;
|
|
21
21
|
theme?: "black" | "white" | undefined;
|
|
22
|
+
disablePortal?: boolean | undefined;
|
|
22
23
|
arialRole?: import('react').AriaRole | undefined;
|
|
23
24
|
disableHoverListener?: boolean | undefined;
|
|
24
25
|
lineClamp?: number | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChipProps } from '../Chip/Chip';
|
|
2
|
+
|
|
3
|
+
type ResultWithChipsProps = {
|
|
4
|
+
chips: Array<Partial<ChipProps> & {
|
|
5
|
+
joinLabel?: string | React.ReactNode;
|
|
6
|
+
key?: string;
|
|
7
|
+
}>;
|
|
8
|
+
title: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const ResultWithChips: ({ chips, title, className, ...rest }: ResultWithChipsProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export { ResultWithChips };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import '../../assets/ResultWithChips.css';
|
|
2
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { C as t } from "../../Toggle-BQPzu8NV.js";
|
|
4
|
+
const r = "_container_hgp0p_1", o = "_label_hgp0p_17", a = {
|
|
5
|
+
container: r,
|
|
6
|
+
"chip-item-wrapper": "_chip-item-wrapper_hgp0p_8",
|
|
7
|
+
label: o,
|
|
8
|
+
"chips-container": "_chips-container_hgp0p_35",
|
|
9
|
+
"chip-content": "_chip-content_hgp0p_42",
|
|
10
|
+
"chip-label": "_chip-label_hgp0p_51"
|
|
11
|
+
}, b = ({ chips: c, title: p, className: s, ...h }) => /* @__PURE__ */ i("div", { ...h, className: [a.container, s || ""].join(" ").trim(), children: [
|
|
12
|
+
/* @__PURE__ */ e("span", { className: a.label, children: p }),
|
|
13
|
+
/* @__PURE__ */ e("div", { className: a["chips-container"], "data-testid": "chips-container", children: c.map((l, n) => /* @__PURE__ */ i("span", { className: a["chip-item-wrapper"], children: [
|
|
14
|
+
/* @__PURE__ */ e(
|
|
15
|
+
t,
|
|
16
|
+
{
|
|
17
|
+
...l,
|
|
18
|
+
label: /* @__PURE__ */ e("span", { className: a["chip-content"], children: typeof l.label == "string" ? /* @__PURE__ */ e("strong", { className: a["chip-label"], children: l.label }) : l.label })
|
|
19
|
+
},
|
|
20
|
+
`chip-${n}`
|
|
21
|
+
),
|
|
22
|
+
l.joinLabel && n < c.length - 1 && /* @__PURE__ */ e(
|
|
23
|
+
t,
|
|
24
|
+
{
|
|
25
|
+
label: /* @__PURE__ */ e("span", { className: a["chip-content"], children: /* @__PURE__ */ e("strong", { className: a["chip-label"], children: l.joinLabel }) })
|
|
26
|
+
},
|
|
27
|
+
`join-${n}`
|
|
28
|
+
)
|
|
29
|
+
] }, `full-chip-${n}`)) })
|
|
30
|
+
] });
|
|
31
|
+
export {
|
|
32
|
+
b as ResultWithChips
|
|
33
|
+
};
|
|
@@ -5,7 +5,7 @@ import "../Adornment/Adornment.js";
|
|
|
5
5
|
import "../Icon/Icon.js";
|
|
6
6
|
import "../Typography/Typography.js";
|
|
7
7
|
import "../Button/Button.js";
|
|
8
|
-
import { R as I, R as b } from "../../Toggle-
|
|
8
|
+
import { R as I, R as b } from "../../Toggle-BQPzu8NV.js";
|
|
9
9
|
import "../Dialog/Backdrop.js";
|
|
10
10
|
import "../IconButton/IconButton.js";
|
|
11
11
|
import "../Select/Select.js";
|
|
@@ -20,6 +20,8 @@ export type SkeletonTableProps = SkeletonProps & {
|
|
|
20
20
|
rows?: number;
|
|
21
21
|
/** Controls if the with of the cells should be automatically defined */
|
|
22
22
|
autoWidth?: boolean;
|
|
23
|
+
/** Controls if show or not the skeleton of the table header */
|
|
24
|
+
showHeader?: boolean;
|
|
23
25
|
};
|
|
24
|
-
declare const SkeletonTable: ({ columns, rows, autoWidth, ...props }: SkeletonTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare const SkeletonTable: ({ columns, rows, autoWidth, showHeader, ...props }: SkeletonTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
27
|
export { Skeleton, SkeletonCircle, SkeletonTable };
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
import '../../assets/Skeleton.css';
|
|
2
|
-
import { jsx as t, jsxs as
|
|
2
|
+
import { jsx as t, jsxs as N } from "react/jsx-runtime";
|
|
3
3
|
import { c as r } from "../../clsx-DB4S2d7J.js";
|
|
4
|
-
const
|
|
5
|
-
skeleton:
|
|
4
|
+
const u = "_skeleton_dtmoz_1", b = "_skeletonLoading_dtmoz_1", o = {
|
|
5
|
+
skeleton: u,
|
|
6
6
|
skeletonLoading: b,
|
|
7
7
|
"skeleton--circle-type": "_skeleton--circle-type_dtmoz_13",
|
|
8
8
|
"skeleton--table-type": "_skeleton--table-type_dtmoz_17"
|
|
9
|
-
},
|
|
9
|
+
}, d = (e) => /* @__PURE__ */ t("div", { ...e, className: r(o.skeleton, e.className) }), C = ({ size: e = "4rem", ...l }) => {
|
|
10
10
|
const s = r(o.skeleton, o["skeleton--circle-type"], l.className);
|
|
11
11
|
return /* @__PURE__ */ t("div", { ...l, style: { width: e, height: e }, className: s });
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
}, m = (e = 30) => `${Math.floor(Math.random() * (100 - e + 1) + e)}%`, L = ({
|
|
13
|
+
columns: e = 5,
|
|
14
|
+
rows: l = 5,
|
|
15
|
+
autoWidth: s = !0,
|
|
16
|
+
showHeader: c = !0,
|
|
17
|
+
...a
|
|
18
|
+
}) => {
|
|
19
|
+
const k = r(o["skeleton--table-type"], a.className), i = `${100 / e}%`, h = c && /* @__PURE__ */ t("tr", { children: new Array(e).fill(null).map((_, n) => /* @__PURE__ */ t("th", { style: { width: i }, children: /* @__PURE__ */ t(d, { style: { width: s ? m(50) : "100%" } }) }, `row-columns-${n}`)) }), y = new Array(l).fill(null).map((_, n) => /* @__PURE__ */ t("tr", { children: new Array(e).fill(null).map((f, w) => /* @__PURE__ */ t("td", { style: { width: i }, children: /* @__PURE__ */ t(d, { style: { width: s ? m() : "100%" } }) }, `row-${n}-cell-${w}`)) }, `row-${n}`));
|
|
20
|
+
return /* @__PURE__ */ N("table", { ...a, className: k, children: [
|
|
21
|
+
c && /* @__PURE__ */ t("thead", { children: h }),
|
|
22
|
+
/* @__PURE__ */ t("tbody", { children: y })
|
|
17
23
|
] });
|
|
18
24
|
};
|
|
19
25
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
d as Skeleton,
|
|
27
|
+
C as SkeletonCircle,
|
|
28
|
+
L as SkeletonTable
|
|
23
29
|
};
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ columns, rows, autoWidth, ...props }: import('./Skeleton').SkeletonTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: ({ columns, rows, autoWidth, showHeader, ...props }: import('./Skeleton').SkeletonTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
tags: string[];
|
|
7
7
|
parameters: {
|
|
8
8
|
layout: string;
|
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
import '../../assets/Table.css';
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
2
|
+
import { jsxs as b, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import * as o from "react";
|
|
4
4
|
import { useState as w } from "react";
|
|
5
5
|
import { c as i } from "../../clsx-DB4S2d7J.js";
|
|
6
|
-
import { paginationDefaultTranslations as
|
|
7
|
-
import { sortTooltipDefaultTranslations as
|
|
8
|
-
import { TableProvider as
|
|
9
|
-
const
|
|
10
|
-
"u-typography-h1": "_u-typography-
|
|
11
|
-
"u-typography-h2": "_u-typography-
|
|
12
|
-
"u-typography-h3": "_u-typography-
|
|
13
|
-
"u-typography-h4": "_u-typography-
|
|
14
|
-
"u-typography-h5": "_u-typography-
|
|
15
|
-
"u-typography-h6": "_u-typography-
|
|
16
|
-
"u-typography-base": "_u-typography-
|
|
17
|
-
table:
|
|
18
|
-
"u-typography-base--xxl": "_u-typography-base--
|
|
19
|
-
"u-typography-base--xl": "_u-typography-base--
|
|
20
|
-
"u-typography-base--lg": "_u-typography-base--
|
|
21
|
-
"u-typography-base--sm": "_u-typography-base--
|
|
22
|
-
"u-typography-base--bold": "_u-typography-base--
|
|
23
|
-
"u-typography-base--strikethrough": "_u-typography-base--
|
|
24
|
-
"u-typography-base--underlined": "_u-typography-base--
|
|
25
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-
|
|
26
|
-
"table--full-width": "_table--full-
|
|
27
|
-
"table--white-theme": "_table--white-
|
|
28
|
-
"table--transparent-theme": "_table--transparent-
|
|
29
|
-
"cell--left-alignment": "_cell--left-
|
|
30
|
-
"cell--center-alignment": "_cell--center-
|
|
31
|
-
"cell--right-alignment": "_cell--right-
|
|
32
|
-
th__wrapper:
|
|
33
|
-
"th__wrapper--pressed": "_th__wrapper--
|
|
34
|
-
"th__wrapper--clickable": "_th__wrapper--
|
|
35
|
-
"th__sort-icon-container": "_th__sort-icon-
|
|
36
|
-
"tr__row-or-cell--disabled": "_tr__row-or-cell--
|
|
37
|
-
tr:
|
|
38
|
-
td:
|
|
39
|
-
"tr__row-or-cell--clickable": "_tr__row-or-cell--
|
|
40
|
-
"td__row-or-cell--clickable": "_td__row-or-cell--
|
|
41
|
-
"td__row-or-cell--disabled": "_td__row-or-cell--
|
|
42
|
-
"td-wrapper": "_td-
|
|
6
|
+
import { paginationDefaultTranslations as y, Pagination as k } from "../Pagination/Pagination.js";
|
|
7
|
+
import { sortTooltipDefaultTranslations as u, SortTooltip as T } from "../SortTooltip/SortTooltip.js";
|
|
8
|
+
import { TableProvider as q, useTable as f } from "./TableContext.js";
|
|
9
|
+
const N = (a) => /* @__PURE__ */ o.createElement("svg", { width: 7, height: 10, viewBox: "0 0 7 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...a }, /* @__PURE__ */ o.createElement("g", { clipPath: "url(#clip0_2291_2457)" }, /* @__PURE__ */ o.createElement("path", { d: "M6.41658 3.93794C6.26731 3.93794 6.11798 3.88301 6.00423 3.77314L3.49991 1.35923L0.995768 3.77271C0.767904 3.99243 0.398763 3.99243 0.170898 3.77271C-0.0569661 3.55298 -0.0569661 3.19702 0.170898 2.97729L3.08756 0.164795C3.31543 -0.0549316 3.68457 -0.0549316 3.91243 0.164795L6.8291 2.97729C7.05697 3.19702 7.05697 3.55298 6.8291 3.77271C6.71553 3.88345 6.56605 3.93794 6.41658 3.93794Z", fill: "#1897F3" }), /* @__PURE__ */ o.createElement("path", { opacity: 0.4, d: "M6.41663 5.38022C6.26737 5.38022 6.11804 5.43516 6.00429 5.54502L3.49997 7.95894L0.99528 5.5437C0.767415 5.32397 0.398275 5.32397 0.17041 5.5437C-0.0574544 5.76343 -0.0574544 6.11938 0.17041 6.33911L3.08708 9.15161C3.31494 9.37134 3.68408 9.37134 3.91195 9.15161L6.82861 6.33911C7.05648 6.11938 7.05648 5.76343 6.82861 5.5437C6.71559 5.43472 6.56611 5.38022 6.41663 5.38022Z", fill: "#1897F3" })), /* @__PURE__ */ o.createElement("defs", null, /* @__PURE__ */ o.createElement("clipPath", { id: "clip0_2291_2457" }, /* @__PURE__ */ o.createElement("rect", { width: 7, height: 10, fill: "white" })))), x = "_table_pknqm_43", C = "_th__wrapper_pknqm_116", L = "_tr_pknqm_132", E = "_td_pknqm_136", t = {
|
|
10
|
+
"u-typography-h1": "_u-typography-h1_pknqm_1",
|
|
11
|
+
"u-typography-h2": "_u-typography-h2_pknqm_8",
|
|
12
|
+
"u-typography-h3": "_u-typography-h3_pknqm_15",
|
|
13
|
+
"u-typography-h4": "_u-typography-h4_pknqm_22",
|
|
14
|
+
"u-typography-h5": "_u-typography-h5_pknqm_29",
|
|
15
|
+
"u-typography-h6": "_u-typography-h6_pknqm_36",
|
|
16
|
+
"u-typography-base": "_u-typography-base_pknqm_43",
|
|
17
|
+
table: x,
|
|
18
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_pknqm_49",
|
|
19
|
+
"u-typography-base--xl": "_u-typography-base--xl_pknqm_53",
|
|
20
|
+
"u-typography-base--lg": "_u-typography-base--lg_pknqm_57",
|
|
21
|
+
"u-typography-base--sm": "_u-typography-base--sm_pknqm_61",
|
|
22
|
+
"u-typography-base--bold": "_u-typography-base--bold_pknqm_65",
|
|
23
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_pknqm_68",
|
|
24
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_pknqm_71",
|
|
25
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_pknqm_74",
|
|
26
|
+
"table--full-width": "_table--full-width_pknqm_83",
|
|
27
|
+
"table--white-theme": "_table--white-theme_pknqm_86",
|
|
28
|
+
"table--transparent-theme": "_table--transparent-theme_pknqm_89",
|
|
29
|
+
"cell--left-alignment": "_cell--left-alignment_pknqm_92",
|
|
30
|
+
"cell--center-alignment": "_cell--center-alignment_pknqm_96",
|
|
31
|
+
"cell--right-alignment": "_cell--right-alignment_pknqm_100",
|
|
32
|
+
th__wrapper: C,
|
|
33
|
+
"th__wrapper--pressed": "_th__wrapper--pressed_pknqm_119",
|
|
34
|
+
"th__wrapper--clickable": "_th__wrapper--clickable_pknqm_123",
|
|
35
|
+
"th__sort-icon-container": "_th__sort-icon-container_pknqm_126",
|
|
36
|
+
"tr__row-or-cell--disabled": "_tr__row-or-cell--disabled_pknqm_132",
|
|
37
|
+
tr: L,
|
|
38
|
+
td: E,
|
|
39
|
+
"tr__row-or-cell--clickable": "_tr__row-or-cell--clickable_pknqm_141",
|
|
40
|
+
"td__row-or-cell--clickable": "_td__row-or-cell--clickable_pknqm_142",
|
|
41
|
+
"td__row-or-cell--disabled": "_td__row-or-cell--disabled_pknqm_146",
|
|
42
|
+
"td-wrapper": "_td-wrapper_pknqm_150"
|
|
43
43
|
}, v = {
|
|
44
44
|
pt: {
|
|
45
|
-
...
|
|
46
|
-
...
|
|
45
|
+
...y.pt,
|
|
46
|
+
...u.pt
|
|
47
47
|
},
|
|
48
48
|
en: {
|
|
49
|
-
...
|
|
50
|
-
...
|
|
49
|
+
...y.en,
|
|
50
|
+
...u.en
|
|
51
51
|
},
|
|
52
52
|
// example to add a new language translation
|
|
53
53
|
es: {
|
|
@@ -59,78 +59,78 @@ const x = (a) => /* @__PURE__ */ c.createElement("svg", { width: 7, height: 10,
|
|
|
59
59
|
of: "de",
|
|
60
60
|
results: "resultados"
|
|
61
61
|
}
|
|
62
|
-
},
|
|
62
|
+
}, p = ({
|
|
63
63
|
children: a,
|
|
64
64
|
theme: e = "white",
|
|
65
65
|
fullWidth: l = !0,
|
|
66
|
-
className:
|
|
67
|
-
paginationProps:
|
|
68
|
-
language:
|
|
69
|
-
translations:
|
|
66
|
+
className: s,
|
|
67
|
+
paginationProps: _,
|
|
68
|
+
language: n,
|
|
69
|
+
translations: h,
|
|
70
70
|
...d
|
|
71
71
|
}) => {
|
|
72
|
-
const
|
|
72
|
+
const c = i(
|
|
73
73
|
t.table,
|
|
74
74
|
l ? t["table--full-width"] : "",
|
|
75
75
|
t[`table--${e}-theme`],
|
|
76
|
-
|
|
77
|
-
),
|
|
78
|
-
return /* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */ r("table", { ...d, className:
|
|
80
|
-
|
|
76
|
+
s
|
|
77
|
+
), m = n && v[n] || h;
|
|
78
|
+
return /* @__PURE__ */ b(q, { initialTranslations: m, children: [
|
|
79
|
+
/* @__PURE__ */ r("table", { ...d, className: c, children: a }),
|
|
80
|
+
_ && /* @__PURE__ */ r(k, { ..._, t: m })
|
|
81
81
|
] });
|
|
82
|
-
}, B = ({ children: a, ...e }) => /* @__PURE__ */ r("thead", { ...e, children: a }), H = ({ children: a, ...e }) => /* @__PURE__ */ r("tbody", { ...e, children: a }), P = ({ children: a, onClick: e, disabled: l, className:
|
|
83
|
-
const
|
|
82
|
+
}, B = ({ children: a, ...e }) => /* @__PURE__ */ r("thead", { ...e, children: a }), H = ({ children: a, ...e }) => /* @__PURE__ */ r("tbody", { ...e, children: a }), P = ({ children: a, onClick: e, disabled: l, className: s, ..._ }) => {
|
|
83
|
+
const n = i(
|
|
84
84
|
t.tr,
|
|
85
85
|
e && !l ? t["tr__row-or-cell--clickable"] : l ? t["tr__row-or-cell--disabled"] : "",
|
|
86
|
-
|
|
86
|
+
s
|
|
87
87
|
);
|
|
88
|
-
return /* @__PURE__ */ r("tr", { ...
|
|
89
|
-
}, D = ({ children: a, onClick: e, disabled: l, className:
|
|
90
|
-
const
|
|
88
|
+
return /* @__PURE__ */ r("tr", { ..._, className: n, onClick: () => !l && (e == null ? void 0 : e()), children: a });
|
|
89
|
+
}, D = ({ children: a, onClick: e, disabled: l, className: s, align: _ = "left", ...n }) => {
|
|
90
|
+
const h = i(
|
|
91
91
|
t.td,
|
|
92
92
|
e && !l ? t["td__row-or-cell--clickable"] : l ? t["td__row-or-cell--disabled"] : "",
|
|
93
|
-
t[`cell--${
|
|
94
|
-
|
|
93
|
+
t[`cell--${_}-alignment`],
|
|
94
|
+
s
|
|
95
95
|
);
|
|
96
|
-
return /* @__PURE__ */ r("td", { ...
|
|
97
|
-
}, M = ({ children: a, onSort: e, sortType: l, className:
|
|
98
|
-
const { translations: d } =
|
|
96
|
+
return /* @__PURE__ */ r("td", { ...n, className: h, onClick: () => !l && (e == null ? void 0 : e()), children: /* @__PURE__ */ r("span", { className: t["td-wrapper"], children: a }) });
|
|
97
|
+
}, M = ({ children: a, onSort: e, sortType: l, className: s, classNameTooltip: _, align: n = "left", ...h }) => {
|
|
98
|
+
const { translations: d } = f(), [c, m] = w(!1), g = i(
|
|
99
99
|
t.th__wrapper,
|
|
100
|
-
|
|
100
|
+
c ? t["th__wrapper--pressed"] : "",
|
|
101
101
|
e ? t["th__wrapper--clickable"] : "",
|
|
102
|
-
|
|
102
|
+
s
|
|
103
103
|
);
|
|
104
|
-
return /* @__PURE__ */ r("th", { ...
|
|
105
|
-
|
|
104
|
+
return /* @__PURE__ */ r("th", { ...h, className: t[`cell--${n}-alignment`], children: /* @__PURE__ */ r("span", { className: g, onClick: e && (() => m(!c)), children: e ? /* @__PURE__ */ b(
|
|
105
|
+
T,
|
|
106
106
|
{
|
|
107
|
-
onClose: () =>
|
|
107
|
+
onClose: () => m(!1),
|
|
108
108
|
onSort: e,
|
|
109
|
-
show:
|
|
109
|
+
show: c,
|
|
110
110
|
sortType: l,
|
|
111
|
-
className:
|
|
111
|
+
className: _,
|
|
112
112
|
t: d,
|
|
113
113
|
children: [
|
|
114
114
|
/* @__PURE__ */ r("span", { children: a }),
|
|
115
|
-
/* @__PURE__ */ r("span", { className: t["th__sort-icon-container"], children: /* @__PURE__ */ r(
|
|
115
|
+
/* @__PURE__ */ r("span", { className: t["th__sort-icon-container"], children: /* @__PURE__ */ r(N, {}) })
|
|
116
116
|
]
|
|
117
117
|
}
|
|
118
118
|
) : /* @__PURE__ */ r("span", { children: a }) }) });
|
|
119
119
|
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
120
|
+
p.THead = B;
|
|
121
|
+
p.THead.displayName = "Table.THead";
|
|
122
|
+
p.TBody = H;
|
|
123
|
+
p.TBody.displayName = "Table.TBody";
|
|
124
|
+
p.Tr = P;
|
|
125
|
+
p.Tr.displayName = "Table.Tr";
|
|
126
|
+
p.Td = D;
|
|
127
|
+
p.Td.displayName = "Table.Td";
|
|
128
|
+
p.Th = M;
|
|
129
|
+
p.Th.displayName = "Table.Th";
|
|
130
130
|
export {
|
|
131
131
|
H as TBody,
|
|
132
132
|
B as THead,
|
|
133
|
-
|
|
133
|
+
p as Table,
|
|
134
134
|
D as Td,
|
|
135
135
|
M as Th,
|
|
136
136
|
P as Tr
|
|
@@ -4,7 +4,7 @@ import "../../clsx-DB4S2d7J.js";
|
|
|
4
4
|
import "../Icon/Icon.js";
|
|
5
5
|
import "../Typography/Typography.js";
|
|
6
6
|
import "../Button/Button.js";
|
|
7
|
-
import { T as b } from "../../Toggle-
|
|
7
|
+
import { T as b } from "../../Toggle-BQPzu8NV.js";
|
|
8
8
|
import "../Dialog/Backdrop.js";
|
|
9
9
|
import "../IconButton/IconButton.js";
|
|
10
10
|
import "../Select/Select.js";
|
|
@@ -14,7 +14,7 @@ export type TooltipProps = {
|
|
|
14
14
|
onClose?: () => void;
|
|
15
15
|
/** The color of the tooltip */
|
|
16
16
|
theme?: 'white' | 'black';
|
|
17
|
-
/**
|
|
17
|
+
/** The padding applied to the tooltip */
|
|
18
18
|
padding?: 'small' | 'normal';
|
|
19
19
|
/** The Position where the tooltip will be display relative to the anchor element */
|
|
20
20
|
position?: PopupPlacement;
|
|
@@ -28,6 +28,8 @@ export type TooltipProps = {
|
|
|
28
28
|
'data-testid'?: string;
|
|
29
29
|
/** Function thats return the HTML Element of target. Important to EllipsisTooltip knows if the node needs or not the ellipsis */
|
|
30
30
|
onTargetCreated?: (e: HTMLElement) => void;
|
|
31
|
+
/** Disable uses portal (true by default) */
|
|
32
|
+
disablePortal?: boolean;
|
|
31
33
|
};
|
|
32
34
|
declare const Tooltip: ({ arialRole, children: childrenProp, className, disableHoverListener, onClose, padding, position, open: openProp, theme, title, onTargetCreated, ...rest }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
35
|
export { Tooltip };
|
|
@@ -22,6 +22,7 @@ declare const meta: {
|
|
|
22
22
|
style?: import('react').CSSProperties | undefined;
|
|
23
23
|
'data-testid'?: string | undefined;
|
|
24
24
|
onTargetCreated?: ((e: HTMLElement) => void) | undefined;
|
|
25
|
+
disablePortal?: boolean | undefined;
|
|
25
26
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
26
27
|
};
|
|
27
28
|
export default meta;
|
package/dist/main.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from './components/InputSearch/InputSearch';
|
|
|
17
17
|
export * from './components/LoadingSpinner/LoadingSpinner';
|
|
18
18
|
export * from './components/PageHeader/PageHeader';
|
|
19
19
|
export * from './components/Pagination/Pagination';
|
|
20
|
+
export * from './components/ResultWithChips/ResultWithChips';
|
|
20
21
|
export * from './components/RowItem/RowItem';
|
|
21
22
|
export * from './components/Select/Select';
|
|
22
23
|
export * from './components/Skeleton/Skeleton';
|
package/dist/main.js
CHANGED
|
@@ -3,83 +3,85 @@ import { Advice as p } from "./components/Advice/Advice.js";
|
|
|
3
3
|
import { Autocomplete as f } from "./components/Autocomplete/Autocomplete.js";
|
|
4
4
|
import { Button as x } from "./components/Button/Button.js";
|
|
5
5
|
import { Checkbox as l } from "./components/Checkbox/Checkbox.js";
|
|
6
|
-
import { C as T, R as s, T as c } from "./Toggle-
|
|
7
|
-
import { Dialog as
|
|
6
|
+
import { C as T, R as s, T as c } from "./Toggle-BQPzu8NV.js";
|
|
7
|
+
import { Dialog as u } from "./components/Dialog/Dialog.js";
|
|
8
8
|
import { EllipsisTooltip as d } from "./components/EllipsisTooltip/EllipsisTooltip.js";
|
|
9
9
|
import { Icon as k } from "./components/Icon/Icon.js";
|
|
10
|
-
import { IconButton as
|
|
10
|
+
import { IconButton as C } from "./components/IconButton/IconButton.js";
|
|
11
11
|
import { Input as D } from "./components/Input/Input.js";
|
|
12
12
|
import { InputSearch as A } from "./components/InputSearch/InputSearch.js";
|
|
13
13
|
import { LoadingSpinner as v } from "./components/LoadingSpinner/LoadingSpinner.js";
|
|
14
14
|
import { PageHeader as G } from "./components/PageHeader/PageHeader.js";
|
|
15
|
-
import { Pagination as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import { default as Do } from "./components/Dialog/
|
|
32
|
-
import { default as Ao } from "./components/Dialog/
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
15
|
+
import { Pagination as H, paginationDefaultTranslations as w } from "./components/Pagination/Pagination.js";
|
|
16
|
+
import { ResultWithChips as L } from "./components/ResultWithChips/ResultWithChips.js";
|
|
17
|
+
import { Select as O, SelectOption as W } from "./components/Select/Select.js";
|
|
18
|
+
import { Skeleton as q, SkeletonCircle as z, SkeletonTable as F } from "./components/Skeleton/Skeleton.js";
|
|
19
|
+
import { Snackbar as K } from "./components/Snackbar/Snackbar.js";
|
|
20
|
+
import { SortTooltip as Q, sortTooltipDefaultTranslations as U } from "./components/SortTooltip/SortTooltip.js";
|
|
21
|
+
import { Stepper as X } from "./components/Stepper/Stepper.js";
|
|
22
|
+
import { StepperNavigator as Z } from "./components/StepperNavigator/StepperNavigator.js";
|
|
23
|
+
import { TBody as $, THead as oo, Table as ro, Td as eo, Th as to, Tr as po } from "./components/Table/Table.js";
|
|
24
|
+
import { Tabs as fo } from "./components/Tabs/Tabs.js";
|
|
25
|
+
import { TextDisplay as xo } from "./components/TextDisplay/TextDisplay.js";
|
|
26
|
+
import { Toggle as lo } from "./components/Toggle/Toggle.js";
|
|
27
|
+
import { G as To } from "./Group-B3p31ftp.js";
|
|
28
|
+
import { Tooltip as co } from "./components/Tooltip/Tooltip.js";
|
|
29
|
+
import { Text as uo, Typography as So } from "./components/Typography/Typography.js";
|
|
30
|
+
import { SnackbarContext as ko, SnackbarProvider as ho, useSnackbar as Co } from "./contexts/SnackbarProvider/SnackbarProvider.js";
|
|
31
|
+
import { default as Do } from "./components/Dialog/DialogTitle.js";
|
|
32
|
+
import { default as Ao } from "./components/Dialog/Content.js";
|
|
33
|
+
import { default as vo } from "./components/Dialog/Actions.js";
|
|
34
|
+
import { Tab as Go } from "./components/Tabs/Tab.js";
|
|
35
|
+
import { TabPanel as Ho } from "./components/Tabs/TabPanel.js";
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
vo as Actions,
|
|
37
38
|
e as Adornment,
|
|
38
39
|
p as Advice,
|
|
39
40
|
f as Autocomplete,
|
|
40
41
|
x as Button,
|
|
41
42
|
l as Checkbox,
|
|
42
43
|
T as Chip,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
Ao as Content,
|
|
45
|
+
u as Dialog,
|
|
46
|
+
Do as DialogTitle,
|
|
46
47
|
d as EllipsisTooltip,
|
|
47
48
|
k as Icon,
|
|
48
|
-
|
|
49
|
+
C as IconButton,
|
|
49
50
|
D as Input,
|
|
50
51
|
A as InputSearch,
|
|
51
52
|
v as LoadingSpinner,
|
|
52
53
|
G as PageHeader,
|
|
53
|
-
|
|
54
|
+
H as Pagination,
|
|
55
|
+
L as ResultWithChips,
|
|
54
56
|
s as RowItem,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
57
|
+
O as Select,
|
|
58
|
+
W as SelectOption,
|
|
59
|
+
q as Skeleton,
|
|
60
|
+
z as SkeletonCircle,
|
|
61
|
+
F as SkeletonTable,
|
|
62
|
+
K as Snackbar,
|
|
63
|
+
ko as SnackbarContext,
|
|
64
|
+
ho as SnackbarProvider,
|
|
65
|
+
Q as SortTooltip,
|
|
66
|
+
X as Stepper,
|
|
67
|
+
Z as StepperNavigator,
|
|
68
|
+
$ as TBody,
|
|
69
|
+
oo as THead,
|
|
70
|
+
Go as Tab,
|
|
71
|
+
Ho as TabPanel,
|
|
72
|
+
ro as Table,
|
|
73
|
+
fo as Tabs,
|
|
74
|
+
eo as Td,
|
|
75
|
+
uo as Text,
|
|
76
|
+
xo as TextDisplay,
|
|
77
|
+
to as Th,
|
|
78
|
+
lo as Toggle,
|
|
79
|
+
To as ToggleGroup,
|
|
78
80
|
c as ToggleGroupItem,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
co as Tooltip,
|
|
82
|
+
po as Tr,
|
|
83
|
+
So as Typography,
|
|
82
84
|
w as paginationDefaultTranslations,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
U as sortTooltipDefaultTranslations,
|
|
86
|
+
Co as useSnackbar
|
|
85
87
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pismo/marola",
|
|
3
3
|
"description": "CDX tribe component library",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.15",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"types": "dist/main.d.ts",
|
|
@@ -96,4 +96,4 @@
|
|
|
96
96
|
"@mui/base": "^5.0.0-beta.40",
|
|
97
97
|
"@mui/material": "^5.15.15"
|
|
98
98
|
}
|
|
99
|
-
}
|
|
99
|
+
}
|
package/dist/Toggle-uBAGft1J.js
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import './assets/Toggle2.css';
|
|
2
|
-
import { jsx as e, jsxs as q } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as y } from "react";
|
|
4
|
-
import { c as s } from "./clsx-DB4S2d7J.js";
|
|
5
|
-
import { Icon as N } from "./components/Icon/Icon.js";
|
|
6
|
-
import { Typography as w } from "./components/Typography/Typography.js";
|
|
7
|
-
import "./components/Button/Button.js";
|
|
8
|
-
import { Adornment as C } from "./components/Adornment/Adornment.js";
|
|
9
|
-
import "./components/Dialog/Backdrop.js";
|
|
10
|
-
import "./components/IconButton/IconButton.js";
|
|
11
|
-
import "./components/Select/Select.js";
|
|
12
|
-
import "./components/Table/Table.js";
|
|
13
|
-
import "./components/Tabs/Tabs.js";
|
|
14
|
-
import { s as k } from "./Group-B3p31ftp.js";
|
|
15
|
-
import "./contexts/SnackbarProvider/SnackbarProvider.js";
|
|
16
|
-
import { Skeleton as f } from "./components/Skeleton/Skeleton.js";
|
|
17
|
-
import { B as x } from "./Button-DiLqcAJG.js";
|
|
18
|
-
const I = "_chip_1qd8i_61", P = "_chip__adornment_1qd8i_115", z = "_chip__remove_1qd8i_120", p = {
|
|
19
|
-
"u-typography-h1": "_u-typography-h1_1qd8i_1",
|
|
20
|
-
"u-typography-h2": "_u-typography-h2_1qd8i_8",
|
|
21
|
-
"u-typography-h3": "_u-typography-h3_1qd8i_15",
|
|
22
|
-
"u-typography-h4": "_u-typography-h4_1qd8i_22",
|
|
23
|
-
"u-typography-h5": "_u-typography-h5_1qd8i_29",
|
|
24
|
-
"u-typography-h6": "_u-typography-h6_1qd8i_36",
|
|
25
|
-
"u-typography-base": "_u-typography-base_1qd8i_43",
|
|
26
|
-
"u-typography-base--xxl": "_u-typography-base--xxl_1qd8i_49",
|
|
27
|
-
"u-typography-base--xl": "_u-typography-base--xl_1qd8i_53",
|
|
28
|
-
"u-typography-base--lg": "_u-typography-base--lg_1qd8i_57",
|
|
29
|
-
"u-typography-base--sm": "_u-typography-base--sm_1qd8i_61",
|
|
30
|
-
chip: I,
|
|
31
|
-
"u-typography-base--bold": "_u-typography-base--bold_1qd8i_65",
|
|
32
|
-
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1qd8i_68",
|
|
33
|
-
"u-typography-base--underlined": "_u-typography-base--underlined_1qd8i_71",
|
|
34
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1qd8i_74",
|
|
35
|
-
"chip--button": "_chip--button_1qd8i_90",
|
|
36
|
-
"chip--outlined": "_chip--outlined_1qd8i_103",
|
|
37
|
-
"chip--contained": "_chip--contained_1qd8i_109",
|
|
38
|
-
chip__adornment: P,
|
|
39
|
-
chip__remove: z,
|
|
40
|
-
"chip__remove--disabled": "_chip__remove--disabled_1qd8i_131",
|
|
41
|
-
"chip-loading": "_chip-loading_1qd8i_135"
|
|
42
|
-
}, S = y((i, c) => {
|
|
43
|
-
const { children: _, onClickContent: t, disabled: r, className: a, variant: n } = i;
|
|
44
|
-
let o = s(
|
|
45
|
-
p.chip,
|
|
46
|
-
{ [p["chip--outlined"]]: n === "outlined" },
|
|
47
|
-
{ [p["chip--contained"]]: n === "contained" },
|
|
48
|
-
a
|
|
49
|
-
);
|
|
50
|
-
return t ? (o += ` ${p["chip--button"]}`, /* @__PURE__ */ e(
|
|
51
|
-
x,
|
|
52
|
-
{
|
|
53
|
-
onClick: t,
|
|
54
|
-
disabled: r,
|
|
55
|
-
"data-testid": i["data-testid"],
|
|
56
|
-
ref: c,
|
|
57
|
-
className: o,
|
|
58
|
-
children: _
|
|
59
|
-
}
|
|
60
|
-
)) : /* @__PURE__ */ e("span", { "data-testid": i["data-testid"], ref: c, className: o, children: _ });
|
|
61
|
-
}), M = y((i, c) => {
|
|
62
|
-
const {
|
|
63
|
-
label: _,
|
|
64
|
-
className: t,
|
|
65
|
-
onClickContent: r,
|
|
66
|
-
leftAdornment: a,
|
|
67
|
-
loading: n = !1,
|
|
68
|
-
disabled: o = !1,
|
|
69
|
-
variant: u = "default",
|
|
70
|
-
onClickRemove: m
|
|
71
|
-
} = i;
|
|
72
|
-
if (n)
|
|
73
|
-
return /* @__PURE__ */ e(
|
|
74
|
-
f,
|
|
75
|
-
{
|
|
76
|
-
className: s(p["chip-loading"], i["className-skeleton"]),
|
|
77
|
-
"data-testid": i["data-testid-skeleton"]
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
const g = s(a == null ? void 0 : a.className, p.chip__adornment), b = a != null && a.customIcon ? { ...a, className: g } : { ...a, disabled: o, className: g };
|
|
81
|
-
return /* @__PURE__ */ q(
|
|
82
|
-
S,
|
|
83
|
-
{
|
|
84
|
-
ref: c,
|
|
85
|
-
"data-testid": i["data-testid"],
|
|
86
|
-
onClickContent: r,
|
|
87
|
-
disabled: o,
|
|
88
|
-
className: t,
|
|
89
|
-
variant: u,
|
|
90
|
-
children: [
|
|
91
|
-
a && /* @__PURE__ */ e(C, { ...b }),
|
|
92
|
-
_,
|
|
93
|
-
m && /* @__PURE__ */ e(
|
|
94
|
-
"span",
|
|
95
|
-
{
|
|
96
|
-
className: s(p.chip__remove, { [p["chip__remove--disabled"]]: o }),
|
|
97
|
-
role: "button",
|
|
98
|
-
tabIndex: o ? -1 : 0,
|
|
99
|
-
"aria-label": "remove",
|
|
100
|
-
onClick: (d) => {
|
|
101
|
-
d == null || d.stopPropagation(), d == null || d.nativeEvent.stopImmediatePropagation(), m();
|
|
102
|
-
},
|
|
103
|
-
"aria-disabled": o,
|
|
104
|
-
children: /* @__PURE__ */ e(N, { icon: "circle-xmark", size: "1.125rem", color: "rgba(var(--gray-95-rgb), 0.45)" })
|
|
105
|
-
}
|
|
106
|
-
)
|
|
107
|
-
]
|
|
108
|
-
}
|
|
109
|
-
);
|
|
110
|
-
}), h = {
|
|
111
|
-
"row-item": "_row-item_8z1a0_1",
|
|
112
|
-
"row-item--clickable": "_row-item--clickable_8z1a0_13",
|
|
113
|
-
"row-item--disabled": "_row-item--disabled_8z1a0_19",
|
|
114
|
-
"row-item__content": "_row-item__content_8z1a0_22"
|
|
115
|
-
}, O = y((i, c) => {
|
|
116
|
-
const { children: _, leftAdornment: t, disabled: r, onClick: a, buttons: n, ariaLabel: o, className: u } = i, m = s(t == null ? void 0 : t.className, h["row-item__adornment"]), b = {
|
|
117
|
-
onClick: (l) => {
|
|
118
|
-
r || a && a(l);
|
|
119
|
-
},
|
|
120
|
-
tabIndex: 0,
|
|
121
|
-
"aria-label": o,
|
|
122
|
-
role: "button"
|
|
123
|
-
}, d = t != null && t.customIcon ? t : { size: "1rem", ...t };
|
|
124
|
-
return /* @__PURE__ */ q(
|
|
125
|
-
"div",
|
|
126
|
-
{
|
|
127
|
-
"data-testid": i["data-testid"],
|
|
128
|
-
className: s(
|
|
129
|
-
h["row-item"],
|
|
130
|
-
a && h["row-item--clickable"],
|
|
131
|
-
a && r && h["row-item--disabled"],
|
|
132
|
-
u
|
|
133
|
-
),
|
|
134
|
-
...!!a && b,
|
|
135
|
-
ref: c,
|
|
136
|
-
children: [
|
|
137
|
-
t && /* @__PURE__ */ e(C, { ...d, className: m, disabled: r }),
|
|
138
|
-
/* @__PURE__ */ e("span", { className: s(h["row-item__content"]), children: _ }),
|
|
139
|
-
n && /* @__PURE__ */ e(
|
|
140
|
-
"div",
|
|
141
|
-
{
|
|
142
|
-
onClick: (l) => {
|
|
143
|
-
l == null || l.stopPropagation(), l == null || l.nativeEvent.stopImmediatePropagation();
|
|
144
|
-
},
|
|
145
|
-
children: n
|
|
146
|
-
}
|
|
147
|
-
)
|
|
148
|
-
]
|
|
149
|
-
}
|
|
150
|
-
);
|
|
151
|
-
}), Q = y((i, c) => {
|
|
152
|
-
const { text: _, isSelected: t = !1, value: r, onChange: a } = i;
|
|
153
|
-
return /* @__PURE__ */ q(
|
|
154
|
-
"label",
|
|
155
|
-
{
|
|
156
|
-
className: s([k.toggle__label], { [k["toggle__label--selected"]]: t }),
|
|
157
|
-
"data-testid": i["data-testid"],
|
|
158
|
-
children: [
|
|
159
|
-
/* @__PURE__ */ e(
|
|
160
|
-
"input",
|
|
161
|
-
{
|
|
162
|
-
className: s([k.toggle__input]),
|
|
163
|
-
type: "radio",
|
|
164
|
-
ref: c,
|
|
165
|
-
value: r.toString(),
|
|
166
|
-
onChange: () => a(r),
|
|
167
|
-
role: "radio",
|
|
168
|
-
checked: t,
|
|
169
|
-
"aria-checked": t
|
|
170
|
-
}
|
|
171
|
-
),
|
|
172
|
-
/* @__PURE__ */ e(w, { bold: !0, children: _ })
|
|
173
|
-
]
|
|
174
|
-
}
|
|
175
|
-
);
|
|
176
|
-
});
|
|
177
|
-
export {
|
|
178
|
-
M as C,
|
|
179
|
-
O as R,
|
|
180
|
-
Q as T
|
|
181
|
-
};
|