@frontify/fondue-components 11.0.0 → 12.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 (63) hide show
  1. package/dist/fondue-components.js +31 -27
  2. package/dist/fondue-components.js.map +1 -1
  3. package/dist/fondue-components10.js +1 -1
  4. package/dist/fondue-components11.js +8 -8
  5. package/dist/fondue-components11.js.map +1 -1
  6. package/dist/fondue-components12.js +1 -1
  7. package/dist/fondue-components13.js +1 -1
  8. package/dist/fondue-components16.js +1 -1
  9. package/dist/fondue-components20.js +1 -1
  10. package/dist/fondue-components23.js +1 -1
  11. package/dist/fondue-components24.js +17 -17
  12. package/dist/fondue-components24.js.map +1 -1
  13. package/dist/fondue-components25.js +7 -32
  14. package/dist/fondue-components25.js.map +1 -1
  15. package/dist/fondue-components26.js +32 -5
  16. package/dist/fondue-components26.js.map +1 -1
  17. package/dist/fondue-components27.js +5 -12
  18. package/dist/fondue-components27.js.map +1 -1
  19. package/dist/fondue-components28.js +10 -153
  20. package/dist/fondue-components28.js.map +1 -1
  21. package/dist/fondue-components29.js +59 -22
  22. package/dist/fondue-components29.js.map +1 -1
  23. package/dist/fondue-components3.js +2 -2
  24. package/dist/fondue-components30.js +17 -17
  25. package/dist/fondue-components30.js.map +1 -1
  26. package/dist/fondue-components31.js +112 -15
  27. package/dist/fondue-components31.js.map +1 -1
  28. package/dist/fondue-components32.js +19 -30
  29. package/dist/fondue-components32.js.map +1 -1
  30. package/dist/fondue-components33.js +32 -37
  31. package/dist/fondue-components33.js.map +1 -1
  32. package/dist/fondue-components34.js +34 -127
  33. package/dist/fondue-components34.js.map +1 -1
  34. package/dist/fondue-components35.js +129 -20
  35. package/dist/fondue-components35.js.map +1 -1
  36. package/dist/fondue-components36.js +21 -45
  37. package/dist/fondue-components36.js.map +1 -1
  38. package/dist/fondue-components37.js +44 -632
  39. package/dist/fondue-components37.js.map +1 -1
  40. package/dist/fondue-components4.js +4 -4
  41. package/dist/fondue-components40.js +1 -1
  42. package/dist/fondue-components46.js +1 -1
  43. package/dist/fondue-components5.js +2 -2
  44. package/dist/fondue-components53.js +8 -8
  45. package/dist/fondue-components53.js.map +1 -1
  46. package/dist/fondue-components56.js +1 -1
  47. package/dist/fondue-components6.js +5 -5
  48. package/dist/fondue-components67.js +7 -2
  49. package/dist/fondue-components67.js.map +1 -1
  50. package/dist/fondue-components68.js +2 -15
  51. package/dist/fondue-components68.js.map +1 -1
  52. package/dist/fondue-components69.js +14 -38
  53. package/dist/fondue-components69.js.map +1 -1
  54. package/dist/fondue-components7.js +23 -23
  55. package/dist/fondue-components7.js.map +1 -1
  56. package/dist/fondue-components70.js +42 -0
  57. package/dist/fondue-components70.js.map +1 -0
  58. package/dist/fondue-components8.js +1 -1
  59. package/dist/fondue-components9.js +5 -5
  60. package/dist/fondue-components9.js.map +1 -1
  61. package/dist/index.d.ts +19 -0
  62. package/dist/style.css +1 -1
  63. package/package.json +4 -4
@@ -1 +1 @@
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,IAAI,KAAK,IAAI,EAAE,QAAQ,WAAWA,IAAI,KAAK,EAAE,MAAM,EAAE,QAAQ,W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G,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
+ {"version":3,"file":"fondue-components37.js","sources":["../src/components/ColorPicker/utils.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { type ColorFormat, type RgbaColor } from './types';\n\nexport const DEFAULT_COLOR = { red: 255, green: 255, blue: 255, alpha: 1, name: '' };\nexport const DEFAULT_FORMAT = 'HEX';\n\n/**\n * Converts a color object to a CSS color string.\n * @param {RgbaColor} color - The color object to be converted.\n * @returns {string}\n * @example\n * colorToCss({ red: 255, green: 255, blue: 255, alpha: 1 }); // 'rgba(255, 255, 255, 1)'\n * @example\n * colorToCss({ red: 255, green: 87, blue: 51, alpha: 1 }); // 'rgba(255, 87, 51, 1)'\n * @example\n * colorToCss({ red: 0, green: 0, blue: 0, alpha: 0 }); // 'rgba(0, 0, 0, 0)'\n */\nexport const colorToCss = (color?: RgbaColor) => {\n if (!color) {\n return undefined;\n }\n return `rgba(${color.red}, ${color.green}, ${color.blue}, ${color.alpha || 1})`;\n};\n\n/**\n * Checks if a string is a valid hexadecimal color code. This function accepts\n * both three-digit and six-digit hex codes without the '#' symbol.\n * @param {string} color - The color code to be checked.\n * @returns {boolean}\n * @example\n * isValidHexColor('FFF'); // true\n * @example\n * isValidHexColor('FF5733'); // true\n * @example\n * isValidHexColor('XYZ'); // false\n */\nexport const isValidHexColor = (color: string): boolean => {\n const hexRegex = /^([\\dA-Fa-f]{3}){1,2}$/;\n return color.length > 2 && hexRegex.test(color);\n};\n\n/**\n * Converts a hexadecimal color code to an RGBA color object. This function accepts\n * both three-digit and six-digit hex codes without the '#' symbol.\n * @param {string} hex - The hex code, either 3 or 6 characters long. Characters should be from the set [0-9A-Fa-f].\n * @returns {RgbaColor}\n * @example\n * hexColorToRgba('FFF'); // { red: 255, green: 255, blue: 255, alpha: 1 }\n * @example\n * hexColorToRgba('FF5733'); // { red: 255, green: 87, blue: 51, alpha: 1 }\n * @example\n * hexColorToRgba('XYZ'); // { red: 0, green: 0, blue: 0, alpha: 0 }\n */\nexport const hexColorToRgba = (hex: string): RgbaColor => {\n const hexRegex = /^([\\dA-Fa-f]{3}){1,2}$/;\n const matches = hex.match(hexRegex);\n if (!matches) {\n return {\n red: 0,\n green: 0,\n blue: 0,\n alpha: 0,\n };\n }\n const hexColor = matches[0];\n if (hexColor.length === 3) {\n return {\n red: parseInt(`${hexColor[0]}${hexColor[0]}`, 16),\n green: parseInt(`${hexColor[1]}${hexColor[1]}`, 16),\n blue: parseInt(`${hexColor[2]}${hexColor[2]}`, 16),\n alpha: 1,\n };\n }\n return {\n red: parseInt(hexColor.slice(0, 2), 16),\n green: parseInt(hexColor.slice(2, 4), 16),\n blue: parseInt(hexColor.slice(4, 6), 16),\n alpha: 1,\n };\n};\n\n/**\n * Converts an RGBA color object to a hexadecimal color code. This function returns a\n * six-digit hex code without the '#' symbol.\n * @param {RgbaColor} rgb - The RGBA color object.\n * @returns {string}\n * @example\n * rgbColorToHex({ red: 255, green: 255, blue: 255, alpha: 1 }); // '#FFFFFF'\n * @example\n * rgbColorToHex({ red: 255, green: 87, blue: 51, alpha: 1 }); // '#FF5733'\n * @example\n * rgbColorToHex({ red: 0, green: 0, blue: 0, alpha: 0 }); // '#000000'\n */\nexport const rgbColorToHex = (rgb: Omit<RgbaColor, 'alpha'>): string => {\n const { red, green, blue } = rgb;\n return `${red.toString(16).padStart(2, '0')}${green.toString(16).padStart(2, '0')}${blue.toString(16).padStart(2, '0')}`;\n};\n\n/**\n * Returns a color object with a name property based on the provided color and format.\n * @param {RgbaColor} color - The RGBA color object.\n * @param {ColorFormat} currentFormat - The current format of the color.\n * @returns {RgbaColor}\n * @example\n * getColorWithName({ red: 255, green: 255, blue: 255, alpha: 1 }, 'HEX'); // { red: 255, green: 255, blue: 255, alpha: 1, name: '#FFFFFF' }\n * @example\n * getColorWithName({ red: 255, green: 255, blue: 255, alpha: 1 }, 'RGBA'); // { red: 255, green: 255, blue: 255, alpha: 1, name: 'rgba(255, 255, 255, 1)' }\n * @example\n * getColorWithName({ red: 255, green: 87, blue: 51, alpha: 1 }, 'RGBA'); // { red: 255, green: 87, blue: 51, alpha: 1, name: 'rgba(255, 87, 51, 1)' }\n */\nexport const getColorWithName = (color: RgbaColor, currentFormat: ColorFormat) => {\n if (currentFormat === 'HEX') {\n return {\n ...color,\n name: `#${rgbColorToHex(color)}`,\n };\n }\n return {\n ...color,\n name: `rgba(${color.red}, ${color.green}, ${color.blue}, ${color.alpha || 1})`,\n };\n};\n\n/**\n * Returns a number between a minimum and maximum value, inclusive.\n * @param {string} value - The value to be limited.\n * @param {number} [min=0] - The minimum value (inclusive).\n * @param {number} [max=255] - The maximum value (inclusive).\n * @returns {number}\n * @example\n * getLimitedColorChannelValue('255'); // 255\n * @example\n * getLimitedColorChannelValue('100'); // 100\n * @example\n * getLimitedColorChannelValue('0'); // 0\n * @example\n * getLimitedColorChannelValue('500'); // 255\n * @example\n * getLimitedColorChannelValue('500', 0, 100); // 100\n */\nexport const getLimitedColorChannelValue = (value: string, min: number = 0, max: number = 255): number => {\n if (value.length === 0 || parseInt(value) < min) {\n return min;\n } else if (parseInt(value) > max) {\n return max;\n }\n return parseInt(value);\n};\n"],"names":["DEFAULT_COLOR","DEFAULT_FORMAT","colorToCss","color","isValidHexColor","hexRegex","hexColorToRgba","hex","matches","hexColor","rgbColorToHex","rgb","red","green","blue","getColorWithName","currentFormat","getLimitedColorChannelValue","value","min","max"],"mappings":"AAIa,MAAAA,IAAgB,EAAE,KAAK,KAAK,OAAO,KAAK,MAAM,KAAK,OAAO,GAAG,MAAM,GAAG,GACtEC,IAAiB,OAajBC,IAAa,CAACC,MAAsB;AAC7C,MAAKA;AAGL,WAAO,QAAQA,EAAM,GAAG,KAAKA,EAAM,KAAK,KAAKA,EAAM,IAAI,KAAKA,EAAM,SAAS,CAAC;AAChF,GAcaC,IAAkB,CAACD,MAA2B;AACvD,QAAME,IAAW;AACjB,SAAOF,EAAM,SAAS,KAAKE,EAAS,KAAKF,CAAK;AAClD,GAcaG,IAAiB,CAACC,MAA2B;AACtD,QAAMF,IAAW,0BACXG,IAAUD,EAAI,MAAMF,CAAQ;AAClC,MAAI,CAACG;AACM,WAAA;AAAA,MACH,KAAK;AAAA,MACL,OAAO;AAAA,MACP,MAAM;AAAA,MACN,OAAO;AAAA,IACX;AAEE,QAAAC,IAAWD,EAAQ,CAAC;AACtB,SAAAC,EAAS,WAAW,IACb;AAAA,IACH,KAAK,SAAS,GAAGA,EAAS,CAAC,CAAC,GAAGA,EAAS,CAAC,CAAC,IAAI,EAAE;AAAA,IAChD,OAAO,SAAS,GAAGA,EAAS,CAAC,CAAC,GAAGA,EAAS,CAAC,CAAC,IAAI,EAAE;AAAA,IAClD,MAAM,SAAS,GAAGA,EAAS,CAAC,CAAC,GAAGA,EAAS,CAAC,CAAC,IAAI,EAAE;AAAA,IACjD,OAAO;AAAA,EACX,IAEG;AAAA,IACH,KAAK,SAASA,EAAS,MAAM,GAAG,CAAC,GAAG,EAAE;AAAA,IACtC,OAAO,SAASA,EAAS,MAAM,GAAG,CAAC,GAAG,EAAE;AAAA,IACxC,MAAM,SAASA,EAAS,MAAM,GAAG,CAAC,GAAG,EAAE;AAAA,IACvC,OAAO;AAAA,EACX;AACJ,GAcaC,IAAgB,CAACC,MAA0C;AACpE,QAAM,EAAE,KAAAC,GAAK,OAAAC,GAAO,MAAAC,EAAS,IAAAH;AACtB,SAAA,GAAGC,EAAI,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,GAAGC,EAAM,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,GAAGC,EAAK,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC;AAC1H,GAcaC,IAAmB,CAACZ,GAAkBa,MAC3CA,MAAkB,QACX;AAAA,EACH,GAAGb;AAAA,EACH,MAAM,IAAIO,EAAcP,CAAK,CAAC;AAClC,IAEG;AAAA,EACH,GAAGA;AAAA,EACH,MAAM,QAAQA,EAAM,GAAG,KAAKA,EAAM,KAAK,KAAKA,EAAM,IAAI,KAAKA,EAAM,SAAS,CAAC;AAC/E,GAoBSc,IAA8B,CAACC,GAAeC,IAAc,GAAGC,IAAc,QAClFF,EAAM,WAAW,KAAK,SAASA,CAAK,IAAIC,IACjCA,IACA,SAASD,CAAK,IAAIE,IAClBA,IAEJ,SAASF,CAAK;"}
@@ -1,9 +1,9 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { forwardRef as y } from "react";
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";
3
+ import { cn as x } from "./fondue-components28.js";
4
+ import { buttonStyles as S } from "./fondue-components29.js";
5
+ import { iconStyles as k } from "./fondue-components30.js";
6
+ import { textStyles as B } from "./fondue-components31.js";
7
7
  const C = y(
8
8
  ({
9
9
  children: f,
@@ -1,4 +1,4 @@
1
- import { sv as t } from "./fondue-components27.js";
1
+ import { sv as t } from "./fondue-components28.js";
2
2
  const i = t({
3
3
  base: "tw-flex tw-self-stretch tw-justify-center ",
4
4
  variants: {
@@ -1,4 +1,4 @@
1
- import { sv as t } from "./fondue-components27.js";
1
+ import { sv as t } from "./fondue-components28.js";
2
2
  const i = t({
3
3
  base: "tw-relative tw-w-full tw-overflow-hidden",
4
4
  variants: {
@@ -2,8 +2,8 @@ import { jsx as t, jsxs as s } from "react/jsx-runtime";
2
2
  import { IconMinus as m, IconCheckMark as h } from "@frontify/fondue-icons";
3
3
  import * as o from "@radix-ui/react-checkbox";
4
4
  import { forwardRef as k } from "react";
5
- import { cn as p } from "./fondue-components27.js";
6
- import { checkboxStyles as l, checkboxIndicatorStyles as w } from "./fondue-components31.js";
5
+ import { cn as p } from "./fondue-components28.js";
6
+ import { checkboxStyles as l, checkboxIndicatorStyles as w } from "./fondue-components32.js";
7
7
  const f = ({
8
8
  className: a,
9
9
  value: c,
@@ -1,10 +1,10 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { useFondueTheme as g, ThemeProvider as C } from "./fondue-components37.js";
3
2
  import * as s from "@radix-ui/react-popover";
4
- import { Slot as N } from "@radix-ui/react-slot";
5
- import { isValidElement as O } from "react";
3
+ import { Slot as g } from "@radix-ui/react-slot";
4
+ import { isValidElement as C } from "react";
5
+ import { useFondueTheme as N, ThemeProvider as O } from "./fondue-components25.js";
6
6
  import n from "./fondue-components55.js";
7
- import { recursiveMap as V, getSelectOptionValue as F } from "./fondue-components69.js";
7
+ import { recursiveMap as V, getSelectOptionValue as F } from "./fondue-components70.js";
8
8
  const M = ({
9
9
  highlightedIndex: l,
10
10
  getMenuProps: m,
@@ -18,8 +18,8 @@ const M = ({
18
18
  }) => {
19
19
  const v = (e) => {
20
20
  e.preventDefault();
21
- }, P = g();
22
- return /* @__PURE__ */ r(s.Portal, { children: /* @__PURE__ */ r(C, { theme: P, children: /* @__PURE__ */ r(
21
+ }, P = N();
22
+ return /* @__PURE__ */ r(s.Portal, { children: /* @__PURE__ */ r(O, { theme: P, children: /* @__PURE__ */ r(
23
23
  s.Content,
24
24
  {
25
25
  align: d,
@@ -39,7 +39,7 @@ const M = ({
39
39
  (e, i) => {
40
40
  if (((o) => (
41
41
  // @ts-expect-error - We are explicitly checking for ref
42
- O(o) && o.ref !== void 0
42
+ C(o) && o.ref !== void 0
43
43
  ))(e)) {
44
44
  const o = F(e.props), a = p({
45
45
  item: o,
@@ -47,7 +47,7 @@ const M = ({
47
47
  ...e.ref ? { ref: e.ref } : {}
48
48
  });
49
49
  return /* @__PURE__ */ r(
50
- N,
50
+ g,
51
51
  {
52
52
  className: n.item,
53
53
  "data-highlighted": l === i,
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components53.js","sources":["../src/components/Select/SelectMenu.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { ThemeProvider, useFondueTheme } from '@frontify/fondue-tokens/theme-provider';\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { Slot as RadixSlot } from '@radix-ui/react-slot';\nimport { type UseComboboxPropGetters, type UseSelectPropGetters } from 'downshift';\nimport { isValidElement, type ForwardedRef, type MouseEvent, type ReactElement, type ReactNode } from 'react';\n\nimport { type SelectItemProps } from './SelectItem';\nimport styles from './styles/select.module.scss';\nimport { getSelectOptionValue, recursiveMap } from './utils';\n\nexport type SelectMenuProps = {\n /**\n * @internal\n * The index of the highlighted item in the menu.\n */\n highlightedIndex: number;\n /**\n * @internal\n * Callback function to retrieve the props for a menu element.\n */\n getMenuProps: UseSelectPropGetters<unknown>['getMenuProps'] | UseComboboxPropGetters<unknown>['getMenuProps'];\n /**\n * @internal\n * Callback function to retrieve the props for a item element.\n */\n getItemProps: UseSelectPropGetters<unknown>['getItemProps'] | UseComboboxPropGetters<unknown>['getItemProps'];\n /**\n * @internal\n * The children of the menu component. This can contain multiple `Select.Item` or `Select.Group` components.\n */\n children: ReactNode;\n /**\n * @internal\n * The filter text shown in the combobox input element.\n */\n filterText?: string;\n /**\n * @internal\n * The alignment of the menu.\n */\n align: 'start' | 'center' | 'end';\n /**\n * @internal\n * Defines the preferred side of the select. It will not be respected if there are collisions with the viewport.\n * @default \"bottom\"\n */\n side: 'left' | 'right' | 'bottom' | 'top';\n /**\n * @internal\n * The type of the menu.\n */\n selectedItem?: {\n value: string;\n } | null;\n /**\n * @internal\n * A boolean to indicate if highlighted item was changed since opening the menu.\n * This is used to determine the style of the selected/highlighted item.\n */\n hasInteractedSinceOpening?: boolean;\n};\n\nexport const SelectMenu = ({\n highlightedIndex,\n getMenuProps,\n getItemProps,\n children,\n filterText,\n align,\n side,\n selectedItem,\n hasInteractedSinceOpening,\n}: SelectMenuProps) => {\n const handleOnOpenAutoFocus = (event: Event) => {\n event.preventDefault();\n };\n\n const theme = useFondueTheme();\n return (\n <RadixPopover.Portal>\n <ThemeProvider theme={theme}>\n <RadixPopover.Content\n align={align}\n side={side}\n collisionPadding={16}\n onOpenAutoFocus={handleOnOpenAutoFocus}\n className={styles.portal}\n >\n <ul\n className={styles.menu}\n {...getMenuProps()}\n data-has-interacted={hasInteractedSinceOpening ? 'true' : 'false'}\n data-test-id=\"fondue-select-menu\"\n >\n {\n recursiveMap(\n children,\n (child, index) => {\n const isValid = <TProps,>(\n child: ReactNode,\n ): child is ReactElement<TProps> & { ref: ForwardedRef<HTMLElement> } =>\n // @ts-expect-error - We are explicitly checking for ref\n isValidElement<TProps>(child) && child.ref !== undefined;\n\n if (isValid<SelectItemProps>(child)) {\n const optionData = getSelectOptionValue(child.props);\n const itemProps = getItemProps({\n item: optionData,\n index,\n ...(child.ref ? { ref: child.ref } : {}),\n });\n\n return (\n <RadixSlot\n className={styles.item}\n data-highlighted={highlightedIndex === index}\n data-selected={selectedItem?.value === optionData.value}\n key={child.props.value}\n // Workaround for the issue where the onClick event is not fired on touch devices because of portal usage\n onTouchStart={(event) => {\n if (itemProps.onClick) {\n itemProps.onClick(event as unknown as MouseEvent<HTMLElement>);\n }\n }}\n {...itemProps}\n >\n {child}\n </RadixSlot>\n );\n }\n },\n filterText,\n ).parsedChildren\n }\n </ul>\n </RadixPopover.Content>\n </ThemeProvider>\n </RadixPopover.Portal>\n );\n};\nSelectMenu.displayName = 'Select.Menu';\n"],"names":["SelectMenu","highlightedIndex","getMenuProps","getItemProps","children","filterText","align","side","selectedItem","hasInteractedSinceOpening","handleOnOpenAutoFocus","event","theme","useFondueTheme","RadixPopover","jsx","ThemeProvider","styles","recursiveMap","child","index","isValidElement","optionData","getSelectOptionValue","itemProps","RadixSlot"],"mappings":";;;;;;;AAgEO,MAAMA,IAAa,CAAC;AAAA,EACvB,kBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,2BAAAC;AACJ,MAAuB;AACb,QAAAC,IAAwB,CAACC,MAAiB;AAC5C,IAAAA,EAAM,eAAe;AAAA,EACzB,GAEMC,IAAQC,EAAe;AAC7B,2BACKC,EAAa,QAAb,EACG,UAAA,gBAAAC,EAACC,KAAc,OAAAJ,GACX,UAAA,gBAAAG;AAAA,IAACD,EAAa;AAAA,IAAb;AAAA,MACG,OAAAR;AAAA,MACA,MAAAC;AAAA,MACA,kBAAkB;AAAA,MAClB,iBAAiBG;AAAA,MACjB,WAAWO,EAAO;AAAA,MAElB,UAAA,gBAAAF;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,WAAWE,EAAO;AAAA,UACjB,GAAGf,EAAa;AAAA,UACjB,uBAAqBO,IAA4B,SAAS;AAAA,UAC1D,gBAAa;AAAA,UAGT,UAAAS;AAAA,YACId;AAAA,YACA,CAACe,GAAOC,MAAU;AAOV,mBANY,CACZD;AAAAA;AAAAA,gBAGAE,EAAuBF,CAAK,KAAKA,EAAM,QAAQ;AAAA,iBAEtBA,CAAK,GAAG;AAC3B,sBAAAG,IAAaC,EAAqBJ,EAAM,KAAK,GAC7CK,IAAYrB,EAAa;AAAA,kBAC3B,MAAMmB;AAAA,kBACN,OAAAF;AAAA,kBACA,GAAID,EAAM,MAAM,EAAE,KAAKA,EAAM,IAAA,IAAQ,CAAA;AAAA,gBAAC,CACzC;AAGG,uBAAA,gBAAAJ;AAAA,kBAACU;AAAAA,kBAAA;AAAA,oBACG,WAAWR,EAAO;AAAA,oBAClB,oBAAkBhB,MAAqBmB;AAAA,oBACvC,kBAAeZ,KAAA,gBAAAA,EAAc,WAAUc,EAAW;AAAA,oBAGlD,cAAc,CAACX,MAAU;AACrB,sBAAIa,EAAU,WACVA,EAAU,QAAQb,CAA2C;AAAA,oBAErE;AAAA,oBACC,GAAGa;AAAA,oBAEH,UAAAL;AAAA,kBAAA;AAAA,kBATIA,EAAM,MAAM;AAAA,gBAUrB;AAAA,cAAA;AAAA,YAGZ;AAAA,YACAd;AAAA,UAAA,EACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAEV;AAAA,KAER,EACJ,CAAA;AAER;AACAL,EAAW,cAAc;"}
1
+ {"version":3,"file":"fondue-components53.js","sources":["../src/components/Select/SelectMenu.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport * as RadixPopover from '@radix-ui/react-popover';\nimport { Slot as RadixSlot } from '@radix-ui/react-slot';\nimport { type UseComboboxPropGetters, type UseSelectPropGetters } from 'downshift';\nimport { isValidElement, type ForwardedRef, type MouseEvent, type ReactElement, type ReactNode } from 'react';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport { type SelectItemProps } from './SelectItem';\nimport styles from './styles/select.module.scss';\nimport { getSelectOptionValue, recursiveMap } from './utils';\n\nexport type SelectMenuProps = {\n /**\n * @internal\n * The index of the highlighted item in the menu.\n */\n highlightedIndex: number;\n /**\n * @internal\n * Callback function to retrieve the props for a menu element.\n */\n getMenuProps: UseSelectPropGetters<unknown>['getMenuProps'] | UseComboboxPropGetters<unknown>['getMenuProps'];\n /**\n * @internal\n * Callback function to retrieve the props for a item element.\n */\n getItemProps: UseSelectPropGetters<unknown>['getItemProps'] | UseComboboxPropGetters<unknown>['getItemProps'];\n /**\n * @internal\n * The children of the menu component. This can contain multiple `Select.Item` or `Select.Group` components.\n */\n children: ReactNode;\n /**\n * @internal\n * The filter text shown in the combobox input element.\n */\n filterText?: string;\n /**\n * @internal\n * The alignment of the menu.\n */\n align: 'start' | 'center' | 'end';\n /**\n * @internal\n * Defines the preferred side of the select. It will not be respected if there are collisions with the viewport.\n * @default \"bottom\"\n */\n side: 'left' | 'right' | 'bottom' | 'top';\n /**\n * @internal\n * The type of the menu.\n */\n selectedItem?: {\n value: string;\n } | null;\n /**\n * @internal\n * A boolean to indicate if highlighted item was changed since opening the menu.\n * This is used to determine the style of the selected/highlighted item.\n */\n hasInteractedSinceOpening?: boolean;\n};\n\nexport const SelectMenu = ({\n highlightedIndex,\n getMenuProps,\n getItemProps,\n children,\n filterText,\n align,\n side,\n selectedItem,\n hasInteractedSinceOpening,\n}: SelectMenuProps) => {\n const handleOnOpenAutoFocus = (event: Event) => {\n event.preventDefault();\n };\n\n const theme = useFondueTheme();\n return (\n <RadixPopover.Portal>\n <ThemeProvider theme={theme}>\n <RadixPopover.Content\n align={align}\n side={side}\n collisionPadding={16}\n onOpenAutoFocus={handleOnOpenAutoFocus}\n className={styles.portal}\n >\n <ul\n className={styles.menu}\n {...getMenuProps()}\n data-has-interacted={hasInteractedSinceOpening ? 'true' : 'false'}\n data-test-id=\"fondue-select-menu\"\n >\n {\n recursiveMap(\n children,\n (child, index) => {\n const isValid = <TProps,>(\n child: ReactNode,\n ): child is ReactElement<TProps> & { ref: ForwardedRef<HTMLElement> } =>\n // @ts-expect-error - We are explicitly checking for ref\n isValidElement<TProps>(child) && child.ref !== undefined;\n\n if (isValid<SelectItemProps>(child)) {\n const optionData = getSelectOptionValue(child.props);\n const itemProps = getItemProps({\n item: optionData,\n index,\n ...(child.ref ? { ref: child.ref } : {}),\n });\n\n return (\n <RadixSlot\n className={styles.item}\n data-highlighted={highlightedIndex === index}\n data-selected={selectedItem?.value === optionData.value}\n key={child.props.value}\n // Workaround for the issue where the onClick event is not fired on touch devices because of portal usage\n onTouchStart={(event) => {\n if (itemProps.onClick) {\n itemProps.onClick(event as unknown as MouseEvent<HTMLElement>);\n }\n }}\n {...itemProps}\n >\n {child}\n </RadixSlot>\n );\n }\n },\n filterText,\n ).parsedChildren\n }\n </ul>\n </RadixPopover.Content>\n </ThemeProvider>\n </RadixPopover.Portal>\n );\n};\nSelectMenu.displayName = 'Select.Menu';\n"],"names":["SelectMenu","highlightedIndex","getMenuProps","getItemProps","children","filterText","align","side","selectedItem","hasInteractedSinceOpening","handleOnOpenAutoFocus","event","theme","useFondueTheme","RadixPopover","jsx","ThemeProvider","styles","recursiveMap","child","index","isValidElement","optionData","getSelectOptionValue","itemProps","RadixSlot"],"mappings":";;;;;;;AAiEO,MAAMA,IAAa,CAAC;AAAA,EACvB,kBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,2BAAAC;AACJ,MAAuB;AACb,QAAAC,IAAwB,CAACC,MAAiB;AAC5C,IAAAA,EAAM,eAAe;AAAA,EACzB,GAEMC,IAAQC,EAAe;AAC7B,2BACKC,EAAa,QAAb,EACG,UAAA,gBAAAC,EAACC,KAAc,OAAAJ,GACX,UAAA,gBAAAG;AAAA,IAACD,EAAa;AAAA,IAAb;AAAA,MACG,OAAAR;AAAA,MACA,MAAAC;AAAA,MACA,kBAAkB;AAAA,MAClB,iBAAiBG;AAAA,MACjB,WAAWO,EAAO;AAAA,MAElB,UAAA,gBAAAF;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,WAAWE,EAAO;AAAA,UACjB,GAAGf,EAAa;AAAA,UACjB,uBAAqBO,IAA4B,SAAS;AAAA,UAC1D,gBAAa;AAAA,UAGT,UAAAS;AAAA,YACId;AAAA,YACA,CAACe,GAAOC,MAAU;AAOV,mBANY,CACZD;AAAAA;AAAAA,gBAGAE,EAAuBF,CAAK,KAAKA,EAAM,QAAQ;AAAA,iBAEtBA,CAAK,GAAG;AAC3B,sBAAAG,IAAaC,EAAqBJ,EAAM,KAAK,GAC7CK,IAAYrB,EAAa;AAAA,kBAC3B,MAAMmB;AAAA,kBACN,OAAAF;AAAA,kBACA,GAAID,EAAM,MAAM,EAAE,KAAKA,EAAM,IAAA,IAAQ,CAAA;AAAA,gBAAC,CACzC;AAGG,uBAAA,gBAAAJ;AAAA,kBAACU;AAAAA,kBAAA;AAAA,oBACG,WAAWR,EAAO;AAAA,oBAClB,oBAAkBhB,MAAqBmB;AAAA,oBACvC,kBAAeZ,KAAA,gBAAAA,EAAc,WAAUc,EAAW;AAAA,oBAGlD,cAAc,CAACX,MAAU;AACrB,sBAAIa,EAAU,WACVA,EAAU,QAAQb,CAA2C;AAAA,oBAErE;AAAA,oBACC,GAAGa;AAAA,oBAEH,UAAAL;AAAA,kBAAA;AAAA,kBATIA,EAAM,MAAM;AAAA,gBAUrB;AAAA,cAAA;AAAA,YAGZ;AAAA,YACAd;AAAA,UAAA,EACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAEV;AAAA,KAER,EACJ,CAAA;AAER;AACAL,EAAW,cAAc;"}
@@ -3,7 +3,7 @@ import { IconCross as x } from "@frontify/fondue-icons";
3
3
  import { useState as B, useMemo as i, Children as f, isValidElement as u, cloneElement as E, useCallback as F } from "react";
4
4
  import { ForwardedRefSelectItem as I } from "./fondue-components52.js";
5
5
  import { ForwardedRefSelectSlot as c } from "./fondue-components54.js";
6
- import { getSelectOptionValue as R } from "./fondue-components69.js";
6
+ import { getSelectOptionValue as R } from "./fondue-components70.js";
7
7
  const S = (r) => {
8
8
  const t = [];
9
9
  return f.forEach(r, (o) => {
@@ -1,11 +1,11 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { Slot as u } from "@radix-ui/react-slot";
3
3
  import { forwardRef as k, useState as R, Children as P } from "react";
4
- import { ForwardedRefColorGradientInput as F } from "./fondue-components32.js";
5
- import { ForwardedRefColorPickerInput as y } from "./fondue-components33.js";
6
- import { ForwardedRefColorValueInput as N } from "./fondue-components34.js";
7
- import I from "./fondue-components35.js";
8
- import { getColorWithName as d, DEFAULT_COLOR as w, DEFAULT_FORMAT as h } from "./fondue-components36.js";
4
+ import { ForwardedRefColorGradientInput as F } from "./fondue-components33.js";
5
+ import { ForwardedRefColorPickerInput as y } from "./fondue-components34.js";
6
+ import { ForwardedRefColorValueInput as N } from "./fondue-components35.js";
7
+ import I from "./fondue-components36.js";
8
+ import { getColorWithName as d, DEFAULT_COLOR as w, DEFAULT_FORMAT as h } from "./fondue-components37.js";
9
9
  const m = ({
10
10
  children: t,
11
11
  currentColor: o = w,
@@ -1,5 +1,10 @@
1
- const t = "focus-visible:tw-outline has-[[data-show-focus-ring=true]]:tw-outline tw-outline-4 tw-outline-offset-2 tw-outline-blue focus-visible:tw-outline-blue";
1
+ const t = "_dark_ikqby_1", s = "_light_ikqby_250", _ = {
2
+ dark: t,
3
+ light: s
4
+ };
2
5
  export {
3
- t as FOCUS_OUTLINE
6
+ t as dark,
7
+ _ as default,
8
+ s as light
4
9
  };
5
10
  //# sourceMappingURL=fondue-components67.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components67.js","sources":["../src/utilities/focusStyle.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nexport const FOCUS_OUTLINE =\n 'focus-visible:tw-outline has-[[data-show-focus-ring=true]]:tw-outline tw-outline-4 tw-outline-offset-2 tw-outline-blue focus-visible:tw-outline-blue'; // second declaration of tw-outline-blue is to assure that in firefox the outline isn't overriden by a global definition of :-moz-focusring which is coming from tailwinds normalization styling\n"],"names":["FOCUS_OUTLINE"],"mappings":"AAEO,MAAMA,IACT;"}
1
+ {"version":3,"file":"fondue-components67.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,18 +1,5 @@
1
- const o = "_root_1nv86_5", t = "_button_1nv86_56", c = "_colorIndicator_1nv86_69", n = "_actions_1nv86_75", _ = "_clear_1nv86_85", r = "_caret_1nv86_98", a = {
2
- root: o,
3
- button: t,
4
- colorIndicator: c,
5
- actions: n,
6
- clear: _,
7
- caret: r
8
- };
1
+ const t = "focus-visible:tw-outline has-[[data-show-focus-ring=true]]:tw-outline tw-outline-4 tw-outline-offset-2 tw-outline-blue focus-visible:tw-outline-blue";
9
2
  export {
10
- n as actions,
11
- t as button,
12
- r as caret,
13
- _ as clear,
14
- c as colorIndicator,
15
- a as default,
16
- o as root
3
+ t as FOCUS_OUTLINE
17
4
  };
18
5
  //# sourceMappingURL=fondue-components68.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components68.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"fondue-components68.js","sources":["../src/utilities/focusStyle.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nexport const FOCUS_OUTLINE =\n 'focus-visible:tw-outline has-[[data-show-focus-ring=true]]:tw-outline tw-outline-4 tw-outline-offset-2 tw-outline-blue focus-visible:tw-outline-blue'; // second declaration of tw-outline-blue is to assure that in firefox the outline isn't overriden by a global definition of :-moz-focusring which is coming from tailwinds normalization styling\n"],"names":["FOCUS_OUTLINE"],"mappings":"AAEO,MAAMA,IACT;"}
@@ -1,42 +1,18 @@
1
- import { Children as a, isValidElement as u, cloneElement as f } from "react";
2
- import { ForwardedRefSelectItem as E } from "./fondue-components52.js";
3
- const g = ({
4
- children: r,
5
- value: o,
6
- label: s
7
- }) => r && typeof r == "string" ? {
8
- value: o || r,
9
- label: s || r
10
- } : {
11
- value: o || "",
12
- label: s || o || ""
13
- }, w = (r, o) => u(r) && r.type === o, y = (r, o, s, p = 0) => {
14
- const n = [];
15
- let t = 0;
16
- return a.forEach(r, (e) => {
17
- if (w(e, E) && u(e))
18
- g(e.props).label.toLowerCase().includes((s == null ? void 0 : s.toLowerCase()) || "") && (n.push(o(e, p + t)), t++);
19
- else if (u(e) && (e != null && e.props.children)) {
20
- const { parsedChildren: m, subElementCount: C } = y(
21
- e.props.children,
22
- o,
23
- "",
24
- p + t
25
- );
26
- e = f(e, {
27
- children: m,
28
- key: `group-${p + t}`
29
- }), n.push(e), t += C;
30
- } else
31
- n.push(e);
32
- }), {
33
- parsedChildren: n,
34
- subElementCount: t
35
- };
1
+ const o = "_root_1nv86_5", t = "_button_1nv86_56", c = "_colorIndicator_1nv86_69", n = "_actions_1nv86_75", _ = "_clear_1nv86_85", r = "_caret_1nv86_98", a = {
2
+ root: o,
3
+ button: t,
4
+ colorIndicator: c,
5
+ actions: n,
6
+ clear: _,
7
+ caret: r
36
8
  };
37
9
  export {
38
- g as getSelectOptionValue,
39
- w as isReactLeaf,
40
- y as recursiveMap
10
+ n as actions,
11
+ t as button,
12
+ r as caret,
13
+ _ as clear,
14
+ c as colorIndicator,
15
+ a as default,
16
+ o as root
41
17
  };
42
18
  //# sourceMappingURL=fondue-components69.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components69.js","sources":["../src/components/Select/utils.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport {\n Children,\n cloneElement,\n isValidElement,\n type JSXElementConstructor,\n type ReactElement,\n type ReactNode,\n} from 'react';\n\nimport { ForwardedRefSelectItem, type SelectItemProps } from './SelectItem';\n\n/**\n * Extracts and returns an object containing `value` and `label` from a given SelectItemProps object.\n * It prioritizes explicit `value` and `label` properties but will fall back to using `children` as the value or label if necessary.\n *\n * @param {SelectItemProps} props - The properties of a select item, which include potential children, value, and label.\n * @returns {{ value: string; label: string }} An object containing `value` and `label` as strings.\n *\n * @example\n * // Returns { value: 'option1', label: 'Option 1' }\n * getSelectOptionValue({ value: 'option1', label: 'Option 1' });\n *\n * @example\n * // Uses children as the value and label when they are not explicitly provided\n * // Returns { value: 'Default', label: 'Default' }\n * getSelectOptionValue({ children: 'Default' });\n */\nexport const getSelectOptionValue = ({\n children,\n value,\n label,\n}: SelectItemProps): {\n value: string;\n label: string;\n} => {\n if (children && typeof children === 'string') {\n return {\n value: value ? value : children,\n label: label ? label : children,\n };\n }\n\n return {\n value: value || '',\n label: label ? label : value || '',\n };\n};\n/**\n * Determines if the child is a leaf node of React, meaning it has one final child of a native type;\n *\n * @param {ReactNode} child - The React child node to check.\n * @param {JSXElementConstructor<never>} Component - The React component constructor used for comparison.\n * @returns {boolean} Returns true if the `child` is a valid React element of the specified `Component` type.\n *\n * @example\n * // Assuming ForwardedRefSelectItem is a component that renders an <input> element\n * // Returns true\n * isReactLeaf(<ForwardedRefSelectItem />, ForwardedRefSelectItem);\n *\n * @example\n * // Returns false for non-matching types or non-leaf components\n * isReactLeaf(<div><ForwardedRefSelectItem /></div>, ForwardedRefSelectItem);\n */\nexport const isReactLeaf = (child: ReactNode, Component: JSXElementConstructor<never>): child is ReactElement =>\n isValidElement(child) && child.type === Component;\n\n/**\n * Recursively maps through React children, applying a callback to each child that meets the specified conditions.\n * This function is useful for deeply nested structures where modifications or checks are needed at multiple levels.\n *\n * @param {ReactNode} children - The children to be recursively processed.\n * @param {function(ReactNode, number): ReactNode} callback - A function that is called for each child that meets the condition. It receives the child and its index, and returns a React node.\n * @param {string} [filterText=''] - Optional text used to filter children based on their properties.\n * @param {number} [nextIndex=0] - The starting index for numbering children, defaults to 0.\n * @returns {{ parsedChildren: ReactNode[], subElementCount: number }} An object containing the transformed children array and the count of all processed sub-elements.\n *\n * @example\n * // Example usage in a select component where only items containing a certain text are modified\n * recursiveMap(children, (child, index) => React.cloneElement(child, { extraProp: 'value' }), 'specific text');\n *\n * @example\n * // Nested structure transformation, adding class names based on index\n * recursiveMap(children, (child, index) => React.cloneElement(child, { className: `item-${index}` }));\n */\nexport const recursiveMap = (\n children: ReactNode,\n callback: (child: ReactNode, nextIndex: number) => ReactNode,\n filterText?: string,\n nextIndex: number = 0,\n): {\n parsedChildren: ReactNode[];\n subElementCount: number;\n} => {\n const resultingChildren: ReactNode[] = [];\n let itemCounter = 0;\n Children.forEach(children, (child) => {\n if (isReactLeaf(child, ForwardedRefSelectItem) && isValidElement<SelectItemProps>(child)) {\n if (\n getSelectOptionValue(child.props)\n .label.toLowerCase()\n .includes(filterText?.toLowerCase() || '')\n ) {\n resultingChildren.push(callback(child, nextIndex + itemCounter));\n itemCounter++;\n }\n } else if (isValidElement<{ children: ReactNode }>(child) && child?.props.children) {\n const { parsedChildren, subElementCount } = recursiveMap(\n child.props.children,\n callback,\n '',\n nextIndex + itemCounter,\n );\n child = cloneElement(child, {\n children: parsedChildren,\n key: `group-${nextIndex + itemCounter}`,\n });\n resultingChildren.push(child);\n itemCounter += subElementCount;\n } else {\n resultingChildren.push(child);\n }\n });\n return {\n parsedChildren: resultingChildren,\n subElementCount: itemCounter,\n };\n};\n"],"names":["getSelectOptionValue","children","value","label","isReactLeaf","child","Component","isValidElement","recursiveMap","callback","filterText","nextIndex","resultingChildren","itemCounter","Children","ForwardedRefSelectItem","parsedChildren","subElementCount","cloneElement"],"mappings":";;AA6BO,MAAMA,IAAuB,CAAC;AAAA,EACjC,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AACJ,MAIQF,KAAY,OAAOA,KAAa,WACzB;AAAA,EACH,OAAOC,KAAgBD;AAAA,EACvB,OAAOE,KAAgBF;AAC3B,IAGG;AAAA,EACH,OAAOC,KAAS;AAAA,EAChB,OAAOC,KAAgBD,KAAS;AACpC,GAkBSE,IAAc,CAACC,GAAkBC,MAC1CC,EAAeF,CAAK,KAAKA,EAAM,SAASC,GAoB/BE,IAAe,CACxBP,GACAQ,GACAC,GACAC,IAAoB,MAInB;AACD,QAAMC,IAAiC,CAAC;AACxC,MAAIC,IAAc;AACT,SAAAC,EAAA,QAAQb,GAAU,CAACI,MAAU;AAClC,QAAID,EAAYC,GAAOU,CAAsB,KAAKR,EAAgCF,CAAK;AACnF,MACIL,EAAqBK,EAAM,KAAK,EAC3B,MAAM,cACN,UAASK,KAAA,gBAAAA,EAAY,kBAAiB,EAAE,MAE7CE,EAAkB,KAAKH,EAASJ,GAAOM,IAAYE,CAAW,CAAC,GAC/DA;AAAA,aAEGN,EAAwCF,CAAK,MAAKA,KAAA,QAAAA,EAAO,MAAM,WAAU;AAC1E,YAAA,EAAE,gBAAAW,GAAgB,iBAAAC,EAAA,IAAoBT;AAAA,QACxCH,EAAM,MAAM;AAAA,QACZI;AAAA,QACA;AAAA,QACAE,IAAYE;AAAA,MAChB;AACA,MAAAR,IAAQa,EAAab,GAAO;AAAA,QACxB,UAAUW;AAAA,QACV,KAAK,SAASL,IAAYE,CAAW;AAAA,MAAA,CACxC,GACDD,EAAkB,KAAKP,CAAK,GACbQ,KAAAI;AAAA,IAAA;AAEf,MAAAL,EAAkB,KAAKP,CAAK;AAAA,EAChC,CACH,GACM;AAAA,IACH,gBAAgBO;AAAA,IAChB,iBAAiBC;AAAA,EACrB;AACJ;"}
1
+ {"version":3,"file":"fondue-components69.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,16 +1,16 @@
1
1
  import { jsx as o, jsxs as R } from "react/jsx-runtime";
2
2
  import { IconCross as M } from "@frontify/fondue-icons";
3
- import { useFondueTheme as S, ThemeProvider as B } from "./fondue-components37.js";
4
3
  import * as d from "@radix-ui/react-dialog";
5
- import { createContext as H, forwardRef as s, useContext as P } from "react";
6
- import { addAutoFocusAttribute as j, addShowFocusRing as A } from "./fondue-components38.js";
4
+ import { createContext as S, forwardRef as n, useContext as B } from "react";
5
+ import { addAutoFocusAttribute as H, addShowFocusRing as P } from "./fondue-components38.js";
6
+ import { useFondueTheme as j, ThemeProvider as A } from "./fondue-components25.js";
7
7
  import l from "./fondue-components39.js";
8
- const g = H({ isModal: !1 }), u = ({ children: t, ...a }) => /* @__PURE__ */ o(g.Provider, { value: { isModal: a.modal ?? !1 }, children: /* @__PURE__ */ o(d.Root, { ...a, children: t }) });
8
+ const g = S({ isModal: !1 }), u = ({ children: t, ...a }) => /* @__PURE__ */ o(g.Provider, { value: { isModal: a.modal ?? !1 }, children: /* @__PURE__ */ o(d.Root, { ...a, children: t }) });
9
9
  u.displayName = "Dialog.Root";
10
10
  const c = ({ asChild: t = !0, children: a, "data-test-id": e = "fondue-dialog-trigger", ...i }, r) => /* @__PURE__ */ o(
11
11
  d.Trigger,
12
12
  {
13
- onMouseDown: j,
13
+ onMouseDown: H,
14
14
  "data-auto-focus-visible": "true",
15
15
  "data-auto-focus-trigger": !0,
16
16
  "data-test-id": e,
@@ -22,7 +22,7 @@ const c = ({ asChild: t = !0, children: a, "data-test-id": e = "fondue-dialog-tr
22
22
  );
23
23
  c.displayName = "Dialog.Trigger";
24
24
  const z = ({ children: t, showUnderlay: a }) => {
25
- const { isModal: e } = P(g);
25
+ const { isModal: e } = B(g);
26
26
  return e ? /* @__PURE__ */ o(d.Overlay, { "data-visible": a, className: l.underlay, children: t }) : /* @__PURE__ */ o("div", { className: l.underlay, "data-visible": a, children: t });
27
27
  }, m = ({
28
28
  maxWidth: t = "800px",
@@ -30,14 +30,14 @@ const z = ({ children: t, showUnderlay: a }) => {
30
30
  minHeight: e = "200px",
31
31
  padding: i = "compact",
32
32
  verticalAlign: r = "center",
33
- "data-test-id": n = "fondue-dialog-content",
33
+ "data-test-id": s = "fondue-dialog-content",
34
34
  showUnderlay: v = !1,
35
- rounded: b = !0,
36
- children: x,
35
+ rounded: x = !0,
36
+ children: b,
37
37
  ...T
38
38
  }, w) => {
39
- const F = S();
40
- return /* @__PURE__ */ o(d.Portal, { children: /* @__PURE__ */ o(B, { theme: F, children: /* @__PURE__ */ o(z, { showUnderlay: v, children: /* @__PURE__ */ o(
39
+ const F = j();
40
+ return /* @__PURE__ */ o(d.Portal, { children: /* @__PURE__ */ o(A, { theme: F, children: /* @__PURE__ */ o(z, { showUnderlay: v, children: /* @__PURE__ */ o(
41
41
  d.Content,
42
42
  {
43
43
  style: {
@@ -47,13 +47,13 @@ const z = ({ children: t, showUnderlay: a }) => {
47
47
  },
48
48
  ref: w,
49
49
  className: l.content,
50
- onFocus: A,
50
+ onFocus: P,
51
51
  "data-dialog-padding": i,
52
- "data-dialog-rounded": b,
53
- "data-test-id": n,
52
+ "data-dialog-rounded": x,
53
+ "data-test-id": s,
54
54
  "data-dialog-vertical-align": r,
55
55
  ...T,
56
- children: x
56
+ children: b
57
57
  }
58
58
  ) }) }) });
59
59
  };
@@ -64,11 +64,11 @@ const p = ({
64
64
  showCloseButton: e = !0,
65
65
  children: i,
66
66
  "data-test-id": r = "fondue-dialog-header"
67
- }, n) => /* @__PURE__ */ R(
67
+ }, s) => /* @__PURE__ */ R(
68
68
  "div",
69
69
  {
70
70
  "data-test-id": r,
71
- ref: n,
71
+ ref: s,
72
72
  className: l.header,
73
73
  "data-dialog-header-padding": t,
74
74
  "data-show-border": a,
@@ -118,12 +118,12 @@ const I = {
118
118
  Title: C,
119
119
  Description: N,
120
120
  Close: h,
121
- Trigger: s(c),
122
- Content: s(m),
123
- Header: s(p),
124
- Footer: s(D),
125
- Body: s(y),
126
- SideContent: s(f)
121
+ Trigger: n(c),
122
+ Content: n(m),
123
+ Header: n(p),
124
+ Footer: n(D),
125
+ Body: n(y),
126
+ SideContent: n(f)
127
127
  };
128
128
  export {
129
129
  I as Dialog,
@@ -1 +1 @@
1
- {"version":3,"file":"fondue-components7.js","sources":["../src/components/Dialog/Dialog.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport { ThemeProvider, useFondueTheme } from '@frontify/fondue-tokens/theme-provider';\nimport * as RadixDialog from '@radix-ui/react-dialog';\nimport { createContext, forwardRef, useContext, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport styles from './styles/dialog.module.scss';\n\nexport type DialogRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the dialog\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport type DialogContentProps = {\n /**\n * Add rounded corners to the dialog\n * @default true\n */\n rounded?: boolean;\n /**\n * Define the padding of the dialog\n * @default \"compact\"\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * The vertical alignment of the divider\n * @default \"center\"\n */\n verticalAlign?: 'top' | 'center';\n\n /**\n * Define a maximum width for the dialog\n * @default \"800px\"\n */\n maxWidth?: string;\n /**\n * Define a minimum width for the dialog\n * @default \"400px\"\n */\n minWidth?: string;\n /**\n * Define a minimum height for the dialog\n * @default \"200px\"\n */\n minHeight?: string;\n /**\n * Show a dark underlay behind the dialog\n * @default false\n */\n showUnderlay?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogHeaderProps = {\n /**\n * Define the padding for the dialog header\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Show a border at the bottom of the header\n * @default true\n */\n showBorder?: boolean;\n /**\n * Show a close button in the header\n * @default true\n */\n showCloseButton?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogFooterProps = {\n /**\n * Define the padding for the dialog footer\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Show a border at the top of the footer\n * @default true\n */\n showBorder?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogBodyProps = {\n /**\n * Define the padding for the dialog body\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogSideContentProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type DialogCloseProps = { children?: ReactNode };\n\nexport type DialogAnnouncementProps = { children?: ReactNode; asChild?: boolean };\n\ntype DialogContextType = {\n isModal: boolean;\n};\n\nconst DialogContext = createContext<DialogContextType>({ isModal: false });\n\nexport const DialogRoot = ({ children, ...props }: DialogRootProps) => {\n return (\n <DialogContext.Provider value={{ isModal: props.modal ?? false }}>\n <RadixDialog.Root {...props}>{children}</RadixDialog.Root>\n </DialogContext.Provider>\n );\n};\nDialogRoot.displayName = 'Dialog.Root';\n\nexport const DialogTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-dialog-trigger', ...props }: DialogTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixDialog.Trigger\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild={asChild}\n ref={ref}\n {...props}\n >\n {children}\n </RadixDialog.Trigger>\n );\n};\nDialogTrigger.displayName = 'Dialog.Trigger';\n\nconst DialogUnderlay = ({ children, showUnderlay }: { children: ReactNode; showUnderlay: boolean }) => {\n const { isModal } = useContext(DialogContext);\n if (isModal) {\n return (\n <RadixDialog.Overlay data-visible={showUnderlay} className={styles.underlay}>\n {children}\n </RadixDialog.Overlay>\n );\n }\n return (\n <div className={styles.underlay} data-visible={showUnderlay}>\n {children}\n </div>\n );\n};\n\nexport const DialogContent = (\n {\n maxWidth = '800px',\n minWidth = '400px',\n minHeight = '200px',\n padding = 'compact',\n verticalAlign = 'center',\n 'data-test-id': dataTestId = 'fondue-dialog-content',\n showUnderlay = false,\n rounded = true,\n children,\n ...props\n }: DialogContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n return (\n <RadixDialog.Portal>\n <ThemeProvider theme={theme}>\n <DialogUnderlay showUnderlay={showUnderlay}>\n <RadixDialog.Content\n style={\n {\n '--dialog-max-width': maxWidth,\n '--dialog-min-width': minWidth,\n '--dialog-min-height': minHeight,\n } as CSSProperties\n }\n ref={ref}\n className={styles.content}\n onFocus={addShowFocusRing}\n data-dialog-padding={padding}\n data-dialog-rounded={rounded}\n data-test-id={dataTestId}\n data-dialog-vertical-align={verticalAlign}\n {...props}\n >\n {children}\n </RadixDialog.Content>\n </DialogUnderlay>\n </ThemeProvider>\n </RadixDialog.Portal>\n );\n};\nDialogContent.displayName = 'Dialog.Content';\n\nexport const DialogHeader = (\n {\n padding,\n showBorder = true,\n showCloseButton = true,\n children,\n 'data-test-id': dataTestId = 'fondue-dialog-header',\n }: DialogHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.header}\n data-dialog-header-padding={padding}\n data-show-border={showBorder}\n data-dialog-layout-component\n >\n <div>{children}</div>\n {showCloseButton && (\n <RadixDialog.Close role=\"button\" data-test-id={`${dataTestId}-close`} className=\"tw-cursor-pointer\">\n <IconCross size={20} />\n </RadixDialog.Close>\n )}\n </div>\n );\n};\nDialogHeader.displayName = 'Dialog.Header';\n\nexport const DialogFooter = (\n { padding, showBorder = true, children, 'data-test-id': dataTestId = 'fondue-dialog-footer' }: DialogFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.footer}\n data-dialog-footer-padding={padding}\n data-show-border={showBorder}\n data-dialog-layout-component\n >\n {children}\n </div>\n );\n};\nDialogFooter.displayName = 'Dialog.Footer';\n\nexport const DialogBody = (\n { padding, children, 'data-test-id': dataTestId = 'fondue-dialog-body' }: DialogBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.body}\n data-dialog-body-padding={padding}\n data-dialog-layout-component\n >\n {children}\n </div>\n );\n};\nDialogBody.displayName = 'Dialog.Body';\n\nexport const DialogSideContent = (\n { children, 'data-test-id': dataTestId = 'fondue-dialog-side-content' }: DialogSideContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.sideContent} data-dialog-layout-component>\n {children}\n </div>\n );\n};\nDialogSideContent.displayName = 'Dialog.SideContent';\n\nexport const DialogClose = ({ children }: DialogCloseProps) => {\n return <RadixDialog.Close asChild>{children}</RadixDialog.Close>;\n};\nDialogClose.displayName = 'Dialog.Close';\n\nexport const DialogTitle = ({ children, asChild }: DialogAnnouncementProps) => {\n return <RadixDialog.Title asChild={asChild}>{children}</RadixDialog.Title>;\n};\nDialogTitle.displayName = 'Dialog.Title';\n\nexport const DialogDescription = ({ children, asChild }: DialogAnnouncementProps) => {\n return <RadixDialog.Description asChild={asChild}>{children}</RadixDialog.Description>;\n};\nDialogDescription.displayName = 'Dialog.Description';\n\nexport const Dialog = {\n Root: DialogRoot,\n Title: DialogTitle,\n Description: DialogDescription,\n Close: DialogClose,\n Trigger: forwardRef<HTMLButtonElement, DialogTriggerProps>(DialogTrigger),\n Content: forwardRef<HTMLDivElement, DialogContentProps>(DialogContent),\n Header: forwardRef<HTMLDivElement, DialogHeaderProps>(DialogHeader),\n Footer: forwardRef<HTMLDivElement, DialogFooterProps>(DialogFooter),\n Body: forwardRef<HTMLDivElement, DialogBodyProps>(DialogBody),\n SideContent: forwardRef<HTMLDivElement, DialogSideContentProps>(DialogSideContent),\n};\n"],"names":["DialogContext","createContext","DialogRoot","children","props","RadixDialog","DialogTrigger","asChild","dataTestId","ref","jsx","addAutoFocusAttribute","DialogUnderlay","showUnderlay","isModal","useContext","styles","DialogContent","maxWidth","minWidth","minHeight","padding","verticalAlign","rounded","theme","useFondueTheme","ThemeProvider","addShowFocusRing","DialogHeader","showBorder","showCloseButton","jsxs","IconCross","DialogFooter","DialogBody","DialogSideContent","DialogClose","DialogTitle","DialogDescription","Dialog","forwardRef"],"mappings":";;;;;;;AAoIA,MAAMA,IAAgBC,EAAiC,EAAE,SAAS,IAAO,GAE5DC,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAEjCJ,EAAc,UAAd,EAAuB,OAAO,EAAE,SAASI,EAAM,SAAS,GAAM,GAC3D,4BAACC,EAAY,MAAZ,EAAkB,GAAGD,GAAQ,UAAAD,EAAS,CAAA,GAC3C;AAGRD,EAAW,cAAc;AAElB,MAAMI,IAAgB,CACzB,EAAE,SAAAC,IAAU,IAAM,UAAAJ,GAAU,gBAAgBK,IAAa,yBAAyB,GAAGJ,EAAM,GAC3FK,MAGI,gBAAAC;AAAA,EAACL,EAAY;AAAA,EAAZ;AAAA,IACG,aAAaM;AAAA,IACb,2BAAwB;AAAA,IACxB,2BAAuB;AAAA,IACvB,gBAAcH;AAAA,IACd,SAAAD;AAAA,IACA,KAAAE;AAAA,IACC,GAAGL;AAAA,IAEH,UAAAD;AAAA,EAAA;AACL;AAGRG,EAAc,cAAc;AAE5B,MAAMM,IAAiB,CAAC,EAAE,UAAAT,GAAU,cAAAU,QAAmE;AACnG,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAWf,CAAa;AAC5C,SAAIc,IAEI,gBAAAJ,EAACL,EAAY,SAAZ,EAAoB,gBAAcQ,GAAc,WAAWG,EAAO,UAC9D,UAAAb,GACL,sBAIH,OAAI,EAAA,WAAWa,EAAO,UAAU,gBAAcH,GAC1C,UAAAV,GACL;AAER,GAEac,IAAgB,CACzB;AAAA,EACI,UAAAC,IAAW;AAAA,EACX,UAAAC,IAAW;AAAA,EACX,WAAAC,IAAY;AAAA,EACZ,SAAAC,IAAU;AAAA,EACV,eAAAC,IAAgB;AAAA,EAChB,gBAAgBd,IAAa;AAAA,EAC7B,cAAAK,IAAe;AAAA,EACf,SAAAU,IAAU;AAAA,EACV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AAS;AAAA,EAClB,MAAMrC;AAAA,EACN,OAAOmC;AAAA,EACP,aAAaC;AAAA,EACb,OAAOF;AAAA,EACP,SAASI,EAAkDlC,CAAa;AAAA,EACxE,SAASkC,EAA+CvB,CAAa;AAAA,EACrE,QAAQuB,EAA8CZ,CAAY;AAAA,EAClE,QAAQY,EAA8CP,CAAY;AAAA,EAClE,MAAMO,EAA4CN,CAAU;AAAA,EAC5D,aAAaM,EAAmDL,CAAiB;AACrF;"}
1
+ {"version":3,"file":"fondue-components7.js","sources":["../src/components/Dialog/Dialog.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { IconCross } from '@frontify/fondue-icons';\nimport * as RadixDialog from '@radix-ui/react-dialog';\nimport { createContext, forwardRef, useContext, type CSSProperties, type ForwardedRef, type ReactNode } from 'react';\n\nimport { addAutoFocusAttribute, addShowFocusRing } from '#/utilities/domUtilities';\n\nimport { ThemeProvider, useFondueTheme } from '../ThemeProvider/ThemeProvider';\n\nimport styles from './styles/dialog.module.scss';\n\nexport type DialogRootProps = {\n /**\n * Disable interaction with the rest of the page\n * @default false\n */\n modal?: boolean;\n /**\n * The controlled `open` state of the dialog\n * @default false\n */\n open?: boolean;\n /**\n * Event handler called when the `open` state changes\n */\n onOpenChange?: (open: boolean) => void;\n children?: ReactNode;\n};\n\nexport type DialogContentProps = {\n /**\n * Add rounded corners to the dialog\n * @default true\n */\n rounded?: boolean;\n /**\n * Define the padding of the dialog\n * @default \"compact\"\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * The vertical alignment of the divider\n * @default \"center\"\n */\n verticalAlign?: 'top' | 'center';\n\n /**\n * Define a maximum width for the dialog\n * @default \"800px\"\n */\n maxWidth?: string;\n /**\n * Define a minimum width for the dialog\n * @default \"400px\"\n */\n minWidth?: string;\n /**\n * Define a minimum height for the dialog\n * @default \"200px\"\n */\n minHeight?: string;\n /**\n * Show a dark underlay behind the dialog\n * @default false\n */\n showUnderlay?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogTriggerProps = {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n * @default true\n */\n asChild?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogHeaderProps = {\n /**\n * Define the padding for the dialog header\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Show a border at the bottom of the header\n * @default true\n */\n showBorder?: boolean;\n /**\n * Show a close button in the header\n * @default true\n */\n showCloseButton?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogFooterProps = {\n /**\n * Define the padding for the dialog footer\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n /**\n * Show a border at the top of the footer\n * @default true\n */\n showBorder?: boolean;\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogBodyProps = {\n /**\n * Define the padding for the dialog body\n */\n padding?: 'none' | 'tight' | 'compact' | 'comfortable' | 'spacious';\n children?: ReactNode;\n 'data-test-id'?: string;\n};\n\nexport type DialogSideContentProps = { children?: ReactNode; 'data-test-id'?: string };\n\nexport type DialogCloseProps = { children?: ReactNode };\n\nexport type DialogAnnouncementProps = { children?: ReactNode; asChild?: boolean };\n\ntype DialogContextType = {\n isModal: boolean;\n};\n\nconst DialogContext = createContext<DialogContextType>({ isModal: false });\n\nexport const DialogRoot = ({ children, ...props }: DialogRootProps) => {\n return (\n <DialogContext.Provider value={{ isModal: props.modal ?? false }}>\n <RadixDialog.Root {...props}>{children}</RadixDialog.Root>\n </DialogContext.Provider>\n );\n};\nDialogRoot.displayName = 'Dialog.Root';\n\nexport const DialogTrigger = (\n { asChild = true, children, 'data-test-id': dataTestId = 'fondue-dialog-trigger', ...props }: DialogTriggerProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) => {\n return (\n <RadixDialog.Trigger\n onMouseDown={addAutoFocusAttribute}\n data-auto-focus-visible=\"true\"\n data-auto-focus-trigger\n data-test-id={dataTestId}\n asChild={asChild}\n ref={ref}\n {...props}\n >\n {children}\n </RadixDialog.Trigger>\n );\n};\nDialogTrigger.displayName = 'Dialog.Trigger';\n\nconst DialogUnderlay = ({ children, showUnderlay }: { children: ReactNode; showUnderlay: boolean }) => {\n const { isModal } = useContext(DialogContext);\n if (isModal) {\n return (\n <RadixDialog.Overlay data-visible={showUnderlay} className={styles.underlay}>\n {children}\n </RadixDialog.Overlay>\n );\n }\n return (\n <div className={styles.underlay} data-visible={showUnderlay}>\n {children}\n </div>\n );\n};\n\nexport const DialogContent = (\n {\n maxWidth = '800px',\n minWidth = '400px',\n minHeight = '200px',\n padding = 'compact',\n verticalAlign = 'center',\n 'data-test-id': dataTestId = 'fondue-dialog-content',\n showUnderlay = false,\n rounded = true,\n children,\n ...props\n }: DialogContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n const theme = useFondueTheme();\n return (\n <RadixDialog.Portal>\n <ThemeProvider theme={theme}>\n <DialogUnderlay showUnderlay={showUnderlay}>\n <RadixDialog.Content\n style={\n {\n '--dialog-max-width': maxWidth,\n '--dialog-min-width': minWidth,\n '--dialog-min-height': minHeight,\n } as CSSProperties\n }\n ref={ref}\n className={styles.content}\n onFocus={addShowFocusRing}\n data-dialog-padding={padding}\n data-dialog-rounded={rounded}\n data-test-id={dataTestId}\n data-dialog-vertical-align={verticalAlign}\n {...props}\n >\n {children}\n </RadixDialog.Content>\n </DialogUnderlay>\n </ThemeProvider>\n </RadixDialog.Portal>\n );\n};\nDialogContent.displayName = 'Dialog.Content';\n\nexport const DialogHeader = (\n {\n padding,\n showBorder = true,\n showCloseButton = true,\n children,\n 'data-test-id': dataTestId = 'fondue-dialog-header',\n }: DialogHeaderProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.header}\n data-dialog-header-padding={padding}\n data-show-border={showBorder}\n data-dialog-layout-component\n >\n <div>{children}</div>\n {showCloseButton && (\n <RadixDialog.Close role=\"button\" data-test-id={`${dataTestId}-close`} className=\"tw-cursor-pointer\">\n <IconCross size={20} />\n </RadixDialog.Close>\n )}\n </div>\n );\n};\nDialogHeader.displayName = 'Dialog.Header';\n\nexport const DialogFooter = (\n { padding, showBorder = true, children, 'data-test-id': dataTestId = 'fondue-dialog-footer' }: DialogFooterProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.footer}\n data-dialog-footer-padding={padding}\n data-show-border={showBorder}\n data-dialog-layout-component\n >\n {children}\n </div>\n );\n};\nDialogFooter.displayName = 'Dialog.Footer';\n\nexport const DialogBody = (\n { padding, children, 'data-test-id': dataTestId = 'fondue-dialog-body' }: DialogBodyProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div\n data-test-id={dataTestId}\n ref={ref}\n className={styles.body}\n data-dialog-body-padding={padding}\n data-dialog-layout-component\n >\n {children}\n </div>\n );\n};\nDialogBody.displayName = 'Dialog.Body';\n\nexport const DialogSideContent = (\n { children, 'data-test-id': dataTestId = 'fondue-dialog-side-content' }: DialogSideContentProps,\n ref: ForwardedRef<HTMLDivElement>,\n) => {\n return (\n <div data-test-id={dataTestId} ref={ref} className={styles.sideContent} data-dialog-layout-component>\n {children}\n </div>\n );\n};\nDialogSideContent.displayName = 'Dialog.SideContent';\n\nexport const DialogClose = ({ children }: DialogCloseProps) => {\n return <RadixDialog.Close asChild>{children}</RadixDialog.Close>;\n};\nDialogClose.displayName = 'Dialog.Close';\n\nexport const DialogTitle = ({ children, asChild }: DialogAnnouncementProps) => {\n return <RadixDialog.Title asChild={asChild}>{children}</RadixDialog.Title>;\n};\nDialogTitle.displayName = 'Dialog.Title';\n\nexport const DialogDescription = ({ children, asChild }: DialogAnnouncementProps) => {\n return <RadixDialog.Description asChild={asChild}>{children}</RadixDialog.Description>;\n};\nDialogDescription.displayName = 'Dialog.Description';\n\nexport const Dialog = {\n Root: DialogRoot,\n Title: DialogTitle,\n Description: DialogDescription,\n Close: DialogClose,\n Trigger: forwardRef<HTMLButtonElement, DialogTriggerProps>(DialogTrigger),\n Content: forwardRef<HTMLDivElement, DialogContentProps>(DialogContent),\n Header: forwardRef<HTMLDivElement, DialogHeaderProps>(DialogHeader),\n Footer: forwardRef<HTMLDivElement, DialogFooterProps>(DialogFooter),\n Body: forwardRef<HTMLDivElement, DialogBodyProps>(DialogBody),\n SideContent: forwardRef<HTMLDivElement, DialogSideContentProps>(DialogSideContent),\n};\n"],"names":["DialogContext","createContext","DialogRoot","children","props","RadixDialog","DialogTrigger","asChild","dataTestId","ref","jsx","addAutoFocusAttribute","DialogUnderlay","showUnderlay","isModal","useContext","styles","DialogContent","maxWidth","minWidth","minHeight","padding","verticalAlign","rounded","theme","useFondueTheme","ThemeProvider","addShowFocusRing","DialogHeader","showBorder","showCloseButton","jsxs","IconCross","DialogFooter","DialogBody","DialogSideContent","DialogClose","DialogTitle","DialogDescription","Dialog","forwardRef"],"mappings":";;;;;;;AAqIA,MAAMA,IAAgBC,EAAiC,EAAE,SAAS,IAAO,GAE5DC,IAAa,CAAC,EAAE,UAAAC,GAAU,GAAGC,0BAEjCJ,EAAc,UAAd,EAAuB,OAAO,EAAE,SAASI,EAAM,SAAS,GAAM,GAC3D,4BAACC,EAAY,MAAZ,EAAkB,GAAGD,GAAQ,UAAAD,EAAS,CAAA,GAC3C;AAGRD,EAAW,cAAc;AAElB,MAAMI,IAAgB,CACzB,EAAE,SAAAC,IAAU,IAAM,UAAAJ,GAAU,gBAAgBK,IAAa,yBAAyB,GAAGJ,EAAM,GAC3FK,MAGI,gBAAAC;AAAA,EAACL,EAAY;AAAA,EAAZ;AAAA,IACG,aAAaM;AAAA,IACb,2BAAwB;AAAA,IACxB,2BAAuB;AAAA,IACvB,gBAAcH;AAAA,IACd,SAAAD;AAAA,IACA,KAAAE;AAAA,IACC,GAAGL;AAAA,IAEH,UAAAD;AAAA,EAAA;AAC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AcF,GAAY,KAAAC,GAAU,WAAWO,EAAO,aAAa,gCAA4B,IAC/F,UAAAb,EACL,CAAA;AAGRgC,EAAkB,cAAc;AAEzB,MAAMC,IAAc,CAAC,EAAE,UAAAjC,0BAClBE,EAAY,OAAZ,EAAkB,SAAO,IAAE,UAAAF,GAAS;AAEhDiC,EAAY,cAAc;AAEnB,MAAMC,IAAc,CAAC,EAAE,UAAAlC,GAAU,SAAAI,QAC5B,gBAAAG,EAAAL,EAAY,OAAZ,EAAkB,SAAAE,GAAmB,UAAAJ,EAAS,CAAA;AAE1DkC,EAAY,cAAc;AAEnB,MAAMC,IAAoB,CAAC,EAAE,UAAAnC,GAAU,SAAAI,QAClC,gBAAAG,EAAAL,EAAY,aAAZ,EAAwB,SAAAE,GAAmB,UAAAJ,EAAS,CAAA;AAEhEmC,EAAkB,cAAc;AAEzB,MAAMC,IAAS;AAAA,EAClB,MAAMrC;AAAA,EACN,OAAOmC;AAAA,EACP,aAAaC;AAAA,EACb,OAAOF;AAAA,EACP,SAASI,EAAkDlC,CAAa;AAAA,EACxE,SAASkC,EAA+CvB,CAAa;AAAA,EACrE,QAAQuB,EAA8CZ,CAAY;AAAA,EAClE,QAAQY,EAA8CP,CAAY;AAAA,EAClE,MAAMO,EAA4CN,CAAU;AAAA,EAC5D,aAAaM,EAAmDL,CAAiB;AACrF;"}
@@ -0,0 +1,42 @@
1
+ import { Children as a, isValidElement as u, cloneElement as f } from "react";
2
+ import { ForwardedRefSelectItem as E } from "./fondue-components52.js";
3
+ const g = ({
4
+ children: r,
5
+ value: o,
6
+ label: s
7
+ }) => r && typeof r == "string" ? {
8
+ value: o || r,
9
+ label: s || r
10
+ } : {
11
+ value: o || "",
12
+ label: s || o || ""
13
+ }, w = (r, o) => u(r) && r.type === o, y = (r, o, s, p = 0) => {
14
+ const n = [];
15
+ let t = 0;
16
+ return a.forEach(r, (e) => {
17
+ if (w(e, E) && u(e))
18
+ g(e.props).label.toLowerCase().includes((s == null ? void 0 : s.toLowerCase()) || "") && (n.push(o(e, p + t)), t++);
19
+ else if (u(e) && (e != null && e.props.children)) {
20
+ const { parsedChildren: m, subElementCount: C } = y(
21
+ e.props.children,
22
+ o,
23
+ "",
24
+ p + t
25
+ );
26
+ e = f(e, {
27
+ children: m,
28
+ key: `group-${p + t}`
29
+ }), n.push(e), t += C;
30
+ } else
31
+ n.push(e);
32
+ }), {
33
+ parsedChildren: n,
34
+ subElementCount: t
35
+ };
36
+ };
37
+ export {
38
+ g as getSelectOptionValue,
39
+ w as isReactLeaf,
40
+ y as recursiveMap
41
+ };
42
+ //# sourceMappingURL=fondue-components70.js.map