@frontify/fondue-components 13.0.2 → 14.1.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 (156) hide show
  1. package/dist/fondue-components.js +56 -54
  2. package/dist/fondue-components.js.map +1 -1
  3. package/dist/fondue-components10.js +124 -34
  4. package/dist/fondue-components10.js.map +1 -1
  5. package/dist/fondue-components11.js +36 -84
  6. package/dist/fondue-components11.js.map +1 -1
  7. package/dist/fondue-components12.js +89 -36
  8. package/dist/fondue-components12.js.map +1 -1
  9. package/dist/fondue-components13.js +30 -40
  10. package/dist/fondue-components13.js.map +1 -1
  11. package/dist/fondue-components14.js +47 -24
  12. package/dist/fondue-components14.js.map +1 -1
  13. package/dist/fondue-components15.js +28 -39
  14. package/dist/fondue-components15.js.map +1 -1
  15. package/dist/fondue-components16.js +34 -16
  16. package/dist/fondue-components16.js.map +1 -1
  17. package/dist/fondue-components17.js +21 -68
  18. package/dist/fondue-components17.js.map +1 -1
  19. package/dist/fondue-components18.js +71 -36
  20. package/dist/fondue-components18.js.map +1 -1
  21. package/dist/fondue-components19.js +34 -45
  22. package/dist/fondue-components19.js.map +1 -1
  23. package/dist/fondue-components20.js +53 -130
  24. package/dist/fondue-components20.js.map +1 -1
  25. package/dist/fondue-components21.js +134 -53
  26. package/dist/fondue-components21.js.map +1 -1
  27. package/dist/fondue-components22.js +54 -28
  28. package/dist/fondue-components22.js.map +1 -1
  29. package/dist/fondue-components23.js +28 -153
  30. package/dist/fondue-components23.js.map +1 -1
  31. package/dist/fondue-components24.js +151 -116
  32. package/dist/fondue-components24.js.map +1 -1
  33. package/dist/fondue-components25.js +117 -31
  34. package/dist/fondue-components25.js.map +1 -1
  35. package/dist/fondue-components26.js +32 -65
  36. package/dist/fondue-components26.js.map +1 -1
  37. package/dist/fondue-components27.js +66 -7
  38. package/dist/fondue-components27.js.map +1 -1
  39. package/dist/fondue-components28.js +10 -55
  40. package/dist/fondue-components28.js.map +1 -1
  41. package/dist/fondue-components29.js +56 -32
  42. package/dist/fondue-components29.js.map +1 -1
  43. package/dist/fondue-components3.js +89 -36
  44. package/dist/fondue-components3.js.map +1 -1
  45. package/dist/fondue-components30.js +18 -4
  46. package/dist/fondue-components30.js.map +1 -1
  47. package/dist/fondue-components31.js +32 -12
  48. package/dist/fondue-components31.js.map +1 -1
  49. package/dist/fondue-components32.js +5 -155
  50. package/dist/fondue-components32.js.map +1 -1
  51. package/dist/fondue-components33.js +10 -116
  52. package/dist/fondue-components33.js.map +1 -1
  53. package/dist/fondue-components34.js +59 -22
  54. package/dist/fondue-components34.js.map +1 -1
  55. package/dist/fondue-components35.js +112 -15
  56. package/dist/fondue-components35.js.map +1 -1
  57. package/dist/fondue-components36.js +116 -30
  58. package/dist/fondue-components36.js.map +1 -1
  59. package/dist/fondue-components37.js +21 -37
  60. package/dist/fondue-components37.js.map +1 -1
  61. package/dist/fondue-components38.js +31 -129
  62. package/dist/fondue-components38.js.map +1 -1
  63. package/dist/fondue-components39.js +37 -21
  64. package/dist/fondue-components39.js.map +1 -1
  65. package/dist/fondue-components4.js +32 -38
  66. package/dist/fondue-components4.js.map +1 -1
  67. package/dist/fondue-components40.js +130 -45
  68. package/dist/fondue-components40.js.map +1 -1
  69. package/dist/fondue-components41.js +20 -7
  70. package/dist/fondue-components41.js.map +1 -1
  71. package/dist/fondue-components42.js +45 -13
  72. package/dist/fondue-components42.js.map +1 -1
  73. package/dist/fondue-components43.js +7 -14
  74. package/dist/fondue-components43.js.map +1 -1
  75. package/dist/fondue-components44.js +13 -60
  76. package/dist/fondue-components44.js.map +1 -1
  77. package/dist/fondue-components45.js +15 -18
  78. package/dist/fondue-components45.js.map +1 -1
  79. package/dist/fondue-components46.js +60 -19
  80. package/dist/fondue-components46.js.map +1 -1
  81. package/dist/fondue-components47.js +18 -5
  82. package/dist/fondue-components47.js.map +1 -1
  83. package/dist/fondue-components48.js +18 -14
  84. package/dist/fondue-components48.js.map +1 -1
  85. package/dist/fondue-components49.js +1 -1
  86. package/dist/fondue-components5.js +42 -45
  87. package/dist/fondue-components5.js.map +1 -1
  88. package/dist/fondue-components50.js +12 -16
  89. package/dist/fondue-components50.js.map +1 -1
  90. package/dist/fondue-components51.js +5 -35
  91. package/dist/fondue-components51.js.map +1 -1
  92. package/dist/fondue-components52.js +18 -6
  93. package/dist/fondue-components52.js.map +1 -1
  94. package/dist/fondue-components53.js +35 -13
  95. package/dist/fondue-components53.js.map +1 -1
  96. package/dist/fondue-components54.js +6 -4
  97. package/dist/fondue-components54.js.map +1 -1
  98. package/dist/fondue-components55.js +12 -24
  99. package/dist/fondue-components55.js.map +1 -1
  100. package/dist/fondue-components56.js +4 -16
  101. package/dist/fondue-components56.js.map +1 -1
  102. package/dist/fondue-components57.js +23 -140
  103. package/dist/fondue-components57.js.map +1 -1
  104. package/dist/fondue-components58.js +17 -16
  105. package/dist/fondue-components58.js.map +1 -1
  106. package/dist/fondue-components59.js +142 -70
  107. package/dist/fondue-components59.js.map +1 -1
  108. package/dist/fondue-components6.js +46 -48
  109. package/dist/fondue-components6.js.map +1 -1
  110. package/dist/fondue-components60.js +16 -8
  111. package/dist/fondue-components60.js.map +1 -1
  112. package/dist/fondue-components61.js +72 -32
  113. package/dist/fondue-components61.js.map +1 -1
  114. package/dist/fondue-components62.js +8 -49
  115. package/dist/fondue-components62.js.map +1 -1
  116. package/dist/fondue-components63.js +32 -10
  117. package/dist/fondue-components63.js.map +1 -1
  118. package/dist/fondue-components64.js +48 -12
  119. package/dist/fondue-components64.js.map +1 -1
  120. package/dist/fondue-components65.js +10 -12
  121. package/dist/fondue-components65.js.map +1 -1
  122. package/dist/fondue-components66.js +11 -19
  123. package/dist/fondue-components66.js.map +1 -1
  124. package/dist/fondue-components67.js +13 -15
  125. package/dist/fondue-components67.js.map +1 -1
  126. package/dist/fondue-components68.js +20 -52
  127. package/dist/fondue-components68.js.map +1 -1
  128. package/dist/fondue-components69.js +15 -15
  129. package/dist/fondue-components69.js.map +1 -1
  130. package/dist/fondue-components7.js +43 -144
  131. package/dist/fondue-components7.js.map +1 -1
  132. package/dist/fondue-components70.js +52 -25
  133. package/dist/fondue-components70.js.map +1 -1
  134. package/dist/fondue-components71.js +14 -17
  135. package/dist/fondue-components71.js.map +1 -1
  136. package/dist/fondue-components72.js +24 -5
  137. package/dist/fondue-components72.js.map +1 -1
  138. package/dist/fondue-components73.js +16 -5
  139. package/dist/fondue-components73.js.map +1 -1
  140. package/dist/fondue-components74.js +7 -2
  141. package/dist/fondue-components74.js.map +1 -1
  142. package/dist/fondue-components75.js +4 -12
  143. package/dist/fondue-components75.js.map +1 -1
  144. package/dist/fondue-components76.js +2 -39
  145. package/dist/fondue-components76.js.map +1 -1
  146. package/dist/fondue-components77.js +18 -0
  147. package/dist/fondue-components77.js.map +1 -0
  148. package/dist/fondue-components78.js +43 -0
  149. package/dist/fondue-components78.js.map +1 -0
  150. package/dist/fondue-components8.js +146 -27
  151. package/dist/fondue-components8.js.map +1 -1
  152. package/dist/fondue-components9.js +28 -125
  153. package/dist/fondue-components9.js.map +1 -1
  154. package/dist/index.d.ts +194 -58
  155. package/dist/style.css +1 -1
  156. package/package.json +6 -5
@@ -1,130 +1,33 @@
1
- import { jsx as d, jsxs as m } from "react/jsx-runtime";
2
- import { IconCaretRight as I } from "@frontify/fondue-icons";
3
- import * as n from "@radix-ui/react-dropdown-menu";
4
- import { forwardRef as i } from "react";
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 = ({
9
- children: t,
10
- open: o,
11
- modal: e = !1,
12
- onOpenChange: r,
13
- "data-test-id": s = "fondue-dropdown"
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 = ({
17
- asChild: t = !0,
18
- children: o,
19
- "data-test-id": e = "fondue-dropdown-trigger",
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 = {
24
- compact: 8,
25
- comfortable: 12,
26
- spacious: 16
27
- }, S = ({
28
- side: t = "bottom",
29
- align: o = "start",
30
- triggerOffset: e = "compact",
31
- children: r,
32
- preventTriggerFocusOnClose: s,
33
- "data-test-id": p = "fondue-dropdown-content"
34
- }, u) => {
35
- const c = w();
36
- return /* @__PURE__ */ d(n.Portal, { children: /* @__PURE__ */ d(f, { theme: c, children: /* @__PURE__ */ d(
37
- n.Content,
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import * as m from "@radix-ui/react-separator";
3
+ import { forwardRef as s } from "react";
4
+ import { cn as f } from "./fondue-components33.js";
5
+ import { dividerStyles as p } from "./fondue-components46.js";
6
+ const n = s(
7
+ ({
8
+ "data-test-id": r = "fondue-divider",
9
+ direction: o = "horizontal",
10
+ className: t,
11
+ variant: i,
12
+ ...e
13
+ }, a) => /* @__PURE__ */ d(
14
+ m.Root,
38
15
  {
39
- align: o,
40
- collisionPadding: 8,
41
- sideOffset: P[e],
42
- side: t,
43
- className: a.content,
44
- "data-test-id": p,
45
- ref: u,
46
- onCloseAutoFocus: (l) => {
47
- s && l.preventDefault();
48
- },
49
- children: r
16
+ ref: a,
17
+ className: f(
18
+ p({
19
+ direction: o,
20
+ variant: i,
21
+ ...e
22
+ }),
23
+ t
24
+ ),
25
+ "data-test-id": r
50
26
  }
51
- ) }) });
52
- };
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,
56
- t
57
- ] });
58
- N.displayName = "Dropdown.Group";
59
- const C = ({
60
- children: t,
61
- "data-test-id": o = "fondue-dropdown-submenu"
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);
66
- return /* @__PURE__ */ m(n.SubTrigger, { className: a.subTrigger, "data-test-id": o, ref: e, children: [
67
- r,
68
- /* @__PURE__ */ d(I, { className: a.subMenuIndicator, size: 16 })
69
- ] });
70
- };
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 = ({
78
- children: t,
79
- disabled: o,
80
- textValue: e,
81
- onSelect: r,
82
- emphasis: s = "default",
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(
89
- n.Item,
90
- {
91
- onSelect: r,
92
- className: a.item,
93
- textValue: e,
94
- "data-test-id": u,
95
- "data-emphasis": s,
96
- ref: l,
97
- disabled: o,
98
- asChild: p,
99
- ...c,
100
- children: F
101
- }
102
- );
103
- };
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
117
- };
27
+ )
28
+ );
29
+ n.displayName = "Divider";
118
30
  export {
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
31
+ n as Divider
129
32
  };
130
33
  //# 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 { 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":"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"}
1
+ {"version":3,"file":"fondue-components9.js","sources":["../src/components/Divider/Divider.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as Separator from '@radix-ui/react-separator';\nimport { forwardRef, type ForwardedRef, type ReactElement } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport { dividerStyles } from './styles/dividerStyles';\n\ntype DividerStyle = 'noline' | 'dashed' | 'solid';\ntype DividerPadding = 'none' | 'small' | 'medium' | 'large';\ntype DividerDirection = 'horizontal' | 'vertical';\ntype DividerColor = 'weak' | 'default' | 'strong' | 'x-strong';\n\nexport type DividerProps = {\n /**\n * The style of the divider\n * @default \"solid\"\n */\n variant?: DividerStyle;\n /**\n * The padding of the divider\n * @default \"medium\"\n */\n padding?: DividerPadding;\n /**\n * The color of the divider\n * @default \"default\"\n */\n color?: DividerColor;\n /**\n * The direction of the divider\n * @default \"horizontal\"\n */\n direction?: DividerDirection;\n 'data-test-id'?: string;\n className?: string;\n};\n\nexport const Divider = forwardRef<HTMLDivElement, DividerProps>(\n (\n {\n 'data-test-id': dataTestId = 'fondue-divider',\n direction = 'horizontal',\n className,\n variant,\n ...props\n }: DividerProps,\n ref: ForwardedRef<HTMLDivElement | null>,\n ): ReactElement => {\n return (\n <Separator.Root\n ref={ref}\n className={cn(\n dividerStyles({\n direction,\n variant,\n ...props,\n }),\n className,\n )}\n data-test-id={dataTestId}\n />\n );\n },\n);\n\nDivider.displayName = 'Divider';\n"],"names":["Divider","forwardRef","dataTestId","direction","className","variant","props","ref","jsx","Separator","cn","dividerStyles"],"mappings":";;;;;AAuCO,MAAMA,IAAUC;AAAA,EACnB,CACI;AAAA,IACI,gBAAgBC,IAAa;AAAA,IAC7B,WAAAC,IAAY;AAAA,IACZ,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,GAAGC;AAAA,KAEPC,MAGI,gBAAAC;AAAA,IAACC,EAAU;AAAA,IAAV;AAAA,MACG,KAAAF;AAAA,MACA,WAAWG;AAAA,QACPC,EAAc;AAAA,UACV,WAAAR;AAAA,UACA,SAAAE;AAAA,UACA,GAAGC;AAAA,QAAA,CACN;AAAA,QACDF;AAAA,MACJ;AAAA,MACA,gBAAcF;AAAA,IAAA;AAAA,EAClB;AAGZ;AAEAF,EAAQ,cAAc;"}
package/dist/index.d.ts CHANGED
@@ -12,11 +12,121 @@ import { HTMLAttributeAnchorTarget } from 'react';
12
12
  import { JSX as JSX_2 } from 'react/jsx-runtime';
13
13
  import { KeyboardEvent as KeyboardEvent_2 } from 'react';
14
14
  import { MouseEvent as MouseEvent_2 } from 'react';
15
+ import { MouseEventHandler } from 'react';
15
16
  import { ReactElement } from 'react';
16
17
  import { ReactNode } from 'react';
17
18
  import { RefAttributes } from 'react';
18
19
  import { SyntheticEvent } from 'react';
19
20
 
21
+ export declare const Accordion: {
22
+ Root: {
23
+ ({ "data-test-id": dataTestId, border, children, defaultValue, disabled, value, }: AccordionRootProps): JSX_2.Element;
24
+ displayName: string;
25
+ };
26
+ Item: {
27
+ ({ "data-test-id": dataTestId, children, disabled, onClick, value, }: AccordionItemProps): JSX_2.Element;
28
+ displayName: string;
29
+ };
30
+ Header: {
31
+ ({ children }: AccordionHeaderProps): JSX_2.Element;
32
+ displayName: string;
33
+ };
34
+ Trigger: {
35
+ ({ "data-test-id": dataTestId, children, }: AccordionTriggerProps): JSX_2.Element;
36
+ displayName: string;
37
+ };
38
+ Content: {
39
+ ({ "data-test-id": dataTestId, children, divider, onClick, padding, }: AccordionContentProps): JSX_2.Element;
40
+ displayName: string;
41
+ };
42
+ };
43
+
44
+ declare type AccordionContentProps = {
45
+ 'data-test-id'?: string;
46
+ /**
47
+ * Children of the Accordion content. This contains the main content.
48
+ */
49
+ children?: ReactNode;
50
+ /**
51
+ * Adds a divider line between the header and the content.
52
+ */
53
+ divider?: boolean;
54
+ /**
55
+ * Click callback for the content.
56
+ */
57
+ onClick?: MouseEventHandler<HTMLDivElement>;
58
+ /**
59
+ * Controls if we show paddings around the content.
60
+ * @default 'large'
61
+ */
62
+ padding?: AccordionPadding;
63
+ };
64
+
65
+ declare type AccordionHeaderProps = {
66
+ /**
67
+ * Children of the Accordion header. This should contain `Accordion.Trigger`
68
+ */
69
+ children?: ReactNode;
70
+ };
71
+
72
+ declare type AccordionItemProps = {
73
+ 'data-test-id'?: string;
74
+ /**
75
+ * Children of the Accordion item. This should contain the `Accordion.Header` and `Accordion.Content` components
76
+ */
77
+ children?: ReactNode;
78
+ /**
79
+ * Whether or not an accordion item is disabled from user interaction.
80
+ *
81
+ * @default false
82
+ */
83
+ disabled?: boolean;
84
+ /**
85
+ * Click callback for this item.
86
+ */
87
+ onClick?: MouseEventHandler<HTMLDivElement>;
88
+ /**
89
+ * A string value for the accordion item. All items within an accordion should use a unique value.
90
+ */
91
+ value: string;
92
+ };
93
+
94
+ declare type AccordionPadding = 'none' | 'small' | 'medium' | 'large';
95
+
96
+ declare type AccordionRootProps = {
97
+ 'data-test-id'?: string;
98
+ /**
99
+ * Show or hide the top and bottom border
100
+ * @default true
101
+ */
102
+ border?: boolean;
103
+ /**
104
+ * Children of the Accordion component. This should contain the `Accordion.Item` components
105
+ */
106
+ children?: ReactNode;
107
+ /**
108
+ * The value of the items whose contents are expanded when the accordion is initially rendered.
109
+ * Use `defaultValue` if you do not need to control the state of an accordion.
110
+ */
111
+ defaultValue?: string[];
112
+ /**
113
+ * Whether or not an accordion is disabled from user interaction.
114
+ */
115
+ disabled?: boolean;
116
+ /**
117
+ * The controlled stateful value of the accordion items whose contents are expanded.
118
+ */
119
+ value?: string[];
120
+ };
121
+
122
+ declare type AccordionTriggerProps = {
123
+ 'data-test-id'?: string;
124
+ /**
125
+ * Children of the Accordion trigger. This contains the actually clickable and visible header content
126
+ */
127
+ children?: ReactNode;
128
+ };
129
+
20
130
  declare type AriaLabelAttrs = Pick<AriaAttributes, 'aria-label'> & Pick<AriaAttributes, 'aria-labelledby'>;
21
131
 
22
132
  declare type AtLeastOneAriaLabelAttr = AtLeastOneAttr<AriaLabelAttrs>;
@@ -248,55 +358,6 @@ declare type ColorPickerProps = {
248
358
  'data-test-id'?: string;
249
359
  };
250
360
 
251
- declare type ComboboxProps = {
252
- /**
253
- * Children of the Combobox component. This can contain the `Select.Slot` components for the label, decorators, clear action and menu.
254
- */
255
- children?: ReactNode;
256
- /**
257
- * Callback function that is called when an item is selected.
258
- */
259
- onSelect?: (selectedValue: string | null) => void;
260
- /**
261
- * The active value in the combobox component. This is used to control the combobox externally.
262
- */
263
- value?: string | null;
264
- /**
265
- * The default value of the combobox component. Used for uncontrolled usages.
266
- */
267
- defaultValue?: string;
268
- /**
269
- * The placeholder in the combobox component.
270
- */
271
- placeholder?: string;
272
- /**
273
- * Status of the text input
274
- * @default "neutral"
275
- */
276
- status?: 'neutral' | 'success' | 'error';
277
- /**
278
- * Disables the combobox component.
279
- */
280
- disabled?: boolean;
281
- /**
282
- * The alignment of the menu.
283
- * @default "start"
284
- */
285
- alignMenu?: 'start' | 'center' | 'end' /**
286
- * Defines the preferred side of the select. It will not be respected if there are collisions with the viewport.
287
- * @default "bottom"
288
- */;
289
- side?: 'left' | 'right' | 'bottom' | 'top';
290
- /**
291
- * The aria label of the combobox component.
292
- */
293
- 'aria-label'?: string;
294
- /**
295
- * The data test id of the select component.
296
- */
297
- 'data-test-id'?: string;
298
- };
299
-
300
361
  declare type CommonAriaAttrs_2 = Pick<AriaAttributes, 'aria-describedby'> & AtLeastOneAriaLabelAttr;
301
362
 
302
363
  declare type CommonAriaProps = {
@@ -732,6 +793,11 @@ declare type FlyoutContentProps = {
732
793
  * @default "fit-content"
733
794
  */
734
795
  width?: string;
796
+ /**
797
+ * Defines the spacing between the dropdown and its trigger.
798
+ * @default 'compact'
799
+ */
800
+ triggerOffset?: FlyoutSpacing;
735
801
  /**
736
802
  * Define the maximum width of the flyout
737
803
  * @default "360px"
@@ -774,6 +840,8 @@ declare type FlyoutRootProps = {
774
840
  children?: ReactNode;
775
841
  };
776
842
 
843
+ declare type FlyoutSpacing = 'compact' | 'comfortable' | 'spacious';
844
+
777
845
  declare type FlyoutTriggerProps = {
778
846
  /**
779
847
  * Change the default rendered element for the one passed as a child, merging their props and behavior.
@@ -784,7 +852,54 @@ declare type FlyoutTriggerProps = {
784
852
  'data-test-id'?: string;
785
853
  };
786
854
 
787
- declare const ForwardedRefCombobox: ForwardRefExoticComponent<ComboboxProps & RefAttributes<HTMLDivElement>>;
855
+ declare const ForwardedRefCombobox: ForwardRefExoticComponent< {
856
+ /**
857
+ * Children of the Combobox component. This can contain the `Select.Slot` components for the label, decorators, clear action and menu.
858
+ */
859
+ children?: ReactNode;
860
+ /**
861
+ * Callback function that is called when an item is selected.
862
+ */
863
+ onSelect?: (selectedValue: string | null) => void;
864
+ /**
865
+ * The active value in the combobox component. This is used to control the combobox externally.
866
+ */
867
+ value?: string | null;
868
+ /**
869
+ * The default value of the combobox component. Used for uncontrolled usages.
870
+ */
871
+ defaultValue?: string;
872
+ /**
873
+ * The placeholder in the combobox component.
874
+ */
875
+ placeholder?: string;
876
+ /**
877
+ * Status of the text input
878
+ * @default "neutral"
879
+ */
880
+ status?: "neutral" | "success" | "error";
881
+ /**
882
+ * Disables the combobox component.
883
+ */
884
+ disabled?: boolean;
885
+ /**
886
+ * The alignment of the menu.
887
+ * @default "start"
888
+ */
889
+ alignMenu?: "start" | "center" | "end" /**
890
+ * Defines the preferred side of the combobox. It will not be respected if there are collisions with the viewport.
891
+ * @default "bottom"
892
+ */;
893
+ side?: "left" | "right" | "bottom" | "top";
894
+ /**
895
+ * Id of the combobox component
896
+ */
897
+ id?: string;
898
+ /**
899
+ * The data test id of the combobox component.
900
+ */
901
+ 'data-test-id'?: string;
902
+ } & CommonAriaProps & RefAttributes<HTMLDivElement>>;
788
903
 
789
904
  declare const ForwardedRefSelectItem: ForwardRefExoticComponent<SelectItemProps & RefAttributes<HTMLLIElement>>;
790
905
 
@@ -884,6 +999,7 @@ declare type LabelProps = {
884
999
  */
885
1000
  required?: boolean;
886
1001
  className?: string;
1002
+ onClick?: MouseEventHandler<HTMLLabelElement>;
887
1003
  'data-test-id'?: string;
888
1004
  };
889
1005
 
@@ -1112,12 +1228,17 @@ export declare const ScrollArea: ForwardRefExoticComponent<ScrollAreaProps & Ref
1112
1228
  declare type ScrollAreaProps = {
1113
1229
  /**
1114
1230
  * "auto" visible when content is overflowing on the corresponding orientation.
1115
- * "always" always visible regardless of whether the content is overflowing.
1231
+ * "always" always visible regardless of whether the content is overflowing. Sets the scrollbar gutter to stable.
1116
1232
  * "scroll" visible when the user is scrolling along its corresponding orientation.
1117
1233
  * "hover" when the user is hovering over the scroll area.
1118
1234
  * @default 'hover'
1119
1235
  */
1120
1236
  type?: 'auto' | 'always' | 'scroll' | 'hover';
1237
+ /**
1238
+ * Determines if the scrollbar should take up space in the content area
1239
+ * @default 'auto'
1240
+ */
1241
+ scrollbarGutter?: 'auto' | 'stable' | 'stable-horizontal' | 'stable-vertical';
1121
1242
  /**
1122
1243
  * Maximum height of the scroll area
1123
1244
  * @default '100%'
@@ -1182,6 +1303,11 @@ declare type SegmentedControlRootProps = {
1182
1303
  * @default false
1183
1304
  */
1184
1305
  disabled?: boolean;
1306
+ /**
1307
+ * Specify if the segmented control should only take the width of its content
1308
+ * @default true
1309
+ */
1310
+ hugWidth?: boolean;
1185
1311
  };
1186
1312
 
1187
1313
  export declare const Select: typeof SelectInput & {
@@ -1231,18 +1357,23 @@ declare type SelectComponentProps = {
1231
1357
  * @default "bottom"
1232
1358
  */
1233
1359
  side?: 'left' | 'right' | 'bottom' | 'top';
1234
- /**
1235
- * The aria label of the select component.
1236
- */
1237
- 'aria-label'?: string;
1238
1360
  /**
1239
1361
  * The data test id of the select component.
1240
1362
  */
1241
1363
  'data-test-id'?: string;
1242
- };
1364
+ /**
1365
+ * Id of the select component
1366
+ */
1367
+ id?: string;
1368
+ /**
1369
+ * The value of the select is shown as plan text when set to true, items child components are used if set to true
1370
+ * @default true
1371
+ */
1372
+ showStringValue?: boolean;
1373
+ } & CommonAriaProps;
1243
1374
 
1244
1375
  declare const SelectInput: {
1245
- ({ children, onSelect, value, defaultValue, placeholder, status, disabled, alignMenu, side, "aria-label": ariaLabel, "data-test-id": dataTestId, }: SelectComponentProps, forwardedRef: ForwardedRef<HTMLDivElement>): JSX_2.Element;
1376
+ ({ children, onSelect, value, defaultValue, placeholder, status, disabled, alignMenu, side, id, showStringValue, "data-test-id": dataTestId, ...props }: SelectComponentProps, forwardedRef: ForwardedRef<HTMLDivElement>): JSX_2.Element;
1246
1377
  displayName: string;
1247
1378
  };
1248
1379
 
@@ -1775,7 +1906,7 @@ declare type TextWeight = 'default' | 'strong' | 'x-strong';
1775
1906
 
1776
1907
  export declare const ThemeContext: Context<"dark" | "light">;
1777
1908
 
1778
- export declare const ThemeProvider: ({ children, theme }: ThemeProviderProps) => JSX_2.Element;
1909
+ export declare const ThemeProvider: ({ children, theme, asChild }: ThemeProviderProps) => JSX_2.Element;
1779
1910
 
1780
1911
  declare type ThemeProviderProps = {
1781
1912
  children: ReactNode;
@@ -1784,6 +1915,11 @@ declare type ThemeProviderProps = {
1784
1915
  * @default "light"
1785
1916
  * */
1786
1917
  theme: AvailableTheme;
1918
+ /**
1919
+ * Change the default rendered element for the one passed as a child, merging their props and behavior.
1920
+ * @default false
1921
+ */
1922
+ asChild?: boolean;
1787
1923
  };
1788
1924
 
1789
1925
  export declare const Tooltip: {