@frontify/fondue-components 20.0.0-beta.8 → 20.0.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 (175) hide show
  1. package/dist/fondue-components.js +46 -50
  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 +66 -84
  6. package/dist/fondue-components11.js.map +1 -1
  7. package/dist/fondue-components12.js +2 -2
  8. package/dist/fondue-components13.js +49 -50
  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 +36 -56
  14. package/dist/fondue-components17.js.map +1 -1
  15. package/dist/fondue-components18.js +16 -34
  16. package/dist/fondue-components18.js.map +1 -1
  17. package/dist/fondue-components19.js +71 -21
  18. package/dist/fondue-components19.js.map +1 -1
  19. package/dist/fondue-components20.js +36 -18
  20. package/dist/fondue-components20.js.map +1 -1
  21. package/dist/fondue-components21.js +55 -71
  22. package/dist/fondue-components21.js.map +1 -1
  23. package/dist/fondue-components22.js +138 -36
  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 +29 -138
  28. package/dist/fondue-components24.js.map +1 -1
  29. package/dist/fondue-components25.js +157 -53
  30. package/dist/fondue-components25.js.map +1 -1
  31. package/dist/fondue-components26.js +137 -29
  32. package/dist/fondue-components26.js.map +1 -1
  33. package/dist/fondue-components27.js +127 -157
  34. package/dist/fondue-components27.js.map +1 -1
  35. package/dist/fondue-components28.js +30 -134
  36. package/dist/fondue-components28.js.map +1 -1
  37. package/dist/fondue-components29.js +58 -128
  38. package/dist/fondue-components29.js.map +1 -1
  39. package/dist/fondue-components3.js +1 -1
  40. package/dist/fondue-components30.js +101 -31
  41. package/dist/fondue-components30.js.map +1 -1
  42. package/dist/fondue-components31.js +12 -59
  43. package/dist/fondue-components31.js.map +1 -1
  44. package/dist/fondue-components32.js +52 -97
  45. package/dist/fondue-components32.js.map +1 -1
  46. package/dist/fondue-components33.js +20 -12
  47. package/dist/fondue-components33.js.map +1 -1
  48. package/dist/fondue-components34.js +7 -55
  49. package/dist/fondue-components34.js.map +1 -1
  50. package/dist/fondue-components35.js +6 -20
  51. package/dist/fondue-components35.js.map +1 -1
  52. package/dist/fondue-components36.js +32 -8
  53. package/dist/fondue-components36.js.map +1 -1
  54. package/dist/fondue-components37.js +3 -5
  55. package/dist/fondue-components37.js.map +1 -1
  56. package/dist/fondue-components38.js +12 -32
  57. package/dist/fondue-components38.js.map +1 -1
  58. package/dist/fondue-components39.js +155 -5
  59. package/dist/fondue-components39.js.map +1 -1
  60. package/dist/fondue-components4.js +2 -2
  61. package/dist/fondue-components40.js +116 -18
  62. package/dist/fondue-components40.js.map +1 -1
  63. package/dist/fondue-components41.js +22 -59
  64. package/dist/fondue-components41.js.map +1 -1
  65. package/dist/fondue-components42.js +14 -111
  66. package/dist/fondue-components42.js.map +1 -1
  67. package/dist/fondue-components43.js +30 -116
  68. package/dist/fondue-components43.js.map +1 -1
  69. package/dist/fondue-components44.js +53 -21
  70. package/dist/fondue-components44.js.map +1 -1
  71. package/dist/fondue-components45.js +129 -31
  72. package/dist/fondue-components45.js.map +1 -1
  73. package/dist/fondue-components46.js +20 -52
  74. package/dist/fondue-components46.js.map +1 -1
  75. package/dist/fondue-components47.js +53 -130
  76. package/dist/fondue-components47.js.map +1 -1
  77. package/dist/fondue-components48.js +7 -20
  78. package/dist/fondue-components48.js.map +1 -1
  79. package/dist/fondue-components49.js +13 -53
  80. package/dist/fondue-components49.js.map +1 -1
  81. package/dist/fondue-components5.js +2 -2
  82. package/dist/fondue-components50.js +14 -7
  83. package/dist/fondue-components50.js.map +1 -1
  84. package/dist/fondue-components51.js +5 -13
  85. package/dist/fondue-components51.js.map +1 -1
  86. package/dist/fondue-components52.js +60 -15
  87. package/dist/fondue-components52.js.map +1 -1
  88. package/dist/fondue-components53.js +18 -5
  89. package/dist/fondue-components53.js.map +1 -1
  90. package/dist/fondue-components54.js +19 -59
  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 +14 -18
  95. package/dist/fondue-components56.js.map +1 -1
  96. package/dist/fondue-components57.js +1 -1
  97. package/dist/fondue-components58.js +16 -10
  98. package/dist/fondue-components58.js.map +1 -1
  99. package/dist/fondue-components59.js +10 -4
  100. package/dist/fondue-components59.js.map +1 -1
  101. package/dist/fondue-components6.js +4 -4
  102. package/dist/fondue-components60.js +35 -18
  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 +10 -34
  107. package/dist/fondue-components62.js.map +1 -1
  108. package/dist/fondue-components63.js +5 -35
  109. package/dist/fondue-components63.js.map +1 -1
  110. package/dist/fondue-components64.js +24 -4
  111. package/dist/fondue-components64.js.map +1 -1
  112. package/dist/fondue-components65.js +16 -12
  113. package/dist/fondue-components65.js.map +1 -1
  114. package/dist/fondue-components66.js +150 -4
  115. package/dist/fondue-components66.js.map +1 -1
  116. package/dist/fondue-components67.js +19 -25
  117. package/dist/fondue-components67.js.map +1 -1
  118. package/dist/fondue-components68.js +77 -16
  119. package/dist/fondue-components68.js.map +1 -1
  120. package/dist/fondue-components69.js +8 -151
  121. package/dist/fondue-components69.js.map +1 -1
  122. package/dist/fondue-components7.js +2 -2
  123. package/dist/fondue-components70.js +37 -19
  124. package/dist/fondue-components70.js.map +1 -1
  125. package/dist/fondue-components71.js +69 -76
  126. package/dist/fondue-components71.js.map +1 -1
  127. package/dist/fondue-components72.js +11 -8
  128. package/dist/fondue-components72.js.map +1 -1
  129. package/dist/fondue-components73.js +12 -36
  130. package/dist/fondue-components73.js.map +1 -1
  131. package/dist/fondue-components74.js +12 -70
  132. package/dist/fondue-components74.js.map +1 -1
  133. package/dist/fondue-components75.js +20 -10
  134. package/dist/fondue-components75.js.map +1 -1
  135. package/dist/fondue-components76.js +34 -13
  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 +55 -20
  140. package/dist/fondue-components78.js.map +1 -1
  141. package/dist/fondue-components79.js +15 -34
  142. package/dist/fondue-components79.js.map +1 -1
  143. package/dist/fondue-components8.js +5 -5
  144. package/dist/fondue-components80.js +24 -9
  145. package/dist/fondue-components80.js.map +1 -1
  146. package/dist/fondue-components81.js +14 -55
  147. package/dist/fondue-components81.js.map +1 -1
  148. package/dist/fondue-components82.js +22 -14
  149. package/dist/fondue-components82.js.map +1 -1
  150. package/dist/fondue-components83.js +6 -24
  151. package/dist/fondue-components83.js.map +1 -1
  152. package/dist/fondue-components84.js +5 -13
  153. package/dist/fondue-components84.js.map +1 -1
  154. package/dist/fondue-components85.js +4 -22
  155. package/dist/fondue-components85.js.map +1 -1
  156. package/dist/fondue-components86.js +4 -8
  157. package/dist/fondue-components86.js.map +1 -1
  158. package/dist/fondue-components87.js +2 -7
  159. package/dist/fondue-components87.js.map +1 -1
  160. package/dist/fondue-components88.js +39 -4
  161. package/dist/fondue-components88.js.map +1 -1
  162. package/dist/fondue-components89.js +6 -5
  163. package/dist/fondue-components89.js.map +1 -1
  164. package/dist/fondue-components9.js +42 -45
  165. package/dist/fondue-components9.js.map +1 -1
  166. package/dist/fondue-components90.js +10 -10
  167. package/dist/index.d.ts +6 -119
  168. package/dist/style.css +1 -1
  169. package/package.json +5 -6
  170. package/dist/fondue-components91.js +0 -5
  171. package/dist/fondue-components91.js.map +0 -1
  172. package/dist/fondue-components92.js +0 -43
  173. package/dist/fondue-components92.js.map +0 -1
  174. package/dist/fondue-components93.js +0 -9
  175. package/dist/fondue-components93.js.map +0 -1
@@ -3,68 +3,64 @@ 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 a } from "./fondue-components6.js";
6
- import { Checkbox as l } from "./fondue-components7.js";
6
+ import { Checkbox as d } 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 S } from "./fondue-components10.js";
9
+ import { Divider as h } from "./fondue-components10.js";
10
10
  import { Dropdown as C } from "./fondue-components11.js";
11
11
  import { Flex as B } from "./fondue-components12.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 { Switch as X } from "./fondue-components26.js";
26
- import { Table as Z } from "./fondue-components27.js";
27
- import { Tag as $ } from "./fondue-components28.js";
28
- import { Tabs as ro } from "./fondue-components29.js";
29
- import { Text as to } from "./fondue-components30.js";
30
- import { TextInput as mo } from "./fondue-components31.js";
31
- import { Textarea as fo } from "./fondue-components32.js";
32
- import { ThemeContext as ao, ThemeProvider as lo, useFondueTheme as no } from "./fondue-components33.js";
33
- import { Tooltip as co } from "./fondue-components34.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 { Switch as R } from "./fondue-components24.js";
24
+ import { Table as V } from "./fondue-components25.js";
25
+ import { Tag as X } from "./fondue-components26.js";
26
+ import { Tabs as Z } from "./fondue-components27.js";
27
+ import { Text as $ } from "./fondue-components28.js";
28
+ import { TextInput as ro } from "./fondue-components29.js";
29
+ import { Textarea as to } from "./fondue-components30.js";
30
+ import { ThemeContext as mo, ThemeProvider as po, useFondueTheme as fo } from "./fondue-components31.js";
31
+ import { Tooltip as ao } from "./fondue-components32.js";
34
32
  export {
35
33
  t as Accordion,
36
34
  m as Badge,
37
35
  f as Box,
38
36
  a as Button,
39
- l as Checkbox,
37
+ d as Checkbox,
40
38
  T as ColorPicker,
41
39
  g as Dialog,
42
- S as Divider,
40
+ h as Divider,
43
41
  C as Dropdown,
44
42
  B as Flex,
45
- k as Flyout,
46
- D as Grid,
47
- P as Heading,
48
- w as Label,
49
- y as Link,
50
- H as LoadingBar,
51
- R as LoadingCircle,
52
- q as RouterProvider,
53
- E as ScrollArea,
54
- K as Section,
55
- N as SegmentedControl,
56
- Q as Select,
57
- V as Slider,
58
- X as Switch,
59
- Z as Table,
60
- ro as Tabs,
61
- $ as Tag,
62
- to as Text,
63
- mo as TextInput,
64
- fo as Textarea,
65
- ao as ThemeContext,
66
- lo as ThemeProvider,
67
- co as Tooltip,
68
- no as useFondueTheme
43
+ F as Flyout,
44
+ k as Grid,
45
+ v as Heading,
46
+ A as Label,
47
+ y as LoadingBar,
48
+ H as LoadingCircle,
49
+ j as ScrollArea,
50
+ z as Section,
51
+ J as SegmentedControl,
52
+ M as Select,
53
+ O as Slider,
54
+ R as Switch,
55
+ V as Table,
56
+ Z as Tabs,
57
+ X as Tag,
58
+ $ as Text,
59
+ ro as TextInput,
60
+ to as Textarea,
61
+ mo as ThemeContext,
62
+ po as ThemeProvider,
63
+ ao as Tooltip,
64
+ fo as useFondueTheme
69
65
  };
70
66
  //# 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 t } from "react/jsx-runtime";
2
2
  import * as p from "@radix-ui/react-separator";
3
3
  import { forwardRef as f } from "react";
4
- import { cn as l } from "./fondue-components40.js";
5
- import v from "./fondue-components53.js";
6
- import { dividerStyles as c } from "./fondue-components54.js";
4
+ import { cn as l } from "./fondue-components38.js";
5
+ import v from "./fondue-components51.js";
6
+ import { dividerStyles as c } from "./fondue-components52.js";
7
7
  const h = f(
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';\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 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 ...props,\n }),\n borderStyles.root,\n className,\n )}\n data-variant={variant}\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","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,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,WAAAX;AAAA,YACA,SAAAE;AAAA,YACA,GAAGG;AAAA,UAAA,CACN;AAAA,UACDO,EAAa;AAAA,UACbX;AAAA,QAAA;AAAA,QAEJ,gBAAcC;AAAA,QACd,gBAAcH;AAAA,QACd,YAAAK;AAAA,QACA,oBAAkBJ;AAAA,QAClB,SAAO;AAAA,QAEP,4BAACO,GAAA,CAAA,CAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EAGvB;AACJ;AAEAV,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' | '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 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 ...props,\n }),\n borderStyles.root,\n className,\n )}\n data-variant={variant}\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","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,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,WAAAX;AAAA,YACA,SAAAE;AAAA,YACA,GAAGG;AAAA,UAAA,CACN;AAAA,UACDO,EAAa;AAAA,UACbX;AAAA,QAAA;AAAA,QAEJ,gBAAcC;AAAA,QACd,gBAAcH;AAAA,QACd,YAAAK;AAAA,QACA,oBAAkBJ;AAAA,QAClB,SAAO;AAAA,QAEP,4BAACO,GAAA,CAAA,CAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EAGvB;AACJ;AAEAV,EAAQ,cAAc;"}
@@ -1,24 +1,24 @@
1
1
  import { jsx as n, jsxs as g } from "react/jsx-runtime";
2
- import { IconCaretRight as G } from "@frontify/fondue-icons";
3
- import * as s from "@radix-ui/react-dropdown-menu";
4
- import { forwardRef as i, useMemo as A, Children as v, useRef as D } from "react";
5
- import { useFondueTheme as b, ThemeProvider as h } from "./fondue-components33.js";
6
- import { useProcessedChildren as N } from "./fondue-components55.js";
7
- import u from "./fondue-components56.js";
8
- const R = ({
2
+ import { IconCaretRight as M } from "@frontify/fondue-icons";
3
+ import * as d from "@radix-ui/react-dropdown-menu";
4
+ import { forwardRef as i, useMemo as G, Children as A, useRef as v } from "react";
5
+ import { useFondueTheme as D, ThemeProvider as b } from "./fondue-components31.js";
6
+ import { useProcessedChildren as h } from "./fondue-components53.js";
7
+ import s from "./fondue-components54.js";
8
+ const N = ({
9
9
  children: o,
10
10
  open: t,
11
11
  modal: e = !1,
12
12
  onOpenChange: r,
13
- "data-test-id": d = "fondue-dropdown"
14
- }) => /* @__PURE__ */ n(s.Root, { open: t, modal: e, onOpenChange: r, "data-test-id": d, children: o });
15
- R.displayName = "Dropdown.Root";
13
+ "data-test-id": a = "fondue-dropdown"
14
+ }) => /* @__PURE__ */ n(d.Root, { open: t, modal: e, onOpenChange: r, "data-test-id": a, children: o });
15
+ N.displayName = "Dropdown.Root";
16
16
  const S = ({
17
17
  asChild: o = !0,
18
18
  children: t,
19
19
  "data-test-id": e = "fondue-dropdown-trigger",
20
20
  ...r
21
- }, d) => /* @__PURE__ */ n(s.Trigger, { asChild: o, "data-test-id": e, ref: d, ...r, children: t });
21
+ }, a) => /* @__PURE__ */ n(d.Trigger, { asChild: o, "data-test-id": e, ref: a, ...r, children: t });
22
22
  S.displayName = "Dropdown.Trigger";
23
23
  const x = {
24
24
  compact: 8,
@@ -32,95 +32,77 @@ const x = {
32
32
  align: t = "start",
33
33
  triggerOffset: e = "compact",
34
34
  children: r,
35
- preventTriggerFocusOnClose: d,
36
- viewportCollisionPadding: a = "compact",
35
+ preventTriggerFocusOnClose: a,
36
+ viewportCollisionPadding: u = "compact",
37
37
  "data-test-id": p = "fondue-dropdown-content"
38
38
  }, l) => {
39
- const w = b();
40
- return /* @__PURE__ */ n(s.Portal, { children: /* @__PURE__ */ n(h, { theme: w, children: /* @__PURE__ */ n(
41
- s.Content,
39
+ const m = D();
40
+ return /* @__PURE__ */ n(d.Portal, { children: /* @__PURE__ */ n(b, { theme: m, children: /* @__PURE__ */ n(
41
+ d.Content,
42
42
  {
43
43
  align: t,
44
- collisionPadding: O[a],
44
+ collisionPadding: O[u],
45
45
  sideOffset: x[e],
46
46
  side: o,
47
- className: u.content,
47
+ className: s.content,
48
48
  "data-test-id": p,
49
49
  ref: l,
50
- onCloseAutoFocus: (m) => {
51
- d && m.preventDefault();
50
+ onCloseAutoFocus: (w) => {
51
+ a && w.preventDefault();
52
52
  },
53
53
  children: r
54
54
  }
55
55
  ) }) });
56
56
  };
57
57
  C.displayName = "Dropdown.Content";
58
- const F = ({ children: o, heading: t, "data-test-id": e = "fondue-dropdown-group" }, r) => A(
59
- () => v.toArray(o).filter((a) => a !== null).length > 0,
58
+ const R = ({ children: o, heading: t, "data-test-id": e = "fondue-dropdown-group" }, r) => G(
59
+ () => A.toArray(o).filter((u) => u !== null).length > 0,
60
60
  [o]
61
- ) ? /* @__PURE__ */ g(s.Group, { className: u.group, "data-test-id": e, ref: r, children: [
62
- t ? /* @__PURE__ */ n("div", { className: u.groupHeading, children: /* @__PURE__ */ n("span", { "aria-label": t, children: t }) }) : null,
61
+ ) ? /* @__PURE__ */ g(d.Group, { className: s.group, "data-test-id": e, ref: r, children: [
62
+ t ? /* @__PURE__ */ n("div", { className: s.groupHeading, children: /* @__PURE__ */ n("span", { "aria-label": t, children: t }) }) : null,
63
63
  o
64
64
  ] }) : null;
65
- F.displayName = "Dropdown.Group";
66
- const I = ({
65
+ R.displayName = "Dropdown.Group";
66
+ const T = ({
67
67
  children: o,
68
68
  "data-test-id": t = "fondue-dropdown-submenu"
69
- }) => /* @__PURE__ */ n(s.Sub, { "data-test-id": t, children: o });
70
- I.displayName = "Dropdown.SubMenu";
71
- const T = ({ children: o, "data-test-id": t = "fondue-dropdown-subtrigger" }, e) => {
72
- const { content: r } = N(o), d = D(!1);
73
- return /* @__PURE__ */ g(
74
- s.SubTrigger,
75
- {
76
- className: u.subTrigger,
77
- "data-show-focus-ring": d.current,
78
- "data-test-id": t,
79
- ref: e,
80
- onMouseEnter: () => {
81
- d.current = !0;
82
- },
83
- onFocus: (a) => {
84
- d.current || (a.target.dataset.showFocusRing = "true");
85
- },
86
- onBlur: (a) => {
87
- a.target.dataset.showFocusRing = "false", d.current = !1;
88
- },
89
- children: [
90
- r,
91
- /* @__PURE__ */ n(G, { className: u.subMenuIndicator, size: 16 })
92
- ]
93
- }
94
- );
69
+ }) => /* @__PURE__ */ n(d.Sub, { "data-test-id": t, children: o });
70
+ T.displayName = "Dropdown.SubMenu";
71
+ const I = ({ children: o, "data-test-id": t = "fondue-dropdown-subtrigger" }, e) => {
72
+ const { content: r } = h(o);
73
+ return /* @__PURE__ */ g(d.SubTrigger, { className: s.subTrigger, "data-test-id": t, ref: e, children: [
74
+ r,
75
+ /* @__PURE__ */ n(M, { className: s.subMenuIndicator, size: 16 })
76
+ ] });
95
77
  };
96
- T.displayName = "Dropdown.SubTrigger";
97
- const y = ({ children: o, "data-test-id": t = "fondue-dropdown-subcontent" }, e) => {
98
- const r = b();
99
- return /* @__PURE__ */ n(s.Portal, { children: /* @__PURE__ */ n(h, { theme: r, children: /* @__PURE__ */ n(s.SubContent, { className: u.subContent, "data-test-id": t, ref: e, children: o }) }) });
78
+ I.displayName = "Dropdown.SubTrigger";
79
+ const F = ({ children: o, "data-test-id": t = "fondue-dropdown-subcontent" }, e) => {
80
+ const r = D();
81
+ return /* @__PURE__ */ n(d.Portal, { children: /* @__PURE__ */ n(b, { theme: r, children: /* @__PURE__ */ n(d.SubContent, { className: s.subContent, "data-test-id": t, ref: e, children: o }) }) });
100
82
  };
101
- y.displayName = "Dropdown.SubContent";
102
- const M = ({
83
+ F.displayName = "Dropdown.SubContent";
84
+ const y = ({
103
85
  children: o,
104
86
  disabled: t,
105
87
  textValue: e,
106
88
  onSelect: r,
107
- emphasis: d = "default",
108
- asChild: a = !1,
89
+ emphasis: a = "default",
90
+ asChild: u = !1,
109
91
  "data-test-id": p = "fondue-dropdown-subtrigger",
110
92
  ...l
111
- }, w) => {
112
- const { content: m } = N(o), c = D(!1);
93
+ }, m) => {
94
+ const { content: w } = h(o), c = v(!1);
113
95
  return /* @__PURE__ */ n(
114
- s.Item,
96
+ d.Item,
115
97
  {
116
98
  onSelect: r,
117
- className: u.item,
99
+ className: s.item,
118
100
  textValue: e,
119
101
  "data-test-id": p,
120
- "data-emphasis": d,
121
- ref: w,
102
+ "data-emphasis": a,
103
+ ref: m,
122
104
  disabled: t,
123
- asChild: a,
105
+ asChild: u,
124
106
  "data-show-focus-ring": c.current,
125
107
  onMouseEnter: () => {
126
108
  c.current = !0;
@@ -132,34 +114,34 @@ const M = ({
132
114
  f.target.dataset.showFocusRing = "false", c.current = !1;
133
115
  },
134
116
  ...l,
135
- children: m
117
+ children: w
136
118
  }
137
119
  );
138
120
  };
139
- M.displayName = "Dropdown.Item";
140
- const P = ({ children: o, name: t, "data-test-id": e = "fondue-dropdown-slot" }, r) => /* @__PURE__ */ n("div", { "data-name": t, className: u.slot, "data-test-id": e, ref: r, children: o });
121
+ y.displayName = "Dropdown.Item";
122
+ const P = ({ children: o, name: t, "data-test-id": e = "fondue-dropdown-slot" }, r) => /* @__PURE__ */ n("div", { "data-name": t, className: s.slot, "data-test-id": e, ref: r, children: o });
141
123
  P.displayName = "Dropdown.Slot";
142
- const _ = i(S), E = i(C), j = i(F), B = i(T), L = i(y), z = i(M), H = i(P), Q = {
143
- Root: R,
124
+ const _ = i(S), j = i(C), E = i(R), L = i(I), z = i(F), B = i(y), H = i(P), Q = {
125
+ Root: N,
144
126
  Trigger: _,
145
- Content: E,
146
- Group: j,
147
- SubMenu: I,
148
- SubTrigger: B,
149
- SubContent: L,
150
- Item: z,
127
+ Content: j,
128
+ Group: E,
129
+ SubMenu: T,
130
+ SubTrigger: L,
131
+ SubContent: z,
132
+ Item: B,
151
133
  Slot: H
152
134
  };
153
135
  export {
154
136
  Q as Dropdown,
155
137
  C as DropdownContent,
156
- F as DropdownGroup,
157
- M as DropdownItem,
158
- R as DropdownRoot,
138
+ R as DropdownGroup,
139
+ y as DropdownItem,
140
+ N as DropdownRoot,
159
141
  P as DropdownSlot,
160
- y as DropdownSubContent,
161
- I as DropdownSubMenu,
162
- T as DropdownSubTrigger,
142
+ F as DropdownSubContent,
143
+ T as DropdownSubMenu,
144
+ I as DropdownSubTrigger,
163
145
  S as DropdownTrigger
164
146
  };
165
147
  //# 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\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 '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={VIEWPORT_COLLISION_PADDING_MAP[viewportCollisionPadding]}\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 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 = 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 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","theme","useFondueTheme","ThemeProvider","styles","event","DropdownGroup","heading","useMemo","Children","child","jsxs","DropdownSubMenu","DropdownSubTrigger","content","useProcessedChildren","wasMouseInteracted","useRef","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,gBAAgBI,IAAa;AAAA,EAC7B,GAAGK;AACP,GACAC,MAGI,gBAAAL,EAACC,EAAc,SAAd,EAAsB,SAAAE,GAAkB,gBAAcJ,GAAY,KAAAM,GAAW,GAAGD,GAC5E,UAAAT,EAAA,CACL;AAGRO,EAAgB,cAAc;AAiC9B,MAAMI,IAA+C;AAAA,EACjD,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AACd,GAEMC,IAAmF;AAAA,EACrF,SAAS;AAAA,EACT,UAAU;AACd,GAEaC,IAAkB,CAC3B;AAAA,EACI,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,eAAAC,IAAgB;AAAA,EAChB,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ACpB,MAAMxD;AAAA,EACN,SAASgD;AAAA,EACT,SAASE;AAAA,EACT,OAAOC;AAAA,EACP,SAASpB;AAAA,EACT,YAAYqB;AAAA,EACZ,YAAYC;AAAA,EACZ,MAAMC;AAAA,EACN,MAAMC;AACV;"}
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\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 '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={VIEWPORT_COLLISION_PADDING_MAP[viewportCollisionPadding]}\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 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 = 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 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","theme","useFondueTheme","ThemeProvider","styles","event","DropdownGroup","heading","useMemo","Children","child","jsxs","DropdownSubMenu","DropdownSubTrigger","content","useProcessedChildren","IconCaretRight","DropdownSubContent","DropdownItem","disabled","textValue","onSelect","emphasis","wasMouseInteracted","useRef","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;AAAA,EACR,cAAAC;AAAA,EACA,gBAAgBC,IAAa;AACjC,MAEQ,gBAAAC,EAACC,EAAc,MAAd,EAAmB,MAAAL,GAAY,OAAAC,GAAc,cAAAC,GAA4B,gBAAcC,GACnF,UAAAJ,GACL;AAGRD,EAAa,cAAc;AAYpB,MAAMQ,IAAkB,CAC3B;AAAA,EACI,SAAAC,IAAU;AAAA,EACV,UAAAR;AAAA,EACA,gBAAgBI,IAAa;AAAA,EAC7B,GAAGK;AACP,GACAC,MAGI,gBAAAL,EAACC,EAAc,SAAd,EAAsB,SAAAE,GAAkB,gBAAcJ,GAAY,KAAAM,GAAW,GAAGD,GAC5E,UAAAT,EAAA,CACL;AAGRO,EAAgB,cAAc;AAiC9B,MAAMI,IAA+C;AAAA,EACjD,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AACd,GAEMC,IAAmF;AAAA,EACrF,SAAS;AAAA,EACT,UAAU;AACd,GAEaC,IAAkB,CAC3B;AAAA,EACI,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,eAAAC,IAAgB;AAAA,EAChB,UAAAhB;AAAA,EACA,4BAAAiB;AAAA,EACA,0BAAAC,IAA2B;AAAA,EAC3B,gBAAgBd,IAAa;AACjC,GACAM,MACC;AACD,QAAMS,IAAQC,EAAA;AAEd,2BACKd,EAAc,QAAd,EACG,UAAA,gBAAAD,EAACgB,KAAc,OAAAF,GACX,UAAA,gBAAAd;AAAA,IAACC,EAAc;AAAA,IAA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AAO,QAAQ,gBAAgB,SACzCH,EAAmB,UAAU;AAAA,MACjC;AAAA,MACC,GAAGhC;AAAA,MAEH,UAAAuB;AAAA,IAAA;AAAA,EAAA;AAGb;AACAI,EAAa,cAAc;AAIpB,MAAMS,IAAe,CACxB,EAAE,UAAA7C,GAAU,MAAA8C,GAAM,gBAAgB1C,IAAa,uBAAA,GAC/CM,MAGI,gBAAAL,EAAC,OAAA,EAAI,aAAWyC,GAAM,WAAWxB,EAAO,MAAM,gBAAclB,GAAY,KAAAM,GACnE,UAAAV,EAAA,CACL;AAGR6C,EAAa,cAAc;AAE3B,MAAME,IAA8BC,EAAoDzC,CAAe,GACjG0C,IAA8BD,EAAiDnC,CAAe,GAC9FqC,IAA4BF,EAA+CxB,CAAa,GACxF2B,IAAiCH,EAAoDjB,CAAkB,GACvGqB,IAAiCJ,EAAoDb,CAAkB,GACvGkB,IAA2BL,EAA8CZ,CAAY,GACrFkB,IAA2BN,EAA8CH,CAAY,GAE9EU,IAAW;AAAA,EACpB,MAAMxD;AAAA,EACN,SAASgD;AAAA,EACT,SAASE;AAAA,EACT,OAAOC;AAAA,EACP,SAASpB;AAAA,EACT,YAAYqB;AAAA,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-components36.js";
4
+ import x from "./fondue-components55.js";
5
5
  const u = n(
6
6
  ({
7
7
  as: a = "div",
@@ -1,28 +1,27 @@
1
- import { jsx as e, jsxs as u } from "react/jsx-runtime";
2
- import { IconCross as b } from "@frontify/fondue-icons";
3
- import * as i from "@radix-ui/react-popover";
4
- import { forwardRef as r } from "react";
5
- import { addAutoFocusAttribute as w, addShowFocusRing as x } from "./fondue-components51.js";
6
- import { Button as A } from "./fondue-components6.js";
7
- import { useFondueTheme as T, ThemeProvider as I } from "./fondue-components33.js";
8
- import l from "./fondue-components58.js";
9
- const n = ({ children: t, ...o }) => /* @__PURE__ */ e(i.Root, { ...o, children: t });
1
+ import { jsx as a, jsxs as u } from "react/jsx-runtime";
2
+ import { IconCross as R } from "@frontify/fondue-icons";
3
+ import * as l from "@radix-ui/react-popover";
4
+ import { forwardRef as i } from "react";
5
+ import { addAutoFocusAttribute as w, addShowFocusRing as x } from "./fondue-components49.js";
6
+ import { useFondueTheme as A, ThemeProvider as T } from "./fondue-components31.js";
7
+ import s from "./fondue-components56.js";
8
+ const n = ({ children: t, ...o }) => /* @__PURE__ */ a(l.Root, { ...o, children: t });
10
9
  n.displayName = "Flyout.Root";
11
- const c = ({ asChild: t = !0, children: o, "data-test-id": a = "fondue-flyout-trigger", ...d }, s) => /* @__PURE__ */ e(
12
- i.Trigger,
10
+ const c = ({ asChild: t = !0, children: o, "data-test-id": e = "fondue-flyout-trigger", ...d }, r) => /* @__PURE__ */ a(
11
+ l.Trigger,
13
12
  {
14
13
  onMouseDown: w,
15
14
  "data-auto-focus-visible": "true",
16
15
  "data-auto-focus-trigger": !0,
17
- "data-test-id": a,
16
+ "data-test-id": e,
18
17
  asChild: t,
19
- ref: s,
18
+ ref: r,
20
19
  ...d,
21
20
  children: o
22
21
  }
23
22
  );
24
23
  c.displayName = "Flyout.Trigger";
25
- const B = {
24
+ const I = {
26
25
  compact: 8,
27
26
  comfortable: 12,
28
27
  spacious: 16
@@ -32,35 +31,35 @@ const B = {
32
31
  }, m = ({
33
32
  align: t = "start",
34
33
  maxWidth: o = "360px",
35
- padding: a = "compact",
34
+ padding: e = "compact",
36
35
  rounded: d = "medium",
37
- width: s = "fit-content",
36
+ width: r = "fit-content",
38
37
  shadow: F = "medium",
39
38
  triggerOffset: g = "compact",
40
- viewportCollisionPadding: h = "compact",
41
- "data-test-id": N = "fondue-flyout-content",
39
+ viewportCollisionPadding: N = "compact",
40
+ "data-test-id": h = "fondue-flyout-content",
42
41
  children: v,
43
42
  ...C
44
43
  }, P) => {
45
- const R = T();
46
- return /* @__PURE__ */ e(i.Portal, { children: /* @__PURE__ */ u(I, { theme: R, children: [
47
- /* @__PURE__ */ e("div", { "data-test-id": "fondue-flyout-overlay", className: l.overlay }),
48
- /* @__PURE__ */ e(
49
- i.Content,
44
+ const b = A();
45
+ return /* @__PURE__ */ a(l.Portal, { children: /* @__PURE__ */ u(T, { theme: b, children: [
46
+ /* @__PURE__ */ a("div", { "data-test-id": "fondue-flyout-overlay", className: s.overlay }),
47
+ /* @__PURE__ */ a(
48
+ l.Content,
50
49
  {
51
50
  style: {
52
51
  "--flyout-max-width": o,
53
- "--flyout-width": s
52
+ "--flyout-width": r
54
53
  },
55
54
  ref: P,
56
55
  align: t,
57
- collisionPadding: O[h],
58
- sideOffset: B[g],
59
- className: l.root,
60
- "data-flyout-spacing": a,
56
+ collisionPadding: O[N],
57
+ sideOffset: I[g],
58
+ className: s.root,
59
+ "data-flyout-spacing": e,
61
60
  "data-rounded": d,
62
61
  "data-shadow": F,
63
- "data-test-id": N,
62
+ "data-test-id": h,
64
63
  onFocus: x,
65
64
  ...C,
66
65
  children: v
@@ -69,45 +68,45 @@ const B = {
69
68
  ] }) });
70
69
  };
71
70
  m.displayName = "Flyout.Content";
72
- const y = ({ showCloseButton: t, children: o, "data-test-id": a = "fondue-flyout-header", closeProps: d }, s) => /* @__PURE__ */ u("div", { "data-test-id": a, ref: s, className: l.header, children: [
73
- /* @__PURE__ */ e("div", { children: o }),
74
- t && /* @__PURE__ */ e(i.Close, { asChild: !0, ...d, children: /* @__PURE__ */ e(
75
- A,
71
+ const y = ({ showCloseButton: t, children: o, "data-test-id": e = "fondue-flyout-header", closeProps: d }, r) => /* @__PURE__ */ u("div", { "data-test-id": e, ref: r, className: s.header, children: [
72
+ /* @__PURE__ */ a("div", { children: o }),
73
+ t && /* @__PURE__ */ a(
74
+ l.Close,
76
75
  {
77
- size: "small",
78
- aspect: "square",
79
- emphasis: "weak",
76
+ role: "button",
77
+ "data-test-id": `${e}-close`,
78
+ className: s.close,
80
79
  "aria-label": "Close",
81
- "data-test-id": `${a}-close`,
82
- children: /* @__PURE__ */ e(b, { size: 20 })
80
+ ...d,
81
+ children: /* @__PURE__ */ a(R, { size: 20 })
83
82
  }
84
- ) })
83
+ )
85
84
  ] });
86
85
  y.displayName = "Flyout.Header";
87
- const f = ({ children: t, "data-test-id": o = "fondue-flyout-footer" }, a) => /* @__PURE__ */ e("div", { "data-test-id": o, ref: a, className: l.footer, children: t });
86
+ const f = ({ children: t, "data-test-id": o = "fondue-flyout-footer" }, e) => /* @__PURE__ */ a("div", { "data-test-id": o, ref: e, className: s.footer, children: t });
88
87
  f.displayName = "Flyout.Footer";
89
- const p = ({ children: t, "data-test-id": o = "fondue-flyout-body", scrollable: a = !1 }, d) => /* @__PURE__ */ e(
88
+ const p = ({ children: t, "data-test-id": o = "fondue-flyout-body", scrollable: e = !1 }, d) => /* @__PURE__ */ a(
90
89
  "div",
91
90
  {
92
91
  "data-test-id": o,
93
92
  ref: d,
94
93
  "data-flyout-spacing": "compact",
95
- "data-scrollable": a,
96
- className: l.body,
94
+ "data-scrollable": e,
95
+ className: s.body,
97
96
  children: t
98
97
  }
99
98
  );
100
99
  p.displayName = "Flyout.Body";
101
- const G = {
100
+ const j = {
102
101
  Root: n,
103
- Trigger: r(c),
104
- Content: r(m),
105
- Header: r(y),
106
- Footer: r(f),
107
- Body: r(p)
102
+ Trigger: i(c),
103
+ Content: i(m),
104
+ Header: i(y),
105
+ Footer: i(f),
106
+ Body: i(p)
108
107
  };
109
108
  export {
110
- G as Flyout,
109
+ j as Flyout,
111
110
  p as FlyoutBody,
112
111
  m as FlyoutContent,
113
112
  f as FlyoutFooter,