@pismo/marola 1.0.0-beta.16 → 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/Table.css +1 -1
- package/dist/assets/Toggle2.css +1 -1
- package/dist/components/Adornment/adornment.test.d.ts +1 -0
- 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/RowItem/rowItem.test.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +3 -1
- package/dist/components/Table/Table.js +101 -98
- package/dist/components/Table/Table.stories.d.ts +1 -1
- package/dist/components/TextDisplay/TextDisplay.js +34 -27
- 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
|
@@ -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",
|