@pismo/marola 1.0.0-beta.37 → 1.0.0-beta.38
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/Group-B80_u5Q1.js +27 -0
- package/dist/{Toggle-Buew6bzm.js → Toggle-Dl-yPy8S.js} +51 -46
- package/dist/assets/Group.css +1 -1
- package/dist/components/Chip/Chip.js +2 -2
- package/dist/components/ResultWithChips/ResultWithChips.js +1 -1
- package/dist/components/RowItem/RowItem.js +2 -2
- package/dist/components/ToggleGroup/Group.js +1 -1
- package/dist/components/ToggleGroup/Toggle.d.ts +1 -0
- package/dist/components/ToggleGroup/Toggle.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/main.js +2 -2
- package/package.json +1 -1
- package/dist/Group-B3p31ftp.js +0 -26
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import './assets/Group.css';
|
|
2
|
+
import { jsxs as g, 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_f3ebk_1", b = "_toggle__label_f3ebk_11", _ = {
|
|
6
|
+
toggle__input: c,
|
|
7
|
+
toggle__label: b,
|
|
8
|
+
"toggle__label--selected": "_toggle__label--selected_f3ebk_20",
|
|
9
|
+
"toggle__label--disabled": "_toggle__label--disabled_f3ebk_24",
|
|
10
|
+
"toggle-group__fieldset": "_toggle-group__fieldset_f3ebk_30",
|
|
11
|
+
"toggle-group__options": "_toggle-group__options_f3ebk_35",
|
|
12
|
+
"toggle-group__error": "_toggle-group__error_f3ebk_39"
|
|
13
|
+
}, p = i((e, r) => {
|
|
14
|
+
const { children: d, legend: o, error: l } = e, a = e["data-testid"] ? `${e["data-testid"]}-legend` : void 0, s = e["data-testid"] ? `${e["data-testid"]}-error` : void 0;
|
|
15
|
+
return /* @__PURE__ */ g("fieldset", { ref: r, "data-testid": e["data-testid"], className: _["toggle-group__fieldset"], children: [
|
|
16
|
+
o && /* @__PURE__ */ t("legend", { "data-testid": a, children: o }),
|
|
17
|
+
/* @__PURE__ */ t("div", { className: _["toggle-group__options"], children: d }),
|
|
18
|
+
l && /* @__PURE__ */ g("div", { className: _["toggle-group__error"], "data-testid": s, children: [
|
|
19
|
+
/* @__PURE__ */ t(n, { icon: "circle-exclamation", size: 24, color: "var(--alert)" }),
|
|
20
|
+
l
|
|
21
|
+
] })
|
|
22
|
+
] });
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
p as G,
|
|
26
|
+
_ as s
|
|
27
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './assets/Toggle2.css';
|
|
2
2
|
import { jsx as i, jsxs as k } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { c as
|
|
3
|
+
import { forwardRef as u } from "react";
|
|
4
|
+
import { c as l } from "./clsx-DB4S2d7J.js";
|
|
5
5
|
import { Icon as C } from "./components/Icon/Icon.js";
|
|
6
6
|
import { Typography as N } from "./components/Typography/Typography.js";
|
|
7
7
|
import "./components/Input/Input.js";
|
|
@@ -12,11 +12,11 @@ import "./components/IconButton/IconButton.js";
|
|
|
12
12
|
import "./components/Select/Select.js";
|
|
13
13
|
import "./components/Table/Table.js";
|
|
14
14
|
import "./components/Tabs/Tabs.js";
|
|
15
|
-
import { s as
|
|
15
|
+
import { s as y } from "./Group-B80_u5Q1.js";
|
|
16
16
|
import "./contexts/SnackbarProvider/SnackbarProvider.js";
|
|
17
17
|
import { Skeleton as f } from "./components/Skeleton/Skeleton.js";
|
|
18
18
|
import { B as x } from "./Button-BAljjMv3.js";
|
|
19
|
-
const I = "_chip_1wvod_61", P = "_chip__adornment_1wvod_116", z = "_chip__remove_1wvod_121",
|
|
19
|
+
const I = "_chip_1wvod_61", P = "_chip__adornment_1wvod_116", z = "_chip__remove_1wvod_121", n = {
|
|
20
20
|
"u-typography-h1": "_u-typography-h1_1wvod_1",
|
|
21
21
|
"u-typography-h2": "_u-typography-h2_1wvod_8",
|
|
22
22
|
"u-typography-h3": "_u-typography-h3_1wvod_15",
|
|
@@ -40,66 +40,66 @@ const I = "_chip_1wvod_61", P = "_chip__adornment_1wvod_116", z = "_chip__remove
|
|
|
40
40
|
chip__remove: z,
|
|
41
41
|
"chip__remove--disabled": "_chip__remove--disabled_1wvod_133",
|
|
42
42
|
"chip-loading": "_chip-loading_1wvod_137"
|
|
43
|
-
}, S =
|
|
44
|
-
const { children: _, onClickContent: o, disabled: r, className: a, variant:
|
|
45
|
-
let e =
|
|
46
|
-
|
|
47
|
-
{ [
|
|
48
|
-
{ [
|
|
43
|
+
}, S = u((t, d) => {
|
|
44
|
+
const { children: _, onClickContent: o, disabled: r, className: a, variant: s } = t;
|
|
45
|
+
let e = l(
|
|
46
|
+
n.chip,
|
|
47
|
+
{ [n["chip--outlined"]]: s === "outlined" },
|
|
48
|
+
{ [n["chip--contained"]]: s === "contained" },
|
|
49
49
|
a
|
|
50
50
|
);
|
|
51
|
-
return o ? (e += ` ${
|
|
51
|
+
return o ? (e += ` ${n["chip--button"]}`, /* @__PURE__ */ i(
|
|
52
52
|
x,
|
|
53
53
|
{
|
|
54
54
|
onClick: o,
|
|
55
55
|
disabled: r,
|
|
56
56
|
"data-testid": t["data-testid"],
|
|
57
|
-
ref:
|
|
57
|
+
ref: d,
|
|
58
58
|
className: e,
|
|
59
59
|
children: _
|
|
60
60
|
}
|
|
61
|
-
)) : /* @__PURE__ */ i("span", { "data-testid": t["data-testid"], ref:
|
|
62
|
-
}), O =
|
|
61
|
+
)) : /* @__PURE__ */ i("span", { "data-testid": t["data-testid"], ref: d, className: e, children: _ });
|
|
62
|
+
}), O = u((t, d) => {
|
|
63
63
|
const {
|
|
64
64
|
label: _,
|
|
65
65
|
className: o,
|
|
66
66
|
onClickContent: r,
|
|
67
67
|
leftAdornment: a,
|
|
68
|
-
loading:
|
|
68
|
+
loading: s = !1,
|
|
69
69
|
disabled: e = !1,
|
|
70
|
-
variant:
|
|
70
|
+
variant: g = "default",
|
|
71
71
|
onClickRemove: m
|
|
72
72
|
} = t;
|
|
73
|
-
if (
|
|
73
|
+
if (s)
|
|
74
74
|
return /* @__PURE__ */ i(
|
|
75
75
|
f,
|
|
76
76
|
{
|
|
77
|
-
className:
|
|
77
|
+
className: l(n["chip-loading"], t["className-skeleton"]),
|
|
78
78
|
"data-testid": t["data-testid-skeleton"]
|
|
79
79
|
}
|
|
80
80
|
);
|
|
81
|
-
const
|
|
81
|
+
const b = l(a == null ? void 0 : a.className, n.chip__adornment), w = a != null && a.customIcon ? { ...a, className: b } : { ...a, disabled: e, className: b };
|
|
82
82
|
return /* @__PURE__ */ k(
|
|
83
83
|
S,
|
|
84
84
|
{
|
|
85
|
-
ref:
|
|
85
|
+
ref: d,
|
|
86
86
|
"data-testid": t["data-testid"],
|
|
87
87
|
onClickContent: r,
|
|
88
88
|
disabled: e,
|
|
89
89
|
className: o,
|
|
90
|
-
variant:
|
|
90
|
+
variant: g,
|
|
91
91
|
children: [
|
|
92
|
-
a && /* @__PURE__ */ i(v, { ...
|
|
92
|
+
a && /* @__PURE__ */ i(v, { ...w }),
|
|
93
93
|
_,
|
|
94
94
|
m && /* @__PURE__ */ i(
|
|
95
95
|
"span",
|
|
96
96
|
{
|
|
97
|
-
className:
|
|
97
|
+
className: l(n.chip__remove, { [n["chip__remove--disabled"]]: e }),
|
|
98
98
|
role: "button",
|
|
99
99
|
tabIndex: e ? -1 : 0,
|
|
100
100
|
"aria-label": "remove",
|
|
101
|
-
onClick: (
|
|
102
|
-
|
|
101
|
+
onClick: (c) => {
|
|
102
|
+
c == null || c.stopPropagation(), c == null || c.nativeEvent.stopImmediatePropagation(), m();
|
|
103
103
|
},
|
|
104
104
|
"aria-disabled": e,
|
|
105
105
|
children: /* @__PURE__ */ i(C, { icon: "circle-xmark", size: "1.125rem", color: "rgba(var(--gray-95-rgb), 0.45)" })
|
|
@@ -113,61 +113,66 @@ const I = "_chip_1wvod_61", P = "_chip__adornment_1wvod_116", z = "_chip__remove
|
|
|
113
113
|
"row-item--clickable": "_row-item--clickable_8z1a0_13",
|
|
114
114
|
"row-item--disabled": "_row-item--disabled_8z1a0_19",
|
|
115
115
|
"row-item__content": "_row-item__content_8z1a0_22"
|
|
116
|
-
}, Q =
|
|
117
|
-
const { children: _, leftAdornment: o, disabled: r, onClick: a, buttons:
|
|
118
|
-
onClick: (
|
|
119
|
-
r || a && a(
|
|
116
|
+
}, Q = u((t, d) => {
|
|
117
|
+
const { children: _, leftAdornment: o, disabled: r, onClick: a, buttons: s, ariaLabel: e, className: g } = t, m = l(o == null ? void 0 : o.className, h["row-item__adornment"]), w = {
|
|
118
|
+
onClick: (p) => {
|
|
119
|
+
r || a && a(p);
|
|
120
120
|
},
|
|
121
121
|
tabIndex: 0,
|
|
122
122
|
"aria-label": e,
|
|
123
123
|
role: "button"
|
|
124
|
-
},
|
|
124
|
+
}, c = o != null && o.customIcon ? o : { size: "1rem", ...o };
|
|
125
125
|
return /* @__PURE__ */ k(
|
|
126
126
|
"div",
|
|
127
127
|
{
|
|
128
128
|
"data-testid": t["data-testid"],
|
|
129
|
-
className:
|
|
129
|
+
className: l(
|
|
130
130
|
h["row-item"],
|
|
131
131
|
a && h["row-item--clickable"],
|
|
132
132
|
a && r && h["row-item--disabled"],
|
|
133
|
-
|
|
133
|
+
g
|
|
134
134
|
),
|
|
135
|
-
...!!a &&
|
|
136
|
-
ref:
|
|
135
|
+
...!!a && w,
|
|
136
|
+
ref: d,
|
|
137
137
|
children: [
|
|
138
|
-
o && /* @__PURE__ */ i(v, { ...
|
|
139
|
-
/* @__PURE__ */ i("span", { className:
|
|
140
|
-
|
|
138
|
+
o && /* @__PURE__ */ i(v, { ...c, className: m, disabled: r }),
|
|
139
|
+
/* @__PURE__ */ i("span", { className: l(h["row-item__content"]), children: _ }),
|
|
140
|
+
s && /* @__PURE__ */ i(
|
|
141
141
|
"div",
|
|
142
142
|
{
|
|
143
|
-
onClick: (
|
|
144
|
-
|
|
143
|
+
onClick: (p) => {
|
|
144
|
+
p == null || p.stopPropagation(), p == null || p.nativeEvent.stopImmediatePropagation();
|
|
145
145
|
},
|
|
146
|
-
children:
|
|
146
|
+
children: s
|
|
147
147
|
}
|
|
148
148
|
)
|
|
149
149
|
]
|
|
150
150
|
}
|
|
151
151
|
);
|
|
152
|
-
}), V =
|
|
153
|
-
const { text: _, isSelected: o = !1, value: r, onChange: a } = t;
|
|
152
|
+
}), V = u((t, d) => {
|
|
153
|
+
const { text: _, isSelected: o = !1, value: r, onChange: a, disabled: s } = t;
|
|
154
154
|
return /* @__PURE__ */ k(
|
|
155
155
|
"label",
|
|
156
156
|
{
|
|
157
|
-
className:
|
|
157
|
+
className: l(
|
|
158
|
+
[y.toggle__label],
|
|
159
|
+
o && y["toggle__label--selected"],
|
|
160
|
+
s && y["toggle__label--disabled"]
|
|
161
|
+
),
|
|
158
162
|
"data-testid": t["data-testid"],
|
|
159
163
|
children: [
|
|
160
164
|
/* @__PURE__ */ i(
|
|
161
165
|
"input",
|
|
162
166
|
{
|
|
163
|
-
className:
|
|
167
|
+
className: l([y.toggle__input]),
|
|
164
168
|
type: "radio",
|
|
165
|
-
ref:
|
|
169
|
+
ref: d,
|
|
166
170
|
value: r.toString(),
|
|
167
171
|
onChange: () => a(r),
|
|
168
172
|
role: "radio",
|
|
169
173
|
checked: o,
|
|
170
|
-
"aria-checked": o
|
|
174
|
+
"aria-checked": o,
|
|
175
|
+
disabled: s
|
|
171
176
|
}
|
|
172
177
|
),
|
|
173
178
|
/* @__PURE__ */ i(N, { bold: !0, children: _ })
|
package/dist/assets/Group.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._toggle__input_f3ebk_1{position:absolute;top:0;left:0;width:100%;height:100%;margin:0;visibility:hidden;opacity:0}._toggle__label_f3ebk_11{position:relative;flex-grow:1;padding:.5rem 1rem;text-align:center;cursor:pointer;border:solid 1px var(--gray-25);border-radius:6px}._toggle__label--selected_f3ebk_20{color:var(--accent);border-color:var(--accent)}._toggle__label--disabled_f3ebk_24{color:rgb(var(--black-100-rgb),.25);cursor:default;background-color:rgb(var(--black-100-rgb),.04)}._toggle-group__fieldset_f3ebk_30{padding:0;margin:0;border:none}._toggle-group__options_f3ebk_35{display:flex;gap:.5rem}._toggle-group__error_f3ebk_39{display:flex;gap:.5rem;margin-top:.5rem;color:var(--alert)}
|
|
@@ -6,14 +6,14 @@ import "../Icon/Icon.js";
|
|
|
6
6
|
import "../Typography/Typography.js";
|
|
7
7
|
import "../Input/Input.js";
|
|
8
8
|
import "../Button/Button.js";
|
|
9
|
-
import { C as l } from "../../Toggle-
|
|
9
|
+
import { C as l } from "../../Toggle-Dl-yPy8S.js";
|
|
10
10
|
import "../Dialog/Dialog.js";
|
|
11
11
|
import "../IconButton/IconButton.js";
|
|
12
12
|
import "../Select/Select.js";
|
|
13
13
|
import "../Skeleton/Skeleton.js";
|
|
14
14
|
import "../Table/Table.js";
|
|
15
15
|
import "../Tabs/Tabs.js";
|
|
16
|
-
import "../../Group-
|
|
16
|
+
import "../../Group-B80_u5Q1.js";
|
|
17
17
|
import "../../contexts/SnackbarProvider/SnackbarProvider.js";
|
|
18
18
|
import "../../Button-BAljjMv3.js";
|
|
19
19
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../assets/ResultWithChips.css';
|
|
2
2
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { C as t } from "../../Toggle-
|
|
3
|
+
import { C as t } from "../../Toggle-Dl-yPy8S.js";
|
|
4
4
|
const r = "_container_hgp0p_1", o = "_label_hgp0p_17", a = {
|
|
5
5
|
container: r,
|
|
6
6
|
"chip-item-wrapper": "_chip-item-wrapper_hgp0p_8",
|
|
@@ -6,13 +6,13 @@ import "../Icon/Icon.js";
|
|
|
6
6
|
import "../Typography/Typography.js";
|
|
7
7
|
import "../Input/Input.js";
|
|
8
8
|
import "../Button/Button.js";
|
|
9
|
-
import { R as b, R as c } from "../../Toggle-
|
|
9
|
+
import { R as b, R as c } from "../../Toggle-Dl-yPy8S.js";
|
|
10
10
|
import "../Dialog/Dialog.js";
|
|
11
11
|
import "../IconButton/IconButton.js";
|
|
12
12
|
import "../Select/Select.js";
|
|
13
13
|
import "../Table/Table.js";
|
|
14
14
|
import "../Tabs/Tabs.js";
|
|
15
|
-
import "../../Group-
|
|
15
|
+
import "../../Group-B80_u5Q1.js";
|
|
16
16
|
import "../../contexts/SnackbarProvider/SnackbarProvider.js";
|
|
17
17
|
export {
|
|
18
18
|
b as RowItem,
|
|
@@ -10,6 +10,7 @@ export type ToggleGroupItemProps<T extends string | number> = {
|
|
|
10
10
|
onChange: (value: T | '') => void;
|
|
11
11
|
/** Dataset test id only used for tests to reach in and grab the rendered DOM node of the label */
|
|
12
12
|
'data-testid'?: string;
|
|
13
|
+
disabled?: boolean;
|
|
13
14
|
};
|
|
14
15
|
declare const Toggle: import('react').ForwardRefExoticComponent<ToggleGroupItemProps<string | number> & import('react').RefAttributes<HTMLInputElement>>;
|
|
15
16
|
export default Toggle;
|
|
@@ -5,13 +5,13 @@ import "../Icon/Icon.js";
|
|
|
5
5
|
import "../Typography/Typography.js";
|
|
6
6
|
import "../Input/Input.js";
|
|
7
7
|
import "../Button/Button.js";
|
|
8
|
-
import { T as c } from "../../Toggle-
|
|
8
|
+
import { T as c } from "../../Toggle-Dl-yPy8S.js";
|
|
9
9
|
import "../Dialog/Dialog.js";
|
|
10
10
|
import "../IconButton/IconButton.js";
|
|
11
11
|
import "../Select/Select.js";
|
|
12
12
|
import "../Table/Table.js";
|
|
13
13
|
import "../Tabs/Tabs.js";
|
|
14
|
-
import "../../Group-
|
|
14
|
+
import "../../Group-B80_u5Q1.js";
|
|
15
15
|
import "../../contexts/SnackbarProvider/SnackbarProvider.js";
|
|
16
16
|
export {
|
|
17
17
|
c as default
|
package/dist/main.js
CHANGED
|
@@ -3,7 +3,7 @@ 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-
|
|
6
|
+
import { C as T, R as s, T as c } from "./Toggle-Dl-yPy8S.js";
|
|
7
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";
|
|
@@ -24,7 +24,7 @@ import { TBody as $, THead as oo, Table as ro, Td as eo, Th as to, Tr as po } fr
|
|
|
24
24
|
import { Tabs as fo } from "./components/Tabs/Tabs.js";
|
|
25
25
|
import { TextDisplay as xo } from "./components/TextDisplay/TextDisplay.js";
|
|
26
26
|
import { Toggle as lo } from "./components/Toggle/Toggle.js";
|
|
27
|
-
import { G as To } from "./Group-
|
|
27
|
+
import { G as To } from "./Group-B80_u5Q1.js";
|
|
28
28
|
import { Tooltip as co } from "./components/Tooltip/Tooltip.js";
|
|
29
29
|
import { Text as uo, Typography as So } from "./components/Typography/Typography.js";
|
|
30
30
|
import { SnackbarContext as ko, SnackbarProvider as ho, useSnackbar as Co } from "./contexts/SnackbarProvider/SnackbarProvider.js";
|
package/package.json
CHANGED
package/dist/Group-B3p31ftp.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import './assets/Group.css';
|
|
2
|
-
import { jsxs as g, 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_wlkvp_1", p = "_toggle__label_wlkvp_8", o = {
|
|
6
|
-
toggle__input: c,
|
|
7
|
-
toggle__label: p,
|
|
8
|
-
"toggle__label--selected": "_toggle__label--selected_wlkvp_15",
|
|
9
|
-
"toggle-group__fieldset": "_toggle-group__fieldset_wlkvp_20",
|
|
10
|
-
"toggle-group__options": "_toggle-group__options_wlkvp_25",
|
|
11
|
-
"toggle-group__error": "_toggle-group__error_wlkvp_29"
|
|
12
|
-
}, f = i((e, r) => {
|
|
13
|
-
const { children: s, legend: l, 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__ */ g("fieldset", { ref: r, "data-testid": e["data-testid"], className: o["toggle-group__fieldset"], children: [
|
|
15
|
-
l && /* @__PURE__ */ t("legend", { "data-testid": d, children: l }),
|
|
16
|
-
/* @__PURE__ */ t("div", { className: o["toggle-group__options"], children: s }),
|
|
17
|
-
_ && /* @__PURE__ */ g("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
|
-
};
|