najwer23morsels 0.22.17 → 0.22.19
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/lib/{Button-yBsiHloR.js → Button-CLZ8vqe4.js} +1 -1
- package/lib/Button.js +1 -1
- package/lib/Calendar.js +1 -1
- package/lib/Copybutton.js +1 -1
- package/lib/Dialog.js +1 -1
- package/lib/Footer.js +1 -1
- package/lib/{Grid-DHMMPY22.js → Grid-F3Ztfrq_.js} +1 -1
- package/lib/Grid.js +1 -1
- package/lib/Input-Vl9630ee.js +1 -0
- package/lib/Input.js +1 -1
- package/lib/Loader-CidTpDmP.js +1 -0
- package/lib/Loader.js +1 -1
- package/lib/Picture.js +1 -1
- package/lib/Select.js +1 -1
- package/lib/Slider.js +1 -1
- package/lib/Sliderscroll.js +1 -1
- package/package.json +1 -1
- package/lib/Input-RsQ8pvop.js +0 -1
- package/lib/Loader-D8OrIi__.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as o,jsx as t}from"react/jsx-runtime";import{forwardRef as n}from"react";import{L as e}from"./Loader-
|
|
1
|
+
import{jsxs as o,jsx as t}from"react/jsx-runtime";import{forwardRef as n}from"react";import{L as e}from"./Loader-CidTpDmP.js";import{s as r,g as i}from"./style-inject.es-CrVRO2OA.js";var a={n23mButtonButton:"Button-module_n23mButtonButton__IfHY-"};r('@layer n23mButton{.Button-module_n23mButtonButton__IfHY-{--boxShadow:0 4px 8px 0 rgba(0,0,0,.24),0 6px 20px 0 rgba(0,0,0,.19);corner-shape:squircle;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);background-color:var(--n23mButtonBg,var(--button-bg));border:1px solid var(--n23mButtonBorderColor,var(--button-bc,unset));border-radius:12px;box-shadow:none;cursor:pointer;height:var(--button-h,auto);letter-spacing:normal;margin:var(--button-m,0);padding:var(--button-p,0);position:relative;transition:background-color .3s,box-shadow .3s;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:var(--button-w,auto);>*{display:inline-block;position:relative;z-index:1}&:before{background-color:inherit;border-radius:8px;content:"";inset:0;pointer-events:none;position:absolute;transition:filter .3s;z-index:0}@media (hover:hover) and (pointer:fine){&:hover:before{filter:brightness(100%)}&:hover{box-shadow:var(--boxShadow)}}&:active:before{filter:brightness(.8)}&:active{box-shadow:var(--boxShadow)}&:focus-visible:before{filter:brightness(.8);outline:none}&:focus-visible{box-shadow:var(--boxShadow);outline:none}&:disabled{background-color:var(--n23mButtonBgDisabled,var(--button-bgd));box-shadow:none;cursor:not-allowed}}}');const s=n(({margin:n,children:r,className:s,backgroundColor:u,padding:b,loading:l,height:d,width:c,borderColor:h,backgroundColorDisabled:m,style:g,...p},v)=>o("div",{className:["n23mButton",s].filter(Boolean).join(" "),children:[l&&t("div",{style:{width:c,height:d},children:t(e,{})}),!l&&t("button",{ref:v,style:{...i({"--button-bg":u,"--button-h":d,"--button-w":c,"--button-bgd":m,"--button-bc":h,"--button-p":b,"--button-m":n}),...g},className:[a.n23mButtonButton,"n23mButtonButton"].filter(Boolean).join(" "),...p,children:r})]}));s.displayName="Button";export{s as B};
|
package/lib/Button.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{B as Button}from"./Button-
|
|
1
|
+
export{B as Button}from"./Button-CLZ8vqe4.js";import"react/jsx-runtime";import"react";import"./Loader-CidTpDmP.js";import"./TextBox-CWSg4nm8.js";import"./style-inject.es-CrVRO2OA.js";
|
package/lib/Calendar.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as a,Fragment as o}from"react/jsx-runtime";import{useRef as l,useState as d,useMemo as n}from"react";import{B as r}from"./Button-
|
|
1
|
+
import{jsxs as e,jsx as a,Fragment as o}from"react/jsx-runtime";import{useRef as l,useState as d,useMemo as n}from"react";import{B as r}from"./Button-CLZ8vqe4.js";import{I as t,a as i}from"./IconLocate-LfOaIasU.js";import{I as s}from"./Input-Vl9630ee.js";import{T as c}from"./TextBox-CWSg4nm8.js";import{s as p}from"./style-inject.es-CrVRO2OA.js";import{g as h,a as u,i as m,b as _,c as y,d as v,e as C,f as w}from"./index-P_Zi0cEe.js";import"./Loader-CidTpDmP.js";var x={n23mCalendar:"Calendar-module_n23mCalendar__X8aV3",icon:"Calendar-module_icon__lfFoB",dropdownWrapper:"Calendar-module_dropdownWrapper__nxN2-",open:"Calendar-module_open__wT0yV",dropdown:"Calendar-module_dropdown__cb838",controls:"Calendar-module_controls__-AlZL",controlsDate:"Calendar-module_controlsDate__-SfYh",weekdays:"Calendar-module_weekdays__lNkkR",weekdaysChild:"Calendar-module_weekdaysChild__RdAK-",days:"Calendar-module_days__M9xb4",daysChild:"Calendar-module_daysChild__j3p2m",daysActive:"Calendar-module_daysActive__Y84S9",daysClickable:"Calendar-module_daysClickable__1top5",months:"Calendar-module_months__EvlXR",years:"Calendar-module_years__a49qj",monthsChild:"Calendar-module_monthsChild__abfV1",yearsChild:"Calendar-module_yearsChild__gLEoY"};p("@layer n23mCalendar{.Calendar-module_n23mCalendar__X8aV3{--iff:-apple-system,BlinkMacSystemFont,avenir next,avenir,segoe ui,helvetica neue,helvetica,Cantarell,Ubuntu,roboto,noto,arial,sans-serif;position:relative;& input{cursor:pointer;padding-right:40px}.Calendar-module_icon__lfFoB{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 25'%3E%3Cpath fill='%23231f20' d='M22.5 3H21V2a1 1 0 0 0-1-1h-1a1 1 0 0 0-1 1v1h-4V2a1 1 0 0 0-1-1h-1a1 1 0 0 0-1 1v1H7V2a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v1H2.5A1.5 1.5 0 0 0 1 4.5v18A1.5 1.5 0 0 0 2.5 24h20a1.5 1.5 0 0 0 1.5-1.5v-18A1.5 1.5 0 0 0 22.5 3ZM19 2h1v3h-1Zm-7 0h1v3h-1ZM5 2h1v3H5ZM2.5 4H4v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V4h4v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V4h4v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1V4h1.5a.5.5 0 0 1 .5.5V8H2V4.5a.5.5 0 0 1 .5-.5Zm20 19h-20a.5.5 0 0 1-.5-.5V9h21v13.5a.5.5 0 0 1-.5.5Z'/%3E%3C/svg%3E\");background-position:100%;background-position:calc(100% - 10px) 50%;background-repeat:no-repeat;background-size:18px;cursor:pointer;display:inline-block;height:40px;position:absolute;right:2px;top:21px;width:40px}.Calendar-module_dropdownWrapper__nxN2-{background-color:transparent;display:none;margin-top:65px;padding-bottom:40px;position:absolute;top:0;width:318px;z-index:3;&.Calendar-module_open__wT0yV{display:block}.Calendar-module_dropdown__cb838{corner-shape:squircle;background:#fff;border:1px solid var(--input-cb,#000);border-radius:12px;box-shadow:0 4px 8px 0 rgba(0,0,0,.24),0 6px 20px 0 rgba(0,0,0,.19);box-sizing:border-box;overflow-y:auto;padding:20px;& .Calendar-module_controls__-AlZL{align-items:center;display:flex;height:40px;justify-content:space-between;padding:0 7px}& .Calendar-module_controlsDate__-SfYh{display:flex;font-family:var(--n23mFontFamily,var(--iff));font-size:20px;justify-content:center}& .Calendar-module_weekdays__lNkkR{display:flex;justify-content:center;width:100%}& .Calendar-module_weekdaysChild__RdAK-{align-items:center;display:flex;font-family:var(--n23mFontFamily,var(--iff));font-size:12px;height:30px;justify-content:center;width:14.28571%}& .Calendar-module_days__M9xb4{display:flex;flex-wrap:wrap;justify-content:flex-start;width:100%}& .Calendar-module_daysChild__j3p2m{font-size:16px}& .Calendar-module_daysChild__j3p2m:nth-child(7n){color:red;font-weight:700}& .Calendar-module_daysActive__Y84S9{corner-shape:squircle;background-color:#f2f2f2;border-radius:12px;cursor:pointer}& .Calendar-module_daysClickable__1top5{cursor:pointer}& .Calendar-module_months__EvlXR,& .Calendar-module_years__a49qj{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}& .Calendar-module_monthsChild__abfV1,& .Calendar-module_yearsChild__gLEoY{display:flex;justify-content:center}}}}}");const b=({children:p,name:b,placeholder:g,label:f="Calendar",initialValue:k,onBlur:D,validatorOptions:S,className:F,style:j,...N})=>{const V=l(null),[M,A]=d({value:""==k?"":h(k??new Date),open:!1,dropDwonState:"days"}),E=e=>{A(a=>({...a,value:h(e),open:!0}))},B=e=>{E(C(m(M.value)?M.value:h(new Date),e))},z=e=>{E(v(m(M.value)?M.value:h(new Date),e))},L=n(()=>Array.from({length:7},(e,a)=>new Date(2021,0,(a+4)%7).toLocaleString("en-US",{weekday:"short"})),[]),Z=n(()=>Array.from({length:12},(e,a)=>new Date(2021,a+1,0).toLocaleString("en-US",{month:"short"})),[]),H=u(m(M.value)?M.value:h(new Date)),R=_(m(M.value)?M.value:h(new Date)),Y=m(M.value)?new Date(M.value):new Date,T=Y.getFullYear(),q=Y.getMonth(),I=Y.getDate();return e("div",{className:[x.n23mCalendar,"n23mCalendar",F].filter(Boolean).join(" "),...N,style:{...j},children:[a("div",{className:x.icon,onMouseDown:e=>{e.preventDefault(),V.current?.focus(),A(e=>({...e,value:"",open:!e.open,dropDwonState:"days"}))}}),a(s,{inputRef:V,label:f,type:"text",kind:"input",name:b,autoComplete:"off",placeholder:g,onChange:e=>{const a=e.currentTarget.value;A(e=>({...e,value:a}))},onBlur:e=>{A(e=>({...e,open:!1})),D?.(e)},onClick:()=>A(e=>({...e,value:"",open:!0,dropDwonState:"days"})),value:M.value,validatorOptions:[...S??[],{type:"date"}],className:x.arrowUp,"aria-expanded":M.open,role:"combobox"}),a("div",{className:[x.dropdownWrapper,M.open?x.open:""].join(" "),children:e("div",{className:[x.dropdown].join(" "),onMouseDown:e=>e.preventDefault(),children:["years"===M.dropDwonState&&e(o,{children:[e("div",{className:x.controls,style:{marginBottom:"10px"},children:[a("div",{style:{width:"30px"},children:a(r,{type:"button",padding:"3px 0 0 0",height:"30px",width:"30px",title:"Prev Month",backgroundColor:"#F2F0EF",borderColor:"black",onClick:()=>z(T-9),children:a(t,{color:"black",height:22,width:22})})}),a("div",{style:{width:"60%"},className:x.controlsDate,children:a("div",{style:{cursor:"pointer"},onClick:()=>A(e=>({...e,dropDwonState:"days"})),children:T})}),a("div",{style:{width:"30px"},children:a(r,{type:"button",padding:"3px 0 0 0",height:"30px",width:"30px",title:"Prev Month",backgroundColor:"#F2F0EF",borderColor:"black",onClick:()=>z(T+9),children:a(i,{color:"black",height:22,width:22})})})]}),a("div",{className:x.years,children:R.map(e=>a("div",{className:x.yearsChild,children:a(r,{type:"button",height:"40px",width:"80px",color:"black",backgroundColor:T==e?"white":"#F2F0EF",borderColor:"black",title:"year",onClick:()=>{z(e),A(e=>({...e,dropDwonState:"days"}))},children:a(c,{mobileSize:14,desktopSize:14,children:e})},e+M.value)},e+M.value))})]}),"months"===M.dropDwonState&&a("div",{className:x.months,children:Z.map((e,o)=>a("div",{className:x.monthsChild,children:a(r,{type:"button",height:"40px",width:"80px",backgroundColor:q==o?"white":"#F2F0EF",borderColor:"black",title:"month",onClick:()=>{B(o-q),A(e=>({...e,dropDwonState:"days"}))},children:a(c,{mobileSize:14,desktopSize:14,children:e})},e+M.value)},e+M.value))}),"days"===M.dropDwonState&&e(o,{children:[e("div",{className:x.controls,children:[a("div",{style:{width:"30px"},children:a(r,{type:"button",padding:"3px 0 0 0",height:"30px",width:"30px",title:"Prev Month",backgroundColor:"#F2F0EF",borderColor:"black",onClick:()=>B(-1),children:a(t,{color:"black",height:22,width:22})})}),e("div",{style:{width:"60%"},className:x.controlsDate,children:[a("div",{style:{cursor:"pointer"},onClick:()=>A(e=>({...e,dropDwonState:"years"})),children:T}),a("div",{children:"-"}),a("div",{style:{cursor:"pointer"},onClick:()=>A(e=>({...e,dropDwonState:"months"})),children:String(q+1).padStart(2,"0")}),a("div",{children:"-"}),a("div",{children:String(I).padStart(2,"0")})]}),a("div",{style:{width:"30px"},children:a(r,{type:"button",padding:"3px 0 0 0",height:"30px",width:"30px",title:"Prev Month",backgroundColor:"#F2F0EF",borderColor:"black",onClick:()=>B(1),children:a(i,{color:"black",height:22,width:22})})})]}),a("div",{className:x.weekdays,children:L.map(e=>a("div",{className:x.weekdaysChild,children:e},e))}),a("div",{className:x.days,children:H.map(e=>a("div",{className:[x.weekdaysChild,x.daysChild,"active"==e.cssClass&&x.daysActive,"clickable"==e.cssClass&&x.daysClickable].join(" "),onMouseDown:()=>{var a;e.day>0&&(a=e.day,E(w(m(M.value)?M.value:h(new Date),a))),A(e=>({...e,open:!1})),setTimeout(()=>{V.current?.blur()})},children:e.day<=0||e.day>y(M.value)?" ":e.day},e.day+M.value))})]})]})})]})};b.displayName="Calendar";export{b as Calendar};
|
package/lib/Copybutton.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{useState as o,useRef as e,useCallback as r,useEffect as i}from"react";import{B as n}from"./Button-CLZ8vqe4.js";import{T as c}from"./TextBox-CWSg4nm8.js";import"./Loader-CidTpDmP.js";import"./style-inject.es-CrVRO2OA.js";const l=({children:l,className:a,style:u,textToCopy:m,color:p="white",backgroundColor:s="orangered",...d})=>{const[h,x]=o(!1),g=e(null),y=r(()=>{g.current&&clearTimeout(g.current),navigator.clipboard.writeText(m),x(!0),g.current=setTimeout(()=>{x(!1),g.current=null},800)},[]);return i(()=>()=>{g.current&&clearTimeout(g.current)},[]),t("div",{className:["n23mCopyButton",a].filter(Boolean).join(" "),...d,children:t(n,{type:"button",padding:"0px 3px",height:"auto",width:"auto",backgroundColor:h?"#4BB543":s,onClick:y,children:l??t(c,{mobileSize:10,desktopSize:10,fontWeight:600,lineHeight:"17px",color:p,children:"Copy"})})})};l.displayName="CopyButton";export{l as CopyButton};
|
package/lib/Dialog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as i}from"react/jsx-runtime";import{useRef as e,useEffect as l}from"react";import{B as
|
|
1
|
+
import{jsx as o,jsxs as i}from"react/jsx-runtime";import{useRef as e,useEffect as l}from"react";import{B as a}from"./Button-CLZ8vqe4.js";import{T as t}from"./TextBox-CWSg4nm8.js";import{s as r,g as n}from"./style-inject.es-CrVRO2OA.js";import"./Loader-CidTpDmP.js";var d={n23mDialog:"Dialog-module_n23mDialog__4gk19",dialog:"Dialog-module_dialog__-swDZ",dialogCloseButton:"Dialog-module_dialogCloseButton__nRP56"};r("@layer n23mDialog{.Dialog-module_n23mDialog__4gk19{background-color:#fff;.Dialog-module_dialog__-swDZ{corner-shape:squircle;border:1px solid #000;border-radius:12px;box-sizing:border-box;max-block-size:calc(100dvb - 50px);max-inline-size:min(calc(100vw - 20px),var(--dialog-wm,95%));min-height:100px;overscroll-behavior:none;padding:0;position:relative;& .Dialog-module_dialogCloseButton__nRP56{position:absolute!important;right:10px;top:10px}article{margin-top:55px}&::backdrop{backdrop-filter:blur(5px);background-color:hsla(0,0%,100%,.15);bottom:0;left:0;position:fixed;right:0;top:0}}}}");const s=({children:r,open:s,widthMax:c,title:m,onCancel:g,className:p,style:u,...h})=>{const b=e(null);return l(()=>{if(!s){b.current?.classList.add(d.minimize);const o=setTimeout(()=>{b.current?.close(),b.current?.classList.remove(d.minimize),document.body.style.paddingRight="0",document.body.style.overflow=""},0);return()=>clearTimeout(o)}b.current?.showModal(),document.body.style.paddingRight=window.innerWidth-document.body.clientWidth+"px",document.body.style.overflow="hidden"},[s]),o("div",{className:[d.n23mDialog,"n23mDialog",p].filter(Boolean).join(" "),...h,style:{...n({"--dialog-wm":c}),...u},children:i("dialog",{className:[m?d.hasTitle:"",d.dialog].join(" "),"modal-mode":"mega",ref:b,onCancel:g,children:[o("div",{className:d.dialogCloseButton,style:{display:s?"block":"none"},children:o(a,{onClick:g,"aria-label":"close dialog",height:"25px",width:"60px",backgroundColor:"#ff3333",children:o(t,{tag:"h2",mobileSize:14,desktopSize:14,color:"white",children:"Close"})})}),o("article",{children:r})]})})};s.displayName="Dialog";export{s as Dialog};
|
package/lib/Footer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as o,jsx as e}from"react/jsx-runtime";import{G as t}from"./Grid-
|
|
1
|
+
import{jsxs as o,jsx as e}from"react/jsx-runtime";import{G as t}from"./Grid-F3Ztfrq_.js";import{T as r}from"./TextBox-CWSg4nm8.js";import{s as i,g as n}from"./style-inject.es-CrVRO2OA.js";import"./Loader-CidTpDmP.js";import"react";var a={n23mFooter:"Footer-module_n23mFooter__R0RUZ",n23mFooterPush:"Footer-module_n23mFooterPush__LbDeJ",n23mFooterContainer:"Footer-module_n23mFooterContainer__gMHjx"};i("@layer n23mFooter{html{height:100%}body{min-height:100%;position:relative}.Footer-module_n23mFooter__R0RUZ{.Footer-module_n23mFooterPush__LbDeJ{padding-bottom:100px}.Footer-module_n23mFooterContainer__gMHjx{background-color:var(--bc);bottom:0;height:100px;position:absolute;width:100%}}}");const l=({children:i,author:l="Mariusz Najwer",className:m,initialYear:s="2019",backgroundColor:d="#333333",color:c="white",style:h,...p})=>o("footer",{className:[a.n23mFooter,"n23mFooter",m].filter(Boolean).join(" "),...p,style:{...n({"--bc":d}),...h},children:[e("div",{className:a.n23mFooterPush}),e("div",{className:a.n23mFooterContainer,children:o(t,{layout:"container",widthMax:"1600px",children:[e(t,{layout:"flex",widthMax:"1400px",padding:"20px 0 0",justifyContent:"center",children:o(r,{mobileSize:22,desktopSize:22,color:c,tag:"p",children:["© ",l]})}),e(t,{layout:"flex",widthMax:"1400px",padding:"0",justifyContent:"center",children:o(r,{mobileSize:12,desktopSize:12,color:c,tag:"p",children:[s," - ",(new Date).getFullYear()]})})]})})]});l.displayName="Footer";export{l as Footer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as i,jsx as r}from"react/jsx-runtime";import{L as d}from"./Loader-
|
|
1
|
+
import{jsxs as i,jsx as r}from"react/jsx-runtime";import{L as d}from"./Loader-CidTpDmP.js";import{s as a,g as m}from"./style-inject.es-CrVRO2OA.js";var n={n23mGridFlex:"Grid-module_n23mGridFlex__bsotF",n23mGridContainer:"Grid-module_n23mGridContainer__G1O3I",n23mGridColumns:"Grid-module_n23mGridColumns__oyScE"};a("@layer n23mGrid{.Grid-module_n23mGridContainer__G1O3I,.Grid-module_n23mGridFlex__bsotF{box-sizing:border-box;flex-wrap:var(--grid-fw,nowrap);margin:var(--grid-m);max-width:var(--grid-wx);min-height:var(--grid-mh,auto);min-width:var(--grid-wn);padding:var(--grid-p)}.Grid-module_n23mGridFlex__bsotF{align-items:var(--grid-ai,center);column-gap:var(--grid-cg,0);display:flex;justify-content:var(--grid-jc,space-between);row-gap:var(--grid-rg)}.Grid-module_n23mGridColumns__oyScE{column-gap:var(--grid-cg,0);display:flex;flex-wrap:wrap;row-gap:var(--grid-rg);width:100%}.Grid-module_n23mGridColumns__oyScE>div{width:calc(100%/var(--gfc) - ((var(--gfc) - 1)/var(--gfc))*var(--grid-cg, 0px))}@media (max-width:767.98px){.Grid-module_n23mGridColumns__oyScE>div{--gfc:var(--grid-cm)}}@media (min-width:768px) and (max-width:1199.98px){.Grid-module_n23mGridColumns__oyScE>div{--gfc:var(--grid-ct)}}@media (min-width:1200px) and (max-width:1599.98px){.Grid-module_n23mGridColumns__oyScE>div{--gfc:var(--grid-csd)}}@media (min-width:1600px){.Grid-module_n23mGridColumns__oyScE>div{--gfc:var(--grid-cd)}}}");const o=({children:a,widthMin:o="0px",widthMax:e="1920px",padding:g="0px",margin:t="auto",layout:l,gap:c,col:s,loading:p=!1,justifyContent:G,alignItems:_,minHeight:x,flexWrap:u,className:v,style:w,...h})=>"container"===l||"flex"===l?i("div",{className:[n["n23mGrid"+l.charAt(0).toUpperCase()+l.slice(1)],"n23mGrid"+l.charAt(0).toUpperCase()+l.slice(1),v].filter(Boolean).join(" "),style:{...m({"--grid-p":g,"--grid-m":t,"--grid-jc":G,"--grid-cg":c?.col,"--grid-rg":c?.row,"--grid-ai":_,"--grid-fw":u,"--grid-mh":x,"--grid-wn":o,"--grid-wx":e}),...w},...h,children:[!p&&a,p&&r(d,{minHeight:`${x}`})]}):r("div",{className:[n.n23mGridColumns,"n23mGridColumns",v].filter(Boolean).join(" "),style:{"--grid-cm":s.mobile.toString(),"--grid-ct":s.tablet.toString(),"--grid-csd":s.smallDesktop.toString(),"--grid-cd":s.desktop.toString(),"--grid-cg":c.col,"--grid-rg":c.row},...h,children:a});o.displayName="Grid";export{o as G};
|
package/lib/Grid.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{G as Grid}from"./Grid-
|
|
1
|
+
export{G as Grid}from"./Grid-F3Ztfrq_.js";import"react/jsx-runtime";import"./Loader-CidTpDmP.js";import"./TextBox-CWSg4nm8.js";import"react";import"./style-inject.es-CrVRO2OA.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useRef as n}from"react";import{T as r}from"./TextBox-CWSg4nm8.js";import{s as a,g as o}from"./style-inject.es-CrVRO2OA.js";import{v as i}from"./index-P_Zi0cEe.js";var l={n23mInput:"Input-module_n23mInput__hkvVc",n23mInputInput:"Input-module_n23mInputInput__S-hN-"};a("@layer n23mInput{.Input-module_n23mInput__hkvVc{--iff:-apple-system,BlinkMacSystemFont,avenir next,avenir,segoe ui,helvetica neue,helvetica,Cantarell,Ubuntu,roboto,noto,arial,sans-serif;margin-top:0;&:not(:has(input[type=hidden])){margin-bottom:10px}.Input-module_n23mInputInput__S-hN-{display:grid;& input,& textarea{corner-shape:squircle;border:1px solid var(--input-cb,#000);border-radius:12px;box-sizing:border-box;color:var(--input-c,#000);font-family:var(--n23mFontFamily,var(--iff));font-size:16px;font-weight:500}& input{height:40px;padding:20px 10px;width:100%}& textarea{field-sizing:content;block-size:100%;max-height:400px;min-height:200px;padding:10px;resize:vertical}&input[type=hidden]{margin:0;padding:0}& ::placeholder{filter:brightness(125%);font-weight:300}}.Input-module_n23mInputError__jolhD{color:var(--najwer23snacks-input-error-font-color);font-family:var(--najwer23snacks-input-error-font-family);font-size:var(--najwer23snacks-input-error-font-size);font-weight:var(--najwer23snacks-input-error-font-weight);line-height:1;margin:2px}}}");const p=({className:a,style:p,name:u,label:s,inputRef:d,placeholder:m,type:c="text",labelColor:h="black",kind:f="input",inputColor:g,inputColorBorder:x,defaultValue:v,disabled:b,validatorOptions:I,value:y,autoComplete:_,id:C,onBlur:k,onChange:j,...z})=>{const w=n(null),B=e=>{k?.(e);const t=e.target;if(document.activeElement!==t&&(w.current&&(w.current.textContent=""),I)){const e=i(t.value,I);e.length>0?(w.current&&(w.current.textContent=e[0]),t.classList.add("error")):t.classList.remove("error")}},S=e=>{j?.(e)};return e("div",{className:[l.n23mInput,"n23mInput",a].filter(Boolean).join(" "),...z,style:{...o({"--input-c":g,"--input-cb":x}),...p},children:["hidden"!==c&&t(r,{mobileSize:14,desktopSize:14,tag:"label",fontWeight:400,color:h,htmlFor:"select"==f?C:u,children:s}),e("div",{className:l.n23mInputInput,children:["input"===f&&t("input",{ref:d,id:u,name:u,type:c,onBlur:B,onChange:S,placeholder:m,defaultValue:v,disabled:b,value:y,autoComplete:_}),"textarea"===f&&t("textarea",{autoComplete:_,id:u,name:u,onBlur:B,onChange:S,placeholder:m,defaultValue:v,disabled:b,value:y,ref:d}),"select"===f&&t("input",{id:C,autoComplete:"off",ref:d,type:c,onBlur:B,onChange:S,placeholder:m,defaultValue:v,disabled:b,value:y})]}),"hidden"!==c&&t(r,{ref:w,mobileSize:12,desktopSize:12,tag:"p",fontWeight:400,color:"#ff3333",lineHeight:"14px",margin:"2px 0 2px"})]})};p.displayName="Input";export{p as I};
|
package/lib/Input.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{I as Input}from"./Input-
|
|
1
|
+
export{I as Input}from"./Input-Vl9630ee.js";import"react/jsx-runtime";import"react";import"./TextBox-CWSg4nm8.js";import"./style-inject.es-CrVRO2OA.js";import"./index-P_Zi0cEe.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{T as a}from"./TextBox-CWSg4nm8.js";import{s as r,g as d}from"./style-inject.es-CrVRO2OA.js";var l={n23mLoader:"Loader-module_n23mLoader__stRd6",dots:"Loader-module_dots__6RKy4"};r("@layer n23mLoader{.Loader-module_n23mLoader__stRd6{corner-shape:squircle;align-items:center;border:1px dotted var(--loader-lc,var(--n23mTextBoxColor,#000));border-radius:12px;box-sizing:border-box;color:var(--loader-lc,var(--n23mTextBoxColor,#000));display:flex;height:var(--loader-mh,100%);justify-content:center;width:100%;.Loader-module_dots__6RKy4 span{animation:Loader-module_dotPulse__xgeg9 1.2s ease-in-out infinite;display:inline-block}.Loader-module_dots__6RKy4 span:nth-child(2){animation-delay:.2s}.Loader-module_dots__6RKy4 span:nth-child(3){animation-delay:.4s}}@keyframes Loader-module_dotPulse__xgeg9{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}}");const s=({minHeight:r,className:s,loaderColor:t,style:n})=>e("div",{className:[l.n23mLoader,"n23mLoader",s].filter(Boolean).join(" "),style:{...d({"--loader-lc":t,"--loader-mh":r}),...n},children:o(a,{mobileSize:16,desktopSize:16,color:t,role:"status","aria-label":"Loading",children:["Loading",o("span",{className:l.dots,"aria-hidden":"true",children:[e("span",{children:"."}),e("span",{children:"."}),e("span",{children:"."})]})]})});s.displayName="Loader";export{s as L};
|
package/lib/Loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{L as Loader}from"./Loader-
|
|
1
|
+
export{L as Loader}from"./Loader-CidTpDmP.js";import"react/jsx-runtime";import"./TextBox-CWSg4nm8.js";import"react";import"./style-inject.es-CrVRO2OA.js";
|
package/lib/Picture.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useState as i}from"react";import{u as o}from"./useCachedImageCheck-TeUbYfzH.js";import{u as t}from"./useWindowSize-CAQRbyxi.js";import{T as c}from"./TextBox-CWSg4nm8.js";import{s as a,g as d}from"./style-inject.es-CrVRO2OA.js";var u={n23mPictureFigure:"Picture-module_n23mPictureFigure__uStTO",n23mPicture:"Picture-module_n23mPicture__LpndY",border:"Picture-module_border__yjTpQ",loaded:"Picture-module_loaded__fpjpQ",cacheLoaded:"Picture-module_cacheLoaded__IunbX"};a("@layer n23mPicture{.Picture-module_n23mPictureFigure__uStTO{margin:0;padding:0}.Picture-module_n23mPicture__LpndY{box-sizing:border-box;display:block;&.Picture-module_border__yjTpQ{border:2px solid var(--picture-bc);padding:5px}& img,&.Picture-module_border__yjTpQ{corner-shape:squircle;border-radius:12px}& img{display:grid;height:auto;max-height:var(--picture-mh,unset);opacity:0;width:100%}&.Picture-module_loaded__fpjpQ img{opacity:1;transition:opacity .25s ease-in-out}&.Picture-module_cacheLoaded__IunbX img{opacity:1}}}");const m=({children:a,className:m,style:s,draggable:l=!1,alt:p,src:n,srcDesktop:g,srcMobile:_,ar:h,arMobile:b,arDesktop:P,border:x=!1,borderColor:y="black",loading:f="lazy",srcset:j,sizes:S,maxHeight:k,maxHeightMobile:z,maxHeightDesktop:L,figcaption:T,figcaptionColor:w,...Q})=>{const[C,F]=i(!1),{width:v}=t(),D=g&&v>=768?g:_&&v<768?_:n||"",H=o(D,25);return e("figure",{className:u.n23mPictureFigure,children:[e("picture",{className:["n23mPicture",u.n23mPicture,x&&u.border,C&&!H&&u.loaded,H&&u.cacheLoaded,m].filter(Boolean).join(" "),...Q,style:{...d({"--picture-bc":y,"--picture-mh":L||z?z&&v<767.98?z:L||z:k}),...s},children:[g&&r("source",{media:"(min-width: 768px)",srcSet:g}),_&&r("source",{media:"(max-width: 767.98px)",srcSet:_}),r("img",{sizes:S,srcSet:j,width:P||b?b&&v<767.98?b:P||b:h,height:1,src:D,alt:p,loading:f,onLoad:()=>F(!0),draggable:l})]}),T&&r("figcaption",{children:r(c,{tag:"p",desktopSize:12,mobileSize:12,color:w,margin:"3px 0 3px 0",children:T})})]})};export{m as Picture};
|
package/lib/Select.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useState as t,useRef as n,useId as r,useMemo as l}from"react";import{I as a}from"./Input-
|
|
1
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useState as t,useRef as n,useId as r,useMemo as l}from"react";import{I as a}from"./Input-Vl9630ee.js";import{s as i}from"./style-inject.es-CrVRO2OA.js";import"./TextBox-CWSg4nm8.js";import"./index-P_Zi0cEe.js";var s={n23mSelect:"Select-module_n23mSelect__2Xjs2",icon:"Select-module_icon__EyueR",iconRotate:"Select-module_iconRotate__IuY-d",dropdownWrapper:"Select-module_dropdownWrapper__4xq1b",open:"Select-module_open__r2R21",dropdown:"Select-module_dropdown__cDzJX",dropdownItem:"Select-module_dropdownItem__RBpMK"};i('@layer n23mSelect{.Select-module_n23mSelect__2Xjs2{--iff:-apple-system,BlinkMacSystemFont,avenir next,avenir,segoe ui,helvetica neue,helvetica,Cantarell,Ubuntu,roboto,noto,arial,sans-serif;position:relative;& input{cursor:pointer;padding-right:40px}.Select-module_icon__EyueR{-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);background:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" xml:space="preserve"><g style="stroke:none;stroke-width:1px;fill-rule:nonzero;opacity:1"><path d="M90 24.25a3.499 3.499 0 0 0-5.974-2.475L45 60.8 5.975 21.775a3.5 3.5 0 1 0-4.95 4.95l41.5 41.5a3.499 3.499 0 0 0 4.949 0l41.5-41.5A3.487 3.487 0 0 0 90 24.25z" style="stroke:none;stroke-width:1" transform="matrix(2.81 0 0 2.81 1.407 1.407)"/></g></svg>\') no-repeat 100%;background-position:calc(100% - 10px) 50%;background-size:18px;cursor:pointer;display:inline-block;height:40px;position:absolute;right:2px;top:22px;transform:rotate(0deg);transition:transform .1s ease-in-out;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:40px;&.Select-module_iconRotate__IuY-d{transform:rotate(180deg);transition:transform .1s ease-in-out}}.Select-module_dropdownWrapper__4xq1b{corner-shape:squircle;background:transparent;border-radius:12px;display:none;margin-top:65px;padding-bottom:40px;position:absolute;top:0;width:100%;z-index:3;&.Select-module_open__r2R21{display:block}.Select-module_dropdown__cDzJX{corner-shape:squircle;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);background:#fff;border-radius:12px;box-shadow:0 4px 8px 0 rgba(0,0,0,.24),0 6px 20px 0 rgba(0,0,0,.19);cursor:pointer;max-height:200px;overflow-y:auto;overscroll-behavior:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;&:has(.Select-module_dropdownItem__RBpMK){border:1px solid var(--input-cb,#000)}.Select-module_dropdownItem__RBpMK{background:#fff;border-bottom:1px solid var(--input-cb,#000);box-sizing:border-box;color:var(--input-c,#000);font-family:var(--n23mFontFamily,var(--iff));font-size:16px;font-weight:500;padding:10px;width:100%;&:hover{background-color:#f5f5f5}&:not(:first-child){border-top:none}&:last-child{border-bottom:unset}}}}}}');const p=({className:i,name:p,disabled:d,style:c,options:u,initialValue:m,validatorOptions:b,placeholder:h,onBlur:_,label:x="Select",...g})=>{const[v,f]=t(m?.label??""),[w,k]=t(m?.value??""),[y,S]=t(!1),j=n(null),R=r(),I=l(()=>u.filter(e=>e.label.toLowerCase().includes(v.toLowerCase())),[u,v]),z=()=>{S(e=>!e),f(""),k("")};return e("div",{className:[s.n23mSelect,"n23mSelect",i].filter(Boolean).join(" "),...g,style:{...c},children:[o("div",{className:[s.icon,y?s.iconRotate:""].join(" "),onMouseDown:e=>{e.preventDefault(),j.current?.focus(),z()}}),o(a,{name:p,type:"hidden",kind:"input",validatorOptions:[...b??[],{type:"existsInOptions",options:{options:u,matchBy:"value"}}],value:w}),o(a,{id:R,inputRef:j,label:x,type:"text",kind:"select",disabled:d,placeholder:h,value:v,onChange:e=>{const o=e.currentTarget.value;f(o),k(""),S(!0)},onClick:z,onBlur:e=>{S(!1),_?.(e,{value:w,label:v})},validatorOptions:[...b??[],{type:"existsInOptions",options:{options:u,matchBy:"label"}}],"aria-autocomplete":"list","aria-expanded":y,"aria-controls":`${p}-listbox`,role:"combobox"}),o("div",{className:[s.dropdownWrapper,y?s.open:""].join(" "),children:o("div",{className:[s.dropdown].join(" "),children:I.map(e=>o("div",{className:s.dropdownItem,onMouseDown:()=>{(e=>{k(e.value),f(e.label),S(!1)})(e)},children:e.label},e.value))})})]})};export{p as Select};
|
package/lib/Slider.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r,Fragment as l}from"react/jsx-runtime";import i,{useState as n,useRef as t,useLayoutEffect as o}from"react";import{B as d}from"./Button-
|
|
1
|
+
import{jsxs as e,jsx as r,Fragment as l}from"react/jsx-runtime";import i,{useState as n,useRef as t,useLayoutEffect as o}from"react";import{B as d}from"./Button-CLZ8vqe4.js";import{u as s}from"./useWindowSize-CAQRbyxi.js";import{I as a,a as c}from"./IconLocate-LfOaIasU.js";import{L as m}from"./Loader-CidTpDmP.js";import{T as u}from"./TextBox-CWSg4nm8.js";import{s as h}from"./style-inject.es-CrVRO2OA.js";var g={n23mSlider:"Slider-module_n23mSlider__YOEan",dragging:"Slider-module_dragging__F3UtX",n23mSliderContainerSlider:"Slider-module_n23mSliderContainerSlider__-1M4s",n23mSliderSlideWrapper:"Slider-module_n23mSliderSlideWrapper__hbDsw",n23mSliderSlide:"Slider-module_n23mSliderSlide__Hv6uj",n23mSliderControls:"Slider-module_n23mSliderControls__DLrdZ",n23mSliderControlsButtons:"Slider-module_n23mSliderControlsButtons__C1ypH",n23mSliderCounter:"Slider-module_n23mSliderCounter__UJLZw"};h("@layer n23mSlider{.Slider-module_n23mSlider__YOEan{width:100%;&.Slider-module_dragging__F3UtX,&.Slider-module_dragging__F3UtX a{cursor:grabbing}}.Slider-module_n23mSliderContainerSlider__-1M4s{display:flex;flex-direction:column;gap:10px;height:100%;position:relative;user-select:none;width:100%}.Slider-module_n23mSliderSlideWrapper__hbDsw{box-sizing:border-box;display:flex;height:100%;overflow:hidden;position:relative;width:100%;will-change:transform}.Slider-module_n23mSliderSlide__Hv6uj{height:100%;overflow:hidden;position:absolute;top:0;will-change:transform;&>*{height:100%;width:100%}}.Slider-module_n23mSliderControls__DLrdZ{align-items:center;display:flex;margin-left:20px;margin-right:20px}.Slider-module_n23mSliderControlsButtons__C1ypH{display:flex;gap:10px;margin-top:10px}.Slider-module_n23mSliderCounter__UJLZw{align-items:center;align-items:flex-start;display:flex;height:50px;justify-content:center}}");const S=(e,r,l=!1,n)=>(l?e.slice(0,r):e.slice(-r)).map((e,r)=>i.cloneElement(e,{key:`${l?"clone-first":"clone-last"}-${r} ${n}`,className:e.props.className})),p=({isCircular:h=!1,children:p,className:_,loading:f=!1,loaderColor:x="black",slidesConfig:b={mobile:{items:1,slidesToScroll:1},tablet:{items:2,slidesToScroll:2},desktop:{items:3,slidesToScroll:3}},slideSpacingPx:C=10})=>{const v=i.Children.toArray(p).filter(i.isValidElement),{width:w}=s(),[y,j]=n(0),E=t(null),k=t(null),[F,L]=n(h?2*v.length:0),[T,$]=n(!1),N=t([]),[B,X]=n(null),[z,D]=n(0),M=t(!1);let W,U,H,Z;w<767.98?(W=b.mobile.items,U=b.mobile.slidesToScroll,H="transform 0.4s cubic-bezier(.4,0,.2,1)",Z=450):w<1199.98?(W=b.tablet.items,U=b.tablet.slidesToScroll,H="transform 0.4s cubic-bezier(.4,0,.2,1)",Z=450):(W=b.desktop.items,U=b.desktop.slidesToScroll,H="transform 0.4s cubic-bezier(.4,0,.2,1)",Z=450),o(()=>{E.current&&j(E.current.offsetWidth),L(h?2*v.length:0)},[f,h,W,v.length,w]);const I=(y-C*(W-1))/W;let J=h?[...S(v,v.length,!1,1),...v,...S(v,v.length,!1,2),...S(v,v.length,!0,3),...S(v,v.length,!0,4)]:v;o(()=>{N.current.forEach((e,r)=>{if(!e)return;let l=0,i=0;1===W&&1!==v.length?(l=40,i=40):2===W?(l=20,i=20):4===W?(l=10,i=10):3===W&&(l=12.5,i=12.5);const n=(r-F)*(I+C-i)+(y-(I-l)*W-C*(W-1))/2;e.style.transition=T?H:"none",e.style.transform=`translateX(${n}px)`})},[F,y,T,J.length,W,I,C,f]),o(()=>{if(!T)return;let e;const r=()=>{let l=F;F<2*W&&h?l=F+2*v.length:F>=2*v.length+W&&h&&(l=F-v.length),l!==F&&h&&L(l),$(!1),N.current.forEach(e=>{e&&e.removeEventListener("transitionend",r)}),clearTimeout(e)};return N.current.forEach(e=>{e&&e.addEventListener("transitionend",r)}),e=window.setTimeout(()=>{$(!1),N.current.forEach(e=>{e&&e.removeEventListener("transitionend",r)})},Z),()=>{N.current.forEach(e=>{e&&e.removeEventListener("transitionend",r)}),clearTimeout(e)}},[F,h,T,v.length,W,J.length,f]);const O=()=>{T||($(!0),L(e=>e+U))},P=()=>{T||($(!0),L(e=>e-U))};return e("div",{ref:k,className:[g.n23mSlider,"n23mSlider",_].filter(Boolean).join(" "),style:{height:f?"calc(100% - 2px)":"calc(100% - 60px)"},children:[f&&r(m,{loaderColor:x}),!f&&e(l,{children:[r("div",{className:[g.n23mSliderContainerSlider].filter(Boolean).join(" "),onTouchStart:e=>{1===e.touches.length&&(X(e.touches[0].clientX),D(0),M.current=!0,k.current&&k.current.classList.add(g.dragging))},onTouchMove:e=>{null!==B&&D(e.touches[0].clientX-B)},onTouchEnd:()=>{z>50&&!T&&(h||0!==F)?P():z<-50&&!(T||!h&&F+W>=v.length)&&O(),X(null),D(0),M.current=!1,k.current&&k.current.classList.remove(g.dragging)},onMouseDown:e=>{X(e.clientX),D(0),M.current=!0,k.current&&k.current.classList.add(g.dragging)},onMouseMove:e=>{null!==B&&D(e.clientX-B)},onMouseUp:()=>{z>50&&!T&&(h||0!==F)?P():z<-50&&!(T||!h&&F+W>=v.length)&&O(),X(null),D(0),M.current=!1,k.current&&k.current.classList.remove(g.dragging)},children:r("div",{className:[g.n23mSliderSlideWrapper,"n23mSliderSlideWrapper"].join(" "),ref:E,style:{gap:`${C}px`},children:J.map((e,l)=>r("div",{ref:e=>{N.current[l]=e},className:g.n23mSliderSlide,style:{width:1===W&&1===v.length?"100%":1===W?`calc(${I}px - 40px)`:2===W?`calc(${I}px - 20px)`:3===W?`calc(${I}px - 12.5px)`:4===W?`calc(${I}px - 10px)`:`${I}px`},"aria-hidden":l<F||l>=F+W,children:e},e.key??l))})}),e("div",{className:[g.n23mSliderControls,"n23mSliderControls"].join(" "),style:{justifyContent:1===W?"space-between":"flex-end"},children:[1===W&&r("div",{className:[g.n23mSliderCounter,"n23mSliderCounter"].join(" "),children:r(u,{mobileSize:16,desktopSize:16,color:"black",children:h?`${(()=>{if(!h)return F;const e=v.length;return e<1?0:(F+e)%e})()+1} / ${v.length}`:`${F+1} / ${v.length}`})}),e("div",{className:[g.n23mSliderControlsButtons,"n23mSliderControlsButtons"].join(" "),children:[r(d,{height:"50px",width:"50px",backgroundColor:"#F2F0EF",padding:0,title:"Prev",onClick:P,borderColor:"black",backgroundColorDisabled:"#F2F0EF",disabled:T||!h&&0===F,children:r(a,{width:24,height:24})}),r(d,{height:"50px",width:"50px",backgroundColor:"#F2F0EF",padding:0,title:"Next",borderColor:"black",backgroundColorDisabled:"#F2F0EF",onClick:O,disabled:T||!h&&F+W>=v.length,children:r(c,{width:24,height:24})})]})]})]})]})};p.displayName="Slider";export{p as Slider};
|
package/lib/Sliderscroll.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as r,jsx as e}from"react/jsx-runtime";import{useRef as l,Children as t,cloneElement as n,useState as o,useEffect as i,useMemo as c,useCallback as s}from"react";import{B as a}from"./Button-
|
|
1
|
+
import{jsxs as r,jsx as e}from"react/jsx-runtime";import{useRef as l,Children as t,cloneElement as n,useState as o,useEffect as i,useMemo as c,useCallback as s}from"react";import{B as a}from"./Button-CLZ8vqe4.js";import{u}from"./useWindowSize-CAQRbyxi.js";import{I as d,a as g}from"./IconLocate-LfOaIasU.js";import{s as m,g as f}from"./style-inject.es-CrVRO2OA.js";import"./Loader-CidTpDmP.js";import"./TextBox-CWSg4nm8.js";var h={n23mSliderScrollWrapper:"SliderScroll-module_n23mSliderScrollWrapper__MqXIk",n23mSliderScrollTrack:"SliderScroll-module_n23mSliderScrollTrack__FcsTl",dragging:"SliderScroll-module_dragging__iE4mo",n23mSliderScrollControls:"SliderScroll-module_n23mSliderScrollControls__i64nM",n23mSliderScrollControlsButtons:"SliderScroll-module_n23mSliderScrollControlsButtons__W-5rb"};m("@layer n23mSliderScroll{.SliderScroll-module_n23mSliderScrollWrapper__MqXIk{display:grid;position:relative}.SliderScroll-module_n23mSliderScrollTrack__FcsTl{-ms-overflow-style:none;-webkit-overflow-scrolling:touch;display:flex;flex-wrap:nowrap;gap:var(--sliderscroll-g);overflow-x:scroll;scrollbar-width:none;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;will-change:scroll-position;&::-webkit-scrollbar{display:none}&>*{flex-shrink:0}&.SliderScroll-module_dragging__iE4mo,&.SliderScroll-module_dragging__iE4mo a{cursor:grabbing}}.SliderScroll-module_n23mSliderScrollControls__i64nM{align-items:center;display:flex;justify-content:flex-end;margin-left:20px;margin-right:20px}.SliderScroll-module_n23mSliderScrollControlsButtons__W-5rb{display:flex;gap:10px;margin-top:10px}}");const S=({children:m,className:S,gap:p="5px",isCircular:w=!1,autoPlay:b=!1,autoPlaySpeed:F=.5,style:L})=>{const _={carousel:l(null),buttonLeft:l(null),buttonRight:l(null),showArrowLeft:l(!1),showArrowRight:l(!1),isSliding:l(!1),animationFrameId:l(null),isHovered:l(!1),drag:l({isDown:!1,startX:0,scrollLeft:0,isMove:!1,isDragging:!1}),childRefs:l([])},v=t.toArray(m),k=v.length,x=w?v.map((r,e)=>n(r,{key:`cb-${e}`})):[],y=w?v.map((r,e)=>n(r,{key:`ca-${e}`})):[],C=w?[...x,...v,...y]:v,[M,A]=o([]),{width:D}=u();i(()=>{if(!_.carousel.current)return;const r=_.childRefs.current.map(r=>{if(!r)return 0;const e=getComputedStyle(r),l=parseFloat(e.marginLeft)||0,t=parseFloat(e.marginRight)||0;return r.offsetWidth+l+t+Number(p.slice(0,-2))});A(r)},[m,D,p]);const I=c(()=>{const r=[];let e=0;for(const l of M)r.push(e),e+=l;return r},[M]);i(()=>{w&&_.carousel.current&&I.length&&(_.carousel.current.scrollLeft=(I[k]||0)-2*Number(p.slice(0,-2))),j()},[D,I,k,w]),i(()=>{W(!1)},[]),i(()=>{if(!w)return;if(!b)return void(_.animationFrameId.current&&(cancelAnimationFrame(_.animationFrameId.current),_.animationFrameId.current=null));let r;const e=()=>{if(!_.carousel.current)return;if(_.isSliding.current||_.isHovered.current)return void(_.animationFrameId.current=requestAnimationFrame(e));const r=_.carousel.current;let l=r.scrollLeft+F;if(w&&I.length&&M.length){const r=I[I.length-1]+(M[M.length-1]||0),e=I[k]||0,t=I[k+v.length]||r;l>t+M[0]/2&&(l-=t-e)}r.scrollLeft=l,j(),_.animationFrameId.current=requestAnimationFrame(e)};return r=setTimeout(()=>{_.animationFrameId.current=requestAnimationFrame(e)},500),()=>{r&&clearTimeout(r),_.animationFrameId.current&&(cancelAnimationFrame(_.animationFrameId.current),_.animationFrameId.current=null)}},[b,F,w,I,M,k,v.length]);const j=()=>{if(_.carousel.current){if(w)_.showArrowLeft.current=!0,_.showArrowRight.current=!0;else{const r=_.carousel.current.scrollLeft,e=_.carousel.current.scrollWidth-_.carousel.current.clientWidth;_.showArrowLeft.current=r>0,_.showArrowRight.current=r<e-1}W(_.isSliding.current)}},W=r=>{_.buttonLeft.current&&(_.buttonLeft.current.disabled=r||!_.showArrowLeft.current),_.buttonRight.current&&(_.buttonRight.current.disabled=r||!_.showArrowRight.current)},N=(r,e,l=300)=>{if(_.isSliding.current)return;_.isSliding.current=!0,W(!0);const t=r.scrollLeft,n=e-t,o=performance.now(),i=e=>{const c=e-o,s=Math.min(c/l,1);var a;r.scrollLeft=t+n*((a=s)<.5?4*a*a*a:1-Math.pow(-2*a+2,3)/2),s<1?requestAnimationFrame(i):(_.isSliding.current=!1,W(!1),j())};requestAnimationFrame(i)},R=s(()=>{if(!_.carousel.current)return;if(!I.length||!M.length)return;const r=_.carousel.current,e=r.offsetWidth,l=r.scrollLeft;let t=I.findIndex((r,e)=>r>l);-1===t?t=I.length-1:t>0&&t--;let n,o=0,i=0;for(let r=t;r<I.length&&(o+=M[r],i++,!(o>=e));r++);const c=t+i-1;n=I[c]+M[c]>l+e+1?c:t+i;let s=I[n]-2*Number(p.slice(0,-2));if(s<0&&(s=0),w){s=(I[k]||0)+s-(I[k]||0)}N(_.carousel.current,s,400)},[I,M,p,k,w,v.length]),B=s(()=>{if(!_.carousel.current)return;if(!I.length||!M.length)return;const r=_.carousel.current,e=r.offsetWidth,l=r.scrollLeft;let t=0;for(let r=0;r<I.length;r++)if(I[r]>l){t=r-1;break}t<0&&(t=0);let n=0,o=0;for(let r=t;r>=0&&(n+=M[r],n<=e);r--)o++;let i=t;w||(i=Math.max(o-1,i));let c=I[i]+M[i]-e;if(c<0&&(c=0),w){c=(I[k]||0)+c-(I[k]||0)+Number(p.slice(0,-2))}N(_.carousel.current,c,400)},[I,M,p,k,w]),T=()=>{_.carousel.current&&(_.drag.current.isDragging?_.carousel.current.classList.add(h.dragging):_.carousel.current.classList.remove(h.dragging))};return r("div",{className:["n23mSliderScroll",S].filter(Boolean).join(" "),style:{...f({"--sliderscroll-g":p,height:"calc(100% - 60px)"}),...L},onMouseEnter:()=>{_.isHovered.current=!0},onMouseLeave:()=>{_.isHovered.current=!1},children:[e("div",{className:[h.n23mSliderScrollWrapper,"n23mSliderScrollWrapper"].join(" "),children:e("div",{className:h.n23mSliderScrollTrack,ref:_.carousel,onClick:r=>{_.drag.current.isMove&&(r.preventDefault(),r.stopPropagation())},onScroll:()=>{if(_.carousel.current){if(w&&I.length&&M.length){const r=_.carousel.current.scrollLeft,e=I[I.length-1]+(M[M.length-1]||0),l=I[k]||0,t=I[k+v.length]||e;r<l-M[0]/2?_.carousel.current.scrollLeft=r+(I[v.length+k]-l):r>t+M[0]/2&&(_.carousel.current.scrollLeft=r-(t-l))}j()}},onMouseDown:r=>{_.drag.current.isDown=!0,_.drag.current.startX=r.pageX-(_.carousel.current?.offsetLeft||0),_.drag.current.scrollLeft=_.carousel.current?.scrollLeft||0,_.drag.current.isDragging=!0,T()},onMouseLeave:()=>{_.drag.current.isDown&&(_.drag.current.isDown=!1,_.drag.current.isDragging=!1,T())},onMouseUp:()=>{_.drag.current.isDown=!1,_.drag.current.isDragging=!1,T()},onMouseMove:r=>{if(!_.drag.current.isDown)return void(_.drag.current.isMove=!1);r.preventDefault();var e;const l=("pageX"in(e=r)?e.pageX:"touches"in e?e.touches[0].pageX:0)-(_.carousel.current?.offsetLeft||0)-_.drag.current.startX;Math.abs(l)>5&&(_.drag.current.isMove=!0),_.carousel.current&&(_.carousel.current.scrollLeft=_.drag.current.scrollLeft-l,j())},children:C.map((r,l)=>e("div",{ref:r=>{_.childRefs.current[l]=r},style:{display:"inline-block"},children:r},r.key||l))})}),e("div",{className:[h.n23mSliderScrollControls,"n23mSliderScrollControls"].join(" "),children:r("div",{className:[h.n23mSliderScrollControlsButtons,"n23mSliderScrollControlsButtons"].join(" "),children:[e(a,{ref:_.buttonLeft,height:"50px",width:"50px",backgroundColor:"#F2F0EF",padding:0,title:"Prev",onClick:B,borderColor:"black",backgroundColorDisabled:"#F2F0EF",children:e(d,{width:24,height:24})}),e(a,{ref:_.buttonRight,height:"50px",width:"50px",backgroundColor:"#F2F0EF",padding:0,title:"Next",onClick:R,borderColor:"black",backgroundColorDisabled:"#F2F0EF",children:e(g,{width:24,height:24})})]})})]})};S.displayName="SliderScroll";export{S as SliderScroll};
|
package/package.json
CHANGED
package/lib/Input-RsQ8pvop.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useRef as n}from"react";import{T as r}from"./TextBox-CWSg4nm8.js";import{s as a,g as o}from"./style-inject.es-CrVRO2OA.js";import{v as i}from"./index-P_Zi0cEe.js";var l={n23mInput:"Input-module_n23mInput__hkvVc",n23mInputInput:"Input-module_n23mInputInput__S-hN-"};a("@layer n23mInput{.Input-module_n23mInput__hkvVc{--iff:-apple-system,BlinkMacSystemFont,avenir next,avenir,segoe ui,helvetica neue,helvetica,Cantarell,Ubuntu,roboto,noto,arial,sans-serif;margin-top:0;&:not(:has(input[type=hidden])){margin-bottom:10px}.Input-module_n23mInputInput__S-hN-{display:grid;& input,& textarea{border:1px solid var(--input-cb,#000);border-radius:5px;box-sizing:border-box;color:var(--input-c,#000);font-family:var(--n23mFontFamily,var(--iff));font-size:16px;font-weight:500}& input{height:40px;padding:20px 10px;width:100%}& textarea{field-sizing:content;block-size:100%;max-height:400px;min-height:200px;padding:10px;resize:vertical}&input[type=hidden]{margin:0;padding:0}& ::placeholder{filter:brightness(125%);font-weight:300}}.Input-module_n23mInputError__jolhD{color:var(--najwer23snacks-input-error-font-color);font-family:var(--najwer23snacks-input-error-font-family);font-size:var(--najwer23snacks-input-error-font-size);font-weight:var(--najwer23snacks-input-error-font-weight);line-height:1;margin:2px}}}");const p=({className:a,style:p,name:u,label:s,inputRef:d,placeholder:m,type:c="text",labelColor:f="black",kind:h="input",inputColor:g,inputColorBorder:x,defaultValue:v,disabled:b,validatorOptions:I,value:y,autoComplete:_,id:C,onBlur:k,onChange:j,...z})=>{const w=n(null),B=e=>{k?.(e);const t=e.target;if(document.activeElement!==t&&(w.current&&(w.current.textContent=""),I)){const e=i(t.value,I);e.length>0?(w.current&&(w.current.textContent=e[0]),t.classList.add("error")):t.classList.remove("error")}},S=e=>{j?.(e)};return e("div",{className:[l.n23mInput,"n23mInput",a].filter(Boolean).join(" "),...z,style:{...o({"--input-c":g,"--input-cb":x}),...p},children:["hidden"!==c&&t(r,{mobileSize:14,desktopSize:14,tag:"label",fontWeight:400,color:f,htmlFor:"select"==h?C:u,children:s}),e("div",{className:l.n23mInputInput,children:["input"===h&&t("input",{ref:d,id:u,name:u,type:c,onBlur:B,onChange:S,placeholder:m,defaultValue:v,disabled:b,value:y,autoComplete:_}),"textarea"===h&&t("textarea",{autoComplete:_,id:u,name:u,onBlur:B,onChange:S,placeholder:m,defaultValue:v,disabled:b,value:y,ref:d}),"select"===h&&t("input",{id:C,autoComplete:"off",ref:d,type:c,onBlur:B,onChange:S,placeholder:m,defaultValue:v,disabled:b,value:y})]}),"hidden"!==c&&t(r,{ref:w,mobileSize:12,desktopSize:12,tag:"p",fontWeight:400,color:"#ff3333",lineHeight:"14px",margin:"2px 0 2px"})]})};p.displayName="Input";export{p as I};
|
package/lib/Loader-D8OrIi__.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o}from"react/jsx-runtime";import{T as a}from"./TextBox-CWSg4nm8.js";import{s as r,g as d}from"./style-inject.es-CrVRO2OA.js";var l={n23mLoader:"Loader-module_n23mLoader__stRd6",dots:"Loader-module_dots__6RKy4"};r("@layer n23mLoader{.Loader-module_n23mLoader__stRd6{align-items:center;border:1px dotted var(--loader-lc,var(--n23mTextBoxColor,#000));box-sizing:border-box;color:var(--loader-lc,var(--n23mTextBoxColor,#000));display:flex;height:var(--loader-mh,100%);justify-content:center;width:100%;.Loader-module_dots__6RKy4 span{animation:Loader-module_dotPulse__xgeg9 1.2s ease-in-out infinite;display:inline-block}.Loader-module_dots__6RKy4 span:nth-child(2){animation-delay:.2s}.Loader-module_dots__6RKy4 span:nth-child(3){animation-delay:.4s}}@keyframes Loader-module_dotPulse__xgeg9{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}}");const t=({minHeight:r,className:t,loaderColor:s,style:n})=>e("div",{className:[l.n23mLoader,"n23mLoader",t].filter(Boolean).join(" "),style:{...d({"--loader-lc":s,"--loader-mh":r}),...n},children:o(a,{mobileSize:16,desktopSize:16,color:s,role:"status","aria-label":"Loading",children:["Loading",o("span",{className:l.dots,"aria-hidden":"true",children:[e("span",{children:"."}),e("span",{children:"."}),e("span",{children:"."})]})]})});t.displayName="Loader";export{t as L};
|