@frontify/fondue-components 10.0.0 → 11.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.
- package/dist/fondue-components10.js +1 -1
- package/dist/fondue-components10.js.map +1 -1
- package/dist/fondue-components11.js +55 -51
- package/dist/fondue-components11.js.map +1 -1
- package/dist/fondue-components12.js +11 -10
- package/dist/fondue-components12.js.map +1 -1
- package/dist/fondue-components14.js +1 -1
- package/dist/fondue-components15.js +1 -1
- package/dist/fondue-components16.js +11 -10
- package/dist/fondue-components16.js.map +1 -1
- package/dist/fondue-components17.js +2 -2
- package/dist/fondue-components18.js +62 -60
- package/dist/fondue-components18.js.map +1 -1
- package/dist/fondue-components19.js +1 -1
- package/dist/fondue-components20.js +1 -1
- package/dist/fondue-components21.js +60 -60
- package/dist/fondue-components22.js +3 -3
- package/dist/fondue-components23.js +1 -1
- package/dist/fondue-components24.js +44 -31
- package/dist/fondue-components24.js.map +1 -1
- package/dist/fondue-components25.js +5 -5
- package/dist/fondue-components3.js +11 -10
- package/dist/fondue-components3.js.map +1 -1
- package/dist/fondue-components32.js +15 -15
- package/dist/fondue-components33.js +15 -15
- package/dist/fondue-components34.js +10 -10
- package/dist/fondue-components36.js +13 -13
- package/dist/fondue-components37.js +631 -11
- package/dist/fondue-components37.js.map +1 -1
- package/dist/fondue-components38.js +13 -15
- package/dist/fondue-components38.js.map +1 -1
- package/dist/fondue-components39.js +15 -60
- package/dist/fondue-components39.js.map +1 -1
- package/dist/fondue-components4.js +18 -17
- package/dist/fondue-components4.js.map +1 -1
- package/dist/fondue-components40.js +59 -17
- package/dist/fondue-components40.js.map +1 -1
- package/dist/fondue-components41.js +18 -17
- package/dist/fondue-components41.js.map +1 -1
- package/dist/fondue-components42.js +16 -4
- package/dist/fondue-components42.js.map +1 -1
- package/dist/fondue-components43.js +3 -13
- package/dist/fondue-components43.js.map +1 -1
- package/dist/fondue-components44.js +13 -3
- package/dist/fondue-components44.js.map +1 -1
- package/dist/fondue-components45.js +5 -35
- package/dist/fondue-components45.js.map +1 -1
- package/dist/fondue-components46.js +35 -13
- package/dist/fondue-components46.js.map +1 -1
- package/dist/fondue-components47.js +12 -4
- package/dist/fondue-components47.js.map +1 -1
- package/dist/fondue-components48.js +4 -24
- package/dist/fondue-components48.js.map +1 -1
- package/dist/fondue-components49.js +24 -16
- package/dist/fondue-components49.js.map +1 -1
- package/dist/fondue-components50.js +16 -139
- package/dist/fondue-components50.js.map +1 -1
- package/dist/fondue-components51.js +142 -16
- package/dist/fondue-components51.js.map +1 -1
- package/dist/fondue-components52.js +16 -70
- package/dist/fondue-components52.js.map +1 -1
- package/dist/fondue-components53.js +73 -8
- package/dist/fondue-components53.js.map +1 -1
- package/dist/fondue-components54.js +8 -33
- package/dist/fondue-components54.js.map +1 -1
- package/dist/fondue-components55.js +32 -48
- package/dist/fondue-components55.js.map +1 -1
- package/dist/fondue-components56.js +48 -10
- package/dist/fondue-components56.js.map +1 -1
- package/dist/fondue-components57.js +10 -12
- package/dist/fondue-components57.js.map +1 -1
- package/dist/fondue-components58.js +12 -7
- package/dist/fondue-components58.js.map +1 -1
- package/dist/fondue-components59.js +7 -12
- package/dist/fondue-components59.js.map +1 -1
- package/dist/fondue-components60.js +12 -20
- package/dist/fondue-components60.js.map +1 -1
- package/dist/fondue-components61.js +21 -15
- package/dist/fondue-components61.js.map +1 -1
- package/dist/fondue-components62.js +14 -52
- package/dist/fondue-components62.js.map +1 -1
- package/dist/fondue-components63.js +52 -14
- package/dist/fondue-components63.js.map +1 -1
- package/dist/fondue-components64.js +14 -17
- package/dist/fondue-components64.js.map +1 -1
- package/dist/fondue-components65.js +16 -5
- package/dist/fondue-components65.js.map +1 -1
- package/dist/fondue-components66.js +4 -12
- package/dist/fondue-components66.js.map +1 -1
- package/dist/fondue-components68.js +14 -38
- package/dist/fondue-components68.js.map +1 -1
- package/dist/fondue-components69.js +42 -0
- package/dist/fondue-components69.js.map +1 -0
- package/dist/fondue-components7.js +68 -64
- package/dist/fondue-components7.js.map +1 -1
- package/dist/fondue-components8.js +1 -1
- package/dist/fondue-components9.js +85 -109
- package/dist/fondue-components9.js.map +1 -1
- package/dist/index.d.ts +28 -53
- package/dist/style.css +1 -1
- package/package.json +55 -56
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components37.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
|
+
{"version":3,"file":"fondue-components37.js","sources":["../../tokens/dist/theme/fondue-theme-provider.es.js"],"sourcesContent":["import Pe, { createContext as cr, useContext as dr } from \"react\";\nvar X = { exports: {} }, D = {};\n/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nvar Te;\nfunction vr() {\n if (Te) return D;\n Te = 1;\n var w = Pe, _ = Symbol.for(\"react.element\"), M = Symbol.for(\"react.fragment\"), T = Object.prototype.hasOwnProperty, A = w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, I = { key: !0, ref: !0, __self: !0, __source: !0 };\n function j(b, f, O) {\n var p, h = {}, E = null, $ = null;\n O !== void 0 && (E = \"\" + O), f.key !== void 0 && (E = \"\" + f.key), f.ref !== void 0 && ($ = f.ref);\n for (p in f) T.call(f, p) && !I.hasOwnProperty(p) && (h[p] = f[p]);\n if (b && b.defaultProps) for (p in f = b.defaultProps, f) h[p] === void 0 && (h[p] = f[p]);\n return { $$typeof: _, type: b, key: E, ref: $, props: h, _owner: A.current };\n }\n return D.Fragment = M, D.jsx = j, D.jsxs = j, D;\n}\nvar F = {};\n/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nvar Oe;\nfunction pr() {\n return Oe || (Oe = 1, process.env.NODE_ENV !== \"production\" && function() {\n var w = Pe, _ = Symbol.for(\"react.element\"), M = Symbol.for(\"react.portal\"), T = Symbol.for(\"react.fragment\"), A = Symbol.for(\"react.strict_mode\"), I = Symbol.for(\"react.profiler\"), j = Symbol.for(\"react.provider\"), b = Symbol.for(\"react.context\"), f = Symbol.for(\"react.forward_ref\"), O = Symbol.for(\"react.suspense\"), p = Symbol.for(\"react.suspense_list\"), h = Symbol.for(\"react.memo\"), E = Symbol.for(\"react.lazy\"), $ = Symbol.for(\"react.offscreen\"), H = Symbol.iterator, we = \"@@iterator\";\n function je(e) {\n if (e === null || typeof e != \"object\")\n return null;\n var r = H && e[H] || e[we];\n return typeof r == \"function\" ? r : null;\n }\n var C = w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n function c(e) {\n {\n for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)\n t[n - 1] = arguments[n];\n xe(\"error\", e, t);\n }\n }\n function xe(e, r, t) {\n {\n var n = C.ReactDebugCurrentFrame, o = n.getStackAddendum();\n o !== \"\" && (r += \"%s\", t = t.concat([o]));\n var u = t.map(function(i) {\n return String(i);\n });\n u.unshift(\"Warning: \" + r), Function.prototype.apply.call(console[e], console, u);\n }\n }\n var ke = !1, De = !1, Fe = !1, Ae = !1, Ie = !1, Z;\n Z = Symbol.for(\"react.module.reference\");\n function $e(e) {\n return !!(typeof e == \"string\" || typeof e == \"function\" || e === T || e === I || Ie || e === A || e === O || e === p || Ae || e === $ || ke || De || Fe || typeof e == \"object\" && e !== null && (e.$$typeof === E || e.$$typeof === h || e.$$typeof === j || e.$$typeof === b || e.$$typeof === f || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n e.$$typeof === Z || e.getModuleId !== void 0));\n }\n function We(e, r, t) {\n var n = e.displayName;\n if (n)\n return n;\n var o = r.displayName || r.name || \"\";\n return o !== \"\" ? t + \"(\" + o + \")\" : t;\n }\n function Q(e) {\n return e.displayName || \"Context\";\n }\n function y(e) {\n if (e == null)\n return null;\n if (typeof e.tag == \"number\" && c(\"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"), typeof e == \"function\")\n return e.displayName || e.name || null;\n if (typeof e == \"string\")\n return e;\n switch (e) {\n case T:\n return \"Fragment\";\n case M:\n return \"Portal\";\n case I:\n return \"Profiler\";\n case A:\n return \"StrictMode\";\n case O:\n return \"Suspense\";\n case p:\n return \"SuspenseList\";\n }\n if (typeof e == \"object\")\n switch (e.$$typeof) {\n case b:\n var r = e;\n return Q(r) + \".Consumer\";\n case j:\n var t = e;\n return Q(t._context) + \".Provider\";\n case f:\n return We(e, e.render, \"ForwardRef\");\n case h:\n var n = e.displayName || null;\n return n !== null ? n : y(e.type) || \"Memo\";\n case E: {\n var o = e, u = o._payload, i = o._init;\n try {\n return y(i(u));\n } catch {\n return null;\n }\n }\n }\n return null;\n }\n var R = Object.assign, x = 0, ee, re, te, ne, ae, ie, oe;\n function ue() {\n }\n ue.__reactDisabledLog = !0;\n function Ye() {\n {\n if (x === 0) {\n ee = console.log, re = console.info, te = console.warn, ne = console.error, ae = console.group, ie = console.groupCollapsed, oe = console.groupEnd;\n var e = {\n configurable: !0,\n enumerable: !0,\n value: ue,\n writable: !0\n };\n Object.defineProperties(console, {\n info: e,\n log: e,\n warn: e,\n error: e,\n group: e,\n groupCollapsed: e,\n groupEnd: e\n });\n }\n x++;\n }\n }\n function Le() {\n {\n if (x--, x === 0) {\n var e = {\n configurable: !0,\n enumerable: !0,\n writable: !0\n };\n Object.defineProperties(console, {\n log: R({}, e, {\n value: ee\n }),\n info: R({}, e, {\n value: re\n }),\n warn: R({}, e, {\n value: te\n }),\n error: R({}, e, {\n value: ne\n }),\n group: R({}, e, {\n value: ae\n }),\n groupCollapsed: R({}, e, {\n value: ie\n }),\n groupEnd: R({}, e, {\n value: oe\n })\n });\n }\n x < 0 && c(\"disabledDepth fell below zero. This is a bug in React. Please file an issue.\");\n }\n }\n var U = C.ReactCurrentDispatcher, N;\n function W(e, r, t) {\n {\n if (N === void 0)\n try {\n throw Error();\n } catch (o) {\n var n = o.stack.trim().match(/\\n( *(at )?)/);\n N = n && n[1] || \"\";\n }\n return `\n` + N + e;\n }\n }\n var q = !1, Y;\n {\n var Ve = typeof WeakMap == \"function\" ? WeakMap : Map;\n Y = new Ve();\n }\n function se(e, r) {\n if (!e || q)\n return \"\";\n {\n var t = Y.get(e);\n if (t !== void 0)\n return t;\n }\n var n;\n q = !0;\n var o = Error.prepareStackTrace;\n Error.prepareStackTrace = void 0;\n var u;\n u = U.current, U.current = null, Ye();\n try {\n if (r) {\n var i = function() {\n throw Error();\n };\n if (Object.defineProperty(i.prototype, \"props\", {\n set: function() {\n throw Error();\n }\n }), typeof Reflect == \"object\" && Reflect.construct) {\n try {\n Reflect.construct(i, []);\n } catch (v) {\n n = v;\n }\n Reflect.construct(e, [], i);\n } else {\n try {\n i.call();\n } catch (v) {\n n = v;\n }\n e.call(i.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (v) {\n n = v;\n }\n e();\n }\n } catch (v) {\n if (v && n && typeof v.stack == \"string\") {\n for (var a = v.stack.split(`\n`), d = n.stack.split(`\n`), s = a.length - 1, l = d.length - 1; s >= 1 && l >= 0 && a[s] !== d[l]; )\n l--;\n for (; s >= 1 && l >= 0; s--, l--)\n if (a[s] !== d[l]) {\n if (s !== 1 || l !== 1)\n do\n if (s--, l--, l < 0 || a[s] !== d[l]) {\n var g = `\n` + a[s].replace(\" at new \", \" at \");\n return e.displayName && g.includes(\"<anonymous>\") && (g = g.replace(\"<anonymous>\", e.displayName)), typeof e == \"function\" && Y.set(e, g), g;\n }\n while (s >= 1 && l >= 0);\n break;\n }\n }\n } finally {\n q = !1, U.current = u, Le(), Error.prepareStackTrace = o;\n }\n var S = e ? e.displayName || e.name : \"\", m = S ? W(S) : \"\";\n return typeof e == \"function\" && Y.set(e, m), m;\n }\n function Me(e, r, t) {\n return se(e, !1);\n }\n function Ue(e) {\n var r = e.prototype;\n return !!(r && r.isReactComponent);\n }\n function L(e, r, t) {\n if (e == null)\n return \"\";\n if (typeof e == \"function\")\n return se(e, Ue(e));\n if (typeof e == \"string\")\n return W(e);\n switch (e) {\n case O:\n return W(\"Suspense\");\n case p:\n return W(\"SuspenseList\");\n }\n if (typeof e == \"object\")\n switch (e.$$typeof) {\n case f:\n return Me(e.render);\n case h:\n return L(e.type, r, t);\n case E: {\n var n = e, o = n._payload, u = n._init;\n try {\n return L(u(o), r, t);\n } catch {\n }\n }\n }\n return \"\";\n }\n var k = Object.prototype.hasOwnProperty, le = {}, fe = C.ReactDebugCurrentFrame;\n function V(e) {\n if (e) {\n var r = e._owner, t = L(e.type, e._source, r ? r.type : null);\n fe.setExtraStackFrame(t);\n } else\n fe.setExtraStackFrame(null);\n }\n function Ne(e, r, t, n, o) {\n {\n var u = Function.call.bind(k);\n for (var i in e)\n if (u(e, i)) {\n var a = void 0;\n try {\n if (typeof e[i] != \"function\") {\n var d = Error((n || \"React class\") + \": \" + t + \" type `\" + i + \"` is invalid; it must be a function, usually from the `prop-types` package, but received `\" + typeof e[i] + \"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.\");\n throw d.name = \"Invariant Violation\", d;\n }\n a = e[i](r, i, n, t, null, \"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\");\n } catch (s) {\n a = s;\n }\n a && !(a instanceof Error) && (V(o), c(\"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).\", n || \"React class\", t, i, typeof a), V(null)), a instanceof Error && !(a.message in le) && (le[a.message] = !0, V(o), c(\"Failed %s type: %s\", t, a.message), V(null));\n }\n }\n }\n var qe = Array.isArray;\n function B(e) {\n return qe(e);\n }\n function Be(e) {\n {\n var r = typeof Symbol == \"function\" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || \"Object\";\n return t;\n }\n }\n function Je(e) {\n try {\n return ce(e), !1;\n } catch {\n return !0;\n }\n }\n function ce(e) {\n return \"\" + e;\n }\n function de(e) {\n if (Je(e))\n return c(\"The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.\", Be(e)), ce(e);\n }\n var ve = C.ReactCurrentOwner, Ke = {\n key: !0,\n ref: !0,\n __self: !0,\n __source: !0\n }, pe, ge;\n function Ge(e) {\n if (k.call(e, \"ref\")) {\n var r = Object.getOwnPropertyDescriptor(e, \"ref\").get;\n if (r && r.isReactWarning)\n return !1;\n }\n return e.ref !== void 0;\n }\n function ze(e) {\n if (k.call(e, \"key\")) {\n var r = Object.getOwnPropertyDescriptor(e, \"key\").get;\n if (r && r.isReactWarning)\n return !1;\n }\n return e.key !== void 0;\n }\n function Xe(e, r) {\n typeof e.ref == \"string\" && ve.current;\n }\n function He(e, r) {\n {\n var t = function() {\n pe || (pe = !0, c(\"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)\", r));\n };\n t.isReactWarning = !0, Object.defineProperty(e, \"key\", {\n get: t,\n configurable: !0\n });\n }\n }\n function Ze(e, r) {\n {\n var t = function() {\n ge || (ge = !0, c(\"%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)\", r));\n };\n t.isReactWarning = !0, Object.defineProperty(e, \"ref\", {\n get: t,\n configurable: !0\n });\n }\n }\n var Qe = function(e, r, t, n, o, u, i) {\n var a = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: _,\n // Built-in properties that belong on the element\n type: e,\n key: r,\n ref: t,\n props: i,\n // Record the component responsible for creating this element.\n _owner: u\n };\n return a._store = {}, Object.defineProperty(a._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: !1\n }), Object.defineProperty(a, \"_self\", {\n configurable: !1,\n enumerable: !1,\n writable: !1,\n value: n\n }), Object.defineProperty(a, \"_source\", {\n configurable: !1,\n enumerable: !1,\n writable: !1,\n value: o\n }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;\n };\n function er(e, r, t, n, o) {\n {\n var u, i = {}, a = null, d = null;\n t !== void 0 && (de(t), a = \"\" + t), ze(r) && (de(r.key), a = \"\" + r.key), Ge(r) && (d = r.ref, Xe(r, o));\n for (u in r)\n k.call(r, u) && !Ke.hasOwnProperty(u) && (i[u] = r[u]);\n if (e && e.defaultProps) {\n var s = e.defaultProps;\n for (u in s)\n i[u] === void 0 && (i[u] = s[u]);\n }\n if (a || d) {\n var l = typeof e == \"function\" ? e.displayName || e.name || \"Unknown\" : e;\n a && He(i, l), d && Ze(i, l);\n }\n return Qe(e, a, d, o, n, ve.current, i);\n }\n }\n var J = C.ReactCurrentOwner, he = C.ReactDebugCurrentFrame;\n function P(e) {\n if (e) {\n var r = e._owner, t = L(e.type, e._source, r ? r.type : null);\n he.setExtraStackFrame(t);\n } else\n he.setExtraStackFrame(null);\n }\n var K;\n K = !1;\n function G(e) {\n return typeof e == \"object\" && e !== null && e.$$typeof === _;\n }\n function _e() {\n {\n if (J.current) {\n var e = y(J.current.type);\n if (e)\n return `\n\nCheck the render method of \\`` + e + \"`.\";\n }\n return \"\";\n }\n }\n function rr(e) {\n return \"\";\n }\n var ye = {};\n function tr(e) {\n {\n var r = _e();\n if (!r) {\n var t = typeof e == \"string\" ? e : e.displayName || e.name;\n t && (r = `\n\nCheck the top-level render call using <` + t + \">.\");\n }\n return r;\n }\n }\n function be(e, r) {\n {\n if (!e._store || e._store.validated || e.key != null)\n return;\n e._store.validated = !0;\n var t = tr(r);\n if (ye[t])\n return;\n ye[t] = !0;\n var n = \"\";\n e && e._owner && e._owner !== J.current && (n = \" It was passed a child from \" + y(e._owner.type) + \".\"), P(e), c('Each child in a list should have a unique \"key\" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), P(null);\n }\n }\n function Ee(e, r) {\n {\n if (typeof e != \"object\")\n return;\n if (B(e))\n for (var t = 0; t < e.length; t++) {\n var n = e[t];\n G(n) && be(n, r);\n }\n else if (G(e))\n e._store && (e._store.validated = !0);\n else if (e) {\n var o = je(e);\n if (typeof o == \"function\" && o !== e.entries)\n for (var u = o.call(e), i; !(i = u.next()).done; )\n G(i.value) && be(i.value, r);\n }\n }\n }\n function nr(e) {\n {\n var r = e.type;\n if (r == null || typeof r == \"string\")\n return;\n var t;\n if (typeof r == \"function\")\n t = r.propTypes;\n else if (typeof r == \"object\" && (r.$$typeof === f || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n r.$$typeof === h))\n t = r.propTypes;\n else\n return;\n if (t) {\n var n = y(r);\n Ne(t, e.props, \"prop\", n, e);\n } else if (r.PropTypes !== void 0 && !K) {\n K = !0;\n var o = y(r);\n c(\"Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?\", o || \"Unknown\");\n }\n typeof r.getDefaultProps == \"function\" && !r.getDefaultProps.isReactClassApproved && c(\"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.\");\n }\n }\n function ar(e) {\n {\n for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {\n var n = r[t];\n if (n !== \"children\" && n !== \"key\") {\n P(e), c(\"Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.\", n), P(null);\n break;\n }\n }\n e.ref !== null && (P(e), c(\"Invalid attribute `ref` supplied to `React.Fragment`.\"), P(null));\n }\n }\n var Re = {};\n function me(e, r, t, n, o, u) {\n {\n var i = $e(e);\n if (!i) {\n var a = \"\";\n (e === void 0 || typeof e == \"object\" && e !== null && Object.keys(e).length === 0) && (a += \" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.\");\n var d = rr();\n d ? a += d : a += _e();\n var s;\n e === null ? s = \"null\" : B(e) ? s = \"array\" : e !== void 0 && e.$$typeof === _ ? (s = \"<\" + (y(e.type) || \"Unknown\") + \" />\", a = \" Did you accidentally export a JSX literal instead of a component?\") : s = typeof e, c(\"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s\", s, a);\n }\n var l = er(e, r, t, o, u);\n if (l == null)\n return l;\n if (i) {\n var g = r.children;\n if (g !== void 0)\n if (n)\n if (B(g)) {\n for (var S = 0; S < g.length; S++)\n Ee(g[S], e);\n Object.freeze && Object.freeze(g);\n } else\n c(\"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\");\n else\n Ee(g, e);\n }\n if (k.call(r, \"key\")) {\n var m = y(e), v = Object.keys(r).filter(function(fr) {\n return fr !== \"key\";\n }), z = v.length > 0 ? \"{key: someKey, \" + v.join(\": ..., \") + \": ...}\" : \"{key: someKey}\";\n if (!Re[m + z]) {\n var lr = v.length > 0 ? \"{\" + v.join(\": ..., \") + \": ...}\" : \"{}\";\n c(`A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />`, z, m, lr, m), Re[m + z] = !0;\n }\n }\n return e === T ? ar(l) : nr(l), l;\n }\n }\n function ir(e, r, t) {\n return me(e, r, t, !0);\n }\n function or(e, r, t) {\n return me(e, r, t, !1);\n }\n var ur = or, sr = ir;\n F.Fragment = T, F.jsx = ur, F.jsxs = sr;\n }()), F;\n}\nprocess.env.NODE_ENV === \"production\" ? X.exports = vr() : X.exports = pr();\nvar Ce = X.exports;\nconst gr = \"_dark_ikqby_1\", hr = \"_light_ikqby_250\", _r = {\n dark: gr,\n light: hr\n}, Se = cr(\"light\"), br = () => dr(Se), Er = ({ children: w, theme: _ = \"light\" }) => /* @__PURE__ */ Ce.jsx(Se.Provider, { value: _, children: /* @__PURE__ */ Ce.jsx(\"div\", { className: _r[_], children: w }) });\nexport {\n Er as ThemeProvider,\n br as useFondueTheme\n};\n"],"names":["X","D","Te","vr","w","Pe","_","T","A","I","j","b","p","h","E","$","F","pr","H","we","je","C","c","o","i","ke","De","Fe","Ae","Ie","Z","$e","We","Q","y","R","ae","ie","oe","Ye","Le","U","N","W","q","Y","Ve","v","a","d","l","g","S","m","Ue","L","k","le","V","Ne","qe","ce","de","ve","pe","ge","Ge","ze","Xe","He","Ze","Qe","he","P","G","_e","ye","be","Ee","ar","Re","me","z","lr","ir","or","Ce","gr","hr","_r","Se","cr","br","dr","Er"],"mappings":";AACA,IAAIA,IAAI,EAAE,SAAS,GAAI,GAAEC,IAAI,CAAE;AAC/B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,IAAIC;AACJ,SAASC,KAAK;AACZ,MAAID,GAAI,QAAOD;AACf,EAAAC,KAAK;AACL,MAAIE,IAAIC,IAAIC,IAAI,OAAO,IAAI,eAAe,GAAG,IAAI,OAAO,IAAI,gBAAgB,GAAGC,IAAI,OAAO,UAAU,gBAAgBC,IAAIJ,EAAE,mDAAmD,mBAAmBK,IAAI,EAAE,KAAK,IAAI,KAAK,IAAI,QAAQ,IAAI,UAAU,GAAI;AAClP,WAASC,EAAEC,GAAG,GAAG,GAAG;AAClB,QAAIC,GAAGC,IAAI,CAAA,GAAIC,IAAI,MAAMC,IAAI;AAC7B,UAAM,WAAWD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AAG7B,CAAC,IAAI,GAAGA,CAAC,GAAGA;AAAA,MACxC;AAAA,IACA;AACI,aAASkC,GAAG,GAAG,GAAG,GAAG;AACnB,aAAOH,GAAG,GAAG,GAAG,GAAG,EAAE;AAAA,IAC3B;AACI,aAASI,GAAG,GAAG,GAAG,GAAG;AACnB,aAAOJ,GAAG,GAAG,GAAG,GAAG,EAAE;AAAA,IAC3B;AACI,QAAI,KAAKI,IAAI,KAAKD;AAClB,IAAApE,EAAE,WAAWT,GAAGS,EAAE,MAAM,IAAIA,EAAE,OAAO;AAAA,EACtC,EAAA,IAAKA;AACR;AACA,QAAQ,IAAI,aAAa,eAAehB,EAAE,UAAUG,OAAOH,EAAE,UAAUiB,GAAI;AAC3E,IAAIqE,KAAKtF,EAAE;AACN,MAACuF,KAAK,iBAAiBC,KAAK,oBAAoBC,KAAK;AAAA,EACxD,MAAMF;AAAA,EACN,OAAOC;AACT,GAAGE,KAAKC,GAAG,OAAO,GAAGC,KAAK,MAAMC,GAAGH,EAAE,GAAGI,KAAK,CAAC,EAAE,UAAU1F,GAAG,OAAOE,IAAI,QAAS,MAAqB,gBAAAgF,GAAG,IAAII,GAAG,UAAU,EAAE,OAAOpF,GAAG,UAA0B,gBAAAgF,GAAG,IAAI,OAAO,EAAE,WAAWG,GAAGnF,CAAC,GAAG,UAAUF,EAAC,CAAE,EAAG,CAAA;"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
+
}
|
|
9
11
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
o as footer,
|
|
14
|
-
e as header,
|
|
15
|
-
r as sideContent,
|
|
16
|
-
_ as underlay
|
|
12
|
+
i as addAutoFocusAttribute,
|
|
13
|
+
a as addShowFocusRing,
|
|
14
|
+
s as syncRefs
|
|
17
15
|
};
|
|
18
16
|
//# sourceMappingURL=fondue-components38.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components38.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components38.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,63 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
+
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
|
+
};
|
|
60
9
|
export {
|
|
61
|
-
|
|
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
|
|
62
17
|
};
|
|
63
18
|
//# sourceMappingURL=fondue-components39.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components39.js","sources":[
|
|
1
|
+
{"version":3,"file":"fondue-components39.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as y } from "react";
|
|
3
|
-
import { cn as
|
|
4
|
-
import { buttonStyles as
|
|
5
|
-
import { iconStyles as
|
|
6
|
-
import { textStyles as
|
|
7
|
-
const
|
|
3
|
+
import { cn as x } from "./fondue-components27.js";
|
|
4
|
+
import { buttonStyles as S } from "./fondue-components28.js";
|
|
5
|
+
import { iconStyles as k } from "./fondue-components29.js";
|
|
6
|
+
import { textStyles as B } from "./fondue-components30.js";
|
|
7
|
+
const C = y(
|
|
8
8
|
({
|
|
9
|
-
children:
|
|
9
|
+
children: f,
|
|
10
10
|
type: d = "button",
|
|
11
11
|
variant: m,
|
|
12
12
|
size: e = "medium",
|
|
@@ -15,31 +15,32 @@ const B = y(
|
|
|
15
15
|
className: n = "",
|
|
16
16
|
onPress: o = () => {
|
|
17
17
|
},
|
|
18
|
+
hugWidth: a = !0,
|
|
18
19
|
...t
|
|
19
|
-
},
|
|
20
|
+
}, b) => /* @__PURE__ */ r(
|
|
20
21
|
"button",
|
|
21
22
|
{
|
|
22
|
-
ref:
|
|
23
|
+
ref: b,
|
|
23
24
|
type: d,
|
|
24
25
|
form: l,
|
|
25
26
|
"data-test-id": c,
|
|
26
|
-
className:
|
|
27
|
-
|
|
27
|
+
className: x(
|
|
28
|
+
S({ size: e, variant: m, hugWidth: a, ...t }),
|
|
29
|
+
B({ variant: m, ...t }),
|
|
28
30
|
k({ variant: m, ...t }),
|
|
29
|
-
S({ variant: m, ...t }),
|
|
30
31
|
n
|
|
31
32
|
),
|
|
32
33
|
...t,
|
|
33
34
|
onClick: (i) => {
|
|
34
|
-
var
|
|
35
|
-
(
|
|
35
|
+
var u;
|
|
36
|
+
(u = t.onClick) == null || u.call(t, i), o == null || o(i);
|
|
36
37
|
},
|
|
37
|
-
children:
|
|
38
|
+
children: f
|
|
38
39
|
}
|
|
39
40
|
)
|
|
40
41
|
);
|
|
41
|
-
|
|
42
|
+
C.displayName = "Button";
|
|
42
43
|
export {
|
|
43
|
-
|
|
44
|
+
C as Button
|
|
44
45
|
};
|
|
45
46
|
//# sourceMappingURL=fondue-components4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components4.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 ...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, ...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","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,GAAGC;AAAA,KAEPC,MAGI,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,KAAAD;AAAA,MACA,
|
|
1
|
+
{"version":3,"file":"fondue-components4.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,21 +1,63 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { sv as t } from "./fondue-components27.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"
|
|
15
58
|
}
|
|
16
|
-
|
|
17
|
-
}, [e]);
|
|
59
|
+
});
|
|
18
60
|
export {
|
|
19
|
-
|
|
61
|
+
i as dividerStyles
|
|
20
62
|
};
|
|
21
63
|
//# sourceMappingURL=fondue-components40.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components40.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"fondue-components40.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,20 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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]);
|
|
10
18
|
export {
|
|
11
|
-
|
|
12
|
-
u as default,
|
|
13
|
-
_ as group,
|
|
14
|
-
n as item,
|
|
15
|
-
r as slot,
|
|
16
|
-
t as subContent,
|
|
17
|
-
s as subMenuIndicator,
|
|
18
|
-
o as subTrigger
|
|
19
|
+
u as useProcessedChildren
|
|
19
20
|
};
|
|
20
21
|
//# sourceMappingURL=fondue-components41.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components41.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components41.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,8 +1,20 @@
|
|
|
1
|
-
const o = "
|
|
2
|
-
|
|
1
|
+
const t = "_content_r37cj_6", n = "_subContent_r37cj_7", o = "_item_r37cj_24", s = "_subTrigger_r37cj_25", c = "_subMenuIndicator_r37cj_110", _ = "_group_r37cj_116", r = "_slot_r37cj_123", e = {
|
|
2
|
+
content: t,
|
|
3
|
+
subContent: n,
|
|
4
|
+
item: o,
|
|
5
|
+
subTrigger: s,
|
|
6
|
+
subMenuIndicator: c,
|
|
7
|
+
group: _,
|
|
8
|
+
slot: r
|
|
3
9
|
};
|
|
4
10
|
export {
|
|
5
|
-
t as
|
|
6
|
-
|
|
11
|
+
t as content,
|
|
12
|
+
e as default,
|
|
13
|
+
_ as group,
|
|
14
|
+
o as item,
|
|
15
|
+
r as slot,
|
|
16
|
+
n as subContent,
|
|
17
|
+
c as subMenuIndicator,
|
|
18
|
+
s as subTrigger
|
|
7
19
|
};
|
|
8
20
|
//# sourceMappingURL=fondue-components42.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components42.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components42.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
const o = "
|
|
2
|
-
root: o
|
|
3
|
-
overlay: r,
|
|
4
|
-
header: e,
|
|
5
|
-
body: _,
|
|
6
|
-
footer: t,
|
|
7
|
-
close: s
|
|
1
|
+
const o = "_root_gh190_5", t = {
|
|
2
|
+
root: o
|
|
8
3
|
};
|
|
9
4
|
export {
|
|
10
|
-
|
|
11
|
-
s as close,
|
|
12
|
-
y as default,
|
|
13
|
-
t as footer,
|
|
14
|
-
e as header,
|
|
15
|
-
r as overlay,
|
|
5
|
+
t as default,
|
|
16
6
|
o as root
|
|
17
7
|
};
|
|
18
8
|
//# 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":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
const o = "
|
|
2
|
-
root: o
|
|
1
|
+
const o = "_root_4duv3_6", e = "_overlay_4duv3_50", _ = "_header_4duv3_67", t = "_body_4duv3_87", d = "_footer_4duv3_105", r = "_close_4duv3_125", s = {
|
|
2
|
+
root: o,
|
|
3
|
+
overlay: e,
|
|
4
|
+
header: _,
|
|
5
|
+
body: t,
|
|
6
|
+
footer: d,
|
|
7
|
+
close: r
|
|
3
8
|
};
|
|
4
9
|
export {
|
|
5
|
-
t as
|
|
10
|
+
t as body,
|
|
11
|
+
r as close,
|
|
12
|
+
s as default,
|
|
13
|
+
d as footer,
|
|
14
|
+
_ as header,
|
|
15
|
+
e as overlay,
|
|
6
16
|
o as root
|
|
7
17
|
};
|
|
8
18
|
//# sourceMappingURL=fondue-components44.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components44.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fondue-components44.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,38 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
36
|
-
|
|
5
|
+
t as default,
|
|
6
|
+
o as root
|
|
37
7
|
};
|
|
38
8
|
//# sourceMappingURL=fondue-components45.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fondue-components45.js","sources":[
|
|
1
|
+
{"version":3,"file":"fondue-components45.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|