@frontify/fondue-components 29.2.0 → 30.0.0
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/fondue-components10.js +89 -84
- package/dist/fondue-components10.js.map +1 -1
- package/dist/fondue-components100.js +1 -1
- package/dist/fondue-components112.js +14 -14
- package/dist/fondue-components114.js +1 -1
- package/dist/fondue-components118.js +216 -16
- package/dist/fondue-components118.js.map +1 -1
- package/dist/fondue-components119.js +19 -14
- package/dist/fondue-components119.js.map +1 -1
- package/dist/fondue-components120.js +16 -16
- package/dist/fondue-components120.js.map +1 -1
- package/dist/fondue-components121.js +147 -107
- package/dist/fondue-components121.js.map +1 -1
- package/dist/fondue-components122.js +44 -12
- package/dist/fondue-components122.js.map +1 -1
- package/dist/fondue-components123.js +17 -17
- package/dist/fondue-components123.js.map +1 -1
- package/dist/fondue-components124.js +14 -13
- package/dist/fondue-components124.js.map +1 -1
- package/dist/fondue-components125.js +16 -32
- package/dist/fondue-components125.js.map +1 -1
- package/dist/fondue-components126.js +111 -6
- package/dist/fondue-components126.js.map +1 -1
- package/dist/fondue-components127.js +12 -126
- package/dist/fondue-components127.js.map +1 -1
- package/dist/fondue-components128.js +16 -10
- package/dist/fondue-components128.js.map +1 -1
- package/dist/fondue-components129.js +12 -35
- package/dist/fondue-components129.js.map +1 -1
- package/dist/fondue-components130.js +122 -212
- package/dist/fondue-components130.js.map +1 -1
- package/dist/fondue-components131.js +11 -19
- package/dist/fondue-components131.js.map +1 -1
- package/dist/fondue-components132.js +35 -16
- package/dist/fondue-components132.js.map +1 -1
- package/dist/fondue-components133.js +32 -150
- package/dist/fondue-components133.js.map +1 -1
- package/dist/fondue-components134.js +6 -45
- package/dist/fondue-components134.js.map +1 -1
- package/dist/fondue-components135.js +6 -170
- package/dist/fondue-components135.js.map +1 -1
- package/dist/fondue-components136.js +12 -60
- package/dist/fondue-components136.js.map +1 -1
- package/dist/fondue-components137.js +71 -9
- package/dist/fondue-components137.js.map +1 -1
- package/dist/fondue-components138.js +14 -255
- package/dist/fondue-components138.js.map +1 -1
- package/dist/fondue-components139.js +10 -0
- package/dist/fondue-components139.js.map +1 -0
- package/dist/fondue-components140.js +87 -40
- package/dist/fondue-components140.js.map +1 -1
- package/dist/fondue-components141.js +80 -40
- package/dist/fondue-components141.js.map +1 -1
- package/dist/fondue-components142.js +31 -6
- package/dist/fondue-components142.js.map +1 -1
- package/dist/fondue-components143.js +169 -11
- package/dist/fondue-components143.js.map +1 -1
- package/dist/fondue-components144.js +59 -70
- package/dist/fondue-components144.js.map +1 -1
- package/dist/fondue-components145.js +9 -15
- package/dist/fondue-components145.js.map +1 -1
- package/dist/fondue-components146.js +256 -7
- package/dist/fondue-components146.js.map +1 -1
- package/dist/fondue-components147.js +17 -87
- package/dist/fondue-components147.js.map +1 -1
- package/dist/fondue-components149.js +41 -30
- package/dist/fondue-components149.js.map +1 -1
- package/dist/fondue-components150.js +40 -18
- package/dist/fondue-components150.js.map +1 -1
- package/dist/fondue-components151.js +20 -69
- package/dist/fondue-components151.js.map +1 -1
- package/dist/fondue-components152.js +37 -1349
- package/dist/fondue-components152.js.map +1 -1
- package/dist/fondue-components153.js +59 -930
- package/dist/fondue-components153.js.map +1 -1
- package/dist/fondue-components154.js +1322 -168
- package/dist/fondue-components154.js.map +1 -1
- package/dist/fondue-components155.js +937 -17
- package/dist/fondue-components155.js.map +1 -1
- package/dist/fondue-components156.js +197 -39
- package/dist/fondue-components156.js.map +1 -1
- package/dist/fondue-components158.js +1 -1
- package/dist/fondue-components165.js +17 -8
- package/dist/fondue-components165.js.map +1 -1
- package/dist/fondue-components166.js +8 -17
- package/dist/fondue-components166.js.map +1 -1
- package/dist/fondue-components48.js +1 -1
- package/dist/fondue-components49.js +1 -1
- package/dist/fondue-components50.js +1 -1
- package/dist/fondue-components51.js +2 -2
- package/dist/fondue-components52.js +2 -2
- package/dist/fondue-components55.js +1 -1
- package/dist/fondue-components65.js +2 -2
- package/dist/fondue-components66.js +3 -3
- package/dist/fondue-components67.js +2 -2
- package/dist/fondue-components79.js +2 -2
- package/dist/fondue-components82.js +1 -1
- package/dist/fondue-components83.js +1 -1
- package/dist/fondue-components84.js +1 -1
- package/dist/fondue-components87.js +1 -1
- package/dist/fondue-components89.js +6 -6
- package/dist/fondue-components95.js +2 -2
- package/dist/fondue-components96.js +2 -2
- package/dist/fondue-components97.js +2 -2
- package/dist/fondue-components98.js +2 -2
- package/dist/fondue-components99.js +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/fondue-components148.js +0 -84
- package/dist/fondue-components148.js.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { IconCross as
|
|
1
|
+
import { jsx as o, jsxs as G } from "react/jsx-runtime";
|
|
2
|
+
import { IconCross as J } from "@frontify/fondue-icons";
|
|
3
3
|
import * as r from "@radix-ui/react-dialog";
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { useSyncRefs as
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
import { addShowFocusRing as
|
|
8
|
-
import { useFondueTheme as
|
|
4
|
+
import { createContext as Q, forwardRef as u, useRef as U, useContext as S, useMemo as V } from "react";
|
|
5
|
+
import { useSyncRefs as W } from "./fondue-components59.js";
|
|
6
|
+
import { useTranslation as X } from "./fondue-components43.js";
|
|
7
|
+
import { addShowFocusRing as Y, addAutoFocusAttribute as Z } from "./fondue-components60.js";
|
|
8
|
+
import { useFondueTheme as E, ThemeProvider as K } from "./fondue-components40.js";
|
|
9
9
|
import s from "./fondue-components61.js";
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
return /* @__PURE__ */ o(
|
|
10
|
+
const p = Q({ isModal: !1, dismissable: !0 });
|
|
11
|
+
p.displayName = "DialogContext";
|
|
12
|
+
const F = ({ children: t, modal: e, onOpenChange: a, open: i, dismissable: n = !0 }) => {
|
|
13
|
+
const d = V(() => ({ isModal: e ?? !1, dismissable: n }), [e, n]);
|
|
14
|
+
return /* @__PURE__ */ o(p.Provider, { value: d, children: /* @__PURE__ */ o(r.Root, { open: i, onOpenChange: a, modal: e, children: t }) });
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
const
|
|
16
|
+
F.displayName = "Dialog.Root";
|
|
17
|
+
const O = ({ asChild: t = !0, children: e, "data-test-id": a = "fondue-dialog-trigger" }, i) => /* @__PURE__ */ o(
|
|
18
18
|
r.Trigger,
|
|
19
19
|
{
|
|
20
|
-
onMouseDown:
|
|
20
|
+
onMouseDown: Z,
|
|
21
21
|
"data-auto-focus-visible": "true",
|
|
22
22
|
"data-auto-focus-trigger": !0,
|
|
23
23
|
"data-test-id": a,
|
|
@@ -26,31 +26,35 @@ const R = ({ asChild: t = !0, children: e, "data-test-id": a = "fondue-dialog-tr
|
|
|
26
26
|
children: e
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
const { isModal: a } =
|
|
29
|
+
O.displayName = "Dialog.Trigger";
|
|
30
|
+
const tt = ({ children: t, showUnderlay: e }) => {
|
|
31
|
+
const { isModal: a } = S(p);
|
|
32
32
|
return a ? /* @__PURE__ */ o(r.Overlay, { "data-visible": e, className: s.underlay, children: t }) : /* @__PURE__ */ o("div", { className: s.underlay, "data-visible": e, children: t });
|
|
33
|
-
},
|
|
33
|
+
}, q = ({
|
|
34
34
|
maxWidth: t = "800px",
|
|
35
35
|
minWidth: e = "400px",
|
|
36
36
|
minHeight: a = "200px",
|
|
37
37
|
padding: i = "compact",
|
|
38
38
|
verticalAlign: n = "center",
|
|
39
|
-
"data-test-id":
|
|
40
|
-
showUnderlay:
|
|
41
|
-
rounded:
|
|
42
|
-
onEscapeKeyDown:
|
|
43
|
-
children:
|
|
44
|
-
},
|
|
45
|
-
const { theme:
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
39
|
+
"data-test-id": d = "fondue-dialog-content",
|
|
40
|
+
showUnderlay: g = !1,
|
|
41
|
+
rounded: m = !0,
|
|
42
|
+
onEscapeKeyDown: f,
|
|
43
|
+
children: B
|
|
44
|
+
}, I) => {
|
|
45
|
+
const { theme: z, dir: C } = E(), c = U(null), { dismissable: v } = S(p);
|
|
46
|
+
W(c, I);
|
|
47
|
+
const L = (l) => {
|
|
48
|
+
v || l.preventDefault(), f == null || f(l);
|
|
49
|
+
}, _ = (l) => {
|
|
50
|
+
v || l.preventDefault();
|
|
51
|
+
}, k = (l) => {
|
|
52
|
+
var T, h, R;
|
|
53
|
+
l.preventDefault();
|
|
54
|
+
const y = 'button:not([data-tooltip-trigger="true"]), [href], input, select, textarea, [tabindex]:not([tabindex="-1"])', D = (T = c.current) == null ? void 0 : T.querySelector('[data-dialog-layout-component="body"]'), N = (h = c.current) == null ? void 0 : h.querySelector('[data-dialog-layout-component="footer"]'), b = (R = c.current) == null ? void 0 : R.querySelector('[data-dialog-layout-component="header"]'), x = (D == null ? void 0 : D.querySelector(y)) || (N == null ? void 0 : N.querySelector(y)) || (b == null ? void 0 : b.querySelector(y));
|
|
55
|
+
x instanceof HTMLElement && x.focus();
|
|
52
56
|
};
|
|
53
|
-
return /* @__PURE__ */ o(r.Portal, { children: /* @__PURE__ */ o(
|
|
57
|
+
return /* @__PURE__ */ o(r.Portal, { children: /* @__PURE__ */ o(K, { theme: z, dir: C, children: /* @__PURE__ */ o(tt, { showUnderlay: g, children: /* @__PURE__ */ o(
|
|
54
58
|
r.Content,
|
|
55
59
|
{
|
|
56
60
|
style: {
|
|
@@ -58,35 +62,36 @@ const X = ({ children: t, showUnderlay: e }) => {
|
|
|
58
62
|
"--dialog-min-width": e,
|
|
59
63
|
"--dialog-min-height": a
|
|
60
64
|
},
|
|
61
|
-
ref:
|
|
65
|
+
ref: c,
|
|
62
66
|
className: s.content,
|
|
63
|
-
onFocus:
|
|
64
|
-
onOpenAutoFocus:
|
|
65
|
-
onEscapeKeyDown:
|
|
67
|
+
onFocus: Y,
|
|
68
|
+
onOpenAutoFocus: k,
|
|
69
|
+
onEscapeKeyDown: L,
|
|
70
|
+
onInteractOutside: _,
|
|
66
71
|
"data-dialog-padding": i,
|
|
67
|
-
"data-dialog-rounded":
|
|
68
|
-
"data-test-id":
|
|
72
|
+
"data-dialog-rounded": m,
|
|
73
|
+
"data-test-id": d,
|
|
69
74
|
"data-dialog-vertical-align": n,
|
|
70
|
-
dir:
|
|
71
|
-
children:
|
|
75
|
+
dir: C,
|
|
76
|
+
children: B
|
|
72
77
|
}
|
|
73
78
|
) }) }) });
|
|
74
79
|
};
|
|
75
|
-
|
|
76
|
-
const
|
|
80
|
+
q.displayName = "Dialog.Content";
|
|
81
|
+
const M = ({
|
|
77
82
|
padding: t,
|
|
78
83
|
showBorder: e = !0,
|
|
79
84
|
showCloseButton: a = !0,
|
|
80
85
|
closeProps: i,
|
|
81
86
|
children: n,
|
|
82
|
-
"data-test-id":
|
|
83
|
-
},
|
|
84
|
-
const { t:
|
|
85
|
-
return /* @__PURE__ */
|
|
87
|
+
"data-test-id": d = "fondue-dialog-header"
|
|
88
|
+
}, g) => {
|
|
89
|
+
const { t: m } = X();
|
|
90
|
+
return /* @__PURE__ */ G(
|
|
86
91
|
"div",
|
|
87
92
|
{
|
|
88
|
-
"data-test-id":
|
|
89
|
-
ref:
|
|
93
|
+
"data-test-id": d,
|
|
94
|
+
ref: g,
|
|
90
95
|
className: s.header,
|
|
91
96
|
"data-dialog-header-padding": t,
|
|
92
97
|
"data-show-border": e,
|
|
@@ -97,18 +102,18 @@ const h = ({
|
|
|
97
102
|
r.Close,
|
|
98
103
|
{
|
|
99
104
|
role: "button",
|
|
100
|
-
"data-test-id": `${
|
|
101
|
-
"aria-label":
|
|
105
|
+
"data-test-id": `${d}-close`,
|
|
106
|
+
"aria-label": m("Dialog_close"),
|
|
102
107
|
...i,
|
|
103
|
-
children: /* @__PURE__ */ o(
|
|
108
|
+
children: /* @__PURE__ */ o(J, { size: 20 })
|
|
104
109
|
}
|
|
105
110
|
)
|
|
106
111
|
]
|
|
107
112
|
}
|
|
108
113
|
);
|
|
109
114
|
};
|
|
110
|
-
|
|
111
|
-
const
|
|
115
|
+
M.displayName = "Dialog.Header";
|
|
116
|
+
const $ = ({ padding: t, showBorder: e = !0, children: a, "data-test-id": i = "fondue-dialog-footer" }, n) => /* @__PURE__ */ o(
|
|
112
117
|
"div",
|
|
113
118
|
{
|
|
114
119
|
"data-test-id": i,
|
|
@@ -120,8 +125,8 @@ const F = ({ padding: t, showBorder: e = !0, children: a, "data-test-id": i = "f
|
|
|
120
125
|
children: a
|
|
121
126
|
}
|
|
122
127
|
);
|
|
123
|
-
|
|
124
|
-
const
|
|
128
|
+
$.displayName = "Dialog.Footer";
|
|
129
|
+
const j = ({ padding: t, children: e, "data-test-id": a = "fondue-dialog-body" }, i) => /* @__PURE__ */ o(
|
|
125
130
|
"div",
|
|
126
131
|
{
|
|
127
132
|
"data-test-id": a,
|
|
@@ -132,50 +137,50 @@ const q = ({ padding: t, children: e, "data-test-id": a = "fondue-dialog-body" }
|
|
|
132
137
|
children: e
|
|
133
138
|
}
|
|
134
139
|
);
|
|
135
|
-
|
|
140
|
+
j.displayName = "Dialog.Body";
|
|
136
141
|
const w = ({ children: t, "data-test-id": e = "fondue-dialog-side-content" }, a) => /* @__PURE__ */ o("div", { "data-test-id": e, ref: a, className: s.sideContent, "data-dialog-layout-component": !0, children: t });
|
|
137
142
|
w.displayName = "Dialog.SideContent";
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
const
|
|
143
|
+
const A = ({ children: t }) => /* @__PURE__ */ o(r.Close, { asChild: !0, children: t });
|
|
144
|
+
A.displayName = "Dialog.Close";
|
|
145
|
+
const H = ({ children: t, asChild: e, screenReaderOnly: a = !1 }) => a && !e ? /* @__PURE__ */ o(r.Title, { asChild: !0, children: /* @__PURE__ */ o("span", { className: s.screenReaderOnly, children: t }) }) : a && e ? /* @__PURE__ */ o(r.Title, { asChild: !0, children: typeof t == "object" && t && "props" in t ? {
|
|
141
146
|
...t,
|
|
142
147
|
props: {
|
|
143
148
|
...t.props,
|
|
144
149
|
className: `${t.props.className || ""} ${s.screenReaderOnly}`.trim()
|
|
145
150
|
}
|
|
146
151
|
} : t }) : /* @__PURE__ */ o(r.Title, { asChild: e, children: t });
|
|
147
|
-
|
|
148
|
-
const
|
|
152
|
+
H.displayName = "Dialog.Title";
|
|
153
|
+
const P = ({ children: t, asChild: e, screenReaderOnly: a = !1 }) => a && !e ? /* @__PURE__ */ o(r.Description, { asChild: !0, children: /* @__PURE__ */ o("span", { className: s.screenReaderOnly, children: t }) }) : a && e ? /* @__PURE__ */ o(r.Description, { asChild: !0, children: typeof t == "object" && t && "props" in t ? {
|
|
149
154
|
...t,
|
|
150
155
|
props: {
|
|
151
156
|
...t.props,
|
|
152
157
|
className: `${t.props.className || ""} ${s.screenReaderOnly}`.trim()
|
|
153
158
|
}
|
|
154
159
|
} : t }) : /* @__PURE__ */ o(r.Description, { asChild: e, children: t });
|
|
155
|
-
|
|
156
|
-
const
|
|
157
|
-
Root:
|
|
158
|
-
Title:
|
|
159
|
-
Description:
|
|
160
|
-
Close:
|
|
161
|
-
Trigger:
|
|
162
|
-
Content:
|
|
163
|
-
Header:
|
|
164
|
-
Footer:
|
|
165
|
-
Body:
|
|
166
|
-
SideContent:
|
|
160
|
+
P.displayName = "Dialog.Description";
|
|
161
|
+
const lt = {
|
|
162
|
+
Root: F,
|
|
163
|
+
Title: H,
|
|
164
|
+
Description: P,
|
|
165
|
+
Close: A,
|
|
166
|
+
Trigger: u(O),
|
|
167
|
+
Content: u(q),
|
|
168
|
+
Header: u(M),
|
|
169
|
+
Footer: u($),
|
|
170
|
+
Body: u(j),
|
|
171
|
+
SideContent: u(w)
|
|
167
172
|
};
|
|
168
173
|
export {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
lt as Dialog,
|
|
175
|
+
j as DialogBody,
|
|
176
|
+
A as DialogClose,
|
|
177
|
+
q as DialogContent,
|
|
178
|
+
P as DialogDescription,
|
|
179
|
+
$ as DialogFooter,
|
|
180
|
+
M as DialogHeader,
|
|
181
|
+
F as DialogRoot,
|
|
177
182
|
w as DialogSideContent,
|
|
178
|
-
|
|
179
|
-
|
|
183
|
+
H as DialogTitle,
|
|
184
|
+
O as DialogTrigger
|
|
180
185
|
};
|
|
181
186
|
//# sourceMappingURL=fondue-components10.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components10.js","sources":["../src/components/Dialog/Dialog.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixDialog from '@radix-ui/react-dialog';\nimport {\n createContext,\n forwardRef,\n useContext,\n useMemo,\n useRef,\n type CSSProperties,\n type ForwardedRef,\n type ReactNode,\n} from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { useSyncRefs } from '#/hooks/useSyncRefs';\nimport { useTranslation } from '#/hooks/useTranslation';\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport styles from './styles/dialog.module.scss';\n\nexport type DialogRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the dialog\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport type DialogContentProps = {\n /**\n * Add rounded corners to the dialog\n * @default true\n */\n rounded?: boolean;\n /**\n * Define the padding of the dialog\n * @default \"compact\"\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * The vertical alignment of the divider\n * @default \"center\"\n */\n verticalAlign?: 'top' | 'center';\n\n /**\n * Define a maximum width for the dialog\n * @default \"800px\"\n */\n maxWidth?: string;\n /**\n * Define a minimum width for the dialog\n * @default \"400px\"\n */\n minWidth?: string;\n /**\n * Define a minimum height for the dialog\n * @default \"200px\"\n */\n minHeight?: string;\n /**\n * Show a dark underlay behind the dialog\n * @default false\n */\n showUnderlay?: boolean;\n /**\n * Event handler called when the escape key is pressed.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogHeaderProps = {\n /**\n * Define the padding for the dialog header\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Show a border at the bottom of the header\n * @default true\n */\n showBorder?: boolean;\n /**\n * Show a close button in the header\n * @default true\n */\n showCloseButton?: boolean;\n closeProps?: CommonAriaProps;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogFooterProps = {\n /**\n * Define the padding for the dialog footer\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Show a border at the top of the footer\n * @default true\n */\n showBorder?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogBodyProps = {\n /**\n * Define the padding for the dialog body\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogSideContentProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type DialogCloseProps = { children?: ReactNode };\n\nexport type DialogAnnouncementProps = {\n children?: ReactNode;\n asChild?: boolean;\n /**\n * Visually hide the element while keeping it accessible to screen readers\n * @default false\n */\n screenReaderOnly?: boolean;\n};\n\ntype DialogContextType = {\n isModal: boolean;\n};\n\nconst DialogContext = createContext<DialogContextType>({ isModal: false });\nDialogContext.displayName = 'DialogContext';\n\nexport const DialogRoot = ({ children, modal, onOpenChange, open }: DialogRootProps) => {\n const value = useMemo(() => ({ isModal: modal ?? false }), [modal]);\n\n return (\n <DialogContext.Provider value={value}>\n <RadixDialog.Root open={open} onOpenChange={onOpenChange} modal={modal}>\n {children}\n </RadixDialog.Root>\n </DialogContext.Provider>\n );\n};\nDialogRoot.displayName = 'Dialog.Root';\n\nexport const DialogTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-dialog-trigger' }: DialogTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixDialog.Trigger\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild={asChild}\n ref={ref}\n >\n {children}\n </RadixDialog.Trigger>\n );\n};\nDialogTrigger.displayName = 'Dialog.Trigger';\n\nconst DialogUnderlay = ({ children, showUnderlay }: { children: ReactNode; showUnderlay: boolean }) => {\n const { isModal } = useContext(DialogContext);\n if (isModal) {\n return (\n <RadixDialog.Overlay data-visible={showUnderlay} className={styles.underlay}>\n {children}\n </RadixDialog.Overlay>\n );\n }\n return (\n <div className={styles.underlay} data-visible={showUnderlay}>\n {children}\n </div>\n );\n};\n\nexport const DialogContent = (\n {\n maxWidth = '800px',\n minWidth = '400px',\n minHeight = '200px',\n padding = 'compact',\n verticalAlign = 'center',\n 'data-test-id': dataTestId = 'fondue-dialog-content',\n showUnderlay = false,\n rounded = true,\n onEscapeKeyDown,\n children,\n }: DialogContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { theme, dir } = useFondueTheme();\n const contentRef = useRef<HTMLDivElement>(null);\n\n useSyncRefs<HTMLDivElement>(contentRef, ref);\n\n const handleOpenAutoFocus = (event: Event) => {\n event.preventDefault();\n\n const focusableSelector =\n 'button:not([data-tooltip-trigger=\"true\"]), [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])';\n\n // Try to find focusable element in order: body -> footer -> header\n const dialogBody = contentRef.current?.querySelector('[data-dialog-layout-component=\"body\"]');\n const dialogFooter = contentRef.current?.querySelector('[data-dialog-layout-component=\"footer\"]');\n const dialogHeader = contentRef.current?.querySelector('[data-dialog-layout-component=\"header\"]');\n\n const firstFocusable =\n dialogBody?.querySelector(focusableSelector) ||\n dialogFooter?.querySelector(focusableSelector) ||\n dialogHeader?.querySelector(focusableSelector);\n\n if (firstFocusable instanceof HTMLElement) {\n firstFocusable.focus();\n }\n };\n\n return (\n <RadixDialog.Portal>\n <ThemeProvider theme={theme} dir={dir}>\n <DialogUnderlay showUnderlay={showUnderlay}>\n <RadixDialog.Content\n style={\n {\n '--dialog-max-width': maxWidth,\n '--dialog-min-width': minWidth,\n '--dialog-min-height': minHeight,\n } as CSSProperties\n }\n ref={contentRef}\n className={styles.content}\n onFocus={addShowFocusRing}\n onOpenAutoFocus={handleOpenAutoFocus}\n onEscapeKeyDown={onEscapeKeyDown}\n data-dialog-padding={padding}\n data-dialog-rounded={rounded}\n data-test-id={dataTestId}\n data-dialog-vertical-align={verticalAlign}\n dir={dir}\n >\n {children}\n </RadixDialog.Content>\n </DialogUnderlay>\n </ThemeProvider>\n </RadixDialog.Portal>\n );\n};\nDialogContent.displayName = 'Dialog.Content';\n\nexport const DialogHeader = (\n {\n padding,\n showBorder = true,\n showCloseButton = true,\n closeProps,\n children,\n 'data-test-id': dataTestId = 'fondue-dialog-header',\n }: DialogHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { t } = useTranslation();\n\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.header}\n data-dialog-header-padding={padding}\n data-show-border={showBorder}\n data-dialog-layout-component=\"header\"\n >\n <div>{children}</div>\n {showCloseButton && (\n <RadixDialog.Close\n role=\"button\"\n data-test-id={`${dataTestId}-close`}\n aria-label={t('Dialog_close')}\n {...closeProps}\n >\n <IconCross size={20} />\n </RadixDialog.Close>\n )}\n </div>\n );\n};\nDialogHeader.displayName = 'Dialog.Header';\n\nexport const DialogFooter = (\n { padding, showBorder = true, children, 'data-test-id': dataTestId = 'fondue-dialog-footer' }: DialogFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.footer}\n data-dialog-footer-padding={padding}\n data-show-border={showBorder}\n data-dialog-layout-component=\"footer\"\n >\n {children}\n </div>\n );\n};\nDialogFooter.displayName = 'Dialog.Footer';\n\nexport const DialogBody = (\n { padding, children, 'data-test-id': dataTestId = 'fondue-dialog-body' }: DialogBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.body}\n data-dialog-body-padding={padding}\n data-dialog-layout-component=\"body\"\n >\n {children}\n </div>\n );\n};\nDialogBody.displayName = 'Dialog.Body';\n\nexport const DialogSideContent = (\n { children, 'data-test-id': dataTestId = 'fondue-dialog-side-content' }: DialogSideContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.sideContent} data-dialog-layout-component>\n {children}\n </div>\n );\n};\nDialogSideContent.displayName = 'Dialog.SideContent';\n\nexport const DialogClose = ({ children }: DialogCloseProps) => {\n return <RadixDialog.Close asChild>{children}</RadixDialog.Close>;\n};\nDialogClose.displayName = 'Dialog.Close';\n\nexport const DialogTitle = ({ children, asChild, screenReaderOnly = false }: DialogAnnouncementProps) => {\n if (screenReaderOnly && !asChild) {\n return (\n <RadixDialog.Title asChild>\n <span className={styles.screenReaderOnly}>{children}</span>\n </RadixDialog.Title>\n );\n }\n\n if (screenReaderOnly && asChild) {\n // When using asChild with screenReaderOnly, apply className to the child\n return (\n <RadixDialog.Title asChild>\n {typeof children === 'object' && children && 'props' in children\n ? {\n ...children,\n props: {\n ...children.props,\n className: `${children.props.className || ''} ${styles.screenReaderOnly}`.trim(),\n },\n }\n : children}\n </RadixDialog.Title>\n );\n }\n\n return <RadixDialog.Title asChild={asChild}>{children}</RadixDialog.Title>;\n};\nDialogTitle.displayName = 'Dialog.Title';\n\nexport const DialogDescription = ({ children, asChild, screenReaderOnly = false }: DialogAnnouncementProps) => {\n if (screenReaderOnly && !asChild) {\n return (\n <RadixDialog.Description asChild>\n <span className={styles.screenReaderOnly}>{children}</span>\n </RadixDialog.Description>\n );\n }\n\n if (screenReaderOnly && asChild) {\n // When using asChild with screenReaderOnly, apply className to the child\n return (\n <RadixDialog.Description asChild>\n {typeof children === 'object' && children && 'props' in children\n ? {\n ...children,\n props: {\n ...children.props,\n className: `${children.props.className || ''} ${styles.screenReaderOnly}`.trim(),\n },\n }\n : children}\n </RadixDialog.Description>\n );\n }\n\n return <RadixDialog.Description asChild={asChild}>{children}</RadixDialog.Description>;\n};\nDialogDescription.displayName = 'Dialog.Description';\n\nexport const Dialog = {\n Root: DialogRoot,\n Title: DialogTitle,\n Description: DialogDescription,\n Close: DialogClose,\n Trigger: forwardRef<HTMLButtonElement, DialogTriggerProps>(DialogTrigger),\n Content: forwardRef<HTMLDivElement, DialogContentProps>(DialogContent),\n Header: forwardRef<HTMLDivElement, DialogHeaderProps>(DialogHeader),\n Footer: forwardRef<HTMLDivElement, DialogFooterProps>(DialogFooter),\n Body: forwardRef<HTMLDivElement, DialogBodyProps>(DialogBody),\n SideContent: forwardRef<HTMLDivElement, DialogSideContentProps>(DialogSideContent),\n};\n"],"names":["DialogContext","createContext","DialogRoot","children","modal","onOpenChange","open","value","useMemo","jsx","RadixDialog","DialogTrigger","asChild","dataTestId","ref","addAutoFocusAttribute","DialogUnderlay","showUnderlay","isModal","useContext","styles","DialogContent","maxWidth","minWidth","minHeight","padding","verticalAlign","rounded","onEscapeKeyDown","theme","dir","useFondueTheme","contentRef","useRef","useSyncRefs","handleOpenAutoFocus","event","focusableSelector","dialogBody","_a","dialogFooter","_b","dialogHeader","_c","firstFocusable","ThemeProvider","addShowFocusRing","DialogHeader","showBorder","showCloseButton","closeProps","t","useTranslation","jsxs","IconCross","DialogFooter","DialogBody","DialogSideContent","DialogClose","DialogTitle","screenReaderOnly","DialogDescription","Dialog","forwardRef"],"mappings":";;;;;;;;;AA8JA,MAAMA,IAAgBC,EAAiC,EAAE,SAAS,IAAO;AACzED,EAAc,cAAc;AAErB,MAAME,IAAa,CAAC,EAAE,UAAAC,GAAU,OAAAC,GAAO,cAAAC,GAAc,MAAAC,QAA4B;AACpF,QAAMC,IAAQC,EAAQ,OAAO,EAAE,SAASJ,KAAS,GAAA,IAAU,CAACA,CAAK,CAAC;AAElE,SACI,gBAAAK,EAACT,EAAc,UAAd,EAAuB,OAAAO,GACpB,UAAA,gBAAAE,EAACC,EAAY,MAAZ,EAAiB,MAAAJ,GAAY,cAAAD,GAA4B,OAAAD,GACrD,UAAAD,GACL,GACJ;AAER;AACAD,EAAW,cAAc;AAElB,MAAMS,IAAgB,CACzB,EAAE,SAAAC,IAAU,IAAM,UAAAT,GAAU,gBAAgBU,IAAa,wBAAA,GACzDC,MAGI,gBAAAL;AAAA,EAACC,EAAY;AAAA,EAAZ;AAAA,IACG,aAAaK;AAAA,IACb,2BAAwB;AAAA,IACxB,2BAAuB;AAAA,IACvB,gBAAcF;AAAA,IACd,SAAAD;AAAA,IACA,KAAAE;AAAA,IAEC,UAAAX;AAAA,EAAA;AAAA;AAIbQ,EAAc,cAAc;AAE5B,MAAMK,IAAiB,CAAC,EAAE,UAAAb,GAAU,cAAAc,QAAmE;AACnG,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAWnB,CAAa;AAC5C,SAAIkB,IAEI,gBAAAT,EAACC,EAAY,SAAZ,EAAoB,gBAAcO,GAAc,WAAWG,EAAO,UAC9D,UAAAjB,GACL,sBAIH,OAAA,EAAI,WAAWiB,EAAO,UAAU,gBAAcH,GAC1C,UAAAd,GACL;AAER,GAEakB,IAAgB,CACzB;AAAA,EACI,UAAAC,IAAW;AAAA,EACX,UAAAC,IAAW;AAAA,EACX,WA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AEnB,MAAME,IAAoB,CAAC,EAAE,UAAA1D,GAAU,SAAAS,GAAS,kBAAAgD,IAAmB,SAClEA,KAAoB,CAAChD,IAEjB,gBAAAH,EAACC,EAAY,aAAZ,EAAwB,SAAO,IAC5B,UAAA,gBAAAD,EAAC,QAAA,EAAK,WAAWW,EAAO,kBAAmB,UAAAjB,EAAA,CAAS,GACxD,IAIJyD,KAAoBhD,IAGhB,gBAAAH,EAACC,EAAY,aAAZ,EAAwB,SAAO,IAC3B,UAAA,OAAOP,KAAa,YAAYA,KAAY,WAAWA,IAClD;AAAA,EACI,GAAGA;AAAA,EACH,OAAO;AAAA,IACH,GAAGA,EAAS;AAAA,IACZ,WAAW,GAAGA,EAAS,MAAM,aAAa,EAAE,IAAIiB,EAAO,gBAAgB,GAAG,KAAA;AAAA,EAAK;AACnF,IAEJjB,EAAA,CACV,IAID,gBAAAM,EAACC,EAAY,aAAZ,EAAwB,SAAAE,GAAmB,UAAAT,EAAA,CAAS;AAEhE0D,EAAkB,cAAc;AAEzB,MAAMC,KAAS;AAAA,EAClB,MAAM5D;AAAA,EACN,OAAOyD;AAAA,EACP,aAAaE;AAAA,EACb,OAAOH;AAAA,EACP,SAASK,EAAkDpD,CAAa;AAAA,EACxE,SAASoD,EAA+C1C,CAAa;AAAA,EACrE,QAAQ0C,EAA8ChB,CAAY;AAAA,EAClE,QAAQgB,EAA8CR,CAAY;AAAA,EAClE,MAAMQ,EAA4CP,CAAU;AAAA,EAC5D,aAAaO,EAAmDN,CAAiB;AACrF;"}
|
|
1
|
+
{"version":3,"file":"fondue-components10.js","sources":["../src/components/Dialog/Dialog.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixDialog from '@radix-ui/react-dialog';\nimport {\n createContext,\n forwardRef,\n useContext,\n useMemo,\n useRef,\n type CSSProperties,\n type ForwardedRef,\n type ReactNode,\n} from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { useSyncRefs } from '#/hooks/useSyncRefs';\nimport { useTranslation } from '#/hooks/useTranslation';\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport styles from './styles/dialog.module.scss';\n\nexport type DialogRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the dialog\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Whether the dialog can be closed by clicking the underlay or pressing Escape.\n * When set to `false`, the dialog can only be closed programmatically or via `Dialog.Close`.\n * @default true\n */\n dismissable?: boolean;\n children?: ReactNode;\n};\n\nexport type DialogContentProps = {\n /**\n * Add rounded corners to the dialog\n * @default true\n */\n rounded?: boolean;\n /**\n * Define the padding of the dialog\n * @default \"compact\"\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * The vertical alignment of the divider\n * @default \"center\"\n */\n verticalAlign?: 'top' | 'center';\n\n /**\n * Define a maximum width for the dialog\n * @default \"800px\"\n */\n maxWidth?: string;\n /**\n * Define a minimum width for the dialog\n * @default \"400px\"\n */\n minWidth?: string;\n /**\n * Define a minimum height for the dialog\n * @default \"200px\"\n */\n minHeight?: string;\n /**\n * Show a dark underlay behind the dialog\n * @default false\n */\n showUnderlay?: boolean;\n /**\n * Event handler called when the escape key is pressed.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogHeaderProps = {\n /**\n * Define the padding for the dialog header\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Show a border at the bottom of the header\n * @default true\n */\n showBorder?: boolean;\n /**\n * Show a close button in the header\n * @default true\n */\n showCloseButton?: boolean;\n closeProps?: CommonAriaProps;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogFooterProps = {\n /**\n * Define the padding for the dialog footer\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Show a border at the top of the footer\n * @default true\n */\n showBorder?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogBodyProps = {\n /**\n * Define the padding for the dialog body\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogSideContentProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type DialogCloseProps = { children?: ReactNode };\n\nexport type DialogAnnouncementProps = {\n children?: ReactNode;\n asChild?: boolean;\n /**\n * Visually hide the element while keeping it accessible to screen readers\n * @default false\n */\n screenReaderOnly?: boolean;\n};\n\ntype DialogContextType = {\n isModal: boolean;\n dismissable: boolean;\n};\n\nconst DialogContext = createContext<DialogContextType>({ isModal: false, dismissable: true });\nDialogContext.displayName = 'DialogContext';\n\nexport const DialogRoot = ({ children, modal, onOpenChange, open, dismissable = true }: DialogRootProps) => {\n const value = useMemo(() => ({ isModal: modal ?? false, dismissable }), [modal, dismissable]);\n\n return (\n <DialogContext.Provider value={value}>\n <RadixDialog.Root open={open} onOpenChange={onOpenChange} modal={modal}>\n {children}\n </RadixDialog.Root>\n </DialogContext.Provider>\n );\n};\nDialogRoot.displayName = 'Dialog.Root';\n\nexport const DialogTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-dialog-trigger' }: DialogTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixDialog.Trigger\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild={asChild}\n ref={ref}\n >\n {children}\n </RadixDialog.Trigger>\n );\n};\nDialogTrigger.displayName = 'Dialog.Trigger';\n\nconst DialogUnderlay = ({ children, showUnderlay }: { children: ReactNode; showUnderlay: boolean }) => {\n const { isModal } = useContext(DialogContext);\n if (isModal) {\n return (\n <RadixDialog.Overlay data-visible={showUnderlay} className={styles.underlay}>\n {children}\n </RadixDialog.Overlay>\n );\n }\n return (\n <div className={styles.underlay} data-visible={showUnderlay}>\n {children}\n </div>\n );\n};\n\nexport const DialogContent = (\n {\n maxWidth = '800px',\n minWidth = '400px',\n minHeight = '200px',\n padding = 'compact',\n verticalAlign = 'center',\n 'data-test-id': dataTestId = 'fondue-dialog-content',\n showUnderlay = false,\n rounded = true,\n onEscapeKeyDown,\n children,\n }: DialogContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { theme, dir } = useFondueTheme();\n const contentRef = useRef<HTMLDivElement>(null);\n const { dismissable } = useContext(DialogContext);\n\n useSyncRefs<HTMLDivElement>(contentRef, ref);\n\n const handleEscapeKeyDown = (event: KeyboardEvent) => {\n if (!dismissable) {\n event.preventDefault();\n }\n onEscapeKeyDown?.(event);\n };\n\n const handleInteractOutside = (event: Event) => {\n if (!dismissable) {\n event.preventDefault();\n }\n };\n\n const handleOpenAutoFocus = (event: Event) => {\n event.preventDefault();\n\n const focusableSelector =\n 'button:not([data-tooltip-trigger=\"true\"]), [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])';\n\n // Try to find focusable element in order: body -> footer -> header\n const dialogBody = contentRef.current?.querySelector('[data-dialog-layout-component=\"body\"]');\n const dialogFooter = contentRef.current?.querySelector('[data-dialog-layout-component=\"footer\"]');\n const dialogHeader = contentRef.current?.querySelector('[data-dialog-layout-component=\"header\"]');\n\n const firstFocusable =\n dialogBody?.querySelector(focusableSelector) ||\n dialogFooter?.querySelector(focusableSelector) ||\n dialogHeader?.querySelector(focusableSelector);\n\n if (firstFocusable instanceof HTMLElement) {\n firstFocusable.focus();\n }\n };\n\n return (\n <RadixDialog.Portal>\n <ThemeProvider theme={theme} dir={dir}>\n <DialogUnderlay showUnderlay={showUnderlay}>\n <RadixDialog.Content\n style={\n {\n '--dialog-max-width': maxWidth,\n '--dialog-min-width': minWidth,\n '--dialog-min-height': minHeight,\n } as CSSProperties\n }\n ref={contentRef}\n className={styles.content}\n onFocus={addShowFocusRing}\n onOpenAutoFocus={handleOpenAutoFocus}\n onEscapeKeyDown={handleEscapeKeyDown}\n onInteractOutside={handleInteractOutside}\n data-dialog-padding={padding}\n data-dialog-rounded={rounded}\n data-test-id={dataTestId}\n data-dialog-vertical-align={verticalAlign}\n dir={dir}\n >\n {children}\n </RadixDialog.Content>\n </DialogUnderlay>\n </ThemeProvider>\n </RadixDialog.Portal>\n );\n};\nDialogContent.displayName = 'Dialog.Content';\n\nexport const DialogHeader = (\n {\n padding,\n showBorder = true,\n showCloseButton = true,\n closeProps,\n children,\n 'data-test-id': dataTestId = 'fondue-dialog-header',\n }: DialogHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { t } = useTranslation();\n\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.header}\n data-dialog-header-padding={padding}\n data-show-border={showBorder}\n data-dialog-layout-component=\"header\"\n >\n <div>{children}</div>\n {showCloseButton && (\n <RadixDialog.Close\n role=\"button\"\n data-test-id={`${dataTestId}-close`}\n aria-label={t('Dialog_close')}\n {...closeProps}\n >\n <IconCross size={20} />\n </RadixDialog.Close>\n )}\n </div>\n );\n};\nDialogHeader.displayName = 'Dialog.Header';\n\nexport const DialogFooter = (\n { padding, showBorder = true, children, 'data-test-id': dataTestId = 'fondue-dialog-footer' }: DialogFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.footer}\n data-dialog-footer-padding={padding}\n data-show-border={showBorder}\n data-dialog-layout-component=\"footer\"\n >\n {children}\n </div>\n );\n};\nDialogFooter.displayName = 'Dialog.Footer';\n\nexport const DialogBody = (\n { padding, children, 'data-test-id': dataTestId = 'fondue-dialog-body' }: DialogBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.body}\n data-dialog-body-padding={padding}\n data-dialog-layout-component=\"body\"\n >\n {children}\n </div>\n );\n};\nDialogBody.displayName = 'Dialog.Body';\n\nexport const DialogSideContent = (\n { children, 'data-test-id': dataTestId = 'fondue-dialog-side-content' }: DialogSideContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.sideContent} data-dialog-layout-component>\n {children}\n </div>\n );\n};\nDialogSideContent.displayName = 'Dialog.SideContent';\n\nexport const DialogClose = ({ children }: DialogCloseProps) => {\n return <RadixDialog.Close asChild>{children}</RadixDialog.Close>;\n};\nDialogClose.displayName = 'Dialog.Close';\n\nexport const DialogTitle = ({ children, asChild, screenReaderOnly = false }: DialogAnnouncementProps) => {\n if (screenReaderOnly && !asChild) {\n return (\n <RadixDialog.Title asChild>\n <span className={styles.screenReaderOnly}>{children}</span>\n </RadixDialog.Title>\n );\n }\n\n if (screenReaderOnly && asChild) {\n // When using asChild with screenReaderOnly, apply className to the child\n return (\n <RadixDialog.Title asChild>\n {typeof children === 'object' && children && 'props' in children\n ? {\n ...children,\n props: {\n ...children.props,\n className: `${children.props.className || ''} ${styles.screenReaderOnly}`.trim(),\n },\n }\n : children}\n </RadixDialog.Title>\n );\n }\n\n return <RadixDialog.Title asChild={asChild}>{children}</RadixDialog.Title>;\n};\nDialogTitle.displayName = 'Dialog.Title';\n\nexport const DialogDescription = ({ children, asChild, screenReaderOnly = false }: DialogAnnouncementProps) => {\n if (screenReaderOnly && !asChild) {\n return (\n <RadixDialog.Description asChild>\n <span className={styles.screenReaderOnly}>{children}</span>\n </RadixDialog.Description>\n );\n }\n\n if (screenReaderOnly && asChild) {\n // When using asChild with screenReaderOnly, apply className to the child\n return (\n <RadixDialog.Description asChild>\n {typeof children === 'object' && children && 'props' in children\n ? {\n ...children,\n props: {\n ...children.props,\n className: `${children.props.className || ''} ${styles.screenReaderOnly}`.trim(),\n },\n }\n : children}\n </RadixDialog.Description>\n );\n }\n\n return <RadixDialog.Description asChild={asChild}>{children}</RadixDialog.Description>;\n};\nDialogDescription.displayName = 'Dialog.Description';\n\nexport const Dialog = {\n Root: DialogRoot,\n Title: DialogTitle,\n Description: DialogDescription,\n Close: DialogClose,\n Trigger: forwardRef<HTMLButtonElement, DialogTriggerProps>(DialogTrigger),\n Content: forwardRef<HTMLDivElement, DialogContentProps>(DialogContent),\n Header: forwardRef<HTMLDivElement, DialogHeaderProps>(DialogHeader),\n Footer: forwardRef<HTMLDivElement, DialogFooterProps>(DialogFooter),\n Body: forwardRef<HTMLDivElement, DialogBodyProps>(DialogBody),\n SideContent: forwardRef<HTMLDivElement, DialogSideContentProps>(DialogSideContent),\n};\n"],"names":["DialogContext","createContext","DialogRoot","children","modal","onOpenChange","open","dismissable","value","useMemo","jsx","RadixDialog","DialogTrigger","asChild","dataTestId","ref","addAutoFocusAttribute","DialogUnderlay","showUnderlay","isModal","useContext","styles","DialogContent","maxWidth","minWidth","minHeight","padding","verticalAlign","rounded","onEscapeKeyDown","theme","dir","useFondueTheme","contentRef","useRef","useSyncRefs","handleEscapeKeyDown","event","handleInteractOutside","handleOpenAutoFocus","focusableSelector","dialogBody","_a","dialogFooter","_b","dialogHeader","_c","firstFocusable","ThemeProvider","addShowFocusRing","DialogHeader","showBorder","showCloseButton","closeProps","t","useTranslation","jsxs","IconCross","DialogFooter","DialogBody","DialogSideContent","DialogClose","DialogTitle","screenReaderOnly","DialogDescription","Dialog","forwardRef"],"mappings":";;;;;;;;;AAqKA,MAAMA,IAAgBC,EAAiC,EAAE,SAAS,IAAO,aAAa,IAAM;AAC5FD,EAAc,cAAc;AAErB,MAAME,IAAa,CAAC,EAAE,UAAAC,GAAU,OAAAC,GAAO,cAAAC,GAAc,MAAAC,GAAM,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AAc;AAEnB,MAAME,IAAoB,CAAC,EAAE,UAAA7D,GAAU,SAAAU,GAAS,kBAAAkD,IAAmB,SAClEA,KAAoB,CAAClD,IAEjB,gBAAAH,EAACC,EAAY,aAAZ,EAAwB,SAAO,IAC5B,UAAA,gBAAAD,EAAC,QAAA,EAAK,WAAWW,EAAO,kBAAmB,UAAAlB,EAAA,CAAS,GACxD,IAIJ4D,KAAoBlD,IAGhB,gBAAAH,EAACC,EAAY,aAAZ,EAAwB,SAAO,IAC3B,UAAA,OAAOR,KAAa,YAAYA,KAAY,WAAWA,IAClD;AAAA,EACI,GAAGA;AAAA,EACH,OAAO;AAAA,IACH,GAAGA,EAAS;AAAA,IACZ,WAAW,GAAGA,EAAS,MAAM,aAAa,EAAE,IAAIkB,EAAO,gBAAgB,GAAG,KAAA;AAAA,EAAK;AACnF,IAEJlB,EAAA,CACV,IAID,gBAAAO,EAACC,EAAY,aAAZ,EAAwB,SAAAE,GAAmB,UAAAV,EAAA,CAAS;AAEhE6D,EAAkB,cAAc;AAEzB,MAAMC,KAAS;AAAA,EAClB,MAAM/D;AAAA,EACN,OAAO4D;AAAA,EACP,aAAaE;AAAA,EACb,OAAOH;AAAA,EACP,SAASK,EAAkDtD,CAAa;AAAA,EACxE,SAASsD,EAA+C5C,CAAa;AAAA,EACrE,QAAQ4C,EAA8ChB,CAAY;AAAA,EAClE,QAAQgB,EAA8CR,CAAY;AAAA,EAClE,MAAMQ,EAA4CP,CAAU;AAAA,EAC5D,aAAaO,EAAmDN,CAAiB;AACrF;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as d } from "react";
|
|
3
|
-
import m from "./fondue-
|
|
3
|
+
import m from "./fondue-components122.js";
|
|
4
4
|
const t = ({ children: e, name: o, "data-test-id": r = "fondue-select-slot", ...a }, s) => /* @__PURE__ */ l("div", { "data-test-id": r, ref: s, className: m.slot, "data-name": o, ...a, children: e });
|
|
5
5
|
t.displayName = "Select.Slot";
|
|
6
6
|
const S = d(t);
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
const t = "
|
|
1
|
+
const t = "_root_1bxvz_5", o = "_textareaWrapper_1bxvz_62", s = "_textarea_1bxvz_62", _ = "_slot_1bxvz_120", r = "_decorator_1bxvz_145", e = "_tools_1bxvz_158", a = "_toolsButton_1bxvz_190", c = "_success_1bxvz_222", n = "_error_1bxvz_226", x = "_loadingStatus_1bxvz_230", l = "_spin_1bxvz_1", b = {
|
|
2
2
|
root: t,
|
|
3
3
|
textareaWrapper: o,
|
|
4
4
|
textarea: s,
|
|
5
|
-
slot:
|
|
6
|
-
decorator:
|
|
7
|
-
tools:
|
|
8
|
-
toolsButton:
|
|
9
|
-
success:
|
|
5
|
+
slot: _,
|
|
6
|
+
decorator: r,
|
|
7
|
+
tools: e,
|
|
8
|
+
toolsButton: a,
|
|
9
|
+
success: c,
|
|
10
10
|
error: n,
|
|
11
|
-
loadingStatus:
|
|
11
|
+
loadingStatus: x,
|
|
12
12
|
spin: l
|
|
13
13
|
};
|
|
14
14
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
r as decorator,
|
|
16
|
+
b as default,
|
|
17
17
|
n as error,
|
|
18
|
-
|
|
18
|
+
x as loadingStatus,
|
|
19
19
|
t as root,
|
|
20
|
-
|
|
20
|
+
_ as slot,
|
|
21
21
|
l as spin,
|
|
22
|
-
|
|
22
|
+
c as success,
|
|
23
23
|
s as textarea,
|
|
24
24
|
o as textareaWrapper,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
e as tools,
|
|
26
|
+
a as toolsButton
|
|
27
27
|
};
|
|
28
28
|
//# sourceMappingURL=fondue-components112.js.map
|