@frontify/fondue-components 3.1.0 → 3.2.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-components.js +38 -24
- package/dist/fondue-components.js.map +1 -1
- package/dist/fondue-components10.js +18 -38
- package/dist/fondue-components10.js.map +1 -1
- package/dist/fondue-components11.js +64 -40
- package/dist/fondue-components11.js.map +1 -1
- package/dist/fondue-components12.js +19 -77
- package/dist/fondue-components12.js.map +1 -1
- package/dist/fondue-components13.js +22 -64
- package/dist/fondue-components13.js.map +1 -1
- package/dist/fondue-components14.js +39 -46
- package/dist/fondue-components14.js.map +1 -1
- package/dist/fondue-components15.js +6 -12
- package/dist/fondue-components15.js.map +1 -1
- package/dist/fondue-components16.js +46 -154
- package/dist/fondue-components16.js.map +1 -1
- package/dist/fondue-components17.js +54 -117
- package/dist/fondue-components17.js.map +1 -1
- package/dist/fondue-components18.js +28 -117
- package/dist/fondue-components18.js.map +1 -1
- package/dist/fondue-components19.js +111 -20
- package/dist/fondue-components19.js.map +1 -1
- package/dist/fondue-components20.js +65 -14
- package/dist/fondue-components20.js.map +1 -1
- package/dist/fondue-components21.js +42 -59
- package/dist/fondue-components21.js.map +1 -1
- package/dist/fondue-components22.js +32 -15
- package/dist/fondue-components22.js.map +1 -1
- package/dist/fondue-components23.js +5 -19
- package/dist/fondue-components23.js.map +1 -1
- package/dist/fondue-components24.js +12 -17
- package/dist/fondue-components24.js.map +1 -1
- package/dist/fondue-components25.js +150 -12
- package/dist/fondue-components25.js.map +1 -1
- package/dist/fondue-components26.js +110 -27
- package/dist/fondue-components26.js.map +1 -1
- package/dist/fondue-components27.js +117 -24
- package/dist/fondue-components27.js.map +1 -1
- package/dist/fondue-components28.js +21 -9
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components29.js +31 -109
- package/dist/fondue-components29.js.map +1 -1
- package/dist/fondue-components3.js +11 -40
- package/dist/fondue-components3.js.map +1 -1
- package/dist/fondue-components30.js +28 -12
- package/dist/fondue-components30.js.map +1 -1
- package/dist/fondue-components31.js +127 -40
- package/dist/fondue-components31.js.map +1 -1
- package/dist/fondue-components32.js +21 -8
- package/dist/fondue-components32.js.map +1 -1
- package/dist/fondue-components33.js +45 -21
- package/dist/fondue-components33.js.map +1 -1
- package/dist/fondue-components34.js +14 -55
- package/dist/fondue-components34.js.map +1 -1
- package/dist/fondue-components35.js +60 -18
- package/dist/fondue-components35.js.map +1 -1
- package/dist/fondue-components36.js +15 -15
- package/dist/fondue-components36.js.map +1 -1
- package/dist/fondue-components37.js +19 -2
- package/dist/fondue-components37.js.map +1 -1
- package/dist/fondue-components38.js +16 -38
- package/dist/fondue-components38.js.map +1 -1
- package/dist/fondue-components39.js +8 -0
- package/dist/fondue-components39.js.map +1 -0
- package/dist/fondue-components4.js +39 -45
- package/dist/fondue-components4.js.map +1 -1
- package/dist/fondue-components40.js +16 -0
- package/dist/fondue-components40.js.map +1 -0
- package/dist/fondue-components41.js +8 -0
- package/dist/fondue-components41.js.map +1 -0
- package/dist/fondue-components42.js +38 -0
- package/dist/fondue-components42.js.map +1 -0
- package/dist/fondue-components43.js +8 -0
- package/dist/fondue-components43.js.map +1 -0
- package/dist/fondue-components44.js +28 -0
- package/dist/fondue-components44.js.map +1 -0
- package/dist/fondue-components45.js +20 -0
- package/dist/fondue-components45.js.map +1 -0
- package/dist/fondue-components46.js +14 -0
- package/dist/fondue-components46.js.map +1 -0
- package/dist/fondue-components47.js +16 -0
- package/dist/fondue-components47.js.map +1 -0
- package/dist/fondue-components48.js +133 -0
- package/dist/fondue-components48.js.map +1 -0
- package/dist/fondue-components49.js +15 -0
- package/dist/fondue-components49.js.map +1 -0
- package/dist/fondue-components5.js +46 -82
- package/dist/fondue-components5.js.map +1 -1
- package/dist/fondue-components50.js +46 -0
- package/dist/fondue-components50.js.map +1 -0
- package/dist/fondue-components51.js +11 -0
- package/dist/fondue-components51.js.map +1 -0
- package/dist/fondue-components52.js +30 -0
- package/dist/fondue-components52.js.map +1 -0
- package/dist/fondue-components53.js +52 -0
- package/dist/fondue-components53.js.map +1 -0
- package/dist/fondue-components54.js +21 -0
- package/dist/fondue-components54.js.map +1 -0
- package/dist/fondue-components55.js +10 -0
- package/dist/fondue-components55.js.map +1 -0
- package/dist/fondue-components56.js +5 -0
- package/dist/fondue-components56.js.map +1 -0
- package/dist/fondue-components57.js +14 -0
- package/dist/fondue-components57.js.map +1 -0
- package/dist/fondue-components58.js +42 -0
- package/dist/fondue-components58.js.map +1 -0
- package/dist/fondue-components6.js +48 -30
- package/dist/fondue-components6.js.map +1 -1
- package/dist/fondue-components7.js +77 -98
- package/dist/fondue-components7.js.map +1 -1
- package/dist/fondue-components8.js +28 -56
- package/dist/fondue-components8.js.map +1 -1
- package/dist/fondue-components9.js +101 -22
- package/dist/fondue-components9.js.map +1 -1
- package/dist/index.d.ts +481 -3
- package/dist/style.css +1 -1
- package/package.json +31 -31
|
@@ -1,28 +1,42 @@
|
|
|
1
1
|
/* empty css */
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
2
|
+
import { Box as t } from "./fondue-components3.js";
|
|
3
|
+
import { Button as x } from "./fondue-components4.js";
|
|
4
|
+
import { Checkbox as f } from "./fondue-components5.js";
|
|
5
|
+
import { ColorPicker as l } from "./fondue-components6.js";
|
|
6
|
+
import { Dialog as d } from "./fondue-components7.js";
|
|
7
|
+
import { Divider as S } from "./fondue-components8.js";
|
|
8
|
+
import { Dropdown as g } from "./fondue-components9.js";
|
|
9
|
+
import { Flex as B } from "./fondue-components10.js";
|
|
10
|
+
import { Flyout as D } from "./fondue-components11.js";
|
|
11
|
+
import { Grid as h } from "./fondue-components12.js";
|
|
12
|
+
import { Label as w } from "./fondue-components13.js";
|
|
13
|
+
import { LoadingBar as L } from "./fondue-components14.js";
|
|
14
|
+
import { Section as v } from "./fondue-components15.js";
|
|
15
|
+
import { SegmentedControl as G } from "./fondue-components16.js";
|
|
16
|
+
import { Slider as P } from "./fondue-components17.js";
|
|
17
|
+
import { Switch as q } from "./fondue-components18.js";
|
|
18
|
+
import { Select as z } from "./fondue-components19.js";
|
|
19
|
+
import { TextInput as E } from "./fondue-components20.js";
|
|
20
|
+
import { Tooltip as J } from "./fondue-components21.js";
|
|
14
21
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
f as
|
|
18
|
-
l as
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
t as Box,
|
|
23
|
+
x as Button,
|
|
24
|
+
f as Checkbox,
|
|
25
|
+
l as ColorPicker,
|
|
26
|
+
d as Dialog,
|
|
27
|
+
S as Divider,
|
|
28
|
+
g as Dropdown,
|
|
29
|
+
B as Flex,
|
|
30
|
+
D as Flyout,
|
|
31
|
+
h as Grid,
|
|
32
|
+
w as Label,
|
|
33
|
+
L as LoadingBar,
|
|
34
|
+
v as Section,
|
|
35
|
+
G as SegmentedControl,
|
|
36
|
+
z as Select,
|
|
37
|
+
P as Slider,
|
|
38
|
+
q as Switch,
|
|
39
|
+
E as TextInput,
|
|
40
|
+
J as Tooltip
|
|
27
41
|
};
|
|
28
42
|
//# sourceMappingURL=fondue-components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,42 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
ref: s,
|
|
18
|
-
"data-test-id": n,
|
|
19
|
-
className: g({ rounded: d, size: e, variant: o }),
|
|
20
|
-
"aria-busy": a !== r,
|
|
21
|
-
value: a,
|
|
22
|
-
max: r,
|
|
23
|
-
style: {
|
|
24
|
-
"--loading-bar-value": a,
|
|
25
|
-
"--loading-bar-max": r,
|
|
26
|
-
"--loading-bar-proportion": "calc(var(--loading-bar-value) / var(--loading-bar-max))"
|
|
27
|
-
},
|
|
28
|
-
...l,
|
|
29
|
-
children: /* @__PURE__ */ i(
|
|
30
|
-
t.Indicator,
|
|
31
|
-
{
|
|
32
|
-
className: f({ variant: o, indeterminateState: a === null })
|
|
33
|
-
}
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
)
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { propsToCssVariables as a } from "./fondue-components22.js";
|
|
3
|
+
import i from "./fondue-components39.js";
|
|
4
|
+
const l = ({
|
|
5
|
+
as: t = "div",
|
|
6
|
+
"data-test-id": s = "fondue-flex",
|
|
7
|
+
children: e,
|
|
8
|
+
...o
|
|
9
|
+
}) => /* @__PURE__ */ r(
|
|
10
|
+
t,
|
|
11
|
+
{
|
|
12
|
+
className: i.root,
|
|
13
|
+
"data-test-id": s,
|
|
14
|
+
style: a(o, { justify: "justify-content" }),
|
|
15
|
+
children: e
|
|
16
|
+
}
|
|
37
17
|
);
|
|
38
|
-
|
|
18
|
+
l.displayName = "Flex";
|
|
39
19
|
export {
|
|
40
|
-
|
|
20
|
+
l as Flex
|
|
41
21
|
};
|
|
42
22
|
//# sourceMappingURL=fondue-components10.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components10.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components10.js","sources":["../src/components/Flex/Flex.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { type Responsive, type SizeValue, type LayoutComponentProps } from '#/helpers/layout';\nimport { propsToCssVariables } from '#/helpers/propsToCssVariables';\n\nimport styles from './styles/flex.module.scss';\n\nexport type FlexProps = LayoutComponentProps & {\n /**\n * The element to render the Flex component as.\n * @default 'div'\n */\n as?: 'div' | 'span';\n /**\n * The display property.\n * @default 'flex'\n */\n display?: Responsive<'none' | 'flex' | 'inline-flex'>;\n /**\n * The direction of the children.\n * @default 'row'\n */\n direction?: Responsive<'row' | 'row-reverse' | 'column' | 'column-reverse'>;\n /**\n * The alignment of the children.\n */\n align?: Responsive<'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline'>;\n /**\n * The justification of the children.\n */\n justify?: Responsive<'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'>;\n /**\n * The wrap property.\n */\n wrap?: Responsive<'nowrap' | 'wrap' | 'wrap-reverse'>;\n /**\n * The gap between the children.\n */\n gap?: Responsive<SizeValue>;\n /**\n * The horizontal gap between the children.\n */\n gapX?: Responsive<SizeValue>;\n /**\n * The vertical gap between the children.\n */\n gapY?: Responsive<SizeValue>;\n\n children?: ReactNode;\n 'data-test-id'?: string;\n} & CommonAriaProps;\n\nexport const Flex = ({\n as: Component = 'div',\n 'data-test-id': dataTestId = 'fondue-flex',\n children,\n ...props\n}: FlexProps) => {\n return (\n <Component\n className={styles.root}\n data-test-id={dataTestId}\n style={propsToCssVariables(props, { justify: 'justify-content' })}\n >\n {children}\n </Component>\n );\n};\nFlex.displayName = 'Flex';\n"],"names":["Flex","Component","dataTestId","children","props","jsx","styles","propsToCssVariables"],"mappings":";;;AAuDO,MAAMA,IAAO,CAAC;AAAA,EACjB,IAAIC,IAAY;AAAA,EAChB,gBAAgBC,IAAa;AAAA,EAC7B,UAAAC;AAAA,EACA,GAAGC;AACP,MAEQ,gBAAAC;AAAA,EAACJ;AAAA,EAAA;AAAA,IACG,WAAWK,EAAO;AAAA,IAClB,gBAAcJ;AAAA,IACd,OAAOK,EAAoBH,GAAO,EAAE,SAAS,mBAAmB;AAAA,IAE/D,UAAAD;AAAA,EAAA;AAAA;AAIbH,EAAK,cAAc;"}
|
|
@@ -1,50 +1,74 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { jsx as a, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { IconCross as v } from "@frontify/fondue-icons";
|
|
3
|
+
import * as s from "@radix-ui/react-popover";
|
|
4
|
+
import { forwardRef as r, useRef as x } from "react";
|
|
5
|
+
import { usePreventDropdownOverflow as w } from "./fondue-components36.js";
|
|
6
|
+
import { syncRefs as u } from "./fondue-components37.js";
|
|
7
|
+
import d from "./fondue-components40.js";
|
|
8
|
+
const y = ({ children: t, ...o }) => /* @__PURE__ */ a(s.Root, { ...o, children: t });
|
|
9
|
+
y.displayName = "Flyout.Root";
|
|
10
|
+
const c = ({ children: t, "data-test-id": o = "fondue-flyout-trigger" }, e) => /* @__PURE__ */ a(s.Trigger, { "data-test-id": o, asChild: !0, ref: e, children: t });
|
|
11
|
+
c.displayName = "Flyout.Trigger";
|
|
12
|
+
const f = ({
|
|
13
|
+
align: t = "start",
|
|
14
|
+
maxWidth: o = "360px",
|
|
15
|
+
padding: e = "compact",
|
|
16
|
+
"data-test-id": i = "fondue-flyout-content",
|
|
17
|
+
children: g,
|
|
18
|
+
rounded: N,
|
|
19
|
+
...R
|
|
20
|
+
}, n) => {
|
|
21
|
+
const l = x(null), { setMaxHeight: h } = w(l);
|
|
22
|
+
return /* @__PURE__ */ a(s.Portal, { children: /* @__PURE__ */ a(
|
|
23
|
+
s.Content,
|
|
14
24
|
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
className: f,
|
|
18
|
-
onValueChange: (n) => {
|
|
19
|
-
n && C(n);
|
|
25
|
+
style: {
|
|
26
|
+
"--flyout-max-width": o
|
|
20
27
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
ref: l,
|
|
29
|
+
align: t,
|
|
30
|
+
collisionPadding: 8,
|
|
31
|
+
sideOffset: 8,
|
|
32
|
+
onOpenAutoFocus: () => {
|
|
33
|
+
h(), u(l, n);
|
|
34
|
+
},
|
|
35
|
+
onCloseAutoFocus: () => {
|
|
36
|
+
u(l, n);
|
|
37
|
+
},
|
|
38
|
+
className: d.root,
|
|
39
|
+
"data-flyout-spacing": e,
|
|
40
|
+
"data-rounded": N,
|
|
41
|
+
"data-test-id": i,
|
|
42
|
+
...R,
|
|
43
|
+
children: g
|
|
29
44
|
}
|
|
30
|
-
);
|
|
45
|
+
) });
|
|
31
46
|
};
|
|
32
|
-
|
|
33
|
-
const
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */ t("span", { className: b, children: e }),
|
|
37
|
-
/* @__PURE__ */ t("span", { className: h, children: e })
|
|
38
|
-
] })
|
|
47
|
+
f.displayName = "Flyout.Content";
|
|
48
|
+
const m = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header" }, i) => /* @__PURE__ */ C("div", { "data-test-id": e, ref: i, className: d.header, children: [
|
|
49
|
+
/* @__PURE__ */ a("div", { children: o }),
|
|
50
|
+
t && /* @__PURE__ */ a(s.Close, { role: "button", "data-test-id": `${e}-close`, className: d.close, children: /* @__PURE__ */ a(v, { size: 20 }) })
|
|
39
51
|
] });
|
|
40
|
-
|
|
52
|
+
m.displayName = "Flyout.Header";
|
|
53
|
+
const p = ({ children: t, "data-test-id": o = "fondue-flyout-footer" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: d.footer, children: t });
|
|
54
|
+
p.displayName = "Flyout.Footer";
|
|
55
|
+
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 });
|
|
56
|
+
F.displayName = "Flyout.Body";
|
|
41
57
|
const j = {
|
|
42
|
-
Root:
|
|
43
|
-
|
|
58
|
+
Root: y,
|
|
59
|
+
Trigger: r(c),
|
|
60
|
+
Content: r(f),
|
|
61
|
+
Header: r(m),
|
|
62
|
+
Footer: r(p),
|
|
63
|
+
Body: r(F)
|
|
44
64
|
};
|
|
45
65
|
export {
|
|
46
|
-
j as
|
|
47
|
-
|
|
48
|
-
|
|
66
|
+
j as Flyout,
|
|
67
|
+
F as FlyoutBody,
|
|
68
|
+
f as FlyoutContent,
|
|
69
|
+
p as FlyoutFooter,
|
|
70
|
+
m as FlyoutHeader,
|
|
71
|
+
y as FlyoutRoot,
|
|
72
|
+
c as FlyoutTrigger
|
|
49
73
|
};
|
|
50
74
|
//# sourceMappingURL=fondue-components11.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components11.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components11.js","sources":["../src/components/Flyout/Flyout.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { forwardRef, useRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { usePreventDropdownOverflow } from '#/hooks/usePreventDropdownOverflow';\nimport { syncRefs } from '#/utilities/domUtilities';\n\nimport styles from './styles/flyout.module.scss';\n\nexport type FlyoutRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the flyout\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport type FlyoutContentProps = {\n /**\n * Add rounded corners to the flyout\n * @default true\n */\n rounded?: boolean;\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?: 'tight' | 'compact' | 'comfortable' | 'spacious';\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 type FlyoutTriggerProps = { children?: ReactNode; 'data-test-id'?: string };\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 type FlyoutFooterProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type FlyoutBodyProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport const FlyoutTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-trigger' }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.Trigger data-test-id={dataTestId} asChild ref={ref}>\n {children}\n </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\nexport const FlyoutContent = (\n {\n align = 'start',\n maxWidth = '360px',\n padding = 'compact',\n 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n rounded,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const localRef = useRef(null);\n\n const { setMaxHeight } = usePreventDropdownOverflow(localRef);\n\n return (\n <RadixPopover.Portal>\n <RadixPopover.Content\n style={\n {\n '--flyout-max-width': maxWidth,\n } as CSSProperties\n }\n ref={localRef}\n align={align}\n collisionPadding={8}\n sideOffset={8}\n onOpenAutoFocus={() => {\n setMaxHeight();\n syncRefs(localRef, ref);\n }}\n onCloseAutoFocus={() => {\n syncRefs(localRef, ref);\n }}\n className={styles.root}\n data-flyout-spacing={padding}\n data-rounded={rounded}\n data-test-id={dataTestId}\n {...props}\n >\n {children}\n </RadixPopover.Content>\n </RadixPopover.Portal>\n );\n};\nFlyoutContent.displayName = 'Flyout.Content';\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 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 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","dataTestId","ref","jsx","FlyoutContent","align","maxWidth","padding","rounded","localRef","useRef","setMaxHeight","usePreventDropdownOverflow","syncRefs","styles","FlyoutHeader","showCloseButton","IconCross","FlyoutFooter","FlyoutBody","Flyout","forwardRef"],"mappings":";;;;;;;AA2EO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAC9BC,EAAa,MAAb,EAAmB,GAAGD,GAAQ,UAAAD,EAAS,CAAA;AAEnDD,EAAW,cAAc;AAEZ,MAAAI,IAAgB,CACzB,EAAE,UAAAH,GAAU,gBAAgBI,IAAa,2BACzCC,MAGI,gBAAAC,EAACJ,EAAa,SAAb,EAAqB,gBAAcE,GAAY,SAAO,IAAC,KAAAC,GACnD,UAAAL,EACL,CAAA;AAGRG,EAAc,cAAc;AAErB,MAAMI,IAAgB,CACzB;AAAA,EACI,OAAAC,IAAQ;AAAA,EACR,UAAAC,IAAW;AAAA,EACX,SAAAC,IAAU;AAAA,EACV,gBAAgBN,IAAa;AAAA,EAC7B,UAAAJ;AAAA,EACA,SAAAW;AAAA,EACA,GAAGV;AACP,GACAI,MACC;AACK,QAAAO,IAAWC,EAAO,IAAI,GAEtB,EAAE,cAAAC,EAAA,IAAiBC,EAA2BH,CAAQ;AAGxD,SAAA,gBAAAN,EAACJ,EAAa,QAAb,EACG,UAAA,gBAAAI;AAAA,IAACJ,EAAa;AAAA,IAAb;AAAA,MACG,OACI;AAAA,QACI,sBAAsBO;AAAA,MAC1B;AAAA,MAEJ,KAAKG;AAAA,MACL,OAAAJ;AAAA,MACA,kBAAkB;AAAA,MAClB,YAAY;AAAA,MACZ,iBAAiB,MAAM;AACN,QAAAM,KACbE,EAASJ,GAAUP,CAAG;AAAA,MAC1B;AAAA,MACA,kBAAkB,MAAM;AACpB,QAAAW,EAASJ,GAAUP,CAAG;AAAA,MAC1B;AAAA,MACA,WAAWY,EAAO;AAAA,MAClB,uBAAqBP;AAAA,MACrB,gBAAcC;AAAA,MACd,gBAAcP;AAAA,MACb,GAAGH;AAAA,MAEH,UAAAD;AAAA,IAAA;AAAA,EAET,EAAA,CAAA;AAER;AACAO,EAAc,cAAc;AAEf,MAAAW,IAAe,CACxB,EAAE,iBAAAC,GAAiB,UAAAnB,GAAU,gBAAgBI,IAAa,uBAAuB,GACjFC,wBAGK,OAAI,EAAA,gBAAcD,GAAY,KAAAC,GAAU,WAAWY,EAAO,QACvD,UAAA;AAAA,EAAA,gBAAAX,EAAC,SAAK,UAAAN,GAAS;AAAA,EACdmB,KACI,gBAAAb,EAAAJ,EAAa,OAAb,EAAmB,MAAK,UAAS,gBAAc,GAAGE,CAAU,UAAU,WAAWa,EAAO,OACrF,4BAACG,GAAU,EAAA,MAAM,GAAI,CAAA,GACzB;AAER,EAAA,CAAA;AAGRF,EAAa,cAAc;AAEd,MAAAG,IAAe,CACxB,EAAE,UAAArB,GAAU,gBAAgBI,IAAa,0BACzCC,MAGI,gBAAAC,EAAC,SAAI,gBAAcF,GAAY,KAAAC,GAAU,WAAWY,EAAO,QACtD,UAAAjB,EACL,CAAA;AAGRqB,EAAa,cAAc;AAEd,MAAAC,IAAa,CACtB,EAAE,UAAAtB,GAAU,gBAAgBI,IAAa,wBACzCC,MAGI,gBAAAC,EAAC,OAAI,EAAA,gBAAcF,GAAY,KAAAC,GAAU,uBAAoB,WAAU,WAAWY,EAAO,MACpF,UAAAjB,EACL,CAAA;AAGRsB,EAAW,cAAc;AAElB,MAAMC,IAAS;AAAA,EAClB,MAAMxB;AAAA,EACN,SAASyB,EAAkDrB,CAAa;AAAA,EACxE,SAASqB,EAA+CjB,CAAa;AAAA,EACrE,QAAQiB,EAA8CN,CAAY;AAAA,EAClE,QAAQM,EAA8CH,CAAY;AAAA,EAClE,MAAMG,EAA4CF,CAAU;AAChE;"}
|
|
@@ -1,80 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
disabled: m,
|
|
20
|
-
"aria-label": h,
|
|
21
|
-
"data-test-id": b = "fondue-select"
|
|
22
|
-
}, s) => {
|
|
23
|
-
const { inputSlots: g, menuSlots: N, items: x, clearButton: c, getItemByValue: i } = V(S), y = i(u), C = i(f), { getToggleButtonProps: R, getMenuProps: w, getItemProps: v, reset: F, selectedItem: l, isOpen: P, highlightedIndex: G } = D({
|
|
24
|
-
items: x,
|
|
25
|
-
defaultSelectedItem: y,
|
|
26
|
-
selectedItem: C,
|
|
27
|
-
onSelectedItemChange: ({ selectedItem: t }) => {
|
|
28
|
-
a && a(t.value);
|
|
29
|
-
},
|
|
30
|
-
itemToString: (t) => t ? t.label : ""
|
|
31
|
-
});
|
|
32
|
-
return /* @__PURE__ */ d(p.Root, { open: P, children: [
|
|
33
|
-
/* @__PURE__ */ o(p.Anchor, { asChild: !0, children: /* @__PURE__ */ d(
|
|
34
|
-
"div",
|
|
35
|
-
{
|
|
36
|
-
className: r.root,
|
|
37
|
-
"data-disabled": m,
|
|
38
|
-
"data-empty": !l,
|
|
39
|
-
"data-test-id": b,
|
|
40
|
-
...m ? {} : R({
|
|
41
|
-
"aria-label": h,
|
|
42
|
-
...s ? { ref: s } : {}
|
|
43
|
-
}),
|
|
44
|
-
children: [
|
|
45
|
-
/* @__PURE__ */ o("span", { className: r.input, children: l ? l.label : I }),
|
|
46
|
-
g,
|
|
47
|
-
c && /* @__PURE__ */ o(
|
|
48
|
-
j,
|
|
49
|
-
{
|
|
50
|
-
onClick: (t) => {
|
|
51
|
-
t.stopPropagation(), F();
|
|
52
|
-
},
|
|
53
|
-
className: r.clear,
|
|
54
|
-
children: c
|
|
55
|
-
}
|
|
56
|
-
),
|
|
57
|
-
/* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(B, { size: 16, className: r.caret }) })
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
) }),
|
|
61
|
-
/* @__PURE__ */ o(A, { highlightedIndex: G, getMenuProps: w, getItemProps: v, children: N })
|
|
62
|
-
] });
|
|
63
|
-
};
|
|
64
|
-
n.displayName = "Select";
|
|
65
|
-
const q = M(n), e = q;
|
|
66
|
-
e.displayName = "Select";
|
|
67
|
-
e.Combobox = T;
|
|
68
|
-
e.Combobox.displayName = "Select.Combobox";
|
|
69
|
-
e.Item = k;
|
|
70
|
-
e.Item.displayName = "Select.Item";
|
|
71
|
-
e.Group = z;
|
|
72
|
-
e.Group.displayName = "Select.Group";
|
|
73
|
-
e.Slot = O;
|
|
74
|
-
e.Slot.displayName = "Select.Slot";
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { propsToCssVariables as a } from "./fondue-components22.js";
|
|
3
|
+
import e from "./fondue-components41.js";
|
|
4
|
+
const d = ({
|
|
5
|
+
as: s = "div",
|
|
6
|
+
"data-test-id": t = "fondue-grid",
|
|
7
|
+
children: r,
|
|
8
|
+
...i
|
|
9
|
+
}) => /* @__PURE__ */ o(
|
|
10
|
+
s,
|
|
11
|
+
{
|
|
12
|
+
className: e.root,
|
|
13
|
+
"data-test-id": t,
|
|
14
|
+
style: a(i, { justify: "justify-items" }),
|
|
15
|
+
children: r
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
d.displayName = "Grid";
|
|
75
19
|
export {
|
|
76
|
-
|
|
77
|
-
e as Select,
|
|
78
|
-
n as SelectInput
|
|
20
|
+
d as Grid
|
|
79
21
|
};
|
|
80
22
|
//# sourceMappingURL=fondue-components12.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components12.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components12.js","sources":["../src/components/Grid/Grid.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { type Responsive, type SizeValue, type LayoutComponentProps } from '#/helpers/layout';\nimport { propsToCssVariables } from '#/helpers/propsToCssVariables';\n\nimport styles from './styles/grid.module.scss';\n\nexport type GridProps = LayoutComponentProps & {\n /**\n * The element to render the Grid component as.\n * @default 'div'\n */\n as?: 'div' | 'span';\n\n /**\n * The display property.\n * @default 'grid'\n */\n display?: 'none' | 'grid' | 'inline-grid';\n /**\n * The columns property.\n */\n columns?: Responsive<string | number>;\n /**\n * The rows property.\n */\n rows?: Responsive<string | number>;\n /**\n * The flow property.\n */\n flow?: Responsive<'row' | 'column' | 'dense' | 'row-dense' | 'column-dense'>;\n /**\n * The alignment of the children.\n */\n align?: Responsive<'start' | 'center' | 'end' | 'baseline' | 'stretch'>;\n /**\n * The justification of the children.\n */\n justify?: Responsive<'start' | 'center' | 'end' | 'between'>;\n /**\n * The gap between the children.\n */\n gap?: Responsive<SizeValue>;\n /**\n * The horizontal gap between the children.\n */\n gapX?: Responsive<SizeValue>;\n /**\n * The vertical gap between the children.\n */\n gapY?: Responsive<SizeValue>;\n\n children?: ReactNode;\n 'data-test-id'?: string;\n} & CommonAriaProps;\n\nexport const Grid = ({\n as: Component = 'div',\n 'data-test-id': dataTestId = 'fondue-grid',\n children,\n ...props\n}: GridProps) => {\n return (\n <Component\n className={styles.root}\n data-test-id={dataTestId}\n style={propsToCssVariables(props, { justify: 'justify-items' })}\n >\n {children}\n </Component>\n );\n};\nGrid.displayName = 'Grid';\n"],"names":["Grid","Component","dataTestId","children","props","jsx","styles","propsToCssVariables"],"mappings":";;;AA2DO,MAAMA,IAAO,CAAC;AAAA,EACjB,IAAIC,IAAY;AAAA,EAChB,gBAAgBC,IAAa;AAAA,EAC7B,UAAAC;AAAA,EACA,GAAGC;AACP,MAEQ,gBAAAC;AAAA,EAACJ;AAAA,EAAA;AAAA,IACG,WAAWK,EAAO;AAAA,IAClB,gBAAcJ;AAAA,IACd,OAAOK,EAAoBH,GAAO,EAAE,SAAS,iBAAiB;AAAA,IAE7D,UAAAD;AAAA,EAAA;AAAA;AAIbH,EAAK,cAAc;"}
|
|
@@ -1,69 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { cn as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
children: c,
|
|
8
|
-
className: d,
|
|
9
|
-
status: e = "neutral",
|
|
10
|
-
"data-test-id": a = "fondue-text-input",
|
|
11
|
-
...t
|
|
12
|
-
}, R) => {
|
|
13
|
-
const i = S(!1);
|
|
14
|
-
return /* @__PURE__ */ g("div", { className: m(r.root, d), "data-status": e, "data-test-id": a, children: [
|
|
15
|
-
e === "loading" ? /* @__PURE__ */ s("div", { className: r.loadingStatus, "data-test-id": `${a}-loader` }) : null,
|
|
16
|
-
/* @__PURE__ */ s(
|
|
17
|
-
"input",
|
|
18
|
-
{
|
|
19
|
-
onMouseDown: (o) => {
|
|
20
|
-
i.current = !0, o.currentTarget.dataset.showFocusRing = "false";
|
|
21
|
-
},
|
|
22
|
-
type: "text",
|
|
23
|
-
...t,
|
|
24
|
-
onFocus: (o) => {
|
|
25
|
-
var l;
|
|
26
|
-
i.current || (o.target.dataset.showFocusRing = "true"), (l = t.onFocus) == null || l.call(t, o);
|
|
27
|
-
},
|
|
28
|
-
onBlur: (o) => {
|
|
29
|
-
var l;
|
|
30
|
-
o.target.dataset.showFocusRing = "false", i.current = !1, (l = t.onBlur) == null || l.call(t, o);
|
|
31
|
-
},
|
|
32
|
-
ref: R,
|
|
33
|
-
className: r.input,
|
|
34
|
-
"aria-invalid": e === "error"
|
|
35
|
-
}
|
|
36
|
-
),
|
|
37
|
-
e === "success" ? /* @__PURE__ */ s(w, { size: 16, className: r.iconSuccess, "data-test-id": `${a}-success-icon` }) : null,
|
|
38
|
-
e === "error" ? /* @__PURE__ */ s(
|
|
39
|
-
N,
|
|
40
|
-
{
|
|
41
|
-
size: 16,
|
|
42
|
-
className: r.iconError,
|
|
43
|
-
"data-test-id": `${a}-error-icon`
|
|
44
|
-
}
|
|
45
|
-
) : null,
|
|
46
|
-
c
|
|
47
|
-
] });
|
|
48
|
-
};
|
|
49
|
-
f.displayName = "TextField.Root";
|
|
50
|
-
const u = ({ name: c, className: d, ...e }, a) => /* @__PURE__ */ s(
|
|
51
|
-
"div",
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "@radix-ui/react-label";
|
|
3
|
+
import { forwardRef as i } from "react";
|
|
4
|
+
import { cn as n } from "./fondue-components24.js";
|
|
5
|
+
const s = ({ className: e, "data-test-id": a = "fondue-label", ...t }, r) => /* @__PURE__ */ o(
|
|
6
|
+
d.Root,
|
|
52
7
|
{
|
|
53
|
-
|
|
54
|
-
"data-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
8
|
+
ref: r,
|
|
9
|
+
"data-required": t.required,
|
|
10
|
+
className: n(
|
|
11
|
+
'tw-group tw-flex tw-gap-1 tw-font-sans tw-font-normal peer-data-[state="checked"]:tw-font-medium peer-data-[state="indeterminate"]:tw-font-medium tw-text-body-medium tw-text-text-weak peer-hover:tw-text-text has-[+_*_input:hover:not(:disabled)]:tw-text-text tw-transition-colors',
|
|
12
|
+
// Disabled state if siblings has disabled state
|
|
13
|
+
"has-[+_*_:disabled]:tw-text-text-disabled has-[~_:disabled]:tw-cursor-not-allowed peer-disabled:tw-text-text-disabled peer-disabled:tw-cursor-not-allowed",
|
|
14
|
+
// Required asterisk
|
|
15
|
+
'after:tw-hidden data-[required="true"]:after:tw-flex after:tw-content-["*"] after:-tw-ml-1 after:tw-font-sans after:tw-text-body-small after:tw-font-medium after:tw-text-text-negative group-hover:tw-text-text-negative-hover',
|
|
16
|
+
e
|
|
17
|
+
),
|
|
18
|
+
"data-test-id": a,
|
|
19
|
+
...t
|
|
58
20
|
}
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
const x = n(f), T = n(u), F = x;
|
|
62
|
-
F.Root = x;
|
|
63
|
-
F.Slot = T;
|
|
21
|
+
), w = i(s);
|
|
22
|
+
w.displayName = "Label";
|
|
64
23
|
export {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
F as TextInput
|
|
24
|
+
w as Label,
|
|
25
|
+
s as LabelComponent
|
|
68
26
|
};
|
|
69
27
|
//# sourceMappingURL=fondue-components13.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components13.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components13.js","sources":["../src/components/Label/Label.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { type ForwardedRef, forwardRef, type ReactNode } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nexport type LabelProps = {\n id?: string;\n children: ReactNode;\n /**\n * The id of the input element the label is associated with\n */\n htmlFor: string;\n /**\n * Add an asterisk to the label to indicate it is required\n * @default false\n */\n required?: boolean;\n className?: string;\n 'data-test-id'?: string;\n};\n\nexport const LabelComponent = (\n { className, 'data-test-id': dataTestId = 'fondue-label', ...props }: LabelProps,\n ref: ForwardedRef<HTMLLabelElement>,\n) => {\n return (\n <LabelPrimitive.Root\n ref={ref}\n data-required={props.required}\n className={cn(\n 'tw-group tw-flex tw-gap-1 tw-font-sans tw-font-normal peer-data-[state=\"checked\"]:tw-font-medium peer-data-[state=\"indeterminate\"]:tw-font-medium tw-text-body-medium tw-text-text-weak peer-hover:tw-text-text has-[+_*_input:hover:not(:disabled)]:tw-text-text tw-transition-colors',\n // Disabled state if siblings has disabled state\n 'has-[+_*_:disabled]:tw-text-text-disabled has-[~_:disabled]:tw-cursor-not-allowed peer-disabled:tw-text-text-disabled peer-disabled:tw-cursor-not-allowed',\n // Required asterisk\n 'after:tw-hidden data-[required=\"true\"]:after:tw-flex after:tw-content-[\"*\"] after:-tw-ml-1 after:tw-font-sans after:tw-text-body-small after:tw-font-medium after:tw-text-text-negative group-hover:tw-text-text-negative-hover',\n className,\n )}\n data-test-id={dataTestId}\n {...props}\n />\n );\n};\n\nexport const Label = forwardRef<HTMLLabelElement, LabelProps>(LabelComponent);\nLabel.displayName = 'Label';\n"],"names":["LabelComponent","className","dataTestId","props","ref","jsx","LabelPrimitive","cn","Label","forwardRef"],"mappings":";;;;AAuBa,MAAAA,IAAiB,CAC1B,EAAE,WAAAC,GAAW,gBAAgBC,IAAa,gBAAgB,GAAGC,EAAM,GACnEC,MAGI,gBAAAC;AAAA,EAACC,EAAe;AAAA,EAAf;AAAA,IACG,KAAAF;AAAA,IACA,iBAAeD,EAAM;AAAA,IACrB,WAAWI;AAAA,MACP;AAAA;AAAA,MAEA;AAAA;AAAA,MAEA;AAAA,MACAN;AAAA,IACJ;AAAA,IACA,gBAAcC;AAAA,IACb,GAAGC;AAAA,EAAA;AAAA,GAKHK,IAAQC,EAAyCT,CAAc;AAC5EQ,EAAM,cAAc;"}
|