@frontify/fondue-components 19.1.0 → 19.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 (98) hide show
  1. package/dist/fondue-components10.js +23 -19
  2. package/dist/fondue-components10.js.map +1 -1
  3. package/dist/fondue-components11.js +2 -2
  4. package/dist/fondue-components12.js +1 -1
  5. package/dist/fondue-components13.js +34 -24
  6. package/dist/fondue-components13.js.map +1 -1
  7. package/dist/fondue-components14.js +1 -1
  8. package/dist/fondue-components15.js +1 -1
  9. package/dist/fondue-components17.js +1 -1
  10. package/dist/fondue-components18.js +1 -1
  11. package/dist/fondue-components19.js +1 -1
  12. package/dist/fondue-components20.js +1 -1
  13. package/dist/fondue-components21.js +2 -2
  14. package/dist/fondue-components22.js +6 -6
  15. package/dist/fondue-components23.js +1 -1
  16. package/dist/fondue-components24.js +1 -1
  17. package/dist/fondue-components25.js +3 -3
  18. package/dist/fondue-components26.js +3 -3
  19. package/dist/fondue-components27.js +1 -1
  20. package/dist/fondue-components28.js +31 -29
  21. package/dist/fondue-components28.js.map +1 -1
  22. package/dist/fondue-components29.js +1 -1
  23. package/dist/fondue-components30.js +1 -1
  24. package/dist/fondue-components37.js +1 -1
  25. package/dist/fondue-components40.js +1 -1
  26. package/dist/fondue-components42.js +1 -1
  27. package/dist/fondue-components49.js +5 -60
  28. package/dist/fondue-components49.js.map +1 -1
  29. package/dist/fondue-components50.js +59 -17
  30. package/dist/fondue-components50.js.map +1 -1
  31. package/dist/fondue-components51.js +18 -19
  32. package/dist/fondue-components51.js.map +1 -1
  33. package/dist/fondue-components52.js +18 -4
  34. package/dist/fondue-components52.js.map +1 -1
  35. package/dist/fondue-components53.js +3 -13
  36. package/dist/fondue-components53.js.map +1 -1
  37. package/dist/fondue-components54.js +13 -3
  38. package/dist/fondue-components54.js.map +1 -1
  39. package/dist/fondue-components55.js +3 -17
  40. package/dist/fondue-components55.js.map +1 -1
  41. package/dist/fondue-components56.js +19 -35
  42. package/dist/fondue-components56.js.map +1 -1
  43. package/dist/fondue-components57.js +35 -5
  44. package/dist/fondue-components57.js.map +1 -1
  45. package/dist/fondue-components58.js +4 -12
  46. package/dist/fondue-components58.js.map +1 -1
  47. package/dist/fondue-components59.js +12 -4
  48. package/dist/fondue-components59.js.map +1 -1
  49. package/dist/fondue-components60.js +4 -24
  50. package/dist/fondue-components60.js.map +1 -1
  51. package/dist/fondue-components61.js +24 -16
  52. package/dist/fondue-components61.js.map +1 -1
  53. package/dist/fondue-components62.js +16 -146
  54. package/dist/fondue-components62.js.map +1 -1
  55. package/dist/fondue-components63.js +151 -19
  56. package/dist/fondue-components63.js.map +1 -1
  57. package/dist/fondue-components64.js +19 -77
  58. package/dist/fondue-components64.js.map +1 -1
  59. package/dist/fondue-components65.js +77 -8
  60. package/dist/fondue-components65.js.map +1 -1
  61. package/dist/fondue-components66.js +8 -35
  62. package/dist/fondue-components66.js.map +1 -1
  63. package/dist/fondue-components67.js +34 -48
  64. package/dist/fondue-components67.js.map +1 -1
  65. package/dist/fondue-components68.js +70 -10
  66. package/dist/fondue-components68.js.map +1 -1
  67. package/dist/fondue-components69.js +8 -10
  68. package/dist/fondue-components69.js.map +1 -1
  69. package/dist/fondue-components70.js +12 -12
  70. package/dist/fondue-components70.js.map +1 -1
  71. package/dist/fondue-components71.js +12 -20
  72. package/dist/fondue-components71.js.map +1 -1
  73. package/dist/fondue-components72.js +21 -29
  74. package/dist/fondue-components72.js.map +1 -1
  75. package/dist/fondue-components73.js +28 -55
  76. package/dist/fondue-components73.js.map +1 -1
  77. package/dist/fondue-components74.js +55 -14
  78. package/dist/fondue-components74.js.map +1 -1
  79. package/dist/fondue-components75.js +14 -25
  80. package/dist/fondue-components75.js.map +1 -1
  81. package/dist/fondue-components76.js +24 -13
  82. package/dist/fondue-components76.js.map +1 -1
  83. package/dist/fondue-components77.js +14 -6
  84. package/dist/fondue-components77.js.map +1 -1
  85. package/dist/fondue-components78.js +6 -6
  86. package/dist/fondue-components79.js +7 -2
  87. package/dist/fondue-components79.js.map +1 -1
  88. package/dist/fondue-components82.js +2 -17
  89. package/dist/fondue-components82.js.map +1 -1
  90. package/dist/fondue-components83.js +16 -39
  91. package/dist/fondue-components83.js.map +1 -1
  92. package/dist/fondue-components84.js +43 -0
  93. package/dist/fondue-components84.js.map +1 -0
  94. package/dist/fondue-components9.js +77 -66
  95. package/dist/fondue-components9.js.map +1 -1
  96. package/dist/index.d.ts +16 -1
  97. package/dist/style.css +1 -1
  98. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import { jsx as e, jsxs as P } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as P } from "react/jsx-runtime";
2
2
  import { IconCross as j } from "@frontify/fondue-icons";
3
3
  import * as d from "@radix-ui/react-dialog";
4
4
  import { createContext as q, forwardRef as l, useRef as B, useContext as z } from "react";
@@ -6,9 +6,9 @@ import { useSyncRefs as E } from "./fondue-components46.js";
6
6
  import { addShowFocusRing as L, addAutoFocusAttribute as $ } from "./fondue-components47.js";
7
7
  import { useFondueTheme as k, ThemeProvider as G } from "./fondue-components29.js";
8
8
  import n from "./fondue-components48.js";
9
- const p = q({ isModal: !1 }), f = ({ children: t, ...o }) => /* @__PURE__ */ e(p.Provider, { value: { isModal: o.modal ?? !1 }, children: /* @__PURE__ */ e(d.Root, { ...o, children: t }) });
10
- f.displayName = "Dialog.Root";
11
- const y = ({ asChild: t = !0, children: o, "data-test-id": a = "fondue-dialog-trigger", ...i }, r) => /* @__PURE__ */ e(
9
+ const f = q({ isModal: !1 }), y = ({ children: t, ...e }) => /* @__PURE__ */ o(f.Provider, { value: { isModal: e.modal ?? !1 }, children: /* @__PURE__ */ o(d.Root, { ...e, children: t }) });
10
+ y.displayName = "Dialog.Root";
11
+ const D = ({ asChild: t = !0, children: e, "data-test-id": a = "fondue-dialog-trigger", ...i }, r) => /* @__PURE__ */ o(
12
12
  d.Trigger,
13
13
  {
14
14
  onMouseDown: $,
@@ -18,44 +18,44 @@ const y = ({ asChild: t = !0, children: o, "data-test-id": a = "fondue-dialog-tr
18
18
  asChild: t,
19
19
  ref: r,
20
20
  ...i,
21
- children: o
21
+ children: e
22
22
  }
23
23
  );
24
- y.displayName = "Dialog.Trigger";
25
- const I = ({ children: t, showUnderlay: o }) => {
26
- const { isModal: a } = z(p);
27
- return a ? /* @__PURE__ */ e(d.Overlay, { "data-visible": o, className: n.underlay, children: t }) : /* @__PURE__ */ e("div", { className: n.underlay, "data-visible": o, children: t });
28
- }, D = ({
24
+ D.displayName = "Dialog.Trigger";
25
+ const I = ({ children: t, showUnderlay: e }) => {
26
+ const { isModal: a } = z(f);
27
+ return a ? /* @__PURE__ */ o(d.Overlay, { "data-visible": e, className: n.underlay, children: t }) : /* @__PURE__ */ o("div", { className: n.underlay, "data-visible": e, children: t });
28
+ }, h = ({
29
29
  maxWidth: t = "800px",
30
- minWidth: o = "400px",
30
+ minWidth: e = "400px",
31
31
  minHeight: a = "200px",
32
32
  padding: i = "compact",
33
33
  verticalAlign: r = "center",
34
34
  "data-test-id": s = "fondue-dialog-content",
35
- showUnderlay: R = !1,
35
+ showUnderlay: c = !1,
36
36
  rounded: T = !0,
37
37
  children: w,
38
38
  ...S
39
39
  }, M) => {
40
- const A = k(), c = B(null);
41
- E(c, M);
40
+ const A = k(), u = B(null);
41
+ E(u, M);
42
42
  const H = (O) => {
43
- var m;
43
+ var p;
44
44
  O.preventDefault();
45
- const u = (m = c.current) == null ? void 0 : m.querySelector('[data-dialog-layout-component="body"]'), g = u == null ? void 0 : u.querySelector(
45
+ const g = (p = u.current) == null ? void 0 : p.querySelector('[data-dialog-layout-component="body"]'), m = g == null ? void 0 : g.querySelector(
46
46
  'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
47
47
  );
48
- g instanceof HTMLElement && g.focus();
48
+ m instanceof HTMLElement && m.focus();
49
49
  };
50
- return /* @__PURE__ */ e(d.Portal, { children: /* @__PURE__ */ e(G, { theme: A, children: /* @__PURE__ */ e(I, { showUnderlay: R, children: /* @__PURE__ */ e(
50
+ return /* @__PURE__ */ o(d.Portal, { children: /* @__PURE__ */ o(G, { theme: A, children: /* @__PURE__ */ o(I, { showUnderlay: c, children: /* @__PURE__ */ o(
51
51
  d.Content,
52
52
  {
53
53
  style: {
54
54
  "--dialog-max-width": t,
55
- "--dialog-min-width": o,
55
+ "--dialog-min-width": e,
56
56
  "--dialog-min-height": a
57
57
  },
58
- ref: c,
58
+ ref: u,
59
59
  className: n.content,
60
60
  onFocus: L,
61
61
  onOpenAutoFocus: H,
@@ -68,43 +68,54 @@ const I = ({ children: t, showUnderlay: o }) => {
68
68
  }
69
69
  ) }) }) });
70
70
  };
71
- D.displayName = "Dialog.Content";
72
- const h = ({
71
+ h.displayName = "Dialog.Content";
72
+ const C = ({
73
73
  padding: t,
74
- showBorder: o = !0,
74
+ showBorder: e = !0,
75
75
  showCloseButton: a = !0,
76
- children: i,
77
- "data-test-id": r = "fondue-dialog-header"
78
- }, s) => /* @__PURE__ */ P(
76
+ closeProps: i,
77
+ children: r,
78
+ "data-test-id": s = "fondue-dialog-header"
79
+ }, c) => /* @__PURE__ */ P(
79
80
  "div",
80
81
  {
81
- "data-test-id": r,
82
- ref: s,
82
+ "data-test-id": s,
83
+ ref: c,
83
84
  className: n.header,
84
85
  "data-dialog-header-padding": t,
85
- "data-show-border": o,
86
+ "data-show-border": e,
86
87
  "data-dialog-layout-component": "header",
87
88
  children: [
88
- /* @__PURE__ */ e("div", { children: i }),
89
- a && /* @__PURE__ */ e(d.Close, { role: "button", "data-test-id": `${r}-close`, className: "tw-cursor-pointer", children: /* @__PURE__ */ e(j, { size: 20 }) })
89
+ /* @__PURE__ */ o("div", { children: r }),
90
+ a && /* @__PURE__ */ o(
91
+ d.Close,
92
+ {
93
+ role: "button",
94
+ "data-test-id": `${s}-close`,
95
+ className: "tw-cursor-pointer",
96
+ "aria-label": "Close",
97
+ ...i,
98
+ children: /* @__PURE__ */ o(j, { size: 20 })
99
+ }
100
+ )
90
101
  ]
91
102
  }
92
103
  );
93
- h.displayName = "Dialog.Header";
94
- const C = ({ padding: t, showBorder: o = !0, children: a, "data-test-id": i = "fondue-dialog-footer" }, r) => /* @__PURE__ */ e(
104
+ C.displayName = "Dialog.Header";
105
+ const N = ({ padding: t, showBorder: e = !0, children: a, "data-test-id": i = "fondue-dialog-footer" }, r) => /* @__PURE__ */ o(
95
106
  "div",
96
107
  {
97
108
  "data-test-id": i,
98
109
  ref: r,
99
110
  className: n.footer,
100
111
  "data-dialog-footer-padding": t,
101
- "data-show-border": o,
112
+ "data-show-border": e,
102
113
  "data-dialog-layout-component": "footer",
103
114
  children: a
104
115
  }
105
116
  );
106
- C.displayName = "Dialog.Footer";
107
- const N = ({ padding: t, children: o, "data-test-id": a = "fondue-dialog-body" }, i) => /* @__PURE__ */ e(
117
+ N.displayName = "Dialog.Footer";
118
+ const b = ({ padding: t, children: e, "data-test-id": a = "fondue-dialog-body" }, i) => /* @__PURE__ */ o(
108
119
  "div",
109
120
  {
110
121
  "data-test-id": a,
@@ -112,41 +123,41 @@ const N = ({ padding: t, children: o, "data-test-id": a = "fondue-dialog-body" }
112
123
  className: n.body,
113
124
  "data-dialog-body-padding": t,
114
125
  "data-dialog-layout-component": "body",
115
- children: o
126
+ children: e
116
127
  }
117
128
  );
118
- N.displayName = "Dialog.Body";
119
- const b = ({ children: t, "data-test-id": o = "fondue-dialog-side-content" }, a) => /* @__PURE__ */ e("div", { "data-test-id": o, ref: a, className: n.sideContent, "data-dialog-layout-component": !0, children: t });
120
- b.displayName = "Dialog.SideContent";
121
- const v = ({ children: t }) => /* @__PURE__ */ e(d.Close, { asChild: !0, children: t });
122
- v.displayName = "Dialog.Close";
123
- const x = ({ children: t, asChild: o }) => /* @__PURE__ */ e(d.Title, { asChild: o, children: t });
124
- x.displayName = "Dialog.Title";
125
- const F = ({ children: t, asChild: o }) => /* @__PURE__ */ e(d.Description, { asChild: o, children: t });
126
- F.displayName = "Dialog.Description";
129
+ b.displayName = "Dialog.Body";
130
+ const v = ({ children: t, "data-test-id": e = "fondue-dialog-side-content" }, a) => /* @__PURE__ */ o("div", { "data-test-id": e, ref: a, className: n.sideContent, "data-dialog-layout-component": !0, children: t });
131
+ v.displayName = "Dialog.SideContent";
132
+ const x = ({ children: t }) => /* @__PURE__ */ o(d.Close, { asChild: !0, children: t });
133
+ x.displayName = "Dialog.Close";
134
+ const F = ({ children: t, asChild: e }) => /* @__PURE__ */ o(d.Title, { asChild: e, children: t });
135
+ F.displayName = "Dialog.Title";
136
+ const R = ({ children: t, asChild: e }) => /* @__PURE__ */ o(d.Description, { asChild: e, children: t });
137
+ R.displayName = "Dialog.Description";
127
138
  const Y = {
128
- Root: f,
129
- Title: x,
130
- Description: F,
131
- Close: v,
132
- Trigger: l(y),
133
- Content: l(D),
134
- Header: l(h),
135
- Footer: l(C),
136
- Body: l(N),
137
- SideContent: l(b)
139
+ Root: y,
140
+ Title: F,
141
+ Description: R,
142
+ Close: x,
143
+ Trigger: l(D),
144
+ Content: l(h),
145
+ Header: l(C),
146
+ Footer: l(N),
147
+ Body: l(b),
148
+ SideContent: l(v)
138
149
  };
139
150
  export {
140
151
  Y as Dialog,
141
- N as DialogBody,
142
- v as DialogClose,
143
- D as DialogContent,
144
- F as DialogDescription,
145
- C as DialogFooter,
146
- h as DialogHeader,
147
- f as DialogRoot,
148
- b as DialogSideContent,
149
- x as DialogTitle,
150
- y as DialogTrigger
152
+ b as DialogBody,
153
+ x as DialogClose,
154
+ h as DialogContent,
155
+ R as DialogDescription,
156
+ N as DialogFooter,
157
+ C as DialogHeader,
158
+ y as DialogRoot,
159
+ v as DialogSideContent,
160
+ F as DialogTitle,
161
+ D as DialogTrigger
151
162
  };
152
163
  //# sourceMappingURL=fondue-components9.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components9.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 {\n createContext,\n forwardRef,\n useContext,\n useRef,\n type CSSProperties,\n type ForwardedRef,\n type ReactNode,\n} from 'react';\n\nimport { useSyncRefs } from '#/hooks/useSyncRefs';\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\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 minimum 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 = {\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 type DialogHeaderProps = {\n /**\n * Define the padding for the dialog header\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Show a border at the bottom of the header\n * @default true\n */\n showBorder?: boolean;\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 = {\n /**\n * Define the padding for the dialog footer\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Show a border at the top of the footer\n * @default true\n */\n showBorder?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogBodyProps = {\n /**\n * Define the padding for the dialog body\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n children?: ReactNode;\n 'data-test-id'?: string;\n};\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\ntype DialogContextType = {\n isModal: boolean;\n};\n\nconst DialogContext = createContext<DialogContextType>({ isModal: false });\n\nexport const DialogRoot = ({ children, ...props }: DialogRootProps) => {\n return (\n <DialogContext.Provider value={{ isModal: props.modal ?? false }}>\n <RadixDialog.Root {...props}>{children}</RadixDialog.Root>\n </DialogContext.Provider>\n );\n};\nDialogRoot.displayName = 'Dialog.Root';\n\nexport const DialogTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-dialog-trigger', ...props }: 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={asChild}\n ref={ref}\n {...props}\n >\n {children}\n </RadixDialog.Trigger>\n );\n};\nDialogTrigger.displayName = 'Dialog.Trigger';\n\nconst DialogUnderlay = ({ children, showUnderlay }: { children: ReactNode; showUnderlay: boolean }) => {\n const { isModal } = useContext(DialogContext);\n if (isModal) {\n return (\n <RadixDialog.Overlay data-visible={showUnderlay} className={styles.underlay}>\n {children}\n </RadixDialog.Overlay>\n );\n }\n return (\n <div className={styles.underlay} data-visible={showUnderlay}>\n {children}\n </div>\n );\n};\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 rounded = true,\n children,\n ...props\n }: DialogContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n const contentRef = useRef<HTMLDivElement>(null);\n\n useSyncRefs<HTMLDivElement>(contentRef, ref);\n\n const handleOpenAutoFocus = (event: Event) => {\n event.preventDefault();\n\n const dialogBody = contentRef.current?.querySelector('[data-dialog-layout-component=\"body\"]');\n\n const firstFocusable = dialogBody?.querySelector(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n );\n\n if (firstFocusable instanceof HTMLElement) {\n firstFocusable.focus();\n }\n };\n\n return (\n <RadixDialog.Portal>\n <ThemeProvider theme={theme}>\n <DialogUnderlay showUnderlay={showUnderlay}>\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={contentRef}\n className={styles.content}\n onFocus={addShowFocusRing}\n onOpenAutoFocus={handleOpenAutoFocus}\n data-dialog-padding={padding}\n data-dialog-rounded={rounded}\n data-test-id={dataTestId}\n data-dialog-vertical-align={verticalAlign}\n {...props}\n >\n {children}\n </RadixDialog.Content>\n </DialogUnderlay>\n </ThemeProvider>\n </RadixDialog.Portal>\n );\n};\nDialogContent.displayName = 'Dialog.Content';\n\nexport const DialogHeader = (\n {\n padding,\n showBorder = true,\n showCloseButton = true,\n children,\n 'data-test-id': dataTestId = 'fondue-dialog-header',\n }: DialogHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.header}\n data-dialog-header-padding={padding}\n data-show-border={showBorder}\n data-dialog-layout-component=\"header\"\n >\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 { padding, showBorder = true, children, 'data-test-id': dataTestId = 'fondue-dialog-footer' }: DialogFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.footer}\n data-dialog-footer-padding={padding}\n data-show-border={showBorder}\n data-dialog-layout-component=\"footer\"\n >\n {children}\n </div>\n );\n};\nDialogFooter.displayName = 'Dialog.Footer';\n\nexport const DialogBody = (\n { padding, children, 'data-test-id': dataTestId = 'fondue-dialog-body' }: DialogBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.body}\n data-dialog-body-padding={padding}\n data-dialog-layout-component=\"body\"\n >\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":["DialogContext","createContext","DialogRoot","children","props","RadixDialog","DialogTrigger","asChild","dataTestId","ref","jsx","addAutoFocusAttribute","DialogUnderlay","showUnderlay","isModal","useContext","styles","DialogContent","maxWidth","minWidth","minHeight","padding","verticalAlign","rounded","theme","useFondueTheme","contentRef","useRef","useSyncRefs","handleOpenAutoFocus","event","dialogBody","_a","firstFocusable","ThemeProvider","addShowFocusRing","DialogHeader","showBorder","showCloseButton","jsxs","IconCross","DialogFooter","DialogBody","DialogSideContent","DialogClose","DialogTitle","DialogDescription","Dialog","forwardRef"],"mappings":";;;;;;;;AA8IA,MAAMA,IAAgBC,EAAiC,EAAE,SAAS,IAAO,GAE5DC,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAEjCJ,EAAc,UAAd,EAAuB,OAAO,EAAE,SAASI,EAAM,SAAS,GAAM,GAC3D,4BAACC,EAAY,MAAZ,EAAkB,GAAGD,GAAQ,UAAAD,EAAS,CAAA,GAC3C;AAGRD,EAAW,cAAc;AAElB,MAAMI,IAAgB,CACzB,EAAE,SAAAC,IAAU,IAAM,UAAAJ,GAAU,gBAAgBK,IAAa,yBAAyB,GAAGJ,EAAM,GAC3FK,MAGI,gBAAAC;AAAA,EAACL,EAAY;AAAA,EAAZ;AAAA,IACG,aAAaM;AAAA,IACb,2BAAwB;AAAA,IACxB,2BAAuB;AAAA,IACvB,gBAAcH;AAAA,IACd,SAAAD;AAAA,IACA,KAAAE;AAAA,IACC,GAAGL;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["../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 {\n createContext,\n forwardRef,\n useContext,\n useRef,\n type CSSProperties,\n type ForwardedRef,\n type ReactNode,\n} from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { useSyncRefs } from '#/hooks/useSyncRefs';\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\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 minimum 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 = {\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 type DialogHeaderProps = {\n /**\n * Define the padding for the dialog header\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Show a border at the bottom of the header\n * @default true\n */\n showBorder?: boolean;\n /**\n * Show a close button in the header\n * @default true\n */\n showCloseButton?: boolean;\n closeProps?: CommonAriaProps;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogFooterProps = {\n /**\n * Define the padding for the dialog footer\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Show a border at the top of the footer\n * @default true\n */\n showBorder?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogBodyProps = {\n /**\n * Define the padding for the dialog body\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n children?: ReactNode;\n 'data-test-id'?: string;\n};\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\ntype DialogContextType = {\n isModal: boolean;\n};\n\nconst DialogContext = createContext<DialogContextType>({ isModal: false });\n\nexport const DialogRoot = ({ children, ...props }: DialogRootProps) => {\n return (\n <DialogContext.Provider value={{ isModal: props.modal ?? false }}>\n <RadixDialog.Root {...props}>{children}</RadixDialog.Root>\n </DialogContext.Provider>\n );\n};\nDialogRoot.displayName = 'Dialog.Root';\n\nexport const DialogTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-dialog-trigger', ...props }: 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={asChild}\n ref={ref}\n {...props}\n >\n {children}\n </RadixDialog.Trigger>\n );\n};\nDialogTrigger.displayName = 'Dialog.Trigger';\n\nconst DialogUnderlay = ({ children, showUnderlay }: { children: ReactNode; showUnderlay: boolean }) => {\n const { isModal } = useContext(DialogContext);\n if (isModal) {\n return (\n <RadixDialog.Overlay data-visible={showUnderlay} className={styles.underlay}>\n {children}\n </RadixDialog.Overlay>\n );\n }\n return (\n <div className={styles.underlay} data-visible={showUnderlay}>\n {children}\n </div>\n );\n};\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 rounded = true,\n children,\n ...props\n }: DialogContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n const contentRef = useRef<HTMLDivElement>(null);\n\n useSyncRefs<HTMLDivElement>(contentRef, ref);\n\n const handleOpenAutoFocus = (event: Event) => {\n event.preventDefault();\n\n const dialogBody = contentRef.current?.querySelector('[data-dialog-layout-component=\"body\"]');\n\n const firstFocusable = dialogBody?.querySelector(\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n );\n\n if (firstFocusable instanceof HTMLElement) {\n firstFocusable.focus();\n }\n };\n\n return (\n <RadixDialog.Portal>\n <ThemeProvider theme={theme}>\n <DialogUnderlay showUnderlay={showUnderlay}>\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={contentRef}\n className={styles.content}\n onFocus={addShowFocusRing}\n onOpenAutoFocus={handleOpenAutoFocus}\n data-dialog-padding={padding}\n data-dialog-rounded={rounded}\n data-test-id={dataTestId}\n data-dialog-vertical-align={verticalAlign}\n {...props}\n >\n {children}\n </RadixDialog.Content>\n </DialogUnderlay>\n </ThemeProvider>\n </RadixDialog.Portal>\n );\n};\nDialogContent.displayName = 'Dialog.Content';\n\nexport const DialogHeader = (\n {\n padding,\n showBorder = true,\n showCloseButton = true,\n closeProps,\n children,\n 'data-test-id': dataTestId = 'fondue-dialog-header',\n }: DialogHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.header}\n data-dialog-header-padding={padding}\n data-show-border={showBorder}\n data-dialog-layout-component=\"header\"\n >\n <div>{children}</div>\n {showCloseButton && (\n <RadixDialog.Close\n role=\"button\"\n data-test-id={`${dataTestId}-close`}\n className=\"tw-cursor-pointer\"\n aria-label=\"Close\"\n {...closeProps}\n >\n <IconCross size={20} />\n </RadixDialog.Close>\n )}\n </div>\n );\n};\nDialogHeader.displayName = 'Dialog.Header';\n\nexport const DialogFooter = (\n { padding, showBorder = true, children, 'data-test-id': dataTestId = 'fondue-dialog-footer' }: DialogFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.footer}\n data-dialog-footer-padding={padding}\n data-show-border={showBorder}\n data-dialog-layout-component=\"footer\"\n >\n {children}\n </div>\n );\n};\nDialogFooter.displayName = 'Dialog.Footer';\n\nexport const DialogBody = (\n { padding, children, 'data-test-id': dataTestId = 'fondue-dialog-body' }: DialogBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.body}\n data-dialog-body-padding={padding}\n data-dialog-layout-component=\"body\"\n >\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":["DialogContext","createContext","DialogRoot","children","props","RadixDialog","DialogTrigger","asChild","dataTestId","ref","jsx","addAutoFocusAttribute","DialogUnderlay","showUnderlay","isModal","useContext","styles","DialogContent","maxWidth","minWidth","minHeight","padding","verticalAlign","rounded","theme","useFondueTheme","contentRef","useRef","useSyncRefs","handleOpenAutoFocus","event","dialogBody","_a","firstFocusable","ThemeProvider","addShowFocusRing","DialogHeader","showBorder","showCloseButton","closeProps","jsxs","IconCross","DialogFooter","DialogBody","DialogSideContent","DialogClose","DialogTitle","DialogDescription","Dialog","forwardRef"],"mappings":";;;;;;;;AAgJA,MAAMA,IAAgBC,EAAiC,EAAE,SAAS,IAAO,GAE5DC,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAEjCJ,EAAc,UAAd,EAAuB,OAAO,EAAE,SAASI,EAAM,SAAS,GAAM,GAC3D,4BAACC,EAAY,MAAZ,EAAkB,GAAGD,GAAQ,UAAAD,EAAS,CAAA,GAC3C;AAGRD,EAAW,cAAc;AAElB,MAAMI,IAAgB,CACzB,EAAE,SAAAC,IAAU,IAAM,UAAAJ,GAAU,gBAAgBK,IAAa,yBA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A,EAClB,MAAM9C;AAAA,EACN,OAAO4C;AAAA,EACP,aAAaC;AAAA,EACb,OAAOF;AAAA,EACP,SAASI,EAAkD3C,CAAa;AAAA,EACxE,SAAS2C,EAA+ChC,CAAa;AAAA,EACrE,QAAQgC,EAA8Cb,CAAY;AAAA,EAClE,QAAQa,EAA8CP,CAAY;AAAA,EAClE,MAAMO,EAA4CN,CAAU;AAAA,EAC5D,aAAaM,EAAmDL,CAAiB;AACrF;"}
package/dist/index.d.ts CHANGED
@@ -134,6 +134,14 @@ declare type AccordionTriggerProps = {
134
134
 
135
135
  declare type AriaLabelAttrs = Pick<AriaAttributes, 'aria-label'> & Pick<AriaAttributes, 'aria-labelledby'>;
136
136
 
137
+ declare type AsyncItem = {
138
+ label: string;
139
+ value: string;
140
+ content?: ReactNode;
141
+ };
142
+
143
+ declare type AsyncItemsFetcher = (filterText: string) => Promise<AsyncItem[]>;
144
+
137
145
  declare type AtLeastOneAriaLabelAttr = AtLeastOneAttr<AriaLabelAttrs>;
138
146
 
139
147
  declare type AtLeastOneAttr<T> = Partial<T> & {
@@ -572,6 +580,7 @@ declare type DialogHeaderProps = {
572
580
  * @default true
573
581
  */
574
582
  showCloseButton?: boolean;
583
+ closeProps?: CommonAriaProps;
575
584
  children?: ReactNode;
576
585
  'data-test-id'?: string;
577
586
  };
@@ -917,6 +926,7 @@ declare type FlyoutHeaderProps = {
917
926
  showCloseButton?: boolean;
918
927
  children?: ReactNode;
919
928
  'data-test-id'?: string;
929
+ closeProps?: CommonAriaProps;
920
930
  };
921
931
 
922
932
  declare type FlyoutRootProps = {
@@ -1003,6 +1013,10 @@ id?: string;
1003
1013
  * @default 'compact'
1004
1014
  */
1005
1015
  viewportCollisionPadding?: SelectMenuViewportCollisionPadding;
1016
+ /**
1017
+ * Function to fetch items asynchronously.
1018
+ */
1019
+ getAsyncItems?: AsyncItemsFetcher;
1006
1020
  } & CommonAriaProps & RefAttributes<HTMLDivElement>>;
1007
1021
 
1008
1022
  declare const ForwardedRefSelectItem: ForwardRefExoticComponent<SelectItemProps & RefAttributes<HTMLLIElement>>;
@@ -1886,7 +1900,7 @@ declare type TextElementMap = {
1886
1900
  declare type TextElementType<TTag extends TagType_2> = TextElementMap[TTag];
1887
1901
 
1888
1902
  declare const TextFieldRoot: {
1889
- ({ children, className, status, "data-test-id": dataTestId, ...inputProps }: TextInputProps, ref: ForwardedRef<HTMLInputElement>): JSX_2.Element;
1903
+ ({ children, className, status, "data-test-id": dataTestId, "aria-errormessage": ariaErrormessage, ...inputProps }: TextInputProps, ref: ForwardedRef<HTMLInputElement>): JSX_2.Element;
1890
1904
  displayName: string;
1891
1905
  };
1892
1906
 
@@ -1989,6 +2003,7 @@ declare type TextInputProps = {
1989
2003
  'aria-label'?: string;
1990
2004
  'aria-labelledby'?: string;
1991
2005
  'aria-describedby'?: string;
2006
+ 'aria-errormessage'?: string;
1992
2007
  };
1993
2008
 
1994
2009
  declare type TextProps<TTag extends TagType_2 = 'span'> = CommonAriaProps & TagProps<TTag> & {