@frontify/fondue-components 19.1.0 → 19.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fondue-components10.js +23 -19
- package/dist/fondue-components10.js.map +1 -1
- package/dist/fondue-components11.js +2 -2
- package/dist/fondue-components12.js +1 -1
- package/dist/fondue-components13.js +34 -24
- package/dist/fondue-components13.js.map +1 -1
- package/dist/fondue-components14.js +1 -1
- package/dist/fondue-components15.js +1 -1
- package/dist/fondue-components17.js +1 -1
- package/dist/fondue-components18.js +1 -1
- package/dist/fondue-components19.js +1 -1
- package/dist/fondue-components20.js +1 -1
- package/dist/fondue-components21.js +2 -2
- package/dist/fondue-components22.js +6 -6
- package/dist/fondue-components23.js +1 -1
- package/dist/fondue-components24.js +1 -1
- package/dist/fondue-components25.js +3 -3
- package/dist/fondue-components26.js +3 -3
- package/dist/fondue-components27.js +1 -1
- package/dist/fondue-components28.js +31 -29
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components29.js +1 -1
- package/dist/fondue-components30.js +1 -1
- package/dist/fondue-components37.js +1 -1
- package/dist/fondue-components40.js +1 -1
- package/dist/fondue-components42.js +1 -1
- package/dist/fondue-components49.js +5 -60
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components50.js +59 -17
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +18 -19
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +18 -4
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +3 -13
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +13 -3
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +3 -17
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +19 -35
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +35 -5
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +4 -12
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +12 -4
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components60.js +4 -24
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +24 -16
- package/dist/fondue-components61.js.map +1 -1
- package/dist/fondue-components62.js +16 -146
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +151 -19
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +19 -77
- package/dist/fondue-components64.js.map +1 -1
- package/dist/fondue-components65.js +77 -8
- package/dist/fondue-components65.js.map +1 -1
- package/dist/fondue-components66.js +8 -35
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components67.js +34 -48
- package/dist/fondue-components67.js.map +1 -1
- package/dist/fondue-components68.js +70 -10
- package/dist/fondue-components68.js.map +1 -1
- package/dist/fondue-components69.js +8 -10
- package/dist/fondue-components69.js.map +1 -1
- package/dist/fondue-components70.js +12 -12
- package/dist/fondue-components70.js.map +1 -1
- package/dist/fondue-components71.js +12 -20
- package/dist/fondue-components71.js.map +1 -1
- package/dist/fondue-components72.js +21 -29
- package/dist/fondue-components72.js.map +1 -1
- package/dist/fondue-components73.js +28 -55
- package/dist/fondue-components73.js.map +1 -1
- package/dist/fondue-components74.js +55 -14
- package/dist/fondue-components74.js.map +1 -1
- package/dist/fondue-components75.js +14 -25
- package/dist/fondue-components75.js.map +1 -1
- package/dist/fondue-components76.js +24 -13
- package/dist/fondue-components76.js.map +1 -1
- package/dist/fondue-components77.js +14 -6
- package/dist/fondue-components77.js.map +1 -1
- package/dist/fondue-components78.js +6 -6
- package/dist/fondue-components79.js +7 -2
- package/dist/fondue-components79.js.map +1 -1
- package/dist/fondue-components82.js +2 -17
- package/dist/fondue-components82.js.map +1 -1
- package/dist/fondue-components83.js +16 -39
- package/dist/fondue-components83.js.map +1 -1
- package/dist/fondue-components84.js +43 -0
- package/dist/fondue-components84.js.map +1 -0
- package/dist/fondue-components9.js +77 -66
- package/dist/fondue-components9.js.map +1 -1
- package/dist/index.d.ts +16 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -1,41 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as p from "@radix-ui/react-separator";
|
|
3
3
|
import { forwardRef as f } from "react";
|
|
4
4
|
import { cn as l } from "./fondue-components36.js";
|
|
5
|
-
import
|
|
6
|
-
|
|
5
|
+
import v from "./fondue-components49.js";
|
|
6
|
+
import { dividerStyles as c } from "./fondue-components50.js";
|
|
7
|
+
const h = f(
|
|
7
8
|
({
|
|
8
|
-
"data-test-id":
|
|
9
|
-
direction:
|
|
10
|
-
className:
|
|
11
|
-
variant:
|
|
12
|
-
as:
|
|
13
|
-
decorative:
|
|
9
|
+
"data-test-id": i = "fondue-divider",
|
|
10
|
+
direction: r = "horizontal",
|
|
11
|
+
className: a,
|
|
12
|
+
variant: o,
|
|
13
|
+
as: e = "div",
|
|
14
|
+
decorative: d,
|
|
14
15
|
...m
|
|
15
16
|
}, s) => {
|
|
16
|
-
const n =
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
const n = e;
|
|
18
|
+
return /* @__PURE__ */ t(
|
|
18
19
|
p.Root,
|
|
19
20
|
{
|
|
20
21
|
ref: s,
|
|
21
22
|
className: l(
|
|
22
23
|
c({
|
|
23
|
-
direction:
|
|
24
|
-
variant:
|
|
24
|
+
direction: r,
|
|
25
|
+
variant: o,
|
|
25
26
|
...m
|
|
26
27
|
}),
|
|
27
|
-
|
|
28
|
+
v.root,
|
|
29
|
+
a
|
|
28
30
|
),
|
|
29
|
-
"data-
|
|
30
|
-
|
|
31
|
+
"data-variant": o,
|
|
32
|
+
"data-test-id": i,
|
|
33
|
+
decorative: d,
|
|
34
|
+
"data-orientation": r,
|
|
31
35
|
asChild: !0,
|
|
32
|
-
children: /* @__PURE__ */
|
|
36
|
+
children: /* @__PURE__ */ t(n, {})
|
|
33
37
|
}
|
|
34
38
|
);
|
|
35
39
|
}
|
|
36
40
|
);
|
|
37
|
-
|
|
41
|
+
h.displayName = "Divider";
|
|
38
42
|
export {
|
|
39
|
-
|
|
43
|
+
h as Divider
|
|
40
44
|
};
|
|
41
45
|
//# sourceMappingURL=fondue-components10.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components10.js","sources":["../src/components/Divider/Divider.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as Separator from '@radix-ui/react-separator';\nimport { forwardRef, type ForwardedRef, type ReactElement } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport { dividerStyles } from './styles/dividerStyles';\n\ntype DividerStyle = 'noline' | 'dashed' | 'solid';\ntype DividerPadding = 'none' | 'small' | 'medium' | 'large';\ntype DividerDirection = 'horizontal' | 'vertical';\ntype DividerColor = 'weak' | 'default' | 'strong' | 'x-strong';\n\nexport type DividerProps = {\n /**\n * The style of the divider\n * @default \"solid\"\n */\n variant?: DividerStyle;\n /**\n * The padding of the divider\n * @default \"medium\"\n */\n padding?: DividerPadding;\n /**\n * The color of the divider\n * @default \"default\"\n */\n color?: DividerColor;\n /**\n * The direction of the divider\n * @default \"horizontal\"\n */\n direction?: DividerDirection;\n /**\n * The html element to be used\n * @default \"div\"\n */\n as?: 'div' | 'li';\n /**\n * When `true`, signifies that it is purely visual, carries no semantic\n * meaning, and ensures it is not present in the accessibility tree.\n * @default false\n */\n decorative?: boolean;\n 'data-test-id'?: string;\n className?: string;\n};\n\nexport const Divider = forwardRef<HTMLDivElement, DividerProps>(\n (\n {\n 'data-test-id': dataTestId = 'fondue-divider',\n direction = 'horizontal',\n className,\n variant,\n as = 'div',\n decorative,\n ...props\n }: DividerProps,\n ref: ForwardedRef<HTMLDivElement | null>,\n ): ReactElement => {\n const Component = as;\n\n return (\n <Separator.Root\n ref={ref}\n className={cn(\n dividerStyles({\n direction,\n variant,\n ...props,\n }),\n className,\n )}\n data-test-id={dataTestId}\n decorative={decorative}\n asChild\n >\n <Component />\n </Separator.Root>\n );\n },\n);\n\nDivider.displayName = 'Divider';\n"],"names":["Divider","forwardRef","dataTestId","direction","className","variant","as","decorative","props","ref","Component","jsx","Separator","cn","dividerStyles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components10.js","sources":["../src/components/Divider/Divider.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as Separator from '@radix-ui/react-separator';\nimport { forwardRef, type ForwardedRef, type ReactElement } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport borderStyles from './styles/borderStyles.module.scss';\nimport { dividerStyles } from './styles/dividerStyles';\n\ntype DividerStyle = 'noline' | 'dashed' | 'solid';\ntype DividerPadding = 'none' | 'small' | 'medium' | 'large';\ntype DividerDirection = 'horizontal' | 'vertical';\ntype DividerColor = 'weak' | 'default' | 'strong' | 'x-strong';\n\nexport type DividerProps = {\n /**\n * The style of the divider\n * @default \"solid\"\n */\n variant?: DividerStyle;\n /**\n * The padding of the divider\n * @default \"medium\"\n */\n padding?: DividerPadding;\n /**\n * The color of the divider\n * @default \"default\"\n */\n color?: DividerColor;\n /**\n * The direction of the divider\n * @default \"horizontal\"\n */\n direction?: DividerDirection;\n /**\n * The html element to be used\n * @default \"div\"\n */\n as?: 'div' | 'li';\n /**\n * When `true`, signifies that it is purely visual, carries no semantic\n * meaning, and ensures it is not present in the accessibility tree.\n * @default false\n */\n decorative?: boolean;\n 'data-test-id'?: string;\n className?: string;\n};\n\nexport const Divider = forwardRef<HTMLDivElement, DividerProps>(\n (\n {\n 'data-test-id': dataTestId = 'fondue-divider',\n direction = 'horizontal',\n className,\n variant,\n as = 'div',\n decorative,\n ...props\n }: DividerProps,\n ref: ForwardedRef<HTMLDivElement | null>,\n ): ReactElement => {\n const Component = as;\n\n return (\n <Separator.Root\n ref={ref}\n className={cn(\n dividerStyles({\n direction,\n variant,\n ...props,\n }),\n borderStyles.root,\n className,\n )}\n data-variant={variant}\n data-test-id={dataTestId}\n decorative={decorative}\n data-orientation={direction}\n asChild\n >\n <Component />\n </Separator.Root>\n );\n },\n);\n\nDivider.displayName = 'Divider';\n"],"names":["Divider","forwardRef","dataTestId","direction","className","variant","as","decorative","props","ref","Component","jsx","Separator","cn","dividerStyles","borderStyles"],"mappings":";;;;;;AAmDO,MAAMA,IAAUC;AAAA,EACnB,CACI;AAAA,IACI,gBAAgBC,IAAa;AAAA,IAC7B,WAAAC,IAAY;AAAA,IACZ,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,IAAAC,IAAK;AAAA,IACL,YAAAC;AAAA,IACA,GAAGC;AAAA,KAEPC,MACe;AACf,UAAMC,IAAYJ;AAGd,WAAA,gBAAAK;AAAA,MAACC,EAAU;AAAA,MAAV;AAAA,QACG,KAAAH;AAAA,QACA,WAAWI;AAAA,UACPC,EAAc;AAAA,YACV,WAAAX;AAAA,YACA,SAAAE;AAAA,YACA,GAAGG;AAAA,UAAA,CACN;AAAA,UACDO,EAAa;AAAA,UACbX;AAAA,QACJ;AAAA,QACA,gBAAcC;AAAA,QACd,gBAAcH;AAAA,QACd,YAAAK;AAAA,QACA,oBAAkBJ;AAAA,QAClB,SAAO;AAAA,QAEP,4BAACO,GAAU,CAAA,CAAA;AAAA,MAAA;AAAA,IACf;AAAA,EAAA;AAGZ;AAEAV,EAAQ,cAAc;"}
|
|
@@ -3,8 +3,8 @@ import { IconCaretRight as M } from "@frontify/fondue-icons";
|
|
|
3
3
|
import * as d from "@radix-ui/react-dropdown-menu";
|
|
4
4
|
import { forwardRef as i, useMemo as G, Children as A, useRef as v } from "react";
|
|
5
5
|
import { useFondueTheme as D, ThemeProvider as b } from "./fondue-components29.js";
|
|
6
|
-
import { useProcessedChildren as h } from "./fondue-
|
|
7
|
-
import s from "./fondue-
|
|
6
|
+
import { useProcessedChildren as h } from "./fondue-components51.js";
|
|
7
|
+
import s from "./fondue-components52.js";
|
|
8
8
|
const N = ({
|
|
9
9
|
children: o,
|
|
10
10
|
open: t,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as n } from "react";
|
|
3
3
|
import { propsToCssVariables as y } from "./fondue-components34.js";
|
|
4
|
-
import x from "./fondue-
|
|
4
|
+
import x from "./fondue-components53.js";
|
|
5
5
|
const u = n(
|
|
6
6
|
({
|
|
7
7
|
as: a = "div",
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as a, jsxs as u } from "react/jsx-runtime";
|
|
2
|
-
import { IconCross as
|
|
3
|
-
import * as
|
|
4
|
-
import { forwardRef as
|
|
2
|
+
import { IconCross as R } from "@frontify/fondue-icons";
|
|
3
|
+
import * as l from "@radix-ui/react-popover";
|
|
4
|
+
import { forwardRef as i } from "react";
|
|
5
5
|
import { addAutoFocusAttribute as w, addShowFocusRing as x } from "./fondue-components47.js";
|
|
6
6
|
import { useFondueTheme as A, ThemeProvider as T } from "./fondue-components29.js";
|
|
7
|
-
import s from "./fondue-
|
|
8
|
-
const n = ({ children: t, ...o }) => /* @__PURE__ */ a(
|
|
7
|
+
import s from "./fondue-components54.js";
|
|
8
|
+
const n = ({ children: t, ...o }) => /* @__PURE__ */ a(l.Root, { ...o, children: t });
|
|
9
9
|
n.displayName = "Flyout.Root";
|
|
10
|
-
const c = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-trigger", ...d },
|
|
11
|
-
|
|
10
|
+
const c = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-trigger", ...d }, r) => /* @__PURE__ */ a(
|
|
11
|
+
l.Trigger,
|
|
12
12
|
{
|
|
13
13
|
onMouseDown: w,
|
|
14
14
|
"data-auto-focus-visible": "true",
|
|
15
15
|
"data-auto-focus-trigger": !0,
|
|
16
16
|
"data-test-id": e,
|
|
17
17
|
asChild: t,
|
|
18
|
-
ref:
|
|
18
|
+
ref: r,
|
|
19
19
|
...d,
|
|
20
20
|
children: o
|
|
21
21
|
}
|
|
@@ -33,25 +33,25 @@ const I = {
|
|
|
33
33
|
maxWidth: o = "360px",
|
|
34
34
|
padding: e = "compact",
|
|
35
35
|
rounded: d = "medium",
|
|
36
|
-
width:
|
|
36
|
+
width: r = "fit-content",
|
|
37
37
|
shadow: F = "medium",
|
|
38
38
|
triggerOffset: g = "compact",
|
|
39
39
|
viewportCollisionPadding: N = "compact",
|
|
40
40
|
"data-test-id": h = "fondue-flyout-content",
|
|
41
41
|
children: v,
|
|
42
|
-
...
|
|
43
|
-
},
|
|
44
|
-
const
|
|
45
|
-
return /* @__PURE__ */ a(
|
|
42
|
+
...C
|
|
43
|
+
}, P) => {
|
|
44
|
+
const b = A();
|
|
45
|
+
return /* @__PURE__ */ a(l.Portal, { children: /* @__PURE__ */ u(T, { theme: b, children: [
|
|
46
46
|
/* @__PURE__ */ a("div", { "data-test-id": "fondue-flyout-overlay", className: s.overlay }),
|
|
47
47
|
/* @__PURE__ */ a(
|
|
48
|
-
|
|
48
|
+
l.Content,
|
|
49
49
|
{
|
|
50
50
|
style: {
|
|
51
51
|
"--flyout-max-width": o,
|
|
52
|
-
"--flyout-width":
|
|
52
|
+
"--flyout-width": r
|
|
53
53
|
},
|
|
54
|
-
ref:
|
|
54
|
+
ref: P,
|
|
55
55
|
align: t,
|
|
56
56
|
collisionPadding: O[N],
|
|
57
57
|
sideOffset: I[g],
|
|
@@ -61,16 +61,26 @@ const I = {
|
|
|
61
61
|
"data-shadow": F,
|
|
62
62
|
"data-test-id": h,
|
|
63
63
|
onFocus: x,
|
|
64
|
-
...
|
|
64
|
+
...C,
|
|
65
65
|
children: v
|
|
66
66
|
}
|
|
67
67
|
)
|
|
68
68
|
] }) });
|
|
69
69
|
};
|
|
70
70
|
m.displayName = "Flyout.Content";
|
|
71
|
-
const y = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header" },
|
|
71
|
+
const y = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header", closeProps: d }, r) => /* @__PURE__ */ u("div", { "data-test-id": e, ref: r, className: s.header, children: [
|
|
72
72
|
/* @__PURE__ */ a("div", { children: o }),
|
|
73
|
-
t && /* @__PURE__ */ a(
|
|
73
|
+
t && /* @__PURE__ */ a(
|
|
74
|
+
l.Close,
|
|
75
|
+
{
|
|
76
|
+
role: "button",
|
|
77
|
+
"data-test-id": `${e}-close`,
|
|
78
|
+
className: s.close,
|
|
79
|
+
"aria-label": "Close",
|
|
80
|
+
...d,
|
|
81
|
+
children: /* @__PURE__ */ a(R, { size: 20 })
|
|
82
|
+
}
|
|
83
|
+
)
|
|
74
84
|
] });
|
|
75
85
|
y.displayName = "Flyout.Header";
|
|
76
86
|
const f = ({ children: t, "data-test-id": o = "fondue-flyout-footer" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: s.footer, children: t });
|
|
@@ -89,11 +99,11 @@ const p = ({ children: t, "data-test-id": o = "fondue-flyout-body", scrollable:
|
|
|
89
99
|
p.displayName = "Flyout.Body";
|
|
90
100
|
const j = {
|
|
91
101
|
Root: n,
|
|
92
|
-
Trigger:
|
|
93
|
-
Content:
|
|
94
|
-
Header:
|
|
95
|
-
Footer:
|
|
96
|
-
Body:
|
|
102
|
+
Trigger: i(c),
|
|
103
|
+
Content: i(m),
|
|
104
|
+
Header: i(y),
|
|
105
|
+
Footer: i(f),
|
|
106
|
+
Body: i(p)
|
|
97
107
|
};
|
|
98
108
|
export {
|
|
99
109
|
j as Flyout,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components13.js","sources":["../src/components/Flyout/Flyout.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { forwardRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport styles from './styles/flyout.module.scss';\n\nexport type FlyoutRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the flyout\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport type FlyoutTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const FlyoutTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-flyout-trigger', ...props }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.Trigger\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild={asChild}\n ref={ref}\n {...props}\n >\n {children}\n </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\ntype FlyoutSpacing = 'compact' | 'comfortable' | 'spacious';\ntype FlyoutViewportCollisionPadding = 'compact' | 'spacious';\nexport type FlyoutContentProps = {\n /**\n * Add a shadow to the flyout\n * @default \"medium\"\n */\n shadow?: 'none' | 'medium' | 'large';\n /**\n * Add rounded corners to the flyout\n * @default \"medium\"\n */\n rounded?: 'none' | 'medium' | 'large';\n /**\n * Define the prefered side of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Define the prefered alignment of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Define the padding of the flyout\n * @default \"compact\"\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Define the fixed width of the flyout\n * @default \"fit-content\"\n */\n width?: string;\n /**\n * Defines the spacing between the dropdown and its trigger.\n * @default 'compact'\n */\n triggerOffset?: FlyoutSpacing;\n /**\n * Define the maximum width of the flyout\n * @default \"360px\"\n */\n maxWidth?: string;\n /**\n * Define the minimum distance between the flyout and the viewport edge\n * @default 'compact'\n */\n viewportCollisionPadding?: FlyoutViewportCollisionPadding;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nconst SPACING_MAP: Record<FlyoutSpacing, number> = {\n compact: 8,\n comfortable: 12,\n spacious: 16,\n};\n\nconst VIEWPORT_COLLISION_PADDING_MAP: Record<FlyoutViewportCollisionPadding, number> = {\n compact: 8,\n spacious: 24,\n};\n\nexport const FlyoutContent = (\n {\n align = 'start',\n maxWidth = '360px',\n padding = 'compact',\n rounded = 'medium',\n width = 'fit-content',\n shadow = 'medium',\n triggerOffset = 'compact',\n viewportCollisionPadding = 'compact',\n 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n return (\n <RadixPopover.Portal>\n <ThemeProvider theme={theme}>\n <div data-test-id=\"fondue-flyout-overlay\" className={styles.overlay} />\n <RadixPopover.Content\n style={\n {\n '--flyout-max-width': maxWidth,\n '--flyout-width': width,\n } as CSSProperties\n }\n ref={ref}\n align={align}\n collisionPadding={VIEWPORT_COLLISION_PADDING_MAP[viewportCollisionPadding]}\n sideOffset={SPACING_MAP[triggerOffset]}\n className={styles.root}\n data-flyout-spacing={padding}\n data-rounded={rounded}\n data-shadow={shadow}\n data-test-id={dataTestId}\n onFocus={addShowFocusRing}\n {...props}\n >\n {children}\n </RadixPopover.Content>\n </ThemeProvider>\n </RadixPopover.Portal>\n );\n};\nFlyoutContent.displayName = 'Flyout.Content';\n\nexport type FlyoutHeaderProps = {\n /**\n * Show a close button in the header\n * @default false\n */\n showCloseButton?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const FlyoutHeader = (\n { showCloseButton, children, 'data-test-id': dataTestId = 'fondue-flyout-header' }: FlyoutHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.header}>\n <div>{children}</div>\n {showCloseButton && (\n <RadixPopover.Close role=\"button\" data-test-id={`${dataTestId}-close`} className={styles.close}>\n <IconCross size={20} />\n </RadixPopover.Close>\n )}\n </div>\n );\n};\nFlyoutHeader.displayName = 'Flyout.Header';\n\nexport type FlyoutFooterProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const FlyoutFooter = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-footer' }: FlyoutFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.footer}>\n {children}\n </div>\n );\n};\nFlyoutFooter.displayName = 'Flyout.Footer';\n\nexport type FlyoutBodyProps = {\n children?: ReactNode;\n 'data-test-id'?: string;\n /**\n * Allow the body to scroll if the max height of the flyout is reached\n * @default false\n */\n scrollable?: boolean;\n};\n\nexport const FlyoutBody = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-body', scrollable = false }: FlyoutBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n data-flyout-spacing=\"compact\"\n data-scrollable={scrollable}\n className={styles.body}\n >\n {children}\n </div>\n );\n};\nFlyoutBody.displayName = 'Flyout.Body';\n\nexport const Flyout = {\n Root: FlyoutRoot,\n Trigger: forwardRef<HTMLButtonElement, FlyoutTriggerProps>(FlyoutTrigger),\n Content: forwardRef<HTMLDivElement, FlyoutContentProps>(FlyoutContent),\n Header: forwardRef<HTMLDivElement, FlyoutHeaderProps>(FlyoutHeader),\n Footer: forwardRef<HTMLDivElement, FlyoutFooterProps>(FlyoutFooter),\n Body: forwardRef<HTMLDivElement, FlyoutBodyProps>(FlyoutBody),\n};\n"],"names":["FlyoutRoot","children","props","RadixPopover","FlyoutTrigger","asChild","dataTestId","ref","jsx","addAutoFocusAttribute","SPACING_MAP","VIEWPORT_COLLISION_PADDING_MAP","FlyoutContent","align","maxWidth","padding","rounded","width","shadow","triggerOffset","viewportCollisionPadding","theme","useFondueTheme","jsxs","ThemeProvider","styles","addShowFocusRing","FlyoutHeader","showCloseButton","IconCross","FlyoutFooter","FlyoutBody","scrollable","Flyout","forwardRef"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"fondue-components13.js","sources":["../src/components/Flyout/Flyout.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { forwardRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport styles from './styles/flyout.module.scss';\n\nexport type FlyoutRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the flyout\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport type FlyoutTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const FlyoutTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-flyout-trigger', ...props }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.Trigger\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild={asChild}\n ref={ref}\n {...props}\n >\n {children}\n </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\ntype FlyoutSpacing = 'compact' | 'comfortable' | 'spacious';\ntype FlyoutViewportCollisionPadding = 'compact' | 'spacious';\nexport type FlyoutContentProps = {\n /**\n * Add a shadow to the flyout\n * @default \"medium\"\n */\n shadow?: 'none' | 'medium' | 'large';\n /**\n * Add rounded corners to the flyout\n * @default \"medium\"\n */\n rounded?: 'none' | 'medium' | 'large';\n /**\n * Define the prefered side of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Define the prefered alignment of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Define the padding of the flyout\n * @default \"compact\"\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Define the fixed width of the flyout\n * @default \"fit-content\"\n */\n width?: string;\n /**\n * Defines the spacing between the dropdown and its trigger.\n * @default 'compact'\n */\n triggerOffset?: FlyoutSpacing;\n /**\n * Define the maximum width of the flyout\n * @default \"360px\"\n */\n maxWidth?: string;\n /**\n * Define the minimum distance between the flyout and the viewport edge\n * @default 'compact'\n */\n viewportCollisionPadding?: FlyoutViewportCollisionPadding;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nconst SPACING_MAP: Record<FlyoutSpacing, number> = {\n compact: 8,\n comfortable: 12,\n spacious: 16,\n};\n\nconst VIEWPORT_COLLISION_PADDING_MAP: Record<FlyoutViewportCollisionPadding, number> = {\n compact: 8,\n spacious: 24,\n};\n\nexport const FlyoutContent = (\n {\n align = 'start',\n maxWidth = '360px',\n padding = 'compact',\n rounded = 'medium',\n width = 'fit-content',\n shadow = 'medium',\n triggerOffset = 'compact',\n viewportCollisionPadding = 'compact',\n 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n return (\n <RadixPopover.Portal>\n <ThemeProvider theme={theme}>\n <div data-test-id=\"fondue-flyout-overlay\" className={styles.overlay} />\n <RadixPopover.Content\n style={\n {\n '--flyout-max-width': maxWidth,\n '--flyout-width': width,\n } as CSSProperties\n }\n ref={ref}\n align={align}\n collisionPadding={VIEWPORT_COLLISION_PADDING_MAP[viewportCollisionPadding]}\n sideOffset={SPACING_MAP[triggerOffset]}\n className={styles.root}\n data-flyout-spacing={padding}\n data-rounded={rounded}\n data-shadow={shadow}\n data-test-id={dataTestId}\n onFocus={addShowFocusRing}\n {...props}\n >\n {children}\n </RadixPopover.Content>\n </ThemeProvider>\n </RadixPopover.Portal>\n );\n};\nFlyoutContent.displayName = 'Flyout.Content';\n\nexport type FlyoutHeaderProps = {\n /**\n * Show a close button in the header\n * @default false\n */\n showCloseButton?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n closeProps?: CommonAriaProps;\n};\n\nexport const FlyoutHeader = (\n { showCloseButton, children, 'data-test-id': dataTestId = 'fondue-flyout-header', closeProps }: FlyoutHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.header}>\n <div>{children}</div>\n {showCloseButton && (\n <RadixPopover.Close\n role=\"button\"\n data-test-id={`${dataTestId}-close`}\n className={styles.close}\n aria-label=\"Close\"\n {...closeProps}\n >\n <IconCross size={20} />\n </RadixPopover.Close>\n )}\n </div>\n );\n};\nFlyoutHeader.displayName = 'Flyout.Header';\n\nexport type FlyoutFooterProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const FlyoutFooter = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-footer' }: FlyoutFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.footer}>\n {children}\n </div>\n );\n};\nFlyoutFooter.displayName = 'Flyout.Footer';\n\nexport type FlyoutBodyProps = {\n children?: ReactNode;\n 'data-test-id'?: string;\n /**\n * Allow the body to scroll if the max height of the flyout is reached\n * @default false\n */\n scrollable?: boolean;\n};\n\nexport const FlyoutBody = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-body', scrollable = false }: FlyoutBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n data-flyout-spacing=\"compact\"\n data-scrollable={scrollable}\n className={styles.body}\n >\n {children}\n </div>\n );\n};\nFlyoutBody.displayName = 'Flyout.Body';\n\nexport const Flyout = {\n Root: FlyoutRoot,\n Trigger: forwardRef<HTMLButtonElement, FlyoutTriggerProps>(FlyoutTrigger),\n Content: forwardRef<HTMLDivElement, FlyoutContentProps>(FlyoutContent),\n Header: forwardRef<HTMLDivElement, FlyoutHeaderProps>(FlyoutHeader),\n Footer: forwardRef<HTMLDivElement, FlyoutFooterProps>(FlyoutFooter),\n Body: forwardRef<HTMLDivElement, FlyoutBodyProps>(FlyoutBody),\n};\n"],"names":["FlyoutRoot","children","props","RadixPopover","FlyoutTrigger","asChild","dataTestId","ref","jsx","addAutoFocusAttribute","SPACING_MAP","VIEWPORT_COLLISION_PADDING_MAP","FlyoutContent","align","maxWidth","padding","rounded","width","shadow","triggerOffset","viewportCollisionPadding","theme","useFondueTheme","jsxs","ThemeProvider","styles","addShowFocusRing","FlyoutHeader","showCloseButton","closeProps","IconCross","FlyoutFooter","FlyoutBody","scrollable","Flyout","forwardRef"],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as y } from "react";
|
|
3
3
|
import { propsToCssVariables as n } from "./fondue-components34.js";
|
|
4
|
-
import u from "./fondue-
|
|
4
|
+
import u from "./fondue-components55.js";
|
|
5
5
|
const c = y(
|
|
6
6
|
({
|
|
7
7
|
as: a = "div",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as y } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as g } from "react";
|
|
3
3
|
import { cn as x } from "./fondue-components36.js";
|
|
4
|
-
import a from "./fondue-
|
|
4
|
+
import a from "./fondue-components56.js";
|
|
5
5
|
const $ = g(
|
|
6
6
|
({
|
|
7
7
|
as: e = "span",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import * as t from "@radix-ui/react-progress";
|
|
3
3
|
import { forwardRef as m } from "react";
|
|
4
|
-
import { loadingBarContainerStyles as g, loadingBarStyles as f } from "./fondue-
|
|
4
|
+
import { loadingBarContainerStyles as g, loadingBarStyles as f } from "./fondue-components57.js";
|
|
5
5
|
const p = m(
|
|
6
6
|
({
|
|
7
7
|
value: a,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as b, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "@radix-ui/react-scroll-area";
|
|
3
3
|
import { forwardRef as h } from "react";
|
|
4
|
-
import o from "./fondue-
|
|
4
|
+
import o from "./fondue-components59.js";
|
|
5
5
|
const p = ({
|
|
6
6
|
type: t = "hover",
|
|
7
7
|
maxHeight: e = "100%",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as m } from "react";
|
|
3
3
|
import { propsToCssVariables as c } from "./fondue-components34.js";
|
|
4
|
-
import f from "./fondue-
|
|
4
|
+
import f from "./fondue-components60.js";
|
|
5
5
|
const y = m(
|
|
6
6
|
({
|
|
7
7
|
"data-test-id": a = "fondue-section",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as n from "@radix-ui/react-toggle-group";
|
|
3
3
|
import { forwardRef as i } from "react";
|
|
4
|
-
import { useControllableState as N } from "./fondue-
|
|
5
|
-
import e from "./fondue-
|
|
4
|
+
import { useControllableState as N } from "./fondue-components61.js";
|
|
5
|
+
import e from "./fondue-components62.js";
|
|
6
6
|
const d = ({
|
|
7
7
|
children: a,
|
|
8
8
|
value: o,
|
|
@@ -4,12 +4,12 @@ import * as g from "@radix-ui/react-popover";
|
|
|
4
4
|
import { Slot as q } from "@radix-ui/react-slot";
|
|
5
5
|
import { useSelect as J } from "downshift";
|
|
6
6
|
import { forwardRef as K, useRef as L, useState as Q } from "react";
|
|
7
|
-
import { ForwardedRefCombobox as U } from "./fondue-
|
|
8
|
-
import { ForwardedRefSelectItem as W, ForwardedRefSelectItemGroup as X } from "./fondue-
|
|
9
|
-
import { SelectMenu as Y } from "./fondue-
|
|
10
|
-
import { ForwardedRefSelectSlot as Z } from "./fondue-
|
|
11
|
-
import o from "./fondue-
|
|
12
|
-
import { useSelectData as _ } from "./fondue-
|
|
7
|
+
import { ForwardedRefCombobox as U } from "./fondue-components63.js";
|
|
8
|
+
import { ForwardedRefSelectItem as W, ForwardedRefSelectItemGroup as X } from "./fondue-components64.js";
|
|
9
|
+
import { SelectMenu as Y } from "./fondue-components65.js";
|
|
10
|
+
import { ForwardedRefSelectSlot as Z } from "./fondue-components66.js";
|
|
11
|
+
import o from "./fondue-components67.js";
|
|
12
|
+
import { useSelectData as _ } from "./fondue-components68.js";
|
|
13
13
|
const S = ({
|
|
14
14
|
children: h,
|
|
15
15
|
onSelect: s,
|
|
@@ -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-components69.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-components36.js";
|
|
5
|
-
import t from "./fondue-
|
|
5
|
+
import t from "./fondue-components70.js";
|
|
6
6
|
const n = ({
|
|
7
7
|
value: a,
|
|
8
8
|
defaultValue: i,
|
|
@@ -2,11 +2,11 @@ import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
|
2
2
|
import { IconArrowUp as A, IconArrowDown as K, IconArrowBidirectional as E } from "@frontify/fondue-icons";
|
|
3
3
|
import { forwardRef as b, useRef as w, useMemo as h } from "react";
|
|
4
4
|
import { useSyncRefs as g } from "./fondue-components46.js";
|
|
5
|
-
import { useTextTruncation as N } from "./fondue-
|
|
5
|
+
import { useTextTruncation as N } from "./fondue-components71.js";
|
|
6
6
|
import { Box as j } from "./fondue-components5.js";
|
|
7
7
|
import { LoadingCircle as L } from "./fondue-components18.js";
|
|
8
|
-
import o from "./fondue-
|
|
9
|
-
import { handleKeyDown as S, isEventFromInteractiveElement as $ } from "./fondue-
|
|
8
|
+
import o from "./fondue-components72.js";
|
|
9
|
+
import { handleKeyDown as S, isEventFromInteractiveElement as $ } from "./fondue-components73.js";
|
|
10
10
|
const R = b(
|
|
11
11
|
({ layout: a = "auto", fontSize: e = "medium", sticky: d, children: s, ...n }, l) => /* @__PURE__ */ t("div", { onKeyDown: S, role: "grid", tabIndex: -1, children: /* @__PURE__ */ t(
|
|
12
12
|
"table",
|
|
@@ -2,11 +2,11 @@ import { jsx as t, jsxs as b } from "react/jsx-runtime";
|
|
|
2
2
|
import { createContext as y, forwardRef as l, useContext as f, useRef as x, useEffect as D, useCallback as O, createElement as w } from "react";
|
|
3
3
|
import { IconDotsHorizontal as V } from "@frontify/fondue-icons";
|
|
4
4
|
import * as c from "@radix-ui/react-tabs";
|
|
5
|
-
import { useControllableState as q } from "./fondue-
|
|
5
|
+
import { useControllableState as q } from "./fondue-components61.js";
|
|
6
6
|
import { Button as B } from "./fondue-components6.js";
|
|
7
7
|
import { Dropdown as d } from "./fondue-components11.js";
|
|
8
|
-
import { useTabTriggers as H } from "./fondue-
|
|
9
|
-
import r from "./fondue-
|
|
8
|
+
import { useTabTriggers as H } from "./fondue-components74.js";
|
|
9
|
+
import r from "./fondue-components75.js";
|
|
10
10
|
const T = y({
|
|
11
11
|
value: "",
|
|
12
12
|
disabled: !1
|
|
@@ -1,66 +1,68 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { IconCheckMark as
|
|
3
|
-
import { forwardRef as n, useRef as
|
|
1
|
+
import { jsxs as w, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { IconCheckMark as N, IconExclamationMarkTriangle as S } from "@frontify/fondue-icons";
|
|
3
|
+
import { forwardRef as n, useRef as T } from "react";
|
|
4
4
|
import { cn as m } from "./fondue-components36.js";
|
|
5
|
-
import
|
|
5
|
+
import t from "./fondue-components77.js";
|
|
6
6
|
const f = ({
|
|
7
7
|
children: c,
|
|
8
|
-
className:
|
|
8
|
+
className: i,
|
|
9
9
|
status: e = "neutral",
|
|
10
|
-
"data-test-id":
|
|
11
|
-
|
|
10
|
+
"data-test-id": r = "fondue-text-input",
|
|
11
|
+
"aria-errormessage": g,
|
|
12
|
+
...a
|
|
12
13
|
}, R) => {
|
|
13
|
-
const
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
e === "loading" ? /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
14
|
+
const d = T(!1);
|
|
15
|
+
return /* @__PURE__ */ w("div", { className: m(t.root, i), "data-status": e, "data-test-id": r, children: [
|
|
16
|
+
e === "loading" ? /* @__PURE__ */ l("div", { className: t.loadingStatus, "data-test-id": `${r}-loader` }) : null,
|
|
17
|
+
/* @__PURE__ */ l(
|
|
17
18
|
"input",
|
|
18
19
|
{
|
|
19
20
|
onMouseDown: (o) => {
|
|
20
|
-
|
|
21
|
+
d.current = !0, o.currentTarget.dataset.showFocusRing = "false";
|
|
21
22
|
},
|
|
22
23
|
type: "text",
|
|
23
|
-
...
|
|
24
|
+
...a,
|
|
24
25
|
onFocus: (o) => {
|
|
25
|
-
var
|
|
26
|
-
|
|
26
|
+
var s;
|
|
27
|
+
d.current || (o.target.dataset.showFocusRing = "true"), (s = a.onFocus) == null || s.call(a, o);
|
|
27
28
|
},
|
|
28
29
|
onBlur: (o) => {
|
|
29
|
-
var
|
|
30
|
-
o.target.dataset.showFocusRing = "false",
|
|
30
|
+
var s;
|
|
31
|
+
o.target.dataset.showFocusRing = "false", d.current = !1, (s = a.onBlur) == null || s.call(a, o);
|
|
31
32
|
},
|
|
32
33
|
ref: R,
|
|
33
|
-
className:
|
|
34
|
-
"aria-invalid": e === "error"
|
|
34
|
+
className: t.input,
|
|
35
|
+
"aria-invalid": e === "error",
|
|
36
|
+
"aria-errormessage": e === "error" ? g : void 0
|
|
35
37
|
}
|
|
36
38
|
),
|
|
37
|
-
e === "success" ? /* @__PURE__ */
|
|
38
|
-
e === "error" ? /* @__PURE__ */
|
|
39
|
-
|
|
39
|
+
e === "success" ? /* @__PURE__ */ l(N, { size: 16, className: t.iconSuccess, "data-test-id": `${r}-success-icon` }) : null,
|
|
40
|
+
e === "error" ? /* @__PURE__ */ l(
|
|
41
|
+
S,
|
|
40
42
|
{
|
|
41
43
|
size: 16,
|
|
42
|
-
className:
|
|
43
|
-
"data-test-id": `${
|
|
44
|
+
className: t.iconError,
|
|
45
|
+
"data-test-id": `${r}-error-icon`
|
|
44
46
|
}
|
|
45
47
|
) : null,
|
|
46
48
|
c
|
|
47
49
|
] });
|
|
48
50
|
};
|
|
49
51
|
f.displayName = "TextField.Root";
|
|
50
|
-
const u = ({ name: c, className:
|
|
52
|
+
const u = ({ name: c, className: i, ...e }, r) => /* @__PURE__ */ l(
|
|
51
53
|
"div",
|
|
52
54
|
{
|
|
53
55
|
"data-slot": !0,
|
|
54
56
|
"data-name": c,
|
|
55
57
|
...e,
|
|
56
|
-
ref:
|
|
57
|
-
className: m(
|
|
58
|
+
ref: r,
|
|
59
|
+
className: m(t.slot, i)
|
|
58
60
|
}
|
|
59
61
|
);
|
|
60
62
|
u.displayName = "TextField.Slot";
|
|
61
|
-
const x = n(f),
|
|
63
|
+
const x = n(f), h = n(u), F = x;
|
|
62
64
|
F.Root = x;
|
|
63
|
-
F.Slot =
|
|
65
|
+
F.Slot = h;
|
|
64
66
|
export {
|
|
65
67
|
f as TextFieldRoot,
|
|
66
68
|
u as TextFieldSlot,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components28.js","sources":["../src/components/TextInput/TextInput.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCheckMark, IconExclamationMarkTriangle } from '@frontify/fondue-icons';\nimport {\n type FocusEvent,\n forwardRef,\n useRef,\n type ChangeEvent,\n type ForwardedRef,\n type KeyboardEvent,\n type ReactNode,\n type SyntheticEvent,\n} from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport styles from './styles/text.module.scss';\n\nexport type TextInputProps = {\n id?: string;\n name?: string;\n /**\n * The place where the input slots are placed\n */\n children?: ReactNode;\n /**\n * The default value of the text input\n * Used for uncontrolled components\n */\n defaultValue?: string | number;\n /**\n * The controlled value of the text input\n */\n value?: string | number;\n /**\n * Type of the text input\n * @default \"text\"\n */\n type?: 'date' | 'email' | 'hidden' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'url';\n /**\n * The placeholder in the text input\n */\n placeholder?: string;\n /**\n * Disable the text input\n * @default false\n */\n disabled?: boolean;\n /**\n * Make the text input required in form\n * @default false\n */\n required?: boolean;\n /**\n * Make the text input spell-checkable\n * @default true\n */\n spellCheck?: boolean;\n /**\n * Make the text input read-only\n * @default false\n */\n readOnly?: boolean;\n /**\n * Set the type of input so autocomplete can help the user\n * @default \"on\"\n */\n autoComplete?: string;\n /**\n * The maximum length of the text input\n */\n maxLength?: number;\n /**\n * Status of the text input\n * @default \"neutral\"\n */\n status?: 'neutral' | 'success' | 'error' | 'loading';\n className?: string;\n /**\n * Event handler called when the text input value changes\n */\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when the text input is blurred\n */\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when the text input is focused\n */\n onFocus?: (event: FocusEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when a key is pressed\n */\n onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when a key is released\n */\n onKeyUp?: (event: KeyboardEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when the text inside of text input is selected\n */\n onSelect?: (event: SyntheticEvent<HTMLInputElement>) => void;\n 'data-test-id'?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n};\n\nexport const TextFieldRoot = (\n {\n children,\n className,\n status = 'neutral',\n 'data-test-id': dataTestId = 'fondue-text-input',\n ...inputProps\n }: TextInputProps,\n ref: ForwardedRef<HTMLInputElement>,\n) => {\n const wasClicked = useRef(false);\n\n return (\n <div className={cn(styles.root, className)} data-status={status} data-test-id={dataTestId}>\n {status === 'loading' ? (\n <div className={styles.loadingStatus} data-test-id={`${dataTestId}-loader`} />\n ) : null}\n <input\n onMouseDown={(mouseEvent) => {\n wasClicked.current = true;\n mouseEvent.currentTarget.dataset.showFocusRing = 'false';\n }}\n type=\"text\"\n {...inputProps}\n onFocus={(focusEvent) => {\n if (!wasClicked.current) {\n focusEvent.target.dataset.showFocusRing = 'true';\n }\n inputProps.onFocus?.(focusEvent);\n }}\n onBlur={(blurEvent) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasClicked.current = false;\n inputProps.onBlur?.(blurEvent);\n }}\n ref={ref}\n className={styles.input}\n aria-invalid={status === 'error'}\n />\n\n {status === 'success' ? (\n <IconCheckMark size={16} className={styles.iconSuccess} data-test-id={`${dataTestId}-success-icon`} />\n ) : null}\n\n {status === 'error' ? (\n <IconExclamationMarkTriangle\n size={16}\n className={styles.iconError}\n data-test-id={`${dataTestId}-error-icon`}\n />\n ) : null}\n\n {children}\n </div>\n );\n};\nTextFieldRoot.displayName = 'TextField.Root';\n\nexport type TextFieldSlotProps = {\n children: ReactNode;\n name?: 'left' | 'right';\n className?: string;\n};\n\nexport const TextFieldSlot = (\n { name, className, ...slotProps }: TextFieldSlotProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-slot={true}\n data-name={name}\n {...slotProps}\n ref={forwardedRef}\n className={cn(styles.slot, className)}\n />\n );\n};\n\nTextFieldSlot.displayName = 'TextField.Slot';\n\nconst ForwardedRefTextFieldRoot = forwardRef<HTMLInputElement, TextInputProps>(TextFieldRoot);\nconst ForwardedRefTextFieldSlot = forwardRef<HTMLDivElement, TextFieldSlotProps>(TextFieldSlot);\n// @ts-expect-error We support both single component (without slots) and compound components (with slots)\nexport const TextInput: typeof TextFieldRoot & {\n Root: typeof ForwardedRefTextFieldRoot;\n Slot: typeof ForwardedRefTextFieldSlot;\n} = ForwardedRefTextFieldRoot;\nTextInput.Root = ForwardedRefTextFieldRoot;\nTextInput.Slot = ForwardedRefTextFieldSlot;\n"],"names":["TextFieldRoot","children","className","status","dataTestId","inputProps","ref","wasClicked","useRef","jsxs","cn","styles","jsx","mouseEvent","focusEvent","_a","blurEvent","IconCheckMark","IconExclamationMarkTriangle","TextFieldSlot","name","slotProps","forwardedRef","ForwardedRefTextFieldRoot","forwardRef","ForwardedRefTextFieldSlot","TextInput"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"fondue-components28.js","sources":["../src/components/TextInput/TextInput.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCheckMark, IconExclamationMarkTriangle } from '@frontify/fondue-icons';\nimport {\n type FocusEvent,\n forwardRef,\n useRef,\n type ChangeEvent,\n type ForwardedRef,\n type KeyboardEvent,\n type ReactNode,\n type SyntheticEvent,\n} from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport styles from './styles/text.module.scss';\n\nexport type TextInputProps = {\n id?: string;\n name?: string;\n /**\n * The place where the input slots are placed\n */\n children?: ReactNode;\n /**\n * The default value of the text input\n * Used for uncontrolled components\n */\n defaultValue?: string | number;\n /**\n * The controlled value of the text input\n */\n value?: string | number;\n /**\n * Type of the text input\n * @default \"text\"\n */\n type?: 'date' | 'email' | 'hidden' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'url';\n /**\n * The placeholder in the text input\n */\n placeholder?: string;\n /**\n * Disable the text input\n * @default false\n */\n disabled?: boolean;\n /**\n * Make the text input required in form\n * @default false\n */\n required?: boolean;\n /**\n * Make the text input spell-checkable\n * @default true\n */\n spellCheck?: boolean;\n /**\n * Make the text input read-only\n * @default false\n */\n readOnly?: boolean;\n /**\n * Set the type of input so autocomplete can help the user\n * @default \"on\"\n */\n autoComplete?: string;\n /**\n * The maximum length of the text input\n */\n maxLength?: number;\n /**\n * Status of the text input\n * @default \"neutral\"\n */\n status?: 'neutral' | 'success' | 'error' | 'loading';\n className?: string;\n /**\n * Event handler called when the text input value changes\n */\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when the text input is blurred\n */\n onBlur?: (event: FocusEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when the text input is focused\n */\n onFocus?: (event: FocusEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when a key is pressed\n */\n onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when a key is released\n */\n onKeyUp?: (event: KeyboardEvent<HTMLInputElement>) => void;\n /**\n * Event handler called when the text inside of text input is selected\n */\n onSelect?: (event: SyntheticEvent<HTMLInputElement>) => void;\n 'data-test-id'?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n 'aria-errormessage'?: string;\n};\n\nexport const TextFieldRoot = (\n {\n children,\n className,\n status = 'neutral',\n 'data-test-id': dataTestId = 'fondue-text-input',\n 'aria-errormessage': ariaErrormessage,\n ...inputProps\n }: TextInputProps,\n ref: ForwardedRef<HTMLInputElement>,\n) => {\n const wasClicked = useRef(false);\n\n return (\n <div className={cn(styles.root, className)} data-status={status} data-test-id={dataTestId}>\n {status === 'loading' ? (\n <div className={styles.loadingStatus} data-test-id={`${dataTestId}-loader`} />\n ) : null}\n <input\n onMouseDown={(mouseEvent) => {\n wasClicked.current = true;\n mouseEvent.currentTarget.dataset.showFocusRing = 'false';\n }}\n type=\"text\"\n {...inputProps}\n onFocus={(focusEvent) => {\n if (!wasClicked.current) {\n focusEvent.target.dataset.showFocusRing = 'true';\n }\n inputProps.onFocus?.(focusEvent);\n }}\n onBlur={(blurEvent) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasClicked.current = false;\n inputProps.onBlur?.(blurEvent);\n }}\n ref={ref}\n className={styles.input}\n aria-invalid={status === 'error'}\n aria-errormessage={status === 'error' ? ariaErrormessage : undefined}\n />\n\n {status === 'success' ? (\n <IconCheckMark size={16} className={styles.iconSuccess} data-test-id={`${dataTestId}-success-icon`} />\n ) : null}\n\n {status === 'error' ? (\n <IconExclamationMarkTriangle\n size={16}\n className={styles.iconError}\n data-test-id={`${dataTestId}-error-icon`}\n />\n ) : null}\n\n {children}\n </div>\n );\n};\nTextFieldRoot.displayName = 'TextField.Root';\n\nexport type TextFieldSlotProps = {\n children: ReactNode;\n name?: 'left' | 'right';\n className?: string;\n};\n\nexport const TextFieldSlot = (\n { name, className, ...slotProps }: TextFieldSlotProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-slot={true}\n data-name={name}\n {...slotProps}\n ref={forwardedRef}\n className={cn(styles.slot, className)}\n />\n );\n};\n\nTextFieldSlot.displayName = 'TextField.Slot';\n\nconst ForwardedRefTextFieldRoot = forwardRef<HTMLInputElement, TextInputProps>(TextFieldRoot);\nconst ForwardedRefTextFieldSlot = forwardRef<HTMLDivElement, TextFieldSlotProps>(TextFieldSlot);\n// @ts-expect-error We support both single component (without slots) and compound components (with slots)\nexport const TextInput: typeof TextFieldRoot & {\n Root: typeof ForwardedRefTextFieldRoot;\n Slot: typeof ForwardedRefTextFieldSlot;\n} = ForwardedRefTextFieldRoot;\nTextInput.Root = ForwardedRefTextFieldRoot;\nTextInput.Slot = ForwardedRefTextFieldSlot;\n"],"names":["TextFieldRoot","children","className","status","dataTestId","ariaErrormessage","inputProps","ref","wasClicked","useRef","jsxs","cn","styles","jsx","mouseEvent","focusEvent","_a","blurEvent","IconCheckMark","IconExclamationMarkTriangle","TextFieldSlot","name","slotProps","forwardedRef","ForwardedRefTextFieldRoot","forwardRef","ForwardedRefTextFieldSlot","TextInput"],"mappings":";;;;;AA6GO,MAAMA,IAAgB,CACzB;AAAA,EACI,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,gBAAgBC,IAAa;AAAA,EAC7B,qBAAqBC;AAAA,EACrB,GAAGC;AACP,GACAC,MACC;AACK,QAAAC,IAAaC,EAAO,EAAK;AAG3B,SAAA,gBAAAC,EAAC,OAAI,EAAA,WAAWC,EAAGC,EAAO,MAAMV,CAAS,GAAG,eAAaC,GAAQ,gBAAcC,GAC1E,UAAA;AAAA,IAAWD,MAAA,YACP,gBAAAU,EAAA,OAAA,EAAI,WAAWD,EAAO,eAAe,gBAAc,GAAGR,CAAU,UAAA,CAAW,IAC5E;AAAA,IACJ,gBAAAS;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,aAAa,CAACC,MAAe;AACzB,UAAAN,EAAW,UAAU,IACVM,EAAA,cAAc,QAAQ,gBAAgB;AAAA,QACrD;AAAA,QACA,MAAK;AAAA,QACJ,GAAGR;AAAA,QACJ,SAAS,CAACS,MAAe;;AACjB,UAACP,EAAW,YACDO,EAAA,OAAO,QAAQ,gBAAgB,UAE9CC,IAAAV,EAAW,YAAX,QAAAU,EAAA,KAAAV,GAAqBS;AAAA,QACzB;AAAA,QACA,QAAQ,CAACE,MAAc;;AACT,UAAAA,EAAA,OAAO,QAAQ,gBAAgB,SACzCT,EAAW,UAAU,KACrBQ,IAAAV,EAAW,WAAX,QAAAU,EAAA,KAAAV,GAAoBW;AAAA,QACxB;AAAA,QACA,KAAAV;AAAA,QACA,WAAWK,EAAO;AAAA,QAClB,gBAAcT,MAAW;AAAA,QACzB,qBAAmBA,MAAW,UAAUE,IAAmB;AAAA,MAAA;AAAA,IAC/D;AAAA,IAECF,MAAW,YACP,gBAAAU,EAAAK,GAAA,EAAc,MAAM,IAAI,WAAWN,EAAO,aAAa,gBAAc,GAAGR,CAAU,gBAAiB,CAAA,IACpG;AAAA,IAEHD,MAAW,UACR,gBAAAU;AAAA,MAACM;AAAA,MAAA;AAAA,QACG,MAAM;AAAA,QACN,WAAWP,EAAO;AAAA,QAClB,gBAAc,GAAGR,CAAU;AAAA,MAAA;AAAA,IAAA,IAE/B;AAAA,IAEHH;AAAA,EAAA,GACL;AAER;AACAD,EAAc,cAAc;AAQf,MAAAoB,IAAgB,CACzB,EAAE,MAAAC,GAAM,WAAAnB,GAAW,GAAGoB,KACtBC,MAGI,gBAAAV;AAAA,EAAC;AAAA,EAAA;AAAA,IACG,aAAW;AAAA,IACX,aAAWQ;AAAA,IACV,GAAGC;AAAA,IACJ,KAAKC;AAAA,IACL,WAAWZ,EAAGC,EAAO,MAAMV,CAAS;AAAA,EAAA;AACxC;AAIRkB,EAAc,cAAc;AAE5B,MAAMI,IAA4BC,EAA6CzB,CAAa,GACtF0B,IAA4BD,EAA+CL,CAAa,GAEjFO,IAGTH;AACJG,EAAU,OAAOH;AACjBG,EAAU,OAAOD;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import n from "./fondue-
|
|
2
|
+
import n from "./fondue-components78.js";
|
|
3
3
|
import { Slot as i } from "@radix-ui/react-slot";
|
|
4
4
|
import { createContext as l, useContext as c } from "react";
|
|
5
5
|
const t = l("light"), f = () => c(t), h = ({ children: r, theme: e = "light", asChild: m = !1 }) => {
|
|
@@ -3,7 +3,7 @@ import * as e from "@radix-ui/react-tooltip";
|
|
|
3
3
|
import { forwardRef as s } from "react";
|
|
4
4
|
import { cn as u } from "./fondue-components36.js";
|
|
5
5
|
import { useFondueTheme as h, ThemeProvider as y } from "./fondue-components29.js";
|
|
6
|
-
import d from "./fondue-
|
|
6
|
+
import d from "./fondue-components79.js";
|
|
7
7
|
const l = ({ children: o, enterDelay: r = 700, open: i, onOpenChange: a, ...n }) => /* @__PURE__ */ t(e.Provider, { children: /* @__PURE__ */ t(e.Root, { delayDuration: r, open: i, onOpenChange: a, ...n, children: o }) });
|
|
8
8
|
l.displayName = "Tooltip.Root";
|
|
9
9
|
const p = ({ asChild: o = !1, children: r, "data-test-id": i = "fondue-tooltip-trigger" }, a) => /* @__PURE__ */ t(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FOCUS_OUTLINE as t } from "./fondue-
|
|
1
|
+
import { FOCUS_OUTLINE as t } from "./fondue-components82.js";
|
|
2
2
|
import { sv as e } from "./fondue-components36.js";
|
|
3
3
|
const o = e({
|
|
4
4
|
base: `tw-group tw-relative tw-flex tw-flex-row tw-gap-2 tw-items-center tw-justify-center tw-cursor-pointer tw-font-body tw-font-medium tw-box-border tw-whitespace-nowrap tw-transition-colors ${t}`,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FOCUS_OUTLINE as t } from "./fondue-
|
|
1
|
+
import { FOCUS_OUTLINE as t } from "./fondue-components82.js";
|
|
2
2
|
import { sv as e } from "./fondue-components36.js";
|
|
3
3
|
const s = e({
|
|
4
4
|
base: `tw-peer tw-relative tw-inline-flex tw-bg-base tw-text-white tw-shrink-0 tw-rounded tw-border tw-border-line-x-strong group-hover:tw-border-line-xx-strong hover:tw-border-line-xx-strong tw-transition-colors data-[state="checked"]:tw-border-transparent data-[state="indeterminate"]:tw-border-transparent disabled:tw-border-line-strong disabled:tw-bg-base disabled:tw-cursor-not-allowed data-[state="checked"]:disabled:tw-bg-box-disabled-strong ${t}`,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as s, jsx as e, Fragment as f } from "react/jsx-runtime";
|
|
2
2
|
import { IconDroplet as h, IconCross as I, IconCaretDown as v } from "@frontify/fondue-icons";
|
|
3
3
|
import { forwardRef as b } from "react";
|
|
4
|
-
import t from "./fondue-
|
|
4
|
+
import t from "./fondue-components83.js";
|
|
5
5
|
import { getColorWithName as k, colorToCss as y } from "./fondue-components45.js";
|
|
6
6
|
const c = ({
|
|
7
7
|
id: l,
|