@frontify/fondue-components 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) 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 +42 -30
  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 +64 -6
  10. package/dist/fondue-components15.js.map +1 -1
  11. package/dist/fondue-components16.js +6 -47
  12. package/dist/fondue-components16.js.map +1 -1
  13. package/dist/fondue-components17.js +42 -50
  14. package/dist/fondue-components17.js.map +1 -1
  15. package/dist/fondue-components18.js +112 -29
  16. package/dist/fondue-components18.js.map +1 -1
  17. package/dist/fondue-components19.js +53 -110
  18. package/dist/fondue-components19.js.map +1 -1
  19. package/dist/fondue-components20.js +27 -64
  20. package/dist/fondue-components20.js.map +1 -1
  21. package/dist/fondue-components21.js +64 -41
  22. package/dist/fondue-components21.js.map +1 -1
  23. package/dist/fondue-components22.js +43 -32
  24. package/dist/fondue-components22.js.map +1 -1
  25. package/dist/fondue-components23.js +32 -5
  26. package/dist/fondue-components23.js.map +1 -1
  27. package/dist/fondue-components24.js +5 -12
  28. package/dist/fondue-components24.js.map +1 -1
  29. package/dist/fondue-components25.js +10 -153
  30. package/dist/fondue-components25.js.map +1 -1
  31. package/dist/fondue-components26.js +59 -22
  32. package/dist/fondue-components26.js.map +1 -1
  33. package/dist/fondue-components27.js +17 -17
  34. package/dist/fondue-components27.js.map +1 -1
  35. package/dist/fondue-components28.js +112 -15
  36. package/dist/fondue-components28.js.map +1 -1
  37. package/dist/fondue-components29.js +19 -30
  38. package/dist/fondue-components29.js.map +1 -1
  39. package/dist/fondue-components3.js +2 -2
  40. package/dist/fondue-components30.js +32 -28
  41. package/dist/fondue-components30.js.map +1 -1
  42. package/dist/fondue-components31.js +23 -125
  43. package/dist/fondue-components31.js.map +1 -1
  44. package/dist/fondue-components32.js +129 -20
  45. package/dist/fondue-components32.js.map +1 -1
  46. package/dist/fondue-components33.js +21 -45
  47. package/dist/fondue-components33.js.map +1 -1
  48. package/dist/fondue-components34.js +45 -15
  49. package/dist/fondue-components34.js.map +1 -1
  50. package/dist/fondue-components35.js +28 -60
  51. package/dist/fondue-components35.js.map +1 -1
  52. package/dist/fondue-components36.js +15 -15
  53. package/dist/fondue-components36.js.map +1 -1
  54. package/dist/fondue-components37.js +60 -19
  55. package/dist/fondue-components37.js.map +1 -1
  56. package/dist/fondue-components38.js +15 -17
  57. package/dist/fondue-components38.js.map +1 -1
  58. package/dist/fondue-components39.js +16 -4
  59. package/dist/fondue-components39.js.map +1 -1
  60. package/dist/fondue-components4.js +4 -4
  61. package/dist/fondue-components40.js +3 -11
  62. package/dist/fondue-components40.js.map +1 -1
  63. package/dist/fondue-components41.js +11 -3
  64. package/dist/fondue-components41.js.map +1 -1
  65. package/dist/fondue-components42.js +5 -35
  66. package/dist/fondue-components42.js.map +1 -1
  67. package/dist/fondue-components43.js +35 -5
  68. package/dist/fondue-components43.js.map +1 -1
  69. package/dist/fondue-components44.js +12 -24
  70. package/dist/fondue-components44.js.map +1 -1
  71. package/dist/fondue-components45.js +4 -16
  72. package/dist/fondue-components45.js.map +1 -1
  73. package/dist/fondue-components46.js +24 -10
  74. package/dist/fondue-components46.js.map +1 -1
  75. package/dist/fondue-components47.js +16 -12
  76. package/dist/fondue-components47.js.map +1 -1
  77. package/dist/fondue-components5.js +2 -2
  78. package/dist/fondue-components50.js +2 -2
  79. package/dist/fondue-components53.js +1 -1
  80. package/dist/fondue-components54.js +9 -16
  81. package/dist/fondue-components54.js.map +1 -1
  82. package/dist/fondue-components55.js +12 -6
  83. package/dist/fondue-components55.js.map +1 -1
  84. package/dist/fondue-components56.js +18 -2
  85. package/dist/fondue-components56.js.map +1 -1
  86. package/dist/fondue-components57.js +4 -8
  87. package/dist/fondue-components57.js.map +1 -1
  88. package/dist/fondue-components58.js +2 -39
  89. package/dist/fondue-components58.js.map +1 -1
  90. package/dist/fondue-components59.js +14 -0
  91. package/dist/fondue-components59.js.map +1 -0
  92. package/dist/fondue-components6.js +5 -5
  93. package/dist/fondue-components60.js +42 -0
  94. package/dist/fondue-components60.js.map +1 -0
  95. package/dist/fondue-components7.js +78 -68
  96. package/dist/fondue-components7.js.map +1 -1
  97. package/dist/fondue-components8.js +2 -2
  98. package/dist/fondue-components9.js +3 -3
  99. package/dist/index.d.ts +27 -3
  100. package/dist/style.css +1 -1
  101. package/package.json +39 -38
@@ -1,85 +1,95 @@
1
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
1
+ import { jsx as a, jsxs as b } from "react/jsx-runtime";
2
2
  import { IconCross as w } from "@frontify/fondue-icons";
3
3
  import * as i from "@radix-ui/react-dialog";
4
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 = ({
5
+ import { addAutoFocusAttribute as F, addShowFocusRing as S } from "./fondue-components35.js";
6
+ import r from "./fondue-components36.js";
7
+ const s = ({ children: t, ...o }) => /* @__PURE__ */ a(i.Root, { ...o, children: t });
8
+ s.displayName = "Dialog.Root";
9
+ const n = ({ children: t, "data-test-id": o = "fondue-dialog-trigger" }, e) => /* @__PURE__ */ a(
10
+ i.Trigger,
11
+ {
12
+ onMouseDown: F,
13
+ "data-auto-focus-visible": "true",
14
+ "data-auto-focus-trigger": !0,
15
+ "data-test-id": o,
16
+ asChild: !0,
17
+ ref: e,
18
+ children: t
19
+ }
20
+ );
21
+ n.displayName = "Dialog.Trigger";
22
+ const g = ({
11
23
  maxWidth: t = "800px",
12
- minWidth: a = "400px",
24
+ minWidth: o = "400px",
13
25
  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,
26
+ padding: l = "compact",
27
+ verticalAlign: N = "center",
28
+ "data-test-id": C = "fondue-dialog-content",
29
+ showUnderlay: h = !1,
30
+ children: v,
31
+ rounded: x = !0,
20
32
  ...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
- )
33
+ }, T) => /* @__PURE__ */ a(i.Portal, { children: /* @__PURE__ */ a(i.Overlay, { "data-visible": h, className: r.underlay, children: /* @__PURE__ */ a(
34
+ i.Content,
35
+ {
36
+ style: {
37
+ "--dialog-max-width": t,
38
+ "--dialog-min-width": o,
39
+ "--dialog-min-height": e
40
+ },
41
+ ref: T,
42
+ className: r.content,
43
+ onFocus: S,
44
+ "data-dialog-rounded": x,
45
+ "data-dialog-spacing": l,
46
+ "data-test-id": C,
47
+ "data-dialog-vertical-align": N,
48
+ ...R,
49
+ children: v
50
+ }
51
+ ) }) });
52
+ g.displayName = "Dialog.Content";
53
+ const c = ({ children: t, showCloseButton: o = !0, "data-test-id": e = "fondue-dialog-header" }, l) => /* @__PURE__ */ b("div", { "data-test-id": e, ref: l, className: r.header, "data-dialog-layout-component": !0, children: [
54
+ /* @__PURE__ */ a("div", { children: t }),
55
+ o && /* @__PURE__ */ a(i.Close, { role: "button", "data-test-id": `${e}-close`, className: "tw-cursor-pointer", children: /* @__PURE__ */ a(w, { size: 20 }) })
41
56
  ] });
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 });
57
+ c.displayName = "Dialog.Header";
58
+ const u = ({ children: t, "data-test-id": o = "fondue-dialog-footer" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: r.footer, "data-dialog-layout-component": !0, children: t });
49
59
  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 });
60
+ const m = ({ children: t, "data-test-id": o = "fondue-dialog-body" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: r.body, "data-dialog-layout-component": !0, children: t });
61
+ m.displayName = "Dialog.Body";
62
+ const p = ({ children: t, "data-test-id": o = "fondue-dialog-side-content" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: r.sideContent, "data-dialog-layout-component": !0, children: t });
63
+ p.displayName = "Dialog.SideContent";
64
+ const D = ({ children: t }) => /* @__PURE__ */ a(i.Close, { asChild: !0, children: t });
65
+ D.displayName = "Dialog.Close";
66
+ const y = ({ children: t, asChild: o }) => /* @__PURE__ */ a(i.Title, { asChild: o, children: t });
67
+ y.displayName = "Dialog.Title";
68
+ const f = ({ children: t, asChild: o }) => /* @__PURE__ */ a(i.Description, { asChild: o, children: t });
59
69
  f.displayName = "Dialog.Description";
60
- const j = {
61
- Root: n,
62
- Title: N,
70
+ const M = {
71
+ Root: s,
72
+ Title: y,
63
73
  Description: f,
64
- Close: y,
65
- Trigger: d(g),
66
- Content: d(c),
67
- Header: d(m),
74
+ Close: D,
75
+ Trigger: d(n),
76
+ Content: d(g),
77
+ Header: d(c),
68
78
  Footer: d(u),
69
- Body: d(p),
70
- SideContent: d(D)
79
+ Body: d(m),
80
+ SideContent: d(p)
71
81
  };
72
82
  export {
73
- j as Dialog,
74
- p as DialogBody,
75
- y as DialogClose,
76
- c as DialogContent,
83
+ M as Dialog,
84
+ m as DialogBody,
85
+ D as DialogClose,
86
+ g as DialogContent,
77
87
  f as DialogDescription,
78
88
  u as DialogFooter,
79
- m as DialogHeader,
80
- n as DialogRoot,
81
- D as DialogSideContent,
82
- N as DialogTitle,
83
- g as DialogTrigger
89
+ c as DialogHeader,
90
+ s as DialogRoot,
91
+ p as DialogSideContent,
92
+ y as DialogTitle,
93
+ n as DialogTrigger
84
94
  };
85
95
  //# sourceMappingURL=fondue-components7.js.map
@@ -1 +1 @@
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","DialogSideContent","DialogClose","DialogTitle","asChild","DialogDescription","Dialog","forwardRef"],"mappings":";;;;;AAyFO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAC9BC,EAAY,MAAZ,EAAkB,GAAGD,GAAQ,UAAAD,EAAS,CAAA;AAElDD,EAAW,cAAc;AAEZ,MAAAI,IAAgB,CACzB,EAAE,UAAAH,GAAU,gBAAgBI,IAAa,2BACzCC,MAGI,gBAAAC,EAACJ,EAAY,SAAZ,EAAoB,gBAAcE,GAAY,SAAO,IAAC,KAAAC,GAClD,UAAAL,EACL,CAAA;AAGRG,EAAc,cAAc;AAErB,MAAMI,IAAgB,CACzB;AAAA,EACI,UAAAC,IAAW;AAAA,EACX,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,SAAAC,IAAU;AAAA,EACV,eAAAC,IAAgB;AAAA,EAChB,gBAAgBR,IAAa;AAAA,EAC7B,cAAAS,IAAe;AAAA,EACf,UAAAb;AAAA,EACA,SAAAc,IAAU;AAAA,EACV,GAAGb;AACP,GACAI,MAGI,gBAAAU,EAACb,EAAY,QAAZ,EACG,UAAA;AAAA,EAAA,gBAAAI,EAACJ,EAAY,SAAZ,EAAoB,gBAAcW,GAAc,WAAWG,EAAO,UAAU;AAAA,EAC7E,gBAAAV;AAAA,IAACJ,EAAY;AAAA,IAAZ;AAAA,MACG,OACI;AAAA,QACI,sBAAsBM;AAAA,QACtB,sBAAsBC;AAAA,QACtB,uBAAuBC;AAAA,MAC3B;AAAA,MAEJ,KAAAL;AAAA,MACA,WAAWW,EAAO;AAAA,MAClB,uBAAqBF;AAAA,MACrB,uBAAqBH;AAAA,MACrB,gBAAcP;AAAA,MACd,8BAA4BQ;AAAA,MAC3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AAA;AAEhDuB,EAAY,cAAc;AAEnB,MAAMC,IAAc,CAAC,EAAE,UAAAxB,GAAU,SAAAyB,QAC5B,gBAAAnB,EAAAJ,EAAY,OAAZ,EAAkB,SAAAuB,GAAmB,UAAAzB,EAAS,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
+ {"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 { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\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?: 'none' | 'tight' | '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\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild\n ref={ref}\n >\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 onFocus={addShowFocusRing}\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.Overlay>\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","addAutoFocusAttribute","DialogContent","maxWidth","minWidth","minHeight","padding","verticalAlign","showUnderlay","rounded","styles","addShowFocusRing","DialogHeader","showCloseButton","jsxs","IconCross","DialogFooter","DialogBody","DialogSideContent","DialogClose","DialogTitle","asChild","DialogDescription","Dialog","forwardRef"],"mappings":";;;;;;AA2FO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAC9BC,EAAY,MAAZ,EAAkB,GAAGD,G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AAC,EAAE,UAAA5B,GAAU,SAAA2B,QAClC,gBAAArB,EAAAJ,EAAY,aAAZ,EAAwB,SAAAyB,GAAmB,UAAA3B,EAAS,CAAA;AAEhE4B,EAAkB,cAAc;AAEzB,MAAMC,IAAS;AAAA,EAClB,MAAM9B;AAAA,EACN,OAAO2B;AAAA,EACP,aAAaE;AAAA,EACb,OAAOH;AAAA,EACP,SAASK,EAAkD3B,CAAa;AAAA,EACxE,SAAS2B,EAA+CtB,CAAa;AAAA,EACrE,QAAQsB,EAA8CZ,CAAY;AAAA,EAClE,QAAQY,EAA8CR,CAAY;AAAA,EAClE,MAAMQ,EAA4CP,CAAU;AAAA,EAC5D,aAAaO,EAAmDN,CAAiB;AACrF;"}
@@ -1,8 +1,8 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import * as s from "@radix-ui/react-separator";
3
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";
4
+ import { cn as f } from "./fondue-components25.js";
5
+ import { dividerStyles as n } from "./fondue-components37.js";
6
6
  const r = ({
7
7
  "data-test-id": o = "fondue-divider",
8
8
  direction: t = "horizontal",
@@ -2,9 +2,9 @@ import { jsx as e, jsxs as T } from "react/jsx-runtime";
2
2
  import { IconCaretRight as F } from "@frontify/fondue-icons";
3
3
  import * as d from "@radix-ui/react-dropdown-menu";
4
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";
5
+ import { usePreventDropdownOverflow as I } from "./fondue-components38.js";
6
+ import { syncRefs as l } from "./fondue-components35.js";
7
+ import a from "./fondue-components39.js";
8
8
  const m = ({
9
9
  children: o,
10
10
  open: t,
package/dist/index.d.ts CHANGED
@@ -330,7 +330,7 @@ declare type DialogContentProps = {
330
330
  * Define the padding of the dialog
331
331
  * @default "compact"
332
332
  */
333
- padding?: 'compact' | 'comfortable' | 'spacious';
333
+ padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';
334
334
  /**
335
335
  * The vertical alignment of the divider
336
336
  * @default "center"
@@ -615,7 +615,7 @@ declare type FlyoutContentProps = {
615
615
  * Define the padding of the flyout
616
616
  * @default "compact"
617
617
  */
618
- padding?: 'tight' | 'compact' | 'comfortable' | 'spacious';
618
+ padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';
619
619
  /**
620
620
  * Define the maximum width of the flyout
621
621
  * @default "360px"
@@ -929,6 +929,31 @@ declare const screens: {
929
929
  '2xl': string;
930
930
  };
931
931
 
932
+ export declare const ScrollArea: ForwardRefExoticComponent<ScrollAreaProps & RefAttributes<HTMLDivElement>>;
933
+
934
+ declare type ScrollAreaProps = {
935
+ /**
936
+ * "auto" visible when content is overflowing on the corresponding orientation.
937
+ * "always" always visible regardless of whether the content is overflowing.
938
+ * "scroll" visible when the user is scrolling along its corresponding orientation.
939
+ * "hover" when the user is hovering over the scroll area.
940
+ * @default 'hover'
941
+ */
942
+ type?: 'auto' | 'always' | 'scroll' | 'hover';
943
+ /**
944
+ * Maximum height of the scroll area
945
+ * @default '100%'
946
+ */
947
+ maxHeight?: string | number;
948
+ /**
949
+ * Minimum width of the scroll area
950
+ * @default '100%'
951
+ */
952
+ maxWidth?: string | number;
953
+ 'data-test-id'?: string;
954
+ children: ReactNode;
955
+ };
956
+
932
957
  export declare const Section: {
933
958
  ({ "data-test-id": dataTestId, children, ...props }: SectionProps): JSX_2.Element;
934
959
  displayName: string;
@@ -1339,4 +1364,3 @@ declare module 'vitest' {
1339
1364
  interface Assertion<T = any> extends jest.Matchers<void, T>, TestingLibraryMatchers<T, void> {
1340
1365
  }
1341
1366
  }
1342
-