@frontify/fondue-components 5.1.1 → 5.1.3
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 +18 -16
- package/dist/fondue-components.js.map +1 -1
- package/dist/fondue-components10.js +2 -2
- package/dist/fondue-components11.js +34 -33
- package/dist/fondue-components11.js.map +1 -1
- package/dist/fondue-components12.js +2 -2
- package/dist/fondue-components13.js +1 -1
- package/dist/fondue-components14.js +1 -1
- package/dist/fondue-components15.js +1 -1
- package/dist/fondue-components16.js +2 -2
- package/dist/fondue-components17.js +2 -2
- package/dist/fondue-components18.js +6 -6
- package/dist/fondue-components19.js +1 -1
- package/dist/fondue-components20.js +2 -2
- package/dist/fondue-components21.js +134 -115
- package/dist/fondue-components21.js.map +1 -1
- package/dist/fondue-components22.js +116 -65
- package/dist/fondue-components22.js.map +1 -1
- package/dist/fondue-components23.js +64 -41
- package/dist/fondue-components23.js.map +1 -1
- package/dist/fondue-components24.js +43 -32
- package/dist/fondue-components24.js.map +1 -1
- package/dist/fondue-components25.js +32 -5
- package/dist/fondue-components25.js.map +1 -1
- package/dist/fondue-components26.js +5 -12
- package/dist/fondue-components26.js.map +1 -1
- package/dist/fondue-components27.js +10 -153
- package/dist/fondue-components27.js.map +1 -1
- package/dist/fondue-components28.js +59 -22
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components29.js +17 -17
- package/dist/fondue-components29.js.map +1 -1
- package/dist/fondue-components3.js +2 -2
- package/dist/fondue-components30.js +112 -15
- package/dist/fondue-components30.js.map +1 -1
- package/dist/fondue-components31.js +19 -30
- package/dist/fondue-components31.js.map +1 -1
- package/dist/fondue-components32.js +32 -28
- package/dist/fondue-components32.js.map +1 -1
- package/dist/fondue-components33.js +34 -127
- package/dist/fondue-components33.js.map +1 -1
- package/dist/fondue-components34.js +129 -20
- package/dist/fondue-components34.js.map +1 -1
- package/dist/fondue-components35.js +21 -45
- package/dist/fondue-components35.js.map +1 -1
- package/dist/fondue-components36.js +45 -28
- package/dist/fondue-components36.js.map +1 -1
- package/dist/fondue-components37.js +28 -15
- package/dist/fondue-components37.js.map +1 -1
- package/dist/fondue-components38.js +15 -60
- package/dist/fondue-components38.js.map +1 -1
- package/dist/fondue-components39.js +60 -15
- package/dist/fondue-components39.js.map +1 -1
- package/dist/fondue-components4.js +4 -4
- package/dist/fondue-components40.js +15 -19
- package/dist/fondue-components40.js.map +1 -1
- package/dist/fondue-components41.js +18 -4
- package/dist/fondue-components41.js.map +1 -1
- package/dist/fondue-components42.js +3 -11
- package/dist/fondue-components42.js.map +1 -1
- package/dist/fondue-components43.js +11 -3
- package/dist/fondue-components43.js.map +1 -1
- package/dist/fondue-components44.js +5 -35
- package/dist/fondue-components44.js.map +1 -1
- package/dist/fondue-components45.js +35 -13
- package/dist/fondue-components45.js.map +1 -1
- package/dist/fondue-components46.js +12 -4
- package/dist/fondue-components46.js.map +1 -1
- package/dist/fondue-components47.js +4 -24
- package/dist/fondue-components47.js.map +1 -1
- package/dist/fondue-components48.js +24 -16
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components49.js +16 -139
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components5.js +2 -2
- package/dist/fondue-components50.js +140 -16
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +16 -72
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +72 -8
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +8 -33
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +32 -48
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +48 -10
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +8 -10
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +12 -52
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +7 -14
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +12 -17
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components6.js +5 -5
- package/dist/fondue-components60.js +18 -6
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +15 -2
- package/dist/fondue-components61.js.map +1 -1
- package/dist/fondue-components62.js +50 -36
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +14 -10
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +21 -0
- package/dist/fondue-components64.js.map +1 -0
- package/dist/fondue-components65.js +10 -0
- package/dist/fondue-components65.js.map +1 -0
- package/dist/fondue-components66.js +5 -0
- package/dist/fondue-components66.js.map +1 -0
- package/dist/fondue-components67.js +18 -0
- package/dist/fondue-components67.js.map +1 -0
- package/dist/fondue-components68.js +42 -0
- package/dist/fondue-components68.js.map +1 -0
- package/dist/fondue-components7.js +5 -4
- package/dist/fondue-components7.js.map +1 -1
- package/dist/fondue-components8.js +2 -2
- package/dist/fondue-components9.js +20 -15
- package/dist/fondue-components9.js.map +1 -1
- package/dist/index.d.ts +165 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { Box as t } from "./fondue-components3.js";
|
|
3
3
|
import { Button as x } from "./fondue-components4.js";
|
|
4
4
|
import { Checkbox as f } from "./fondue-components5.js";
|
|
5
|
-
import { ColorPicker as
|
|
6
|
-
import { Dialog as
|
|
5
|
+
import { ColorPicker as i } from "./fondue-components6.js";
|
|
6
|
+
import { Dialog as n } from "./fondue-components7.js";
|
|
7
7
|
import { Divider as d } from "./fondue-components8.js";
|
|
8
8
|
import { Dropdown as b } from "./fondue-components9.js";
|
|
9
|
-
import { Flex as
|
|
10
|
-
import { Flyout as
|
|
11
|
-
import { Grid as
|
|
9
|
+
import { Flex as g } from "./fondue-components10.js";
|
|
10
|
+
import { Flyout as B } from "./fondue-components11.js";
|
|
11
|
+
import { Grid as D } from "./fondue-components12.js";
|
|
12
12
|
import { Label as k } from "./fondue-components13.js";
|
|
13
13
|
import { LoadingBar as F } from "./fondue-components14.js";
|
|
14
14
|
import { ScrollArea as s } from "./fondue-components15.js";
|
|
@@ -17,20 +17,21 @@ import { SegmentedControl as G } from "./fondue-components17.js";
|
|
|
17
17
|
import { Select as P } from "./fondue-components18.js";
|
|
18
18
|
import { Slider as q } from "./fondue-components19.js";
|
|
19
19
|
import { Switch as E } from "./fondue-components20.js";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
20
|
+
import { Table as J } from "./fondue-components21.js";
|
|
21
|
+
import { Tabs as M } from "./fondue-components22.js";
|
|
22
|
+
import { TextInput as O } from "./fondue-components23.js";
|
|
23
|
+
import { Tooltip as R } from "./fondue-components24.js";
|
|
23
24
|
export {
|
|
24
25
|
t as Box,
|
|
25
26
|
x as Button,
|
|
26
27
|
f as Checkbox,
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
i as ColorPicker,
|
|
29
|
+
n as Dialog,
|
|
29
30
|
d as Divider,
|
|
30
31
|
b as Dropdown,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
g as Flex,
|
|
33
|
+
B as Flyout,
|
|
34
|
+
D as Grid,
|
|
34
35
|
k as Label,
|
|
35
36
|
F as LoadingBar,
|
|
36
37
|
s as ScrollArea,
|
|
@@ -39,8 +40,9 @@ export {
|
|
|
39
40
|
P as Select,
|
|
40
41
|
q as Slider,
|
|
41
42
|
E as Switch,
|
|
42
|
-
J as
|
|
43
|
-
M as
|
|
44
|
-
O as
|
|
43
|
+
J as Table,
|
|
44
|
+
M as Tabs,
|
|
45
|
+
O as TextInput,
|
|
46
|
+
R as Tooltip
|
|
45
47
|
};
|
|
46
48
|
//# 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,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { propsToCssVariables as y } from "./fondue-
|
|
3
|
-
import m from "./fondue-
|
|
2
|
+
import { propsToCssVariables as y } from "./fondue-components25.js";
|
|
3
|
+
import m from "./fondue-components42.js";
|
|
4
4
|
const f = ({
|
|
5
5
|
as: a = "div",
|
|
6
6
|
"data-test-id": e = "fondue-flex",
|
|
@@ -2,12 +2,12 @@ import { jsx as a, jsxs as x } from "react/jsx-runtime";
|
|
|
2
2
|
import { IconCross as C } from "@frontify/fondue-icons";
|
|
3
3
|
import * as r from "@radix-ui/react-popover";
|
|
4
4
|
import { forwardRef as s, useRef as b } from "react";
|
|
5
|
-
import { usePreventDropdownOverflow as A } from "./fondue-
|
|
6
|
-
import { addAutoFocusAttribute as H, syncRefs as
|
|
7
|
-
import u from "./fondue-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const
|
|
5
|
+
import { usePreventDropdownOverflow as A } from "./fondue-components40.js";
|
|
6
|
+
import { addAutoFocusAttribute as H, syncRefs as c, addShowFocusRing as P } from "./fondue-components37.js";
|
|
7
|
+
import u from "./fondue-components43.js";
|
|
8
|
+
const y = ({ children: t, ...o }) => /* @__PURE__ */ a(r.Root, { ...o, children: t });
|
|
9
|
+
y.displayName = "Flyout.Root";
|
|
10
|
+
const f = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-trigger", ...d }, n) => /* @__PURE__ */ a(
|
|
11
11
|
r.Trigger,
|
|
12
12
|
{
|
|
13
13
|
onMouseDown: H,
|
|
@@ -15,39 +15,40 @@ const y = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-tr
|
|
|
15
15
|
"data-auto-focus-trigger": !0,
|
|
16
16
|
"data-test-id": e,
|
|
17
17
|
asChild: t,
|
|
18
|
-
ref:
|
|
18
|
+
ref: n,
|
|
19
|
+
...d,
|
|
19
20
|
children: o
|
|
20
21
|
}
|
|
21
22
|
);
|
|
22
|
-
|
|
23
|
-
const
|
|
23
|
+
f.displayName = "Flyout.Trigger";
|
|
24
|
+
const m = ({
|
|
24
25
|
align: t = "start",
|
|
25
26
|
maxWidth: o = "360px",
|
|
26
27
|
padding: e = "compact",
|
|
27
28
|
rounded: d = "medium",
|
|
28
|
-
width:
|
|
29
|
+
width: n = "fit-content",
|
|
29
30
|
shadow: N = "medium",
|
|
30
31
|
"data-test-id": h = "fondue-flyout-content",
|
|
31
32
|
children: R,
|
|
32
33
|
...v
|
|
33
|
-
},
|
|
34
|
+
}, l) => {
|
|
34
35
|
const i = b(null), { setMaxHeight: w } = A(i);
|
|
35
36
|
return /* @__PURE__ */ a(r.Portal, { children: /* @__PURE__ */ a(
|
|
36
37
|
r.Content,
|
|
37
38
|
{
|
|
38
39
|
style: {
|
|
39
40
|
"--flyout-max-width": o,
|
|
40
|
-
"--flyout-width":
|
|
41
|
+
"--flyout-width": n
|
|
41
42
|
},
|
|
42
43
|
ref: i,
|
|
43
44
|
align: t,
|
|
44
45
|
collisionPadding: 8,
|
|
45
46
|
sideOffset: 8,
|
|
46
47
|
onOpenAutoFocus: () => {
|
|
47
|
-
w(),
|
|
48
|
+
w(), c(i, l);
|
|
48
49
|
},
|
|
49
50
|
onCloseAutoFocus: () => {
|
|
50
|
-
|
|
51
|
+
c(i, l);
|
|
51
52
|
},
|
|
52
53
|
className: u.root,
|
|
53
54
|
"data-flyout-spacing": e,
|
|
@@ -60,31 +61,31 @@ const f = ({
|
|
|
60
61
|
}
|
|
61
62
|
) });
|
|
62
63
|
};
|
|
63
|
-
|
|
64
|
-
const
|
|
64
|
+
m.displayName = "Flyout.Content";
|
|
65
|
+
const p = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header" }, d) => /* @__PURE__ */ x("div", { "data-test-id": e, ref: d, className: u.header, children: [
|
|
65
66
|
/* @__PURE__ */ a("div", { children: o }),
|
|
66
67
|
t && /* @__PURE__ */ a(r.Close, { role: "button", "data-test-id": `${e}-close`, className: u.close, children: /* @__PURE__ */ a(C, { size: 20 }) })
|
|
67
68
|
] });
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
|
|
69
|
+
p.displayName = "Flyout.Header";
|
|
70
|
+
const F = ({ children: t, "data-test-id": o = "fondue-flyout-footer" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: u.footer, children: t });
|
|
71
|
+
F.displayName = "Flyout.Footer";
|
|
72
|
+
const g = ({ children: t, "data-test-id": o = "fondue-flyout-body" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, "data-flyout-spacing": "compact", className: u.body, children: t });
|
|
73
|
+
g.displayName = "Flyout.Body";
|
|
73
74
|
const z = {
|
|
74
|
-
Root:
|
|
75
|
-
Trigger: s(
|
|
76
|
-
Content: s(
|
|
77
|
-
Header: s(
|
|
78
|
-
Footer: s(
|
|
79
|
-
Body: s(
|
|
75
|
+
Root: y,
|
|
76
|
+
Trigger: s(f),
|
|
77
|
+
Content: s(m),
|
|
78
|
+
Header: s(p),
|
|
79
|
+
Footer: s(F),
|
|
80
|
+
Body: s(g)
|
|
80
81
|
};
|
|
81
82
|
export {
|
|
82
83
|
z as Flyout,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
g as FlyoutBody,
|
|
85
|
+
m as FlyoutContent,
|
|
86
|
+
F as FlyoutFooter,
|
|
87
|
+
p as FlyoutHeader,
|
|
88
|
+
y as FlyoutRoot,
|
|
89
|
+
f as FlyoutTrigger
|
|
89
90
|
};
|
|
90
91
|
//# sourceMappingURL=fondue-components11.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components11.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, useRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { usePreventDropdownOverflow } from '#/hooks/usePreventDropdownOverflow';\nimport { addAutoFocusAttribute, addShowFocusRing, syncRefs } from '#/utilities/domUtilities';\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' }: 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 >\n {children}\n </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\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 * Define the maximum width of the flyout\n * @default \"360px\"\n */\n maxWidth?: string;\n children?: ReactNode;\n 'data-test-id'?: string;\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 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const localRef = useRef(null);\n\n const { setMaxHeight } = usePreventDropdownOverflow(localRef);\n\n return (\n <RadixPopover.Portal>\n <RadixPopover.Content\n style={\n {\n '--flyout-max-width': maxWidth,\n '--flyout-width': width,\n } as CSSProperties\n }\n ref={localRef}\n align={align}\n collisionPadding={8}\n sideOffset={8}\n onOpenAutoFocus={() => {\n setMaxHeight();\n syncRefs(localRef, ref);\n }}\n onCloseAutoFocus={() => {\n syncRefs(localRef, ref);\n }}\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 </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 = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const FlyoutBody = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-body' }: FlyoutBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} data-flyout-spacing=\"compact\" className={styles.body}>\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","FlyoutContent","align","maxWidth","padding","rounded","width","shadow","localRef","useRef","setMaxHeight","usePreventDropdownOverflow","syncRefs","styles","addShowFocusRing","FlyoutHeader","showCloseButton","IconCross","FlyoutFooter","FlyoutBody","Flyout","forwardRef"],"mappings":";;;;;;;AA6BO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAC9BC,EAAa,MAAb,EAAmB,GAAGD,GAAQ,UAAAD,GAAS;AAEnDD,EAAW,cAAc;
|
|
1
|
+
{"version":3,"file":"fondue-components11.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, useRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { usePreventDropdownOverflow } from '#/hooks/usePreventDropdownOverflow';\nimport { addAutoFocusAttribute, addShowFocusRing, syncRefs } from '#/utilities/domUtilities';\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\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 * Define the maximum width of the flyout\n * @default \"360px\"\n */\n maxWidth?: string;\n children?: ReactNode;\n 'data-test-id'?: string;\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 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const localRef = useRef(null);\n\n const { setMaxHeight } = usePreventDropdownOverflow(localRef);\n\n return (\n <RadixPopover.Portal>\n <RadixPopover.Content\n style={\n {\n '--flyout-max-width': maxWidth,\n '--flyout-width': width,\n } as CSSProperties\n }\n ref={localRef}\n align={align}\n collisionPadding={8}\n sideOffset={8}\n onOpenAutoFocus={() => {\n setMaxHeight();\n syncRefs(localRef, ref);\n }}\n onCloseAutoFocus={() => {\n syncRefs(localRef, ref);\n }}\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 </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 = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const FlyoutBody = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-body' }: FlyoutBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} data-flyout-spacing=\"compact\" className={styles.body}>\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","FlyoutContent","align","maxWidth","padding","rounded","width","shadow","localRef","useRef","setMaxHeight","usePreventDropdownOverflow","syncRefs","styles","addShowFocusRing","FlyoutHeader","showCloseButton","IconCross","FlyoutFooter","FlyoutBody","Flyout","forwardRef"],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { propsToCssVariables as y } from "./fondue-
|
|
3
|
-
import n from "./fondue-
|
|
2
|
+
import { propsToCssVariables as y } from "./fondue-components25.js";
|
|
3
|
+
import n from "./fondue-components44.js";
|
|
4
4
|
const f = ({
|
|
5
5
|
as: a = "div",
|
|
6
6
|
"data-test-id": i = "fondue-grid",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import * as d from "@radix-ui/react-label";
|
|
3
3
|
import { forwardRef as i } from "react";
|
|
4
|
-
import { cn as n } from "./fondue-
|
|
4
|
+
import { cn as n } from "./fondue-components27.js";
|
|
5
5
|
const s = ({ className: e, "data-test-id": a = "fondue-label", ...t }, r) => /* @__PURE__ */ o(
|
|
6
6
|
d.Root,
|
|
7
7
|
{
|
|
@@ -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-components45.js";
|
|
5
5
|
const p = m(
|
|
6
6
|
({
|
|
7
7
|
value: a,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as n, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "@radix-ui/react-scroll-area";
|
|
3
3
|
import { forwardRef as b } from "react";
|
|
4
|
-
import a from "./fondue-
|
|
4
|
+
import a from "./fondue-components46.js";
|
|
5
5
|
const h = ({
|
|
6
6
|
type: t,
|
|
7
7
|
maxHeight: e = "100%",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as b } from "react/jsx-runtime";
|
|
2
|
-
import { propsToCssVariables as n } from "./fondue-
|
|
3
|
-
import c from "./fondue-
|
|
2
|
+
import { propsToCssVariables as n } from "./fondue-components25.js";
|
|
3
|
+
import c from "./fondue-components47.js";
|
|
4
4
|
const m = ({
|
|
5
5
|
"data-test-id": a = "fondue-section",
|
|
6
6
|
children: e,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "@radix-ui/react-toggle-group";
|
|
3
3
|
import { forwardRef as n } from "react";
|
|
4
|
-
import { useControllableState as N } from "./fondue-
|
|
5
|
-
import e from "./fondue-
|
|
4
|
+
import { useControllableState as N } from "./fondue-components48.js";
|
|
5
|
+
import e from "./fondue-components49.js";
|
|
6
6
|
const d = ({ children: a, value: o, defaultValue: s, onValueChange: p, ...m }, f) => {
|
|
7
7
|
const [g, C] = N({
|
|
8
8
|
prop: o,
|
|
@@ -4,12 +4,12 @@ import * as S from "@radix-ui/react-popover";
|
|
|
4
4
|
import { Slot as H } from "@radix-ui/react-slot";
|
|
5
5
|
import { useSelect as T } from "downshift";
|
|
6
6
|
import { forwardRef as V, useRef as $, useState as A } from "react";
|
|
7
|
-
import { ForwardedRefCombobox as q } from "./fondue-
|
|
8
|
-
import { ForwardedRefSelectItem as J, ForwardedRefSelectItemGroup as K } from "./fondue-
|
|
9
|
-
import { SelectMenu as L } from "./fondue-
|
|
10
|
-
import { ForwardedRefSelectSlot as Q } from "./fondue-
|
|
11
|
-
import a from "./fondue-
|
|
12
|
-
import { useSelectData as U } from "./fondue-
|
|
7
|
+
import { ForwardedRefCombobox as q } from "./fondue-components50.js";
|
|
8
|
+
import { ForwardedRefSelectItem as J, ForwardedRefSelectItemGroup as K } from "./fondue-components51.js";
|
|
9
|
+
import { SelectMenu as L } from "./fondue-components52.js";
|
|
10
|
+
import { ForwardedRefSelectSlot as Q } from "./fondue-components53.js";
|
|
11
|
+
import a from "./fondue-components54.js";
|
|
12
|
+
import { useSelectData as U } from "./fondue-components55.js";
|
|
13
13
|
const g = ({
|
|
14
14
|
children: h,
|
|
15
15
|
onSelect: i,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as f, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import * as e from "@radix-ui/react-slider";
|
|
3
3
|
import { forwardRef as h, useRef as R } from "react";
|
|
4
|
-
import r from "./fondue-
|
|
4
|
+
import r from "./fondue-components56.js";
|
|
5
5
|
const g = ({
|
|
6
6
|
value: a,
|
|
7
7
|
defaultValue: n = [0],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "@radix-ui/react-switch";
|
|
3
3
|
import { forwardRef as l } from "react";
|
|
4
|
-
import { cn as f } from "./fondue-
|
|
5
|
-
import t from "./fondue-
|
|
4
|
+
import { cn as f } from "./fondue-components27.js";
|
|
5
|
+
import t from "./fondue-components57.js";
|
|
6
6
|
const n = ({
|
|
7
7
|
value: a,
|
|
8
8
|
defaultValue: i,
|
|
@@ -1,120 +1,139 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsx as n, jsxs as k } from "react/jsx-runtime";
|
|
2
|
+
import { IconArrowUp as B, IconArrowDown as h, IconArrowBidirectional as A } from "@frontify/fondue-icons";
|
|
3
|
+
import { forwardRef as u, useRef as y, useMemo as K } from "react";
|
|
4
|
+
import { useSyncRefs as p } from "./fondue-components58.js";
|
|
5
|
+
import { useTextTruncation as w } from "./fondue-components59.js";
|
|
6
|
+
import o from "./fondue-components60.js";
|
|
7
|
+
import { handleKeyDown as z } from "./fondue-components61.js";
|
|
8
|
+
const N = u(
|
|
9
|
+
({ layout: e = "auto", sticky: a, children: l, ...r }, t) => /* @__PURE__ */ n("div", { onKeyDown: z, role: "grid", tabIndex: -1, children: /* @__PURE__ */ n("table", { ref: t, className: o.table, "data-layout": e, "data-sticky": a, ...r, children: l }) })
|
|
10
|
+
);
|
|
11
|
+
N.displayName = "Table.Root";
|
|
12
|
+
const g = u(({ children: e }, a) => /* @__PURE__ */ n("caption", { ref: a, className: o.caption, children: e }));
|
|
13
|
+
g.displayName = "Table.Caption";
|
|
14
|
+
const R = u(
|
|
15
|
+
({ children: e, "aria-label": a, "aria-busy": l }, r) => /* @__PURE__ */ n("thead", { ref: r, className: o.header, "aria-label": a, "aria-busy": l, children: e })
|
|
16
|
+
);
|
|
17
|
+
R.displayName = "Table.Header";
|
|
18
|
+
const C = u(
|
|
19
|
+
({
|
|
20
|
+
noShrink: e = !1,
|
|
21
|
+
truncate: a = !1,
|
|
22
|
+
align: l = "left",
|
|
23
|
+
scope: r = "col",
|
|
24
|
+
sortTranslations: t,
|
|
25
|
+
sortDirection: d,
|
|
26
|
+
colSpan: c,
|
|
27
|
+
width: b,
|
|
28
|
+
onSortChange: i,
|
|
29
|
+
children: s
|
|
30
|
+
}, m) => {
|
|
31
|
+
const f = y(null);
|
|
32
|
+
p(f, m), w(f);
|
|
33
|
+
const x = K(() => typeof s == "string" ? d === "ascending" ? (t == null ? void 0 : t.sortDescending) ?? `Sort by ${s} descending` : (t == null ? void 0 : t.sortAscending) ?? `Sort by ${s} ascending` : d === "ascending" ? "Sort descending" : "Sort ascending", [s, d, t]), H = () => {
|
|
34
|
+
if (!i)
|
|
35
|
+
return;
|
|
36
|
+
i(d === void 0 || d === "descending" ? "ascending" : "descending");
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ n(
|
|
39
|
+
"th",
|
|
40
|
+
{
|
|
41
|
+
ref: f,
|
|
42
|
+
style: { width: b },
|
|
43
|
+
className: o.headerCell,
|
|
44
|
+
scope: r,
|
|
45
|
+
colSpan: c,
|
|
46
|
+
"data-align": l,
|
|
47
|
+
"data-truncate": a,
|
|
48
|
+
"data-no-shrink": e,
|
|
49
|
+
"data-sortable": !!i,
|
|
50
|
+
"aria-sort": i ? d || "none" : void 0,
|
|
51
|
+
children: i ? /* @__PURE__ */ k(
|
|
52
|
+
"button",
|
|
53
|
+
{
|
|
54
|
+
className: o.sortButton,
|
|
55
|
+
"aria-label": x,
|
|
56
|
+
"data-active": !!d,
|
|
57
|
+
onClick: H,
|
|
58
|
+
children: [
|
|
59
|
+
s,
|
|
60
|
+
d === "ascending" ? /* @__PURE__ */ n(B, { size: "12" }) : d === "descending" ? /* @__PURE__ */ n(h, { size: "12" }) : /* @__PURE__ */ n(A, { className: o.sortIndicator, size: "12" })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
) : s
|
|
64
|
+
}
|
|
65
|
+
);
|
|
15
66
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
className: r.activeIndicator
|
|
78
|
-
}
|
|
79
|
-
)
|
|
80
|
-
] }),
|
|
81
|
-
t
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
) });
|
|
85
|
-
};
|
|
86
|
-
y.displayName = "Tabs.Root";
|
|
87
|
-
const z = ({ children: t, value: o, disabled: s }) => /* @__PURE__ */ a(b.Provider, { value: { value: o, disabled: s }, children: t });
|
|
88
|
-
z.displayName = "Tabs.Tab";
|
|
89
|
-
const I = ({ children: t, ...o }, s) => {
|
|
90
|
-
const { value: n, disabled: c } = T(b), { addTrigger: m } = T(w), u = A(null);
|
|
91
|
-
return D(() => {
|
|
92
|
-
m({
|
|
93
|
-
ref: u || s,
|
|
94
|
-
value: n ?? "",
|
|
95
|
-
disabled: c,
|
|
96
|
-
props: o,
|
|
97
|
-
element: t
|
|
98
|
-
});
|
|
99
|
-
}, []), null;
|
|
100
|
-
};
|
|
101
|
-
I.displayName = "Tabs.Trigger";
|
|
102
|
-
const L = ({ children: t, ...o }, s) => {
|
|
103
|
-
const { value: n } = T(b);
|
|
104
|
-
return /* @__PURE__ */ a(d.Content, { ref: s, ...o, className: r.content, value: n ?? "", children: t });
|
|
105
|
-
};
|
|
106
|
-
L.displayName = "Tabs.Content";
|
|
107
|
-
const Q = {
|
|
108
|
-
Root: i(y),
|
|
109
|
-
Tab: i(z),
|
|
110
|
-
Trigger: i(I),
|
|
111
|
-
Content: i(L)
|
|
67
|
+
);
|
|
68
|
+
C.displayName = "Table.HeaderCell";
|
|
69
|
+
const v = u(
|
|
70
|
+
({ children: e, "aria-busy": a }, l) => /* @__PURE__ */ n("tbody", { ref: l, className: o.body, "aria-busy": a, children: e })
|
|
71
|
+
);
|
|
72
|
+
v.displayName = "Table.Body";
|
|
73
|
+
const I = u(
|
|
74
|
+
({ disabled: e = !1, selected: a = !1, onClick: l, children: r, "aria-label": t, "data-test-id": d }, c) => {
|
|
75
|
+
const b = l !== void 0 && !e, i = () => {
|
|
76
|
+
e || l && l(a);
|
|
77
|
+
}, s = (m) => {
|
|
78
|
+
b && (m.key === "Enter" || m.key === " ") && (m.preventDefault(), i());
|
|
79
|
+
};
|
|
80
|
+
return /* @__PURE__ */ n(
|
|
81
|
+
"tr",
|
|
82
|
+
{
|
|
83
|
+
ref: c,
|
|
84
|
+
className: o.row,
|
|
85
|
+
tabIndex: 0,
|
|
86
|
+
role: b ? "button" : "row",
|
|
87
|
+
"data-disabled": e,
|
|
88
|
+
"data-interactive": b,
|
|
89
|
+
"data-selected": a,
|
|
90
|
+
"aria-disabled": e,
|
|
91
|
+
"aria-label": t,
|
|
92
|
+
"aria-selected": a,
|
|
93
|
+
onClick: b ? i : void 0,
|
|
94
|
+
onKeyDown: b ? s : void 0,
|
|
95
|
+
"data-test-id": d,
|
|
96
|
+
children: r
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
I.displayName = "Table.Row";
|
|
102
|
+
const T = u(
|
|
103
|
+
({ colSpan: e, truncate: a, align: l = "left", children: r, "aria-label": t }, d) => {
|
|
104
|
+
const c = y(null);
|
|
105
|
+
return p(c, d), w(c), /* @__PURE__ */ n(
|
|
106
|
+
"td",
|
|
107
|
+
{
|
|
108
|
+
ref: c,
|
|
109
|
+
className: o.rowCell,
|
|
110
|
+
colSpan: e,
|
|
111
|
+
"data-align": l,
|
|
112
|
+
"data-truncate": a,
|
|
113
|
+
"aria-label": t,
|
|
114
|
+
children: r
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
T.displayName = "Table.RowCell";
|
|
120
|
+
const q = {
|
|
121
|
+
Root: N,
|
|
122
|
+
Caption: g,
|
|
123
|
+
Header: R,
|
|
124
|
+
HeaderCell: C,
|
|
125
|
+
Body: v,
|
|
126
|
+
Row: I,
|
|
127
|
+
RowCell: T
|
|
112
128
|
};
|
|
113
129
|
export {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
130
|
+
q as Table,
|
|
131
|
+
v as TableBody,
|
|
132
|
+
g as TableCaption,
|
|
133
|
+
R as TableHeader,
|
|
134
|
+
C as TableHeaderCell,
|
|
135
|
+
N as TableRoot,
|
|
136
|
+
I as TableRow,
|
|
137
|
+
T as TableRowCell
|
|
119
138
|
};
|
|
120
139
|
//# sourceMappingURL=fondue-components21.js.map
|