@pismo/marola 1.0.0-beta.12 → 1.0.0-beta.14

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.
@@ -1,175 +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 r } from "./clsx-DB4S2d7J.js";
5
- import { Icon as N } from "./components/Icon/Icon.js";
6
- import { Typography as x } 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 w } from "./Button-DiLqcAJG.js";
18
- const I = "_chip_1qd8i_61", P = "_chip__adornment_1qd8i_115", S = "_chip__remove_1qd8i_120", d = {
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: S,
40
- "chip__remove--disabled": "_chip__remove--disabled_1qd8i_131",
41
- "chip-loading": "_chip-loading_1qd8i_135"
42
- }, R = y((o, s) => {
43
- const { children: c, onClickContent: a, disabled: _, className: t, variant: n } = o;
44
- let i = r(
45
- d.chip,
46
- { [d["chip--outlined"]]: n === "outlined" },
47
- { [d["chip--contained"]]: n === "contained" },
48
- t
49
- );
50
- return a ? (i += ` ${d["chip--button"]}`, /* @__PURE__ */ e(
51
- w,
52
- {
53
- onClick: a,
54
- disabled: _,
55
- "data-testid": o["data-testid"],
56
- ref: s,
57
- className: i,
58
- children: c
59
- }
60
- )) : /* @__PURE__ */ e("span", { "data-testid": o["data-testid"], ref: s, className: i, children: c });
61
- }), M = y((o, s) => {
62
- const {
63
- label: c,
64
- className: a,
65
- onClickContent: _,
66
- leftAdornment: t,
67
- loading: n = !1,
68
- disabled: i = !1,
69
- variant: u = "default",
70
- onClickRemove: h
71
- } = o;
72
- if (n)
73
- return /* @__PURE__ */ e(
74
- f,
75
- {
76
- className: r(d["chip-loading"], o["className-skeleton"]),
77
- "data-testid": o["data-testid-skeleton"]
78
- }
79
- );
80
- const g = r(t == null ? void 0 : t.className, d.chip__adornment), b = t != null && t.customIcon ? { ...t, className: g } : { ...t, disabled: i, className: g };
81
- return /* @__PURE__ */ q(
82
- R,
83
- {
84
- ref: s,
85
- "data-testid": o["data-testid"],
86
- onClickContent: _,
87
- disabled: i,
88
- className: a,
89
- variant: u,
90
- children: [
91
- t && /* @__PURE__ */ e(C, { ...b }),
92
- c,
93
- h && /* @__PURE__ */ e(
94
- "span",
95
- {
96
- className: r(d.chip__remove, { [d["chip__remove--disabled"]]: i }),
97
- role: "button",
98
- tabIndex: i ? -1 : 0,
99
- "aria-label": "remove",
100
- onClick: (l) => {
101
- l == null || l.stopPropagation(), l == null || l.nativeEvent.stopImmediatePropagation(), h();
102
- },
103
- "aria-disabled": i,
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
- }), m = {
111
- "row-item": "_row-item_ag6tb_1",
112
- "row-item--clickable": "_row-item--clickable_ag6tb_15",
113
- "row-item__content": "_row-item__content_ag6tb_18"
114
- }, O = y((o, s) => {
115
- const { children: c, leftAdornment: a, disabled: _, onClick: t, buttons: n, ariaLabel: i, className: u } = o, h = r(a == null ? void 0 : a.className, m["row-item__adornment"]), b = {
116
- onClick: (p) => {
117
- t && t(p);
118
- },
119
- tabIndex: 0,
120
- "aria-label": i,
121
- role: "button"
122
- }, l = a != null && a.customIcon ? a : { size: "1rem", ...a };
123
- return /* @__PURE__ */ q(
124
- "div",
125
- {
126
- "data-testid": o["data-testid"],
127
- className: r(m["row-item"], { [m["row-item--clickable"]]: !!t }, u),
128
- ...!!t && b,
129
- ref: s,
130
- children: [
131
- a && /* @__PURE__ */ e(C, { ...l, className: h, disabled: _ }),
132
- /* @__PURE__ */ e("span", { className: r(m["row-item__content"]), children: c }),
133
- n && /* @__PURE__ */ e(
134
- "div",
135
- {
136
- onClick: (p) => {
137
- p == null || p.stopPropagation(), p == null || p.nativeEvent.stopImmediatePropagation();
138
- },
139
- children: n
140
- }
141
- )
142
- ]
143
- }
144
- );
145
- }), Q = y((o, s) => {
146
- const { text: c, isSelected: a = !1, value: _, onChange: t } = o;
147
- return /* @__PURE__ */ q(
148
- "label",
149
- {
150
- className: r([k.toggle__label], { [k["toggle__label--selected"]]: a }),
151
- "data-testid": o["data-testid"],
152
- children: [
153
- /* @__PURE__ */ e(
154
- "input",
155
- {
156
- className: r([k.toggle__input]),
157
- type: "radio",
158
- ref: s,
159
- value: _.toString(),
160
- onChange: () => t(_),
161
- role: "radio",
162
- checked: a,
163
- "aria-checked": a
164
- }
165
- ),
166
- /* @__PURE__ */ e(x, { bold: !0, children: c })
167
- ]
168
- }
169
- );
170
- });
171
- export {
172
- M as C,
173
- O as R,
174
- Q as T
175
- };