@pismo/marola 1.0.0-beta.17 → 1.0.0-beta.18
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/Dialog.module-D9e4RsKo.js +30 -0
- package/dist/Toggle-CRfZgFJp.js +181 -0
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/Toggle2.css +1 -1
- package/dist/components/Chip/Chip.js +2 -2
- package/dist/components/Chip/Chip.stories.d.ts +2 -0
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.js +1 -1
- package/dist/components/Dialog/CloseIconButton.js +1 -1
- package/dist/components/Dialog/Dialog.d.ts +9 -6
- package/dist/components/Dialog/Dialog.js +162 -164
- package/dist/components/Dialog/Dialog.stories.d.ts +6 -2
- package/dist/components/Dialog/DialogTitle.js +1 -1
- package/dist/components/ResultWithChips/ResultWithChips.js +1 -1
- package/dist/components/RowItem/RowItem.js +2 -2
- package/dist/components/ToggleGroup/Toggle.js +2 -2
- package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/main.js +1 -1
- package/package.json +1 -1
- package/dist/Dialog.module-HFAN4mAD.js +0 -30
- package/dist/Toggle-BQPzu8NV.js +0 -181
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import './assets/Dialog.css';
|
|
2
|
+
const _ = "_dialog__subtitle_1rdlq_53", a = "_dialog_1rdlq_53", o = "_dialog__backdrop_1rdlq_88", l = "_dialog__panel_1rdlq_96", r = "_dialog__title_1rdlq_57", d = "_dialog__divider_1rdlq_122", p = "_dialog__actions_1rdlq_136", t = {
|
|
3
|
+
"u-typography-h1": "_u-typography-h1_1rdlq_1",
|
|
4
|
+
"u-typography-h2": "_u-typography-h2_1rdlq_8",
|
|
5
|
+
"u-typography-h3": "_u-typography-h3_1rdlq_15",
|
|
6
|
+
"u-typography-h4": "_u-typography-h4_1rdlq_22",
|
|
7
|
+
"u-typography-h5": "_u-typography-h5_1rdlq_29",
|
|
8
|
+
"u-typography-h6": "_u-typography-h6_1rdlq_36",
|
|
9
|
+
"u-typography-base": "_u-typography-base_1rdlq_43",
|
|
10
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_1rdlq_49",
|
|
11
|
+
"u-typography-base--xl": "_u-typography-base--xl_1rdlq_53",
|
|
12
|
+
dialog__subtitle: _,
|
|
13
|
+
"u-typography-base--lg": "_u-typography-base--lg_1rdlq_57",
|
|
14
|
+
"dialog__title--small": "_dialog__title--small_1rdlq_57",
|
|
15
|
+
"u-typography-base--sm": "_u-typography-base--sm_1rdlq_61",
|
|
16
|
+
"u-typography-base--bold": "_u-typography-base--bold_1rdlq_65",
|
|
17
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1rdlq_68",
|
|
18
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_1rdlq_71",
|
|
19
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1rdlq_74",
|
|
20
|
+
dialog: a,
|
|
21
|
+
dialog__backdrop: o,
|
|
22
|
+
dialog__panel: l,
|
|
23
|
+
dialog__title: r,
|
|
24
|
+
dialog__divider: d,
|
|
25
|
+
"dialog__close-icon": "_dialog__close-icon_1rdlq_126",
|
|
26
|
+
dialog__actions: p
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
t as s
|
|
30
|
+
};
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import './assets/Toggle2.css';
|
|
2
|
+
import { jsx as i, jsxs as k } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as y } from "react";
|
|
4
|
+
import { c as s } from "./clsx-DB4S2d7J.js";
|
|
5
|
+
import { Icon as C } from "./components/Icon/Icon.js";
|
|
6
|
+
import { Typography as N } from "./components/Typography/Typography.js";
|
|
7
|
+
import "./components/Button/Button.js";
|
|
8
|
+
import { Adornment as v } from "./components/Adornment/Adornment.js";
|
|
9
|
+
import "./components/Dialog/Dialog.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 w } 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_1wvod_61", P = "_chip__adornment_1wvod_116", z = "_chip__remove_1wvod_121", p = {
|
|
19
|
+
"u-typography-h1": "_u-typography-h1_1wvod_1",
|
|
20
|
+
"u-typography-h2": "_u-typography-h2_1wvod_8",
|
|
21
|
+
"u-typography-h3": "_u-typography-h3_1wvod_15",
|
|
22
|
+
"u-typography-h4": "_u-typography-h4_1wvod_22",
|
|
23
|
+
"u-typography-h5": "_u-typography-h5_1wvod_29",
|
|
24
|
+
"u-typography-h6": "_u-typography-h6_1wvod_36",
|
|
25
|
+
"u-typography-base": "_u-typography-base_1wvod_43",
|
|
26
|
+
"u-typography-base--xxl": "_u-typography-base--xxl_1wvod_49",
|
|
27
|
+
"u-typography-base--xl": "_u-typography-base--xl_1wvod_53",
|
|
28
|
+
"u-typography-base--lg": "_u-typography-base--lg_1wvod_57",
|
|
29
|
+
"u-typography-base--sm": "_u-typography-base--sm_1wvod_61",
|
|
30
|
+
chip: I,
|
|
31
|
+
"u-typography-base--bold": "_u-typography-base--bold_1wvod_65",
|
|
32
|
+
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1wvod_68",
|
|
33
|
+
"u-typography-base--underlined": "_u-typography-base--underlined_1wvod_71",
|
|
34
|
+
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1wvod_74",
|
|
35
|
+
"chip--button": "_chip--button_1wvod_90",
|
|
36
|
+
"chip--outlined": "_chip--outlined_1wvod_104",
|
|
37
|
+
"chip--contained": "_chip--contained_1wvod_110",
|
|
38
|
+
chip__adornment: P,
|
|
39
|
+
chip__remove: z,
|
|
40
|
+
"chip__remove--disabled": "_chip__remove--disabled_1wvod_133",
|
|
41
|
+
"chip-loading": "_chip-loading_1wvod_137"
|
|
42
|
+
}, S = y((t, c) => {
|
|
43
|
+
const { children: _, onClickContent: o, disabled: r, className: a, variant: n } = t;
|
|
44
|
+
let e = s(
|
|
45
|
+
p.chip,
|
|
46
|
+
{ [p["chip--outlined"]]: n === "outlined" },
|
|
47
|
+
{ [p["chip--contained"]]: n === "contained" },
|
|
48
|
+
a
|
|
49
|
+
);
|
|
50
|
+
return o ? (e += ` ${p["chip--button"]}`, /* @__PURE__ */ i(
|
|
51
|
+
x,
|
|
52
|
+
{
|
|
53
|
+
onClick: o,
|
|
54
|
+
disabled: r,
|
|
55
|
+
"data-testid": t["data-testid"],
|
|
56
|
+
ref: c,
|
|
57
|
+
className: e,
|
|
58
|
+
children: _
|
|
59
|
+
}
|
|
60
|
+
)) : /* @__PURE__ */ i("span", { "data-testid": t["data-testid"], ref: c, className: e, children: _ });
|
|
61
|
+
}), M = y((t, c) => {
|
|
62
|
+
const {
|
|
63
|
+
label: _,
|
|
64
|
+
className: o,
|
|
65
|
+
onClickContent: r,
|
|
66
|
+
leftAdornment: a,
|
|
67
|
+
loading: n = !1,
|
|
68
|
+
disabled: e = !1,
|
|
69
|
+
variant: u = "default",
|
|
70
|
+
onClickRemove: m
|
|
71
|
+
} = t;
|
|
72
|
+
if (n)
|
|
73
|
+
return /* @__PURE__ */ i(
|
|
74
|
+
f,
|
|
75
|
+
{
|
|
76
|
+
className: s(p["chip-loading"], t["className-skeleton"]),
|
|
77
|
+
"data-testid": t["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: e, className: g };
|
|
81
|
+
return /* @__PURE__ */ k(
|
|
82
|
+
S,
|
|
83
|
+
{
|
|
84
|
+
ref: c,
|
|
85
|
+
"data-testid": t["data-testid"],
|
|
86
|
+
onClickContent: r,
|
|
87
|
+
disabled: e,
|
|
88
|
+
className: o,
|
|
89
|
+
variant: u,
|
|
90
|
+
children: [
|
|
91
|
+
a && /* @__PURE__ */ i(v, { ...b }),
|
|
92
|
+
_,
|
|
93
|
+
m && /* @__PURE__ */ i(
|
|
94
|
+
"span",
|
|
95
|
+
{
|
|
96
|
+
className: s(p.chip__remove, { [p["chip__remove--disabled"]]: e }),
|
|
97
|
+
role: "button",
|
|
98
|
+
tabIndex: e ? -1 : 0,
|
|
99
|
+
"aria-label": "remove",
|
|
100
|
+
onClick: (d) => {
|
|
101
|
+
d == null || d.stopPropagation(), d == null || d.nativeEvent.stopImmediatePropagation(), m();
|
|
102
|
+
},
|
|
103
|
+
"aria-disabled": e,
|
|
104
|
+
children: /* @__PURE__ */ i(C, { 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((t, c) => {
|
|
116
|
+
const { children: _, leftAdornment: o, disabled: r, onClick: a, buttons: n, ariaLabel: e, className: u } = t, m = s(o == null ? void 0 : o.className, h["row-item__adornment"]), b = {
|
|
117
|
+
onClick: (l) => {
|
|
118
|
+
r || a && a(l);
|
|
119
|
+
},
|
|
120
|
+
tabIndex: 0,
|
|
121
|
+
"aria-label": e,
|
|
122
|
+
role: "button"
|
|
123
|
+
}, d = o != null && o.customIcon ? o : { size: "1rem", ...o };
|
|
124
|
+
return /* @__PURE__ */ k(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
"data-testid": t["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
|
+
o && /* @__PURE__ */ i(v, { ...d, className: m, disabled: r }),
|
|
138
|
+
/* @__PURE__ */ i("span", { className: s(h["row-item__content"]), children: _ }),
|
|
139
|
+
n && /* @__PURE__ */ i(
|
|
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((t, c) => {
|
|
152
|
+
const { text: _, isSelected: o = !1, value: r, onChange: a } = t;
|
|
153
|
+
return /* @__PURE__ */ k(
|
|
154
|
+
"label",
|
|
155
|
+
{
|
|
156
|
+
className: s([w.toggle__label], { [w["toggle__label--selected"]]: o }),
|
|
157
|
+
"data-testid": t["data-testid"],
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ i(
|
|
160
|
+
"input",
|
|
161
|
+
{
|
|
162
|
+
className: s([w.toggle__input]),
|
|
163
|
+
type: "radio",
|
|
164
|
+
ref: c,
|
|
165
|
+
value: r.toString(),
|
|
166
|
+
onChange: () => a(r),
|
|
167
|
+
role: "radio",
|
|
168
|
+
checked: o,
|
|
169
|
+
"aria-checked": o
|
|
170
|
+
}
|
|
171
|
+
),
|
|
172
|
+
/* @__PURE__ */ i(N, { bold: !0, children: _ })
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
);
|
|
176
|
+
});
|
|
177
|
+
export {
|
|
178
|
+
M as C,
|
|
179
|
+
O as R,
|
|
180
|
+
Q as T
|
|
181
|
+
};
|
package/dist/assets/Dialog.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._u-typography-
|
|
1
|
+
._u-typography-h1_1rdlq_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_1rdlq_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_1rdlq_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_1rdlq_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_1rdlq_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_1rdlq_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_1rdlq_43{margin:0;font-size:var(--base-font-size);font-weight:var(--base-weight);line-height:var(--base-line-height)}._u-typography-base--xxl_1rdlq_49{font-size:var(--base-font-size-xxl);line-height:var(--base-line-height-xxl)}._u-typography-base--xl_1rdlq_53,._dialog__subtitle_1rdlq_53{font-size:var(--base-font-size-xl);line-height:var(--base-line-height-xl)}._u-typography-base--lg_1rdlq_57,._dialog__title--small_1rdlq_57{font-size:var(--base-font-size-lg);line-height:var(--base-line-height-lg)}._u-typography-base--sm_1rdlq_61{font-size:var(--base-font-size-sm);line-height:var(--base-line-height-sm)}._u-typography-base--bold_1rdlq_65{font-weight:var(--base-bold)}._u-typography-base--strikethrough_1rdlq_68{text-decoration:line-through}._u-typography-base--underlined_1rdlq_71{text-decoration:underline}._u-typography-base--strikethrough-underlined_1rdlq_74{text-decoration:underline line-through}._dialog_1rdlq_53{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1300;display:flex;align-items:center;justify-content:center;-webkit-box-align:center;-webkit-box-pack:center}._dialog__backdrop_1rdlq_88{position:fixed;z-index:-1;width:100%;height:100%;background-color:rgb(var(--black-100-rgb),.05);-webkit-tap-highlight-color:transparent}._dialog__panel_1rdlq_96{position:relative;display:flex;flex-direction:column;gap:8px;width:680px;padding:2rem;overflow:hidden;font-weight:500;color:var(--gray-90);text-align:start;background-color:var(--white-100);border:1px solid rgb(218,226,237);border-radius:8px;box-shadow:0 10px 20px rgb(var(--black-100-rgb),.2)}._dialog__title_1rdlq_57{padding-bottom:1rem}._dialog__subtitle_1rdlq_53{margin-top:1rem;font-family:Lato,sans-serif;color:var(--secondary-orange-dark);text-align:left;letter-spacing:0}._dialog__divider_1rdlq_122{width:100%;border-top:1px solid var(--gray-10)}._dialog__close-icon_1rdlq_126{position:absolute;top:27px;right:16px;padding:0;margin:0;cursor:pointer;background:none;border:none}._dialog__actions_1rdlq_136{display:flex;gap:.5rem;justify-content:center;margin-top:1.5rem}
|
package/dist/assets/Toggle2.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._u-typography-
|
|
1
|
+
._u-typography-h1_1wvod_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_1wvod_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_1wvod_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_1wvod_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_1wvod_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_1wvod_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_1wvod_43{margin:0;font-size:var(--base-font-size);font-weight:var(--base-weight);line-height:var(--base-line-height)}._u-typography-base--xxl_1wvod_49{font-size:var(--base-font-size-xxl);line-height:var(--base-line-height-xxl)}._u-typography-base--xl_1wvod_53{font-size:var(--base-font-size-xl);line-height:var(--base-line-height-xl)}._u-typography-base--lg_1wvod_57{font-size:var(--base-font-size-lg);line-height:var(--base-line-height-lg)}._u-typography-base--sm_1wvod_61,._chip_1wvod_61{font-size:var(--base-font-size-sm);line-height:var(--base-line-height-sm)}._u-typography-base--bold_1wvod_65,._chip_1wvod_61{font-weight:var(--base-bold)}._u-typography-base--strikethrough_1wvod_68{text-decoration:line-through}._u-typography-base--underlined_1wvod_71{text-decoration:underline}._u-typography-base--strikethrough-underlined_1wvod_74{text-decoration:underline line-through}._chip_1wvod_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_1wvod_61:not(:disabled){color:rgb(var(--gray-95-rgb) .65)}._chip--button_1wvod_90{cursor:pointer;border-color:transparent}._chip--button_1wvod_90:disabled{pointer-events:none;cursor:initial}._chip--button_1wvod_90:focus-visible{outline:none}._chip--button_1wvod_90:focus{outline:2px solid var(--black-100)}._chip--outlined_1wvod_104{padding:.3125rem .5rem;background-color:var(--white-100);border:1px solid var(--border);border-radius:calc(var(--border-radius-soft) * 4)}._chip--contained_1wvod_110{padding:.3125rem .5rem;border:1px solid var(--border);border-color:var(--accent);border-radius:calc(var(--border-radius-soft) * 4)}._chip__adornment_1wvod_116{display:flex;align-items:center;margin-right:.5rem}._chip__remove_1wvod_121{display:flex;margin-left:.5rem;cursor:pointer}._chip__remove_1wvod_121:focus-visible{outline:none}._chip__remove_1wvod_121:focus:not(:disabled){border-radius:calc(var(--border-radius-soft) * 4);outline:2px solid var(--black-100)}._chip__remove--disabled_1wvod_133{cursor:default}._chip-loading_1wvod_137{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)}
|
|
@@ -5,8 +5,8 @@ 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-
|
|
9
|
-
import "../Dialog/
|
|
8
|
+
import { C as k } from "../../Toggle-CRfZgFJp.js";
|
|
9
|
+
import "../Dialog/Dialog.js";
|
|
10
10
|
import "../IconButton/IconButton.js";
|
|
11
11
|
import "../Select/Select.js";
|
|
12
12
|
import "../Skeleton/Skeleton.js";
|
|
@@ -24,7 +24,9 @@ export default meta;
|
|
|
24
24
|
type Story = StoryObj<typeof meta>;
|
|
25
25
|
export declare const Simple: Story;
|
|
26
26
|
export declare const Clickable: Story;
|
|
27
|
+
export declare const Disabled: Story;
|
|
27
28
|
export declare const ClickableWithRemove: Story;
|
|
29
|
+
export declare const ClickableOnlyRemove: Story;
|
|
28
30
|
export declare const FullDefault: Story;
|
|
29
31
|
export declare const FullOutlined: Story;
|
|
30
32
|
export declare const FullContained: Story;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { s as t } from "../../Dialog.module-
|
|
2
|
+
import { s as t } from "../../Dialog.module-D9e4RsKo.js";
|
|
3
3
|
const i = ({ children: s }) => /* @__PURE__ */ o("div", { className: t.dialog__actions, children: s });
|
|
4
4
|
export {
|
|
5
5
|
i as default
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as t } from "react";
|
|
3
|
-
import { s as e } from "../../Dialog.module-
|
|
3
|
+
import { s as e } from "../../Dialog.module-D9e4RsKo.js";
|
|
4
4
|
const i = t((o, r) => {
|
|
5
5
|
const { open: m, className: p, ...s } = o;
|
|
6
6
|
return /* @__PURE__ */ a("div", { className: e.dialog__backdrop, ref: r, ...s });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { Icon as r } from "../Icon/Icon.js";
|
|
3
|
-
import { s as t } from "../../Dialog.module-
|
|
3
|
+
import { s as t } from "../../Dialog.module-D9e4RsKo.js";
|
|
4
4
|
import { B as a } from "../../Button-DiLqcAJG.js";
|
|
5
5
|
const d = ({ handleOnClose: i, className: o }) => {
|
|
6
6
|
const l = o != null ? t["dialog__close-icon "] + o : t["dialog__close-icon"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { default as DialogTitle } from './DialogTitle';
|
|
2
|
-
import { default as Content } from './Content';
|
|
3
|
-
import { default as Actions } from './Actions';
|
|
1
|
+
import { default as DialogTitle, DialogTitleProps } from './DialogTitle';
|
|
2
|
+
import { default as Content, DialogContentProps } from './Content';
|
|
3
|
+
import { default as Actions, DialogActionProps } from './Actions';
|
|
4
4
|
import { ModalProps } from '@mui/base';
|
|
5
5
|
import { JSXElementConstructor, ReactElement, ReactNode } from 'react';
|
|
6
6
|
|
|
@@ -12,11 +12,14 @@ export interface DialogProps extends ModalProps {
|
|
|
12
12
|
dialogTitle: ReactNode;
|
|
13
13
|
/** display subtitle */
|
|
14
14
|
dialogSubtitle?: ReactNode;
|
|
15
|
-
/** if true, show skeleton */
|
|
16
|
-
isLoading?: boolean;
|
|
17
15
|
/** callback for when close is clicked */
|
|
18
16
|
onClose?: () => void;
|
|
19
17
|
}
|
|
20
|
-
declare const Dialog:
|
|
18
|
+
declare const Dialog: {
|
|
19
|
+
({ children, dialogTitle, dialogSubtitle, onClose, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
Title: import('react').FunctionComponent<DialogTitleProps>;
|
|
21
|
+
Content: import('react').FunctionComponent<DialogContentProps>;
|
|
22
|
+
Actions: import('react').FunctionComponent<DialogActionProps>;
|
|
23
|
+
};
|
|
21
24
|
export { Dialog, DialogTitle, Content, Actions };
|
|
22
25
|
export default Dialog;
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { s as
|
|
8
|
-
import
|
|
9
|
-
import { u as
|
|
1
|
+
import { jsxs as Y, jsx as S } from "react/jsx-runtime";
|
|
2
|
+
import { c as se } from "../../clsx-DB4S2d7J.js";
|
|
3
|
+
import ie from "./Actions.js";
|
|
4
|
+
import ae from "./Backdrop.js";
|
|
5
|
+
import le from "./CloseIconButton.js";
|
|
6
|
+
import ce from "./Content.js";
|
|
7
|
+
import { s as V } from "../../Dialog.module-D9e4RsKo.js";
|
|
8
|
+
import ee from "./DialogTitle.js";
|
|
9
|
+
import { u as te, P as i, f as de, b as C, g as ue, a as fe, _ as pe, c as G, d as be, e as he } from "../../useSlotProps-kRhf7Gil.js";
|
|
10
10
|
import * as f from "react";
|
|
11
|
-
import { o as
|
|
12
|
-
import { u as
|
|
13
|
-
import { P as
|
|
14
|
-
import { e as
|
|
15
|
-
function
|
|
11
|
+
import { o as A, e as ne } from "../../ownerDocument-B61GUaFs.js";
|
|
12
|
+
import { u as X } from "../../useEventCallback-BAQJJ3ye.js";
|
|
13
|
+
import { P as me, H as ge } from "../../Portal-B_Es6eUL.js";
|
|
14
|
+
import { e as Ee } from "../../index-D3Wj0eid.js";
|
|
15
|
+
function J(...e) {
|
|
16
16
|
return e.reduce((t, o) => o == null ? t : function(...s) {
|
|
17
17
|
t.apply(this, s), o.apply(this, s);
|
|
18
18
|
}, () => {
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
return
|
|
21
|
+
function z(e) {
|
|
22
|
+
return A(e).defaultView || window;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function Te(e) {
|
|
25
25
|
const t = e.documentElement.clientWidth;
|
|
26
26
|
return Math.abs(window.innerWidth - t);
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
function
|
|
28
|
+
const ye = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
|
|
29
|
+
function xe(e) {
|
|
30
30
|
const t = parseInt(e.getAttribute("tabindex") || "", 10);
|
|
31
31
|
return Number.isNaN(t) ? e.contentEditable === "true" || (e.nodeName === "AUDIO" || e.nodeName === "VIDEO" || e.nodeName === "DETAILS") && e.getAttribute("tabindex") === null ? 0 : e.tabIndex : t;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Re(e) {
|
|
34
34
|
if (e.tagName !== "INPUT" || e.type !== "radio" || !e.name)
|
|
35
35
|
return !1;
|
|
36
36
|
const t = (n) => e.ownerDocument.querySelector(`input[type="radio"]${n}`);
|
|
37
37
|
let o = t(`[name="${e.name}"]:checked`);
|
|
38
38
|
return o || (o = t(`[name="${e.name}"]`)), o !== e;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
return !(e.disabled || e.tagName === "INPUT" && e.type === "hidden" ||
|
|
40
|
+
function ve(e) {
|
|
41
|
+
return !(e.disabled || e.tagName === "INPUT" && e.type === "hidden" || Re(e));
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ke(e) {
|
|
44
44
|
const t = [], o = [];
|
|
45
|
-
return Array.from(e.querySelectorAll(
|
|
46
|
-
const r =
|
|
47
|
-
r === -1 || !
|
|
45
|
+
return Array.from(e.querySelectorAll(ye)).forEach((n, s) => {
|
|
46
|
+
const r = xe(n);
|
|
47
|
+
r === -1 || !ve(n) || (r === 0 ? t.push(n) : o.push({
|
|
48
48
|
documentOrder: s,
|
|
49
49
|
tabIndex: r,
|
|
50
50
|
node: n
|
|
51
51
|
}));
|
|
52
52
|
}), o.sort((n, s) => n.tabIndex === s.tabIndex ? n.documentOrder - s.documentOrder : n.tabIndex - s.tabIndex).map((n) => n.node).concat(t);
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function Ne() {
|
|
55
55
|
return !0;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function j(e) {
|
|
58
58
|
const {
|
|
59
59
|
children: t,
|
|
60
60
|
disableAutoFocus: o = !1,
|
|
61
61
|
disableEnforceFocus: n = !1,
|
|
62
62
|
disableRestoreFocus: s = !1,
|
|
63
|
-
getTabbable: r =
|
|
64
|
-
isEnabled: a =
|
|
63
|
+
getTabbable: r = ke,
|
|
64
|
+
isEnabled: a = Ne,
|
|
65
65
|
open: d
|
|
66
|
-
} = e, p = f.useRef(!1), x = f.useRef(null), h = f.useRef(null), m = f.useRef(null), R = f.useRef(null), g = f.useRef(!1), c = f.useRef(null),
|
|
66
|
+
} = e, p = f.useRef(!1), x = f.useRef(null), h = f.useRef(null), m = f.useRef(null), R = f.useRef(null), g = f.useRef(!1), c = f.useRef(null), w = te(t.ref, c), I = f.useRef(null);
|
|
67
67
|
f.useEffect(() => {
|
|
68
68
|
!d || !c.current || (g.current = !o);
|
|
69
69
|
}, [o, d]), f.useEffect(() => {
|
|
70
70
|
if (!d || !c.current)
|
|
71
71
|
return;
|
|
72
|
-
const l =
|
|
72
|
+
const l = A(c.current);
|
|
73
73
|
return c.current.contains(l.activeElement) || (c.current.hasAttribute("tabIndex") || (process.env.NODE_ENV !== "production" && console.error(["MUI: The modal content node does not accept focus.", 'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
|
|
74
74
|
`)), c.current.setAttribute("tabIndex", "-1")), g.current && c.current.focus()), () => {
|
|
75
75
|
s || (m.current && m.current.focus && (p.current = !0, m.current.focus()), m.current = null);
|
|
@@ -77,7 +77,7 @@ function W(e) {
|
|
|
77
77
|
}, [d]), f.useEffect(() => {
|
|
78
78
|
if (!d || !c.current)
|
|
79
79
|
return;
|
|
80
|
-
const l =
|
|
80
|
+
const l = A(c.current), v = (E) => {
|
|
81
81
|
I.current = E, !(n || !a() || E.key !== "Tab") && l.activeElement === c.current && E.shiftKey && (p.current = !0, h.current && h.current.focus());
|
|
82
82
|
}, k = () => {
|
|
83
83
|
const E = c.current;
|
|
@@ -98,44 +98,44 @@ function W(e) {
|
|
|
98
98
|
let T = [];
|
|
99
99
|
if ((l.activeElement === x.current || l.activeElement === h.current) && (T = r(c.current)), T.length > 0) {
|
|
100
100
|
var L, y;
|
|
101
|
-
const
|
|
102
|
-
typeof F != "string" && typeof H != "string" && (
|
|
101
|
+
const D = !!((L = I.current) != null && L.shiftKey && ((y = I.current) == null ? void 0 : y.key) === "Tab"), F = T[0], H = T[T.length - 1];
|
|
102
|
+
typeof F != "string" && typeof H != "string" && (D ? H.focus() : F.focus());
|
|
103
103
|
} else
|
|
104
104
|
E.focus();
|
|
105
105
|
};
|
|
106
106
|
l.addEventListener("focusin", k), l.addEventListener("keydown", v, !0);
|
|
107
|
-
const
|
|
107
|
+
const M = setInterval(() => {
|
|
108
108
|
l.activeElement && l.activeElement.tagName === "BODY" && k();
|
|
109
109
|
}, 50);
|
|
110
110
|
return () => {
|
|
111
|
-
clearInterval(
|
|
111
|
+
clearInterval(M), l.removeEventListener("focusin", k), l.removeEventListener("keydown", v, !0);
|
|
112
112
|
};
|
|
113
113
|
}, [o, n, s, a, d, r]);
|
|
114
|
-
const
|
|
114
|
+
const O = (l) => {
|
|
115
115
|
m.current === null && (m.current = l.relatedTarget), g.current = !0, R.current = l.target;
|
|
116
116
|
const v = t.props.onFocus;
|
|
117
117
|
v && v(l);
|
|
118
|
-
},
|
|
118
|
+
}, P = (l) => {
|
|
119
119
|
m.current === null && (m.current = l.relatedTarget), g.current = !0;
|
|
120
120
|
};
|
|
121
|
-
return /* @__PURE__ */
|
|
121
|
+
return /* @__PURE__ */ Y(f.Fragment, {
|
|
122
122
|
children: [/* @__PURE__ */ S("div", {
|
|
123
123
|
tabIndex: d ? 0 : -1,
|
|
124
|
-
onFocus:
|
|
124
|
+
onFocus: P,
|
|
125
125
|
ref: x,
|
|
126
126
|
"data-testid": "sentinelStart"
|
|
127
127
|
}), /* @__PURE__ */ f.cloneElement(t, {
|
|
128
|
-
ref:
|
|
129
|
-
onFocus:
|
|
128
|
+
ref: w,
|
|
129
|
+
onFocus: O
|
|
130
130
|
}), /* @__PURE__ */ S("div", {
|
|
131
131
|
tabIndex: d ? 0 : -1,
|
|
132
|
-
onFocus:
|
|
132
|
+
onFocus: P,
|
|
133
133
|
ref: h,
|
|
134
134
|
"data-testid": "sentinelEnd"
|
|
135
135
|
})]
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
|
-
process.env.NODE_ENV !== "production" && (
|
|
138
|
+
process.env.NODE_ENV !== "production" && (j.propTypes = {
|
|
139
139
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
140
140
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
141
141
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -143,7 +143,7 @@ process.env.NODE_ENV !== "production" && (W.propTypes = {
|
|
|
143
143
|
/**
|
|
144
144
|
* A single child content element.
|
|
145
145
|
*/
|
|
146
|
-
children:
|
|
146
|
+
children: ne,
|
|
147
147
|
/**
|
|
148
148
|
* If `true`, the focus trap will not automatically shift focus to itself when it opens, and
|
|
149
149
|
* replace it to the last focused element when it closes.
|
|
@@ -189,56 +189,56 @@ process.env.NODE_ENV !== "production" && (W.propTypes = {
|
|
|
189
189
|
*/
|
|
190
190
|
open: i.bool.isRequired
|
|
191
191
|
});
|
|
192
|
-
process.env.NODE_ENV !== "production" && (
|
|
193
|
-
function
|
|
194
|
-
const t =
|
|
195
|
-
return t.body === e ?
|
|
192
|
+
process.env.NODE_ENV !== "production" && (j.propTypes = Ee(j.propTypes));
|
|
193
|
+
function Pe(e) {
|
|
194
|
+
const t = A(e);
|
|
195
|
+
return t.body === e ? z(e).innerWidth > t.documentElement.clientWidth : e.scrollHeight > e.clientHeight;
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function U(e, t) {
|
|
198
198
|
t ? e.setAttribute("aria-hidden", "true") : e.removeAttribute("aria-hidden");
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
return parseInt(
|
|
200
|
+
function Q(e) {
|
|
201
|
+
return parseInt(z(e).getComputedStyle(e).paddingRight, 10) || 0;
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function Ce(e) {
|
|
204
204
|
const o = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"].indexOf(e.tagName) !== -1, n = e.tagName === "INPUT" && e.getAttribute("type") === "hidden";
|
|
205
205
|
return o || n;
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function Z(e, t, o, n, s) {
|
|
208
208
|
const r = [t, o, ...n];
|
|
209
209
|
[].forEach.call(e.children, (a) => {
|
|
210
|
-
const d = r.indexOf(a) === -1, p = !
|
|
211
|
-
d && p &&
|
|
210
|
+
const d = r.indexOf(a) === -1, p = !Ce(a);
|
|
211
|
+
d && p && U(a, s);
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function $(e, t) {
|
|
215
215
|
let o = -1;
|
|
216
216
|
return e.some((n, s) => t(n) ? (o = s, !0) : !1), o;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function Ie(e, t) {
|
|
219
219
|
const o = [], n = e.container;
|
|
220
220
|
if (!t.disableScrollLock) {
|
|
221
|
-
if (
|
|
222
|
-
const a =
|
|
221
|
+
if (Pe(n)) {
|
|
222
|
+
const a = Te(A(n));
|
|
223
223
|
o.push({
|
|
224
224
|
value: n.style.paddingRight,
|
|
225
225
|
property: "padding-right",
|
|
226
226
|
el: n
|
|
227
|
-
}), n.style.paddingRight = `${
|
|
228
|
-
const d =
|
|
227
|
+
}), n.style.paddingRight = `${Q(n) + a}px`;
|
|
228
|
+
const d = A(n).querySelectorAll(".mui-fixed");
|
|
229
229
|
[].forEach.call(d, (p) => {
|
|
230
230
|
o.push({
|
|
231
231
|
value: p.style.paddingRight,
|
|
232
232
|
property: "padding-right",
|
|
233
233
|
el: p
|
|
234
|
-
}), p.style.paddingRight = `${
|
|
234
|
+
}), p.style.paddingRight = `${Q(p) + a}px`;
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
let r;
|
|
238
238
|
if (n.parentNode instanceof DocumentFragment)
|
|
239
|
-
r =
|
|
239
|
+
r = A(n).body;
|
|
240
240
|
else {
|
|
241
|
-
const a = n.parentElement, d =
|
|
241
|
+
const a = n.parentElement, d = z(n);
|
|
242
242
|
r = (a == null ? void 0 : a.nodeName) === "HTML" && d.getComputedStyle(a).overflowY === "scroll" ? a : n;
|
|
243
243
|
}
|
|
244
244
|
o.push({
|
|
@@ -265,13 +265,13 @@ function Pe(e, t) {
|
|
|
265
265
|
});
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function Fe(e) {
|
|
269
269
|
const t = [];
|
|
270
270
|
return [].forEach.call(e.children, (o) => {
|
|
271
271
|
o.getAttribute("aria-hidden") === "true" && t.push(o);
|
|
272
272
|
}), t;
|
|
273
273
|
}
|
|
274
|
-
class
|
|
274
|
+
class Se {
|
|
275
275
|
constructor() {
|
|
276
276
|
this.containers = void 0, this.modals = void 0, this.modals = [], this.containers = [];
|
|
277
277
|
}
|
|
@@ -279,10 +279,10 @@ class Ce {
|
|
|
279
279
|
let n = this.modals.indexOf(t);
|
|
280
280
|
if (n !== -1)
|
|
281
281
|
return n;
|
|
282
|
-
n = this.modals.length, this.modals.push(t), t.modalRef &&
|
|
283
|
-
const s =
|
|
284
|
-
|
|
285
|
-
const r =
|
|
282
|
+
n = this.modals.length, this.modals.push(t), t.modalRef && U(t.modalRef, !1);
|
|
283
|
+
const s = Fe(o);
|
|
284
|
+
Z(o, t.mount, t.modalRef, s, !0);
|
|
285
|
+
const r = $(this.containers, (a) => a.container === o);
|
|
286
286
|
return r !== -1 ? (this.containers[r].modals.push(t), n) : (this.containers.push({
|
|
287
287
|
modals: [t],
|
|
288
288
|
container: o,
|
|
@@ -291,19 +291,19 @@ class Ce {
|
|
|
291
291
|
}), n);
|
|
292
292
|
}
|
|
293
293
|
mount(t, o) {
|
|
294
|
-
const n =
|
|
295
|
-
s.restore || (s.restore =
|
|
294
|
+
const n = $(this.containers, (r) => r.modals.indexOf(t) !== -1), s = this.containers[n];
|
|
295
|
+
s.restore || (s.restore = Ie(s, o));
|
|
296
296
|
}
|
|
297
297
|
remove(t, o = !0) {
|
|
298
298
|
const n = this.modals.indexOf(t);
|
|
299
299
|
if (n === -1)
|
|
300
300
|
return n;
|
|
301
|
-
const s =
|
|
301
|
+
const s = $(this.containers, (a) => a.modals.indexOf(t) !== -1), r = this.containers[s];
|
|
302
302
|
if (r.modals.splice(r.modals.indexOf(t), 1), this.modals.splice(n, 1), r.modals.length === 0)
|
|
303
|
-
r.restore && r.restore(), t.modalRef &&
|
|
303
|
+
r.restore && r.restore(), t.modalRef && U(t.modalRef, o), Z(r.container, t.mount, t.modalRef, r.hiddenSiblings, !1), this.containers.splice(s, 1);
|
|
304
304
|
else {
|
|
305
305
|
const a = r.modals[r.modals.length - 1];
|
|
306
|
-
a.modalRef &&
|
|
306
|
+
a.modalRef && U(a.modalRef, !1);
|
|
307
307
|
}
|
|
308
308
|
return n;
|
|
309
309
|
}
|
|
@@ -311,20 +311,20 @@ class Ce {
|
|
|
311
311
|
return this.modals.length > 0 && this.modals[this.modals.length - 1] === t;
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function Ae(e) {
|
|
315
315
|
return typeof e == "function" ? e() : e;
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function we(e) {
|
|
318
318
|
return e ? e.props.hasOwnProperty("in") : !1;
|
|
319
319
|
}
|
|
320
|
-
const
|
|
321
|
-
function
|
|
320
|
+
const Oe = new Se();
|
|
321
|
+
function De(e) {
|
|
322
322
|
const {
|
|
323
323
|
container: t,
|
|
324
324
|
disableEscapeKeyDown: o = !1,
|
|
325
325
|
disableScrollLock: n = !1,
|
|
326
326
|
// @ts-ignore internal logic - Base UI supports the manager as a prop too
|
|
327
|
-
manager: s =
|
|
327
|
+
manager: s = Oe,
|
|
328
328
|
closeAfterTransition: r = !1,
|
|
329
329
|
onTransitionEnter: a,
|
|
330
330
|
onTransitionExited: d,
|
|
@@ -332,44 +332,44 @@ function we(e) {
|
|
|
332
332
|
onClose: x,
|
|
333
333
|
open: h,
|
|
334
334
|
rootRef: m
|
|
335
|
-
} = e, R = f.useRef({}), g = f.useRef(null), c = f.useRef(null),
|
|
335
|
+
} = e, R = f.useRef({}), g = f.useRef(null), c = f.useRef(null), w = te(c, m), [I, O] = f.useState(!h), P = we(p);
|
|
336
336
|
let l = !0;
|
|
337
337
|
(e["aria-hidden"] === "false" || e["aria-hidden"] === !1) && (l = !1);
|
|
338
|
-
const v = () =>
|
|
338
|
+
const v = () => A(g.current), k = () => (R.current.modalRef = c.current, R.current.mount = g.current, R.current), M = () => {
|
|
339
339
|
s.mount(k(), {
|
|
340
340
|
disableScrollLock: n
|
|
341
341
|
}), c.current && (c.current.scrollTop = 0);
|
|
342
|
-
}, E =
|
|
343
|
-
const b =
|
|
344
|
-
s.add(k(), b), c.current &&
|
|
345
|
-
}), T = f.useCallback(() => s.isTopModal(k()), [s]), L =
|
|
346
|
-
g.current = b, b && (h && T() ?
|
|
342
|
+
}, E = X(() => {
|
|
343
|
+
const b = Ae(t) || v().body;
|
|
344
|
+
s.add(k(), b), c.current && M();
|
|
345
|
+
}), T = f.useCallback(() => s.isTopModal(k()), [s]), L = X((b) => {
|
|
346
|
+
g.current = b, b && (h && T() ? M() : c.current && U(c.current, l));
|
|
347
347
|
}), y = f.useCallback(() => {
|
|
348
348
|
s.remove(k(), l);
|
|
349
349
|
}, [l, s]);
|
|
350
350
|
f.useEffect(() => () => {
|
|
351
351
|
y();
|
|
352
352
|
}, [y]), f.useEffect(() => {
|
|
353
|
-
h ? E() : (!
|
|
354
|
-
}, [h, y,
|
|
355
|
-
const
|
|
356
|
-
var
|
|
357
|
-
(
|
|
353
|
+
h ? E() : (!P || !r) && y();
|
|
354
|
+
}, [h, y, P, r, E]);
|
|
355
|
+
const D = (b) => (u) => {
|
|
356
|
+
var N;
|
|
357
|
+
(N = b.onKeyDown) == null || N.call(b, u), !(u.key !== "Escape" || u.which === 229 || // Wait until IME is settled.
|
|
358
358
|
!T()) && (o || (u.stopPropagation(), x && x(u, "escapeKeyDown")));
|
|
359
359
|
}, F = (b) => (u) => {
|
|
360
|
-
var
|
|
361
|
-
(
|
|
360
|
+
var N;
|
|
361
|
+
(N = b.onClick) == null || N.call(b, u), u.target === u.currentTarget && x && x(u, "backdropClick");
|
|
362
362
|
};
|
|
363
363
|
return {
|
|
364
364
|
getRootProps: (b = {}) => {
|
|
365
|
-
const u =
|
|
365
|
+
const u = de(e);
|
|
366
366
|
delete u.onTransitionEnter, delete u.onTransitionExited;
|
|
367
|
-
const
|
|
367
|
+
const N = C({}, u, b);
|
|
368
368
|
return C({
|
|
369
369
|
role: "presentation"
|
|
370
|
-
},
|
|
371
|
-
onKeyDown:
|
|
372
|
-
ref:
|
|
370
|
+
}, N, {
|
|
371
|
+
onKeyDown: D(N),
|
|
372
|
+
ref: w
|
|
373
373
|
});
|
|
374
374
|
},
|
|
375
375
|
getBackdropProps: (b = {}) => {
|
|
@@ -383,37 +383,37 @@ function we(e) {
|
|
|
383
383
|
},
|
|
384
384
|
getTransitionProps: () => {
|
|
385
385
|
const b = () => {
|
|
386
|
-
|
|
386
|
+
O(!1), a && a();
|
|
387
387
|
}, u = () => {
|
|
388
|
-
|
|
388
|
+
O(!0), d && d(), r && y();
|
|
389
389
|
};
|
|
390
390
|
return {
|
|
391
|
-
onEnter:
|
|
392
|
-
onExited:
|
|
391
|
+
onEnter: J(b, p == null ? void 0 : p.props.onEnter),
|
|
392
|
+
onExited: J(u, p == null ? void 0 : p.props.onExited)
|
|
393
393
|
};
|
|
394
394
|
},
|
|
395
|
-
rootRef:
|
|
395
|
+
rootRef: w,
|
|
396
396
|
portalRef: L,
|
|
397
397
|
isTopModal: T,
|
|
398
398
|
exited: I,
|
|
399
|
-
hasTransition:
|
|
399
|
+
hasTransition: P
|
|
400
400
|
};
|
|
401
401
|
}
|
|
402
|
-
const
|
|
403
|
-
function
|
|
404
|
-
return
|
|
402
|
+
const oe = "Modal";
|
|
403
|
+
function Me(e) {
|
|
404
|
+
return ue(oe, e);
|
|
405
405
|
}
|
|
406
|
-
|
|
407
|
-
const
|
|
406
|
+
fe(oe, ["root", "hidden", "backdrop"]);
|
|
407
|
+
const Le = ["children", "closeAfterTransition", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "onKeyDown", "open", "onTransitionEnter", "onTransitionExited", "slotProps", "slots"], He = (e) => {
|
|
408
408
|
const {
|
|
409
409
|
open: t,
|
|
410
410
|
exited: o
|
|
411
411
|
} = e;
|
|
412
|
-
return
|
|
412
|
+
return be({
|
|
413
413
|
root: ["root", !t && o && "hidden"],
|
|
414
414
|
backdrop: ["backdrop"]
|
|
415
|
-
},
|
|
416
|
-
},
|
|
415
|
+
}, he(Me));
|
|
416
|
+
}, re = /* @__PURE__ */ f.forwardRef(function(t, o) {
|
|
417
417
|
var n;
|
|
418
418
|
const {
|
|
419
419
|
children: s,
|
|
@@ -427,11 +427,11 @@ const Ae = ["children", "closeAfterTransition", "container", "disableAutoFocus",
|
|
|
427
427
|
disableScrollLock: R = !1,
|
|
428
428
|
hideBackdrop: g = !1,
|
|
429
429
|
keepMounted: c = !1,
|
|
430
|
-
onBackdropClick:
|
|
430
|
+
onBackdropClick: w,
|
|
431
431
|
open: I,
|
|
432
|
-
slotProps:
|
|
433
|
-
slots:
|
|
434
|
-
} = t, l =
|
|
432
|
+
slotProps: O = {},
|
|
433
|
+
slots: P = {}
|
|
434
|
+
} = t, l = pe(t, Le), v = C({}, t, {
|
|
435
435
|
closeAfterTransition: r,
|
|
436
436
|
disableAutoFocus: d,
|
|
437
437
|
disableEnforceFocus: p,
|
|
@@ -443,60 +443,60 @@ const Ae = ["children", "closeAfterTransition", "container", "disableAutoFocus",
|
|
|
443
443
|
keepMounted: c
|
|
444
444
|
}), {
|
|
445
445
|
getRootProps: k,
|
|
446
|
-
getBackdropProps:
|
|
446
|
+
getBackdropProps: M,
|
|
447
447
|
getTransitionProps: E,
|
|
448
448
|
portalRef: T,
|
|
449
449
|
isTopModal: L,
|
|
450
450
|
exited: y,
|
|
451
|
-
hasTransition:
|
|
452
|
-
} =
|
|
451
|
+
hasTransition: D
|
|
452
|
+
} = De(C({}, v, {
|
|
453
453
|
rootRef: o
|
|
454
454
|
})), F = C({}, v, {
|
|
455
455
|
exited: y,
|
|
456
|
-
hasTransition:
|
|
457
|
-
}), H =
|
|
458
|
-
if (s.props.tabIndex === void 0 && (
|
|
456
|
+
hasTransition: D
|
|
457
|
+
}), H = He(F), K = {};
|
|
458
|
+
if (s.props.tabIndex === void 0 && (K.tabIndex = "-1"), D) {
|
|
459
459
|
const {
|
|
460
460
|
onEnter: B,
|
|
461
|
-
onExited:
|
|
461
|
+
onExited: W
|
|
462
462
|
} = E();
|
|
463
|
-
|
|
463
|
+
K.onEnter = B, K.onExited = W;
|
|
464
464
|
}
|
|
465
|
-
const
|
|
466
|
-
elementType:
|
|
467
|
-
externalSlotProps:
|
|
465
|
+
const q = (n = P.root) != null ? n : "div", b = G({
|
|
466
|
+
elementType: q,
|
|
467
|
+
externalSlotProps: O.root,
|
|
468
468
|
externalForwardedProps: l,
|
|
469
469
|
getSlotProps: k,
|
|
470
470
|
className: H.root,
|
|
471
471
|
ownerState: F
|
|
472
|
-
}), u =
|
|
472
|
+
}), u = P.backdrop, N = G({
|
|
473
473
|
elementType: u,
|
|
474
|
-
externalSlotProps:
|
|
475
|
-
getSlotProps: (B) =>
|
|
476
|
-
onClick: (
|
|
477
|
-
|
|
474
|
+
externalSlotProps: O.backdrop,
|
|
475
|
+
getSlotProps: (B) => M(C({}, B, {
|
|
476
|
+
onClick: (W) => {
|
|
477
|
+
w && w(W), B != null && B.onClick && B.onClick(W);
|
|
478
478
|
}
|
|
479
479
|
})),
|
|
480
480
|
className: H.backdrop,
|
|
481
481
|
ownerState: F
|
|
482
482
|
});
|
|
483
|
-
return !c && !I && (!
|
|
483
|
+
return !c && !I && (!D || y) ? null : /* @__PURE__ */ S(me, {
|
|
484
484
|
ref: T,
|
|
485
485
|
container: a,
|
|
486
486
|
disablePortal: h,
|
|
487
|
-
children: /* @__PURE__ */
|
|
488
|
-
children: [!g && u ? /* @__PURE__ */ S(u, C({},
|
|
487
|
+
children: /* @__PURE__ */ Y(q, C({}, b, {
|
|
488
|
+
children: [!g && u ? /* @__PURE__ */ S(u, C({}, N)) : null, /* @__PURE__ */ S(j, {
|
|
489
489
|
disableEnforceFocus: p,
|
|
490
490
|
disableAutoFocus: d,
|
|
491
491
|
disableRestoreFocus: m,
|
|
492
492
|
isEnabled: L,
|
|
493
493
|
open: I,
|
|
494
|
-
children: /* @__PURE__ */ f.cloneElement(s,
|
|
494
|
+
children: /* @__PURE__ */ f.cloneElement(s, K)
|
|
495
495
|
})]
|
|
496
496
|
}))
|
|
497
497
|
});
|
|
498
498
|
});
|
|
499
|
-
process.env.NODE_ENV !== "production" && (
|
|
499
|
+
process.env.NODE_ENV !== "production" && (re.propTypes = {
|
|
500
500
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
501
501
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
502
502
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -504,7 +504,7 @@ process.env.NODE_ENV !== "production" && (ne.propTypes = {
|
|
|
504
504
|
/**
|
|
505
505
|
* A single child content element.
|
|
506
506
|
*/
|
|
507
|
-
children:
|
|
507
|
+
children: ne.isRequired,
|
|
508
508
|
/**
|
|
509
509
|
* When set to true the Modal waits until a nested Transition is completed before closing.
|
|
510
510
|
* @default false
|
|
@@ -520,7 +520,7 @@ process.env.NODE_ENV !== "production" && (ne.propTypes = {
|
|
|
520
520
|
* By default, it uses the body of the top-level document object,
|
|
521
521
|
* so it's simply `document.body` most of the time.
|
|
522
522
|
*/
|
|
523
|
-
container: i.oneOfType([
|
|
523
|
+
container: i.oneOfType([ge, i.func]),
|
|
524
524
|
/**
|
|
525
525
|
* If `true`, the modal will not automatically shift focus to itself when it opens, and
|
|
526
526
|
* replace it to the last focused element when it closes.
|
|
@@ -615,34 +615,32 @@ process.env.NODE_ENV !== "production" && (ne.propTypes = {
|
|
|
615
615
|
root: i.elementType
|
|
616
616
|
})
|
|
617
617
|
});
|
|
618
|
-
const
|
|
619
|
-
|
|
620
|
-
dialogTitle: t,
|
|
621
|
-
dialogSubtitle: o,
|
|
622
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
623
|
-
isLoading: n = !1,
|
|
624
|
-
onClose: s,
|
|
625
|
-
...r
|
|
626
|
-
}) => /* @__PURE__ */ S(
|
|
627
|
-
ne,
|
|
618
|
+
const _ = ({ children: e, dialogTitle: t, dialogSubtitle: o, onClose: n, ...s }) => /* @__PURE__ */ S(
|
|
619
|
+
re,
|
|
628
620
|
{
|
|
629
|
-
onClose:
|
|
630
|
-
slots: { backdrop:
|
|
631
|
-
...
|
|
632
|
-
className:
|
|
621
|
+
onClose: n,
|
|
622
|
+
slots: { backdrop: ae },
|
|
623
|
+
...s,
|
|
624
|
+
className: se(V.dialog, s.className),
|
|
633
625
|
"aria-labelledby": "alert-dialog-title",
|
|
634
626
|
"aria-describedby": "alert-dialog-description",
|
|
635
|
-
children: /* @__PURE__ */
|
|
636
|
-
!!
|
|
637
|
-
/* @__PURE__ */ S(
|
|
627
|
+
children: /* @__PURE__ */ Y("section", { className: V.dialog__panel, children: [
|
|
628
|
+
!!n && /* @__PURE__ */ S(le, { handleOnClose: n, className: V.dialog__close }),
|
|
629
|
+
/* @__PURE__ */ S(ee, { title: t, subTitle: o }),
|
|
638
630
|
e
|
|
639
631
|
] })
|
|
640
632
|
}
|
|
641
633
|
);
|
|
634
|
+
_.Title = ee;
|
|
635
|
+
_.Title.displayName = "Dialog.Title";
|
|
636
|
+
_.Content = ce;
|
|
637
|
+
_.Content.displayName = "Dialog.Content";
|
|
638
|
+
_.Actions = ie;
|
|
639
|
+
_.Actions.displayName = "Dialog.Actions";
|
|
642
640
|
export {
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
641
|
+
ie as Actions,
|
|
642
|
+
ce as Content,
|
|
643
|
+
_ as Dialog,
|
|
644
|
+
ee as DialogTitle,
|
|
645
|
+
_ as default
|
|
648
646
|
};
|
|
@@ -3,13 +3,17 @@ import { StoryObj } from '@storybook/react';
|
|
|
3
3
|
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
|
-
component:
|
|
6
|
+
component: {
|
|
7
|
+
({ children, dialogTitle, dialogSubtitle, onClose, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
Title: import('react').FunctionComponent<import('./DialogTitle').DialogTitleProps>;
|
|
9
|
+
Content: import('react').FunctionComponent<import('./Content').DialogContentProps>;
|
|
10
|
+
Actions: import('react').FunctionComponent<import('./Actions').DialogActionProps>;
|
|
11
|
+
};
|
|
7
12
|
tags: string[];
|
|
8
13
|
decorators: ((Story: import('@storybook/types').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
9
14
|
children: import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<unknown>>;
|
|
10
15
|
dialogTitle: import('react').ReactNode;
|
|
11
16
|
dialogSubtitle?: import('react').ReactNode;
|
|
12
|
-
isLoading?: boolean | undefined;
|
|
13
17
|
onClose?: (() => void) | undefined;
|
|
14
18
|
closeAfterTransition?: boolean | undefined;
|
|
15
19
|
container?: Element | (() => Element | null) | null | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as l, Fragment as o, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { Typography as r } from "../Typography/Typography.js";
|
|
3
|
-
import { s as a } from "../../Dialog.module-
|
|
3
|
+
import { s as a } from "../../Dialog.module-D9e4RsKo.js";
|
|
4
4
|
const n = ({ title: t, subTitle: i }) => /* @__PURE__ */ l(o, { children: [
|
|
5
5
|
/* @__PURE__ */ e(
|
|
6
6
|
r,
|
|
@@ -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-CRfZgFJp.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",
|
|
@@ -5,8 +5,8 @@ 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-
|
|
9
|
-
import "../Dialog/
|
|
8
|
+
import { R as I, R as b } from "../../Toggle-CRfZgFJp.js";
|
|
9
|
+
import "../Dialog/Dialog.js";
|
|
10
10
|
import "../IconButton/IconButton.js";
|
|
11
11
|
import "../Select/Select.js";
|
|
12
12
|
import "../Table/Table.js";
|
|
@@ -4,8 +4,8 @@ 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-
|
|
8
|
-
import "../Dialog/
|
|
7
|
+
import { T as b } from "../../Toggle-CRfZgFJp.js";
|
|
8
|
+
import "../Dialog/Dialog.js";
|
|
9
9
|
import "../IconButton/IconButton.js";
|
|
10
10
|
import "../Select/Select.js";
|
|
11
11
|
import "../Table/Table.js";
|
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-CRfZgFJp.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";
|
package/package.json
CHANGED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import './assets/Dialog.css';
|
|
2
|
-
const _ = "_dialog__subtitle_1qs0q_53", a = "_dialog_1qs0q_53", o = "_dialog__backdrop_1qs0q_88", s = "_dialog__panel_1qs0q_96", p = "_dialog__title_1qs0q_57", t = "_dialog__divider_1qs0q_122", g = "_dialog__actions_1qs0q_135", y = {
|
|
3
|
-
"u-typography-h1": "_u-typography-h1_1qs0q_1",
|
|
4
|
-
"u-typography-h2": "_u-typography-h2_1qs0q_8",
|
|
5
|
-
"u-typography-h3": "_u-typography-h3_1qs0q_15",
|
|
6
|
-
"u-typography-h4": "_u-typography-h4_1qs0q_22",
|
|
7
|
-
"u-typography-h5": "_u-typography-h5_1qs0q_29",
|
|
8
|
-
"u-typography-h6": "_u-typography-h6_1qs0q_36",
|
|
9
|
-
"u-typography-base": "_u-typography-base_1qs0q_43",
|
|
10
|
-
"u-typography-base--xxl": "_u-typography-base--xxl_1qs0q_49",
|
|
11
|
-
"u-typography-base--xl": "_u-typography-base--xl_1qs0q_53",
|
|
12
|
-
dialog__subtitle: _,
|
|
13
|
-
"u-typography-base--lg": "_u-typography-base--lg_1qs0q_57",
|
|
14
|
-
"dialog__title--small": "_dialog__title--small_1qs0q_57",
|
|
15
|
-
"u-typography-base--sm": "_u-typography-base--sm_1qs0q_61",
|
|
16
|
-
"u-typography-base--bold": "_u-typography-base--bold_1qs0q_65",
|
|
17
|
-
"u-typography-base--strikethrough": "_u-typography-base--strikethrough_1qs0q_68",
|
|
18
|
-
"u-typography-base--underlined": "_u-typography-base--underlined_1qs0q_71",
|
|
19
|
-
"u-typography-base--strikethrough-underlined": "_u-typography-base--strikethrough-underlined_1qs0q_74",
|
|
20
|
-
dialog: a,
|
|
21
|
-
dialog__backdrop: o,
|
|
22
|
-
dialog__panel: s,
|
|
23
|
-
dialog__title: p,
|
|
24
|
-
dialog__divider: t,
|
|
25
|
-
"dialog__close-icon": "_dialog__close-icon_1qs0q_126",
|
|
26
|
-
dialog__actions: g
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
y as s
|
|
30
|
-
};
|
package/dist/Toggle-BQPzu8NV.js
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
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
|
-
};
|