@frontify/fondue-components 13.0.2 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/dist/fondue-components.js +56 -54
  2. package/dist/fondue-components.js.map +1 -1
  3. package/dist/fondue-components10.js +124 -34
  4. package/dist/fondue-components10.js.map +1 -1
  5. package/dist/fondue-components11.js +36 -84
  6. package/dist/fondue-components11.js.map +1 -1
  7. package/dist/fondue-components12.js +89 -36
  8. package/dist/fondue-components12.js.map +1 -1
  9. package/dist/fondue-components13.js +30 -40
  10. package/dist/fondue-components13.js.map +1 -1
  11. package/dist/fondue-components14.js +47 -24
  12. package/dist/fondue-components14.js.map +1 -1
  13. package/dist/fondue-components15.js +28 -39
  14. package/dist/fondue-components15.js.map +1 -1
  15. package/dist/fondue-components16.js +34 -16
  16. package/dist/fondue-components16.js.map +1 -1
  17. package/dist/fondue-components17.js +21 -68
  18. package/dist/fondue-components17.js.map +1 -1
  19. package/dist/fondue-components18.js +68 -36
  20. package/dist/fondue-components18.js.map +1 -1
  21. package/dist/fondue-components19.js +34 -45
  22. package/dist/fondue-components19.js.map +1 -1
  23. package/dist/fondue-components20.js +53 -130
  24. package/dist/fondue-components20.js.map +1 -1
  25. package/dist/fondue-components21.js +133 -53
  26. package/dist/fondue-components21.js.map +1 -1
  27. package/dist/fondue-components22.js +54 -28
  28. package/dist/fondue-components22.js.map +1 -1
  29. package/dist/fondue-components23.js +28 -153
  30. package/dist/fondue-components23.js.map +1 -1
  31. package/dist/fondue-components24.js +151 -116
  32. package/dist/fondue-components24.js.map +1 -1
  33. package/dist/fondue-components25.js +117 -31
  34. package/dist/fondue-components25.js.map +1 -1
  35. package/dist/fondue-components26.js +32 -65
  36. package/dist/fondue-components26.js.map +1 -1
  37. package/dist/fondue-components27.js +66 -7
  38. package/dist/fondue-components27.js.map +1 -1
  39. package/dist/fondue-components28.js +10 -55
  40. package/dist/fondue-components28.js.map +1 -1
  41. package/dist/fondue-components29.js +56 -32
  42. package/dist/fondue-components29.js.map +1 -1
  43. package/dist/fondue-components3.js +89 -36
  44. package/dist/fondue-components3.js.map +1 -1
  45. package/dist/fondue-components30.js +18 -4
  46. package/dist/fondue-components30.js.map +1 -1
  47. package/dist/fondue-components31.js +32 -12
  48. package/dist/fondue-components31.js.map +1 -1
  49. package/dist/fondue-components32.js +5 -155
  50. package/dist/fondue-components32.js.map +1 -1
  51. package/dist/fondue-components33.js +10 -116
  52. package/dist/fondue-components33.js.map +1 -1
  53. package/dist/fondue-components34.js +59 -22
  54. package/dist/fondue-components34.js.map +1 -1
  55. package/dist/fondue-components35.js +112 -15
  56. package/dist/fondue-components35.js.map +1 -1
  57. package/dist/fondue-components36.js +116 -30
  58. package/dist/fondue-components36.js.map +1 -1
  59. package/dist/fondue-components37.js +21 -37
  60. package/dist/fondue-components37.js.map +1 -1
  61. package/dist/fondue-components38.js +31 -129
  62. package/dist/fondue-components38.js.map +1 -1
  63. package/dist/fondue-components39.js +37 -21
  64. package/dist/fondue-components39.js.map +1 -1
  65. package/dist/fondue-components4.js +32 -38
  66. package/dist/fondue-components4.js.map +1 -1
  67. package/dist/fondue-components40.js +130 -45
  68. package/dist/fondue-components40.js.map +1 -1
  69. package/dist/fondue-components41.js +20 -7
  70. package/dist/fondue-components41.js.map +1 -1
  71. package/dist/fondue-components42.js +45 -13
  72. package/dist/fondue-components42.js.map +1 -1
  73. package/dist/fondue-components43.js +7 -14
  74. package/dist/fondue-components43.js.map +1 -1
  75. package/dist/fondue-components44.js +13 -60
  76. package/dist/fondue-components44.js.map +1 -1
  77. package/dist/fondue-components45.js +15 -18
  78. package/dist/fondue-components45.js.map +1 -1
  79. package/dist/fondue-components46.js +60 -19
  80. package/dist/fondue-components46.js.map +1 -1
  81. package/dist/fondue-components47.js +18 -5
  82. package/dist/fondue-components47.js.map +1 -1
  83. package/dist/fondue-components48.js +18 -14
  84. package/dist/fondue-components48.js.map +1 -1
  85. package/dist/fondue-components49.js +1 -1
  86. package/dist/fondue-components5.js +42 -45
  87. package/dist/fondue-components5.js.map +1 -1
  88. package/dist/fondue-components50.js +12 -16
  89. package/dist/fondue-components50.js.map +1 -1
  90. package/dist/fondue-components51.js +5 -35
  91. package/dist/fondue-components51.js.map +1 -1
  92. package/dist/fondue-components52.js +18 -6
  93. package/dist/fondue-components52.js.map +1 -1
  94. package/dist/fondue-components53.js +35 -13
  95. package/dist/fondue-components53.js.map +1 -1
  96. package/dist/fondue-components54.js +6 -4
  97. package/dist/fondue-components54.js.map +1 -1
  98. package/dist/fondue-components55.js +12 -24
  99. package/dist/fondue-components55.js.map +1 -1
  100. package/dist/fondue-components56.js +4 -16
  101. package/dist/fondue-components56.js.map +1 -1
  102. package/dist/fondue-components57.js +23 -140
  103. package/dist/fondue-components57.js.map +1 -1
  104. package/dist/fondue-components58.js +17 -16
  105. package/dist/fondue-components58.js.map +1 -1
  106. package/dist/fondue-components59.js +142 -70
  107. package/dist/fondue-components59.js.map +1 -1
  108. package/dist/fondue-components6.js +46 -48
  109. package/dist/fondue-components6.js.map +1 -1
  110. package/dist/fondue-components60.js +16 -8
  111. package/dist/fondue-components60.js.map +1 -1
  112. package/dist/fondue-components61.js +72 -32
  113. package/dist/fondue-components61.js.map +1 -1
  114. package/dist/fondue-components62.js +8 -49
  115. package/dist/fondue-components62.js.map +1 -1
  116. package/dist/fondue-components63.js +32 -10
  117. package/dist/fondue-components63.js.map +1 -1
  118. package/dist/fondue-components64.js +48 -12
  119. package/dist/fondue-components64.js.map +1 -1
  120. package/dist/fondue-components65.js +10 -12
  121. package/dist/fondue-components65.js.map +1 -1
  122. package/dist/fondue-components66.js +11 -19
  123. package/dist/fondue-components66.js.map +1 -1
  124. package/dist/fondue-components67.js +13 -15
  125. package/dist/fondue-components67.js.map +1 -1
  126. package/dist/fondue-components68.js +20 -52
  127. package/dist/fondue-components68.js.map +1 -1
  128. package/dist/fondue-components69.js +15 -15
  129. package/dist/fondue-components69.js.map +1 -1
  130. package/dist/fondue-components7.js +43 -144
  131. package/dist/fondue-components7.js.map +1 -1
  132. package/dist/fondue-components70.js +52 -25
  133. package/dist/fondue-components70.js.map +1 -1
  134. package/dist/fondue-components71.js +14 -17
  135. package/dist/fondue-components71.js.map +1 -1
  136. package/dist/fondue-components72.js +24 -5
  137. package/dist/fondue-components72.js.map +1 -1
  138. package/dist/fondue-components73.js +16 -5
  139. package/dist/fondue-components73.js.map +1 -1
  140. package/dist/fondue-components74.js +7 -2
  141. package/dist/fondue-components74.js.map +1 -1
  142. package/dist/fondue-components75.js +4 -12
  143. package/dist/fondue-components75.js.map +1 -1
  144. package/dist/fondue-components76.js +2 -39
  145. package/dist/fondue-components76.js.map +1 -1
  146. package/dist/fondue-components77.js +18 -0
  147. package/dist/fondue-components77.js.map +1 -0
  148. package/dist/fondue-components78.js +42 -0
  149. package/dist/fondue-components78.js.map +1 -0
  150. package/dist/fondue-components8.js +146 -27
  151. package/dist/fondue-components8.js.map +1 -1
  152. package/dist/fondue-components9.js +28 -125
  153. package/dist/fondue-components9.js.map +1 -1
  154. package/dist/index.d.ts +183 -57
  155. package/dist/style.css +1 -1
  156. package/package.json +6 -5
@@ -1,18 +1,11 @@
1
- const t = "_content_2dhca_6", e = "_header_2dhca_51", o = "_footer_2dhca_52", n = "_body_2dhca_53", d = "_underlay_2dhca_177", _ = "_sideContent_2dhca_190", c = {
2
- content: t,
3
- header: e,
4
- footer: o,
5
- body: n,
6
- underlay: d,
7
- sideContent: _
1
+ import { useEffect as f } from "react";
2
+ import { syncRefs as o } from "./fondue-components44.js";
3
+ const m = (s, e) => {
4
+ f(() => {
5
+ o(s, e);
6
+ }, [s]);
8
7
  };
9
8
  export {
10
- n as body,
11
- t as content,
12
- c as default,
13
- o as footer,
14
- e as header,
15
- _ as sideContent,
16
- d as underlay
9
+ m as useSyncRefs
17
10
  };
18
11
  //# sourceMappingURL=fondue-components43.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components43.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"fondue-components43.js","sources":["../src/hooks/useSyncRefs.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type ForwardedRef, useEffect, type RefObject } from 'react';\n\nimport { syncRefs } from '#/utilities/domUtilities';\n\n/**\n * A custom React hook that synchronizes a local ref with a forwarded ref.\n * This is useful when you need to maintain both an internal reference to a DOM element\n * and allow external access through a forwarded ref.\n *\n * @template TElement - The type of the DOM element being referenced. Defaults to HTMLElement.\n * @param {RefObject<TElement>} localRef - The local ref object used internally by the component.\n * @param {ForwardedRef<TElement>} forwardedRef - The ref forwarded from a parent component.\n *\n * @example\n * ```tsx\n * const MyComponent = forwardRef<HTMLDivElement>((props, ref) => {\n * const localRef = useRef<HTMLDivElement>(null);\n * useSyncRefs(localRef, ref);\n *\n * return <div ref={localRef}>Content</div>;\n * });\n * ```\n */\nexport const useSyncRefs = <TElement = HTMLElement>(\n localRef: RefObject<TElement>,\n forwardedRef: ForwardedRef<TElement>,\n) => {\n useEffect(() => {\n syncRefs<TElement>(localRef, forwardedRef);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [localRef]);\n};\n"],"names":["useSyncRefs","localRef","forwardedRef","useEffect","syncRefs"],"mappings":";;AAyBa,MAAAA,IAAc,CACvBC,GACAC,MACC;AACD,EAAAC,EAAU,MAAM;AACZ,IAAAC,EAAmBH,GAAUC,CAAY;AAAA,EAAA,GAE1C,CAACD,CAAQ,CAAC;AACjB;"}
@@ -1,63 +1,16 @@
1
- import { sv as t } from "./fondue-components31.js";
2
- const i = t({
3
- base: "tw-flex tw-self-stretch tw-justify-center ",
4
- variants: {
5
- direction: {
6
- horizontal: "tw-flex-col tw-h-0 tw-border-t tw-w-full",
7
- vertical: "tw-flex-row tw-w-0 tw-border-r tw-h-full "
8
- },
9
- color: {
10
- weak: "tw-border-line-weak",
11
- default: "tw-border-line",
12
- strong: "tw-border-line-strong",
13
- "x-strong": "tw-border-x-line-strong"
14
- },
15
- variant: {
16
- solid: "tw-border-solid",
17
- dashed: "tw-border-dashed",
18
- noline: "tw-border-none"
19
- }
20
- },
21
- compoundVariants: [
22
- {
23
- direction: "horizontal",
24
- padding: "small",
25
- class: "tw-my-4"
26
- },
27
- {
28
- direction: "horizontal",
29
- padding: "medium",
30
- class: "tw-my-7"
31
- },
32
- {
33
- direction: "horizontal",
34
- padding: "large",
35
- class: "tw-my-12"
36
- },
37
- {
38
- direction: "vertical",
39
- padding: "small",
40
- class: "tw-mx-4"
41
- },
42
- {
43
- direction: "vertical",
44
- padding: "medium",
45
- class: "tw-mx-7"
46
- },
47
- {
48
- direction: "vertical",
49
- padding: "large",
50
- class: "tw-mx-12"
51
- }
52
- ],
53
- defaultVariants: {
54
- padding: "medium",
55
- direction: "horizontal",
56
- color: "default",
57
- variant: "solid"
58
- }
59
- });
1
+ function s(u, t) {
2
+ t && (typeof t == "function" ? t(u.current) : t && "current" in t && (t.current = u.current));
3
+ }
4
+ function i(u) {
5
+ u.currentTarget.dataset.autoFocusVisible = "false";
6
+ }
7
+ function a(u) {
8
+ const t = u.relatedTarget;
9
+ t != null && t.dataset.autoFocusTrigger && (t.dataset.autoFocusVisible === "true" ? u.target.dataset.showFocusRing = "true" : u.target.dataset.showFocusRing = "false", t.dataset.autoFocusVisible = "true");
10
+ }
60
11
  export {
61
- i as dividerStyles
12
+ i as addAutoFocusAttribute,
13
+ a as addShowFocusRing,
14
+ s as syncRefs
62
15
  };
63
16
  //# sourceMappingURL=fondue-components44.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components44.js","sources":["../src/components/Divider/styles/dividerStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { sv } from '#/utilities/styleUtilities';\n\nexport const dividerStyles = sv({\n base: 'tw-flex tw-self-stretch tw-justify-center ',\n variants: {\n direction: {\n horizontal: 'tw-flex-col tw-h-0 tw-border-t tw-w-full',\n vertical: 'tw-flex-row tw-w-0 tw-border-r tw-h-full ',\n },\n color: {\n weak: 'tw-border-line-weak',\n default: 'tw-border-line',\n strong: 'tw-border-line-strong',\n 'x-strong': 'tw-border-x-line-strong',\n },\n variant: {\n solid: 'tw-border-solid',\n dashed: 'tw-border-dashed',\n noline: 'tw-border-none',\n },\n },\n compoundVariants: [\n {\n direction: 'horizontal',\n padding: 'small',\n class: 'tw-my-4',\n },\n {\n direction: 'horizontal',\n padding: 'medium',\n class: 'tw-my-7',\n },\n {\n direction: 'horizontal',\n padding: 'large',\n class: 'tw-my-12',\n },\n {\n direction: 'vertical',\n padding: 'small',\n class: 'tw-mx-4',\n },\n {\n direction: 'vertical',\n padding: 'medium',\n class: 'tw-mx-7',\n },\n {\n direction: 'vertical',\n padding: 'large',\n class: 'tw-mx-12',\n },\n ],\n defaultVariants: {\n padding: 'medium',\n direction: 'horizontal',\n color: 'default',\n variant: 'solid',\n },\n});\n"],"names":["dividerStyles","sv"],"mappings":";AAIO,MAAMA,IAAgBC,EAAG;AAAA,EAC5B,MAAM;AAAA,EACN,UAAU;AAAA,IACN,WAAW;AAAA,MACP,YAAY;AAAA,MACZ,UAAU;AAAA,IACd;AAAA,IACA,OAAO;AAAA,MACH,MAAM;AAAA,MACN,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,YAAY;AAAA,IAChB;AAAA,IACA,SAAS;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,QAAQ;AAAA,IAAA;AAAA,EAEhB;AAAA,EACA,kBAAkB;AAAA,IACd;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IAAA;AAAA,EAEf;AAAA,EACA,iBAAiB;AAAA,IACb,SAAS;AAAA,IACT,WAAW;AAAA,IACX,OAAO;AAAA,IACP,SAAS;AAAA,EAAA;AAEjB,CAAC;"}
1
+ {"version":3,"file":"fondue-components44.js","sources":["../src/utilities/domUtilities.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type FocusEvent, type MouseEvent as ReactMouseEvent, type ForwardedRef, type RefObject } from 'react';\n\nexport const MAX_HEIGHT_MARGIN = 8;\n\n/**\n * Sets the maximum height for a dialog element based on its position on the viewport.\n * The function calculates the space below the dialog up to the bottom of the viewport window,\n * subtracting a default margin, and sets this value as the max-height style of the dialog.\n *\n * @param {HTMLElement} dialog - The dialog element whose maximum height is to be set.\n *\n * @example\n * // Suppose you have a dialog element with id 'my-dialog'.\n * const dialogElement = myDialogRef.current || document.getElementById('my-dialog');\n * // Setting its max height relative to its current position and the viewport's dimensions.\n * setMaxHeightToAvailableSpace(dialogElement);\n */\nexport function setMaxHeightToAvailableSpace(dialog: HTMLElement) {\n if (!window) {\n throw new Error('Window object not found, this method should be used in a browser environment');\n }\n\n dialog.style.maxHeight = '';\n\n const { top, bottom } = dialog.getBoundingClientRect();\n if (top - MAX_HEIGHT_MARGIN < 0) {\n // if the dialog is overflowing to the top\n dialog.style.maxHeight = `${bottom - MAX_HEIGHT_MARGIN}px`;\n } else if (bottom + MAX_HEIGHT_MARGIN > window.innerHeight) {\n // if the dialog is overflowing to the bottom\n dialog.style.maxHeight = `${window.innerHeight - top - MAX_HEIGHT_MARGIN}px`;\n }\n}\n\n/**\n * Checks if a specified HTML element is visible within the viewport.\n * Visibility is determined by several factors:\n * - The element must have non-zero dimensions.\n * - The element's computed style must not be `display: none`, `visibility: hidden`, or `opacity: 0`.\n * - The element must be within the bounds of the current viewport.\n *\n * @param {HTMLElement} element - The HTML element to check for visibility.\n * @returns {boolean} Returns true if the element is visible according to the criteria specified, otherwise returns false.\n */\nexport function isElementVisible(element: HTMLElement) {\n const rect = element.getBoundingClientRect();\n const hasSize = rect.width > 0 && rect.height > 0;\n\n const style = window.getComputedStyle(element);\n const isVisibleStyle = style.display !== 'none' && style.visibility !== 'hidden' && parseFloat(style.opacity) !== 0;\n\n // Check if the element is within the viewport\n const isInViewport =\n rect.top < window.innerHeight && rect.left < window.innerWidth && rect.bottom > 0 && rect.right > 0;\n\n return hasSize && isVisibleStyle && isInViewport;\n}\n\n/**\n * Assigns a local DOM ref to a forwarded ref.\n *\n * @param {RefObject<HTMLDivElement>} localRef - The local React reference to an HTMLDivElement.\n * @param {ForwardedRef<HTMLDivElement>} forwardedRef - The ref forwarded from a parent component.\n */\nexport function syncRefs<TElement = HTMLElement>(localRef: RefObject<TElement>, forwardedRef: ForwardedRef<TElement>) {\n if (!forwardedRef) {\n return;\n }\n\n if (typeof forwardedRef === 'function') {\n forwardedRef(localRef.current);\n } else if (forwardedRef && 'current' in forwardedRef) {\n forwardedRef.current = localRef.current;\n }\n}\n\n/**\n * Sets the 'autoFocusVisible' data attribute to 'false' on the current target of a mouse event.\n * This function is typically used to indicate that an element has been interacted with via mouse,\n * which should prevent the focus ring from being displayed when the element receives focus.\n *\n * @param mouseEvent - The mouse event object.\n */\nexport function addAutoFocusAttribute(mouseEvent: ReactMouseEvent<HTMLButtonElement, MouseEvent>) {\n mouseEvent.currentTarget.dataset.autoFocusVisible = 'false';\n}\n\n/**\n * Manages the focus ring visibility based on the previous focus state and the current focus event.\n * This function sets the 'showFocusRing' data attribute on the target element and updates the\n * 'autoFocusVisible' data attribute on the previously focused element.\n *\n * ! This function should be used in conjunction with the 'addAutoFocusAttribute' function and the autoFocusVisible data autoFocusTrigger.\n *\n * @param event - The focus event object.\n */\nexport function addShowFocusRing(event: FocusEvent<HTMLDivElement, HTMLElement>) {\n const triggerElement = event.relatedTarget;\n\n if (!triggerElement?.dataset.autoFocusTrigger) {\n return;\n }\n\n if (triggerElement.dataset.autoFocusVisible === 'true') {\n event.target.dataset.showFocusRing = 'true';\n } else {\n event.target.dataset.showFocusRing = 'false';\n }\n\n triggerElement.dataset.autoFocusVisible = 'true';\n}\n"],"names":["syncRefs","localRef","forwardedRef","addAutoFocusAttribute","mouseEvent","addShowFocusRing","event","triggerElement"],"mappings":"AAkEgB,SAAAA,EAAiCC,GAA+BC,GAAsC;AAClH,EAAKA,MAID,OAAOA,KAAiB,aACxBA,EAAaD,EAAS,OAAO,IACtBC,KAAgB,aAAaA,MACpCA,EAAa,UAAUD,EAAS;AAExC;AASO,SAASE,EAAsBC,GAA4D;AACnF,EAAAA,EAAA,cAAc,QAAQ,mBAAmB;AACxD;AAWO,SAASC,EAAiBC,GAAgD;AAC7E,QAAMC,IAAiBD,EAAM;AAEzB,EAACC,KAAA,QAAAA,EAAgB,QAAQ,qBAIzBA,EAAe,QAAQ,qBAAqB,SACtCD,EAAA,OAAO,QAAQ,gBAAgB,SAE/BA,EAAA,OAAO,QAAQ,gBAAgB,SAGzCC,EAAe,QAAQ,mBAAmB;AAC9C;"}
@@ -1,21 +1,18 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { useMemo as c, isValidElement as r, cloneElement as i, Children as p } from "react";
3
- const o = (e) => {
4
- const t = [];
5
- for (const n of p.toArray(e))
6
- r(n) ? t.push(n) : t.push(/* @__PURE__ */ s("span", { children: n }));
7
- return t.length === 1 ? t[0] : t;
8
- }, u = (e) => c(() => {
9
- const t = r(e) && e.type === "a";
10
- if (t) {
11
- const n = i(e, {
12
- children: o(e.props.children)
13
- });
14
- return { isLink: t, content: n };
15
- }
16
- return { isLink: t, content: o(e) };
17
- }, [e]);
1
+ const t = "_content_2dhca_6", e = "_header_2dhca_51", o = "_footer_2dhca_52", n = "_body_2dhca_53", d = "_underlay_2dhca_177", _ = "_sideContent_2dhca_190", c = {
2
+ content: t,
3
+ header: e,
4
+ footer: o,
5
+ body: n,
6
+ underlay: d,
7
+ sideContent: _
8
+ };
18
9
  export {
19
- u as useProcessedChildren
10
+ n as body,
11
+ t as content,
12
+ c as default,
13
+ o as footer,
14
+ e as header,
15
+ _ as sideContent,
16
+ d as underlay
20
17
  };
21
18
  //# sourceMappingURL=fondue-components45.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components45.js","sources":["../src/components/Dropdown/hooks/useProcessedChildren.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { Children, cloneElement, isValidElement, type ReactNode, useMemo } from 'react';\n\nconst wrapFloatingText = (children: ReactNode) => {\n const content = [];\n for (const child of Children.toArray(children)) {\n if (isValidElement(child)) {\n content.push(child);\n } else {\n content.push(<span>{child}</span>);\n }\n }\n return content.length === 1 ? content[0] : content;\n};\n\nexport const useProcessedChildren = (children: ReactNode) => {\n return useMemo(() => {\n const isLink =\n isValidElement<{\n children: ReactNode;\n }>(children) && children.type === 'a';\n\n if (isLink) {\n const element = cloneElement(children, {\n children: wrapFloatingText(children.props.children),\n });\n return { isLink, content: element };\n }\n\n return { isLink, content: wrapFloatingText(children) };\n }, [children]);\n};\n"],"names":["wrapFloatingText","children","content","child","Children","isValidElement","jsx","useProcessedChildren","useMemo","isLink","element","cloneElement"],"mappings":";;AAIA,MAAMA,IAAmB,CAACC,MAAwB;AAC9C,QAAMC,IAAU,CAAC;AACjB,aAAWC,KAASC,EAAS,QAAQH,CAAQ;AACrC,IAAAI,EAAeF,CAAK,IACpBD,EAAQ,KAAKC,CAAK,IAElBD,EAAQ,KAAK,gBAAAI,EAAC,QAAM,EAAA,UAAAH,EAAA,CAAM,CAAO;AAGzC,SAAOD,EAAQ,WAAW,IAAIA,EAAQ,CAAC,IAAIA;AAC/C,GAEaK,IAAuB,CAACN,MAC1BO,EAAQ,MAAM;AACjB,QAAMC,IACFJ,EAEGJ,CAAQ,KAAKA,EAAS,SAAS;AAEtC,MAAIQ,GAAQ;AACF,UAAAC,IAAUC,EAAaV,GAAU;AAAA,MACnC,UAAUD,EAAiBC,EAAS,MAAM,QAAQ;AAAA,IAAA,CACrD;AACM,WAAA,EAAE,QAAAQ,GAAQ,SAASC,EAAQ;AAAA,EAAA;AAGtC,SAAO,EAAE,QAAAD,GAAQ,SAAST,EAAiBC,CAAQ,EAAE;AAAA,GACtD,CAACA,CAAQ,CAAC;"}
1
+ {"version":3,"file":"fondue-components45.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,22 +1,63 @@
1
- const t = "_content_8bl6l_6", n = "_subContent_8bl6l_7", o = "_item_8bl6l_20", s = "_subTrigger_8bl6l_21", _ = "_subMenuIndicator_8bl6l_119", e = "_group_8bl6l_125", l = "_groupHeading_8bl6l_132", u = "_slot_8bl6l_143", b = {
2
- content: t,
3
- subContent: n,
4
- item: o,
5
- subTrigger: s,
6
- subMenuIndicator: _,
7
- group: e,
8
- groupHeading: l,
9
- slot: u
10
- };
1
+ import { sv as t } from "./fondue-components33.js";
2
+ const i = t({
3
+ base: "tw-flex tw-self-stretch tw-justify-center ",
4
+ variants: {
5
+ direction: {
6
+ horizontal: "tw-flex-col tw-h-0 tw-border-t tw-w-full",
7
+ vertical: "tw-flex-row tw-w-0 tw-border-r tw-h-full "
8
+ },
9
+ color: {
10
+ weak: "tw-border-line-weak",
11
+ default: "tw-border-line",
12
+ strong: "tw-border-line-strong",
13
+ "x-strong": "tw-border-x-line-strong"
14
+ },
15
+ variant: {
16
+ solid: "tw-border-solid",
17
+ dashed: "tw-border-dashed",
18
+ noline: "tw-border-none"
19
+ }
20
+ },
21
+ compoundVariants: [
22
+ {
23
+ direction: "horizontal",
24
+ padding: "small",
25
+ class: "tw-my-4"
26
+ },
27
+ {
28
+ direction: "horizontal",
29
+ padding: "medium",
30
+ class: "tw-my-7"
31
+ },
32
+ {
33
+ direction: "horizontal",
34
+ padding: "large",
35
+ class: "tw-my-12"
36
+ },
37
+ {
38
+ direction: "vertical",
39
+ padding: "small",
40
+ class: "tw-mx-4"
41
+ },
42
+ {
43
+ direction: "vertical",
44
+ padding: "medium",
45
+ class: "tw-mx-7"
46
+ },
47
+ {
48
+ direction: "vertical",
49
+ padding: "large",
50
+ class: "tw-mx-12"
51
+ }
52
+ ],
53
+ defaultVariants: {
54
+ padding: "medium",
55
+ direction: "horizontal",
56
+ color: "default",
57
+ variant: "solid"
58
+ }
59
+ });
11
60
  export {
12
- t as content,
13
- b as default,
14
- e as group,
15
- l as groupHeading,
16
- o as item,
17
- u as slot,
18
- n as subContent,
19
- _ as subMenuIndicator,
20
- s as subTrigger
61
+ i as dividerStyles
21
62
  };
22
63
  //# sourceMappingURL=fondue-components46.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components46.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
1
+ {"version":3,"file":"fondue-components46.js","sources":["../src/components/Divider/styles/dividerStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { sv } from '#/utilities/styleUtilities';\n\nexport const dividerStyles = sv({\n base: 'tw-flex tw-self-stretch tw-justify-center ',\n variants: {\n direction: {\n horizontal: 'tw-flex-col tw-h-0 tw-border-t tw-w-full',\n vertical: 'tw-flex-row tw-w-0 tw-border-r tw-h-full ',\n },\n color: {\n weak: 'tw-border-line-weak',\n default: 'tw-border-line',\n strong: 'tw-border-line-strong',\n 'x-strong': 'tw-border-x-line-strong',\n },\n variant: {\n solid: 'tw-border-solid',\n dashed: 'tw-border-dashed',\n noline: 'tw-border-none',\n },\n },\n compoundVariants: [\n {\n direction: 'horizontal',\n padding: 'small',\n class: 'tw-my-4',\n },\n {\n direction: 'horizontal',\n padding: 'medium',\n class: 'tw-my-7',\n },\n {\n direction: 'horizontal',\n padding: 'large',\n class: 'tw-my-12',\n },\n {\n direction: 'vertical',\n padding: 'small',\n class: 'tw-mx-4',\n },\n {\n direction: 'vertical',\n padding: 'medium',\n class: 'tw-mx-7',\n },\n {\n direction: 'vertical',\n padding: 'large',\n class: 'tw-mx-12',\n },\n ],\n defaultVariants: {\n padding: 'medium',\n direction: 'horizontal',\n color: 'default',\n variant: 'solid',\n },\n});\n"],"names":["dividerStyles","sv"],"mappings":";AAIO,MAAMA,IAAgBC,EAAG;AAAA,EAC5B,MAAM;AAAA,EACN,UAAU;AAAA,IACN,WAAW;AAAA,MACP,YAAY;AAAA,MACZ,UAAU;AAAA,IACd;AAAA,IACA,OAAO;AAAA,MACH,MAAM;AAAA,MACN,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,YAAY;AAAA,IAChB;AAAA,IACA,SAAS;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,QAAQ;AAAA,IAAA;AAAA,EAEhB;AAAA,EACA,kBAAkB;AAAA,IACd;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IACX;AAAA,IACA;AAAA,MACI,WAAW;AAAA,MACX,SAAS;AAAA,MACT,OAAO;AAAA,IAAA;AAAA,EAEf;AAAA,EACA,iBAAiB;AAAA,IACb,SAAS;AAAA,IACT,WAAW;AAAA,IACX,OAAO;AAAA,IACP,SAAS;AAAA,EAAA;AAEjB,CAAC;"}
@@ -1,8 +1,21 @@
1
- const o = "_root_gh190_5", t = {
2
- root: o
3
- };
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { useMemo as c, isValidElement as r, cloneElement as i, Children as p } from "react";
3
+ const o = (e) => {
4
+ const t = [];
5
+ for (const n of p.toArray(e))
6
+ r(n) ? t.push(n) : t.push(/* @__PURE__ */ s("span", { children: n }));
7
+ return t.length === 1 ? t[0] : t;
8
+ }, u = (e) => c(() => {
9
+ const t = r(e) && e.type === "a";
10
+ if (t) {
11
+ const n = i(e, {
12
+ children: o(e.props.children)
13
+ });
14
+ return { isLink: t, content: n };
15
+ }
16
+ return { isLink: t, content: o(e) };
17
+ }, [e]);
4
18
  export {
5
- t as default,
6
- o as root
19
+ u as useProcessedChildren
7
20
  };
8
21
  //# sourceMappingURL=fondue-components47.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components47.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
1
+ {"version":3,"file":"fondue-components47.js","sources":["../src/components/Dropdown/hooks/useProcessedChildren.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { Children, cloneElement, isValidElement, type ReactNode, useMemo } from 'react';\n\nconst wrapFloatingText = (children: ReactNode) => {\n const content = [];\n for (const child of Children.toArray(children)) {\n if (isValidElement(child)) {\n content.push(child);\n } else {\n content.push(<span>{child}</span>);\n }\n }\n return content.length === 1 ? content[0] : content;\n};\n\nexport const useProcessedChildren = (children: ReactNode) => {\n return useMemo(() => {\n const isLink =\n isValidElement<{\n children: ReactNode;\n }>(children) && children.type === 'a';\n\n if (isLink) {\n const element = cloneElement(children, {\n children: wrapFloatingText(children.props.children),\n });\n return { isLink, content: element };\n }\n\n return { isLink, content: wrapFloatingText(children) };\n }, [children]);\n};\n"],"names":["wrapFloatingText","children","content","child","Children","isValidElement","jsx","useProcessedChildren","useMemo","isLink","element","cloneElement"],"mappings":";;AAIA,MAAMA,IAAmB,CAACC,MAAwB;AAC9C,QAAMC,IAAU,CAAC;AACjB,aAAWC,KAASC,EAAS,QAAQH,CAAQ;AACrC,IAAAI,EAAeF,CAAK,IACpBD,EAAQ,KAAKC,CAAK,IAElBD,EAAQ,KAAK,gBAAAI,EAAC,QAAM,EAAA,UAAAH,EAAA,CAAM,CAAO;AAGzC,SAAOD,EAAQ,WAAW,IAAIA,EAAQ,CAAC,IAAIA;AAC/C,GAEaK,IAAuB,CAACN,MAC1BO,EAAQ,MAAM;AACjB,QAAMC,IACFJ,EAEGJ,CAAQ,KAAKA,EAAS,SAAS;AAEtC,MAAIQ,GAAQ;AACF,UAAAC,IAAUC,EAAaV,GAAU;AAAA,MACnC,UAAUD,EAAiBC,EAAS,MAAM,QAAQ;AAAA,IAAA,CACrD;AACM,WAAA,EAAE,QAAAQ,GAAQ,SAASC,EAAQ;AAAA,EAAA;AAGtC,SAAO,EAAE,QAAAD,GAAQ,SAAST,EAAiBC,CAAQ,EAAE;AAAA,GACtD,CAACA,CAAQ,CAAC;"}
@@ -1,18 +1,22 @@
1
- const o = "_root_xbnxk_6", e = "_overlay_xbnxk_50", _ = "_header_xbnxk_67", t = "_body_xbnxk_87", n = "_footer_xbnxk_105", r = "_close_xbnxk_125", s = {
2
- root: o,
3
- overlay: e,
4
- header: _,
5
- body: t,
6
- footer: n,
7
- close: r
1
+ const t = "_content_8bl6l_6", n = "_subContent_8bl6l_7", o = "_item_8bl6l_20", s = "_subTrigger_8bl6l_21", _ = "_subMenuIndicator_8bl6l_119", e = "_group_8bl6l_125", l = "_groupHeading_8bl6l_132", u = "_slot_8bl6l_143", b = {
2
+ content: t,
3
+ subContent: n,
4
+ item: o,
5
+ subTrigger: s,
6
+ subMenuIndicator: _,
7
+ group: e,
8
+ groupHeading: l,
9
+ slot: u
8
10
  };
9
11
  export {
10
- t as body,
11
- r as close,
12
- s as default,
13
- n as footer,
14
- _ as header,
15
- e as overlay,
16
- o as root
12
+ t as content,
13
+ b as default,
14
+ e as group,
15
+ l as groupHeading,
16
+ o as item,
17
+ u as slot,
18
+ n as subContent,
19
+ _ as subMenuIndicator,
20
+ s as subTrigger
17
21
  };
18
22
  //# sourceMappingURL=fondue-components48.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components48.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"fondue-components48.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- const o = "_root_umks5_5", t = {
1
+ const o = "_root_gh190_5", t = {
2
2
  root: o
3
3
  };
4
4
  export {
@@ -1,49 +1,46 @@
1
- import { jsx as t, jsxs as s } from "react/jsx-runtime";
2
- import { IconMinus as m, IconCheckMark as h } from "@frontify/fondue-icons";
3
- import * as o from "@radix-ui/react-checkbox";
4
- import { forwardRef as k } from "react";
5
- import { cn as p } from "./fondue-components31.js";
6
- import { checkboxStyles as l, checkboxIndicatorStyles as w } from "./fondue-components35.js";
7
- const f = ({
8
- className: a,
9
- value: c,
10
- onChange: i,
11
- defaultValue: d,
12
- "data-test-id": r = "fondue-checkbox",
13
- ...e
14
- }, n) => /* @__PURE__ */ t(
15
- o.Root,
16
- {
17
- ref: n,
18
- checked: c,
19
- defaultChecked: d,
20
- className: p(l(e), a),
21
- onClick: i,
22
- "data-test-id": r,
23
- ...e,
24
- children: /* @__PURE__ */ s(o.Indicator, { className: w, children: [
25
- /* @__PURE__ */ t(
26
- m,
27
- {
28
- size: 16,
29
- className: 'tw-hidden tw-opacity-0 group-data-[state="indeterminate"]:tw-block group-data-[state="indeterminate"]:tw-opacity-100 tw-transition-opacity',
30
- "data-test-id": "icon-indeterminate"
31
- }
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as y } from "react";
3
+ import { cn as x } from "./fondue-components33.js";
4
+ import { buttonStyles as S } from "./fondue-components34.js";
5
+ import { iconStyles as k } from "./fondue-components35.js";
6
+ import { textStyles as B } from "./fondue-components36.js";
7
+ const C = y(
8
+ ({
9
+ children: f,
10
+ type: d = "button",
11
+ variant: m,
12
+ size: e = "medium",
13
+ form: l,
14
+ "data-test-id": c = "fondue-button",
15
+ className: n = "",
16
+ onPress: o = () => {
17
+ },
18
+ hugWidth: a = !0,
19
+ ...t
20
+ }, b) => /* @__PURE__ */ r(
21
+ "button",
22
+ {
23
+ ref: b,
24
+ type: d,
25
+ form: l,
26
+ "data-test-id": c,
27
+ className: x(
28
+ S({ size: e, variant: m, hugWidth: a, ...t }),
29
+ B({ variant: m, ...t }),
30
+ k({ variant: m, ...t }),
31
+ n
32
32
  ),
33
- /* @__PURE__ */ t(
34
- h,
35
- {
36
- size: 16,
37
- className: 'tw-hidden tw-opacity-0 group-data-[state="checked"]:tw-block group-data-[state="checked"]:tw-opacity-100 tw-transition-opacity',
38
- "data-test-id": "icon-checked"
39
- }
40
- )
41
- ] })
42
- }
43
- ), x = k(f);
44
- x.displayName = "Checkbox";
33
+ ...t,
34
+ onClick: (i) => {
35
+ var u;
36
+ (u = t.onClick) == null || u.call(t, i), o == null || o(i);
37
+ },
38
+ children: f
39
+ }
40
+ )
41
+ );
42
+ C.displayName = "Button";
45
43
  export {
46
- x as Checkbox,
47
- f as CheckboxComponent
44
+ C as Button
48
45
  };
49
46
  //# sourceMappingURL=fondue-components5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components5.js","sources":["../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCheckMark, IconMinus } from '@frontify/fondue-icons';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { forwardRef, type FormEvent, type ForwardedRef } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport { checkboxIndicatorStyles, checkboxStyles } from './styles/checkboxStyles';\n\nexport type CheckboxProps = {\n id?: string;\n name?: string;\n /**\n * The default value of the checkbox\n * Used for uncontrolled components\n * @default false\n */\n defaultValue?: boolean | 'indeterminate';\n /**\n * The controlled value of the checkbox\n * @default false\n */\n value?: boolean | 'indeterminate';\n /**\n * The size of the checkbox\n * @default \"default\"\n */\n size?: 'default' | 'large';\n /**\n * The emphasis of the checkbox\n * @default \"default\"\n */\n emphasis?: 'default' | 'weak';\n /**\n * Disable the checkbox\n * @default false\n */\n disabled?: boolean;\n /**\n * Make the checkbox required in form\n * @default false\n */\n required?: boolean;\n /**\n * Make the checkbox read-only\n * @default false\n */\n readOnly?: boolean;\n className?: string;\n /**\n * Event handler called when the checkbox value changes\n */\n onChange?: (event: FormEvent<HTMLButtonElement>) => void;\n /**\n * Event handler called when the checkbox is blurred\n */\n onBlur?: (event: FormEvent<HTMLButtonElement>) => void;\n /**\n * Event handler called when the checkbox is focused\n */\n onFocus?: (event: FormEvent<HTMLButtonElement>) => void;\n 'data-test-id'?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'aria-describedby'?: string;\n};\n\nexport const CheckboxComponent = (\n {\n className,\n value,\n onChange,\n defaultValue,\n 'data-test-id': dataTestId = 'fondue-checkbox',\n ...props\n }: CheckboxProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <CheckboxPrimitive.Root\n ref={ref}\n checked={value}\n defaultChecked={defaultValue}\n className={cn(checkboxStyles(props), className)}\n onClick={onChange}\n data-test-id={dataTestId}\n {...props}\n >\n <CheckboxPrimitive.Indicator className={checkboxIndicatorStyles}>\n <IconMinus\n size={16}\n className='tw-hidden tw-opacity-0 group-data-[state=\"indeterminate\"]:tw-block group-data-[state=\"indeterminate\"]:tw-opacity-100 tw-transition-opacity'\n data-test-id=\"icon-indeterminate\"\n />\n\n <IconCheckMark\n size={16}\n className='tw-hidden tw-opacity-0 group-data-[state=\"checked\"]:tw-block group-data-[state=\"checked\"]:tw-opacity-100 tw-transition-opacity'\n data-test-id=\"icon-checked\"\n />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n};\n\nexport const Checkbox = forwardRef<HTMLButtonElement, CheckboxProps>(CheckboxComponent);\nCheckbox.displayName = 'Checkbox';\n"],"names":["CheckboxComponent","className","value","onChange","defaultValue","dataTestId","props","ref","jsx","CheckboxPrimitive","cn","checkboxStyles","jsxs","checkboxIndicatorStyles","IconMinus","IconCheckMark","Checkbox","forwardRef"],"mappings":";;;;;;AAoEO,MAAMA,IAAoB,CAC7B;AAAA,EACI,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAgBC,IAAa;AAAA,EAC7B,GAAGC;AACP,GACAC,MAGI,gBAAAC;AAAA,EAACC,EAAkB;AAAA,EAAlB;AAAA,IACG,KAAAF;AAAA,IACA,SAASL;AAAA,IACT,gBAAgBE;AAAA,IAChB,WAAWM,EAAGC,EAAeL,CAAK,GAAGL,CAAS;AAAA,IAC9C,SAASE;AAAA,IACT,gBAAcE;AAAA,IACb,GAAGC;AAAA,IAEJ,UAAC,gBAAAM,EAAAH,EAAkB,WAAlB,EAA4B,WAAWI,GACpC,UAAA;AAAA,MAAA,gBAAAL;AAAA,QAACM;AAAA,QAAA;AAAA,UACG,MAAM;AAAA,UACN,WAAU;AAAA,UACV,gBAAa;AAAA,QAAA;AAAA,MACjB;AAAA,MAEA,gBAAAN;AAAA,QAACO;AAAA,QAAA;AAAA,UACG,MAAM;AAAA,UACN,WAAU;AAAA,UACV,gBAAa;AAAA,QAAA;AAAA,MAAA;AAAA,IACjB,EACJ,CAAA;AAAA,EAAA;AACJ,GAIKC,IAAWC,EAA6CjB,CAAiB;AACtFgB,EAAS,cAAc;"}
1
+ {"version":3,"file":"fondue-components5.js","sources":["../src/components/Button/Button.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { forwardRef, type ForwardedRef, type MouseEvent, type ReactNode } from 'react';\n\nimport { cn } from '#/utilities/styleUtilities';\n\nimport { buttonStyles } from './styles/buttonStyles';\nimport { iconStyles } from './styles/iconStyles';\nimport { textStyles } from './styles/textStyles';\n\ntype ButtonRounding = 'medium' | 'full';\n\ntype ButtonStyle = 'default' | 'positive' | 'negative' | 'danger' | 'loud';\n\ntype ButtonSize = 'small' | 'medium' | 'large';\n\ntype ButtonType = 'button' | 'submit' | 'reset';\n\ntype ButtonEmphasis = 'default' | 'weak' | 'strong';\n\ntype ButtonAspect = 'default' | 'square';\n\nexport type ButtonProps = {\n /**\n * @default \"button\"\n */\n type?: ButtonType;\n /**\n * @default null\n */\n title?: string;\n /**\n * @default \"default\"\n */\n variant?: ButtonStyle;\n /**\n * @default \"strong\"\n */\n emphasis?: ButtonEmphasis;\n /**\n * @default \"medium\"\n */\n size?: ButtonSize;\n /**\n * @default \"medium\"\n */\n rounding?: ButtonRounding;\n /**\n * @default false\n */\n disabled?: boolean;\n /**\n * @default \"default\"\n */\n aspect?: ButtonAspect;\n /**\n * @default true\n */\n hugWidth?: boolean;\n children?: ReactNode;\n onPress?: (event?: MouseEvent<HTMLButtonElement>) => void;\n form?: string;\n 'aria-label'?: string;\n 'aria-describedby'?: string;\n 'data-test-id'?: string;\n className?: string;\n};\n\nexport const Button = forwardRef<HTMLButtonElement | null, ButtonProps>(\n (\n {\n children,\n type = 'button',\n variant,\n size = 'medium',\n form,\n 'data-test-id': dataTestId = 'fondue-button',\n className = '',\n onPress = () => {},\n hugWidth = true,\n ...props\n }: ButtonProps,\n ref: ForwardedRef<HTMLButtonElement | null>,\n ) => {\n return (\n <button\n ref={ref}\n type={type}\n form={form}\n data-test-id={dataTestId}\n className={cn(\n buttonStyles({ size, variant, hugWidth, ...props }),\n textStyles({ variant, ...props }),\n iconStyles({ variant, ...props }),\n className,\n )}\n {...props}\n onClick={(event) => {\n // @ts-expect-error - Allows other components who use Button as a trigger to pass an action\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n props.onClick?.(event);\n onPress?.(event);\n }}\n >\n {children}\n </button>\n );\n },\n);\n\nButton.displayName = 'Button';\n"],"names":["Button","forwardRef","children","type","variant","size","form","dataTestId","className","onPress","hugWidth","props","ref","jsx","cn","buttonStyles","textStyles","iconStyles","event","_a"],"mappings":";;;;;;AAoEO,MAAMA,IAASC;AAAA,EAClB,CACI;AAAA,IACI,UAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,SAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,MAAAC;AAAA,IACA,gBAAgBC,IAAa;AAAA,IAC7B,WAAAC,IAAY;AAAA,IACZ,SAAAC,IAAU,MAAM;AAAA,IAAC;AAAA,IACjB,UAAAC,IAAW;AAAA,IACX,GAAGC;AAAA,KAEPC,MAGI,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,KAAAD;AAAA,MACA,MAAAT;AAAA,MACA,MAAAG;AAAA,MACA,gBAAcC;AAAA,MACd,WAAWO;AAAA,QACPC,EAAa,EAAE,MAAAV,GAAM,SAAAD,GAAS,UAAAM,GAAU,GAAGC,GAAO;AAAA,QAClDK,EAAW,EAAE,SAAAZ,GAAS,GAAGO,GAAO;AAAA,QAChCM,EAAW,EAAE,SAAAb,GAAS,GAAGO,GAAO;AAAA,QAChCH;AAAA,MACJ;AAAA,MACC,GAAGG;AAAA,MACJ,SAAS,CAACO,MAAU;;AAGhB,SAAAC,IAAAR,EAAM,YAAN,QAAAQ,EAAA,KAAAR,GAAgBO,IAChBT,KAAA,QAAAA,EAAUS;AAAA,MACd;AAAA,MAEC,UAAAhB;AAAA,IAAA;AAAA,EACL;AAGZ;AAEAF,EAAO,cAAc;"}
@@ -1,22 +1,18 @@
1
- const o = "_root_1brlo_2", r = {
1
+ const o = "_root_xbnxk_6", e = "_overlay_xbnxk_50", _ = "_header_xbnxk_67", t = "_body_xbnxk_87", n = "_footer_xbnxk_105", r = "_close_xbnxk_125", s = {
2
2
  root: o,
3
- "size-medium": "_size-medium_1brlo_6",
4
- "size-large": "_size-large_1brlo_11",
5
- "size-x-large": "_size-x-large_1brlo_16",
6
- "size-xx-large": "_size-xx-large_1brlo_21",
7
- "weight-default": "_weight-default_1brlo_26",
8
- "weight-strong": "_weight-strong_1brlo_30",
9
- "color-default": "_color-default_1brlo_34",
10
- "color-weak": "_color-weak_1brlo_38",
11
- "color-x-weak": "_color-x-weak_1brlo_42",
12
- "color-disabled": "_color-disabled_1brlo_46",
13
- "color-negative": "_color-negative_1brlo_50",
14
- "color-positive": "_color-positive_1brlo_54",
15
- "color-warning": "_color-warning_1brlo_58",
16
- "color-interactive": "_color-interactive_1brlo_62"
3
+ overlay: e,
4
+ header: _,
5
+ body: t,
6
+ footer: n,
7
+ close: r
17
8
  };
18
9
  export {
19
- r as default,
10
+ t as body,
11
+ r as close,
12
+ s as default,
13
+ n as footer,
14
+ _ as header,
15
+ e as overlay,
20
16
  o as root
21
17
  };
22
18
  //# sourceMappingURL=fondue-components50.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components50.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"fondue-components50.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,38 +1,8 @@
1
- import { sv as t } from "./fondue-components31.js";
2
- const i = t({
3
- base: "tw-relative tw-w-full tw-overflow-hidden",
4
- variants: {
5
- rounded: {
6
- true: "tw-rounded"
7
- },
8
- size: {
9
- small: "tw-h-1",
10
- medium: "tw-h-2",
11
- large: "tw-h-3",
12
- "x-large": "tw-h-4"
13
- },
14
- variant: {
15
- default: "tw-bg-box-selected",
16
- positive: "tw-bg-box-positive",
17
- negative: "tw-bg-box-negative"
18
- }
19
- }
20
- }), a = t({
21
- base: "tw-h-full tw-w-full",
22
- variants: {
23
- variant: {
24
- default: "tw-bg-text-interactive",
25
- positive: "tw-bg-text-positive",
26
- negative: "tw-bg-text-negative"
27
- },
28
- indeterminateState: {
29
- true: "tw-animate-loading-bar-infinite tw-origin-left-right",
30
- false: "tw-transition-all tw-origin-left tw-scale-x-[--loading-bar-proportion]"
31
- }
32
- }
33
- });
1
+ const o = "_root_umks5_5", t = {
2
+ root: o
3
+ };
34
4
  export {
35
- i as loadingBarContainerStyles,
36
- a as loadingBarStyles
5
+ t as default,
6
+ o as root
37
7
  };
38
8
  //# sourceMappingURL=fondue-components51.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components51.js","sources":["../src/components/LoadingBar/styles/loadingBarStyles.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { sv } from '#/utilities/styleUtilities';\n\nexport const loadingBarContainerStyles = sv({\n base: 'tw-relative tw-w-full tw-overflow-hidden',\n variants: {\n rounded: {\n true: 'tw-rounded',\n },\n size: {\n small: 'tw-h-1',\n medium: 'tw-h-2',\n large: 'tw-h-3',\n 'x-large': 'tw-h-4',\n },\n variant: {\n default: 'tw-bg-box-selected',\n positive: 'tw-bg-box-positive',\n negative: 'tw-bg-box-negative',\n },\n },\n});\n\nexport const loadingBarStyles = sv({\n base: 'tw-h-full tw-w-full',\n variants: {\n variant: {\n default: 'tw-bg-text-interactive',\n positive: 'tw-bg-text-positive',\n negative: 'tw-bg-text-negative',\n },\n indeterminateState: {\n true: 'tw-animate-loading-bar-infinite tw-origin-left-right',\n false: 'tw-transition-all tw-origin-left tw-scale-x-[--loading-bar-proportion]',\n },\n },\n});\n"],"names":["loadingBarContainerStyles","sv","loadingBarStyles"],"mappings":";AAIO,MAAMA,IAA4BC,EAAG;AAAA,EACxC,MAAM;AAAA,EACN,UAAU;AAAA,IACN,SAAS;AAAA,MACL,MAAM;AAAA,IACV;AAAA,IACA,MAAM;AAAA,MACF,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,WAAW;AAAA,IACf;AAAA,IACA,SAAS;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,IAAA;AAAA,EACd;AAER,CAAC,GAEYC,IAAmBD,EAAG;AAAA,EAC/B,MAAM;AAAA,EACN,UAAU;AAAA,IACN,SAAS;AAAA,MACL,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,IACd;AAAA,IACA,oBAAoB;AAAA,MAChB,MAAM;AAAA,MACN,OAAO;AAAA,IAAA;AAAA,EACX;AAER,CAAC;"}
1
+ {"version":3,"file":"fondue-components51.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -1,10 +1,22 @@
1
- const t = "_root_t4a4t_8", o = "_spin_t4a4t_1", s = {
2
- root: t,
3
- spin: o
1
+ const o = "_root_1brlo_2", r = {
2
+ root: o,
3
+ "size-medium": "_size-medium_1brlo_6",
4
+ "size-large": "_size-large_1brlo_11",
5
+ "size-x-large": "_size-x-large_1brlo_16",
6
+ "size-xx-large": "_size-xx-large_1brlo_21",
7
+ "weight-default": "_weight-default_1brlo_26",
8
+ "weight-strong": "_weight-strong_1brlo_30",
9
+ "color-default": "_color-default_1brlo_34",
10
+ "color-weak": "_color-weak_1brlo_38",
11
+ "color-x-weak": "_color-x-weak_1brlo_42",
12
+ "color-disabled": "_color-disabled_1brlo_46",
13
+ "color-negative": "_color-negative_1brlo_50",
14
+ "color-positive": "_color-positive_1brlo_54",
15
+ "color-warning": "_color-warning_1brlo_58",
16
+ "color-interactive": "_color-interactive_1brlo_62"
4
17
  };
5
18
  export {
6
- s as default,
7
- t as root,
8
- o as spin
19
+ r as default,
20
+ o as root
9
21
  };
10
22
  //# sourceMappingURL=fondue-components52.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components52.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"fondue-components52.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}