@frontify/fondue-components 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fondue-components10.js.map +1 -1
- package/dist/fondue-components11.js +40 -36
- package/dist/fondue-components11.js.map +1 -1
- package/dist/fondue-components12.js.map +1 -1
- package/dist/fondue-components13.js.map +1 -1
- package/dist/fondue-components14.js.map +1 -1
- package/dist/fondue-components15.js.map +1 -1
- package/dist/fondue-components17.js.map +1 -1
- package/dist/fondue-components18.js.map +1 -1
- package/dist/fondue-components19.js.map +1 -1
- package/dist/fondue-components20.js.map +1 -1
- package/dist/fondue-components21.js +27 -27
- package/dist/fondue-components21.js.map +1 -1
- package/dist/fondue-components22.js.map +1 -1
- package/dist/fondue-components23.js.map +1 -1
- package/dist/fondue-components24.js.map +1 -1
- package/dist/fondue-components26.js.map +1 -1
- package/dist/fondue-components27.js.map +1 -1
- package/dist/fondue-components28.js.map +1 -1
- package/dist/fondue-components29.js.map +1 -1
- package/dist/fondue-components30.js.map +1 -1
- package/dist/fondue-components31.js.map +1 -1
- package/dist/fondue-components32.js +1 -1
- package/dist/fondue-components32.js.map +1 -1
- package/dist/fondue-components33.js.map +1 -1
- package/dist/fondue-components35.js.map +1 -1
- package/dist/fondue-components36.js.map +1 -1
- package/dist/fondue-components38.js.map +1 -1
- package/dist/fondue-components39.js.map +1 -1
- package/dist/fondue-components4.js.map +1 -1
- package/dist/fondue-components40.js +1 -1
- package/dist/fondue-components42.js +6 -6
- package/dist/fondue-components44.js.map +1 -1
- package/dist/fondue-components45.js +6 -6
- package/dist/fondue-components47.js.map +1 -1
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components5.js.map +1 -1
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +1 -1
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components54.js +1 -1
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +9 -9
- package/dist/fondue-components6.js.map +1 -1
- package/dist/fondue-components60.js +1 -1
- package/dist/fondue-components62.js +10 -38
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +38 -10
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components7.js.map +1 -1
- package/dist/fondue-components8.js.map +1 -1
- package/dist/fondue-components9.js +29 -16
- package/dist/fondue-components9.js.map +1 -1
- package/dist/index.d.ts +17 -2
- package/dist/style.css +1 -1
- package/package.json +48 -48
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AACL;AAGRH,EAAK,cAAc;"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { IconCross as
|
|
3
|
-
import * as
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { usePreventDropdownOverflow as
|
|
6
|
-
import { addAutoFocusAttribute as
|
|
1
|
+
import { jsx as a, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import { IconCross as C } from "@frontify/fondue-icons";
|
|
3
|
+
import * as r from "@radix-ui/react-popover";
|
|
4
|
+
import { forwardRef as s, useRef as b } from "react";
|
|
5
|
+
import { usePreventDropdownOverflow as A } from "./fondue-components39.js";
|
|
6
|
+
import { addAutoFocusAttribute as H, syncRefs as l, addShowFocusRing as P } from "./fondue-components36.js";
|
|
7
7
|
import u from "./fondue-components42.js";
|
|
8
|
-
const c = ({ children: t, ...o }) => /* @__PURE__ */ a(
|
|
8
|
+
const c = ({ children: t, ...o }) => /* @__PURE__ */ a(r.Root, { ...o, children: t });
|
|
9
9
|
c.displayName = "Flyout.Root";
|
|
10
|
-
const y = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-trigger" },
|
|
11
|
-
|
|
10
|
+
const y = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-trigger" }, d) => /* @__PURE__ */ a(
|
|
11
|
+
r.Trigger,
|
|
12
12
|
{
|
|
13
|
-
onMouseDown:
|
|
13
|
+
onMouseDown: H,
|
|
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: d,
|
|
19
19
|
children: o
|
|
20
20
|
}
|
|
21
21
|
);
|
|
@@ -24,58 +24,62 @@ const f = ({
|
|
|
24
24
|
align: t = "start",
|
|
25
25
|
maxWidth: o = "360px",
|
|
26
26
|
padding: e = "compact",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
rounded: d = "medium",
|
|
28
|
+
width: g = "fit-content",
|
|
29
|
+
shadow: N = "medium",
|
|
30
|
+
"data-test-id": h = "fondue-flyout-content",
|
|
31
|
+
children: R,
|
|
32
|
+
...v
|
|
33
|
+
}, n) => {
|
|
34
|
+
const i = b(null), { setMaxHeight: w } = A(i);
|
|
35
|
+
return /* @__PURE__ */ a(r.Portal, { children: /* @__PURE__ */ a(
|
|
36
|
+
r.Content,
|
|
35
37
|
{
|
|
36
38
|
style: {
|
|
37
|
-
"--flyout-max-width": o
|
|
39
|
+
"--flyout-max-width": o,
|
|
40
|
+
"--flyout-width": g
|
|
38
41
|
},
|
|
39
42
|
ref: i,
|
|
40
43
|
align: t,
|
|
41
44
|
collisionPadding: 8,
|
|
42
45
|
sideOffset: 8,
|
|
43
46
|
onOpenAutoFocus: () => {
|
|
44
|
-
|
|
47
|
+
w(), l(i, n);
|
|
45
48
|
},
|
|
46
49
|
onCloseAutoFocus: () => {
|
|
47
|
-
|
|
50
|
+
l(i, n);
|
|
48
51
|
},
|
|
49
52
|
className: u.root,
|
|
50
53
|
"data-flyout-spacing": e,
|
|
51
|
-
"data-rounded":
|
|
52
|
-
"data-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
"data-rounded": d,
|
|
55
|
+
"data-shadow": N,
|
|
56
|
+
"data-test-id": h,
|
|
57
|
+
onFocus: P,
|
|
58
|
+
...v,
|
|
59
|
+
children: R
|
|
56
60
|
}
|
|
57
61
|
) });
|
|
58
62
|
};
|
|
59
63
|
f.displayName = "Flyout.Content";
|
|
60
|
-
const m = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header" },
|
|
64
|
+
const m = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header" }, d) => /* @__PURE__ */ x("div", { "data-test-id": e, ref: d, className: u.header, children: [
|
|
61
65
|
/* @__PURE__ */ a("div", { children: o }),
|
|
62
|
-
t && /* @__PURE__ */ a(
|
|
66
|
+
t && /* @__PURE__ */ a(r.Close, { role: "button", "data-test-id": `${e}-close`, className: u.close, children: /* @__PURE__ */ a(C, { size: 20 }) })
|
|
63
67
|
] });
|
|
64
68
|
m.displayName = "Flyout.Header";
|
|
65
69
|
const p = ({ children: t, "data-test-id": o = "fondue-flyout-footer" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: u.footer, children: t });
|
|
66
70
|
p.displayName = "Flyout.Footer";
|
|
67
71
|
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: u.body, children: t });
|
|
68
72
|
F.displayName = "Flyout.Body";
|
|
69
|
-
const
|
|
73
|
+
const z = {
|
|
70
74
|
Root: c,
|
|
71
|
-
Trigger:
|
|
72
|
-
Content:
|
|
73
|
-
Header:
|
|
74
|
-
Footer:
|
|
75
|
-
Body:
|
|
75
|
+
Trigger: s(y),
|
|
76
|
+
Content: s(f),
|
|
77
|
+
Header: s(m),
|
|
78
|
+
Footer: s(p),
|
|
79
|
+
Body: s(F)
|
|
76
80
|
};
|
|
77
81
|
export {
|
|
78
|
-
|
|
82
|
+
z as Flyout,
|
|
79
83
|
F as FlyoutBody,
|
|
80
84
|
f as FlyoutContent,
|
|
81
85
|
p as FlyoutFooter,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components11.js","sources":["../src/components/Flyout/Flyout.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { forwardRef, useRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { usePreventDropdownOverflow } from '#/hooks/usePreventDropdownOverflow';\nimport { addAutoFocusAttribute, addShowFocusRing, syncRefs } from '#/utilities/domUtilities';\n\nimport styles from './styles/flyout.module.scss';\n\nexport type FlyoutRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the flyout\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport type FlyoutTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const FlyoutTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-flyout-trigger' }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.Trigger\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild={asChild}\n ref={ref}\n >\n {children}\n </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\nexport type FlyoutContentProps = {\n /**\n * Add rounded corners to the flyout\n * @default
|
|
1
|
+
{"version":3,"file":"fondue-components11.js","sources":["../src/components/Flyout/Flyout.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { forwardRef, useRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { usePreventDropdownOverflow } from '#/hooks/usePreventDropdownOverflow';\nimport { addAutoFocusAttribute, addShowFocusRing, syncRefs } from '#/utilities/domUtilities';\n\nimport styles from './styles/flyout.module.scss';\n\nexport type FlyoutRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the flyout\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport type FlyoutTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const FlyoutTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-flyout-trigger' }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.Trigger\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild={asChild}\n ref={ref}\n >\n {children}\n </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\nexport type FlyoutContentProps = {\n /**\n * Add a shadow to the flyout\n * @default \"medium\"\n */\n shadow?: 'none' | 'medium' | 'large';\n /**\n * Add rounded corners to the flyout\n * @default \"medium\"\n */\n rounded?: 'none' | 'medium' | 'large';\n /**\n * Define the prefered side of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Define the prefered alignment of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Define the padding of the flyout\n * @default \"compact\"\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Define the fixed width of the flyout\n * @default \"fit-content\"\n */\n width?: string;\n /**\n * Define the maximum width of the flyout\n * @default \"360px\"\n */\n maxWidth?: string;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const FlyoutContent = (\n {\n align = 'start',\n maxWidth = '360px',\n padding = 'compact',\n rounded = 'medium',\n width = 'fit-content',\n shadow = 'medium',\n 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const localRef = useRef(null);\n\n const { setMaxHeight } = usePreventDropdownOverflow(localRef);\n\n return (\n <RadixPopover.Portal>\n <RadixPopover.Content\n style={\n {\n '--flyout-max-width': maxWidth,\n '--flyout-width': width,\n } as CSSProperties\n }\n ref={localRef}\n align={align}\n collisionPadding={8}\n sideOffset={8}\n onOpenAutoFocus={() => {\n setMaxHeight();\n syncRefs(localRef, ref);\n }}\n onCloseAutoFocus={() => {\n syncRefs(localRef, ref);\n }}\n className={styles.root}\n data-flyout-spacing={padding}\n data-rounded={rounded}\n data-shadow={shadow}\n data-test-id={dataTestId}\n onFocus={addShowFocusRing}\n {...props}\n >\n {children}\n </RadixPopover.Content>\n </RadixPopover.Portal>\n );\n};\nFlyoutContent.displayName = 'Flyout.Content';\n\nexport type FlyoutHeaderProps = {\n /**\n * Show a close button in the header\n * @default false\n */\n showCloseButton?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const FlyoutHeader = (\n { showCloseButton, children, 'data-test-id': dataTestId = 'fondue-flyout-header' }: FlyoutHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.header}>\n <div>{children}</div>\n {showCloseButton && (\n <RadixPopover.Close role=\"button\" data-test-id={`${dataTestId}-close`} className={styles.close}>\n <IconCross size={20} />\n </RadixPopover.Close>\n )}\n </div>\n );\n};\nFlyoutHeader.displayName = 'Flyout.Header';\n\nexport type FlyoutFooterProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const FlyoutFooter = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-footer' }: FlyoutFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.footer}>\n {children}\n </div>\n );\n};\nFlyoutFooter.displayName = 'Flyout.Footer';\n\nexport type FlyoutBodyProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const FlyoutBody = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-body' }: FlyoutBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} data-flyout-spacing=\"compact\" className={styles.body}>\n {children}\n </div>\n );\n};\nFlyoutBody.displayName = 'Flyout.Body';\n\nexport const Flyout = {\n Root: FlyoutRoot,\n Trigger: forwardRef<HTMLButtonElement, FlyoutTriggerProps>(FlyoutTrigger),\n Content: forwardRef<HTMLDivElement, FlyoutContentProps>(FlyoutContent),\n Header: forwardRef<HTMLDivElement, FlyoutHeaderProps>(FlyoutHeader),\n Footer: forwardRef<HTMLDivElement, FlyoutFooterProps>(FlyoutFooter),\n Body: forwardRef<HTMLDivElement, FlyoutBodyProps>(FlyoutBody),\n};\n"],"names":["FlyoutRoot","children","props","RadixPopover","FlyoutTrigger","asChild","dataTestId","ref","jsx","addAutoFocusAttribute","FlyoutContent","align","maxWidth","padding","rounded","width","shadow","localRef","useRef","setMaxHeight","usePreventDropdownOverflow","syncRefs","styles","addShowFocusRing","FlyoutHeader","showCloseButton","IconCross","FlyoutFooter","FlyoutBody","Flyout","forwardRef"],"mappings":";;;;;;;AA6BO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAC9BC,EAAa,MAAb,EAAmB,GAAGD,GAAQ,UAAAD,GAAS;AAEnDD,EAAW,cAAc;AAYZ,MAAAI,IAAgB,CACzB,EAAE,SAAAC,IAAU,IAAM,UAAAJ,GAAU,gBAAgBK,IAAa,wBAAwB,GACjFC,MAGI,gBAAAC;AAAA,EAACL,EAAa;AAAA,EAAb;AAAA,IACG,aAAaM;AAAA,IACb,2BAAwB;AAAA,IACxB,2BAAuB;AAAA,IACvB,gBAAcH;AAAA,IACd,SAAAD;AAAA,IACA,KAAAE;AAAA,IAEC,UAAAN;AAAA,EAAA;AACL;AAGRG,EAAc,cAAc;AA0CrB,MAAMM,IAAgB,CACzB;AAAA,EACI,OAAAC,IAAQ;AAAA,EACR,UAAAC,IAAW;AAAA,EACX,SAAAC,IAAU;AAAA,EACV,SAAAC,IAAU;AAAA,EACV,OAAAC,IAAQ;AAAA,EACR,QAAAC,IAAS;AAAA,EACT,gBAAgBV,IAAa;AAAA,EAC7B,UAAAL;AAAA,EACA,GAAGC;AACP,GACAK,MACC;AACK,QAAAU,IAAWC,EAAO,IAAI,GAEtB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IAAa,CACtB,EAAE,UAAA3B,GAAU,gBAAgBK,IAAa,wBACzCC,MAGI,gBAAAC,EAAC,OAAI,EAAA,gBAAcF,GAAY,KAAAC,GAAU,uBAAoB,WAAU,WAAWe,EAAO,MACpF,UAAArB,EACL,CAAA;AAGR2B,EAAW,cAAc;AAElB,MAAMC,IAAS;AAAA,EAClB,MAAM7B;AAAA,EACN,SAAS8B,EAAkD1B,CAAa;AAAA,EACxE,SAAS0B,EAA+CpB,CAAa;AAAA,EACrE,QAAQoB,EAA8CN,CAAY;AAAA,EAClE,QAAQM,EAA8CH,CAAY;AAAA,EAClE,MAAMG,EAA4CF,CAAU;AAChE;"}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AACL;AAGRH,EAAK,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AACR,GAIKK,IAAQC,EAAyCT,CAAc;AAC5EQ,EAAM,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components14.js","sources":["../src/components/LoadingBar/LoadingBar.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as ProgressRadixPrimitive from '@radix-ui/react-progress';\nimport { forwardRef, type CSSProperties, type ElementRef, type ForwardedRef } from 'react';\n\nimport { loadingBarContainerStyles, loadingBarStyles } from './styles/loadingBarStyles';\n\nexport type LoadingBarProps = {\n /**\n * The current value of the loading bar. If `null`, the loading bar will be in an indeterminate state.\n * @default null\n */\n value: number | null;\n /**\n * The maximum value of the loading bar\n * @default 100\n */\n max?: number;\n /**\n * @default 'fondue-loading-bar'\n */\n 'data-test-id'?: string;\n /**\n * Add rounded corners to the loading bar\n * @default true\n */\n rounded?: boolean;\n /**\n * The style of the loading bar\n * @default \"default\"\n */\n variant?: 'default' | 'positive' | 'negative';\n /**\n * The size of the loading bar\n * @default \"medium\"\n */\n size?: 'small' | 'medium' | 'large' | 'x-large';\n /**\n * The label of the loading bar for accessibility purposes\n */\n getValueLabel?: (value: number, max: number) => string;\n} & ({ 'aria-label': string } | { 'aria-labelledby': string });\n\nexport const LoadingBar = forwardRef<ElementRef<typeof ProgressRadixPrimitive.Root>, LoadingBarProps>(\n (\n {\n value,\n max = 100,\n rounded = true,\n variant = 'default',\n size = 'medium',\n 'data-test-id': dataTestId = 'fondue-loading-bar',\n ...props\n }: LoadingBarProps,\n ref: ForwardedRef<ElementRef<typeof ProgressRadixPrimitive.Root>>,\n ) => {\n return (\n <ProgressRadixPrimitive.Root\n ref={ref}\n data-test-id={dataTestId}\n className={loadingBarContainerStyles({ rounded, size, variant })}\n aria-busy={value !== max}\n value={value}\n max={max}\n style={\n {\n '--loading-bar-value': value,\n '--loading-bar-max': max,\n '--loading-bar-proportion': 'calc(var(--loading-bar-value) / var(--loading-bar-max))',\n } as CSSProperties\n }\n {...props}\n >\n <ProgressRadixPrimitive.Indicator\n className={loadingBarStyles({ variant, indeterminateState: value === null })}\n />\n </ProgressRadixPrimitive.Root>\n );\n },\n);\nLoadingBar.displayName = 'LoadingBar';\n"],"names":["LoadingBar","forwardRef","value","max","rounded","variant","size","dataTestId","props","ref","jsx","ProgressRadixPrimitive","loadingBarContainerStyles","loadingBarStyles"],"mappings":";;;;AA2CO,MAAMA,IAAaC;AAAA,EACtB,CACI;AAAA,IACI,OAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,SAAAC,IAAU;AAAA,IACV,SAAAC,IAAU;AAAA,IACV,MAAAC,IAAO;AAAA,IACP,gBAAgBC,IAAa;AAAA,IAC7B,GAAGC;AAAA,KAEPC,MAGI,gBAAAC;AAAA,IAACC,EAAuB;AAAA,IAAvB;AAAA,MACG,KAAAF;AAAA,MACA,gBAAcF;AAAA,MACd,WAAWK,EAA0B,EAAE,SAAAR,GAAS,MAAAE,GAAM,SAAAD,GAAS;AAAA,MAC/D,aAAWH,MAAUC;AAAA,MACrB,OAAAD;AAAA,MACA,KAAAC;AAAA,MACA,OACI;AAAA,QACI,uBAAuBD;AAAA,QACvB,qBAAqBC;AAAA,QACrB,4BAA4B;AAAA,MAChC;AAAA,MAEH,GAAGK;AAAA,MAEJ,UAAA,gBAAAE;AAAA,QAACC,EAAuB;AAAA,QAAvB;AAAA,UACG,WAAWE,EAAiB,EAAE,SAAAR,GAAS,oBAAoBH,MAAU,
|
|
1
|
+
{"version":3,"file":"fondue-components14.js","sources":["../src/components/LoadingBar/LoadingBar.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as ProgressRadixPrimitive from '@radix-ui/react-progress';\nimport { forwardRef, type CSSProperties, type ElementRef, type ForwardedRef } from 'react';\n\nimport { loadingBarContainerStyles, loadingBarStyles } from './styles/loadingBarStyles';\n\nexport type LoadingBarProps = {\n /**\n * The current value of the loading bar. If `null`, the loading bar will be in an indeterminate state.\n * @default null\n */\n value: number | null;\n /**\n * The maximum value of the loading bar\n * @default 100\n */\n max?: number;\n /**\n * @default 'fondue-loading-bar'\n */\n 'data-test-id'?: string;\n /**\n * Add rounded corners to the loading bar\n * @default true\n */\n rounded?: boolean;\n /**\n * The style of the loading bar\n * @default \"default\"\n */\n variant?: 'default' | 'positive' | 'negative';\n /**\n * The size of the loading bar\n * @default \"medium\"\n */\n size?: 'small' | 'medium' | 'large' | 'x-large';\n /**\n * The label of the loading bar for accessibility purposes\n */\n getValueLabel?: (value: number, max: number) => string;\n} & ({ 'aria-label': string } | { 'aria-labelledby': string });\n\nexport const LoadingBar = forwardRef<ElementRef<typeof ProgressRadixPrimitive.Root>, LoadingBarProps>(\n (\n {\n value,\n max = 100,\n rounded = true,\n variant = 'default',\n size = 'medium',\n 'data-test-id': dataTestId = 'fondue-loading-bar',\n ...props\n }: LoadingBarProps,\n ref: ForwardedRef<ElementRef<typeof ProgressRadixPrimitive.Root>>,\n ) => {\n return (\n <ProgressRadixPrimitive.Root\n ref={ref}\n data-test-id={dataTestId}\n className={loadingBarContainerStyles({ rounded, size, variant })}\n aria-busy={value !== max}\n value={value}\n max={max}\n style={\n {\n '--loading-bar-value': value,\n '--loading-bar-max': max,\n '--loading-bar-proportion': 'calc(var(--loading-bar-value) / var(--loading-bar-max))',\n } as CSSProperties\n }\n {...props}\n >\n <ProgressRadixPrimitive.Indicator\n className={loadingBarStyles({ variant, indeterminateState: value === null })}\n />\n </ProgressRadixPrimitive.Root>\n );\n },\n);\nLoadingBar.displayName = 'LoadingBar';\n"],"names":["LoadingBar","forwardRef","value","max","rounded","variant","size","dataTestId","props","ref","jsx","ProgressRadixPrimitive","loadingBarContainerStyles","loadingBarStyles"],"mappings":";;;;AA2CO,MAAMA,IAAaC;AAAA,EACtB,CACI;AAAA,IACI,OAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,SAAAC,IAAU;AAAA,IACV,SAAAC,IAAU;AAAA,IACV,MAAAC,IAAO;AAAA,IACP,gBAAgBC,IAAa;AAAA,IAC7B,GAAGC;AAAA,KAEPC,MAGI,gBAAAC;AAAA,IAACC,EAAuB;AAAA,IAAvB;AAAA,MACG,KAAAF;AAAA,MACA,gBAAcF;AAAA,MACd,WAAWK,EAA0B,EAAE,SAAAR,GAAS,MAAAE,GAAM,SAAAD,GAAS;AAAA,MAC/D,aAAWH,MAAUC;AAAA,MACrB,OAAAD;AAAA,MACA,KAAAC;AAAA,MACA,OACI;AAAA,QACI,uBAAuBD;AAAA,QACvB,qBAAqBC;AAAA,QACrB,4BAA4B;AAAA,MAChC;AAAA,MAEH,GAAGK;AAAA,MAEJ,UAAA,gBAAAE;AAAA,QAACC,EAAuB;AAAA,QAAvB;AAAA,UACG,WAAWE,EAAiB,EAAE,SAAAR,GAAS,oBAAoBH,MAAU,KAAM,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAC/E;AAAA,EACJ;AAGZ;AACAF,EAAW,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components15.js","sources":["../src/components/ScrollArea/ScrollArea.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as RadixScrollArea from '@radix-ui/react-scroll-area';\nimport { type ForwardedRef, forwardRef, type ReactElement, type ReactNode } from 'react';\n\nimport styles from './styles/scrollArea.module.scss';\n\nexport type ScrollAreaProps = {\n /**\n * \"auto\" visible when content is overflowing on the corresponding orientation.\n * \"always\" always visible regardless of whether the content is overflowing.\n * \"scroll\" visible when the user is scrolling along its corresponding orientation.\n * \"hover\" when the user is hovering over the scroll area.\n * @default 'hover'\n */\n type?: 'auto' | 'always' | 'scroll' | 'hover';\n /**\n * Maximum height of the scroll area\n * @default '100%'\n */\n maxHeight?: string | number;\n /**\n * Minimum width of the scroll area\n * @default '100%'\n */\n maxWidth?: string | number;\n 'data-test-id'?: string;\n children: ReactNode;\n};\n\nconst ScrollAreaComponent = (\n {\n type,\n maxHeight = '100%',\n maxWidth = '100%',\n children,\n 'data-test-id': dataTestId = 'fondue-scroll-area',\n }: ScrollAreaProps,\n ref: ForwardedRef<HTMLDivElement>,\n): ReactElement => {\n return (\n <RadixScrollArea.Root\n type={type}\n className={styles.root}\n style={{ maxWidth }}\n data-test-id={dataTestId}\n ref={ref}\n >\n <RadixScrollArea.Viewport\n className={styles.viewport}\n style={{ maxHeight }}\n data-test-id={`${dataTestId}-viewport`}\n >\n {children}\n </RadixScrollArea.Viewport>\n <RadixScrollArea.Scrollbar\n className={styles.scrollbar}\n orientation=\"vertical\"\n data-test-id={`${dataTestId}-vertical-scrollbar`}\n >\n <RadixScrollArea.Thumb\n className={styles.thumb}\n data-test-id={`${dataTestId}-vertical-scrollbar-thumb`}\n />\n </RadixScrollArea.Scrollbar>\n <RadixScrollArea.Scrollbar\n className={styles.scrollbar}\n orientation=\"horizontal\"\n data-test-id={`${dataTestId}-horizontal-scrollbar`}\n >\n <RadixScrollArea.Thumb\n className={styles.thumb}\n data-test-id={`${dataTestId}-horizontal-scrollbar-thumb`}\n />\n </RadixScrollArea.Scrollbar>\n <RadixScrollArea.Corner className={styles.corner} data-test-id={`${dataTestId}-corner`} />\n </RadixScrollArea.Root>\n );\n};\n\nexport const ScrollArea = forwardRef<HTMLDivElement, ScrollAreaProps>(ScrollAreaComponent);\nScrollArea.displayName = 'ScrollArea';\n"],"names":["ScrollAreaComponent","type","maxHeight","maxWidth","children","dataTestId","ref","jsxs","RadixScrollArea","styles","jsx","ScrollArea","forwardRef"],"mappings":";;;;AA8BA,MAAMA,IAAsB,CACxB;AAAA,EACI,MAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,UAAAC,IAAW;AAAA,EACX,UAAAC;AAAA,EACA,gBAAgBC,IAAa;AACjC,GACAC,MAGI,gBAAAC;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACG,MAAAP;AAAA,IACA,WAAWQ,EAAO;AAAA,IAClB,OAAO,EAAE,UAAAN,EAAS;AAAA,IAClB,gBAAcE;AAAA,IACd,KAAAC;AAAA,IAEA,UAAA;AAAA,MAAA,gBAAAI;AAAA,QAACF,EAAgB;AAAA,QAAhB;AAAA,UACG,WAAWC,EAAO;AAAA,UAClB,OAAO,EAAE,WAAAP,EAAU;AAAA,UACnB,gBAAc,GAAGG,CAAU;AAAA,UAE1B,UAAAD;AAAA,QAAA;AAAA,MACL;AAAA,MACA,gBAAAM;AAAA,QAACF,EAAgB;AAAA,QAAhB;AAAA,UACG,WAAWC,EAAO;AAAA,UAClB,aAAY;AAAA,UACZ,gBAAc,GAAGJ,CAAU;AAAA,UAE3B,UAAA,gBAAAK;AAAA,YAACF,EAAgB;AAAA,YAAhB;AAAA,cACG,WAAWC,EAAO;AAAA,cAClB,gBAAc,GAAGJ,CAAU;AAAA,YAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"fondue-components15.js","sources":["../src/components/ScrollArea/ScrollArea.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as RadixScrollArea from '@radix-ui/react-scroll-area';\nimport { type ForwardedRef, forwardRef, type ReactElement, type ReactNode } from 'react';\n\nimport styles from './styles/scrollArea.module.scss';\n\nexport type ScrollAreaProps = {\n /**\n * \"auto\" visible when content is overflowing on the corresponding orientation.\n * \"always\" always visible regardless of whether the content is overflowing.\n * \"scroll\" visible when the user is scrolling along its corresponding orientation.\n * \"hover\" when the user is hovering over the scroll area.\n * @default 'hover'\n */\n type?: 'auto' | 'always' | 'scroll' | 'hover';\n /**\n * Maximum height of the scroll area\n * @default '100%'\n */\n maxHeight?: string | number;\n /**\n * Minimum width of the scroll area\n * @default '100%'\n */\n maxWidth?: string | number;\n 'data-test-id'?: string;\n children: ReactNode;\n};\n\nconst ScrollAreaComponent = (\n {\n type,\n maxHeight = '100%',\n maxWidth = '100%',\n children,\n 'data-test-id': dataTestId = 'fondue-scroll-area',\n }: ScrollAreaProps,\n ref: ForwardedRef<HTMLDivElement>,\n): ReactElement => {\n return (\n <RadixScrollArea.Root\n type={type}\n className={styles.root}\n style={{ maxWidth }}\n data-test-id={dataTestId}\n ref={ref}\n >\n <RadixScrollArea.Viewport\n className={styles.viewport}\n style={{ maxHeight }}\n data-test-id={`${dataTestId}-viewport`}\n >\n {children}\n </RadixScrollArea.Viewport>\n <RadixScrollArea.Scrollbar\n className={styles.scrollbar}\n orientation=\"vertical\"\n data-test-id={`${dataTestId}-vertical-scrollbar`}\n >\n <RadixScrollArea.Thumb\n className={styles.thumb}\n data-test-id={`${dataTestId}-vertical-scrollbar-thumb`}\n />\n </RadixScrollArea.Scrollbar>\n <RadixScrollArea.Scrollbar\n className={styles.scrollbar}\n orientation=\"horizontal\"\n data-test-id={`${dataTestId}-horizontal-scrollbar`}\n >\n <RadixScrollArea.Thumb\n className={styles.thumb}\n data-test-id={`${dataTestId}-horizontal-scrollbar-thumb`}\n />\n </RadixScrollArea.Scrollbar>\n <RadixScrollArea.Corner className={styles.corner} data-test-id={`${dataTestId}-corner`} />\n </RadixScrollArea.Root>\n );\n};\n\nexport const ScrollArea = forwardRef<HTMLDivElement, ScrollAreaProps>(ScrollAreaComponent);\nScrollArea.displayName = 'ScrollArea';\n"],"names":["ScrollAreaComponent","type","maxHeight","maxWidth","children","dataTestId","ref","jsxs","RadixScrollArea","styles","jsx","ScrollArea","forwardRef"],"mappings":";;;;AA8BA,MAAMA,IAAsB,CACxB;AAAA,EACI,MAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,UAAAC,IAAW;AAAA,EACX,UAAAC;AAAA,EACA,gBAAgBC,IAAa;AACjC,GACAC,MAGI,gBAAAC;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACG,MAAAP;AAAA,IACA,WAAWQ,EAAO;AAAA,IAClB,OAAO,EAAE,UAAAN,EAAS;AAAA,IAClB,gBAAcE;AAAA,IACd,KAAAC;AAAA,IAEA,UAAA;AAAA,MAAA,gBAAAI;AAAA,QAACF,EAAgB;AAAA,QAAhB;AAAA,UACG,WAAWC,EAAO;AAAA,UAClB,OAAO,EAAE,WAAAP,EAAU;AAAA,UACnB,gBAAc,GAAGG,CAAU;AAAA,UAE1B,UAAAD;AAAA,QAAA;AAAA,MACL;AAAA,MACA,gBAAAM;AAAA,QAACF,EAAgB;AAAA,QAAhB;AAAA,UACG,WAAWC,EAAO;AAAA,UAClB,aAAY;AAAA,UACZ,gBAAc,GAAGJ,CAAU;AAAA,UAE3B,UAAA,gBAAAK;AAAA,YAACF,EAAgB;AAAA,YAAhB;AAAA,cACG,WAAWC,EAAO;AAAA,cAClB,gBAAc,GAAGJ,CAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QAC/B;AAAA,MACJ;AAAA,MACA,gBAAAK;AAAA,QAACF,EAAgB;AAAA,QAAhB;AAAA,UACG,WAAWC,EAAO;AAAA,UAClB,aAAY;AAAA,UACZ,gBAAc,GAAGJ,CAAU;AAAA,UAE3B,UAAA,gBAAAK;AAAA,YAACF,EAAgB;AAAA,YAAhB;AAAA,cACG,WAAWC,EAAO;AAAA,cAClB,gBAAc,GAAGJ,CAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QAC/B;AAAA,MACJ;AAAA,MACA,gBAAAK,EAACF,EAAgB,QAAhB,EAAuB,WAAWC,EAAO,QAAQ,gBAAc,GAAGJ,CAAU,UAAW,CAAA;AAAA,IAAA;AAAA,EAAA;AAC5F,GAIKM,IAAaC,EAA4CZ,CAAmB;AACzFW,EAAW,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components17.js","sources":["../src/components/SegmentedControl/SegmentedControl.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { forwardRef, type ForwardedRef, type ReactNode } from 'react';\n\nimport { useControllableState } from '#/hooks/useControllableState';\n\nimport styles from './styles/segmentedControl.module.scss';\n\nexport type SegmentedControlRootProps = {\n id?: string;\n children: ReactNode;\n /**\n * The default value of the segmented control\n * Used for uncontrolled components\n */\n defaultValue: string;\n /**\n * The controlled value of the segmented control\n */\n value?: string;\n /**\n * Event handler called when the value changes\n */\n onValueChange?: (value: string) => void;\n /**\n * Disable the segmented control\n * @default false\n */\n disabled?: boolean;\n};\n\nexport const SegmentedControlRoot = (\n { children, value: propsValue, defaultValue, onValueChange, ...rootProps }: SegmentedControlRootProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const [value, setValue] = useControllableState({\n prop: propsValue,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n return (\n <ToggleGroupPrimitive.Root\n ref={ref}\n {...rootProps}\n className={styles.root}\n onValueChange={(value) => {\n if (value) {\n setValue(value);\n }\n }}\n value={value}\n type=\"single\"\n asChild={false}\n aria-disabled={rootProps.disabled}\n >\n {children}\n {/* Active indicator */}\n <div className={styles.activeIndicator} />\n </ToggleGroupPrimitive.Root>\n );\n};\nSegmentedControlRoot.displayName = 'SegmentedControl.Root';\n\ntype SegmentedControlItemProps = {\n children: ReactNode;\n value: string;\n};\n\nexport const SegmentedControlItem = (\n { children, ...itemProps }: SegmentedControlItemProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => (\n <ToggleGroupPrimitive.Item ref={ref} {...itemProps} className={styles.item} asChild={false}>\n {/* Separator */}\n <span className={styles.separator} />\n <span className={styles.itemLabel}>\n {/* Active children */}\n <span className={styles.itemLabelActive}>{children}</span>\n\n {/* Inactive children */}\n <span className={styles.itemLabelInactive}>{children}</span>\n </span>\n </ToggleGroupPrimitive.Item>\n);\nSegmentedControlItem.displayName = 'SegmentedControl.Item';\n\nexport const SegmentedControl = {\n Root: forwardRef<HTMLDivElement, SegmentedControlRootProps>(SegmentedControlRoot),\n Item: forwardRef<HTMLButtonElement, SegmentedControlItemProps>(SegmentedControlItem),\n};\n"],"names":["SegmentedControlRoot","children","propsValue","defaultValue","onValueChange","rootProps","ref","value","setValue","useControllableState","jsxs","ToggleGroupPrimitive","styles","jsx","SegmentedControlItem","itemProps","SegmentedControl","forwardRef"],"mappings":";;;;;AAgCa,MAAAA,IAAuB,CAChC,EAAE,UAAAC,GAAU,OAAOC,GAAY,cAAAC,GAAc,eAAAC,GAAe,GAAGC,EAAU,GACzEC,MACC;AACD,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAqB;AAAA,IAC3C,MAAMP;AAAA,IACN,aAAaC;AAAA,IACb,UAAUC;AAAA,EAAA,CACb;AAGG,SAAA,gBAAAM;AAAA,IAACC,EAAqB;AAAA,IAArB;AAAA,MACG,KAAAL;AAAA,MACC,GAAGD;AAAA,MACJ,WAAWO,EAAO;AAAA,MAClB,eAAe,CAACL,MAAU;AACtB,QAAIA,KACAC,EAASD,CAAK;AAAA,MAEtB;AAAA,MACA,OAAAA;AAAA,MACA,MAAK;AAAA,MACL,SAAS;AAAA,MACT,iBAAeF,EAAU;AAAA,MAExB,UAAA;AAAA,QAAAJ;AAAA,QAEA,gBAAAY,EAAA,OAAA,EAAI,WAAWD,EAAO,gBAAiB,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"fondue-components17.js","sources":["../src/components/SegmentedControl/SegmentedControl.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { forwardRef, type ForwardedRef, type ReactNode } from 'react';\n\nimport { useControllableState } from '#/hooks/useControllableState';\n\nimport styles from './styles/segmentedControl.module.scss';\n\nexport type SegmentedControlRootProps = {\n id?: string;\n children: ReactNode;\n /**\n * The default value of the segmented control\n * Used for uncontrolled components\n */\n defaultValue: string;\n /**\n * The controlled value of the segmented control\n */\n value?: string;\n /**\n * Event handler called when the value changes\n */\n onValueChange?: (value: string) => void;\n /**\n * Disable the segmented control\n * @default false\n */\n disabled?: boolean;\n};\n\nexport const SegmentedControlRoot = (\n { children, value: propsValue, defaultValue, onValueChange, ...rootProps }: SegmentedControlRootProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const [value, setValue] = useControllableState({\n prop: propsValue,\n defaultProp: defaultValue,\n onChange: onValueChange,\n });\n\n return (\n <ToggleGroupPrimitive.Root\n ref={ref}\n {...rootProps}\n className={styles.root}\n onValueChange={(value) => {\n if (value) {\n setValue(value);\n }\n }}\n value={value}\n type=\"single\"\n asChild={false}\n aria-disabled={rootProps.disabled}\n >\n {children}\n {/* Active indicator */}\n <div className={styles.activeIndicator} />\n </ToggleGroupPrimitive.Root>\n );\n};\nSegmentedControlRoot.displayName = 'SegmentedControl.Root';\n\ntype SegmentedControlItemProps = {\n children: ReactNode;\n value: string;\n};\n\nexport const SegmentedControlItem = (\n { children, ...itemProps }: SegmentedControlItemProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => (\n <ToggleGroupPrimitive.Item ref={ref} {...itemProps} className={styles.item} asChild={false}>\n {/* Separator */}\n <span className={styles.separator} />\n <span className={styles.itemLabel}>\n {/* Active children */}\n <span className={styles.itemLabelActive}>{children}</span>\n\n {/* Inactive children */}\n <span className={styles.itemLabelInactive}>{children}</span>\n </span>\n </ToggleGroupPrimitive.Item>\n);\nSegmentedControlItem.displayName = 'SegmentedControl.Item';\n\nexport const SegmentedControl = {\n Root: forwardRef<HTMLDivElement, SegmentedControlRootProps>(SegmentedControlRoot),\n Item: forwardRef<HTMLButtonElement, SegmentedControlItemProps>(SegmentedControlItem),\n};\n"],"names":["SegmentedControlRoot","children","propsValue","defaultValue","onValueChange","rootProps","ref","value","setValue","useControllableState","jsxs","ToggleGroupPrimitive","styles","jsx","SegmentedControlItem","itemProps","SegmentedControl","forwardRef"],"mappings":";;;;;AAgCa,MAAAA,IAAuB,CAChC,EAAE,UAAAC,GAAU,OAAOC,GAAY,cAAAC,GAAc,eAAAC,GAAe,GAAGC,EAAU,GACzEC,MACC;AACD,QA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.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretDown, IconCheckMark, IconExclamationMarkTriangle } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { Slot as RadixSlot } from '@radix-ui/react-slot';\nimport { useSelect } from 'downshift';\nimport { forwardRef, useRef, useState, type ForwardedRef, type ReactNode } from 'react';\n\nimport { ForwardedRefCombobox } from './Combobox';\nimport { ForwardedRefSelectItem, ForwardedRefSelectItemGroup } from './SelectItem';\nimport { SelectMenu } from './SelectMenu';\nimport { ForwardedRefSelectSlot } from './SelectSlot';\nimport styles from './styles/select.module.scss';\nimport { useSelectData } from './useSelectData';\n\nexport type SelectComponentProps = {\n /**\n * Children of the Select component. This can contain the `Select.Slot` components for the label, decorators, clear action and menu.\n */\n children?: ReactNode;\n /**\n * Callback function that is called when an item is selected.\n */\n onSelect?: (selectedValue: string) => void;\n /**\n * The active value in the select component. This is used to control the select externally.\n */\n value?: string;\n /**\n * The default value of the select component. Used for uncontrolled usages.\n */\n defaultValue?: string;\n /**\n * The placeholder in the select component.\n */\n placeholder?: string;\n /**\n * Status of the text input\n * @default \"neutral\"\n */\n status?: 'neutral' | 'success' | 'error';\n /**\n * Disables the select component.\n */\n disabled?: boolean;\n /**\n * The alignment of the menu.\n * @default \"start\"\n */\n alignMenu?: 'start' | 'center' | 'end';\n /**\n * The aria label of the select component.\n */\n 'aria-label'?: string;\n /**\n * The data test id of the select component.\n */\n 'data-test-id'?: string;\n};\n\nexport const SelectInput = (\n {\n children,\n onSelect,\n value,\n defaultValue,\n placeholder = '',\n status = 'neutral',\n disabled,\n alignMenu = 'start',\n 'aria-label': ariaLabel,\n 'data-test-id': dataTestId = 'fondue-select',\n }: SelectComponentProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) => {\n const { inputSlots, menuSlots, items, clearButton, getItemByValue } = useSelectData(children);\n\n const defaultItem = getItemByValue(defaultValue);\n const activeItem = getItemByValue(value);\n\n const wasClicked = useRef(false);\n\n const [hasInteractedSinceOpening, setHasInteractedSinceOpening] = useState(false);\n\n const { getToggleButtonProps, getMenuProps, getItemProps, reset, selectedItem, isOpen, highlightedIndex } =\n useSelect({\n items,\n defaultSelectedItem: defaultItem,\n selectedItem: activeItem,\n onIsOpenChange: () => {\n setHasInteractedSinceOpening(false);\n },\n onHighlightedIndexChange: () => {\n setHasInteractedSinceOpening(true);\n },\n onSelectedItemChange: ({ selectedItem }) => {\n onSelect && onSelect(selectedItem.value);\n },\n itemToString: (item) => (item ? item.label : ''),\n });\n\n return (\n <RadixPopover.Root open={isOpen}>\n <RadixPopover.Anchor\n asChild\n onMouseDown={(mouseEvent) => {\n wasClicked.current = true;\n mouseEvent.currentTarget.dataset.showFocusRing = 'false';\n }}\n onFocus={(focusEvent) => {\n if (!wasClicked.current) {\n focusEvent.target.dataset.showFocusRing = 'true';\n }\n }}\n onBlur={(blurEvent) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasClicked.current = false;\n }}\n >\n <div\n className={styles.root}\n data-status={status}\n data-disabled={disabled}\n data-empty={!selectedItem}\n data-test-id={dataTestId}\n {...(disabled\n ? {}\n : getToggleButtonProps({\n 'aria-label': ariaLabel,\n ...(forwardedRef ? { ref: forwardedRef } : {}),\n }))}\n >\n <span className={styles.selectedValue}>{selectedItem ? selectedItem.label : placeholder}</span>\n {inputSlots}\n {clearButton && (\n <RadixSlot\n onClick={(event) => {\n event.stopPropagation();\n reset();\n }}\n className={styles.clear}\n >\n {clearButton}\n </RadixSlot>\n )}\n <div className={styles.icons}>\n <IconCaretDown size={16} className={styles.caret} />\n {status === 'success' ? (\n <IconCheckMark\n size={16}\n className={styles.iconSuccess}\n data-test-id={`${dataTestId}-success-icon`}\n />\n ) : null}\n {status === 'error' ? (\n <IconExclamationMarkTriangle\n size={16}\n className={styles.iconError}\n data-test-id={`${dataTestId}-error-icon`}\n />\n ) : null}\n </div>\n </div>\n </RadixPopover.Anchor>\n\n <SelectMenu\n align={alignMenu}\n highlightedIndex={highlightedIndex}\n getMenuProps={getMenuProps}\n getItemProps={getItemProps}\n selectedItem={selectedItem}\n hasInteractedSinceOpening={hasInteractedSinceOpening}\n >\n {menuSlots}\n </SelectMenu>\n </RadixPopover.Root>\n );\n};\nSelectInput.displayName = 'Select';\n\nexport const ForwardedRefSelect = forwardRef<HTMLDivElement, SelectComponentProps>(SelectInput);\n\n// @ts-expect-error We support both Select and Select.Combobox as the Root\nexport const Select: typeof SelectInput & {\n Combobox: typeof ForwardedRefCombobox;\n Item: typeof ForwardedRefSelectItem;\n Group: typeof ForwardedRefSelectItemGroup;\n Slot: typeof ForwardedRefSelectSlot;\n} = ForwardedRefSelect;\nSelect.displayName = 'Select';\nSelect.Combobox = ForwardedRefCombobox;\nSelect.Combobox.displayName = 'Select.Combobox';\nSelect.Item = ForwardedRefSelectItem;\nSelect.Item.displayName = 'Select.Item';\nSelect.Group = ForwardedRefSelectItemGroup;\nSelect.Group.displayName = 'Select.Group';\nSelect.Slot = ForwardedRefSelectSlot;\nSelect.Slot.displayName = 'Select.Slot';\n"],"names":["SelectInput","children","onSelect","value","defaultValue","placeholder","status","disabled","alignMenu","ariaLabel","dataTestId","forwardedRef","inputSlots","menuSlots","items","clearButton","getItemByValue","useSelectData","defaultItem","activeItem","wasClicked","useRef","hasInteractedSinceOpening","setHasInteractedSinceOpening","useState","getToggleButtonProps","getMenuProps","getItemProps","reset","selectedItem","isOpen","highlightedIndex","useSelect","item","jsxs","RadixPopover","jsx","mouseEvent","focusEvent","blurEvent","styles","RadixSlot","event","IconCaretDown","IconCheckMark","IconExclamationMarkTriangle","SelectMenu","ForwardedRefSelect","forwardRef","Select","ForwardedRefCombobox","ForwardedRefSelectItem","ForwardedRefSelectItemGroup","ForwardedRefSelectSlot"],"mappings":";;;;;;;;;;;;AA4DO,MAAMA,IAAc,CACvB;AAAA,EACI,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,E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AA;AAAA,IACJ;AAAA,IAEA,gBAAA0B;AAAA,MAACU;AAAA,MAAA;AAAA,QACG,OAAOtC;AAAA,QACP,kBAAAuB;AAAA,QACA,cAAAL;AAAA,QACA,cAAAC;AAAA,QACA,cAAAE;AAAA,QACA,2BAAAP;AAAA,QAEC,UAAAT;AAAA,MAAA;AAAA,IACL;AAAA,EACJ,EAAA,CAAA;AAER;AACAb,EAAY,cAAc;AAEb,MAAA+C,IAAqBC,EAAiDhD,CAAW,GAGjFiD,IAKTF;AACJE,EAAO,cAAc;AACrBA,EAAO,WAAWC;AAClBD,EAAO,SAAS,cAAc;AAC9BA,EAAO,OAAOE;AACdF,EAAO,KAAK,cAAc;AAC1BA,EAAO,QAAQG;AACfH,EAAO,MAAM,cAAc;AAC3BA,EAAO,OAAOI;AACdJ,EAAO,KAAK,cAAc;"}
|
|
1
|
+
{"version":3,"file":"fondue-components18.js","sources":["../src/components/Select/Select.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretDown, IconCheckMark, IconExclamationMarkTriangle } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { Slot as RadixSlot } from '@radix-ui/react-slot';\nimport { useSelect } from 'downshift';\nimport { forwardRef, useRef, useState, type ForwardedRef, type ReactNode } from 'react';\n\nimport { ForwardedRefCombobox } from './Combobox';\nimport { ForwardedRefSelectItem, ForwardedRefSelectItemGroup } from './SelectItem';\nimport { SelectMenu } from './SelectMenu';\nimport { ForwardedRefSelectSlot } from './SelectSlot';\nimport styles from './styles/select.module.scss';\nimport { useSelectData } from './useSelectData';\n\nexport type SelectComponentProps = {\n /**\n * Children of the Select component. This can contain the `Select.Slot` components for the label, decorators, clear action and menu.\n */\n children?: ReactNode;\n /**\n * Callback function that is called when an item is selected.\n */\n onSelect?: (selectedValue: string) => void;\n /**\n * The active value in the select component. This is used to control the select externally.\n */\n value?: string;\n /**\n * The default value of the select component. Used for uncontrolled usages.\n */\n defaultValue?: string;\n /**\n * The placeholder in the select component.\n */\n placeholder?: string;\n /**\n * Status of the text input\n * @default \"neutral\"\n */\n status?: 'neutral' | 'success' | 'error';\n /**\n * Disables the select component.\n */\n disabled?: boolean;\n /**\n * The alignment of the menu.\n * @default \"start\"\n */\n alignMenu?: 'start' | 'center' | 'end';\n /**\n * The aria label of the select component.\n */\n 'aria-label'?: string;\n /**\n * The data test id of the select component.\n */\n 'data-test-id'?: string;\n};\n\nexport const SelectInput = (\n {\n children,\n onSelect,\n value,\n defaultValue,\n placeholder = '',\n status = 'neutral',\n disabled,\n alignMenu = 'start',\n 'aria-label': ariaLabel,\n 'data-test-id': dataTestId = 'fondue-select',\n }: SelectComponentProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) => {\n const { inputSlots, menuSlots, items, clearButton, getItemByValue } = useSelectData(children);\n\n const defaultItem = getItemByValue(defaultValue);\n const activeItem = getItemByValue(value);\n\n const wasClicked = useRef(false);\n\n const [hasInteractedSinceOpening, setHasInteractedSinceOpening] = useState(false);\n\n const { getToggleButtonProps, getMenuProps, getItemProps, reset, selectedItem, isOpen, highlightedIndex } =\n useSelect({\n items,\n defaultSelectedItem: defaultItem,\n selectedItem: activeItem,\n onIsOpenChange: () => {\n setHasInteractedSinceOpening(false);\n },\n onHighlightedIndexChange: () => {\n setHasInteractedSinceOpening(true);\n },\n onSelectedItemChange: ({ selectedItem }) => {\n onSelect && onSelect(selectedItem.value);\n },\n itemToString: (item) => (item ? item.label : ''),\n });\n\n return (\n <RadixPopover.Root open={isOpen}>\n <RadixPopover.Anchor\n asChild\n onMouseDown={(mouseEvent) => {\n wasClicked.current = true;\n mouseEvent.currentTarget.dataset.showFocusRing = 'false';\n }}\n onFocus={(focusEvent) => {\n if (!wasClicked.current) {\n focusEvent.target.dataset.showFocusRing = 'true';\n }\n }}\n onBlur={(blurEvent) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasClicked.current = false;\n }}\n >\n <div\n className={styles.root}\n data-status={status}\n data-disabled={disabled}\n data-empty={!selectedItem}\n data-test-id={dataTestId}\n {...(disabled\n ? {}\n : getToggleButtonProps({\n 'aria-label': ariaLabel,\n ...(forwardedRef ? { ref: forwardedRef } : {}),\n }))}\n >\n <span className={styles.selectedValue}>{selectedItem ? selectedItem.label : placeholder}</span>\n {inputSlots}\n {clearButton && (\n <RadixSlot\n onClick={(event) => {\n event.stopPropagation();\n reset();\n }}\n className={styles.clear}\n >\n {clearButton}\n </RadixSlot>\n )}\n <div className={styles.icons}>\n <IconCaretDown size={16} className={styles.caret} />\n {status === 'success' ? (\n <IconCheckMark\n size={16}\n className={styles.iconSuccess}\n data-test-id={`${dataTestId}-success-icon`}\n />\n ) : null}\n {status === 'error' ? (\n <IconExclamationMarkTriangle\n size={16}\n className={styles.iconError}\n data-test-id={`${dataTestId}-error-icon`}\n />\n ) : null}\n </div>\n </div>\n </RadixPopover.Anchor>\n\n <SelectMenu\n align={alignMenu}\n highlightedIndex={highlightedIndex}\n getMenuProps={getMenuProps}\n getItemProps={getItemProps}\n selectedItem={selectedItem}\n hasInteractedSinceOpening={hasInteractedSinceOpening}\n >\n {menuSlots}\n </SelectMenu>\n </RadixPopover.Root>\n );\n};\nSelectInput.displayName = 'Select';\n\nexport const ForwardedRefSelect = forwardRef<HTMLDivElement, SelectComponentProps>(SelectInput);\n\n// @ts-expect-error We support both Select and Select.Combobox as the Root\nexport const Select: typeof SelectInput & {\n Combobox: typeof ForwardedRefCombobox;\n Item: typeof ForwardedRefSelectItem;\n Group: typeof ForwardedRefSelectItemGroup;\n Slot: typeof ForwardedRefSelectSlot;\n} = ForwardedRefSelect;\nSelect.displayName = 'Select';\nSelect.Combobox = ForwardedRefCombobox;\nSelect.Combobox.displayName = 'Select.Combobox';\nSelect.Item = ForwardedRefSelectItem;\nSelect.Item.displayName = 'Select.Item';\nSelect.Group = ForwardedRefSelectItemGroup;\nSelect.Group.displayName = 'Select.Group';\nSelect.Slot = ForwardedRefSelectSlot;\nSelect.Slot.displayName = 'Select.Slot';\n"],"names":["SelectInput","children","onSelect","value","defaultValue","placeholder","status","disabled","alignMenu","ariaLabel","dataTestId","forwardedRef","inputSlots","menuSlots","items","clearButton","getItemByValue","useSelectData","defaultItem","activeItem","wasClicked","useRef","hasInteractedSinceOpening","setHasInteractedSinceOpening","useState","getToggleButtonProps","getMenuProps","getItemProps","reset","selectedItem","isOpen","highlightedIndex","useSelect","item","jsxs","RadixPopover","jsx","mouseEvent","focusEvent","blurEvent","styles","RadixSlot","event","IconCaretDown","IconCheckMark","IconExclamationMarkTriangle","SelectMenu","ForwardedRefSelect","forwardRef","Select","ForwardedRefCombobox","ForwardedRefSelectItem","ForwardedRefSelectItemGroup","ForwardedRefSelectSlot"],"mappings":";;;;;;;;;;;;AA4DO,MAAMA,IAAc,CACvB;AAAA,EACI,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,QAAAC,IAAS;AAAA,EACT,UAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,cAAcC;AAAA,EACd,gBAAgBC,IAAa;AACjC,GACAC,MACC;AACK,QAAA,EAAE,YAAAC,GAAY,WAAAC,GAAW,OAAAC,GAAO,aAAAC,GAAa,gBAAAC,EAAe,IAAIC,EAAchB,CAAQ,GAEtFiB,IAAcF,EAAeZ,CAAY,GACzCe,IAAaH,EAAeb,CAAK,GAEjCiB,IAAaC,EAAO,EAAK,GAEzB,CAACC,GAA2BC,CAA4B,IAAIC,EAAS,EAAK,GAE1E,EAAE,sBAAAC,GAAsB,cAAAC,GAAc,cAAAC,GAAc,OAAAC,GAAO,cAAAC,GAAc,QAAAC,GAAQ,kBAAAC,EAAiB,IACpGC,EAAU;AAAA,IACN,OAAAlB;AAAA,IACA,qBAAqBI;AAAA,IACrB,cAAcC;AAAA,IACd,gBAAgB,MAAM;AAClB,MAAAI,EAA6B,EAAK;AAAA,IACtC;AAAA,IACA,0BAA0B,M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BAEjB,UAAAzB;AAAA,gBAAA;AAAA,cACL;AAAA,cAEH,gBAAAmB,EAAA,OAAA,EAAI,WAAWM,EAAO,OACnB,UAAA;AAAA,gBAAA,gBAAAJ,EAACO,GAAc,EAAA,MAAM,IAAI,WAAWH,EAAO,OAAO;AAAA,gBACjDlC,MAAW,YACR,gBAAA8B;AAAA,kBAACQ;AAAA,kBAAA;AAAA,oBACG,MAAM;AAAA,oBACN,WAAWJ,EAAO;AAAA,oBAClB,gBAAc,GAAG9B,CAAU;AAAA,kBAAA;AAAA,gBAAA,IAE/B;AAAA,gBACHJ,MAAW,UACR,gBAAA8B;AAAA,kBAACS;AAAA,kBAAA;AAAA,oBACG,MAAM;AAAA,oBACN,WAAWL,EAAO;AAAA,oBAClB,gBAAc,GAAG9B,CAAU;AAAA,kBAAA;AAAA,gBAAA,IAE/B;AAAA,cAAA,EACR,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACJ;AAAA,IACJ;AAAA,IAEA,gBAAA0B;AAAA,MAACU;AAAA,MAAA;AAAA,QACG,OAAOtC;AAAA,QACP,kBAAAuB;AAAA,QACA,cAAAL;AAAA,QACA,cAAAC;AAAA,QACA,cAAAE;AAAA,QACA,2BAAAP;AAAA,QAEC,UAAAT;AAAA,MAAA;AAAA,IAAA;AAAA,EACL,GACJ;AAER;AACAb,EAAY,cAAc;AAEb,MAAA+C,IAAqBC,EAAiDhD,CAAW,GAGjFiD,IAKTF;AACJE,EAAO,cAAc;AACrBA,EAAO,WAAWC;AAClBD,EAAO,SAAS,cAAc;AAC9BA,EAAO,OAAOE;AACdF,EAAO,KAAK,cAAc;AAC1BA,EAAO,QAAQG;AACfH,EAAO,MAAM,cAAc;AAC3BA,EAAO,OAAOI;AACdJ,EAAO,KAAK,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components19.js","sources":["../src/components/Slider/Slider.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as RadixSlider from '@radix-ui/react-slider';\nimport { type ForwardedRef, forwardRef, useRef } from 'react';\n\nimport { type CommonAriaAttrs } from '#/utilities/types';\n\nimport styles from './styles/slider.module.scss';\n\nexport type SliderProps = {\n id?: string;\n name?: string;\n /**\n * The default value of the slider\n * Used for uncontrolled components\n * @default [0]\n */\n defaultValue?: number[];\n /**\n * The controlled value of the slider\n * @default [0]\n */\n value?: number[];\n /**\n * Minimum value of the slider\n * @default 0\n */\n min?: number;\n /**\n * Maximum value of the slider\n * @default 100\n */\n max?: number;\n /**\n * The granularity with which the slider can step through values\n * @default 1\n */\n step?: number;\n /**\n * The minimum steps between thumbs in a range slider\n * @default 0\n */\n minStepsBetweenThumbs?: number;\n /**\n * Disable the slider\n * @default false\n */\n disabled?: boolean;\n onChange?: (value: number[]) => void;\n onCommit?: (value: number[]) => void;\n 'data-test-id'?: string;\n} & CommonAriaAttrs;\n\nconst SliderComponent = (\n {\n value,\n defaultValue = [0],\n onChange,\n onCommit,\n 'data-test-id': dataTestId = 'fondue-slider',\n ...props\n }: SliderProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n const sliderThumbRef = useRef<HTMLSpanElement | null>(null);\n return (\n <RadixSlider.Root\n ref={ref}\n className={styles.root}\n value={value}\n defaultValue={defaultValue}\n onValueChange={onChange}\n onValueCommit={onCommit}\n data-test-id={dataTestId}\n {...props}\n >\n <RadixSlider.Track\n onPointerDown={() => {\n if (sliderThumbRef.current) {\n sliderThumbRef.current.dataset.showFocusRing = 'false';\n }\n }}\n className={styles.track}\n >\n <RadixSlider.Range className={styles.range} />\n </RadixSlider.Track>\n {(value || defaultValue).map((_, index) => (\n <RadixSlider.Thumb\n ref={sliderThumbRef}\n className={styles.thumb}\n onPointerDown={(event) => {\n event.currentTarget.dataset.showFocusRing = 'false';\n }}\n onBlur={(event) => {\n event.currentTarget.dataset.showFocusRing = 'true';\n }}\n key={index}\n />\n ))}\n </RadixSlider.Root>\n );\n};\n\nexport const Slider = forwardRef<HTMLButtonElement, SliderProps>(SliderComponent);\nSlider.displayName = 'Slider';\n"],"names":["SliderComponent","value","defaultValue","onChange","onCommit","dataTestId","props","ref","sliderThumbRef","useRef","jsxs","RadixSlider","styles","jsx","_","index","event","Slider","forwardRef"],"mappings":";;;;AAqDA,MAAMA,IAAkB,CACpB;AAAA,EACI,OAAAC;AAAA,EACA,cAAAC,IAAe,CAAC,CAAC;AAAA,EACjB,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAgBC,IAAa;AAAA,EAC7B,GAAGC;AACP,GACAC,MACC;AACK,QAAAC,IAAiBC,EAA+B,IAAI;AAEtD,SAAA,gBAAAC;AAAA,IAACC,EAAY;AAAA,IAAZ;AAAA,MACG,KAAAJ;AAAA,MACA,WAAWK,EAAO;AAAA,MAClB,OAAAX;AAAA,MACA,cAAAC;AAAA,MACA,eAAeC;AAAA,MACf,eAAeC;AAAA,MACf,gBAAcC;AAAA,MACb,GAAGC;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAO;AAAA,UAACF,EAAY;AAAA,UAAZ;AAAA,YACG,eAAe,MAAM;AACjB,cAAIH,EAAe,YACAA,EAAA,QAAQ,QAAQ,gBAAgB;AAAA,YAEvD;AAAA,YACA,WAAWI,EAAO;AAAA,YAElB,4BAACD,EAAY,OAAZ,EAAkB,WAAWC,EAAO,
|
|
1
|
+
{"version":3,"file":"fondue-components19.js","sources":["../src/components/Slider/Slider.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as RadixSlider from '@radix-ui/react-slider';\nimport { type ForwardedRef, forwardRef, useRef } from 'react';\n\nimport { type CommonAriaAttrs } from '#/utilities/types';\n\nimport styles from './styles/slider.module.scss';\n\nexport type SliderProps = {\n id?: string;\n name?: string;\n /**\n * The default value of the slider\n * Used for uncontrolled components\n * @default [0]\n */\n defaultValue?: number[];\n /**\n * The controlled value of the slider\n * @default [0]\n */\n value?: number[];\n /**\n * Minimum value of the slider\n * @default 0\n */\n min?: number;\n /**\n * Maximum value of the slider\n * @default 100\n */\n max?: number;\n /**\n * The granularity with which the slider can step through values\n * @default 1\n */\n step?: number;\n /**\n * The minimum steps between thumbs in a range slider\n * @default 0\n */\n minStepsBetweenThumbs?: number;\n /**\n * Disable the slider\n * @default false\n */\n disabled?: boolean;\n onChange?: (value: number[]) => void;\n onCommit?: (value: number[]) => void;\n 'data-test-id'?: string;\n} & CommonAriaAttrs;\n\nconst SliderComponent = (\n {\n value,\n defaultValue = [0],\n onChange,\n onCommit,\n 'data-test-id': dataTestId = 'fondue-slider',\n ...props\n }: SliderProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n const sliderThumbRef = useRef<HTMLSpanElement | null>(null);\n return (\n <RadixSlider.Root\n ref={ref}\n className={styles.root}\n value={value}\n defaultValue={defaultValue}\n onValueChange={onChange}\n onValueCommit={onCommit}\n data-test-id={dataTestId}\n {...props}\n >\n <RadixSlider.Track\n onPointerDown={() => {\n if (sliderThumbRef.current) {\n sliderThumbRef.current.dataset.showFocusRing = 'false';\n }\n }}\n className={styles.track}\n >\n <RadixSlider.Range className={styles.range} />\n </RadixSlider.Track>\n {(value || defaultValue).map((_, index) => (\n <RadixSlider.Thumb\n ref={sliderThumbRef}\n className={styles.thumb}\n onPointerDown={(event) => {\n event.currentTarget.dataset.showFocusRing = 'false';\n }}\n onBlur={(event) => {\n event.currentTarget.dataset.showFocusRing = 'true';\n }}\n key={index}\n />\n ))}\n </RadixSlider.Root>\n );\n};\n\nexport const Slider = forwardRef<HTMLButtonElement, SliderProps>(SliderComponent);\nSlider.displayName = 'Slider';\n"],"names":["SliderComponent","value","defaultValue","onChange","onCommit","dataTestId","props","ref","sliderThumbRef","useRef","jsxs","RadixSlider","styles","jsx","_","index","event","Slider","forwardRef"],"mappings":";;;;AAqDA,MAAMA,IAAkB,CACpB;AAAA,EACI,OAAAC;AAAA,EACA,cAAAC,IAAe,CAAC,CAAC;AAAA,EACjB,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAgBC,IAAa;AAAA,EAC7B,GAAGC;AACP,GACAC,MACC;AACK,QAAAC,IAAiBC,EAA+B,IAAI;AAEtD,SAAA,gBAAAC;AAAA,IAACC,EAAY;AAAA,IAAZ;AAAA,MACG,KAAAJ;AAAA,MACA,WAAWK,EAAO;AAAA,MAClB,OAAAX;AAAA,MACA,cAAAC;AAAA,MACA,eAAeC;AAAA,MACf,eAAeC;AAAA,MACf,gBAAcC;AAAA,MACb,GAAGC;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAO;AAAA,UAACF,EAAY;AAAA,UAAZ;AAAA,YACG,eAAe,MAAM;AACjB,cAAIH,EAAe,YACAA,EAAA,QAAQ,QAAQ,gBAAgB;AAAA,YAEvD;AAAA,YACA,WAAWI,EAAO;AAAA,YAElB,4BAACD,EAAY,OAAZ,EAAkB,WAAWC,EAAO,MAAO,CAAA;AAAA,UAAA;AAAA,QAChD;AAAA,SACEX,KAASC,GAAc,IAAI,CAACY,GAAGC,MAC7B,gBAAAF;AAAA,UAACF,EAAY;AAAA,UAAZ;AAAA,YACG,KAAKH;AAAA,YACL,WAAWI,EAAO;AAAA,YAClB,eAAe,CAACI,MAAU;AAChB,cAAAA,EAAA,cAAc,QAAQ,gBAAgB;AAAA,YAChD;AAAA,YACA,QAAQ,CAACA,MAAU;AACT,cAAAA,EAAA,cAAc,QAAQ,gBAAgB;AAAA,YAAA;AAAA,UAChD;AAAA,UACKD;AAAA,QAEZ,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACL;AAER,GAEaE,IAASC,EAA2ClB,CAAe;AAChFiB,EAAO,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components20.js","sources":["../src/components/Switch/Switch.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as RadixSwitch from '@radix-ui/react-switch';\nimport { type FormEvent, type ForwardedRef, forwardRef } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\nimport { type CommonAriaAttrs } from '#/utilities/types';\n\nimport styles from './styles/switch.module.scss';\n\ntype SwitchProps = {\n id?: string;\n name?: string;\n /**\n * The size of the switch component.\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * The active value in the select component. This is used to control the select externally.\n * @default false\n */\n value?: boolean;\n /**\n * The default value of the select component. Used for uncontrolled usages.\n * @default false\n */\n defaultValue?: boolean;\n /**\n * Disables the select component.\n * @default false\n */\n disabled?: boolean;\n /**\n * Whether the switch is required.\n * @default false\n */\n required?: boolean;\n /**\n * Callback function that is called when the switch is toggled.\n * @param checked - The new checked state of the switch\n */\n onChange?: (checked: boolean) => void;\n /**\n * Event handler called when the checkbox is blurred\n * @param event - The event object\n */\n onBlur?: (event: FormEvent<HTMLButtonElement>) => void;\n /**\n * Event handler called when the checkbox is focused\n * @param event - The event object\n */\n onFocus?: (event: FormEvent<HTMLButtonElement>) => void;\n 'data-test-id'?: string;\n} & CommonAriaAttrs;\n\nconst SwitchComponent = (\n {\n value,\n defaultValue,\n size = 'medium',\n onChange,\n 'data-test-id': dataTestId = 'fondue-switch',\n 'aria-label': ariaLabel = 'Switch',\n ...props\n }: SwitchProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => (\n <RadixSwitch.Root\n ref={ref}\n checked={value}\n defaultChecked={defaultValue}\n className={cn([styles.root, styles[size]])}\n onCheckedChange={onChange}\n aria-label={ariaLabel}\n data-test-id={dataTestId}\n {...props}\n >\n <RadixSwitch.Thumb className={styles.thumb} />\n </RadixSwitch.Root>\n);\n\nexport const Switch = forwardRef<HTMLButtonElement, SwitchProps>(SwitchComponent);\nSwitch.displayName = 'Switch';\n"],"names":["SwitchComponent","value","defaultValue","size","onChange","dataTestId","ariaLabel","props","ref","jsx","RadixSwitch","cn","styles","Switch","forwardRef"],"mappings":";;;;;AAwDA,MAAMA,IAAkB,CACpB;AAAA,EACI,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,UAAAC;AAAA,EACA,gBAAgBC,IAAa;AAAA,EAC7B,cAAcC,IAAY;AAAA,EAC1B,GAAGC;AACP,GACAC,MAEA,gBAAAC;AAAA,EAACC,EAAY;AAAA,EAAZ;AAAA,IACG,KAAAF;AAAA,IACA,SAASP;AAAA,IACT,gBAAgBC;AAAA,IAChB,WAAWS,EAAG,CAACC,EAAO,MAAMA,EAAOT,CAAI,CAAC,CAAC;AAAA,IACzC,iBAAiBC;AAAA,IACjB,cAAYE;AAAA,IACZ,gBAAcD;AAAA,IACb,GAAGE;AAAA,IAEJ,4BAACG,EAAY,OAAZ,EAAkB,WAAWE,EAAO,
|
|
1
|
+
{"version":3,"file":"fondue-components20.js","sources":["../src/components/Switch/Switch.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as RadixSwitch from '@radix-ui/react-switch';\nimport { type FormEvent, type ForwardedRef, forwardRef } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\nimport { type CommonAriaAttrs } from '#/utilities/types';\n\nimport styles from './styles/switch.module.scss';\n\ntype SwitchProps = {\n id?: string;\n name?: string;\n /**\n * The size of the switch component.\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * The active value in the select component. This is used to control the select externally.\n * @default false\n */\n value?: boolean;\n /**\n * The default value of the select component. Used for uncontrolled usages.\n * @default false\n */\n defaultValue?: boolean;\n /**\n * Disables the select component.\n * @default false\n */\n disabled?: boolean;\n /**\n * Whether the switch is required.\n * @default false\n */\n required?: boolean;\n /**\n * Callback function that is called when the switch is toggled.\n * @param checked - The new checked state of the switch\n */\n onChange?: (checked: boolean) => void;\n /**\n * Event handler called when the checkbox is blurred\n * @param event - The event object\n */\n onBlur?: (event: FormEvent<HTMLButtonElement>) => void;\n /**\n * Event handler called when the checkbox is focused\n * @param event - The event object\n */\n onFocus?: (event: FormEvent<HTMLButtonElement>) => void;\n 'data-test-id'?: string;\n} & CommonAriaAttrs;\n\nconst SwitchComponent = (\n {\n value,\n defaultValue,\n size = 'medium',\n onChange,\n 'data-test-id': dataTestId = 'fondue-switch',\n 'aria-label': ariaLabel = 'Switch',\n ...props\n }: SwitchProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => (\n <RadixSwitch.Root\n ref={ref}\n checked={value}\n defaultChecked={defaultValue}\n className={cn([styles.root, styles[size]])}\n onCheckedChange={onChange}\n aria-label={ariaLabel}\n data-test-id={dataTestId}\n {...props}\n >\n <RadixSwitch.Thumb className={styles.thumb} />\n </RadixSwitch.Root>\n);\n\nexport const Switch = forwardRef<HTMLButtonElement, SwitchProps>(SwitchComponent);\nSwitch.displayName = 'Switch';\n"],"names":["SwitchComponent","value","defaultValue","size","onChange","dataTestId","ariaLabel","props","ref","jsx","RadixSwitch","cn","styles","Switch","forwardRef"],"mappings":";;;;;AAwDA,MAAMA,IAAkB,CACpB;AAAA,EACI,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,UAAAC;AAAA,EACA,gBAAgBC,IAAa;AAAA,EAC7B,cAAcC,IAAY;AAAA,EAC1B,GAAGC;AACP,GACAC,MAEA,gBAAAC;AAAA,EAACC,EAAY;AAAA,EAAZ;AAAA,IACG,KAAAF;AAAA,IACA,SAASP;AAAA,IACT,gBAAgBC;AAAA,IAChB,WAAWS,EAAG,CAACC,EAAO,MAAMA,EAAOT,CAAI,CAAC,CAAC;AAAA,IACzC,iBAAiBC;AAAA,IACjB,cAAYE;AAAA,IACZ,gBAAcD;AAAA,IACb,GAAGE;AAAA,IAEJ,4BAACG,EAAY,OAAZ,EAAkB,WAAWE,EAAO,MAAO,CAAA;AAAA,EAAA;AAChD,GAGSC,IAASC,EAA2Cd,CAAe;AAChFa,EAAO,cAAc;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { createContext as x, forwardRef as
|
|
1
|
+
import { jsx as a, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as x, forwardRef as i, useCallback as j, createElement as N, useContext as T, useRef as A, useEffect as D } from "react";
|
|
3
3
|
import { IconDotsHorizontal as E } from "@frontify/fondue-icons";
|
|
4
4
|
import * as d from "@radix-ui/react-tabs";
|
|
5
5
|
import { useControllableState as O } from "./fondue-components47.js";
|
|
6
6
|
import { Button as V } from "./fondue-components4.js";
|
|
7
|
-
import { Dropdown as
|
|
7
|
+
import { Dropdown as l } from "./fondue-components9.js";
|
|
8
8
|
import { useTabTriggers as q } from "./fondue-components57.js";
|
|
9
9
|
import r from "./fondue-components58.js";
|
|
10
|
-
const
|
|
10
|
+
const b = x({
|
|
11
11
|
value: "",
|
|
12
12
|
disabled: !1
|
|
13
13
|
}), w = x({
|
|
@@ -22,29 +22,29 @@ const f = x({
|
|
|
22
22
|
...m
|
|
23
23
|
}, u) => {
|
|
24
24
|
var R;
|
|
25
|
-
const [
|
|
25
|
+
const [f, v] = O({
|
|
26
26
|
prop: o,
|
|
27
27
|
defaultProp: s,
|
|
28
28
|
onChange: n
|
|
29
|
-
}),
|
|
29
|
+
}), g = j(
|
|
30
30
|
(e) => {
|
|
31
|
-
|
|
31
|
+
v(e);
|
|
32
32
|
},
|
|
33
|
-
[
|
|
34
|
-
), { triggerListRef: k, activeIndicatorRef: P, triggers:
|
|
35
|
-
activeTab:
|
|
33
|
+
[v]
|
|
34
|
+
), { triggerListRef: k, activeIndicatorRef: P, triggers: C, triggersOutOfView: h, addTrigger: S } = q({
|
|
35
|
+
activeTab: f
|
|
36
36
|
});
|
|
37
|
-
return
|
|
37
|
+
return /* @__PURE__ */ a(w.Provider, { value: { addTrigger: S }, children: /* @__PURE__ */ p(
|
|
38
38
|
d.Root,
|
|
39
39
|
{
|
|
40
40
|
ref: u,
|
|
41
41
|
className: r.root,
|
|
42
|
-
onValueChange:
|
|
43
|
-
value:
|
|
42
|
+
onValueChange: g,
|
|
43
|
+
value: f ?? ((R = C[0]) == null ? void 0 : R.value),
|
|
44
44
|
...m,
|
|
45
45
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */ a(d.List, { ref: k, "data-size": c, className: r.triggerList, children:
|
|
46
|
+
/* @__PURE__ */ p("div", { className: r.triggerListWrapper, children: [
|
|
47
|
+
/* @__PURE__ */ a(d.List, { ref: k, "data-size": c, className: r.triggerList, children: C.map((e) => /* @__PURE__ */ N(
|
|
48
48
|
d.Trigger,
|
|
49
49
|
{
|
|
50
50
|
...e.props,
|
|
@@ -56,14 +56,14 @@ const f = x({
|
|
|
56
56
|
},
|
|
57
57
|
e.element
|
|
58
58
|
)) }),
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
-
h.length > 0 && /* @__PURE__ */ a(
|
|
61
|
-
/* @__PURE__ */ a(
|
|
62
|
-
|
|
59
|
+
/* @__PURE__ */ p(l.Root, { children: [
|
|
60
|
+
h.length > 0 && /* @__PURE__ */ a(l.Trigger, { "data-test-id": "overflow-items-dropdown-trigger", children: /* @__PURE__ */ a(V, { emphasis: "default", aspect: "square", size: "small", children: /* @__PURE__ */ a(E, { size: 16 }) }) }),
|
|
61
|
+
/* @__PURE__ */ a(l.Content, { align: "end", "data-test-id": "overflow-items-dropdown-content", children: h.map((e) => /* @__PURE__ */ N(
|
|
62
|
+
l.Item,
|
|
63
63
|
{
|
|
64
64
|
...e.props,
|
|
65
65
|
disabled: e.disabled,
|
|
66
|
-
onSelect: () =>
|
|
66
|
+
onSelect: () => g(e.value),
|
|
67
67
|
key: e.value
|
|
68
68
|
},
|
|
69
69
|
e.element
|
|
@@ -84,10 +84,10 @@ const f = x({
|
|
|
84
84
|
) });
|
|
85
85
|
};
|
|
86
86
|
y.displayName = "Tabs.Root";
|
|
87
|
-
const z = ({ children: t, value: o, disabled: s }) => /* @__PURE__ */ a(
|
|
87
|
+
const z = ({ children: t, value: o, disabled: s }) => /* @__PURE__ */ a(b.Provider, { value: { value: o, disabled: s }, children: t });
|
|
88
88
|
z.displayName = "Tabs.Tab";
|
|
89
89
|
const I = ({ children: t, ...o }, s) => {
|
|
90
|
-
const { value: n, disabled: c } = b
|
|
90
|
+
const { value: n, disabled: c } = T(b), { addTrigger: m } = T(w), u = A(null);
|
|
91
91
|
return D(() => {
|
|
92
92
|
m({
|
|
93
93
|
ref: u || s,
|
|
@@ -100,15 +100,15 @@ const I = ({ children: t, ...o }, s) => {
|
|
|
100
100
|
};
|
|
101
101
|
I.displayName = "Tabs.Trigger";
|
|
102
102
|
const L = ({ children: t, ...o }, s) => {
|
|
103
|
-
const { value: n } = b
|
|
103
|
+
const { value: n } = T(b);
|
|
104
104
|
return /* @__PURE__ */ a(d.Content, { ref: s, ...o, className: r.content, value: n ?? "", children: t });
|
|
105
105
|
};
|
|
106
106
|
L.displayName = "Tabs.Content";
|
|
107
107
|
const Q = {
|
|
108
|
-
Root:
|
|
109
|
-
Tab:
|
|
110
|
-
Trigger:
|
|
111
|
-
Content:
|
|
108
|
+
Root: i(y),
|
|
109
|
+
Tab: i(z),
|
|
110
|
+
Trigger: i(I),
|
|
111
|
+
Content: i(L)
|
|
112
112
|
};
|
|
113
113
|
export {
|
|
114
114
|
Q as Tabs,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components21.js","sources":["../src/components/Tabs/Tabs.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconDotsHorizontal } from '@frontify/fondue-icons';\nimport * as RadixTabs from '@radix-ui/react-tabs';\nimport {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useRef,\n type ForwardedRef,\n type ReactNode,\n} from 'react';\n\nimport { useControllableState } from '#/hooks/useControllableState';\n\nimport { Button } from '../Button/Button';\nimport { Dropdown } from '../Dropdown/Dropdown';\n\nimport { useTabTriggers } from './hooks/useTabTriggers';\nimport styles from './styles/tabs.module.scss';\nimport { type TabTrigger } from './types';\n\nexport type TabsRootProps = {\n id?: string;\n children: ReactNode;\n /**\n * The default active tab\n * Used for uncontrolled components\n */\n defaultActiveTab?: string;\n /**\n * The controlled value of the active tab\n */\n activeTab?: string;\n /**\n * The height of the tabs\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /**\n * Event handler called when the active tab changes\n */\n onActiveTabChange?: (value: string) => void;\n};\n\nconst TabConfigContext = createContext<{\n value: string;\n disabled?: boolean;\n}>({\n value: '',\n disabled: false,\n});\n\nconst TabTriggerContext = createContext<{\n addTrigger: (trigger: TabTrigger) => void;\n}>({\n addTrigger: () => {},\n});\n\nexport const TabsRoot = (\n {\n children,\n activeTab: propsActiveTab,\n defaultActiveTab,\n onActiveTabChange,\n size = 'medium',\n ...props\n }: TabsRootProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const [activeTab, setActiveTab] = useControllableState({\n prop: propsActiveTab,\n defaultProp: defaultActiveTab,\n onChange: onActiveTabChange,\n });\n\n const handleSetActiveTab = useCallback(\n (value: string) => {\n setActiveTab(value);\n },\n [setActiveTab],\n );\n\n const { triggerListRef, activeIndicatorRef, triggers, triggersOutOfView, addTrigger } = useTabTriggers({\n activeTab,\n });\n\n console.log(triggers);\n\n return (\n <TabTriggerContext.Provider value={{ addTrigger }}>\n <RadixTabs.Root\n ref={ref}\n className={styles.root}\n onValueChange={handleSetActiveTab}\n value={activeTab ?? triggers[0]?.value}\n {...props}\n >\n <div className={styles.triggerListWrapper}>\n <RadixTabs.List ref={triggerListRef} data-size={size} className={styles.triggerList}>\n {triggers.map((trigger) => (\n <RadixTabs.Trigger\n {...trigger.props}\n key={trigger.value}\n value={trigger.value}\n disabled={trigger.disabled}\n className={styles.trigger}\n ref={trigger.ref}\n >\n {trigger.element}\n </RadixTabs.Trigger>\n ))}\n </RadixTabs.List>\n <Dropdown.Root>\n {triggersOutOfView.length > 0 && (\n <Dropdown.Trigger data-test-id=\"overflow-items-dropdown-trigger\">\n <Button emphasis=\"default\" aspect=\"square\" size=\"small\">\n <IconDotsHorizontal size={16} />\n </Button>\n </Dropdown.Trigger>\n )}\n <Dropdown.Content align=\"end\" data-test-id=\"overflow-items-dropdown-content\">\n {triggersOutOfView.map((trigger) => (\n <Dropdown.Item\n {...trigger.props}\n disabled={trigger.disabled}\n onSelect={() => handleSetActiveTab(trigger.value)}\n key={trigger.value}\n >\n {trigger.element}\n </Dropdown.Item>\n ))}\n </Dropdown.Content>\n </Dropdown.Root>\n <span\n data-test-id=\"active-tab-indicator\"\n ref={activeIndicatorRef}\n className={styles.activeIndicator}\n />\n </div>\n {children}\n </RadixTabs.Root>\n </TabTriggerContext.Provider>\n );\n};\nTabsRoot.displayName = 'Tabs.Root';\n\ntype TabsTabProps = {\n children: ReactNode;\n value: string;\n disabled?: boolean;\n};\n\nexport const TabsTab = ({ children, value, disabled }: TabsTabProps) => (\n <TabConfigContext.Provider value={{ value, disabled }}>{children}</TabConfigContext.Provider>\n);\nTabsTab.displayName = 'Tabs.Tab';\n\ntype TabsTriggerProps = {\n children: ReactNode;\n};\n\nexport const TabsTrigger = ({ children, ...props }: TabsTriggerProps, ref: ForwardedRef<HTMLButtonElement>) => {\n const { value, disabled } = useContext(TabConfigContext);\n\n const { addTrigger } = useContext(TabTriggerContext);\n\n const localRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n addTrigger({\n ref: localRef || ref,\n value: value ?? '',\n disabled,\n props,\n element: children,\n });\n }, []);\n\n return null;\n};\nTabsTrigger.displayName = 'Tabs.Trigger';\n\ntype TabsContentProps = {\n children: ReactNode;\n};\n\nexport const TabsContent = ({ children, ...itemProps }: TabsContentProps, ref: ForwardedRef<HTMLDivElement>) => {\n const { value } = useContext(TabConfigContext);\n\n return (\n <RadixTabs.Content ref={ref} {...itemProps} className={styles.content} value={value ?? ''}>\n {children}\n </RadixTabs.Content>\n );\n};\nTabsContent.displayName = 'Tabs.Content';\n\nexport const Tabs = {\n Root: forwardRef<HTMLDivElement, TabsRootProps>(TabsRoot),\n Tab: forwardRef<HTMLDivElement, TabsTabProps>(TabsTab),\n Trigger: forwardRef<HTMLButtonElement, TabsTriggerProps>(TabsTrigger),\n Content: forwardRef<HTMLDivElement, TabsContentProps>(TabsContent),\n};\n"],"names":["TabConfigContext","createContext","TabTriggerContext","TabsRoot","children","propsActiveTab","defaultActiveTab","onActiveTabChange","size","props","ref","activeTab","setActiveTab","useControllableState","handleSetActiveTab","useCallback","value","triggerListRef","activeIndicatorRef","triggers","triggersOutOfView","addTrigger","useTabTriggers","jsxs","RadixTabs","styles","_a","jsx","trigger","createElement","Dropdown","Button","IconDotsHorizontal","TabsTab","disabled","TabsTrigger","useContext","localRef","useRef","useEffect","TabsContent","itemProps","Tabs","forwardRef"],"mappings":";;;;;;;;;AA+CA,MAAMA,IAAmBC,EAGtB;AAAA,EACC,OAAO;AAAA,EACP,UAAU;AACd,CAAC,GAEKC,IAAoBD,EAEvB;AAAA,EACC,YAAY,MAAM;AAAA,EAAC;AACvB,CAAC,GAEYE,IAAW,CACpB;AAAA,EACI,UAAAC;AAAA,EACA,WAAWC;AAAA,EACX,kBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,GAAGC;AACP,GACAC,MACC;;AACD,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAqB;AAAA,IACnD,MAAMR;AAAA,IACN,aAAaC;AAAA,IACb,UAAUC;AAAA,EAAA,CACb,GAEKO,IAAqBC;AAAA,IACvB,CAACC,MAAkB;AACf,MAAAJ,EAAaI,CAAK;AAAA,IACtB;AAAA,IACA,CAACJ,CAAY;AAAA,EAAA,GAGX,EAAE,gBAAAK,GAAgB,oBAAAC,GAAoB,UAAAC,GAAU,mBAAAC,GAAmB,YAAAC,MAAeC,EAAe;AAAA,IACnG,WAAAX;AAAA,EAAA,CACH;AAED,iBAAQ,IAAIQ,CAAQ,qBAGfjB,EAAkB,UAAlB,EAA2B,OAAO,EAAE,YAAAmB,KACjC,UAAA,gBAAAE;AAAA,IAACC,EAAU;AAAA,IAAV;AAAA,MACG,KAAAd;AAAA,MACA,WAAWe,EAAO;AAAA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EACpE,SAASQ,EAA6CH,CAAW;AACrE;"}
|
|
1
|
+
{"version":3,"file":"fondue-components21.js","sources":["../src/components/Tabs/Tabs.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconDotsHorizontal } from '@frontify/fondue-icons';\nimport * as RadixTabs from '@radix-ui/react-tabs';\nimport {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useRef,\n type ForwardedRef,\n type ReactNode,\n} from 'react';\n\nimport { useControllableState } from '#/hooks/useControllableState';\n\nimport { Button } from '../Button/Button';\nimport { Dropdown } from '../Dropdown/Dropdown';\n\nimport { useTabTriggers } from './hooks/useTabTriggers';\nimport styles from './styles/tabs.module.scss';\nimport { type TabTrigger } from './types';\n\nexport type TabsRootProps = {\n id?: string;\n children: ReactNode;\n /**\n * The default active tab\n * Used for uncontrolled components\n */\n defaultActiveTab?: string;\n /**\n * The controlled value of the active tab\n */\n activeTab?: string;\n /**\n * The height of the tabs\n * @default 'medium'\n */\n size?: 'medium' | 'large';\n /**\n * Event handler called when the active tab changes\n */\n onActiveTabChange?: (value: string) => void;\n};\n\nconst TabConfigContext = createContext<{\n value: string;\n disabled?: boolean;\n}>({\n value: '',\n disabled: false,\n});\n\nconst TabTriggerContext = createContext<{\n addTrigger: (trigger: TabTrigger) => void;\n}>({\n addTrigger: () => {},\n});\n\nexport const TabsRoot = (\n {\n children,\n activeTab: propsActiveTab,\n defaultActiveTab,\n onActiveTabChange,\n size = 'medium',\n ...props\n }: TabsRootProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const [activeTab, setActiveTab] = useControllableState({\n prop: propsActiveTab,\n defaultProp: defaultActiveTab,\n onChange: onActiveTabChange,\n });\n\n const handleSetActiveTab = useCallback(\n (value: string) => {\n setActiveTab(value);\n },\n [setActiveTab],\n );\n\n const { triggerListRef, activeIndicatorRef, triggers, triggersOutOfView, addTrigger } = useTabTriggers({\n activeTab,\n });\n\n return (\n <TabTriggerContext.Provider value={{ addTrigger }}>\n <RadixTabs.Root\n ref={ref}\n className={styles.root}\n onValueChange={handleSetActiveTab}\n value={activeTab ?? triggers[0]?.value}\n {...props}\n >\n <div className={styles.triggerListWrapper}>\n <RadixTabs.List ref={triggerListRef} data-size={size} className={styles.triggerList}>\n {triggers.map((trigger) => (\n <RadixTabs.Trigger\n {...trigger.props}\n key={trigger.value}\n value={trigger.value}\n disabled={trigger.disabled}\n className={styles.trigger}\n ref={trigger.ref}\n >\n {trigger.element}\n </RadixTabs.Trigger>\n ))}\n </RadixTabs.List>\n <Dropdown.Root>\n {triggersOutOfView.length > 0 && (\n <Dropdown.Trigger data-test-id=\"overflow-items-dropdown-trigger\">\n <Button emphasis=\"default\" aspect=\"square\" size=\"small\">\n <IconDotsHorizontal size={16} />\n </Button>\n </Dropdown.Trigger>\n )}\n <Dropdown.Content align=\"end\" data-test-id=\"overflow-items-dropdown-content\">\n {triggersOutOfView.map((trigger) => (\n <Dropdown.Item\n {...trigger.props}\n disabled={trigger.disabled}\n onSelect={() => handleSetActiveTab(trigger.value)}\n key={trigger.value}\n >\n {trigger.element}\n </Dropdown.Item>\n ))}\n </Dropdown.Content>\n </Dropdown.Root>\n <span\n data-test-id=\"active-tab-indicator\"\n ref={activeIndicatorRef}\n className={styles.activeIndicator}\n />\n </div>\n {children}\n </RadixTabs.Root>\n </TabTriggerContext.Provider>\n );\n};\nTabsRoot.displayName = 'Tabs.Root';\n\ntype TabsTabProps = {\n children: ReactNode;\n value: string;\n disabled?: boolean;\n};\n\nexport const TabsTab = ({ children, value, disabled }: TabsTabProps) => (\n <TabConfigContext.Provider value={{ value, disabled }}>{children}</TabConfigContext.Provider>\n);\nTabsTab.displayName = 'Tabs.Tab';\n\ntype TabsTriggerProps = {\n children: ReactNode;\n};\n\nexport const TabsTrigger = ({ children, ...props }: TabsTriggerProps, ref: ForwardedRef<HTMLButtonElement>) => {\n const { value, disabled } = useContext(TabConfigContext);\n\n const { addTrigger } = useContext(TabTriggerContext);\n\n const localRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n addTrigger({\n ref: localRef || ref,\n value: value ?? '',\n disabled,\n props,\n element: children,\n });\n }, []);\n\n return null;\n};\nTabsTrigger.displayName = 'Tabs.Trigger';\n\ntype TabsContentProps = {\n children: ReactNode;\n};\n\nexport const TabsContent = ({ children, ...itemProps }: TabsContentProps, ref: ForwardedRef<HTMLDivElement>) => {\n const { value } = useContext(TabConfigContext);\n\n return (\n <RadixTabs.Content ref={ref} {...itemProps} className={styles.content} value={value ?? ''}>\n {children}\n </RadixTabs.Content>\n );\n};\nTabsContent.displayName = 'Tabs.Content';\n\nexport const Tabs = {\n Root: forwardRef<HTMLDivElement, TabsRootProps>(TabsRoot),\n Tab: forwardRef<HTMLDivElement, TabsTabProps>(TabsTab),\n Trigger: forwardRef<HTMLButtonElement, TabsTriggerProps>(TabsTrigger),\n Content: forwardRef<HTMLDivElement, TabsContentProps>(TabsContent),\n};\n"],"names":["TabConfigContext","createContext","TabTriggerContext","TabsRoot","children","propsActiveTab","defaultActiveTab","onActiveTabChange","size","props","ref","activeTab","setActiveTab","useControllableState","handleSetActiveTab","useCallback","value","triggerListRef","activeIndicatorRef","triggers","triggersOutOfView","addTrigger","useTabTriggers","jsxs","RadixTabs","styles","_a","jsx","trigger","createElement","Dropdown","Button","IconDotsHorizontal","TabsTab","disabled","TabsTrigger","useContext","localRef","useRef","useEffect","TabsContent","itemProps","Tabs","forwardRef"],"mappings":";;;;;;;;;AA+CA,MAAMA,IAAmBC,EAGtB;AAAA,EACC,OAAO;AAAA,EACP,UAAU;AACd,CAAC,GAEKC,IAAoBD,EAEvB;AAAA,EACC,YAAY,MAAM;AAAA,EAAA;AACtB,CAAC,GAEYE,IAAW,CACpB;AAAA,EACI,UAAAC;AAAA,EACA,WAAWC;AAAA,EACX,kBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,GAAGC;AACP,GACAC,MACC;;AACD,QAAM,CAACC,GA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