@frontify/fondue-components 3.0.3 → 3.2.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 (117) hide show
  1. package/dist/fondue-components.js +38 -24
  2. package/dist/fondue-components.js.map +1 -1
  3. package/dist/fondue-components10.js +18 -38
  4. package/dist/fondue-components10.js.map +1 -1
  5. package/dist/fondue-components11.js +64 -40
  6. package/dist/fondue-components11.js.map +1 -1
  7. package/dist/fondue-components12.js +19 -77
  8. package/dist/fondue-components12.js.map +1 -1
  9. package/dist/fondue-components13.js +22 -64
  10. package/dist/fondue-components13.js.map +1 -1
  11. package/dist/fondue-components14.js +39 -46
  12. package/dist/fondue-components14.js.map +1 -1
  13. package/dist/fondue-components15.js +6 -12
  14. package/dist/fondue-components15.js.map +1 -1
  15. package/dist/fondue-components16.js +46 -154
  16. package/dist/fondue-components16.js.map +1 -1
  17. package/dist/fondue-components17.js +54 -117
  18. package/dist/fondue-components17.js.map +1 -1
  19. package/dist/fondue-components18.js +28 -117
  20. package/dist/fondue-components18.js.map +1 -1
  21. package/dist/fondue-components19.js +111 -20
  22. package/dist/fondue-components19.js.map +1 -1
  23. package/dist/fondue-components20.js +65 -14
  24. package/dist/fondue-components20.js.map +1 -1
  25. package/dist/fondue-components21.js +42 -59
  26. package/dist/fondue-components21.js.map +1 -1
  27. package/dist/fondue-components22.js +32 -17
  28. package/dist/fondue-components22.js.map +1 -1
  29. package/dist/fondue-components23.js +5 -17
  30. package/dist/fondue-components23.js.map +1 -1
  31. package/dist/fondue-components24.js +10 -33
  32. package/dist/fondue-components24.js.map +1 -1
  33. package/dist/fondue-components25.js +154 -24
  34. package/dist/fondue-components25.js.map +1 -1
  35. package/dist/fondue-components26.js +118 -9
  36. package/dist/fondue-components26.js.map +1 -1
  37. package/dist/fondue-components27.js +118 -110
  38. package/dist/fondue-components27.js.map +1 -1
  39. package/dist/fondue-components28.js +21 -12
  40. package/dist/fondue-components28.js.map +1 -1
  41. package/dist/fondue-components29.js +28 -39
  42. package/dist/fondue-components29.js.map +1 -1
  43. package/dist/fondue-components3.js +11 -40
  44. package/dist/fondue-components3.js.map +1 -1
  45. package/dist/fondue-components30.js +28 -8
  46. package/dist/fondue-components30.js.map +1 -1
  47. package/dist/fondue-components31.js +129 -20
  48. package/dist/fondue-components31.js.map +1 -1
  49. package/dist/fondue-components32.js +20 -55
  50. package/dist/fondue-components32.js.map +1 -1
  51. package/dist/fondue-components33.js +45 -18
  52. package/dist/fondue-components33.js.map +1 -1
  53. package/dist/fondue-components34.js +15 -15
  54. package/dist/fondue-components34.js.map +1 -1
  55. package/dist/fondue-components35.js +60 -2
  56. package/dist/fondue-components35.js.map +1 -1
  57. package/dist/fondue-components36.js +14 -38
  58. package/dist/fondue-components36.js.map +1 -1
  59. package/dist/fondue-components37.js +22 -0
  60. package/dist/fondue-components37.js.map +1 -0
  61. package/dist/fondue-components38.js +20 -0
  62. package/dist/fondue-components38.js.map +1 -0
  63. package/dist/fondue-components39.js +8 -0
  64. package/dist/fondue-components39.js.map +1 -0
  65. package/dist/fondue-components4.js +39 -45
  66. package/dist/fondue-components4.js.map +1 -1
  67. package/dist/fondue-components40.js +16 -0
  68. package/dist/fondue-components40.js.map +1 -0
  69. package/dist/fondue-components41.js +8 -0
  70. package/dist/fondue-components41.js.map +1 -0
  71. package/dist/fondue-components42.js +38 -0
  72. package/dist/fondue-components42.js.map +1 -0
  73. package/dist/fondue-components43.js +8 -0
  74. package/dist/fondue-components43.js.map +1 -0
  75. package/dist/fondue-components44.js +28 -0
  76. package/dist/fondue-components44.js.map +1 -0
  77. package/dist/fondue-components45.js +20 -0
  78. package/dist/fondue-components45.js.map +1 -0
  79. package/dist/fondue-components46.js +14 -0
  80. package/dist/fondue-components46.js.map +1 -0
  81. package/dist/fondue-components47.js +16 -0
  82. package/dist/fondue-components47.js.map +1 -0
  83. package/dist/fondue-components48.js +133 -0
  84. package/dist/fondue-components48.js.map +1 -0
  85. package/dist/fondue-components49.js +15 -0
  86. package/dist/fondue-components49.js.map +1 -0
  87. package/dist/fondue-components5.js +46 -82
  88. package/dist/fondue-components5.js.map +1 -1
  89. package/dist/fondue-components50.js +46 -0
  90. package/dist/fondue-components50.js.map +1 -0
  91. package/dist/fondue-components51.js +11 -0
  92. package/dist/fondue-components51.js.map +1 -0
  93. package/dist/fondue-components52.js +30 -0
  94. package/dist/fondue-components52.js.map +1 -0
  95. package/dist/fondue-components53.js +52 -0
  96. package/dist/fondue-components53.js.map +1 -0
  97. package/dist/fondue-components54.js +21 -0
  98. package/dist/fondue-components54.js.map +1 -0
  99. package/dist/fondue-components55.js +10 -0
  100. package/dist/fondue-components55.js.map +1 -0
  101. package/dist/fondue-components56.js +5 -0
  102. package/dist/fondue-components56.js.map +1 -0
  103. package/dist/fondue-components57.js +14 -0
  104. package/dist/fondue-components57.js.map +1 -0
  105. package/dist/fondue-components58.js +42 -0
  106. package/dist/fondue-components58.js.map +1 -0
  107. package/dist/fondue-components6.js +48 -30
  108. package/dist/fondue-components6.js.map +1 -1
  109. package/dist/fondue-components7.js +80 -83
  110. package/dist/fondue-components7.js.map +1 -1
  111. package/dist/fondue-components8.js +28 -56
  112. package/dist/fondue-components8.js.map +1 -1
  113. package/dist/fondue-components9.js +101 -22
  114. package/dist/fondue-components9.js.map +1 -1
  115. package/dist/index.d.ts +490 -5
  116. package/dist/style.css +1 -1
  117. package/package.json +5 -3
@@ -1,88 +1,85 @@
1
- import { jsx as r, jsxs as N } from "react/jsx-runtime";
2
- import { IconCaretRight as R } from "@frontify/fondue-icons";
3
- import * as e from "@radix-ui/react-dropdown-menu";
4
- import { forwardRef as a } from "react";
5
- import n from "./fondue-components22.js";
6
- const i = ({
7
- children: o,
8
- open: t,
9
- onOpenChange: d,
10
- "data-test-id": s = "fondue-dropdown"
11
- }) => /* @__PURE__ */ r(e.Root, { open: t, onOpenChange: d, "data-test-id": s, children: o });
12
- i.displayName = "Dropdown.Root";
13
- const p = ({ children: o, "data-test-id": t = "fondue-dropdown-trigger" }, d) => /* @__PURE__ */ r(e.Trigger, { asChild: !0, "data-test-id": t, ref: d, children: o });
14
- p.displayName = "Dropdown.Trigger";
15
- const u = ({ children: o, "data-test-id": t = "fondue-dropdown-content" }, d) => /* @__PURE__ */ r(e.Portal, { children: /* @__PURE__ */ r(
16
- e.Content,
17
- {
18
- align: "start",
19
- collisionPadding: 8,
20
- sideOffset: 8,
21
- className: n.content,
22
- "data-test-id": t,
23
- ref: d,
24
- children: o
25
- }
26
- ) });
27
- u.displayName = "Dropdown.Content";
28
- const w = ({ children: o, "data-test-id": t = "fondue-dropdown-group" }, d) => /* @__PURE__ */ r(e.Group, { className: n.group, "data-test-id": t, ref: d, children: o });
29
- w.displayName = "Dropdown.Group";
30
- const m = ({
31
- children: o,
32
- "data-test-id": t = "fondue-dropdown-submenu"
33
- }) => /* @__PURE__ */ r(e.Sub, { "data-test-id": t, children: o });
34
- m.displayName = "Dropdown.SubMenu";
35
- const c = ({ children: o, "data-test-id": t = "fondue-dropdown-subtrigger" }, d) => /* @__PURE__ */ N(e.SubTrigger, { className: n.subTrigger, "data-test-id": t, ref: d, children: [
36
- o,
37
- /* @__PURE__ */ r(R, { className: n.subMenuIndicator, size: 16 })
1
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
2
+ import { IconCross as w } from "@frontify/fondue-icons";
3
+ import * as i from "@radix-ui/react-dialog";
4
+ import { forwardRef as d } from "react";
5
+ import l from "./fondue-components34.js";
6
+ const n = ({ children: t, ...a }) => /* @__PURE__ */ o(i.Root, { ...a, children: t });
7
+ n.displayName = "Dialog.Root";
8
+ const g = ({ children: t, "data-test-id": a = "fondue-dialog-trigger" }, e) => /* @__PURE__ */ o(i.Trigger, { "data-test-id": a, asChild: !0, ref: e, children: t });
9
+ g.displayName = "Dialog.Trigger";
10
+ const c = ({
11
+ maxWidth: t = "800px",
12
+ minWidth: a = "400px",
13
+ minHeight: e = "200px",
14
+ padding: r = "compact",
15
+ verticalAlign: C = "center",
16
+ "data-test-id": h = "fondue-dialog-content",
17
+ showUnderlay: v = !1,
18
+ children: x,
19
+ rounded: T = !0,
20
+ ...R
21
+ }, b) => /* @__PURE__ */ s(i.Portal, { children: [
22
+ /* @__PURE__ */ o(i.Overlay, { "data-visible": v, className: l.underlay }),
23
+ /* @__PURE__ */ o(
24
+ i.Content,
25
+ {
26
+ style: {
27
+ "--dialog-max-width": t,
28
+ "--dialog-min-width": a,
29
+ "--dialog-min-height": e
30
+ },
31
+ ref: b,
32
+ className: l.content,
33
+ "data-dialog-rounded": T,
34
+ "data-dialog-spacing": r,
35
+ "data-test-id": h,
36
+ "data-dialog-vertical-align": C,
37
+ ...R,
38
+ children: x
39
+ }
40
+ )
38
41
  ] });
39
- c.displayName = "Dropdown.SubTrigger";
40
- const g = ({ children: o, "data-test-id": t = "fondue-dropdown-subcontent" }, d) => /* @__PURE__ */ r(e.Portal, { children: /* @__PURE__ */ r(e.SubContent, { className: n.subContent, "data-test-id": t, ref: d, children: o }) });
41
- g.displayName = "Dropdown.SubContent";
42
- const l = ({
43
- children: o,
44
- disabled: t,
45
- textValue: d,
46
- onSelect: s,
47
- "data-test-id": f = "fondue-dropdown-subtrigger",
48
- ...b
49
- }, S) => /* @__PURE__ */ r(
50
- e.Item,
51
- {
52
- onSelect: s,
53
- className: n.item,
54
- textValue: d,
55
- "data-test-id": f,
56
- ref: S,
57
- disabled: t,
58
- ...b,
59
- children: o
60
- }
61
- );
62
- l.displayName = "Dropdown.Item";
63
- const D = ({ children: o, name: t, "data-test-id": d = "fondue-dropdown-slot" }, s) => /* @__PURE__ */ r("div", { "data-name": t, className: n.slot, "data-test-id": d, ref: s, children: o });
64
- D.displayName = "Dropdown.Slot";
65
- const C = a(p), T = a(u), y = a(w), F = a(c), I = a(g), h = a(l), G = a(D), v = {
66
- Root: i,
67
- Trigger: C,
68
- Content: T,
69
- Group: y,
70
- SubMenu: m,
71
- SubTrigger: F,
72
- SubContent: I,
73
- Item: h,
74
- Slot: G
42
+ c.displayName = "Dialog.Content";
43
+ const m = ({ children: t, showCloseButton: a = !0, "data-test-id": e = "fondue-dialog-header" }, r) => /* @__PURE__ */ s("div", { "data-test-id": e, ref: r, className: l.header, "data-dialog-layout-component": !0, children: [
44
+ /* @__PURE__ */ o("div", { children: t }),
45
+ a && /* @__PURE__ */ o(i.Close, { role: "button", "data-test-id": `${e}-close`, className: "tw-cursor-pointer", children: /* @__PURE__ */ o(w, { size: 20 }) })
46
+ ] });
47
+ m.displayName = "Dialog.Header";
48
+ const u = ({ children: t, "data-test-id": a = "fondue-dialog-footer" }, e) => /* @__PURE__ */ o("div", { "data-test-id": a, ref: e, className: l.footer, "data-dialog-layout-component": !0, children: t });
49
+ u.displayName = "Dialog.Footer";
50
+ const p = ({ children: t, "data-test-id": a = "fondue-dialog-body" }, e) => /* @__PURE__ */ o("div", { "data-test-id": a, ref: e, className: l.body, "data-dialog-layout-component": !0, children: t });
51
+ p.displayName = "Dialog.Body";
52
+ const D = ({ children: t, "data-test-id": a = "fondue-dialog-side-content" }, e) => /* @__PURE__ */ o("div", { "data-test-id": a, ref: e, className: l.sideContent, "data-dialog-layout-component": !0, children: t });
53
+ D.displayName = "Dialog.SideContent";
54
+ const y = ({ children: t }) => /* @__PURE__ */ o(i.Close, { asChild: !0, children: t });
55
+ y.displayName = "Dialog.Close";
56
+ const N = ({ children: t, asChild: a }) => /* @__PURE__ */ o(i.Title, { asChild: a, children: t });
57
+ N.displayName = "Dialog.Title";
58
+ const f = ({ children: t, asChild: a }) => /* @__PURE__ */ o(i.Description, { asChild: a, children: t });
59
+ f.displayName = "Dialog.Description";
60
+ const j = {
61
+ Root: n,
62
+ Title: N,
63
+ Description: f,
64
+ Close: y,
65
+ Trigger: d(g),
66
+ Content: d(c),
67
+ Header: d(m),
68
+ Footer: d(u),
69
+ Body: d(p),
70
+ SideContent: d(D)
75
71
  };
76
72
  export {
77
- v as Dropdown,
78
- u as DropdownContent,
79
- w as DropdownGroup,
80
- l as DropdownItem,
81
- i as DropdownRoot,
82
- D as DropdownSlot,
83
- g as DropdownSubContent,
84
- m as DropdownSubMenu,
85
- c as DropdownSubTrigger,
86
- p as DropdownTrigger
73
+ j as Dialog,
74
+ p as DialogBody,
75
+ y as DialogClose,
76
+ c as DialogContent,
77
+ f as DialogDescription,
78
+ u as DialogFooter,
79
+ m as DialogHeader,
80
+ n as DialogRoot,
81
+ D as DialogSideContent,
82
+ N as DialogTitle,
83
+ g as DialogTrigger
87
84
  };
88
85
  //# sourceMappingURL=fondue-components7.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components7.js","sources":["../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretRight } from '@frontify/fondue-icons';\nimport * as RadixDropdown from '@radix-ui/react-dropdown-menu';\nimport { forwardRef, type ForwardedRef, type ReactNode } from 'react';\n\nimport styles from './styles/dropdown.module.scss';\n\nexport type DropdownRootProps = {\n children?: ReactNode;\n /**\n * Controls the open state of the dropdown.\n */\n open?: boolean;\n /**\n * Callback that is called when the open state of the dropdown changes.\n */\n onOpenChange?: (open: boolean) => void;\n 'data-test-id'?: string;\n};\n\nexport const DropdownRoot = ({\n children,\n open,\n onOpenChange,\n 'data-test-id': dataTestId = 'fondue-dropdown',\n}: DropdownRootProps) => {\n return (\n <RadixDropdown.Root open={open} onOpenChange={onOpenChange} data-test-id={dataTestId}>\n {children}\n </RadixDropdown.Root>\n );\n};\nDropdownRoot.displayName = 'Dropdown.Root';\n\nexport type DropdownTriggerProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-trigger' }: DropdownTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixDropdown.Trigger asChild data-test-id={dataTestId} ref={ref}>\n {children}\n </RadixDropdown.Trigger>\n );\n};\nDropdownTrigger.displayName = 'Dropdown.Trigger';\n\nexport type DropdownContentProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownContent = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-content' }: DropdownContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Portal>\n <RadixDropdown.Content\n align=\"start\"\n collisionPadding={8}\n sideOffset={8}\n className={styles.content}\n data-test-id={dataTestId}\n ref={ref}\n >\n {children}\n </RadixDropdown.Content>\n </RadixDropdown.Portal>\n );\n};\nDropdownContent.displayName = 'Dropdown.Content';\n\nexport type DropdownGroupProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownGroup = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-group' }: DropdownGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Group className={styles.group} data-test-id={dataTestId} ref={ref}>\n {children}\n </RadixDropdown.Group>\n );\n};\nDropdownGroup.displayName = 'Dropdown.Group';\n\nexport type DropdownSubMenuProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubMenu = ({\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-submenu',\n}: DropdownSubMenuProps) => {\n return <RadixDropdown.Sub data-test-id={dataTestId}>{children}</RadixDropdown.Sub>;\n};\nDropdownSubMenu.displayName = 'Dropdown.SubMenu';\n\nexport type DropdownSubTriggerProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger' }: DropdownSubTriggerProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.SubTrigger className={styles.subTrigger} data-test-id={dataTestId} ref={ref}>\n {children}\n <IconCaretRight className={styles.subMenuIndicator} size={16} />\n </RadixDropdown.SubTrigger>\n );\n};\nDropdownSubTrigger.displayName = 'Dropdown.SubTrigger';\n\nexport type DropdownSubContentProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubContent = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-subcontent' }: DropdownSubContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Portal>\n <RadixDropdown.SubContent className={styles.subContent} data-test-id={dataTestId} ref={ref}>\n {children}\n </RadixDropdown.SubContent>\n </RadixDropdown.Portal>\n );\n};\nDropdownSubContent.displayName = 'Dropdown.SubContent';\n\nexport type DropdownItemProps = {\n children: ReactNode;\n /**\n * Disables the item.\n */\n disabled?: boolean;\n /**\n * The text value of the item that is passed to the onSelect callback.\n */\n textValue?: string;\n /**\n * Callback that is called when the item is selected.\n */\n onSelect: (event: Event) => void;\n 'data-test-id'?: string;\n};\n\nexport const DropdownItem = (\n {\n children,\n disabled,\n textValue,\n onSelect,\n 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger',\n ...props\n }: DropdownItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Item\n onSelect={onSelect}\n className={styles.item}\n textValue={textValue}\n data-test-id={dataTestId}\n ref={ref}\n disabled={disabled}\n {...props}\n >\n {children}\n </RadixDropdown.Item>\n );\n};\nDropdownItem.displayName = 'Dropdown.Item';\n\nexport type DropdownSlotProps = { children: ReactNode; name?: 'left' | 'right'; 'data-test-id'?: string };\n\nexport const DropdownSlot = (\n { children, name, 'data-test-id': dataTestId = 'fondue-dropdown-slot' }: DropdownSlotProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-name={name} className={styles.slot} data-test-id={dataTestId} ref={ref}>\n {children}\n </div>\n );\n};\nDropdownSlot.displayName = 'Dropdown.Slot';\n\nconst ForwardedRefDropdownTrigger = forwardRef<HTMLButtonElement, DropdownTriggerProps>(DropdownTrigger);\nconst ForwardedRefDropdownContent = forwardRef<HTMLDivElement, DropdownContentProps>(DropdownContent);\nconst ForwardedRefDropdownGroup = forwardRef<HTMLDivElement, DropdownGroupProps>(DropdownGroup);\nconst ForwardedRefDropdownSubTrigger = forwardRef<HTMLDivElement, DropdownSubTriggerProps>(DropdownSubTrigger);\nconst ForwardedRefDropdownSubContent = forwardRef<HTMLDivElement, DropdownSubContentProps>(DropdownSubContent);\nconst ForwardedRefDropdownItem = forwardRef<HTMLDivElement, DropdownItemProps>(DropdownItem);\nconst ForwardedRefDropdownSlot = forwardRef<HTMLDivElement, DropdownSlotProps>(DropdownSlot);\n\nexport const Dropdown = {\n Root: DropdownRoot,\n Trigger: ForwardedRefDropdownTrigger,\n Content: ForwardedRefDropdownContent,\n Group: ForwardedRefDropdownGroup,\n SubMenu: DropdownSubMenu,\n SubTrigger: ForwardedRefDropdownSubTrigger,\n SubContent: ForwardedRefDropdownSubContent,\n Item: ForwardedRefDropdownItem,\n Slot: ForwardedRefDropdownSlot,\n};\n"],"names":["DropdownRoot","children","open","onOpenChange","dataTestId","jsx","RadixDropdown","DropdownTrigger","ref","DropdownContent","styles","DropdownGroup","DropdownSubMenu","DropdownSubTrigger","jsxs","IconCaretRight","DropdownSubContent","DropdownItem","disabled","textValue","onSelect","props","DropdownSlot","name","ForwardedRefDropdownTrigger","forwardRef","ForwardedRefDropdownContent","ForwardedRefDropdownGroup","ForwardedRefDropdownSubTrigger","ForwardedRefDropdownSubContent","ForwardedRefDropdownItem","ForwardedRefDropdownSlot","Dropdown"],"mappings":";;;;;AAqBO,MAAMA,IAAe,CAAC;AAAA,EACzB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAgBC,IAAa;AACjC,MAEQ,gBAAAC,EAACC,EAAc,MAAd,EAAmB,MAAAJ,GAAY,cAAAC,GAA4B,gBAAcC,GACrE,UAAAH,EACL,CAAA;AAGRD,EAAa,cAAc;AAId,MAAAO,IAAkB,CAC3B,EAAE,UAAAN,GAAU,gBAAgBG,IAAa,6BACzCI,MAGI,gBAAAH,EAACC,EAAc,SAAd,EAAsB,SAAO,IAAC,gBAAcF,GAAY,KAAAI,GACpD,UAAAP,EACL,CAAA;AAGRM,EAAgB,cAAc;AAI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AA,EACI,UAAAhB;AAAA,EACA,UAAAiB;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAgBhB,IAAa;AAAA,EAC7B,GAAGiB;AACP,GACAb,MAGI,gBAAAH;AAAA,EAACC,EAAc;AAAA,EAAd;AAAA,IACG,UAAAc;AAAA,IACA,WAAWV,EAAO;AAAA,IAClB,WAAAS;AAAA,IACA,gBAAcf;AAAA,IACd,KAAAI;AAAA,IACA,UAAAU;AAAA,IACC,GAAGG;AAAA,IAEH,UAAApB;AAAA,EAAA;AAAA;AAIbgB,EAAa,cAAc;AAId,MAAAK,IAAe,CACxB,EAAE,UAAArB,GAAU,MAAAsB,GAAM,gBAAgBnB,IAAa,uBAAuB,GACtEI,MAGI,gBAAAH,EAAC,OAAI,EAAA,aAAWkB,GAAM,WAAWb,EAAO,MAAM,gBAAcN,GAAY,KAAAI,GACnE,UAAAP,EACL,CAAA;AAGRqB,EAAa,cAAc;AAE3B,MAAME,IAA8BC,EAAoDlB,CAAe,GACjGmB,IAA8BD,EAAiDhB,CAAe,GAC9FkB,IAA4BF,EAA+Cd,CAAa,GACxFiB,IAAiCH,EAAoDZ,CAAkB,GACvGgB,IAAiCJ,EAAoDT,CAAkB,GACvGc,IAA2BL,EAA8CR,CAAY,GACrFc,IAA2BN,EAA8CH,CAAY,GAE9EU,IAAW;AAAA,EACpB,MAAMhC;AAAA,EACN,SAASwB;AAAA,EACT,SAASE;AAAA,EACT,OAAOC;AAAA,EACP,SAASf;AAAA,EACT,YAAYgB;AAAA,EACZ,YAAYC;AAAA,EACZ,MAAMC;AAAA,EACN,MAAMC;AACV;"}
1
+ {"version":3,"file":"fondue-components7.js","sources":["../src/components/Dialog/Dialog.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixDialog from '@radix-ui/react-dialog';\nimport { forwardRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport styles from './styles/dialog.module.scss';\n\nexport type DialogRootProps = {\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 dialog\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport type DialogContentProps = {\n /**\n * Add rounded corners to the dialog\n * @default true\n */\n rounded?: boolean;\n /**\n * Define the padding of the dialog\n * @default \"compact\"\n */\n padding?: 'compact' | 'comfortable' | 'spacious';\n /**\n * The vertical alignment of the divider\n * @default \"center\"\n */\n verticalAlign?: 'top' | 'center';\n\n /**\n * Define a maximum width for the dialog\n * @default \"800px\"\n */\n maxWidth?: string;\n /**\n * Define a minimum width for the dialog\n * @default \"400px\"\n */\n minWidth?: string;\n /**\n * Define a maximum height for the dialog\n * @default \"200px\"\n */\n minHeight?: string;\n /**\n * Show a dark underlay behind the dialog\n * @default false\n */\n showUnderlay?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogTriggerProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type DialogHeaderProps = {\n /**\n * Show a close button in the header\n * @default true\n */\n showCloseButton?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogFooterProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type DialogBodyProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type DialogSideContentProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type DialogCloseProps = { children?: ReactNode };\n\nexport type DialogAnnouncementProps = { children?: ReactNode; asChild?: boolean };\n\nexport const DialogRoot = ({ children, ...props }: DialogRootProps) => {\n return <RadixDialog.Root {...props}>{children}</RadixDialog.Root>;\n};\nDialogRoot.displayName = 'Dialog.Root';\n\nexport const DialogTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-dialog-trigger' }: DialogTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixDialog.Trigger data-test-id={dataTestId} asChild ref={ref}>\n {children}\n </RadixDialog.Trigger>\n );\n};\nDialogTrigger.displayName = 'Dialog.Trigger';\n\nexport const DialogContent = (\n {\n maxWidth = '800px',\n minWidth = '400px',\n minHeight = '200px',\n padding = 'compact',\n verticalAlign = 'center',\n 'data-test-id': dataTestId = 'fondue-dialog-content',\n showUnderlay = false,\n children,\n rounded = true,\n ...props\n }: DialogContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDialog.Portal>\n <RadixDialog.Overlay data-visible={showUnderlay} className={styles.underlay} />\n <RadixDialog.Content\n style={\n {\n '--dialog-max-width': maxWidth,\n '--dialog-min-width': minWidth,\n '--dialog-min-height': minHeight,\n } as CSSProperties\n }\n ref={ref}\n className={styles.content}\n data-dialog-rounded={rounded}\n data-dialog-spacing={padding}\n data-test-id={dataTestId}\n data-dialog-vertical-align={verticalAlign}\n {...props}\n >\n {children}\n </RadixDialog.Content>\n </RadixDialog.Portal>\n );\n};\nDialogContent.displayName = 'Dialog.Content';\n\nexport const DialogHeader = (\n { children, showCloseButton = true, 'data-test-id': dataTestId = 'fondue-dialog-header' }: DialogHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.header} data-dialog-layout-component>\n <div>{children}</div>\n {showCloseButton && (\n <RadixDialog.Close role=\"button\" data-test-id={`${dataTestId}-close`} className=\"tw-cursor-pointer\">\n <IconCross size={20} />\n </RadixDialog.Close>\n )}\n </div>\n );\n};\nDialogHeader.displayName = 'Dialog.Header';\n\nexport const DialogFooter = (\n { children, 'data-test-id': dataTestId = 'fondue-dialog-footer' }: DialogFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.footer} data-dialog-layout-component>\n {children}\n </div>\n );\n};\nDialogFooter.displayName = 'Dialog.Footer';\n\nexport const DialogBody = (\n { children, 'data-test-id': dataTestId = 'fondue-dialog-body' }: DialogBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.body} data-dialog-layout-component>\n {children}\n </div>\n );\n};\nDialogBody.displayName = 'Dialog.Body';\n\nexport const DialogSideContent = (\n { children, 'data-test-id': dataTestId = 'fondue-dialog-side-content' }: DialogSideContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.sideContent} data-dialog-layout-component>\n {children}\n </div>\n );\n};\nDialogSideContent.displayName = 'Dialog.SideContent';\n\nexport const DialogClose = ({ children }: DialogCloseProps) => {\n return <RadixDialog.Close asChild>{children}</RadixDialog.Close>;\n};\nDialogClose.displayName = 'Dialog.Close';\n\nexport const DialogTitle = ({ children, asChild }: DialogAnnouncementProps) => {\n return <RadixDialog.Title asChild={asChild}>{children}</RadixDialog.Title>;\n};\nDialogTitle.displayName = 'Dialog.Title';\n\nexport const DialogDescription = ({ children, asChild }: DialogAnnouncementProps) => {\n return <RadixDialog.Description asChild={asChild}>{children}</RadixDialog.Description>;\n};\nDialogDescription.displayName = 'Dialog.Description';\n\nexport const Dialog = {\n Root: DialogRoot,\n Title: DialogTitle,\n Description: DialogDescription,\n Close: DialogClose,\n Trigger: forwardRef<HTMLButtonElement, DialogTriggerProps>(DialogTrigger),\n Content: forwardRef<HTMLDivElement, DialogContentProps>(DialogContent),\n Header: forwardRef<HTMLDivElement, DialogHeaderProps>(DialogHeader),\n Footer: forwardRef<HTMLDivElement, DialogFooterProps>(DialogFooter),\n Body: forwardRef<HTMLDivElement, DialogBodyProps>(DialogBody),\n SideContent: forwardRef<HTMLDivElement, DialogSideContentProps>(DialogSideContent),\n};\n"],"names":["DialogRoot","children","props","RadixDialog","DialogTrigger","dataTestId","ref","jsx","DialogContent","maxWidth","minWidth","minHeight","padding","verticalAlign","showUnderlay","rounded","jsxs","styles","DialogHeader","showCloseButton","IconCross","DialogFooter","DialogBody","D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AS,CAAA;AAE1DwB,EAAY,cAAc;AAEnB,MAAME,IAAoB,CAAC,EAAE,UAAA1B,GAAU,SAAAyB,QAClC,gBAAAnB,EAAAJ,EAAY,aAAZ,EAAwB,SAAAuB,GAAmB,UAAAzB,EAAS,CAAA;AAEhE0B,EAAkB,cAAc;AAEzB,MAAMC,IAAS;AAAA,EAClB,MAAM5B;AAAA,EACN,OAAOyB;AAAA,EACP,aAAaE;AAAA,EACb,OAAOH;AAAA,EACP,SAASK,EAAkDzB,CAAa;AAAA,EACxE,SAASyB,EAA+CrB,CAAa;AAAA,EACrE,QAAQqB,EAA8CX,CAAY;AAAA,EAClE,QAAQW,EAA8CR,CAAY;AAAA,EAClE,MAAMQ,EAA4CP,CAAU;AAAA,EAC5D,aAAaO,EAAmDN,CAAiB;AACrF;"}
@@ -1,61 +1,33 @@
1
- import { jsx as a, jsxs as F } from "react/jsx-runtime";
2
- import { IconCross as g } from "@frontify/fondue-icons";
3
- import * as r from "@radix-ui/react-popover";
4
- import { forwardRef as d } from "react";
5
- import { flyoutContentStyles as N, flyoutHeaderStyles as C, flyoutFooterStyles as h, flyoutBodyStyles as x } from "./fondue-components23.js";
6
- const i = ({ children: t, ...o }) => /* @__PURE__ */ a(r.Root, { ...o, children: t });
7
- i.displayName = "Flyout.Root";
8
- const y = ({ children: t, "data-test-id": o = "fondue-flyout-trigger" }, e) => /* @__PURE__ */ a(r.Trigger, { "data-test-id": o, asChild: !0, ref: e, children: t });
9
- y.displayName = "Flyout.Trigger";
10
- const n = ({
11
- align: t = "start",
12
- maxWidth: o = "360px",
13
- padding: e = "compact",
14
- "data-test-id": s = "fondue-flyout-content",
15
- children: m,
16
- ...l
17
- }, p) => /* @__PURE__ */ a(r.Portal, { children: /* @__PURE__ */ a(
18
- r.Content,
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import * as s from "@radix-ui/react-separator";
3
+ import { forwardRef as p } from "react";
4
+ import { cn as f } from "./fondue-components24.js";
5
+ import { dividerStyles as n } from "./fondue-components35.js";
6
+ const r = ({
7
+ "data-test-id": o = "fondue-divider",
8
+ direction: t = "horizontal",
9
+ className: i,
10
+ variant: e,
11
+ ...d
12
+ }, a) => /* @__PURE__ */ m(
13
+ s.Root,
19
14
  {
20
- style: {
21
- "--flyout-max-width": o
22
- },
23
- ref: p,
24
- align: t,
25
- collisionPadding: 8,
26
- sideOffset: 8,
27
- className: N({ ...l }),
28
- "data-flyout-spacing": e,
29
- "data-test-id": s,
30
- ...l,
31
- children: m
15
+ ref: a,
16
+ className: f(
17
+ n({
18
+ direction: t,
19
+ variant: e,
20
+ ...d
21
+ }),
22
+ i
23
+ ),
24
+ "data-test-id": o
32
25
  }
33
- ) });
34
- n.displayName = "Flyout.Content";
35
- const u = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header" }, s) => /* @__PURE__ */ F("div", { "data-test-id": e, ref: s, className: C, children: [
36
- /* @__PURE__ */ a("div", { children: o }),
37
- t && /* @__PURE__ */ a(r.Close, { role: "button", "data-test-id": `${e}-close`, className: "tw-cursor-pointer", children: /* @__PURE__ */ a(g, { size: 20 }) })
38
- ] });
39
- u.displayName = "Flyout.Header";
40
- const f = ({ children: t, "data-test-id": o = "fondue-flyout-footer" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: h, children: t });
41
- f.displayName = "Flyout.Footer";
42
- const c = ({ children: t, "data-test-id": o = "fondue-flyout-body" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, "data-flyout-spacing": "compact", className: x, children: t });
43
- c.displayName = "Flyout.Body";
44
- const S = {
45
- Root: i,
46
- Trigger: d(y),
47
- Content: d(n),
48
- Header: d(u),
49
- Footer: d(f),
50
- Body: d(c)
51
- };
26
+ );
27
+ r.displayName = "Divider";
28
+ const u = p(r);
52
29
  export {
53
- S as Flyout,
54
- c as FlyoutBody,
55
- n as FlyoutContent,
56
- f as FlyoutFooter,
57
- u as FlyoutHeader,
58
- i as FlyoutRoot,
59
- y as FlyoutTrigger
30
+ u as Divider,
31
+ r as DividerComponent
60
32
  };
61
33
  //# sourceMappingURL=fondue-components8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components8.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 { flyoutBodyStyles, flyoutContentStyles, flyoutFooterStyles, flyoutHeaderStyles } from './styles/flyoutStyles';\n\nexport type FlyoutRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the flyout\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport type FlyoutContentProps = {\n /**\n * Add rounded corners to the flyout\n * @default true\n */\n rounded?: boolean;\n /**\n * Define the prefered side of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Define the prefered alignment of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Define the padding of the flyout\n * @default \"compact\"\n */\n padding?: 'compact' | 'comfortable' | 'spacious';\n /**\n * Define the maximum width of the flyout\n * @default \"360px\"\n */\n maxWidth?: string;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type FlyoutTriggerProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type FlyoutHeaderProps = {\n /**\n * Show a close button in the header\n * @default false\n */\n showCloseButton?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type FlyoutFooterProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type FlyoutBodyProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport const FlyoutTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-trigger' }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.Trigger data-test-id={dataTestId} asChild ref={ref}>\n {children}\n </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\nexport const FlyoutContent = (\n {\n align = 'start',\n maxWidth = '360px',\n padding = 'compact',\n 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixPopover.Portal>\n <RadixPopover.Content\n style={\n {\n '--flyout-max-width': maxWidth,\n } as CSSProperties\n }\n ref={ref}\n align={align}\n collisionPadding={8}\n sideOffset={8}\n className={flyoutContentStyles({ ...props })}\n data-flyout-spacing={padding}\n data-test-id={dataTestId}\n {...props}\n >\n {children}\n </RadixPopover.Content>\n </RadixPopover.Portal>\n );\n};\nFlyoutContent.displayName = 'Flyout.Content';\n\nexport const FlyoutHeader = (\n { showCloseButton, children, 'data-test-id': dataTestId = 'fondue-flyout-header' }: FlyoutHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={flyoutHeaderStyles}>\n <div>{children}</div>\n {showCloseButton && (\n <RadixPopover.Close role=\"button\" data-test-id={`${dataTestId}-close`} className=\"tw-cursor-pointer\">\n <IconCross size={20} />\n </RadixPopover.Close>\n )}\n </div>\n );\n};\nFlyoutHeader.displayName = 'Flyout.Header';\n\nexport const FlyoutFooter = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-footer' }: FlyoutFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={flyoutFooterStyles}>\n {children}\n </div>\n );\n};\nFlyoutFooter.displayName = 'Flyout.Footer';\n\nexport const FlyoutBody = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-body' }: FlyoutBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} data-flyout-spacing=\"compact\" className={flyoutBodyStyles}>\n {children}\n </div>\n );\n};\nFlyoutBody.displayName = 'Flyout.Body';\n\nexport const Flyout = {\n Root: FlyoutRoot,\n Trigger: forwardRef<HTMLButtonElement, FlyoutTriggerProps>(FlyoutTrigger),\n Content: forwardRef<HTMLDivElement, FlyoutContentProps>(FlyoutContent),\n Header: forwardRef<HTMLDivElement, FlyoutHeaderProps>(FlyoutHeader),\n Footer: forwardRef<HTMLDivElement, FlyoutFooterProps>(FlyoutFooter),\n Body: forwardRef<HTMLDivElement, FlyoutBodyProps>(FlyoutBody),\n};\n"],"names":["FlyoutRoot","children","props","RadixPopover","FlyoutTrigger","dataTestId","ref","jsx","FlyoutContent","align","maxWidth","padding","flyoutContentStyles","FlyoutHeader","showCloseButton","flyoutHeaderStyles","IconCross","FlyoutFooter","flyoutFooterStyles","FlyoutBody","flyoutBodyStyles","Flyout","forwardRef"],"mappings":";;;;;AAwEO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAC9BC,EAAa,MAAb,EAAmB,GAAGD,GAAQ,UAAAD,EAAS,CAAA;AAEnDD,EAAW,cAAc;AAEZ,MAAAI,IAAgB,CACzB,EAAE,UAAAH,GAAU,gBAAgBI,IAAa,2BACzCC,MAGI,gBAAAC,EAACJ,EAAa,SAAb,EAAqB,gBAAcE,GAAY,SAAO,IAAC,KAAAC,GACnD,UAAAL,EACL,CAAA;AAGRG,EAAc,cAAc;AAErB,MAAMI,IAAgB,CACzB;AAAA,EACI,OAAAC,IAAQ;AAAA,EACR,UAAAC,IAAW;AAAA,EACX,SAAAC,IAAU;AAAA,EACV,gBAAgBN,IAAa;AAAA,EA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B,EAAkDlB,CAAa;AAAA,EACxE,SAASkB,EAA+Cd,CAAa;AAAA,EACrE,QAAQc,EAA8CT,CAAY;AAAA,EAClE,QAAQS,EAA8CL,CAAY;AAAA,EAClE,MAAMK,EAA4CH,CAAU;AAChE;"}
1
+ {"version":3,"file":"fondue-components8.js","sources":["../src/components/Divider/Divider.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as Separator from '@radix-ui/react-separator';\nimport { forwardRef, type ForwardedRef, type ReactElement } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport { dividerStyles } from './styles/dividerStyles';\n\ntype DividerStyle = 'noline' | 'dashed' | 'solid';\ntype DividerPadding = 'none' | 'small' | 'medium' | 'large';\ntype DividerDirection = 'horizontal' | 'vertical';\ntype DividerColor = 'weak' | 'default' | 'strong' | 'x-strong';\n\nexport type DividerProps = {\n /**\n * The style of the divider\n * @default \"solid\"\n */\n variant?: DividerStyle;\n /**\n * The padding of the divider\n * @default \"medium\"\n */\n padding?: DividerPadding;\n /**\n * The color of the divider\n * @default \"default\"\n */\n color?: DividerColor;\n /**\n * The direction of the divider\n * @default \"horizontal\"\n */\n direction?: DividerDirection;\n 'data-test-id'?: string;\n className?: string;\n};\n\nexport const DividerComponent = (\n {\n 'data-test-id': dataTestId = 'fondue-divider',\n direction = 'horizontal',\n className,\n variant,\n ...props\n }: DividerProps,\n ref: ForwardedRef<HTMLDivElement | null>,\n): ReactElement => {\n return (\n <Separator.Root\n ref={ref}\n className={cn(\n dividerStyles({\n direction,\n variant,\n ...props,\n }),\n className,\n )}\n data-test-id={dataTestId}\n />\n );\n};\n\nDividerComponent.displayName = 'Divider';\n\nexport const Divider = forwardRef<HTMLDivElement, DividerProps>(DividerComponent);\n"],"names":["DividerComponent","dataTestId","direction","className","variant","props","ref","jsx","Separator","cn","dividerStyles","Divider","forwardRef"],"mappings":";;;;;AAuCO,MAAMA,IAAmB,CAC5B;AAAA,EACI,gBAAgBC,IAAa;AAAA,EAC7B,WAAAC,IAAY;AAAA,EACZ,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACP,GACAC,MAGI,gBAAAC;AAAA,EAACC,EAAU;AAAA,EAAV;AAAA,IACG,KAAAF;AAAA,IACA,WAAWG;AAAA,MACPC,EAAc;AAAA,QACV,WAAAR;AAAA,QACA,SAAAE;AAAA,QACA,GAAGC;AAAA,MAAA,CACN;AAAA,MACDF;AAAA,IACJ;AAAA,IACA,gBAAcF;AAAA,EAAA;AAAA;AAK1BD,EAAiB,cAAc;AAElB,MAAAW,IAAUC,EAAyCZ,CAAgB;"}
@@ -1,27 +1,106 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import * as d from "@radix-ui/react-label";
3
- import { forwardRef as i } from "react";
4
- import { cn as n } from "./fondue-components15.js";
5
- const s = ({ className: e, "data-test-id": a = "fondue-label", ...t }, r) => /* @__PURE__ */ o(
6
- d.Root,
1
+ import { jsx as e, jsxs as T } from "react/jsx-runtime";
2
+ import { IconCaretRight as F } from "@frontify/fondue-icons";
3
+ import * as d from "@radix-ui/react-dropdown-menu";
4
+ import { forwardRef as s, useRef as c } from "react";
5
+ import { usePreventDropdownOverflow as I } from "./fondue-components36.js";
6
+ import { syncRefs as l } from "./fondue-components37.js";
7
+ import a from "./fondue-components38.js";
8
+ const m = ({
9
+ children: o,
10
+ open: t,
11
+ onOpenChange: r,
12
+ "data-test-id": n = "fondue-dropdown"
13
+ }) => /* @__PURE__ */ e(d.Root, { open: t, onOpenChange: r, "data-test-id": n, children: o });
14
+ m.displayName = "Dropdown.Root";
15
+ const f = ({ children: o, "data-test-id": t = "fondue-dropdown-trigger" }, r) => /* @__PURE__ */ e(d.Trigger, { asChild: !0, "data-test-id": t, ref: r, children: o });
16
+ f.displayName = "Dropdown.Trigger";
17
+ const g = ({
18
+ onOpen: o,
19
+ onClose: t,
20
+ side: r = "bottom",
21
+ children: n,
22
+ "data-test-id": u = "fondue-dropdown-content"
23
+ }, p) => {
24
+ const i = c(null), w = c(!1), { setMaxHeight: y } = I(i);
25
+ return /* @__PURE__ */ e(d.Portal, { children: /* @__PURE__ */ e(
26
+ d.Content,
27
+ {
28
+ align: "start",
29
+ collisionPadding: 8,
30
+ sideOffset: 8,
31
+ side: r,
32
+ className: a.content,
33
+ "data-test-id": u,
34
+ ref: i,
35
+ onCloseAutoFocus: () => {
36
+ l(i, p), t && t(), w.current = !1;
37
+ },
38
+ onFocus: () => {
39
+ w.current || (y(), l(i, p), o && o(), w.current = !0);
40
+ },
41
+ children: n
42
+ }
43
+ ) });
44
+ };
45
+ g.displayName = "Dropdown.Content";
46
+ const D = ({ children: o, "data-test-id": t = "fondue-dropdown-group" }, r) => /* @__PURE__ */ e(d.Group, { className: a.group, "data-test-id": t, ref: r, children: o });
47
+ D.displayName = "Dropdown.Group";
48
+ const b = ({
49
+ children: o,
50
+ "data-test-id": t = "fondue-dropdown-submenu"
51
+ }) => /* @__PURE__ */ e(d.Sub, { "data-test-id": t, children: o });
52
+ b.displayName = "Dropdown.SubMenu";
53
+ const S = ({ children: o, "data-test-id": t = "fondue-dropdown-subtrigger" }, r) => /* @__PURE__ */ T(d.SubTrigger, { className: a.subTrigger, "data-test-id": t, ref: r, children: [
54
+ o,
55
+ /* @__PURE__ */ e(F, { className: a.subMenuIndicator, size: 16 })
56
+ ] });
57
+ S.displayName = "Dropdown.SubTrigger";
58
+ const R = ({ children: o, "data-test-id": t = "fondue-dropdown-subcontent" }, r) => /* @__PURE__ */ e(d.Portal, { children: /* @__PURE__ */ e(d.SubContent, { className: a.subContent, "data-test-id": t, ref: r, children: o }) });
59
+ R.displayName = "Dropdown.SubContent";
60
+ const N = ({
61
+ children: o,
62
+ disabled: t,
63
+ textValue: r,
64
+ onSelect: n,
65
+ "data-test-id": u = "fondue-dropdown-subtrigger",
66
+ ...p
67
+ }, i) => /* @__PURE__ */ e(
68
+ d.Item,
7
69
  {
8
- ref: r,
9
- "data-required": t.required,
10
- className: n(
11
- 'tw-group tw-flex tw-gap-1 tw-font-sans tw-font-normal peer-data-[state="checked"]:tw-font-medium peer-data-[state="indeterminate"]:tw-font-medium tw-text-body-medium tw-text-text-weak peer-hover:tw-text-text has-[+_*_input:hover:not(:disabled)]:tw-text-text tw-transition-colors',
12
- // Disabled state if siblings has disabled state
13
- "has-[+_*_:disabled]:tw-text-text-disabled has-[~_:disabled]:tw-cursor-not-allowed peer-disabled:tw-text-text-disabled peer-disabled:tw-cursor-not-allowed",
14
- // Required asterisk
15
- 'after:tw-hidden data-[required="true"]:after:tw-flex after:tw-content-["*"] after:-tw-ml-1 after:tw-font-sans after:tw-text-body-small after:tw-font-medium after:tw-text-text-negative group-hover:tw-text-text-negative-hover',
16
- e
17
- ),
18
- "data-test-id": a,
19
- ...t
70
+ onSelect: n,
71
+ className: a.item,
72
+ textValue: r,
73
+ "data-test-id": u,
74
+ ref: i,
75
+ disabled: t,
76
+ ...p,
77
+ children: o
20
78
  }
21
- ), w = i(s);
22
- w.displayName = "Label";
79
+ );
80
+ N.displayName = "Dropdown.Item";
81
+ const C = ({ children: o, name: t, "data-test-id": r = "fondue-dropdown-slot" }, n) => /* @__PURE__ */ e("div", { "data-name": t, className: a.slot, "data-test-id": r, ref: n, children: o });
82
+ C.displayName = "Dropdown.Slot";
83
+ const h = s(f), x = s(g), G = s(D), M = s(S), P = s(R), v = s(N), j = s(C), B = {
84
+ Root: m,
85
+ Trigger: h,
86
+ Content: x,
87
+ Group: G,
88
+ SubMenu: b,
89
+ SubTrigger: M,
90
+ SubContent: P,
91
+ Item: v,
92
+ Slot: j
93
+ };
23
94
  export {
24
- w as Label,
25
- s as LabelComponent
95
+ B as Dropdown,
96
+ g as DropdownContent,
97
+ D as DropdownGroup,
98
+ N as DropdownItem,
99
+ m as DropdownRoot,
100
+ C as DropdownSlot,
101
+ R as DropdownSubContent,
102
+ b as DropdownSubMenu,
103
+ S as DropdownSubTrigger,
104
+ f as DropdownTrigger
26
105
  };
27
106
  //# sourceMappingURL=fondue-components9.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components9.js","sources":["../src/components/Label/Label.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { type ForwardedRef, forwardRef, type ReactNode } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nexport type LabelProps = {\n id?: string;\n children: ReactNode;\n /**\n * The id of the input element the label is associated with\n */\n htmlFor: string;\n /**\n * Add an asterisk to the label to indicate it is required\n * @default false\n */\n required?: boolean;\n className?: string;\n 'data-test-id'?: string;\n};\n\nexport const LabelComponent = (\n { className, 'data-test-id': dataTestId = 'fondue-label', ...props }: LabelProps,\n ref: ForwardedRef<HTMLLabelElement>,\n) => {\n return (\n <LabelPrimitive.Root\n ref={ref}\n data-required={props.required}\n className={cn(\n 'tw-group tw-flex tw-gap-1 tw-font-sans tw-font-normal peer-data-[state=\"checked\"]:tw-font-medium peer-data-[state=\"indeterminate\"]:tw-font-medium tw-text-body-medium tw-text-text-weak peer-hover:tw-text-text has-[+_*_input:hover:not(:disabled)]:tw-text-text tw-transition-colors',\n // Disabled state if siblings has disabled state\n 'has-[+_*_:disabled]:tw-text-text-disabled has-[~_:disabled]:tw-cursor-not-allowed peer-disabled:tw-text-text-disabled peer-disabled:tw-cursor-not-allowed',\n // Required asterisk\n 'after:tw-hidden data-[required=\"true\"]:after:tw-flex after:tw-content-[\"*\"] after:-tw-ml-1 after:tw-font-sans after:tw-text-body-small after:tw-font-medium after:tw-text-text-negative group-hover:tw-text-text-negative-hover',\n className,\n )}\n data-test-id={dataTestId}\n {...props}\n />\n );\n};\n\nexport const Label = forwardRef<HTMLLabelElement, LabelProps>(LabelComponent);\nLabel.displayName = 'Label';\n"],"names":["LabelComponent","className","dataTestId","props","ref","jsx","LabelPrimitive","cn","Label","forwardRef"],"mappings":";;;;AAuBa,MAAAA,IAAiB,CAC1B,EAAE,WAAAC,GAAW,gBAAgBC,IAAa,gBAAgB,GAAGC,EAAM,GACnEC,MAGI,gBAAAC;AAAA,EAACC,EAAe;AAAA,EAAf;AAAA,IACG,KAAAF;AAAA,IACA,iBAAeD,EAAM;AAAA,IACrB,WAAWI;AAAA,MACP;AAAA;AAAA,MAEA;AAAA;AAAA,MAEA;AAAA,MACAN;AAAA,IACJ;AAAA,IACA,gBAAcC;AAAA,IACb,GAAGC;AAAA,EAAA;AAAA,GAKHK,IAAQC,EAAyCT,CAAc;AAC5EQ,EAAM,cAAc;"}
1
+ {"version":3,"file":"fondue-components9.js","sources":["../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretRight } from '@frontify/fondue-icons';\nimport * as RadixDropdown from '@radix-ui/react-dropdown-menu';\nimport { forwardRef, useRef, type ForwardedRef, type ReactNode } from 'react';\n\nimport { usePreventDropdownOverflow } from '#/hooks/usePreventDropdownOverflow';\nimport { syncRefs } from '#/utilities/domUtilities';\n\nimport styles from './styles/dropdown.module.scss';\n\nexport type DropdownRootProps = {\n children?: ReactNode;\n /**\n * Controls the open state of the dropdown.\n */\n open?: boolean;\n /**\n * Callback that is called when the open state of the dropdown changes.\n */\n onOpenChange?: (open: boolean) => void;\n 'data-test-id'?: string;\n};\n\nexport const DropdownRoot = ({\n children,\n open,\n onOpenChange,\n 'data-test-id': dataTestId = 'fondue-dropdown',\n}: DropdownRootProps) => {\n return (\n <RadixDropdown.Root open={open} onOpenChange={onOpenChange} data-test-id={dataTestId}>\n {children}\n </RadixDropdown.Root>\n );\n};\nDropdownRoot.displayName = 'Dropdown.Root';\n\nexport type DropdownTriggerProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-trigger' }: DropdownTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixDropdown.Trigger asChild data-test-id={dataTestId} ref={ref}>\n {children}\n </RadixDropdown.Trigger>\n );\n};\nDropdownTrigger.displayName = 'Dropdown.Trigger';\n\nexport type DropdownContentProps = {\n children?: ReactNode;\n 'data-test-id'?: string;\n onOpen?: () => void;\n onClose?: () => void;\n /**\n * Defines the preferred side of the dropdown. It will not be respected if there are collisions with the viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n};\n\nexport const DropdownContent = (\n {\n onOpen,\n onClose,\n side = 'bottom',\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-content',\n }: DropdownContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const localRef = useRef(null);\n const dropdownIsOpen = useRef(false);\n\n const { setMaxHeight } = usePreventDropdownOverflow(localRef);\n\n return (\n <RadixDropdown.Portal>\n <RadixDropdown.Content\n align=\"start\"\n collisionPadding={8}\n sideOffset={8}\n side={side}\n className={styles.content}\n data-test-id={dataTestId}\n ref={localRef}\n onCloseAutoFocus={() => {\n syncRefs(localRef, ref);\n onClose && onClose();\n dropdownIsOpen.current = false;\n }}\n onFocus={() => {\n if (!dropdownIsOpen.current) {\n setMaxHeight();\n syncRefs(localRef, ref);\n onOpen && onOpen();\n dropdownIsOpen.current = true;\n }\n }}\n >\n {children}\n </RadixDropdown.Content>\n </RadixDropdown.Portal>\n );\n};\nDropdownContent.displayName = 'Dropdown.Content';\n\nexport type DropdownGroupProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownGroup = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-group' }: DropdownGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Group className={styles.group} data-test-id={dataTestId} ref={ref}>\n {children}\n </RadixDropdown.Group>\n );\n};\nDropdownGroup.displayName = 'Dropdown.Group';\n\nexport type DropdownSubMenuProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubMenu = ({\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-submenu',\n}: DropdownSubMenuProps) => {\n return <RadixDropdown.Sub data-test-id={dataTestId}>{children}</RadixDropdown.Sub>;\n};\nDropdownSubMenu.displayName = 'Dropdown.SubMenu';\n\nexport type DropdownSubTriggerProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger' }: DropdownSubTriggerProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.SubTrigger className={styles.subTrigger} data-test-id={dataTestId} ref={ref}>\n {children}\n <IconCaretRight className={styles.subMenuIndicator} size={16} />\n </RadixDropdown.SubTrigger>\n );\n};\nDropdownSubTrigger.displayName = 'Dropdown.SubTrigger';\n\nexport type DropdownSubContentProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubContent = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-subcontent' }: DropdownSubContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Portal>\n <RadixDropdown.SubContent className={styles.subContent} data-test-id={dataTestId} ref={ref}>\n {children}\n </RadixDropdown.SubContent>\n </RadixDropdown.Portal>\n );\n};\nDropdownSubContent.displayName = 'Dropdown.SubContent';\n\nexport type DropdownItemProps = {\n children: ReactNode;\n /**\n * Disables the item.\n */\n disabled?: boolean;\n /**\n * The text value of the item that is passed to the onSelect callback.\n */\n textValue?: string;\n /**\n * Callback that is called when the item is selected.\n */\n onSelect?: (event: Event) => void;\n 'data-test-id'?: string;\n};\n\nexport const DropdownItem = (\n {\n children,\n disabled,\n textValue,\n onSelect,\n 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger',\n ...props\n }: DropdownItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Item\n onSelect={onSelect}\n className={styles.item}\n textValue={textValue}\n data-test-id={dataTestId}\n ref={ref}\n disabled={disabled}\n {...props}\n >\n {children}\n </RadixDropdown.Item>\n );\n};\nDropdownItem.displayName = 'Dropdown.Item';\n\nexport type DropdownSlotProps = { children: ReactNode; name?: 'left' | 'right'; 'data-test-id'?: string };\n\nexport const DropdownSlot = (\n { children, name, 'data-test-id': dataTestId = 'fondue-dropdown-slot' }: DropdownSlotProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-name={name} className={styles.slot} data-test-id={dataTestId} ref={ref}>\n {children}\n </div>\n );\n};\nDropdownSlot.displayName = 'Dropdown.Slot';\n\nconst ForwardedRefDropdownTrigger = forwardRef<HTMLButtonElement, DropdownTriggerProps>(DropdownTrigger);\nconst ForwardedRefDropdownContent = forwardRef<HTMLDivElement, DropdownContentProps>(DropdownContent);\nconst ForwardedRefDropdownGroup = forwardRef<HTMLDivElement, DropdownGroupProps>(DropdownGroup);\nconst ForwardedRefDropdownSubTrigger = forwardRef<HTMLDivElement, DropdownSubTriggerProps>(DropdownSubTrigger);\nconst ForwardedRefDropdownSubContent = forwardRef<HTMLDivElement, DropdownSubContentProps>(DropdownSubContent);\nconst ForwardedRefDropdownItem = forwardRef<HTMLDivElement, DropdownItemProps>(DropdownItem);\nconst ForwardedRefDropdownSlot = forwardRef<HTMLDivElement, DropdownSlotProps>(DropdownSlot);\n\nexport const Dropdown = {\n Root: DropdownRoot,\n Trigger: ForwardedRefDropdownTrigger,\n Content: ForwardedRefDropdownContent,\n Group: ForwardedRefDropdownGroup,\n SubMenu: DropdownSubMenu,\n SubTrigger: ForwardedRefDropdownSubTrigger,\n SubContent: ForwardedRefDropdownSubContent,\n Item: ForwardedRefDropdownItem,\n Slot: ForwardedRefDropdownSlot,\n};\n"],"names":["DropdownRoot","children","open","onOpenChange","dataTestId","jsx","RadixDropdown","DropdownTrigger","ref","DropdownContent","onOpen","onClose","side","localRef","useRef","dropdownIsOpen","setMaxHeight","usePreventDropdownOverflow","styles","syncRefs","DropdownGroup","DropdownSubMenu","DropdownSubTrigger","jsxs","IconCaretRight","DropdownSubContent","DropdownItem","disabled","textValue","onSelect","props","DropdownSlot","name","ForwardedRefDropdownTrigger","forwardRef","ForwardedRefDropdownContent","ForwardedRefDropdownGroup","ForwardedRefDropdownSubTrigger","ForwardedRefDropdownSubContent","ForwardedRefDropdownItem","ForwardedRefDropdownSlot","Dropdown"],"mappings":";;;;;;;AAwBO,MAAMA,IAAe,CAAC;AAAA,EACzB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAgBC,IAAa;AACjC,MAEQ,gBAAAC,EAACC,EAAc,MAAd,EAAmB,MAAAJ,GAAY,cAAAC,GAA4B,gBAAcC,GACrE,UAAAH,EACL,CAAA;AAGRD,EAAa,cAAc;AAId,MAAAO,IAAkB,CAC3B,EAAE,UAAAN,GAAU,gBAAgBG,IAAa,6BACzCI,MAGI,gBAAAH,EAACC,EAAc,SAAd,EAAsB,SAAO,IAAC,gBAAcF,GAAY,KAAAI,GACpD,UAAAP,EACL,CAAA;AAGRM,EAAgB,cAAc;AAcvB,MAAME,IAAkB,CAC3B;AAAA,EACI,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,UAAAX;AAAA,EACA,gBAAgBG,IAAa;AACjC,GACAI,MACC;AACK,QAAAK,IAAWC,EAAO,IAAI,GACtBC,IAAiBD,EAAO,EAAK,GAE7B,EAAE,cAAAE,EAAA,IAAiBC,EAA2BJ,CAAQ;AAGxD,SAAA,gBAAAR,EAACC,EAAc,QAAd,EACG,UAAA,gBAAAD;AAAA,IAACC,EAAc;AAAA,IAAd;AAAA,MACG,OAAM;AAAA,MACN,kBAAkB;AAAA,MAClB,YAAY;AAAA,MACZ,MAAAM;AAAA,MACA,WAAWM,EAAO;AAAA,MAClB,gBAAcd;AAAA,MACd,KAAKS;AAAA,MACL,kBAAkB,MAAM;AACpB,QAAAM,EAASN,GAAUL,CAAG,GACtBG,KAAWA,EAAQ,GACnBI,EAAe,UAAU;AAAA,MAC7B;AAAA,MACA,SAAS,MAAM;AACP,QAACA,EAAe,YACHC,KACbG,EAASN,GAAUL,CAAG,GACt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