@frontify/fondue-components 8.0.1 → 9.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-components22.js +34 -32
- package/dist/fondue-components22.js.map +1 -1
- package/dist/fondue-components28.js +2 -2
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components31.js +1 -1
- package/dist/fondue-components33.js +15 -15
- package/dist/fondue-components33.js.map +1 -1
- package/dist/fondue-components38.js +14 -14
- package/dist/fondue-components4.js +20 -18
- package/dist/fondue-components4.js.map +1 -1
- package/dist/fondue-components41.js +4 -4
- package/dist/fondue-components43.js +10 -10
- package/dist/fondue-components54.js +22 -22
- package/dist/fondue-components56.js +6 -6
- package/dist/fondue-components57.js +9 -9
- package/dist/fondue-components60.js +10 -10
- package/dist/fondue-components63.js +7 -7
- package/dist/fondue-components64.js +15 -15
- package/dist/fondue-components66.js +15 -2
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components67.js +2 -15
- package/dist/fondue-components67.js.map +1 -1
- package/dist/fondue-components7.js +94 -81
- package/dist/fondue-components7.js.map +1 -1
- package/dist/index.d.ts +18 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
const t = "
|
|
1
|
+
const t = "_table_4n7pf_4", o = "_headerCell_4n7pf_18", n = "_rowCell_4n7pf_19", _ = "_caption_4n7pf_40", e = "_sortButton_4n7pf_65", r = "_buttonText_4n7pf_83", s = "_sortIndicator_4n7pf_92", l = "_body_4n7pf_96", c = "_row_4n7pf_19", a = {
|
|
2
2
|
table: t,
|
|
3
3
|
headerCell: o,
|
|
4
4
|
rowCell: n,
|
|
5
5
|
caption: _,
|
|
6
6
|
sortButton: e,
|
|
7
|
-
buttonText:
|
|
8
|
-
sortIndicator:
|
|
9
|
-
body:
|
|
10
|
-
row:
|
|
7
|
+
buttonText: r,
|
|
8
|
+
sortIndicator: s,
|
|
9
|
+
body: l,
|
|
10
|
+
row: c
|
|
11
11
|
};
|
|
12
12
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
l as body,
|
|
14
|
+
r as buttonText,
|
|
15
15
|
_ as caption,
|
|
16
|
-
|
|
16
|
+
a as default,
|
|
17
17
|
o as headerCell,
|
|
18
|
-
|
|
18
|
+
c as row,
|
|
19
19
|
n as rowCell,
|
|
20
20
|
e as sortButton,
|
|
21
|
-
|
|
21
|
+
s as sortIndicator,
|
|
22
22
|
t as table
|
|
23
23
|
};
|
|
24
24
|
//# sourceMappingURL=fondue-components60.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
const t = "
|
|
1
|
+
const t = "_root_1msyd_5", r = "_triggerList_1msyd_14", s = "_triggerListWrapper_1msyd_28", e = "_trigger_1msyd_14", i = "_content_1msyd_78", o = "_activeIndicator_1msyd_91", g = {
|
|
2
2
|
root: t,
|
|
3
3
|
triggerList: r,
|
|
4
|
-
triggerListWrapper:
|
|
5
|
-
trigger:
|
|
6
|
-
content:
|
|
4
|
+
triggerListWrapper: s,
|
|
5
|
+
trigger: e,
|
|
6
|
+
content: i,
|
|
7
7
|
activeIndicator: o
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
10
|
o as activeIndicator,
|
|
11
|
-
|
|
11
|
+
i as content,
|
|
12
12
|
g as default,
|
|
13
13
|
t as root,
|
|
14
|
-
|
|
14
|
+
e as trigger,
|
|
15
15
|
r as triggerList,
|
|
16
|
-
|
|
16
|
+
s as triggerListWrapper
|
|
17
17
|
};
|
|
18
18
|
//# sourceMappingURL=fondue-components63.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
const
|
|
2
|
-
root:
|
|
3
|
-
input:
|
|
4
|
-
slot:
|
|
1
|
+
const o = "_root_7i0v6_5", t = "_input_7i0v6_59", s = "_slot_7i0v6_82", _ = "_iconSuccess_7i0v6_132", i = "_iconError_7i0v6_141", n = "_loadingStatus_7i0v6_155", c = "_spin_7i0v6_1", r = {
|
|
2
|
+
root: o,
|
|
3
|
+
input: t,
|
|
4
|
+
slot: s,
|
|
5
5
|
iconSuccess: _,
|
|
6
|
-
iconError:
|
|
7
|
-
loadingStatus:
|
|
8
|
-
spin:
|
|
9
|
-
"tw-dark": "_tw-
|
|
6
|
+
iconError: i,
|
|
7
|
+
loadingStatus: n,
|
|
8
|
+
spin: c,
|
|
9
|
+
"tw-dark": "_tw-dark_7i0v6_187"
|
|
10
10
|
};
|
|
11
11
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
r as default,
|
|
13
|
+
i as iconError,
|
|
14
14
|
_ as iconSuccess,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
t as input,
|
|
16
|
+
n as loadingStatus,
|
|
17
|
+
o as root,
|
|
18
|
+
s as slot,
|
|
19
|
+
c as spin
|
|
20
20
|
};
|
|
21
21
|
//# sourceMappingURL=fondue-components64.js.map
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
const t = "
|
|
1
|
+
const o = "_root_1nv86_5", t = "_button_1nv86_56", c = "_colorIndicator_1nv86_69", n = "_actions_1nv86_75", _ = "_clear_1nv86_85", r = "_caret_1nv86_98", a = {
|
|
2
|
+
root: o,
|
|
3
|
+
button: t,
|
|
4
|
+
colorIndicator: c,
|
|
5
|
+
actions: n,
|
|
6
|
+
clear: _,
|
|
7
|
+
caret: r
|
|
8
|
+
};
|
|
2
9
|
export {
|
|
3
|
-
|
|
10
|
+
n as actions,
|
|
11
|
+
t as button,
|
|
12
|
+
r as caret,
|
|
13
|
+
_ as clear,
|
|
14
|
+
c as colorIndicator,
|
|
15
|
+
a as default,
|
|
16
|
+
o as root
|
|
4
17
|
};
|
|
5
18
|
//# sourceMappingURL=fondue-components66.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components66.js","sources":[
|
|
1
|
+
{"version":3,"file":"fondue-components66.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
const
|
|
2
|
-
root: o,
|
|
3
|
-
button: t,
|
|
4
|
-
colorIndicator: c,
|
|
5
|
-
actions: r,
|
|
6
|
-
clear: a,
|
|
7
|
-
caret: _
|
|
8
|
-
};
|
|
1
|
+
const t = "focus-visible:tw-outline has-[[data-show-focus-ring=true]]:tw-outline tw-outline-4 tw-outline-offset-2 tw-outline-blue focus-visible:tw-outline-blue";
|
|
9
2
|
export {
|
|
10
|
-
|
|
11
|
-
t as button,
|
|
12
|
-
_ as caret,
|
|
13
|
-
a as clear,
|
|
14
|
-
c as colorIndicator,
|
|
15
|
-
n as default,
|
|
16
|
-
o as root
|
|
3
|
+
t as FOCUS_OUTLINE
|
|
17
4
|
};
|
|
18
5
|
//# sourceMappingURL=fondue-components67.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components67.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components67.js","sources":["../src/utilities/focusStyle.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nexport const FOCUS_OUTLINE =\n 'focus-visible:tw-outline has-[[data-show-focus-ring=true]]:tw-outline tw-outline-4 tw-outline-offset-2 tw-outline-blue focus-visible:tw-outline-blue'; // second declaration of tw-outline-blue is to assure that in firefox the outline isn't overriden by a global definition of :-moz-focusring which is coming from tailwinds normalization styling\n"],"names":["FOCUS_OUTLINE"],"mappings":"AAEO,MAAMA,IACT;"}
|
|
@@ -1,124 +1,137 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o, jsxs as T } from "react/jsx-runtime";
|
|
2
2
|
import { IconCross as F } from "@frontify/fondue-icons";
|
|
3
|
-
import * as
|
|
4
|
-
import { createContext as M, forwardRef as
|
|
3
|
+
import * as d from "@radix-ui/react-dialog";
|
|
4
|
+
import { createContext as M, forwardRef as s, useContext as S } from "react";
|
|
5
5
|
import { addAutoFocusAttribute as B, addShowFocusRing as H } from "./fondue-components37.js";
|
|
6
|
-
import
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const c = ({ asChild:
|
|
10
|
-
|
|
6
|
+
import l from "./fondue-components38.js";
|
|
7
|
+
const g = M({ isModal: !1 }), u = ({ children: a, ...t }) => /* @__PURE__ */ o(g.Provider, { value: { isModal: t.modal ?? !1 }, children: /* @__PURE__ */ o(d.Root, { ...t, children: a }) });
|
|
8
|
+
u.displayName = "Dialog.Root";
|
|
9
|
+
const c = ({ asChild: a = !0, children: t, "data-test-id": e = "fondue-dialog-trigger", ...i }, r) => /* @__PURE__ */ o(
|
|
10
|
+
d.Trigger,
|
|
11
11
|
{
|
|
12
12
|
onMouseDown: B,
|
|
13
13
|
"data-auto-focus-visible": "true",
|
|
14
14
|
"data-auto-focus-trigger": !0,
|
|
15
15
|
"data-test-id": e,
|
|
16
|
-
asChild:
|
|
17
|
-
ref:
|
|
18
|
-
...
|
|
19
|
-
children:
|
|
16
|
+
asChild: a,
|
|
17
|
+
ref: r,
|
|
18
|
+
...i,
|
|
19
|
+
children: t
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
c.displayName = "Dialog.Trigger";
|
|
23
|
-
const j = ({ children:
|
|
24
|
-
const { isModal: e } = S(
|
|
25
|
-
return e ? /* @__PURE__ */
|
|
26
|
-
},
|
|
27
|
-
maxWidth:
|
|
28
|
-
minWidth:
|
|
23
|
+
const j = ({ children: a, showUnderlay: t }) => {
|
|
24
|
+
const { isModal: e } = S(g);
|
|
25
|
+
return e ? /* @__PURE__ */ o(d.Overlay, { "data-visible": t, className: l.underlay, children: a }) : /* @__PURE__ */ o("div", { className: l.underlay, "data-visible": t, children: a });
|
|
26
|
+
}, m = ({
|
|
27
|
+
maxWidth: a = "800px",
|
|
28
|
+
minWidth: t = "400px",
|
|
29
29
|
minHeight: e = "200px",
|
|
30
|
-
padding:
|
|
31
|
-
verticalAlign:
|
|
32
|
-
"data-test-id":
|
|
30
|
+
padding: i = "compact",
|
|
31
|
+
verticalAlign: r = "center",
|
|
32
|
+
"data-test-id": n = "fondue-dialog-content",
|
|
33
33
|
showUnderlay: v = !1,
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
rounded: x = !0,
|
|
35
|
+
children: b,
|
|
36
36
|
...w
|
|
37
|
-
}, R) => /* @__PURE__ */
|
|
38
|
-
|
|
37
|
+
}, R) => /* @__PURE__ */ o(d.Portal, { children: /* @__PURE__ */ o(j, { showUnderlay: v, children: /* @__PURE__ */ o(
|
|
38
|
+
d.Content,
|
|
39
39
|
{
|
|
40
40
|
style: {
|
|
41
|
-
"--dialog-max-width":
|
|
42
|
-
"--dialog-min-width":
|
|
41
|
+
"--dialog-max-width": a,
|
|
42
|
+
"--dialog-min-width": t,
|
|
43
43
|
"--dialog-min-height": e
|
|
44
44
|
},
|
|
45
45
|
ref: R,
|
|
46
|
-
className:
|
|
46
|
+
className: l.content,
|
|
47
47
|
onFocus: H,
|
|
48
|
-
"data-dialog-
|
|
49
|
-
"data-dialog-
|
|
50
|
-
"data-test-id":
|
|
51
|
-
"data-dialog-vertical-align":
|
|
48
|
+
"data-dialog-padding": i,
|
|
49
|
+
"data-dialog-rounded": x,
|
|
50
|
+
"data-test-id": n,
|
|
51
|
+
"data-dialog-vertical-align": r,
|
|
52
52
|
...w,
|
|
53
|
-
children:
|
|
53
|
+
children: b
|
|
54
54
|
}
|
|
55
55
|
) }) });
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
showBorder:
|
|
56
|
+
m.displayName = "Dialog.Content";
|
|
57
|
+
const p = ({
|
|
58
|
+
padding: a,
|
|
59
|
+
showBorder: t = !0,
|
|
60
60
|
showCloseButton: e = !0,
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
children: i,
|
|
62
|
+
"data-test-id": r = "fondue-dialog-header"
|
|
63
|
+
}, n) => /* @__PURE__ */ T(
|
|
63
64
|
"div",
|
|
64
65
|
{
|
|
65
|
-
"data-test-id":
|
|
66
|
-
ref:
|
|
67
|
-
className:
|
|
68
|
-
"data-
|
|
66
|
+
"data-test-id": r,
|
|
67
|
+
ref: n,
|
|
68
|
+
className: l.header,
|
|
69
|
+
"data-dialog-header-padding": a,
|
|
70
|
+
"data-show-border": t,
|
|
69
71
|
"data-dialog-layout-component": !0,
|
|
70
72
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
e && /* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ o("div", { children: i }),
|
|
74
|
+
e && /* @__PURE__ */ o(d.Close, { role: "button", "data-test-id": `${r}-close`, className: "tw-cursor-pointer", children: /* @__PURE__ */ o(F, { size: 20 }) })
|
|
73
75
|
]
|
|
74
76
|
}
|
|
75
77
|
);
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
+
p.displayName = "Dialog.Header";
|
|
79
|
+
const D = ({ padding: a, showBorder: t = !0, children: e, "data-test-id": i = "fondue-dialog-footer" }, r) => /* @__PURE__ */ o(
|
|
78
80
|
"div",
|
|
79
81
|
{
|
|
80
|
-
"data-test-id":
|
|
81
|
-
ref:
|
|
82
|
-
className:
|
|
82
|
+
"data-test-id": i,
|
|
83
|
+
ref: r,
|
|
84
|
+
className: l.footer,
|
|
85
|
+
"data-dialog-footer-padding": a,
|
|
83
86
|
"data-show-border": t,
|
|
84
87
|
"data-dialog-layout-component": !0,
|
|
85
|
-
children:
|
|
88
|
+
children: e
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
D.displayName = "Dialog.Footer";
|
|
92
|
+
const y = ({ padding: a, children: t, "data-test-id": e = "fondue-dialog-body" }, i) => /* @__PURE__ */ o(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
"data-test-id": e,
|
|
96
|
+
ref: i,
|
|
97
|
+
className: l.body,
|
|
98
|
+
"data-dialog-body-padding": a,
|
|
99
|
+
"data-dialog-layout-component": !0,
|
|
100
|
+
children: t
|
|
86
101
|
}
|
|
87
102
|
);
|
|
88
|
-
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
const N = ({ children: t, asChild: o }) => /* @__PURE__ */ a(i.Description, { asChild: o, children: t });
|
|
98
|
-
N.displayName = "Dialog.Description";
|
|
103
|
+
y.displayName = "Dialog.Body";
|
|
104
|
+
const f = ({ children: a, "data-test-id": t = "fondue-dialog-side-content" }, e) => /* @__PURE__ */ o("div", { "data-test-id": t, ref: e, className: l.sideContent, "data-dialog-layout-component": !0, children: a });
|
|
105
|
+
f.displayName = "Dialog.SideContent";
|
|
106
|
+
const C = ({ children: a }) => /* @__PURE__ */ o(d.Close, { asChild: !0, children: a });
|
|
107
|
+
C.displayName = "Dialog.Close";
|
|
108
|
+
const N = ({ children: a, asChild: t }) => /* @__PURE__ */ o(d.Title, { asChild: t, children: a });
|
|
109
|
+
N.displayName = "Dialog.Title";
|
|
110
|
+
const h = ({ children: a, asChild: t }) => /* @__PURE__ */ o(d.Description, { asChild: t, children: a });
|
|
111
|
+
h.displayName = "Dialog.Description";
|
|
99
112
|
const k = {
|
|
100
|
-
Root:
|
|
101
|
-
Title:
|
|
102
|
-
Description:
|
|
103
|
-
Close:
|
|
104
|
-
Trigger:
|
|
105
|
-
Content:
|
|
106
|
-
Header:
|
|
107
|
-
Footer:
|
|
108
|
-
Body:
|
|
109
|
-
SideContent:
|
|
113
|
+
Root: u,
|
|
114
|
+
Title: N,
|
|
115
|
+
Description: h,
|
|
116
|
+
Close: C,
|
|
117
|
+
Trigger: s(c),
|
|
118
|
+
Content: s(m),
|
|
119
|
+
Header: s(p),
|
|
120
|
+
Footer: s(D),
|
|
121
|
+
Body: s(y),
|
|
122
|
+
SideContent: s(f)
|
|
110
123
|
};
|
|
111
124
|
export {
|
|
112
125
|
k as Dialog,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
126
|
+
y as DialogBody,
|
|
127
|
+
C as DialogClose,
|
|
128
|
+
m as DialogContent,
|
|
129
|
+
h as DialogDescription,
|
|
130
|
+
D as DialogFooter,
|
|
131
|
+
p as DialogHeader,
|
|
132
|
+
u as DialogRoot,
|
|
133
|
+
f as DialogSideContent,
|
|
134
|
+
N as DialogTitle,
|
|
122
135
|
c as DialogTrigger
|
|
123
136
|
};
|
|
124
137
|
//# sourceMappingURL=fondue-components7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components7.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 { createContext, forwardRef, useContext, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\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 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 * 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 children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogFooterProps = {\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 = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type DialogSideContentProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type DialogCloseProps = { children?: ReactNode };\n\nexport type DialogAnnouncementProps = { children?: ReactNode; asChild?: boolean };\n\ntype DialogContextType = {\n isModal: boolean;\n};\n\nconst DialogContext = createContext<DialogContextType>({ isModal: false });\n\nexport const DialogRoot = ({ children, ...props }: DialogRootProps) => {\n return (\n <DialogContext.Provider value={{ isModal: props.modal ?? false }}>\n <RadixDialog.Root {...props}>{children}</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', ...props }: 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 {...props}\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 children,\n rounded = true,\n ...props\n }: DialogContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDialog.Portal>\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={ref}\n className={styles.content}\n onFocus={addShowFocusRing}\n data-dialog-rounded={rounded}\n data-dialog-spacing={padding}\n data-test-id={dataTestId}\n data-dialog-vertical-align={verticalAlign}\n {...props}\n >\n {children}\n </RadixDialog.Content>\n </DialogUnderlay>\n </RadixDialog.Portal>\n );\n};\nDialogContent.displayName = 'Dialog.Content';\n\nexport const DialogHeader = (\n {\n children,\n showBorder = true,\n showCloseButton = true,\n 'data-test-id': dataTestId = 'fondue-dialog-header',\n }: DialogHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.header}\n data-show-border={showBorder}\n data-dialog-layout-component\n >\n <div>{children}</div>\n {showCloseButton && (\n <RadixDialog.Close role=\"button\" data-test-id={`${dataTestId}-close`} className=\"tw-cursor-pointer\">\n <IconCross size={20} />\n </RadixDialog.Close>\n )}\n </div>\n );\n};\nDialogHeader.displayName = 'Dialog.Header';\n\nexport const DialogFooter = (\n { 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-show-border={showBorder}\n data-dialog-layout-component\n >\n {children}\n </div>\n );\n};\nDialogFooter.displayName = 'Dialog.Footer';\n\nexport const DialogBody = (\n { children, 'data-test-id': dataTestId = 'fondue-dialog-body' }: DialogBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.body} data-dialog-layout-component>\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 }: DialogAnnouncementProps) => {\n return <RadixDialog.Title asChild={asChild}>{children}</RadixDialog.Title>;\n};\nDialogTitle.displayName = 'Dialog.Title';\n\nexport const DialogDescription = ({ children, asChild }: DialogAnnouncementProps) => {\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","props","RadixDialog","DialogTrigger","asChild","dataTestId","ref","jsx","addAutoFocusAttribute","DialogUnderlay","showUnderlay","isModal","useContext","styles","DialogContent","maxWidth","minWidth","minHeight","padding","verticalAlign","rounded","addShowFocusRing","DialogHeader","showBorder","showCloseButton","jsxs","IconCross","DialogFooter","DialogBody","DialogSideContent","DialogClose","DialogTitle","DialogDescription","Dialog","forwardRef"],"mappings":";;;;;;AAoHA,MAAMA,IAAgBC,EAAiC,EAAE,SAAS,IAAO,GAE5DC,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAEjCJ,EAAc,UAAd,EAAuB,OAAO,EAAE,SAASI,EAAM,SAAS,GAAM,GAC3D,4BAACC,EAAY,MAAZ,EAAkB,GAAGD,GAAQ,UAAAD,EAAS,CAAA,GAC3C;AAGRD,EAAW,cAAc;AAElB,MAAMI,IAAgB,CACzB,EAAE,SAAAC,IAAU,IAAM,UAAAJ,GAAU,gBAAgBK,IAAa,yBAAyB,GAAGJ,EAAM,GAC3FK,MAGI,gBAAAC;AAAA,EAACL,EAAY;AAAA,EAAZ;AAAA,IACG,aAAaM;AAAA,IACb,2BAAwB;AAAA,IACxB,2BAAuB;AAAA,IACvB,gBAAcH;AAAA,IACd,SAAAD;AAAA,IACA,KAAAE;AAAA,IACC,GAAGL;AAAA,IAEH,UAAAD;AAAA,EAAA;AACL;AAGRG,EAAc,cAAc;AAE5B,MAAMM,IAAiB,CAAC,EAAE,UAAAT,GAAU,cAAAU,QAAmE;AACnG,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAWf,CAAa;AAC5C,SAAIc,IAEI,gBAAAJ,EAACL,EAAY,SAAZ,EAAoB,gBAAcQ,GAAc,WAAWG,EAAO,UAC9D,UAAAb,GACL,sBAIH,OAAI,EAAA,WAAWa,EAAO,UAAU,gBAAcH,GAC1C,UAAAV,GACL;AAER,GAEac,IAAgB,CACzB;AAAA,EACI,UAAA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,EACP,SAASI,EAAkD/B,CAAa;AAAA,EACxE,SAAS+B,EAA+CpB,CAAa;AAAA,EACrE,QAAQoB,EAA8CZ,CAAY;AAAA,EAClE,QAAQY,EAA8CP,CAAY;AAAA,EAClE,MAAMO,EAA4CN,CAAU;AAAA,EAC5D,aAAaM,EAAmDL,CAAiB;AACrF;"}
|
|
1
|
+
{"version":3,"file":"fondue-components7.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 { createContext, forwardRef, useContext, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\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 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 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 = { children?: ReactNode; asChild?: boolean };\n\ntype DialogContextType = {\n isModal: boolean;\n};\n\nconst DialogContext = createContext<DialogContextType>({ isModal: false });\n\nexport const DialogRoot = ({ children, ...props }: DialogRootProps) => {\n return (\n <DialogContext.Provider value={{ isModal: props.modal ?? false }}>\n <RadixDialog.Root {...props}>{children}</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', ...props }: 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 {...props}\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 children,\n ...props\n }: DialogContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDialog.Portal>\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={ref}\n className={styles.content}\n onFocus={addShowFocusRing}\n data-dialog-padding={padding}\n data-dialog-rounded={rounded}\n data-test-id={dataTestId}\n data-dialog-vertical-align={verticalAlign}\n {...props}\n >\n {children}\n </RadixDialog.Content>\n </DialogUnderlay>\n </RadixDialog.Portal>\n );\n};\nDialogContent.displayName = 'Dialog.Content';\n\nexport const DialogHeader = (\n {\n padding,\n showBorder = true,\n showCloseButton = true,\n children,\n 'data-test-id': dataTestId = 'fondue-dialog-header',\n }: DialogHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\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\n >\n <div>{children}</div>\n {showCloseButton && (\n <RadixDialog.Close role=\"button\" data-test-id={`${dataTestId}-close`} className=\"tw-cursor-pointer\">\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\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\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 }: DialogAnnouncementProps) => {\n return <RadixDialog.Title asChild={asChild}>{children}</RadixDialog.Title>;\n};\nDialogTitle.displayName = 'Dialog.Title';\n\nexport const DialogDescription = ({ children, asChild }: DialogAnnouncementProps) => {\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","props","RadixDialog","DialogTrigger","asChild","dataTestId","ref","jsx","addAutoFocusAttribute","DialogUnderlay","showUnderlay","isModal","useContext","styles","DialogContent","maxWidth","minWidth","minHeight","padding","verticalAlign","rounded","addShowFocusRing","DialogHeader","showBorder","showCloseButton","jsxs","IconCross","DialogFooter","DialogBody","DialogSideContent","DialogClose","DialogTitle","DialogDescription","Dialog","forwardRef"],"mappings":";;;;;;AAmIA,MAAMA,IAAgBC,EAAiC,EAAE,SAAS,IAAO,GAE5DC,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAEjCJ,EAAc,UAAd,EAAuB,OAAO,EAAE,SAASI,EAAM,SAAS,GAAM,GAC3D,4BAACC,EAAY,MAAZ,EAAkB,GAAGD,GAAQ,UAAAD,EAAS,CAAA,GAC3C;AAGRD,EAAW,cAAc;AAElB,MAAMI,IAAgB,CACzB,EAAE,SAAAC,IAAU,IAAM,UAAAJ,GAAU,gBAAgBK,IAAa,yBAAyB,GAAGJ,EAAM,GAC3FK,MAGI,gBAAAC;AAAA,EAACL,EAAY;AAAA,EAAZ;AAAA,IACG,aAAaM;AAAA,IACb,2BAAwB;AAAA,IACxB,2BAAuB;AAAA,IACvB,gBAAcH;AAAA,IACd,SAAAD;AAAA,IACA,KAAAE;AAAA,IACC,GAAGL;AAAA,IAEH,UAAAD;AAAA,EAAA;AACL;AAGRG,EAAc,cAAc;AAE5B,MAAMM,IAAiB,CAAC,EAAE,UAAAT,GAAU,cAAAU,QAAmE;AACnG,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAWf,CAAa;AAC5C,SAAIc,IAEI,gBAAAJ,EAACL,EAAY,SAAZ,EAAoB,gBAAcQ,G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,GAAmB,UAAAJ,EAAS,CAAA;AAE1D+B,EAAY,cAAc;AAEnB,MAAMC,IAAoB,CAAC,EAAE,UAAAhC,GAAU,SAAAI,QAClC,gBAAAG,EAAAL,EAAY,aAAZ,EAAwB,SAAAE,GAAmB,UAAAJ,EAAS,CAAA;AAEhEgC,EAAkB,cAAc;AAEzB,MAAMC,IAAS;AAAA,EAClB,MAAMlC;AAAA,EACN,OAAOgC;AAAA,EACP,aAAaC;AAAA,EACb,OAAOF;AAAA,EACP,SAASI,EAAkD/B,CAAa;AAAA,EACxE,SAAS+B,EAA+CpB,CAAa;AAAA,EACrE,QAAQoB,EAA8CZ,CAAY;AAAA,EAClE,QAAQY,EAA8CP,CAAY;AAAA,EAClE,MAAMO,EAA4CN,CAAU;AAAA,EAC5D,aAAaM,EAAmDL,CAAiB;AACrF;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -105,6 +105,7 @@ declare type ButtonProps = {
|
|
|
105
105
|
hugWidth?: boolean;
|
|
106
106
|
children?: ReactNode;
|
|
107
107
|
onPress?: (event?: MouseEvent_2<HTMLButtonElement>) => void;
|
|
108
|
+
form?: string;
|
|
108
109
|
'aria-label'?: string;
|
|
109
110
|
'aria-describedby'?: string;
|
|
110
111
|
'data-test-id'?: string;
|
|
@@ -348,6 +349,10 @@ declare type DialogAnnouncementProps = {
|
|
|
348
349
|
};
|
|
349
350
|
|
|
350
351
|
declare type DialogBodyProps = {
|
|
352
|
+
/**
|
|
353
|
+
* Define the padding for the dialog body
|
|
354
|
+
*/
|
|
355
|
+
padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';
|
|
351
356
|
children?: ReactNode;
|
|
352
357
|
'data-test-id'?: string;
|
|
353
358
|
};
|
|
@@ -397,6 +402,10 @@ declare type DialogContentProps = {
|
|
|
397
402
|
};
|
|
398
403
|
|
|
399
404
|
declare type DialogFooterProps = {
|
|
405
|
+
/**
|
|
406
|
+
* Define the padding for the dialog footer
|
|
407
|
+
*/
|
|
408
|
+
padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';
|
|
400
409
|
/**
|
|
401
410
|
* Show a border at the top of the footer
|
|
402
411
|
* @default true
|
|
@@ -407,6 +416,10 @@ declare type DialogFooterProps = {
|
|
|
407
416
|
};
|
|
408
417
|
|
|
409
418
|
declare type DialogHeaderProps = {
|
|
419
|
+
/**
|
|
420
|
+
* Define the padding for the dialog header
|
|
421
|
+
*/
|
|
422
|
+
padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';
|
|
410
423
|
/**
|
|
411
424
|
* Show a border at the bottom of the header
|
|
412
425
|
* @default true
|
|
@@ -1436,6 +1449,11 @@ declare type TabsContentProps = {
|
|
|
1436
1449
|
declare type TabsRootProps = {
|
|
1437
1450
|
id?: string;
|
|
1438
1451
|
children: ReactNode;
|
|
1452
|
+
/**
|
|
1453
|
+
* Define the padding of the dialog
|
|
1454
|
+
* @default "compact"
|
|
1455
|
+
*/
|
|
1456
|
+
padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';
|
|
1439
1457
|
/**
|
|
1440
1458
|
* The default active tab
|
|
1441
1459
|
* Used for uncontrolled components
|