1 line
5.1 KiB
JavaScript
1 line
5.1 KiB
JavaScript
|
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1950],{41301:(e,t,s)=>{s.d(t,{A:()=>i});var a=s(74848),l=s(62027);function i(e){let{selectOptions:t,name:s,onChangeHandler:i,required:r,setAlert:n,title:c,defaultValue:o,info:d,id:h}=e;try{function p(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),s=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!s.classList.contains("hidden")){s.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&s.classList.contains("hidden"))){if(!t){s.classList.add("hidden");return}if(s.classList.contains("hidden")){s.classList.remove("hidden");return}s.classList.add("hidden")}}return(0,a.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(d?" pr-8":""),children:[c&&(0,a.jsxs)("label",{htmlFor:s,children:[c,r?"":" (optional)"]}),(0,a.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,a.jsx)("select",{name:s,id:h||s,className:"w-full bg-white",required:r,onChange:e=>{n&&n(null),e.target.classList.remove("warning"),i&&i(e)},defaultValue:o||void 0,children:t.map((e,t)=>{let{payload:s,title:l}=e;return(0,a.jsx)("option",{value:s,selected:!!e.default,children:l},t+1)})}),(0,a.jsx)(l.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),d&&(0,a.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:p,onMouseLeave:p,onClick:p,children:[(0,a.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,a.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,a.jsx)("span",{children:d})}),(0,a.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,a.jsx)("div",{children:"Form Select Error"})}}s(96540)},79285:(e,t,s)=>{s(74848),s(96540)},35681:(e,t,s)=>{s.d(t,{A:()=>n});var a=s(74848),l=s(96540),i=s(51105),r=s(87220);function n(e){let{content:t,language:s,style:n,showCopy:c}=e,[o,d]=l.useState(!1),h=()=>{d(!0)},p=(e,t)=>{"clickaway"!==t&&d(!1)},x=(0,a.jsx)(l.Fragment,{children:(0,a.jsx)("button",{className:"outlined gray",style:{border:"none",padding:"2px",width:"20px",height:"20px",color:"white"},onClick:p,children:"✖"})}),u={};return(0,a.jsxs)("pre",{className:"language-".concat(s||"javascript"," w-auto overflow-hidden skip-js code-block relative max-w-4xl flex items-center justify-center"),style:n?{...n,...u}:u,children:[(0,a.jsx)("code",{className:"w-auto px-10",style:{wordBreak:"break-all"},children:t}),(0,a.jsx)("button",{className:"outlined copy-code "+(c?"relative show":" absolute right-2 z-20 hover:opacity-50"),style:{padding:"2px",border:"none"},onClick:e=>{navigator.clipboard.writeText(t).then(()=>{h()})},children:(0,a.jsx)(r.A,{className:"text-white",size:20})}),(0,a.jsx)(i.A,{open:o,autoHideDuration:2e3,onClose:p,children:(0,a.jsxs)("div",{className:"h-full text-white px-4 py-2 justify-between rounded",style:{maxWidth:"250px",width:"250px",backgroundColor:"#0b8862"},children:[(0,a.jsx)("span",{children:"Code Copied!"}),x]})})]})}},16512:(e,t,s)=>{var a=s(24994);t.A=void 0;var l=a(s(44888)),i=s(74848);t.A=(0,l.default)([(0,i.jsx)("path",{d:"M7 3h10v1H7zm0 17h10v1H7z",opacity:".3"},"0"),(0,i.jsx)("path",{d:"m22 12-4-4v3h-5v2h5v3zm-5 6H7V6h10v1h2V3c0-1.1-.9-2-2-2L7 1.01C5.9 1.01 5 1.9 5 3v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2v-4h-2zM7 3h10v1H7zm10 18H7v-1h10z"},"1")],"SendToMobileTwoTone")},48144:(e,t,s)=>{var a=s(24994);t.A=void 0;var l=a(s(44888)),i=s(74848);t.A=(0,l.default)([(0,i.jsx)("path",{d:"M14 5H5v14h14v-9h-5zM8 17c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m0-4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m0-4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1",opacity:".3"},"0"),(0,i.jsx)("circle",{cx:"8",c
|