@frontify/fondue-components 8.0.0 → 8.0.1

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 (86) hide show
  1. package/dist/fondue-components10.js +1 -1
  2. package/dist/fondue-components11.js +65 -75
  3. package/dist/fondue-components11.js.map +1 -1
  4. package/dist/fondue-components12.js +1 -1
  5. package/dist/fondue-components14.js +1 -1
  6. package/dist/fondue-components15.js +1 -1
  7. package/dist/fondue-components16.js +1 -1
  8. package/dist/fondue-components17.js +2 -2
  9. package/dist/fondue-components18.js +6 -6
  10. package/dist/fondue-components19.js +1 -1
  11. package/dist/fondue-components20.js +1 -1
  12. package/dist/fondue-components21.js +46 -46
  13. package/dist/fondue-components21.js.map +1 -1
  14. package/dist/fondue-components22.js +3 -3
  15. package/dist/fondue-components23.js +1 -1
  16. package/dist/fondue-components24.js +1 -1
  17. package/dist/fondue-components28.js +1 -1
  18. package/dist/fondue-components31.js +1 -1
  19. package/dist/fondue-components33.js +1 -1
  20. package/dist/fondue-components37.js +10 -25
  21. package/dist/fondue-components37.js.map +1 -1
  22. package/dist/fondue-components40.js +17 -14
  23. package/dist/fondue-components40.js.map +1 -1
  24. package/dist/fondue-components41.js +17 -18
  25. package/dist/fondue-components41.js.map +1 -1
  26. package/dist/fondue-components42.js +4 -16
  27. package/dist/fondue-components42.js.map +1 -1
  28. package/dist/fondue-components43.js +13 -3
  29. package/dist/fondue-components43.js.map +1 -1
  30. package/dist/fondue-components44.js +3 -13
  31. package/dist/fondue-components44.js.map +1 -1
  32. package/dist/fondue-components45.js +35 -5
  33. package/dist/fondue-components45.js.map +1 -1
  34. package/dist/fondue-components46.js +13 -35
  35. package/dist/fondue-components46.js.map +1 -1
  36. package/dist/fondue-components47.js +4 -12
  37. package/dist/fondue-components47.js.map +1 -1
  38. package/dist/fondue-components48.js +24 -4
  39. package/dist/fondue-components48.js.map +1 -1
  40. package/dist/fondue-components49.js +16 -24
  41. package/dist/fondue-components49.js.map +1 -1
  42. package/dist/fondue-components50.js +139 -16
  43. package/dist/fondue-components50.js.map +1 -1
  44. package/dist/fondue-components51.js +16 -140
  45. package/dist/fondue-components51.js.map +1 -1
  46. package/dist/fondue-components52.js +70 -16
  47. package/dist/fondue-components52.js.map +1 -1
  48. package/dist/fondue-components53.js +8 -72
  49. package/dist/fondue-components53.js.map +1 -1
  50. package/dist/fondue-components54.js +33 -8
  51. package/dist/fondue-components54.js.map +1 -1
  52. package/dist/fondue-components55.js +48 -32
  53. package/dist/fondue-components55.js.map +1 -1
  54. package/dist/fondue-components56.js +10 -48
  55. package/dist/fondue-components56.js.map +1 -1
  56. package/dist/fondue-components57.js +10 -8
  57. package/dist/fondue-components57.js.map +1 -1
  58. package/dist/fondue-components58.js +7 -12
  59. package/dist/fondue-components58.js.map +1 -1
  60. package/dist/fondue-components59.js +12 -7
  61. package/dist/fondue-components59.js.map +1 -1
  62. package/dist/fondue-components60.js +20 -12
  63. package/dist/fondue-components60.js.map +1 -1
  64. package/dist/fondue-components61.js +15 -19
  65. package/dist/fondue-components61.js.map +1 -1
  66. package/dist/fondue-components62.js +52 -14
  67. package/dist/fondue-components62.js.map +1 -1
  68. package/dist/fondue-components63.js +14 -52
  69. package/dist/fondue-components63.js.map +1 -1
  70. package/dist/fondue-components64.js +17 -14
  71. package/dist/fondue-components64.js.map +1 -1
  72. package/dist/fondue-components65.js +6 -17
  73. package/dist/fondue-components65.js.map +1 -1
  74. package/dist/fondue-components66.js +2 -7
  75. package/dist/fondue-components66.js.map +1 -1
  76. package/dist/fondue-components67.js +15 -2
  77. package/dist/fondue-components67.js.map +1 -1
  78. package/dist/fondue-components68.js +38 -14
  79. package/dist/fondue-components68.js.map +1 -1
  80. package/dist/fondue-components9.js +91 -101
  81. package/dist/fondue-components9.js.map +1 -1
  82. package/dist/index.d.ts +0 -2
  83. package/dist/style.css +1 -1
  84. package/package.json +1 -1
  85. package/dist/fondue-components69.js +0 -42
  86. package/dist/fondue-components69.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components63.js","sources":["../src/components/Tabs/hooks/useTabTriggers.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type RefObject, useEffect, useLayoutEffect, useRef, useState } from 'react';\n\nimport { type TabTrigger } from '../types';\n\nconst getOverflowingTriggers = (triggers: TabTrigger[], triggerListElement: HTMLDivElement) => {\n return triggers.filter((trigger) => {\n const triggerElement = trigger.ref?.current;\n if (!triggerElement) {\n return false;\n }\n return (\n triggerElement.offsetLeft + triggerElement.offsetWidth >\n triggerListElement?.scrollLeft + triggerListElement.offsetWidth ||\n triggerElement.offsetLeft - triggerListElement.scrollLeft < 0\n );\n });\n};\n\nconst moveActiveIndicator = (triggerListElement: HTMLDivElement, activeIndicatorRef: RefObject<HTMLSpanElement>) => {\n const activeIndicatorElement = activeIndicatorRef.current;\n const activeTriggerElement = triggerListElement?.querySelector('[data-state=\"active\"]');\n\n if (\n !triggerListElement ||\n !(activeTriggerElement instanceof HTMLButtonElement) ||\n !(activeIndicatorElement instanceof HTMLSpanElement)\n ) {\n return;\n }\n\n const isOverflowingLeft = triggerListElement?.scrollLeft > activeTriggerElement?.offsetLeft;\n const isOverflowingRight =\n activeTriggerElement?.offsetLeft + activeTriggerElement?.offsetWidth > triggerListElement?.offsetWidth;\n\n if (isOverflowingLeft) {\n const willFitAllItemsToTheLeft =\n triggerListElement.offsetWidth > activeTriggerElement.offsetWidth + activeTriggerElement.offsetLeft;\n if (willFitAllItemsToTheLeft) {\n activeIndicatorElement.style.left = `${activeTriggerElement.offsetLeft}px`;\n } else {\n activeIndicatorElement.style.left = `${triggerListElement.offsetWidth - activeTriggerElement.offsetWidth}px`;\n }\n activeIndicatorElement.style.width = `${activeTriggerElement?.offsetWidth}px`;\n } else if (isOverflowingRight) {\n activeIndicatorElement.style.left = `${triggerListElement.clientWidth - activeTriggerElement.offsetWidth}px`;\n activeIndicatorElement.style.width = `${activeTriggerElement.offsetWidth}px`;\n } else {\n activeIndicatorElement.style.left = `${activeTriggerElement.offsetLeft}px`;\n activeIndicatorElement.style.width = `${activeTriggerElement.offsetWidth}px`;\n }\n};\n\nexport const useTabTriggers = ({\n activeTab,\n}: {\n activeTab?: string;\n}): {\n triggerListRef: RefObject<HTMLDivElement>;\n activeIndicatorRef: RefObject<HTMLSpanElement>;\n triggers: TabTrigger[];\n triggersOutOfView: TabTrigger[];\n addTrigger: (trigger: TabTrigger) => void;\n} => {\n const triggerListRef = useRef<HTMLDivElement | null>(null);\n const activeIndicatorRef = useRef<HTMLSpanElement | null>(null);\n const [triggers, setTriggers] = useState<TabTrigger[]>([]);\n const [triggersOutOfView, setTriggersOutOfView] = useState<TabTrigger[]>([]);\n\n // move the active indicator and scroll to the correct position when the tab changes\n useEffect(() => {\n const triggerListElement = triggerListRef.current;\n const activeTriggerElement = triggerListElement?.querySelector('[data-state=\"active\"]');\n\n if (activeTriggerElement instanceof HTMLButtonElement && triggerListElement instanceof HTMLDivElement) {\n moveActiveIndicator(triggerListElement, activeIndicatorRef);\n activeTriggerElement.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'end' });\n }\n }, [activeTab, activeIndicatorRef]);\n\n useLayoutEffect(() => {\n const triggerListElement = triggerListRef.current;\n const activeTriggerElement = triggerListElement?.querySelector('[data-state=\"active\"]');\n\n if (triggerListElement instanceof HTMLDivElement && activeTriggerElement instanceof HTMLButtonElement) {\n // move the active indicator to the initial active tab\n moveActiveIndicator(triggerListElement, activeIndicatorRef);\n\n // observe addition of the dropdown trigger which reduces the available width\n const mutationObserver = new MutationObserver(() => {\n activeTriggerElement.scrollIntoView({ behavior: 'instant', block: 'nearest', inline: 'end' });\n moveActiveIndicator(triggerListElement, activeIndicatorRef);\n });\n if (triggerListElement.parentNode) {\n mutationObserver.observe(triggerListElement.parentNode, { childList: true });\n }\n\n // calculate the overflowing elements when item starts overflowing the parent\n const intersectionObserver = new IntersectionObserver(\n () => {\n setTriggersOutOfView(getOverflowingTriggers(triggers, triggerListElement));\n moveActiveIndicator(triggerListElement, activeIndicatorRef);\n },\n {\n root: triggerListElement,\n threshold: 1,\n },\n );\n for (const trigger of triggers) {\n if (trigger.ref?.current) {\n intersectionObserver.observe(trigger.ref.current);\n }\n }\n\n return () => {\n intersectionObserver.disconnect();\n mutationObserver.disconnect();\n };\n }\n }, [triggers, triggerListRef, activeIndicatorRef]);\n\n return {\n triggerListRef,\n activeIndicatorRef,\n triggersOutOfView,\n triggers,\n addTrigger: (trigger) => {\n setTriggers((prev) => [...prev, trigger]);\n },\n };\n};\n"],"names":["getOverflowingTriggers","triggers","triggerListElement","trigger","triggerElement","_a","moveActiveIndicator","activeIndicatorRef","activeIndicatorElement","activeTriggerElement","isOverflowingLeft","isOverflowingRight","useTabTriggers","activeTab","triggerListRef","useRef","setTriggers","useState","triggersOutOfView","setTriggersOutOfView","useEffect","useLayoutEffect","mutationObserver","intersectionObserver","prev"],"mappings":";AAMA,MAAMA,IAAyB,CAACC,GAAwBC,MAC7CD,EAAS,OAAO,CAACE,MAAY;;AAC1B,QAAAC,KAAiBC,IAAAF,EAAQ,QAAR,gBAAAE,EAAa;AACpC,SAAKD,IAIDA,EAAe,aAAaA,EAAe,eACvCF,KAAA,gBAAAA,EAAoB,cAAaA,EAAmB,eACxDE,EAAe,aAAaF,EAAmB,aAAa,IALrD;AAKqD,CAEnE,GAGCI,IAAsB,CAACJ,GAAoCK,MAAmD;AAChH,QAAMC,IAAyBD,EAAmB,SAC5CE,IAAuBP,KAAA,gBAAAA,EAAoB,cAAc;AAE/D,MACI,CAACA,KACD,EAAEO,aAAgC,sBAClC,EAAED,aAAkC;AAEpC;AAGE,QAAAE,KAAoBR,KAAA,gBAAAA,EAAoB,eAAaO,KAAA,gBAAAA,EAAsB,aAC3EE,KACFF,KAAA,gBAAAA,EAAsB,eAAaA,KAAA,gBAAAA,EAAsB,gBAAcP,KAAA,gBAAAA,EAAoB;AAE/F,EAAIQ,KAEIR,EAAmB,cAAcO,EAAqB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AAA,MAAA,CAC7D;AACD,MAAIL,EAAmB,cACnBoB,EAAiB,QAAQpB,EAAmB,YAAY,EAAE,WAAW,IAAM;AAI/E,YAAMqB,IAAuB,IAAI;AAAA,QAC7B,MAAM;AACmB,UAAAJ,EAAAnB,EAAuBC,GAAUC,CAAkB,CAAC,GACzEI,EAAoBJ,GAAoBK,CAAkB;AAAA,QAC9D;AAAA,QACA;AAAA,UACI,MAAML;AAAA,UACN,WAAW;AAAA,QAAA;AAAA,MAEnB;AACA,iBAAWC,KAAWF;AACd,SAAAI,IAAAF,EAAQ,QAAR,QAAAE,EAAa,WACQkB,EAAA,QAAQpB,EAAQ,IAAI,OAAO;AAIxD,aAAO,MAAM;AACT,QAAAoB,EAAqB,WAAW,GAChCD,EAAiB,WAAW;AAAA,MAChC;AAAA,IAAA;AAAA,EAEL,GAAA,CAACrB,GAAUa,GAAgBP,CAAkB,CAAC,GAE1C;AAAA,IACH,gBAAAO;AAAA,IACA,oBAAAP;AAAA,IACA,mBAAAW;AAAA,IACA,UAAAjB;AAAA,IACA,YAAY,CAACE,MAAY;AACrB,MAAAa,EAAY,CAACQ,MAAS,CAAC,GAAGA,GAAMrB,CAAO,CAAC;AAAA,IAAA;AAAA,EAEhD;AACJ;"}
1
+ {"version":3,"file":"fondue-components63.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,18 +1,21 @@
1
- const t = "_root_1s2mi_5", r = "_triggerList_1s2mi_14", i = "_triggerListWrapper_1s2mi_28", s = "_trigger_1s2mi_14", e = "_content_1s2mi_78", o = "_activeIndicator_1s2mi_82", g = {
2
- root: t,
3
- triggerList: r,
4
- triggerListWrapper: i,
5
- trigger: s,
6
- content: e,
7
- activeIndicator: o
1
+ const s = "_root_1s6a3_5", o = "_input_1s6a3_59", t = "_slot_1s6a3_82", _ = "_iconSuccess_1s6a3_132", n = "_iconError_1s6a3_140", c = "_loadingStatus_1s6a3_148", a = "_spin_1s6a3_1", i = {
2
+ root: s,
3
+ input: o,
4
+ slot: t,
5
+ iconSuccess: _,
6
+ iconError: n,
7
+ loadingStatus: c,
8
+ spin: a,
9
+ "tw-dark": "_tw-dark_1s6a3_180"
8
10
  };
9
11
  export {
10
- o as activeIndicator,
11
- e as content,
12
- g as default,
13
- t as root,
14
- s as trigger,
15
- r as triggerList,
16
- i as triggerListWrapper
12
+ i as default,
13
+ n as iconError,
14
+ _ as iconSuccess,
15
+ o as input,
16
+ c as loadingStatus,
17
+ s as root,
18
+ t as slot,
19
+ a as spin
17
20
  };
18
21
  //# sourceMappingURL=fondue-components64.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components64.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"fondue-components64.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -1,21 +1,10 @@
1
- const t = "_root_y2kt3_5", o = "_input_y2kt3_59", s = "_slot_y2kt3_78", _ = "_iconSuccess_y2kt3_128", n = "_iconError_y2kt3_136", c = "_loadingStatus_y2kt3_144", i = "_spin_y2kt3_1", r = {
2
- root: t,
3
- input: o,
4
- slot: s,
5
- iconSuccess: _,
6
- iconError: n,
7
- loadingStatus: c,
8
- spin: i,
9
- "tw-dark": "_tw-dark_y2kt3_176"
1
+ const o = "_root_18vgg_4", r = "_arrow_18vgg_22", t = {
2
+ root: o,
3
+ arrow: r
10
4
  };
11
5
  export {
12
- r as default,
13
- n as iconError,
14
- _ as iconSuccess,
15
- o as input,
16
- c as loadingStatus,
17
- t as root,
18
- s as slot,
19
- i as spin
6
+ r as arrow,
7
+ t as default,
8
+ o as root
20
9
  };
21
10
  //# sourceMappingURL=fondue-components65.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components65.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
1
+ {"version":3,"file":"fondue-components65.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,10 +1,5 @@
1
- const o = "_root_18vgg_4", r = "_arrow_18vgg_22", t = {
2
- root: o,
3
- arrow: r
4
- };
1
+ const t = "focus-visible:tw-outline has-[[data-show-focus-ring=true]]:tw-outline tw-outline-4 tw-outline-offset-2 tw-outline-blue focus-visible:tw-outline-blue";
5
2
  export {
6
- r as arrow,
7
- t as default,
8
- o as root
3
+ t as FOCUS_OUTLINE
9
4
  };
10
5
  //# sourceMappingURL=fondue-components66.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components66.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"fondue-components66.js","sources":["../src/utilities/focusStyle.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nexport const FOCUS_OUTLINE =\n 'focus-visible:tw-outline has-[[data-show-focus-ring=true]]:tw-outline tw-outline-4 tw-outline-offset-2 tw-outline-blue focus-visible:tw-outline-blue'; // second declaration of tw-outline-blue is to assure that in firefox the outline isn't overriden by a global definition of :-moz-focusring which is coming from tailwinds normalization styling\n"],"names":["FOCUS_OUTLINE"],"mappings":"AAEO,MAAMA,IACT;"}
@@ -1,5 +1,18 @@
1
- const t = "focus-visible:tw-outline has-[[data-show-focus-ring=true]]:tw-outline tw-outline-4 tw-outline-offset-2 tw-outline-blue focus-visible:tw-outline-blue";
1
+ const o = "_root_8a8rm_5", t = "_button_8a8rm_56", c = "_colorIndicator_8a8rm_69", r = "_actions_8a8rm_75", a = "_clear_8a8rm_85", _ = "_caret_8a8rm_98", n = {
2
+ root: o,
3
+ button: t,
4
+ colorIndicator: c,
5
+ actions: r,
6
+ clear: a,
7
+ caret: _
8
+ };
2
9
  export {
3
- t as FOCUS_OUTLINE
10
+ r as actions,
11
+ t as button,
12
+ _ as caret,
13
+ a as clear,
14
+ c as colorIndicator,
15
+ n as default,
16
+ o as root
4
17
  };
5
18
  //# sourceMappingURL=fondue-components67.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components67.js","sources":["../src/utilities/focusStyle.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nexport const FOCUS_OUTLINE =\n 'focus-visible:tw-outline has-[[data-show-focus-ring=true]]:tw-outline tw-outline-4 tw-outline-offset-2 tw-outline-blue focus-visible:tw-outline-blue'; // second declaration of tw-outline-blue is to assure that in firefox the outline isn't overriden by a global definition of :-moz-focusring which is coming from tailwinds normalization styling\n"],"names":["FOCUS_OUTLINE"],"mappings":"AAEO,MAAMA,IACT;"}
1
+ {"version":3,"file":"fondue-components67.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,18 +1,42 @@
1
- const o = "_root_8a8rm_5", t = "_button_8a8rm_56", c = "_colorIndicator_8a8rm_69", r = "_actions_8a8rm_75", a = "_clear_8a8rm_85", _ = "_caret_8a8rm_98", n = {
2
- root: o,
3
- button: t,
4
- colorIndicator: c,
5
- actions: r,
6
- clear: a,
7
- caret: _
1
+ import { Children as a, isValidElement as u, cloneElement as f } from "react";
2
+ import { ForwardedRefSelectItem as E } from "./fondue-components51.js";
3
+ const g = ({
4
+ children: r,
5
+ value: o,
6
+ label: s
7
+ }) => r && typeof r == "string" ? {
8
+ value: o || r,
9
+ label: s || r
10
+ } : {
11
+ value: o || "",
12
+ label: s || o || ""
13
+ }, w = (r, o) => u(r) && r.type === o, y = (r, o, s, p = 0) => {
14
+ const n = [];
15
+ let t = 0;
16
+ return a.forEach(r, (e) => {
17
+ if (w(e, E) && u(e))
18
+ g(e.props).label.toLowerCase().includes((s == null ? void 0 : s.toLowerCase()) || "") && (n.push(o(e, p + t)), t++);
19
+ else if (u(e) && (e != null && e.props.children)) {
20
+ const { parsedChildren: m, subElementCount: C } = y(
21
+ e.props.children,
22
+ o,
23
+ "",
24
+ p + t
25
+ );
26
+ e = f(e, {
27
+ children: m,
28
+ key: `group-${p + t}`
29
+ }), n.push(e), t += C;
30
+ } else
31
+ n.push(e);
32
+ }), {
33
+ parsedChildren: n,
34
+ subElementCount: t
35
+ };
8
36
  };
9
37
  export {
10
- r as actions,
11
- t as button,
12
- _ as caret,
13
- a as clear,
14
- c as colorIndicator,
15
- n as default,
16
- o as root
38
+ g as getSelectOptionValue,
39
+ w as isReactLeaf,
40
+ y as recursiveMap
17
41
  };
18
42
  //# sourceMappingURL=fondue-components68.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components68.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"fondue-components68.js","sources":["../src/components/Select/utils.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n Children,\n cloneElement,\n isValidElement,\n type JSXElementConstructor,\n type ReactElement,\n type ReactNode,\n} from 'react';\n\nimport { ForwardedRefSelectItem, type SelectItemProps } from './SelectItem';\n\n/**\n * Extracts and returns an object containing `value` and `label` from a given SelectItemProps object.\n * It prioritizes explicit `value` and `label` properties but will fall back to using `children` as the value or label if necessary.\n *\n * @param {SelectItemProps} props - The properties of a select item, which include potential children, value, and label.\n * @returns {{ value: string; label: string }} An object containing `value` and `label` as strings.\n *\n * @example\n * // Returns { value: 'option1', label: 'Option 1' }\n * getSelectOptionValue({ value: 'option1', label: 'Option 1' });\n *\n * @example\n * // Uses children as the value and label when they are not explicitly provided\n * // Returns { value: 'Default', label: 'Default' }\n * getSelectOptionValue({ children: 'Default' });\n */\nexport const getSelectOptionValue = ({\n children,\n value,\n label,\n}: SelectItemProps): {\n value: string;\n label: string;\n} => {\n if (children && typeof children === 'string') {\n return {\n value: value ? value : children,\n label: label ? label : children,\n };\n }\n\n return {\n value: value || '',\n label: label ? label : value || '',\n };\n};\n/**\n * Determines if the child is a leaf node of React, meaning it has one final child of a native type;\n *\n * @param {ReactNode} child - The React child node to check.\n * @param {JSXElementConstructor<never>} Component - The React component constructor used for comparison.\n * @returns {boolean} Returns true if the `child` is a valid React element of the specified `Component` type.\n *\n * @example\n * // Assuming ForwardedRefSelectItem is a component that renders an <input> element\n * // Returns true\n * isReactLeaf(<ForwardedRefSelectItem />, ForwardedRefSelectItem);\n *\n * @example\n * // Returns false for non-matching types or non-leaf components\n * isReactLeaf(<div><ForwardedRefSelectItem /></div>, ForwardedRefSelectItem);\n */\nexport const isReactLeaf = (child: ReactNode, Component: JSXElementConstructor<never>): child is ReactElement =>\n isValidElement(child) && child.type === Component;\n\n/**\n * Recursively maps through React children, applying a callback to each child that meets the specified conditions.\n * This function is useful for deeply nested structures where modifications or checks are needed at multiple levels.\n *\n * @param {ReactNode} children - The children to be recursively processed.\n * @param {function(ReactNode, number): ReactNode} callback - A function that is called for each child that meets the condition. It receives the child and its index, and returns a React node.\n * @param {string} [filterText=''] - Optional text used to filter children based on their properties.\n * @param {number} [nextIndex=0] - The starting index for numbering children, defaults to 0.\n * @returns {{ parsedChildren: ReactNode[], subElementCount: number }} An object containing the transformed children array and the count of all processed sub-elements.\n *\n * @example\n * // Example usage in a select component where only items containing a certain text are modified\n * recursiveMap(children, (child, index) => React.cloneElement(child, { extraProp: 'value' }), 'specific text');\n *\n * @example\n * // Nested structure transformation, adding class names based on index\n * recursiveMap(children, (child, index) => React.cloneElement(child, { className: `item-${index}` }));\n */\nexport const recursiveMap = (\n children: ReactNode,\n callback: (child: ReactNode, nextIndex: number) => ReactNode,\n filterText?: string,\n nextIndex: number = 0,\n): {\n parsedChildren: ReactNode[];\n subElementCount: number;\n} => {\n const resultingChildren: ReactNode[] = [];\n let itemCounter = 0;\n Children.forEach(children, (child) => {\n if (isReactLeaf(child, ForwardedRefSelectItem) && isValidElement<SelectItemProps>(child)) {\n if (\n getSelectOptionValue(child.props)\n .label.toLowerCase()\n .includes(filterText?.toLowerCase() || '')\n ) {\n resultingChildren.push(callback(child, nextIndex + itemCounter));\n itemCounter++;\n }\n } else if (isValidElement<{ children: ReactNode }>(child) && child?.props.children) {\n const { parsedChildren, subElementCount } = recursiveMap(\n child.props.children,\n callback,\n '',\n nextIndex + itemCounter,\n );\n child = cloneElement(child, {\n children: parsedChildren,\n key: `group-${nextIndex + itemCounter}`,\n });\n resultingChildren.push(child);\n itemCounter += subElementCount;\n } else {\n resultingChildren.push(child);\n }\n });\n return {\n parsedChildren: resultingChildren,\n subElementCount: itemCounter,\n };\n};\n"],"names":["getSelectOptionValue","children","value","label","isReactLeaf","child","Component","isValidElement","recursiveMap","callback","filterText","nextIndex","resultingChildren","itemCounter","Children","ForwardedRefSelectItem","parsedChildren","subElementCount","cloneElement"],"mappings":";;AA6BO,MAAMA,IAAuB,CAAC;AAAA,EACjC,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AACJ,MAIQF,KAAY,OAAOA,KAAa,WACzB;AAAA,EACH,OAAOC,KAAgBD;AAAA,EACvB,OAAOE,KAAgBF;AAC3B,IAGG;AAAA,EACH,OAAOC,KAAS;AAAA,EAChB,OAAOC,KAAgBD,KAAS;AACpC,GAkBSE,IAAc,CAACC,GAAkBC,MAC1CC,EAAeF,CAAK,KAAKA,EAAM,SAASC,GAoB/BE,IAAe,CACxBP,GACAQ,GACAC,GACAC,IAAoB,MAInB;AACD,QAAMC,IAAiC,CAAC;AACxC,MAAIC,IAAc;AACT,SAAAC,EAAA,QAAQb,GAAU,CAACI,MAAU;AAClC,QAAID,EAAYC,GAAOU,CAAsB,KAAKR,EAAgCF,CAAK;AACnF,MACIL,EAAqBK,EAAM,KAAK,EAC3B,MAAM,cACN,UAASK,KAAA,gBAAAA,EAAY,kBAAiB,EAAE,MAE7CE,EAAkB,KAAKH,EAASJ,GAAOM,IAAYE,CAAW,CAAC,GAC/DA;AAAA,aAEGN,EAAwCF,CAAK,MAAKA,KAAA,QAAAA,EAAO,MAAM,WAAU;AAC1E,YAAA,EAAE,gBAAAW,GAAgB,iBAAAC,EAAA,IAAoBT;AAAA,QACxCH,EAAM,MAAM;AAAA,QACZI;AAAA,QACA;AAAA,QACAE,IAAYE;AAAA,MAChB;AACA,MAAAR,IAAQa,EAAab,GAAO;AAAA,QACxB,UAAUW;AAAA,QACV,KAAK,SAASL,IAAYE,CAAW;AAAA,MAAA,CACxC,GACDD,EAAkB,KAAKP,CAAK,GACbQ,KAAAI;AAAA,IAAA;AAEf,MAAAL,EAAkB,KAAKP,CAAK;AAAA,EAChC,CACH,GACM;AAAA,IACH,gBAAgBO;AAAA,IAChB,iBAAiBC;AAAA,EACrB;AACJ;"}
@@ -1,139 +1,129 @@
1
- import { jsx as d, jsxs as x } from "react/jsx-runtime";
2
- import { IconCaretRight as G } from "@frontify/fondue-icons";
1
+ import { jsx as e, jsxs as h } from "react/jsx-runtime";
2
+ import { IconCaretRight as F } from "@frontify/fondue-icons";
3
3
  import * as n from "@radix-ui/react-dropdown-menu";
4
- import { Slot as M } from "@radix-ui/react-slot";
5
- import { forwardRef as s, useRef as f } from "react";
6
- import { usePreventDropdownOverflow as P } from "./fondue-components40.js";
7
- import { syncRefs as g } from "./fondue-components37.js";
8
- import { useProcessedChildren as D } from "./fondue-components41.js";
9
- import a from "./fondue-components42.js";
10
- const b = ({
4
+ import { Slot as I } from "@radix-ui/react-slot";
5
+ import { forwardRef as s } from "react";
6
+ import { useProcessedChildren as w } from "./fondue-components40.js";
7
+ import a from "./fondue-components41.js";
8
+ const m = ({
11
9
  children: o,
12
10
  open: t,
13
11
  onOpenChange: r,
14
- "data-test-id": e = "fondue-dropdown"
15
- }) => /* @__PURE__ */ d(n.Root, { open: t, onOpenChange: r, "data-test-id": e, children: o });
16
- b.displayName = "Dropdown.Root";
17
- const S = ({
12
+ "data-test-id": d = "fondue-dropdown"
13
+ }) => /* @__PURE__ */ e(n.Root, { open: t, onOpenChange: r, "data-test-id": d, children: o });
14
+ m.displayName = "Dropdown.Root";
15
+ const l = ({
18
16
  asChild: o = !0,
19
17
  children: t,
20
18
  "data-test-id": r = "fondue-dropdown-trigger",
21
- ...e
22
- }, p) => /* @__PURE__ */ d(n.Trigger, { asChild: o, "data-test-id": r, ref: p, ...e, children: t });
23
- S.displayName = "Dropdown.Trigger";
24
- const R = ({
25
- onOpen: o,
26
- onClose: t,
27
- side: r = "bottom",
28
- padding: e = "comfortable",
29
- align: p = "start",
30
- children: w,
31
- preventTriggerFocusOnClose: l,
32
- "data-test-id": m = "fondue-dropdown-content"
33
- }, c) => {
34
- const i = f(null), u = f(!1), { setMaxHeight: I } = P(i);
35
- return /* @__PURE__ */ d(n.Portal, { children: /* @__PURE__ */ d(
36
- n.Content,
37
- {
38
- align: p,
39
- collisionPadding: 8,
40
- sideOffset: 8,
41
- side: r,
42
- className: a.content,
43
- "data-padding": e,
44
- "data-test-id": m,
45
- ref: i,
46
- onCloseAutoFocus: (v) => {
47
- l && v.preventDefault(), g(i, c), t && t(), u.current = !1;
48
- },
49
- onFocus: () => {
50
- u.current || (I(), g(i, c), o && o(), u.current = !0);
51
- },
52
- children: w
53
- }
54
- ) });
55
- };
56
- R.displayName = "Dropdown.Content";
57
- const N = ({ children: o, "data-test-id": t = "fondue-dropdown-group" }, r) => /* @__PURE__ */ d(n.Group, { className: a.group, "data-test-id": t, ref: r, children: o });
58
- N.displayName = "Dropdown.Group";
59
- const C = ({
19
+ ...d
20
+ }, i) => /* @__PURE__ */ e(n.Trigger, { asChild: o, "data-test-id": r, ref: i, ...d, children: t });
21
+ l.displayName = "Dropdown.Trigger";
22
+ const g = ({
23
+ side: o = "bottom",
24
+ padding: t = "comfortable",
25
+ align: r = "start",
26
+ children: d,
27
+ preventTriggerFocusOnClose: i,
28
+ "data-test-id": p = "fondue-dropdown-content"
29
+ }, u) => /* @__PURE__ */ e(n.Portal, { children: /* @__PURE__ */ e(
30
+ n.Content,
31
+ {
32
+ align: r,
33
+ collisionPadding: 8,
34
+ sideOffset: 8,
35
+ side: o,
36
+ className: a.content,
37
+ "data-padding": t,
38
+ "data-test-id": p,
39
+ ref: u,
40
+ onCloseAutoFocus: (c) => {
41
+ i && c.preventDefault();
42
+ },
43
+ children: d
44
+ }
45
+ ) });
46
+ g.displayName = "Dropdown.Content";
47
+ const f = ({ children: o, "data-test-id": t = "fondue-dropdown-group" }, r) => /* @__PURE__ */ e(n.Group, { className: a.group, "data-test-id": t, ref: r, children: o });
48
+ f.displayName = "Dropdown.Group";
49
+ const D = ({
60
50
  children: o,
61
51
  "data-test-id": t = "fondue-dropdown-submenu"
62
- }) => /* @__PURE__ */ d(n.Sub, { "data-test-id": t, children: o });
63
- C.displayName = "Dropdown.SubMenu";
64
- const y = ({ children: o, "data-test-id": t = "fondue-dropdown-subtrigger" }, r) => {
65
- const { content: e } = D(o);
66
- return /* @__PURE__ */ x(n.SubTrigger, { className: a.subTrigger, "data-test-id": t, ref: r, children: [
67
- e,
68
- /* @__PURE__ */ d(G, { className: a.subMenuIndicator, size: 16 })
52
+ }) => /* @__PURE__ */ e(n.Sub, { "data-test-id": t, children: o });
53
+ D.displayName = "Dropdown.SubMenu";
54
+ const b = ({ children: o, "data-test-id": t = "fondue-dropdown-subtrigger" }, r) => {
55
+ const { content: d } = w(o);
56
+ return /* @__PURE__ */ h(n.SubTrigger, { className: a.subTrigger, "data-test-id": t, ref: r, children: [
57
+ d,
58
+ /* @__PURE__ */ e(F, { className: a.subMenuIndicator, size: 16 })
69
59
  ] });
70
60
  };
71
- y.displayName = "Dropdown.SubTrigger";
72
- const T = ({
61
+ b.displayName = "Dropdown.SubTrigger";
62
+ const S = ({
73
63
  padding: o = "comfortable",
74
64
  children: t,
75
65
  "data-test-id": r = "fondue-dropdown-subcontent"
76
- }, e) => /* @__PURE__ */ d(n.Portal, { children: /* @__PURE__ */ d(
66
+ }, d) => /* @__PURE__ */ e(n.Portal, { children: /* @__PURE__ */ e(
77
67
  n.SubContent,
78
68
  {
79
69
  className: a.subContent,
80
70
  "data-padding": o,
81
71
  "data-test-id": r,
82
- ref: e,
72
+ ref: d,
83
73
  children: t
84
74
  }
85
75
  ) });
86
- T.displayName = "Dropdown.SubContent";
87
- const h = ({
76
+ S.displayName = "Dropdown.SubContent";
77
+ const N = ({
88
78
  children: o,
89
79
  disabled: t,
90
80
  textValue: r,
91
- onSelect: e,
92
- emphasis: p = "default",
93
- "data-test-id": w = "fondue-dropdown-subtrigger",
94
- ...l
95
- }, m) => {
96
- const { content: c, isLink: i } = D(o), u = i ? M : "div";
97
- return /* @__PURE__ */ d(
81
+ onSelect: d,
82
+ emphasis: i = "default",
83
+ "data-test-id": p = "fondue-dropdown-subtrigger",
84
+ ...u
85
+ }, c) => {
86
+ const { content: R, isLink: T } = w(o), y = T ? I : "div";
87
+ return /* @__PURE__ */ e(
98
88
  n.Item,
99
89
  {
100
- onSelect: e,
90
+ onSelect: d,
101
91
  className: a.item,
102
92
  textValue: r,
103
- "data-test-id": w,
104
- "data-emphasis": p,
105
- ref: m,
93
+ "data-test-id": p,
94
+ "data-emphasis": i,
95
+ ref: c,
106
96
  disabled: t,
107
97
  asChild: !0,
108
- ...l,
109
- children: /* @__PURE__ */ d(u, { children: c })
98
+ ...u,
99
+ children: /* @__PURE__ */ e(y, { children: R })
110
100
  }
111
101
  );
112
102
  };
113
- h.displayName = "Dropdown.Item";
114
- const F = ({ children: o, name: t, "data-test-id": r = "fondue-dropdown-slot" }, e) => /* @__PURE__ */ d("div", { "data-name": t, className: a.slot, "data-test-id": r, ref: e, children: o });
115
- F.displayName = "Dropdown.Slot";
116
- const j = s(S), O = s(R), k = s(N), z = s(y), A = s(T), H = s(h), L = s(F), V = {
117
- Root: b,
118
- Trigger: j,
119
- Content: O,
120
- Group: k,
121
- SubMenu: C,
122
- SubTrigger: z,
123
- SubContent: A,
124
- Item: H,
125
- Slot: L
103
+ N.displayName = "Dropdown.Item";
104
+ const C = ({ children: o, name: t, "data-test-id": r = "fondue-dropdown-slot" }, d) => /* @__PURE__ */ e("div", { "data-name": t, className: a.slot, "data-test-id": r, ref: d, children: o });
105
+ C.displayName = "Dropdown.Slot";
106
+ const G = s(l), x = s(g), M = s(f), P = s(b), v = s(S), j = s(N), k = s(C), B = {
107
+ Root: m,
108
+ Trigger: G,
109
+ Content: x,
110
+ Group: M,
111
+ SubMenu: D,
112
+ SubTrigger: P,
113
+ SubContent: v,
114
+ Item: j,
115
+ Slot: k
126
116
  };
127
117
  export {
128
- V as Dropdown,
129
- R as DropdownContent,
130
- N as DropdownGroup,
131
- h as DropdownItem,
132
- b as DropdownRoot,
133
- F as DropdownSlot,
134
- T as DropdownSubContent,
135
- C as DropdownSubMenu,
136
- y as DropdownSubTrigger,
137
- S as DropdownTrigger
118
+ B as Dropdown,
119
+ g as DropdownContent,
120
+ f as DropdownGroup,
121
+ N as DropdownItem,
122
+ m as DropdownRoot,
123
+ C as DropdownSlot,
124
+ S as DropdownSubContent,
125
+ D as DropdownSubMenu,
126
+ b as DropdownSubTrigger,
127
+ l as DropdownTrigger
138
128
  };
139
129
  //# sourceMappingURL=fondue-components9.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components9.js","sources":["../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretRight } from '@frontify/fondue-icons';\nimport * as RadixDropdown from '@radix-ui/react-dropdown-menu';\nimport { Slot } from '@radix-ui/react-slot';\nimport { forwardRef, useRef, type ForwardedRef, type ReactNode } from 'react';\n\nimport { usePreventDropdownOverflow } from '#/hooks/usePreventDropdownOverflow';\nimport { syncRefs } from '#/utilities/domUtilities';\n\nimport { useProcessedChildren } from './hooks/useProcessedChildren';\nimport styles from './styles/dropdown.module.scss';\n\nexport type DropdownRootProps = {\n children?: ReactNode;\n /**\n * Controls the open state of the dropdown.\n */\n open?: boolean;\n /**\n * Callback that is called when the open state of the dropdown changes.\n */\n onOpenChange?: (open: boolean) => void;\n\n 'data-test-id'?: string;\n};\n\nexport const DropdownRoot = ({\n children,\n open,\n onOpenChange,\n\n 'data-test-id': dataTestId = 'fondue-dropdown',\n}: DropdownRootProps) => {\n return (\n <RadixDropdown.Root open={open} onOpenChange={onOpenChange} data-test-id={dataTestId}>\n {children}\n </RadixDropdown.Root>\n );\n};\nDropdownRoot.displayName = 'Dropdown.Root';\n\nexport type DropdownTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const DropdownTrigger = (\n {\n asChild = true,\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-trigger',\n ...props\n }: DropdownTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixDropdown.Trigger asChild={asChild} data-test-id={dataTestId} ref={ref} {...props}>\n {children}\n </RadixDropdown.Trigger>\n );\n};\nDropdownTrigger.displayName = 'Dropdown.Trigger';\n\nexport type DropdownContentProps = {\n children?: ReactNode;\n 'data-test-id'?: string;\n onOpen?: () => void;\n onClose?: () => void;\n /**\n * The vertical padding around each dropdown item.\n * @default \"comfortable\"\n */\n padding?: 'comfortable' | 'compact';\n /**\n * Defines the alignment of the dropdown.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Defines the preferred side of the dropdown. It will not be respected if there are collisions with the viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Prevents the focus from being set on the trigger when the dropdown is closed.\n */\n preventTriggerFocusOnClose?: boolean;\n};\n\nexport const DropdownContent = (\n {\n onOpen,\n onClose,\n side = 'bottom',\n padding = 'comfortable',\n align = 'start',\n children,\n preventTriggerFocusOnClose,\n 'data-test-id': dataTestId = 'fondue-dropdown-content',\n }: DropdownContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const localRef = useRef(null);\n const dropdownIsOpen = useRef(false);\n\n const { setMaxHeight } = usePreventDropdownOverflow(localRef);\n\n return (\n <RadixDropdown.Portal>\n <RadixDropdown.Content\n align={align}\n collisionPadding={8}\n sideOffset={8}\n side={side}\n className={styles.content}\n data-padding={padding}\n data-test-id={dataTestId}\n ref={localRef}\n onCloseAutoFocus={(event) => {\n if (preventTriggerFocusOnClose) {\n event.preventDefault();\n }\n syncRefs(localRef, ref);\n onClose && onClose();\n dropdownIsOpen.current = false;\n }}\n onFocus={() => {\n if (!dropdownIsOpen.current) {\n setMaxHeight();\n syncRefs(localRef, ref);\n onOpen && onOpen();\n dropdownIsOpen.current = true;\n }\n }}\n >\n {children}\n </RadixDropdown.Content>\n </RadixDropdown.Portal>\n );\n};\nDropdownContent.displayName = 'Dropdown.Content';\n\nexport type DropdownGroupProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownGroup = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-group' }: DropdownGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Group className={styles.group} data-test-id={dataTestId} ref={ref}>\n {children}\n </RadixDropdown.Group>\n );\n};\nDropdownGroup.displayName = 'Dropdown.Group';\n\nexport type DropdownSubMenuProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubMenu = ({\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-submenu',\n}: DropdownSubMenuProps) => {\n return <RadixDropdown.Sub data-test-id={dataTestId}>{children}</RadixDropdown.Sub>;\n};\nDropdownSubMenu.displayName = 'Dropdown.SubMenu';\n\nexport type DropdownSubTriggerProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger' }: DropdownSubTriggerProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { content } = useProcessedChildren(children);\n return (\n <RadixDropdown.SubTrigger className={styles.subTrigger} data-test-id={dataTestId} ref={ref}>\n {content}\n <IconCaretRight className={styles.subMenuIndicator} size={16} />\n </RadixDropdown.SubTrigger>\n );\n};\nDropdownSubTrigger.displayName = 'Dropdown.SubTrigger';\n\nexport type DropdownSubContentProps = {\n /**\n * The vertical padding around each dropdown item.\n * @default \"comfortable\"\n */\n padding?: 'comfortable' | 'compact';\n children: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const DropdownSubContent = (\n {\n padding = 'comfortable',\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-subcontent',\n }: DropdownSubContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Portal>\n <RadixDropdown.SubContent\n className={styles.subContent}\n data-padding={padding}\n data-test-id={dataTestId}\n ref={ref}\n >\n {children}\n </RadixDropdown.SubContent>\n </RadixDropdown.Portal>\n );\n};\nDropdownSubContent.displayName = 'Dropdown.SubContent';\n\nexport type DropdownItemProps = {\n children: ReactNode;\n /**\n * Disables the item.\n */\n disabled?: boolean;\n /**\n * The text value of the item that is passed to the onSelect callback.\n */\n textValue?: string;\n /**\n * The style of the item.\n * @default \"default\"\n */\n emphasis?: 'default' | 'danger';\n /**\n * Callback that is called when the item is selected.\n */\n onSelect?: (event: Event) => void;\n 'data-test-id'?: string;\n};\n\nexport const DropdownItem = (\n {\n children,\n disabled,\n textValue,\n onSelect,\n emphasis = 'default',\n 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger',\n ...props\n }: DropdownItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { content, isLink } = useProcessedChildren(children);\n\n const Wrapper = isLink ? Slot : 'div';\n\n return (\n <RadixDropdown.Item\n onSelect={onSelect}\n className={styles.item}\n textValue={textValue}\n data-test-id={dataTestId}\n data-emphasis={emphasis}\n ref={ref}\n disabled={disabled}\n asChild\n {...props}\n >\n <Wrapper>{content}</Wrapper>\n </RadixDropdown.Item>\n );\n};\nDropdownItem.displayName = 'Dropdown.Item';\n\nexport type DropdownSlotProps = { children: ReactNode; name?: 'left' | 'right'; 'data-test-id'?: string };\n\nexport const DropdownSlot = (\n { children, name, 'data-test-id': dataTestId = 'fondue-dropdown-slot' }: DropdownSlotProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-name={name} className={styles.slot} data-test-id={dataTestId} ref={ref}>\n {children}\n </div>\n );\n};\nDropdownSlot.displayName = 'Dropdown.Slot';\n\nconst ForwardedRefDropdownTrigger = forwardRef<HTMLButtonElement, DropdownTriggerProps>(DropdownTrigger);\nconst ForwardedRefDropdownContent = forwardRef<HTMLDivElement, DropdownContentProps>(DropdownContent);\nconst ForwardedRefDropdownGroup = forwardRef<HTMLDivElement, DropdownGroupProps>(DropdownGroup);\nconst ForwardedRefDropdownSubTrigger = forwardRef<HTMLDivElement, DropdownSubTriggerProps>(DropdownSubTrigger);\nconst ForwardedRefDropdownSubContent = forwardRef<HTMLDivElement, DropdownSubContentProps>(DropdownSubContent);\nconst ForwardedRefDropdownItem = forwardRef<HTMLDivElement, DropdownItemProps>(DropdownItem);\nconst ForwardedRefDropdownSlot = forwardRef<HTMLDivElement, DropdownSlotProps>(DropdownSlot);\n\nexport const Dropdown = {\n Root: DropdownRoot,\n Trigger: ForwardedRefDropdownTrigger,\n Content: ForwardedRefDropdownContent,\n Group: ForwardedRefDropdownGroup,\n SubMenu: DropdownSubMenu,\n SubTrigger: ForwardedRefDropdownSubTrigger,\n SubContent: ForwardedRefDropdownSubContent,\n Item: ForwardedRefDropdownItem,\n Slot: ForwardedRefDropdownSlot,\n};\n"],"names":["DropdownRoot","children","open","onOpenChange","dataTestId","jsx","RadixDropdown","DropdownTrigger","asChild","props","ref","DropdownContent","onOpen","onClose","side","padding","align","preventTriggerFocusOnClose","localRef","useRef","dropdownIsOpen","setMaxHeight","usePreventDropdownOverflow","styles","event","syncRefs","DropdownGroup","DropdownSubMenu","DropdownSubTrigger","content","useProcessedChildren","jsxs","IconCaretRight","DropdownSubContent","DropdownItem","disabled","textValue","onSelect","emphasis","isLink","Wrapper","Slot","DropdownSlot","name","ForwardedRefDropdownTrigger","forwardRef","ForwardedRefDropdownContent","ForwardedRefDropdownGroup","ForwardedRefDropdownSubTrigger","ForwardedRefDropdownSubContent","ForwardedRefDropdownItem","ForwardedRefDropdownSlot","Dropdown"],"mappings":";;;;;;;;;AA2BO,MAAMA,IAAe,CAAC;AAAA,EACzB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EAEA,gBAAgBC,IAAa;AACjC,MAEQ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Content":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCaretRight } from '@frontify/fondue-icons';\nimport * as RadixDropdown from '@radix-ui/react-dropdown-menu';\nimport { Slot } from '@radix-ui/react-slot';\nimport { forwardRef, type ForwardedRef, type ReactNode } from 'react';\n\nimport { useProcessedChildren } from './hooks/useProcessedChildren';\nimport styles from './styles/dropdown.module.scss';\n\nexport type DropdownRootProps = {\n children?: ReactNode;\n /**\n * Controls the open state of the dropdown.\n */\n open?: boolean;\n /**\n * Callback that is called when the open state of the dropdown changes.\n */\n onOpenChange?: (open: boolean) => void;\n\n 'data-test-id'?: string;\n};\n\nexport const DropdownRoot = ({\n children,\n open,\n onOpenChange,\n\n 'data-test-id': dataTestId = 'fondue-dropdown',\n}: DropdownRootProps) => {\n return (\n <RadixDropdown.Root open={open} onOpenChange={onOpenChange} data-test-id={dataTestId}>\n {children}\n </RadixDropdown.Root>\n );\n};\nDropdownRoot.displayName = 'Dropdown.Root';\n\nexport type DropdownTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const DropdownTrigger = (\n {\n asChild = true,\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-trigger',\n ...props\n }: DropdownTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixDropdown.Trigger asChild={asChild} data-test-id={dataTestId} ref={ref} {...props}>\n {children}\n </RadixDropdown.Trigger>\n );\n};\nDropdownTrigger.displayName = 'Dropdown.Trigger';\n\nexport type DropdownContentProps = {\n children?: ReactNode;\n 'data-test-id'?: string;\n /**\n * The vertical padding around each dropdown item.\n * @default \"comfortable\"\n */\n padding?: 'comfortable' | 'compact';\n /**\n * Defines the alignment of the dropdown.\n * @default \"start\"\n */\n align?: 'start' | 'center' | 'end';\n /**\n * Defines the preferred side of the dropdown. It will not be respected if there are collisions with the viewport.\n * @default \"bottom\"\n */\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Prevents the focus from being set on the trigger when the dropdown is closed.\n */\n preventTriggerFocusOnClose?: boolean;\n};\n\nexport const DropdownContent = (\n {\n side = 'bottom',\n padding = 'comfortable',\n align = 'start',\n children,\n preventTriggerFocusOnClose,\n 'data-test-id': dataTestId = 'fondue-dropdown-content',\n }: DropdownContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Portal>\n <RadixDropdown.Content\n align={align}\n collisionPadding={8}\n sideOffset={8}\n side={side}\n className={styles.content}\n data-padding={padding}\n data-test-id={dataTestId}\n ref={ref}\n onCloseAutoFocus={(event) => {\n if (preventTriggerFocusOnClose) {\n event.preventDefault();\n }\n }}\n >\n {children}\n </RadixDropdown.Content>\n </RadixDropdown.Portal>\n );\n};\nDropdownContent.displayName = 'Dropdown.Content';\n\nexport type DropdownGroupProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownGroup = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-group' }: DropdownGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Group className={styles.group} data-test-id={dataTestId} ref={ref}>\n {children}\n </RadixDropdown.Group>\n );\n};\nDropdownGroup.displayName = 'Dropdown.Group';\n\nexport type DropdownSubMenuProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubMenu = ({\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-submenu',\n}: DropdownSubMenuProps) => {\n return <RadixDropdown.Sub data-test-id={dataTestId}>{children}</RadixDropdown.Sub>;\n};\nDropdownSubMenu.displayName = 'Dropdown.SubMenu';\n\nexport type DropdownSubTriggerProps = { children: ReactNode; 'data-test-id'?: string };\n\nexport const DropdownSubTrigger = (\n { children, 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger' }: DropdownSubTriggerProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { content } = useProcessedChildren(children);\n return (\n <RadixDropdown.SubTrigger className={styles.subTrigger} data-test-id={dataTestId} ref={ref}>\n {content}\n <IconCaretRight className={styles.subMenuIndicator} size={16} />\n </RadixDropdown.SubTrigger>\n );\n};\nDropdownSubTrigger.displayName = 'Dropdown.SubTrigger';\n\nexport type DropdownSubContentProps = {\n /**\n * The vertical padding around each dropdown item.\n * @default \"comfortable\"\n */\n padding?: 'comfortable' | 'compact';\n children: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport const DropdownSubContent = (\n {\n padding = 'comfortable',\n children,\n 'data-test-id': dataTestId = 'fondue-dropdown-subcontent',\n }: DropdownSubContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <RadixDropdown.Portal>\n <RadixDropdown.SubContent\n className={styles.subContent}\n data-padding={padding}\n data-test-id={dataTestId}\n ref={ref}\n >\n {children}\n </RadixDropdown.SubContent>\n </RadixDropdown.Portal>\n );\n};\nDropdownSubContent.displayName = 'Dropdown.SubContent';\n\nexport type DropdownItemProps = {\n children: ReactNode;\n /**\n * Disables the item.\n */\n disabled?: boolean;\n /**\n * The text value of the item that is passed to the onSelect callback.\n */\n textValue?: string;\n /**\n * The style of the item.\n * @default \"default\"\n */\n emphasis?: 'default' | 'danger';\n /**\n * Callback that is called when the item is selected.\n */\n onSelect?: (event: Event) => void;\n 'data-test-id'?: string;\n};\n\nexport const DropdownItem = (\n {\n children,\n disabled,\n textValue,\n onSelect,\n emphasis = 'default',\n 'data-test-id': dataTestId = 'fondue-dropdown-subtrigger',\n ...props\n }: DropdownItemProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const { content, isLink } = useProcessedChildren(children);\n\n const Wrapper = isLink ? Slot : 'div';\n\n return (\n <RadixDropdown.Item\n onSelect={onSelect}\n className={styles.item}\n textValue={textValue}\n data-test-id={dataTestId}\n data-emphasis={emphasis}\n ref={ref}\n disabled={disabled}\n asChild\n {...props}\n >\n <Wrapper>{content}</Wrapper>\n </RadixDropdown.Item>\n );\n};\nDropdownItem.displayName = 'Dropdown.Item';\n\nexport type DropdownSlotProps = { children: ReactNode; name?: 'left' | 'right'; 'data-test-id'?: string };\n\nexport const DropdownSlot = (\n { children, name, 'data-test-id': dataTestId = 'fondue-dropdown-slot' }: DropdownSlotProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-name={name} className={styles.slot} data-test-id={dataTestId} ref={ref}>\n {children}\n </div>\n );\n};\nDropdownSlot.displayName = 'Dropdown.Slot';\n\nconst ForwardedRefDropdownTrigger = forwardRef<HTMLButtonElement, DropdownTriggerProps>(DropdownTrigger);\nconst ForwardedRefDropdownContent = forwardRef<HTMLDivElement, DropdownContentProps>(DropdownContent);\nconst ForwardedRefDropdownGroup = forwardRef<HTMLDivElement, DropdownGroupProps>(DropdownGroup);\nconst ForwardedRefDropdownSubTrigger = forwardRef<HTMLDivElement, DropdownSubTriggerProps>(DropdownSubTrigger);\nconst ForwardedRefDropdownSubContent = forwardRef<HTMLDivElement, DropdownSubContentProps>(DropdownSubContent);\nconst ForwardedRefDropdownItem = forwardRef<HTMLDivElement, DropdownItemProps>(DropdownItem);\nconst ForwardedRefDropdownSlot = forwardRef<HTMLDivElement, DropdownSlotProps>(DropdownSlot);\n\nexport const Dropdown = {\n Root: DropdownRoot,\n Trigger: ForwardedRefDropdownTrigger,\n Content: ForwardedRefDropdownContent,\n Group: ForwardedRefDropdownGroup,\n SubMenu: DropdownSubMenu,\n SubTrigger: ForwardedRefDropdownSubTrigger,\n SubContent: ForwardedRefDropdownSubContent,\n Item: ForwardedRefDropdownItem,\n Slot: ForwardedRefDropdownSlot,\n};\n"],"names":["DropdownRoot","children","open","onOpenChange","dataTestId","jsx","RadixDropdown","DropdownTrigger","asChild","props","ref","DropdownContent","side","padding","align","preventTriggerFocusOnClose","styles","event","DropdownGroup","DropdownSubMenu","DropdownSubTrigger","content","useProcessedChildren","jsxs","IconCaretRight","DropdownSubContent","DropdownItem","disabled","textValue","onSelect","emphasis","isLink","Wrapper","Slot","DropdownSlot","name","ForwardedRefDropdownTrigger","forwardRef","ForwardedRefDropdownContent","ForwardedRefDropdownGroup","ForwardedRefDropdownSubTrigger","ForwardedRefDropdownSubContent","ForwardedRefDropdownItem","ForwardedRefDropdownSlot","Dropdown"],"mappings":";;;;;;;AAwBO,MAAMA,IAAe,CAAC;AAAA,EACzB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EAEA,gBAAgBC,IAAa;AACjC,MAEQ,gBAAAC,EAACC,EAAc,MAAd,EAAmB,MAAAJ,GAAY,cAAAC,GAA4B,gBAAcC,GACrE,UAAAH,GACL;AAGRD,EAAa,cAAc;AAYpB,MAAMO,IAAkB,CAC3B;AAAA,EACI,SAAAC,IAAU;AAAA,EACV,UAAAP;AAAA,EACA,gBAAgBG,IAAa;AAAA,EAC7B,GAAGK;AACP,GACAC,MAGI,gBAAAL,EAACC,EAAc,SAAd,EAAsB,SAAAE,GAAkB,gBAAcJ,GAAY,KAAAM,GAAW,GAAGD,GAC5E,UAAAR,EACL,CAAA;AAGRM,EAAgB,cAAc;AA0BvB,MAAMI,IAAkB,CAC3B;AAAA,EACI,MAAAC,IAAO;AAAA,EACP,SAAAC,IAAU;AAAA,EACV,OAAAC,IAAQ;AAAA,EACR,UAAAb;AAAA,EACA,4BAAAc;AAAA,EACA,gBAAgBX,IAAa;AACjC,GACAM,MAGI,gBAAAL,EAACC,EAAc,QAAd,EACG,UAAA,gBAAAD;AAAA,EAACC,EAAc;AAAA,EAAd;AAAA,IACG,OAAAQ;AAAA,IACA,kBAAkB;AAAA,IAClB,YAAY;AAAA,IACZ,MAAAF;AAAA,IACA,WAAWI,EAAO;AAAA,IAClB,gBAAcH;AAAA,IACd,gBAAcT;AAAA,IACd,KAAAM;AAAA,IACA,kBAAkB,CAACO,MAAU;AACzB,MAAIF,KACAE,EAAM,eAAe;AAAA,IAE7B;AAAA,IAEC,UAAAhB;AAAA,EAAA;AAAA,GAET;AAGRU,EAAgB,cAAc;AAIjB,MA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;AACD,QAAM,EAAE,SAAAW,GAAS,QAAAU,MAAWT,EAAqBrB,CAAQ,GAEnD+B,IAAUD,IAASE,IAAO;AAG5B,SAAA,gBAAA5B;AAAA,IAACC,EAAc;AAAA,IAAd;AAAA,MACG,UAAAuB;AAAA,MACA,WAAWb,EAAO;AAAA,MAClB,WAAAY;AAAA,MACA,gBAAcxB;AAAA,MACd,iBAAe0B;AAAA,MACf,KAAApB;AAAA,MACA,UAAAiB;AAAA,MACA,SAAO;AAAA,MACN,GAAGlB;AAAA,MAEJ,UAAA,gBAAAJ,EAAC2B,KAAS,UAAQX,EAAA,CAAA;AAAA,IAAA;AAAA,EACtB;AAER;AACAK,EAAa,cAAc;AAId,MAAAQ,IAAe,CACxB,EAAE,UAAAjC,GAAU,MAAAkC,GAAM,gBAAgB/B,IAAa,uBAAuB,GACtEM,MAGI,gBAAAL,EAAC,OAAI,EAAA,aAAW8B,GAAM,WAAWnB,EAAO,MAAM,gBAAcZ,GAAY,KAAAM,GACnE,UAAAT,EACL,CAAA;AAGRiC,EAAa,cAAc;AAE3B,MAAME,IAA8BC,EAAoD9B,CAAe,GACjG+B,IAA8BD,EAAiD1B,CAAe,GAC9F4B,IAA4BF,EAA+CnB,CAAa,GACxFsB,IAAiCH,EAAoDjB,CAAkB,GACvGqB,IAAiCJ,EAAoDZ,CAAkB,GACvGiB,IAA2BL,EAA8CX,CAAY,GACrFiB,IAA2BN,EAA8CH,CAAY,GAE9EU,IAAW;AAAA,EACpB,MAAM5C;AAAA,EACN,SAASoC;AAAA,EACT,SAASE;AAAA,EACT,OAAOC;AAAA,EACP,SAASpB;AAAA,EACT,YAAYqB;AAAA,EACZ,YAAYC;AAAA,EACZ,MAAMC;AAAA,EACN,MAAMC;AACV;"}
package/dist/index.d.ts CHANGED
@@ -510,8 +510,6 @@ export declare const Dropdown: {
510
510
  declare type DropdownContentProps = {
511
511
  children?: ReactNode;
512
512
  'data-test-id'?: string;
513
- onOpen?: () => void;
514
- onClose?: () => void;
515
513
  /**
516
514
  * The vertical padding around each dropdown item.
517
515
  * @default "comfortable"