@frontify/fondue-components 7.0.1 → 8.0.1
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 +1 -1
- package/dist/fondue-components11.js +65 -75
- package/dist/fondue-components11.js.map +1 -1
- package/dist/fondue-components12.js +1 -1
- package/dist/fondue-components14.js +1 -1
- package/dist/fondue-components15.js +1 -1
- package/dist/fondue-components16.js +1 -1
- 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 +1 -1
- package/dist/fondue-components21.js +46 -46
- package/dist/fondue-components21.js.map +1 -1
- package/dist/fondue-components22.js +3 -3
- package/dist/fondue-components23.js +1 -1
- package/dist/fondue-components24.js +1 -1
- package/dist/fondue-components25.js +8 -8
- package/dist/fondue-components25.js.map +1 -1
- package/dist/fondue-components28.js +1 -1
- package/dist/fondue-components31.js +1 -1
- package/dist/fondue-components33.js +1 -1
- package/dist/fondue-components37.js +10 -25
- package/dist/fondue-components37.js.map +1 -1
- package/dist/fondue-components40.js +17 -14
- package/dist/fondue-components40.js.map +1 -1
- package/dist/fondue-components41.js +17 -18
- package/dist/fondue-components41.js.map +1 -1
- package/dist/fondue-components42.js +4 -16
- package/dist/fondue-components42.js.map +1 -1
- package/dist/fondue-components43.js +13 -3
- package/dist/fondue-components43.js.map +1 -1
- package/dist/fondue-components44.js +3 -13
- package/dist/fondue-components44.js.map +1 -1
- package/dist/fondue-components45.js +35 -5
- package/dist/fondue-components45.js.map +1 -1
- package/dist/fondue-components46.js +13 -35
- package/dist/fondue-components46.js.map +1 -1
- package/dist/fondue-components47.js +4 -12
- package/dist/fondue-components47.js.map +1 -1
- package/dist/fondue-components48.js +24 -4
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components49.js +16 -24
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components50.js +139 -16
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +16 -140
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +70 -16
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +8 -72
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +33 -8
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +48 -32
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +10 -48
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +10 -8
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +7 -12
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +12 -7
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components60.js +20 -12
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +15 -19
- package/dist/fondue-components61.js.map +1 -1
- package/dist/fondue-components62.js +52 -14
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +14 -52
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +17 -14
- package/dist/fondue-components64.js.map +1 -1
- package/dist/fondue-components65.js +6 -17
- package/dist/fondue-components65.js.map +1 -1
- package/dist/fondue-components66.js +2 -7
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components67.js +15 -2
- package/dist/fondue-components67.js.map +1 -1
- package/dist/fondue-components68.js +1 -1
- package/dist/fondue-components9.js +91 -101
- package/dist/fondue-components9.js.map +1 -1
- package/dist/index.d.ts +6 -8
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/fondue-components69.js +0 -18
- package/dist/fondue-components69.js.map +0 -1
|
@@ -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-components25.js";
|
|
4
|
-
import x from "./fondue-
|
|
4
|
+
import x from "./fondue-components42.js";
|
|
5
5
|
const u = n(
|
|
6
6
|
({
|
|
7
7
|
as: a = "div",
|
|
@@ -1,94 +1,84 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { IconCross as
|
|
1
|
+
import { jsx as a, jsxs as l, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import { IconCross as w } from "@frontify/fondue-icons";
|
|
3
3
|
import * as i from "@radix-ui/react-popover";
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const m = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-trigger", ...s }, l) => /* @__PURE__ */ a(
|
|
4
|
+
import { forwardRef as s } from "react";
|
|
5
|
+
import { addAutoFocusAttribute as x, addShowFocusRing as C } from "./fondue-components37.js";
|
|
6
|
+
import d from "./fondue-components43.js";
|
|
7
|
+
const n = ({ children: t, ...o }) => /* @__PURE__ */ a(i.Root, { ...o, children: t });
|
|
8
|
+
n.displayName = "Flyout.Root";
|
|
9
|
+
const y = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-trigger", ...r }, u) => /* @__PURE__ */ a(
|
|
11
10
|
i.Trigger,
|
|
12
11
|
{
|
|
13
|
-
onMouseDown:
|
|
12
|
+
onMouseDown: x,
|
|
14
13
|
"data-auto-focus-visible": "true",
|
|
15
14
|
"data-auto-focus-trigger": !0,
|
|
16
15
|
"data-test-id": e,
|
|
17
16
|
asChild: t,
|
|
18
|
-
ref:
|
|
19
|
-
...
|
|
17
|
+
ref: u,
|
|
18
|
+
...r,
|
|
20
19
|
children: o
|
|
21
20
|
}
|
|
22
21
|
);
|
|
23
|
-
|
|
24
|
-
const
|
|
22
|
+
y.displayName = "Flyout.Trigger";
|
|
23
|
+
const c = ({
|
|
25
24
|
align: t = "start",
|
|
26
25
|
maxWidth: o = "360px",
|
|
27
26
|
padding: e = "compact",
|
|
28
|
-
rounded:
|
|
29
|
-
width:
|
|
30
|
-
shadow:
|
|
31
|
-
"data-test-id":
|
|
32
|
-
children:
|
|
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
|
-
onFocus: B,
|
|
61
|
-
...w,
|
|
62
|
-
children: R
|
|
63
|
-
}
|
|
64
|
-
)
|
|
65
|
-
] }) });
|
|
66
|
-
};
|
|
67
|
-
p.displayName = "Flyout.Content";
|
|
68
|
-
const F = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header" }, s) => /* @__PURE__ */ y("div", { "data-test-id": e, ref: s, className: d.header, children: [
|
|
27
|
+
rounded: r = "medium",
|
|
28
|
+
width: u = "fit-content",
|
|
29
|
+
shadow: p = "medium",
|
|
30
|
+
"data-test-id": g = "fondue-flyout-content",
|
|
31
|
+
children: N,
|
|
32
|
+
...h
|
|
33
|
+
}, v) => /* @__PURE__ */ a(i.Portal, { children: /* @__PURE__ */ l(R, { children: [
|
|
34
|
+
/* @__PURE__ */ a("div", { className: d.overlay }),
|
|
35
|
+
/* @__PURE__ */ a(
|
|
36
|
+
i.Content,
|
|
37
|
+
{
|
|
38
|
+
style: {
|
|
39
|
+
"--flyout-max-width": o,
|
|
40
|
+
"--flyout-width": u
|
|
41
|
+
},
|
|
42
|
+
ref: v,
|
|
43
|
+
align: t,
|
|
44
|
+
collisionPadding: 8,
|
|
45
|
+
sideOffset: 8,
|
|
46
|
+
className: d.root,
|
|
47
|
+
"data-flyout-spacing": e,
|
|
48
|
+
"data-rounded": r,
|
|
49
|
+
"data-shadow": p,
|
|
50
|
+
"data-test-id": g,
|
|
51
|
+
onFocus: C,
|
|
52
|
+
...h,
|
|
53
|
+
children: N
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
] }) });
|
|
57
|
+
c.displayName = "Flyout.Content";
|
|
58
|
+
const m = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header" }, r) => /* @__PURE__ */ l("div", { "data-test-id": e, ref: r, className: d.header, children: [
|
|
69
59
|
/* @__PURE__ */ a("div", { children: o }),
|
|
70
|
-
t && /* @__PURE__ */ a(i.Close, { role: "button", "data-test-id": `${e}-close`, className: d.close, children: /* @__PURE__ */ a(
|
|
60
|
+
t && /* @__PURE__ */ a(i.Close, { role: "button", "data-test-id": `${e}-close`, className: d.close, children: /* @__PURE__ */ a(w, { size: 20 }) })
|
|
71
61
|
] });
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
-
Root:
|
|
79
|
-
Trigger:
|
|
80
|
-
Content:
|
|
81
|
-
Header:
|
|
82
|
-
Footer:
|
|
83
|
-
Body:
|
|
62
|
+
m.displayName = "Flyout.Header";
|
|
63
|
+
const f = ({ children: t, "data-test-id": o = "fondue-flyout-footer" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: d.footer, children: t });
|
|
64
|
+
f.displayName = "Flyout.Footer";
|
|
65
|
+
const F = ({ children: t, "data-test-id": o = "fondue-flyout-body" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, "data-flyout-spacing": "compact", className: d.body, children: t });
|
|
66
|
+
F.displayName = "Flyout.Body";
|
|
67
|
+
const j = {
|
|
68
|
+
Root: n,
|
|
69
|
+
Trigger: s(y),
|
|
70
|
+
Content: s(c),
|
|
71
|
+
Header: s(m),
|
|
72
|
+
Footer: s(f),
|
|
73
|
+
Body: s(F)
|
|
84
74
|
};
|
|
85
75
|
export {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
76
|
+
j as Flyout,
|
|
77
|
+
F as FlyoutBody,
|
|
78
|
+
c as FlyoutContent,
|
|
79
|
+
f as FlyoutFooter,
|
|
80
|
+
m as FlyoutHeader,
|
|
81
|
+
n as FlyoutRoot,
|
|
82
|
+
y as FlyoutTrigger
|
|
93
83
|
};
|
|
94
84
|
//# 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,
|
|
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, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { addAutoFocusAttribute, addShowFocusRing } 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 return (\n <RadixPopover.Portal>\n <>\n <div 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={8}\n sideOffset={8}\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 </>\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","jsxs","Fragment","styles","addShowFocusRing","FlyoutHeader","showCloseButton","IconCross","FlyoutFooter","FlyoutBody","Flyout","forwardRef"],"mappings":";;;;;;AA4BO,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;AA0CrB,MAAMM,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,gBAAgBV,IAAa;AAAA,EAC7B,UAAAL;AAAA,EACA,GAAGC;AACP,GACAK,MAGK,gBAAAC,EAAAL,EAAa,QAAb,EACG,UACI,gBAAAc,EAAAC,GAAA,EAAA,UAAA;AAAA,EAAC,gBAAAV,EAAA,OAAA,EAAI,WAAWW,EAAO,QAAS,CAAA;AAAA,EAChC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AA,EACN,SAAS2B,EAAkDvB,CAAa;AAAA,EACxE,SAASuB,EAA+CjB,CAAa;AAAA,EACrE,QAAQiB,EAA8CN,CAAY;AAAA,EAClE,QAAQM,EAA8CH,CAAY;AAAA,EAClE,MAAMG,EAA4CF,CAAU;AAChE;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as f } from "react";
|
|
3
3
|
import { propsToCssVariables as y } from "./fondue-components25.js";
|
|
4
|
-
import n from "./fondue-
|
|
4
|
+
import n from "./fondue-components44.js";
|
|
5
5
|
const u = f(
|
|
6
6
|
({
|
|
7
7
|
as: a = "div",
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
import { jsx as b } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as n } from "react";
|
|
3
3
|
import { propsToCssVariables as m } from "./fondue-components25.js";
|
|
4
|
-
import c from "./fondue-
|
|
4
|
+
import c from "./fondue-components47.js";
|
|
5
5
|
const f = n(
|
|
6
6
|
({
|
|
7
7
|
"data-test-id": a = "fondue-section",
|
|
@@ -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],
|
|
@@ -2,7 +2,7 @@ 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
4
|
import { cn as f } from "./fondue-components27.js";
|
|
5
|
-
import t from "./fondue-
|
|
5
|
+
import t from "./fondue-components57.js";
|
|
6
6
|
const n = ({
|
|
7
7
|
value: a,
|
|
8
8
|
defaultValue: i,
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { jsx as n, jsxs as k } from "react/jsx-runtime";
|
|
2
|
-
import { IconArrowUp as B, IconArrowDown as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { useSyncRefs as p } from "./fondue-
|
|
5
|
-
import { useTextTruncation as w } from "./fondue-
|
|
6
|
-
import o from "./fondue-
|
|
7
|
-
import { handleKeyDown as z } from "./fondue-
|
|
8
|
-
const N =
|
|
9
|
-
({ layout: e = "auto", sticky: a, children: l, ...
|
|
2
|
+
import { IconArrowUp as B, IconArrowDown as A, IconArrowBidirectional as K } from "@frontify/fondue-icons";
|
|
3
|
+
import { forwardRef as m, useRef as y, useMemo as h } 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 = m(
|
|
9
|
+
({ layout: e = "auto", sticky: a, children: l, ...i }, 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, ...i, children: l }) })
|
|
10
10
|
);
|
|
11
11
|
N.displayName = "Table.Root";
|
|
12
|
-
const g =
|
|
12
|
+
const g = m(({ children: e }, a) => /* @__PURE__ */ n("caption", { ref: a, className: o.caption, children: e }));
|
|
13
13
|
g.displayName = "Table.Caption";
|
|
14
|
-
const R =
|
|
15
|
-
({ children: e, "aria-label": a, "aria-busy": l },
|
|
14
|
+
const R = m(
|
|
15
|
+
({ children: e, "aria-label": a, "aria-busy": l }, i) => /* @__PURE__ */ n("thead", { ref: i, className: o.header, "aria-label": a, "aria-busy": l, children: e })
|
|
16
16
|
);
|
|
17
17
|
R.displayName = "Table.Header";
|
|
18
|
-
const C =
|
|
18
|
+
const C = m(
|
|
19
19
|
({
|
|
20
20
|
noShrink: e = !1,
|
|
21
21
|
truncate: a = !1,
|
|
22
22
|
align: l = "left",
|
|
23
|
-
scope:
|
|
23
|
+
scope: i = "col",
|
|
24
24
|
sortTranslations: t,
|
|
25
25
|
sortDirection: d,
|
|
26
26
|
colSpan: c,
|
|
27
27
|
width: b,
|
|
28
|
-
onSortChange:
|
|
29
|
-
children:
|
|
30
|
-
},
|
|
28
|
+
onSortChange: s,
|
|
29
|
+
children: r
|
|
30
|
+
}, u) => {
|
|
31
31
|
const f = y(null);
|
|
32
|
-
p(f,
|
|
33
|
-
const
|
|
34
|
-
if (!
|
|
32
|
+
p(f, u), w(f);
|
|
33
|
+
const I = h(() => typeof r == "string" ? d === "ascending" ? (t == null ? void 0 : t.sortDescending) ?? `Sort by ${r} descending` : (t == null ? void 0 : t.sortAscending) ?? `Sort by ${r} ascending` : d === "ascending" ? "Sort descending" : "Sort ascending", [r, d, t]), H = () => {
|
|
34
|
+
if (!s)
|
|
35
35
|
return;
|
|
36
|
-
|
|
36
|
+
s(d === void 0 || d === "descending" ? "ascending" : "descending");
|
|
37
37
|
};
|
|
38
38
|
return /* @__PURE__ */ n(
|
|
39
39
|
"th",
|
|
@@ -41,41 +41,41 @@ const C = u(
|
|
|
41
41
|
ref: f,
|
|
42
42
|
style: { width: b },
|
|
43
43
|
className: o.headerCell,
|
|
44
|
-
scope:
|
|
44
|
+
scope: i,
|
|
45
45
|
colSpan: c,
|
|
46
46
|
"data-align": l,
|
|
47
47
|
"data-truncate": a,
|
|
48
48
|
"data-no-shrink": e,
|
|
49
|
-
"data-sortable": !!
|
|
50
|
-
"aria-sort":
|
|
51
|
-
children:
|
|
49
|
+
"data-sortable": !!s,
|
|
50
|
+
"aria-sort": s ? d || "none" : void 0,
|
|
51
|
+
children: s ? /* @__PURE__ */ n("div", { className: o.cellContent, children: /* @__PURE__ */ k(
|
|
52
52
|
"button",
|
|
53
53
|
{
|
|
54
54
|
className: o.sortButton,
|
|
55
|
-
"aria-label":
|
|
55
|
+
"aria-label": I,
|
|
56
56
|
"data-active": !!d,
|
|
57
57
|
onClick: H,
|
|
58
58
|
children: [
|
|
59
|
-
|
|
60
|
-
d === "ascending" ? /* @__PURE__ */ n(B, { size: "12" }) : d === "descending" ? /* @__PURE__ */ n(
|
|
59
|
+
typeof r == "string" && a ? /* @__PURE__ */ n("span", { className: o.buttonText, children: r }) : r,
|
|
60
|
+
d === "ascending" ? /* @__PURE__ */ n(B, { size: "12" }) : d === "descending" ? /* @__PURE__ */ n(A, { size: "12" }) : /* @__PURE__ */ n(K, { className: o.sortIndicator, size: "12" })
|
|
61
61
|
]
|
|
62
62
|
}
|
|
63
|
-
) :
|
|
63
|
+
) }) : r
|
|
64
64
|
}
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
68
|
C.displayName = "Table.HeaderCell";
|
|
69
|
-
const v =
|
|
69
|
+
const v = m(
|
|
70
70
|
({ children: e, "aria-busy": a }, l) => /* @__PURE__ */ n("tbody", { ref: l, className: o.body, "aria-busy": a, children: e })
|
|
71
71
|
);
|
|
72
72
|
v.displayName = "Table.Body";
|
|
73
|
-
const
|
|
74
|
-
({ disabled: e = !1, selected: a = !1, onClick: l, children:
|
|
75
|
-
const b = l !== void 0 && !e,
|
|
73
|
+
const T = m(
|
|
74
|
+
({ disabled: e = !1, selected: a = !1, onClick: l, children: i, "aria-label": t, "data-test-id": d }, c) => {
|
|
75
|
+
const b = l !== void 0 && !e, s = () => {
|
|
76
76
|
e || l && l(a);
|
|
77
|
-
},
|
|
78
|
-
b && (
|
|
77
|
+
}, r = (u) => {
|
|
78
|
+
b && (u.key === "Enter" || u.key === " ") && (u.preventDefault(), s());
|
|
79
79
|
};
|
|
80
80
|
return /* @__PURE__ */ n(
|
|
81
81
|
"tr",
|
|
@@ -90,17 +90,17 @@ const I = u(
|
|
|
90
90
|
"aria-disabled": e,
|
|
91
91
|
"aria-label": t,
|
|
92
92
|
"aria-selected": a,
|
|
93
|
-
onClick: b ?
|
|
94
|
-
onKeyDown: b ?
|
|
93
|
+
onClick: b ? s : void 0,
|
|
94
|
+
onKeyDown: b ? r : void 0,
|
|
95
95
|
"data-test-id": d,
|
|
96
|
-
children:
|
|
96
|
+
children: i
|
|
97
97
|
}
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
100
|
);
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
({ colSpan: e, truncate: a, align: l = "left", children:
|
|
101
|
+
T.displayName = "Table.Row";
|
|
102
|
+
const x = m(
|
|
103
|
+
({ colSpan: e, truncate: a, align: l = "left", children: i, "aria-label": t }, d) => {
|
|
104
104
|
const c = y(null);
|
|
105
105
|
return p(c, d), w(c), /* @__PURE__ */ n(
|
|
106
106
|
"td",
|
|
@@ -111,20 +111,20 @@ const T = u(
|
|
|
111
111
|
"data-align": l,
|
|
112
112
|
"data-truncate": a,
|
|
113
113
|
"aria-label": t,
|
|
114
|
-
children:
|
|
114
|
+
children: i
|
|
115
115
|
}
|
|
116
116
|
);
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
|
-
|
|
119
|
+
x.displayName = "Table.RowCell";
|
|
120
120
|
const q = {
|
|
121
121
|
Root: N,
|
|
122
122
|
Caption: g,
|
|
123
123
|
Header: R,
|
|
124
124
|
HeaderCell: C,
|
|
125
125
|
Body: v,
|
|
126
|
-
Row:
|
|
127
|
-
RowCell:
|
|
126
|
+
Row: T,
|
|
127
|
+
RowCell: x
|
|
128
128
|
};
|
|
129
129
|
export {
|
|
130
130
|
q as Table,
|
|
@@ -133,7 +133,7 @@ export {
|
|
|
133
133
|
R as TableHeader,
|
|
134
134
|
C as TableHeaderCell,
|
|
135
135
|
N as TableRoot,
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
T as TableRow,
|
|
137
|
+
x as TableRowCell
|
|
138
138
|
};
|
|
139
139
|
//# sourceMappingURL=fondue-components21.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components21.js","sources":["../src/components/Table/Table.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconArrowDown, IconArrowUp, IconArrowBidirectional } from '@frontify/fondue-icons';\nimport {\n forwardRef,\n useMemo,\n useRef,\n type ReactNode,\n type KeyboardEvent,\n type CSSProperties,\n type ReactElement,\n} from 'react';\n\nimport { useSyncRefs } from '#/hooks/useSyncRefs';\nimport { useTextTruncation } from '#/hooks/useTextTruncation';\nimport { type CommonAriaAttrs } from '#/utilities/types';\n\nimport styles from './styles/table.module.scss';\nimport { handleKeyDown } from './utils';\n\ntype TableRootProps = {\n /**\n * Whether the table should have a fixed or auto layout\n * @default 'auto'\n */\n layout?: 'auto' | 'fixed';\n /**\n * Whether header should stick to the top when scrolling\n */\n sticky?: 'head' | 'col' | 'both';\n children: ReactNode;\n} & CommonAriaAttrs;\n\nexport const TableRoot = forwardRef<HTMLTableElement, TableRootProps>(\n ({ layout = 'auto', sticky, children, ...props }, ref) => {\n return (\n <div onKeyDown={handleKeyDown} role=\"grid\" tabIndex={-1}>\n <table ref={ref} className={styles.table} data-layout={layout} data-sticky={sticky} {...props}>\n {children}\n </table>\n </div>\n );\n },\n);\nTableRoot.displayName = 'Table.Root';\n\nexport const TableCaption = forwardRef<HTMLTableCaptionElement, { children: ReactNode }>(({ children }, ref) => {\n return (\n <caption ref={ref} className={styles.caption}>\n {children}\n </caption>\n );\n});\nTableCaption.displayName = 'Table.Caption';\n\ntype TableHeaderProps = {\n children: ReactNode;\n 'aria-label'?: string;\n 'aria-busy'?: boolean;\n};\n\nexport const TableHeader = forwardRef<HTMLTableSectionElement, TableHeaderProps>(\n ({ children, 'aria-label': ariaLabel, 'aria-busy': ariaBusy }, ref) => {\n return (\n <thead ref={ref} className={styles.header} aria-label={ariaLabel} aria-busy={ariaBusy}>\n {children}\n </thead>\n );\n },\n);\nTableHeader.displayName = 'Table.Header';\n\ntype SortDirection = 'ascending' | 'descending' | undefined;\ntype HorizontalAlignment = 'left' | 'center' | 'right';\n\ntype TableHeaderCellProps = {\n /**\n * Scope of the column\n * @default 'col'\n */\n scope?: HTMLTableCellElement['scope'];\n /**\n * Number of columns the cell should span\n */\n colSpan?: HTMLTableCellElement['colSpan'];\n /**\n * Width of the column\n */\n width?: CSSProperties['width'];\n /**\n * Current sort direction of the column\n */\n sortDirection?: SortDirection;\n /**\n * Horizontal alignment of the content\n * @default 'left'\n */\n align?: HorizontalAlignment;\n /**\n * Whether to truncate content with ellipsis when it overflows\n * @default false\n */\n truncate?: boolean;\n /**\n * Aria label for asceding/descending sort. Variables: {column} - column name\n * @default \"Sort by {column} ascending/descending\"\n */\n sortTranslations?: {\n sortAscending?: string;\n sortDescending?: string;\n };\n /**\n * Whether the column should have a minimum width\n * @default false\n */\n noShrink?: boolean;\n /**\n * Handler called when the sort direction changes\n * @param direction - The new sort direction\n */\n onSortChange?: (direction: SortDirection) => void;\n children: ReactNode;\n};\n\nexport const TableHeaderCell = forwardRef<HTMLTableCellElement, TableHeaderCellProps>(\n (\n {\n noShrink = false,\n truncate = false,\n align = 'left',\n scope = 'col',\n sortTranslations,\n sortDirection,\n colSpan,\n width,\n onSortChange,\n children,\n },\n ref,\n ) => {\n const cellRef = useRef<HTMLTableCellElement>(null);\n useSyncRefs<HTMLTableCellElement>(cellRef, ref);\n\n useTextTruncation(cellRef);\n\n const sortLabel = useMemo(() => {\n if (typeof children === 'string') {\n if (sortDirection === 'ascending') {\n return sortTranslations?.sortDescending ?? `Sort by ${children} descending`;\n }\n return sortTranslations?.sortAscending ?? `Sort by ${children} ascending`;\n }\n\n return sortDirection === 'ascending' ? 'Sort descending' : 'Sort ascending';\n }, [children, sortDirection, sortTranslations]);\n\n const handleSortChange = () => {\n if (!onSortChange) {\n return;\n }\n\n const newDirection: SortDirection =\n sortDirection === undefined || sortDirection === 'descending' ? 'ascending' : 'descending';\n\n onSortChange(newDirection);\n };\n\n return (\n <th\n ref={cellRef}\n style={{ width }}\n className={styles.headerCell}\n scope={scope}\n colSpan={colSpan}\n data-align={align}\n data-truncate={truncate}\n data-no-shrink={noShrink}\n data-sortable={!!onSortChange}\n aria-sort={onSortChange ? sortDirection || 'none' : undefined}\n >\n {onSortChange ? (\n <button\n className={styles.sortButton}\n aria-label={sortLabel}\n data-active={!!sortDirection}\n onClick={handleSortChange}\n >\n {children}\n {sortDirection === 'ascending' ? (\n <IconArrowUp size=\"12\" />\n ) : sortDirection === 'descending' ? (\n <IconArrowDown size=\"12\" />\n ) : (\n <IconArrowBidirectional className={styles.sortIndicator} size=\"12\" />\n )}\n </button>\n ) : (\n children\n )}\n </th>\n );\n },\n);\nTableHeaderCell.displayName = 'Table.HeaderCell';\n\ntype TableBodyProps = {\n children: ReactNode;\n 'aria-busy'?: boolean;\n};\n\nexport const TableBody = forwardRef<HTMLTableSectionElement, TableBodyProps>(\n ({ children, 'aria-busy': ariaBusy }, ref) => {\n return (\n <tbody ref={ref} className={styles.body} aria-busy={ariaBusy}>\n {children}\n </tbody>\n );\n },\n);\nTableBody.displayName = 'Table.Body';\n\ntype BaseTableRowProps = {\n /**\n * Whether the row is in a selected state\n * @default false\n */\n selected?: boolean;\n /**\n * Whether to disable interactions for this row\n * @default false\n */\n disabled?: boolean;\n /**\n * Content to be rendered within the row\n */\n children: ReactNode;\n /**\n * Accessible label for the row\n */\n 'aria-label'?: string;\n 'data-test-id'?: string;\n};\n\ntype ClickableTableRowProps = BaseTableRowProps & {\n /**\n * Handler called when the row is clicked or activated via keyboard\n * If provided, the row will be hoverable and interactive\n */\n onClick: (selected: boolean) => void;\n onNavigate?: never;\n href?: never;\n};\n\ntype NavigableTableRowProps = BaseTableRowProps & {\n onClick?: never;\n /**\n * Handler called when the row is clicked or activated via keyboard for navigation\n * Must be provided together with href\n */\n onNavigate: (href: string) => void;\n /**\n * URL associated with this row for navigation\n * Must be provided together with onNavigate\n */\n href: string;\n};\n\ntype NonInteractiveTableRowProps = BaseTableRowProps & {\n onClick?: never;\n onNavigate?: never;\n href?: never;\n};\n\ntype TableRowProps = ClickableTableRowProps | NavigableTableRowProps | NonInteractiveTableRowProps;\n\nexport const TableRow = forwardRef<HTMLTableRowElement, TableRowProps>(\n (\n { disabled = false, selected = false, onClick, children, 'aria-label': ariaLabel, 'data-test-id': dataTestId },\n ref,\n ) => {\n const isInteractive = onClick !== undefined && !disabled;\n\n const handleClick = () => {\n if (disabled) {\n return;\n }\n\n if (onClick) {\n onClick(selected);\n }\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLTableRowElement>) => {\n if (!isInteractive) {\n return;\n }\n\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleClick();\n }\n };\n\n return (\n <tr\n ref={ref}\n className={styles.row}\n tabIndex={0}\n role={isInteractive ? 'button' : 'row'}\n data-disabled={disabled}\n data-interactive={isInteractive}\n data-selected={selected}\n aria-disabled={disabled}\n aria-label={ariaLabel}\n aria-selected={selected}\n onClick={isInteractive ? handleClick : undefined}\n onKeyDown={isInteractive ? handleKeyDown : undefined}\n data-test-id={dataTestId}\n >\n {children}\n </tr>\n );\n },\n);\nTableRow.displayName = 'Table.Row';\n\ntype TableRowCellProps = {\n /**\n * Number of columns the cell should span\n */\n colSpan?: HTMLTableCellElement['colSpan'];\n /**\n * Whether to truncate content with ellipsis when it overflows\n * @default false\n */\n truncate?: boolean;\n /**\n * Horizontal alignment of the content\n * @default 'left'\n */\n align?: HorizontalAlignment;\n children: ReactNode;\n 'aria-label'?: string;\n};\n\nexport const TableRowCell = forwardRef<HTMLTableCellElement, TableRowCellProps>(\n ({ colSpan, truncate, align = 'left', children, 'aria-label': ariaLabel }, ref): ReactElement => {\n const cellRef = useRef<HTMLTableCellElement>(null);\n useSyncRefs<HTMLTableCellElement>(cellRef, ref);\n\n useTextTruncation(cellRef);\n\n return (\n <td\n ref={cellRef}\n className={styles.rowCell}\n colSpan={colSpan}\n data-align={align}\n data-truncate={truncate}\n aria-label={ariaLabel}\n >\n {children}\n </td>\n );\n },\n);\nTableRowCell.displayName = 'Table.RowCell';\n\nexport const Table = {\n Root: TableRoot,\n Caption: TableCaption,\n Header: TableHeader,\n HeaderCell: TableHeaderCell,\n Body: TableBody,\n Row: TableRow,\n RowCell: TableRowCell,\n};\n"],"names":["TableRoot","forwardRef","layout","sticky","children","props","ref","jsx","handleKeyDown","styles","TableCaption","TableHeader","ariaLabel","ariaBusy","TableHeaderCell","noShrink","truncate","align","scope","sortTranslations","sortDirection","colSpan","width","onSortChange","cellRef","useRef","useSyncRefs","useTextTruncation","sortLabel","useMemo","handleSortChange","jsxs","IconArrowUp","IconArrowDown","IconArrowBidirectional","TableBody","TableRow","disabled","selected","onClick","dataTestId","isInteractive","handleClick","event","TableRowCell","Table"],"mappings":";;;;;;;AAiCO,MAAMA,IAAYC;AAAA,EACrB,CAAC,EAAE,QAAAC,IAAS,QAAQ,QAAAC,GAAQ,UAAAC,GAAU,GAAGC,EAAM,GAAGC,MAE1C,gBAAAC,EAAC,SAAI,WAAWC,GAAe,MAAK,QAAO,UAAU,IACjD,UAAC,gBAAAD,EAAA,SAAA,EAAM,KAAAD,GAAU,WAAWG,EAAO,OAAO,eAAaP,GAAQ,eAAaC,GAAS,GAAGE,GACnF,UAAAD,EAAA,CACL,EACJ,CAAA;AAGZ;AACAJ,EAAU,cAAc;AAEjB,MAAMU,IAAeT,EAA6D,CAAC,EAAE,UAAAG,EAAA,GA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AAC;AAAA,MAAA;AAAA,QACG,KAAAD;AAAA,QACA,WAAWG,EAAO;AAAA,QAClB,UAAU;AAAA,QACV,MAAMgC,IAAgB,WAAW;AAAA,QACjC,iBAAeJ;AAAA,QACf,oBAAkBI;AAAA,QAClB,iBAAeH;AAAA,QACf,iBAAeD;AAAA,QACf,cAAYzB;AAAA,QACZ,iBAAe0B;AAAA,QACf,SAASG,IAAgBC,IAAc;AAAA,QACvC,WAAWD,IAAgBjC,IAAgB;AAAA,QAC3C,gBAAcgC;AAAA,QAEb,UAAApC;AAAA,MAAA;AAAA,IACL;AAAA,EAAA;AAGZ;AACAgC,EAAS,cAAc;AAqBhB,MAAMQ,IAAe3C;AAAA,EACxB,CAAC,EAAE,SAAAoB,GAAS,UAAAL,GAAU,OAAAC,IAAQ,QAAQ,UAAAb,GAAU,cAAcQ,EAAU,GAAGN,MAAsB;AACvF,UAAAkB,IAAUC,EAA6B,IAAI;AACjD,WAAAC,EAAkCF,GAASlB,CAAG,GAE9CqB,EAAkBH,CAAO,GAGrB,gBAAAjB;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,KAAKiB;AAAA,QACL,WAAWf,EAAO;AAAA,QAClB,SAAAY;AAAA,QACA,cAAYJ;AAAA,QACZ,iBAAeD;AAAA,QACf,cAAYJ;AAAA,QAEX,UAAAR;AAAA,MAAA;AAAA,IACL;AAAA,EAAA;AAGZ;AACAwC,EAAa,cAAc;AAEpB,MAAMC,IAAQ;AAAA,EACjB,MAAM7C;AAAA,EACN,SAASU;AAAA,EACT,QAAQC;AAAA,EACR,YAAYG;AAAA,EACZ,MAAMqB;AAAA,EACN,KAAKC;AAAA,EACL,SAASQ;AACb;"}
|
|
1
|
+
{"version":3,"file":"fondue-components21.js","sources":["../src/components/Table/Table.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconArrowDown, IconArrowUp, IconArrowBidirectional } from '@frontify/fondue-icons';\nimport {\n forwardRef,\n useMemo,\n useRef,\n type ReactNode,\n type KeyboardEvent,\n type CSSProperties,\n type ReactElement,\n} from 'react';\n\nimport { useSyncRefs } from '#/hooks/useSyncRefs';\nimport { useTextTruncation } from '#/hooks/useTextTruncation';\nimport { type CommonAriaAttrs } from '#/utilities/types';\n\nimport styles from './styles/table.module.scss';\nimport { handleKeyDown } from './utils';\n\ntype TableRootProps = {\n /**\n * Whether the table should have a fixed or auto layout\n * @default 'auto'\n */\n layout?: 'auto' | 'fixed';\n /**\n * Whether header should stick to the top when scrolling\n */\n sticky?: 'head' | 'col' | 'both';\n children: ReactNode;\n} & CommonAriaAttrs;\n\nexport const TableRoot = forwardRef<HTMLTableElement, TableRootProps>(\n ({ layout = 'auto', sticky, children, ...props }, ref) => {\n return (\n <div onKeyDown={handleKeyDown} role=\"grid\" tabIndex={-1}>\n <table ref={ref} className={styles.table} data-layout={layout} data-sticky={sticky} {...props}>\n {children}\n </table>\n </div>\n );\n },\n);\nTableRoot.displayName = 'Table.Root';\n\nexport const TableCaption = forwardRef<HTMLTableCaptionElement, { children: ReactNode }>(({ children }, ref) => {\n return (\n <caption ref={ref} className={styles.caption}>\n {children}\n </caption>\n );\n});\nTableCaption.displayName = 'Table.Caption';\n\ntype TableHeaderProps = {\n children: ReactNode;\n 'aria-label'?: string;\n 'aria-busy'?: boolean;\n};\n\nexport const TableHeader = forwardRef<HTMLTableSectionElement, TableHeaderProps>(\n ({ children, 'aria-label': ariaLabel, 'aria-busy': ariaBusy }, ref) => {\n return (\n <thead ref={ref} className={styles.header} aria-label={ariaLabel} aria-busy={ariaBusy}>\n {children}\n </thead>\n );\n },\n);\nTableHeader.displayName = 'Table.Header';\n\ntype SortDirection = 'ascending' | 'descending' | undefined;\ntype HorizontalAlignment = 'left' | 'center' | 'right';\n\ntype TableHeaderCellProps = {\n /**\n * Scope of the column\n * @default 'col'\n */\n scope?: HTMLTableCellElement['scope'];\n /**\n * Number of columns the cell should span\n */\n colSpan?: HTMLTableCellElement['colSpan'];\n /**\n * Width of the column\n */\n width?: CSSProperties['width'];\n /**\n * Current sort direction of the column\n */\n sortDirection?: SortDirection;\n /**\n * Horizontal alignment of the content\n * @default 'left'\n */\n align?: HorizontalAlignment;\n /**\n * Whether to truncate content with ellipsis when it overflows\n * @default false\n */\n truncate?: boolean;\n /**\n * Aria label for asceding/descending sort. Variables: {column} - column name\n * @default \"Sort by {column} ascending/descending\"\n */\n sortTranslations?: {\n sortAscending?: string;\n sortDescending?: string;\n };\n /**\n * Whether the column should have a minimum width\n * @default false\n */\n noShrink?: boolean;\n /**\n * Handler called when the sort direction changes\n * @param direction - The new sort direction\n */\n onSortChange?: (direction: SortDirection) => void;\n children: ReactNode;\n};\n\nexport const TableHeaderCell = forwardRef<HTMLTableCellElement, TableHeaderCellProps>(\n (\n {\n noShrink = false,\n truncate = false,\n align = 'left',\n scope = 'col',\n sortTranslations,\n sortDirection,\n colSpan,\n width,\n onSortChange,\n children,\n },\n ref,\n ) => {\n const cellRef = useRef<HTMLTableCellElement>(null);\n useSyncRefs<HTMLTableCellElement>(cellRef, ref);\n\n useTextTruncation(cellRef);\n\n const sortLabel = useMemo(() => {\n if (typeof children === 'string') {\n if (sortDirection === 'ascending') {\n return sortTranslations?.sortDescending ?? `Sort by ${children} descending`;\n }\n return sortTranslations?.sortAscending ?? `Sort by ${children} ascending`;\n }\n\n return sortDirection === 'ascending' ? 'Sort descending' : 'Sort ascending';\n }, [children, sortDirection, sortTranslations]);\n\n const handleSortChange = () => {\n if (!onSortChange) {\n return;\n }\n\n const newDirection: SortDirection =\n sortDirection === undefined || sortDirection === 'descending' ? 'ascending' : 'descending';\n\n onSortChange(newDirection);\n };\n\n return (\n <th\n ref={cellRef}\n style={{ width }}\n className={styles.headerCell}\n scope={scope}\n colSpan={colSpan}\n data-align={align}\n data-truncate={truncate}\n data-no-shrink={noShrink}\n data-sortable={!!onSortChange}\n aria-sort={onSortChange ? sortDirection || 'none' : undefined}\n >\n {onSortChange ? (\n <div className={styles.cellContent}>\n <button\n className={styles.sortButton}\n aria-label={sortLabel}\n data-active={!!sortDirection}\n onClick={handleSortChange}\n >\n {typeof children === 'string' && truncate ? (\n <span className={styles.buttonText}>{children}</span>\n ) : (\n children\n )}\n {sortDirection === 'ascending' ? (\n <IconArrowUp size=\"12\" />\n ) : sortDirection === 'descending' ? (\n <IconArrowDown size=\"12\" />\n ) : (\n <IconArrowBidirectional className={styles.sortIndicator} size=\"12\" />\n )}\n </button>\n </div>\n ) : (\n children\n )}\n </th>\n );\n },\n);\nTableHeaderCell.displayName = 'Table.HeaderCell';\n\ntype TableBodyProps = {\n children: ReactNode;\n 'aria-busy'?: boolean;\n};\n\nexport const TableBody = forwardRef<HTMLTableSectionElement, TableBodyProps>(\n ({ children, 'aria-busy': ariaBusy }, ref) => {\n return (\n <tbody ref={ref} className={styles.body} aria-busy={ariaBusy}>\n {children}\n </tbody>\n );\n },\n);\nTableBody.displayName = 'Table.Body';\n\ntype BaseTableRowProps = {\n /**\n * Whether the row is in a selected state\n * @default false\n */\n selected?: boolean;\n /**\n * Whether to disable interactions for this row\n * @default false\n */\n disabled?: boolean;\n /**\n * Content to be rendered within the row\n */\n children: ReactNode;\n /**\n * Accessible label for the row\n */\n 'aria-label'?: string;\n 'data-test-id'?: string;\n};\n\ntype ClickableTableRowProps = BaseTableRowProps & {\n /**\n * Handler called when the row is clicked or activated via keyboard\n * If provided, the row will be hoverable and interactive\n */\n onClick: (selected: boolean) => void;\n onNavigate?: never;\n href?: never;\n};\n\ntype NavigableTableRowProps = BaseTableRowProps & {\n onClick?: never;\n /**\n * Handler called when the row is clicked or activated via keyboard for navigation\n * Must be provided together with href\n */\n onNavigate: (href: string) => void;\n /**\n * URL associated with this row for navigation\n * Must be provided together with onNavigate\n */\n href: string;\n};\n\ntype NonInteractiveTableRowProps = BaseTableRowProps & {\n onClick?: never;\n onNavigate?: never;\n href?: never;\n};\n\ntype TableRowProps = ClickableTableRowProps | NavigableTableRowProps | NonInteractiveTableRowProps;\n\nexport const TableRow = forwardRef<HTMLTableRowElement, TableRowProps>(\n (\n { disabled = false, selected = false, onClick, children, 'aria-label': ariaLabel, 'data-test-id': dataTestId },\n ref,\n ) => {\n const isInteractive = onClick !== undefined && !disabled;\n\n const handleClick = () => {\n if (disabled) {\n return;\n }\n\n if (onClick) {\n onClick(selected);\n }\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLTableRowElement>) => {\n if (!isInteractive) {\n return;\n }\n\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleClick();\n }\n };\n\n return (\n <tr\n ref={ref}\n className={styles.row}\n tabIndex={0}\n role={isInteractive ? 'button' : 'row'}\n data-disabled={disabled}\n data-interactive={isInteractive}\n data-selected={selected}\n aria-disabled={disabled}\n aria-label={ariaLabel}\n aria-selected={selected}\n onClick={isInteractive ? handleClick : undefined}\n onKeyDown={isInteractive ? handleKeyDown : undefined}\n data-test-id={dataTestId}\n >\n {children}\n </tr>\n );\n },\n);\nTableRow.displayName = 'Table.Row';\n\ntype TableRowCellProps = {\n /**\n * Number of columns the cell should span\n */\n colSpan?: HTMLTableCellElement['colSpan'];\n /**\n * Whether to truncate content with ellipsis when it overflows\n * @default false\n */\n truncate?: boolean;\n /**\n * Horizontal alignment of the content\n * @default 'left'\n */\n align?: HorizontalAlignment;\n children: ReactNode;\n 'aria-label'?: string;\n};\n\nexport const TableRowCell = forwardRef<HTMLTableCellElement, TableRowCellProps>(\n ({ colSpan, truncate, align = 'left', children, 'aria-label': ariaLabel }, ref): ReactElement => {\n const cellRef = useRef<HTMLTableCellElement>(null);\n useSyncRefs<HTMLTableCellElement>(cellRef, ref);\n\n useTextTruncation(cellRef);\n\n return (\n <td\n ref={cellRef}\n className={styles.rowCell}\n colSpan={colSpan}\n data-align={align}\n data-truncate={truncate}\n aria-label={ariaLabel}\n >\n {children}\n </td>\n );\n },\n);\nTableRowCell.displayName = 'Table.RowCell';\n\nexport const Table = {\n Root: TableRoot,\n Caption: TableCaption,\n Header: TableHeader,\n HeaderCell: TableHeaderCell,\n Body: TableBody,\n Row: TableRow,\n RowCell: TableRowCell,\n};\n"],"names":["TableRoot","forwardRef","layout","sticky","children","props","ref","jsx","handleKeyDown","styles","TableCaption","TableHeader","ariaLabel","ariaBusy","TableHeaderCell","noShrink","truncate","align","scope","sortTranslations","sortDirection","colSpan","width","onSortChange","cellRef","useRef","useSyncRefs","useTextTruncation","sortLabel","useMemo","handleSortChange","jsxs","IconArrowUp","IconArrowDown","IconArrowBidirectional","TableBody","TableRow","disabled","selected","onClick","dataTestId","isInteractive","handleClick","event","TableRowCell","Table"],"mappings":";;;;;;;AAiCO,MAAMA,IAAYC;AAAA,EACrB,CAAC,EAAE,QAAAC,IAAS,QAAQ,QAAAC,GAAQ,UAAAC,GAAU,GAAGC,EAAM,GAAGC,MAE1C,gBAAAC,EAAC,SAAI,WAAWC,GAAe,MAAK,QAAO,UAAU,IACjD,UAAC,gBAAAD,EAAA,SAAA,EAAM,KAAAD,GAAU,WAAWG,EAAO,OAAO,eAAaP,GAAQ,eAAaC,GAAS,GAAGE,GACnF,UAAAD,EAAA,CACL,EACJ,CAAA;AAGZ;AACAJ,EAAU,cAAc;AAEjB,MAAMU,IAAeT,EAA6D,CAAC,EAAE,UAAAG,EAAA,GAAYE,wBAE/F,WAAQ,EAAA,KAAAA,GAAU,WAAWG,EAAO,SAChC,UAAAL,GACL,CAEP;AACDM,EAAa,cAAc;AAQpB,MAAMC,IAAcV;AAAA,EACvB,CAAC,EAAE,UAAAG,GAAU,cAAcQ,GAAW,aAAaC,KAAYP,MAEvD,gBAAAC,EAAC,SAAM,EAAA,KAAAD,GAAU,WAAWG,EAAO,QAAQ,cAAYG,GAAW,aAAWC,GACxE,UAAAT,EACL,CAAA;AAGZ;AACAO,EAAY,cAAc;AAsDnB,MAAMG,IAAkBb;AAAA,EAC3B,CACI;AAAA,IACI,UAAAc,IAAW;AAAA,IACX,UAAAC,IAAW;AAAA,IACX,OAAAC,IAAQ;AAAA,IACR,OAAAC,IAAQ;AAAA,I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C;AAAA,QAEb,UAAApC;AAAA,MAAA;AAAA,IACL;AAAA,EAAA;AAGZ;AACAgC,EAAS,cAAc;AAqBhB,MAAMQ,IAAe3C;AAAA,EACxB,CAAC,EAAE,SAAAoB,GAAS,UAAAL,GAAU,OAAAC,IAAQ,QAAQ,UAAAb,GAAU,cAAcQ,EAAU,GAAGN,MAAsB;AACvF,UAAAkB,IAAUC,EAA6B,IAAI;AACjD,WAAAC,EAAkCF,GAASlB,CAAG,GAE9CqB,EAAkBH,CAAO,GAGrB,gBAAAjB;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,KAAKiB;AAAA,QACL,WAAWf,EAAO;AAAA,QAClB,SAAAY;AAAA,QACA,cAAYJ;AAAA,QACZ,iBAAeD;AAAA,QACf,cAAYJ;AAAA,QAEX,UAAAR;AAAA,MAAA;AAAA,IACL;AAAA,EAAA;AAGZ;AACAwC,EAAa,cAAc;AAEpB,MAAMC,IAAQ;AAAA,EACjB,MAAM7C;AAAA,EACN,SAASU;AAAA,EACT,QAAQC;AAAA,EACR,YAAYG;AAAA,EACZ,MAAMqB;AAAA,EACN,KAAKC;AAAA,EACL,SAASQ;AACb;"}
|
|
@@ -2,11 +2,11 @@ import { jsx as a, jsxs as p } from "react/jsx-runtime";
|
|
|
2
2
|
import { createContext as x, forwardRef as i, useCallback as j, createElement as N, useContext as T, useRef as A, useEffect as D } from "react";
|
|
3
3
|
import { IconDotsHorizontal as E } from "@frontify/fondue-icons";
|
|
4
4
|
import * as d from "@radix-ui/react-tabs";
|
|
5
|
-
import { useControllableState as O } from "./fondue-
|
|
5
|
+
import { useControllableState as O } from "./fondue-components48.js";
|
|
6
6
|
import { Button as V } from "./fondue-components4.js";
|
|
7
7
|
import { Dropdown as l } from "./fondue-components9.js";
|
|
8
|
-
import { useTabTriggers as q } from "./fondue-
|
|
9
|
-
import r from "./fondue-
|
|
8
|
+
import { useTabTriggers as q } from "./fondue-components62.js";
|
|
9
|
+
import r from "./fondue-components63.js";
|
|
10
10
|
const b = x({
|
|
11
11
|
value: "",
|
|
12
12
|
disabled: !1
|
|
@@ -2,7 +2,7 @@ import { jsxs as g, jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { IconCheckMark as w, IconExclamationMarkTriangle as N } from "@frontify/fondue-icons";
|
|
3
3
|
import { forwardRef as n, useRef as S } from "react";
|
|
4
4
|
import { cn as m } from "./fondue-components27.js";
|
|
5
|
-
import r from "./fondue-
|
|
5
|
+
import r from "./fondue-components64.js";
|
|
6
6
|
const f = ({
|
|
7
7
|
children: c,
|
|
8
8
|
className: d,
|
|
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as g } from "react/jsx-runtime";
|
|
|
2
2
|
import * as o from "@radix-ui/react-tooltip";
|
|
3
3
|
import { forwardRef as n } from "react";
|
|
4
4
|
import { cn as T } from "./fondue-components27.js";
|
|
5
|
-
import d from "./fondue-
|
|
5
|
+
import d from "./fondue-components65.js";
|
|
6
6
|
const l = ({ children: t, enterDelay: r = 700, open: i, onOpenChange: e, ...s }) => /* @__PURE__ */ a(o.Provider, { children: /* @__PURE__ */ a(o.Root, { delayDuration: r, open: i, onOpenChange: e, ...s, children: t }) });
|
|
7
7
|
l.displayName = "Tooltip.Root";
|
|
8
8
|
const p = ({ asChild: t = !1, children: r, "data-test-id": i = "fondue-tooltip-trigger" }, e) => /* @__PURE__ */ a(o.Trigger, { "data-test-id": i, asChild: t, ref: e, children: r });
|