@frontify/fondue-components 14.2.0 → 14.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
- import { jsx as a, jsxs as l } from "react/jsx-runtime";
2
- import { IconCross as b } from "@frontify/fondue-icons";
1
+ import { jsx as a, jsxs as u } from "react/jsx-runtime";
2
+ import { IconCross as R } from "@frontify/fondue-icons";
3
3
  import * as i from "@radix-ui/react-popover";
4
4
  import { forwardRef as s } from "react";
5
5
  import { addAutoFocusAttribute as w, addShowFocusRing as x } from "./fondue-components44.js";
6
6
  import { useFondueTheme as P, ThemeProvider as T } from "./fondue-components28.js";
7
- import d from "./fondue-components50.js";
7
+ import r from "./fondue-components50.js";
8
8
  const n = ({ children: t, ...o }) => /* @__PURE__ */ a(i.Root, { ...o, children: t });
9
9
  n.displayName = "Flyout.Root";
10
- const c = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-trigger", ...r }, u) => /* @__PURE__ */ a(
10
+ const c = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-trigger", ...d }, l) => /* @__PURE__ */ a(
11
11
  i.Trigger,
12
12
  {
13
13
  onMouseDown: w,
@@ -15,8 +15,8 @@ const c = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-tr
15
15
  "data-auto-focus-trigger": !0,
16
16
  "data-test-id": e,
17
17
  asChild: t,
18
- ref: u,
19
- ...r,
18
+ ref: l,
19
+ ...d,
20
20
  children: o
21
21
  }
22
22
  );
@@ -29,31 +29,31 @@ const A = {
29
29
  align: t = "start",
30
30
  maxWidth: o = "360px",
31
31
  padding: e = "compact",
32
- rounded: r = "medium",
33
- width: u = "fit-content",
32
+ rounded: d = "medium",
33
+ width: l = "fit-content",
34
34
  shadow: F = "medium",
35
35
  triggerOffset: g = "compact",
36
36
  "data-test-id": h = "fondue-flyout-content",
37
37
  children: N,
38
38
  ...v
39
- }, C) => {
40
- const R = P();
41
- return /* @__PURE__ */ a(i.Portal, { children: /* @__PURE__ */ l(T, { theme: R, children: [
42
- /* @__PURE__ */ a("div", { className: d.overlay }),
39
+ }, b) => {
40
+ const C = P();
41
+ return /* @__PURE__ */ a(i.Portal, { children: /* @__PURE__ */ u(T, { theme: C, children: [
42
+ /* @__PURE__ */ a("div", { className: r.overlay }),
43
43
  /* @__PURE__ */ a(
44
44
  i.Content,
45
45
  {
46
46
  style: {
47
47
  "--flyout-max-width": o,
48
- "--flyout-width": u
48
+ "--flyout-width": l
49
49
  },
50
- ref: C,
50
+ ref: b,
51
51
  align: t,
52
52
  collisionPadding: 8,
53
53
  sideOffset: A[g],
54
- className: d.root,
54
+ className: r.root,
55
55
  "data-flyout-spacing": e,
56
- "data-rounded": r,
56
+ "data-rounded": d,
57
57
  "data-shadow": F,
58
58
  "data-test-id": h,
59
59
  onFocus: x,
@@ -64,14 +64,24 @@ const A = {
64
64
  ] }) });
65
65
  };
66
66
  m.displayName = "Flyout.Content";
67
- const y = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header" }, r) => /* @__PURE__ */ l("div", { "data-test-id": e, ref: r, className: d.header, children: [
67
+ const y = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header" }, d) => /* @__PURE__ */ u("div", { "data-test-id": e, ref: d, className: r.header, children: [
68
68
  /* @__PURE__ */ a("div", { children: o }),
69
- t && /* @__PURE__ */ a(i.Close, { role: "button", "data-test-id": `${e}-close`, className: d.close, children: /* @__PURE__ */ a(b, { size: 20 }) })
69
+ t && /* @__PURE__ */ a(i.Close, { role: "button", "data-test-id": `${e}-close`, className: r.close, children: /* @__PURE__ */ a(R, { size: 20 }) })
70
70
  ] });
71
71
  y.displayName = "Flyout.Header";
72
- const f = ({ children: t, "data-test-id": o = "fondue-flyout-footer" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: d.footer, children: t });
72
+ const f = ({ children: t, "data-test-id": o = "fondue-flyout-footer" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: r.footer, children: t });
73
73
  f.displayName = "Flyout.Footer";
74
- const p = ({ children: t, "data-test-id": o = "fondue-flyout-body" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, "data-flyout-spacing": "compact", className: d.body, children: t });
74
+ const p = ({ children: t, "data-test-id": o = "fondue-flyout-body", scrollable: e = !1 }, d) => /* @__PURE__ */ a(
75
+ "div",
76
+ {
77
+ "data-test-id": o,
78
+ ref: d,
79
+ "data-flyout-spacing": "compact",
80
+ "data-scrollable": e,
81
+ className: r.body,
82
+ children: t
83
+ }
84
+ );
75
85
  p.displayName = "Flyout.Body";
76
86
  const D = {
77
87
  Root: n,
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components12.js","sources":["../src/components/Flyout/Flyout.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { forwardRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport styles from './styles/flyout.module.scss';\n\nexport type FlyoutRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the flyout\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport type FlyoutTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const FlyoutTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-flyout-trigger', ...props }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.Trigger\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild={asChild}\n ref={ref}\n {...props}\n >\n {children}\n </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\ntype FlyoutSpacing = 'compact' | 'comfortable' | 'spacious';\nexport type FlyoutContentProps = {\n /**\n * Add a shadow to the flyout\n * @default \"medium\"\n */\n shadow?: 'none' | 'medium' | 'large';\n /**\n * Add rounded corners to the flyout\n * @default \"medium\"\n */\n rounded?: 'none' | 'medium' | 'large';\n /**\n * Define the prefered side of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Define the prefered alignment of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Define the padding of the flyout\n * @default \"compact\"\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Define the fixed width of the flyout\n * @default \"fit-content\"\n */\n width?: string;\n /**\n * Defines the spacing between the dropdown and its trigger.\n * @default 'compact'\n */\n triggerOffset?: FlyoutSpacing;\n /**\n * Define the maximum width of the flyout\n * @default \"360px\"\n */\n maxWidth?: string;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nconst SPACING_MAP: Record<FlyoutSpacing, number> = {\n compact: 8,\n comfortable: 12,\n spacious: 16,\n};\n\nexport const FlyoutContent = (\n {\n align = 'start',\n maxWidth = '360px',\n padding = 'compact',\n rounded = 'medium',\n width = 'fit-content',\n shadow = 'medium',\n triggerOffset = 'compact',\n 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n return (\n <RadixPopover.Portal>\n <ThemeProvider theme={theme}>\n <div className={styles.overlay} />\n <RadixPopover.Content\n style={\n {\n '--flyout-max-width': maxWidth,\n '--flyout-width': width,\n } as CSSProperties\n }\n ref={ref}\n align={align}\n collisionPadding={8}\n sideOffset={SPACING_MAP[triggerOffset]}\n className={styles.root}\n data-flyout-spacing={padding}\n data-rounded={rounded}\n data-shadow={shadow}\n data-test-id={dataTestId}\n onFocus={addShowFocusRing}\n {...props}\n >\n {children}\n </RadixPopover.Content>\n </ThemeProvider>\n </RadixPopover.Portal>\n );\n};\nFlyoutContent.displayName = 'Flyout.Content';\n\nexport type FlyoutHeaderProps = {\n /**\n * Show a close button in the header\n * @default false\n */\n showCloseButton?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const FlyoutHeader = (\n { showCloseButton, children, 'data-test-id': dataTestId = 'fondue-flyout-header' }: FlyoutHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.header}>\n <div>{children}</div>\n {showCloseButton && (\n <RadixPopover.Close role=\"button\" data-test-id={`${dataTestId}-close`} className={styles.close}>\n <IconCross size={20} />\n </RadixPopover.Close>\n )}\n </div>\n );\n};\nFlyoutHeader.displayName = 'Flyout.Header';\n\nexport type FlyoutFooterProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const FlyoutFooter = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-footer' }: FlyoutFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.footer}>\n {children}\n </div>\n );\n};\nFlyoutFooter.displayName = 'Flyout.Footer';\n\nexport type FlyoutBodyProps = { 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","SPACING_MAP","FlyoutContent","align","maxWidth","padding","rounded","width","shadow","triggerOffset","theme","useFondueTheme","jsxs","ThemeProvider","styles","addShowFocusRing","FlyoutHeader","showCloseButton","IconCross","FlyoutFooter","FlyoutBody","Flyout","forwardRef"],"mappings":";;;;;;;AA8BO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAC9BC,EAAa,MAAb,EAAmB,GAAGD,GAAQ,UAAAD,GAAS;AAEnDD,EAAW,cAAc;AAYlB,MAAMI,IAAgB,CACzB,EAAE,SAAAC,IAAU,IAAM,UAAAJ,GAAU,gBAAgBK,IAAa,yBAAyB,GAAGJ,EAAM,GAC3FK,MAGI,gBAAAC;AAAA,EAACL,EAAa;AAAA,EAAb;AAAA,IACG,aAAaM;AAAA,IACb,2BAAwB;AAAA,IACxB,2BAAuB;AAAA,IACvB,gBAAcH;AAAA,IACd,SAAAD;AAAA,IACA,KAAAE;AAAA,IACC,GAAGL;AAAA,IAEH,UAAAD;AAAA,EAAA;AACL;AAGRG,EAAc,cAAc;AAgD5B,MAAMM,IAA6C;AAAA,EAC/C,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AACd,GAEaC,IAAgB,CACzB;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,EACzB,CAAA;AAAA,GAER;AAGRF,EAAa,cAAc;AAId,MAAAG,IAAe,CACxB,EAAE,UAAA3B,GAAU,gBAAgBK,IAAa,0BACzCC,MAGI,gBAAAC,EAAC,SAAI,gBAAcF,GAAY,KAAAC,GAAU,WAAWgB,EAAO,QACtD,UAAAtB,GACL;AAGR2B,EAAa,cAAc;AAId,MAAAC,IAAa,CACtB,EAAE,UAAA5B,GAAU,gBAAgBK,IAAa,wBACzCC,MAGI,gBAAAC,EAAC,OAAI,EAAA,gBAAcF,GAAY,KAAAC,GAAU,uBAAoB,WAAU,WAAWgB,EAAO,MACpF,UAAAtB,EACL,CAAA;AAGR4B,EAAW,cAAc;AAElB,MAAMC,IAAS;AAAA,EAClB,MAAM9B;AAAA,EACN,SAAS+B,EAAkD3B,CAAa;AAAA,EACxE,SAAS2B,EAA+CpB,CAAa;AAAA,EACrE,QAAQoB,EAA8CN,CAAY;AAAA,EAClE,QAAQM,EAA8CH,CAAY;AAAA,EAClE,MAAMG,EAA4CF,CAAU;AAChE;"}
1
+ {"version":3,"file":"fondue-components12.js","sources":["../src/components/Flyout/Flyout.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { forwardRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport styles from './styles/flyout.module.scss';\n\nexport type FlyoutRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the flyout\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport type FlyoutTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const FlyoutTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-flyout-trigger', ...props }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.Trigger\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild={asChild}\n ref={ref}\n {...props}\n >\n {children}\n </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\ntype FlyoutSpacing = 'compact' | 'comfortable' | 'spacious';\nexport type FlyoutContentProps = {\n /**\n * Add a shadow to the flyout\n * @default \"medium\"\n */\n shadow?: 'none' | 'medium' | 'large';\n /**\n * Add rounded corners to the flyout\n * @default \"medium\"\n */\n rounded?: 'none' | 'medium' | 'large';\n /**\n * Define the prefered side of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Define the prefered alignment of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Define the padding of the flyout\n * @default \"compact\"\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Define the fixed width of the flyout\n * @default \"fit-content\"\n */\n width?: string;\n /**\n * Defines the spacing between the dropdown and its trigger.\n * @default 'compact'\n */\n triggerOffset?: FlyoutSpacing;\n /**\n * Define the maximum width of the flyout\n * @default \"360px\"\n */\n maxWidth?: string;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nconst SPACING_MAP: Record<FlyoutSpacing, number> = {\n compact: 8,\n comfortable: 12,\n spacious: 16,\n};\n\nexport const FlyoutContent = (\n {\n align = 'start',\n maxWidth = '360px',\n padding = 'compact',\n rounded = 'medium',\n width = 'fit-content',\n shadow = 'medium',\n triggerOffset = 'compact',\n 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n return (\n <RadixPopover.Portal>\n <ThemeProvider theme={theme}>\n <div className={styles.overlay} />\n <RadixPopover.Content\n style={\n {\n '--flyout-max-width': maxWidth,\n '--flyout-width': width,\n } as CSSProperties\n }\n ref={ref}\n align={align}\n collisionPadding={8}\n sideOffset={SPACING_MAP[triggerOffset]}\n className={styles.root}\n data-flyout-spacing={padding}\n data-rounded={rounded}\n data-shadow={shadow}\n data-test-id={dataTestId}\n onFocus={addShowFocusRing}\n {...props}\n >\n {children}\n </RadixPopover.Content>\n </ThemeProvider>\n </RadixPopover.Portal>\n );\n};\nFlyoutContent.displayName = 'Flyout.Content';\n\nexport type FlyoutHeaderProps = {\n /**\n * Show a close button in the header\n * @default false\n */\n showCloseButton?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const FlyoutHeader = (\n { showCloseButton, children, 'data-test-id': dataTestId = 'fondue-flyout-header' }: FlyoutHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.header}>\n <div>{children}</div>\n {showCloseButton && (\n <RadixPopover.Close role=\"button\" data-test-id={`${dataTestId}-close`} className={styles.close}>\n <IconCross size={20} />\n </RadixPopover.Close>\n )}\n </div>\n );\n};\nFlyoutHeader.displayName = 'Flyout.Header';\n\nexport type FlyoutFooterProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const FlyoutFooter = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-footer' }: FlyoutFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.footer}>\n {children}\n </div>\n );\n};\nFlyoutFooter.displayName = 'Flyout.Footer';\n\nexport type FlyoutBodyProps = {\n children?: ReactNode;\n 'data-test-id'?: string;\n /**\n * Allow the body to scroll if the max height of the flyout is reached\n * @default false\n */\n scrollable?: boolean;\n};\n\nexport const FlyoutBody = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-body', scrollable = false }: FlyoutBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n data-flyout-spacing=\"compact\"\n data-scrollable={scrollable}\n className={styles.body}\n >\n {children}\n </div>\n );\n};\nFlyoutBody.displayName = 'Flyout.Body';\n\nexport const Flyout = {\n Root: FlyoutRoot,\n Trigger: forwardRef<HTMLButtonElement, FlyoutTriggerProps>(FlyoutTrigger),\n Content: forwardRef<HTMLDivElement, FlyoutContentProps>(FlyoutContent),\n Header: forwardRef<HTMLDivElement, FlyoutHeaderProps>(FlyoutHeader),\n Footer: forwardRef<HTMLDivElement, FlyoutFooterProps>(FlyoutFooter),\n Body: forwardRef<HTMLDivElement, FlyoutBodyProps>(FlyoutBody),\n};\n"],"names":["FlyoutRoot","children","props","RadixPopover","FlyoutTrigger","asChild","dataTestId","ref","jsx","addAutoFocusAttribute","SPACING_MAP","FlyoutContent","align","maxWidth","padding","rounded","width","shadow","triggerOffset","theme","useFondueTheme","jsxs","ThemeProvider","styles","addShowFocusRing","FlyoutHeader","showCloseButton","IconCross","FlyoutFooter","FlyoutBody","scrollable","Flyout","forwardRef"],"mappings":";;;;;;;AA8BO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAC9BC,EAAa,MAAb,EAAmB,GAAGD,GAAQ,UAAAD,GAAS;AAEnDD,EAAW,cAAc;AAYlB,MAAMI,IAAgB,CACzB,EAAE,SAAAC,IAAU,IAAM,UAAAJ,GAAU,gBAAgBK,IAAa,yBAAyB,GAAGJ,EAAM,GAC3FK,MAGI,gBAAAC;AAAA,EA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B,UAAAzB,GAAU,gBAAgBK,IAAa,uBAAuB,GACjFC,wBAGK,OAAI,EAAA,gBAAcD,GAAY,KAAAC,GAAU,WAAWgB,EAAO,QACvD,UAAA;AAAA,EAAA,gBAAAf,EAAC,SAAK,UAAAP,GAAS;AAAA,EACdyB,KACI,gBAAAlB,EAAAL,EAAa,OAAb,EAAmB,MAAK,UAAS,gBAAc,GAAGG,CAAU,UAAU,WAAWiB,EAAO,OACrF,4BAACI,GAAU,EAAA,MAAM,IAAI,EACzB,CAAA;AAAA,GAER;AAGRF,EAAa,cAAc;AAId,MAAAG,IAAe,CACxB,EAAE,UAAA3B,GAAU,gBAAgBK,IAAa,0BACzCC,MAGI,gBAAAC,EAAC,SAAI,gBAAcF,GAAY,KAAAC,GAAU,WAAWgB,EAAO,QACtD,UAAAtB,GACL;AAGR2B,EAAa,cAAc;AAYd,MAAAC,IAAa,CACtB,EAAE,UAAA5B,GAAU,gBAAgBK,IAAa,sBAAsB,YAAAwB,IAAa,GAAM,GAClFvB,MAGI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACG,gBAAcF;AAAA,IACd,KAAAC;AAAA,IACA,uBAAoB;AAAA,IACpB,mBAAiBuB;AAAA,IACjB,WAAWP,EAAO;AAAA,IAEjB,UAAAtB;AAAA,EAAA;AACL;AAGR4B,EAAW,cAAc;AAElB,MAAME,IAAS;AAAA,EAClB,MAAM/B;AAAA,EACN,SAASgC,EAAkD5B,CAAa;AAAA,EACxE,SAAS4B,EAA+CrB,CAAa;AAAA,EACrE,QAAQqB,EAA8CP,CAAY;AAAA,EAClE,QAAQO,EAA8CJ,CAAY;AAAA,EAClE,MAAMI,EAA4CH,CAAU;AAChE;"}
@@ -1,18 +1,18 @@
1
- const o = "_root_xbnxk_6", e = "_overlay_xbnxk_50", _ = "_header_xbnxk_67", t = "_body_xbnxk_87", n = "_footer_xbnxk_105", r = "_close_xbnxk_125", s = {
1
+ const o = "_root_hstbt_6", t = "_overlay_hstbt_51", s = "_header_hstbt_68", e = "_body_hstbt_89", _ = "_footer_hstbt_114", r = "_close_hstbt_135", c = {
2
2
  root: o,
3
- overlay: e,
4
- header: _,
5
- body: t,
6
- footer: n,
3
+ overlay: t,
4
+ header: s,
5
+ body: e,
6
+ footer: _,
7
7
  close: r
8
8
  };
9
9
  export {
10
- t as body,
10
+ e as body,
11
11
  r as close,
12
- s as default,
13
- n as footer,
14
- _ as header,
15
- e as overlay,
12
+ c as default,
13
+ _ as footer,
14
+ s as header,
15
+ t as overlay,
16
16
  o as root
17
17
  };
18
18
  //# sourceMappingURL=fondue-components50.js.map
@@ -1,9 +1,9 @@
1
- const t = "_root_o1xgk_5", e = "_item_o1xgk_30", o = "_itemLabel_o1xgk_50", a = "_itemLabelActive_o1xgk_70", i = "_itemLabelInactive_o1xgk_100", _ = "_activeIndicator_o1xgk_130", c = "_separator_o1xgk_227", n = {
1
+ const t = "_root_1yzu4_5", e = "_item_1yzu4_30", a = "_itemLabel_1yzu4_50", i = "_itemLabelActive_1yzu4_70", o = "_itemLabelInactive_1yzu4_100", _ = "_activeIndicator_1yzu4_130", c = "_separator_1yzu4_227", n = {
2
2
  root: t,
3
3
  item: e,
4
- itemLabel: o,
5
- itemLabelActive: a,
6
- itemLabelInactive: i,
4
+ itemLabel: a,
5
+ itemLabelActive: i,
6
+ itemLabelInactive: o,
7
7
  activeIndicator: _,
8
8
  separator: c
9
9
  };
@@ -11,9 +11,9 @@ export {
11
11
  _ as activeIndicator,
12
12
  n as default,
13
13
  e as item,
14
- o as itemLabel,
15
- a as itemLabelActive,
16
- i as itemLabelInactive,
14
+ a as itemLabel,
15
+ i as itemLabelActive,
16
+ o as itemLabelInactive,
17
17
  t as root,
18
18
  c as separator
19
19
  };
@@ -1,36 +1,36 @@
1
- const o = "_root_o7dw5_7", c = "_selectedValue_o7dw5_69", _ = "_input_o7dw5_87", t = "_slot_o7dw5_113", e = "_clear_o7dw5_165", n = "_icons_o7dw5_178", s = "_caret_o7dw5_184", r = "_iconSuccess_o7dw5_212", a = "_iconError_o7dw5_218", l = "_menu_o7dw5_224", d = "_portal_o7dw5_247", u = "_item_o7dw5_263", i = "_checkmarkIcon_o7dw5_304", w = "_itemValue_o7dw5_311", m = "_group_o7dw5_325", p = {
2
- root: o,
3
- selectedValue: c,
4
- input: _,
5
- slot: t,
6
- clear: e,
7
- icons: n,
1
+ const c = "_root_9n1pi_7", n = "_selectedValue_9n1pi_69", o = "_input_9n1pi_87", _ = "_slot_9n1pi_113", t = "_clear_9n1pi_165", e = "_icons_9n1pi_178", s = "_caret_9n1pi_184", i = "_iconSuccess_9n1pi_212", r = "_iconError_9n1pi_218", p = "_menu_9n1pi_224", a = "_portal_9n1pi_247", l = "_item_9n1pi_263", u = "_checkmarkIcon_9n1pi_304", m = "_itemValue_9n1pi_311", k = "_group_9n1pi_325", V = {
2
+ root: c,
3
+ selectedValue: n,
4
+ input: o,
5
+ slot: _,
6
+ clear: t,
7
+ icons: e,
8
8
  caret: s,
9
- iconSuccess: r,
10
- iconError: a,
11
- menu: l,
12
- portal: d,
13
- item: u,
14
- checkmarkIcon: i,
15
- itemValue: w,
16
- group: m
9
+ iconSuccess: i,
10
+ iconError: r,
11
+ menu: p,
12
+ portal: a,
13
+ item: l,
14
+ checkmarkIcon: u,
15
+ itemValue: m,
16
+ group: k
17
17
  };
18
18
  export {
19
19
  s as caret,
20
- i as checkmarkIcon,
21
- e as clear,
22
- p as default,
23
- m as group,
24
- a as iconError,
25
- r as iconSuccess,
26
- n as icons,
27
- _ as input,
28
- u as item,
29
- w as itemValue,
30
- l as menu,
31
- d as portal,
32
- o as root,
33
- c as selectedValue,
34
- t as slot
20
+ u as checkmarkIcon,
21
+ t as clear,
22
+ V as default,
23
+ k as group,
24
+ r as iconError,
25
+ i as iconSuccess,
26
+ e as icons,
27
+ o as input,
28
+ l as item,
29
+ m as itemValue,
30
+ p as menu,
31
+ a as portal,
32
+ c as root,
33
+ n as selectedValue,
34
+ _ as slot
35
35
  };
36
36
  //# sourceMappingURL=fondue-components63.js.map
package/dist/index.d.ts CHANGED
@@ -765,6 +765,11 @@ export declare const Flyout: {
765
765
  declare type FlyoutBodyProps = {
766
766
  children?: ReactNode;
767
767
  'data-test-id'?: string;
768
+ /**
769
+ * Allow the body to scroll if the max height of the flyout is reached
770
+ * @default false
771
+ */
772
+ scrollable?: boolean;
768
773
  };
769
774
 
770
775
  declare type FlyoutContentProps = {