@sawabona/forms 1.0.2 → 1.0.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/README.md +27 -0
- package/dist/components/FormRenderer.d.ts +1 -0
- package/dist/components/FormRenderer.d.ts.map +1 -1
- package/dist/components/QuestionRenderer.d.ts +1 -0
- package/dist/components/QuestionRenderer.d.ts.map +1 -1
- package/dist/components/ui/RatingInput.d.ts +1 -0
- package/dist/components/ui/SelectInput.d.ts +1 -0
- package/dist/components/ui/SelectInput.d.ts.map +1 -1
- package/dist/components/ui/TextInput.d.ts +1 -0
- package/dist/components/ui/TextInput.d.ts.map +1 -1
- package/dist/core/FormContext.d.ts +1 -0
- package/dist/core/types.d.ts +15 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/useFormEngine.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/sawabona-forms.css +2 -2
- package/dist/sawabona-forms.es.js +270 -234
- package/dist/sawabona-forms.umd.js +7 -7
- package/dist/utils.d.ts +2 -0
- package/dist/utils.d.ts.map +1 -1
- package/package.json +10 -10
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(s,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("react/jsx-runtime"),require("react"),require("framer-motion"),require("lucide-react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","framer-motion","lucide-react"],t):(s=typeof globalThis!="undefined"?globalThis:s||self,t(s.SawabonaForms={},s.jsxRuntime,s.React,s.Motion,s.Lucide))})(this,(function(s,t,a,p,$){"use strict";var q=Object.defineProperty,R=Object.defineProperties;var ee=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var _=(s,t,a)=>t in s?q(s,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[t]=a,n=(s,t)=>{for(var a in t||(t={}))D.call(t,a)&&_(s,a,t[a]);if(j)for(var a of j(t))O.call(t,a)&&_(s,a,t[a]);return s},N=(s,t)=>R(s,ee(t));var K=s=>typeof s=="symbol"?s:s+"",Q=(s,t)=>{var a={};for(var p in s)D.call(s,p)&&t.indexOf(p)<0&&(a[p]=s[p]);if(s!=null&&j)for(var p of j(s))t.indexOf(p)<0&&O.call(s,p)&&(a[p]=s[p]);return a};function V({schema:e,onSubmit:l}){var h;const[o,r]=a.useState({answers:{},currentStepId:((h=e.questions[0])==null?void 0:h.id)||"",history:[],isSubmitting:!1,errors:{},isCompleted:!1}),d=a.useMemo(()=>e.questions.findIndex(i=>i.id===o.currentStepId),[e.questions,o.currentStepId]),f=e.questions[d],x=a.useCallback((i,c)=>{r(m=>N(n({},m),{answers:N(n({},m.answers),{[i]:c}),errors:N(n({},m.errors),{[i]:""})}))},[]),w=a.useCallback((i,c)=>{r(m=>{if(c===null){const I=m.errors,{[i]:B}=I,T=Q(I,[K(i)]);return N(n({},m),{errors:T})}return N(n({},m),{errors:N(n({},m.errors),{[i]:c})})})},[]),g=a.useCallback(()=>{var m;if(!f)return!0;const i=o.answers[f.id],c=f.validation;return c&&c.required&&(i===void 0||i===""||Array.isArray(i)&&i.length===0)?(w(f.id,((m=e.i18n)==null?void 0:m.required)||"This field is required"),!1):!0},[f,o.answers,w,e.i18n]),u=a.useCallback(i=>{const c=e.questions.findIndex(m=>m.id===i.id);return c<e.questions.length-1?e.questions[c+1].id:"submit"},[e.questions]),v=a.useCallback(()=>{if(!g())return;const i=u(f);i==="submit"?(r(c=>N(n({},c),{isCompleted:!0})),l==null||l(o.answers)):r(c=>N(n({},c),{history:[...c.history,c.currentStepId],currentStepId:i}))},[f,o.answers,g,u,l]),y=a.useCallback(()=>{if(o.history.length===0)return;const i=o.history[o.history.length-1];r(c=>N(n({},c),{history:c.history.slice(0,-1),currentStepId:i}))},[o.history]),C=a.useCallback(i=>{if(!e.questions.some(m=>m.id===i)){console.warn(`Step ${i} does not exist`);return}r(m=>N(n({},m),{history:[...m.history,m.currentStepId],currentStepId:i}))},[e.questions]),S=a.useCallback(()=>{var i;r({answers:{},currentStepId:((i=e.questions[0])==null?void 0:i.id)||"",history:[],isSubmitting:!1,errors:{},isCompleted:!1})},[e.questions]);return N(n({},o),{setAnswer:x,nextStep:v,prevStep:y,jumpToStep:C,submitForm:()=>l==null?void 0:l(o.answers),resetForm:S,registerError:w,progress:d/e.questions.length*100})}const P=a.createContext(void 0),z=()=>{const e=a.useContext(P);if(!e)throw new Error("useFormContext must be used within a FormProvider");return e};function H(e,l,o){if(!e)return"";const r=e.replace(/\D/g,"");if(l==="phone")return r.replace(/(\d{2})(\d)/,"($1) $2").replace(/(\d{4})(\d)/,"$1-$2").slice(0,14);if(l==="cellphone")return r.replace(/(\d{2})(\d)/,"($1) $2").replace(/(\d{5})(\d)/,"$1-$2").slice(0,15);if(l==="cpf")return r.replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d{1,2})/,"$1-$2").replace(/(-\d{2})\d+?$/,"$1");if(l==="cnpj")return r.replace(/(\d{2})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1.$2").replace(/(\d{3})(\d)/,"$1/$2").replace(/(\d{4})(\d)/,"$1-$2").replace(/(-\d{2})\d+?$/,"$1");if(l==="cep")return r.replace(/(\d{5})(\d)/,"$1-$2").slice(0,9);if(l==="custom"&&o){let d=0;return o.replace(/[#X0]/g,()=>r[d++]||"").replace(/[^0-9a-zA-Z]+$/,"")}return e}function U({question:e}){var h,i,c,m,I,B,T,W;const{answers:l,setAnswer:o,nextStep:r,schema:d}=z(),f=l[e.id],x=f!=null?String(f):"",w=a.useRef(null),g=d.questions[0].id===e.id,u=!d.disableAutoFocus||!g;a.useEffect(()=>{if(u){const k=setTimeout(()=>{var b;(b=w.current)==null||b.focus()},500);return()=>clearTimeout(k)}},[e.id,u]);const v=k=>{var E,L,F;let b=k.target.value;((E=e.validation)!=null&&E.maskType||(L=e.validation)!=null&&L.mask)&&(b=H(b,e.validation.maskType,e.validation.mask));const A=((F=e.validation)==null?void 0:F.maxLength)||2048;if(b.length>A&&(b=b.slice(0,A)),e.type==="number"){const M=b===""?"":parseFloat(b);o(e.id,M)}else o(e.id,b)},y=()=>{var k,b,A,E,L;if((k=e.validation)!=null&&k.required&&!x)return!1;if(x){if((b=e.validation)!=null&&b.minLength&&x.length<e.validation.minLength||e.type==="email"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(x))return!1;if((A=e.validation)!=null&&A.pattern)try{if(!new RegExp(e.validation.pattern).test(x))return!1}catch(F){console.error("Invalid regex pattern in schema",F)}if(e.type==="number"){const F=parseFloat(x);if(!isNaN(F)&&(((E=e.validation)==null?void 0:E.min)!==void 0&&F<e.validation.min||((L=e.validation)==null?void 0:L.max)!==void 0&&F>e.validation.max))return!1}}return!0},C=k=>{if(k.key==="Enter"&&!k.shiftKey){if(k.preventDefault(),!y()){const b=document.querySelector(".sawabona-form-container")||document.body;b.classList.add("shake-animation"),setTimeout(()=>b.classList.remove("shake-animation"),500);return}r()}};return t.jsxs("div",{className:"w-full relative group",children:[t.jsx("input",{ref:w,type:e.type,value:typeof x=="string"||typeof x=="number"?x:"",onChange:v,onKeyDown:C,placeholder:e.placeholder,minLength:(h=e.validation)==null?void 0:h.minLength,maxLength:((i=e.validation)==null?void 0:i.maxLength)||2048,min:(c=e.validation)==null?void 0:c.min,max:(m=e.validation)==null?void 0:m.max,pattern:(I=e.validation)==null?void 0:I.pattern,className:`
|
|
2
2
|
w-full bg-transparent border-b-2 border-sw-text-secondary/20
|
|
3
3
|
py-4 text-2xl md:text-3xl font-medium outline-none transition-colors
|
|
4
4
|
placeholder:text-sw-text-secondary/30
|
|
5
5
|
focus:border-sw-primary
|
|
6
6
|
font-sw-heading
|
|
7
|
-
|
|
7
|
+
`,style:n(n({},((B=d.theme)==null?void 0:B.labelFont)&&{fontFamily:"var(--font-sw-label)"}),((T=d.theme)==null?void 0:T.labelFontSize)&&{fontSize:"var(--size-sw-label)"})}),void 0,t.jsx("p",{className:"text-sm opacity-50 mt-4",children:(e.type==="email"||e.type==="text"||e.type==="number"||e.type==="url")&&(((W=d.i18n)==null?void 0:W.pressEnter)||"Press Enter to continue")})]})}function G({question:e}){var g;const{answers:l,setAnswer:o,nextStep:r,schema:d}=z(),f=l[e.id]||"",x=u=>{o(e.id,u),setTimeout(()=>r(),400)},w="ABCDEFGHIJKLMNOPQRSTUVWXYZ";return a.useEffect(()=>{const u=v=>{var S;const y=v.key.toUpperCase(),C=w.indexOf(y);C>=0&&C<(((S=e.options)==null?void 0:S.length)||0)&&x(e.options[C].value)};return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[e.options,e.id]),t.jsx("div",{className:"flex flex-col gap-3 w-full max-w-xl",style:{gap:"var(--sw-option-gap, 0.75rem)"},children:(g=e.options)==null?void 0:g.map((u,v)=>{var C,S,h,i,c,m;const y=Array.isArray(f)?f.includes(u.value):f===u.value;return t.jsxs(p.motion.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:v*.05},onClick:()=>x(u.value),className:`
|
|
8
8
|
w-full text-left p-4 rounded-lg border-2 transition-all duration-200
|
|
9
9
|
flex items-center justify-between group
|
|
10
|
-
${
|
|
11
|
-
`,children:[t.jsxs("span",{className:"text-lg font-medium flex items-center gap-3",children:[t.jsx("span",{className:`
|
|
12
|
-
w-6 h-6 rounded-full border-2 flex items-center justify-center transition-colors
|
|
13
|
-
${
|
|
14
|
-
`,children:
|
|
10
|
+
${y?"border-sw-primary bg-sw-primary/5 text-sw-primary":"border-sw-text-secondary/10 hover:border-sw-primary/50 hover:bg-sw-primary/5"}
|
|
11
|
+
`,style:n({padding:"var(--sw-option-padding, 1rem)",borderRadius:"var(--sw-option-radius, 0.5rem)",borderWidth:"var(--sw-option-border, 2px)"},y&&((C=d.theme)!=null&&C.optionActiveColor)?{borderColor:"var(--sw-option-active)"}:{}),children:[t.jsxs("span",{className:"text-lg font-medium flex items-center gap-3",style:n(n({},((S=d.theme)==null?void 0:S.labelFont)&&{fontFamily:"var(--font-sw-label)"}),((h=d.theme)==null?void 0:h.labelFontSize)&&{fontSize:"var(--size-sw-label)"}),children:[t.jsx("span",{className:`
|
|
12
|
+
flex-shrink-0 w-6 h-6 rounded-full border-2 flex items-center justify-center transition-colors
|
|
13
|
+
${y?"border-sw-primary bg-sw-primary":"border-sw-text-secondary/30 group-hover:border-sw-primary/50"}
|
|
14
|
+
`,style:n({},y&&((i=d.theme)!=null&&i.optionActiveColor)?{borderColor:"var(--sw-option-active)",backgroundColor:"var(--sw-option-active)"}:{}),children:y&&t.jsx($.Check,{size:14,className:"text-sw-background"})}),u.label]}),!((c=d.i18n)!=null&&c.hideSelectText)&&t.jsxs("span",{className:"opacity-0 group-hover:opacity-100 transition-opacity text-xs font-mono uppercase tracking-widest text-sw-text-secondary/50",children:[((m=d.i18n)==null?void 0:m.selectKey)||"Select"," ",t.jsxs("span",{className:"hidden md:inline",children:["Key ",v+1]})]})]},String(u.value))})})}function X({question:e}){var f;const{answers:l,setAnswer:o}=z(),r=l[e.id]||0,d=Math.min(((f=e.validation)==null?void 0:f.max)||5,20);return t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx("div",{className:"flex gap-4 flex-wrap",children:Array.from({length:d}).map((x,w)=>{const g=w+1,u=g<=r;return t.jsx(p.motion.button,{initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},transition:{delay:w*.05},onClick:()=>o(e.id,g),whileHover:{scale:1.2,rotate:5},whileTap:{scale:.9},className:"focus:outline-none",children:t.jsx($.Star,{className:`w-12 h-12 md:w-16 md:h-16 transition-all duration-300 ${u?"fill-yellow-400 text-yellow-400 drop-shadow-[0_0_15px_rgba(250,204,21,0.4)]":"text-zinc-600 hover:text-yellow-400/50"}`,strokeWidth:1.5})},w)})}),t.jsxs("div",{className:"flex justify-between w-full max-w-[300px] md:max-w-[400px] px-2 items-center",children:[t.jsx("span",{className:"text-sm md:text-base font-medium text-sw-text-secondary/50 uppercase tracking-wide",children:e.minLabel||"Poor"}),t.jsx(p.motion.div,{initial:{opacity:0,scale:.8},animate:{opacity:r?1:0,scale:r?1:.8},className:"font-bold text-primary text-xl",children:r?`${r} / ${d}`:""}),t.jsx("span",{className:"text-sm md:text-base font-medium text-muted-foreground uppercase tracking-wide",children:e.maxLabel||"Excellent"})]})]})}function Z({question:e}){var w,g,u,v;const{schema:l}=z(),o=l.questions.findIndex(y=>y.id===e.id)+1,r=l.questions.length,d={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5,ease:[.22,1,.36,1]}}},f=y=>y&&y.replace(/\{\{(\w+)\}\}/g,(C,S)=>{const h=x.answers[S];return h!=null?String(h):""}),x=z();return t.jsxs(p.motion.div,{className:"flex flex-col gap-8 w-full max-w-4xl mx-auto",initial:"hidden",animate:"visible",variants:{visible:{transition:{staggerChildren:.1}}},children:[t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(p.motion.div,{variants:d,className:"flex gap-4 items-baseline",children:t.jsxs("span",{className:"flex items-center gap-2 text-sm md:text-base font-medium text-sw-primary/90 bg-sw-primary/10 px-3 py-1 rounded-full border border-sw-primary/20 backdrop-blur-sm",children:[t.jsx("span",{children:o}),t.jsx("span",{className:"opacity-40 text-xs",children:"/"}),t.jsx("span",{className:"opacity-60",children:r})]})}),t.jsxs(p.motion.h2,{variants:d,className:"text-3xl md:text-4xl lg:text-5xl font-bold leading-tight tracking-tight text-pretty mt-2 font-sw-heading",style:n(n({},((w=l.theme)==null?void 0:w.titleFont)&&{fontFamily:"var(--font-sw-title)"}),((g=l.theme)==null?void 0:g.titleFontSize)&&{fontSize:"var(--size-sw-title)"}),children:[f(e.title)," ",t.jsx("span",{className:"text-sw-primary",children:"*"})]}),e.description&&t.jsx(p.motion.p,{variants:d,className:"text-lg md:text-xl text-muted-foreground font-normal leading-relaxed max-w-2xl mt-2",style:n(n({},((u=l.theme)==null?void 0:u.descriptionFont)&&{fontFamily:"var(--font-sw-description)"}),((v=l.theme)==null?void 0:v.descriptionFontSize)&&{fontSize:"var(--size-sw-description)"}),children:f(e.description)})]}),t.jsx(p.motion.div,{variants:d,className:"w-full mt-6",children:e.type==="text"||e.type==="email"||e.type==="number"||e.type==="url"?t.jsx(U,{question:e}):e.type==="select"?t.jsx(G,{question:e}):e.type==="rating"?t.jsx(X,{question:e}):t.jsxs("div",{className:"p-4 bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-200 rounded",children:["Unsupported question type: ",e.type," (ID: ",e.id,")"]})})]})}const J={next:"Next",back:"Back",submit:"Submit",required:"Required",optional:"Optional",stepInfo:"Question {{current}} of {{total}}"};function Y({schema:e,onSubmit:l}){var S;const o=V({schema:e,onSubmit:l}),r=e.theme||{backgroundColor:"#ffffff",textColor:"#000000",primaryColor:"#000000",borderRadius:"8px"},d=n(n({},J),e.i18n),f=n(n(n(n(n(n(n(n(n(n(n({backgroundColor:r.backgroundColor,color:r.textColor,fontFamily:r.fontFamily,"--color-sw-primary":r.primaryColor,"--color-sw-background":r.backgroundColor,"--color-sw-text-primary":r.primaryColor,"--color-sw-text-secondary":r.textColor,"--font-sw-heading":r.fontFamily||"inherit","--font-sw-body":r.fontFamily||"inherit"},r.titleFont&&{"--font-sw-title":r.titleFont}),r.descriptionFont&&{"--font-sw-description":r.descriptionFont}),r.labelFont&&{"--font-sw-label":r.labelFont}),r.titleFontSize&&{"--size-sw-title":r.titleFontSize}),r.descriptionFontSize&&{"--size-sw-description":r.descriptionFontSize}),r.labelFontSize&&{"--size-sw-label":r.labelFontSize}),r.optionPadding&&{"--sw-option-padding":r.optionPadding}),r.optionBorderRadius&&{"--sw-option-radius":r.optionBorderRadius}),r.optionBorderWidth&&{"--sw-option-border":r.optionBorderWidth}),r.optionGap&&{"--sw-option-gap":r.optionGap}),r.optionActiveColor&&{"--sw-option-active":r.optionActiveColor}),x=r.buttonVariant==="outline",w={backgroundColor:x?"transparent":r.primaryColor,color:x?r.primaryColor:r.textColor,border:x?`2px solid ${r.primaryColor}`:"none",borderRadius:r.borderRadius||"8px",fontWeight:600},g={color:r.primaryColor,borderRadius:r.borderRadius||"8px",fontWeight:600},{autoReload:u,reloadDelay:v=3e3}=e;if(a.useEffect(()=>{if(o.isCompleted&&u){const h=setTimeout(()=>{o.resetForm()},v);return()=>clearTimeout(h)}},[o.isCompleted,u,v,o.resetForm]),o.isCompleted)return t.jsxs("div",{className:"flex flex-col items-center justify-center h-full w-full p-8 text-center relative overflow-hidden",style:f,children:[u&&t.jsx(p.motion.div,{initial:{width:"0%"},animate:{width:"100%"},transition:{duration:v/1e3,ease:"linear"},className:"absolute top-0 left-0 h-1 bg-green-500 z-50"}),t.jsxs(p.motion.div,{initial:{scale:.9,opacity:0,y:20},animate:{scale:1,opacity:1,y:0},transition:{duration:.6,ease:[.22,1,.36,1]},className:"flex flex-col items-center",children:[t.jsx("div",{className:"mb-6 p-4 rounded-full bg-green-500/20 text-green-500 w-24 h-24 flex items-center justify-center",children:t.jsx($.Check,{size:48})}),t.jsx("h1",{className:"text-4xl md:text-5xl font-bold mb-4 tracking-tight",children:"Obrigado!"}),t.jsx("p",{className:"text-xl opacity-70 max-w-md leading-relaxed",children:"Suas respostas foram enviadas com sucesso."})]})]});const y=e.questions.find(h=>h.id===o.currentStepId),C=(e.questions.findIndex(h=>h.id===o.currentStepId)+1)/e.questions.length*100;return t.jsx(P.Provider,{value:N(n({},o),{schema:e}),children:t.jsxs("div",{className:"w-full h-full flex flex-col relative overflow-hidden transition-colors duration-700",style:f,children:[t.jsxs("div",{className:"absolute top-0 left-0 w-full h-1 z-50",children:[t.jsx("div",{className:"absolute top-0 left-0 w-full h-full bg-current opacity-10"}),t.jsx(p.motion.div,{className:"h-full relative z-10",initial:{width:0},animate:{width:`${C}%`},transition:{duration:.5,ease:"easeInOut"},style:{backgroundColor:r.primaryColor}})]}),t.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 md:p-12 w-full max-w-5xl mx-auto z-10",children:t.jsx(p.AnimatePresence,{mode:"wait",children:y&&t.jsx(p.motion.div,{initial:{opacity:0,y:40},animate:{opacity:1,y:0},exit:{opacity:0,y:-40},transition:{duration:.5,ease:[.22,1,.36,1]},className:"w-full",children:t.jsx(Z,{question:y})},y.id)})}),t.jsxs("div",{className:"w-full px-6 pt-6 pb-8 md:p-10 flex flex-col md:flex-row justify-between items-center z-20 gap-4",children:[r.showPoweredBy!==!1&&t.jsxs("a",{href:r.poweredByUrl||"#",target:r.poweredByUrl?"_blank":void 0,rel:r.poweredByUrl?"noopener noreferrer":void 0,className:"order-3 md:order-1 group flex items-center gap-2 px-3 py-1.5 rounded-md border border-white/10 bg-black/20 hover:border-sw-primary/50 hover:bg-black/40 transition-all duration-300 cursor-pointer no-underline backdrop-blur-sm",children:[t.jsx("span",{className:"text-[10px] md:text-xs font-mono font-medium tracking-[0.2em] uppercase text-muted-foreground group-hover:text-muted-foreground/80 transition-colors",children:"Powered By"}),t.jsx("span",{className:"text-[10px] md:text-xs font-mono font-bold tracking-[0.2em] uppercase transition-colors shadow-sw-primary",style:{color:r.brandColor||r.primaryColor},children:((S=r.poweredBy)==null?void 0:S.replace("Powered by ",""))||"SAWABONA TECH"})]}),t.jsxs("div",{className:"flex items-center gap-4 order-2 md:order-3 ml-auto",children:[t.jsx(p.motion.button,{onClick:o.prevStep,disabled:o.history.length===0,whileHover:{scale:1.05},whileTap:{scale:.95},className:"w-12 h-12 md:w-14 md:h-14 flex items-center justify-center disabled:opacity-0 disabled:pointer-events-none transition-all hover:bg-white/5 rounded-full",style:g,children:t.jsx($.ChevronLeft,{size:24})}),t.jsxs(p.motion.button,{onClick:o.nextStep,whileHover:{scale:1.02},whileTap:{scale:.98},className:"px-8 py-3 md:px-10 md:py-4 text-lg font-bold shadow-2xl flex items-center gap-3 transition-all rounded-lg",style:w,children:[t.jsx("span",{children:o.currentStepId===e.questions[e.questions.length-1].id?r.submitText||d.submit:d.next}),o.currentStepId!==e.questions[e.questions.length-1].id&&t.jsx($.ChevronRight,{size:20,strokeWidth:3})]})]})]})]})})}s.FormRenderer=Y,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/utils.d.ts
CHANGED
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAmD1F"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sawabona/forms",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/sawabona-forms.umd.js",
|
|
7
7
|
"module": "./dist/sawabona-forms.es.js",
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
"@tailwindcss/postcss": "^4.1.18",
|
|
42
42
|
"@tailwindcss/typography": "^0.5.19",
|
|
43
43
|
"@tailwindcss/vite": "^4.1.18",
|
|
44
|
-
"@types/node": "^
|
|
44
|
+
"@types/node": "^25.3.0",
|
|
45
45
|
"@types/react": "^19.2.7",
|
|
46
46
|
"@types/react-dom": "^19.2.3",
|
|
47
|
-
"@vitejs/plugin-react": "^5.1.
|
|
47
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
48
48
|
"autoprefixer": "^10.4.24",
|
|
49
49
|
"browserslist": "^4.28.1",
|
|
50
50
|
"class-variance-authority": "^0.7.1",
|
|
51
|
-
"eslint": "^9.
|
|
51
|
+
"eslint": "^9.17.0",
|
|
52
52
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
53
53
|
"eslint-plugin-react-refresh": "^0.4.24",
|
|
54
54
|
"globals": "^16.5.0",
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"rehype-highlight": "^7.0.2",
|
|
65
65
|
"remark-gfm": "^4.0.1",
|
|
66
66
|
"sonner": "^2.0.7",
|
|
67
|
-
"tailwindcss": "^4.
|
|
68
|
-
"typescript": "~5.
|
|
69
|
-
"typescript-eslint": "^8.
|
|
70
|
-
"vite": "^
|
|
71
|
-
"vite-plugin-dts": "^
|
|
67
|
+
"tailwindcss": "^4.0.0",
|
|
68
|
+
"typescript": "~5.7.2",
|
|
69
|
+
"typescript-eslint": "^8.18.2",
|
|
70
|
+
"vite": "^6.0.6",
|
|
71
|
+
"vite-plugin-dts": "^3.9.1"
|
|
72
72
|
},
|
|
73
73
|
"browserslist": [
|
|
74
74
|
"defaults",
|
|
@@ -78,4 +78,4 @@
|
|
|
78
78
|
"safari >= 11",
|
|
79
79
|
"edge >= 79"
|
|
80
80
|
]
|
|
81
|
-
}
|
|
81
|
+
}
|