@frontify/fondue-components 24.0.0-rc.2 → 24.0.0-rc.3

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 (174) hide show
  1. package/dist/fondue-components.js +29 -27
  2. package/dist/fondue-components.js.map +1 -1
  3. package/dist/fondue-components10.js +3 -3
  4. package/dist/fondue-components11.js +3 -3
  5. package/dist/fondue-components12.js +2 -2
  6. package/dist/fondue-components13.js +5 -4
  7. package/dist/fondue-components13.js.map +1 -1
  8. package/dist/fondue-components14.js +2 -2
  9. package/dist/fondue-components15.js +2 -2
  10. package/dist/fondue-components16.js +2 -2
  11. package/dist/fondue-components17.js +2 -2
  12. package/dist/fondue-components18.js +1 -1
  13. package/dist/fondue-components19.js +1 -1
  14. package/dist/fondue-components21.js +2 -2
  15. package/dist/fondue-components22.js +2 -2
  16. package/dist/fondue-components23.js +2 -2
  17. package/dist/fondue-components24.js +6 -6
  18. package/dist/fondue-components24.js.map +1 -1
  19. package/dist/fondue-components25.js +1 -1
  20. package/dist/fondue-components26.js +98 -31
  21. package/dist/fondue-components26.js.map +1 -1
  22. package/dist/fondue-components27.js +31 -194
  23. package/dist/fondue-components27.js.map +1 -1
  24. package/dist/fondue-components28.js +188 -129
  25. package/dist/fondue-components28.js.map +1 -1
  26. package/dist/fondue-components29.js +135 -129
  27. package/dist/fondue-components29.js.map +1 -1
  28. package/dist/fondue-components3.js +1 -1
  29. package/dist/fondue-components30.js +129 -31
  30. package/dist/fondue-components30.js.map +1 -1
  31. package/dist/fondue-components31.js +33 -65
  32. package/dist/fondue-components31.js.map +1 -1
  33. package/dist/fondue-components32.js +64 -102
  34. package/dist/fondue-components32.js.map +1 -1
  35. package/dist/fondue-components33.js +106 -30
  36. package/dist/fondue-components33.js.map +1 -1
  37. package/dist/fondue-components34.js +36 -56
  38. package/dist/fondue-components34.js.map +1 -1
  39. package/dist/fondue-components35.js +57 -20
  40. package/dist/fondue-components35.js.map +1 -1
  41. package/dist/fondue-components36.js +20 -23
  42. package/dist/fondue-components36.js.map +1 -1
  43. package/dist/fondue-components37.js +23 -7
  44. package/dist/fondue-components37.js.map +1 -1
  45. package/dist/fondue-components38.js +7 -6
  46. package/dist/fondue-components38.js.map +1 -1
  47. package/dist/fondue-components39.js +7 -32
  48. package/dist/fondue-components39.js.map +1 -1
  49. package/dist/fondue-components4.js +3 -3
  50. package/dist/fondue-components40.js +32 -5
  51. package/dist/fondue-components40.js.map +1 -1
  52. package/dist/fondue-components41.js +5 -20
  53. package/dist/fondue-components41.js.map +1 -1
  54. package/dist/fondue-components42.js +18 -153
  55. package/dist/fondue-components42.js.map +1 -1
  56. package/dist/fondue-components43.js +59 -22
  57. package/dist/fondue-components43.js.map +1 -1
  58. package/dist/fondue-components44.js +18 -18
  59. package/dist/fondue-components44.js.map +1 -1
  60. package/dist/fondue-components45.js +111 -14
  61. package/dist/fondue-components45.js.map +1 -1
  62. package/dist/fondue-components46.js +19 -30
  63. package/dist/fondue-components46.js.map +1 -1
  64. package/dist/fondue-components47.js +32 -54
  65. package/dist/fondue-components47.js.map +1 -1
  66. package/dist/fondue-components48.js +48 -125
  67. package/dist/fondue-components48.js.map +1 -1
  68. package/dist/fondue-components49.js +130 -20
  69. package/dist/fondue-components49.js.map +1 -1
  70. package/dist/fondue-components5.js +2 -2
  71. package/dist/fondue-components50.js +21 -53
  72. package/dist/fondue-components50.js.map +1 -1
  73. package/dist/fondue-components51.js +53 -8
  74. package/dist/fondue-components51.js.map +1 -1
  75. package/dist/fondue-components52.js +8 -13
  76. package/dist/fondue-components52.js.map +1 -1
  77. package/dist/fondue-components53.js +13 -15
  78. package/dist/fondue-components53.js.map +1 -1
  79. package/dist/fondue-components54.js +14 -4
  80. package/dist/fondue-components54.js.map +1 -1
  81. package/dist/fondue-components55.js +5 -60
  82. package/dist/fondue-components55.js.map +1 -1
  83. package/dist/fondue-components56.js +59 -17
  84. package/dist/fondue-components56.js.map +1 -1
  85. package/dist/fondue-components57.js +18 -19
  86. package/dist/fondue-components57.js.map +1 -1
  87. package/dist/fondue-components58.js +18 -4
  88. package/dist/fondue-components58.js.map +1 -1
  89. package/dist/fondue-components59.js +3 -11
  90. package/dist/fondue-components59.js.map +1 -1
  91. package/dist/fondue-components6.js +4 -4
  92. package/dist/fondue-components60.js +11 -3
  93. package/dist/fondue-components60.js.map +1 -1
  94. package/dist/fondue-components61.js +4 -17
  95. package/dist/fondue-components61.js.map +1 -1
  96. package/dist/fondue-components62.js +16 -9
  97. package/dist/fondue-components62.js.map +1 -1
  98. package/dist/fondue-components63.js +10 -36
  99. package/dist/fondue-components63.js.map +1 -1
  100. package/dist/fondue-components64.js +37 -35
  101. package/dist/fondue-components64.js.map +1 -1
  102. package/dist/fondue-components65.js +35 -5
  103. package/dist/fondue-components65.js.map +1 -1
  104. package/dist/fondue-components66.js +4 -12
  105. package/dist/fondue-components66.js.map +1 -1
  106. package/dist/fondue-components67.js +12 -4
  107. package/dist/fondue-components67.js.map +1 -1
  108. package/dist/fondue-components68.js +4 -24
  109. package/dist/fondue-components68.js.map +1 -1
  110. package/dist/fondue-components69.js +24 -16
  111. package/dist/fondue-components69.js.map +1 -1
  112. package/dist/fondue-components7.js +2 -2
  113. package/dist/fondue-components70.js +16 -151
  114. package/dist/fondue-components70.js.map +1 -1
  115. package/dist/fondue-components71.js +152 -19
  116. package/dist/fondue-components71.js.map +1 -1
  117. package/dist/fondue-components72.js +19 -78
  118. package/dist/fondue-components72.js.map +1 -1
  119. package/dist/fondue-components73.js +79 -8
  120. package/dist/fondue-components73.js.map +1 -1
  121. package/dist/fondue-components74.js +8 -37
  122. package/dist/fondue-components74.js.map +1 -1
  123. package/dist/fondue-components75.js +36 -70
  124. package/dist/fondue-components75.js.map +1 -1
  125. package/dist/fondue-components76.js +70 -10
  126. package/dist/fondue-components76.js.map +1 -1
  127. package/dist/fondue-components77.js +10 -12
  128. package/dist/fondue-components77.js.map +1 -1
  129. package/dist/fondue-components78.js +10 -12
  130. package/dist/fondue-components78.js.map +1 -1
  131. package/dist/fondue-components79.js +12 -22
  132. package/dist/fondue-components79.js.map +1 -1
  133. package/dist/fondue-components8.js +5 -5
  134. package/dist/fondue-components80.js +13 -34
  135. package/dist/fondue-components80.js.map +1 -1
  136. package/dist/fondue-components81.js +22 -10
  137. package/dist/fondue-components81.js.map +1 -1
  138. package/dist/fondue-components82.js +33 -67
  139. package/dist/fondue-components82.js.map +1 -1
  140. package/dist/fondue-components83.js +7 -11
  141. package/dist/fondue-components83.js.map +1 -1
  142. package/dist/fondue-components84.js +67 -24
  143. package/dist/fondue-components84.js.map +1 -1
  144. package/dist/fondue-components85.js +14 -18
  145. package/dist/fondue-components85.js.map +1 -1
  146. package/dist/fondue-components86.js +23 -21
  147. package/dist/fondue-components86.js.map +1 -1
  148. package/dist/fondue-components87.js +18 -8
  149. package/dist/fondue-components87.js.map +1 -1
  150. package/dist/fondue-components88.js +22 -19
  151. package/dist/fondue-components88.js.map +1 -1
  152. package/dist/fondue-components89.js +8 -6
  153. package/dist/fondue-components89.js.map +1 -1
  154. package/dist/fondue-components9.js +96 -98
  155. package/dist/fondue-components9.js.map +1 -1
  156. package/dist/fondue-components90.js +20 -2
  157. package/dist/fondue-components90.js.map +1 -1
  158. package/dist/fondue-components91.js +5 -3
  159. package/dist/fondue-components91.js.map +1 -1
  160. package/dist/fondue-components92.js +2 -5
  161. package/dist/fondue-components92.js.map +1 -1
  162. package/dist/fondue-components93.js +3 -15
  163. package/dist/fondue-components93.js.map +1 -1
  164. package/dist/fondue-components94.js +4 -39
  165. package/dist/fondue-components94.js.map +1 -1
  166. package/dist/fondue-components95.js +16 -20
  167. package/dist/fondue-components95.js.map +1 -1
  168. package/dist/fondue-components96.js +43 -0
  169. package/dist/fondue-components96.js.map +1 -0
  170. package/dist/fondue-components97.js +24 -0
  171. package/dist/fondue-components97.js.map +1 -0
  172. package/dist/index.d.ts +127 -3
  173. package/dist/style.css +1 -1
  174. package/package.json +4 -4
@@ -2,13 +2,13 @@
2
2
  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
- import { Button as a } from "./fondue-components6.js";
6
- import { Checkbox as l } from "./fondue-components7.js";
5
+ import { Button as l } from "./fondue-components6.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
9
  import { Divider as S } from "./fondue-components10.js";
10
- import { Dropdown as C } from "./fondue-components11.js";
11
- import { Flex as B } from "./fondue-components12.js";
10
+ import { Dropdown as B } from "./fondue-components11.js";
11
+ import { Flex as b } from "./fondue-components12.js";
12
12
  import { Flyout as k } from "./fondue-components13.js";
13
13
  import { Grid as D } from "./fondue-components14.js";
14
14
  import { Heading as P } from "./fondue-components15.js";
@@ -22,26 +22,27 @@ import { Section as K } from "./fondue-components22.js";
22
22
  import { SegmentedControl as N } from "./fondue-components23.js";
23
23
  import { Select as Q } from "./fondue-components24.js";
24
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";
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";
34
35
  export {
35
36
  t as Accordion,
36
37
  m as Badge,
37
38
  f as Box,
38
- a as Button,
39
- l as Checkbox,
39
+ l as Button,
40
+ a as Checkbox,
40
41
  T as ColorPicker,
41
42
  g as Dialog,
42
43
  S as Divider,
43
- C as Dropdown,
44
- B as Flex,
44
+ B as Dropdown,
45
+ b as Flex,
45
46
  k as Flyout,
46
47
  D as Grid,
47
48
  P as Heading,
@@ -55,16 +56,17 @@ export {
55
56
  N as SegmentedControl,
56
57
  Q as Select,
57
58
  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,
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,
65
67
  ao as ThemeContext,
66
- lo as ThemeProvider,
67
- co as Tooltip,
68
- no as useFondueTheme
68
+ To as ThemeProvider,
69
+ uo as Tooltip,
70
+ co as useFondueTheme
69
71
  };
70
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-components41.js";
5
- import c from "./fondue-components54.js";
6
- import { dividerStyles as h } from "./fondue-components55.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",
@@ -2,9 +2,9 @@ import { jsx as d, jsxs as S } from "react/jsx-runtime";
2
2
  import { IconCaretRight as x } from "@frontify/fondue-icons";
3
3
  import * as a from "@radix-ui/react-dropdown-menu";
4
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-components33.js";
6
- import { useProcessedChildren as I } from "./fondue-components56.js";
7
- import u from "./fondue-components57.js";
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
8
  const T = ({
9
9
  children: t,
10
10
  open: o,
@@ -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-components39.js";
4
- import x from "./fondue-components58.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",
@@ -2,11 +2,11 @@ import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
2
  import { IconCross as x } from "@frontify/fondue-icons";
3
3
  import * as l from "@radix-ui/react-popover";
4
4
  import { forwardRef as i } from "react";
5
- import { useTranslation as I } from "./fondue-components36.js";
6
- import { addAutoFocusAttribute as _, addShowFocusRing as B } from "./fondue-components52.js";
5
+ import { useTranslation as I } from "./fondue-components37.js";
6
+ import { addAutoFocusAttribute as _, addShowFocusRing as B } from "./fondue-components53.js";
7
7
  import { Button as O } from "./fondue-components6.js";
8
- import { useFondueTheme as S, ThemeProvider as j } from "./fondue-components33.js";
9
- import u from "./fondue-components59.js";
8
+ import { useFondueTheme as S, ThemeProvider as j } from "./fondue-components34.js";
9
+ import u from "./fondue-components60.js";
10
10
  const f = ({ children: t, ...o }) => /* @__PURE__ */ e(l.Root, { ...o, children: t });
11
11
  f.displayName = "Flyout.Root";
12
12
  const y = ({ asChild: t = !0, children: o, "data-test-id": a = "fondue-flyout-trigger", ...r }, d) => /* @__PURE__ */ e(
@@ -50,6 +50,7 @@ const D = {
50
50
  /* @__PURE__ */ e(
51
51
  l.Content,
52
52
  {
53
+ dir: c,
53
54
  style: {
54
55
  "--flyout-max-width": o,
55
56
  "--flyout-width": d
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components13.js","sources":["../src/components/Flyout/Flyout.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { forwardRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { useTranslation } from '#/hooks/useTranslation';\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport { Button } from '../Button/Button';\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport styles from './styles/flyout.module.scss';\n\nexport type FlyoutRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the flyout\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport type FlyoutTriggerProps = {\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 FlyoutTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-flyout-trigger', ...props }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.Trigger\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild={asChild}\n ref={ref}\n {...props}\n >\n {children}\n </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\ntype FlyoutSpacing = 'compact' | 'comfortable' | 'spacious';\ntype FlyoutViewportCollisionPadding = 'compact' | 'spacious';\nexport type FlyoutContentProps = {\n /**\n * Add a shadow to the flyout\n * @default \"medium\"\n */\n shadow?: 'none' | 'medium' | 'large';\n /**\n * Add rounded corners to the flyout\n * @default \"medium\"\n */\n rounded?: 'none' | 'medium' | 'large';\n /**\n * Define the prefered side of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Define the prefered alignment of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Define the padding of the flyout\n * @default \"compact\"\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Define the fixed width of the flyout\n * @default \"fit-content\"\n */\n width?: string;\n /**\n * Defines the spacing between the dropdown and its trigger.\n * @default 'compact'\n */\n triggerOffset?: FlyoutSpacing;\n /**\n * Define the maximum width of the flyout\n * @default \"360px\"\n */\n maxWidth?: string;\n /**\n * Define the minimum distance between the flyout and the viewport edge\n * @default 'compact'\n */\n viewportCollisionPadding?: FlyoutViewportCollisionPadding;\n /**\n * Event handler called when auto-focusing on open\n */\n onOpenAutoFocus?: (event: Event) => void;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nconst SPACING_MAP: Record<FlyoutSpacing, number> = {\n compact: 8,\n comfortable: 12,\n spacious: 16,\n};\n\nconst VIEWPORT_COLLISION_PADDING_MAP: Record<FlyoutViewportCollisionPadding, number> = {\n compact: 8,\n spacious: 24,\n};\n\nexport const FlyoutContent = (\n {\n align = 'start',\n maxWidth = '360px',\n padding = 'compact',\n rounded = 'medium',\n width = 'fit-content',\n shadow = 'medium',\n side,\n triggerOffset = 'compact',\n viewportCollisionPadding = 'compact',\n 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { theme, dir } = useFondueTheme();\n\n const getAdjustedSide = (side?: 'top' | 'right' | 'bottom' | 'left') => {\n if (!side || dir === 'ltr') {\n return side;\n }\n\n if (side === 'left') {\n return 'right';\n }\n if (side === 'right') {\n return 'left';\n }\n\n return side;\n };\n\n return (\n <RadixPopover.Portal>\n <ThemeProvider theme={theme} dir={dir}>\n <div data-test-id=\"fondue-flyout-overlay\" className={styles.overlay} />\n <RadixPopover.Content\n style={\n {\n '--flyout-max-width': maxWidth,\n '--flyout-width': width,\n } as CSSProperties\n }\n ref={ref}\n align={align}\n collisionPadding={VIEWPORT_COLLISION_PADDING_MAP[viewportCollisionPadding]}\n sideOffset={SPACING_MAP[triggerOffset]}\n side={getAdjustedSide(side)}\n className={styles.root}\n data-flyout-spacing={padding}\n data-rounded={rounded}\n data-shadow={shadow}\n data-test-id={dataTestId}\n onFocus={addShowFocusRing}\n {...props}\n >\n {children}\n </RadixPopover.Content>\n </ThemeProvider>\n </RadixPopover.Portal>\n );\n};\nFlyoutContent.displayName = 'Flyout.Content';\n\nexport type FlyoutHeaderProps = {\n /**\n * Show a close button in the header\n * @default false\n */\n showCloseButton?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n closeProps?: CommonAriaProps;\n};\n\nexport const FlyoutHeader = (\n { showCloseButton, children, 'data-test-id': dataTestId = 'fondue-flyout-header', closeProps }: FlyoutHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { t } = useTranslation();\n\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.header}>\n <div>{children}</div>\n {showCloseButton && (\n <RadixPopover.Close asChild {...closeProps}>\n <Button\n size=\"small\"\n aspect=\"square\"\n emphasis=\"weak\"\n aria-label={t('Flyout_close')}\n data-test-id={`${dataTestId}-close`}\n >\n <IconCross size={20} />\n </Button>\n </RadixPopover.Close>\n )}\n </div>\n );\n};\nFlyoutHeader.displayName = 'Flyout.Header';\n\nexport type FlyoutFooterProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const FlyoutFooter = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-footer' }: FlyoutFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.footer}>\n {children}\n </div>\n );\n};\nFlyoutFooter.displayName = 'Flyout.Footer';\n\nexport type FlyoutBodyProps = {\n children?: ReactNode;\n 'data-test-id'?: string;\n /**\n * Allow the body to scroll if the max height of the flyout is reached\n * @default false\n */\n scrollable?: boolean;\n};\n\nexport const FlyoutBody = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-body', scrollable = false }: FlyoutBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n data-flyout-spacing=\"compact\"\n data-scrollable={scrollable}\n className={styles.body}\n >\n {children}\n </div>\n );\n};\nFlyoutBody.displayName = 'Flyout.Body';\n\nexport const Flyout = {\n Root: FlyoutRoot,\n Trigger: forwardRef<HTMLButtonElement, FlyoutTriggerProps>(FlyoutTrigger),\n Content: forwardRef<HTMLDivElement, FlyoutContentProps>(FlyoutContent),\n Header: forwardRef<HTMLDivElement, FlyoutHeaderProps>(FlyoutHeader),\n Footer: forwardRef<HTMLDivElement, FlyoutFooterProps>(FlyoutFooter),\n Body: forwardRef<HTMLDivElement, FlyoutBodyProps>(FlyoutBody),\n};\n"],"names":["FlyoutRoot","children","props","RadixPopover","FlyoutTrigger","asChild","dataTestId","ref","jsx","addAutoFocusAttribute","SPACING_MAP","VIEWPORT_COLLISION_PADDING_MAP","FlyoutContent","align","maxWidth","padding","rounded","width","shadow","side","triggerOffset","viewportCollisionPadding","theme","dir","useFondueTheme","getAdjustedSide","jsxs","ThemeProvider","styles","addShowFocusRing","FlyoutHeader","showCloseButton","closeProps","t","useTranslation","Button","IconCross","FlyoutFooter","FlyoutBody","scrollable","Flyout","forwardRef"],"mappings":";;;;;;;;;AAiCO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAC9BC,EAAa,MAAb,EAAmB,GAAGD,GAAQ,UAAAD,GAAS;AAEnDD,EAAW,cAAc;AAYlB,MAAMI,IAAgB,CACzB,EAAE,SAAAC,IAAU,IAAM,UAAAJ,GAAU,gBAAgBK,IAAa,yBAAyB,GAAGJ,EAAA,GACrFK,MAGI,gBAAAC;AAAA,EAACL,EAAa;AAAA,EAAb;AAAA,IACG,aAAaM;AAAA,IACb,2BAAwB;AAAA,IACxB,2BAAuB;AAAA,IACvB,gBAAcH;AAAA,IACd,SAAAD;AAAA,IACA,KAAAE;AAAA,IACC,GAAGL;AAAA,IAEH,UAAAD;AAAA,EAAA;AAAA;AAIbG,EAAc,cAAc;AA0D5B,MAAMM,IAA6C;AAAA,EAC/C,SAAS;AAAA,EACT,aAAa;AAAA,EACb,UAAU;AACd,GAEMC,IAAiF;AAAA,EACnF,SAAS;AAAA,EACT,UAAU;AACd,GAEaC,IAAgB,CACzB;AAAA,EACI,OAAAC,IAAQ;AAAA,EACR,UAAAC,IAAW;AAAA,EACX,SAAAC,IAAU;AAAA,EACV,SAAAC,IAAU;AAAA,EACV,OAAAC,IAAQ;AAAA,EACR,QAAAC,IAAS;AAAA,EACT,MAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,0BAAAC,IAA2B;AAAA,EAC3B,gBAAgBf,IAAa;AAAA,EAC7B,UAAAL;AAAA,EACA,GAAGC;AACP,GACAK,MACC;AACD,QAAM,EAAE,OAAAe,GAAO,KAAAC,EAAA,IAAQC,EAAA,GAEjBC,IAAkB,CAACN,MACjB,CAACA,KAAQI,MAAQ,QACVJ,IAGPA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QAE3B,UAAA,gBAAAE,EAAC4B,GAAA,EAAU,MAAM,GAAA,CAAI;AAAA,MAAA;AAAA,IAAA,EACzB,CACJ;AAAA,EAAA,GAER;AAER;AACAN,EAAa,cAAc;AAIpB,MAAMO,IAAe,CACxB,EAAE,UAAApC,GAAU,gBAAgBK,IAAa,uBAAA,GACzCC,MAGI,gBAAAC,EAAC,SAAI,gBAAcF,GAAY,KAAAC,GAAU,WAAWqB,EAAO,QACtD,UAAA3B,GACL;AAGRoC,EAAa,cAAc;AAYpB,MAAMC,IAAa,CACtB,EAAE,UAAArC,GAAU,gBAAgBK,IAAa,sBAAsB,YAAAiC,IAAa,GAAA,GAC5EhC,MAGI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACG,gBAAcF;AAAA,IACd,KAAAC;AAAA,IACA,uBAAoB;AAAA,IACpB,mBAAiBgC;AAAA,IACjB,WAAWX,EAAO;AAAA,IAEjB,UAAA3B;AAAA,EAAA;AAAA;AAIbqC,EAAW,cAAc;AAElB,MAAME,IAAS;AAAA,EAClB,MAAMxC;AAAA,EACN,SAASyC,EAAkDrC,CAAa;AAAA,EACxE,SAASqC,EAA+C7B,CAAa;AAAA,EACrE,QAAQ6B,EAA8CX,CAAY;AAAA,EAClE,QAAQW,EAA8CJ,CAAY;AAAA,EAClE,MAAMI,EAA4CH,CAAU;AAChE;"}
1
+ {"version":3,"file":"fondue-components13.js","sources":["../src/components/Flyout/Flyout.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { forwardRef, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\nimport { useTranslation } from '#/hooks/useTranslation';\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport { Button } from '../Button/Button';\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport styles from './styles/flyout.module.scss';\n\nexport type FlyoutRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the flyout\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport const FlyoutRoot = ({ children, ...props }: FlyoutRootProps) => {\n return <RadixPopover.Root {...props}>{children}</RadixPopover.Root>;\n};\nFlyoutRoot.displayName = 'Flyout.Root';\n\nexport type FlyoutTriggerProps = {\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 FlyoutTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-flyout-trigger', ...props }: FlyoutTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixPopover.Trigger\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild={asChild}\n ref={ref}\n {...props}\n >\n {children}\n </RadixPopover.Trigger>\n );\n};\nFlyoutTrigger.displayName = 'Flyout.Trigger';\n\ntype FlyoutSpacing = 'compact' | 'comfortable' | 'spacious';\ntype FlyoutViewportCollisionPadding = 'compact' | 'spacious';\nexport type FlyoutContentProps = {\n /**\n * Add a shadow to the flyout\n * @default \"medium\"\n */\n shadow?: 'none' | 'medium' | 'large';\n /**\n * Add rounded corners to the flyout\n * @default \"medium\"\n */\n rounded?: 'none' | 'medium' | 'large';\n /**\n * Define the prefered side of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Define the prefered alignment of the flyout. Can be overriden by viewport collisions viewport.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Define the padding of the flyout\n * @default \"compact\"\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Define the fixed width of the flyout\n * @default \"fit-content\"\n */\n width?: string;\n /**\n * Defines the spacing between the dropdown and its trigger.\n * @default 'compact'\n */\n triggerOffset?: FlyoutSpacing;\n /**\n * Define the maximum width of the flyout\n * @default \"360px\"\n */\n maxWidth?: string;\n /**\n * Define the minimum distance between the flyout and the viewport edge\n * @default 'compact'\n */\n viewportCollisionPadding?: FlyoutViewportCollisionPadding;\n /**\n * Event handler called when auto-focusing on open\n */\n onOpenAutoFocus?: (event: Event) => void;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nconst SPACING_MAP: Record<FlyoutSpacing, number> = {\n compact: 8,\n comfortable: 12,\n spacious: 16,\n};\n\nconst VIEWPORT_COLLISION_PADDING_MAP: Record<FlyoutViewportCollisionPadding, number> = {\n compact: 8,\n spacious: 24,\n};\n\nexport const FlyoutContent = (\n {\n align = 'start',\n maxWidth = '360px',\n padding = 'compact',\n rounded = 'medium',\n width = 'fit-content',\n shadow = 'medium',\n side,\n triggerOffset = 'compact',\n viewportCollisionPadding = 'compact',\n 'data-test-id': dataTestId = 'fondue-flyout-content',\n children,\n ...props\n }: FlyoutContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { theme, dir } = useFondueTheme();\n\n const getAdjustedSide = (side?: 'top' | 'right' | 'bottom' | 'left') => {\n if (!side || dir === 'ltr') {\n return side;\n }\n\n if (side === 'left') {\n return 'right';\n }\n if (side === 'right') {\n return 'left';\n }\n\n return side;\n };\n\n return (\n <RadixPopover.Portal>\n <ThemeProvider theme={theme} dir={dir}>\n <div data-test-id=\"fondue-flyout-overlay\" className={styles.overlay} />\n <RadixPopover.Content\n dir={dir}\n style={\n {\n '--flyout-max-width': maxWidth,\n '--flyout-width': width,\n } as CSSProperties\n }\n ref={ref}\n align={align}\n collisionPadding={VIEWPORT_COLLISION_PADDING_MAP[viewportCollisionPadding]}\n sideOffset={SPACING_MAP[triggerOffset]}\n side={getAdjustedSide(side)}\n className={styles.root}\n data-flyout-spacing={padding}\n data-rounded={rounded}\n data-shadow={shadow}\n data-test-id={dataTestId}\n onFocus={addShowFocusRing}\n {...props}\n >\n {children}\n </RadixPopover.Content>\n </ThemeProvider>\n </RadixPopover.Portal>\n );\n};\nFlyoutContent.displayName = 'Flyout.Content';\n\nexport type FlyoutHeaderProps = {\n /**\n * Show a close button in the header\n * @default false\n */\n showCloseButton?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n closeProps?: CommonAriaProps;\n};\n\nexport const FlyoutHeader = (\n { showCloseButton, children, 'data-test-id': dataTestId = 'fondue-flyout-header', closeProps }: FlyoutHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { t } = useTranslation();\n\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.header}>\n <div>{children}</div>\n {showCloseButton && (\n <RadixPopover.Close asChild {...closeProps}>\n <Button\n size=\"small\"\n aspect=\"square\"\n emphasis=\"weak\"\n aria-label={t('Flyout_close')}\n data-test-id={`${dataTestId}-close`}\n >\n <IconCross size={20} />\n </Button>\n </RadixPopover.Close>\n )}\n </div>\n );\n};\nFlyoutHeader.displayName = 'Flyout.Header';\n\nexport type FlyoutFooterProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport const FlyoutFooter = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-footer' }: FlyoutFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.footer}>\n {children}\n </div>\n );\n};\nFlyoutFooter.displayName = 'Flyout.Footer';\n\nexport type FlyoutBodyProps = {\n children?: ReactNode;\n 'data-test-id'?: string;\n /**\n * Allow the body to scroll if the max height of the flyout is reached\n * @default false\n */\n scrollable?: boolean;\n};\n\nexport const FlyoutBody = (\n { children, 'data-test-id': dataTestId = 'fondue-flyout-body', scrollable = false }: FlyoutBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n data-flyout-spacing=\"compact\"\n data-scrollable={scrollable}\n className={styles.body}\n >\n {children}\n </div>\n );\n};\nFlyoutBody.displayName = 'Flyout.Body';\n\nexport const Flyout = {\n Root: FlyoutRoot,\n Trigger: forwardRef<HTMLButtonElement, FlyoutTriggerProps>(FlyoutTrigger),\n Content: forwardRef<HTMLDivElement, FlyoutContentProps>(FlyoutContent),\n Header: forwardRef<HTMLDivElement, FlyoutHeaderProps>(FlyoutHeader),\n Footer: forwardRef<HTMLDivElement, FlyoutFooterProps>(FlyoutFooter),\n Body: forwardRef<HTMLDivElement, FlyoutBodyProps>(FlyoutBody),\n};\n"],"names":["FlyoutRoot","children","props","RadixPopover","FlyoutTrigger","asChild","dataTestId","ref","jsx","addAutoFocusAttribute","SPACING_MAP","VIEWPORT_COLLISION_PADDING_MAP","FlyoutContent","align","maxWidth","padding","rounded","width","shadow","side","triggerOffset","viewportCollisionPadding","theme","dir","useFondueTheme","getAdjustedSide","jsxs","ThemeProvider","styles","addShowFocusRing","FlyoutHeader","showCloseButton","closeProps","t","useTranslation","Button","IconCross","FlyoutFooter","FlyoutBody","scrollable","Flyout","forwardRef"],"mappings":";;;;;;;;;AAiCO,MAAMA,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAC9BC,EAAa,MAAb,EAAmB,GAAGD,GAAQ,UAAAD,GAAS;AAEnDD,EAAW,cAAc;AAYlB,MAAMI,IAAgB,CACzB,EAAE,SAAAC,IAAU,IAAM,UAAAJ,GAAU,gBAAgBK,IAAa,yBAAyB,GAAGJ,EAAA,GACrFK,MAGI,gBAAAC;AAAA,EAACL,EAAa;AAAA,EAAb;AAAA,IACG,aAAaM;AAAA,IACb,2BAAwB;AAAA,IACxB,2BAAuB;AAAA,IACvB,gBAAcH;AAAA,IACd,SAAAD;AAAA,IACA,KAAAE;AAAA,IACC,GAAGL;AAAA,IAEH,UAAAD;AAAA,EAAA;AAAA;AAIbG,EAAc,cAAc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AS;AAAA,EAClB,MAAMxC;AAAA,EACN,SAASyC,EAAkDrC,CAAa;AAAA,EACxE,SAASqC,EAA+C7B,CAAa;AAAA,EACrE,QAAQ6B,EAA8CX,CAAY;AAAA,EAClE,QAAQW,EAA8CJ,CAAY;AAAA,EAClE,MAAMI,EAA4CH,CAAU;AAChE;"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as f } from "react/jsx-runtime";
2
2
  import { forwardRef as y } from "react";
3
- import { propsToCssVariables as n } from "./fondue-components39.js";
4
- import u from "./fondue-components60.js";
3
+ import { propsToCssVariables as n } from "./fondue-components40.js";
4
+ import u from "./fondue-components61.js";
5
5
  const c = y(
6
6
  ({
7
7
  as: a = "div",
@@ -1,7 +1,7 @@
1
1
  import { jsx as y } from "react/jsx-runtime";
2
2
  import { forwardRef as g } from "react";
3
- import { cn as x } from "./fondue-components41.js";
4
- import a from "./fondue-components61.js";
3
+ import { cn as x } from "./fondue-components42.js";
4
+ import a from "./fondue-components62.js";
5
5
  const $ = g(
6
6
  ({
7
7
  as: e = "span",
@@ -1,8 +1,8 @@
1
1
  import { jsxs as m, jsx as s } from "react/jsx-runtime";
2
2
  import * as f from "@radix-ui/react-label";
3
3
  import { forwardRef as b, useRef as p, useLayoutEffect as x } from "react";
4
- import { cn as A } from "./fondue-components41.js";
5
- import r from "./fondue-components62.js";
4
+ import { cn as A } from "./fondue-components42.js";
5
+ import r from "./fondue-components63.js";
6
6
  const g = ({ className: l, "data-test-id": d = "fondue-label", children: o, variant: c = "default", ...i }, u) => {
7
7
  const n = p(null);
8
8
  return x(() => {
@@ -1,8 +1,8 @@
1
1
  import { jsx as C } from "react/jsx-runtime";
2
2
  import { forwardRef as D, useCallback as H } from "react";
3
- import { cn as L } from "./fondue-components41.js";
3
+ import { cn as L } from "./fondue-components42.js";
4
4
  import { useFondueRouter as N } from "./fondue-components20.js";
5
- import o from "./fondue-components63.js";
5
+ import o from "./fondue-components64.js";
6
6
  const R = D(
7
7
  ({
8
8
  id: c,
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import * as t from "@radix-ui/react-progress";
3
3
  import { forwardRef as m } from "react";
4
- import { loadingBarContainerStyles as g, loadingBarStyles as f } from "./fondue-components64.js";
4
+ import { loadingBarContainerStyles as g, loadingBarStyles as f } from "./fondue-components65.js";
5
5
  const p = m(
6
6
  ({
7
7
  value: a,
@@ -1,6 +1,6 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { forwardRef as i } from "react";
3
- import d from "./fondue-components65.js";
3
+ import d from "./fondue-components66.js";
4
4
  const s = i(
5
5
  ({
6
6
  variant: t = "progress",
@@ -1,8 +1,8 @@
1
1
  import { jsxs as h, jsx as l } from "react/jsx-runtime";
2
2
  import * as a from "@radix-ui/react-scroll-area";
3
3
  import { forwardRef as p } from "react";
4
- import { useFondueTheme as u } from "./fondue-components33.js";
5
- import o from "./fondue-components66.js";
4
+ import { useFondueTheme as u } from "./fondue-components34.js";
5
+ import o from "./fondue-components67.js";
6
6
  const f = ({
7
7
  type: t = "hover",
8
8
  maxHeight: e = "100%",
@@ -1,7 +1,7 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as m } from "react";
3
- import { propsToCssVariables as c } from "./fondue-components39.js";
4
- import f from "./fondue-components67.js";
3
+ import { propsToCssVariables as c } from "./fondue-components40.js";
4
+ import f from "./fondue-components68.js";
5
5
  const y = m(
6
6
  ({
7
7
  "data-test-id": a = "fondue-section",
@@ -1,8 +1,8 @@
1
1
  import { jsxs as l, jsx as t } from "react/jsx-runtime";
2
2
  import * as n from "@radix-ui/react-toggle-group";
3
3
  import { forwardRef as i } from "react";
4
- import { useControllableState as N } from "./fondue-components68.js";
5
- import e from "./fondue-components69.js";
4
+ import { useControllableState as N } from "./fondue-components69.js";
5
+ import e from "./fondue-components70.js";
6
6
  const d = ({
7
7
  children: a,
8
8
  value: o,
@@ -4,12 +4,12 @@ import * as g from "@radix-ui/react-popover";
4
4
  import { Slot as q } from "@radix-ui/react-slot";
5
5
  import { useSelect as J } from "downshift";
6
6
  import { forwardRef as K, useRef as L, useState as Q } from "react";
7
- import { ForwardedRefCombobox as U } from "./fondue-components70.js";
8
- import { ForwardedRefSelectItem as W, ForwardedRefSelectItemGroup as X } from "./fondue-components71.js";
9
- import { SelectMenu as Y } from "./fondue-components72.js";
10
- import { ForwardedRefSelectSlot as Z } from "./fondue-components73.js";
11
- import o from "./fondue-components74.js";
12
- import { useSelectData as _ } from "./fondue-components75.js";
7
+ import { ForwardedRefCombobox as U } from "./fondue-components71.js";
8
+ import { ForwardedRefSelectItem as W, ForwardedRefSelectItemGroup as X } from "./fondue-components72.js";
9
+ import { SelectMenu as Y } from "./fondue-components73.js";
10
+ import { ForwardedRefSelectSlot as Z } from "./fondue-components74.js";
11
+ import o from "./fondue-components75.js";
12
+ import { useSelectData as _ } from "./fondue-components76.js";
13
13
  const S = ({
14
14
  children: h,
15
15
  onSelect: s,
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components24.js","sources":["../src/components/Select/Select.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretDown, IconCheckMark, IconExclamationMarkTriangle } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { Slot as RadixSlot } from '@radix-ui/react-slot';\nimport { useSelect } from 'downshift';\nimport { forwardRef, useRef, useState, type ForwardedRef, type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\n\nimport { ForwardedRefCombobox } from './Combobox';\nimport { ForwardedRefSelectItem, ForwardedRefSelectItemGroup } from './SelectItem';\nimport { SelectMenu, type SelectMenuViewportCollisionPadding } from './SelectMenu';\nimport { ForwardedRefSelectSlot } from './SelectSlot';\nimport styles from './styles/select.module.scss';\nimport { useSelectData } from './useSelectData';\n\nexport type SelectComponentProps = {\n /**\n * Children of the Select component. This can contain the `Select.Slot` components for the label, decorators, clear action and menu.\n */\n children?: ReactNode;\n /**\n * Callback function that is called when an item is selected.\n */\n onSelect?: (selectedValue: string | null) => void;\n /**\n * The active value in the select component. This is used to control the select externally.\n */\n value?: string | null;\n /**\n * The default value of the select component. Used for uncontrolled usages.\n */\n defaultValue?: string;\n /**\n * The placeholder in the select component.\n */\n placeholder?: string;\n /**\n * Status of the text input\n * @default \"neutral\"\n */\n status?: 'neutral' | 'success' | 'error';\n /**\n * Disables the select component.\n */\n disabled?: boolean;\n /**\n * The alignment of the menu.\n * @default \"start\"\n */\n alignMenu?: 'start' | 'center' | 'end';\n /**\n * Defines the preferred side of the select. It will not be respected if there are collisions with the viewport.\n * @default \"bottom\"\n */\n side?: 'left' | 'right' | 'bottom' | 'top';\n /**\n * The data test id of the select component.\n */\n 'data-test-id'?: string;\n /**\n * Id of the select component\n */\n id?: string;\n /**\n * The value of the select is shown as plan text when set to true, items child components are used if set to true\n * @default true\n */\n showStringValue?: boolean;\n /**\n * Define the minimum distance between the select menu and the viewport edge\n * @default 'compact'\n */\n viewportCollisionPadding?: SelectMenuViewportCollisionPadding;\n} & CommonAriaProps;\n\nexport const SelectInput = (\n {\n children,\n onSelect,\n value,\n defaultValue,\n placeholder = '',\n status = 'neutral',\n disabled,\n alignMenu = 'start',\n side = 'bottom',\n id,\n showStringValue = true,\n 'data-test-id': dataTestId = 'fondue-select',\n viewportCollisionPadding = 'compact',\n ...props\n }: SelectComponentProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) => {\n const { inputSlots, menuSlots, items, clearButton, getItemByValue } = useSelectData(children);\n\n const defaultItem = getItemByValue(defaultValue);\n const activeItem = getItemByValue(value);\n\n const wasClicked = useRef(false);\n\n const [hasInteractedSinceOpening, setHasInteractedSinceOpening] = useState(false);\n\n const { getToggleButtonProps, getMenuProps, getItemProps, reset, selectedItem, isOpen, highlightedIndex } =\n useSelect({\n items,\n defaultSelectedItem: defaultItem,\n selectedItem: activeItem,\n toggleButtonId: id,\n labelId: 'aria-labelledby' in props ? props['aria-labelledby'] : undefined,\n onIsOpenChange: () => {\n setHasInteractedSinceOpening(false);\n },\n onHighlightedIndexChange: () => {\n setHasInteractedSinceOpening(true);\n },\n onSelectedItemChange: ({ selectedItem }) => {\n onSelect?.(selectedItem?.value ?? null);\n },\n itemToString: (item) => (item ? item.label : ''),\n });\n\n const displayedValue = selectedItem\n ? (!showStringValue && selectedItem.children) || selectedItem.label\n : placeholder;\n\n return (\n <RadixPopover.Root open={isOpen}>\n <RadixPopover.Anchor\n asChild\n onMouseDown={(mouseEvent) => {\n wasClicked.current = true;\n mouseEvent.currentTarget.dataset.showFocusRing = 'false';\n }}\n onFocus={(focusEvent) => {\n if (!wasClicked.current) {\n focusEvent.target.dataset.showFocusRing = 'true';\n }\n }}\n onBlur={(blurEvent) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasClicked.current = false;\n }}\n >\n <div\n className={styles.root}\n data-status={status}\n data-disabled={disabled}\n data-empty={!selectedItem}\n data-test-id={dataTestId}\n {...(disabled\n ? {}\n : getToggleButtonProps({\n 'aria-label': 'aria-label' in props ? props['aria-label'] : undefined,\n ref: forwardedRef,\n }))}\n >\n <span className={styles.selectedValue}>{displayedValue}</span>\n {inputSlots}\n {clearButton ? (\n <RadixSlot\n onClick={(event) => {\n event.stopPropagation();\n reset();\n }}\n className={styles.clear}\n >\n {clearButton}\n </RadixSlot>\n ) : null}\n <div className={styles.icons}>\n <IconCaretDown size={16} className={styles.caret} />\n {status === 'success' ? (\n <IconCheckMark\n size={16}\n className={styles.iconSuccess}\n data-test-id={`${dataTestId}-success-icon`}\n />\n ) : null}\n {status === 'error' ? (\n <IconExclamationMarkTriangle\n size={16}\n className={styles.iconError}\n data-test-id={`${dataTestId}-error-icon`}\n />\n ) : null}\n </div>\n </div>\n </RadixPopover.Anchor>\n\n <SelectMenu\n align={alignMenu}\n side={side}\n highlightedIndex={highlightedIndex}\n getMenuProps={getMenuProps}\n getItemProps={getItemProps}\n selectedItem={selectedItem}\n hasInteractedSinceOpening={hasInteractedSinceOpening}\n viewportCollisionPadding={viewportCollisionPadding}\n >\n {menuSlots}\n </SelectMenu>\n </RadixPopover.Root>\n );\n};\nSelectInput.displayName = 'Select';\n\nexport const ForwardedRefSelect = forwardRef<HTMLDivElement, SelectComponentProps>(SelectInput);\n\n// @ts-expect-error We support both Select and Select.Combobox as the Root\nexport const Select: typeof SelectInput & {\n Combobox: typeof ForwardedRefCombobox;\n Item: typeof ForwardedRefSelectItem;\n Group: typeof ForwardedRefSelectItemGroup;\n Slot: typeof ForwardedRefSelectSlot;\n} = ForwardedRefSelect;\nSelect.displayName = 'Select';\nSelect.Combobox = ForwardedRefCombobox;\nSelect.Combobox.displayName = 'Select.Combobox';\nSelect.Item = ForwardedRefSelectItem;\nSelect.Item.displayName = 'Select.Item';\nSelect.Group = ForwardedRefSelectItemGroup;\nSelect.Group.displayName = 'Select.Group';\nSelect.Slot = ForwardedRefSelectSlot;\nSelect.Slot.displayName = 'Select.Slot';\n"],"names":["SelectInput","children","onSelect","value","defaultValue","placeholder","status","disabled","alignMenu","side","id","showStringValue","dataTestId","viewportCollisionPadding","props","forwardedRef","inputSlots","menuSlots","items","clearButton","getItemByValue","useSelectData","defaultItem","activeItem","wasClicked","useRef","hasInteractedSinceOpening","setHasInteractedSinceOpening","useState","getToggleButtonProps","getMenuProps","getItemProps","reset","selectedItem","isOpen","highlightedIndex","useSelect","item","displayedValue","jsxs","RadixPopover","jsx","mouseEvent","focusEvent","blurEvent","styles","RadixSlot","event","IconCaretDown","IconCheckMark","IconExclamationMarkTriangle","SelectMenu","ForwardedRefSelect","forwardRef","Select","ForwardedRefCombobox","ForwardedRefSelectItem","ForwardedRefSelectItemGroup","ForwardedRefSelectSlot"],"mappings":";;;;;;;;;;;;AA6EO,MAAMA,IAAc,CACvB;AAAA,EACI,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,QAAAC,IAAS;AAAA,EACT,UAAA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R,gBAAAmC;AAAA,kBAACS;AAAA,kBAAA;AAAA,oBACG,MAAM;AAAA,oBACN,WAAWL,EAAO;AAAA,oBAClB,gBAAc,GAAGjC,CAAU;AAAA,kBAAA;AAAA,gBAAA,IAE/B;AAAA,cAAA,EAAA,CACR;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACJ;AAAA,IAAA;AAAA,IAGJ,gBAAA6B;AAAA,MAACU;AAAA,MAAA;AAAA,QACG,OAAO3C;AAAA,QACP,MAAAC;AAAA,QACA,kBAAA0B;AAAA,QACA,cAAAL;AAAA,QACA,cAAAC;AAAA,QACA,cAAAE;AAAA,QACA,2BAAAP;AAAA,QACA,0BAAAb;AAAA,QAEC,UAAAI;AAAA,MAAA;AAAA,IAAA;AAAA,EACL,GACJ;AAER;AACAjB,EAAY,cAAc;AAEnB,MAAMoD,KAAqBC,EAAiDrD,CAAW,GAGjFsD,IAKTF;AACJE,EAAO,cAAc;AACrBA,EAAO,WAAWC;AAClBD,EAAO,SAAS,cAAc;AAC9BA,EAAO,OAAOE;AACdF,EAAO,KAAK,cAAc;AAC1BA,EAAO,QAAQG;AACfH,EAAO,MAAM,cAAc;AAC3BA,EAAO,OAAOI;AACdJ,EAAO,KAAK,cAAc;"}
1
+ {"version":3,"file":"fondue-components24.js","sources":["../src/components/Select/Select.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretDown, IconCheckMark, IconExclamationMarkTriangle } from '@frontify/fondue-icons';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { Slot as RadixSlot } from '@radix-ui/react-slot';\nimport { useSelect } from 'downshift';\nimport { forwardRef, useRef, useState, type ForwardedRef, type ReactNode } from 'react';\n\nimport { type CommonAriaProps } from '#/helpers/aria';\n\nimport { ForwardedRefCombobox } from './Combobox';\nimport { ForwardedRefSelectItem, ForwardedRefSelectItemGroup } from './SelectItem';\nimport { SelectMenu, type SelectMenuViewportCollisionPadding } from './SelectMenu';\nimport { ForwardedRefSelectSlot } from './SelectSlot';\nimport styles from './styles/select.module.scss';\nimport { useSelectData } from './useSelectData';\n\nexport type SelectComponentProps = {\n /**\n * Children of the Select component. This can contain the `Select.Slot` components for the label, decorators, clear action and menu.\n */\n children?: ReactNode;\n /**\n * Callback function that is called when an item is selected.\n */\n onSelect?: (selectedValue: string | null) => void;\n /**\n * The active value in the select component. This is used to control the select externally.\n */\n value?: string | null;\n /**\n * The default value of the select component. Used for uncontrolled usages.\n */\n defaultValue?: string;\n /**\n * The placeholder in the select component.\n */\n placeholder?: string;\n /**\n * Status of the text input\n * @default \"neutral\"\n */\n status?: 'neutral' | 'success' | 'error';\n /**\n * Disables the select component.\n */\n disabled?: boolean;\n /**\n * The alignment of the menu.\n * @default \"start\"\n */\n alignMenu?: 'start' | 'center' | 'end';\n /**\n * Defines the preferred side of the select. It will not be respected if there are collisions with the viewport.\n * @default \"bottom\"\n */\n side?: 'left' | 'right' | 'bottom' | 'top';\n /**\n * The data test id of the select component.\n */\n 'data-test-id'?: string;\n /**\n * Id of the select component\n */\n id?: string;\n /**\n * The value of the select is shown as plain text (from the label prop) when set to true.\n * Items child components are used if set to false\n * @default true\n */\n showStringValue?: boolean;\n /**\n * Define the minimum distance between the select menu and the viewport edge\n * @default 'compact'\n */\n viewportCollisionPadding?: SelectMenuViewportCollisionPadding;\n} & CommonAriaProps;\n\nexport const SelectInput = (\n {\n children,\n onSelect,\n value,\n defaultValue,\n placeholder = '',\n status = 'neutral',\n disabled,\n alignMenu = 'start',\n side = 'bottom',\n id,\n showStringValue = true,\n 'data-test-id': dataTestId = 'fondue-select',\n viewportCollisionPadding = 'compact',\n ...props\n }: SelectComponentProps,\n forwardedRef: ForwardedRef<HTMLDivElement>,\n) => {\n const { inputSlots, menuSlots, items, clearButton, getItemByValue } = useSelectData(children);\n\n const defaultItem = getItemByValue(defaultValue);\n const activeItem = getItemByValue(value);\n\n const wasClicked = useRef(false);\n\n const [hasInteractedSinceOpening, setHasInteractedSinceOpening] = useState(false);\n\n const { getToggleButtonProps, getMenuProps, getItemProps, reset, selectedItem, isOpen, highlightedIndex } =\n useSelect({\n items,\n defaultSelectedItem: defaultItem,\n selectedItem: activeItem,\n toggleButtonId: id,\n labelId: 'aria-labelledby' in props ? props['aria-labelledby'] : undefined,\n onIsOpenChange: () => {\n setHasInteractedSinceOpening(false);\n },\n onHighlightedIndexChange: () => {\n setHasInteractedSinceOpening(true);\n },\n onSelectedItemChange: ({ selectedItem }) => {\n onSelect?.(selectedItem?.value ?? null);\n },\n itemToString: (item) => (item ? item.label : ''),\n });\n\n const displayedValue = selectedItem\n ? (!showStringValue && selectedItem.children) || selectedItem.label\n : placeholder;\n\n return (\n <RadixPopover.Root open={isOpen}>\n <RadixPopover.Anchor\n asChild\n onMouseDown={(mouseEvent) => {\n wasClicked.current = true;\n mouseEvent.currentTarget.dataset.showFocusRing = 'false';\n }}\n onFocus={(focusEvent) => {\n if (!wasClicked.current) {\n focusEvent.target.dataset.showFocusRing = 'true';\n }\n }}\n onBlur={(blurEvent) => {\n blurEvent.target.dataset.showFocusRing = 'false';\n wasClicked.current = false;\n }}\n >\n <div\n className={styles.root}\n data-status={status}\n data-disabled={disabled}\n data-empty={!selectedItem}\n data-test-id={dataTestId}\n {...(disabled\n ? {}\n : getToggleButtonProps({\n 'aria-label': 'aria-label' in props ? props['aria-label'] : undefined,\n ref: forwardedRef,\n }))}\n >\n <span className={styles.selectedValue}>{displayedValue}</span>\n {inputSlots}\n {clearButton ? (\n <RadixSlot\n onClick={(event) => {\n event.stopPropagation();\n reset();\n }}\n className={styles.clear}\n >\n {clearButton}\n </RadixSlot>\n ) : null}\n <div className={styles.icons}>\n <IconCaretDown size={16} className={styles.caret} />\n {status === 'success' ? (\n <IconCheckMark\n size={16}\n className={styles.iconSuccess}\n data-test-id={`${dataTestId}-success-icon`}\n />\n ) : null}\n {status === 'error' ? (\n <IconExclamationMarkTriangle\n size={16}\n className={styles.iconError}\n data-test-id={`${dataTestId}-error-icon`}\n />\n ) : null}\n </div>\n </div>\n </RadixPopover.Anchor>\n\n <SelectMenu\n align={alignMenu}\n side={side}\n highlightedIndex={highlightedIndex}\n getMenuProps={getMenuProps}\n getItemProps={getItemProps}\n selectedItem={selectedItem}\n hasInteractedSinceOpening={hasInteractedSinceOpening}\n viewportCollisionPadding={viewportCollisionPadding}\n >\n {menuSlots}\n </SelectMenu>\n </RadixPopover.Root>\n );\n};\nSelectInput.displayName = 'Select';\n\nexport const ForwardedRefSelect = forwardRef<HTMLDivElement, SelectComponentProps>(SelectInput);\n\n// @ts-expect-error We support both Select and Select.Combobox as the Root\nexport const Select: typeof SelectInput & {\n Combobox: typeof ForwardedRefCombobox;\n Item: typeof ForwardedRefSelectItem;\n Group: typeof ForwardedRefSelectItemGroup;\n Slot: typeof ForwardedRefSelectSlot;\n} = ForwardedRefSelect;\nSelect.displayName = 'Select';\nSelect.Combobox = ForwardedRefCombobox;\nSelect.Combobox.displayName = 'Select.Combobox';\nSelect.Item = ForwardedRefSelectItem;\nSelect.Item.displayName = 'Select.Item';\nSelect.Group = ForwardedRefSelectItemGroup;\nSelect.Group.displayName = 'Select.Group';\nSelect.Slot = ForwardedRefSelectSlot;\nSelect.Slot.displayName = 'Select.Slot';\n"],"names":["SelectInput","children","onSelect","value","defaultValue","placeholder","status","disabled","alignMenu","side","id","showStringValue","dataTestId","viewportCollisionPadding","props","forwardedRef","inputSlots","menuSlots","items","clearButton","getItemByValue","useSelectData","defaultItem","activeItem","wasClicked","useRef","hasInteractedSinceOpening","setHasInteractedSinceOpening","useState","getToggleButtonProps","getMenuProps","getItemProps","reset","selectedItem","isOpen","highlightedIndex","useSelect","item","displayedValue","jsxs","RadixPopover","jsx","mouseEvent","focusEvent","blurEvent","styles","RadixSlot","event","IconCaretDown","IconCheckMark","IconExclamationMarkTriangle","SelectMenu","ForwardedRefSelect","forwardRef","Select","ForwardedRefCombobox","ForwardedRefSelectItem","ForwardedRefSelectItemGroup","ForwardedRefSelectSlot"],"mappings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,YACR,gBAAAmC;AAAA,kBAACQ;AAAA,kBAAA;AAAA,oBACG,MAAM;AAAA,oBACN,WAAWJ,EAAO;AAAA,oBAClB,gBAAc,GAAGjC,CAAU;AAAA,kBAAA;AAAA,gBAAA,IAE/B;AAAA,gBACHN,MAAW,UACR,gBAAAmC;AAAA,kBAACS;AAAA,kBAAA;AAAA,oBACG,MAAM;AAAA,oBACN,WAAWL,EAAO;AAAA,oBAClB,gBAAc,GAAGjC,CAAU;AAAA,kBAAA;AAAA,gBAAA,IAE/B;AAAA,cAAA,EAAA,CACR;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACJ;AAAA,IAAA;AAAA,IAGJ,gBAAA6B;AAAA,MAACU;AAAA,MAAA;AAAA,QACG,OAAO3C;AAAA,QACP,MAAAC;AAAA,QACA,kBAAA0B;AAAA,QACA,cAAAL;AAAA,QACA,cAAAC;AAAA,QACA,cAAAE;AAAA,QACA,2BAAAP;AAAA,QACA,0BAAAb;AAAA,QAEC,UAAAI;AAAA,MAAA;AAAA,IAAA;AAAA,EACL,GACJ;AAER;AACAjB,EAAY,cAAc;AAEnB,MAAMoD,KAAqBC,EAAiDrD,CAAW,GAGjFsD,IAKTF;AACJE,EAAO,cAAc;AACrBA,EAAO,WAAWC;AAClBD,EAAO,SAAS,cAAc;AAC9BA,EAAO,OAAOE;AACdF,EAAO,KAAK,cAAc;AAC1BA,EAAO,QAAQG;AACfH,EAAO,MAAM,cAAc;AAC3BA,EAAO,OAAOI;AACdJ,EAAO,KAAK,cAAc;"}
@@ -1,7 +1,7 @@
1
1
  import { jsxs as f, jsx as s } from "react/jsx-runtime";
2
2
  import * as e from "@radix-ui/react-slider";
3
3
  import { forwardRef as h, useRef as R } from "react";
4
- import r from "./fondue-components76.js";
4
+ import r from "./fondue-components77.js";
5
5
  const g = ({
6
6
  value: a,
7
7
  defaultValue: n = [0],
@@ -1,36 +1,103 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import * as o from "@radix-ui/react-switch";
3
- import { forwardRef as n } from "react";
4
- import { useTranslation as f } from "./fondue-components36.js";
5
- import { cn as p } from "./fondue-components41.js";
6
- import t from "./fondue-components77.js";
7
- const u = ({
8
- value: a,
9
- defaultValue: r,
10
- size: i = "medium",
11
- onChange: m,
12
- "data-test-id": c = "fondue-switch",
13
- "aria-label": s,
14
- ...d
15
- }, h) => {
16
- const { t: l } = f();
17
- return /* @__PURE__ */ e(
18
- o.Root,
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { forwardRef as c } from "react";
3
+ import d from "./fondue-components78.js";
4
+ const b = c(
5
+ ({
6
+ "aria-label": t,
7
+ "data-test-id": a = "split-button",
8
+ children: o,
9
+ disabled: i = !1,
10
+ emphasis: e = "default",
11
+ size: n = "medium"
12
+ }, l) => /* @__PURE__ */ s(
13
+ "div",
19
14
  {
20
- ref: h,
21
- checked: a,
22
- defaultChecked: r,
23
- className: p([t.root, t[i]]),
24
- onCheckedChange: m,
25
- "aria-label": s ?? l("Switch_defaultLabel"),
26
- "data-test-id": c,
27
- ...d,
28
- children: /* @__PURE__ */ e(o.Thumb, { className: t.thumb })
15
+ ref: l,
16
+ role: "group",
17
+ "aria-label": t,
18
+ "data-test-id": a,
19
+ "data-component": "split-button",
20
+ "data-emphasis": e,
21
+ "data-size": n,
22
+ "data-disabled": i,
23
+ className: d.root,
24
+ children: o
29
25
  }
30
- );
31
- }, w = n(u);
32
- w.displayName = "Switch";
26
+ )
27
+ );
28
+ b.displayName = "SplitButton.Root";
29
+ const p = c(
30
+ ({
31
+ "aria-label": t,
32
+ "aria-describedby": a,
33
+ "data-test-id": o = "split-button-content",
34
+ children: i,
35
+ disabled: e = !1,
36
+ onPress: n,
37
+ title: l,
38
+ type: r = "button"
39
+ }, u) => /* @__PURE__ */ s(
40
+ "button",
41
+ {
42
+ ref: u,
43
+ type: r,
44
+ disabled: e,
45
+ "aria-label": t,
46
+ "aria-describedby": a,
47
+ title: l,
48
+ "data-test-id": o,
49
+ className: d.content,
50
+ onClick: n,
51
+ children: i
52
+ }
53
+ )
54
+ );
55
+ p.displayName = "SplitButton.Content";
56
+ const m = ({
57
+ "aria-label": t,
58
+ "data-test-id": a = "split-button-action",
59
+ rotateIcon: o = !0,
60
+ children: i
61
+ }) => /* @__PURE__ */ s("div", { "aria-label": t, "data-test-id": a, "data-rotate-icon": o, className: d.action, children: i });
62
+ m.displayName = "SplitButton.Action";
63
+ const B = c(
64
+ ({
65
+ "aria-label": t,
66
+ "aria-describedby": a,
67
+ "data-test-id": o = "split-button-action-button",
68
+ children: i,
69
+ disabled: e = !1,
70
+ title: n,
71
+ type: l = "button",
72
+ ...r
73
+ }, u) => /* @__PURE__ */ s(
74
+ "button",
75
+ {
76
+ ref: u,
77
+ type: l,
78
+ disabled: e,
79
+ "aria-label": t,
80
+ "aria-describedby": a,
81
+ title: n,
82
+ "data-test-id": o,
83
+ className: d.actionButton,
84
+ ...r,
85
+ children: i
86
+ }
87
+ )
88
+ );
89
+ B.displayName = "SplitButton.ActionButton";
90
+ const N = {
91
+ Root: b,
92
+ Content: p,
93
+ Action: m,
94
+ ActionButton: B
95
+ };
33
96
  export {
34
- w as Switch
97
+ N as SplitButton,
98
+ m as SplitButtonAction,
99
+ B as SplitButtonActionButton,
100
+ p as SplitButtonContent,
101
+ b as SplitButtonRoot
35
102
  };
36
103
  //# sourceMappingURL=fondue-components26.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components26.js","sources":["../src/components/Switch/Switch.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as RadixSwitch from '@radix-ui/react-switch';\nimport { type FormEvent, type ForwardedRef, forwardRef } from 'react';\n\nimport { useTranslation } from '#/hooks/useTranslation';\nimport { cn } from '#/utilities/styleUtilities';\nimport { type CommonAriaAttrs } from '#/utilities/types';\n\nimport styles from './styles/switch.module.scss';\n\ntype SwitchProps = {\n id?: string;\n name?: string;\n /**\n * The size of the switch component.\n * @default medium\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * The active value in the select component. This is used to control the select externally.\n * @default false\n */\n value?: boolean;\n /**\n * The default value of the select component. Used for uncontrolled usages.\n * @default false\n */\n defaultValue?: boolean;\n /**\n * Disables the select component.\n * @default false\n */\n disabled?: boolean;\n /**\n * Whether the switch is required.\n * @default false\n */\n required?: boolean;\n /**\n * Callback function that is called when the switch is toggled.\n * @param checked - The new checked state of the switch\n */\n onChange?: (checked: boolean) => void;\n /**\n * Event handler called when the checkbox is blurred\n * @param event - The event object\n */\n onBlur?: (event: FormEvent<HTMLButtonElement>) => void;\n /**\n * Event handler called when the checkbox is focused\n * @param event - The event object\n */\n onFocus?: (event: FormEvent<HTMLButtonElement>) => void;\n 'data-test-id'?: string;\n} & CommonAriaAttrs;\n\nconst SwitchComponent = (\n {\n value,\n defaultValue,\n size = 'medium',\n onChange,\n 'data-test-id': dataTestId = 'fondue-switch',\n 'aria-label': ariaLabel,\n ...props\n }: SwitchProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n const { t } = useTranslation();\n\n return (\n <RadixSwitch.Root\n ref={ref}\n checked={value}\n defaultChecked={defaultValue}\n className={cn([styles.root, styles[size]])}\n onCheckedChange={onChange}\n aria-label={ariaLabel ?? t('Switch_defaultLabel')}\n data-test-id={dataTestId}\n {...props}\n >\n <RadixSwitch.Thumb className={styles.thumb} />\n </RadixSwitch.Root>\n );\n};\n\nexport const Switch = forwardRef<HTMLButtonElement, SwitchProps>(SwitchComponent);\nSwitch.displayName = 'Switch';\n"],"names":["SwitchComponent","value","defaultValue","size","onChange","dataTestId","ariaLabel","props","ref","t","useTranslation","jsx","RadixSwitch","cn","styles","Switch","forwardRef"],"mappings":";;;;;;AAyDA,MAAMA,IAAkB,CACpB;AAAA,EACI,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,UAAAC;AAAA,EACA,gBAAgBC,IAAa;AAAA,EAC7B,cAAcC;AAAA,EACd,GAAGC;AACP,GACAC,MACC;AACD,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA;AAEd,SACI,gBAAAC;AAAA,IAACC,EAAY;AAAA,IAAZ;AAAA,MACG,KAAAJ;AAAA,MACA,SAASP;AAAA,MACT,gBAAgBC;AAAA,MAChB,WAAWW,EAAG,CAACC,EAAO,MAAMA,EAAOX,CAAI,CAAC,CAAC;AAAA,MACzC,iBAAiBC;AAAA,MACjB,cAAYE,KAAaG,EAAE,qBAAqB;AAAA,MAChD,gBAAcJ;AAAA,MACb,GAAGE;AAAA,MAEJ,4BAACK,EAAY,OAAZ,EAAkB,WAAWE,EAAO,MAAA,CAAO;AAAA,IAAA;AAAA,EAAA;AAGxD,GAEaC,IAASC,EAA2ChB,CAAe;AAChFe,EAAO,cAAc;"}
1
+ {"version":3,"file":"fondue-components26.js","sources":["../src/components/SplitButton/SplitButton.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type ForwardedRef, type MouseEvent, type ReactNode } from 'react';\n\nimport styles from './styles/splitButton.module.scss';\n\ntype ButtonSize = 'small' | 'medium' | 'large';\n\ntype ButtonEmphasis = 'default' | 'weak' | 'strong';\n\nexport type SplitButtonProps = {\n /**\n * @default 'default'\n */\n emphasis?: ButtonEmphasis;\n /**\n * @default 'medium'\n */\n size?: ButtonSize;\n /**\n * @default false\n */\n disabled?: boolean;\n /**\n * Accessible label for the button group\n */\n 'aria-label'?: string;\n /**\n * Test ID for the root element\n */\n 'data-test-id'?: string;\n children: ReactNode;\n};\n\nexport type SplitButtonContentProps = {\n /**\n * Button type\n * @default 'button'\n */\n type?: 'button' | 'submit' | 'reset';\n /**\n * Whether the button is disabled\n * @default false\n */\n disabled?: boolean;\n /**\n * Click handler\n */\n onPress?: (event?: MouseEvent<HTMLButtonElement>) => void;\n /**\n * Accessible label\n */\n 'aria-label'?: string;\n /**\n * Accessible description\n */\n 'aria-describedby'?: string;\n /**\n * Test ID for the content section\n */\n 'data-test-id'?: string;\n /**\n * Button title\n */\n title?: string;\n children: ReactNode;\n};\n\nexport type SplitButtonActionProps = {\n /**\n * Accessible label\n */\n 'aria-label'?: string;\n /**\n * Test ID for the action slot\n */\n 'data-test-id'?: string;\n /**\n * Whether to rotate the icon 180 degrees when active (typically for caret icons)\n * @default true\n */\n rotateIcon?: boolean;\n children: ReactNode;\n};\n\nexport type SplitButtonActionButtonProps = {\n /**\n * Button type\n * @default 'button'\n */\n type?: 'button' | 'submit' | 'reset';\n /**\n * Whether the button is disabled\n * @default false\n */\n disabled?: boolean;\n /**\n * Accessible label\n */\n 'aria-label'?: string;\n /**\n * Accessible description\n */\n 'aria-describedby'?: string;\n /**\n * Test ID for the action button\n */\n 'data-test-id'?: string;\n /**\n * Button title\n */\n title?: string;\n children: ReactNode;\n};\n\nexport const SplitButtonRoot = forwardRef<HTMLDivElement, SplitButtonProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'data-test-id': dataTestId = 'split-button',\n children,\n disabled = false,\n emphasis = 'default',\n size = 'medium',\n }: SplitButtonProps,\n ref: ForwardedRef<HTMLDivElement>,\n ) => {\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-label={ariaLabel}\n data-test-id={dataTestId}\n data-component=\"split-button\"\n data-emphasis={emphasis}\n data-size={size}\n data-disabled={disabled}\n className={styles.root}\n >\n {children}\n </div>\n );\n },\n);\nSplitButtonRoot.displayName = 'SplitButton.Root';\n\nexport const SplitButtonContent = forwardRef<HTMLButtonElement, SplitButtonContentProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedby,\n 'data-test-id': dataTestId = 'split-button-content',\n children,\n disabled = false,\n onPress,\n title,\n type = 'button',\n }: SplitButtonContentProps,\n ref: ForwardedRef<HTMLButtonElement>,\n ) => {\n return (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n title={title}\n data-test-id={dataTestId}\n className={styles.content}\n onClick={onPress}\n >\n {children}\n </button>\n );\n },\n);\nSplitButtonContent.displayName = 'SplitButton.Content';\n\nexport const SplitButtonAction = ({\n 'aria-label': ariaLabel,\n 'data-test-id': dataTestId = 'split-button-action',\n rotateIcon = true,\n children,\n}: SplitButtonActionProps) => {\n return (\n <div aria-label={ariaLabel} data-test-id={dataTestId} data-rotate-icon={rotateIcon} className={styles.action}>\n {children}\n </div>\n );\n};\nSplitButtonAction.displayName = 'SplitButton.Action';\n\nexport const SplitButtonActionButton = forwardRef<HTMLButtonElement, SplitButtonActionButtonProps>(\n (\n {\n 'aria-label': ariaLabel,\n 'aria-describedby': ariaDescribedby,\n 'data-test-id': dataTestId = 'split-button-action-button',\n children,\n disabled = false,\n title,\n type = 'button',\n ...props\n },\n ref,\n ) => {\n return (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n title={title}\n data-test-id={dataTestId}\n className={styles.actionButton}\n {...props}\n >\n {children}\n </button>\n );\n },\n);\nSplitButtonActionButton.displayName = 'SplitButton.ActionButton';\n\nexport const SplitButton = {\n Root: SplitButtonRoot,\n Content: SplitButtonContent,\n Action: SplitButtonAction,\n ActionButton: SplitButtonActionButton,\n};\n"],"names":["SplitButtonRoot","forwardRef","ariaLabel","dataTestId","children","disabled","emphasis","size","ref","jsx","styles","SplitButtonContent","ariaDescribedby","onPress","title","type","SplitButtonAction","rotateIcon","SplitButtonActionButton","props","SplitButton"],"mappings":";;;AAmHO,MAAMA,IAAkBC;AAAA,EAC3B,CACI;AAAA,IACI,cAAcC;AAAA,IACd,gBAAgBC,IAAa;AAAA,IAC7B,UAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,UAAAC,IAAW;AAAA,IACX,MAAAC,IAAO;AAAA,EAAA,GAEXC,MAGI,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,KAAAD;AAAA,MACA,MAAK;AAAA,MACL,cAAYN;AAAA,MACZ,gBAAcC;AAAA,MACd,kBAAe;AAAA,MACf,iB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