@frontify/fondue-components 5.1.1 → 5.1.3

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 (122) hide show
  1. package/dist/fondue-components.js +18 -16
  2. package/dist/fondue-components.js.map +1 -1
  3. package/dist/fondue-components10.js +2 -2
  4. package/dist/fondue-components11.js +34 -33
  5. package/dist/fondue-components11.js.map +1 -1
  6. package/dist/fondue-components12.js +2 -2
  7. package/dist/fondue-components13.js +1 -1
  8. package/dist/fondue-components14.js +1 -1
  9. package/dist/fondue-components15.js +1 -1
  10. package/dist/fondue-components16.js +2 -2
  11. package/dist/fondue-components17.js +2 -2
  12. package/dist/fondue-components18.js +6 -6
  13. package/dist/fondue-components19.js +1 -1
  14. package/dist/fondue-components20.js +2 -2
  15. package/dist/fondue-components21.js +134 -115
  16. package/dist/fondue-components21.js.map +1 -1
  17. package/dist/fondue-components22.js +116 -65
  18. package/dist/fondue-components22.js.map +1 -1
  19. package/dist/fondue-components23.js +64 -41
  20. package/dist/fondue-components23.js.map +1 -1
  21. package/dist/fondue-components24.js +43 -32
  22. package/dist/fondue-components24.js.map +1 -1
  23. package/dist/fondue-components25.js +32 -5
  24. package/dist/fondue-components25.js.map +1 -1
  25. package/dist/fondue-components26.js +5 -12
  26. package/dist/fondue-components26.js.map +1 -1
  27. package/dist/fondue-components27.js +10 -153
  28. package/dist/fondue-components27.js.map +1 -1
  29. package/dist/fondue-components28.js +59 -22
  30. package/dist/fondue-components28.js.map +1 -1
  31. package/dist/fondue-components29.js +17 -17
  32. package/dist/fondue-components29.js.map +1 -1
  33. package/dist/fondue-components3.js +2 -2
  34. package/dist/fondue-components30.js +112 -15
  35. package/dist/fondue-components30.js.map +1 -1
  36. package/dist/fondue-components31.js +19 -30
  37. package/dist/fondue-components31.js.map +1 -1
  38. package/dist/fondue-components32.js +32 -28
  39. package/dist/fondue-components32.js.map +1 -1
  40. package/dist/fondue-components33.js +34 -127
  41. package/dist/fondue-components33.js.map +1 -1
  42. package/dist/fondue-components34.js +129 -20
  43. package/dist/fondue-components34.js.map +1 -1
  44. package/dist/fondue-components35.js +21 -45
  45. package/dist/fondue-components35.js.map +1 -1
  46. package/dist/fondue-components36.js +45 -28
  47. package/dist/fondue-components36.js.map +1 -1
  48. package/dist/fondue-components37.js +28 -15
  49. package/dist/fondue-components37.js.map +1 -1
  50. package/dist/fondue-components38.js +15 -60
  51. package/dist/fondue-components38.js.map +1 -1
  52. package/dist/fondue-components39.js +60 -15
  53. package/dist/fondue-components39.js.map +1 -1
  54. package/dist/fondue-components4.js +4 -4
  55. package/dist/fondue-components40.js +15 -19
  56. package/dist/fondue-components40.js.map +1 -1
  57. package/dist/fondue-components41.js +18 -4
  58. package/dist/fondue-components41.js.map +1 -1
  59. package/dist/fondue-components42.js +3 -11
  60. package/dist/fondue-components42.js.map +1 -1
  61. package/dist/fondue-components43.js +11 -3
  62. package/dist/fondue-components43.js.map +1 -1
  63. package/dist/fondue-components44.js +5 -35
  64. package/dist/fondue-components44.js.map +1 -1
  65. package/dist/fondue-components45.js +35 -13
  66. package/dist/fondue-components45.js.map +1 -1
  67. package/dist/fondue-components46.js +12 -4
  68. package/dist/fondue-components46.js.map +1 -1
  69. package/dist/fondue-components47.js +4 -24
  70. package/dist/fondue-components47.js.map +1 -1
  71. package/dist/fondue-components48.js +24 -16
  72. package/dist/fondue-components48.js.map +1 -1
  73. package/dist/fondue-components49.js +16 -139
  74. package/dist/fondue-components49.js.map +1 -1
  75. package/dist/fondue-components5.js +2 -2
  76. package/dist/fondue-components50.js +140 -16
  77. package/dist/fondue-components50.js.map +1 -1
  78. package/dist/fondue-components51.js +16 -72
  79. package/dist/fondue-components51.js.map +1 -1
  80. package/dist/fondue-components52.js +72 -8
  81. package/dist/fondue-components52.js.map +1 -1
  82. package/dist/fondue-components53.js +8 -33
  83. package/dist/fondue-components53.js.map +1 -1
  84. package/dist/fondue-components54.js +32 -48
  85. package/dist/fondue-components54.js.map +1 -1
  86. package/dist/fondue-components55.js +48 -10
  87. package/dist/fondue-components55.js.map +1 -1
  88. package/dist/fondue-components56.js +8 -10
  89. package/dist/fondue-components56.js.map +1 -1
  90. package/dist/fondue-components57.js +12 -52
  91. package/dist/fondue-components57.js.map +1 -1
  92. package/dist/fondue-components58.js +7 -14
  93. package/dist/fondue-components58.js.map +1 -1
  94. package/dist/fondue-components59.js +12 -17
  95. package/dist/fondue-components59.js.map +1 -1
  96. package/dist/fondue-components6.js +5 -5
  97. package/dist/fondue-components60.js +18 -6
  98. package/dist/fondue-components60.js.map +1 -1
  99. package/dist/fondue-components61.js +15 -2
  100. package/dist/fondue-components61.js.map +1 -1
  101. package/dist/fondue-components62.js +50 -36
  102. package/dist/fondue-components62.js.map +1 -1
  103. package/dist/fondue-components63.js +14 -10
  104. package/dist/fondue-components63.js.map +1 -1
  105. package/dist/fondue-components64.js +21 -0
  106. package/dist/fondue-components64.js.map +1 -0
  107. package/dist/fondue-components65.js +10 -0
  108. package/dist/fondue-components65.js.map +1 -0
  109. package/dist/fondue-components66.js +5 -0
  110. package/dist/fondue-components66.js.map +1 -0
  111. package/dist/fondue-components67.js +18 -0
  112. package/dist/fondue-components67.js.map +1 -0
  113. package/dist/fondue-components68.js +42 -0
  114. package/dist/fondue-components68.js.map +1 -0
  115. package/dist/fondue-components7.js +5 -4
  116. package/dist/fondue-components7.js.map +1 -1
  117. package/dist/fondue-components8.js +2 -2
  118. package/dist/fondue-components9.js +20 -15
  119. package/dist/fondue-components9.js.map +1 -1
  120. package/dist/index.d.ts +165 -1
  121. package/dist/style.css +1 -1
  122. package/package.json +1 -1
@@ -2,13 +2,13 @@
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 l } from "./fondue-components6.js";
6
- import { Dialog as a } from "./fondue-components7.js";
5
+ import { ColorPicker as i } from "./fondue-components6.js";
6
+ import { Dialog as n } from "./fondue-components7.js";
7
7
  import { Divider as d } from "./fondue-components8.js";
8
8
  import { Dropdown as b } 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 T } from "./fondue-components12.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
12
  import { Label as k } from "./fondue-components13.js";
13
13
  import { LoadingBar as F } from "./fondue-components14.js";
14
14
  import { ScrollArea as s } from "./fondue-components15.js";
@@ -17,20 +17,21 @@ import { SegmentedControl as G } from "./fondue-components17.js";
17
17
  import { Select as P } 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
- import { Tabs as J } from "./fondue-components21.js";
21
- import { TextInput as M } from "./fondue-components22.js";
22
- import { Tooltip as O } from "./fondue-components23.js";
20
+ import { Table as J } from "./fondue-components21.js";
21
+ import { Tabs as M } from "./fondue-components22.js";
22
+ import { TextInput as O } from "./fondue-components23.js";
23
+ import { Tooltip as R } from "./fondue-components24.js";
23
24
  export {
24
25
  t as Box,
25
26
  x as Button,
26
27
  f as Checkbox,
27
- l as ColorPicker,
28
- a as Dialog,
28
+ i as ColorPicker,
29
+ n as Dialog,
29
30
  d as Divider,
30
31
  b as Dropdown,
31
- u as Flex,
32
- C as Flyout,
33
- T as Grid,
32
+ g as Flex,
33
+ B as Flyout,
34
+ D as Grid,
34
35
  k as Label,
35
36
  F as LoadingBar,
36
37
  s as ScrollArea,
@@ -39,8 +40,9 @@ export {
39
40
  P as Select,
40
41
  q as Slider,
41
42
  E as Switch,
42
- J as Tabs,
43
- M as TextInput,
44
- O as Tooltip
43
+ J as Table,
44
+ M as Tabs,
45
+ O as TextInput,
46
+ R as Tooltip
45
47
  };
46
48
  //# 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 n } from "react/jsx-runtime";
2
- import { propsToCssVariables as y } from "./fondue-components24.js";
3
- import m from "./fondue-components41.js";
2
+ import { propsToCssVariables as y } from "./fondue-components25.js";
3
+ import m from "./fondue-components42.js";
4
4
  const f = ({
5
5
  as: a = "div",
6
6
  "data-test-id": e = "fondue-flex",
@@ -2,12 +2,12 @@ import { jsx as a, jsxs as x } from "react/jsx-runtime";
2
2
  import { IconCross as C } from "@frontify/fondue-icons";
3
3
  import * as r from "@radix-ui/react-popover";
4
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
- import u from "./fondue-components42.js";
8
- const c = ({ children: t, ...o }) => /* @__PURE__ */ a(r.Root, { ...o, children: t });
9
- c.displayName = "Flyout.Root";
10
- const y = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-trigger" }, d) => /* @__PURE__ */ a(
5
+ import { usePreventDropdownOverflow as A } from "./fondue-components40.js";
6
+ import { addAutoFocusAttribute as H, syncRefs as c, addShowFocusRing as P } from "./fondue-components37.js";
7
+ import u from "./fondue-components43.js";
8
+ const y = ({ children: t, ...o }) => /* @__PURE__ */ a(r.Root, { ...o, children: t });
9
+ y.displayName = "Flyout.Root";
10
+ const f = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-trigger", ...d }, n) => /* @__PURE__ */ a(
11
11
  r.Trigger,
12
12
  {
13
13
  onMouseDown: H,
@@ -15,39 +15,40 @@ const y = ({ 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: d,
18
+ ref: n,
19
+ ...d,
19
20
  children: o
20
21
  }
21
22
  );
22
- y.displayName = "Flyout.Trigger";
23
- const f = ({
23
+ f.displayName = "Flyout.Trigger";
24
+ const m = ({
24
25
  align: t = "start",
25
26
  maxWidth: o = "360px",
26
27
  padding: e = "compact",
27
28
  rounded: d = "medium",
28
- width: g = "fit-content",
29
+ width: n = "fit-content",
29
30
  shadow: N = "medium",
30
31
  "data-test-id": h = "fondue-flyout-content",
31
32
  children: R,
32
33
  ...v
33
- }, n) => {
34
+ }, l) => {
34
35
  const i = b(null), { setMaxHeight: w } = A(i);
35
36
  return /* @__PURE__ */ a(r.Portal, { children: /* @__PURE__ */ a(
36
37
  r.Content,
37
38
  {
38
39
  style: {
39
40
  "--flyout-max-width": o,
40
- "--flyout-width": g
41
+ "--flyout-width": n
41
42
  },
42
43
  ref: i,
43
44
  align: t,
44
45
  collisionPadding: 8,
45
46
  sideOffset: 8,
46
47
  onOpenAutoFocus: () => {
47
- w(), l(i, n);
48
+ w(), c(i, l);
48
49
  },
49
50
  onCloseAutoFocus: () => {
50
- l(i, n);
51
+ c(i, l);
51
52
  },
52
53
  className: u.root,
53
54
  "data-flyout-spacing": e,
@@ -60,31 +61,31 @@ const f = ({
60
61
  }
61
62
  ) });
62
63
  };
63
- f.displayName = "Flyout.Content";
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: [
64
+ m.displayName = "Flyout.Content";
65
+ const p = ({ 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: [
65
66
  /* @__PURE__ */ a("div", { children: o }),
66
67
  t && /* @__PURE__ */ a(r.Close, { role: "button", "data-test-id": `${e}-close`, className: u.close, children: /* @__PURE__ */ a(C, { size: 20 }) })
67
68
  ] });
68
- m.displayName = "Flyout.Header";
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 });
70
- p.displayName = "Flyout.Footer";
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 });
72
- F.displayName = "Flyout.Body";
69
+ p.displayName = "Flyout.Header";
70
+ const F = ({ children: t, "data-test-id": o = "fondue-flyout-footer" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: u.footer, children: t });
71
+ F.displayName = "Flyout.Footer";
72
+ const g = ({ 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 });
73
+ g.displayName = "Flyout.Body";
73
74
  const z = {
74
- Root: c,
75
- Trigger: s(y),
76
- Content: s(f),
77
- Header: s(m),
78
- Footer: s(p),
79
- Body: s(F)
75
+ Root: y,
76
+ Trigger: s(f),
77
+ Content: s(m),
78
+ Header: s(p),
79
+ Footer: s(F),
80
+ Body: s(g)
80
81
  };
81
82
  export {
82
83
  z as Flyout,
83
- F as FlyoutBody,
84
- f as FlyoutContent,
85
- p as FlyoutFooter,
86
- m as FlyoutHeader,
87
- c as FlyoutRoot,
88
- y as FlyoutTrigger
84
+ g as FlyoutBody,
85
+ m as FlyoutContent,
86
+ F as FlyoutFooter,
87
+ p as FlyoutHeader,
88
+ y as FlyoutRoot,
89
+ f as FlyoutTrigger
89
90
  };
90
91
  //# sourceMappingURL=fondue-components11.js.map
@@ -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 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":"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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, 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', ...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 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":"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"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
- import { propsToCssVariables as y } from "./fondue-components24.js";
3
- import n from "./fondue-components43.js";
2
+ import { propsToCssVariables as y } from "./fondue-components25.js";
3
+ import n from "./fondue-components44.js";
4
4
  const f = ({
5
5
  as: a = "div",
6
6
  "data-test-id": i = "fondue-grid",
@@ -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-components26.js";
4
+ import { cn as n } from "./fondue-components27.js";
5
5
  const s = ({ className: e, "data-test-id": a = "fondue-label", ...t }, r) => /* @__PURE__ */ o(
6
6
  d.Root,
7
7
  {
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import * as t from "@radix-ui/react-progress";
3
3
  import { forwardRef as m } from "react";
4
- import { loadingBarContainerStyles as g, loadingBarStyles as f } from "./fondue-components44.js";
4
+ import { loadingBarContainerStyles as g, loadingBarStyles as f } from "./fondue-components45.js";
5
5
  const p = m(
6
6
  ({
7
7
  value: a,
@@ -1,7 +1,7 @@
1
1
  import { jsxs as n, jsx as l } from "react/jsx-runtime";
2
2
  import * as o from "@radix-ui/react-scroll-area";
3
3
  import { forwardRef as b } from "react";
4
- import a from "./fondue-components45.js";
4
+ import a from "./fondue-components46.js";
5
5
  const h = ({
6
6
  type: t,
7
7
  maxHeight: e = "100%",
@@ -1,6 +1,6 @@
1
1
  import { jsx as b } from "react/jsx-runtime";
2
- import { propsToCssVariables as n } from "./fondue-components24.js";
3
- import c from "./fondue-components46.js";
2
+ import { propsToCssVariables as n } from "./fondue-components25.js";
3
+ import c from "./fondue-components47.js";
4
4
  const m = ({
5
5
  "data-test-id": a = "fondue-section",
6
6
  children: e,
@@ -1,8 +1,8 @@
1
1
  import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
2
  import * as i from "@radix-ui/react-toggle-group";
3
3
  import { forwardRef as n } from "react";
4
- import { useControllableState as N } from "./fondue-components47.js";
5
- import e from "./fondue-components48.js";
4
+ import { useControllableState as N } from "./fondue-components48.js";
5
+ import e from "./fondue-components49.js";
6
6
  const d = ({ children: a, value: o, defaultValue: s, onValueChange: p, ...m }, f) => {
7
7
  const [g, C] = N({
8
8
  prop: o,
@@ -4,12 +4,12 @@ import * as S from "@radix-ui/react-popover";
4
4
  import { Slot as H } from "@radix-ui/react-slot";
5
5
  import { useSelect as T } from "downshift";
6
6
  import { forwardRef as V, useRef as $, useState as A } from "react";
7
- import { ForwardedRefCombobox as q } from "./fondue-components49.js";
8
- import { ForwardedRefSelectItem as J, ForwardedRefSelectItemGroup as K } from "./fondue-components50.js";
9
- import { SelectMenu as L } from "./fondue-components51.js";
10
- import { ForwardedRefSelectSlot as Q } from "./fondue-components52.js";
11
- import a from "./fondue-components53.js";
12
- import { useSelectData as U } from "./fondue-components54.js";
7
+ import { ForwardedRefCombobox as q } from "./fondue-components50.js";
8
+ import { ForwardedRefSelectItem as J, ForwardedRefSelectItemGroup as K } from "./fondue-components51.js";
9
+ import { SelectMenu as L } from "./fondue-components52.js";
10
+ import { ForwardedRefSelectSlot as Q } from "./fondue-components53.js";
11
+ import a from "./fondue-components54.js";
12
+ import { useSelectData as U } from "./fondue-components55.js";
13
13
  const g = ({
14
14
  children: h,
15
15
  onSelect: i,
@@ -1,7 +1,7 @@
1
1
  import { jsxs as f, jsx as s } from "react/jsx-runtime";
2
2
  import * as e from "@radix-ui/react-slider";
3
3
  import { forwardRef as h, useRef as R } from "react";
4
- import r from "./fondue-components55.js";
4
+ import r from "./fondue-components56.js";
5
5
  const g = ({
6
6
  value: a,
7
7
  defaultValue: n = [0],
@@ -1,8 +1,8 @@
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-components26.js";
5
- import t from "./fondue-components56.js";
4
+ import { cn as f } from "./fondue-components27.js";
5
+ import t from "./fondue-components57.js";
6
6
  const n = ({
7
7
  value: a,
8
8
  defaultValue: i,
@@ -1,120 +1,139 @@
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
- import { IconDotsHorizontal as E } from "@frontify/fondue-icons";
4
- import * as d from "@radix-ui/react-tabs";
5
- import { useControllableState as O } from "./fondue-components47.js";
6
- import { Button as V } from "./fondue-components4.js";
7
- import { Dropdown as l } from "./fondue-components9.js";
8
- import { useTabTriggers as q } from "./fondue-components57.js";
9
- import r from "./fondue-components58.js";
10
- const b = x({
11
- value: "",
12
- disabled: !1
13
- }), w = x({
14
- addTrigger: () => {
1
+ import { jsx as n, jsxs as k } from "react/jsx-runtime";
2
+ import { IconArrowUp as B, IconArrowDown as h, IconArrowBidirectional as A } from "@frontify/fondue-icons";
3
+ import { forwardRef as u, useRef as y, useMemo as K } from "react";
4
+ import { useSyncRefs as p } from "./fondue-components58.js";
5
+ import { useTextTruncation as w } from "./fondue-components59.js";
6
+ import o from "./fondue-components60.js";
7
+ import { handleKeyDown as z } from "./fondue-components61.js";
8
+ const N = u(
9
+ ({ layout: e = "auto", sticky: a, children: l, ...r }, t) => /* @__PURE__ */ n("div", { onKeyDown: z, role: "grid", tabIndex: -1, children: /* @__PURE__ */ n("table", { ref: t, className: o.table, "data-layout": e, "data-sticky": a, ...r, children: l }) })
10
+ );
11
+ N.displayName = "Table.Root";
12
+ const g = u(({ children: e }, a) => /* @__PURE__ */ n("caption", { ref: a, className: o.caption, children: e }));
13
+ g.displayName = "Table.Caption";
14
+ const R = u(
15
+ ({ children: e, "aria-label": a, "aria-busy": l }, r) => /* @__PURE__ */ n("thead", { ref: r, className: o.header, "aria-label": a, "aria-busy": l, children: e })
16
+ );
17
+ R.displayName = "Table.Header";
18
+ const C = u(
19
+ ({
20
+ noShrink: e = !1,
21
+ truncate: a = !1,
22
+ align: l = "left",
23
+ scope: r = "col",
24
+ sortTranslations: t,
25
+ sortDirection: d,
26
+ colSpan: c,
27
+ width: b,
28
+ onSortChange: i,
29
+ children: s
30
+ }, m) => {
31
+ const f = y(null);
32
+ p(f, m), w(f);
33
+ const x = K(() => typeof s == "string" ? d === "ascending" ? (t == null ? void 0 : t.sortDescending) ?? `Sort by ${s} descending` : (t == null ? void 0 : t.sortAscending) ?? `Sort by ${s} ascending` : d === "ascending" ? "Sort descending" : "Sort ascending", [s, d, t]), H = () => {
34
+ if (!i)
35
+ return;
36
+ i(d === void 0 || d === "descending" ? "ascending" : "descending");
37
+ };
38
+ return /* @__PURE__ */ n(
39
+ "th",
40
+ {
41
+ ref: f,
42
+ style: { width: b },
43
+ className: o.headerCell,
44
+ scope: r,
45
+ colSpan: c,
46
+ "data-align": l,
47
+ "data-truncate": a,
48
+ "data-no-shrink": e,
49
+ "data-sortable": !!i,
50
+ "aria-sort": i ? d || "none" : void 0,
51
+ children: i ? /* @__PURE__ */ k(
52
+ "button",
53
+ {
54
+ className: o.sortButton,
55
+ "aria-label": x,
56
+ "data-active": !!d,
57
+ onClick: H,
58
+ children: [
59
+ s,
60
+ d === "ascending" ? /* @__PURE__ */ n(B, { size: "12" }) : d === "descending" ? /* @__PURE__ */ n(h, { size: "12" }) : /* @__PURE__ */ n(A, { className: o.sortIndicator, size: "12" })
61
+ ]
62
+ }
63
+ ) : s
64
+ }
65
+ );
15
66
  }
16
- }), y = ({
17
- children: t,
18
- activeTab: o,
19
- defaultActiveTab: s,
20
- onActiveTabChange: n,
21
- size: c = "medium",
22
- ...m
23
- }, u) => {
24
- var R;
25
- const [f, v] = O({
26
- prop: o,
27
- defaultProp: s,
28
- onChange: n
29
- }), g = j(
30
- (e) => {
31
- v(e);
32
- },
33
- [v]
34
- ), { triggerListRef: k, activeIndicatorRef: P, triggers: C, triggersOutOfView: h, addTrigger: S } = q({
35
- activeTab: f
36
- });
37
- return /* @__PURE__ */ a(w.Provider, { value: { addTrigger: S }, children: /* @__PURE__ */ p(
38
- d.Root,
39
- {
40
- ref: u,
41
- className: r.root,
42
- onValueChange: g,
43
- value: f ?? ((R = C[0]) == null ? void 0 : R.value),
44
- ...m,
45
- 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
- d.Trigger,
49
- {
50
- ...e.props,
51
- key: e.value,
52
- value: e.value,
53
- disabled: e.disabled,
54
- className: r.trigger,
55
- ref: e.ref
56
- },
57
- e.element
58
- )) }),
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
- {
64
- ...e.props,
65
- disabled: e.disabled,
66
- onSelect: () => g(e.value),
67
- key: e.value
68
- },
69
- e.element
70
- )) })
71
- ] }),
72
- /* @__PURE__ */ a(
73
- "span",
74
- {
75
- "data-test-id": "active-tab-indicator",
76
- ref: P,
77
- className: r.activeIndicator
78
- }
79
- )
80
- ] }),
81
- t
82
- ]
83
- }
84
- ) });
85
- };
86
- y.displayName = "Tabs.Root";
87
- const z = ({ children: t, value: o, disabled: s }) => /* @__PURE__ */ a(b.Provider, { value: { value: o, disabled: s }, children: t });
88
- z.displayName = "Tabs.Tab";
89
- const I = ({ children: t, ...o }, s) => {
90
- const { value: n, disabled: c } = T(b), { addTrigger: m } = T(w), u = A(null);
91
- return D(() => {
92
- m({
93
- ref: u || s,
94
- value: n ?? "",
95
- disabled: c,
96
- props: o,
97
- element: t
98
- });
99
- }, []), null;
100
- };
101
- I.displayName = "Tabs.Trigger";
102
- const L = ({ children: t, ...o }, s) => {
103
- const { value: n } = T(b);
104
- return /* @__PURE__ */ a(d.Content, { ref: s, ...o, className: r.content, value: n ?? "", children: t });
105
- };
106
- L.displayName = "Tabs.Content";
107
- const Q = {
108
- Root: i(y),
109
- Tab: i(z),
110
- Trigger: i(I),
111
- Content: i(L)
67
+ );
68
+ C.displayName = "Table.HeaderCell";
69
+ const v = u(
70
+ ({ children: e, "aria-busy": a }, l) => /* @__PURE__ */ n("tbody", { ref: l, className: o.body, "aria-busy": a, children: e })
71
+ );
72
+ v.displayName = "Table.Body";
73
+ const I = u(
74
+ ({ disabled: e = !1, selected: a = !1, onClick: l, children: r, "aria-label": t, "data-test-id": d }, c) => {
75
+ const b = l !== void 0 && !e, i = () => {
76
+ e || l && l(a);
77
+ }, s = (m) => {
78
+ b && (m.key === "Enter" || m.key === " ") && (m.preventDefault(), i());
79
+ };
80
+ return /* @__PURE__ */ n(
81
+ "tr",
82
+ {
83
+ ref: c,
84
+ className: o.row,
85
+ tabIndex: 0,
86
+ role: b ? "button" : "row",
87
+ "data-disabled": e,
88
+ "data-interactive": b,
89
+ "data-selected": a,
90
+ "aria-disabled": e,
91
+ "aria-label": t,
92
+ "aria-selected": a,
93
+ onClick: b ? i : void 0,
94
+ onKeyDown: b ? s : void 0,
95
+ "data-test-id": d,
96
+ children: r
97
+ }
98
+ );
99
+ }
100
+ );
101
+ I.displayName = "Table.Row";
102
+ const T = u(
103
+ ({ colSpan: e, truncate: a, align: l = "left", children: r, "aria-label": t }, d) => {
104
+ const c = y(null);
105
+ return p(c, d), w(c), /* @__PURE__ */ n(
106
+ "td",
107
+ {
108
+ ref: c,
109
+ className: o.rowCell,
110
+ colSpan: e,
111
+ "data-align": l,
112
+ "data-truncate": a,
113
+ "aria-label": t,
114
+ children: r
115
+ }
116
+ );
117
+ }
118
+ );
119
+ T.displayName = "Table.RowCell";
120
+ const q = {
121
+ Root: N,
122
+ Caption: g,
123
+ Header: R,
124
+ HeaderCell: C,
125
+ Body: v,
126
+ Row: I,
127
+ RowCell: T
112
128
  };
113
129
  export {
114
- Q as Tabs,
115
- L as TabsContent,
116
- y as TabsRoot,
117
- z as TabsTab,
118
- I as TabsTrigger
130
+ q as Table,
131
+ v as TableBody,
132
+ g as TableCaption,
133
+ R as TableHeader,
134
+ C as TableHeaderCell,
135
+ N as TableRoot,
136
+ I as TableRow,
137
+ T as TableRowCell
119
138
  };
120
139
  //# sourceMappingURL=fondue-components21.js.map