umwd-components 0.1.414 → 0.1.416
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/src/components/common/media/MediaItem.js +1 -1
- package/dist/src/components/common/media/UploadMediaForm.js +1 -1
- package/dist/src/components/page-elements/HeroSectionV2.js +7 -0
- package/dist/src/components/page-elements/Page.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/page-elements/HeroSectionV2.d.ts +25 -0
- package/package.json +1 -1
- package/src/components/common/media/MediaItem.tsx +11 -5
- package/src/components/common/media/UploadMediaForm.tsx +5 -1
- package/src/components/e-commerce/checkout/CheckoutForm.tsx +1 -0
- package/src/components/page-elements/HeroSection.tsx +2 -0
- package/src/components/page-elements/HeroSectionV2.tsx +104 -0
- package/src/components/page-elements/Page.tsx +2 -1
- package/dist/src/components/page-elements/HeroSection.js +0 -7
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
6
|
+
import o from"react";import i from"@mui/material/Card";import e from"@mui/material/CardMedia";import r from"@mui/material/CardActionArea";function a(a){var t=a.mediaItem,n=a.onClick,d=a.isSelected,l=void 0!==d&&d;return o.createElement(i,{sx:[{maxWidth:345,height:"100%"},l&&{outline:"2px solid blue"}]},o.createElement(r,{sx:{backgroundColor:"#ddd",opacity:.8,backgroundImage:" repeating-linear-gradient(45deg, #000 25%, transparent 25%, transparent 75%, #000 75%, #000), repeating-linear-gradient(45deg, #000 25%, #ddd 25%, #ddd 75%, #000 75%, #000)",backgroundPosition:"0 0, 10px 10px",backgroundSize:"20px 20px"},onClick:n},o.createElement(e,{sx:{height:140},image:function(){var o,i,e,r,a,n,d,l;return void 0!==(null===(i=null===(o=t.formats)||void 0===o?void 0:o.small)||void 0===i?void 0:i.url)?"".concat(process.env.NEXT_PUBLIC_STRAPI_URL).concat(null===(r=null===(e=t.formats)||void 0===e?void 0:e.small)||void 0===r?void 0:r.url):void 0!==(null===(n=null===(a=t.formats)||void 0===a?void 0:a.thumbnail)||void 0===n?void 0:n.url)?"".concat(process.env.NEXT_PUBLIC_STRAPI_URL).concat(null===(l=null===(d=t.formats)||void 0===d?void 0:d.thumbnail)||void 0===l?void 0:l.url):"".concat(process.env.NEXT_PUBLIC_STRAPI_URL).concat(t.url)}(),title:t.name})))}export{a as MediaItem};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import t,{useState as r,useRef as l,useEffect as n}from"react";import{useFormState as a}from"react-dom";import{uploadMediaAction as i}from"../../../data/actions/media/uploadMediaAction.js";import{StrapiErrors as
|
|
7
|
+
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import t,{useState as r,useRef as l,useEffect as n}from"react";import{useFormState as a}from"react-dom";import{uploadMediaAction as i}from"../../../data/actions/media/uploadMediaAction.js";import{StrapiErrors as o}from"../../StrapiErrors.js";import{ZodErrors as m}from"../../ZodErrors.js";import{SubmitButton as c}from"../../SubmitButton.js";import u from"@mui/material/Stack";import s from"@mui/material/Typography";import p from"@mui/material/Box";import d from"@mui/material/Grid";import f from"@mui/material/Alert";var E={zodErrors:null,strapiErrors:null,data:null,message:null};function y(y){var g,v=y.reference,x=y.refID,h=y.field,k=y.multiple,b=void 0===k||k,j=y.accept,w=void 0===j?"image/*":j,C=y.revalidateCallback,I=e(r(null),2),O=I[0],S=I[1],z=e(r(null),2),A=z[0],B=z[1],H=e(a(i,E),2),L=H[0],R=H[1],T=l(null);return n((function(){L.data&&(null==C||C())}),[L.data]),t.createElement("form",{action:R},t.createElement(u,{spacing:1,sx:{flex:1}},v&&t.createElement("input",{type:"text",name:"ref",value:v,style:{display:"none"},readOnly:!0}),x&&t.createElement("input",{type:"text",name:"refId",value:x,style:{display:"none"},readOnly:!0}),h&&t.createElement("input",{type:"text",name:"field",value:h,style:{display:"none"},readOnly:!0}),null!==O?t.createElement(p,{onClick:function(){var e;return null===(e=T.current)||void 0===e?void 0:e.click()},sx:{p:2,width:"100%",border:"1px dashed white",minHeight:"100px"}},void 0===w||"image/*"===w?t.createElement(d,{container:!0},O.map((function(e,r){return t.createElement(d,{item:!0,key:r,xs:12,sm:6,md:4,lg:2},t.createElement("img",{key:r,src:e.url,alt:e.name,style:{width:"100px"}}))}))):t.createElement(d,{container:!0},O.map((function(e,r){return t.createElement(d,{item:!0,key:r,xs:12,sm:6,md:4,lg:2},t.createElement(s,null,e.name))})))):t.createElement(p,{onClick:function(){var e;return null===(e=T.current)||void 0===e?void 0:e.click()},sx:{p:2,width:"100%",border:"1px dashed white",minHeight:"100px",cursor:"pointer"}},t.createElement(s,null,"No file","".concat(b?"s":"")," selected, click here to start uploading new files")),t.createElement(u,{direction:"column",spacing:2,alignItems:"center",justifyContent:"space-between"},t.createElement(o,{error:L.strapiErrors}),t.createElement(m,{error:null===(g=L.zodErrors)||void 0===g?void 0:g.image}),(null==L?void 0:L.message)&&t.createElement(f,{severity:"error"},null==L?void 0:L.message),t.createElement(p,null,t.createElement("label",{htmlFor:"pictureInput"},t.createElement("input",{id:"pictureInput",accept:w,multiple:b,type:"file",name:"files",ref:T,onChange:function(e){console.log(e.target.files);var t=e.target.files;if(null!==t){var r=Object.keys(t).map((function(e,r){return{url:URL.createObjectURL(t[r]),name:t[r].name}}));B(t),S(r)}},style:{display:"none"}})),null!==A&&t.createElement(c,{text:"upload",loadingText:"loading"})))))}export{y as UploadMediaForm};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*
|
|
3
|
+
* UMWD-Components
|
|
4
|
+
* @copyright Jelle Paulus
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
import e from"react";import t from"next/link";import r from"@mui/material/Container";import a from"@mui/material/Paper";import i from"@mui/material/Typography";import n from"@mui/material/Button";import o from"@mui/material/Stack";import{StrapiImage as m}from"../StrapiImage.js";import{useTheme as l}from"@mui/material/styles";function c(c){var u,g=c.data,d=g.heading,p=g.subHeading,s=g.bgImage,h=g.logoImage,f=g.link,v=g.maxWidth;return g.sx,g.glass,l(),e.createElement(r,{maxWidth:v||"lg",sx:{zIndex:1}},e.createElement(a,{sx:[{padding:5},void 0!==(null==s?void 0:s.url)&&{backgroundImage:"url(".concat(process.env.NEXT_PUBLIC_STRAPI_URL).concat(s.url,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"}]},e.createElement(o,{spacing:3,alignItems:"center",justifyContent:"center"},h&&null!==h.url&&e.createElement(m,{id:null===(u=h.id)||void 0===u?void 0:u.toString(),alternativeText:h.alternativeText||"logoImage",height:h.height||100,url:h.url,width:h.width||100,style:{objectFit:"contain",filter:"invert(1)"}}),e.createElement(i,{variant:"h2",align:"center",component:"h1"},d),e.createElement(i,{variant:"h4",align:"center",component:"h2"},p),f&&f.url&&e.createElement(t,{href:f.url},e.createElement(n,{variant:"contained",sx:{width:"100%",fontSize:"1.5rem"}},f.text)))))}export{c as HeroSection};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__spreadArray as e,__read as t}from"../../../node_modules/tslib/tslib.es6.js";import r from"react";import{TextImageSection as a}from"./TextImageSection.js";import{HeroSection as o}from"./
|
|
6
|
+
import{__spreadArray as e,__read as t}from"../../../node_modules/tslib/tslib.es6.js";import r from"react";import{TextImageSection as a}from"./TextImageSection.js";import{HeroSection as o}from"./HeroSectionV2.js";import{FeatureSection as n}from"./FeaturesSection.js";import{FleetSection as i}from"./FleetSection.js";import{IconSection as m}from"./IconSection.js";import{ColumnsSection as s}from"./ColumnsSection.js";import c from"@mui/material/Box";import{ContactForm as l}from"../ContactForm.js";import{PersonaliaSection as p}from"./PersonaliaSection.js";import{PictureBarSection as u}from"./PictureBarSection.js";import{LogoBarSection as d}from"./LogoBarSection.js";function f(e){switch(e.__component){case"page-elements.hero-section":return r.createElement(o,{key:e.id,data:e});case"page-elements.features-section":return r.createElement(n,{key:e.id,data:e});case"page-elements.contact-section":return r.createElement(l,{key:e.id,data:e});case"page-elements.text-image-section":return r.createElement(a,{key:e.id,data:e});case"page-elements.icon-section":return r.createElement(m,{key:e.id,data:e});case"page-elements.fleet-section":return r.createElement(i,{key:e.id,data:e});case"page-elements.columns-section":return r.createElement(s,{key:e.id,data:e});case"page-elements.personalia-section":return r.createElement(p,{key:e.id,data:e});case"page-elements.picture-bar-section":return r.createElement(u,{key:e.id,data:e});case"page-elements.logo-bar-section":return r.createElement(d,{key:e.id,data:e});default:return null}}function g(a){var o=a.blocks,n=a.sx,i=void 0===n?[]:n;return o?r.createElement(c,{sx:e([],t(Array.isArray(i)?i:[i]),!1)},o.map(f)):r.createElement("p",null,"No sections found")}export{g as Page};
|