@frontify/fondue-components 11.0.0 → 12.0.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.
Files changed (63) hide show
  1. package/dist/fondue-components.js +31 -27
  2. package/dist/fondue-components.js.map +1 -1
  3. package/dist/fondue-components10.js +1 -1
  4. package/dist/fondue-components11.js +8 -8
  5. package/dist/fondue-components11.js.map +1 -1
  6. package/dist/fondue-components12.js +1 -1
  7. package/dist/fondue-components13.js +1 -1
  8. package/dist/fondue-components16.js +1 -1
  9. package/dist/fondue-components20.js +1 -1
  10. package/dist/fondue-components23.js +1 -1
  11. package/dist/fondue-components24.js +17 -17
  12. package/dist/fondue-components24.js.map +1 -1
  13. package/dist/fondue-components25.js +7 -32
  14. package/dist/fondue-components25.js.map +1 -1
  15. package/dist/fondue-components26.js +32 -5
  16. package/dist/fondue-components26.js.map +1 -1
  17. package/dist/fondue-components27.js +5 -12
  18. package/dist/fondue-components27.js.map +1 -1
  19. package/dist/fondue-components28.js +10 -153
  20. package/dist/fondue-components28.js.map +1 -1
  21. package/dist/fondue-components29.js +59 -22
  22. package/dist/fondue-components29.js.map +1 -1
  23. package/dist/fondue-components3.js +2 -2
  24. package/dist/fondue-components30.js +17 -17
  25. package/dist/fondue-components30.js.map +1 -1
  26. package/dist/fondue-components31.js +112 -15
  27. package/dist/fondue-components31.js.map +1 -1
  28. package/dist/fondue-components32.js +19 -30
  29. package/dist/fondue-components32.js.map +1 -1
  30. package/dist/fondue-components33.js +32 -37
  31. package/dist/fondue-components33.js.map +1 -1
  32. package/dist/fondue-components34.js +34 -127
  33. package/dist/fondue-components34.js.map +1 -1
  34. package/dist/fondue-components35.js +129 -20
  35. package/dist/fondue-components35.js.map +1 -1
  36. package/dist/fondue-components36.js +21 -45
  37. package/dist/fondue-components36.js.map +1 -1
  38. package/dist/fondue-components37.js +44 -632
  39. package/dist/fondue-components37.js.map +1 -1
  40. package/dist/fondue-components4.js +4 -4
  41. package/dist/fondue-components40.js +1 -1
  42. package/dist/fondue-components46.js +1 -1
  43. package/dist/fondue-components5.js +2 -2
  44. package/dist/fondue-components53.js +8 -8
  45. package/dist/fondue-components53.js.map +1 -1
  46. package/dist/fondue-components56.js +1 -1
  47. package/dist/fondue-components6.js +5 -5
  48. package/dist/fondue-components67.js +7 -2
  49. package/dist/fondue-components67.js.map +1 -1
  50. package/dist/fondue-components68.js +2 -15
  51. package/dist/fondue-components68.js.map +1 -1
  52. package/dist/fondue-components69.js +14 -38
  53. package/dist/fondue-components69.js.map +1 -1
  54. package/dist/fondue-components7.js +23 -23
  55. package/dist/fondue-components7.js.map +1 -1
  56. package/dist/fondue-components70.js +42 -0
  57. package/dist/fondue-components70.js.map +1 -0
  58. package/dist/fondue-components8.js +1 -1
  59. package/dist/fondue-components9.js +5 -5
  60. package/dist/fondue-components9.js.map +1 -1
  61. package/dist/index.d.ts +19 -0
  62. package/dist/style.css +1 -1
  63. package/package.json +4 -4
@@ -2,47 +2,51 @@
2
2
  import { Box as t } from "./fondue-components3.js";
3
3
  import { Button as x } from "./fondue-components4.js";
4
4
  import { Checkbox as f } from "./fondue-components5.js";
5
- import { ColorPicker as i } from "./fondue-components6.js";
6
- import { Dialog as n } from "./fondue-components7.js";
7
- import { Divider as d } from "./fondue-components8.js";
8
- import { Dropdown as b } from "./fondue-components9.js";
9
- import { Flex as g } from "./fondue-components10.js";
10
- import { Flyout as B } from "./fondue-components11.js";
11
- import { Grid as D } from "./fondue-components12.js";
12
- import { Label as k } from "./fondue-components13.js";
13
- import { LoadingBar as F } from "./fondue-components14.js";
14
- import { ScrollArea as s } from "./fondue-components15.js";
15
- import { Section as y } from "./fondue-components16.js";
16
- import { SegmentedControl as G } from "./fondue-components17.js";
17
- import { Select as P } from "./fondue-components18.js";
5
+ import { ColorPicker as l } from "./fondue-components6.js";
6
+ import { Dialog as d } from "./fondue-components7.js";
7
+ import { Divider as T } from "./fondue-components8.js";
8
+ import { Dropdown as S } from "./fondue-components9.js";
9
+ import { Flex as u } from "./fondue-components10.js";
10
+ import { Flyout as C } from "./fondue-components11.js";
11
+ import { Grid as B } from "./fondue-components12.js";
12
+ import { Label as F } from "./fondue-components13.js";
13
+ import { LoadingBar as s } from "./fondue-components14.js";
14
+ import { ScrollArea as w } from "./fondue-components15.js";
15
+ import { Section as P } from "./fondue-components16.js";
16
+ import { SegmentedControl as A } from "./fondue-components17.js";
17
+ import { Select as I } from "./fondue-components18.js";
18
18
  import { Slider as q } from "./fondue-components19.js";
19
19
  import { Switch as E } from "./fondue-components20.js";
20
20
  import { Table as J } from "./fondue-components21.js";
21
21
  import { Tabs as M } from "./fondue-components22.js";
22
22
  import { TextInput as O } from "./fondue-components23.js";
23
23
  import { Tooltip as R } from "./fondue-components24.js";
24
+ import { ThemeContext as V, ThemeProvider as W, useFondueTheme as X } from "./fondue-components25.js";
24
25
  export {
25
26
  t as Box,
26
27
  x as Button,
27
28
  f as Checkbox,
28
- i as ColorPicker,
29
- n as Dialog,
30
- d as Divider,
31
- b as Dropdown,
32
- g as Flex,
33
- B as Flyout,
34
- D as Grid,
35
- k as Label,
36
- F as LoadingBar,
37
- s as ScrollArea,
38
- y as Section,
39
- G as SegmentedControl,
40
- P as Select,
29
+ l as ColorPicker,
30
+ d as Dialog,
31
+ T as Divider,
32
+ S as Dropdown,
33
+ u as Flex,
34
+ C as Flyout,
35
+ B as Grid,
36
+ F as Label,
37
+ s as LoadingBar,
38
+ w as ScrollArea,
39
+ P as Section,
40
+ A as SegmentedControl,
41
+ I as Select,
41
42
  q as Slider,
42
43
  E as Switch,
43
44
  J as Table,
44
45
  M as Tabs,
45
46
  O as TextInput,
46
- R as Tooltip
47
+ V as ThemeContext,
48
+ W as ThemeProvider,
49
+ R as Tooltip,
50
+ X as useFondueTheme
47
51
  };
48
52
  //# sourceMappingURL=fondue-components.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"fondue-components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import { forwardRef as n } from "react";
3
- import { propsToCssVariables as y } from "./fondue-components25.js";
3
+ import { propsToCssVariables as y } from "./fondue-components26.js";
4
4
  import x from "./fondue-components43.js";
5
5
  const u = n(
6
6
  ({
@@ -1,16 +1,16 @@
1
1
  import { jsx as a, jsxs as l } from "react/jsx-runtime";
2
- import { IconCross as b } from "@frontify/fondue-icons";
3
- import { useFondueTheme as w, ThemeProvider as x } from "./fondue-components37.js";
2
+ import { IconCross as w } from "@frontify/fondue-icons";
4
3
  import * as i from "@radix-ui/react-popover";
5
4
  import { forwardRef as s } from "react";
6
- import { addAutoFocusAttribute as C, addShowFocusRing as T } from "./fondue-components38.js";
5
+ import { addAutoFocusAttribute as x, addShowFocusRing as C } from "./fondue-components38.js";
6
+ import { useFondueTheme as b, ThemeProvider as T } from "./fondue-components25.js";
7
7
  import d from "./fondue-components44.js";
8
8
  const n = ({ children: t, ...o }) => /* @__PURE__ */ a(i.Root, { ...o, children: t });
9
9
  n.displayName = "Flyout.Root";
10
10
  const m = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-trigger", ...r }, u) => /* @__PURE__ */ a(
11
11
  i.Trigger,
12
12
  {
13
- onMouseDown: C,
13
+ onMouseDown: x,
14
14
  "data-auto-focus-visible": "true",
15
15
  "data-auto-focus-trigger": !0,
16
16
  "data-test-id": e,
@@ -32,8 +32,8 @@ const y = ({
32
32
  children: h,
33
33
  ...N
34
34
  }, v) => {
35
- const R = w();
36
- return /* @__PURE__ */ a(i.Portal, { children: /* @__PURE__ */ l(x, { theme: R, children: [
35
+ const R = b();
36
+ return /* @__PURE__ */ a(i.Portal, { children: /* @__PURE__ */ l(T, { theme: R, children: [
37
37
  /* @__PURE__ */ a("div", { className: d.overlay }),
38
38
  /* @__PURE__ */ a(
39
39
  i.Content,
@@ -51,7 +51,7 @@ const y = ({
51
51
  "data-rounded": r,
52
52
  "data-shadow": F,
53
53
  "data-test-id": g,
54
- onFocus: T,
54
+ onFocus: C,
55
55
  ...N,
56
56
  children: h
57
57
  }
@@ -61,7 +61,7 @@ const y = ({
61
61
  y.displayName = "Flyout.Content";
62
62
  const c = ({ 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: [
63
63
  /* @__PURE__ */ a("div", { children: o }),
64
- t && /* @__PURE__ */ a(i.Close, { role: "button", "data-test-id": `${e}-close`, className: d.close, children: /* @__PURE__ */ a(b, { size: 20 }) })
64
+ t && /* @__PURE__ */ a(i.Close, { role: "button", "data-test-id": `${e}-close`, className: d.close, children: /* @__PURE__ */ a(w, { size: 20 }) })
65
65
  ] });
66
66
  c.displayName = "Flyout.Header";
67
67
  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 });
@@ -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 { ThemeProvider, useFondueTheme } from '@frontify/fondue-tokens/theme-provider';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { forwardRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport styles from './styles/flyout.module.scss';\n\nexport type FlyoutRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the flyout\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport type FlyoutTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const FlyoutTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-flyout-trigger', ...props }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.Trigger\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild={asChild}\n ref={ref}\n {...props}\n >\n {children}\n </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\nexport type FlyoutContentProps = {\n /**\n * Add a shadow to the flyout\n * @default \"medium\"\n */\n shadow?: 'none' | 'medium' | 'large';\n /**\n * Add rounded corners to the flyout\n * @default \"medium\"\n */\n rounded?: 'none' | 'medium' | 'large';\n /**\n * Define the prefered side of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Define the prefered alignment of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Define the padding of the flyout\n * @default \"compact\"\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Define the fixed width of the flyout\n * @default \"fit-content\"\n */\n width?: string;\n /**\n * Define the maximum width of the flyout\n * @default \"360px\"\n */\n maxWidth?: string;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const FlyoutContent = (\n {\n align = 'start',\n maxWidth = '360px',\n padding = 'compact',\n rounded = 'medium',\n width = 'fit-content',\n shadow = 'medium',\n 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n 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={8}\n className={styles.root}\n data-flyout-spacing={padding}\n data-rounded={rounded}\n data-shadow={shadow}\n data-test-id={dataTestId}\n onFocus={addShowFocusRing}\n {...props}\n >\n {children}\n </RadixPopover.Content>\n </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","FlyoutContent","align","maxWidth","padding","rounded","width","shadow","theme","useFondueTheme","jsxs","ThemeProvider","styles","addShowFocusRing","FlyoutHeader","showCloseButton","IconCross","FlyoutFooter","FlyoutBody","Flyout","forwardRef"],"mappings":"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"}
1
+ {"version":3,"file":"fondue-components11.js","sources":["../src/components/Flyout/Flyout.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { forwardRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport { 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\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 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={8}\n className={styles.root}\n data-flyout-spacing={padding}\n data-rounded={rounded}\n data-shadow={shadow}\n data-test-id={dataTestId}\n onFocus={addShowFocusRing}\n {...props}\n >\n {children}\n </RadixPopover.Content>\n </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","FlyoutContent","align","maxWidth","padding","rounded","width","shadow","theme","useFondueTheme","jsxs","ThemeProvider","styles","addShowFocusRing","FlyoutHeader","showCloseButton","IconCross","FlyoutFooter","FlyoutBody","Flyout","forwardRef"],"mappings":"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"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as f } from "react/jsx-runtime";
2
2
  import { forwardRef as y } from "react";
3
- import { propsToCssVariables as n } from "./fondue-components25.js";
3
+ import { propsToCssVariables as n } from "./fondue-components26.js";
4
4
  import u from "./fondue-components45.js";
5
5
  const c = y(
6
6
  ({
@@ -1,7 +1,7 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import * as d from "@radix-ui/react-label";
3
3
  import { forwardRef as i } from "react";
4
- import { cn as n } from "./fondue-components27.js";
4
+ import { cn as n } from "./fondue-components28.js";
5
5
  const s = ({ className: e, "data-test-id": a = "fondue-label", ...t }, r) => /* @__PURE__ */ o(
6
6
  d.Root,
7
7
  {
@@ -1,6 +1,6 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as m } from "react";
3
- import { propsToCssVariables as c } from "./fondue-components25.js";
3
+ import { propsToCssVariables as c } from "./fondue-components26.js";
4
4
  import f from "./fondue-components48.js";
5
5
  const y = m(
6
6
  ({
@@ -1,7 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import * as o from "@radix-ui/react-switch";
3
3
  import { forwardRef as l } from "react";
4
- import { cn as f } from "./fondue-components27.js";
4
+ import { cn as f } from "./fondue-components28.js";
5
5
  import t from "./fondue-components58.js";
6
6
  const n = ({
7
7
  value: a,
@@ -1,7 +1,7 @@
1
1
  import { jsxs as g, jsx as s } from "react/jsx-runtime";
2
2
  import { IconCheckMark as w, IconExclamationMarkTriangle as N } from "@frontify/fondue-icons";
3
3
  import { forwardRef as n, useRef as S } from "react";
4
- import { cn as m } from "./fondue-components27.js";
4
+ import { cn as m } from "./fondue-components28.js";
5
5
  import r from "./fondue-components65.js";
6
6
  const f = ({
7
7
  children: c,
@@ -1,18 +1,18 @@
1
1
  import { jsx as t, jsxs as g } from "react/jsx-runtime";
2
- import { useFondueTheme as u, ThemeProvider as h } from "./fondue-components37.js";
3
2
  import * as e from "@radix-ui/react-tooltip";
4
- import { forwardRef as s } from "react";
5
- import { cn as y } from "./fondue-components27.js";
6
- import d from "./fondue-components66.js";
7
- const l = ({ children: o, enterDelay: r = 700, open: i, onOpenChange: a, ...n }) => /* @__PURE__ */ t(e.Provider, { children: /* @__PURE__ */ t(e.Root, { delayDuration: r, open: i, onOpenChange: a, ...n, children: o }) });
3
+ import { forwardRef as d } from "react";
4
+ import { cn as u } from "./fondue-components28.js";
5
+ import { useFondueTheme as h, ThemeProvider as y } from "./fondue-components25.js";
6
+ import s from "./fondue-components66.js";
7
+ const l = ({ children: o, enterDelay: r = 700, open: i, onOpenChange: n, ...a }) => /* @__PURE__ */ t(e.Provider, { children: /* @__PURE__ */ t(e.Root, { delayDuration: r, open: i, onOpenChange: n, ...a, children: o }) });
8
8
  l.displayName = "Tooltip.Root";
9
- const p = ({ asChild: o = !1, children: r, "data-test-id": i = "fondue-tooltip-trigger" }, a) => /* @__PURE__ */ t(
9
+ const p = ({ asChild: o = !1, children: r, "data-test-id": i = "fondue-tooltip-trigger" }, n) => /* @__PURE__ */ t(
10
10
  e.Trigger,
11
11
  {
12
12
  "data-test-id": i,
13
13
  type: o ? void 0 : "button",
14
14
  asChild: o,
15
- ref: a,
15
+ ref: n,
16
16
  children: r
17
17
  }
18
18
  );
@@ -21,17 +21,17 @@ const m = ({
21
21
  children: o,
22
22
  className: r,
23
23
  maxWidth: i,
24
- "data-test-id": a = "fondue-tooltip-content",
25
- padding: n = "spacious",
24
+ "data-test-id": n = "fondue-tooltip-content",
25
+ padding: a = "spacious",
26
26
  ...c
27
27
  }, f) => {
28
- const T = u();
29
- return /* @__PURE__ */ t(e.Portal, { children: /* @__PURE__ */ t(h, { theme: T, children: /* @__PURE__ */ g(
28
+ const T = h();
29
+ return /* @__PURE__ */ t(e.Portal, { children: /* @__PURE__ */ t(y, { theme: T, children: /* @__PURE__ */ g(
30
30
  e.Content,
31
31
  {
32
- "data-test-id": a,
33
- "data-tooltip-spacing": n,
34
- className: y(d.root, r),
32
+ "data-test-id": n,
33
+ "data-tooltip-spacing": a,
34
+ className: u(s.root, r),
35
35
  style: { maxWidth: i },
36
36
  collisionPadding: 16,
37
37
  sideOffset: 8,
@@ -39,7 +39,7 @@ const m = ({
39
39
  ...c,
40
40
  children: [
41
41
  o,
42
- /* @__PURE__ */ t(e.Arrow, { "aria-hidden": "true", className: d.arrow })
42
+ /* @__PURE__ */ t(e.Arrow, { "aria-hidden": "true", className: s.arrow })
43
43
  ]
44
44
  }
45
45
  ) }) });
@@ -47,8 +47,8 @@ const m = ({
47
47
  m.displayName = "Tooltip.Content";
48
48
  const C = {
49
49
  Root: l,
50
- Trigger: s(p),
51
- Content: s(m)
50
+ Trigger: d(p),
51
+ Content: d(m)
52
52
  };
53
53
  export {
54
54
  C as Tooltip,
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components24.js","sources":["../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { ThemeProvider, useFondueTheme } from '@frontify/fondue-tokens/theme-provider';\nimport * as RadixTooltip from '@radix-ui/react-tooltip';\nimport { forwardRef, type ForwardedRef, type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport styles from './styles/tooltip.module.scss';\n\nexport type TooltipRootProps = {\n /**\n * Sets the open state of the tooltip.\n */\n open?: boolean;\n /**\n * Callback that is called when the open state of the tooltip changes.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * The delay in milliseconds before the tooltip appears.\n * @default 700\n */\n enterDelay?: number;\n children: Array<ReactElement<TooltipTriggerProps | TooltipContentProps>>;\n};\n\nexport const TooltipRoot = ({ children, enterDelay = 700, open, onOpenChange, ...props }: TooltipRootProps) => {\n return (\n <RadixTooltip.Provider>\n <RadixTooltip.Root delayDuration={enterDelay} open={open} onOpenChange={onOpenChange} {...props}>\n {children}\n </RadixTooltip.Root>\n </RadixTooltip.Provider>\n );\n};\nTooltipRoot.displayName = 'Tooltip.Root';\n\nexport type TooltipTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n children: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const TooltipTrigger = (\n { asChild = false, children, 'data-test-id': dataTestId = 'fondue-tooltip-trigger' }: TooltipTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixTooltip.Trigger\n data-test-id={dataTestId}\n type={!asChild ? 'button' : undefined}\n asChild={asChild}\n ref={ref}\n >\n {children}\n </RadixTooltip.Trigger>\n );\n};\nTooltipTrigger.displayName = 'Tooltip.Trigger';\n\nexport type TooltipContentProps = {\n /**\n * @default \"spacious\"\n */\n padding?: 'spacious' | 'compact';\n /**\n * Defines the preferred side of the tooltip. It will not be respected if there are collisions with the viewport.\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n maxWidth?: string;\n className?: string;\n children: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const TooltipContent = (\n {\n children,\n className,\n maxWidth,\n 'data-test-id': dataTestId = 'fondue-tooltip-content',\n padding = 'spacious',\n ...props\n }: TooltipContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n return (\n <RadixTooltip.Portal>\n <ThemeProvider theme={theme}>\n <RadixTooltip.Content\n data-test-id={dataTestId}\n data-tooltip-spacing={padding}\n className={cn(styles.root, className)}\n style={{ maxWidth }}\n collisionPadding={16}\n sideOffset={8}\n ref={ref}\n {...props}\n >\n {children}\n <RadixTooltip.Arrow aria-hidden=\"true\" className={styles.arrow} />\n </RadixTooltip.Content>\n </ThemeProvider>\n </RadixTooltip.Portal>\n );\n};\nTooltipContent.displayName = 'Tooltip.Content';\n\nexport const Tooltip = {\n Root: TooltipRoot,\n Trigger: forwardRef<HTMLButtonElement, TooltipTriggerProps>(TooltipTrigger),\n Content: forwardRef<HTMLDivElement, TooltipContentProps>(TooltipContent),\n};\n"],"names":["TooltipRoot","children","enterDelay","open","onOpenChange","props","jsx","RadixTooltip","TooltipTrigger","asChild","dataTestId","ref","TooltipContent","className","maxWidth","padding","theme","useFondueTheme","ThemeProvider","jsxs","cn","styles","Tooltip","forwardRef"],"mappings":";;;;;;AA2Ba,MAAAA,IAAc,CAAC,EAAE,UAAAC,GAAU,YAAAC,IAAa,KAAK,MAAAC,GAAM,cAAAC,GAAc,GAAGC,QAExE,gBAAAC,EAAAC,EAAa,UAAb,EACG,4BAACA,EAAa,MAAb,EAAkB,eAAeL,GAAY,MAAAC,GAAY,cAAAC,GAA6B,GAAGC,GACrF,UAAAJ,EACL,CAAA,GACJ;AAGRD,EAAY,cAAc;AAYb,MAAAQ,IAAiB,CAC1B,EAAE,SAAAC,IAAU,IAAO,UAAAR,GAAU,gBAAgBS,IAAa,yBAAyB,GACnFC,MAGI,gBAAAL;AAAA,EAACC,EAAa;AAAA,EAAb;AAAA,IACG,gBAAcG;AAAA,IACd,MAAOD,IAAqB,SAAX;AAAA,IACjB,SAAAA;AAAA,IACA,KAAAE;AAAA,IAEC,UAAAV;AAAA,EAAA;AACL;AAGRO,EAAe,cAAc;AAiBtB,MAAMI,IAAiB,CAC1B;AAAA,EACI,UAAAX;AAAA,EACA,WAAAY;AAAA,EACA,UAAAC;AAAA,EACA,gBAAgBJ,IAAa;AAAA,EAC7B,SAAAK,IAAU;AAAA,EACV,GAAGV;AACP,GACAM,MACC;AACD,QAAMK,IAAQC,EAAe;AAC7B,2BACKV,EAAa,QAAb,EACG,UAAA,gBAAAD,EAACY,KAAc,OAAAF,GACX,UAAA,gBAAAG;AAAA,IAACZ,EAAa;AAAA,IAAb;AAAA,MACG,gBAAcG;AAAA,MACd,wBAAsBK;AAAA,MACtB,WAAWK,EAAGC,EAAO,MAAMR,CAAS;AAAA,MACpC,OAAO,EAAE,UAAAC,EAAS;AAAA,MAClB,kBAAkB;AAAA,MAClB,YAAY;AAAA,MACZ,KAAAH;AAAA,MACC,GAAGN;AAAA,MAEH,UAAA;AAAA,QAAAJ;AAAA,QACD,gBAAAK,EAACC,EAAa,OAAb,EAAmB,eAAY,QAAO,WAAWc,EAAO,MAAO,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,KAExE,EACJ,CAAA;AAER;AACAT,EAAe,cAAc;AAEtB,MAAMU,IAAU;AAAA,EACnB,MAAMtB;AAAA,EACN,SAASuB,EAAmDf,CAAc;AAAA,EAC1E,SAASe,EAAgDX,CAAc;AAC3E;"}
1
+ {"version":3,"file":"fondue-components24.js","sources":["../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as RadixTooltip from '@radix-ui/react-tooltip';\nimport { forwardRef, type ForwardedRef, type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport styles from './styles/tooltip.module.scss';\n\nexport type TooltipRootProps = {\n /**\n * Sets the open state of the tooltip.\n */\n open?: boolean;\n /**\n * Callback that is called when the open state of the tooltip changes.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * The delay in milliseconds before the tooltip appears.\n * @default 700\n */\n enterDelay?: number;\n children: Array<ReactElement<TooltipTriggerProps | TooltipContentProps>>;\n};\n\nexport const TooltipRoot = ({ children, enterDelay = 700, open, onOpenChange, ...props }: TooltipRootProps) => {\n return (\n <RadixTooltip.Provider>\n <RadixTooltip.Root delayDuration={enterDelay} open={open} onOpenChange={onOpenChange} {...props}>\n {children}\n </RadixTooltip.Root>\n </RadixTooltip.Provider>\n );\n};\nTooltipRoot.displayName = 'Tooltip.Root';\n\nexport type TooltipTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default false\n */\n asChild?: boolean;\n children: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const TooltipTrigger = (\n { asChild = false, children, 'data-test-id': dataTestId = 'fondue-tooltip-trigger' }: TooltipTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixTooltip.Trigger\n data-test-id={dataTestId}\n type={!asChild ? 'button' : undefined}\n asChild={asChild}\n ref={ref}\n >\n {children}\n </RadixTooltip.Trigger>\n );\n};\nTooltipTrigger.displayName = 'Tooltip.Trigger';\n\nexport type TooltipContentProps = {\n /**\n * @default \"spacious\"\n */\n padding?: 'spacious' | 'compact';\n /**\n * Defines the preferred side of the tooltip. It will not be respected if there are collisions with the viewport.\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n maxWidth?: string;\n className?: string;\n children: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const TooltipContent = (\n {\n children,\n className,\n maxWidth,\n 'data-test-id': dataTestId = 'fondue-tooltip-content',\n padding = 'spacious',\n ...props\n }: TooltipContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n return (\n <RadixTooltip.Portal>\n <ThemeProvider theme={theme}>\n <RadixTooltip.Content\n data-test-id={dataTestId}\n data-tooltip-spacing={padding}\n className={cn(styles.root, className)}\n style={{ maxWidth }}\n collisionPadding={16}\n sideOffset={8}\n ref={ref}\n {...props}\n >\n {children}\n <RadixTooltip.Arrow aria-hidden=\"true\" className={styles.arrow} />\n </RadixTooltip.Content>\n </ThemeProvider>\n </RadixTooltip.Portal>\n );\n};\nTooltipContent.displayName = 'Tooltip.Content';\n\nexport const Tooltip = {\n Root: TooltipRoot,\n Trigger: forwardRef<HTMLButtonElement, TooltipTriggerProps>(TooltipTrigger),\n Content: forwardRef<HTMLDivElement, TooltipContentProps>(TooltipContent),\n};\n"],"names":["TooltipRoot","children","enterDelay","open","onOpenChange","props","jsx","RadixTooltip","TooltipTrigger","asChild","dataTestId","ref","TooltipContent","className","maxWidth","padding","theme","useFondueTheme","ThemeProvider","jsxs","cn","styles","Tooltip","forwardRef"],"mappings":";;;;;;AA4Ba,MAAAA,IAAc,CAAC,EAAE,UAAAC,GAAU,YAAAC,IAAa,KAAK,MAAAC,GAAM,cAAAC,GAAc,GAAGC,QAExE,gBAAAC,EAAAC,EAAa,UAAb,EACG,4BAACA,EAAa,MAAb,EAAkB,eAAeL,GAAY,MAAAC,GAAY,cAAAC,GAA6B,GAAGC,GACrF,UAAAJ,EACL,CAAA,GACJ;AAGRD,EAAY,cAAc;AAYb,MAAAQ,IAAiB,CAC1B,EAAE,SAAAC,IAAU,IAAO,UAAAR,GAAU,gBAAgBS,IAAa,yBAAyB,GACnFC,MAGI,gBAAAL;AAAA,EAACC,EAAa;AAAA,EAAb;AAAA,IACG,gBAAcG;AAAA,IACd,MAAOD,IAAqB,SAAX;AAAA,IACjB,SAAAA;AAAA,IACA,KAAAE;AAAA,IAEC,UAAAV;AAAA,EAAA;AACL;AAGRO,EAAe,cAAc;AAiBtB,MAAMI,IAAiB,CAC1B;AAAA,EACI,UAAAX;AAAA,EACA,WAAAY;AAAA,EACA,UAAAC;AAAA,EACA,gBAAgBJ,IAAa;AAAA,EAC7B,SAAAK,IAAU;AAAA,EACV,GAAGV;AACP,GACAM,MACC;AACD,QAAMK,IAAQC,EAAe;AAC7B,2BACKV,EAAa,QAAb,EACG,UAAA,gBAAAD,EAACY,KAAc,OAAAF,GACX,UAAA,gBAAAG;AAAA,IAACZ,EAAa;AAAA,IAAb;AAAA,MACG,gBAAcG;AAAA,MACd,wBAAsBK;AAAA,MACtB,WAAWK,EAAGC,EAAO,MAAMR,CAAS;AAAA,MACpC,OAAO,EAAE,UAAAC,EAAS;AAAA,MAClB,kBAAkB;AAAA,MAClB,YAAY;AAAA,MACZ,KAAAH;AAAA,MACC,GAAGN;AAAA,MAEH,UAAA;AAAA,QAAAJ;AAAA,QACD,gBAAAK,EAACC,EAAa,OAAb,EAAmB,eAAY,QAAO,WAAWc,EAAO,MAAO,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,KAExE,EACJ,CAAA;AAER;AACAT,EAAe,cAAc;AAEtB,MAAMU,IAAU;AAAA,EACnB,MAAMtB;AAAA,EACN,SAASuB,EAAmDf,CAAc;AAAA,EAC1E,SAASe,EAAgDX,CAAc;AAC3E;"}
@@ -1,35 +1,10 @@
1
- const g = (n) => n.startsWith("aria-") || n === "role", s = {
2
- m: "margin",
3
- mx: "margin-x",
4
- my: "margin-y",
5
- mt: "margin-top",
6
- mr: "margin-right",
7
- mb: "margin-bottom",
8
- ml: "margin-left",
9
- p: "padding",
10
- px: "padding-x",
11
- py: "padding-y",
12
- pt: "padding-top",
13
- pr: "padding-right",
14
- pb: "padding-bottom",
15
- pl: "padding-left",
16
- direction: "flex-direction",
17
- align: "align-items",
18
- wrap: "flex-wrap",
19
- columns: "grid-template-columns",
20
- rows: "grid-template-rows"
21
- }, m = (n, r) => n === "columns" || n === "rows" ? typeof r == "number" ? `repeat(${r}, 1fr)` : r : typeof r == "number" ? `${r * 0.25}rem` : r, f = (n, r = {}) => Object.entries(n).reduce((i, [t, e]) => {
22
- if (g(t))
23
- return i;
24
- const o = t in r ? r[t] : t in s ? s[t] : t, p = o == null ? void 0 : o.replaceAll(/([\da-z]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
25
- if (typeof e == "object")
26
- for (const [d, a] of Object.entries(e))
27
- a !== void 0 && (i[`--${d}-${p}`] = m(t, a));
28
- else
29
- i[`--${p}`] = m(t, e);
30
- return i;
31
- }, {});
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import n from "./fondue-components67.js";
3
+ import { createContext as s, useContext as i } from "react";
4
+ const r = s("light"), u = () => i(r), d = ({ children: o, theme: e = "light" }) => /* @__PURE__ */ t(r.Provider, { value: e, children: /* @__PURE__ */ t("div", { className: n[e], children: o }) });
32
5
  export {
33
- f as propsToCssVariables
6
+ r as ThemeContext,
7
+ d as ThemeProvider,
8
+ u as useFondueTheme
34
9
  };
35
10
  //# sourceMappingURL=fondue-components25.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components25.js","sources":["../src/helpers/propsToCssVariables.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type CSSProperties } from 'react';\n\nimport { type Breakpoint } from './layout';\n\nconst isAriaProp = (key: string): boolean => {\n return key.startsWith('aria-') || key === 'role';\n};\n\nconst abbreviationToCssProperty: Record<string, string> = {\n m: 'margin',\n mx: 'margin-x',\n my: 'margin-y',\n mt: 'margin-top',\n mr: 'margin-right',\n mb: 'margin-bottom',\n ml: 'margin-left',\n p: 'padding',\n px: 'padding-x',\n py: 'padding-y',\n pt: 'padding-top',\n pr: 'padding-right',\n pb: 'padding-bottom',\n pl: 'padding-left',\n direction: 'flex-direction',\n align: 'align-items',\n wrap: 'flex-wrap',\n columns: 'grid-template-columns',\n rows: 'grid-template-rows',\n};\n\nconst transformValueBasedOnKey = (key: string, value: string | number): string | number => {\n if (key === 'columns' || key === 'rows') {\n if (typeof value === 'number') {\n return `repeat(${value}, 1fr)`;\n }\n return value;\n }\n\n // Spacing tokens\n if (typeof value === 'number') {\n return `${value * 0.25}rem`;\n }\n\n return value;\n};\n\nexport const propsToCssVariables = (\n props: Record<string, string | number | boolean | { [key in Breakpoint]?: string | number | boolean }>,\n extraAbbreviationToCssProperty: Record<string, string> = {},\n): CSSProperties => {\n return Object.entries(props).reduce((acc, [key, value]) => {\n if (isAriaProp(key)) {\n return acc;\n }\n\n const cssProperty =\n key in extraAbbreviationToCssProperty\n ? extraAbbreviationToCssProperty[key]\n : key in abbreviationToCssProperty\n ? abbreviationToCssProperty[key]\n : key;\n const cssPropertyKebabCase = cssProperty?.replaceAll(/([\\da-z]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase();\n\n if (typeof value === 'object') {\n for (const [breakpoint, breakpointValue] of Object.entries(value)) {\n if (breakpointValue !== undefined) {\n // @ts-expect-error CSS variables are not typed into `CSSProperties`\n acc[`--${breakpoint}-${cssPropertyKebabCase}`] = transformValueBasedOnKey(key, breakpointValue);\n }\n }\n } else {\n // @ts-expect-error CSS variables are not typed into `CSSProperties`\n acc[`--${cssPropertyKebabCase}`] = transformValueBasedOnKey(key, value);\n }\n\n return acc;\n }, {} as CSSProperties);\n};\n"],"names":["isAriaProp","key","abbreviationToCssProperty","transformValueBasedOnKey","value","propsToCssVariables","props","extraAbbreviationToCssProperty","acc","cssProperty","cssPropertyKebabCase","breakpoint","breakpointValue"],"mappings":"AAMA,MAAMA,IAAa,CAACC,MACTA,EAAI,WAAW,OAAO,KAAKA,MAAQ,QAGxCC,IAAoD;AAAA,EACtD,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AACV,GAEMC,IAA2B,CAACF,GAAaG,MACvCH,MAAQ,aAAaA,MAAQ,SACzB,OAAOG,KAAU,WACV,UAAUA,CAAK,WAEnBA,IAIP,OAAOA,KAAU,WACV,GAAGA,IAAQ,IAAI,QAGnBA,GAGEC,IAAsB,CAC/BC,GACAC,IAAyD,OAElD,OAAO,QAAQD,CAAK,EAAE,OAAO,CAACE,GAAK,CAACP,GAAKG,CAAK,MAAM;AACnD,MAAAJ,EAAWC,CAAG;AACP,WAAAO;AAGL,QAAAC,IACFR,KAAOM,IACDA,EAA+BN,CAAG,IAClCA,KAAOC,IACLA,EAA0BD,CAAG,IAC7BA,GACNS,IAAuBD,KAAA,gBAAAA,EAAa,WAAW,+BAA+B,SAAS;AAEzF,MAAA,OAAOL,KAAU;AACjB,eAAW,CAACO,GAAYC,CAAe,KAAK,OAAO,QAAQR,CAAK;AAC5D,MAAIQ,MAAoB,WAEhBJ,EAAA,KAAKG,CAAU,IAAID,CAAoB,EAAE,IAAIP,EAAyBF,GAAKW,CAAe;AAAA;AAKtG,IAAAJ,EAAI,KAAKE,CAAoB,EAAE,IAAIP,EAAyBF,GAAKG,CAAK;AAGnE,SAAAI;AACX,GAAG,EAAmB;"}
1
+ {"version":3,"file":"fondue-components25.js","sources":["../src/components/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport styles from '@frontify/fondue-tokens/theme-tokens';\nimport { createContext, useContext, type ReactNode } from 'react';\n\ntype AvailableTheme = keyof typeof styles;\n\ntype ThemeProviderProps = {\n children: ReactNode;\n /**\n * The theme to apply\n * @default \"light\"\n * */\n theme: AvailableTheme;\n};\n\nexport const ThemeContext = createContext<AvailableTheme>('light');\n\nexport const useFondueTheme = () => {\n return useContext(ThemeContext);\n};\n\nexport const ThemeProvider = ({ children, theme = 'light' }: ThemeProviderProps) => {\n return (\n <ThemeContext.Provider value={theme}>\n <div className={styles[theme]}>{children}</div>\n </ThemeContext.Provider>\n );\n};\n"],"names":["ThemeContext","createContext","useFondueTheme","useContext","ThemeProvider","children","theme","jsx","styles"],"mappings":";;;AAgBa,MAAAA,IAAeC,EAA8B,OAAO,GAEpDC,IAAiB,MACnBC,EAAWH,CAAY,GAGrBI,IAAgB,CAAC,EAAE,UAAAC,GAAU,OAAAC,IAAQ,cAEzC,gBAAAC,EAAAP,EAAa,UAAb,EAAsB,OAAOM,GAC1B,UAAC,gBAAAC,EAAA,OAAA,EAAI,WAAWC,EAAOF,CAAK,GAAI,UAAAD,EAAS,CAAA,GAC7C;"}
@@ -1,8 +1,35 @@
1
- const o = "_root_yrjuz_5", t = {
2
- root: o
3
- };
1
+ const g = (n) => n.startsWith("aria-") || n === "role", s = {
2
+ m: "margin",
3
+ mx: "margin-x",
4
+ my: "margin-y",
5
+ mt: "margin-top",
6
+ mr: "margin-right",
7
+ mb: "margin-bottom",
8
+ ml: "margin-left",
9
+ p: "padding",
10
+ px: "padding-x",
11
+ py: "padding-y",
12
+ pt: "padding-top",
13
+ pr: "padding-right",
14
+ pb: "padding-bottom",
15
+ pl: "padding-left",
16
+ direction: "flex-direction",
17
+ align: "align-items",
18
+ wrap: "flex-wrap",
19
+ columns: "grid-template-columns",
20
+ rows: "grid-template-rows"
21
+ }, m = (n, r) => n === "columns" || n === "rows" ? typeof r == "number" ? `repeat(${r}, 1fr)` : r : typeof r == "number" ? `${r * 0.25}rem` : r, f = (n, r = {}) => Object.entries(n).reduce((i, [t, e]) => {
22
+ if (g(t))
23
+ return i;
24
+ const o = t in r ? r[t] : t in s ? s[t] : t, p = o == null ? void 0 : o.replaceAll(/([\da-z]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
25
+ if (typeof e == "object")
26
+ for (const [d, a] of Object.entries(e))
27
+ a !== void 0 && (i[`--${d}-${p}`] = m(t, a));
28
+ else
29
+ i[`--${p}`] = m(t, e);
30
+ return i;
31
+ }, {});
4
32
  export {
5
- t as default,
6
- o as root
33
+ f as propsToCssVariables
7
34
  };
8
35
  //# sourceMappingURL=fondue-components26.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components26.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
1
+ {"version":3,"file":"fondue-components26.js","sources":["../src/helpers/propsToCssVariables.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type CSSProperties } from 'react';\n\nimport { type Breakpoint } from './layout';\n\nconst isAriaProp = (key: string): boolean => {\n return key.startsWith('aria-') || key === 'role';\n};\n\nconst abbreviationToCssProperty: Record<string, string> = {\n m: 'margin',\n mx: 'margin-x',\n my: 'margin-y',\n mt: 'margin-top',\n mr: 'margin-right',\n mb: 'margin-bottom',\n ml: 'margin-left',\n p: 'padding',\n px: 'padding-x',\n py: 'padding-y',\n pt: 'padding-top',\n pr: 'padding-right',\n pb: 'padding-bottom',\n pl: 'padding-left',\n direction: 'flex-direction',\n align: 'align-items',\n wrap: 'flex-wrap',\n columns: 'grid-template-columns',\n rows: 'grid-template-rows',\n};\n\nconst transformValueBasedOnKey = (key: string, value: string | number): string | number => {\n if (key === 'columns' || key === 'rows') {\n if (typeof value === 'number') {\n return `repeat(${value}, 1fr)`;\n }\n return value;\n }\n\n // Spacing tokens\n if (typeof value === 'number') {\n return `${value * 0.25}rem`;\n }\n\n return value;\n};\n\nexport const propsToCssVariables = (\n props: Record<string, string | number | boolean | { [key in Breakpoint]?: string | number | boolean }>,\n extraAbbreviationToCssProperty: Record<string, string> = {},\n): CSSProperties => {\n return Object.entries(props).reduce((acc, [key, value]) => {\n if (isAriaProp(key)) {\n return acc;\n }\n\n const cssProperty =\n key in extraAbbreviationToCssProperty\n ? extraAbbreviationToCssProperty[key]\n : key in abbreviationToCssProperty\n ? abbreviationToCssProperty[key]\n : key;\n const cssPropertyKebabCase = cssProperty?.replaceAll(/([\\da-z]|(?=[A-Z]))([A-Z])/g, '$1-$2').toLowerCase();\n\n if (typeof value === 'object') {\n for (const [breakpoint, breakpointValue] of Object.entries(value)) {\n if (breakpointValue !== undefined) {\n // @ts-expect-error CSS variables are not typed into `CSSProperties`\n acc[`--${breakpoint}-${cssPropertyKebabCase}`] = transformValueBasedOnKey(key, breakpointValue);\n }\n }\n } else {\n // @ts-expect-error CSS variables are not typed into `CSSProperties`\n acc[`--${cssPropertyKebabCase}`] = transformValueBasedOnKey(key, value);\n }\n\n return acc;\n }, {} as CSSProperties);\n};\n"],"names":["isAriaProp","key","abbreviationToCssProperty","transformValueBasedOnKey","value","propsToCssVariables","props","extraAbbreviationToCssProperty","acc","cssProperty","cssPropertyKebabCase","breakpoint","breakpointValue"],"mappings":"AAMA,MAAMA,IAAa,CAACC,MACTA,EAAI,WAAW,OAAO,KAAKA,MAAQ,QAGxCC,IAAoD;AAAA,EACtD,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AACV,GAEMC,IAA2B,CAACF,GAAaG,MACvCH,MAAQ,aAAaA,MAAQ,SACzB,OAAOG,KAAU,WACV,UAAUA,CAAK,WAEnBA,IAIP,OAAOA,KAAU,WACV,GAAGA,IAAQ,IAAI,QAGnBA,GAGEC,IAAsB,CAC/BC,GACAC,IAAyD,OAElD,OAAO,QAAQD,CAAK,EAAE,OAAO,CAACE,GAAK,CAACP,GAAKG,CAAK,MAAM;AACnD,MAAAJ,EAAWC,CAAG;AACP,WAAAO;AAGL,QAAAC,IACFR,KAAOM,IACDA,EAA+BN,CAAG,IAClCA,KAAOC,IACLA,EAA0BD,CAAG,IAC7BA,GACNS,IAAuBD,KAAA,gBAAAA,EAAa,WAAW,+BAA+B,SAAS;AAEzF,MAAA,OAAOL,KAAU;AACjB,eAAW,CAACO,GAAYC,CAAe,KAAK,OAAO,QAAQR,CAAK;AAC5D,MAAIQ,MAAoB,WAEhBJ,EAAA,KAAKG,CAAU,IAAID,CAAoB,EAAE,IAAIP,EAAyBF,GAAKW,CAAe;AAAA;AAKtG,IAAAJ,EAAI,KAAKE,CAAoB,EAAE,IAAIP,EAAyBF,GAAKG,CAAK;AAGnE,SAAAI;AACX,GAAG,EAAmB;"}
@@ -1,15 +1,8 @@
1
- import { extendTailwindMerge as e } from "tailwind-merge";
2
- import { tv as o } from "tailwind-variants";
3
- const r = e({
4
- prefix: "tw-",
5
- extend: {
6
- classGroups: {
7
- "font-size": ["text-body-x-small", "text-body-small", "text-body-medium", "text-body-large"]
8
- }
9
- }
10
- }), m = (...t) => r(...t), x = (t) => o(t);
1
+ const o = "_root_yrjuz_5", t = {
2
+ root: o
3
+ };
11
4
  export {
12
- m as cn,
13
- x as sv
5
+ t as default,
6
+ o as root
14
7
  };
15
8
  //# sourceMappingURL=fondue-components27.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components27.js","sources":["../src/utilities/styleUtilities.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { extendTailwindMerge } from 'tailwind-merge';\nimport { tv, type TV } from 'tailwind-variants';\n\ntype ClassNameValue = ClassNameArray | string | null | undefined | 0 | false;\ntype ClassNameArray = ClassNameValue[];\n\nconst customTwMerge = extendTailwindMerge({\n prefix: 'tw-',\n extend: {\n classGroups: {\n 'font-size': ['text-body-x-small', 'text-body-small', 'text-body-medium', 'text-body-large'],\n },\n },\n});\n\nexport const cn = (...classLists: ClassNameValue[]): string => {\n return customTwMerge(...classLists);\n};\n\nexport const sv: TV = (variants) => {\n return tv(variants);\n};\n"],"names":["customTwMerge","extendTailwindMerge","cn","classLists","sv","variants","tv"],"mappings":";;AAQA,MAAMA,IAAgBC,EAAoB;AAAA,EACtC,QAAQ;AAAA,EACR,QAAQ;AAAA,IACJ,aAAa;AAAA,MACT,aAAa,CAAC,qBAAqB,mBAAmB,oBAAoB,iBAAiB;AAAA,IAAA;AAAA,EAC/F;AAER,CAAC,GAEYC,IAAK,IAAIC,MACXH,EAAc,GAAGG,CAAU,GAGzBC,IAAS,CAACC,MACZC,EAAGD,CAAQ;"}
1
+ {"version":3,"file":"fondue-components27.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}