@frontify/fondue-components 24.2.0 → 25.0.0-rc.2
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-components.js +52 -48
- package/dist/fondue-components.js.map +1 -1
- package/dist/fondue-components10.js +3 -3
- package/dist/fondue-components10.js.map +1 -1
- package/dist/fondue-components11.js +104 -86
- package/dist/fondue-components11.js.map +1 -1
- package/dist/fondue-components12.js +2 -2
- package/dist/fondue-components13.js +58 -57
- package/dist/fondue-components13.js.map +1 -1
- package/dist/fondue-components14.js +2 -2
- package/dist/fondue-components15.js +2 -2
- package/dist/fondue-components16.js +2 -2
- package/dist/fondue-components17.js +56 -36
- package/dist/fondue-components17.js.map +1 -1
- package/dist/fondue-components18.js +34 -16
- package/dist/fondue-components18.js.map +1 -1
- package/dist/fondue-components19.js +18 -73
- package/dist/fondue-components19.js.map +1 -1
- package/dist/fondue-components20.js +18 -36
- package/dist/fondue-components20.js.map +1 -1
- package/dist/fondue-components21.js +71 -50
- package/dist/fondue-components21.js.map +1 -1
- package/dist/fondue-components22.js +36 -138
- package/dist/fondue-components22.js.map +1 -1
- package/dist/fondue-components23.js +50 -50
- package/dist/fondue-components23.js.map +1 -1
- package/dist/fondue-components24.js +137 -99
- package/dist/fondue-components24.js.map +1 -1
- package/dist/fondue-components25.js +48 -26
- package/dist/fondue-components25.js.map +1 -1
- package/dist/fondue-components26.js +92 -188
- package/dist/fondue-components26.js.map +1 -1
- package/dist/fondue-components27.js +30 -134
- package/dist/fondue-components27.js.map +1 -1
- package/dist/fondue-components28.js +191 -126
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components29.js +134 -30
- package/dist/fondue-components29.js.map +1 -1
- package/dist/fondue-components3.js +1 -1
- package/dist/fondue-components30.js +130 -63
- package/dist/fondue-components30.js.map +1 -1
- package/dist/fondue-components31.js +31 -114
- package/dist/fondue-components31.js.map +1 -1
- package/dist/fondue-components32.js +64 -36
- package/dist/fondue-components32.js.map +1 -1
- package/dist/fondue-components33.js +111 -53
- package/dist/fondue-components33.js.map +1 -1
- package/dist/fondue-components34.js +36 -20
- package/dist/fondue-components34.js.map +1 -1
- package/dist/fondue-components35.js +57 -23
- package/dist/fondue-components35.js.map +1 -1
- package/dist/fondue-components36.js +20 -7
- package/dist/fondue-components36.js.map +1 -1
- package/dist/fondue-components37.js +23 -6
- package/dist/fondue-components37.js.map +1 -1
- package/dist/fondue-components38.js +8 -32
- package/dist/fondue-components38.js.map +1 -1
- package/dist/fondue-components39.js +5 -3
- package/dist/fondue-components39.js.map +1 -1
- package/dist/fondue-components4.js +3 -3
- package/dist/fondue-components40.js +32 -12
- package/dist/fondue-components40.js.map +1 -1
- package/dist/fondue-components41.js +5 -155
- package/dist/fondue-components41.js.map +1 -1
- package/dist/fondue-components42.js +18 -116
- package/dist/fondue-components42.js.map +1 -1
- package/dist/fondue-components43.js +59 -22
- package/dist/fondue-components43.js.map +1 -1
- package/dist/fondue-components44.js +111 -14
- package/dist/fondue-components44.js.map +1 -1
- package/dist/fondue-components45.js +116 -30
- package/dist/fondue-components45.js.map +1 -1
- package/dist/fondue-components46.js +21 -54
- package/dist/fondue-components46.js.map +1 -1
- package/dist/fondue-components47.js +32 -131
- package/dist/fondue-components47.js.map +1 -1
- package/dist/fondue-components48.js +53 -20
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components49.js +131 -53
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components5.js +2 -2
- package/dist/fondue-components50.js +20 -7
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +53 -13
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +7 -14
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +13 -5
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +15 -60
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +5 -18
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +60 -19
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +18 -5
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +18 -14
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +1 -1
- package/dist/fondue-components6.js +4 -4
- package/dist/fondue-components60.js +10 -16
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +4 -10
- package/dist/fondue-components61.js.map +1 -1
- package/dist/fondue-components62.js +18 -35
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +10 -4
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +34 -10
- package/dist/fondue-components64.js.map +1 -1
- package/dist/fondue-components65.js +35 -5
- package/dist/fondue-components65.js.map +1 -1
- package/dist/fondue-components66.js +4 -24
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components67.js +12 -16
- package/dist/fondue-components67.js.map +1 -1
- package/dist/fondue-components68.js +4 -151
- package/dist/fondue-components68.js.map +1 -1
- package/dist/fondue-components69.js +25 -19
- package/dist/fondue-components69.js.map +1 -1
- package/dist/fondue-components7.js +2 -2
- package/dist/fondue-components70.js +16 -78
- package/dist/fondue-components70.js.map +1 -1
- package/dist/fondue-components71.js +152 -8
- package/dist/fondue-components71.js.map +1 -1
- package/dist/fondue-components72.js +19 -37
- package/dist/fondue-components72.js.map +1 -1
- package/dist/fondue-components73.js +77 -69
- package/dist/fondue-components73.js.map +1 -1
- package/dist/fondue-components74.js +8 -11
- package/dist/fondue-components74.js.map +1 -1
- package/dist/fondue-components75.js +36 -10
- package/dist/fondue-components75.js.map +1 -1
- package/dist/fondue-components76.js +70 -12
- package/dist/fondue-components76.js.map +1 -1
- package/dist/fondue-components77.js +10 -12
- package/dist/fondue-components77.js.map +1 -1
- package/dist/fondue-components78.js +10 -22
- package/dist/fondue-components78.js.map +1 -1
- package/dist/fondue-components79.js +13 -34
- package/dist/fondue-components79.js.map +1 -1
- package/dist/fondue-components8.js +5 -5
- package/dist/fondue-components80.js +12 -10
- package/dist/fondue-components80.js.map +1 -1
- package/dist/fondue-components81.js +22 -67
- package/dist/fondue-components81.js.map +1 -1
- package/dist/fondue-components82.js +34 -15
- package/dist/fondue-components82.js.map +1 -1
- package/dist/fondue-components83.js +9 -24
- package/dist/fondue-components83.js.map +1 -1
- package/dist/fondue-components84.js +67 -18
- package/dist/fondue-components84.js.map +1 -1
- package/dist/fondue-components85.js +12 -22
- package/dist/fondue-components85.js.map +1 -1
- package/dist/fondue-components86.js +24 -6
- package/dist/fondue-components86.js.map +1 -1
- package/dist/fondue-components87.js +18 -19
- package/dist/fondue-components87.js.map +1 -1
- package/dist/fondue-components88.js +24 -6
- package/dist/fondue-components88.js.map +1 -1
- package/dist/fondue-components89.js +8 -4
- package/dist/fondue-components89.js.map +1 -1
- package/dist/fondue-components9.js +5 -5
- package/dist/fondue-components90.js +19 -4
- package/dist/fondue-components90.js.map +1 -1
- package/dist/fondue-components91.js +7 -2
- package/dist/fondue-components91.js.map +1 -1
- package/dist/fondue-components92.js +14 -14
- package/dist/fondue-components93.js +2 -40
- package/dist/fondue-components93.js.map +1 -1
- package/dist/fondue-components94.js +4 -20
- package/dist/fondue-components94.js.map +1 -1
- package/dist/fondue-components95.js +8 -0
- package/dist/fondue-components95.js.map +1 -0
- package/dist/fondue-components96.js +43 -0
- package/dist/fondue-components96.js.map +1 -0
- package/dist/fondue-components97.js +24 -0
- package/dist/fondue-components97.js.map +1 -0
- package/dist/index.d.ts +116 -3
- package/dist/style.css +1 -1
- package/package.json +6 -6
|
@@ -3,66 +3,70 @@ import { Accordion as t } from "./fondue-components3.js";
|
|
|
3
3
|
import { Badge as m } from "./fondue-components4.js";
|
|
4
4
|
import { Box as f } from "./fondue-components5.js";
|
|
5
5
|
import { Button as l } from "./fondue-components6.js";
|
|
6
|
-
import { Checkbox as
|
|
6
|
+
import { Checkbox as a } from "./fondue-components7.js";
|
|
7
7
|
import { ColorPicker as T } from "./fondue-components8.js";
|
|
8
8
|
import { Dialog as g } from "./fondue-components9.js";
|
|
9
|
-
import { Divider as
|
|
9
|
+
import { Divider as S } from "./fondue-components10.js";
|
|
10
10
|
import { Dropdown as B } from "./fondue-components11.js";
|
|
11
11
|
import { Flex as b } from "./fondue-components12.js";
|
|
12
|
-
import { Flyout as
|
|
13
|
-
import { Grid as
|
|
14
|
-
import { Heading as
|
|
15
|
-
import { Label as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
12
|
+
import { Flyout as k } from "./fondue-components13.js";
|
|
13
|
+
import { Grid as D } from "./fondue-components14.js";
|
|
14
|
+
import { Heading as P } from "./fondue-components15.js";
|
|
15
|
+
import { Label as w } from "./fondue-components16.js";
|
|
16
|
+
import { Link as y } from "./fondue-components17.js";
|
|
17
|
+
import { LoadingBar as H } from "./fondue-components18.js";
|
|
18
|
+
import { LoadingCircle as R } from "./fondue-components19.js";
|
|
19
|
+
import { RouterProvider as q } from "./fondue-components20.js";
|
|
20
|
+
import { ScrollArea as E } from "./fondue-components21.js";
|
|
21
|
+
import { Section as K } from "./fondue-components22.js";
|
|
22
|
+
import { SegmentedControl as N } from "./fondue-components23.js";
|
|
23
|
+
import { Select as Q } from "./fondue-components24.js";
|
|
24
|
+
import { Slider as V } from "./fondue-components25.js";
|
|
25
|
+
import { SplitButton as X } from "./fondue-components26.js";
|
|
26
|
+
import { Switch as Z } from "./fondue-components27.js";
|
|
27
|
+
import { Table as $ } from "./fondue-components28.js";
|
|
28
|
+
import { Tag as ro } from "./fondue-components29.js";
|
|
29
|
+
import { Tabs as to } from "./fondue-components30.js";
|
|
30
|
+
import { Text as mo } from "./fondue-components31.js";
|
|
31
|
+
import { TextInput as fo } from "./fondue-components32.js";
|
|
32
|
+
import { Textarea as lo } from "./fondue-components33.js";
|
|
33
|
+
import { ThemeContext as ao, ThemeProvider as To, useFondueTheme as co } from "./fondue-components34.js";
|
|
34
|
+
import { Tooltip as uo } from "./fondue-components35.js";
|
|
33
35
|
export {
|
|
34
36
|
t as Accordion,
|
|
35
37
|
m as Badge,
|
|
36
38
|
f as Box,
|
|
37
39
|
l as Button,
|
|
38
|
-
|
|
40
|
+
a as Checkbox,
|
|
39
41
|
T as ColorPicker,
|
|
40
42
|
g as Dialog,
|
|
41
|
-
|
|
43
|
+
S as Divider,
|
|
42
44
|
B as Dropdown,
|
|
43
45
|
b as Flex,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
y as
|
|
49
|
-
H as
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
V as
|
|
57
|
-
X as
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
mo as
|
|
63
|
-
fo as
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
46
|
+
k as Flyout,
|
|
47
|
+
D as Grid,
|
|
48
|
+
P as Heading,
|
|
49
|
+
w as Label,
|
|
50
|
+
y as Link,
|
|
51
|
+
H as LoadingBar,
|
|
52
|
+
R as LoadingCircle,
|
|
53
|
+
q as RouterProvider,
|
|
54
|
+
E as ScrollArea,
|
|
55
|
+
K as Section,
|
|
56
|
+
N as SegmentedControl,
|
|
57
|
+
Q as Select,
|
|
58
|
+
V as Slider,
|
|
59
|
+
X as SplitButton,
|
|
60
|
+
Z as Switch,
|
|
61
|
+
$ as Table,
|
|
62
|
+
to as Tabs,
|
|
63
|
+
ro as Tag,
|
|
64
|
+
mo as Text,
|
|
65
|
+
fo as TextInput,
|
|
66
|
+
lo as Textarea,
|
|
67
|
+
ao as ThemeContext,
|
|
68
|
+
To as ThemeProvider,
|
|
69
|
+
uo as Tooltip,
|
|
70
|
+
co as useFondueTheme
|
|
67
71
|
};
|
|
68
72
|
//# sourceMappingURL=fondue-components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import * as f from "@radix-ui/react-separator";
|
|
3
3
|
import { forwardRef as l } from "react";
|
|
4
|
-
import { cn as v } from "./fondue-
|
|
5
|
-
import c from "./fondue-
|
|
6
|
-
import { dividerStyles as h } from "./fondue-
|
|
4
|
+
import { cn as v } from "./fondue-components42.js";
|
|
5
|
+
import c from "./fondue-components55.js";
|
|
6
|
+
import { dividerStyles as h } from "./fondue-components56.js";
|
|
7
7
|
const u = l(
|
|
8
8
|
({
|
|
9
9
|
"data-test-id": i = "fondue-divider",
|
|
@@ -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 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'
|
|
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';\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 color,\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 color,\n ...props,\n }),\n borderStyles.root,\n className,\n )}\n data-variant={variant}\n data-color={color}\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","color","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,OAAAC;AAAA,IACA,IAAAC,IAAK;AAAA,IACL,YAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAEPC,MACe;AACf,UAAMC,IAAYJ;AAElB,WACI,gBAAAK;AAAA,MAACC,EAAU;AAAA,MAAV;AAAA,QACG,KAAAH;AAAA,QACA,WAAWI;AAAA,UACPC,EAAc;AAAA,YACV,WAAAZ;AAAA,YACA,SAAAE;AAAA,YACA,OAAAC;AAAA,YACA,GAAGG;AAAA,UAAA,CACN;AAAA,UACDO,EAAa;AAAA,UACbZ;AAAA,QAAA;AAAA,QAEJ,gBAAcC;AAAA,QACd,cAAYC;AAAA,QACZ,gBAAcJ;AAAA,QACd,YAAAM;AAAA,QACA,oBAAkBL;AAAA,QAClB,SAAO;AAAA,QAEP,4BAACQ,GAAA,CAAA,CAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EAGvB;AACJ;AAEAX,EAAQ,cAAc;"}
|
|
@@ -1,102 +1,120 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { IconCaretRight as
|
|
1
|
+
import { jsx as d, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import { IconCaretRight as x } from "@frontify/fondue-icons";
|
|
3
3
|
import * as a from "@radix-ui/react-dropdown-menu";
|
|
4
|
-
import { forwardRef as i, useRef as
|
|
5
|
-
import { useFondueTheme as C, ThemeProvider as
|
|
6
|
-
import { useProcessedChildren as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
4
|
+
import { forwardRef as i, useRef as R, useMemo as _, Children as j } from "react";
|
|
5
|
+
import { useFondueTheme as C, ThemeProvider as F } from "./fondue-components34.js";
|
|
6
|
+
import { useProcessedChildren as I } from "./fondue-components57.js";
|
|
7
|
+
import u from "./fondue-components58.js";
|
|
8
|
+
const T = ({
|
|
9
9
|
children: t,
|
|
10
10
|
open: o,
|
|
11
|
-
modal:
|
|
12
|
-
onOpenChange:
|
|
13
|
-
"data-test-id":
|
|
14
|
-
}) => /* @__PURE__ */
|
|
15
|
-
|
|
16
|
-
const
|
|
11
|
+
modal: r = !1,
|
|
12
|
+
onOpenChange: n,
|
|
13
|
+
"data-test-id": e = "fondue-dropdown"
|
|
14
|
+
}) => /* @__PURE__ */ d(a.Root, { open: o, modal: r, onOpenChange: n, "data-test-id": e, children: t });
|
|
15
|
+
T.displayName = "Dropdown.Root";
|
|
16
|
+
const y = ({
|
|
17
17
|
asChild: t = !0,
|
|
18
18
|
children: o,
|
|
19
|
-
"data-test-id":
|
|
20
|
-
...
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
const
|
|
19
|
+
"data-test-id": r = "fondue-dropdown-trigger",
|
|
20
|
+
...n
|
|
21
|
+
}, e) => /* @__PURE__ */ d(a.Trigger, { asChild: t, "data-test-id": r, ref: e, ...n, children: o });
|
|
22
|
+
y.displayName = "Dropdown.Trigger";
|
|
23
|
+
const B = {
|
|
24
24
|
compact: 8,
|
|
25
25
|
comfortable: 12,
|
|
26
26
|
spacious: 16
|
|
27
|
-
},
|
|
27
|
+
}, L = {
|
|
28
28
|
compact: 8,
|
|
29
29
|
spacious: 24
|
|
30
|
-
},
|
|
30
|
+
}, M = ({
|
|
31
31
|
side: t = "bottom",
|
|
32
32
|
align: o = "start",
|
|
33
|
-
triggerOffset:
|
|
34
|
-
children:
|
|
35
|
-
preventTriggerFocusOnClose:
|
|
36
|
-
viewportCollisionPadding:
|
|
33
|
+
triggerOffset: r = "compact",
|
|
34
|
+
children: n,
|
|
35
|
+
preventTriggerFocusOnClose: e,
|
|
36
|
+
viewportCollisionPadding: s = "compact",
|
|
37
37
|
forceMount: p = !1,
|
|
38
38
|
"data-test-id": g = "fondue-dropdown-content"
|
|
39
39
|
}, D) => {
|
|
40
|
-
const b =
|
|
41
|
-
return /* @__PURE__ */
|
|
40
|
+
const b = R(null), { theme: c, dir: l } = C(), w = D || b;
|
|
41
|
+
return /* @__PURE__ */ d(a.Portal, { forceMount: p || void 0, children: /* @__PURE__ */ d(F, { theme: c, dir: l, children: /* @__PURE__ */ d(
|
|
42
42
|
a.Content,
|
|
43
43
|
{
|
|
44
|
-
dir:
|
|
44
|
+
dir: l,
|
|
45
45
|
align: o,
|
|
46
|
-
collisionPadding:
|
|
47
|
-
sideOffset:
|
|
46
|
+
collisionPadding: L[s],
|
|
47
|
+
sideOffset: B[r],
|
|
48
48
|
side: t,
|
|
49
|
-
className:
|
|
49
|
+
className: u.content,
|
|
50
50
|
"data-test-id": g,
|
|
51
51
|
ref: w,
|
|
52
|
-
onPointerDownOutside: (
|
|
52
|
+
onPointerDownOutside: (f) => {
|
|
53
53
|
var N;
|
|
54
|
-
if (!p || !(
|
|
54
|
+
if (!p || !(f.target instanceof Element) || !(w instanceof Object) || !("current" in w))
|
|
55
55
|
return;
|
|
56
|
-
let
|
|
57
|
-
for (;
|
|
58
|
-
|
|
59
|
-
h === ((N = w.current) == null ? void 0 : N.id) &&
|
|
56
|
+
let m = f.target, h = null;
|
|
57
|
+
for (; m && m !== document.body && (h = m.getAttribute("aria-controls"), !h); )
|
|
58
|
+
m = m.parentElement;
|
|
59
|
+
h === ((N = w.current) == null ? void 0 : N.id) && f.preventDefault();
|
|
60
60
|
},
|
|
61
|
-
onCloseAutoFocus: (
|
|
62
|
-
|
|
61
|
+
onCloseAutoFocus: (f) => {
|
|
62
|
+
e && f.preventDefault();
|
|
63
63
|
},
|
|
64
64
|
forceMount: p || void 0,
|
|
65
|
-
children:
|
|
65
|
+
children: n
|
|
66
66
|
}
|
|
67
67
|
) }) });
|
|
68
68
|
};
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
() => j.toArray(t).filter((
|
|
69
|
+
M.displayName = "Dropdown.Content";
|
|
70
|
+
const P = ({ children: t, heading: o, "data-test-id": r = "fondue-dropdown-group" }, n) => _(
|
|
71
|
+
() => j.toArray(t).filter((s) => s !== null).length > 0,
|
|
72
72
|
[t]
|
|
73
|
-
) ? /* @__PURE__ */
|
|
74
|
-
o ? /* @__PURE__ */
|
|
73
|
+
) ? /* @__PURE__ */ S(a.Group, { className: u.group, "data-test-id": r, ref: n, children: [
|
|
74
|
+
o ? /* @__PURE__ */ d("div", { className: u.groupHeading, children: /* @__PURE__ */ d("span", { "aria-label": o, children: o }) }) : null,
|
|
75
75
|
t
|
|
76
76
|
] }) : null;
|
|
77
|
-
|
|
77
|
+
P.displayName = "Dropdown.Group";
|
|
78
78
|
const A = ({
|
|
79
79
|
children: t,
|
|
80
80
|
"data-test-id": o = "fondue-dropdown-submenu"
|
|
81
|
-
}) => /* @__PURE__ */
|
|
81
|
+
}) => /* @__PURE__ */ d(a.Sub, { "data-test-id": o, children: t });
|
|
82
82
|
A.displayName = "Dropdown.SubMenu";
|
|
83
|
-
const G = ({ children: t, "data-test-id": o = "fondue-dropdown-subtrigger" },
|
|
84
|
-
const { content:
|
|
85
|
-
return /* @__PURE__ */
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
const G = ({ children: t, "data-test-id": o = "fondue-dropdown-subtrigger" }, r) => {
|
|
84
|
+
const { content: n } = I(t), e = R(!1);
|
|
85
|
+
return /* @__PURE__ */ S(
|
|
86
|
+
a.SubTrigger,
|
|
87
|
+
{
|
|
88
|
+
className: u.subTrigger,
|
|
89
|
+
"data-show-focus-ring": e.current,
|
|
90
|
+
"data-test-id": o,
|
|
91
|
+
ref: r,
|
|
92
|
+
onMouseEnter: () => {
|
|
93
|
+
e.current = !0;
|
|
94
|
+
},
|
|
95
|
+
onFocus: (s) => {
|
|
96
|
+
e.current || (s.target.dataset.showFocusRing = "true");
|
|
97
|
+
},
|
|
98
|
+
onBlur: (s) => {
|
|
99
|
+
s.target.dataset.showFocusRing = "false", e.current = !1;
|
|
100
|
+
},
|
|
101
|
+
children: [
|
|
102
|
+
n,
|
|
103
|
+
/* @__PURE__ */ d(x, { className: u.subMenuIndicator, size: 16 })
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
);
|
|
89
107
|
};
|
|
90
108
|
G.displayName = "Dropdown.SubTrigger";
|
|
91
|
-
const O = ({ children: t, "data-test-id": o = "fondue-dropdown-subcontent" },
|
|
92
|
-
const { theme:
|
|
93
|
-
return /* @__PURE__ */
|
|
109
|
+
const O = ({ children: t, "data-test-id": o = "fondue-dropdown-subcontent" }, r) => {
|
|
110
|
+
const { theme: n, dir: e } = C();
|
|
111
|
+
return /* @__PURE__ */ d(a.Portal, { children: /* @__PURE__ */ d(F, { theme: n, dir: e, children: /* @__PURE__ */ d(
|
|
94
112
|
a.SubContent,
|
|
95
113
|
{
|
|
96
|
-
dir:
|
|
97
|
-
className:
|
|
114
|
+
dir: e,
|
|
115
|
+
className: u.subContent,
|
|
98
116
|
"data-test-id": o,
|
|
99
|
-
ref:
|
|
117
|
+
ref: r,
|
|
100
118
|
children: t
|
|
101
119
|
}
|
|
102
120
|
) }) });
|
|
@@ -105,34 +123,34 @@ O.displayName = "Dropdown.SubContent";
|
|
|
105
123
|
const v = ({
|
|
106
124
|
children: t,
|
|
107
125
|
disabled: o,
|
|
108
|
-
textValue:
|
|
109
|
-
onSelect:
|
|
110
|
-
emphasis:
|
|
111
|
-
asChild:
|
|
126
|
+
textValue: r,
|
|
127
|
+
onSelect: n,
|
|
128
|
+
emphasis: e = "default",
|
|
129
|
+
asChild: s = !1,
|
|
112
130
|
"data-test-id": p = "fondue-dropdown-subtrigger",
|
|
113
131
|
...g
|
|
114
132
|
}, D) => {
|
|
115
|
-
const { content: b } =
|
|
116
|
-
return /* @__PURE__ */
|
|
133
|
+
const { content: b } = I(t), c = R(!1);
|
|
134
|
+
return /* @__PURE__ */ d(
|
|
117
135
|
a.Item,
|
|
118
136
|
{
|
|
119
|
-
onSelect:
|
|
120
|
-
className:
|
|
121
|
-
textValue:
|
|
137
|
+
onSelect: n,
|
|
138
|
+
className: u.item,
|
|
139
|
+
textValue: r,
|
|
122
140
|
"data-test-id": p,
|
|
123
|
-
"data-emphasis":
|
|
141
|
+
"data-emphasis": e,
|
|
124
142
|
ref: D,
|
|
125
143
|
disabled: o,
|
|
126
|
-
asChild:
|
|
127
|
-
"data-show-focus-ring":
|
|
144
|
+
asChild: s,
|
|
145
|
+
"data-show-focus-ring": c.current,
|
|
128
146
|
onMouseEnter: () => {
|
|
129
|
-
|
|
147
|
+
c.current = !0;
|
|
130
148
|
},
|
|
131
|
-
onFocus: (
|
|
132
|
-
|
|
149
|
+
onFocus: (l) => {
|
|
150
|
+
c.current || (l.target.dataset.showFocusRing = "true");
|
|
133
151
|
},
|
|
134
|
-
onBlur: (
|
|
135
|
-
|
|
152
|
+
onBlur: (l) => {
|
|
153
|
+
l.target.dataset.showFocusRing = "false", c.current = !1;
|
|
136
154
|
},
|
|
137
155
|
...g,
|
|
138
156
|
children: b
|
|
@@ -140,12 +158,12 @@ const v = ({
|
|
|
140
158
|
);
|
|
141
159
|
};
|
|
142
160
|
v.displayName = "Dropdown.Item";
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
const
|
|
146
|
-
Root:
|
|
147
|
-
Trigger:
|
|
148
|
-
Content:
|
|
161
|
+
const E = ({ children: t, name: o, "data-test-id": r = "fondue-dropdown-slot" }, n) => /* @__PURE__ */ d("div", { "data-name": o, className: u.slot, "data-test-id": r, ref: n, children: t });
|
|
162
|
+
E.displayName = "Dropdown.Slot";
|
|
163
|
+
const k = i(y), z = i(M), H = i(P), V = i(G), W = i(O), q = i(v), J = i(E), $ = {
|
|
164
|
+
Root: T,
|
|
165
|
+
Trigger: k,
|
|
166
|
+
Content: z,
|
|
149
167
|
Group: H,
|
|
150
168
|
SubMenu: A,
|
|
151
169
|
SubTrigger: V,
|
|
@@ -155,14 +173,14 @@ const z = i(F), B = i(P), H = i(M), V = i(G), W = i(O), q = i(v), J = i(x), $ =
|
|
|
155
173
|
};
|
|
156
174
|
export {
|
|
157
175
|
$ as Dropdown,
|
|
158
|
-
|
|
159
|
-
|
|
176
|
+
M as DropdownContent,
|
|
177
|
+
P as DropdownGroup,
|
|
160
178
|
v as DropdownItem,
|
|
161
|
-
|
|
162
|
-
|
|
179
|
+
T as DropdownRoot,
|
|
180
|
+
E as DropdownSlot,
|
|
163
181
|
O as DropdownSubContent,
|
|
164
182
|
A as DropdownSubMenu,
|
|
165
183
|
G as DropdownSubTrigger,
|
|
166
|
-
|
|
184
|
+
y as DropdownTrigger
|
|
167
185
|
};
|
|
168
186
|
//# 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 * When true, the content will always be mounted in the DOM. Before enabling, make sure you really need it.\n * @default false\n */\n forceMount?: boolean;\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 forceMount = false,\n 'data-test-id': dataTestId = 'fondue-dropdown-content',\n }: DropdownContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const localRef = useRef<HTMLDivElement>(null);\n const { theme, dir } = useFondueTheme();\n const actualRef = ref || localRef;\n return (\n <RadixDropdown.Portal forceMount={forceMount || undefined}>\n <ThemeProvider theme={theme} dir={dir}>\n <RadixDropdown.Content\n // @ts-expect-error - dir prop works at runtime but is not in the Radix UI type definition\n dir={dir}\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={actualRef}\n onPointerDownOutside={(event) => {\n if (!forceMount) {\n return;\n }\n\n if (!(event.target instanceof Element)) {\n return;\n }\n\n if (!(actualRef instanceof Object) || !('current' in actualRef)) {\n return;\n }\n\n let element: Element | null = event.target;\n let controlsId: string | null = null;\n\n while (element && element !== document.body) {\n controlsId = element.getAttribute('aria-controls');\n\n if (controlsId) {\n break;\n }\n\n element = element.parentElement;\n }\n\n if (controlsId === actualRef.current?.id) {\n event.preventDefault();\n }\n }}\n onCloseAutoFocus={(event) => {\n if (preventTriggerFocusOnClose) {\n event.preventDefault();\n }\n }}\n forceMount={forceMount || undefined}\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, dir } = useFondueTheme();\n\n return (\n <RadixDropdown.Portal>\n <ThemeProvider theme={theme} dir={dir}>\n <RadixDropdown.SubContent\n // @ts-expect-error - dir prop works at runtime but is not in the Radix UI type definition\n dir={dir}\n className={styles.subContent}\n data-test-id={dataTestId}\n ref={ref}\n >\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","forceMount","localRef","useRef","theme","dir","useFondueTheme","actualRef","ThemeProvider","styles","event","element","controlsId","_a","DropdownGroup","heading","useMemo","Children","child","jsxs","DropdownSubMenu","DropdownSubTrigger","content","useProcessedChildren","IconCaretRight","DropdownSubContent","DropdownItem","disabled","textValue","onSelect","emphasis","wasMouseInteracted","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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C;AAAA,MACf,KAAAtC;AAAA,MACA,UAAAmC;AAAA,MACA,SAAArC;AAAA,MACA,wBAAsByC,EAAmB;AAAA,MACzC,cAAc,MAAM;AAChB,QAAAA,EAAmB,UAAU;AAAA,MACjC;AAAA,MACA,SAAS,CAACC,MAAe;AACrB,QAAKD,EAAmB,YACpBC,EAAW,OAAO,QAAQ,gBAAgB;AAAA,MAElD;AAAA,MACA,QAAQ,CAACC,MAAc;AACnB,QAAAA,EAAU,OAAO,QAAQ,gBAAgB,SACzCF,EAAmB,UAAU;AAAA,MACjC;AAAA,MACC,GAAGxC;AAAA,MAEH,UAAA+B;AAAA,IAAA;AAAA,EAAA;AAGb;AACAI,EAAa,cAAc;AAIpB,MAAMQ,IAAe,CACxB,EAAE,UAAApD,GAAU,MAAAqD,GAAM,gBAAgBjD,IAAa,uBAAA,GAC/CM,MAGI,gBAAAL,EAAC,OAAA,EAAI,aAAWgD,GAAM,WAAW1B,EAAO,MAAM,gBAAcvB,GAAY,KAAAM,GACnE,UAAAV,EAAA,CACL;AAGRoD,EAAa,cAAc;AAE3B,MAAME,IAA8BC,EAAoDhD,CAAe,GACjGiD,IAA8BD,EAAiD1C,CAAe,GAC9F4C,IAA4BF,EAA+CvB,CAAa,GACxF0B,IAAiCH,EAAoDhB,CAAkB,GACvGoB,IAAiCJ,EAAoDZ,CAAkB,GACvGiB,IAA2BL,EAA8CX,CAAY,GACrFiB,IAA2BN,EAA8CH,CAAY,GAE9EU,IAAW;AAAA,EACpB,MAAM/D;AAAA,EACN,SAASuD;AAAA,EACT,SAASE;AAAA,EACT,OAAOC;AAAA,EACP,SAASnB;AAAA,EACT,YAAYoB;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 * When true, the content will always be mounted in the DOM. Before enabling, make sure you really need it.\n * @default false\n */\n forceMount?: boolean;\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 forceMount = false,\n 'data-test-id': dataTestId = 'fondue-dropdown-content',\n }: DropdownContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const localRef = useRef<HTMLDivElement>(null);\n const { theme, dir } = useFondueTheme();\n const actualRef = ref || localRef;\n return (\n <RadixDropdown.Portal forceMount={forceMount || undefined}>\n <ThemeProvider theme={theme} dir={dir}>\n <RadixDropdown.Content\n // @ts-expect-error - dir prop works at runtime but is not in the Radix UI type definition\n dir={dir}\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={actualRef}\n onPointerDownOutside={(event) => {\n if (!forceMount) {\n return;\n }\n\n if (!(event.target instanceof Element)) {\n return;\n }\n\n if (!(actualRef instanceof Object) || !('current' in actualRef)) {\n return;\n }\n\n let element: Element | null = event.target;\n let controlsId: string | null = null;\n\n while (element && element !== document.body) {\n controlsId = element.getAttribute('aria-controls');\n\n if (controlsId) {\n break;\n }\n\n element = element.parentElement;\n }\n\n if (controlsId === actualRef.current?.id) {\n event.preventDefault();\n }\n }}\n onCloseAutoFocus={(event) => {\n if (preventTriggerFocusOnClose) {\n event.preventDefault();\n }\n }}\n forceMount={forceMount || undefined}\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, dir } = useFondueTheme();\n\n return (\n <RadixDropdown.Portal>\n <ThemeProvider theme={theme} dir={dir}>\n <RadixDropdown.SubContent\n // @ts-expect-error - dir prop works at runtime but is not in the Radix UI type definition\n dir={dir}\n className={styles.subContent}\n data-test-id={dataTestId}\n ref={ref}\n >\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","forceMount","localRef","useRef","theme","dir","useFondueTheme","actualRef","ThemeProvider","styles","event","element","controlsId","_a","DropdownGroup","heading","useMemo","Children","child","jsxs","DropdownSubMenu","DropdownSubTrigger","content","useProcessedChildren","wasMouseInteracted","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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
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as n } from "react";
|
|
3
|
-
import { propsToCssVariables as y } from "./fondue-
|
|
4
|
-
import x from "./fondue-
|
|
3
|
+
import { propsToCssVariables as y } from "./fondue-components40.js";
|
|
4
|
+
import x from "./fondue-components59.js";
|
|
5
5
|
const u = n(
|
|
6
6
|
({
|
|
7
7
|
as: a = "div",
|