@verifiedinc-public/shared-ui-elements 3.1.1 → 3.1.3
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.
- package/dist/components/index.mjs +1 -1
- package/dist/components/typographies/PageHeader.d.ts +8 -0
- package/dist/components/typographies/PageSectionHeader.d.ts +8 -0
- package/dist/components/typographies/index.d.ts +2 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/index-f0sOpo6B.mjs +105 -0
- package/dist/shared/shadows-Dhd7FrwF.mjs +1 -0
- package/dist/shared/useOnClickOutside-Bvjq5s1M.mjs +1 -0
- package/dist/shared/useQRCode-DKyiMOAs.mjs +1 -0
- package/dist/styles/index.mjs +1 -1
- package/dist/styles/typography.d.ts +27 -30
- package/package.json +1 -1
- package/dist/shared/index-YQfmNqZx.mjs +0 -105
- package/dist/shared/shadows-CNjkm81P.mjs +0 -1
- package/dist/shared/useIntersectionObserver-BX_TdOtC.mjs +0 -1
- package/dist/shared/useQRCode-DXiPIj-D.mjs +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";import{colors as t,createTheme as C}from"@mui/material";const i="rgba(0,0,0,0.26)",r="#ffffff",a="#000000",n="#0dbc3d",o="#5ef06d",l="#008a01",g="#164fd6",s="#657bff",d="#0028a3",h="#eb0d28",f="#ff5952",p="#b00000",m="#F5D328",u="#5ef06d",y="#bea008",c="#625410",b="#09225E",x="#F9F9FB",S="#bdbdbd",k="#797979",W=t.grey[400],w=t.grey[500],z=t.grey[600],e={textDisabled:i,white:r,black:a,green:n,lightGreen:o,darkGreen:l,blue:g,lightBlue:s,darkBlue:d,red:h,lightRed:f,darkRed:p,yellow:m,lightYellow:u,darkYellow:y,warningContrast:c,infoContrast:b,lightGrey:x,grey:S,darkGrey:k,lightGreyContrast:W,greyContrast:w,darkGreyContrast:z},M={h1:{fontSize:"2.125rem",fontWeight:700,letterSpacing:0,lineHeight:1.35},h2:{fontSize:"1.5rem",fontWeight:700,letterSpacing:0,lineHeight:1.33},h3:{fontSize:"1.25rem",fontWeight:700,letterSpacing:0,lineHeight:1.35},h4:{fontSize:"1.25rem",fontWeight:700,letterSpacing:0,lineHeight:1.2},h5:{fontSize:"1rem",fontWeight:700,letterSpacing:0,lineHeight:1.1875},h6:{fontSize:"1rem",fontWeight:700,letterSpacing:"0.15px"},subtitle1:{fontSize:"1rem",fontWeight:700,letterSpacing:0,lineHeight:1.1875},subtitle2:{fontSize:"0.875rem",fontWeight:700,letterSpacing:.1,lineHeight:1.5},body1:{fontSize:"1.25rem",fontWeight:300,letterSpacing:0,lineHeight:1.2},body2:{fontSize:"1rem",fontWeight:400,letterSpacing:0,lineHeight:1.1875},button:{fontWeight:900,letterSpacing:0,lineHeight:1.2,textTransform:"uppercase"},caption:{fontSize:"0.75rem",fontWeight:400,letterSpacing:0,lineHeight:1.25},overline:{fontSize:"0.75rem",fontWeight:400,letterSpacing:0,lineHeight:1.25},label:{fontSize:"0.75rem",fontWeight:700,letterSpacing:1,textTransform:"uppercase"}},T=({primaryFontFace:v})=>C({breakpoints:{values:{xs:0,sm:600,md:900,lg:1200,xl:1536}},typography:{fontFamily:v.style.fontFamily,...M},palette:{text:{disabled:e.textDisabled},primary:{main:e.green,light:e.lightGreen,dark:e.darkGreen,contrastText:e.white},secondary:{main:e.blue,light:e.lightBlue,dark:e.darkBlue,contrastText:e.white},error:{main:e.red,light:e.lightRed,dark:e.darkRed,contrastText:e.white},warning:{main:e.yellow,light:e.yellow,dark:e.darkYellow,contrastText:e.white},success:{main:e.green,light:e.green,dark:e.darkGreen,contrastText:e.white},info:{main:e.blue,light:e.lightBlue,dark:e.darkBlue,contrastText:e.infoContrast},neutral:{main:e.grey,light:e.lightGrey,dark:e.darkGrey},neutralContrast:{main:e.greyContrast,light:e.lightGreyContrast,dark:e.darkGreyContrast},warningContrast:{main:e.warningContrast},infoContrast:{main:e.infoContrast}},components:{MuiAlert:{styleOverrides:{action:{overflowWrap:"normal",display:"flex",alignItems:"center",padding:"8px 0",marginRight:0,"& button, & a":{lineHeight:"0"}}}},MuiAlertTitle:{styleOverrides:{root:{...M.body2,fontSize:"1.1rem",fontWeight:700}}},MuiListItemIcon:{styleOverrides:{root:{minWidth:34}}},MuiListItemText:{styleOverrides:{primary:{fontSize:"1rem",fontWeight:800}}},MuiFab:{styleOverrides:{circular:{width:42,height:42},sizeSmall:{width:40,height:40}}},MuiIconButton:{styleOverrides:{root:{"&.Mui-disabled":{svg:{opacity:.4}}}}},MuiButton:{styleOverrides:{root:{fontWeight:800}}},MuiDialog:{defaultProps:{maxWidth:"xs"}},MuiDialogTitle:{styleOverrides:{root:{fontSize:20,fontWeight:800,textAlign:"center"}}},MuiDialogContent:{styleOverrides:{root:{paddingTop:"8px!important",paddingBottom:8}}},MuiDialogActions:{styleOverrides:{root:{paddingLeft:24,paddingRight:24,paddingBottom:24,justifyContent:"space-between","& .MuiButton-root":{marginTop:0}}}},MuiRadio:{styleOverrides:{root:{"&.Mui-disabled":{color:`${e.grey} !important`}}}},MuiTableRow:{styleOverrides:{root:{"& th.MuiTableCell-root":{fontSize:12,fontWeight:700,letterSpacing:1},"& td.MuiTableCell-root":{fontSize:20,fontWeight:300}}}},MuiTextField:{defaultProps:{variant:"outlined",size:"small"}}}}),H="0px -2px 4px -1px rgba(0,0,0,0.2), 0px -4px 5px 0px rgba(0,0,0,0.14), 0px -1px 10px 0px rgba(0,0,0,0.12)",B={bottomSheet:H};export{g as a,a as b,s as c,l as d,d as e,f,n as g,p as h,u as i,y as j,c as k,o as l,b as m,x as n,S as o,k as p,W as q,h as r,w as s,i as t,z as u,e as v,r as w,T as x,m as y,B as z};
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";import{useRef as y,useInsertionEffect as O,useCallback as w,useState as d,useId as C,useEffect as m,useLayoutEffect as x}from"react";function k(e){return{set:t=>{const o=typeof t=="string"?t:JSON.stringify(t);localStorage.setItem(e,o)},get:()=>{const t=localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch{return t}return null},remove:()=>{localStorage.removeItem(e)}}}function A({type:e="text/plain"}){return{copy:async t=>{var o;if((o=navigator.clipboard)!=null&&o.write){const n={};switch(e){case"text/html":n["text/plain"]=new Blob([t],{type:"text/plain"}),n[e]=new Blob([t],{type:e});break;default:n[e]=new Blob([t],{type:e})}const s=[new ClipboardItem(n)];await navigator.clipboard.write(s)}else{const n=document.createElement("textarea");t instanceof Blob?n.value=await t.text():n.value=t.toString(),n.select(),document.execCommand("copy")}}}}function b(e,t=[]){const o=y(()=>{throw new Error("Cannot call an event handler while rendering.")});return O(()=>{o.current=e}),w((...n)=>{var s;return(s=o.current)==null?void 0:s.call(o,...n)},t)}function B(e={}){const{onClose:t,onOpen:o,open:n,id:s}=e,r=b(o),i=b(t),[u,l]=d(e.defaultOpen??!1),c=n??u,a=n!==void 0,g=C(),f=s??`disclosure-${g}`,v=w(()=>{a||l(!1),i?.()},[a,i]),h=w(()=>{a||l(!0),r?.()},[a,r]),E=w(()=>{c?v():h()},[c,h,v]);function S(p={}){return{...p,"aria-expanded":c,"aria-controls":f,onClick(L){var I;(I=p.onClick)==null||I.call(p,L),E()}}}function T(p={}){return{...p,hidden:!c,id:f}}return{open:c,onOpen:h,onClose:v,onToggle:E,isControlled:a,getButtonProps:S,getDisclosureProps:T}}function z(e){return new URLSearchParams(e??window.location.search)}function D(e,t=250){const[o,n]=d(e);return m(()=>{const s=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(s)}},[e,t]),o}function U(e,t={removeOnUnmount:!1}){const[o,n]=d("loading"),s=y(t);return m(()=>{let r=document.querySelector(`script[src="${e}"]`);const i=r?.getAttribute("data-status");if(i){n(i);return}if(r===null){r=document.createElement("script"),r.src=e,r.async=!0,r.setAttribute("data-status","loading"),document.body.appendChild(r);const u=()=>{r?.setAttribute("data-status","ready"),n("ready"),c()},l=()=>{r?.setAttribute("data-status","error"),n("error"),c()},c=()=>{r?.removeEventListener("load",u),r?.removeEventListener("error",l)};r.addEventListener("load",u),r.addEventListener("error",l);const a=s.current.removeOnUnmount;return()=>{a&&(r?.remove(),c())}}else n("unknown")},[e]),o}function W(e,t=500){const[o,n]=d(e),s=y(Date.now());return m(()=>{const r=Date.now(),i=r-s.current;if(i>=t)s.current=r,n(e);else{const u=t-i,l=window.setTimeout(()=>{s.current=Date.now(),n(e)},u);return()=>{window.clearTimeout(l)}}},[e,t]),o}function j(e){const[t,o]=d(()=>typeof e=="boolean"?e:!!e),n=w(s=>{if(typeof s=="boolean"){o(s);return}o(r=>!r)},[]);return[t,n]}function P(){const[e,t]=d({x:0,y:0}),o=w((...n)=>{if(n.length===1&&typeof n[0]=="object")window.scrollTo(n[0]);else if(n.length===2)window.scrollTo(n[0],n[1]);else throw new Error("Invalid arguments passed to scrollTo. Expected either ScrollToOptions object or x,y coordinates. See https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollTo")},[]);return x(()=>{const n=()=>{t({x:window.scrollX,y:window.scrollY})};return n(),window.addEventListener("scroll",n),()=>{window.removeEventListener("scroll",n)}},[]),{...e,scrollTo:o}}function H(){const[e,t]=d({width:window.innerWidth,height:window.innerHeight});return x(()=>{const o=()=>{t({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}},[]),e}function J(e,{threshold:t=0,root:o=null,rootMargin:n="0%",freezeOnceVisible:s=!1}={}){const[r,i]=d({isIntersecting:!1,entry:null});return m(()=>{const u=e?.current;let l;if(u){if(s&&r.isIntersecting)return;const c=g=>{const[f]=g;i({isIntersecting:f.isIntersecting,entry:f})},a=new IntersectionObserver(c,{threshold:t,root:o,rootMargin:n});a.observe(u),l=()=>{a.disconnect()}}return()=>{l&&l()}},[e,t,o,n,s,r.isIntersecting]),r}export{A as a,B as b,b as c,z as d,D as e,U as f,W as g,j as h,P as i,H as j,J as k,k as u};
|
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";import{useMemo as $}from"react";import*as f from"qrcode";function u(t){const r=$(()=>f.create(t.data),[t.data]).modules.data;return $(()=>{const s=t.size/Math.sqrt(r.length);let i=`<svg viewBox="0 0 ${t.size} ${t.size}" xmlns="http://www.w3.org/2000/svg">`;const a=t.imageSize,n=(t.size-a)/2,h=(t.size-a)/2;for(let o=0;o<r.length;o++){const e=o%Math.sqrt(r.length)*s,l=Math.floor(o/Math.sqrt(r.length))*s,g=s/2,m=r[o]===1,c=e+s>=n&&e<n+a&&l+s>=h&&l<h+a;!m||c||(i+=`<rect x="${e}" y="${l}" width="${s}" height="${s}" rx="${g}" ry="${g}" fill='${t.fill||"#000000"}' />`)}return i+="</svg>",i},[r,t])}export{u};
|