@frontify/fondue-components 13.0.0 → 13.0.2

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 (75) hide show
  1. package/dist/fondue-components10.js +1 -1
  2. package/dist/fondue-components11.js +2 -2
  3. package/dist/fondue-components12.js +1 -1
  4. package/dist/fondue-components13.js +1 -1
  5. package/dist/fondue-components15.js +1 -1
  6. package/dist/fondue-components16.js +1 -1
  7. package/dist/fondue-components17.js +26 -24
  8. package/dist/fondue-components17.js.map +1 -1
  9. package/dist/fondue-components18.js +1 -1
  10. package/dist/fondue-components19.js +2 -2
  11. package/dist/fondue-components20.js +6 -6
  12. package/dist/fondue-components21.js +1 -1
  13. package/dist/fondue-components22.js +1 -1
  14. package/dist/fondue-components23.js +1 -1
  15. package/dist/fondue-components24.js +1 -1
  16. package/dist/fondue-components32.js +1 -1
  17. package/dist/fondue-components32.js.map +1 -1
  18. package/dist/fondue-components41.js +8 -13
  19. package/dist/fondue-components41.js.map +1 -1
  20. package/dist/fondue-components42.js +13 -15
  21. package/dist/fondue-components42.js.map +1 -1
  22. package/dist/fondue-components43.js +15 -60
  23. package/dist/fondue-components43.js.map +1 -1
  24. package/dist/fondue-components44.js +59 -17
  25. package/dist/fondue-components44.js.map +1 -1
  26. package/dist/fondue-components45.js +18 -19
  27. package/dist/fondue-components45.js.map +1 -1
  28. package/dist/fondue-components46.js +18 -4
  29. package/dist/fondue-components46.js.map +1 -1
  30. package/dist/fondue-components47.js +3 -13
  31. package/dist/fondue-components47.js.map +1 -1
  32. package/dist/fondue-components48.js +13 -3
  33. package/dist/fondue-components48.js.map +1 -1
  34. package/dist/fondue-components49.js +3 -17
  35. package/dist/fondue-components49.js.map +1 -1
  36. package/dist/fondue-components50.js +19 -35
  37. package/dist/fondue-components50.js.map +1 -1
  38. package/dist/fondue-components51.js +35 -7
  39. package/dist/fondue-components51.js.map +1 -1
  40. package/dist/fondue-components52.js +6 -12
  41. package/dist/fondue-components52.js.map +1 -1
  42. package/dist/fondue-components53.js +12 -4
  43. package/dist/fondue-components53.js.map +1 -1
  44. package/dist/fondue-components54.js +4 -24
  45. package/dist/fondue-components54.js.map +1 -1
  46. package/dist/fondue-components55.js +24 -16
  47. package/dist/fondue-components55.js.map +1 -1
  48. package/dist/fondue-components56.js +16 -141
  49. package/dist/fondue-components56.js.map +1 -1
  50. package/dist/fondue-components57.js +142 -16
  51. package/dist/fondue-components57.js.map +1 -1
  52. package/dist/fondue-components58.js +16 -73
  53. package/dist/fondue-components58.js.map +1 -1
  54. package/dist/fondue-components59.js +73 -8
  55. package/dist/fondue-components59.js.map +1 -1
  56. package/dist/fondue-components60.js +8 -33
  57. package/dist/fondue-components60.js.map +1 -1
  58. package/dist/fondue-components61.js +32 -48
  59. package/dist/fondue-components61.js.map +1 -1
  60. package/dist/fondue-components62.js +48 -10
  61. package/dist/fondue-components62.js.map +1 -1
  62. package/dist/fondue-components63.js +10 -12
  63. package/dist/fondue-components63.js.map +1 -1
  64. package/dist/fondue-components64.js +12 -7
  65. package/dist/fondue-components64.js.map +1 -1
  66. package/dist/fondue-components66.js +15 -15
  67. package/dist/fondue-components7.js +98 -87
  68. package/dist/fondue-components7.js.map +1 -1
  69. package/dist/fondue-components76.js +1 -1
  70. package/dist/fondue-components8.js +1 -1
  71. package/dist/fondue-components9.js +74 -71
  72. package/dist/fondue-components9.js.map +1 -1
  73. package/dist/index.d.ts +10 -0
  74. package/dist/style.css +1 -1
  75. package/package.json +5 -5
@@ -1,45 +1,44 @@
1
- import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
- import { IconCaretRight as F } from "@frontify/fondue-icons";
1
+ import { jsx as d, jsxs as m } from "react/jsx-runtime";
2
+ import { IconCaretRight as I } from "@frontify/fondue-icons";
3
3
  import * as n from "@radix-ui/react-dropdown-menu";
4
- import { Slot as I } from "@radix-ui/react-slot";
5
4
  import { forwardRef as i } from "react";
6
- import { useFondueTheme as P, ThemeProvider as G } from "./fondue-components27.js";
7
- import { useProcessedChildren as w } from "./fondue-components44.js";
8
- import a from "./fondue-components45.js";
9
- const f = ({
5
+ import { useFondueTheme as w, ThemeProvider as f } from "./fondue-components27.js";
6
+ import { useProcessedChildren as g } from "./fondue-components45.js";
7
+ import a from "./fondue-components46.js";
8
+ const D = ({
10
9
  children: t,
11
10
  open: o,
12
11
  modal: e = !1,
13
- onOpenChange: d,
12
+ onOpenChange: r,
14
13
  "data-test-id": s = "fondue-dropdown"
15
- }) => /* @__PURE__ */ r(n.Root, { open: o, modal: e, onOpenChange: d, "data-test-id": s, children: t });
16
- f.displayName = "Dropdown.Root";
17
- const g = ({
14
+ }) => /* @__PURE__ */ d(n.Root, { open: o, modal: e, onOpenChange: r, "data-test-id": s, children: t });
15
+ D.displayName = "Dropdown.Root";
16
+ const b = ({
18
17
  asChild: t = !0,
19
18
  children: o,
20
19
  "data-test-id": e = "fondue-dropdown-trigger",
21
- ...d
22
- }, s) => /* @__PURE__ */ r(n.Trigger, { asChild: t, "data-test-id": e, ref: s, ...d, children: o });
23
- g.displayName = "Dropdown.Trigger";
24
- const v = {
20
+ ...r
21
+ }, s) => /* @__PURE__ */ d(n.Trigger, { asChild: t, "data-test-id": e, ref: s, ...r, children: o });
22
+ b.displayName = "Dropdown.Trigger";
23
+ const P = {
25
24
  compact: 8,
26
25
  comfortable: 12,
27
26
  spacious: 16
28
- }, D = ({
27
+ }, S = ({
29
28
  side: t = "bottom",
30
29
  align: o = "start",
31
30
  triggerOffset: e = "compact",
32
- children: d,
31
+ children: r,
33
32
  preventTriggerFocusOnClose: s,
34
33
  "data-test-id": p = "fondue-dropdown-content"
35
34
  }, u) => {
36
- const c = P();
37
- return /* @__PURE__ */ r(n.Portal, { children: /* @__PURE__ */ r(G, { theme: c, children: /* @__PURE__ */ r(
35
+ const c = w();
36
+ return /* @__PURE__ */ d(n.Portal, { children: /* @__PURE__ */ d(f, { theme: c, children: /* @__PURE__ */ d(
38
37
  n.Content,
39
38
  {
40
39
  align: o,
41
40
  collisionPadding: 8,
42
- sideOffset: v[e],
41
+ sideOffset: P[e],
43
42
  side: t,
44
43
  className: a.content,
45
44
  "data-test-id": p,
@@ -47,81 +46,85 @@ const v = {
47
46
  onCloseAutoFocus: (l) => {
48
47
  s && l.preventDefault();
49
48
  },
50
- children: d
49
+ children: r
51
50
  }
52
51
  ) }) });
53
52
  };
54
- D.displayName = "Dropdown.Content";
55
- const b = ({ children: t, heading: o, "data-test-id": e = "fondue-dropdown-group" }, d) => /* @__PURE__ */ m(n.Group, { className: a.group, "data-test-id": e, ref: d, children: [
56
- o ? /* @__PURE__ */ r("div", { className: a.groupHeading, children: /* @__PURE__ */ r("span", { "aria-label": o, children: o }) }) : null,
53
+ S.displayName = "Dropdown.Content";
54
+ const N = ({ children: t, heading: o, "data-test-id": e = "fondue-dropdown-group" }, r) => /* @__PURE__ */ m(n.Group, { className: a.group, "data-test-id": e, ref: r, children: [
55
+ o ? /* @__PURE__ */ d("div", { className: a.groupHeading, children: /* @__PURE__ */ d("span", { "aria-label": o, children: o }) }) : null,
57
56
  t
58
57
  ] });
59
- b.displayName = "Dropdown.Group";
60
- const S = ({
58
+ N.displayName = "Dropdown.Group";
59
+ const C = ({
61
60
  children: t,
62
61
  "data-test-id": o = "fondue-dropdown-submenu"
63
- }) => /* @__PURE__ */ r(n.Sub, { "data-test-id": o, children: t });
64
- S.displayName = "Dropdown.SubMenu";
65
- const N = ({ children: t, "data-test-id": o = "fondue-dropdown-subtrigger" }, e) => {
66
- const { content: d } = w(t);
62
+ }) => /* @__PURE__ */ d(n.Sub, { "data-test-id": o, children: t });
63
+ C.displayName = "Dropdown.SubMenu";
64
+ const h = ({ children: t, "data-test-id": o = "fondue-dropdown-subtrigger" }, e) => {
65
+ const { content: r } = g(t);
67
66
  return /* @__PURE__ */ m(n.SubTrigger, { className: a.subTrigger, "data-test-id": o, ref: e, children: [
68
- d,
69
- /* @__PURE__ */ r(F, { className: a.subMenuIndicator, size: 16 })
67
+ r,
68
+ /* @__PURE__ */ d(I, { className: a.subMenuIndicator, size: 16 })
70
69
  ] });
71
70
  };
72
- N.displayName = "Dropdown.SubTrigger";
73
- const C = ({ children: t, "data-test-id": o = "fondue-dropdown-subcontent" }, e) => /* @__PURE__ */ r(n.Portal, { children: /* @__PURE__ */ r(n.SubContent, { className: a.subContent, "data-test-id": o, ref: e, children: t }) });
74
- C.displayName = "Dropdown.SubContent";
75
- const h = ({
71
+ h.displayName = "Dropdown.SubTrigger";
72
+ const R = ({ children: t, "data-test-id": o = "fondue-dropdown-subcontent" }, e) => {
73
+ const r = w();
74
+ return /* @__PURE__ */ d(n.Portal, { children: /* @__PURE__ */ d(f, { theme: r, children: /* @__PURE__ */ d(n.SubContent, { className: a.subContent, "data-test-id": o, ref: e, children: t }) }) });
75
+ };
76
+ R.displayName = "Dropdown.SubContent";
77
+ const T = ({
76
78
  children: t,
77
79
  disabled: o,
78
80
  textValue: e,
79
- onSelect: d,
81
+ onSelect: r,
80
82
  emphasis: s = "default",
81
- "data-test-id": p = "fondue-dropdown-subtrigger",
82
- ...u
83
- }, c) => {
84
- const { content: l, isLink: T } = w(t), y = T ? I : "div";
85
- return /* @__PURE__ */ r(
83
+ asChild: p = !1,
84
+ "data-test-id": u = "fondue-dropdown-subtrigger",
85
+ ...c
86
+ }, l) => {
87
+ const { content: F } = g(t);
88
+ return /* @__PURE__ */ d(
86
89
  n.Item,
87
90
  {
88
- onSelect: d,
91
+ onSelect: r,
89
92
  className: a.item,
90
93
  textValue: e,
91
- "data-test-id": p,
94
+ "data-test-id": u,
92
95
  "data-emphasis": s,
93
- ref: c,
96
+ ref: l,
94
97
  disabled: o,
95
- asChild: !0,
96
- ...u,
97
- children: /* @__PURE__ */ r(y, { children: l })
98
+ asChild: p,
99
+ ...c,
100
+ children: F
98
101
  }
99
102
  );
100
103
  };
101
- h.displayName = "Dropdown.Item";
102
- const R = ({ children: t, name: o, "data-test-id": e = "fondue-dropdown-slot" }, d) => /* @__PURE__ */ r("div", { "data-name": o, className: a.slot, "data-test-id": e, ref: d, children: t });
103
- R.displayName = "Dropdown.Slot";
104
- const M = i(g), x = i(D), A = i(b), j = i(N), k = i(C), z = i(h), H = i(R), J = {
105
- Root: f,
106
- Trigger: M,
107
- Content: x,
108
- Group: A,
109
- SubMenu: S,
110
- SubTrigger: j,
111
- SubContent: k,
112
- Item: z,
113
- Slot: H
104
+ T.displayName = "Dropdown.Item";
105
+ const y = ({ children: t, name: o, "data-test-id": e = "fondue-dropdown-slot" }, r) => /* @__PURE__ */ d("div", { "data-name": o, className: a.slot, "data-test-id": e, ref: r, children: t });
106
+ y.displayName = "Dropdown.Slot";
107
+ const G = i(b), M = i(S), v = i(N), x = i(h), A = i(R), j = i(T), z = i(y), E = {
108
+ Root: D,
109
+ Trigger: G,
110
+ Content: M,
111
+ Group: v,
112
+ SubMenu: C,
113
+ SubTrigger: x,
114
+ SubContent: A,
115
+ Item: j,
116
+ Slot: z
114
117
  };
115
118
  export {
116
- J as Dropdown,
117
- D as DropdownContent,
118
- b as DropdownGroup,
119
- h as DropdownItem,
120
- f as DropdownRoot,
121
- R as DropdownSlot,
122
- C as DropdownSubContent,
123
- S as DropdownSubMenu,
124
- N as DropdownSubTrigger,
125
- g as DropdownTrigger
119
+ E as Dropdown,
120
+ S as DropdownContent,
121
+ N as DropdownGroup,
122
+ T as DropdownItem,
123
+ D as DropdownRoot,
124
+ y as DropdownSlot,
125
+ R as DropdownSubContent,
126
+ C as DropdownSubMenu,
127
+ h as DropdownSubTrigger,
128
+ b as DropdownTrigger
126
129
  };
127
130
  //# sourceMappingURL=fondue-components9.js.map
@@ -1 +1 @@
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 { Slot } from '@radix-ui/react-slot';\nimport { forwardRef, type ForwardedRef, type ReactNode } from 'react';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport { useProcessedChildren } from './hooks/useProcessedChildren';\nimport styles from './styles/dropdown.module.scss';\n\nexport type DropdownRootProps = {\n children?: ReactNode;\n /**\n * When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers.\n * @default false\n */\n modal?: boolean;\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\n 'data-test-id'?: string;\n};\n\nexport const DropdownRoot = ({\n children,\n open,\n modal = false,\n onOpenChange,\n 'data-test-id': dataTestId = 'fondue-dropdown',\n}: DropdownRootProps) => {\n return (\n <RadixDropdown.Root open={open} modal={modal} onOpenChange={onOpenChange} data-test-id={dataTestId}>\n {children}\n </RadixDropdown.Root>\n );\n};\nDropdownRoot.displayName = 'Dropdown.Root';\n\nexport type DropdownTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const DropdownTrigger = (\n {\n asChild = true,\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-trigger',\n ...props\n }: DropdownTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixDropdown.Trigger asChild={asChild} data-test-id={dataTestId} ref={ref} {...props}>\n {children}\n </RadixDropdown.Trigger>\n );\n};\nDropdownTrigger.displayName = 'Dropdown.Trigger';\n\ntype DropdownSpacing = 'compact' | 'comfortable' | 'spacious';\n\nexport type DropdownContentProps = {\n children?: ReactNode;\n 'data-test-id'?: string;\n /**\n * Defines the alignment of the dropdown.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\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 * Defines the spacing between the dropdown and its trigger.\n * @default 'compact'\n */\n triggerOffset?: DropdownSpacing;\n /**\n * Prevents the focus from being set on the trigger when the dropdown is closed.\n */\n preventTriggerFocusOnClose?: boolean;\n};\n\nconst SPACING_MAP: Record<DropdownSpacing, number> = {\n compact: 8,\n comfortable: 12,\n spacious: 16,\n};\n\nexport const DropdownContent = (\n {\n side = 'bottom',\n align = 'start',\n triggerOffset = 'compact',\n children,\n preventTriggerFocusOnClose,\n 'data-test-id': dataTestId = 'fondue-dropdown-content',\n }: DropdownContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n\n return (\n <RadixDropdown.Portal>\n <ThemeProvider theme={theme}>\n <RadixDropdown.Content\n align={align}\n collisionPadding={8}\n sideOffset={SPACING_MAP[triggerOffset]}\n side={side}\n className={styles.content}\n data-test-id={dataTestId}\n ref={ref}\n onCloseAutoFocus={(event) => {\n if (preventTriggerFocusOnClose) {\n event.preventDefault();\n }\n }}\n >\n {children}\n </RadixDropdown.Content>\n </ThemeProvider>\n </RadixDropdown.Portal>\n );\n};\nDropdownContent.displayName = 'Dropdown.Content';\n\nexport type DropdownGroupProps = { children: ReactNode; heading?: string; 'data-test-id'?: string };\n\nexport const DropdownGroup = (\n { children, heading, '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 {heading ? (\n <div className={styles.groupHeading}>\n <span aria-label={heading}>{heading}</span>\n </div>\n ) : null}\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 const { content } = useProcessedChildren(children);\n return (\n <RadixDropdown.SubTrigger className={styles.subTrigger} data-test-id={dataTestId} ref={ref}>\n {content}\n <IconCaretRight className={styles.subMenuIndicator} size={16} />\n </RadixDropdown.SubTrigger>\n );\n};\nDropdownSubTrigger.displayName = 'Dropdown.SubTrigger';\n\nexport type DropdownSubContentProps = {\n children: ReactNode;\n 'data-test-id'?: string;\n};\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 * The style of the item.\n * @default \"default\"\n */\n emphasis?: 'default' | 'danger';\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 emphasis = 'default',\n 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger',\n ...props\n }: DropdownItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { content, isLink } = useProcessedChildren(children);\n\n const Wrapper = isLink ? Slot : 'div';\n\n return (\n <RadixDropdown.Item\n onSelect={onSelect}\n className={styles.item}\n textValue={textValue}\n data-test-id={dataTestId}\n data-emphasis={emphasis}\n ref={ref}\n disabled={disabled}\n asChild\n {...props}\n >\n <Wrapper>{content}</Wrapper>\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","modal","onOpenChange","dataTestId","jsx","RadixDropdown","DropdownTrigger","asChild","props","ref","SPACING_MAP","DropdownContent","side","align","triggerOffset","preventTriggerFocusOnClose","theme","useFondueTheme","ThemeProvider","styles","event","DropdownGroup","heading","jsxs","DropdownSubMenu","DropdownSubTrigger","content","useProcessedChildren","IconCaretRight","DropdownSubContent","DropdownItem","disabled","textValue","onSelect","emphasis","isLink","Wrapper","Slot","DropdownSlot","name","ForwardedRefDropdownTrigger","forwardRef","ForwardedRefDropdownContent","ForwardedRefDropdownGroup","ForwardedRefDropdownSubTrigger","ForwardedRefDropdownSubContent","ForwardedRefDropdownItem","ForwardedRefDropdownSlot","Dropdown"],"mappings":";;;;;;;;AA+BO,MAAMA,IAAe,CAAC;AAAA,EACzB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,cAAAC;AAAA,EACA,gBAAgBC,IAAa;AACjC,MAEQ,gBAAAC,EAACC,EAAc,MAAd,EAAmB,MAAAL,GAAY,OAAAC,GAAc,cAAAC,GAA4B,gBAAcC,GACnF,UAAAJ,GACL;AAGRD,EAAa,cAAc;AAYpB,MAAMQ,IAAkB,CAC3B;AAAA,EACI,SAAAC,IAAU;AAAA,EACV,UAAAR;AAAA,EACA,gBAAgBI,IAAa;AAAA,EAC7B,GAAGK;AACP,GACAC,MAGI,gBAAAL,EAACC,EAAc,SAAd,EAAsB,SAAAE,GAAkB,gBAAcJ,GAAY,KAAAM,GAAW,GAAGD,GAC5E,UAAAT,EACL,CAAA;AAGRO,EAAgB,cAAc;AA4B9B,MAAMI,IAA+C;AAAA,EACjD,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AACd,GAEaC,IAAkB,CAC3B;AAAA,EACI,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,eAAAC,IAAgB;AAAA,EAChB,UAAAf;AAAA,EACA,4BAAAgB;AAAA,EACA,gBAAgBZ,IAAa;AACjC,GACAM,MACC;AACD,QAAMO,IAAQC,EAAe;AAE7B,2BACKZ,EAAc,QAAd,EACG,UAAA,gBAAAD,EAACc,KAAc,OAAAF,GACX,UAAA,gBAAA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,IAAiCJ,EAAoDZ,CAAkB,GACvGiB,IAA2BL,EAA8CX,CAAY,GACrFiB,IAA2BN,EAA8CH,CAAY,GAE9EU,IAAW;AAAA,EACpB,MAAMlD;AAAA,EACN,SAAS0C;AAAA,EACT,SAASE;AAAA,EACT,OAAOC;AAAA,EACP,SAASnB;AAAA,EACT,YAAYoB;AAAA,EACZ,YAAYC;AAAA,EACZ,MAAMC;AAAA,EACN,MAAMC;AACV;"}
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, type ForwardedRef, type ReactNode } from 'react';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport { useProcessedChildren } from './hooks/useProcessedChildren';\nimport styles from './styles/dropdown.module.scss';\n\nexport type DropdownRootProps = {\n children?: ReactNode;\n /**\n * When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers.\n * @default false\n */\n modal?: boolean;\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\n 'data-test-id'?: string;\n};\n\nexport const DropdownRoot = ({\n children,\n open,\n modal = false,\n onOpenChange,\n 'data-test-id': dataTestId = 'fondue-dropdown',\n}: DropdownRootProps) => {\n return (\n <RadixDropdown.Root open={open} modal={modal} onOpenChange={onOpenChange} data-test-id={dataTestId}>\n {children}\n </RadixDropdown.Root>\n );\n};\nDropdownRoot.displayName = 'Dropdown.Root';\n\nexport type DropdownTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const DropdownTrigger = (\n {\n asChild = true,\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-trigger',\n ...props\n }: DropdownTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixDropdown.Trigger asChild={asChild} data-test-id={dataTestId} ref={ref} {...props}>\n {children}\n </RadixDropdown.Trigger>\n );\n};\nDropdownTrigger.displayName = 'Dropdown.Trigger';\n\ntype DropdownSpacing = 'compact' | 'comfortable' | 'spacious';\n\nexport type DropdownContentProps = {\n children?: ReactNode;\n 'data-test-id'?: string;\n /**\n * Defines the alignment of the dropdown.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\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 * Defines the spacing between the dropdown and its trigger.\n * @default 'compact'\n */\n triggerOffset?: DropdownSpacing;\n /**\n * Prevents the focus from being set on the trigger when the dropdown is closed.\n */\n preventTriggerFocusOnClose?: boolean;\n};\n\nconst SPACING_MAP: Record<DropdownSpacing, number> = {\n compact: 8,\n comfortable: 12,\n spacious: 16,\n};\n\nexport const DropdownContent = (\n {\n side = 'bottom',\n align = 'start',\n triggerOffset = 'compact',\n children,\n preventTriggerFocusOnClose,\n 'data-test-id': dataTestId = 'fondue-dropdown-content',\n }: DropdownContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n\n return (\n <RadixDropdown.Portal>\n <ThemeProvider theme={theme}>\n <RadixDropdown.Content\n align={align}\n collisionPadding={8}\n sideOffset={SPACING_MAP[triggerOffset]}\n side={side}\n className={styles.content}\n data-test-id={dataTestId}\n ref={ref}\n onCloseAutoFocus={(event) => {\n if (preventTriggerFocusOnClose) {\n event.preventDefault();\n }\n }}\n >\n {children}\n </RadixDropdown.Content>\n </ThemeProvider>\n </RadixDropdown.Portal>\n );\n};\nDropdownContent.displayName = 'Dropdown.Content';\n\nexport type DropdownGroupProps = { children: ReactNode; heading?: string; 'data-test-id'?: string };\n\nexport const DropdownGroup = (\n { children, heading, '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 {heading ? (\n <div className={styles.groupHeading}>\n <span aria-label={heading}>{heading}</span>\n </div>\n ) : null}\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 const { content } = useProcessedChildren(children);\n return (\n <RadixDropdown.SubTrigger className={styles.subTrigger} data-test-id={dataTestId} ref={ref}>\n {content}\n <IconCaretRight className={styles.subMenuIndicator} size={16} />\n </RadixDropdown.SubTrigger>\n );\n};\nDropdownSubTrigger.displayName = 'Dropdown.SubTrigger';\n\nexport type DropdownSubContentProps = {\n children: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const DropdownSubContent = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-subcontent' }: DropdownSubContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n return (\n <RadixDropdown.Portal>\n <ThemeProvider theme={theme}>\n <RadixDropdown.SubContent className={styles.subContent} data-test-id={dataTestId} ref={ref}>\n {children}\n </RadixDropdown.SubContent>\n </ThemeProvider>\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 * The style of the item.\n * @default \"default\"\n */\n emphasis?: 'default' | 'danger';\n /**\n * Callback that is called when the item is selected.\n */\n onSelect?: (event: Event) => void;\n /**\n * If true, the item props will be passed to the child element.\n * @default false\n */\n asChild?: boolean;\n 'data-test-id'?: string;\n};\n\nexport const DropdownItem = (\n {\n children,\n disabled,\n textValue,\n onSelect,\n emphasis = 'default',\n asChild = false,\n 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger',\n ...props\n }: DropdownItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { content } = useProcessedChildren(children);\n\n return (\n <RadixDropdown.Item\n onSelect={onSelect}\n className={styles.item}\n textValue={textValue}\n data-test-id={dataTestId}\n data-emphasis={emphasis}\n ref={ref}\n disabled={disabled}\n asChild={asChild}\n {...props}\n >\n {content}\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","modal","onOpenChange","dataTestId","jsx","RadixDropdown","DropdownTrigger","asChild","props","ref","SPACING_MAP","DropdownContent","side","align","triggerOffset","preventTriggerFocusOnClose","theme","useFondueTheme","ThemeProvider","styles","event","DropdownGroup","heading","jsxs","DropdownSubMenu","DropdownSubTrigger","content","useProcessedChildren","IconCaretRight","DropdownSubContent","DropdownItem","disabled","textValue","onSelect","emphasis","DropdownSlot","name","ForwardedRefDropdownTrigger","forwardRef","ForwardedRefDropdownContent","ForwardedRefDropdownGroup","ForwardedRefDropdownSubTrigger","ForwardedRefDropdownSubContent","ForwardedRefDropdownItem","ForwardedRefDropdownSlot","Dropdown"],"mappings":";;;;;;;AA8BO,MAAMA,IAAe,CAAC;AAAA,EACzB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,cAAAC;AAAA,EACA,gBAAgBC,IAAa;AACjC,MAEQ,gBAAAC,EAACC,EAAc,MAAd,EAAmB,MAAAL,GAAY,OAAAC,GAAc,cAAAC,GAA4B,gBAAcC,GACnF,UAAAJ,GACL;AAGRD,EAAa,cAAc;AAYpB,MAAMQ,IAAkB,CAC3B;AAAA,EACI,SAAAC,IAAU;AAAA,EACV,UAAAR;AAAA,EACA,gBAAgBI,IAAa;A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Wd,EAAO;AAAA,MAClB,WAAAa;AAAA,MACA,gBAAc7B;AAAA,MACd,iBAAe+B;AAAA,MACf,KAAAzB;AAAA,MACA,UAAAsB;AAAA,MACA,SAAAxB;AAAA,MACC,GAAGC;AAAA,MAEH,UAAAkB;AAAA,IAAA;AAAA,EACL;AAER;AACAI,EAAa,cAAc;AAId,MAAAK,IAAe,CACxB,EAAE,UAAApC,GAAU,MAAAqC,GAAM,gBAAgBjC,IAAa,uBAAuB,GACtEM,MAGI,gBAAAL,EAAC,OAAI,EAAA,aAAWgC,GAAM,WAAWjB,EAAO,MAAM,gBAAchB,GAAY,KAAAM,GACnE,UAAAV,EACL,CAAA;AAGRoC,EAAa,cAAc;AAE3B,MAAME,IAA8BC,EAAoDhC,CAAe,GACjGiC,IAA8BD,EAAiD3B,CAAe,GAC9F6B,IAA4BF,EAA+CjB,CAAa,GACxFoB,IAAiCH,EAAoDb,CAAkB,GACvGiB,IAAiCJ,EAAoDT,CAAkB,GACvGc,IAA2BL,EAA8CR,CAAY,GACrFc,IAA2BN,EAA8CH,CAAY,GAE9EU,IAAW;AAAA,EACpB,MAAM/C;AAAA,EACN,SAASuC;AAAA,EACT,SAASE;AAAA,EACT,OAAOC;AAAA,EACP,SAAShB;AAAA,EACT,YAAYiB;AAAA,EACZ,YAAYC;AAAA,EACZ,MAAMC;AAAA,EACN,MAAMC;AACV;"}
package/dist/index.d.ts CHANGED
@@ -581,6 +581,11 @@ declare type DropdownItemProps = {
581
581
  * Callback that is called when the item is selected.
582
582
  */
583
583
  onSelect?: (event: Event) => void;
584
+ /**
585
+ * If true, the item props will be passed to the child element.
586
+ * @default false
587
+ */
588
+ asChild?: boolean;
584
589
  'data-test-id'?: string;
585
590
  };
586
591
 
@@ -1123,6 +1128,11 @@ declare type ScrollAreaProps = {
1123
1128
  * @default '100%'
1124
1129
  */
1125
1130
  maxWidth?: string | number;
1131
+ /**
1132
+ * Define the padding of the scroll area
1133
+ * @default "compact"
1134
+ */
1135
+ padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';
1126
1136
  /**
1127
1137
  * Determines if a inset shadow should be shown the edge of the component
1128
1138
  */