-
Notifications
You must be signed in to change notification settings - Fork 0
/
6868.d279e2bc.iframe.bundle.js
1 lines (1 loc) · 26.8 KB
/
6868.d279e2bc.iframe.bundle.js
1
"use strict";(self.webpackChunk_haaretz_a_htz_sg=self.webpackChunk_haaretz_a_htz_sg||[]).push([[6868],{"../../ds-atoms/s-button/src/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{ZP:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=__webpack_require__("../../ds-atoms/s-button/src/Button.tsx").ZP},"../../ds-atoms/s-rich-text/src/RichText.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>RichText,p:()=>DEFAULT_ELEMENT});var _home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/jsx-runtime.js"),style9__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/style9/index.mjs");const _excluded=["as","inlineStyle","styleExtend","content","strongStyleExtend"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){(0,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const c={base:{},em:{fontStyle:"foKnQA"},strong:{fontWeight:"iLdtFu"},mark:{backgroundColor:"jNZGNs"},link:{outlineWidth:"eGCNgh",textDecorationLine:"dLUwcr",textDecorationColor:"dDxYlR",textDecorationThickness:"hnHEBj",textUnderlineOffset:"cEqDEh",transitionProperty:"iRietU",transitionDuration:"gAhwfJ",transitionTimingFunction:"iaemGh",":hover":{color:"klOnSG"},":focus":{color:"bsfUtT"}},u:{textDecorationLine:"dLUwcr",textDecorationSkip:"jqXfau"}},DEFAULT_ELEMENT="p",allowedElements=["p","ul","ol","li","h1","h3","span"];function RichText(_ref){let{as,inlineStyle,styleExtend=[],content,strongStyleExtend=[]}=_ref,attrs=(0,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3__.Z)(_ref,_excluded);const Element=as||DEFAULT_ELEMENT;if("string"==typeof as&&!allowedElements.includes(as)||"function"==typeof as)throw new TypeError('<RichTextProps /> may only render a "p", "h3", "h1", "ul", "ol" or a "li" element.\nYou passed something else to the "as" prop');const html=function replaceAll(str,mapObj){if("string"!=typeof str)return"";const replaceStr=new RegExp(Object.keys(mapObj).join("|"),"gi");return str.replace(replaceStr,(matched=>mapObj[matched.toLowerCase()]||"#placeholder#"))}(content,{"#em#":(0,style9__WEBPACK_IMPORTED_MODULE_2__.Z)(c.em),"#strong#":(0,style9__WEBPACK_IMPORTED_MODULE_2__.Z)(c.strong,...strongStyleExtend),"#a#":(0,style9__WEBPACK_IMPORTED_MODULE_2__.Z)(c.link),"#mark#":(0,style9__WEBPACK_IMPORTED_MODULE_2__.Z)(c.mark),"#u#":(0,style9__WEBPACK_IMPORTED_MODULE_2__.Z)(c.u)});return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Element,_objectSpread(_objectSpread({},attrs),{},{className:(0,style9__WEBPACK_IMPORTED_MODULE_2__.Z)(c.base,...styleExtend),style:inlineStyle,dangerouslySetInnerHTML:{__html:html}}))}try{RichText.displayName="RichText",RichText.__docgenInfo={description:"",displayName:"RichText",props:{as:{defaultValue:null,description:"The HTML element (`${AllowedElements}`) the `<RichText />` will be rendered as.\n@defaultValue 'p'",name:"as",required:!1,type:{name:'(ElementType<any> & (ComponentType<any> | "h1" | "h3" | "li" | "ol" | "p" | "span" | "ul")) | undefined'}},inlineStyle:{defaultValue:null,description:"CSS declarations to be set as inline `style` on the\nhtml element.\n\nBy setting values of CSS Custom Properties based on\nprops or state in the consuming component (where\nthe value of `inlineStyle` is passed), `inlineStyle`\ncan be used as an API contract for setting dynamic\nvalues to styles created with `style9.create()`:\n@example ```ts\nimport s9 from 'style9';\nconst { styleExtend, } = s9.create({\n styleExtend: {\n color: 'var(--color-based-on-prop)',\n },\n});\n\nfunction MyRichText(props) {\n const inlineStyle = {\n '--color-based-on-prop': props.color,\n },\n\n return (\n <RichText\n styleExtend={[ styleExtend, ]}\n inlineStyle={inlineStyle}\n />\n );\n}\n```",name:"inlineStyle",required:!1,type:{name:"InlineStyles | undefined"}},styleExtend:{defaultValue:{value:"[]"},description:"An array of `Style`s created by `style9.create()`.\nWARNING: **_do not_** pass simple CSS-in-JS object.\nThe items in the array must be created with Style9's\n`create` function.\nThe array can also hold falsy values to assist with\nconditional inclusion of `Style`s:\n@example ```ts\nconst { foo, bar, } = s9.create({ foo: { ... }, bar: { ... }, });\n<RichText styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}},strongStyleExtend:{defaultValue:{value:"[]"},description:"Same as styleExtend for strong class.",name:"strongStyleExtend",required:!1,type:{name:"StyleExtend | undefined"}},content:{defaultValue:null,description:"The html string to set the elment's innerHtml.\nHas to be replaced with style9 classes first.",name:"content",required:!0,type:{name:"string"}},id:{defaultValue:null,description:"HtmlElement id attribute.",name:"id",required:!1,type:{name:"string | null | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-atoms/s-rich-text/src/RichText.tsx#RichText"]={docgenInfo:RichText.__docgenInfo,name:"RichText",path:"../../ds-atoms/s-rich-text/src/RichText.tsx#RichText"})}catch(__react_docgen_typescript_loader_error){}},"../../ds-atoms/s-rich-text/src/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=__webpack_require__("../../ds-atoms/s-rich-text/src/RichText.tsx").Z},"../../ds-molecules/s-modal/src/Modal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var _home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/jsx-runtime.js"),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/index.js"),style9__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/style9/index.mjs");const _excluded=["children","inlineStyle","isOpen","labelledBy","onClick","onToggle","onOpen","onClose","styleExtend"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){(0,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const c_wrapper={position:"bEvNbr",bottom:"bLIxaN",left:"bOjOhu",right:"kLKrsq",top:"WhAZY",zIndex:"iYxGWt"},Modal=react__WEBPACK_IMPORTED_MODULE_2__.forwardRef((function Modal(_ref,ref){let{children,inlineStyle,isOpen=!1,labelledBy,onClick,onToggle,onOpen,onClose:onCloseProp,styleExtend=[]}=_ref,attrs=(0,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__.Z)(_ref,_excluded);const currentOpenState=react__WEBPACK_IMPORTED_MODULE_2__.useRef(!1),_modalRef=react__WEBPACK_IMPORTED_MODULE_2__.useRef(null),modalRef=null!=ref?ref:_modalRef;react__WEBPACK_IMPORTED_MODULE_2__.useEffect((()=>{const modalElem="current"in modalRef&&modalRef.current;modalElem&&(isOpen&&!currentOpenState.current?(modalElem.showModal(),currentOpenState.current=!0,onOpen&&onOpen(modalElem),onToggle&&onToggle(!0)):!isOpen&¤tOpenState.current&&(modalElem.close(),currentOpenState.current=!1))}),[isOpen,onOpen,onToggle,modalRef]);const onClose=react__WEBPACK_IMPORTED_MODULE_2__.useCallback((evt=>{currentOpenState.current=!1,onCloseProp&&onCloseProp(evt),onToggle&&onToggle(!1)}),[onCloseProp,onToggle]),handleClick=react__WEBPACK_IMPORTED_MODULE_2__.useCallback((evt=>{evt.target===evt.currentTarget&&evt.currentTarget.close(),onClick&&onClick(evt)}),[onClick]);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("dialog",_objectSpread(_objectSpread({ref:modalRef,onClick:handleClick,tabIndex:-1,onClose},attrs),{},{"aria-labelledby":labelledBy||void 0,className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(...styleExtend),style:inlineStyle,children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:(0,style9__WEBPACK_IMPORTED_MODULE_3__.Z)(c_wrapper)}),children]}))}));Modal.__docgenInfo={description:"",methods:[],displayName:"Modal",props:{isOpen:{defaultValue:{value:"false",computed:!1},required:!1},styleExtend:{defaultValue:{value:"[]",computed:!1},required:!1}}};const __WEBPACK_DEFAULT_EXPORT__=Modal;try{Modal.displayName="Modal",Modal.__docgenInfo={description:"",displayName:"Modal",props:{children:{defaultValue:null,description:"The Children to be rendered inside `<Modal>`",name:"children",required:!1,type:{name:"ReactNode"}},labelledBy:{defaultValue:null,description:"The ID of the element (usually an h*) that is the title of the modal.\n\nIn the **RARE** cases where labeling isn't required, manually pass `null`.",name:"labelledBy",required:!0,type:{name:"string | null"}},isOpen:{defaultValue:{value:"false"},description:"Controls whether the modal is open or closed",name:"isOpen",required:!1,type:{name:"boolean | undefined"}},onToggle:{defaultValue:null,description:"A callback that is fired whenever the modal is opened or closed,\nand takes an `isOpen` boolean argument indicating if the modal is open",name:"onToggle",required:!1,type:{name:"((isOpen: boolean) => void) | undefined"}},onOpen:{defaultValue:null,description:"A callback that's fired whenever a modal window is opened and passed\na reference to the modal's underlying `dialog` element.",name:"onOpen",required:!1,type:{name:"((elem: HTMLDialogElement) => void) | undefined"}},inlineStyle:{defaultValue:null,description:"CSS declarations to be set as inline `style` on the\nhtml element.\n\nBy setting values of CSS Custom Properties based on\nprops or state in the consuming component (where\nthe value of `inlineStyle` is passed), `inlineStyle`\ncan be used as an API contract for setting dynamic\nvalues to styles created with `style9.create()`:\n@example ```ts\nimport s9 from 'style9';\nconst { styleExtend, } = s9.create({\n styleExtend: {\n color: 'var(--color-based-on-prop)',\n },\n});\n\nfunction MyModal(props) {\n const inlineStyle = {\n '--color-based-on-prop': props.color,\n },\n\n return (\n <Modal\n styleExtend={[ styleExtend, ]}\n inlineStyle={inlineStyle}\n />\n );\n}\n```",name:"inlineStyle",required:!1,type:{name:"InlineStyles | undefined"}},styleExtend:{defaultValue:{value:"[]"},description:"An array of `Style`s created by `style9.create()`.\nWARNING: **_do not_** pass simple CSS-in-JS object.\nThe items in the array must be created with Style9's\n`create` function.\nThe array can also hold falsy values to assist with\nconditional inclusion of `Style`s:\n@example ```ts\nconst { foo, bar, } = s9.create({ foo: { ... }, bar: { ... }, });\n<Modal styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../ds-molecules/s-modal/src/Modal.tsx#Modal"]={docgenInfo:Modal.__docgenInfo,name:"Modal",path:"../../ds-molecules/s-modal/src/Modal.tsx#Modal"})}catch(__react_docgen_typescript_loader_error){}},"../../pp-molecules/s-pp-terms/src/PpTerms.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>PpTerms});var _home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/jsx-runtime.js"),_haaretz_s_button__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("../../ds-atoms/s-button/src/index.ts"),_haaretz_s_pp_modal__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../pp-organisms/s-pp-modal/src/index.ts"),_haaretz_s_rich_text__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../ds-atoms/s-rich-text/src/index.ts"),style9__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/style9/index.mjs");function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){(0,_home_runner_work_fe_fe_node_modules_pnpm_babel_runtime_7_22_10_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const c={contentWrapper:{display:"kbCXHY",rowGap:"bNzOWQ",marginTop:"fClzDx",fontFamily:"cGpNyn","@media all and (min-width:80em)":{rowGap:"kAeBlF"}},title:{fontWeight:"iLdtFu",marginBottom:"gwyBuL","@media all and (max-width:63.9375em)":{fontSize:"hNpkar",lineHeight:"gNmUbm"},"@media all and (min-width:64em) and (max-width:101.9375em)":{fontSize:"dZVhkx",lineHeight:"iBpeWK"},"@media all and (min-width:102em)":{fontSize:"jLiuzX",lineHeight:"cSZpZl"}},termsTextContainer:{display:"kbCXHY",rowGap:"gtFPZM"},termsText:{fontWeight:"jPzznp",fontSize:"iKjpVA",lineHeight:"cVaJzg","@media all and (min-width:64em) and (max-width:79.9375em)":{fontSize:"qSgdC",lineHeight:"kqRsfx"},"@media all and (min-width:102em)":{fontSize:"iswsIN",lineHeight:"lbqvfo"}},confirmButton:{marginTop:"cUXNmd",marginBottom:"ihzQYw","@media all and (min-width:37.5em)":{marginTop:"kJbocF",marginBottom:"bMxSnx"}}};function PpTerms(_ref){let{labelledBy,title,content,isOpen=!1,onToggle,onButtonClick,loading}=_ref;const closeModal=()=>{onToggle&&onToggle(!1)};return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_haaretz_s_pp_modal__WEBPACK_IMPORTED_MODULE_3__.Z,{onToggle,isOpen,labelledBy,closeBtnOnClick:closeModal,"data-testid":"pp-terms",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)("div",{className:(0,style9__WEBPACK_IMPORTED_MODULE_2__.Z)(c.contentWrapper),children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("h1",{className:(0,style9__WEBPACK_IMPORTED_MODULE_2__.Z)(c.title),id:labelledBy,children:title}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("div",{className:(0,style9__WEBPACK_IMPORTED_MODULE_2__.Z)(c.termsTextContainer),children:content.map(((paragraph,i)=>paragraph.content&&(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_haaretz_s_rich_text__WEBPACK_IMPORTED_MODULE_4__.Z,{as:"p",content:paragraph.content,styleExtend:[c.termsText]},paragraph.content||i)))}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_haaretz_s_button__WEBPACK_IMPORTED_MODULE_5__.ZP,_objectSpread(_objectSpread({stretch:!0,variant:"brand",onClick:event=>{"function"==typeof onButtonClick?onButtonClick(event,{campaign_details:"הבנתי, אפשר להמשיך"}):closeModal()},size:"regular",styleExtend:[c.confirmButton],"data-testid":"pp-terms-accept-btn"},loading?{state:"busy",busyNotice:""}:{state:"auto"}),{},{children:"הבנתי, אפשר להמשיך"}))]})})}try{PpTerms.displayName="PpTerms",PpTerms.__docgenInfo={description:"",displayName:"PpTerms",props:{title:{defaultValue:null,description:"The title of the modal.",name:"title",required:!0,type:{name:"string"}},content:{defaultValue:null,description:"The textual content of the modal.",name:"content",required:!0,type:{name:"HtmlNodeFragment[]"}},isOpen:{defaultValue:{value:"false"},description:"Controls the opening and closing of the modal",name:"isOpen",required:!1,type:{name:"boolean | undefined"}},onToggle:{defaultValue:null,description:"A callback to update ascendant state when a modal by and action inside it",name:"onToggle",required:!0,type:{name:"((isOpen: boolean) => void) | undefined"}},labelledBy:{defaultValue:null,description:"",name:"labelledBy",required:!0,type:{name:"string"}},onButtonClick:{defaultValue:null,description:"",name:"onButtonClick",required:!1,type:{name:"((event: MouseEvent<HTMLElement, MouseEvent>, biDataExtend?: BiDataOverrides | undefined) => void) | undefined"}},loading:{defaultValue:null,description:"",name:"loading",required:!1,type:{name:"boolean | undefined"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../pp-molecules/s-pp-terms/src/PpTerms.tsx#PpTerms"]={docgenInfo:PpTerms.__docgenInfo,name:"PpTerms",path:"../../pp-molecules/s-pp-terms/src/PpTerms.tsx#PpTerms"})}catch(__react_docgen_typescript_loader_error){}},"../../pp-organisms/s-pp-modal/src/PpModal.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>src_PpModal});var defineProperty=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/defineProperty.js"),objectWithoutProperties=__webpack_require__("../../../node_modules/.pnpm/@[email protected]/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),jsx_runtime=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/jsx-runtime.js"),src=__webpack_require__("../../ds-atoms/s-click-area/src/index.ts"),s_icon_src=__webpack_require__("../../ds-atoms/s-icon/src/index.ts");const s_modal_src=__webpack_require__("../../ds-molecules/s-modal/src/Modal.tsx").Z;var react=__webpack_require__("../../../node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/compiled/react/index.js"),style9=__webpack_require__("../../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/style9/index.mjs");const _excluded=["children","isOpen","labelledBy","styleExtend","inlineStyle","onToggle","closeBtnOnClick","closeBtnStyle"];function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach((function(r){(0,defineProperty.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}const c={base:{borderTopStyle:"jAobFs",borderRightStyle:"dQbyJV",borderBottomStyle:"oTbqa",borderLeftStyle:"gwsGKP",borderTopLeftRadius:"kjdjaJ",borderTopRightRadius:"OUBEB",backgroundColor:"hXoEex",paddingTop:"icKiSN",paddingInlineStart:"dwXqlO",paddingInlineEnd:"kwGEcy",paddingBottom:"izetJs",overflowX:"dUvWpK",overflowY:"hRLVFh","::backdrop":{"--bgc":"jnXWKX",backdropFilter:"fNdmJG",backgroundColor:"jvkdtx",animationName:"bCIYPq",animationPlayState:"hiPugQ",animationDuration:"iGOlqW",animationDirection:"GNuRI",animationFillMode:"dRDwYY"},"@media all and (max-width:37.4375em)":{marginBottom:"gVzGtB",minWidth:"hkWxRA"},"@media all and (min-width:37.5em)":{"::backdrop":{"--bgc":"iJTkLm"},borderTopLeftRadius:"jYVHaP",borderTopRightRadius:"gTufyh",borderBottomRightRadius:"bdSBAK",borderBottomLeftRadius:"fSITDU",width:"cHYRhi"},"@media all and (min-width:64em)":{width:"kncOoy"}},onOpenKeyFrames:{"--trsfrm-a":"gvOsMs","--trsfrm-b":"ecTztE",animationName:"cnLsGC",animationDuration:"dbaUeh",animationFillMode:"hMOwcK",animationTimingFunction:"dDrDcI",opacity:"UXrzu","@media all and (min-width:37.5em)":{"--trsfrm-a":"gbAXaG","--trsfrm-b":"ekGltn"}},closeBtnClickArea:{display:"gSBWlu",justifyContent:"IVbXa",alignItems:"foGVKH",insetInlineEnd:"laZGxq",position:"bEvNbr",top:"WhAZY"},closeButtonCircle:{backgroundColor:"fIcjCT",borderTopLeftRadius:"eCJvpO",borderTopRightRadius:"KuLii",borderBottomRightRadius:"cPOOyy",borderBottomLeftRadius:"dJEuaT",display:"gSBWlu",justifyContent:"IVbXa",alignItems:"foGVKH",height:"fdoezE",width:"byQvkk"}},PpModal=react.forwardRef((function PpModal(_ref,ref){let{children,isOpen=!1,labelledBy,styleExtend=[],inlineStyle,onToggle,closeBtnOnClick,closeBtnStyle="blueCircle"}=_ref,attrs=(0,objectWithoutProperties.Z)(_ref,_excluded);const closeBtnBlueCircle="blueCircle"===closeBtnStyle;return(0,jsx_runtime.jsxs)(s_modal_src,_objectSpread(_objectSpread({onToggle,isOpen,styleExtend:[c.base,isOpen&&c.onOpenKeyFrames,...styleExtend],inlineStyle},attrs),{},{labelledBy,ref,children:[(0,jsx_runtime.jsx)(src.ZP,{size:"large",onClick:closeBtnOnClick,styleExtend:[c.closeBtnClickArea],"data-testid":"pp-modal-close-btn",children:(0,jsx_runtime.jsx)("div",{className:(0,style9.Z)(closeBtnBlueCircle&&c.closeButtonCircle),children:(0,jsx_runtime.jsx)(s_icon_src.Z,{icon:"close",variant:closeBtnBlueCircle?"inverse":"neutral"})})}),children]}))}));PpModal.__docgenInfo={description:"",methods:[],displayName:"PpModal",props:{isOpen:{defaultValue:{value:"false",computed:!1},required:!1},styleExtend:{defaultValue:{value:"[]",computed:!1},required:!1},closeBtnStyle:{defaultValue:{value:"'blueCircle'",computed:!1},required:!1}}};const src_PpModal=PpModal;try{PpModal.displayName="PpModal",PpModal.__docgenInfo={description:"",displayName:"PpModal",props:{children:{defaultValue:null,description:"The Children to be rendered inside `<PpModal>`",name:"children",required:!1,type:{name:"ReactNode"}},inlineStyle:{defaultValue:null,description:"CSS declarations to be set as inline `style` on the\nhtml element.\n\nBy setting values of CSS Custom Properties based on\nprops or state in the consuming component (where\nthe value of `inlineStyle` is passed), `inlineStyle`\ncan be used as an API contract for setting dynamic\nvalues to styles created with `style9.create()`:\n@example ```ts\nimport s9 from 'style9';\nconst { styleExtend, } = s9.create({\n styleExtend: {\n color: 'var(--color-based-on-prop)',\n },\n});\n\nfunction MyModal(props) {\n const inlineStyle = {\n '--color-based-on-prop': props.color,\n },\n\n return (\n <Modal\n styleExtend={[ styleExtend, ]}\n inlineStyle={inlineStyle}\n />\n );\n}\n```",name:"inlineStyle",required:!1,type:{name:"InlineStyles | undefined"}},styleExtend:{defaultValue:{value:"[]"},description:"An array of `Style`s created by `style9.create()`.\nWARNING: **_do not_** pass simple CSS-in-JS object.\nThe items in the array must be created with Style9's\n`create` function.\nThe array can also hold falsy values to assist with\nconditional inclusion of `Style`s:\n@example ```ts\nconst { foo, bar, } = s9.create({ foo: { ... }, bar: { ... }, });\n<Modal styleExtend={[ someCondition && foo, bar, ]} />\n```",name:"styleExtend",required:!1,type:{name:"StyleExtend | undefined"}},isOpen:{defaultValue:{value:"false"},description:"Controls the opening and closing of the modal",name:"isOpen",required:!1,type:{name:"boolean | undefined"}},onToggle:{defaultValue:null,description:"A callback to update ascendant state when a modal by and action inside it",name:"onToggle",required:!0,type:{name:"((isOpen: boolean) => void) | undefined"}},labelledBy:{defaultValue:null,description:"",name:"labelledBy",required:!0,type:{name:"string | null"}},closeBtnOnClick:{defaultValue:null,description:"",name:"closeBtnOnClick",required:!0,type:{name:"MouseEventHandler<HTMLButtonElement>"}},closeBtnStyle:{defaultValue:{value:"blueCircle"},description:"",name:"closeBtnStyle",required:!1,type:{name:"enum",value:[{value:"undefined"},{value:'"neutral"'},{value:'"blueCircle"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["../../pp-organisms/s-pp-modal/src/PpModal.tsx#PpModal"]={docgenInfo:PpModal.__docgenInfo,name:"PpModal",path:"../../pp-organisms/s-pp-modal/src/PpModal.tsx#PpModal"})}catch(__react_docgen_typescript_loader_error){}},"../../pp-organisms/s-pp-modal/src/index.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});const __WEBPACK_DEFAULT_EXPORT__=__webpack_require__("../../pp-organisms/s-pp-modal/src/PpModal.tsx").Z}}]);