@frontify/fondue-components 3.3.2 → 3.3.4

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.
@@ -1,90 +1,96 @@
1
- import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
- import { IconCaretDown as G, IconCheckMark as z, IconExclamationMarkTriangle as D } from "@frontify/fondue-icons";
3
- import * as f from "@radix-ui/react-popover";
4
- import { Slot as j } from "@radix-ui/react-slot";
5
- import { useSelect as E } from "downshift";
6
- import { forwardRef as T, useRef as $ } from "react";
7
- import { ForwardedRefCombobox as A } from "./fondue-components48.js";
8
- import { ForwardedRefSelectItem as O, ForwardedRefSelectItemGroup as V } from "./fondue-components49.js";
9
- import { SelectMenu as q } from "./fondue-components50.js";
10
- import { ForwardedRefSelectSlot as H } from "./fondue-components51.js";
11
- import r from "./fondue-components52.js";
12
- import { useSelectData as J } from "./fondue-components53.js";
13
- const S = ({
14
- children: g,
15
- onSelect: m,
16
- value: h,
17
- defaultValue: I,
18
- placeholder: N = "",
19
- status: a = "neutral",
20
- disabled: n,
21
- "aria-label": b,
22
- "data-test-id": s = "fondue-select"
1
+ import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
+ import { IconCaretDown as z, IconCheckMark as D, IconExclamationMarkTriangle as j } from "@frontify/fondue-icons";
3
+ import * as S from "@radix-ui/react-popover";
4
+ import { Slot as E } from "@radix-ui/react-slot";
5
+ import { useSelect as H } from "downshift";
6
+ import { forwardRef as T, useRef as $, useState as A } from "react";
7
+ import { ForwardedRefCombobox as V } from "./fondue-components48.js";
8
+ import { ForwardedRefSelectItem as q, ForwardedRefSelectItemGroup as J } from "./fondue-components49.js";
9
+ import { SelectMenu as K } from "./fondue-components50.js";
10
+ import { ForwardedRefSelectSlot as L } from "./fondue-components51.js";
11
+ import a from "./fondue-components52.js";
12
+ import { useSelectData as Q } from "./fondue-components53.js";
13
+ const g = ({
14
+ children: h,
15
+ onSelect: i,
16
+ value: I,
17
+ defaultValue: N,
18
+ placeholder: b = "",
19
+ status: s = "neutral",
20
+ disabled: m,
21
+ "aria-label": C,
22
+ "data-test-id": l = "fondue-select"
23
23
  }, d) => {
24
- const { inputSlots: w, menuSlots: R, items: x, clearButton: u, getItemByValue: p } = J(g), C = p(I), y = p(h), l = $(!1), { getToggleButtonProps: F, getMenuProps: k, getItemProps: v, reset: M, selectedItem: c, isOpen: P, highlightedIndex: B } = E({
25
- items: x,
26
- defaultSelectedItem: C,
27
- selectedItem: y,
24
+ const { inputSlots: w, menuSlots: x, items: R, clearButton: u, getItemByValue: p } = Q(h), y = p(N), F = p(I), c = $(!1), [k, f] = A(!1), { getToggleButtonProps: v, getMenuProps: M, getItemProps: P, reset: B, selectedItem: r, isOpen: G, highlightedIndex: O } = H({
25
+ items: R,
26
+ defaultSelectedItem: y,
27
+ selectedItem: F,
28
+ onIsOpenChange: () => {
29
+ f(!1);
30
+ },
31
+ onHighlightedIndexChange: () => {
32
+ f(!0);
33
+ },
28
34
  onSelectedItemChange: ({ selectedItem: e }) => {
29
- m && m(e.value);
35
+ i && i(e.value);
30
36
  },
31
37
  itemToString: (e) => e ? e.label : ""
32
38
  });
33
- return /* @__PURE__ */ i(f.Root, { open: P, children: [
39
+ return /* @__PURE__ */ n(S.Root, { open: G, children: [
34
40
  /* @__PURE__ */ o(
35
- f.Anchor,
41
+ S.Anchor,
36
42
  {
37
43
  asChild: !0,
38
44
  onMouseDown: (e) => {
39
- l.current = !0, e.currentTarget.dataset.showFocusRing = "false";
45
+ c.current = !0, e.currentTarget.dataset.showFocusRing = "false";
40
46
  },
41
47
  onFocus: (e) => {
42
- l.current || (e.target.dataset.showFocusRing = "true");
48
+ c.current || (e.target.dataset.showFocusRing = "true");
43
49
  },
44
50
  onBlur: (e) => {
45
- e.target.dataset.showFocusRing = "false", l.current = !1;
51
+ e.target.dataset.showFocusRing = "false", c.current = !1;
46
52
  },
47
- children: /* @__PURE__ */ i(
53
+ children: /* @__PURE__ */ n(
48
54
  "div",
49
55
  {
50
- className: r.root,
51
- "data-status": a,
52
- "data-disabled": n,
53
- "data-empty": !c,
54
- "data-test-id": s,
55
- ...n ? {} : F({
56
- "aria-label": b,
56
+ className: a.root,
57
+ "data-status": s,
58
+ "data-disabled": m,
59
+ "data-empty": !r,
60
+ "data-test-id": l,
61
+ ...m ? {} : v({
62
+ "aria-label": C,
57
63
  ...d ? { ref: d } : {}
58
64
  }),
59
65
  children: [
60
- /* @__PURE__ */ o("span", { className: r.input, children: c ? c.label : N }),
66
+ /* @__PURE__ */ o("span", { className: a.input, children: r ? r.label : b }),
61
67
  w,
62
68
  u && /* @__PURE__ */ o(
63
- j,
69
+ E,
64
70
  {
65
71
  onClick: (e) => {
66
- e.stopPropagation(), M();
72
+ e.stopPropagation(), B();
67
73
  },
68
- className: r.clear,
74
+ className: a.clear,
69
75
  children: u
70
76
  }
71
77
  ),
72
- /* @__PURE__ */ i("div", { className: r.icons, children: [
73
- /* @__PURE__ */ o(G, { size: 16, className: r.caret }),
74
- a === "success" ? /* @__PURE__ */ o(
75
- z,
78
+ /* @__PURE__ */ n("div", { className: a.icons, children: [
79
+ /* @__PURE__ */ o(z, { size: 16, className: a.caret }),
80
+ s === "success" ? /* @__PURE__ */ o(
81
+ D,
76
82
  {
77
83
  size: 16,
78
- className: r.iconSuccess,
79
- "data-test-id": `${s}-success-icon`
84
+ className: a.iconSuccess,
85
+ "data-test-id": `${l}-success-icon`
80
86
  }
81
87
  ) : null,
82
- a === "error" ? /* @__PURE__ */ o(
83
- D,
88
+ s === "error" ? /* @__PURE__ */ o(
89
+ j,
84
90
  {
85
91
  size: 16,
86
- className: r.iconError,
87
- "data-test-id": `${s}-error-icon`
92
+ className: a.iconError,
93
+ "data-test-id": `${l}-error-icon`
88
94
  }
89
95
  ) : null
90
96
  ] })
@@ -93,23 +99,33 @@ const S = ({
93
99
  )
94
100
  }
95
101
  ),
96
- /* @__PURE__ */ o(q, { highlightedIndex: B, getMenuProps: k, getItemProps: v, children: R })
102
+ /* @__PURE__ */ o(
103
+ K,
104
+ {
105
+ highlightedIndex: O,
106
+ getMenuProps: M,
107
+ getItemProps: P,
108
+ selectedItem: r,
109
+ hasInteractedSinceOpening: k,
110
+ children: x
111
+ }
112
+ )
97
113
  ] });
98
114
  };
99
- S.displayName = "Select";
100
- const K = T(S), t = K;
115
+ g.displayName = "Select";
116
+ const U = T(g), t = U;
101
117
  t.displayName = "Select";
102
- t.Combobox = A;
118
+ t.Combobox = V;
103
119
  t.Combobox.displayName = "Select.Combobox";
104
- t.Item = O;
120
+ t.Item = q;
105
121
  t.Item.displayName = "Select.Item";
106
- t.Group = V;
122
+ t.Group = J;
107
123
  t.Group.displayName = "Select.Group";
108
- t.Slot = H;
124
+ t.Slot = L;
109
125
  t.Slot.displayName = "Select.Slot";
110
126
  export {
111
- K as ForwardedRefSelect,
127
+ U as ForwardedRefSelect,
112
128
  t as Select,
113
- S as SelectInput
129
+ g as SelectInput
114
130
  };
115
131
  //# sourceMappingURL=fondue-components18.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components18.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, type ForwardedRef, type ReactNode } from 'react';\n\nimport { ForwardedRefCombobox } from './Combobox';\nimport { ForwardedRefSelectItem, ForwardedRefSelectItemGroup } from './SelectItem';\nimport { SelectMenu } 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) => void;\n /**\n * The active value in the select component. This is used to control the select externally.\n */\n value?: string;\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 aria label of the select component.\n */\n 'aria-label'?: string;\n /**\n * The data test id of the select component.\n */\n 'data-test-id'?: string;\n};\n\nexport const SelectInput = (\n {\n children,\n onSelect,\n value,\n defaultValue,\n placeholder = '',\n status = 'neutral',\n disabled,\n 'aria-label': ariaLabel,\n 'data-test-id': dataTestId = 'fondue-select',\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 { getToggleButtonProps, getMenuProps, getItemProps, reset, selectedItem, isOpen, highlightedIndex } =\n useSelect({\n items,\n defaultSelectedItem: defaultItem,\n selectedItem: activeItem,\n onSelectedItemChange: ({ selectedItem }) => {\n onSelect && onSelect(selectedItem.value);\n },\n itemToString: (item) => (item ? item.label : ''),\n });\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': ariaLabel,\n ...(forwardedRef ? { ref: forwardedRef } : {}),\n }))}\n >\n <span className={styles.input}>{selectedItem ? selectedItem.label : placeholder}</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 )}\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 highlightedIndex={highlightedIndex} getMenuProps={getMenuProps} getItemProps={getItemProps}>\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","ariaLabel","dataTestId","forwardedRef","inputSlots","menuSlots","items","clearButton","getItemByValue","useSelectData","defaultItem","activeItem","wasClicked","useRef","getToggleButtonProps","getMenuProps","getItemProps","reset","selectedItem","isOpen","highlightedIndex","useSelect","item","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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"}
1
+ {"version":3,"file":"fondue-components18.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 { ForwardedRefCombobox } from './Combobox';\nimport { ForwardedRefSelectItem, ForwardedRefSelectItemGroup } from './SelectItem';\nimport { SelectMenu } 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) => void;\n /**\n * The active value in the select component. This is used to control the select externally.\n */\n value?: string;\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 aria label of the select component.\n */\n 'aria-label'?: string;\n /**\n * The data test id of the select component.\n */\n 'data-test-id'?: string;\n};\n\nexport const SelectInput = (\n {\n children,\n onSelect,\n value,\n defaultValue,\n placeholder = '',\n status = 'neutral',\n disabled,\n 'aria-label': ariaLabel,\n 'data-test-id': dataTestId = 'fondue-select',\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 onIsOpenChange: () => {\n setHasInteractedSinceOpening(false);\n },\n onHighlightedIndexChange: () => {\n setHasInteractedSinceOpening(true);\n },\n onSelectedItemChange: ({ selectedItem }) => {\n onSelect && onSelect(selectedItem.value);\n },\n itemToString: (item) => (item ? item.label : ''),\n });\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': ariaLabel,\n ...(forwardedRef ? { ref: forwardedRef } : {}),\n }))}\n >\n <span className={styles.input}>{selectedItem ? selectedItem.label : placeholder}</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 )}\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 highlightedIndex={highlightedIndex}\n getMenuProps={getMenuProps}\n getItemProps={getItemProps}\n selectedItem={selectedItem}\n hasInteractedSinceOpening={hasInteractedSinceOpening}\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","ariaLabel","dataTestId","forwardedRef","inputSlots","menuSlots","items","clearButton","getItemByValue","useSelectData","defaultItem","activeItem","wasClicked","useRef","hasInteractedSinceOpening","setHasInteractedSinceOpening","useState","getToggleButtonProps","getMenuProps","getItemProps","reset","selectedItem","isOpen","highlightedIndex","useSelect","item","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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"}
@@ -1,11 +1,11 @@
1
1
  import { jsx as e, jsxs as T } from "react/jsx-runtime";
2
2
  import * as o from "@radix-ui/react-tooltip";
3
- import { forwardRef as s } from "react";
3
+ import { forwardRef as n } from "react";
4
4
  import { cn as f } from "./fondue-components25.js";
5
- import n from "./fondue-components57.js";
5
+ import s from "./fondue-components57.js";
6
6
  const d = ({ children: t, enterDelay: r = 700, open: i, onOpenChange: a }) => /* @__PURE__ */ e(o.Provider, { children: /* @__PURE__ */ e(o.Root, { delayDuration: r, open: i, onOpenChange: a, children: t }) });
7
7
  d.displayName = "Tooltip.Root";
8
- const l = ({ children: t, "data-test-id": r = "fondue-tooltip-trigger" }, i) => /* @__PURE__ */ e(o.Trigger, { "data-test-id": r, asChild: !0, ref: i, children: t });
8
+ const l = ({ children: t, "data-test-id": r = "fondue-tooltip-trigger" }, i) => /* @__PURE__ */ e(o.Trigger, { "data-test-id": r, ref: i, children: t });
9
9
  l.displayName = "Tooltip.Trigger";
10
10
  const p = ({
11
11
  children: t,
@@ -19,7 +19,7 @@ const p = ({
19
19
  {
20
20
  "data-test-id": a,
21
21
  "data-tooltip-spacing": m,
22
- className: f(n.root, r),
22
+ className: f(s.root, r),
23
23
  style: { maxWidth: i },
24
24
  collisionPadding: 16,
25
25
  sideOffset: 8,
@@ -27,18 +27,18 @@ const p = ({
27
27
  ...c,
28
28
  children: [
29
29
  t,
30
- /* @__PURE__ */ e(o.Arrow, { "aria-hidden": "true", className: n.arrow })
30
+ /* @__PURE__ */ e(o.Arrow, { "aria-hidden": "true", className: s.arrow })
31
31
  ]
32
32
  }
33
33
  ) });
34
34
  p.displayName = "Tooltip.Content";
35
- const C = {
35
+ const h = {
36
36
  Root: d,
37
- Trigger: s(l),
38
- Content: s(p)
37
+ Trigger: n(l),
38
+ Content: n(p)
39
39
  };
40
40
  export {
41
- C as Tooltip,
41
+ h as Tooltip,
42
42
  p as TooltipContent,
43
43
  d as TooltipRoot,
44
44
  l as TooltipTrigger
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components22.js","sources":["../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as RadixTooltip from '@radix-ui/react-tooltip';\nimport { forwardRef, type ForwardedRef, type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport styles from './styles/tooltip.module.scss';\n\nexport type TooltipRootProps = {\n /**\n * Sets the open state of the tooltip.\n */\n open?: boolean;\n /**\n * Callback that is called when the open state of the tooltip changes.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * The delay in milliseconds before the tooltip appears.\n * @default 700\n */\n enterDelay?: number;\n children: Array<ReactElement<TooltipTriggerProps | TooltipContentProps>>;\n};\nexport type TooltipTriggerProps = { children: ReactNode; 'data-test-id'?: string };\nexport type TooltipContentProps = {\n /**\n * @default \"spacious\"\n */\n padding?: 'spacious' | 'compact';\n /**\n * Defines the preferred side of the tooltip. It will not be respected if there are collisions with the viewport.\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n maxWidth?: string;\n className?: string;\n children: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const TooltipRoot = ({ children, enterDelay = 700, open, onOpenChange }: TooltipRootProps) => {\n return (\n <RadixTooltip.Provider>\n <RadixTooltip.Root delayDuration={enterDelay} open={open} onOpenChange={onOpenChange}>\n {children}\n </RadixTooltip.Root>\n </RadixTooltip.Provider>\n );\n};\nTooltipRoot.displayName = 'Tooltip.Root';\n\nexport const TooltipTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-tooltip-trigger' }: TooltipTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixTooltip.Trigger data-test-id={dataTestId} asChild ref={ref}>\n {children}\n </RadixTooltip.Trigger>\n );\n};\nTooltipTrigger.displayName = 'Tooltip.Trigger';\n\nexport const TooltipContent = (\n {\n children,\n className,\n maxWidth,\n 'data-test-id': dataTestId = 'fondue-tooltip-content',\n padding = 'spacious',\n ...props\n }: TooltipContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixTooltip.Portal>\n <RadixTooltip.Content\n data-test-id={dataTestId}\n data-tooltip-spacing={padding}\n className={cn(styles.root, className)}\n style={{ maxWidth }}\n collisionPadding={16}\n sideOffset={8}\n ref={ref}\n {...props}\n >\n {children}\n <RadixTooltip.Arrow aria-hidden=\"true\" className={styles.arrow} />\n </RadixTooltip.Content>\n </RadixTooltip.Portal>\n );\n};\nTooltipContent.displayName = 'Tooltip.Content';\n\nexport const Tooltip = {\n Root: TooltipRoot,\n Trigger: forwardRef<HTMLButtonElement, TooltipTriggerProps>(TooltipTrigger),\n Content: forwardRef<HTMLDivElement, TooltipContentProps>(TooltipContent),\n};\n"],"names":["TooltipRoot","children","enterDelay","open","onOpenChange","jsx","RadixTooltip","TooltipTrigger","dataTestId","ref","TooltipContent","className","maxWidth","padding","props","jsxs","cn","styles","Tooltip","forwardRef"],"mappings":";;;;;AAyCa,MAAAA,IAAc,CAAC,EAAE,UAAAC,GAAU,YAAAC,IAAa,KAAK,MAAAC,GAAM,cAAAC,QAEvD,gBAAAC,EAAAC,EAAa,UAAb,EACG,UAAC,gBAAAD,EAAAC,EAAa,MAAb,EAAkB,eAAeJ,GAAY,MAAAC,GAAY,cAAAC,GACrD,UAAAH,GACL,EACJ,CAAA;AAGRD,EAAY,cAAc;AAEb,MAAAO,IAAiB,CAC1B,EAAE,UAAAN,GAAU,gBAAgBO,IAAa,4BACzCC,MAGI,gBAAAJ,EAACC,EAAa,SAAb,EAAqB,gBAAcE,GAAY,SAAO,IAAC,KAAAC,GACnD,UAAAR,EACL,CAAA;AAGRM,EAAe,cAAc;AAEtB,MAAMG,IAAiB,CAC1B;AAAA,EACI,UAAAT;AAAA,EACA,WAAAU;AAAA,EACA,UAAAC;AAAA,EACA,gBAAgBJ,IAAa;AAAA,EAC7B,SAAAK,IAAU;AAAA,EACV,GAAGC;AACP,GACAL,MAGI,gBAAAJ,EAACC,EAAa,QAAb,EACG,UAAA,gBAAAS;AAAA,EAACT,EAAa;AAAA,EAAb;AAAA,IACG,gBAAcE;AAAA,IACd,wBAAsBK;AAAA,IACtB,WAAWG,EAAGC,EAAO,MAAMN,CAAS;AAAA,IACpC,OAAO,EAAE,UAAAC,EAAS;AAAA,IAClB,kBAAkB;AAAA,IAClB,YAAY;AAAA,IACZ,KAAAH;AAAA,IACC,GAAGK;AAAA,IAEH,UAAA;AAAA,MAAAb;AAAA,MACD,gBAAAI,EAACC,EAAa,OAAb,EAAmB,eAAY,QAAO,WAAWW,EAAO,OAAO;AAAA,IAAA;AAAA,EAAA;AAExE,EAAA,CAAA;AAGRP,EAAe,cAAc;AAEtB,MAAMQ,IAAU;AAAA,EACnB,MAAMlB;AAAA,EACN,SAASmB,EAAmDZ,CAAc;AAAA,EAC1E,SAASY,EAAgDT,CAAc;AAC3E;"}
1
+ {"version":3,"file":"fondue-components22.js","sources":["../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as RadixTooltip from '@radix-ui/react-tooltip';\nimport { forwardRef, type ForwardedRef, type ReactElement, type ReactNode } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport styles from './styles/tooltip.module.scss';\n\nexport type TooltipRootProps = {\n /**\n * Sets the open state of the tooltip.\n */\n open?: boolean;\n /**\n * Callback that is called when the open state of the tooltip changes.\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * The delay in milliseconds before the tooltip appears.\n * @default 700\n */\n enterDelay?: number;\n children: Array<ReactElement<TooltipTriggerProps | TooltipContentProps>>;\n};\nexport type TooltipTriggerProps = {\n children: ReactNode;\n 'data-test-id'?: string;\n};\nexport type TooltipContentProps = {\n /**\n * @default \"spacious\"\n */\n padding?: 'spacious' | 'compact';\n /**\n * Defines the preferred side of the tooltip. It will not be respected if there are collisions with the viewport.\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n maxWidth?: string;\n className?: string;\n children: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const TooltipRoot = ({ children, enterDelay = 700, open, onOpenChange }: TooltipRootProps) => {\n return (\n <RadixTooltip.Provider>\n <RadixTooltip.Root delayDuration={enterDelay} open={open} onOpenChange={onOpenChange}>\n {children}\n </RadixTooltip.Root>\n </RadixTooltip.Provider>\n );\n};\nTooltipRoot.displayName = 'Tooltip.Root';\n\nexport const TooltipTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-tooltip-trigger' }: TooltipTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixTooltip.Trigger data-test-id={dataTestId} ref={ref}>\n {children}\n </RadixTooltip.Trigger>\n );\n};\nTooltipTrigger.displayName = 'Tooltip.Trigger';\n\nexport const TooltipContent = (\n {\n children,\n className,\n maxWidth,\n 'data-test-id': dataTestId = 'fondue-tooltip-content',\n padding = 'spacious',\n ...props\n }: TooltipContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixTooltip.Portal>\n <RadixTooltip.Content\n data-test-id={dataTestId}\n data-tooltip-spacing={padding}\n className={cn(styles.root, className)}\n style={{ maxWidth }}\n collisionPadding={16}\n sideOffset={8}\n ref={ref}\n {...props}\n >\n {children}\n <RadixTooltip.Arrow aria-hidden=\"true\" className={styles.arrow} />\n </RadixTooltip.Content>\n </RadixTooltip.Portal>\n );\n};\nTooltipContent.displayName = 'Tooltip.Content';\n\nexport const Tooltip = {\n Root: TooltipRoot,\n Trigger: forwardRef<HTMLButtonElement, TooltipTriggerProps>(TooltipTrigger),\n Content: forwardRef<HTMLDivElement, TooltipContentProps>(TooltipContent),\n};\n"],"names":["TooltipRoot","children","enterDelay","open","onOpenChange","jsx","RadixTooltip","TooltipTrigger","dataTestId","ref","TooltipContent","className","maxWidth","padding","props","jsxs","cn","styles","Tooltip","forwardRef"],"mappings":";;;;;AA4Ca,MAAAA,IAAc,CAAC,EAAE,UAAAC,GAAU,YAAAC,IAAa,KAAK,MAAAC,GAAM,cAAAC,QAEvD,gBAAAC,EAAAC,EAAa,UAAb,EACG,UAAC,gBAAAD,EAAAC,EAAa,MAAb,EAAkB,eAAeJ,GAAY,MAAAC,GAAY,cAAAC,GACrD,UAAAH,GACL,EACJ,CAAA;AAGRD,EAAY,cAAc;AAEb,MAAAO,IAAiB,CAC1B,EAAE,UAAAN,GAAU,gBAAgBO,IAAa,4BACzCC,wBAGKH,EAAa,SAAb,EAAqB,gBAAcE,GAAY,KAAAC,GAC3C,UAAAR,EACL,CAAA;AAGRM,EAAe,cAAc;AAEtB,MAAMG,IAAiB,CAC1B;AAAA,EACI,UAAAT;AAAA,EACA,WAAAU;AAAA,EACA,UAAAC;AAAA,EACA,gBAAgBJ,IAAa;AAAA,EAC7B,SAAAK,IAAU;AAAA,EACV,GAAGC;AACP,GACAL,MAGI,gBAAAJ,EAACC,EAAa,QAAb,EACG,UAAA,gBAAAS;AAAA,EAACT,EAAa;AAAA,EAAb;AAAA,IACG,gBAAcE;AAAA,IACd,wBAAsBK;AAAA,IACtB,WAAWG,EAAGC,EAAO,MAAMN,CAAS;AAAA,IACpC,OAAO,EAAE,UAAAC,EAAS;AAAA,IAClB,kBAAkB;AAAA,IAClB,YAAY;AAAA,IACZ,KAAAH;AAAA,IACC,GAAGK;AAAA,IAEH,UAAA;AAAA,MAAAb;AAAA,MACD,gBAAAI,EAACC,EAAa,OAAb,EAAmB,eAAY,QAAO,WAAWW,EAAO,OAAO;AAAA,IAAA;AAAA,EAAA;AAExE,EAAA,CAAA;AAGRP,EAAe,cAAc;AAEtB,MAAMQ,IAAU;AAAA,EACnB,MAAMlB;AAAA,EACN,SAASmB,EAAmDZ,CAAc;AAAA,EAC1E,SAASY,EAAgDT,CAAc;AAC3E;"}
@@ -1,4 +1,4 @@
1
- import { FOCUS_OUTLINE as t } from "./fondue-components58.js";
1
+ import { FOCUS_OUTLINE as t } from "./fondue-components59.js";
2
2
  import { sv as e } from "./fondue-components25.js";
3
3
  const o = e({
4
4
  base: `tw-group tw-border tw-relative tw-flex tw-flex-row tw-gap-2 tw-items-center tw-justify-center tw-cursor-pointer tw-font-body tw-font-medium ${t}`,
@@ -1,4 +1,4 @@
1
- import { FOCUS_OUTLINE as t } from "./fondue-components58.js";
1
+ import { FOCUS_OUTLINE as t } from "./fondue-components59.js";
2
2
  import { sv as e } from "./fondue-components25.js";
3
3
  const s = e({
4
4
  base: `tw-peer tw-relative tw-inline-flex tw-bg-base tw-text-white tw-shrink-0 tw-rounded tw-border tw-border-line-x-strong group-hover:tw-border-line-xx-strong hover:tw-border-line-xx-strong tw-transition-colors data-[state="checked"]:tw-border-transparent data-[state="indeterminate"]:tw-border-transparent disabled:tw-border-line-strong disabled:tw-bg-base disabled:tw-cursor-not-allowed data-[state="checked"]:disabled:tw-bg-box-disabled-strong ${t}`,
@@ -1,7 +1,7 @@
1
1
  import { jsxs as d, jsx as a, Fragment as m } from "react/jsx-runtime";
2
2
  import { IconDroplet as n, IconTrashBin as p, IconCaretDown as f } from "@frontify/fondue-icons";
3
3
  import { forwardRef as I, useId as N } from "react";
4
- import i from "./fondue-components59.js";
4
+ import i from "./fondue-components58.js";
5
5
  import { colorToCss as h } from "./fondue-components34.js";
6
6
  const c = ({ currentColor: e, onClear: s, "data-test-id": t = "color-picker-input", ...r }, l) => {
7
7
  const o = N();
@@ -1,18 +1,18 @@
1
- const t = "_content_duup7_6", e = "_header_duup7_50", o = "_footer_duup7_51", n = "_body_duup7_52", d = "_underlay_duup7_77", _ = "_sideContent_duup7_86", u = {
2
- content: t,
3
- header: e,
4
- footer: o,
5
- body: n,
6
- underlay: d,
7
- sideContent: _
1
+ const o = "_content_1nokb_6", n = "_header_1nokb_50", t = "_footer_1nokb_51", e = "_body_1nokb_52", _ = "_underlay_1nokb_77", d = "_sideContent_1nokb_90", s = {
2
+ content: o,
3
+ header: n,
4
+ footer: t,
5
+ body: e,
6
+ underlay: _,
7
+ sideContent: d
8
8
  };
9
9
  export {
10
- n as body,
11
- t as content,
12
- u as default,
13
- o as footer,
14
- e as header,
15
- _ as sideContent,
16
- d as underlay
10
+ e as body,
11
+ o as content,
12
+ s as default,
13
+ t as footer,
14
+ n as header,
15
+ d as sideContent,
16
+ _ as underlay
17
17
  };
18
18
  //# sourceMappingURL=fondue-components36.js.map
@@ -1,20 +1,20 @@
1
- const t = "_content_ca3qa_4", n = "_subContent_ca3qa_5", o = "_item_ca3qa_15", s = "_subTrigger_ca3qa_16", c = "_subMenuIndicator_ca3qa_53", _ = "_group_ca3qa_59", a = "_slot_ca3qa_66", e = {
2
- content: t,
1
+ const o = "_content_ojnoh_4", n = "_subContent_ojnoh_5", t = "_item_ojnoh_23", s = "_subTrigger_ojnoh_24", _ = "_subMenuIndicator_ojnoh_63", e = "_group_ojnoh_69", u = "_slot_ojnoh_76", c = {
2
+ content: o,
3
3
  subContent: n,
4
- item: o,
4
+ item: t,
5
5
  subTrigger: s,
6
- subMenuIndicator: c,
7
- group: _,
8
- slot: a
6
+ subMenuIndicator: _,
7
+ group: e,
8
+ slot: u
9
9
  };
10
10
  export {
11
- t as content,
12
- e as default,
13
- _ as group,
14
- o as item,
15
- a as slot,
11
+ o as content,
12
+ c as default,
13
+ e as group,
14
+ t as item,
15
+ u as slot,
16
16
  n as subContent,
17
- c as subMenuIndicator,
17
+ _ as subMenuIndicator,
18
18
  s as subTrigger
19
19
  };
20
20
  //# sourceMappingURL=fondue-components39.js.map
@@ -1,79 +1,85 @@
1
1
  import { jsxs as u, jsx as t } from "react/jsx-runtime";
2
- import { IconCaretDown as z, IconCheckMark as j, IconExclamationMarkTriangle as H } from "@frontify/fondue-icons";
2
+ import { IconCaretDown as j, IconCheckMark as $, IconExclamationMarkTriangle as A } from "@frontify/fondue-icons";
3
3
  import * as x from "@radix-ui/react-popover";
4
- import { Slot as $ } from "@radix-ui/react-slot";
5
- import { useCombobox as A } from "downshift";
6
- import { forwardRef as E, useRef as q, useMemo as G } from "react";
7
- import { SelectMenu as J } from "./fondue-components50.js";
4
+ import { Slot as E } from "@radix-ui/react-slot";
5
+ import { useCombobox as q } from "downshift";
6
+ import { forwardRef as G, useState as J, useRef as K, useMemo as Q } from "react";
7
+ import { SelectMenu as U } from "./fondue-components50.js";
8
8
  import o from "./fondue-components52.js";
9
- import { useSelectData as K } from "./fondue-components53.js";
9
+ import { useSelectData as W } from "./fondue-components53.js";
10
10
  const w = ({
11
- children: I,
12
- onSelect: m,
11
+ children: S,
12
+ onSelect: d,
13
13
  value: N,
14
- defaultValue: S,
14
+ defaultValue: O,
15
15
  placeholder: R = "",
16
- status: a = "neutral",
17
- disabled: d,
16
+ status: n = "neutral",
17
+ disabled: m,
18
18
  "aria-label": B,
19
- "data-test-id": l = "fondue-select-combobox"
19
+ "data-test-id": s = "fondue-select-combobox"
20
20
  }, M) => {
21
- const { inputSlots: F, menuSlots: L, items: s, filterText: P, clearButton: p, getItemByValue: f, setFilterText: k } = K(I), {
22
- getInputProps: n,
23
- getToggleButtonProps: v,
24
- getMenuProps: O,
25
- getItemProps: y,
26
- reset: g,
27
- selectedItem: c,
28
- isOpen: D,
29
- highlightedIndex: T,
21
+ const { inputSlots: F, menuSlots: L, items: l, filterText: P, clearButton: p, getItemByValue: g, setFilterText: k } = W(S), [v, f] = J(!1), {
22
+ getInputProps: c,
23
+ getToggleButtonProps: y,
24
+ getMenuProps: D,
25
+ getItemProps: H,
26
+ reset: h,
27
+ selectedItem: r,
28
+ isOpen: T,
29
+ highlightedIndex: V,
30
30
  inputValue: i
31
- } = A({
32
- items: s,
33
- selectedItem: f(N),
34
- defaultSelectedItem: f(S),
31
+ } = q({
32
+ items: l,
33
+ selectedItem: g(N),
34
+ defaultSelectedItem: g(O),
35
35
  defaultHighlightedIndex: 0,
36
36
  onSelectedItemChange: ({ selectedItem: e }) => {
37
- m && m(e.value);
37
+ d && d(e.value);
38
38
  },
39
39
  onInputValueChange: ({ inputValue: e }) => {
40
40
  k(e);
41
41
  },
42
+ onIsOpenChange: () => {
43
+ f(!1);
44
+ },
45
+ onHighlightedIndexChange: () => {
46
+ f(!0);
47
+ },
42
48
  itemToString: (e) => e ? e.label : ""
43
- }), r = q(!1), h = G(
44
- () => !s.find((e) => e.label.toLowerCase().includes(i.toLowerCase())),
45
- [i, s]
46
- ), V = (e) => {
47
- var b, C;
48
- e.target.dataset.showFocusRing = "false", r.current = !1, (c == null ? void 0 : c.label.toLocaleLowerCase()) !== i.toLocaleLowerCase() && g(), n().onBlur && ((C = (b = n()).onBlur) == null || C.call(b, e));
49
+ }), a = K(!1), b = Q(
50
+ () => !l.find((e) => e.label.toLowerCase().includes(i.toLowerCase())),
51
+ [i, l]
52
+ ), z = (e) => {
53
+ var C, I;
54
+ e.target.dataset.showFocusRing = "false", a.current = !1, (r == null ? void 0 : r.label.toLocaleLowerCase()) !== i.toLocaleLowerCase() && h(), c().onBlur && ((I = (C = c()).onBlur) == null || I.call(C, e));
49
55
  };
50
- return /* @__PURE__ */ u(x.Root, { open: D, children: [
51
- /* @__PURE__ */ t(x.Anchor, { asChild: !0, children: /* @__PURE__ */ u("div", { ref: M, className: o.root, "data-status": h ? "error" : a, children: [
56
+ return /* @__PURE__ */ u(x.Root, { open: T, children: [
57
+ /* @__PURE__ */ t(x.Anchor, { asChild: !0, children: /* @__PURE__ */ u("div", { ref: M, className: o.root, "data-status": b ? "error" : n, children: [
52
58
  /* @__PURE__ */ t(
53
59
  "input",
54
60
  {
55
- ...n({
61
+ ...c({
56
62
  "aria-label": B
57
63
  }),
58
- "data-test-id": l,
64
+ "data-test-id": s,
59
65
  placeholder: R,
60
66
  className: o.input,
61
- disabled: d,
67
+ disabled: m,
62
68
  onMouseDown: (e) => {
63
- r.current = !0, e.currentTarget.dataset.showFocusRing = "false";
69
+ a.current = !0, e.currentTarget.dataset.showFocusRing = "false";
64
70
  },
65
71
  onFocus: (e) => {
66
- r.current || (e.target.dataset.showFocusRing = "true");
72
+ a.current || (e.target.dataset.showFocusRing = "true");
67
73
  },
68
- onBlur: V
74
+ onBlur: z
69
75
  }
70
76
  ),
71
77
  F,
72
78
  p && /* @__PURE__ */ t(
73
- $,
79
+ E,
74
80
  {
75
81
  onClick: (e) => {
76
- e.stopPropagation(), g();
82
+ e.stopPropagation(), h();
77
83
  },
78
84
  className: o.clear,
79
85
  role: "button",
@@ -84,50 +90,52 @@ const w = ({
84
90
  /* @__PURE__ */ t(
85
91
  "button",
86
92
  {
87
- ...v(),
93
+ ...y(),
88
94
  type: "button",
89
95
  "aria-label": "toggle menu",
90
- disabled: d,
96
+ disabled: m,
91
97
  onMouseDown: () => {
92
- r.current = !0;
98
+ a.current = !0;
93
99
  },
94
- children: /* @__PURE__ */ t(z, { size: 16, className: o.caret })
100
+ children: /* @__PURE__ */ t(j, { size: 16, className: o.caret })
95
101
  }
96
102
  ),
97
- a === "success" ? /* @__PURE__ */ t(
98
- j,
103
+ n === "success" ? /* @__PURE__ */ t(
104
+ $,
99
105
  {
100
106
  size: 16,
101
107
  className: o.iconSuccess,
102
- "data-test-id": `${l}-success-icon`
108
+ "data-test-id": `${s}-success-icon`
103
109
  }
104
110
  ) : null,
105
- h || a === "error" ? /* @__PURE__ */ t(
106
- H,
111
+ b || n === "error" ? /* @__PURE__ */ t(
112
+ A,
107
113
  {
108
114
  size: 16,
109
115
  className: o.iconError,
110
- "data-test-id": `${l}-error-icon`
116
+ "data-test-id": `${s}-error-icon`
111
117
  }
112
118
  ) : null
113
119
  ] })
114
120
  ] }) }),
115
121
  /* @__PURE__ */ t(
116
- J,
122
+ U,
117
123
  {
118
- highlightedIndex: T,
124
+ highlightedIndex: V,
119
125
  filterText: P,
120
- getMenuProps: O,
121
- getItemProps: y,
126
+ getMenuProps: D,
127
+ getItemProps: H,
128
+ selectedItem: r,
129
+ hasInteractedSinceOpening: v,
122
130
  children: L
123
131
  }
124
132
  )
125
133
  ] });
126
134
  };
127
135
  w.displayName = "Select.Combobox";
128
- const oe = E(w);
136
+ const ne = G(w);
129
137
  export {
130
- oe as ForwardedRefCombobox,
138
+ ne as ForwardedRefCombobox,
131
139
  w as SelectCombobox
132
140
  };
133
141
  //# sourceMappingURL=fondue-components48.js.map