@frontify/fondue-components 24.2.0 → 25.0.0-rc.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 (182) hide show
  1. package/dist/fondue-components.js +52 -48
  2. package/dist/fondue-components.js.map +1 -1
  3. package/dist/fondue-components10.js +3 -3
  4. package/dist/fondue-components10.js.map +1 -1
  5. package/dist/fondue-components11.js +104 -86
  6. package/dist/fondue-components11.js.map +1 -1
  7. package/dist/fondue-components12.js +2 -2
  8. package/dist/fondue-components13.js +58 -57
  9. package/dist/fondue-components13.js.map +1 -1
  10. package/dist/fondue-components14.js +2 -2
  11. package/dist/fondue-components15.js +2 -2
  12. package/dist/fondue-components16.js +2 -2
  13. package/dist/fondue-components17.js +56 -36
  14. package/dist/fondue-components17.js.map +1 -1
  15. package/dist/fondue-components18.js +34 -16
  16. package/dist/fondue-components18.js.map +1 -1
  17. package/dist/fondue-components19.js +18 -73
  18. package/dist/fondue-components19.js.map +1 -1
  19. package/dist/fondue-components20.js +18 -36
  20. package/dist/fondue-components20.js.map +1 -1
  21. package/dist/fondue-components21.js +71 -50
  22. package/dist/fondue-components21.js.map +1 -1
  23. package/dist/fondue-components22.js +36 -138
  24. package/dist/fondue-components22.js.map +1 -1
  25. package/dist/fondue-components23.js +50 -50
  26. package/dist/fondue-components23.js.map +1 -1
  27. package/dist/fondue-components24.js +137 -99
  28. package/dist/fondue-components24.js.map +1 -1
  29. package/dist/fondue-components25.js +48 -26
  30. package/dist/fondue-components25.js.map +1 -1
  31. package/dist/fondue-components26.js +92 -188
  32. package/dist/fondue-components26.js.map +1 -1
  33. package/dist/fondue-components27.js +30 -134
  34. package/dist/fondue-components27.js.map +1 -1
  35. package/dist/fondue-components28.js +191 -126
  36. package/dist/fondue-components28.js.map +1 -1
  37. package/dist/fondue-components29.js +134 -30
  38. package/dist/fondue-components29.js.map +1 -1
  39. package/dist/fondue-components3.js +1 -1
  40. package/dist/fondue-components30.js +130 -63
  41. package/dist/fondue-components30.js.map +1 -1
  42. package/dist/fondue-components31.js +31 -114
  43. package/dist/fondue-components31.js.map +1 -1
  44. package/dist/fondue-components32.js +64 -36
  45. package/dist/fondue-components32.js.map +1 -1
  46. package/dist/fondue-components33.js +111 -53
  47. package/dist/fondue-components33.js.map +1 -1
  48. package/dist/fondue-components34.js +36 -20
  49. package/dist/fondue-components34.js.map +1 -1
  50. package/dist/fondue-components35.js +57 -23
  51. package/dist/fondue-components35.js.map +1 -1
  52. package/dist/fondue-components36.js +20 -7
  53. package/dist/fondue-components36.js.map +1 -1
  54. package/dist/fondue-components37.js +23 -6
  55. package/dist/fondue-components37.js.map +1 -1
  56. package/dist/fondue-components38.js +8 -32
  57. package/dist/fondue-components38.js.map +1 -1
  58. package/dist/fondue-components39.js +5 -3
  59. package/dist/fondue-components39.js.map +1 -1
  60. package/dist/fondue-components4.js +3 -3
  61. package/dist/fondue-components40.js +32 -12
  62. package/dist/fondue-components40.js.map +1 -1
  63. package/dist/fondue-components41.js +5 -155
  64. package/dist/fondue-components41.js.map +1 -1
  65. package/dist/fondue-components42.js +18 -116
  66. package/dist/fondue-components42.js.map +1 -1
  67. package/dist/fondue-components43.js +59 -22
  68. package/dist/fondue-components43.js.map +1 -1
  69. package/dist/fondue-components44.js +111 -14
  70. package/dist/fondue-components44.js.map +1 -1
  71. package/dist/fondue-components45.js +116 -30
  72. package/dist/fondue-components45.js.map +1 -1
  73. package/dist/fondue-components46.js +21 -54
  74. package/dist/fondue-components46.js.map +1 -1
  75. package/dist/fondue-components47.js +32 -131
  76. package/dist/fondue-components47.js.map +1 -1
  77. package/dist/fondue-components48.js +53 -20
  78. package/dist/fondue-components48.js.map +1 -1
  79. package/dist/fondue-components49.js +131 -53
  80. package/dist/fondue-components49.js.map +1 -1
  81. package/dist/fondue-components5.js +2 -2
  82. package/dist/fondue-components50.js +20 -7
  83. package/dist/fondue-components50.js.map +1 -1
  84. package/dist/fondue-components51.js +53 -13
  85. package/dist/fondue-components51.js.map +1 -1
  86. package/dist/fondue-components52.js +7 -14
  87. package/dist/fondue-components52.js.map +1 -1
  88. package/dist/fondue-components53.js +13 -5
  89. package/dist/fondue-components53.js.map +1 -1
  90. package/dist/fondue-components54.js +15 -60
  91. package/dist/fondue-components54.js.map +1 -1
  92. package/dist/fondue-components55.js +5 -18
  93. package/dist/fondue-components55.js.map +1 -1
  94. package/dist/fondue-components56.js +60 -19
  95. package/dist/fondue-components56.js.map +1 -1
  96. package/dist/fondue-components57.js +18 -5
  97. package/dist/fondue-components57.js.map +1 -1
  98. package/dist/fondue-components58.js +18 -14
  99. package/dist/fondue-components58.js.map +1 -1
  100. package/dist/fondue-components59.js +1 -1
  101. package/dist/fondue-components6.js +4 -4
  102. package/dist/fondue-components60.js +10 -16
  103. package/dist/fondue-components60.js.map +1 -1
  104. package/dist/fondue-components61.js +4 -10
  105. package/dist/fondue-components61.js.map +1 -1
  106. package/dist/fondue-components62.js +18 -35
  107. package/dist/fondue-components62.js.map +1 -1
  108. package/dist/fondue-components63.js +10 -4
  109. package/dist/fondue-components63.js.map +1 -1
  110. package/dist/fondue-components64.js +34 -10
  111. package/dist/fondue-components64.js.map +1 -1
  112. package/dist/fondue-components65.js +35 -5
  113. package/dist/fondue-components65.js.map +1 -1
  114. package/dist/fondue-components66.js +4 -24
  115. package/dist/fondue-components66.js.map +1 -1
  116. package/dist/fondue-components67.js +12 -16
  117. package/dist/fondue-components67.js.map +1 -1
  118. package/dist/fondue-components68.js +4 -151
  119. package/dist/fondue-components68.js.map +1 -1
  120. package/dist/fondue-components69.js +25 -19
  121. package/dist/fondue-components69.js.map +1 -1
  122. package/dist/fondue-components7.js +2 -2
  123. package/dist/fondue-components70.js +16 -78
  124. package/dist/fondue-components70.js.map +1 -1
  125. package/dist/fondue-components71.js +152 -8
  126. package/dist/fondue-components71.js.map +1 -1
  127. package/dist/fondue-components72.js +19 -37
  128. package/dist/fondue-components72.js.map +1 -1
  129. package/dist/fondue-components73.js +77 -69
  130. package/dist/fondue-components73.js.map +1 -1
  131. package/dist/fondue-components74.js +8 -11
  132. package/dist/fondue-components74.js.map +1 -1
  133. package/dist/fondue-components75.js +36 -10
  134. package/dist/fondue-components75.js.map +1 -1
  135. package/dist/fondue-components76.js +70 -12
  136. package/dist/fondue-components76.js.map +1 -1
  137. package/dist/fondue-components77.js +10 -12
  138. package/dist/fondue-components77.js.map +1 -1
  139. package/dist/fondue-components78.js +10 -22
  140. package/dist/fondue-components78.js.map +1 -1
  141. package/dist/fondue-components79.js +13 -34
  142. package/dist/fondue-components79.js.map +1 -1
  143. package/dist/fondue-components8.js +5 -5
  144. package/dist/fondue-components80.js +12 -10
  145. package/dist/fondue-components80.js.map +1 -1
  146. package/dist/fondue-components81.js +22 -67
  147. package/dist/fondue-components81.js.map +1 -1
  148. package/dist/fondue-components82.js +34 -15
  149. package/dist/fondue-components82.js.map +1 -1
  150. package/dist/fondue-components83.js +9 -24
  151. package/dist/fondue-components83.js.map +1 -1
  152. package/dist/fondue-components84.js +67 -18
  153. package/dist/fondue-components84.js.map +1 -1
  154. package/dist/fondue-components85.js +12 -22
  155. package/dist/fondue-components85.js.map +1 -1
  156. package/dist/fondue-components86.js +24 -6
  157. package/dist/fondue-components86.js.map +1 -1
  158. package/dist/fondue-components87.js +18 -19
  159. package/dist/fondue-components87.js.map +1 -1
  160. package/dist/fondue-components88.js +24 -6
  161. package/dist/fondue-components88.js.map +1 -1
  162. package/dist/fondue-components89.js +8 -4
  163. package/dist/fondue-components89.js.map +1 -1
  164. package/dist/fondue-components9.js +5 -5
  165. package/dist/fondue-components90.js +19 -4
  166. package/dist/fondue-components90.js.map +1 -1
  167. package/dist/fondue-components91.js +7 -2
  168. package/dist/fondue-components91.js.map +1 -1
  169. package/dist/fondue-components92.js +14 -14
  170. package/dist/fondue-components93.js +2 -40
  171. package/dist/fondue-components93.js.map +1 -1
  172. package/dist/fondue-components94.js +4 -20
  173. package/dist/fondue-components94.js.map +1 -1
  174. package/dist/fondue-components95.js +8 -0
  175. package/dist/fondue-components95.js.map +1 -0
  176. package/dist/fondue-components96.js +43 -0
  177. package/dist/fondue-components96.js.map +1 -0
  178. package/dist/fondue-components97.js +24 -0
  179. package/dist/fondue-components97.js.map +1 -0
  180. package/dist/index.d.ts +116 -3
  181. package/dist/style.css +1 -1
  182. package/package.json +6 -6
@@ -3,66 +3,70 @@ import { Accordion as t } from "./fondue-components3.js";
3
3
  import { Badge as m } from "./fondue-components4.js";
4
4
  import { Box as f } from "./fondue-components5.js";
5
5
  import { Button as l } from "./fondue-components6.js";
6
- import { Checkbox as n } from "./fondue-components7.js";
6
+ import { Checkbox as a } from "./fondue-components7.js";
7
7
  import { ColorPicker as T } from "./fondue-components8.js";
8
8
  import { Dialog as g } from "./fondue-components9.js";
9
- import { Divider as u } from "./fondue-components10.js";
9
+ import { Divider as S } from "./fondue-components10.js";
10
10
  import { Dropdown as B } from "./fondue-components11.js";
11
11
  import { Flex as b } from "./fondue-components12.js";
12
- import { Flyout as F } from "./fondue-components13.js";
13
- import { Grid as k } from "./fondue-components14.js";
14
- import { Heading as v } from "./fondue-components15.js";
15
- import { Label as A } from "./fondue-components16.js";
16
- import { LoadingBar as y } from "./fondue-components17.js";
17
- import { LoadingCircle as H } from "./fondue-components18.js";
18
- import { ScrollArea as j } from "./fondue-components19.js";
19
- import { Section as z } from "./fondue-components20.js";
20
- import { SegmentedControl as J } from "./fondue-components21.js";
21
- import { Select as M } from "./fondue-components22.js";
22
- import { Slider as O } from "./fondue-components23.js";
23
- import { SplitButton as R } from "./fondue-components24.js";
24
- import { Switch as V } from "./fondue-components25.js";
25
- import { Table as X } from "./fondue-components26.js";
26
- import { Tag as Z } from "./fondue-components27.js";
27
- import { Tabs as $ } from "./fondue-components28.js";
28
- import { Text as ro } from "./fondue-components29.js";
29
- import { TextInput as to } from "./fondue-components30.js";
30
- import { Textarea as mo } from "./fondue-components31.js";
31
- import { ThemeContext as fo, ThemeProvider as io, useFondueTheme as lo } from "./fondue-components32.js";
32
- import { Tooltip as no } from "./fondue-components33.js";
12
+ import { Flyout as k } from "./fondue-components13.js";
13
+ import { Grid as D } from "./fondue-components14.js";
14
+ import { Heading as P } from "./fondue-components15.js";
15
+ import { Label as w } from "./fondue-components16.js";
16
+ import { Link as y } from "./fondue-components17.js";
17
+ import { LoadingBar as H } from "./fondue-components18.js";
18
+ import { LoadingCircle as R } from "./fondue-components19.js";
19
+ import { RouterProvider as q } from "./fondue-components20.js";
20
+ import { ScrollArea as E } from "./fondue-components21.js";
21
+ import { Section as K } from "./fondue-components22.js";
22
+ import { SegmentedControl as N } from "./fondue-components23.js";
23
+ import { Select as Q } from "./fondue-components24.js";
24
+ import { Slider as V } from "./fondue-components25.js";
25
+ import { SplitButton as X } from "./fondue-components26.js";
26
+ import { Switch as Z } from "./fondue-components27.js";
27
+ import { Table as $ } from "./fondue-components28.js";
28
+ import { Tag as ro } from "./fondue-components29.js";
29
+ import { Tabs as to } from "./fondue-components30.js";
30
+ import { Text as mo } from "./fondue-components31.js";
31
+ import { TextInput as fo } from "./fondue-components32.js";
32
+ import { Textarea as lo } from "./fondue-components33.js";
33
+ import { ThemeContext as ao, ThemeProvider as To, useFondueTheme as co } from "./fondue-components34.js";
34
+ import { Tooltip as uo } from "./fondue-components35.js";
33
35
  export {
34
36
  t as Accordion,
35
37
  m as Badge,
36
38
  f as Box,
37
39
  l as Button,
38
- n as Checkbox,
40
+ a as Checkbox,
39
41
  T as ColorPicker,
40
42
  g as Dialog,
41
- u as Divider,
43
+ S as Divider,
42
44
  B as Dropdown,
43
45
  b as Flex,
44
- F as Flyout,
45
- k as Grid,
46
- v as Heading,
47
- A as Label,
48
- y as LoadingBar,
49
- H as LoadingCircle,
50
- j as ScrollArea,
51
- z as Section,
52
- J as SegmentedControl,
53
- M as Select,
54
- O as Slider,
55
- R as SplitButton,
56
- V as Switch,
57
- X as Table,
58
- $ as Tabs,
59
- Z as Tag,
60
- ro as Text,
61
- to as TextInput,
62
- mo as Textarea,
63
- fo as ThemeContext,
64
- io as ThemeProvider,
65
- no as Tooltip,
66
- lo as useFondueTheme
46
+ k as Flyout,
47
+ D as Grid,
48
+ P as Heading,
49
+ w as Label,
50
+ y as Link,
51
+ H as LoadingBar,
52
+ R as LoadingCircle,
53
+ q as RouterProvider,
54
+ E as ScrollArea,
55
+ K as Section,
56
+ N as SegmentedControl,
57
+ Q as Select,
58
+ V as Slider,
59
+ X as SplitButton,
60
+ Z as Switch,
61
+ $ as Table,
62
+ to as Tabs,
63
+ ro as Tag,
64
+ mo as Text,
65
+ fo as TextInput,
66
+ lo as Textarea,
67
+ ao as ThemeContext,
68
+ To as ThemeProvider,
69
+ uo as Tooltip,
70
+ co as useFondueTheme
67
71
  };
68
72
  //# sourceMappingURL=fondue-components.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"fondue-components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,9 +1,9 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import * as f from "@radix-ui/react-separator";
3
3
  import { forwardRef as l } from "react";
4
- import { cn as v } from "./fondue-components40.js";
5
- import c from "./fondue-components53.js";
6
- import { dividerStyles as h } from "./fondue-components54.js";
4
+ import { cn as v } from "./fondue-components42.js";
5
+ import c from "./fondue-components55.js";
6
+ import { dividerStyles as h } from "./fondue-components56.js";
7
7
  const u = l(
8
8
  ({
9
9
  "data-test-id": i = "fondue-divider",
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components10.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 borderStyles from './styles/borderStyles.module.scss';\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 /**\n * The html element to be used\n * @default \"div\"\n */\n as?: 'div' | 'li';\n /**\n * When `true`, signifies that it is purely visual, carries no semantic\n * meaning, and ensures it is not present in the accessibility tree.\n * @default false\n */\n decorative?: boolean;\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 color,\n as = 'div',\n decorative,\n ...props\n }: DividerProps,\n ref: ForwardedRef<HTMLDivElement | null>,\n ): ReactElement => {\n const Component = as;\n\n return (\n <Separator.Root\n ref={ref}\n className={cn(\n dividerStyles({\n direction,\n variant,\n color,\n ...props,\n }),\n borderStyles.root,\n className,\n )}\n data-variant={variant}\n data-color={color}\n data-test-id={dataTestId}\n decorative={decorative}\n data-orientation={direction}\n asChild\n >\n <Component />\n </Separator.Root>\n );\n },\n);\n\nDivider.displayName = 'Divider';\n"],"names":["Divider","forwardRef","dataTestId","direction","className","variant","color","as","decorative","props","ref","Component","jsx","Separator","cn","dividerStyles","borderStyles"],"mappings":";;;;;;AAmDO,MAAMA,IAAUC;AAAA,EACnB,CACI;AAAA,IACI,gBAAgBC,IAAa;AAAA,IAC7B,WAAAC,IAAY;AAAA,IACZ,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,IAAAC,IAAK;AAAA,IACL,YAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAEPC,MACe;AACf,UAAMC,IAAYJ;AAElB,WACI,gBAAAK;AAAA,MAACC,EAAU;AAAA,MAAV;AAAA,QACG,KAAAH;AAAA,QACA,WAAWI;AAAA,UACPC,EAAc;AAAA,YACV,WAAAZ;AAAA,YACA,SAAAE;AAAA,YACA,OAAAC;AAAA,YACA,GAAGG;AAAA,UAAA,CACN;AAAA,UACDO,EAAa;AAAA,UACbZ;AAAA,QAAA;AAAA,QAEJ,gBAAcC;AAAA,QACd,cAAYC;AAAA,QACZ,gBAAcJ;AAAA,QACd,YAAAM;AAAA,QACA,oBAAkBL;AAAA,QAClB,SAAO;AAAA,QAEP,4BAACQ,GAAA,CAAA,CAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EAGvB;AACJ;AAEAX,EAAQ,cAAc;"}
1
+ {"version":3,"file":"fondue-components10.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 borderStyles from './styles/borderStyles.module.scss';\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';\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 /**\n * The html element to be used\n * @default \"div\"\n */\n as?: 'div' | 'li';\n /**\n * When `true`, signifies that it is purely visual, carries no semantic\n * meaning, and ensures it is not present in the accessibility tree.\n * @default false\n */\n decorative?: boolean;\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 color,\n as = 'div',\n decorative,\n ...props\n }: DividerProps,\n ref: ForwardedRef<HTMLDivElement | null>,\n ): ReactElement => {\n const Component = as;\n\n return (\n <Separator.Root\n ref={ref}\n className={cn(\n dividerStyles({\n direction,\n variant,\n color,\n ...props,\n }),\n borderStyles.root,\n className,\n )}\n data-variant={variant}\n data-color={color}\n data-test-id={dataTestId}\n decorative={decorative}\n data-orientation={direction}\n asChild\n >\n <Component />\n </Separator.Root>\n );\n },\n);\n\nDivider.displayName = 'Divider';\n"],"names":["Divider","forwardRef","dataTestId","direction","className","variant","color","as","decorative","props","ref","Component","jsx","Separator","cn","dividerStyles","borderStyles"],"mappings":";;;;;;AAmDO,MAAMA,IAAUC;AAAA,EACnB,CACI;AAAA,IACI,gBAAgBC,IAAa;AAAA,IAC7B,WAAAC,IAAY;AAAA,IACZ,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,IAAAC,IAAK;AAAA,IACL,YAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAEPC,MACe;AACf,UAAMC,IAAYJ;AAElB,WACI,gBAAAK;AAAA,MAACC,EAAU;AAAA,MAAV;AAAA,QACG,KAAAH;AAAA,QACA,WAAWI;AAAA,UACPC,EAAc;AAAA,YACV,WAAAZ;AAAA,YACA,SAAAE;AAAA,YACA,OAAAC;AAAA,YACA,GAAGG;AAAA,UAAA,CACN;AAAA,UACDO,EAAa;AAAA,UACbZ;AAAA,QAAA;AAAA,QAEJ,gBAAcC;AAAA,QACd,cAAYC;AAAA,QACZ,gBAAcJ;AAAA,QACd,YAAAM;AAAA,QACA,oBAAkBL;AAAA,QAClB,SAAO;AAAA,QAEP,4BAACQ,GAAA,CAAA,CAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EAGvB;AACJ;AAEAX,EAAQ,cAAc;"}
@@ -1,102 +1,120 @@
1
- import { jsx as n, jsxs as R } from "react/jsx-runtime";
2
- import { IconCaretRight as E } from "@frontify/fondue-icons";
1
+ import { jsx as d, jsxs as S } from "react/jsx-runtime";
2
+ import { IconCaretRight as x } from "@frontify/fondue-icons";
3
3
  import * as a from "@radix-ui/react-dropdown-menu";
4
- import { forwardRef as i, useRef as S, useMemo as _, Children as j } from "react";
5
- import { useFondueTheme as C, ThemeProvider as I } from "./fondue-components32.js";
6
- import { useProcessedChildren as T } from "./fondue-components55.js";
7
- import s from "./fondue-components56.js";
8
- const y = ({
4
+ import { forwardRef as i, useRef as R, useMemo as _, Children as j } from "react";
5
+ import { useFondueTheme as C, ThemeProvider as F } from "./fondue-components34.js";
6
+ import { useProcessedChildren as I } from "./fondue-components57.js";
7
+ import u from "./fondue-components58.js";
8
+ const T = ({
9
9
  children: t,
10
10
  open: o,
11
- modal: e = !1,
12
- onOpenChange: r,
13
- "data-test-id": d = "fondue-dropdown"
14
- }) => /* @__PURE__ */ n(a.Root, { open: o, modal: e, onOpenChange: r, "data-test-id": d, children: t });
15
- y.displayName = "Dropdown.Root";
16
- const F = ({
11
+ modal: r = !1,
12
+ onOpenChange: n,
13
+ "data-test-id": e = "fondue-dropdown"
14
+ }) => /* @__PURE__ */ d(a.Root, { open: o, modal: r, onOpenChange: n, "data-test-id": e, children: t });
15
+ T.displayName = "Dropdown.Root";
16
+ const y = ({
17
17
  asChild: t = !0,
18
18
  children: o,
19
- "data-test-id": e = "fondue-dropdown-trigger",
20
- ...r
21
- }, d) => /* @__PURE__ */ n(a.Trigger, { asChild: t, "data-test-id": e, ref: d, ...r, children: o });
22
- F.displayName = "Dropdown.Trigger";
23
- const L = {
19
+ "data-test-id": r = "fondue-dropdown-trigger",
20
+ ...n
21
+ }, e) => /* @__PURE__ */ d(a.Trigger, { asChild: t, "data-test-id": r, ref: e, ...n, children: o });
22
+ y.displayName = "Dropdown.Trigger";
23
+ const B = {
24
24
  compact: 8,
25
25
  comfortable: 12,
26
26
  spacious: 16
27
- }, k = {
27
+ }, L = {
28
28
  compact: 8,
29
29
  spacious: 24
30
- }, P = ({
30
+ }, M = ({
31
31
  side: t = "bottom",
32
32
  align: o = "start",
33
- triggerOffset: e = "compact",
34
- children: r,
35
- preventTriggerFocusOnClose: d,
36
- viewportCollisionPadding: l = "compact",
33
+ triggerOffset: r = "compact",
34
+ children: n,
35
+ preventTriggerFocusOnClose: e,
36
+ viewportCollisionPadding: s = "compact",
37
37
  forceMount: p = !1,
38
38
  "data-test-id": g = "fondue-dropdown-content"
39
39
  }, D) => {
40
- const b = S(null), { theme: u, dir: c } = C(), w = D || b;
41
- return /* @__PURE__ */ n(a.Portal, { forceMount: p || void 0, children: /* @__PURE__ */ n(I, { theme: u, dir: c, children: /* @__PURE__ */ n(
40
+ const b = R(null), { theme: c, dir: l } = C(), w = D || b;
41
+ return /* @__PURE__ */ d(a.Portal, { forceMount: p || void 0, children: /* @__PURE__ */ d(F, { theme: c, dir: l, children: /* @__PURE__ */ d(
42
42
  a.Content,
43
43
  {
44
- dir: c,
44
+ dir: l,
45
45
  align: o,
46
- collisionPadding: k[l],
47
- sideOffset: L[e],
46
+ collisionPadding: L[s],
47
+ sideOffset: B[r],
48
48
  side: t,
49
- className: s.content,
49
+ className: u.content,
50
50
  "data-test-id": g,
51
51
  ref: w,
52
- onPointerDownOutside: (m) => {
52
+ onPointerDownOutside: (f) => {
53
53
  var N;
54
- if (!p || !(m.target instanceof Element) || !(w instanceof Object) || !("current" in w))
54
+ if (!p || !(f.target instanceof Element) || !(w instanceof Object) || !("current" in w))
55
55
  return;
56
- let f = m.target, h = null;
57
- for (; f && f !== document.body && (h = f.getAttribute("aria-controls"), !h); )
58
- f = f.parentElement;
59
- h === ((N = w.current) == null ? void 0 : N.id) && m.preventDefault();
56
+ let m = f.target, h = null;
57
+ for (; m && m !== document.body && (h = m.getAttribute("aria-controls"), !h); )
58
+ m = m.parentElement;
59
+ h === ((N = w.current) == null ? void 0 : N.id) && f.preventDefault();
60
60
  },
61
- onCloseAutoFocus: (m) => {
62
- d && m.preventDefault();
61
+ onCloseAutoFocus: (f) => {
62
+ e && f.preventDefault();
63
63
  },
64
64
  forceMount: p || void 0,
65
- children: r
65
+ children: n
66
66
  }
67
67
  ) }) });
68
68
  };
69
- P.displayName = "Dropdown.Content";
70
- const M = ({ children: t, heading: o, "data-test-id": e = "fondue-dropdown-group" }, r) => _(
71
- () => j.toArray(t).filter((l) => l !== null).length > 0,
69
+ M.displayName = "Dropdown.Content";
70
+ const P = ({ children: t, heading: o, "data-test-id": r = "fondue-dropdown-group" }, n) => _(
71
+ () => j.toArray(t).filter((s) => s !== null).length > 0,
72
72
  [t]
73
- ) ? /* @__PURE__ */ R(a.Group, { className: s.group, "data-test-id": e, ref: r, children: [
74
- o ? /* @__PURE__ */ n("div", { className: s.groupHeading, children: /* @__PURE__ */ n("span", { "aria-label": o, children: o }) }) : null,
73
+ ) ? /* @__PURE__ */ S(a.Group, { className: u.group, "data-test-id": r, ref: n, children: [
74
+ o ? /* @__PURE__ */ d("div", { className: u.groupHeading, children: /* @__PURE__ */ d("span", { "aria-label": o, children: o }) }) : null,
75
75
  t
76
76
  ] }) : null;
77
- M.displayName = "Dropdown.Group";
77
+ P.displayName = "Dropdown.Group";
78
78
  const A = ({
79
79
  children: t,
80
80
  "data-test-id": o = "fondue-dropdown-submenu"
81
- }) => /* @__PURE__ */ n(a.Sub, { "data-test-id": o, children: t });
81
+ }) => /* @__PURE__ */ d(a.Sub, { "data-test-id": o, children: t });
82
82
  A.displayName = "Dropdown.SubMenu";
83
- const G = ({ children: t, "data-test-id": o = "fondue-dropdown-subtrigger" }, e) => {
84
- const { content: r } = T(t);
85
- return /* @__PURE__ */ R(a.SubTrigger, { className: s.subTrigger, "data-test-id": o, ref: e, children: [
86
- r,
87
- /* @__PURE__ */ n(E, { className: s.subMenuIndicator, size: 16 })
88
- ] });
83
+ const G = ({ children: t, "data-test-id": o = "fondue-dropdown-subtrigger" }, r) => {
84
+ const { content: n } = I(t), e = R(!1);
85
+ return /* @__PURE__ */ S(
86
+ a.SubTrigger,
87
+ {
88
+ className: u.subTrigger,
89
+ "data-show-focus-ring": e.current,
90
+ "data-test-id": o,
91
+ ref: r,
92
+ onMouseEnter: () => {
93
+ e.current = !0;
94
+ },
95
+ onFocus: (s) => {
96
+ e.current || (s.target.dataset.showFocusRing = "true");
97
+ },
98
+ onBlur: (s) => {
99
+ s.target.dataset.showFocusRing = "false", e.current = !1;
100
+ },
101
+ children: [
102
+ n,
103
+ /* @__PURE__ */ d(x, { className: u.subMenuIndicator, size: 16 })
104
+ ]
105
+ }
106
+ );
89
107
  };
90
108
  G.displayName = "Dropdown.SubTrigger";
91
- const O = ({ children: t, "data-test-id": o = "fondue-dropdown-subcontent" }, e) => {
92
- const { theme: r, dir: d } = C();
93
- return /* @__PURE__ */ n(a.Portal, { children: /* @__PURE__ */ n(I, { theme: r, dir: d, children: /* @__PURE__ */ n(
109
+ const O = ({ children: t, "data-test-id": o = "fondue-dropdown-subcontent" }, r) => {
110
+ const { theme: n, dir: e } = C();
111
+ return /* @__PURE__ */ d(a.Portal, { children: /* @__PURE__ */ d(F, { theme: n, dir: e, children: /* @__PURE__ */ d(
94
112
  a.SubContent,
95
113
  {
96
- dir: d,
97
- className: s.subContent,
114
+ dir: e,
115
+ className: u.subContent,
98
116
  "data-test-id": o,
99
- ref: e,
117
+ ref: r,
100
118
  children: t
101
119
  }
102
120
  ) }) });
@@ -105,34 +123,34 @@ O.displayName = "Dropdown.SubContent";
105
123
  const v = ({
106
124
  children: t,
107
125
  disabled: o,
108
- textValue: e,
109
- onSelect: r,
110
- emphasis: d = "default",
111
- asChild: l = !1,
126
+ textValue: r,
127
+ onSelect: n,
128
+ emphasis: e = "default",
129
+ asChild: s = !1,
112
130
  "data-test-id": p = "fondue-dropdown-subtrigger",
113
131
  ...g
114
132
  }, D) => {
115
- const { content: b } = T(t), u = S(!1);
116
- return /* @__PURE__ */ n(
133
+ const { content: b } = I(t), c = R(!1);
134
+ return /* @__PURE__ */ d(
117
135
  a.Item,
118
136
  {
119
- onSelect: r,
120
- className: s.item,
121
- textValue: e,
137
+ onSelect: n,
138
+ className: u.item,
139
+ textValue: r,
122
140
  "data-test-id": p,
123
- "data-emphasis": d,
141
+ "data-emphasis": e,
124
142
  ref: D,
125
143
  disabled: o,
126
- asChild: l,
127
- "data-show-focus-ring": u.current,
144
+ asChild: s,
145
+ "data-show-focus-ring": c.current,
128
146
  onMouseEnter: () => {
129
- u.current = !0;
147
+ c.current = !0;
130
148
  },
131
- onFocus: (c) => {
132
- u.current || (c.target.dataset.showFocusRing = "true");
149
+ onFocus: (l) => {
150
+ c.current || (l.target.dataset.showFocusRing = "true");
133
151
  },
134
- onBlur: (c) => {
135
- c.target.dataset.showFocusRing = "false", u.current = !1;
152
+ onBlur: (l) => {
153
+ l.target.dataset.showFocusRing = "false", c.current = !1;
136
154
  },
137
155
  ...g,
138
156
  children: b
@@ -140,12 +158,12 @@ const v = ({
140
158
  );
141
159
  };
142
160
  v.displayName = "Dropdown.Item";
143
- const x = ({ children: t, name: o, "data-test-id": e = "fondue-dropdown-slot" }, r) => /* @__PURE__ */ n("div", { "data-name": o, className: s.slot, "data-test-id": e, ref: r, children: t });
144
- x.displayName = "Dropdown.Slot";
145
- const z = i(F), B = i(P), H = i(M), V = i(G), W = i(O), q = i(v), J = i(x), $ = {
146
- Root: y,
147
- Trigger: z,
148
- Content: B,
161
+ const E = ({ children: t, name: o, "data-test-id": r = "fondue-dropdown-slot" }, n) => /* @__PURE__ */ d("div", { "data-name": o, className: u.slot, "data-test-id": r, ref: n, children: t });
162
+ E.displayName = "Dropdown.Slot";
163
+ const k = i(y), z = i(M), H = i(P), V = i(G), W = i(O), q = i(v), J = i(E), $ = {
164
+ Root: T,
165
+ Trigger: k,
166
+ Content: z,
149
167
  Group: H,
150
168
  SubMenu: A,
151
169
  SubTrigger: V,
@@ -155,14 +173,14 @@ const z = i(F), B = i(P), H = i(M), V = i(G), W = i(O), q = i(v), J = i(x), $ =
155
173
  };
156
174
  export {
157
175
  $ as Dropdown,
158
- P as DropdownContent,
159
- M as DropdownGroup,
176
+ M as DropdownContent,
177
+ P as DropdownGroup,
160
178
  v as DropdownItem,
161
- y as DropdownRoot,
162
- x as DropdownSlot,
179
+ T as DropdownRoot,
180
+ E as DropdownSlot,
163
181
  O as DropdownSubContent,
164
182
  A as DropdownSubMenu,
165
183
  G as DropdownSubTrigger,
166
- F as DropdownTrigger
184
+ y as DropdownTrigger
167
185
  };
168
186
  //# sourceMappingURL=fondue-components11.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components11.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 { Children, forwardRef, useMemo, useRef, 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';\ntype DropdownViewportCollisionPadding = 'compact' | 'spacious';\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 * Define the minimum distance between the dropdown and the viewport edge\n * @default 'compact'\n */\n viewportCollisionPadding?: DropdownViewportCollisionPadding;\n /**\n * When true, the content will always be mounted in the DOM. Before enabling, make sure you really need it.\n * @default false\n */\n forceMount?: boolean;\n};\n\nconst SPACING_MAP: Record<DropdownSpacing, number> = {\n compact: 8,\n comfortable: 12,\n spacious: 16,\n};\n\nconst VIEWPORT_COLLISION_PADDING_MAP: Record<DropdownViewportCollisionPadding, number> = {\n compact: 8,\n spacious: 24,\n};\n\nexport const DropdownContent = (\n {\n side = 'bottom',\n align = 'start',\n triggerOffset = 'compact',\n children,\n preventTriggerFocusOnClose,\n viewportCollisionPadding = 'compact',\n forceMount = false,\n 'data-test-id': dataTestId = 'fondue-dropdown-content',\n }: DropdownContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const localRef = useRef<HTMLDivElement>(null);\n const { theme, dir } = useFondueTheme();\n const actualRef = ref || localRef;\n return (\n <RadixDropdown.Portal forceMount={forceMount || undefined}>\n <ThemeProvider theme={theme} dir={dir}>\n <RadixDropdown.Content\n // @ts-expect-error - dir prop works at runtime but is not in the Radix UI type definition\n dir={dir}\n align={align}\n collisionPadding={VIEWPORT_COLLISION_PADDING_MAP[viewportCollisionPadding]}\n sideOffset={SPACING_MAP[triggerOffset]}\n side={side}\n className={styles.content}\n data-test-id={dataTestId}\n ref={actualRef}\n onPointerDownOutside={(event) => {\n if (!forceMount) {\n return;\n }\n\n if (!(event.target instanceof Element)) {\n return;\n }\n\n if (!(actualRef instanceof Object) || !('current' in actualRef)) {\n return;\n }\n\n let element: Element | null = event.target;\n let controlsId: string | null = null;\n\n while (element && element !== document.body) {\n controlsId = element.getAttribute('aria-controls');\n\n if (controlsId) {\n break;\n }\n\n element = element.parentElement;\n }\n\n if (controlsId === actualRef.current?.id) {\n event.preventDefault();\n }\n }}\n onCloseAutoFocus={(event) => {\n if (preventTriggerFocusOnClose) {\n event.preventDefault();\n }\n }}\n forceMount={forceMount || undefined}\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 const hasChildren = useMemo(\n () => Children.toArray(children).filter((child) => child !== null).length > 0,\n [children],\n );\n\n if (!hasChildren) {\n return null;\n }\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, dir } = useFondueTheme();\n\n return (\n <RadixDropdown.Portal>\n <ThemeProvider theme={theme} dir={dir}>\n <RadixDropdown.SubContent\n // @ts-expect-error - dir prop works at runtime but is not in the Radix UI type definition\n dir={dir}\n className={styles.subContent}\n data-test-id={dataTestId}\n ref={ref}\n >\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 const wasMouseInteracted = useRef(false);\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 data-show-focus-ring={wasMouseInteracted.current}\n onMouseEnter={() => {\n wasMouseInteracted.current = true;\n }}\n onFocus={(focusEvent) => {\n if (!wasMouseInteracted.current) {\n focusEvent.target.dataset.showFocusRing = 'true';\n }\n }}\n onBlur={(blurEvent) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasMouseInteracted.current = false;\n }}\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","VIEWPORT_COLLISION_PADDING_MAP","DropdownContent","side","align","triggerOffset","preventTriggerFocusOnClose","viewportCollisionPadding","forceMount","localRef","useRef","theme","dir","useFondueTheme","actualRef","ThemeProvider","styles","event","element","controlsId","_a","DropdownGroup","heading","useMemo","Children","child","jsxs","DropdownSubMenu","DropdownSubTrigger","content","useProcessedChildren","IconCaretRight","DropdownSubContent","DropdownItem","disabled","textValue","onSelect","emphasis","wasMouseInteracted","focusEvent","blurEvent","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;AAA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ropdown.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 { Children, forwardRef, useMemo, useRef, 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';\ntype DropdownViewportCollisionPadding = 'compact' | 'spacious';\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 * Define the minimum distance between the dropdown and the viewport edge\n * @default 'compact'\n */\n viewportCollisionPadding?: DropdownViewportCollisionPadding;\n /**\n * When true, the content will always be mounted in the DOM. Before enabling, make sure you really need it.\n * @default false\n */\n forceMount?: boolean;\n};\n\nconst SPACING_MAP: Record<DropdownSpacing, number> = {\n compact: 8,\n comfortable: 12,\n spacious: 16,\n};\n\nconst VIEWPORT_COLLISION_PADDING_MAP: Record<DropdownViewportCollisionPadding, number> = {\n compact: 8,\n spacious: 24,\n};\n\nexport const DropdownContent = (\n {\n side = 'bottom',\n align = 'start',\n triggerOffset = 'compact',\n children,\n preventTriggerFocusOnClose,\n viewportCollisionPadding = 'compact',\n forceMount = false,\n 'data-test-id': dataTestId = 'fondue-dropdown-content',\n }: DropdownContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const localRef = useRef<HTMLDivElement>(null);\n const { theme, dir } = useFondueTheme();\n const actualRef = ref || localRef;\n return (\n <RadixDropdown.Portal forceMount={forceMount || undefined}>\n <ThemeProvider theme={theme} dir={dir}>\n <RadixDropdown.Content\n // @ts-expect-error - dir prop works at runtime but is not in the Radix UI type definition\n dir={dir}\n align={align}\n collisionPadding={VIEWPORT_COLLISION_PADDING_MAP[viewportCollisionPadding]}\n sideOffset={SPACING_MAP[triggerOffset]}\n side={side}\n className={styles.content}\n data-test-id={dataTestId}\n ref={actualRef}\n onPointerDownOutside={(event) => {\n if (!forceMount) {\n return;\n }\n\n if (!(event.target instanceof Element)) {\n return;\n }\n\n if (!(actualRef instanceof Object) || !('current' in actualRef)) {\n return;\n }\n\n let element: Element | null = event.target;\n let controlsId: string | null = null;\n\n while (element && element !== document.body) {\n controlsId = element.getAttribute('aria-controls');\n\n if (controlsId) {\n break;\n }\n\n element = element.parentElement;\n }\n\n if (controlsId === actualRef.current?.id) {\n event.preventDefault();\n }\n }}\n onCloseAutoFocus={(event) => {\n if (preventTriggerFocusOnClose) {\n event.preventDefault();\n }\n }}\n forceMount={forceMount || undefined}\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 const hasChildren = useMemo(\n () => Children.toArray(children).filter((child) => child !== null).length > 0,\n [children],\n );\n\n if (!hasChildren) {\n return null;\n }\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 const wasMouseInteracted = useRef(false);\n return (\n <RadixDropdown.SubTrigger\n className={styles.subTrigger}\n data-show-focus-ring={wasMouseInteracted.current}\n data-test-id={dataTestId}\n ref={ref}\n onMouseEnter={() => {\n wasMouseInteracted.current = true;\n }}\n onFocus={(focusEvent) => {\n if (!wasMouseInteracted.current) {\n focusEvent.target.dataset.showFocusRing = 'true';\n }\n }}\n onBlur={(blurEvent) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasMouseInteracted.current = false;\n }}\n >\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, dir } = useFondueTheme();\n\n return (\n <RadixDropdown.Portal>\n <ThemeProvider theme={theme} dir={dir}>\n <RadixDropdown.SubContent\n // @ts-expect-error - dir prop works at runtime but is not in the Radix UI type definition\n dir={dir}\n className={styles.subContent}\n data-test-id={dataTestId}\n ref={ref}\n >\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 const wasMouseInteracted = useRef(false);\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 data-show-focus-ring={wasMouseInteracted.current}\n onMouseEnter={() => {\n wasMouseInteracted.current = true;\n }}\n onFocus={(focusEvent) => {\n if (!wasMouseInteracted.current) {\n focusEvent.target.dataset.showFocusRing = 'true';\n }\n }}\n onBlur={(blurEvent) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasMouseInteracted.current = false;\n }}\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","VIEWPORT_COLLISION_PADDING_MAP","DropdownContent","side","align","triggerOffset","preventTriggerFocusOnClose","viewportCollisionPadding","forceMount","localRef","useRef","theme","dir","useFondueTheme","actualRef","ThemeProvider","styles","event","element","controlsId","_a","DropdownGroup","heading","useMemo","Children","child","jsxs","DropdownSubMenu","DropdownSubTrigger","content","useProcessedChildren","wasMouseInteracted","focusEvent","blurEvent","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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AAA,EACZ,YAAYC;AAAA,EACZ,MAAMC;AAAA,EACN,MAAMC;AACV;"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import { forwardRef as n } from "react";
3
- import { propsToCssVariables as y } from "./fondue-components38.js";
4
- import x from "./fondue-components57.js";
3
+ import { propsToCssVariables as y } from "./fondue-components40.js";
4
+ import x from "./fondue-components59.js";
5
5
  const u = n(
6
6
  ({
7
7
  as: a = "div",