@frontify/fondue-components 20.0.0-beta.2 → 20.0.0-beta.4
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 +23 -19
- package/dist/fondue-components10.js.map +1 -1
- package/dist/fondue-components11.js +84 -66
- package/dist/fondue-components11.js.map +1 -1
- package/dist/fondue-components12.js +1 -1
- package/dist/fondue-components13.js +34 -24
- package/dist/fondue-components13.js.map +1 -1
- package/dist/fondue-components14.js +1 -1
- package/dist/fondue-components15.js +1 -1
- package/dist/fondue-components17.js +1 -1
- package/dist/fondue-components18.js +1 -1
- package/dist/fondue-components19.js +1 -1
- package/dist/fondue-components20.js +1 -1
- package/dist/fondue-components21.js +2 -2
- package/dist/fondue-components22.js +6 -6
- package/dist/fondue-components23.js +1 -1
- package/dist/fondue-components24.js +1 -1
- package/dist/fondue-components25.js +59 -59
- package/dist/fondue-components25.js.map +1 -1
- package/dist/fondue-components26.js +3 -3
- package/dist/fondue-components27.js +1 -1
- package/dist/fondue-components28.js +36 -34
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components29.js +1 -1
- package/dist/fondue-components30.js +1 -1
- package/dist/fondue-components32.js +2 -2
- package/dist/fondue-components37.js +1 -1
- package/dist/fondue-components40.js +1 -1
- package/dist/fondue-components49.js +5 -60
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components50.js +59 -17
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +18 -19
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +18 -4
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +3 -13
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +13 -3
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +3 -17
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +19 -35
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +35 -5
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +4 -12
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +12 -4
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components60.js +4 -24
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +24 -16
- package/dist/fondue-components61.js.map +1 -1
- package/dist/fondue-components62.js +16 -146
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +151 -19
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +19 -77
- package/dist/fondue-components64.js.map +1 -1
- package/dist/fondue-components65.js +77 -8
- package/dist/fondue-components65.js.map +1 -1
- package/dist/fondue-components66.js +8 -35
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components67.js +34 -48
- package/dist/fondue-components67.js.map +1 -1
- package/dist/fondue-components68.js +70 -10
- package/dist/fondue-components68.js.map +1 -1
- package/dist/fondue-components69.js +8 -10
- package/dist/fondue-components69.js.map +1 -1
- package/dist/fondue-components70.js +12 -12
- package/dist/fondue-components70.js.map +1 -1
- package/dist/fondue-components71.js +12 -20
- package/dist/fondue-components71.js.map +1 -1
- package/dist/fondue-components72.js +21 -29
- package/dist/fondue-components72.js.map +1 -1
- package/dist/fondue-components73.js +33 -55
- package/dist/fondue-components73.js.map +1 -1
- package/dist/fondue-components74.js +55 -14
- package/dist/fondue-components74.js.map +1 -1
- package/dist/fondue-components75.js +14 -25
- package/dist/fondue-components75.js.map +1 -1
- package/dist/fondue-components76.js +24 -13
- package/dist/fondue-components76.js.map +1 -1
- package/dist/fondue-components77.js +14 -8
- package/dist/fondue-components77.js.map +1 -1
- package/dist/fondue-components78.js +8 -6
- package/dist/fondue-components78.js.map +1 -1
- package/dist/fondue-components79.js +5 -3
- package/dist/fondue-components79.js.map +1 -1
- package/dist/fondue-components80.js +4 -4
- package/dist/fondue-components80.js.map +1 -1
- package/dist/fondue-components81.js +5 -2
- package/dist/fondue-components81.js.map +1 -1
- package/dist/fondue-components82.js +14 -14
- package/dist/fondue-components83.js +2 -40
- package/dist/fondue-components83.js.map +1 -1
- package/dist/fondue-components84.js +43 -0
- package/dist/fondue-components84.js.map +1 -0
- package/dist/fondue-components9.js +77 -66
- package/dist/fondue-components9.js.map +1 -1
- package/dist/index.d.ts +18 -3
- package/dist/style.css +1 -1
- package/package.json +4 -4
|
@@ -1,41 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as p from "@radix-ui/react-separator";
|
|
3
3
|
import { forwardRef as f } from "react";
|
|
4
4
|
import { cn as l } from "./fondue-components36.js";
|
|
5
|
-
import
|
|
6
|
-
|
|
5
|
+
import v from "./fondue-components49.js";
|
|
6
|
+
import { dividerStyles as c } from "./fondue-components50.js";
|
|
7
|
+
const h = f(
|
|
7
8
|
({
|
|
8
|
-
"data-test-id":
|
|
9
|
-
direction:
|
|
10
|
-
className:
|
|
11
|
-
variant:
|
|
12
|
-
as:
|
|
13
|
-
decorative:
|
|
9
|
+
"data-test-id": i = "fondue-divider",
|
|
10
|
+
direction: r = "horizontal",
|
|
11
|
+
className: a,
|
|
12
|
+
variant: o,
|
|
13
|
+
as: e = "div",
|
|
14
|
+
decorative: d,
|
|
14
15
|
...m
|
|
15
16
|
}, s) => {
|
|
16
|
-
const n =
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
const n = e;
|
|
18
|
+
return /* @__PURE__ */ t(
|
|
18
19
|
p.Root,
|
|
19
20
|
{
|
|
20
21
|
ref: s,
|
|
21
22
|
className: l(
|
|
22
23
|
c({
|
|
23
|
-
direction:
|
|
24
|
-
variant:
|
|
24
|
+
direction: r,
|
|
25
|
+
variant: o,
|
|
25
26
|
...m
|
|
26
27
|
}),
|
|
27
|
-
|
|
28
|
+
v.root,
|
|
29
|
+
a
|
|
28
30
|
),
|
|
29
|
-
"data-
|
|
30
|
-
|
|
31
|
+
"data-variant": o,
|
|
32
|
+
"data-test-id": i,
|
|
33
|
+
decorative: d,
|
|
34
|
+
"data-orientation": r,
|
|
31
35
|
asChild: !0,
|
|
32
|
-
children: /* @__PURE__ */
|
|
36
|
+
children: /* @__PURE__ */ t(n, {})
|
|
33
37
|
}
|
|
34
38
|
);
|
|
35
39
|
}
|
|
36
40
|
);
|
|
37
|
-
|
|
41
|
+
h.displayName = "Divider";
|
|
38
42
|
export {
|
|
39
|
-
|
|
43
|
+
h as Divider
|
|
40
44
|
};
|
|
41
45
|
//# sourceMappingURL=fondue-components10.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components10.js","sources":["../src/components/Divider/Divider.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as Separator from '@radix-ui/react-separator';\nimport { forwardRef, type ForwardedRef, type ReactElement } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport { dividerStyles } from './styles/dividerStyles';\n\ntype DividerStyle = 'noline' | 'dashed' | 'solid';\ntype DividerPadding = 'none' | 'small' | 'medium' | 'large';\ntype DividerDirection = 'horizontal' | 'vertical';\ntype DividerColor = 'weak' | 'default' | 'strong' | 'x-strong';\n\nexport type DividerProps = {\n /**\n * The style of the divider\n * @default \"solid\"\n */\n variant?: DividerStyle;\n /**\n * The padding of the divider\n * @default \"medium\"\n */\n padding?: DividerPadding;\n /**\n * The color of the divider\n * @default \"default\"\n */\n color?: DividerColor;\n /**\n * The direction of the divider\n * @default \"horizontal\"\n */\n direction?: DividerDirection;\n /**\n * The html element to be used\n * @default \"div\"\n */\n as?: 'div' | 'li';\n /**\n * When `true`, signifies that it is purely visual, carries no semantic\n * meaning, and ensures it is not present in the accessibility tree.\n * @default false\n */\n decorative?: boolean;\n 'data-test-id'?: string;\n className?: string;\n};\n\nexport const Divider = forwardRef<HTMLDivElement, DividerProps>(\n (\n {\n 'data-test-id': dataTestId = 'fondue-divider',\n direction = 'horizontal',\n className,\n variant,\n as = 'div',\n decorative,\n ...props\n }: DividerProps,\n ref: ForwardedRef<HTMLDivElement | null>,\n ): ReactElement => {\n const Component = as;\n\n return (\n <Separator.Root\n ref={ref}\n className={cn(\n dividerStyles({\n direction,\n variant,\n ...props,\n }),\n className,\n )}\n data-test-id={dataTestId}\n decorative={decorative}\n asChild\n >\n <Component />\n </Separator.Root>\n );\n },\n);\n\nDivider.displayName = 'Divider';\n"],"names":["Divider","forwardRef","dataTestId","direction","className","variant","as","decorative","props","ref","Component","jsx","Separator","cn","dividerStyles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components10.js","sources":["../src/components/Divider/Divider.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as Separator from '@radix-ui/react-separator';\nimport { forwardRef, type ForwardedRef, type ReactElement } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport borderStyles from './styles/borderStyles.module.scss';\nimport { dividerStyles } from './styles/dividerStyles';\n\ntype DividerStyle = 'noline' | 'dashed' | 'solid';\ntype DividerPadding = 'none' | 'small' | 'medium' | 'large';\ntype DividerDirection = 'horizontal' | 'vertical';\ntype DividerColor = 'weak' | 'default' | 'strong' | 'x-strong';\n\nexport type DividerProps = {\n /**\n * The style of the divider\n * @default \"solid\"\n */\n variant?: DividerStyle;\n /**\n * The padding of the divider\n * @default \"medium\"\n */\n padding?: DividerPadding;\n /**\n * The color of the divider\n * @default \"default\"\n */\n color?: DividerColor;\n /**\n * The direction of the divider\n * @default \"horizontal\"\n */\n direction?: DividerDirection;\n /**\n * The html element to be used\n * @default \"div\"\n */\n as?: 'div' | 'li';\n /**\n * When `true`, signifies that it is purely visual, carries no semantic\n * meaning, and ensures it is not present in the accessibility tree.\n * @default false\n */\n decorative?: boolean;\n 'data-test-id'?: string;\n className?: string;\n};\n\nexport const Divider = forwardRef<HTMLDivElement, DividerProps>(\n (\n {\n 'data-test-id': dataTestId = 'fondue-divider',\n direction = 'horizontal',\n className,\n variant,\n as = 'div',\n decorative,\n ...props\n }: DividerProps,\n ref: ForwardedRef<HTMLDivElement | null>,\n ): ReactElement => {\n const Component = as;\n\n return (\n <Separator.Root\n ref={ref}\n className={cn(\n dividerStyles({\n direction,\n variant,\n ...props,\n }),\n borderStyles.root,\n className,\n )}\n data-variant={variant}\n data-test-id={dataTestId}\n decorative={decorative}\n data-orientation={direction}\n asChild\n >\n <Component />\n </Separator.Root>\n );\n },\n);\n\nDivider.displayName = 'Divider';\n"],"names":["Divider","forwardRef","dataTestId","direction","className","variant","as","decorative","props","ref","Component","jsx","Separator","cn","dividerStyles","borderStyles"],"mappings":";;;;;;AAmDO,MAAMA,IAAUC;AAAA,EACnB,CACI;AAAA,IACI,gBAAgBC,IAAa;AAAA,IAC7B,WAAAC,IAAY;AAAA,IACZ,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,IAAAC,IAAK;AAAA,IACL,YAAAC;AAAA,IACA,GAAGC;AAAA,KAEPC,MACe;AACf,UAAMC,IAAYJ;AAGd,WAAA,gBAAAK;AAAA,MAACC,EAAU;AAAA,MAAV;AAAA,QACG,KAAAH;AAAA,QACA,WAAWI;AAAA,UACPC,EAAc;AAAA,YACV,WAAAX;AAAA,YACA,SAAAE;AAAA,YACA,GAAGG;AAAA,UAAA,CACN;AAAA,UACDO,EAAa;AAAA,UACbX;AAAA,QACJ;AAAA,QACA,gBAAcC;AAAA,QACd,gBAAcH;AAAA,QACd,YAAAK;AAAA,QACA,oBAAkBJ;AAAA,QAClB,SAAO;AAAA,QAEP,4BAACO,GAAU,CAAA,CAAA;AAAA,MAAA;AAAA,IACf;AAAA,EAAA;AAGZ;AAEAV,EAAQ,cAAc;"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsx as n, jsxs as g } from "react/jsx-runtime";
|
|
2
|
-
import { IconCaretRight as
|
|
3
|
-
import * as
|
|
4
|
-
import { forwardRef as i, useMemo as
|
|
5
|
-
import { useFondueTheme as
|
|
6
|
-
import { useProcessedChildren as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
2
|
+
import { IconCaretRight as G } from "@frontify/fondue-icons";
|
|
3
|
+
import * as s from "@radix-ui/react-dropdown-menu";
|
|
4
|
+
import { forwardRef as i, useMemo as A, Children as v, useRef as D } from "react";
|
|
5
|
+
import { useFondueTheme as b, ThemeProvider as h } from "./fondue-components29.js";
|
|
6
|
+
import { useProcessedChildren as N } from "./fondue-components51.js";
|
|
7
|
+
import u from "./fondue-components52.js";
|
|
8
|
+
const R = ({
|
|
9
9
|
children: o,
|
|
10
10
|
open: t,
|
|
11
11
|
modal: e = !1,
|
|
12
12
|
onOpenChange: r,
|
|
13
|
-
"data-test-id":
|
|
14
|
-
}) => /* @__PURE__ */ n(
|
|
15
|
-
|
|
13
|
+
"data-test-id": d = "fondue-dropdown"
|
|
14
|
+
}) => /* @__PURE__ */ n(s.Root, { open: t, modal: e, onOpenChange: r, "data-test-id": d, children: o });
|
|
15
|
+
R.displayName = "Dropdown.Root";
|
|
16
16
|
const S = ({
|
|
17
17
|
asChild: o = !0,
|
|
18
18
|
children: t,
|
|
19
19
|
"data-test-id": e = "fondue-dropdown-trigger",
|
|
20
20
|
...r
|
|
21
|
-
},
|
|
21
|
+
}, d) => /* @__PURE__ */ n(s.Trigger, { asChild: o, "data-test-id": e, ref: d, ...r, children: t });
|
|
22
22
|
S.displayName = "Dropdown.Trigger";
|
|
23
23
|
const x = {
|
|
24
24
|
compact: 8,
|
|
@@ -32,77 +32,95 @@ const x = {
|
|
|
32
32
|
align: t = "start",
|
|
33
33
|
triggerOffset: e = "compact",
|
|
34
34
|
children: r,
|
|
35
|
-
preventTriggerFocusOnClose:
|
|
36
|
-
viewportCollisionPadding:
|
|
35
|
+
preventTriggerFocusOnClose: d,
|
|
36
|
+
viewportCollisionPadding: a = "compact",
|
|
37
37
|
"data-test-id": p = "fondue-dropdown-content"
|
|
38
38
|
}, l) => {
|
|
39
|
-
const
|
|
40
|
-
return /* @__PURE__ */ n(
|
|
41
|
-
|
|
39
|
+
const w = b();
|
|
40
|
+
return /* @__PURE__ */ n(s.Portal, { children: /* @__PURE__ */ n(h, { theme: w, children: /* @__PURE__ */ n(
|
|
41
|
+
s.Content,
|
|
42
42
|
{
|
|
43
43
|
align: t,
|
|
44
|
-
collisionPadding: O[
|
|
44
|
+
collisionPadding: O[a],
|
|
45
45
|
sideOffset: x[e],
|
|
46
46
|
side: o,
|
|
47
|
-
className:
|
|
47
|
+
className: u.content,
|
|
48
48
|
"data-test-id": p,
|
|
49
49
|
ref: l,
|
|
50
|
-
onCloseAutoFocus: (
|
|
51
|
-
|
|
50
|
+
onCloseAutoFocus: (m) => {
|
|
51
|
+
d && m.preventDefault();
|
|
52
52
|
},
|
|
53
53
|
children: r
|
|
54
54
|
}
|
|
55
55
|
) }) });
|
|
56
56
|
};
|
|
57
57
|
C.displayName = "Dropdown.Content";
|
|
58
|
-
const
|
|
59
|
-
() =>
|
|
58
|
+
const F = ({ children: o, heading: t, "data-test-id": e = "fondue-dropdown-group" }, r) => A(
|
|
59
|
+
() => v.toArray(o).filter((a) => a !== null).length > 0,
|
|
60
60
|
[o]
|
|
61
|
-
) ? /* @__PURE__ */ g(
|
|
62
|
-
t ? /* @__PURE__ */ n("div", { className:
|
|
61
|
+
) ? /* @__PURE__ */ g(s.Group, { className: u.group, "data-test-id": e, ref: r, children: [
|
|
62
|
+
t ? /* @__PURE__ */ n("div", { className: u.groupHeading, children: /* @__PURE__ */ n("span", { "aria-label": t, children: t }) }) : null,
|
|
63
63
|
o
|
|
64
64
|
] }) : null;
|
|
65
|
-
|
|
66
|
-
const
|
|
65
|
+
F.displayName = "Dropdown.Group";
|
|
66
|
+
const I = ({
|
|
67
67
|
children: o,
|
|
68
68
|
"data-test-id": t = "fondue-dropdown-submenu"
|
|
69
|
-
}) => /* @__PURE__ */ n(
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
const { content: r } =
|
|
73
|
-
return /* @__PURE__ */ g(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
}) => /* @__PURE__ */ n(s.Sub, { "data-test-id": t, children: o });
|
|
70
|
+
I.displayName = "Dropdown.SubMenu";
|
|
71
|
+
const T = ({ children: o, "data-test-id": t = "fondue-dropdown-subtrigger" }, e) => {
|
|
72
|
+
const { content: r } = N(o), d = D(!1);
|
|
73
|
+
return /* @__PURE__ */ g(
|
|
74
|
+
s.SubTrigger,
|
|
75
|
+
{
|
|
76
|
+
className: u.subTrigger,
|
|
77
|
+
"data-show-focus-ring": d.current,
|
|
78
|
+
"data-test-id": t,
|
|
79
|
+
ref: e,
|
|
80
|
+
onMouseEnter: () => {
|
|
81
|
+
d.current = !0;
|
|
82
|
+
},
|
|
83
|
+
onFocus: (a) => {
|
|
84
|
+
d.current || (a.target.dataset.showFocusRing = "true");
|
|
85
|
+
},
|
|
86
|
+
onBlur: (a) => {
|
|
87
|
+
a.target.dataset.showFocusRing = "false", d.current = !1;
|
|
88
|
+
},
|
|
89
|
+
children: [
|
|
90
|
+
r,
|
|
91
|
+
/* @__PURE__ */ n(G, { className: u.subMenuIndicator, size: 16 })
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
);
|
|
77
95
|
};
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
const r =
|
|
81
|
-
return /* @__PURE__ */ n(
|
|
96
|
+
T.displayName = "Dropdown.SubTrigger";
|
|
97
|
+
const y = ({ children: o, "data-test-id": t = "fondue-dropdown-subcontent" }, e) => {
|
|
98
|
+
const r = b();
|
|
99
|
+
return /* @__PURE__ */ n(s.Portal, { children: /* @__PURE__ */ n(h, { theme: r, children: /* @__PURE__ */ n(s.SubContent, { className: u.subContent, "data-test-id": t, ref: e, children: o }) }) });
|
|
82
100
|
};
|
|
83
|
-
|
|
84
|
-
const
|
|
101
|
+
y.displayName = "Dropdown.SubContent";
|
|
102
|
+
const M = ({
|
|
85
103
|
children: o,
|
|
86
104
|
disabled: t,
|
|
87
105
|
textValue: e,
|
|
88
106
|
onSelect: r,
|
|
89
|
-
emphasis:
|
|
90
|
-
asChild:
|
|
107
|
+
emphasis: d = "default",
|
|
108
|
+
asChild: a = !1,
|
|
91
109
|
"data-test-id": p = "fondue-dropdown-subtrigger",
|
|
92
110
|
...l
|
|
93
|
-
},
|
|
94
|
-
const { content:
|
|
111
|
+
}, w) => {
|
|
112
|
+
const { content: m } = N(o), c = D(!1);
|
|
95
113
|
return /* @__PURE__ */ n(
|
|
96
|
-
|
|
114
|
+
s.Item,
|
|
97
115
|
{
|
|
98
116
|
onSelect: r,
|
|
99
|
-
className:
|
|
117
|
+
className: u.item,
|
|
100
118
|
textValue: e,
|
|
101
119
|
"data-test-id": p,
|
|
102
|
-
"data-emphasis":
|
|
103
|
-
ref:
|
|
120
|
+
"data-emphasis": d,
|
|
121
|
+
ref: w,
|
|
104
122
|
disabled: t,
|
|
105
|
-
asChild:
|
|
123
|
+
asChild: a,
|
|
106
124
|
"data-show-focus-ring": c.current,
|
|
107
125
|
onMouseEnter: () => {
|
|
108
126
|
c.current = !0;
|
|
@@ -114,34 +132,34 @@ const y = ({
|
|
|
114
132
|
f.target.dataset.showFocusRing = "false", c.current = !1;
|
|
115
133
|
},
|
|
116
134
|
...l,
|
|
117
|
-
children:
|
|
135
|
+
children: m
|
|
118
136
|
}
|
|
119
137
|
);
|
|
120
138
|
};
|
|
121
|
-
|
|
122
|
-
const P = ({ children: o, name: t, "data-test-id": e = "fondue-dropdown-slot" }, r) => /* @__PURE__ */ n("div", { "data-name": t, className:
|
|
139
|
+
M.displayName = "Dropdown.Item";
|
|
140
|
+
const P = ({ children: o, name: t, "data-test-id": e = "fondue-dropdown-slot" }, r) => /* @__PURE__ */ n("div", { "data-name": t, className: u.slot, "data-test-id": e, ref: r, children: o });
|
|
123
141
|
P.displayName = "Dropdown.Slot";
|
|
124
|
-
const _ = i(S),
|
|
125
|
-
Root:
|
|
142
|
+
const _ = i(S), E = i(C), j = i(F), B = i(T), L = i(y), z = i(M), H = i(P), Q = {
|
|
143
|
+
Root: R,
|
|
126
144
|
Trigger: _,
|
|
127
|
-
Content:
|
|
128
|
-
Group:
|
|
129
|
-
SubMenu:
|
|
130
|
-
SubTrigger:
|
|
131
|
-
SubContent:
|
|
132
|
-
Item:
|
|
145
|
+
Content: E,
|
|
146
|
+
Group: j,
|
|
147
|
+
SubMenu: I,
|
|
148
|
+
SubTrigger: B,
|
|
149
|
+
SubContent: L,
|
|
150
|
+
Item: z,
|
|
133
151
|
Slot: H
|
|
134
152
|
};
|
|
135
153
|
export {
|
|
136
154
|
Q as Dropdown,
|
|
137
155
|
C as DropdownContent,
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
156
|
+
F as DropdownGroup,
|
|
157
|
+
M as DropdownItem,
|
|
158
|
+
R as DropdownRoot,
|
|
141
159
|
P as DropdownSlot,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
160
|
+
y as DropdownSubContent,
|
|
161
|
+
I as DropdownSubMenu,
|
|
162
|
+
T as DropdownSubTrigger,
|
|
145
163
|
S as DropdownTrigger
|
|
146
164
|
};
|
|
147
165
|
//# sourceMappingURL=fondue-components11.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components11.js","sources":["../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretRight } from '@frontify/fondue-icons';\nimport * as RadixDropdown from '@radix-ui/react-dropdown-menu';\nimport { Children, forwardRef, useMemo, useRef, type ForwardedRef, type ReactNode } from 'react';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport { useProcessedChildren } from './hooks/useProcessedChildren';\nimport styles from './styles/dropdown.module.scss';\n\nexport type DropdownRootProps = {\n children?: ReactNode;\n /**\n * When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers.\n * @default false\n */\n modal?: boolean;\n /**\n * Controls the open state of the dropdown.\n */\n open?: boolean;\n /**\n * Callback that is called when the open state of the dropdown changes.\n */\n onOpenChange?: (open: boolean) => void;\n\n 'data-test-id'?: string;\n};\n\nexport const DropdownRoot = ({\n children,\n open,\n modal = false,\n onOpenChange,\n 'data-test-id': dataTestId = 'fondue-dropdown',\n}: DropdownRootProps) => {\n return (\n <RadixDropdown.Root open={open} modal={modal} onOpenChange={onOpenChange} data-test-id={dataTestId}>\n {children}\n </RadixDropdown.Root>\n );\n};\nDropdownRoot.displayName = 'Dropdown.Root';\n\nexport type DropdownTriggerProps = {\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 const DropdownTrigger = (\n {\n asChild = true,\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-trigger',\n ...props\n }: DropdownTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixDropdown.Trigger asChild={asChild} data-test-id={dataTestId} ref={ref} {...props}>\n {children}\n </RadixDropdown.Trigger>\n );\n};\nDropdownTrigger.displayName = 'Dropdown.Trigger';\n\ntype DropdownSpacing = 'compact' | 'comfortable' | 'spacious';\ntype DropdownViewportCollisionPadding = 'compact' | 'spacious';\nexport type DropdownContentProps = {\n children?: ReactNode;\n 'data-test-id'?: string;\n /**\n * Defines the alignment of the dropdown.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Defines the preferred side of the dropdown. It will not be respected if there are collisions with the viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Defines the spacing between the dropdown and its trigger.\n * @default 'compact'\n */\n triggerOffset?: DropdownSpacing;\n /**\n * Prevents the focus from being set on the trigger when the dropdown is closed.\n */\n preventTriggerFocusOnClose?: boolean;\n /**\n * Define the minimum distance between the dropdown and the viewport edge\n * @default 'compact'\n */\n viewportCollisionPadding?: DropdownViewportCollisionPadding;\n};\n\nconst SPACING_MAP: Record<DropdownSpacing, number> = {\n compact: 8,\n comfortable: 12,\n spacious: 16,\n};\n\nconst VIEWPORT_COLLISION_PADDING_MAP: Record<DropdownViewportCollisionPadding, number> = {\n compact: 8,\n spacious: 24,\n};\n\nexport const DropdownContent = (\n {\n side = 'bottom',\n align = 'start',\n triggerOffset = 'compact',\n children,\n preventTriggerFocusOnClose,\n viewportCollisionPadding = 'compact',\n 'data-test-id': dataTestId = 'fondue-dropdown-content',\n }: DropdownContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n\n return (\n <RadixDropdown.Portal>\n <ThemeProvider theme={theme}>\n <RadixDropdown.Content\n align={align}\n collisionPadding={VIEWPORT_COLLISION_PADDING_MAP[viewportCollisionPadding]}\n sideOffset={SPACING_MAP[triggerOffset]}\n side={side}\n className={styles.content}\n data-test-id={dataTestId}\n ref={ref}\n onCloseAutoFocus={(event) => {\n if (preventTriggerFocusOnClose) {\n event.preventDefault();\n }\n }}\n >\n {children}\n </RadixDropdown.Content>\n </ThemeProvider>\n </RadixDropdown.Portal>\n );\n};\nDropdownContent.displayName = 'Dropdown.Content';\n\nexport type DropdownGroupProps = { children: ReactNode; heading?: string; 'data-test-id'?: string };\n\nexport const DropdownGroup = (\n { children, heading, 'data-test-id': dataTestId = 'fondue-dropdown-group' }: DropdownGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const hasChildren = useMemo(\n () => Children.toArray(children).filter((child) => child !== null).length > 0,\n [children],\n );\n\n if (!hasChildren) {\n return null;\n }\n\n return (\n <RadixDropdown.Group className={styles.group} data-test-id={dataTestId} ref={ref}>\n {heading ? (\n <div className={styles.groupHeading}>\n <span aria-label={heading}>{heading}</span>\n </div>\n ) : null}\n {children}\n </RadixDropdown.Group>\n );\n};\nDropdownGroup.displayName = 'Dropdown.Group';\n\nexport type DropdownSubMenuProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubMenu = ({\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-submenu',\n}: DropdownSubMenuProps) => {\n return <RadixDropdown.Sub data-test-id={dataTestId}>{children}</RadixDropdown.Sub>;\n};\nDropdownSubMenu.displayName = 'Dropdown.SubMenu';\n\nexport type DropdownSubTriggerProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger' }: DropdownSubTriggerProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { content } = useProcessedChildren(children);\n return (\n <RadixDropdown.SubTrigger className={styles.subTrigger} data-test-id={dataTestId} ref={ref}>\n {content}\n <IconCaretRight className={styles.subMenuIndicator} size={16} />\n </RadixDropdown.SubTrigger>\n );\n};\nDropdownSubTrigger.displayName = 'Dropdown.SubTrigger';\n\nexport type DropdownSubContentProps = {\n children: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const DropdownSubContent = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-subcontent' }: DropdownSubContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n return (\n <RadixDropdown.Portal>\n <ThemeProvider theme={theme}>\n <RadixDropdown.SubContent className={styles.subContent} data-test-id={dataTestId} ref={ref}>\n {children}\n </RadixDropdown.SubContent>\n </ThemeProvider>\n </RadixDropdown.Portal>\n );\n};\nDropdownSubContent.displayName = 'Dropdown.SubContent';\n\nexport type DropdownItemProps = {\n children: ReactNode;\n /**\n * Disables the item.\n */\n disabled?: boolean;\n /**\n * The text value of the item that is passed to the onSelect callback.\n */\n textValue?: string;\n /**\n * The style of the item.\n * @default \"default\"\n */\n emphasis?: 'default' | 'danger';\n /**\n * Callback that is called when the item is selected.\n */\n onSelect?: (event: Event) => void;\n /**\n * If true, the item props will be passed to the child element.\n * @default false\n */\n asChild?: boolean;\n 'data-test-id'?: string;\n};\n\nexport const DropdownItem = (\n {\n children,\n disabled,\n textValue,\n onSelect,\n emphasis = 'default',\n asChild = false,\n 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger',\n ...props\n }: DropdownItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { content } = useProcessedChildren(children);\n const wasMouseInteracted = useRef(false);\n\n return (\n <RadixDropdown.Item\n onSelect={onSelect}\n className={styles.item}\n textValue={textValue}\n data-test-id={dataTestId}\n data-emphasis={emphasis}\n ref={ref}\n disabled={disabled}\n asChild={asChild}\n data-show-focus-ring={wasMouseInteracted.current}\n onMouseEnter={() => {\n wasMouseInteracted.current = true;\n }}\n onFocus={(focusEvent) => {\n if (!wasMouseInteracted.current) {\n focusEvent.target.dataset.showFocusRing = 'true';\n }\n }}\n onBlur={(blurEvent) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasMouseInteracted.current = false;\n }}\n {...props}\n >\n {content}\n </RadixDropdown.Item>\n );\n};\nDropdownItem.displayName = 'Dropdown.Item';\n\nexport type DropdownSlotProps = { children: ReactNode; name?: 'left' | 'right'; 'data-test-id'?: string };\n\nexport const DropdownSlot = (\n { children, name, 'data-test-id': dataTestId = 'fondue-dropdown-slot' }: DropdownSlotProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-name={name} className={styles.slot} data-test-id={dataTestId} ref={ref}>\n {children}\n </div>\n );\n};\nDropdownSlot.displayName = 'Dropdown.Slot';\n\nconst ForwardedRefDropdownTrigger = forwardRef<HTMLButtonElement, DropdownTriggerProps>(DropdownTrigger);\nconst ForwardedRefDropdownContent = forwardRef<HTMLDivElement, DropdownContentProps>(DropdownContent);\nconst ForwardedRefDropdownGroup = forwardRef<HTMLDivElement, DropdownGroupProps>(DropdownGroup);\nconst ForwardedRefDropdownSubTrigger = forwardRef<HTMLDivElement, DropdownSubTriggerProps>(DropdownSubTrigger);\nconst ForwardedRefDropdownSubContent = forwardRef<HTMLDivElement, DropdownSubContentProps>(DropdownSubContent);\nconst ForwardedRefDropdownItem = forwardRef<HTMLDivElement, DropdownItemProps>(DropdownItem);\nconst ForwardedRefDropdownSlot = forwardRef<HTMLDivElement, DropdownSlotProps>(DropdownSlot);\n\nexport const Dropdown = {\n Root: DropdownRoot,\n Trigger: ForwardedRefDropdownTrigger,\n Content: ForwardedRefDropdownContent,\n Group: ForwardedRefDropdownGroup,\n SubMenu: DropdownSubMenu,\n SubTrigger: ForwardedRefDropdownSubTrigger,\n SubContent: ForwardedRefDropdownSubContent,\n Item: ForwardedRefDropdownItem,\n Slot: ForwardedRefDropdownSlot,\n};\n"],"names":["DropdownRoot","children","open","modal","onOpenChange","dataTestId","jsx","RadixDropdown","DropdownTrigger","asChild","props","ref","SPACING_MAP","VIEWPORT_COLLISION_PADDING_MAP","DropdownContent","side","align","triggerOffset","preventTriggerFocusOnClose","viewportCollisionPadding","theme","useFondueTheme","ThemeProvider","styles","event","DropdownGroup","heading","useMemo","Children","child","jsxs","DropdownSubMenu","DropdownSubTrigger","content","useProcessedChildren","IconCaretRight","DropdownSubContent","DropdownItem","disabled","textValue","onSelect","emphasis","wasMouseInteracted","useRef","focusEvent","blurEvent","DropdownSlot","name","ForwardedRefDropdownTrigger","forwardRef","ForwardedRefDropdownContent","ForwardedRefDropdownGroup","ForwardedRefDropdownSubTrigger","ForwardedRefDropdownSubContent","ForwardedRefDropdownItem","ForwardedRefDropdownSlot","Dropdown"],"mappings":";;;;;;;AA8BO,MAAMA,IAAe,CAAC;AAAA,EACzB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,cAAAC;AAAA,EACA,gBAAgBC,IAAa;AACjC,MAEQ,gBAAAC,EAACC,EAAc,MAAd,EAAmB,MAAAL,GAAY,OAAAC,GAAc,cAAAC,GAA4B,gBAAcC,GACnF,UAAAJ,GACL;AAGRD,EAAa,cAAc;AAYpB,MAAMQ,IAAkB,CAC3B;AAAA,EACI,SAAAC,IAAU;AAAA,EACV,UAAAR;AAAA,EACA,gBAAgBI,IAAa;AAAA,EAC7B,GAAGK;AACP,GACAC,MAGI,gBAAAL,EAACC,EAAc,SAAd,EAAsB,SAAAE,GAAk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,EACT,OAAOC;AAAA,EACP,SAASpB;AAAA,EACT,YAAYqB;AAAA,EACZ,YAAYC;AAAA,EACZ,MAAMC;AAAA,EACN,MAAMC;AACV;"}
|
|
1
|
+
{"version":3,"file":"fondue-components11.js","sources":["../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretRight } from '@frontify/fondue-icons';\nimport * as RadixDropdown from '@radix-ui/react-dropdown-menu';\nimport { Children, forwardRef, useMemo, useRef, type ForwardedRef, type ReactNode } from 'react';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport { useProcessedChildren } from './hooks/useProcessedChildren';\nimport styles from './styles/dropdown.module.scss';\n\nexport type DropdownRootProps = {\n children?: ReactNode;\n /**\n * When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers.\n * @default false\n */\n modal?: boolean;\n /**\n * Controls the open state of the dropdown.\n */\n open?: boolean;\n /**\n * Callback that is called when the open state of the dropdown changes.\n */\n onOpenChange?: (open: boolean) => void;\n\n 'data-test-id'?: string;\n};\n\nexport const DropdownRoot = ({\n children,\n open,\n modal = false,\n onOpenChange,\n 'data-test-id': dataTestId = 'fondue-dropdown',\n}: DropdownRootProps) => {\n return (\n <RadixDropdown.Root open={open} modal={modal} onOpenChange={onOpenChange} data-test-id={dataTestId}>\n {children}\n </RadixDropdown.Root>\n );\n};\nDropdownRoot.displayName = 'Dropdown.Root';\n\nexport type DropdownTriggerProps = {\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 const DropdownTrigger = (\n {\n asChild = true,\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-trigger',\n ...props\n }: DropdownTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixDropdown.Trigger asChild={asChild} data-test-id={dataTestId} ref={ref} {...props}>\n {children}\n </RadixDropdown.Trigger>\n );\n};\nDropdownTrigger.displayName = 'Dropdown.Trigger';\n\ntype DropdownSpacing = 'compact' | 'comfortable' | 'spacious';\ntype DropdownViewportCollisionPadding = 'compact' | 'spacious';\nexport type DropdownContentProps = {\n children?: ReactNode;\n 'data-test-id'?: string;\n /**\n * Defines the alignment of the dropdown.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Defines the preferred side of the dropdown. It will not be respected if there are collisions with the viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Defines the spacing between the dropdown and its trigger.\n * @default 'compact'\n */\n triggerOffset?: DropdownSpacing;\n /**\n * Prevents the focus from being set on the trigger when the dropdown is closed.\n */\n preventTriggerFocusOnClose?: boolean;\n /**\n * Define the minimum distance between the dropdown and the viewport edge\n * @default 'compact'\n */\n viewportCollisionPadding?: DropdownViewportCollisionPadding;\n};\n\nconst SPACING_MAP: Record<DropdownSpacing, number> = {\n compact: 8,\n comfortable: 12,\n spacious: 16,\n};\n\nconst VIEWPORT_COLLISION_PADDING_MAP: Record<DropdownViewportCollisionPadding, number> = {\n compact: 8,\n spacious: 24,\n};\n\nexport const DropdownContent = (\n {\n side = 'bottom',\n align = 'start',\n triggerOffset = 'compact',\n children,\n preventTriggerFocusOnClose,\n viewportCollisionPadding = 'compact',\n 'data-test-id': dataTestId = 'fondue-dropdown-content',\n }: DropdownContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n\n return (\n <RadixDropdown.Portal>\n <ThemeProvider theme={theme}>\n <RadixDropdown.Content\n align={align}\n collisionPadding={VIEWPORT_COLLISION_PADDING_MAP[viewportCollisionPadding]}\n sideOffset={SPACING_MAP[triggerOffset]}\n side={side}\n className={styles.content}\n data-test-id={dataTestId}\n ref={ref}\n onCloseAutoFocus={(event) => {\n if (preventTriggerFocusOnClose) {\n event.preventDefault();\n }\n }}\n >\n {children}\n </RadixDropdown.Content>\n </ThemeProvider>\n </RadixDropdown.Portal>\n );\n};\nDropdownContent.displayName = 'Dropdown.Content';\n\nexport type DropdownGroupProps = { children: ReactNode; heading?: string; 'data-test-id'?: string };\n\nexport const DropdownGroup = (\n { children, heading, 'data-test-id': dataTestId = 'fondue-dropdown-group' }: DropdownGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const hasChildren = useMemo(\n () => Children.toArray(children).filter((child) => child !== null).length > 0,\n [children],\n );\n\n if (!hasChildren) {\n return null;\n }\n\n return (\n <RadixDropdown.Group className={styles.group} data-test-id={dataTestId} ref={ref}>\n {heading ? (\n <div className={styles.groupHeading}>\n <span aria-label={heading}>{heading}</span>\n </div>\n ) : null}\n {children}\n </RadixDropdown.Group>\n );\n};\nDropdownGroup.displayName = 'Dropdown.Group';\n\nexport type DropdownSubMenuProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubMenu = ({\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-submenu',\n}: DropdownSubMenuProps) => {\n return <RadixDropdown.Sub data-test-id={dataTestId}>{children}</RadixDropdown.Sub>;\n};\nDropdownSubMenu.displayName = 'Dropdown.SubMenu';\n\nexport type DropdownSubTriggerProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger' }: DropdownSubTriggerProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { content } = useProcessedChildren(children);\n const wasMouseInteracted = useRef(false);\n return (\n <RadixDropdown.SubTrigger\n className={styles.subTrigger}\n data-show-focus-ring={wasMouseInteracted.current}\n data-test-id={dataTestId}\n ref={ref}\n onMouseEnter={() => {\n wasMouseInteracted.current = true;\n }}\n onFocus={(focusEvent) => {\n if (!wasMouseInteracted.current) {\n focusEvent.target.dataset.showFocusRing = 'true';\n }\n }}\n onBlur={(blurEvent) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasMouseInteracted.current = false;\n }}\n >\n {content}\n <IconCaretRight className={styles.subMenuIndicator} size={16} />\n </RadixDropdown.SubTrigger>\n );\n};\nDropdownSubTrigger.displayName = 'Dropdown.SubTrigger';\n\nexport type DropdownSubContentProps = {\n children: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const DropdownSubContent = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-subcontent' }: DropdownSubContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n return (\n <RadixDropdown.Portal>\n <ThemeProvider theme={theme}>\n <RadixDropdown.SubContent className={styles.subContent} data-test-id={dataTestId} ref={ref}>\n {children}\n </RadixDropdown.SubContent>\n </ThemeProvider>\n </RadixDropdown.Portal>\n );\n};\nDropdownSubContent.displayName = 'Dropdown.SubContent';\n\nexport type DropdownItemProps = {\n children: ReactNode;\n /**\n * Disables the item.\n */\n disabled?: boolean;\n /**\n * The text value of the item that is passed to the onSelect callback.\n */\n textValue?: string;\n /**\n * The style of the item.\n * @default \"default\"\n */\n emphasis?: 'default' | 'danger';\n /**\n * Callback that is called when the item is selected.\n */\n onSelect?: (event: Event) => void;\n /**\n * If true, the item props will be passed to the child element.\n * @default false\n */\n asChild?: boolean;\n 'data-test-id'?: string;\n};\n\nexport const DropdownItem = (\n {\n children,\n disabled,\n textValue,\n onSelect,\n emphasis = 'default',\n asChild = false,\n 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger',\n ...props\n }: DropdownItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { content } = useProcessedChildren(children);\n const wasMouseInteracted = useRef(false);\n\n return (\n <RadixDropdown.Item\n onSelect={onSelect}\n className={styles.item}\n textValue={textValue}\n data-test-id={dataTestId}\n data-emphasis={emphasis}\n ref={ref}\n disabled={disabled}\n asChild={asChild}\n data-show-focus-ring={wasMouseInteracted.current}\n onMouseEnter={() => {\n wasMouseInteracted.current = true;\n }}\n onFocus={(focusEvent) => {\n if (!wasMouseInteracted.current) {\n focusEvent.target.dataset.showFocusRing = 'true';\n }\n }}\n onBlur={(blurEvent) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasMouseInteracted.current = false;\n }}\n {...props}\n >\n {content}\n </RadixDropdown.Item>\n );\n};\nDropdownItem.displayName = 'Dropdown.Item';\n\nexport type DropdownSlotProps = { children: ReactNode; name?: 'left' | 'right'; 'data-test-id'?: string };\n\nexport const DropdownSlot = (\n { children, name, 'data-test-id': dataTestId = 'fondue-dropdown-slot' }: DropdownSlotProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-name={name} className={styles.slot} data-test-id={dataTestId} ref={ref}>\n {children}\n </div>\n );\n};\nDropdownSlot.displayName = 'Dropdown.Slot';\n\nconst ForwardedRefDropdownTrigger = forwardRef<HTMLButtonElement, DropdownTriggerProps>(DropdownTrigger);\nconst ForwardedRefDropdownContent = forwardRef<HTMLDivElement, DropdownContentProps>(DropdownContent);\nconst ForwardedRefDropdownGroup = forwardRef<HTMLDivElement, DropdownGroupProps>(DropdownGroup);\nconst ForwardedRefDropdownSubTrigger = forwardRef<HTMLDivElement, DropdownSubTriggerProps>(DropdownSubTrigger);\nconst ForwardedRefDropdownSubContent = forwardRef<HTMLDivElement, DropdownSubContentProps>(DropdownSubContent);\nconst ForwardedRefDropdownItem = forwardRef<HTMLDivElement, DropdownItemProps>(DropdownItem);\nconst ForwardedRefDropdownSlot = forwardRef<HTMLDivElement, DropdownSlotProps>(DropdownSlot);\n\nexport const Dropdown = {\n Root: DropdownRoot,\n Trigger: ForwardedRefDropdownTrigger,\n Content: ForwardedRefDropdownContent,\n Group: ForwardedRefDropdownGroup,\n SubMenu: DropdownSubMenu,\n SubTrigger: ForwardedRefDropdownSubTrigger,\n SubContent: ForwardedRefDropdownSubContent,\n Item: ForwardedRefDropdownItem,\n Slot: ForwardedRefDropdownSlot,\n};\n"],"names":["DropdownRoot","children","open","modal","onOpenChange","dataTestId","jsx","RadixDropdown","DropdownTrigger","asChild","props","ref","SPACING_MAP","VIEWPORT_COLLISION_PADDING_MAP","DropdownContent","side","align","triggerOffset","preventTriggerFocusOnClose","viewportCollisionPadding","theme","useFondueTheme","ThemeProvider","styles","event","DropdownGroup","heading","useMemo","Children","child","jsxs","DropdownSubMenu","DropdownSubTrigger","content","useProcessedChildren","wasMouseInteracted","useRef","focusEvent","blurEvent","IconCaretRight","DropdownSubContent","DropdownItem","disabled","textValue","onSelect","emphasis","DropdownSlot","name","ForwardedRefDropdownTrigger","forwardRef","ForwardedRefDropdownContent","ForwardedRefDropdownGroup","ForwardedRefDropdownSubTrigger","ForwardedRefDropdownSubContent","ForwardedRefDropdownItem","ForwardedRefDropdownSlot","Dropdown"],"mappings":";;;;;;;AA8BO,MAAMA,IAAe,CAAC;AAAA,EACzB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,cAAAC;AAAA,EACA,gBAAgBC,IAAa;AACjC,MAEQ,gBAAAC,EAACC,EAAc,MAAd,EAAmB,MAAAL,GAAY,OAAAC,GAAc,cAAAC,GAA4B,gBAAcC,GACnF,UAAAJ,GACL;AAGRD,EAAa,cAAc;AAYpB,MAAMQ,IAAkB,CAC3B;AAAA,EACI,SAAAC,IAAU;AAAA,EACV,UAAAR;AAAA,EACA,gBAAgBI,IAAa;AAAA,EAC7B,GAAGK;AACP,GACAC,MAGI,gBAAAL,EAACC,EAAc,SAAd,EAAsB,SAAAE,GAAkB,gBAAcJ,GAAY,KAAAM,GAAW,GAAGD,GAC5E,UAAAT,EACL,CAAA;AAGRO,EAAgB,cAAc;AAiC9B,MAAMI,IAA+C;AAAA,EACjD,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AACd,GAEMC,IAAmF;AAAA,EACrF,SAAS;AAAA,EACT,UAAU;AACd,GAEaC,IAAkB,CAC3B;AAAA,EACI,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,eAAAC,IAAgB;AAAA,EAChB,UAAAhB;AAAA,EACA,4BAAAiB;A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E;AAAA,EACT,OAAOC;AAAA,EACP,SAASpB;AAAA,EACT,YAAYqB;AAAA,EACZ,YAAYC;AAAA,EACZ,MAAMC;AAAA,EACN,MAAMC;AACV;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as n } from "react";
|
|
3
3
|
import { propsToCssVariables as y } from "./fondue-components34.js";
|
|
4
|
-
import x from "./fondue-
|
|
4
|
+
import x from "./fondue-components53.js";
|
|
5
5
|
const u = n(
|
|
6
6
|
({
|
|
7
7
|
as: a = "div",
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as a, jsxs as u } from "react/jsx-runtime";
|
|
2
|
-
import { IconCross as
|
|
3
|
-
import * as
|
|
4
|
-
import { forwardRef as
|
|
2
|
+
import { IconCross as R } from "@frontify/fondue-icons";
|
|
3
|
+
import * as l from "@radix-ui/react-popover";
|
|
4
|
+
import { forwardRef as i } from "react";
|
|
5
5
|
import { addAutoFocusAttribute as w, addShowFocusRing as x } from "./fondue-components47.js";
|
|
6
6
|
import { useFondueTheme as A, ThemeProvider as T } from "./fondue-components29.js";
|
|
7
|
-
import s from "./fondue-
|
|
8
|
-
const n = ({ children: t, ...o }) => /* @__PURE__ */ a(
|
|
7
|
+
import s from "./fondue-components54.js";
|
|
8
|
+
const n = ({ children: t, ...o }) => /* @__PURE__ */ a(l.Root, { ...o, children: t });
|
|
9
9
|
n.displayName = "Flyout.Root";
|
|
10
|
-
const c = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-trigger", ...d },
|
|
11
|
-
|
|
10
|
+
const c = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-trigger", ...d }, r) => /* @__PURE__ */ a(
|
|
11
|
+
l.Trigger,
|
|
12
12
|
{
|
|
13
13
|
onMouseDown: w,
|
|
14
14
|
"data-auto-focus-visible": "true",
|
|
15
15
|
"data-auto-focus-trigger": !0,
|
|
16
16
|
"data-test-id": e,
|
|
17
17
|
asChild: t,
|
|
18
|
-
ref:
|
|
18
|
+
ref: r,
|
|
19
19
|
...d,
|
|
20
20
|
children: o
|
|
21
21
|
}
|
|
@@ -33,25 +33,25 @@ const I = {
|
|
|
33
33
|
maxWidth: o = "360px",
|
|
34
34
|
padding: e = "compact",
|
|
35
35
|
rounded: d = "medium",
|
|
36
|
-
width:
|
|
36
|
+
width: r = "fit-content",
|
|
37
37
|
shadow: F = "medium",
|
|
38
38
|
triggerOffset: g = "compact",
|
|
39
39
|
viewportCollisionPadding: N = "compact",
|
|
40
40
|
"data-test-id": h = "fondue-flyout-content",
|
|
41
41
|
children: v,
|
|
42
|
-
...
|
|
43
|
-
},
|
|
44
|
-
const
|
|
45
|
-
return /* @__PURE__ */ a(
|
|
42
|
+
...C
|
|
43
|
+
}, P) => {
|
|
44
|
+
const b = A();
|
|
45
|
+
return /* @__PURE__ */ a(l.Portal, { children: /* @__PURE__ */ u(T, { theme: b, children: [
|
|
46
46
|
/* @__PURE__ */ a("div", { "data-test-id": "fondue-flyout-overlay", className: s.overlay }),
|
|
47
47
|
/* @__PURE__ */ a(
|
|
48
|
-
|
|
48
|
+
l.Content,
|
|
49
49
|
{
|
|
50
50
|
style: {
|
|
51
51
|
"--flyout-max-width": o,
|
|
52
|
-
"--flyout-width":
|
|
52
|
+
"--flyout-width": r
|
|
53
53
|
},
|
|
54
|
-
ref:
|
|
54
|
+
ref: P,
|
|
55
55
|
align: t,
|
|
56
56
|
collisionPadding: O[N],
|
|
57
57
|
sideOffset: I[g],
|
|
@@ -61,16 +61,26 @@ const I = {
|
|
|
61
61
|
"data-shadow": F,
|
|
62
62
|
"data-test-id": h,
|
|
63
63
|
onFocus: x,
|
|
64
|
-
...
|
|
64
|
+
...C,
|
|
65
65
|
children: v
|
|
66
66
|
}
|
|
67
67
|
)
|
|
68
68
|
] }) });
|
|
69
69
|
};
|
|
70
70
|
m.displayName = "Flyout.Content";
|
|
71
|
-
const y = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header" },
|
|
71
|
+
const y = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header", closeProps: d }, r) => /* @__PURE__ */ u("div", { "data-test-id": e, ref: r, className: s.header, children: [
|
|
72
72
|
/* @__PURE__ */ a("div", { children: o }),
|
|
73
|
-
t && /* @__PURE__ */ a(
|
|
73
|
+
t && /* @__PURE__ */ a(
|
|
74
|
+
l.Close,
|
|
75
|
+
{
|
|
76
|
+
role: "button",
|
|
77
|
+
"data-test-id": `${e}-close`,
|
|
78
|
+
className: s.close,
|
|
79
|
+
"aria-label": "Close",
|
|
80
|
+
...d,
|
|
81
|
+
children: /* @__PURE__ */ a(R, { size: 20 })
|
|
82
|
+
}
|
|
83
|
+
)
|
|
74
84
|
] });
|
|
75
85
|
y.displayName = "Flyout.Header";
|
|
76
86
|
const f = ({ children: t, "data-test-id": o = "fondue-flyout-footer" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: s.footer, children: t });
|
|
@@ -89,11 +99,11 @@ const p = ({ children: t, "data-test-id": o = "fondue-flyout-body", scrollable:
|
|
|
89
99
|
p.displayName = "Flyout.Body";
|
|
90
100
|
const j = {
|
|
91
101
|
Root: n,
|
|
92
|
-
Trigger:
|
|
93
|
-
Content:
|
|
94
|
-
Header:
|
|
95
|
-
Footer:
|
|
96
|
-
Body:
|
|
102
|
+
Trigger: i(c),
|
|
103
|
+
Content: i(m),
|
|
104
|
+
Header: i(y),
|
|
105
|
+
Footer: i(f),
|
|
106
|
+
Body: i(p)
|
|
97
107
|
};
|
|
98
108
|
export {
|
|
99
109
|
j as Flyout,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components13.js","sources":["../src/components/Flyout/Flyout.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { forwardRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport styles from './styles/flyout.module.scss';\n\nexport type FlyoutRootProps = {\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 flyout\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 const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport type FlyoutTriggerProps = {\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 const FlyoutTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-flyout-trigger', ...props }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.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 </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\ntype FlyoutSpacing = 'compact' | 'comfortable' | 'spacious';\ntype FlyoutViewportCollisionPadding = 'compact' | 'spacious';\nexport type FlyoutContentProps = {\n /**\n * Add a shadow to the flyout\n * @default \"medium\"\n */\n shadow?: 'none' | 'medium' | 'large';\n /**\n * Add rounded corners to the flyout\n * @default \"medium\"\n */\n rounded?: 'none' | 'medium' | 'large';\n /**\n * Define the prefered side of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Define the prefered alignment of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Define the padding of the flyout\n * @default \"compact\"\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Define the fixed width of the flyout\n * @default \"fit-content\"\n */\n width?: string;\n /**\n * Defines the spacing between the dropdown and its trigger.\n * @default 'compact'\n */\n triggerOffset?: FlyoutSpacing;\n /**\n * Define the maximum width of the flyout\n * @default \"360px\"\n */\n maxWidth?: string;\n /**\n * Define the minimum distance between the flyout and the viewport edge\n * @default 'compact'\n */\n viewportCollisionPadding?: FlyoutViewportCollisionPadding;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nconst SPACING_MAP: Record<FlyoutSpacing, number> = {\n compact: 8,\n comfortable: 12,\n spacious: 16,\n};\n\nconst VIEWPORT_COLLISION_PADDING_MAP: Record<FlyoutViewportCollisionPadding, number> = {\n compact: 8,\n spacious: 24,\n};\n\nexport const FlyoutContent = (\n {\n align = 'start',\n maxWidth = '360px',\n padding = 'compact',\n rounded = 'medium',\n width = 'fit-content',\n shadow = 'medium',\n triggerOffset = 'compact',\n viewportCollisionPadding = 'compact',\n 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n return (\n <RadixPopover.Portal>\n <ThemeProvider theme={theme}>\n <div data-test-id=\"fondue-flyout-overlay\" className={styles.overlay} />\n <RadixPopover.Content\n style={\n {\n '--flyout-max-width': maxWidth,\n '--flyout-width': width,\n } as CSSProperties\n }\n ref={ref}\n align={align}\n collisionPadding={VIEWPORT_COLLISION_PADDING_MAP[viewportCollisionPadding]}\n sideOffset={SPACING_MAP[triggerOffset]}\n className={styles.root}\n data-flyout-spacing={padding}\n data-rounded={rounded}\n data-shadow={shadow}\n data-test-id={dataTestId}\n onFocus={addShowFocusRing}\n {...props}\n >\n {children}\n </RadixPopover.Content>\n </ThemeProvider>\n </RadixPopover.Portal>\n );\n};\nFlyoutContent.displayName = 'Flyout.Content';\n\nexport type FlyoutHeaderProps = {\n /**\n * Show a close button in the header\n * @default false\n */\n showCloseButton?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const FlyoutHeader = (\n { showCloseButton, children, 'data-test-id': dataTestId = 'fondue-flyout-header' }: FlyoutHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.header}>\n <div>{children}</div>\n {showCloseButton && (\n <RadixPopover.Close role=\"button\" data-test-id={`${dataTestId}-close`} className={styles.close}>\n <IconCross size={20} />\n </RadixPopover.Close>\n )}\n </div>\n );\n};\nFlyoutHeader.displayName = 'Flyout.Header';\n\nexport type FlyoutFooterProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const FlyoutFooter = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-footer' }: FlyoutFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.footer}>\n {children}\n </div>\n );\n};\nFlyoutFooter.displayName = 'Flyout.Footer';\n\nexport type FlyoutBodyProps = {\n children?: ReactNode;\n 'data-test-id'?: string;\n /**\n * Allow the body to scroll if the max height of the flyout is reached\n * @default false\n */\n scrollable?: boolean;\n};\n\nexport const FlyoutBody = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-body', scrollable = false }: FlyoutBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n data-flyout-spacing=\"compact\"\n data-scrollable={scrollable}\n className={styles.body}\n >\n {children}\n </div>\n );\n};\nFlyoutBody.displayName = 'Flyout.Body';\n\nexport const Flyout = {\n Root: FlyoutRoot,\n Trigger: forwardRef<HTMLButtonElement, FlyoutTriggerProps>(FlyoutTrigger),\n Content: forwardRef<HTMLDivElement, FlyoutContentProps>(FlyoutContent),\n Header: forwardRef<HTMLDivElement, FlyoutHeaderProps>(FlyoutHeader),\n Footer: forwardRef<HTMLDivElement, FlyoutFooterProps>(FlyoutFooter),\n Body: forwardRef<HTMLDivElement, FlyoutBodyProps>(FlyoutBody),\n};\n"],"names":["FlyoutRoot","children","props","RadixPopover","FlyoutTrigger","asChild","dataTestId","ref","jsx","addAutoFocusAttribute","SPACING_MAP","VIEWPORT_COLLISION_PADDING_MAP","FlyoutContent","align","maxWidth","padding","rounded","width","shadow","triggerOffset","viewportCollisionPadding","theme","useFondueTheme","jsxs","ThemeProvider","styles","addShowFocusRing","FlyoutHeader","showCloseButton","IconCross","FlyoutFooter","FlyoutBody","scrollable","Flyout","forwardRef"],"mappings":";;;;;;;AA8BO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAC9BC,EAAa,MAAb,EAAmB,GAAGD,GAAQ,UAAAD,GAAS;AAEnDD,EAAW,cAAc;AAYlB,MAAMI,IAAgB,CACzB,EAAE,SAAAC,IAAU,IAAM,UAAAJ,GAAU,gBAAgBK,IAAa,yBAAyB,GAAGJ,EAAM,GAC3FK,MAGI,gBAAAC;AAAA,EAACL,EAAa;AAAA,EAAb;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;AAsD5B,MAAMM,IAA6C;AAAA,EAC/C,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AACd,GAEMC,IAAiF;AAAA,EACnF,SAAS;AAAA,EACT,UAAU;AACd,GAEaC,IAAgB,CACzB;AAAA,EACI,OAAAC,IAAQ;AAAA,EACR,UAAAC,IAAW;AAAA,EACX,SAAAC,IAAU;AAAA,EACV,SAAAC,IAAU;AAAA,EACV,OAAAC,IAAQ;AAAA,EACR,QAAA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GAAU,gBAAgBK,IAAa,0BACzCC,MAGI,gBAAAC,EAAC,SAAI,gBAAcF,GAAY,KAAAC,GAAU,WAAWkB,EAAO,QACtD,UAAAxB,GACL;AAGR6B,EAAa,cAAc;AAYd,MAAAC,IAAa,CACtB,EAAE,UAAA9B,GAAU,gBAAgBK,IAAa,sBAAsB,YAAA0B,IAAa,GAAM,GAClFzB,MAGI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACG,gBAAcF;AAAA,IACd,KAAAC;AAAA,IACA,uBAAoB;AAAA,IACpB,mBAAiByB;AAAA,IACjB,WAAWP,EAAO;AAAA,IAEjB,UAAAxB;AAAA,EAAA;AACL;AAGR8B,EAAW,cAAc;AAElB,MAAME,IAAS;AAAA,EAClB,MAAMjC;AAAA,EACN,SAASkC,EAAkD9B,CAAa;AAAA,EACxE,SAAS8B,EAA+CtB,CAAa;AAAA,EACrE,QAAQsB,EAA8CP,CAAY;AAAA,EAClE,QAAQO,EAA8CJ,CAAY;AAAA,EAClE,MAAMI,EAA4CH,CAAU;AAChE;"}
|
|
1
|
+
{"version":3,"file":"fondue-components13.js","sources":["../src/components/Flyout/Flyout.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { forwardRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport styles from './styles/flyout.module.scss';\n\nexport type FlyoutRootProps = {\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 flyout\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 const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport type FlyoutTriggerProps = {\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 const FlyoutTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-flyout-trigger', ...props }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.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 </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\ntype FlyoutSpacing = 'compact' | 'comfortable' | 'spacious';\ntype FlyoutViewportCollisionPadding = 'compact' | 'spacious';\nexport type FlyoutContentProps = {\n /**\n * Add a shadow to the flyout\n * @default \"medium\"\n */\n shadow?: 'none' | 'medium' | 'large';\n /**\n * Add rounded corners to the flyout\n * @default \"medium\"\n */\n rounded?: 'none' | 'medium' | 'large';\n /**\n * Define the prefered side of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Define the prefered alignment of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Define the padding of the flyout\n * @default \"compact\"\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Define the fixed width of the flyout\n * @default \"fit-content\"\n */\n width?: string;\n /**\n * Defines the spacing between the dropdown and its trigger.\n * @default 'compact'\n */\n triggerOffset?: FlyoutSpacing;\n /**\n * Define the maximum width of the flyout\n * @default \"360px\"\n */\n maxWidth?: string;\n /**\n * Define the minimum distance between the flyout and the viewport edge\n * @default 'compact'\n */\n viewportCollisionPadding?: FlyoutViewportCollisionPadding;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nconst SPACING_MAP: Record<FlyoutSpacing, number> = {\n compact: 8,\n comfortable: 12,\n spacious: 16,\n};\n\nconst VIEWPORT_COLLISION_PADDING_MAP: Record<FlyoutViewportCollisionPadding, number> = {\n compact: 8,\n spacious: 24,\n};\n\nexport const FlyoutContent = (\n {\n align = 'start',\n maxWidth = '360px',\n padding = 'compact',\n rounded = 'medium',\n width = 'fit-content',\n shadow = 'medium',\n triggerOffset = 'compact',\n viewportCollisionPadding = 'compact',\n 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n return (\n <RadixPopover.Portal>\n <ThemeProvider theme={theme}>\n <div data-test-id=\"fondue-flyout-overlay\" className={styles.overlay} />\n <RadixPopover.Content\n style={\n {\n '--flyout-max-width': maxWidth,\n '--flyout-width': width,\n } as CSSProperties\n }\n ref={ref}\n align={align}\n collisionPadding={VIEWPORT_COLLISION_PADDING_MAP[viewportCollisionPadding]}\n sideOffset={SPACING_MAP[triggerOffset]}\n className={styles.root}\n data-flyout-spacing={padding}\n data-rounded={rounded}\n data-shadow={shadow}\n data-test-id={dataTestId}\n onFocus={addShowFocusRing}\n {...props}\n >\n {children}\n </RadixPopover.Content>\n </ThemeProvider>\n </RadixPopover.Portal>\n );\n};\nFlyoutContent.displayName = 'Flyout.Content';\n\nexport type FlyoutHeaderProps = {\n /**\n * Show a close button in the header\n * @default false\n */\n showCloseButton?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n closeProps?: CommonAriaProps;\n};\n\nexport const FlyoutHeader = (\n { showCloseButton, children, 'data-test-id': dataTestId = 'fondue-flyout-header', closeProps }: FlyoutHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.header}>\n <div>{children}</div>\n {showCloseButton && (\n <RadixPopover.Close\n role=\"button\"\n data-test-id={`${dataTestId}-close`}\n className={styles.close}\n aria-label=\"Close\"\n {...closeProps}\n >\n <IconCross size={20} />\n </RadixPopover.Close>\n )}\n </div>\n );\n};\nFlyoutHeader.displayName = 'Flyout.Header';\n\nexport type FlyoutFooterProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const FlyoutFooter = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-footer' }: FlyoutFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.footer}>\n {children}\n </div>\n );\n};\nFlyoutFooter.displayName = 'Flyout.Footer';\n\nexport type FlyoutBodyProps = {\n children?: ReactNode;\n 'data-test-id'?: string;\n /**\n * Allow the body to scroll if the max height of the flyout is reached\n * @default false\n */\n scrollable?: boolean;\n};\n\nexport const FlyoutBody = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-body', scrollable = false }: FlyoutBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n data-flyout-spacing=\"compact\"\n data-scrollable={scrollable}\n className={styles.body}\n >\n {children}\n </div>\n );\n};\nFlyoutBody.displayName = 'Flyout.Body';\n\nexport const Flyout = {\n Root: FlyoutRoot,\n Trigger: forwardRef<HTMLButtonElement, FlyoutTriggerProps>(FlyoutTrigger),\n Content: forwardRef<HTMLDivElement, FlyoutContentProps>(FlyoutContent),\n Header: forwardRef<HTMLDivElement, FlyoutHeaderProps>(FlyoutHeader),\n Footer: forwardRef<HTMLDivElement, FlyoutFooterProps>(FlyoutFooter),\n Body: forwardRef<HTMLDivElement, FlyoutBodyProps>(FlyoutBody),\n};\n"],"names":["FlyoutRoot","children","props","RadixPopover","FlyoutTrigger","asChild","dataTestId","ref","jsx","addAutoFocusAttribute","SPACING_MAP","VIEWPORT_COLLISION_PADDING_MAP","FlyoutContent","align","maxWidth","padding","rounded","width","shadow","triggerOffset","viewportCollisionPadding","theme","useFondueTheme","jsxs","ThemeProvider","styles","addShowFocusRing","FlyoutHeader","showCloseButton","closeProps","IconCross","FlyoutFooter","FlyoutBody","scrollable","Flyout","forwardRef"],"mappings":";;;;;;;AA+BO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAC9BC,EAAa,MAAb,EAAmB,GAAGD,GAAQ,UAAAD,GAAS;AAEnDD,EAAW,cAAc;AAYlB,MAAMI,IAAgB,CACzB,EAAE,SAAAC,IAAU,IAAM,UAAAJ,GAAU,gBAAgBK,IAAa,yBAAyB,GAAGJ,EAAM,GAC3FK,MAGI,gBAAAC;AAAA,EAACL,EAAa;AAAA,EAAb;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;AAsD5B,MAAMM,IAA6C;AAAA,EAC/C,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AACd,GAEMC,IAAiF;AAAA,EACnF,SAAS;AAAA,EACT,UAAU;AACd,GAEaC,IAAgB,CACzB;AAAA,EACI,OAAAC,IAAQ;AAAA,EACR,UAAAC,IAAW;AAAA,EACX,SAAAC,IAAU;AAAA,EACV,SAAAC,IAAU;AAAA,EACV,OAAAC,IAAQ;AAAA,EACR,QAAAC,IAAS;AAAA,EACT,eAAAC,IAAgB;AAAA,EAChB,0BAAAC,IAA2B;AAAA,EAC3B,gBAAgBd,IAAa;AAAA,EAC7B,UAAAL;AAAA,EACA,GAAGC;AACP,GACAK,MACC;AACD,QAAMc,IAAQC,EAAe;AAC7B,2BACKnB,EAAa,QAAb,EACG,UAAA,gBAAAoB,EAACC,KAAc,OAAAH,GACX,UAAA;AAAA,IAAA,gBAAAb,EAAC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Aa,CACtB,EAAE,UAAA/B,GAAU,gBAAgBK,IAAa,sBAAsB,YAAA2B,IAAa,GAAM,GAClF1B,MAGI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACG,gBAAcF;AAAA,IACd,KAAAC;AAAA,IACA,uBAAoB;AAAA,IACpB,mBAAiB0B;AAAA,IACjB,WAAWR,EAAO;AAAA,IAEjB,UAAAxB;AAAA,EAAA;AACL;AAGR+B,EAAW,cAAc;AAElB,MAAME,IAAS;AAAA,EAClB,MAAMlC;AAAA,EACN,SAASmC,EAAkD/B,CAAa;AAAA,EACxE,SAAS+B,EAA+CvB,CAAa;AAAA,EACrE,QAAQuB,EAA8CR,CAAY;AAAA,EAClE,QAAQQ,EAA8CJ,CAAY;AAAA,EAClE,MAAMI,EAA4CH,CAAU;AAChE;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as y } from "react";
|
|
3
3
|
import { propsToCssVariables as n } from "./fondue-components34.js";
|
|
4
|
-
import u from "./fondue-
|
|
4
|
+
import u from "./fondue-components55.js";
|
|
5
5
|
const c = y(
|
|
6
6
|
({
|
|
7
7
|
as: a = "div",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as y } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as g } from "react";
|
|
3
3
|
import { cn as x } from "./fondue-components36.js";
|
|
4
|
-
import a from "./fondue-
|
|
4
|
+
import a from "./fondue-components56.js";
|
|
5
5
|
const $ = g(
|
|
6
6
|
({
|
|
7
7
|
as: e = "span",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import * as t from "@radix-ui/react-progress";
|
|
3
3
|
import { forwardRef as m } from "react";
|
|
4
|
-
import { loadingBarContainerStyles as g, loadingBarStyles as f } from "./fondue-
|
|
4
|
+
import { loadingBarContainerStyles as g, loadingBarStyles as f } from "./fondue-components57.js";
|
|
5
5
|
const p = m(
|
|
6
6
|
({
|
|
7
7
|
value: a,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as b, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "@radix-ui/react-scroll-area";
|
|
3
3
|
import { forwardRef as h } from "react";
|
|
4
|
-
import o from "./fondue-
|
|
4
|
+
import o from "./fondue-components59.js";
|
|
5
5
|
const p = ({
|
|
6
6
|
type: t = "hover",
|
|
7
7
|
maxHeight: e = "100%",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as m } from "react";
|
|
3
3
|
import { propsToCssVariables as c } from "./fondue-components34.js";
|
|
4
|
-
import f from "./fondue-
|
|
4
|
+
import f from "./fondue-components60.js";
|
|
5
5
|
const y = m(
|
|
6
6
|
({
|
|
7
7
|
"data-test-id": a = "fondue-section",
|