@skodaflow/web-library 8.3.2 → 8.4.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 (83) hide show
  1. package/cjs/components/advancedTable/agGrid.js +1 -1
  2. package/cjs/components/advancedTable/agGrid.js.map +1 -1
  3. package/cjs/components/advancedTable/agGridSkodaTheme.d.ts +3 -0
  4. package/cjs/components/advancedTable/agGridSkodaTheme.js +1 -1
  5. package/cjs/components/advancedTable/agGridSkodaTheme.js.map +1 -1
  6. package/cjs/components/advancedTable/agGridUniformRowHeight.d.ts +36 -0
  7. package/cjs/components/advancedTable/agGridUniformRowHeight.js +2 -0
  8. package/cjs/components/advancedTable/agGridUniformRowHeight.js.map +1 -0
  9. package/cjs/components/advancedTable/agGridVariables.js +1 -1
  10. package/cjs/components/advancedTable/agGridVariables.js.map +1 -1
  11. package/cjs/components/advancedTable/index.d.ts +1 -0
  12. package/cjs/components/alert/AlertIconButton.d.ts +8 -0
  13. package/cjs/components/alert/AlertIconButton.js +2 -0
  14. package/cjs/components/alert/AlertIconButton.js.map +1 -0
  15. package/cjs/components/alert/index.d.ts +1 -0
  16. package/cjs/components/copyButton/CopyButton.d.ts +39 -0
  17. package/cjs/components/copyButton/CopyButton.js +2 -0
  18. package/cjs/components/copyButton/CopyButton.js.map +1 -0
  19. package/cjs/components/copyButton/CopyIconButton.d.ts +8 -0
  20. package/cjs/components/copyButton/CopyIconButton.js +2 -0
  21. package/cjs/components/copyButton/CopyIconButton.js.map +1 -0
  22. package/cjs/components/copyButton/index.d.ts +3 -0
  23. package/cjs/components/copyButton/useCopyAction.d.ts +31 -0
  24. package/cjs/components/copyButton/useCopyAction.js +2 -0
  25. package/cjs/components/copyButton/useCopyAction.js.map +1 -0
  26. package/cjs/components/footer/FooterMenuCollapse.js +1 -1
  27. package/cjs/components/footer/FooterMenuCollapse.js.map +1 -1
  28. package/cjs/components/index.d.ts +1 -0
  29. package/cjs/index.js +1 -1
  30. package/cjs/materialui/alert/alert.theme.js +1 -1
  31. package/cjs/materialui/alert/alert.theme.js.map +1 -1
  32. package/cjs/materialui/alert/alertTitle.theme.js +1 -1
  33. package/cjs/materialui/alert/alertTitle.theme.js.map +1 -1
  34. package/cjs/materialui/datepicker/datecalendar.theme.d.ts +102 -102
  35. package/cjs/materialui/datepicker/digitalclock.theme.d.ts +102 -102
  36. package/cjs/materialui/iconButton/iconButton.theme.js.map +1 -1
  37. package/cjs/materialui/theme/theme.extensions.d.ts +11 -1
  38. package/cjs/materialui/typography/typography.theme.js +1 -1
  39. package/cjs/materialui/typography/typography.theme.js.map +1 -1
  40. package/cjs/node_modules/swiper/shared/swiper-core.js +1 -1
  41. package/cjs/node_modules/swiper/shared/swiper-core.js.map +1 -1
  42. package/cjs/node_modules/swiper/swiper-react.js +1 -1
  43. package/cjs/node_modules/swiper/swiper-react.js.map +1 -1
  44. package/components/advancedTable/agGrid.js +1 -1
  45. package/components/advancedTable/agGrid.js.map +1 -1
  46. package/components/advancedTable/agGridSkodaTheme.d.ts +3 -0
  47. package/components/advancedTable/agGridSkodaTheme.js +1 -1
  48. package/components/advancedTable/agGridSkodaTheme.js.map +1 -1
  49. package/components/advancedTable/agGridUniformRowHeight.d.ts +36 -0
  50. package/components/advancedTable/agGridUniformRowHeight.js +2 -0
  51. package/components/advancedTable/agGridUniformRowHeight.js.map +1 -0
  52. package/components/advancedTable/agGridVariables.js +1 -1
  53. package/components/advancedTable/agGridVariables.js.map +1 -1
  54. package/components/advancedTable/index.d.ts +1 -0
  55. package/components/alert/AlertIconButton.d.ts +8 -0
  56. package/components/alert/AlertIconButton.js +2 -0
  57. package/components/alert/AlertIconButton.js.map +1 -0
  58. package/components/alert/index.d.ts +1 -0
  59. package/components/copyButton/CopyButton.d.ts +39 -0
  60. package/components/copyButton/CopyButton.js +2 -0
  61. package/components/copyButton/CopyButton.js.map +1 -0
  62. package/components/copyButton/CopyIconButton.d.ts +8 -0
  63. package/components/copyButton/CopyIconButton.js +2 -0
  64. package/components/copyButton/CopyIconButton.js.map +1 -0
  65. package/components/copyButton/index.d.ts +3 -0
  66. package/components/copyButton/useCopyAction.d.ts +31 -0
  67. package/components/copyButton/useCopyAction.js +2 -0
  68. package/components/copyButton/useCopyAction.js.map +1 -0
  69. package/components/footer/FooterMenuCollapse.js +1 -1
  70. package/components/footer/FooterMenuCollapse.js.map +1 -1
  71. package/components/index.d.ts +1 -0
  72. package/index.js +1 -1
  73. package/materialui/alert/alert.theme.js +1 -1
  74. package/materialui/alert/alert.theme.js.map +1 -1
  75. package/materialui/alert/alertTitle.theme.js +1 -1
  76. package/materialui/alert/alertTitle.theme.js.map +1 -1
  77. package/materialui/datepicker/datecalendar.theme.d.ts +102 -102
  78. package/materialui/datepicker/digitalclock.theme.d.ts +102 -102
  79. package/materialui/iconButton/iconButton.theme.js.map +1 -1
  80. package/materialui/theme/theme.extensions.d.ts +11 -1
  81. package/materialui/typography/typography.theme.js +1 -1
  82. package/materialui/typography/typography.theme.js.map +1 -1
  83. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react"),r=require("./shared/swiper-core.js"),t=require("./shared/update-on-virtual-data.js"),n=require("./shared/update-swiper.js");function s(e){return e&&e.__esModule?e:{default:e}}var a=s(e);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},l.apply(this,arguments)}function u(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function i(e){const r=[];return a.default.Children.toArray(e).forEach(e=>{u(e)?r.push(e):e.props&&e.props.children&&i(e.props.children).forEach(e=>r.push(e))}),r}function c(e){const r=[],t={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return a.default.Children.toArray(e).forEach(e=>{if(u(e))r.push(e);else if(e.props&&e.props.slot&&t[e.props.slot])t[e.props.slot].push(e);else if(e.props&&e.props.children){const n=i(e.props.children);n.length>0?n.forEach(e=>r.push(e)):t["container-end"].push(e)}else t["container-end"].push(e)}),{slides:r,slots:t}}function o(r,t){return"undefined"==typeof window?e.useEffect(r,t):e.useLayoutEffect(r,t)}const d=e.createContext(null),p=e.createContext(null),f=e.forwardRef(({className:s,tag:u="div",wrapperTag:i="div",children:d,onSwiper:f,...m}={},w)=>{let v=!1;const[h,E]=e.useState("swiper"),[y,g]=e.useState(null),[x,S]=e.useState(!1),b=e.useRef(!1),N=e.useRef(null),C=e.useRef(null),O=e.useRef(null),R=e.useRef(null),P=e.useRef(null),j=e.useRef(null),z=e.useRef(null),$=e.useRef(null),{params:k,passedParams:_,rest:I,events:q}=t.g(m),{slides:A,slots:M}=c(d),B=()=>{S(!x)};Object.assign(k.on,{_containerClasses(e,r){E(r)}});const L=()=>{Object.assign(k.on,q),v=!0;const e={...k};if(delete e.wrapperClass,C.current=new r.S(e),C.current.virtual&&C.current.params.virtual.enabled){C.current.virtual.slides=A;const e={cache:!1,slides:A,renderExternal:g,renderExternalUpdate:!1};n.e(C.current.params.virtual,e),n.e(C.current.originalParams.virtual,e)}};N.current||L(),C.current&&C.current.on("_beforeBreakpoint",B);return e.useEffect(()=>()=>{C.current&&C.current.off("_beforeBreakpoint",B)}),e.useEffect(()=>{!b.current&&C.current&&(C.current.emitSlidesClasses(),b.current=!0)}),o(()=>{if(w&&(w.current=N.current),N.current)return C.current.destroyed&&L(),t.m({el:N.current,nextEl:P.current,prevEl:j.current,paginationEl:z.current,scrollbarEl:$.current,swiper:C.current},k),f&&!C.current.destroyed&&f(C.current),()=>{C.current&&!C.current.destroyed&&C.current.destroy(!0,!1)}},[]),o(()=>{!v&&q&&C.current&&Object.keys(q).forEach(e=>{C.current.on(e,q[e])});const e=t.a(_,O.current,A,R.current,e=>e.key);return O.current=_,R.current=A,e.length&&C.current&&!C.current.destroyed&&n.u({swiper:C.current,slides:A,passedParams:_,changedParams:e,nextEl:P.current,prevEl:j.current,scrollbarEl:$.current,paginationEl:z.current}),()=>{q&&C.current&&Object.keys(q).forEach(e=>{C.current.off(e,q[e])})}}),o(()=>{t.u(C.current)},[y]),a.default.createElement(u,l({ref:N,className:n.d(`${h}${s?` ${s}`:""}`)},I),a.default.createElement(p.Provider,{value:C.current},M["container-start"],a.default.createElement(i,{className:n.w(k.wrapperClass)},M["wrapper-start"],k.virtual?function(e,r,t){if(!t)return null;const n=e=>{let t=e;return e<0?t=r.length+e:t>=r.length&&(t-=r.length),t},s=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${t.offset}px`}:{top:`${t.offset}px`},{from:l,to:u}=t,i=e.params.loop?-r.length:0,c=e.params.loop?2*r.length:r.length,o=[];for(let e=i;e<c;e+=1)e>=l&&e<=u&&o.push(r[n(e)]);return o.map((r,t)=>a.default.cloneElement(r,{swiper:e,style:s,key:r.props.virtualIndex||r.key||`slide-${t}`}))}(C.current,A,y):A.map((e,r)=>a.default.cloneElement(e,{swiper:C.current,swiperSlideIndex:r})),M["wrapper-end"]),n.n(k)&&a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{ref:j,className:"swiper-button-prev"}),a.default.createElement("div",{ref:P,className:"swiper-button-next"})),n.b(k)&&a.default.createElement("div",{ref:$,className:"swiper-scrollbar"}),n.a(k)&&a.default.createElement("div",{ref:z,className:"swiper-pagination"}),M["container-end"]))});f.displayName="Swiper";const m=e.forwardRef(({tag:r="div",children:t,className:s="",swiper:u,zoom:i,lazy:c,virtualIndex:p,swiperSlideIndex:f,...m}={},w)=>{const v=e.useRef(null),[h,E]=e.useState("swiper-slide"),[y,g]=e.useState(!1);function x(e,r,t){r===v.current&&E(t)}o(()=>{if(void 0!==f&&(v.current.swiperSlideIndex=f),w&&(w.current=v.current),v.current&&u){if(!u.destroyed)return u.on("_slideClass",x),()=>{u&&u.off("_slideClass",x)};"swiper-slide"!==h&&E("swiper-slide")}}),o(()=>{u&&v.current&&!u.destroyed&&E(u.getSlideClasses(v.current))},[u]);const S={isActive:h.indexOf("swiper-slide-active")>=0,isVisible:h.indexOf("swiper-slide-visible")>=0,isPrev:h.indexOf("swiper-slide-prev")>=0,isNext:h.indexOf("swiper-slide-next")>=0},b=()=>"function"==typeof t?t(S):t;return a.default.createElement(r,l({ref:v,className:n.d(`${h}${s?` ${s}`:""}`),"data-swiper-slide-index":p,onLoad:()=>{g(!0)}},m),i&&a.default.createElement(d.Provider,{value:S},a.default.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":"number"==typeof i?i:void 0},b(),c&&!y&&a.default.createElement("div",{className:"swiper-lazy-preloader",ref:e=>{e&&(e.lazyPreloaderManaged=!0)}}))),!i&&a.default.createElement(d.Provider,{value:S},b(),c&&!y&&a.default.createElement("div",{className:"swiper-lazy-preloader",ref:e=>{e&&(e.lazyPreloaderManaged=!0)}})))});m.displayName="SwiperSlide",exports.Swiper=f,exports.SwiperSlide=m,exports.useSwiper=()=>e.useContext(p);
1
+ "use strict";var e=require("react"),r=require("./shared/swiper-core.js"),t=require("./shared/update-on-virtual-data.js"),n=require("./shared/update-swiper.js");function s(e){return e&&e.__esModule?e:{default:e}}var a=s(e);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},l.apply(this,arguments)}function u(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function i(e){const r=[];return a.default.Children.toArray(e).forEach(e=>{u(e)?r.push(e):e.props&&e.props.children&&i(e.props.children).forEach(e=>r.push(e))}),r}function c(e){const r=[],t={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return a.default.Children.toArray(e).forEach(e=>{if(u(e))r.push(e);else if(e.props&&e.props.slot&&t[e.props.slot])t[e.props.slot].push(e);else if(e.props&&e.props.children){const n=i(e.props.children);n.length>0?n.forEach(e=>r.push(e)):t["container-end"].push(e)}else t["container-end"].push(e)}),{slides:r,slots:t}}function o(r,t){return"undefined"==typeof window?e.useEffect(r,t):e.useLayoutEffect(r,t)}const d=e.createContext(null),p=e.createContext(null),f=e.forwardRef(({className:s,tag:u="div",wrapperTag:i="div",children:d,onSwiper:f,...m}={},w)=>{let v=!1;const[h,y]=e.useState("swiper"),[E,g]=e.useState(null),[x,b]=e.useState(!1),S=e.useRef(!1),N=e.useRef(null),O=e.useRef(null),C=e.useRef(null),R=e.useRef(null),P=e.useRef(null),j=e.useRef(null),z=e.useRef(null),$=e.useRef(null),{params:k,passedParams:_,rest:I,events:q}=t.g(m),{slides:A,slots:M}=c(d),B=()=>{b(!x)};Object.assign(k.on,{_containerClasses(e,r){y(r)}});const F=()=>{Object.assign(k.on,q),v=!0;const e={...k};if(delete e.wrapperClass,O.current=new r.S(e),O.current.virtual&&O.current.params.virtual.enabled){O.current.virtual.slides=A;const e={cache:!1,slides:A,renderExternal:g,renderExternalUpdate:!1};n.e(O.current.params.virtual,e),n.e(O.current.originalParams.virtual,e)}};N.current||F(),O.current&&O.current.on("_beforeBreakpoint",B);return e.useEffect(()=>()=>{O.current&&O.current.off("_beforeBreakpoint",B)}),e.useEffect(()=>{!S.current&&O.current&&(O.current.emitSlidesClasses(),S.current=!0)}),o(()=>{if(w&&(w.current=N.current),N.current)return O.current.destroyed&&F(),t.m({el:N.current,nextEl:P.current,prevEl:j.current,paginationEl:z.current,scrollbarEl:$.current,swiper:O.current},k),f&&!O.current.destroyed&&f(O.current),()=>{O.current&&!O.current.destroyed&&O.current.destroy(!0,!1)}},[]),o(()=>{!v&&q&&O.current&&Object.keys(q).forEach(e=>{O.current.on(e,q[e])});const e=t.a(_,C.current,A,R.current,e=>e.key);return C.current=_,R.current=A,e.length&&O.current&&!O.current.destroyed&&n.u({swiper:O.current,slides:A,passedParams:_,changedParams:e,nextEl:P.current,prevEl:j.current,scrollbarEl:$.current,paginationEl:z.current}),()=>{q&&O.current&&Object.keys(q).forEach(e=>{O.current.off(e,q[e])})}}),o(()=>{t.u(O.current)},[E]),a.default.createElement(u,l({ref:N,className:n.d(`${h}${s?` ${s}`:""}`)},I),a.default.createElement(p.Provider,{value:O.current},M["container-start"],a.default.createElement(i,{className:n.w(k.wrapperClass)},M["wrapper-start"],k.virtual?function(e,r,t){if(!t)return null;const n=e=>{let t=e;return e<0?t=r.length+e:t>=r.length&&(t-=r.length),t},s=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${t.offset}px`}:{top:`${t.offset}px`},{from:l,to:u}=t,i=e.params.loop?-r.length:0,c=e.params.loop?2*r.length:r.length,o=[];for(let e=i;e<c;e+=1)e>=l&&e<=u&&o.push(r[n(e)]);return o.map((r,t)=>a.default.cloneElement(r,{swiper:e,style:s,key:r.props.virtualIndex||r.key||`slide-${t}`}))}(O.current,A,E):A.map((e,r)=>a.default.cloneElement(e,{swiper:O.current,swiperSlideIndex:r})),M["wrapper-end"]),n.n(k)&&a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{ref:j,className:"swiper-button-prev"}),a.default.createElement("div",{ref:P,className:"swiper-button-next"})),n.b(k)&&a.default.createElement("div",{ref:$,className:"swiper-scrollbar"}),n.a(k)&&a.default.createElement("div",{ref:z,className:"swiper-pagination"}),M["container-end"]))});f.displayName="Swiper";const m=e.forwardRef(({tag:r="div",children:t,className:s="",swiper:u,zoom:i,lazy:c,virtualIndex:p,swiperSlideIndex:f,...m}={},w)=>{const v=e.useRef(null),[h,y]=e.useState("swiper-slide"),[E,g]=e.useState(!1);function x(e,r,t){r===v.current&&y(t)}o(()=>{if(void 0!==f&&(v.current.swiperSlideIndex=f),w&&(w.current=v.current),v.current&&u){if(!u.destroyed)return u.on("_slideClass",x),()=>{u&&u.off("_slideClass",x)};"swiper-slide"!==h&&y("swiper-slide")}}),o(()=>{u&&v.current&&!u.destroyed&&y(u.getSlideClasses(v.current))},[u]);const b={isActive:h.indexOf("swiper-slide-active")>=0,isVisible:h.indexOf("swiper-slide-visible")>=0,isFullyVisible:h.indexOf("swiper-slide-fully-visible")>=0,isPrev:h.indexOf("swiper-slide-prev")>=0,isNext:h.indexOf("swiper-slide-next")>=0},S=()=>"function"==typeof t?t(b):t;return a.default.createElement(r,l({ref:v,className:n.d(`${h}${s?` ${s}`:""}`),"data-swiper-slide-index":p,onLoad:()=>{g(!0)}},m),i&&a.default.createElement(d.Provider,{value:b},a.default.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":"number"==typeof i?i:void 0},S(),c&&!E&&a.default.createElement("div",{className:"swiper-lazy-preloader",ref:e=>{e&&(e.lazyPreloaderManaged=!0)}}))),!i&&a.default.createElement(d.Provider,{value:b},S(),c&&!E&&a.default.createElement("div",{className:"swiper-lazy-preloader",ref:e=>{e&&(e.lazyPreloaderManaged=!0)}})))});m.displayName="SwiperSlide",exports.Swiper=f,exports.SwiperSlide=m,exports.useSwiper=()=>e.useContext(p);
2
2
  //# sourceMappingURL=swiper-react.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"swiper-react.js","sources":["../../../../node_modules/swiper/swiper-react.mjs"],"sourcesContent":["/**\n * Swiper React 12.1.3\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2026 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: March 24, 2026\n */\n\nimport React, { useEffect, useLayoutEffect, useContext, createContext, forwardRef, useState, useRef } from 'react';\nimport { S as Swiper$1 } from './shared/swiper-core.mjs';\nimport { g as getParams, m as mountSwiper, a as getChangedParams, u as updateOnVirtualData } from './shared/update-on-virtual-data.mjs';\nimport { d as uniqueClasses, w as wrapperClass, n as needsNavigation, b as needsScrollbar, a as needsPagination, e as extend, u as updateSwiper } from './shared/update-swiper.mjs';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction isChildSwiperSlide(child) {\n return child.type && child.type.displayName && child.type.displayName.includes('SwiperSlide');\n}\nfunction processChildren(c) {\n const slides = [];\n React.Children.toArray(c).forEach(child => {\n if (isChildSwiperSlide(child)) {\n slides.push(child);\n } else if (child.props && child.props.children) {\n processChildren(child.props.children).forEach(slide => slides.push(slide));\n }\n });\n return slides;\n}\nfunction getChildren(c) {\n const slides = [];\n const slots = {\n 'container-start': [],\n 'container-end': [],\n 'wrapper-start': [],\n 'wrapper-end': []\n };\n React.Children.toArray(c).forEach(child => {\n if (isChildSwiperSlide(child)) {\n slides.push(child);\n } else if (child.props && child.props.slot && slots[child.props.slot]) {\n slots[child.props.slot].push(child);\n } else if (child.props && child.props.children) {\n const foundSlides = processChildren(child.props.children);\n if (foundSlides.length > 0) {\n foundSlides.forEach(slide => slides.push(slide));\n } else {\n slots['container-end'].push(child);\n }\n } else {\n slots['container-end'].push(child);\n }\n });\n return {\n slides,\n slots\n };\n}\n\nfunction renderVirtual(swiper, slides, virtualData) {\n if (!virtualData) return null;\n const getSlideIndex = index => {\n let slideIndex = index;\n if (index < 0) {\n slideIndex = slides.length + index;\n } else if (slideIndex >= slides.length) {\n // eslint-disable-next-line\n slideIndex = slideIndex - slides.length;\n }\n return slideIndex;\n };\n const style = swiper.isHorizontal() ? {\n [swiper.rtlTranslate ? 'right' : 'left']: `${virtualData.offset}px`\n } : {\n top: `${virtualData.offset}px`\n };\n const {\n from,\n to\n } = virtualData;\n const loopFrom = swiper.params.loop ? -slides.length : 0;\n const loopTo = swiper.params.loop ? slides.length * 2 : slides.length;\n const slidesToRender = [];\n for (let i = loopFrom; i < loopTo; i += 1) {\n if (i >= from && i <= to) {\n slidesToRender.push(slides[getSlideIndex(i)]);\n }\n }\n return slidesToRender.map((child, index) => {\n return /*#__PURE__*/React.cloneElement(child, {\n swiper,\n style,\n key: child.props.virtualIndex || child.key || `slide-${index}`\n });\n });\n}\n\nfunction useIsomorphicLayoutEffect(callback, deps) {\n // eslint-disable-next-line\n if (typeof window === 'undefined') return useEffect(callback, deps);\n return useLayoutEffect(callback, deps);\n}\n\nconst SwiperSlideContext = /*#__PURE__*/createContext(null);\nconst useSwiperSlide = () => {\n return useContext(SwiperSlideContext);\n};\nconst SwiperContext = /*#__PURE__*/createContext(null);\nconst useSwiper = () => {\n return useContext(SwiperContext);\n};\n\nconst Swiper = /*#__PURE__*/forwardRef(({\n className,\n tag: Tag = 'div',\n wrapperTag: WrapperTag = 'div',\n children,\n onSwiper,\n ...rest\n} = {}, externalElRef) => {\n let eventsAssigned = false;\n const [containerClasses, setContainerClasses] = useState('swiper');\n const [virtualData, setVirtualData] = useState(null);\n const [breakpointChanged, setBreakpointChanged] = useState(false);\n const initializedRef = useRef(false);\n const swiperElRef = useRef(null);\n const swiperRef = useRef(null);\n const oldPassedParamsRef = useRef(null);\n const oldSlides = useRef(null);\n const nextElRef = useRef(null);\n const prevElRef = useRef(null);\n const paginationElRef = useRef(null);\n const scrollbarElRef = useRef(null);\n const {\n params: swiperParams,\n passedParams,\n rest: restProps,\n events\n } = getParams(rest);\n const {\n slides,\n slots\n } = getChildren(children);\n const onBeforeBreakpoint = () => {\n setBreakpointChanged(!breakpointChanged);\n };\n Object.assign(swiperParams.on, {\n _containerClasses(swiper, classes) {\n setContainerClasses(classes);\n }\n });\n const initSwiper = () => {\n // init swiper\n Object.assign(swiperParams.on, events);\n eventsAssigned = true;\n const passParams = {\n ...swiperParams\n };\n delete passParams.wrapperClass;\n swiperRef.current = new Swiper$1(passParams);\n if (swiperRef.current.virtual && swiperRef.current.params.virtual.enabled) {\n swiperRef.current.virtual.slides = slides;\n const extendWith = {\n cache: false,\n slides,\n renderExternal: setVirtualData,\n renderExternalUpdate: false\n };\n extend(swiperRef.current.params.virtual, extendWith);\n extend(swiperRef.current.originalParams.virtual, extendWith);\n }\n };\n if (!swiperElRef.current) {\n initSwiper();\n }\n\n // Listen for breakpoints change\n if (swiperRef.current) {\n swiperRef.current.on('_beforeBreakpoint', onBeforeBreakpoint);\n }\n const attachEvents = () => {\n if (eventsAssigned || !events || !swiperRef.current) return;\n Object.keys(events).forEach(eventName => {\n swiperRef.current.on(eventName, events[eventName]);\n });\n };\n const detachEvents = () => {\n if (!events || !swiperRef.current) return;\n Object.keys(events).forEach(eventName => {\n swiperRef.current.off(eventName, events[eventName]);\n });\n };\n useEffect(() => {\n return () => {\n if (swiperRef.current) swiperRef.current.off('_beforeBreakpoint', onBeforeBreakpoint);\n };\n });\n\n // set initialized flag\n useEffect(() => {\n if (!initializedRef.current && swiperRef.current) {\n swiperRef.current.emitSlidesClasses();\n initializedRef.current = true;\n }\n });\n\n // mount swiper\n useIsomorphicLayoutEffect(() => {\n if (externalElRef) {\n externalElRef.current = swiperElRef.current;\n }\n if (!swiperElRef.current) return;\n if (swiperRef.current.destroyed) {\n initSwiper();\n }\n mountSwiper({\n el: swiperElRef.current,\n nextEl: nextElRef.current,\n prevEl: prevElRef.current,\n paginationEl: paginationElRef.current,\n scrollbarEl: scrollbarElRef.current,\n swiper: swiperRef.current\n }, swiperParams);\n if (onSwiper && !swiperRef.current.destroyed) onSwiper(swiperRef.current);\n // eslint-disable-next-line\n return () => {\n if (swiperRef.current && !swiperRef.current.destroyed) {\n swiperRef.current.destroy(true, false);\n }\n };\n }, []);\n\n // watch for params change\n useIsomorphicLayoutEffect(() => {\n attachEvents();\n const changedParams = getChangedParams(passedParams, oldPassedParamsRef.current, slides, oldSlides.current, c => c.key);\n oldPassedParamsRef.current = passedParams;\n oldSlides.current = slides;\n if (changedParams.length && swiperRef.current && !swiperRef.current.destroyed) {\n updateSwiper({\n swiper: swiperRef.current,\n slides,\n passedParams,\n changedParams,\n nextEl: nextElRef.current,\n prevEl: prevElRef.current,\n scrollbarEl: scrollbarElRef.current,\n paginationEl: paginationElRef.current\n });\n }\n return () => {\n detachEvents();\n };\n });\n\n // update on virtual update\n useIsomorphicLayoutEffect(() => {\n updateOnVirtualData(swiperRef.current);\n }, [virtualData]);\n\n // bypass swiper instance to slides\n function renderSlides() {\n if (swiperParams.virtual) {\n return renderVirtual(swiperRef.current, slides, virtualData);\n }\n return slides.map((child, index) => {\n return /*#__PURE__*/React.cloneElement(child, {\n swiper: swiperRef.current,\n swiperSlideIndex: index\n });\n });\n }\n return /*#__PURE__*/React.createElement(Tag, _extends({\n ref: swiperElRef,\n className: uniqueClasses(`${containerClasses}${className ? ` ${className}` : ''}`)\n }, restProps), /*#__PURE__*/React.createElement(SwiperContext.Provider, {\n value: swiperRef.current\n }, slots['container-start'], /*#__PURE__*/React.createElement(WrapperTag, {\n className: wrapperClass(swiperParams.wrapperClass)\n }, slots['wrapper-start'], renderSlides(), slots['wrapper-end']), needsNavigation(swiperParams) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n ref: prevElRef,\n className: \"swiper-button-prev\"\n }), /*#__PURE__*/React.createElement(\"div\", {\n ref: nextElRef,\n className: \"swiper-button-next\"\n })), needsScrollbar(swiperParams) && /*#__PURE__*/React.createElement(\"div\", {\n ref: scrollbarElRef,\n className: \"swiper-scrollbar\"\n }), needsPagination(swiperParams) && /*#__PURE__*/React.createElement(\"div\", {\n ref: paginationElRef,\n className: \"swiper-pagination\"\n }), slots['container-end']));\n});\nSwiper.displayName = 'Swiper';\n\nconst SwiperSlide = /*#__PURE__*/forwardRef(({\n tag: Tag = 'div',\n children,\n className = '',\n swiper,\n zoom,\n lazy,\n virtualIndex,\n swiperSlideIndex,\n ...rest\n} = {}, externalRef) => {\n const slideElRef = useRef(null);\n const [slideClasses, setSlideClasses] = useState('swiper-slide');\n const [lazyLoaded, setLazyLoaded] = useState(false);\n function updateClasses(_s, el, classNames) {\n if (el === slideElRef.current) {\n setSlideClasses(classNames);\n }\n }\n useIsomorphicLayoutEffect(() => {\n if (typeof swiperSlideIndex !== 'undefined') {\n slideElRef.current.swiperSlideIndex = swiperSlideIndex;\n }\n if (externalRef) {\n externalRef.current = slideElRef.current;\n }\n if (!slideElRef.current || !swiper) {\n return;\n }\n if (swiper.destroyed) {\n if (slideClasses !== 'swiper-slide') {\n setSlideClasses('swiper-slide');\n }\n return;\n }\n swiper.on('_slideClass', updateClasses);\n // eslint-disable-next-line\n return () => {\n if (!swiper) return;\n swiper.off('_slideClass', updateClasses);\n };\n });\n useIsomorphicLayoutEffect(() => {\n if (swiper && slideElRef.current && !swiper.destroyed) {\n setSlideClasses(swiper.getSlideClasses(slideElRef.current));\n }\n }, [swiper]);\n const slideData = {\n isActive: slideClasses.indexOf('swiper-slide-active') >= 0,\n isVisible: slideClasses.indexOf('swiper-slide-visible') >= 0,\n isPrev: slideClasses.indexOf('swiper-slide-prev') >= 0,\n isNext: slideClasses.indexOf('swiper-slide-next') >= 0\n };\n const renderChildren = () => {\n return typeof children === 'function' ? children(slideData) : children;\n };\n const onLoad = () => {\n setLazyLoaded(true);\n };\n return /*#__PURE__*/React.createElement(Tag, _extends({\n ref: slideElRef,\n className: uniqueClasses(`${slideClasses}${className ? ` ${className}` : ''}`),\n \"data-swiper-slide-index\": virtualIndex,\n onLoad: onLoad\n }, rest), zoom && /*#__PURE__*/React.createElement(SwiperSlideContext.Provider, {\n value: slideData\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-zoom-container\",\n \"data-swiper-zoom\": typeof zoom === 'number' ? zoom : undefined\n }, renderChildren(), lazy && !lazyLoaded && /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-lazy-preloader\",\n ref: node => {\n if (node) node.lazyPreloaderManaged = true;\n }\n }))), !zoom && /*#__PURE__*/React.createElement(SwiperSlideContext.Provider, {\n value: slideData\n }, renderChildren(), lazy && !lazyLoaded && /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-lazy-preloader\",\n ref: node => {\n if (node) node.lazyPreloaderManaged = true;\n }\n })));\n});\nSwiperSlide.displayName = 'SwiperSlide';\n\nexport { Swiper, SwiperSlide, useSwiper, useSwiperSlide };\n"],"names":["_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","isChildSwiperSlide","child","type","displayName","includes","processChildren","c","slides","React","Children","toArray","forEach","push","props","children","slide","getChildren","slots","slot","foundSlides","useIsomorphicLayoutEffect","callback","deps","window","useEffect","useLayoutEffect","SwiperSlideContext","createContext","SwiperContext","Swiper","forwardRef","className","tag","Tag","wrapperTag","WrapperTag","onSwiper","rest","externalElRef","eventsAssigned","containerClasses","setContainerClasses","useState","virtualData","setVirtualData","breakpointChanged","setBreakpointChanged","initializedRef","useRef","swiperElRef","swiperRef","oldPassedParamsRef","oldSlides","nextElRef","prevElRef","paginationElRef","scrollbarElRef","params","swiperParams","passedParams","restProps","events","getParams","onBeforeBreakpoint","on","_containerClasses","swiper","classes","initSwiper","passParams","wrapperClass","current","Swiper$1","virtual","enabled","extendWith","cache","renderExternal","renderExternalUpdate","extend","originalParams","off","emitSlidesClasses","destroyed","mountSwiper","el","nextEl","prevEl","paginationEl","scrollbarEl","destroy","keys","eventName","changedParams","getChangedParams","updateSwiper","updateOnVirtualData","createElement","ref","uniqueClasses","Provider","value","getSlideIndex","index","slideIndex","style","isHorizontal","rtlTranslate","offset","top","from","to","loopFrom","loop","loopTo","slidesToRender","map","cloneElement","virtualIndex","renderVirtual","swiperSlideIndex","needsNavigation","Fragment","needsScrollbar","needsPagination","SwiperSlide","zoom","lazy","externalRef","slideElRef","slideClasses","setSlideClasses","lazyLoaded","setLazyLoaded","updateClasses","_s","classNames","getSlideClasses","slideData","isActive","indexOf","isVisible","isPrev","isNext","renderChildren","onLoad","undefined","node","lazyPreloaderManaged","useContext"],"mappings":"8NAiBA,SAASA,IAYP,OAXAA,EAAWC,OAAOC,OAASD,OAAOC,OAAOC,OAAS,SAAUC,GAC1D,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GACvB,IAAK,IAAII,KAAOD,EACVP,OAAOS,UAAUC,eAAeC,KAAKJ,EAAQC,KAC/CL,EAAOK,GAAOD,EAAOC,GAG3B,CACA,OAAOL,CACT,EACOJ,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AAW1D,UAAYL,EAAOiB,WAC1CgD,EAAgBjE,EAAOuE,gBAAgBR,EAAW1D,WAEnD,CAACL,IACJ,MAAMwE,EAAY,CAChBC,SAAUT,EAAaU,QAAQ,wBAA0B,EACzDC,UAAWX,EAAaU,QAAQ,yBAA2B,EAC3DE,OAAQZ,EAAaU,QAAQ,sBAAwB,EACrDG,OAAQb,EAAaU,QAAQ,sBAAwB,GAEjDI,EAAiB,IACM,mBAAblI,EAA0BA,EAAS4H,GAAa5H,EAKhE,OAAoBN,UAAMyF,cAAchE,EAAKhD,EAAS,CACpDiH,IAAK+B,EACLlG,UAAWoE,EAAAA,EAAc,GAAG+B,IAAenG,EAAY,IAAIA,IAAc,MACzE,0BAA2BuF,EAC3B2B,OAPa,KACbZ,GAAc,KAObhG,GAAOyF,GAAqBtH,EAAAA,QAAMyF,cAAcvE,EAAmB0E,SAAU,CAC9EC,MAAOqC,GACOlI,EAAAA,QAAMyF,cAAc,MAAO,CACzClE,UAAW,wBACX,mBAAoC,iBAAT+F,EAAoBA,OAAOoB,GACrDF,IAAkBjB,IAASK,GAA2B5H,EAAAA,QAAMyF,cAAc,MAAO,CAClFlE,UAAW,wBACXmE,IAAKiD,IACCA,IAAMA,EAAKC,sBAAuB,SAEnCtB,GAAqBtH,EAAAA,QAAMyF,cAAcvE,EAAmB0E,SAAU,CAC3EC,MAAOqC,GACNM,IAAkBjB,IAASK,GAA2B5H,EAAAA,QAAMyF,cAAc,MAAO,CAClFlE,UAAW,wBACXmE,IAAKiD,IACCA,IAAMA,EAAKC,sBAAuB,UAI5CvB,EAAY1H,YAAc,uEA9QR,IACTkJ,EAAAA,WAAWzH","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"swiper-react.js","sources":["../../../../node_modules/swiper/swiper-react.mjs"],"sourcesContent":["/**\n * Swiper React 12.2.0\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2026 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: May 27, 2026\n */\n\nimport React, { useEffect, useLayoutEffect, useContext, createContext, forwardRef, useState, useRef } from 'react';\nimport { S as Swiper$1 } from './shared/swiper-core.mjs';\nimport { g as getParams, m as mountSwiper, a as getChangedParams, u as updateOnVirtualData } from './shared/update-on-virtual-data.mjs';\nimport { d as uniqueClasses, w as wrapperClass, n as needsNavigation, b as needsScrollbar, a as needsPagination, e as extend, u as updateSwiper } from './shared/update-swiper.mjs';\n\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction isChildSwiperSlide(child) {\n return child.type && child.type.displayName && child.type.displayName.includes('SwiperSlide');\n}\nfunction processChildren(c) {\n const slides = [];\n React.Children.toArray(c).forEach(child => {\n if (isChildSwiperSlide(child)) {\n slides.push(child);\n } else if (child.props && child.props.children) {\n processChildren(child.props.children).forEach(slide => slides.push(slide));\n }\n });\n return slides;\n}\nfunction getChildren(c) {\n const slides = [];\n const slots = {\n 'container-start': [],\n 'container-end': [],\n 'wrapper-start': [],\n 'wrapper-end': []\n };\n React.Children.toArray(c).forEach(child => {\n if (isChildSwiperSlide(child)) {\n slides.push(child);\n } else if (child.props && child.props.slot && slots[child.props.slot]) {\n slots[child.props.slot].push(child);\n } else if (child.props && child.props.children) {\n const foundSlides = processChildren(child.props.children);\n if (foundSlides.length > 0) {\n foundSlides.forEach(slide => slides.push(slide));\n } else {\n slots['container-end'].push(child);\n }\n } else {\n slots['container-end'].push(child);\n }\n });\n return {\n slides,\n slots\n };\n}\n\nfunction renderVirtual(swiper, slides, virtualData) {\n if (!virtualData) return null;\n const getSlideIndex = index => {\n let slideIndex = index;\n if (index < 0) {\n slideIndex = slides.length + index;\n } else if (slideIndex >= slides.length) {\n // eslint-disable-next-line\n slideIndex = slideIndex - slides.length;\n }\n return slideIndex;\n };\n const style = swiper.isHorizontal() ? {\n [swiper.rtlTranslate ? 'right' : 'left']: `${virtualData.offset}px`\n } : {\n top: `${virtualData.offset}px`\n };\n const {\n from,\n to\n } = virtualData;\n const loopFrom = swiper.params.loop ? -slides.length : 0;\n const loopTo = swiper.params.loop ? slides.length * 2 : slides.length;\n const slidesToRender = [];\n for (let i = loopFrom; i < loopTo; i += 1) {\n if (i >= from && i <= to) {\n slidesToRender.push(slides[getSlideIndex(i)]);\n }\n }\n return slidesToRender.map((child, index) => {\n return /*#__PURE__*/React.cloneElement(child, {\n swiper,\n style,\n key: child.props.virtualIndex || child.key || `slide-${index}`\n });\n });\n}\n\nfunction useIsomorphicLayoutEffect(callback, deps) {\n // eslint-disable-next-line\n if (typeof window === 'undefined') return useEffect(callback, deps);\n return useLayoutEffect(callback, deps);\n}\n\nconst SwiperSlideContext = /*#__PURE__*/createContext(null);\nconst useSwiperSlide = () => {\n return useContext(SwiperSlideContext);\n};\nconst SwiperContext = /*#__PURE__*/createContext(null);\nconst useSwiper = () => {\n return useContext(SwiperContext);\n};\n\nconst Swiper = /*#__PURE__*/forwardRef(({\n className,\n tag: Tag = 'div',\n wrapperTag: WrapperTag = 'div',\n children,\n onSwiper,\n ...rest\n} = {}, externalElRef) => {\n let eventsAssigned = false;\n const [containerClasses, setContainerClasses] = useState('swiper');\n const [virtualData, setVirtualData] = useState(null);\n const [breakpointChanged, setBreakpointChanged] = useState(false);\n const initializedRef = useRef(false);\n const swiperElRef = useRef(null);\n const swiperRef = useRef(null);\n const oldPassedParamsRef = useRef(null);\n const oldSlides = useRef(null);\n const nextElRef = useRef(null);\n const prevElRef = useRef(null);\n const paginationElRef = useRef(null);\n const scrollbarElRef = useRef(null);\n const {\n params: swiperParams,\n passedParams,\n rest: restProps,\n events\n } = getParams(rest);\n const {\n slides,\n slots\n } = getChildren(children);\n const onBeforeBreakpoint = () => {\n setBreakpointChanged(!breakpointChanged);\n };\n Object.assign(swiperParams.on, {\n _containerClasses(swiper, classes) {\n setContainerClasses(classes);\n }\n });\n const initSwiper = () => {\n // init swiper\n Object.assign(swiperParams.on, events);\n eventsAssigned = true;\n const passParams = {\n ...swiperParams\n };\n delete passParams.wrapperClass;\n swiperRef.current = new Swiper$1(passParams);\n if (swiperRef.current.virtual && swiperRef.current.params.virtual.enabled) {\n swiperRef.current.virtual.slides = slides;\n const extendWith = {\n cache: false,\n slides,\n renderExternal: setVirtualData,\n renderExternalUpdate: false\n };\n extend(swiperRef.current.params.virtual, extendWith);\n extend(swiperRef.current.originalParams.virtual, extendWith);\n }\n };\n if (!swiperElRef.current) {\n initSwiper();\n }\n\n // Listen for breakpoints change\n if (swiperRef.current) {\n swiperRef.current.on('_beforeBreakpoint', onBeforeBreakpoint);\n }\n const attachEvents = () => {\n if (eventsAssigned || !events || !swiperRef.current) return;\n Object.keys(events).forEach(eventName => {\n swiperRef.current.on(eventName, events[eventName]);\n });\n };\n const detachEvents = () => {\n if (!events || !swiperRef.current) return;\n Object.keys(events).forEach(eventName => {\n swiperRef.current.off(eventName, events[eventName]);\n });\n };\n useEffect(() => {\n return () => {\n if (swiperRef.current) swiperRef.current.off('_beforeBreakpoint', onBeforeBreakpoint);\n };\n });\n\n // set initialized flag\n useEffect(() => {\n if (!initializedRef.current && swiperRef.current) {\n swiperRef.current.emitSlidesClasses();\n initializedRef.current = true;\n }\n });\n\n // mount swiper\n useIsomorphicLayoutEffect(() => {\n if (externalElRef) {\n externalElRef.current = swiperElRef.current;\n }\n if (!swiperElRef.current) return;\n if (swiperRef.current.destroyed) {\n initSwiper();\n }\n mountSwiper({\n el: swiperElRef.current,\n nextEl: nextElRef.current,\n prevEl: prevElRef.current,\n paginationEl: paginationElRef.current,\n scrollbarEl: scrollbarElRef.current,\n swiper: swiperRef.current\n }, swiperParams);\n if (onSwiper && !swiperRef.current.destroyed) onSwiper(swiperRef.current);\n // eslint-disable-next-line\n return () => {\n if (swiperRef.current && !swiperRef.current.destroyed) {\n swiperRef.current.destroy(true, false);\n }\n };\n }, []);\n\n // watch for params change\n useIsomorphicLayoutEffect(() => {\n attachEvents();\n const changedParams = getChangedParams(passedParams, oldPassedParamsRef.current, slides, oldSlides.current, c => c.key);\n oldPassedParamsRef.current = passedParams;\n oldSlides.current = slides;\n if (changedParams.length && swiperRef.current && !swiperRef.current.destroyed) {\n updateSwiper({\n swiper: swiperRef.current,\n slides,\n passedParams,\n changedParams,\n nextEl: nextElRef.current,\n prevEl: prevElRef.current,\n scrollbarEl: scrollbarElRef.current,\n paginationEl: paginationElRef.current\n });\n }\n return () => {\n detachEvents();\n };\n });\n\n // update on virtual update\n useIsomorphicLayoutEffect(() => {\n updateOnVirtualData(swiperRef.current);\n }, [virtualData]);\n\n // bypass swiper instance to slides\n function renderSlides() {\n if (swiperParams.virtual) {\n return renderVirtual(swiperRef.current, slides, virtualData);\n }\n return slides.map((child, index) => {\n return /*#__PURE__*/React.cloneElement(child, {\n swiper: swiperRef.current,\n swiperSlideIndex: index\n });\n });\n }\n return /*#__PURE__*/React.createElement(Tag, _extends({\n ref: swiperElRef,\n className: uniqueClasses(`${containerClasses}${className ? ` ${className}` : ''}`)\n }, restProps), /*#__PURE__*/React.createElement(SwiperContext.Provider, {\n value: swiperRef.current\n }, slots['container-start'], /*#__PURE__*/React.createElement(WrapperTag, {\n className: wrapperClass(swiperParams.wrapperClass)\n }, slots['wrapper-start'], renderSlides(), slots['wrapper-end']), needsNavigation(swiperParams) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n ref: prevElRef,\n className: \"swiper-button-prev\"\n }), /*#__PURE__*/React.createElement(\"div\", {\n ref: nextElRef,\n className: \"swiper-button-next\"\n })), needsScrollbar(swiperParams) && /*#__PURE__*/React.createElement(\"div\", {\n ref: scrollbarElRef,\n className: \"swiper-scrollbar\"\n }), needsPagination(swiperParams) && /*#__PURE__*/React.createElement(\"div\", {\n ref: paginationElRef,\n className: \"swiper-pagination\"\n }), slots['container-end']));\n});\nSwiper.displayName = 'Swiper';\n\nconst SwiperSlide = /*#__PURE__*/forwardRef(({\n tag: Tag = 'div',\n children,\n className = '',\n swiper,\n zoom,\n lazy,\n virtualIndex,\n swiperSlideIndex,\n ...rest\n} = {}, externalRef) => {\n const slideElRef = useRef(null);\n const [slideClasses, setSlideClasses] = useState('swiper-slide');\n const [lazyLoaded, setLazyLoaded] = useState(false);\n function updateClasses(_s, el, classNames) {\n if (el === slideElRef.current) {\n setSlideClasses(classNames);\n }\n }\n useIsomorphicLayoutEffect(() => {\n if (typeof swiperSlideIndex !== 'undefined') {\n slideElRef.current.swiperSlideIndex = swiperSlideIndex;\n }\n if (externalRef) {\n externalRef.current = slideElRef.current;\n }\n if (!slideElRef.current || !swiper) {\n return;\n }\n if (swiper.destroyed) {\n if (slideClasses !== 'swiper-slide') {\n setSlideClasses('swiper-slide');\n }\n return;\n }\n swiper.on('_slideClass', updateClasses);\n // eslint-disable-next-line\n return () => {\n if (!swiper) return;\n swiper.off('_slideClass', updateClasses);\n };\n });\n useIsomorphicLayoutEffect(() => {\n if (swiper && slideElRef.current && !swiper.destroyed) {\n setSlideClasses(swiper.getSlideClasses(slideElRef.current));\n }\n }, [swiper]);\n const slideData = {\n isActive: slideClasses.indexOf('swiper-slide-active') >= 0,\n isVisible: slideClasses.indexOf('swiper-slide-visible') >= 0,\n isFullyVisible: slideClasses.indexOf('swiper-slide-fully-visible') >= 0,\n isPrev: slideClasses.indexOf('swiper-slide-prev') >= 0,\n isNext: slideClasses.indexOf('swiper-slide-next') >= 0\n };\n const renderChildren = () => {\n return typeof children === 'function' ? children(slideData) : children;\n };\n const onLoad = () => {\n setLazyLoaded(true);\n };\n return /*#__PURE__*/React.createElement(Tag, _extends({\n ref: slideElRef,\n className: uniqueClasses(`${slideClasses}${className ? ` ${className}` : ''}`),\n \"data-swiper-slide-index\": virtualIndex,\n onLoad: onLoad\n }, rest), zoom && /*#__PURE__*/React.createElement(SwiperSlideContext.Provider, {\n value: slideData\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-zoom-container\",\n \"data-swiper-zoom\": typeof zoom === 'number' ? zoom : undefined\n }, renderChildren(), lazy && !lazyLoaded && /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-lazy-preloader\",\n ref: node => {\n if (node) node.lazyPreloaderManaged = true;\n }\n }))), !zoom && /*#__PURE__*/React.createElement(SwiperSlideContext.Provider, {\n value: slideData\n }, renderChildren(), lazy && !lazyLoaded && /*#__PURE__*/React.createElement(\"div\", {\n className: \"swiper-lazy-preloader\",\n ref: node => {\n if (node) node.lazyPreloaderManaged = true;\n }\n })));\n});\nSwiperSlide.displayName = 'SwiperSlide';\n\nexport { Swiper, SwiperSlide, useSwiper, useSwiperSlide };\n"],"names":["_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","isChildSwiperSlide","child","type","displayName","includes","processChildren","c","slides","React","Children","toArray","forEach","push","props","children","slide","getChildren","slots","slot","foundSlides","useIsomorphicLayoutEffect","callback","deps","window","useEffect","useLayoutEffect","SwiperSlideContext","createContext","SwiperContext","Swiper","forwardRef","className","tag","Tag","wrapperTag","WrapperTag","onSwiper","rest","externalElRef","eventsAssigned","containerClasses","setContainerClasses","useState","virtualData","setVirtualData","breakpointChanged","setBreakpointChanged","initializedRef","useRef","swiperElRef","swiperRef","oldPassedParamsRef","oldSlides","nextElRef","prevElRef","paginationElRef","scrollbarElRef","params","swiperParams","passedParams","restProps","events","getParams","onBeforeBreakpoint","on","_containerClasses","swiper","classes","initSwiper","passParams","wrapperClass","current","Swiper$1","virtual","enabled","extendWith","cache","renderExternal","renderExternalUpdate","extend","originalParams","off","emitSlidesClasses","destroyed","mountSwiper","el","nextEl","prevEl","paginationEl","scrollbarEl","destroy","keys","eventName","changedParams","getChangedParams","updateSwiper","updateOnVirtualData","createElement","ref","uniqueClasses","Provider","value","getSlideIndex","index","slideIndex","style","isHorizontal","rtlTranslate","offset","top","from","to","loopFrom","loop","loopTo","slidesToRender","map","cloneElement","virtualIndex","renderVirtual","swiperSlideIndex","needsNavigation","Fragment","needsScrollbar","needsPagination","SwiperSlide","zoom","lazy","externalRef","slideElRef","slideClasses","setSlideClasses","lazyLoaded","setLazyLoaded","updateClasses","_s","classNames","getSlideClasses","slideData","isActive","indexOf","isVisible","isFullyVisible","isPrev","isNext","renderChildren","onLoad","undefined","node","lazyPreloaderManaged","useContext"],"mappings":"8NAiBA,SAASA,IAYP,OAXAA,EAAWC,OAAOC,OAASD,OAAOC,OAAOC,OAAS,SAAUC,GAC1D,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GACvB,IAAK,IAAII,KAAOD,EACVP,OAAOS,UAAUC,eAAeC,KAAKJ,EAAQC,KAC/CL,EAAOK,GAAOD,EAAOC,GAG3B,CACA,OAAOL,CACT,EACOJ,EAASa,MAAMC,KAAMR,UAC9B,CAEA,SAASS,EAAmBC,GAC1B,OAAOA,EAAMC,MAAQD,EAAMC,KAAKC,aAAeF,EAAMC,KAAKC,YAAYC,SAAS,cACjF,CACA,SAASC,EAAgBC,GACvB,MAAMC,EAAS,GAQf,OAPAC,EAAAA,QAAMC,SAASC,QAAQJ,GAAGK,QAAQV,IAC5BD,EAAmBC,GACrBM,EAAOK,KAAKX,GACHA,EAAMY,OAASZ,EAAMY,MAAMC,UACpCT,EAAgBJ,EAAMY,MAAMC,UAAUH,QAAQI,GAASR,EAAOK,KAAKG,MAGhER,CACT,CACA,SAASS,EAAYV,GACnB,MAAMC,EAAS,GACTU,EAAQ,CACZ,kBAAmB,GACnB,gBAAiB,GACjB,gBAAiB,GACjB,cAAe,IAkBjB,OAhBAT,EAAAA,QAAMC,SAASC,QAAQJ,GAAGK,QAAQV,IAChC,GAAID,EAAmBC,GACrBM,EAAOK,KAAKX,QACP,GAAIA,EAAMY,OAASZ,EAAMY,MAAMK,MAAQD,EAAMhB,EAAMY,MAAMK,MAC9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iBAAT+F,EAAoBA,OAAOqB,GACrDF,IAAkBlB,IAASK,GAA2B5H,EAAAA,QAAMyF,cAAc,MAAO,CAClFlE,UAAW,wBACXmE,IAAKkD,IACCA,IAAMA,EAAKC,sBAAuB,SAEnCvB,GAAqBtH,EAAAA,QAAMyF,cAAcvE,EAAmB0E,SAAU,CAC3EC,MAAOqC,GACNO,IAAkBlB,IAASK,GAA2B5H,EAAAA,QAAMyF,cAAc,MAAO,CAClFlE,UAAW,wBACXmE,IAAKkD,IACCA,IAAMA,EAAKC,sBAAuB,UAI5CxB,EAAY1H,YAAc,uEA/QR,IACTmJ,EAAAA,WAAW1H","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import{jsx as a}from"react/jsx-runtime";import{Box as e,useTheme as o}from"@mui/material";import{forwardRef as r}from"react";import{agGridVariables as i}from"./agGridVariables.js";import{skodaAgThemeParams as t}from"./agGridSkodaTheme.js";import{agGridCssIcons as n}from"./agGridIcons.js";import{sxOverride as l}from"../../utils/sxOverride/sxOverride.js";const g=a=>{const e=t(a);return{width:"100%","*":{maxWidth:"none"},'&:not(:has([class*="ag-theme-params-"])),&.ag-theme-material':{...i(a)},".ag-row-last":{borderBottom:"none"},".ag-column-last .ag-header-cell-resize":{display:"none"},..."ltr"===a.direction&&{".ag-center-cols-container":{minWidth:"100%"}},".ag-center-cols-viewport":{minHeight:"56px"},"& .ag-header-cell .ag-header-cell-text":{fontWeight:`${e.headerFontWeight}`},"& .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden":{display:"block !important",cursor:"initial"},"& .ag-pinned-left-header .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden, & .ag-pinned-right-header .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden":{display:"none !important"},"@supports selector(::-webkit-scrollbar)":{"& .ag-body-horizontal-scroll":{alignItems:"center",borderTop:"1px solid",borderTopColor:a.palette.surface.secondary,maxHeight:"none !important",height:"auto !important"},"& .ag-body-horizontal-scroll .ag-body-horizontal-scroll-viewport":{height:"48px !important",maxHeight:"48px !important",minHeight:"48px !important"},"& .ag-body-horizontal-scroll-viewport::-webkit-scrollbar:horizontal":{height:"48px"},"& .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:horizontal, & .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-track:horizontal":{borderWidth:"22px"},"& .ag-body-horizontal-scroll.ag-invisible .ag-body-horizontal-scroll-viewport":{height:"0 !important",maxHeight:"0 !important",minHeight:"0 !important",overflow:"hidden"},"& .ag-body-horizontal-scroll .ag-horizontal-left-spacer, & .ag-body-horizontal-scroll .ag-horizontal-right-spacer":{overflow:"hidden"}},"& .ag-paging-panel":{justifyContent:"center",px:"24px"},"& .ag-paging-panel .ag-paging-page-size":{position:"absolute"},"& .ag-paging-panel .ag-paging-page-summary-panel":{marginLeft:"auto"},"& .ag-paging-row-summary-panel":{display:"none"},"& .ag-paging-description":{fontSize:"18px",px:"18px"},"& .ag-paging-panel .ag-paging-description span":{color:"text.primary",px:"2px"},"& .ag-paging-panel .ag-paging-description .ag-paging-number":{fontWeight:"700"},"& .ag-paging-panel .ag-paging-description span:last-child":{fontWeight:"300"},"& .ag-paging-panel .ag-icon-first, & .ag-paging-panel .ag-icon-last":{display:"none"},"& .ag-paging-panel .ag-picker-field-wrapper":{border:"none",px:"0",cursor:"pointer",minWidth:"auto"},"& .ag-paging-panel .ag-picker-field-display":{minWidth:"28px",width:"auto",pr:"6px",fontSize:"18px",fontWeight:"700",textAlign:"center"},"& .ag-paging-panel .ag-label":{mr:"6px",fontSize:"18px"},"& .ag-popup > *":{backgroundColor:"onSurface.os0",cursor:"pointer",borderRadius:"0px"},"& .ag-selectable .ag-cell":{cursor:"auto"},"& .skoda-ag-row-pointer .ag-row:hover, & .skoda-ag-row-pointer .ag-row:hover .ag-cell":{cursor:"pointer"},...n,"& .ag-icon-asc, & .ag-icon-desc":{color:a.palette.onSurface.os600},"& .ag-icon-asc:hover, & .ag-icon-desc:hover":{color:a.palette.text.primary},"& .ag-header-cell-sortable .ag-sort-indicator-container:has(.ag-sort-descending-icon.ag-hidden) .ag-hidden:has(.ag-icon-asc)":{display:"inline-block !important"},fontFamily:e.fontFamily}},p=()=>({domLayout:"autoHeight",animateRows:!1,suppressDragLeaveHidesColumns:!0,enableRtl:"rtl"===o().direction,enableCellTextSelection:!0}),s=r(({sx:o,children:r,...i},t)=>a(e,{sx:l(a=>({...g(a)}),o),ref:t,...i,children:r}));export{s as SkodaAgGridProvider,g as agGridStyles,p as useSkodaAgGridProps};
1
+ import{jsx as a}from"react/jsx-runtime";import{Box as e,useTheme as o}from"@mui/material";import{forwardRef as t}from"react";import{agGridVariables as r}from"./agGridVariables.js";import{skodaAgThemeParams as i}from"./agGridSkodaTheme.js";import{agGridCssIcons as n}from"./agGridIcons.js";import{sxOverride as l}from"../../utils/sxOverride/sxOverride.js";import{getInteractiveStyle as g}from"../../materialui/button/interactive.js";import{getFocusRingStyle as p}from"../focusring/focusring.js";const d=a=>{const e=i(a);return{width:"100%","*":{maxWidth:"none"},'&:not(:has([class*="ag-theme-params-"])),&.ag-theme-material':{...r(a)},".ag-row-last":{borderBottom:"none"},".ag-row-last > .ag-grid-pinned-left-cells, .ag-row-last > .ag-grid-scrolling-cells, .ag-row-last > .ag-grid-pinned-right-cells":{borderBottom:"none"},".ag-column-last .ag-header-cell-resize":{display:"none"},..."ltr"===a.direction&&{".ag-center-cols-container":{minWidth:"100%"},".ag-row:not(.ag-full-width-row, .ag-row-last)::after":{borderBottom:"var(--ag-row-border)"}},".ag-row-selected:not(.ag-full-width-row)::after":{backgroundColor:"var(--ag-selected-row-background-color)",backgroundClip:"padding-box"},".ag-row-hover:not(.ag-full-width-row)::after":{backgroundColor:"var(--ag-row-hover-color)",backgroundClip:"padding-box"},".ag-center-cols-viewport":{minHeight:`${e.autoHeightMinBodyHeight}px`},"& .ag-header-cell .ag-header-cell-text":{fontWeight:`${e.headerFontWeight}`},"& .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden":{display:"block !important",cursor:"initial"},"& .ag-pinned-left-header .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden, & .ag-pinned-right-header .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden, & .ag-header .ag-grid-pinned-left-cells .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden, & .ag-header .ag-grid-pinned-right-cells .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden":{display:"none !important"},"@supports selector(::-webkit-scrollbar)":{"& .ag-body-horizontal-scroll":{alignItems:"center",borderTop:"1px solid",borderTopColor:a.palette.surface.secondary,maxHeight:"none !important",height:"auto !important"},"& .ag-body-horizontal-scroll.ag-scrollbar-invisible":{position:"static",opacity:"1"},"& .ag-body-horizontal-scroll .ag-body-horizontal-scroll-viewport":{height:"48px !important",maxHeight:"48px !important",minHeight:"48px !important"},"& .ag-body-horizontal-scroll-viewport::-webkit-scrollbar:horizontal":{height:"48px"},"& .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:horizontal, & .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-track:horizontal":{borderWidth:"22px"},"& .ag-body-horizontal-scroll.ag-invisible":{borderTop:"none"},"& .ag-body-horizontal-scroll.ag-invisible .ag-body-horizontal-scroll-viewport":{height:"0 !important",maxHeight:"0 !important",minHeight:"0 !important",overflow:"hidden"},"& .ag-body-horizontal-scroll .ag-horizontal-left-spacer, & .ag-body-horizontal-scroll .ag-horizontal-right-spacer, & .ag-body-horizontal-scroll .ag-body-horizontal-scroll-end-spacer":{overflow:"hidden"}},"& .ag-paging-panel":{height:"auto"},"& .ag-paging-panel .ag-paging-panel-content":{position:"relative",justifyContent:"center",width:"100%",gap:"16px",[a.breakpoints.up("md")]:{minHeight:"var(--ag-pagination-panel-height)",padding:"4px 24px"},[a.breakpoints.down("md")]:{flexWrap:"wrap",minHeight:"0",padding:"8px 16px"}},"& .ag-paging-panel .ag-paging-panel-content::before, & .ag-paging-panel:not(:has(.ag-paging-panel-content))::before":{content:'""',flexGrow:"1",flexBasis:"auto"},"& .ag-paging-panel .ag-paging-page-summary-panel":{m:"0",display:"flex",alignItems:"center",justifyContent:"flex-end",flexGrow:"1",gap:"0",[a.breakpoints.down("md")]:{flexBasis:"100%",justifyContent:"center"}},"& .ag-paging-row-summary-panel":{display:"none"},"& .ag-paging-panel .ag-paging-description":{...a.typography.body,minWidth:"82px",height:"44px",display:"flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",mx:"4px",p:"0",color:"dark"===a.palette.mode?a.palette.onSurface.os300:a.palette.onSurface.os700},"& .ag-paging-panel .ag-paging-description .ag-paging-number":{color:"text.primary",fontWeight:"700"},"& .ag-paging-panel .ag-paging-description .ag-number-field-input":{border:"none",p:"0",height:"auto",textAlign:"center",fontWeight:"700",mx:"-1.25ch",background:"transparent","&:focus":{boxShadow:"none"}},'& .ag-paging-panel .ag-paging-description [id$="-of-page"]:not(:empty)':{fontWeight:"400",m:"0 4px"},'& .ag-paging-panel .ag-paging-description [id$="-start-page"]:not(:empty)':{mr:"4px"},"& .ag-paging-panel .ag-paging-description span:last-child":{color:"inherit",fontWeight:"300"},"& .ag-paging-panel .ag-paging-button":{position:"relative",boxShadow:"none",outline:"none",width:"44px",height:"44px",borderRadius:"1000px",maxWidth:"none",transition:"all 0.3s ease-out",flexShrink:"0","&:hover":{boxShadow:"none"},"&&:active":{boxShadow:"none"},...g({backgroundColor:"transparent"},{backgroundColor:a.palette.transparent.secondary},void 0,void 0,":focus-visible:not(.ag-disabled)"),...p(a,!0,0,":focus-visible:not(.ag-disabled)"),"&.ag-disabled":{opacity:"1",color:a.palette.disabled.primary,pointerEvents:"none"},display:"flex",alignItems:"center",justifyContent:"center","--ag-icon-size":"20px","&:first-of-type, &:last-of-type":{display:"none"}},"& .ag-paging-panel .ag-picker-field-wrapper":{border:"none",px:"0",cursor:"pointer",minWidth:"auto",borderRadius:"4px"},"& .ag-paging-panel .ag-picker-field-display":{fontSize:"16px",fontWeight:700,pl:"4px"},"& .ag-paging-panel .ag-picker-field-icon":{ml:"8px",mr:"12px"},"& .ag-paging-panel .ag-label":{...a.typography.body,mr:"16px"},"& .ag-popup > *":{backgroundColor:"onSurface.os0",cursor:"pointer",borderRadius:"0px"},"& .ag-popup .ag-select-list":{border:"none",p:"0",boxShadow:"0px 2px 25px 0px rgba(0, 0, 0, 0.15)","--ag-list-item-height":"48px"},"& .ag-popup .ag-select-list .ag-list-item-text":{overflow:"visible",textOverflow:"clip"},"& .ag-popup .ag-select-list .ag-list-item":{p:"12px",cursor:"pointer",color:a.palette.text.primary,fontSize:"16px",lineHeight:"24px",fontWeight:"400",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",...g({backgroundColor:"dark"===a.palette.mode?a.palette.onSurface.os800:a.palette.background.primary},{backgroundColor:a.palette.surface.primary},{backgroundColor:a.palette.surface.secondary},void 0,".ag-active-item")},"& .ag-selectable .ag-cell":{cursor:"auto"},"& .skoda-ag-row-pointer .ag-row:hover, & .skoda-ag-row-pointer .ag-row:hover .ag-cell":{cursor:"pointer"},"& .ag-row:has(.ag-cell-wrap-text)":{"--ag-line-height":"24px","& .ag-cell":{py:"15px"}},...n,"& .ag-icon-asc, & .ag-icon-desc":{color:a.palette.onSurface.os600},"& .ag-icon-asc:hover, & .ag-icon-desc:hover":{color:a.palette.text.primary},"& .ag-header-cell-sortable .ag-sort-indicator-container:has(.ag-sort-descending-icon.ag-hidden) .ag-hidden:has(.ag-icon-asc)":{display:"inline-block !important"},fontFamily:e.fontFamily}},s=()=>({domLayout:"autoHeight",animateRows:!1,suppressDragLeaveHidesColumns:!0,enableRtl:"rtl"===o().direction,enableCellTextSelection:!0}),c=t(({sx:o,children:t,...r},i)=>a(e,{sx:l(a=>({...d(a)}),o),ref:i,...r,children:t}));export{c as SkodaAgGridProvider,d as agGridStyles,s as useSkodaAgGridProps};
2
2
  //# sourceMappingURL=agGrid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agGrid.js","sources":["../../../src/components/advancedTable/agGrid.tsx"],"sourcesContent":["import { Box, BoxProps, CSSObject, Theme, useTheme } from '@mui/material';\nimport React, { forwardRef } from 'react';\nimport { agGridVariables } from './agGridVariables';\nimport { skodaAgThemeParams } from './agGridSkodaTheme';\nimport { agGridCssIcons } from './agGridIcons';\nimport { sxOverride } from '@/src/utils/sxOverride';\n\nexport const agGridStyles = (theme: Theme): CSSObject => {\n const agTheme = skodaAgThemeParams(theme);\n\n return {\n width: '100%',\n // support applying global style on all elements maxWidth: '100%'\n '*': {\n maxWidth: 'none',\n },\n // Apply CSS variables only for non-themed tables of the old versions of ag grid (old versions of ag-grid, <v33, themes does not have ag-theme-params-* class)\n '&:not(:has([class*=\"ag-theme-params-\"])),&.ag-theme-material': {\n ...agGridVariables(theme),\n },\n\n '.ag-row-last': { borderBottom: 'none' },\n '.ag-column-last .ag-header-cell-resize': { display: 'none' },\n\n // Row lines full width (not in RTL where it causes layout issues)\n ...(theme.direction === 'ltr' && {\n '.ag-center-cols-container': {\n minWidth: '100%',\n },\n }),\n\n '.ag-center-cols-viewport': {\n // reduce to 1 row from default 150px\n minHeight: '56px',\n },\n\n // # Header styles\n '& .ag-header-cell .ag-header-cell-text': {\n fontWeight: `${agTheme.headerFontWeight}`,\n },\n\n // # Header Separators (only when column resizing is not activated and not for the last column)\n '& .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden': {\n display: 'block !important', // beats AG Grid's .ag-hidden display: none !important\n cursor: 'initial',\n },\n // No separator on pinned columns - ag-column-last only marks the grid's last column, so the rule\n // above would otherwise force one onto them. The pinned section already has its own divider.\n '& .ag-pinned-left-header .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden, & .ag-pinned-right-header .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden':\n {\n display: 'none !important',\n },\n\n // # Horizontal Scrollbar\n // Webkit only: relies on ::-webkit-scrollbar. Firefox falls back to the baseline thin scrollbar.\n '@supports selector(::-webkit-scrollbar)': {\n '& .ag-body-horizontal-scroll': {\n alignItems: 'center',\n borderTop: '1px solid',\n borderTopColor: theme.palette.surface.secondary,\n maxHeight: 'none !important',\n height: 'auto !important',\n },\n // Tall scrollbar inset via the thumb/track border (like MuiTableContainer), so the viewport\n // keeps full width and the proxy stays in sync with the grid body. !important beats AG Grid's\n // inline height, which it pins to the ~8px scrollbar width.\n '& .ag-body-horizontal-scroll .ag-body-horizontal-scroll-viewport': {\n // 4px visible bar + 2x 22px transparent margin\n height: '48px !important',\n maxHeight: '48px !important',\n minHeight: '48px !important',\n },\n '& .ag-body-horizontal-scroll-viewport::-webkit-scrollbar:horizontal': {\n height: '48px',\n },\n '& .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:horizontal, & .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-track:horizontal':\n {\n borderWidth: '22px',\n },\n // No overflow: re-collapse the viewport, otherwise our !important height keeps a tall empty band.\n '& .ag-body-horizontal-scroll.ag-invisible .ag-body-horizontal-scroll-viewport': {\n height: '0 !important',\n maxHeight: '0 !important',\n minHeight: '0 !important',\n overflow: 'hidden',\n },\n // Hide the stray scrollbar the pinned spacers render via their own overflow-x: scroll.\n '& .ag-body-horizontal-scroll .ag-horizontal-left-spacer, & .ag-body-horizontal-scroll .ag-horizontal-right-spacer':\n {\n overflow: 'hidden',\n },\n },\n\n // # Pagination styles\n '& .ag-paging-panel': {\n justifyContent: 'center',\n px: '24px',\n },\n\n // Pagination layout - rows per page centered, arrows right-aligned\n '& .ag-paging-panel .ag-paging-page-size': {\n position: 'absolute',\n },\n '& .ag-paging-panel .ag-paging-page-summary-panel': {\n marginLeft: 'auto',\n },\n\n // Disable pagination summary\n '& .ag-paging-row-summary-panel': {\n display: 'none',\n },\n\n // Text styling within pagination arrows\n '& .ag-paging-description': {\n fontSize: '18px',\n px: '18px',\n },\n '& .ag-paging-panel .ag-paging-description span': {\n color: 'text.primary',\n px: '2px',\n },\n '& .ag-paging-panel .ag-paging-description .ag-paging-number': {\n fontWeight: '700',\n },\n '& .ag-paging-panel .ag-paging-description span:last-child': {\n fontWeight: '300',\n },\n\n // Disable AG-grid pagination icons - start, end\n '& .ag-paging-panel .ag-icon-first, & .ag-paging-panel .ag-icon-last': {\n display: 'none',\n },\n\n // Pagination - rows per page\n '& .ag-paging-panel .ag-picker-field-wrapper': {\n border: 'none',\n px: '0',\n cursor: 'pointer',\n minWidth: 'auto',\n },\n '& .ag-paging-panel .ag-picker-field-display': {\n minWidth: '28px',\n width: 'auto',\n pr: '6px',\n fontSize: '18px',\n fontWeight: '700',\n textAlign: 'center',\n },\n '& .ag-paging-panel .ag-label': {\n mr: '6px',\n fontSize: '18px',\n },\n\n '& .ag-popup > *': {\n backgroundColor: 'onSurface.os0',\n cursor: 'pointer',\n borderRadius: '0px',\n },\n\n // Let the cursor reflect content (I-beam over text, default elsewhere) - AG Grid forces\n // cursor: default on the root. ag-selectable is present only when enableCellTextSelection is on.\n '& .ag-selectable .ag-cell': {\n cursor: 'auto',\n },\n\n // # Opt-in className=\"skoda-ag-pointer\"\n // Cell-level so it wins over the .ag-cell text cursor above (the cell sets its own cursor).\n '& .skoda-ag-row-pointer .ag-row:hover, & .skoda-ag-row-pointer .ag-row:hover .ag-cell': {\n cursor: 'pointer',\n },\n\n // Additional icons\n ...agGridCssIcons,\n\n // Show icons according to the SkodaFlow design\n '& .ag-icon-asc, & .ag-icon-desc': {\n color: theme.palette.onSurface.os600,\n },\n '& .ag-icon-asc:hover, & .ag-icon-desc:hover': {\n color: theme.palette.text.primary,\n },\n '& .ag-header-cell-sortable .ag-sort-indicator-container:has(.ag-sort-descending-icon.ag-hidden) .ag-hidden:has(.ag-icon-asc)':\n {\n display: 'inline-block !important', // Ag grid also uses !important so we have to override it\n },\n\n // Legacy class approach, no theme\n fontFamily: agTheme.fontFamily,\n };\n};\n\n/**\n * Pre-configured SkodaFlow AG Grid props.\n *\n * Note: the AG Grid `theme` is intentionally NOT provided here. Building the theme requires\n * imports from `ag-grid-community` (`themeQuartz`, `iconOverrides`), which we do not want to pull\n * in as a direct dependency of the library. The consuming project should build the theme with the\n * exported `skodaAgThemeParams` and `skodaAgGridIconOverrides` helpers and pass it to `AgGridReact`.\n */\nexport const useSkodaAgGridProps = () => {\n const theme = useTheme();\n\n return {\n domLayout: 'autoHeight' as const,\n animateRows: false,\n suppressDragLeaveHidesColumns: true,\n enableRtl: theme.direction === 'rtl',\n // allow selecting/copying cell text (off in AG Grid by default)\n enableCellTextSelection: true,\n };\n};\n\ninterface SkodaAgGridProviderProps extends BoxProps {}\n\n/**\n * A provider wrapper that applies Skoda AG Grid theming via sx.\n */\nexport const SkodaAgGridProvider: React.FC<SkodaAgGridProviderProps> = forwardRef(({ sx, children, ...rest }, ref) => {\n return (\n <Box\n sx={sxOverride(\n (theme) => ({\n ...agGridStyles(theme),\n }),\n sx,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Box>\n );\n});\n"],"names":["agGridStyles","theme","agTheme","skodaAgThemeParams","width","maxWidth","agGridVariables","borderBottom","display","direction","minWidth","minHeight","fontWeight","headerFontWeight","cursor","alignItems","borderTop","borderTopColor","palette","surface","secondary","maxHeight","height","borderWidth","overflow","justifyContent","px","position","marginLeft","fontSize","color","border","pr","textAlign","mr","backgroundColor","borderRadius","agGridCssIcons","onSurface","os600","text","primary","fontFamily","useSkodaAgGridProps","domLayout","animateRows","suppressDragLeaveHidesColumns","enableRtl","useTheme","enableCellTextSelection","SkodaAgGridProvider","forwardRef","sx","children","rest","ref","_jsx","Box","sxOverride"],"mappings":"mWAOO,MAAMA,EAAgBC,IAC3B,MAAMC,EAAUC,EAAmBF,GAEnC,MAAO,CACLG,MAAO,OAEP,IAAK,CACHC,SAAU,QAGZ,+DAAgE,IAC3DC,EAAgBL,IAGrB,eAAgB,CAAEM,aAAc,QAChC,yCAA0C,CAAEC,QAAS,WAG7B,QAApBP,EAAMQ,WAA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QsB,KAAKC,SAE5B,+HACE,CACEjC,QAAS,2BAIbkC,WAAYxC,EAAQwC,aAYXC,EAAsB,KAG1B,CACLC,UAAW,aACXC,aAAa,EACbC,+BAA+B,EAC/BC,UAA+B,QANnBC,IAMKvC,UAEjBwC,yBAAyB,IAShBC,EAA0DC,EAAW,EAAGC,KAAIC,cAAaC,GAAQC,IAE1GC,EAACC,EAAG,CACFL,GAAIM,EACDzD,IAAK,IACDD,EAAaC,KAElBmD,GAEFG,IAAKA,KACDD,EAAID,SAEPA"}
1
+ {"version":3,"file":"agGrid.js","sources":["../../../src/components/advancedTable/agGrid.tsx"],"sourcesContent":["import { Box, BoxProps, CSSObject, Theme, useTheme } from '@mui/material';\nimport React, { forwardRef } from 'react';\nimport { agGridVariables } from './agGridVariables';\nimport { skodaAgThemeParams } from './agGridSkodaTheme';\nimport { agGridCssIcons } from './agGridIcons';\nimport { sxOverride } from '@/src/utils/sxOverride';\nimport { getInteractiveStyle } from '@/src/materialui/button/interactive';\nimport { getFocusRingStyle } from '@/src/components/focusring/focusring';\n\nexport const agGridStyles = (theme: Theme): CSSObject => {\n const agTheme = skodaAgThemeParams(theme);\n\n return {\n width: '100%',\n // support applying global style on all elements maxWidth: '100%'\n '*': {\n maxWidth: 'none',\n },\n // Apply CSS variables only for non-themed tables of the old versions of ag grid (old versions of ag-grid, <v33, themes does not have ag-theme-params-* class)\n '&:not(:has([class*=\"ag-theme-params-\"])),&.ag-theme-material': {\n ...agGridVariables(theme),\n },\n\n '.ag-row-last': { borderBottom: 'none' },\n // support for AgGrid v36+\n '.ag-row-last > .ag-grid-pinned-left-cells, .ag-row-last > .ag-grid-scrolling-cells, .ag-row-last > .ag-grid-pinned-right-cells':\n {\n borderBottom: 'none',\n },\n '.ag-column-last .ag-header-cell-resize': { display: 'none' },\n\n // Row lines full width (not in RTL where it causes layout issues)\n ...(theme.direction === 'ltr' && {\n '.ag-center-cols-container': {\n minWidth: '100%',\n },\n // v36: the separator needs to be set also on pseudo-element to cover the rest of the width\n '.ag-row:not(.ag-full-width-row, .ag-row-last)::after': {\n borderBottom: 'var(--ag-row-border)',\n },\n }),\n\n // makes selected and hover cell full width, by also using :after element and not just :before\n '.ag-row-selected:not(.ag-full-width-row)::after': {\n backgroundColor: 'var(--ag-selected-row-background-color)',\n backgroundClip: 'padding-box',\n },\n '.ag-row-hover:not(.ag-full-width-row)::after': {\n backgroundColor: 'var(--ag-row-hover-color)',\n backgroundClip: 'padding-box',\n },\n\n '.ag-center-cols-viewport': {\n // up to v35 only - v36 moved this minimum onto autoHeightMinBodyHeight theme parameter\n minHeight: `${agTheme.autoHeightMinBodyHeight}px`,\n },\n\n // # Header styles\n '& .ag-header-cell .ag-header-cell-text': {\n fontWeight: `${agTheme.headerFontWeight}`,\n },\n\n // # Header Separators (only when column resizing is not activated and not for the last column)\n '& .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden': {\n display: 'block !important', // beats AG Grid's .ag-hidden display: none !important\n cursor: 'initial',\n },\n // No separator on pinned columns - ag-column-last only marks the grid's last column, so the rule\n // above would otherwise force one onto them. The pinned section already has its own divider.\n // up to v35: .ag-pinned-*-header, .ag-grid-pinned-*-cells from v36.\n '& .ag-pinned-left-header .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden, & .ag-pinned-right-header .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden, & .ag-header .ag-grid-pinned-left-cells .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden, & .ag-header .ag-grid-pinned-right-cells .ag-header-cell:not(.ag-column-last) > .ag-header-cell-resize.ag-hidden':\n {\n display: 'none !important',\n },\n\n // # Horizontal Scrollbar\n // Webkit only: relies on ::-webkit-scrollbar. Firefox falls back to the baseline thin scrollbar.\n '@supports selector(::-webkit-scrollbar)': {\n '& .ag-body-horizontal-scroll': {\n alignItems: 'center',\n borderTop: '1px solid',\n borderTopColor: theme.palette.surface.secondary,\n maxHeight: 'none !important',\n height: 'auto !important',\n },\n // overlay scrollbar platforms (Android): keep the collapsed proxy in the layout,\n // our styled scrollbar renders there anyway\n '& .ag-body-horizontal-scroll.ag-scrollbar-invisible': {\n position: 'static',\n opacity: '1',\n },\n // Tall scrollbar inset via the thumb/track border (like MuiTableContainer), so the viewport\n // keeps full width and the proxy stays in sync with the grid body. !important beats AG Grid's\n // inline height, which it pins to the ~8px scrollbar width.\n '& .ag-body-horizontal-scroll .ag-body-horizontal-scroll-viewport': {\n // 4px visible bar + 2x 22px transparent margin\n height: '48px !important',\n maxHeight: '48px !important',\n minHeight: '48px !important',\n },\n '& .ag-body-horizontal-scroll-viewport::-webkit-scrollbar:horizontal': {\n height: '48px',\n },\n '& .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:horizontal, & .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-track:horizontal':\n {\n borderWidth: '22px',\n },\n // No overflow: the separator above the scrollbar has nothing to separate\n '& .ag-body-horizontal-scroll.ag-invisible': {\n borderTop: 'none',\n },\n // No overflow: re-collapse the viewport, otherwise our !important height keeps a tall empty band.\n '& .ag-body-horizontal-scroll.ag-invisible .ag-body-horizontal-scroll-viewport': {\n height: '0 !important',\n maxHeight: '0 !important',\n minHeight: '0 !important',\n overflow: 'hidden',\n },\n // Hide the stray scrollbar the pinned spacers render via their own overflow-x: scroll.\n // v36: replaced the two pinned spacers with a single end spacer.\n '& .ag-body-horizontal-scroll .ag-horizontal-left-spacer, & .ag-body-horizontal-scroll .ag-horizontal-right-spacer, & .ag-body-horizontal-scroll .ag-body-horizontal-scroll-end-spacer':\n {\n overflow: 'hidden',\n },\n },\n\n // # Pagination styles\n '& .ag-paging-panel': {\n // v36 pins paginationPanelHeight here as a fixed height, which stops the toolbar from\n // wrapping onto a second row. The parameter drives min-height on the toolbar instead.\n height: 'auto',\n },\n\n '& .ag-paging-panel .ag-paging-panel-content': {\n position: 'relative',\n justifyContent: 'center',\n width: '100%',\n gap: '16px',\n [theme.breakpoints.up('md')]: {\n minHeight: 'var(--ag-pagination-panel-height)',\n padding: '4px 24px',\n },\n [theme.breakpoints.down('md')]: {\n flexWrap: 'wrap',\n minHeight: '0',\n padding: '8px 16px',\n },\n },\n\n // stands in for MuiTablePagination-spacer, it takes the free space on the left so that rows\n // per page stays on the right for as long as it fits.\n '& .ag-paging-panel .ag-paging-panel-content::before, & .ag-paging-panel:not(:has(.ag-paging-panel-content))::before':\n {\n content: '\"\"',\n flexGrow: '1',\n flexBasis: 'auto',\n },\n\n '& .ag-paging-panel .ag-paging-page-summary-panel': {\n m: '0',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n flexGrow: '1',\n gap: '0',\n [theme.breakpoints.down('md')]: {\n flexBasis: '100%',\n justifyContent: 'center',\n },\n },\n\n // Disable pagination summary\n '& .ag-paging-row-summary-panel': {\n display: 'none',\n },\n\n // Page indicator between the arrows, mirrors MuiTablePagination-displayedRows\n '& .ag-paging-panel .ag-paging-description': {\n ...theme.typography.body,\n // it keeps the arrows from jumping while the page number is\n // short, and lets the indicator push them apart once it outgrows it.\n minWidth: '82px',\n height: '44px',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n whiteSpace: 'nowrap',\n mx: '4px',\n p: '0',\n color: theme.palette.mode === 'dark' ? theme.palette.onSurface.os300 : theme.palette.onSurface.os700,\n },\n // current page, the equivalent of the <strong> in displayedRows\n '& .ag-paging-panel .ag-paging-description .ag-paging-number': {\n color: 'text.primary',\n fontWeight: '700',\n },\n // v36 renders the pagination current page as a number input\n // make it look like the plain number\n '& .ag-paging-panel .ag-paging-description .ag-number-field-input': {\n border: 'none',\n p: '0',\n height: 'auto',\n textAlign: 'center',\n fontWeight: '700',\n // AG Grid sizes the input by JS to inline style, always 2.5ch wider than the number, to\n // leave room for the spinner we hide. Half of that spare width on each side is taken back\n // here, so the number\n mx: '-1.25ch',\n // the box still reaches over the divider, so it must not paint anything of its own\n background: 'transparent',\n '&:focus': {\n boxShadow: 'none',\n },\n },\n\n // the 'Page' prefix and the ' / ' divider around the numbers\n // AG Grid gives them no class, only ids ending in -start-page and -of-page\n '& .ag-paging-panel .ag-paging-description [id$=\"-of-page\"]:not(:empty)': {\n fontWeight: '400',\n m: '0 4px',\n },\n\n '& .ag-paging-panel .ag-paging-description [id$=\"-start-page\"]:not(:empty)': {\n mr: '4px',\n },\n\n // total page count stays muted\n '& .ag-paging-panel .ag-paging-description span:last-child': {\n color: 'inherit',\n fontWeight: '300',\n },\n\n // the arrows are plain divs by default, so they get the IconButton look through CSS\n // not shared, but copied on purpose\n '& .ag-paging-panel .ag-paging-button': {\n position: 'relative',\n boxShadow: 'none',\n outline: 'none',\n width: '44px',\n height: '44px',\n borderRadius: '1000px',\n maxWidth: 'none',\n transition: 'all 0.3s ease-out',\n flexShrink: '0',\n '&:hover': {\n boxShadow: 'none',\n },\n '&&:active': {\n boxShadow: 'none',\n },\n ...getInteractiveStyle(\n {\n backgroundColor: 'transparent',\n },\n {\n backgroundColor: theme.palette.transparent.secondary,\n },\n undefined,\n undefined,\n ':focus-visible:not(.ag-disabled)',\n ),\n ...getFocusRingStyle(theme, true, 0, ':focus-visible:not(.ag-disabled)'),\n // disabled style\n '&.ag-disabled': {\n opacity: '1',\n color: theme.palette.disabled.primary,\n pointerEvents: 'none',\n },\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n // scoped to the arrows so the rest of the grid keeps the iconSize theme parameter\n '--ag-icon-size': '20px',\n // by default, disable first and last icon (jump to first & last page)\n '&:first-of-type, &:last-of-type': {\n display: 'none',\n },\n },\n\n // Pagination - rows per page\n '& .ag-paging-panel .ag-picker-field-wrapper': {\n border: 'none',\n px: '0',\n cursor: 'pointer',\n minWidth: 'auto',\n borderRadius: '4px',\n },\n\n '& .ag-paging-panel .ag-picker-field-display': {\n fontSize: '16px',\n fontWeight: 700,\n pl: '4px',\n },\n\n // rows per page chevron icon indention\n '& .ag-paging-panel .ag-picker-field-icon': {\n ml: '8px',\n mr: '12px',\n },\n\n '& .ag-paging-panel .ag-label': {\n ...theme.typography.body,\n // the label and the value are one element here, this stands in for the toolbar gap that\n // separates MuiTablePagination-selectLabel from its input\n mr: '16px',\n },\n\n '& .ag-popup > *': {\n backgroundColor: 'onSurface.os0',\n cursor: 'pointer',\n borderRadius: '0px',\n },\n\n // rows per page dropdown, laid out like the MUI Select menu\n '& .ag-popup .ag-select-list': {\n border: 'none',\n p: '0',\n boxShadow: '0px 2px 25px 0px rgba(0, 0, 0, 0.15)',\n '--ag-list-item-height': '48px',\n },\n\n '& .ag-popup .ag-select-list .ag-list-item-text': {\n overflow: 'visible',\n textOverflow: 'clip',\n },\n '& .ag-popup .ag-select-list .ag-list-item': {\n // proportions, the height itself comes from listItemHeight\n p: '12px',\n cursor: 'pointer',\n color: theme.palette.text.primary,\n fontSize: '16px',\n lineHeight: '24px',\n fontWeight: '400',\n // 1 line ellipsis\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n // AG Grid marks the keyboard highlighted option with .ag-active-item, that is the closest\n // thing it has to the Mui-focusVisible state MuiMenuItem draws the same way as hover\n ...getInteractiveStyle(\n {\n backgroundColor:\n theme.palette.mode === 'dark' ? theme.palette.onSurface.os800 : theme.palette.background.primary,\n },\n { backgroundColor: theme.palette.surface.primary },\n { backgroundColor: theme.palette.surface.secondary },\n undefined,\n '.ag-active-item',\n ),\n },\n\n // Let the cursor reflect content (I-beam over text, default elsewhere) - AG Grid forces\n // cursor: default on the root. ag-selectable is present only when enableCellTextSelection is on.\n '& .ag-selectable .ag-cell': {\n cursor: 'auto',\n },\n\n // # Opt-in className=\"skoda-ag-pointer\"\n // Cell-level so it wins over the .ag-cell text cursor above (the cell sets its own cursor).\n '& .skoda-ag-row-pointer .ag-row:hover, & .skoda-ag-row-pointer .ag-row:hover .ag-cell': {\n cursor: 'pointer',\n },\n\n // # Rows with wrapText cells\n // line height must be set on the row, padding keeps the 56px single line row (24 + 30 + 2)\n '& .ag-row:has(.ag-cell-wrap-text)': {\n '--ag-line-height': '24px',\n '& .ag-cell': {\n py: '15px',\n },\n },\n\n // Additional icons\n ...agGridCssIcons,\n\n // Show icons according to the SkodaFlow design\n '& .ag-icon-asc, & .ag-icon-desc': {\n color: theme.palette.onSurface.os600,\n },\n '& .ag-icon-asc:hover, & .ag-icon-desc:hover': {\n color: theme.palette.text.primary,\n },\n '& .ag-header-cell-sortable .ag-sort-indicator-container:has(.ag-sort-descending-icon.ag-hidden) .ag-hidden:has(.ag-icon-asc)':\n {\n display: 'inline-block !important', // Ag grid also uses !important so we have to override it\n },\n\n // Legacy class approach, no theme\n fontFamily: agTheme.fontFamily,\n };\n};\n\n/**\n * Pre-configured SkodaFlow AG Grid props.\n *\n * Note: the AG Grid `theme` is intentionally NOT provided here. Building the theme requires\n * imports from `ag-grid-community` (`themeQuartz`, `iconOverrides`), which we do not want to pull\n * in as a direct dependency of the library. The consuming project should build the theme with the\n * exported `skodaAgThemeParams` and `skodaAgGridIconOverrides` helpers and pass it to `AgGridReact`.\n */\nexport const useSkodaAgGridProps = () => {\n const theme = useTheme();\n\n return {\n domLayout: 'autoHeight' as const,\n animateRows: false,\n suppressDragLeaveHidesColumns: true,\n enableRtl: theme.direction === 'rtl',\n // allow selecting/copying cell text (off in AG Grid by default)\n enableCellTextSelection: true,\n };\n};\n\ninterface SkodaAgGridProviderProps extends BoxProps {}\n\n/**\n * A provider wrapper that applies Skoda AG Grid theming via sx.\n */\nexport const SkodaAgGridProvider: React.FC<SkodaAgGridProviderProps> = forwardRef(({ sx, children, ...rest }, ref) => {\n return (\n <Box\n sx={sxOverride(\n (theme) => ({\n ...agGridStyles(theme),\n }),\n sx,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Box>\n );\n});\n"],"names":["agGridStyles","theme","agTheme","skodaAgThemeParams","width","maxWidth","agGridVariables","borderBottom","display","direction","minWidth","backgroundColor","backgroundClip","minHeight","autoHeightMinBodyHeight","fontWeight","headerFontWeight","cursor","alignItems","borderTop","borderTopColor","palette","surface","secondary","maxHeight","height","position","opacity","borderWidth","overflow","justifyContent","gap","breakpoints","up","padding","down","flexWrap","content","flexGrow","flexBasis","m","typography","body","whiteSpace","mx","p","color","mode","onSurface","os300","os700","border","textAlign","background","boxShadow","mr","outline","borderRadius","transition","flexShrink","getInteractiveStyle","transparent","undefined","getFocusRingStyle","disabled","primary","pointerEvents","px","fontSize","pl","ml","textOverflow","text","lineHeight","os800","py","agGridCssIcons","os600","fontFamily","useSkodaAgGridProps","domLayout","animateRows","suppressDragLeaveHidesColumns","enableRtl","useTheme","enableCellTextSelection","SkodaAgGridProvider","forwardRef","sx","children","rest","ref","_jsx","Box","sxOverride"],"mappings":"8eASO,MAAMA,EAAgBC,IAC3B,MAAMC,EAAUC,EAAmBF,GAEnC,MAAO,CACLG,MAAO,OAEP,IAAK,CACHC,SAAU,QAGZ,+DAAgE,IAC3DC,EAAgBL,IAGrB,eAAgB,CAAEM,aAAc,QAEhC,iIACE,CACEA,aAAc,QAElB,yCAA0C,CAAEC,QAAS,WAG7B,QAApBP,EAAMQ,WAAuB,CAC/B,4BAA6B,CAC3BC,SAAU,QAGZ,uDAAwD,CACtDH,aAAc,yBAKlB,kDAAmD,CACjDI,gBAAiB,0CACjBC,eAAgB,eAElB,+CAAgD,CAC9CD,gBAAiB,4BACjBC,eAAgB,eAGlB,2BAA4B,CAE1BC,UAAW,GAAGX,EAAQY,6BAIxB,yCAA0C,CACxCC,WAAY,GAAGb,EAAQc,oBAIzB,4EAA6E,CAC3ER,QAAS,mBACTS,OAAQ,WAKV,yaACE,CACET,QAAS,mBAKb,0CAA2C,CACzC,+BAAgC,CAC9BU,WAAY,SACZC,UAAW,YACXC,eAAgBnB,EAAMoB,QAAQC,QAAQC,UACtCC,UAAW,kBACXC,OAAQ,mBAIV,sDAAuD,CACrDC,SAAU,SACVC,QAAS,KAKX,mEAAoE,CAElEF,OAAQ,kBACRD,UAAW,kBACXX,UAAW,mBAEb,sEAAuE,CACrEY,OAAQ,QAEV,uJACE,CAC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C,EACA,oBAMJ,4BAA6B,CAC3B7C,OAAQ,QAKV,wFAAyF,CACvFA,OAAQ,WAKV,oCAAqC,CACnC,mBAAoB,OACpB,aAAc,CACZ0D,GAAI,YAKLC,EAGH,kCAAmC,CACjC9B,MAAO7C,EAAMoB,QAAQ2B,UAAU6B,OAEjC,8CAA+C,CAC7C/B,MAAO7C,EAAMoB,QAAQmD,KAAKP,SAE5B,+HACE,CACEzD,QAAS,2BAIbsE,WAAY5E,EAAQ4E,aAYXC,EAAsB,KAG1B,CACLC,UAAW,aACXC,aAAa,EACbC,+BAA+B,EAC/BC,UAA+B,QANnBC,IAMK3E,UAEjB4E,yBAAyB,IAShBC,EAA0DC,EAAW,EAAGC,KAAIC,cAAaC,GAAQC,IAE1GC,EAACC,EAAG,CACFL,GAAIM,EACD7F,IAAK,IACDD,EAAaC,KAElBuF,GAEFG,IAAKA,KACDD,EAAID,SAEPA"}
@@ -4,6 +4,7 @@ export declare const skodaAgThemeParams: (theme: Theme) => {
4
4
  fontFamily: string;
5
5
  fontSize: number;
6
6
  iconSize: number;
7
+ fontWeight: string;
7
8
  backgroundColor: string;
8
9
  foregroundColor: string;
9
10
  dataColor: string;
@@ -19,10 +20,12 @@ export declare const skodaAgThemeParams: (theme: Theme) => {
19
20
  oddRowBackgroundColor: string;
20
21
  rowBorderColor: string;
21
22
  selectedRowBackgroundColor: string;
23
+ focusShadow: string;
22
24
  headerFontSize: number;
23
25
  headerFontWeight: number;
24
26
  headerHeight: number;
25
27
  rowHeight: number;
28
+ autoHeightMinBodyHeight: number;
26
29
  paginationPanelHeight: number;
27
30
  cellHorizontalPadding: number;
28
31
  cellVerticalPadding: number;
@@ -1,2 +1,2 @@
1
- import{getFontFamily as e}from"../../materialui/typography/typography.theme.js";const r=r=>({fontFamily:e("rtl"===r.direction),fontSize:14,iconSize:17,backgroundColor:"transparent",foregroundColor:r.palette.text.primary,dataColor:r.palette.text.primary,headerForegroundColor:r.palette.text.primary,headerBackgroundColor:"transparent",subHeaderBackgroundColor:"transparent",subHeaderToolbarBackgroundColor:"transparent",secondaryForegroundColor:r.palette.onSurface.os500,disabledForegroundColor:r.palette.disabled.tertiary,checkboxCheckedColor:r.palette.brand.primary,checkboxIndeterminateColor:r.palette.brand.primary,rowHoverColor:r.palette.surface.primary,oddRowBackgroundColor:"transparent",rowBorderColor:r.palette.surface.secondary,selectedRowBackgroundColor:r.palette.surface.primary,headerFontSize:14,headerFontWeight:700,headerHeight:54,rowHeight:56,paginationPanelHeight:70,cellHorizontalPadding:16,cellVerticalPadding:4,rowVerticalPaddingScale:.04,borderRadius:8,headerColumnSeparatorColor:r.palette.surface.secondary,headerColumnResizeHandleColor:r.palette.surface.secondary,headerColumnSeparatorDisplay:"block",headerColumnResizeHandleDisplay:"block"});export{r as skodaAgThemeParams};
1
+ import{getFontFamily as e}from"../../materialui/typography/typography.theme.js";import{getFocusRingBoxShadow as r}from"../focusring/focusring.js";const o=o=>({fontFamily:e("rtl"===o.direction),fontSize:14,iconSize:17,fontWeight:"inherit",backgroundColor:o.palette.background.primary,foregroundColor:o.palette.text.primary,dataColor:o.palette.text.primary,headerForegroundColor:o.palette.text.primary,headerBackgroundColor:"transparent",subHeaderBackgroundColor:"transparent",subHeaderToolbarBackgroundColor:"transparent",secondaryForegroundColor:o.palette.onSurface.os500,disabledForegroundColor:o.palette.disabled.tertiary,checkboxCheckedColor:o.palette.brand.primary,checkboxIndeterminateColor:o.palette.brand.primary,rowHoverColor:o.palette.surface.primary,oddRowBackgroundColor:"transparent",rowBorderColor:o.palette.surface.secondary,selectedRowBackgroundColor:o.palette.surface.primary,focusShadow:r(o),headerFontSize:14,headerFontWeight:700,headerHeight:54,rowHeight:56,autoHeightMinBodyHeight:56,paginationPanelHeight:80,cellHorizontalPadding:16,cellVerticalPadding:4,rowVerticalPaddingScale:.04,borderRadius:8,headerColumnSeparatorColor:o.palette.surface.secondary,headerColumnResizeHandleColor:o.palette.surface.secondary,headerColumnSeparatorDisplay:"block",headerColumnResizeHandleDisplay:"block"});export{o as skodaAgThemeParams};
2
2
  //# sourceMappingURL=agGridSkodaTheme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agGridSkodaTheme.js","sources":["../../../src/components/advancedTable/agGridSkodaTheme.ts"],"sourcesContent":["import { Theme } from '@mui/material';\nimport { getFontFamily } from '@/src/materialui/typography/typography.theme';\n\n/** AG Grid Theme parameters (replaces variables since AG Grid v32) */\nexport const skodaAgThemeParams = (theme: Theme) => ({\n // typography\n fontFamily: getFontFamily(theme.direction === 'rtl'),\n fontSize: 14,\n iconSize: 17,\n\n // colors\n backgroundColor: 'transparent',\n foregroundColor: theme.palette.text.primary,\n dataColor: theme.palette.text.primary,\n headerForegroundColor: theme.palette.text.primary,\n headerBackgroundColor: 'transparent',\n subHeaderBackgroundColor: 'transparent',\n subHeaderToolbarBackgroundColor: 'transparent',\n secondaryForegroundColor: theme.palette.onSurface.os500,\n disabledForegroundColor: theme.palette.disabled.tertiary,\n checkboxCheckedColor: theme.palette.brand.primary,\n checkboxIndeterminateColor: theme.palette.brand.primary,\n\n // rows / hover / borders\n rowHoverColor: theme.palette.surface.primary,\n oddRowBackgroundColor: 'transparent',\n rowBorderColor: theme.palette.surface.secondary,\n selectedRowBackgroundColor: theme.palette.surface.primary,\n\n // sizing / spacing\n headerFontSize: 14,\n headerFontWeight: 700,\n headerHeight: 54,\n rowHeight: 56,\n paginationPanelHeight: 70,\n cellHorizontalPadding: 16,\n cellVerticalPadding: 4,\n rowVerticalPaddingScale: 0.04,\n borderRadius: 8,\n\n // header separators\n headerColumnSeparatorColor: theme.palette.surface.secondary,\n headerColumnResizeHandleColor: theme.palette.surface.secondary,\n headerColumnSeparatorDisplay: 'block',\n headerColumnResizeHandleDisplay: 'block',\n});\n"],"names":["skodaAgThemeParams","theme","fontFamily","getFontFamily","direction","fontSize","iconSize","backgroundColor","foregroundColor","palette","text","primary","dataColor","headerForegroundColor","headerBackgroundColor","subHeaderBackgroundColor","subHeaderToolbarBackgroundColor","secondaryForegroundColor","onSurface","os500","disabledForegroundColor","disabled","tertiary","checkboxCheckedColor","brand","checkboxIndeterminateColor","rowHoverColor","surface","oddRowBackgroundColor","rowBorderColor","secondary","selectedRowBackgroundColor","headerFontSize","headerFontWeight","headerHeight","rowHeight","paginationPanelHeight","cellHorizontalPadding","cellVerticalPadding","rowVerticalPaddingScale","borderRadius","headerColumnSeparatorColor","headerColumnResizeHandleColor","headerColumnSeparatorDisplay","headerColumnResizeHandleDisplay"],"mappings":"sFAIaA,EAAsBC,IAAY,CAE7CC,WAAYC,EAAkC,QAApBF,EAAMG,WAChCC,SAAU,GACVC,SAAU,GAGVC,gBAAiB,cACjBC,gBAAiBP,EAAMQ,QAAQC,KAAKC,QACpCC,UAAWX,EAAMQ,QAAQC,KAAKC,QAC9BE,sBAAuBZ,EAAMQ,QAAQC,KAAKC,QAC1CG,sBAAuB,cACvBC,yBAA0B,cAC1BC,gCAAiC,cACjCC,yBAA0BhB,EAAMQ,QAAQS,UAAUC,MAClDC,wBAAyBnB,EAAMQ,QAAQY,SAASC,SAChDC,qBAAsBtB,EAAMQ,QAAQe,MAAMb,QAC1Cc,2BAA4BxB,EAAMQ,QAAQe,MAAMb,QAGhDe,cAAezB,EAAMQ,QAAQkB,QAAQhB,QACrCiB,sBAAuB,cACvBC,eAAgB5B,EAAMQ,QAAQkB,QAAQG,UACtCC,2BAA4B9B,EAAMQ,QAAQkB,QAAQhB,QAGlDqB,eAAgB,GAChBC,iBAAkB,IAClBC,aAAc,GACdC,UAAW,GACXC,sBAAuB,GACvBC,sBAAuB,GACvBC,oBAAqB,EACrBC,wBAAyB,IACzBC,aAAc,EAGdC,2BAA4BxC,EAAMQ,QAAQkB,QAAQG,UAClDY,8BAA+BzC,EAAMQ,QAAQkB,QAAQG,UACrDa,6BAA8B,QAC9BC,gCAAiC"}
1
+ {"version":3,"file":"agGridSkodaTheme.js","sources":["../../../src/components/advancedTable/agGridSkodaTheme.ts"],"sourcesContent":["import { Theme } from '@mui/material';\nimport { getFontFamily } from '@/src/materialui/typography/typography.theme';\nimport { getFocusRingBoxShadow } from '@/src/components/focusring/focusring';\n\n/** AG Grid Theme parameters (replaces variables since AG Grid v32) */\nexport const skodaAgThemeParams = (theme: Theme) => ({\n // typography\n fontFamily: getFontFamily(theme.direction === 'rtl'),\n fontSize: 14,\n iconSize: 17,\n fontWeight: 'inherit',\n\n // colors\n backgroundColor: theme.palette.background.primary,\n foregroundColor: theme.palette.text.primary,\n dataColor: theme.palette.text.primary,\n headerForegroundColor: theme.palette.text.primary,\n headerBackgroundColor: 'transparent',\n subHeaderBackgroundColor: 'transparent',\n subHeaderToolbarBackgroundColor: 'transparent',\n secondaryForegroundColor: theme.palette.onSurface.os500,\n disabledForegroundColor: theme.palette.disabled.tertiary,\n checkboxCheckedColor: theme.palette.brand.primary,\n checkboxIndeterminateColor: theme.palette.brand.primary,\n\n // rows / hover / borders\n rowHoverColor: theme.palette.surface.primary,\n oddRowBackgroundColor: 'transparent',\n rowBorderColor: theme.palette.surface.secondary,\n selectedRowBackgroundColor: theme.palette.surface.primary,\n\n // shadows\n focusShadow: getFocusRingBoxShadow(theme),\n\n // sizing / spacing\n headerFontSize: 14,\n headerFontWeight: 700,\n headerHeight: 54,\n rowHeight: 56,\n autoHeightMinBodyHeight: 56,\n paginationPanelHeight: 80,\n cellHorizontalPadding: 16,\n cellVerticalPadding: 4,\n rowVerticalPaddingScale: 0.04,\n\n // radius\n borderRadius: 8,\n\n // header separators\n headerColumnSeparatorColor: theme.palette.surface.secondary,\n headerColumnResizeHandleColor: theme.palette.surface.secondary,\n headerColumnSeparatorDisplay: 'block',\n headerColumnResizeHandleDisplay: 'block',\n});\n"],"names":["skodaAgThemeParams","theme","fontFamily","getFontFamily","direction","fontSize","iconSize","fontWeight","backgroundColor","palette","background","primary","foregroundColor","text","dataColor","headerForegroundColor","headerBackgroundColor","subHeaderBackgroundColor","subHeaderToolbarBackgroundColor","secondaryForegroundColor","onSurface","os500","disabledForegroundColor","disabled","tertiary","checkboxCheckedColor","brand","checkboxIndeterminateColor","rowHoverColor","surface","oddRowBackgroundColor","rowBorderColor","secondary","selectedRowBackgroundColor","focusShadow","getFocusRingBoxShadow","headerFontSize","headerFontWeight","headerHeight","rowHeight","autoHeightMinBodyHeight","paginationPanelHeight","cellHorizontalPadding","cellVerticalPadding","rowVerticalPaddingScale","borderRadius","headerColumnSeparatorColor","headerColumnResizeHandleColor","headerColumnSeparatorDisplay","headerColumnResizeHandleDisplay"],"mappings":"wJAKaA,EAAsBC,IAAY,CAE7CC,WAAYC,EAAkC,QAApBF,EAAMG,WAChCC,SAAU,GACVC,SAAU,GACVC,WAAY,UAGZC,gBAAiBP,EAAMQ,QAAQC,WAAWC,QAC1CC,gBAAiBX,EAAMQ,QAAQI,KAAKF,QACpCG,UAAWb,EAAMQ,QAAQI,KAAKF,QAC9BI,sBAAuBd,EAAMQ,QAAQI,KAAKF,QAC1CK,sBAAuB,cACvBC,yBAA0B,cAC1BC,gCAAiC,cACjCC,yBAA0BlB,EAAMQ,QAAQW,UAAUC,MAClDC,wBAAyBrB,EAAMQ,QAAQc,SAASC,SAChDC,qBAAsBxB,EAAMQ,QAAQiB,MAAMf,QAC1CgB,2BAA4B1B,EAAMQ,QAAQiB,MAAMf,QAGhDiB,cAAe3B,EAAMQ,QAAQoB,QAAQlB,QACrCmB,sBAAuB,cACvBC,eAAgB9B,EAAMQ,QAAQoB,QAAQG,UACtCC,2BAA4BhC,EAAMQ,QAAQoB,QAAQlB,QAGlDuB,YAAaC,EAAsBlC,GAGnCmC,eAAgB,GAChBC,iBAAkB,IAClBC,aAAc,GACdC,UAAW,GACXC,wBAAyB,GACzBC,sBAAuB,GACvBC,sBAAuB,GACvBC,oBAAqB,EACrBC,wBAAyB,IAGzBC,aAAc,EAGdC,2BAA4B7C,EAAMQ,QAAQoB,QAAQG,UAClDe,8BAA+B9C,EAAMQ,QAAQoB,QAAQG,UACrDgB,6BAA8B,QAC9BC,gCAAiC"}
@@ -0,0 +1,36 @@
1
+ import { type RefObject } from 'react';
2
+ export interface AgGridRowNodeLike {
3
+ /**
4
+ * Current height of the row
5
+ */
6
+ rowHeight: number | null | undefined;
7
+ /**
8
+ * Sets new height of the row
9
+ */
10
+ setRowHeight(rowHeight: number | undefined | null, estimated?: boolean): void;
11
+ }
12
+ export interface AgGridEventLike {
13
+ /**
14
+ * Grid API of the event
15
+ */
16
+ api: {
17
+ forEachNode(callback: (rowNode: AgGridRowNodeLike, index: number) => void): void;
18
+ onRowHeightChanged(): void;
19
+ };
20
+ }
21
+ export interface SkodaAgGridUniformRowHeightProps {
22
+ /**
23
+ * Attach to SkodaAgGridProvider, rendered cells are measured inside it
24
+ */
25
+ ref: RefObject<HTMLDivElement | null>;
26
+ /**
27
+ * Pass to both the AgGridReact onFirstDataRendered and onColumnResized events
28
+ */
29
+ applyUniformRowHeight: (event: AgGridEventLike) => void;
30
+ }
31
+ /**
32
+ * Makes all rows share the height of the tallest one, measured from the wrapped cell content.
33
+ * Requires `wrapText` enabled on the column definitions. `autoHeight` must stay off, the hook
34
+ * controls the row heights itself, which also prevents scrollbar resize loops.
35
+ */
36
+ export declare const useSkodaAgGridUniformRowHeight: () => SkodaAgGridUniformRowHeightProps;
@@ -0,0 +1,2 @@
1
+ import{useRef as e,useCallback as r}from"react";const t=()=>{const t=e(null),n=e({frame:0,pending:0}),o=r(function e(r){const o=n.current;o.event=r,!o.observer&&t.current&&(o.observer=new MutationObserver(()=>o.event&&e(o.event)),o.observer.observe(t.current.querySelector(".ag-body")??t.current,{childList:!0,subtree:!0,characterData:!0}),document.fonts?.ready.then(()=>o.event&&e(o.event))),cancelAnimationFrame(o.frame),o.frame=requestAnimationFrame(function e(){const n=t.current?.querySelectorAll(".ag-cell");if(!n?.length)return;n.forEach(e=>e.style.setProperty("height","auto"));const a=Math.ceil(Math.max(...Array.from(n,e=>e.getBoundingClientRect().height)));if(n.forEach(e=>e.style.removeProperty("height")),a!==o.pending)return o.pending=a,void(o.frame=requestAnimationFrame(e));let i=!1;r.api.forEachNode(e=>{e.rowHeight!==a&&(e.setRowHeight(a),i=!0)}),i&&r.api.onRowHeightChanged()})},[]);return{ref:t,applyUniformRowHeight:o}};export{t as useSkodaAgGridUniformRowHeight};
2
+ //# sourceMappingURL=agGridUniformRowHeight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agGridUniformRowHeight.js","sources":["../../../src/components/advancedTable/agGridUniformRowHeight.ts"],"sourcesContent":["import { useCallback, useRef, type RefObject } from 'react';\n\n// structural types instead of AG Grid imports, the library must not depend on ag-grid-community\nexport interface AgGridRowNodeLike {\n /**\n * Current height of the row\n */\n rowHeight: number | null | undefined;\n /**\n * Sets new height of the row\n */\n setRowHeight(rowHeight: number | undefined | null, estimated?: boolean): void;\n}\n\nexport interface AgGridEventLike {\n /**\n * Grid API of the event\n */\n api: {\n forEachNode(callback: (rowNode: AgGridRowNodeLike, index: number) => void): void;\n onRowHeightChanged(): void;\n };\n}\n\nexport interface SkodaAgGridUniformRowHeightProps {\n /**\n * Attach to SkodaAgGridProvider, rendered cells are measured inside it\n */\n ref: RefObject<HTMLDivElement | null>;\n /**\n * Pass to both the AgGridReact onFirstDataRendered and onColumnResized events\n */\n applyUniformRowHeight: (event: AgGridEventLike) => void;\n}\n\n/**\n * Makes all rows share the height of the tallest one, measured from the wrapped cell content.\n * Requires `wrapText` enabled on the column definitions. `autoHeight` must stay off, the hook\n * controls the row heights itself, which also prevents scrollbar resize loops.\n */\nexport const useSkodaAgGridUniformRowHeight = (): SkodaAgGridUniformRowHeightProps => {\n const ref = useRef<HTMLDivElement>(null);\n // mutable state shared by the callbacks, the hook never rerenders\n const state = useRef<{\n frame: number;\n pending: number;\n event?: AgGridEventLike;\n observer?: MutationObserver;\n }>({ frame: 0, pending: 0 });\n\n const applyUniformRowHeight = useCallback(function apply(event: AgGridEventLike) {\n const current = state.current;\n current.event = event;\n\n if (!current.observer && ref.current) {\n current.observer = new MutationObserver(() => current.event && apply(current.event));\n current.observer.observe(ref.current.querySelector('.ag-body') ?? ref.current, {\n childList: true,\n subtree: true,\n characterData: true,\n });\n // fonts change text metrics without any DOM mutation, the observer cannot see that.\n void document.fonts?.ready.then(() => current.event && apply(current.event));\n }\n\n // a single measurement is scheduled before the next paint, when cell widths and wrapping\n // are already settled, a repeated trigger only replaces it\n cancelAnimationFrame(current.frame);\n current.frame = requestAnimationFrame(function measure() {\n // cells are stretched to the row height, release them to measure the natural content\n // height including custom paddings and margins, then restore\n const cells = ref.current?.querySelectorAll<HTMLElement>('.ag-cell');\n if (!cells?.length) {\n return;\n }\n cells.forEach((el) => el.style.setProperty('height', 'auto'));\n const max = Math.ceil(Math.max(...Array.from(cells, (el) => el.getBoundingClientRect().height)));\n cells.forEach((el) => el.style.removeProperty('height'));\n\n // apply only a measurement stable for two consecutive frames, partially mounted cell\n // renderers and resizing in progress would otherwise paint several intermediate heights\n if (max !== current.pending) {\n current.pending = max;\n current.frame = requestAnimationFrame(measure);\n return;\n }\n\n let changed = false;\n event.api.forEachNode((node) => {\n if (node.rowHeight !== max) {\n node.setRowHeight(max);\n changed = true;\n }\n });\n if (changed) {\n event.api.onRowHeightChanged();\n }\n });\n }, []);\n\n return { ref, applyUniformRowHeight };\n};\n"],"names":["useSkodaAgGridUniformRowHeight","ref","useRef","state","frame","pending","applyUniformRowHeight","useCallback","apply","event","current","observer","MutationObserver","observe","querySelector","childList","subtree","characterData","document","fonts","ready","then","cancelAnimationFrame","requestAnimationFrame","measure","cells","querySelectorAll","length","forEach","el","style","setProperty","max","Math","ceil","Array","from","getBoundingClientRect","height","removeProperty","changed","api","forEachNode","node","rowHeight","setRowHeight","onRowHeightChanged"],"mappings":"gDAwCO,MAAMA,EAAiC,KAC5C,MAAMC,EAAMC,EAAuB,MAE7BC,EAAQD,EAKX,CAAEE,MAAO,EAAGC,QAAS,IAElBC,EAAwBC,EAAY,SAASC,EAAMC,GACvD,MAAMC,EAAUP,EAAMO,QACtBA,EAAQD,MAAQA,GAEXC,EAAQC,UAAYV,EAAIS,UAC3BA,EAAQC,SAAW,IAAIC,iBAAiB,IAAMF,EAAQD,OAASD,EAAME,EAAQD,QAC7EC,EAAQC,SAASE,QAAQZ,EAAIS,QAAQI,cAAc,aAAeb,EAAIS,QAAS,CAC7EK,WAAW,EACXC,SAAS,EACTC,eAAe,IAGZC,SAASC,OAAOC,MAAMC,KAAK,IAAMX,EAAQD,OAASD,EAAME,EAAQD,SAKvEa,qBAAqBZ,EAAQN,OAC7BM,EAAQN,MAAQmB,sBAAsB,SAASC,IAG7C,MAAMC,EAAQxB,EAAIS,SAASgB,iBAA8B,YACzD,IAAKD,GAAOE,OACV,OAEFF,EAAMG,QAASC,GAAOA,EAAGC,MAAMC,YAAY,SAAU,SACrD,MAAMC,EAAMC,KAAKC,KAAKD,KAAKD,OAAOG,MAAMC,KAAKX,EAAQI,GAAOA,EAAGQ,wBAAwBC,UAKvF,GAJAb,EAAMG,QAASC,GAAOA,EAAGC,MAAMS,eAAe,WAI1CP,IAAQtB,EAAQL,QAGlB,OAFAK,EAAQL,QAAU2B,OAClBtB,EAAQN,MAAQmB,sBAAsBC,IAIxC,IAAIgB,GAAU,EACd/B,EAAMgC,IAAIC,YAAaC,IACjBA,EAAKC,YAAcZ,IACrBW,EAAKE,aAAab,GAClBQ,GAAU,KAGVA,GACF/B,EAAMgC,IAAIK,oBAEd,EACF,EAAG,IAEH,MAAO,CAAE7C,MAAKK"}
@@ -1,2 +1,2 @@
1
- import{skodaAgThemeParams as o}from"./agGridSkodaTheme.js";import{agGridCssIcons as e}from"./agGridIcons.js";const r=r=>{const a=o(r);return{"--ag-font-family":`${a.fontFamily}`,"--ag-foreground-color":`${a.foregroundColor}`,"--ag-header-foreground-color":`${a.headerForegroundColor}`,"--ag-background-color":`${a.backgroundColor}`,"--ag-header-background-color":`${a.headerBackgroundColor}`,"--ag-subheader-background-color":`${a.subHeaderBackgroundColor}`,"--ag-subheader-toolbar-background-color":`${a.subHeaderToolbarBackgroundColor}`,"--ag-disabled-foreground-color":`${a.disabledForegroundColor}`,"--ag-row-hover-color":`${a.rowHoverColor}`,"--ag-checkbox-checked-color":`${a.checkboxCheckedColor}`,"--ag-checkbox-indeterminate-color":`${a.checkboxIndeterminateColor}`,"--ag-header-height":`${a.headerHeight}px`,"--ag-header-column-resize-handle-color":`${a.headerColumnResizeHandleColor}`,"--ag-selected-row-background-color":`${a.selectedRowBackgroundColor}`,"--ag-cell-vertical-padding":`${a.cellVerticalPadding}px`,"--ag-row-height":`${a.rowHeight}px`,"--ag-pagination-panel-height":`${a.paginationPanelHeight}px`,"--ag-font-size":`${a.fontSize}px`,"--ag-header-font-size":`${a.headerFontSize}px`,"--ag-header-font-weight":`'${a.headerFontWeight}'`,"--ag-icon-size":`${a.iconSize}px`,...e}};export{r as agGridVariables};
1
+ import{skodaAgThemeParams as o}from"./agGridSkodaTheme.js";import{agGridCssIcons as e}from"./agGridIcons.js";const r=r=>{const a=o(r);return{"--ag-font-family":`${a.fontFamily}`,"--ag-foreground-color":`${a.foregroundColor}`,"--ag-header-foreground-color":`${a.headerForegroundColor}`,"--ag-background-color":`${a.backgroundColor}`,"--ag-header-background-color":`${a.headerBackgroundColor}`,"--ag-subheader-background-color":`${a.subHeaderBackgroundColor}`,"--ag-subheader-toolbar-background-color":`${a.subHeaderToolbarBackgroundColor}`,"--ag-disabled-foreground-color":`${a.disabledForegroundColor}`,"--ag-row-hover-color":`${a.rowHoverColor}`,"--ag-checkbox-checked-color":`${a.checkboxCheckedColor}`,"--ag-checkbox-indeterminate-color":`${a.checkboxIndeterminateColor}`,"--ag-header-height":`${a.headerHeight}px`,"--ag-header-column-resize-handle-color":`${a.headerColumnResizeHandleColor}`,"--ag-selected-row-background-color":`${a.selectedRowBackgroundColor}`,"--ag-cell-vertical-padding":`${a.cellVerticalPadding}px`,"--ag-row-height":`${a.rowHeight}px`,"--ag-pagination-panel-height":`${a.paginationPanelHeight}px`,"--ag-font-size":`${a.fontSize}px`,"--ag-header-font-size":`${a.headerFontSize}px`,"--ag-header-font-weight":`'${a.headerFontWeight}'`,"--ag-icon-size":`${a.iconSize}px`,"--ag-focus-shadow":`${a.focusShadow}`,".ag-styled-root":{"--ag-font-weight":"inherit","--ag-data-background-color":`${a.backgroundColor}`,"--ag-auto-height-min-body-height":`${a.autoHeightMinBodyHeight}px`},...e}};export{r as agGridVariables};
2
2
  //# sourceMappingURL=agGridVariables.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agGridVariables.js","sources":["../../../src/components/advancedTable/agGridVariables.ts"],"sourcesContent":["import { CSSObject, Theme } from '@mui/material';\nimport { skodaAgThemeParams } from './agGridSkodaTheme';\nimport { agGridCssIcons } from './agGridIcons';\n\n/** agGrid CSS Variables */\nexport const agGridVariables = (theme: Theme): CSSObject => {\n const agTheme = skodaAgThemeParams(theme);\n\n return {\n '--ag-font-family': `${agTheme.fontFamily}`,\n '--ag-foreground-color': `${agTheme.foregroundColor}`,\n '--ag-header-foreground-color': `${agTheme.headerForegroundColor}`,\n '--ag-background-color': `${agTheme.backgroundColor}`,\n '--ag-header-background-color': `${agTheme.headerBackgroundColor}`,\n '--ag-subheader-background-color': `${agTheme.subHeaderBackgroundColor}`,\n '--ag-subheader-toolbar-background-color': `${agTheme.subHeaderToolbarBackgroundColor}`,\n '--ag-disabled-foreground-color': `${agTheme.disabledForegroundColor}`,\n '--ag-row-hover-color': `${agTheme.rowHoverColor}`,\n '--ag-checkbox-checked-color': `${agTheme.checkboxCheckedColor}`,\n '--ag-checkbox-indeterminate-color': `${agTheme.checkboxIndeterminateColor}`,\n '--ag-header-height': `${agTheme.headerHeight}px`,\n '--ag-header-column-resize-handle-color': `${agTheme.headerColumnResizeHandleColor}`,\n '--ag-selected-row-background-color': `${agTheme.selectedRowBackgroundColor}`,\n '--ag-cell-vertical-padding': `${agTheme.cellVerticalPadding}px`,\n '--ag-row-height': `${agTheme.rowHeight}px`,\n '--ag-pagination-panel-height': `${agTheme.paginationPanelHeight}px`,\n '--ag-font-size': `${agTheme.fontSize}px`,\n '--ag-header-font-size': `${agTheme.headerFontSize}px`,\n '--ag-header-font-weight': `'${agTheme.headerFontWeight}'`,\n '--ag-icon-size': `${agTheme.iconSize}px`,\n ...agGridCssIcons,\n };\n};\n"],"names":["agGridVariables","theme","agTheme","skodaAgThemeParams","fontFamily","foregroundColor","headerForegroundColor","backgroundColor","headerBackgroundColor","subHeaderBackgroundColor","subHeaderToolbarBackgroundColor","disabledForegroundColor","rowHoverColor","checkboxCheckedColor","checkboxIndeterminateColor","headerHeight","headerColumnResizeHandleColor","selectedRowBackgroundColor","cellVerticalPadding","rowHeight","paginationPanelHeight","fontSize","headerFontSize","headerFontWeight","iconSize","agGridCssIcons"],"mappings":"6GAKO,MAAMA,EAAmBC,IAC9B,MAAMC,EAAUC,EAAmBF,GAEnC,MAAO,CACL,mBAAoB,GAAGC,EAAQE,aAC/B,wBAAyB,GAAGF,EAAQG,kBACpC,+BAAgC,GAAGH,EAAQI,wBAC3C,wBAAyB,GAAGJ,EAAQK,kBACpC,+BAAgC,GAAGL,EAAQM,wBAC3C,kCAAmC,GAAGN,EAAQO,2BAC9C,0CAA2C,GAAGP,EAAQQ,kCACtD,iCAAkC,GAAGR,EAAQS,0BAC7C,uBAAwB,GAAGT,EAAQU,gBACnC,8BAA+B,GAAGV,EAAQW,uBAC1C,oCAAqC,GAAGX,EAAQY,6BAChD,qBAAsB,GAAGZ,EAAQa,iBACjC,yCAA0C,GAAGb,EAAQc,gCACrD,qCAAsC,GAAGd,EAAQe,6BACjD,6BAA8B,GAAGf,EAAQgB,wBACzC,kBAAmB,GAAGhB,EAAQiB,cAC9B,+BAAgC,GAAGjB,EAAQkB,0BAC3C,iBAAkB,GAAGlB,EAAQmB,aAC7B,wBAAyB,GAAGnB,EAAQoB,mBACpC,0BAA2B,IAAIpB,EAAQqB,oBACvC,iBAAkB,GAAGrB,EAAQsB,gBAC1BC"}
1
+ {"version":3,"file":"agGridVariables.js","sources":["../../../src/components/advancedTable/agGridVariables.ts"],"sourcesContent":["import { CSSObject, Theme } from '@mui/material';\nimport { skodaAgThemeParams } from './agGridSkodaTheme';\nimport { agGridCssIcons } from './agGridIcons';\n\n/** agGrid CSS Variables */\nexport const agGridVariables = (theme: Theme): CSSObject => {\n const agTheme = skodaAgThemeParams(theme);\n\n return {\n '--ag-font-family': `${agTheme.fontFamily}`,\n '--ag-foreground-color': `${agTheme.foregroundColor}`,\n '--ag-header-foreground-color': `${agTheme.headerForegroundColor}`,\n '--ag-background-color': `${agTheme.backgroundColor}`,\n '--ag-header-background-color': `${agTheme.headerBackgroundColor}`,\n '--ag-subheader-background-color': `${agTheme.subHeaderBackgroundColor}`,\n '--ag-subheader-toolbar-background-color': `${agTheme.subHeaderToolbarBackgroundColor}`,\n '--ag-disabled-foreground-color': `${agTheme.disabledForegroundColor}`,\n '--ag-row-hover-color': `${agTheme.rowHoverColor}`,\n '--ag-checkbox-checked-color': `${agTheme.checkboxCheckedColor}`,\n '--ag-checkbox-indeterminate-color': `${agTheme.checkboxIndeterminateColor}`,\n '--ag-header-height': `${agTheme.headerHeight}px`,\n '--ag-header-column-resize-handle-color': `${agTheme.headerColumnResizeHandleColor}`,\n '--ag-selected-row-background-color': `${agTheme.selectedRowBackgroundColor}`,\n '--ag-cell-vertical-padding': `${agTheme.cellVerticalPadding}px`,\n '--ag-row-height': `${agTheme.rowHeight}px`,\n '--ag-pagination-panel-height': `${agTheme.paginationPanelHeight}px`,\n '--ag-font-size': `${agTheme.fontSize}px`,\n '--ag-header-font-size': `${agTheme.headerFontSize}px`,\n '--ag-header-font-weight': `'${agTheme.headerFontWeight}'`,\n '--ag-icon-size': `${agTheme.iconSize}px`,\n '--ag-focus-shadow': `${agTheme.focusShadow}`,\n // v33+ compatibility\n '.ag-styled-root': {\n // v36 changed this default from 'inherit' to 400\n '--ag-font-weight': 'inherit',\n // the theme pins this to its own background instead of following --ag-background-color\n '--ag-data-background-color': `${agTheme.backgroundColor}`,\n // v36 moved the autoHeight body minimum here from .ag-center-cols-viewport\n '--ag-auto-height-min-body-height': `${agTheme.autoHeightMinBodyHeight}px`,\n },\n ...agGridCssIcons,\n };\n};\n"],"names":["agGridVariables","theme","agTheme","skodaAgThemeParams","fontFamily","foregroundColor","headerForegroundColor","backgroundColor","headerBackgroundColor","subHeaderBackgroundColor","subHeaderToolbarBackgroundColor","disabledForegroundColor","rowHoverColor","checkboxCheckedColor","checkboxIndeterminateColor","headerHeight","headerColumnResizeHandleColor","selectedRowBackgroundColor","cellVerticalPadding","rowHeight","paginationPanelHeight","fontSize","headerFontSize","headerFontWeight","iconSize","focusShadow","autoHeightMinBodyHeight","agGridCssIcons"],"mappings":"6GAKO,MAAMA,EAAmBC,IAC9B,MAAMC,EAAUC,EAAmBF,GAEnC,MAAO,CACL,mBAAoB,GAAGC,EAAQE,aAC/B,wBAAyB,GAAGF,EAAQG,kBACpC,+BAAgC,GAAGH,EAAQI,wBAC3C,wBAAyB,GAAGJ,EAAQK,kBACpC,+BAAgC,GAAGL,EAAQM,wBAC3C,kCAAmC,GAAGN,EAAQO,2BAC9C,0CAA2C,GAAGP,EAAQQ,kCACtD,iCAAkC,GAAGR,EAAQS,0BAC7C,uBAAwB,GAAGT,EAAQU,gBACnC,8BAA+B,GAAGV,EAAQW,uBAC1C,oCAAqC,GAAGX,EAAQY,6BAChD,qBAAsB,GAAGZ,EAAQa,iBACjC,yCAA0C,GAAGb,EAAQc,gCACrD,qCAAsC,GAAGd,EAAQe,6BACjD,6BAA8B,GAAGf,EAAQgB,wBACzC,kBAAmB,GAAGhB,EAAQiB,cAC9B,+BAAgC,GAAGjB,EAAQkB,0BAC3C,iBAAkB,GAAGlB,EAAQmB,aAC7B,wBAAyB,GAAGnB,EAAQoB,mBACpC,0BAA2B,IAAIpB,EAAQqB,oBACvC,iBAAkB,GAAGrB,EAAQsB,aAC7B,oBAAqB,GAAGtB,EAAQuB,cAEhC,kBAAmB,CAEjB,mBAAoB,UAEpB,6BAA8B,GAAGvB,EAAQK,kBAEzC,mCAAoC,GAAGL,EAAQwB,gCAE9CC"}
@@ -1,4 +1,5 @@
1
1
  export * from './agGrid';
2
2
  export * from './agGridIcons';
3
+ export * from './agGridUniformRowHeight';
3
4
  export * from './agGridSkodaTheme';
4
5
  export * from './agGridVariables';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { IconButtonProps } from '@mui/material';
3
+ export interface AlertIconButtonProps extends IconButtonProps {
4
+ }
5
+ /**
6
+ * AlertIconButton is a proxy component to <IconButton color="white" size="small" />
7
+ */
8
+ export declare const AlertIconButton: React.FC<AlertIconButtonProps>;
@@ -0,0 +1,2 @@
1
+ import{jsx as r}from"react/jsx-runtime";import{forwardRef as m}from"react";import{IconButton as o}from"@mui/material";const t=m((m,t)=>r(o,{ref:t,color:"white",size:"small",...m}));export{t as AlertIconButton};
2
+ //# sourceMappingURL=AlertIconButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertIconButton.js","sources":["../../../src/components/alert/AlertIconButton.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { IconButton, IconButtonProps } from '@mui/material';\n\nexport interface AlertIconButtonProps extends IconButtonProps {}\n\n/**\n * AlertIconButton is a proxy component to <IconButton color=\"white\" size=\"small\" />\n */\nexport const AlertIconButton: React.FC<AlertIconButtonProps> = forwardRef((props, ref) => {\n return <IconButton ref={ref} color=\"white\" size=\"small\" {...props} />;\n});\n"],"names":["AlertIconButton","forwardRef","props","ref","_jsx","IconButton","color","size"],"mappings":"sHAQO,MAAMA,EAAkDC,EAAW,CAACC,EAAOC,IACzEC,EAACC,EAAU,CAACF,IAAKA,EAAKG,MAAM,QAAQC,KAAK,WAAYL"}
@@ -1,2 +1,3 @@
1
1
  export * from './AlertButton';
2
+ export * from './AlertIconButton';
2
3
  export * from './AlertNotificationButton';
@@ -0,0 +1,39 @@
1
+ import React, { type ComponentType } from 'react';
2
+ import { ButtonProps, SvgIconProps } from '@mui/material';
3
+ import { UseCopyActionProps } from './useCopyAction';
4
+ export interface CopyButtonProps extends Omit<ButtonProps, 'onError' | 'value'>, UseCopyActionProps {
5
+ /**
6
+ * Renders as Button, set to false to render as IconButton
7
+ * @default true
8
+ */
9
+ button?: boolean;
10
+ /**
11
+ * Props applied while success state, e.g. children or aria-label
12
+ * @default { children: 'Copied', 'aria-label': 'Copied' }
13
+ */
14
+ copiedProps?: Partial<Omit<CopyButtonProps, 'copiedProps' | 'errorProps'>>;
15
+ /**
16
+ * Props applied while error state, e.g. children or aria-label
17
+ */
18
+ errorProps?: Partial<Omit<CopyButtonProps, 'copiedProps' | 'errorProps'>>;
19
+ /**
20
+ * Custom component for the copy icon, shown in idle state
21
+ */
22
+ CopyIconComponent?: ComponentType<SvgIconProps>;
23
+ /**
24
+ * Custom component for the success icon
25
+ */
26
+ CopiedIconComponent?: ComponentType<SvgIconProps>;
27
+ /**
28
+ * Custom component for the error icon
29
+ */
30
+ ErrorIconComponent?: ComponentType<SvgIconProps>;
31
+ /**
32
+ * Custom component for the loading indicator
33
+ */
34
+ LoadingIconComponent?: ComponentType<SvgIconProps>;
35
+ }
36
+ /**
37
+ * Button that copies value to clipboard using copyToClipboard by default
38
+ */
39
+ export declare const CopyButton: React.FC<CopyButtonProps>;
@@ -0,0 +1,2 @@
1
+ import{jsx as o,jsxs as r}from"react/jsx-runtime";import{forwardRef as e,useMemo as n}from"react";import{Button as i,IconButton as s}from"@mui/material";import{CheckIcon as t}from"../icon/stroke/CheckIcon.js";import{CloseIcon as a}from"../icon/stroke/CloseIcon.js";import{CopyIcon as c}from"../icon/stroke/CopyIcon.js";import{Spinner as l}from"../progress/Spinner.js";import{useCopyAction as p}from"./useCopyAction.js";const m=e(({value:e,copyFn:m,resetDelay:d,onCopied:u,onError:C,button:f=!0,copiedProps:y,errorProps:I,children:b="Copy",CopyIconComponent:h,CopiedIconComponent:j,ErrorIconComponent:k,LoadingIconComponent:g,disabled:v,onClick:z,size:E="small","aria-label":x,...D},F)=>{const{children:P="Copied",...w}=y??{},{children:A=b,...L}=I??{},{state:S,copy:q}=p({value:e,copyFn:m,resetDelay:d,onCopied:u,onError:C}),B=h??c,G=j??t,H=k??a,J=n(()=>g??(()=>o(l,{size:"medium"===E?"medium":"small"})),[g,E]),K=n(()=>{switch(S){case"loading":return J;case"success":return G;case"error":return H;default:return B}},[S,J,G,H,B]),M=n(()=>f?i:s,[f]);return r(M,{ref:F,"data-state":S,disabled:v||"loading"===S,size:E,onClick:o=>{z?.(o),q()},...f&&{color:"surface",startIcon:o(K,{}),"aria-label":x},...!f&&{variant:"filled",color:"surface","aria-label":x??"Copy"},...D,..."success"===S&&{"aria-label":"Copied",...w},..."error"===S&&L,children:[f&&{idle:b,loading:b,success:P,error:A}[S],!f&&o(K,{})]})});export{m as CopyButton};
2
+ //# sourceMappingURL=CopyButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyButton.js","sources":["../../../src/components/copyButton/CopyButton.tsx"],"sourcesContent":["import React, { forwardRef, useMemo, type ComponentType } from 'react';\nimport { Button, ButtonBaseProps, ButtonProps, IconButton, SvgIconProps } from '@mui/material';\nimport { CheckIcon } from '@/src/components/icon/stroke/CheckIcon';\nimport { CloseIcon } from '@/src/components/icon/stroke/CloseIcon';\nimport { CopyIcon } from '@/src/components/icon/stroke/CopyIcon';\nimport { Spinner } from '@/src/components/progress/Spinner';\nimport { UseCopyActionProps, useCopyAction } from './useCopyAction';\n\nexport interface CopyButtonProps extends Omit<ButtonProps, 'onError' | 'value'>, UseCopyActionProps {\n /**\n * Renders as Button, set to false to render as IconButton\n * @default true\n */\n button?: boolean;\n /**\n * Props applied while success state, e.g. children or aria-label\n * @default { children: 'Copied', 'aria-label': 'Copied' }\n */\n copiedProps?: Partial<Omit<CopyButtonProps, 'copiedProps' | 'errorProps'>>;\n /**\n * Props applied while error state, e.g. children or aria-label\n */\n errorProps?: Partial<Omit<CopyButtonProps, 'copiedProps' | 'errorProps'>>;\n /**\n * Custom component for the copy icon, shown in idle state\n */\n CopyIconComponent?: ComponentType<SvgIconProps>;\n /**\n * Custom component for the success icon\n */\n CopiedIconComponent?: ComponentType<SvgIconProps>;\n /**\n * Custom component for the error icon\n */\n ErrorIconComponent?: ComponentType<SvgIconProps>;\n /**\n * Custom component for the loading indicator\n */\n LoadingIconComponent?: ComponentType<SvgIconProps>;\n}\n\n/**\n * Button that copies value to clipboard using copyToClipboard by default\n */\nexport const CopyButton: React.FC<CopyButtonProps> = forwardRef(\n (\n {\n value,\n copyFn,\n resetDelay,\n onCopied,\n onError,\n button = true,\n copiedProps,\n errorProps,\n children = 'Copy',\n CopyIconComponent,\n CopiedIconComponent,\n ErrorIconComponent,\n LoadingIconComponent,\n disabled,\n onClick,\n size = 'small',\n 'aria-label': ariaLabel,\n ...rest\n },\n ref,\n ) => {\n const { children: copiedChildren = 'Copied', ...copiedRest } = copiedProps ?? {};\n const { children: errorChildren = children, ...errorRest } = errorProps ?? {};\n const { state, copy } = useCopyAction({ value, copyFn, resetDelay, onCopied, onError });\n\n const IdleIcon = CopyIconComponent ?? CopyIcon;\n const SuccessIcon = CopiedIconComponent ?? CheckIcon;\n const ErrorIcon = ErrorIconComponent ?? CloseIcon;\n const LoadingIcon = useMemo<ComponentType<SvgIconProps>>(\n () => LoadingIconComponent ?? (() => <Spinner size={size === 'medium' ? 'medium' : 'small'} />),\n [LoadingIconComponent, size],\n );\n\n const Icon = useMemo(() => {\n switch (state) {\n case 'loading':\n return LoadingIcon;\n case 'success':\n return SuccessIcon;\n case 'error':\n return ErrorIcon;\n case 'idle':\n default:\n return IdleIcon;\n }\n }, [state, LoadingIcon, SuccessIcon, ErrorIcon, IdleIcon]);\n\n const Component = useMemo<ComponentType<ButtonBaseProps>>(() => (button ? Button : IconButton), [button]);\n\n return (\n <Component\n ref={ref}\n data-state={state}\n disabled={disabled || state === 'loading'}\n size={size}\n onClick={(event) => {\n onClick?.(event);\n void copy();\n }}\n {...(button && {\n color: 'surface',\n startIcon: <Icon />,\n 'aria-label': ariaLabel,\n })}\n {...(!button && {\n variant: 'filled',\n color: 'surface',\n 'aria-label': ariaLabel ?? 'Copy',\n })}\n {...rest}\n {...(state === 'success' && { 'aria-label': 'Copied', ...copiedRest })}\n {...(state === 'error' && errorRest)}\n >\n {button &&\n {\n idle: children,\n loading: children,\n success: copiedChildren,\n error: errorChildren,\n }[state]}\n {!button && <Icon />}\n </Component>\n );\n },\n);\n"],"names":["CopyButton","forwardRef","value","copyFn","resetDelay","onCopied","onError","button","copiedProps","errorProps","children","CopyIconComponent","CopiedIconComponent","ErrorIconComponent","LoadingIconComponent","disabled","onClick","size","ariaLabel","rest","ref","copiedChildren","copiedRest","errorChildren","errorRest","state","copy","useCopyAction","IdleIcon","CopyIcon","SuccessIcon","CheckIcon","ErrorIcon","CloseIcon","LoadingIcon","useMemo","_jsx","Spinner","Icon","Component","Button","IconButton","_jsxs","event","color","startIcon","variant","idle","loading","success","error"],"mappings":"maA4CO,MAAMA,EAAwCC,EACnD,EAEIC,QACAC,SACAC,aACAC,WACAC,UACAC,UAAS,EACTC,cACAC,aACAC,WAAW,OACXC,oBACAC,sBACAC,qBACAC,uBACAC,WACAC,UACAC,OAAO,QACP,aAAcC,KACXC,GAELC,KAEA,MAAQV,SAAUW,EAAiB,YAAaC,GAAed,GAAe,CAAA,GACtEE,SAAUa,EAAgBb,KAAac,GAAcf,GAAc,CAAA,GACrEgB,MAAEA,EAAKC,KAAEA,GAASC,EAAc,CAAEzB,QAAOC,SAAQC,aAAYC,WAAUC,YAEvEsB,EAAWjB,GAAqBkB,EAChCC,EAAclB,GAAuBmB,EACrCC,EAAYnB,GAAsBoB,EAClCC,EAAcC,EAClB,IAAMrB,GAAoB,KAAWsB,EAACC,EAAO,CAACpB,KAAe,WAATA,EAAoB,SAAW,WACnF,CAACH,EAAsBG,IAGnBqB,EAAOH,EAAQ,KACnB,OAAQV,GACN,IAAK,UACH,OAAOS,EACT,IAAK,UACH,OAAOJ,EACT,IAAK,QACH,OAAOE,EAET,QACE,OAAOJ,IAEV,CAACH,EAAOS,EAAaJ,EAAaE,EAAWJ,IAE1CW,EAAYJ,EAAwC,IAAO5B,EAASiC,EAASC,EAAa,CAAClC,IAEjG,OACEmC,EAACH,EAAS,CACRnB,IAAKA,EAAG,aACIK,EACZV,SAAUA,GAAsB,YAAVU,EACtBR,KAAMA,EACND,QAAU2B,IACR3B,IAAU2B,GACLjB,QAEFnB,GAAU,CACbqC,MAAO,UACPC,UAAWT,EAACE,EAAI,IAChB,aAAcpB,OAEVX,GAAU,CACduC,QAAS,SACTF,MAAO,UACP,aAAc1B,GAAa,WAEzBC,KACW,YAAVM,GAAuB,CAAE,aAAc,YAAaH,MAC1C,UAAVG,GAAqBD,EAAUd,SAAA,CAEnCH,GACC,CACEwC,KAAMrC,EACNsC,QAAStC,EACTuC,QAAS5B,EACT6B,MAAO3B,GACPE,IACFlB,GAAU6B,EAACE,EAAI,CAAA"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { CopyButtonProps } from './CopyButton';
3
+ export interface CopyIconButtonProps extends Omit<CopyButtonProps, 'button'> {
4
+ }
5
+ /**
6
+ * CopyIconButton is a proxy component to <CopyButton button={false} />
7
+ */
8
+ export declare const CopyIconButton: React.FC<CopyIconButtonProps>;
@@ -0,0 +1,2 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{forwardRef as o}from"react";import{CopyButton as r}from"./CopyButton.js";const m=o((o,m)=>t(r,{ref:m,button:!1,...o}));export{m as CopyIconButton};
2
+ //# sourceMappingURL=CopyIconButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyIconButton.js","sources":["../../../src/components/copyButton/CopyIconButton.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { CopyButton, CopyButtonProps } from './CopyButton';\n\nexport interface CopyIconButtonProps extends Omit<CopyButtonProps, 'button'> {}\n\n/**\n * CopyIconButton is a proxy component to <CopyButton button={false} />\n */\nexport const CopyIconButton: React.FC<CopyIconButtonProps> = forwardRef((props, ref) => (\n <CopyButton ref={ref} button={false} {...props} />\n));\n"],"names":["CopyIconButton","forwardRef","props","ref","_jsx","CopyButton","button"],"mappings":"wHAQO,MAAMA,EAAgDC,EAAW,CAACC,EAAOC,IAC9EC,EAACC,EAAU,CAACF,IAAKA,EAAKG,QAAQ,KAAWJ"}
@@ -0,0 +1,3 @@
1
+ export * from './CopyButton';
2
+ export * from './CopyIconButton';
3
+ export * from './useCopyAction';
@@ -0,0 +1,31 @@
1
+ export type CopyState = 'idle' | 'loading' | 'success' | 'error';
2
+ export interface UseCopyActionProps {
3
+ /**
4
+ * Text value to copy
5
+ */
6
+ value: string;
7
+ /**
8
+ * Custom copy implementation, defaults to copyToClipboard from the library
9
+ */
10
+ copyFn?: (text: string) => unknown;
11
+ /**
12
+ * How long the success / error state stays visible before returning to idle
13
+ * @default 2000
14
+ */
15
+ resetDelay?: number;
16
+ /**
17
+ * Called after successful copy
18
+ */
19
+ onCopied?: () => void;
20
+ /**
21
+ * Called when copy fails
22
+ */
23
+ onError?: (error: unknown) => void;
24
+ }
25
+ /**
26
+ * Shared copy state for CopyButton and CopyIconButton
27
+ */
28
+ export declare const useCopyAction: ({ value, copyFn, resetDelay, onCopied, onError, }: UseCopyActionProps) => {
29
+ state: CopyState;
30
+ copy: () => Promise<void>;
31
+ };