@orangesk/orange-design-system 2.0.0-beta.0 → 2.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/build/components/Accordion/tsconfig.tsbuildinfo +1 -1
  2. package/build/components/Alert/tsconfig.tsbuildinfo +1 -1
  3. package/build/components/AnchorNavigation/tsconfig.tsbuildinfo +1 -1
  4. package/build/components/Bar/tsconfig.tsbuildinfo +1 -1
  5. package/build/components/BlockAction/tsconfig.tsbuildinfo +1 -1
  6. package/build/components/BodyBanner/tsconfig.tsbuildinfo +1 -1
  7. package/build/components/Breadcrumbs/tsconfig.tsbuildinfo +1 -1
  8. package/build/components/Button/tsconfig.tsbuildinfo +1 -1
  9. package/build/components/Buttons/tsconfig.tsbuildinfo +1 -1
  10. package/build/components/Card/tsconfig.tsbuildinfo +1 -1
  11. package/build/components/Carousel/tsconfig.tsbuildinfo +1 -1
  12. package/build/components/CarouselPromotions/tsconfig.tsbuildinfo +1 -1
  13. package/build/components/CartTable/tsconfig.tsbuildinfo +1 -1
  14. package/build/components/Code/tsconfig.tsbuildinfo +1 -1
  15. package/build/components/Container/tsconfig.tsbuildinfo +1 -1
  16. package/build/components/Controls/tsconfig.tsbuildinfo +1 -1
  17. package/build/components/Cover/tsconfig.tsbuildinfo +1 -1
  18. package/build/components/Divider/tsconfig.tsbuildinfo +1 -1
  19. package/build/components/DocumentationSidebar/index.js +1 -1
  20. package/build/components/DocumentationSidebar/tsconfig.tsbuildinfo +1 -1
  21. package/build/components/Dropdown/tsconfig.tsbuildinfo +1 -1
  22. package/build/components/Expander/tsconfig.tsbuildinfo +1 -1
  23. package/build/components/FeatureAccordion/tsconfig.tsbuildinfo +1 -1
  24. package/build/components/Footer/index.js.map +1 -1
  25. package/build/components/Footer/tsconfig.tsbuildinfo +1 -1
  26. package/build/components/Forms/tsconfig.tsbuildinfo +1 -1
  27. package/build/components/Gauge/tsconfig.tsbuildinfo +1 -1
  28. package/build/components/Grid/tsconfig.tsbuildinfo +1 -1
  29. package/build/components/Hero/tsconfig.tsbuildinfo +1 -1
  30. package/build/components/Icon/tsconfig.tsbuildinfo +1 -1
  31. package/build/components/IconList/tsconfig.tsbuildinfo +1 -1
  32. package/build/components/Image/tsconfig.tsbuildinfo +1 -1
  33. package/build/components/Link/tsconfig.tsbuildinfo +1 -1
  34. package/build/components/List/tsconfig.tsbuildinfo +1 -1
  35. package/build/components/Loader/tsconfig.tsbuildinfo +1 -1
  36. package/build/components/Megamenu/style.css +1 -1
  37. package/build/components/Megamenu/style.css.map +1 -1
  38. package/build/components/Megamenu/tsconfig.tsbuildinfo +1 -1
  39. package/build/components/Modal/index.js +3 -3
  40. package/build/components/Modal/index.js.map +1 -1
  41. package/build/components/Modal/tsconfig.tsbuildinfo +1 -1
  42. package/build/components/Pagination/tsconfig.tsbuildinfo +1 -1
  43. package/build/components/Pill/tsconfig.tsbuildinfo +1 -1
  44. package/build/components/Preview/tsconfig.tsbuildinfo +1 -1
  45. package/build/components/Progress/tsconfig.tsbuildinfo +1 -1
  46. package/build/components/PromoBanner/tsconfig.tsbuildinfo +1 -1
  47. package/build/components/PromotionCard/tsconfig.tsbuildinfo +1 -1
  48. package/build/components/Section/index.js.map +1 -1
  49. package/build/components/Section/tsconfig.tsbuildinfo +1 -1
  50. package/build/components/Skeleton/tsconfig.tsbuildinfo +1 -1
  51. package/build/components/SkipLink/tsconfig.tsbuildinfo +1 -1
  52. package/build/components/Stepbar/tsconfig.tsbuildinfo +1 -1
  53. package/build/components/Sticker/tsconfig.tsbuildinfo +1 -1
  54. package/build/components/Table/tsconfig.tsbuildinfo +1 -1
  55. package/build/components/Tabs/tsconfig.tsbuildinfo +1 -1
  56. package/build/components/Tag/tsconfig.tsbuildinfo +1 -1
  57. package/build/components/Testimonial/tsconfig.tsbuildinfo +1 -1
  58. package/build/components/Tile/tsconfig.tsbuildinfo +1 -1
  59. package/build/components/Tooltip/tsconfig.tsbuildinfo +1 -1
  60. package/build/components/index.css +1 -1
  61. package/build/components/index.css.map +1 -1
  62. package/build/components/index.js +4 -4
  63. package/build/components/index.js.map +1 -1
  64. package/build/components/tsconfig.tsbuildinfo +1 -1
  65. package/build/components/types/src/components/Modal/Modal.d.ts +4 -0
  66. package/build/components/types/src/components/Modal/ModalProductFooter.d.ts +10 -0
  67. package/build/components/types/src/components/Modal/index.d.ts +1 -0
  68. package/build/components/types/src/components/Section/Section.d.ts +1 -1
  69. package/build/lib/after-components.css +1 -1
  70. package/build/lib/after-components.css.map +1 -1
  71. package/build/lib/before-components.css +1 -1
  72. package/build/lib/before-components.css.map +1 -1
  73. package/build/lib/components.css +1 -1
  74. package/build/lib/components.css.map +1 -1
  75. package/build/lib/style.css +1 -1
  76. package/build/lib/style.css.map +1 -1
  77. package/package.json +1 -1
  78. package/src/components/Megamenu/styles/config.scss +2 -0
  79. package/src/components/Megamenu/styles/mixins.scss +2 -1
  80. package/src/components/Modal/Modal.tsx +8 -1
  81. package/src/components/Modal/ModalProductFooter.tsx +38 -0
  82. package/src/components/Modal/index.ts +1 -0
  83. package/src/components/Modal/styles/config.scss +7 -0
  84. package/src/components/Modal/styles/mixins.scss +59 -9
  85. package/src/components/Modal/styles/style.scss +12 -0
  86. package/src/components/Modal/tests/Modal.unit.test.js +36 -0
  87. package/src/components/Section/Section.tsx +7 -1
  88. package/src/components/Section/tests/Section.conformance.test.js +7 -1
  89. package/src/components/Section/tests/Section.unit.test.js +28 -1
  90. package/src/styles/tokens/color.scss +4 -0
  91. package/src/styles/utilities/color.scss +14 -0
@@ -1,4 +1,4 @@
1
- import e,{useRef as t,useEffect as n,useCallback as r,cloneElement as o,useContext as i}from"react";function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,h(r.key),r)}}function l(e,t,n){return(t=h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){l(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var y,p={exports:{}};
1
+ import e,{useRef as t,useEffect as n,useCallback as r,cloneElement as o,useContext as i}from"react";function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,h(r.key),r)}}function l(e,t,n){return(t=h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){l(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var y,p={exports:{}};
2
2
  /*!
3
3
  Copyright (c) 2018 Jed Watson.
4
4
  Licensed under the MIT License (MIT), see
@@ -12,9 +12,9 @@ import e,{useRef as t,useEffect as n,useCallback as r,cloneElement as o,useConte
12
12
  *
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
- */function O(){return k||(k=1,"production"!==process.env.NODE_ENV&&function(){function t(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===j?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case h:return"Fragment";case y:return"Profiler";case m:return"StrictMode";case g:return"Suspense";case w:return"SuspenseList";case k:return"Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case f:return"Portal";case v:return(e.displayName||"Context")+".Provider";case p:return(e._context.displayName||"Context")+".Consumer";case b:var n=e.render;return(e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case S:return null!==(n=e.displayName||null)?n:t(e.type)||"Memo";case N:n=e._payload,e=e._init;try{return t(e(n))}catch(e){}}return null}function n(e){return""+e}function r(e){try{n(e);var t=!1}catch(e){t=!0}if(t){var r=(t=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),n(e)}}function o(e){if(e===h)return"<>";if("object"==typeof e&&null!==e&&e.$$typeof===N)return"<...>";try{var n=t(e);return n?"<"+n+">":"<...>"}catch(e){return"<...>"}}function i(){return Error("react-stack-top-frame")}function a(){var e=t(this.type);return T[e]||(T[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function s(e,n,o,i,s,u,f,h){var m,y=n.children;if(void 0!==y)if(i)if(_(y)){for(i=0;i<y.length;i++)l(y[i]);Object.freeze&&Object.freeze(y)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else l(y);if($.call(n,"key")){y=t(e);var p=Object.keys(n).filter(function(e){return"key"!==e});i=0<p.length?"{key: someKey, "+p.join(": ..., ")+": ...}":"{key: someKey}",P[y+i]||(p=0<p.length?"{"+p.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',i,y,p,y),P[y+i]=!0)}if(y=null,void 0!==o&&(r(o),y=""+o),function(e){if($.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(n)&&(r(n.key),y=""+n.key),"key"in n)for(var v in o={},n)"key"!==v&&(o[v]=n[v]);else o=n;return y&&function(e,t){function n(){c||(c=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(o,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,t,n,r,o,i,s,l){return n=i.ref,e={$$typeof:d,type:e,key:t,props:i,_owner:o},null!==(void 0!==n?n:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:a}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:s}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,y,u,0,null===(m=O.A)?null:m.getOwner(),o,f,h)}function l(e){"object"==typeof e&&null!==e&&e.$$typeof===d&&e._store&&(e._store.validated=1)}var c,u=e,d=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),v=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),j=Symbol.for("react.client.reference"),O=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=Object.prototype.hasOwnProperty,_=Array.isArray,E=console.createTask?console.createTask:function(){return null},T={},A=(u={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(u,i)(),R=E(o(i)),P={};x.Fragment=h,x.jsx=function(e,t,n,r,i){var a=1e4>O.recentlyCreatedOwnerStacks++;return s(e,t,n,!1,0,i,a?Error("react-stack-top-frame"):A,a?E(o(e)):R)},x.jsxs=function(e,t,n,r,i){var a=1e4>O.recentlyCreatedOwnerStacks++;return s(e,t,n,!0,0,i,a?Error("react-stack-top-frame"):A,a?E(o(e)):R)}}()),x}var $=(j||(j=1,"production"===process.env.NODE_ENV?S.exports=function(){if(w)return N;w=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(t,n,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==n.key&&(o=""+n.key),"key"in n)for(var i in r={},n)"key"!==i&&(r[i]=n[i]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:o,ref:void 0!==n?n:null,props:r}}return N.Fragment=t,N.jsx=n,N.jsxs=n,N}():S.exports=O()),S.exports),_=["className","children","htmlType","href","isActive","isDefault","isDisabled","colorScheme","size","isSquare","type","elemRef"],E="btn",T=e.forwardRef(function(e,t){var n=e.className,r=e.children,o=e.htmlType,i=void 0===o?"button":o,a=e.href,s=e.isActive,c=e.isDefault,f=e.isDisabled,h=e.colorScheme,m=e.size,y=e.isSquare,p=e.type,v=e.elemRef,g=d(e,_),w=b(E,l(l(l(l(l(l(l({},"".concat(E,"--square"),y),"".concat(E,"--").concat(m),m),"".concat(E,"--").concat(p),p),"".concat(E,"--default"),c),"is-dark","dark"===h),"is-light","light"===h),"is-active",s),n);if(a){var S=g;return $.jsx("a",u(u({href:a,className:w,"aria-disabled":f?"true":void 0,ref:v||t},S),{},{children:r}))}var N=g;return $.jsx("button",u(u({type:i,className:w,disabled:!!f||void 0,"aria-disabled":f?"true":void 0,ref:v||t},N),{},{children:r}))});T.displayName="Button";var A=e.createContext("/sprite.svg"),R=["className","alt","color","name","size","spritePath","type"],P="icon",I=function(e){var t=e.className,n=e.alt,r=e.color,o=e.name,a=e.size,s=e.spritePath,c=void 0===s?"/sprite.svg":s,f=e.type,h=void 0===f?"icon":f,m=d(e,R),y=i(A),p="pictogram"===h,v=b(P,l(l(l({},"".concat(P,"--").concat(a),a),"".concat(P,"--").concat(r),r),"".concat(P,"--pictogram"),p),t);if(p){var g="/sprite.svg"!==c||void 0===y?c:y;return $.jsxs("svg",u(u({className:v,"aria-hidden":void 0!==n?void 0:"true",role:void 0!==n?"img":void 0},m),{},{children:[void 0!==n&&n.length>0&&$.jsx("title",{children:n}),$.jsx("use",{className:"".concat(P,"__use ").concat(P,"__use--light"),xlinkHref:"".concat(g,"#").concat(o)}),$.jsx("use",{className:"".concat(P,"__use ").concat(P,"__use--dark"),xlinkHref:"".concat(g,"#").concat(o,"--dark")})]}))}return $.jsxs("svg",u(u({className:v,"aria-hidden":void 0!==n?void 0:"true",role:void 0!==n?"img":void 0},m),{},{children:[void 0!==n&&n.length>0&&$.jsx("title",{children:n}),$.jsx("use",{xlinkHref:"/sprite.svg"!==c||void 0===y?"".concat(c,"#").concat(o):"".concat(y,"#").concat(o)})]}))};I.displayName="Icon";var C=["iconName","iconPosition","iconClassName","children","size","isSquare"],D=["className"],F=e.forwardRef(function(e,t){var n=e.iconName,r=e.iconPosition,o=void 0===r?"left":r,i=e.iconClassName,a=e.children,s=e.size,l=e.isSquare,c=d(e,C),f=function(e){var t=e.className,r=d(e,D);return $.jsx(I,u({name:n,size:null!=s?s:"medium",className:b(i,t)},r))};return l?$.jsxs(T,u(u({size:s,isSquare:!0},c),{},{ref:t,children:[$.jsx(f,{}),$.jsx("span",{className:"visually-hidden",children:a})]})):$.jsxs(T,u(u({ref:t,size:s},c),{},{children:["left"===o&&$.jsx(f,{className:"btn__icon-left"}),a,"right"===o&&$.jsx(f,{className:"btn__icon-right"})]}))});F.displayName="IconButton";var M=["isStackedOnXs","children","className"],L="buttons",z=function(e){var t=e.isStackedOnXs,n=e.children,r=e.className,o=d(e,M);return $.jsx("div",u(u({className:b(L,l({},"".concat(L,"--stack-on-xs"),t),r)},o),{},{children:n}))};z.displayName="Buttons";const B=":not([inert]):not([inert] *)",q=':not([tabindex^="-"])',H=":not(:disabled)";var U=[`a[href]${B}${q}`,`area[href]${B}${q}`,`input:not([type="hidden"]):not([type="radio"])${B}${q}${H}`,`input[type="radio"]${B}${q}${H}`,`select${B}${q}${H}`,`textarea${B}${q}${H}`,`button${B}${q}${H}`,`details${B} > summary:first-of-type${q}`,`iframe${B}${q}`,`audio[controls]${B}${q}`,`video[controls]${B}${q}`,`[contenteditable]${B}${q}`,`[tabindex]${B}${q}`];function K(e){(e.querySelector("[autofocus]")||e).focus()}function W(e,t){if(t&&Y(e))return e;if(function(e){return(!e.shadowRoot||"-1"!==e.getAttribute("tabindex"))&&!e.matches(":disabled,[hidden],[inert]")}(e))if(e.shadowRoot){let n=X(e.shadowRoot,t);for(;n;){const e=W(n,t);if(e)return e;n=V(n,t)}}else if("slot"===e.localName){const n=e.assignedElements({flatten:!0});t||n.reverse();for(const e of n){const n=W(e,t);if(n)return n}}else{let n=X(e,t);for(;n;){const e=W(n,t);if(e)return e;n=V(n,t)}}return!t&&Y(e)?e:null}function X(e,t){return t?e.firstElementChild:e.lastElementChild}function V(e,t){return t?e.nextElementSibling:e.previousElementSibling}const Y=e=>!e.shadowRoot?.delegatesFocus&&(e.matches(U.join(","))&&!(e=>!(!e.matches("details:not([open]) *")||e.matches("details>summary:first-of-type"))||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))(e));function J(e=document){const t=e.activeElement;return t?t.shadowRoot?J(t.shadowRoot)||document.activeElement:t:null}function G(e,t){const[n,r]=function(e){const t=W(e,!0);return[t,t?W(e,!1)||t:null]}(e);if(!n)return t.preventDefault();const o=J();t.shiftKey&&o===n?(r.focus(),t.preventDefault()):t.shiftKey||o!==r||(n.focus(),t.preventDefault())}function Z(e,t){return function t(n){if(!n||n===document||n===window)return null;const r=Q(n);return r&&(n=r),n.closest(e)||t(n.getRootNode().host)}(t)}function Q(e){return e.assignedSlot||(e.parentNode?Q(e.parentNode):null)}const ee="data-a11y-dialog";class te{$el;id;previouslyFocused;shown;constructor(e){this.$el=e,this.id=this.$el.getAttribute(ee)||this.$el.id,this.previouslyFocused=null,this.shown=!1,this.maintainFocus=this.maintainFocus.bind(this),this.bindKeypress=this.bindKeypress.bind(this),this.handleTriggerClicks=this.handleTriggerClicks.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.$el.setAttribute("aria-hidden","true"),this.$el.setAttribute("aria-modal","true"),this.$el.setAttribute("tabindex","-1"),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),document.addEventListener("click",this.handleTriggerClicks,!0)}destroy(){return this.fire("destroy").defaultPrevented||(this.hide(),document.removeEventListener("click",this.handleTriggerClicks,!0),this.$el.replaceWith(this.$el.cloneNode(!0))),this}show(e){if(this.shown)return this;return this.fire("show",e).defaultPrevented||(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=J(),"BODY"===this.previouslyFocused?.tagName&&e?.target&&(this.previouslyFocused=e.target),"focus"===e?.type?this.maintainFocus():K(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0)),this}hide(e){if(!this.shown)return this;return this.fire("hide",e).defaultPrevented||(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),document.body.removeEventListener("focus",this.maintainFocus,!0),this.$el.removeEventListener("keydown",this.bindKeypress,!0),this.previouslyFocused?.focus?.()),this}on(e,t,n){return this.$el.addEventListener(e,t,n),this}off(e,t,n){return this.$el.removeEventListener(e,t,n),this}fire(e,t){const n=new CustomEvent(e,{detail:t,cancelable:!0});return this.$el.dispatchEvent(n),n}handleTriggerClicks(e){const t=e.composedPath()[0],n=Z(`[${ee}-show="${this.id}"]`,t),r=Z(`[${ee}-hide="${this.id}"]`,t),o=Z(`[${ee}-hide]`,t)&&Z('[aria-modal="true"]',t)===this.$el;n&&this.show(e),(r||o)&&this.hide(e)}bindKeypress(e){if(Z('[aria-modal="true"]',J())!==this.$el)return;let t=!1;try{t=!!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open')}catch{}"Escape"!==e.key||"alertdialog"===this.$el.getAttribute("role")||t||(e.preventDefault(),this.hide(e)),"Tab"===e.key&&G(this.$el,e)}maintainFocus(){const e=J();Z(`[aria-modal="true"], [${ee}-ignore-focus-trap]`,e)||K(this.$el)}}function ne(){for(const e of document.querySelectorAll("[data-a11y-dialog]"))new te(e)}"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",ne):ne());
15
+ */function _(){return k||(k=1,"production"!==process.env.NODE_ENV&&function(){function t(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===j?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case h:return"Fragment";case y:return"Profiler";case m:return"StrictMode";case g:return"Suspense";case w:return"SuspenseList";case k:return"Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case f:return"Portal";case v:return(e.displayName||"Context")+".Provider";case p:return(e._context.displayName||"Context")+".Consumer";case b:var n=e.render;return(e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case S:return null!==(n=e.displayName||null)?n:t(e.type)||"Memo";case N:n=e._payload,e=e._init;try{return t(e(n))}catch(e){}}return null}function n(e){return""+e}function r(e){try{n(e);var t=!1}catch(e){t=!0}if(t){var r=(t=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),n(e)}}function o(e){if(e===h)return"<>";if("object"==typeof e&&null!==e&&e.$$typeof===N)return"<...>";try{var n=t(e);return n?"<"+n+">":"<...>"}catch(e){return"<...>"}}function i(){return Error("react-stack-top-frame")}function a(){var e=t(this.type);return T[e]||(T[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function s(e,n,o,i,s,d,f,h){var m,y=n.children;if(void 0!==y)if(i)if($(y)){for(i=0;i<y.length;i++)l(y[i]);Object.freeze&&Object.freeze(y)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else l(y);if(O.call(n,"key")){y=t(e);var p=Object.keys(n).filter(function(e){return"key"!==e});i=0<p.length?"{key: someKey, "+p.join(": ..., ")+": ...}":"{key: someKey}",P[y+i]||(p=0<p.length?"{"+p.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',i,y,p,y),P[y+i]=!0)}if(y=null,void 0!==o&&(r(o),y=""+o),function(e){if(O.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(n)&&(r(n.key),y=""+n.key),"key"in n)for(var v in o={},n)"key"!==v&&(o[v]=n[v]);else o=n;return y&&function(e,t){function n(){c||(c=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(o,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,t,n,r,o,i,s,l){return n=i.ref,e={$$typeof:u,type:e,key:t,props:i,_owner:o},null!==(void 0!==n?n:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:a}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:s}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,y,d,0,null===(m=_.A)?null:m.getOwner(),o,f,h)}function l(e){"object"==typeof e&&null!==e&&e.$$typeof===u&&e._store&&(e._store.validated=1)}var c,d=e,u=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),v=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),j=Symbol.for("react.client.reference"),_=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=Object.prototype.hasOwnProperty,$=Array.isArray,E=console.createTask?console.createTask:function(){return null},T={},A=(d={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(d,i)(),R=E(o(i)),P={};x.Fragment=h,x.jsx=function(e,t,n,r,i){var a=1e4>_.recentlyCreatedOwnerStacks++;return s(e,t,n,!1,0,i,a?Error("react-stack-top-frame"):A,a?E(o(e)):R)},x.jsxs=function(e,t,n,r,i){var a=1e4>_.recentlyCreatedOwnerStacks++;return s(e,t,n,!0,0,i,a?Error("react-stack-top-frame"):A,a?E(o(e)):R)}}()),x}var O=(j||(j=1,"production"===process.env.NODE_ENV?S.exports=function(){if(w)return N;w=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(t,n,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==n.key&&(o=""+n.key),"key"in n)for(var i in r={},n)"key"!==i&&(r[i]=n[i]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:o,ref:void 0!==n?n:null,props:r}}return N.Fragment=t,N.jsx=n,N.jsxs=n,N}():S.exports=_()),S.exports),$=["className","children","htmlType","href","isActive","isDefault","isDisabled","colorScheme","size","isSquare","type","elemRef"],E="btn",T=e.forwardRef(function(e,t){var n=e.className,r=e.children,o=e.htmlType,i=void 0===o?"button":o,a=e.href,s=e.isActive,c=e.isDefault,f=e.isDisabled,h=e.colorScheme,m=e.size,y=e.isSquare,p=e.type,v=e.elemRef,g=u(e,$),w=b(E,l(l(l(l(l(l(l({},"".concat(E,"--square"),y),"".concat(E,"--").concat(m),m),"".concat(E,"--").concat(p),p),"".concat(E,"--default"),c),"is-dark","dark"===h),"is-light","light"===h),"is-active",s),n);if(a){var S=g;return O.jsx("a",d(d({href:a,className:w,"aria-disabled":f?"true":void 0,ref:v||t},S),{},{children:r}))}var N=g;return O.jsx("button",d(d({type:i,className:w,disabled:!!f||void 0,"aria-disabled":f?"true":void 0,ref:v||t},N),{},{children:r}))});T.displayName="Button";var A=e.createContext("/sprite.svg"),R=["className","alt","color","name","size","spritePath","type"],P="icon",I=function(e){var t=e.className,n=e.alt,r=e.color,o=e.name,a=e.size,s=e.spritePath,c=void 0===s?"/sprite.svg":s,f=e.type,h=void 0===f?"icon":f,m=u(e,R),y=i(A),p="pictogram"===h,v=b(P,l(l(l({},"".concat(P,"--").concat(a),a),"".concat(P,"--").concat(r),r),"".concat(P,"--pictogram"),p),t);if(p){var g="/sprite.svg"!==c||void 0===y?c:y;return O.jsxs("svg",d(d({className:v,"aria-hidden":void 0!==n?void 0:"true",role:void 0!==n?"img":void 0},m),{},{children:[void 0!==n&&n.length>0&&O.jsx("title",{children:n}),O.jsx("use",{className:"".concat(P,"__use ").concat(P,"__use--light"),xlinkHref:"".concat(g,"#").concat(o)}),O.jsx("use",{className:"".concat(P,"__use ").concat(P,"__use--dark"),xlinkHref:"".concat(g,"#").concat(o,"--dark")})]}))}return O.jsxs("svg",d(d({className:v,"aria-hidden":void 0!==n?void 0:"true",role:void 0!==n?"img":void 0},m),{},{children:[void 0!==n&&n.length>0&&O.jsx("title",{children:n}),O.jsx("use",{xlinkHref:"/sprite.svg"!==c||void 0===y?"".concat(c,"#").concat(o):"".concat(y,"#").concat(o)})]}))};I.displayName="Icon";var C=["iconName","iconPosition","iconClassName","children","size","isSquare"],D=["className"],F=e.forwardRef(function(e,t){var n=e.iconName,r=e.iconPosition,o=void 0===r?"left":r,i=e.iconClassName,a=e.children,s=e.size,l=e.isSquare,c=u(e,C),f=function(e){var t=e.className,r=u(e,D);return O.jsx(I,d({name:n,size:null!=s?s:"medium",className:b(i,t)},r))};return l?O.jsxs(T,d(d({size:s,isSquare:!0},c),{},{ref:t,children:[O.jsx(f,{}),O.jsx("span",{className:"visually-hidden",children:a})]})):O.jsxs(T,d(d({ref:t,size:s},c),{},{children:["left"===o&&O.jsx(f,{className:"btn__icon-left"}),a,"right"===o&&O.jsx(f,{className:"btn__icon-right"})]}))});F.displayName="IconButton";var M=["isStackedOnXs","children","className"],L="buttons",z=function(e){var t=e.isStackedOnXs,n=e.children,r=e.className,o=u(e,M);return O.jsx("div",d(d({className:b(L,l({},"".concat(L,"--stack-on-xs"),t),r)},o),{},{children:n}))};z.displayName="Buttons";const B=":not([inert]):not([inert] *)",q=':not([tabindex^="-"])',H=":not(:disabled)";var U=[`a[href]${B}${q}`,`area[href]${B}${q}`,`input:not([type="hidden"]):not([type="radio"])${B}${q}${H}`,`input[type="radio"]${B}${q}${H}`,`select${B}${q}${H}`,`textarea${B}${q}${H}`,`button${B}${q}${H}`,`details${B} > summary:first-of-type${q}`,`iframe${B}${q}`,`audio[controls]${B}${q}`,`video[controls]${B}${q}`,`[contenteditable]${B}${q}`,`[tabindex]${B}${q}`];function K(e){(e.querySelector("[autofocus]")||e).focus()}function W(e,t){if(t&&Y(e))return e;if(function(e){return(!e.shadowRoot||"-1"!==e.getAttribute("tabindex"))&&!e.matches(":disabled,[hidden],[inert]")}(e))if(e.shadowRoot){let n=X(e.shadowRoot,t);for(;n;){const e=W(n,t);if(e)return e;n=V(n,t)}}else if("slot"===e.localName){const n=e.assignedElements({flatten:!0});t||n.reverse();for(const e of n){const n=W(e,t);if(n)return n}}else{let n=X(e,t);for(;n;){const e=W(n,t);if(e)return e;n=V(n,t)}}return!t&&Y(e)?e:null}function X(e,t){return t?e.firstElementChild:e.lastElementChild}function V(e,t){return t?e.nextElementSibling:e.previousElementSibling}const Y=e=>!e.shadowRoot?.delegatesFocus&&(e.matches(U.join(","))&&!(e=>!(!e.matches("details:not([open]) *")||e.matches("details>summary:first-of-type"))||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))(e));function J(e=document){const t=e.activeElement;return t?t.shadowRoot?J(t.shadowRoot)||document.activeElement:t:null}function G(e,t){const[n,r]=function(e){const t=W(e,!0);return[t,t?W(e,!1)||t:null]}(e);if(!n)return t.preventDefault();const o=J();t.shiftKey&&o===n?(r.focus(),t.preventDefault()):t.shiftKey||o!==r||(n.focus(),t.preventDefault())}function Z(e,t){return function t(n){if(!n||n===document||n===window)return null;const r=Q(n);return r&&(n=r),n.closest(e)||t(n.getRootNode().host)}(t)}function Q(e){return e.assignedSlot||(e.parentNode?Q(e.parentNode):null)}const ee="data-a11y-dialog";class te{$el;id;previouslyFocused;shown;constructor(e){this.$el=e,this.id=this.$el.getAttribute(ee)||this.$el.id,this.previouslyFocused=null,this.shown=!1,this.maintainFocus=this.maintainFocus.bind(this),this.bindKeypress=this.bindKeypress.bind(this),this.handleTriggerClicks=this.handleTriggerClicks.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.$el.setAttribute("aria-hidden","true"),this.$el.setAttribute("aria-modal","true"),this.$el.setAttribute("tabindex","-1"),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),document.addEventListener("click",this.handleTriggerClicks,!0)}destroy(){return this.fire("destroy").defaultPrevented||(this.hide(),document.removeEventListener("click",this.handleTriggerClicks,!0),this.$el.replaceWith(this.$el.cloneNode(!0))),this}show(e){if(this.shown)return this;return this.fire("show",e).defaultPrevented||(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=J(),"BODY"===this.previouslyFocused?.tagName&&e?.target&&(this.previouslyFocused=e.target),"focus"===e?.type?this.maintainFocus():K(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0)),this}hide(e){if(!this.shown)return this;return this.fire("hide",e).defaultPrevented||(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),document.body.removeEventListener("focus",this.maintainFocus,!0),this.$el.removeEventListener("keydown",this.bindKeypress,!0),this.previouslyFocused?.focus?.()),this}on(e,t,n){return this.$el.addEventListener(e,t,n),this}off(e,t,n){return this.$el.removeEventListener(e,t,n),this}fire(e,t){const n=new CustomEvent(e,{detail:t,cancelable:!0});return this.$el.dispatchEvent(n),n}handleTriggerClicks(e){const t=e.composedPath()[0],n=Z(`[${ee}-show="${this.id}"]`,t),r=Z(`[${ee}-hide="${this.id}"]`,t),o=Z(`[${ee}-hide]`,t)&&Z('[aria-modal="true"]',t)===this.$el;n&&this.show(e),(r||o)&&this.hide(e)}bindKeypress(e){if(Z('[aria-modal="true"]',J())!==this.$el)return;let t=!1;try{t=!!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open')}catch{}"Escape"!==e.key||"alertdialog"===this.$el.getAttribute("role")||t||(e.preventDefault(),this.hide(e)),"Tab"===e.key&&G(this.$el,e)}maintainFocus(){const e=J();Z(`[aria-modal="true"], [${ee}-ignore-focus-trap]`,e)||K(this.$el)}}function ne(){for(const e of document.querySelectorAll("[data-a11y-dialog]"))new te(e)}"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",ne):ne());
16
16
  /*!
17
17
  * tabbable 6.2.0
18
18
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
19
- */var re=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),oe="undefined"==typeof Element,ie=oe?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ae=!oe&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},se=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},le=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))}(e)?0:e.tabIndex},ce=function(e){return"INPUT"===e.tagName},ue=function(e){return function(e){return ce(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||ae(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},de=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},fe=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=ie.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ie.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return de(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,s=ae(e);if(a&&!a.shadowRoot&&!0===r(a))return de(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(function(e){var t,n,r,o,i=e&&ae(e),a=null===(t=i)||void 0===t?void 0:t.host,s=!1;if(i&&i!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&a;){var l,c,u;s=!(null===(c=a=null===(l=i=ae(a))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},he=function(e,t){return!(t.disabled||se(t)||function(e){return ce(e)&&"hidden"===e.type}(t)||fe(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!ie.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},me=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==ie.call(e,re)&&function(e,t){return!(ue(t)||le(t)<0||!he(e,t))}(t,e)},ye=function(){function e(t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.element=t,this.config=u(u({},{classModalIsOpen:"is-active",classModalIsOpenBody:"has-modal",root:"#root",modalsRoot:"#root-modals"}),n),this.handleShow=this.handleShow.bind(this),this.handleHide=this.handleHide.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.headerFirstItemSpacing=this.headerFirstItemSpacing.bind(this),e.moveToModalRoot=e.moveToModalRoot.bind(this),e.lockBody=e.lockBody.bind(this),e.unlockBody=e.unlockBody.bind(this),this.element.ODS_Modal=this,this.init(),this}return t=e,r=[{key:"getInstance",value:function(e){return e&&e.ODS_Modal||null}},{key:"moveToModalRoot",value:function(e,t){var n;t?t.appendChild(e):console.warn("`modalsRoot: ".concat(null===(n=this.config)||void 0===n?void 0:n.modalsRoot,"` element is not present in DOM. Modal will be placed inside content which can affect it's styling. Please provide `modalsRoot` selector (should be placed outside of main contant, usualy in end of <body /> tag)"))}},{key:"lockBody",value:function(e,t){var n,r,o=e||(null===(n=this.config)||void 0===n?void 0:n.classModalIsOpenBody),i=t||(null===(r=this.config)||void 0===r?void 0:r.root),a=document.querySelector(i),s=document.documentElement.scrollTop||document.body.scrollTop;document.body.setAttribute("data-lock-scrolltop",s.toString()),document.body.style.height="100%",document.body.style.width="100%",document.body.style.overflow="hidden",document.body.style.position="fixed",a&&(a.style.height="100%",a.style.width="100%",a.style.overflow="hidden",a.style.position="fixed",a.scrollTop=s),document.body.classList.add(o),window.requestAnimationFrame(function(){window.scrollTo(0,s)})}},{key:"unlockBody",value:function(e,t){var n,r,o=e||(null===(n=this.config)||void 0===n?void 0:n.classModalIsOpenBody),i=t||(null===(r=this.config)||void 0===r?void 0:r.root),a=document.querySelector(i),s=document.body.getAttribute("data-lock-scrolltop")||"0";document.body.style.height="",document.body.style.width="",document.body.style.overflow="",document.body.style.position="",document.body.classList.remove(o),a&&(a.style.height="",a.style.width="",a.style.overflow="",a.style.position=""),window.requestAnimationFrame(function(){window.scrollTo({left:0,top:parseInt(s,10),behavior:"instant"})})}}],(n=[{key:"handleShow",value:function(t){e.lockBody(),t&&t.classList.add(this.config.classModalIsOpen);var n=t.querySelector("[data-a11y-dialog-initial-focus]");n&&(me(n)||n.setAttribute("tabindex","-1"),n.focus())}},{key:"handleHide",value:function(t){e.unlockBody(),t&&t.classList.remove(this.config.classModalIsOpen)}},{key:"show",value:function(){this.instance.show()}},{key:"hide",value:function(){this.instance.hide()}},{key:"headerFirstItemSpacing",value:function(){var e=this.element.querySelector(".modal__header");if(e){var t=e.classList.contains("modal__header--no-spacing"),n=Array.from(e.children).find(function(e){return!e.classList.contains("btn")});n&&!t&&(n.style.marginRight="40px")}}},{key:"init",value:function(){var t=this;this.config.modalsRoot&&e.moveToModalRoot(this.element,document.querySelector(this.config.modalsRoot)),this.instance=new te(this.element),this.instance.on("show",function(e){var n=e.currentTarget;t.handleShow(n)}),this.instance.on("hide",function(e){var n=e.currentTarget;t.handleHide(n)}),this.headerFirstItemSpacing()}},{key:"destroy",value:function(){this.instance.destroy(),this.element.ODS_Modal=this}},{key:"update",value:function(){this.destroy(),this.init()}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}(),pe=function(e){return $.jsx(F,u({iconName:"delete",type:"ghost",isSquare:!0,size:"small",className:"modal__close","data-a11y-dialog-hide":!0,"aria-label":"Zatvoriť"},e))};pe.displayName="ModalCloseButton";var ve=["size","className","children"],be=function(e){var t=e.size,n=e.className,r=e.children,o=d(e,ve);return $.jsx("h2",u(u({className:b(n,{"display-3":"large"===t,h2:"small"===t})},o),{},{children:r}))};be.displayName="ModalTitle";var ge=["color","className","children","withTopPadding"],we="modal__body",Se=function(e){var t=e.color,n=e.className,r=e.children,o=e.withTopPadding,i=d(e,ge);return $.jsx("div",u(u({className:b(we,n,l(l(l({},"bg-".concat(t),t),"".concat(we,"--colorful"),t),"".concat(we,"--with-top-padding"),o))},i),{},{children:r}))};Se.displayName="ModalBody";var Ne=["actions","className","children","hasStickyFooter","id","noInit","isActive","size","title","renderHeader","renderBody","renderTitle","renderFooter","fullHeight","colorScheme"],ke="modal",je={actions:[$.jsx(T,{"data-a11y-dialog-hide":!0,children:"Zatvoriť"},"1")],noInit:!1},xe=function(e){var o=e.actions,i=void 0===o?je.actions:o,a=e.className,s=e.children,c=e.hasStickyFooter,h=e.id,m=e.noInit,y=void 0===m?je.noInit:m,p=e.isActive,v=e.size,w=e.title,S=e.renderHeader,N=e.renderBody,k=e.renderTitle,j=e.renderFooter,x=e.fullHeight,O=e.colorScheme,_=d(e,Ne),E=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t(null),a=t(o),s=t(null);n(function(){a.current=null!=o?o:{}},[o]);var l=r(function(t){var n,r,o,l;s.current&&s.current!==t&&i.current&&(null===(n=(r=i.current).destroy)||void 0===n||n.call(r),i.current=null),s.current=t,t&&(null===i.current?i.current=new e(t,a.current):null===(o=(l=i.current).update)||void 0===o||o.call(l,a.current))},[e]);return n(function(){return function(){var e,t;i.current&&(null===(e=(t=i.current).destroy)||void 0===e||e.call(t),i.current=null),s.current=null}},[e]),[l,i]}(ye),T=f(E,2),A=T[0],R=T[1];n(function(){p&&R&&R.current&&R.current.show()},[R,p]);var P=b("".concat(ke,"__dialog"),l(l(l(l({},"".concat(ke,"__dialog--").concat(v),v),"".concat(ke,"__dialog--full-height"),x),"is-dark","dark"===O),"is-light","light"===O),a),I="".concat(h,"-title"),C=k?k(h):$.jsx(be,{id:I,size:v,"data-a11y-dialog-initial-focus":!0,children:w});return $.jsxs("div",{id:h,"data-modal":!y,className:ke,ref:A,role:"dialog","aria-hidden":"true","aria-modal":"true","aria-labelledby":I,children:[$.jsx("div",{className:"modal__overlay",tabIndex:-1,"data-a11y-dialog-hide":!0}),$.jsxs("div",u(u({className:P,role:"document"},_),{},{children:[$.jsx("div",{className:b("".concat(ke,"__header"),l({},"".concat(ke,"__header--no-spacing"),!!S)),children:S?S(h):$.jsxs($.Fragment,{children:[$.jsx(pe,{}),C]})}),N?N():$.jsx(Se,{withTopPadding:!!S,children:s}),$.jsx("div",{className:b("".concat(ke,"__footer"),l({},"".concat(ke,"__footer--sticky"),c)),children:j?j():$.jsx(g,{condition:i.length>1,wrapper:$.jsx(z,{}),children:i.map(function(e){return e})})})]}))]})};xe.displayName="Modal";var Oe=["className","children","image","space"],$e="modal__product",_e=e.forwardRef(function(e,t){var n=e.className,r=e.children,o=e.image,i=e.space,a=d(e,Oe),s=b("".concat($e,"-header"),l({},"".concat($e,"-header--space-small"),"small"===i),n),c="".concat($e,"-content");return $.jsxs("div",u(u({className:s,ref:t},a),{},{children:[$.jsx("div",{className:c,children:r}),o]}))});_e.displayName="ModalProductHeader";export{xe as Modal,Se as ModalBody,pe as ModalCloseButton,_e as ModalProductHeader,be as ModalTitle};
19
+ */var re=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),oe="undefined"==typeof Element,ie=oe?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ae=!oe&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},se=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},le=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))}(e)?0:e.tabIndex},ce=function(e){return"INPUT"===e.tagName},de=function(e){return function(e){return ce(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||ae(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},ue=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},fe=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=ie.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ie.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ue(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,s=ae(e);if(a&&!a.shadowRoot&&!0===r(a))return ue(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(function(e){var t,n,r,o,i=e&&ae(e),a=null===(t=i)||void 0===t?void 0:t.host,s=!1;if(i&&i!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&a;){var l,c,d;s=!(null===(c=a=null===(l=i=ae(a))||void 0===l?void 0:l.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},he=function(e,t){return!(t.disabled||se(t)||function(e){return ce(e)&&"hidden"===e.type}(t)||fe(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!ie.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},me=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==ie.call(e,re)&&function(e,t){return!(de(t)||le(t)<0||!he(e,t))}(t,e)},ye=function(){function e(t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.element=t,this.config=d(d({},{classModalIsOpen:"is-active",classModalIsOpenBody:"has-modal",root:"#root",modalsRoot:"#root-modals"}),n),this.handleShow=this.handleShow.bind(this),this.handleHide=this.handleHide.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.headerFirstItemSpacing=this.headerFirstItemSpacing.bind(this),e.moveToModalRoot=e.moveToModalRoot.bind(this),e.lockBody=e.lockBody.bind(this),e.unlockBody=e.unlockBody.bind(this),this.element.ODS_Modal=this,this.init(),this}return t=e,r=[{key:"getInstance",value:function(e){return e&&e.ODS_Modal||null}},{key:"moveToModalRoot",value:function(e,t){var n;t?t.appendChild(e):console.warn("`modalsRoot: ".concat(null===(n=this.config)||void 0===n?void 0:n.modalsRoot,"` element is not present in DOM. Modal will be placed inside content which can affect it's styling. Please provide `modalsRoot` selector (should be placed outside of main contant, usualy in end of <body /> tag)"))}},{key:"lockBody",value:function(e,t){var n,r,o=e||(null===(n=this.config)||void 0===n?void 0:n.classModalIsOpenBody),i=t||(null===(r=this.config)||void 0===r?void 0:r.root),a=document.querySelector(i),s=document.documentElement.scrollTop||document.body.scrollTop;document.body.setAttribute("data-lock-scrolltop",s.toString()),document.body.style.height="100%",document.body.style.width="100%",document.body.style.overflow="hidden",document.body.style.position="fixed",a&&(a.style.height="100%",a.style.width="100%",a.style.overflow="hidden",a.style.position="fixed",a.scrollTop=s),document.body.classList.add(o),window.requestAnimationFrame(function(){window.scrollTo(0,s)})}},{key:"unlockBody",value:function(e,t){var n,r,o=e||(null===(n=this.config)||void 0===n?void 0:n.classModalIsOpenBody),i=t||(null===(r=this.config)||void 0===r?void 0:r.root),a=document.querySelector(i),s=document.body.getAttribute("data-lock-scrolltop")||"0";document.body.style.height="",document.body.style.width="",document.body.style.overflow="",document.body.style.position="",document.body.classList.remove(o),a&&(a.style.height="",a.style.width="",a.style.overflow="",a.style.position=""),window.requestAnimationFrame(function(){window.scrollTo({left:0,top:parseInt(s,10),behavior:"instant"})})}}],(n=[{key:"handleShow",value:function(t){e.lockBody(),t&&t.classList.add(this.config.classModalIsOpen);var n=t.querySelector("[data-a11y-dialog-initial-focus]");n&&(me(n)||n.setAttribute("tabindex","-1"),n.focus())}},{key:"handleHide",value:function(t){e.unlockBody(),t&&t.classList.remove(this.config.classModalIsOpen)}},{key:"show",value:function(){this.instance.show()}},{key:"hide",value:function(){this.instance.hide()}},{key:"headerFirstItemSpacing",value:function(){var e=this.element.querySelector(".modal__header");if(e){var t=e.classList.contains("modal__header--no-spacing"),n=Array.from(e.children).find(function(e){return!e.classList.contains("btn")});n&&!t&&(n.style.marginRight="40px")}}},{key:"init",value:function(){var t=this;this.config.modalsRoot&&e.moveToModalRoot(this.element,document.querySelector(this.config.modalsRoot)),this.instance=new te(this.element),this.instance.on("show",function(e){var n=e.currentTarget;t.handleShow(n)}),this.instance.on("hide",function(e){var n=e.currentTarget;t.handleHide(n)}),this.headerFirstItemSpacing()}},{key:"destroy",value:function(){this.instance.destroy(),this.element.ODS_Modal=this}},{key:"update",value:function(){this.destroy(),this.init()}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}(),pe=function(e){return O.jsx(F,d({iconName:"delete",type:"ghost",isSquare:!0,size:"small",className:"modal__close","data-a11y-dialog-hide":!0,"aria-label":"Zatvoriť"},e))};pe.displayName="ModalCloseButton";var ve=["size","className","children"],be=function(e){var t=e.size,n=e.className,r=e.children,o=u(e,ve);return O.jsx("h2",d(d({className:b(n,{"display-3":"large"===t,h2:"small"===t})},o),{},{children:r}))};be.displayName="ModalTitle";var ge=["color","className","children","withTopPadding"],we="modal__body",Se=function(e){var t=e.color,n=e.className,r=e.children,o=e.withTopPadding,i=u(e,ge);return O.jsx("div",d(d({className:b(we,n,l(l(l({},"bg-".concat(t),t),"".concat(we,"--colorful"),t),"".concat(we,"--with-top-padding"),o))},i),{},{children:r}))};Se.displayName="ModalBody";var Ne=["actions","className","children","hasStickyFooter","id","noInit","isActive","size","title","renderHeader","renderBody","renderTitle","renderFooter","fullHeight","colorScheme","disableHeaderSpacing","disableFooterSpacing"],ke="modal",je={actions:[O.jsx(T,{"data-a11y-dialog-hide":!0,children:"Zatvoriť"},"1")],noInit:!1},xe=function(e){var o=e.actions,i=void 0===o?je.actions:o,a=e.className,s=e.children,c=e.hasStickyFooter,h=e.id,m=e.noInit,y=void 0===m?je.noInit:m,p=e.isActive,v=e.size,w=e.title,S=e.renderHeader,N=e.renderBody,k=e.renderTitle,j=e.renderFooter,x=e.fullHeight,_=e.colorScheme,$=e.disableHeaderSpacing,E=e.disableFooterSpacing,T=u(e,Ne),A=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t(null),a=t(o),s=t(null);n(function(){a.current=null!=o?o:{}},[o]);var l=r(function(t){var n,r,o,l;s.current&&s.current!==t&&i.current&&(null===(n=(r=i.current).destroy)||void 0===n||n.call(r),i.current=null),s.current=t,t&&(null===i.current?i.current=new e(t,a.current):null===(o=(l=i.current).update)||void 0===o||o.call(l,a.current))},[e]);return n(function(){return function(){var e,t;i.current&&(null===(e=(t=i.current).destroy)||void 0===e||e.call(t),i.current=null),s.current=null}},[e]),[l,i]}(ye),R=f(A,2),P=R[0],I=R[1];n(function(){p&&I&&I.current&&I.current.show()},[I,p]);var C=b("".concat(ke,"__dialog"),l(l(l(l({},"".concat(ke,"__dialog--").concat(v),v),"".concat(ke,"__dialog--full-height"),x),"is-dark","dark"===_),"is-light","light"===_),a),D="".concat(h,"-title"),F=k?k(h):O.jsx(be,{id:D,size:v,"data-a11y-dialog-initial-focus":!0,children:w});return O.jsxs("div",{id:h,"data-modal":!y,className:ke,ref:P,role:"dialog","aria-hidden":"true","aria-modal":"true","aria-labelledby":D,children:[O.jsx("div",{className:"modal__overlay",tabIndex:-1,"data-a11y-dialog-hide":!0}),O.jsxs("div",d(d({className:C,role:"document"},T),{},{children:[O.jsx("div",{className:b("".concat(ke,"__header"),l({},"".concat(ke,"__header--no-spacing"),$)),children:S?S(h):O.jsxs(O.Fragment,{children:[O.jsx(pe,{}),F]})}),N?N():O.jsx(Se,{withTopPadding:!!S,children:s}),O.jsx("div",{className:b("".concat(ke,"__footer"),l(l({},"".concat(ke,"__footer--sticky"),c),"".concat(ke,"__footer--no-spacing"),E)),children:j?j():O.jsx(g,{condition:i.length>1,wrapper:O.jsx(z,{}),children:i.map(function(e){return e})})})]}))]})};xe.displayName="Modal";var _e=["className","children","image","space"],Oe="modal__product",$e=e.forwardRef(function(e,t){var n=e.className,r=e.children,o=e.image,i=e.space,a=u(e,_e),s=b("".concat(Oe,"-header"),l({},"".concat(Oe,"-header--space-small"),"small"===i),n),c="".concat(Oe,"-content");return O.jsxs("div",d(d({className:s,ref:t},a),{},{children:[O.jsx("div",{className:c,children:r}),o]}))});$e.displayName="ModalProductHeader";var Ee=["className","children","button","image","space"],Te="modal__product",Ae=e.forwardRef(function(e,t){var n=e.className,r=e.children,o=e.button;e.image,e.space;var i=u(e,Ee),a=b("".concat(Te,"-footer"),n),s="".concat(Te,"-footer-content"),l="".concat(Te,"-footer-button");return O.jsxs("div",d(d({className:a,ref:t},i),{},{children:[O.jsx("div",{className:s,children:r}),O.jsx("div",{className:l,children:o})]}))});Ae.displayName="ModalProductFooter";export{xe as Modal,Se as ModalBody,pe as ModalCloseButton,Ae as ModalProductFooter,$e as ModalProductHeader,be as ModalTitle};
20
20
  //# sourceMappingURL=index.js.map