react-luna-form 0.0.42 → 0.0.44

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.
Files changed (50) hide show
  1. package/dist/client/cjs/index.js +1 -1
  2. package/dist/client/esm/index.js +1 -1
  3. package/dist/server/cjs/index.js +1 -1
  4. package/dist/server/esm/index.js +1 -1
  5. package/dist/types/luna-react/src/client/component/field/field-preview-item.d.ts +4 -0
  6. package/dist/types/luna-react/src/client/component/field/field-preview.d.ts +4 -0
  7. package/dist/types/luna-react/src/client/component/form-content.d.ts +3 -0
  8. package/dist/types/luna-react/src/client/component/form.d.ts +3 -0
  9. package/dist/types/luna-react/src/client/component/input-base.d.ts +2 -4
  10. package/dist/types/luna-react/src/client/component/input-strategies.d.ts +15 -19
  11. package/dist/types/luna-react/src/client/component/slot/slot.d.ts +3 -0
  12. package/dist/types/luna-react/src/client/context/keep-value-context.d.ts +1 -0
  13. package/dist/types/luna-react/src/client/hook/use-input-core.d.ts +6 -7
  14. package/dist/types/luna-react/src/client/hook/use-input.d.ts +3 -1
  15. package/dist/types/luna-react/src/client/hook/use-schema.d.ts +3 -1
  16. package/dist/types/luna-react/src/client/hook/use-store.d.ts +3 -1
  17. package/dist/types/luna-react/src/client/hook/use-write-only-source.d.ts +1 -3
  18. package/dist/types/luna-react/src/client/lib/persistence-context.d.ts +4 -0
  19. package/dist/types/luna-react/src/component/collapsible.d.ts +4 -0
  20. package/dist/types/luna-react/src/component/column.d.ts +4 -0
  21. package/dist/types/luna-react/src/component/field/field-list-item.d.ts +3 -0
  22. package/dist/types/luna-react/src/component/field/field-set-base.d.ts +1 -0
  23. package/dist/types/luna-react/src/component/field/field-set.d.ts +4 -0
  24. package/dist/types/luna-react/src/component/form.d.ts +3 -0
  25. package/dist/types/luna-react/src/component/formatted-description.d.ts +2 -1
  26. package/dist/types/luna-react/src/component/legend.d.ts +2 -1
  27. package/dist/types/luna-react/src/component/slot/slot-base.d.ts +4 -1
  28. package/dist/types/luna-react/src/component/slot/slot-create.d.ts +4 -1
  29. package/dist/types/luna-react/src/component/slot/slot-list.d.ts +4 -1
  30. package/dist/types/luna-react/src/component/slot/slot.d.ts +3 -0
  31. package/dist/types/luna-react/src/server/component/form.d.ts +3 -0
  32. package/package.json +4 -13
  33. package/dist/timezone/cjs/index.js +0 -1
  34. package/dist/timezone/esm/chunk-6YOSEW3U.js +0 -1
  35. package/dist/timezone/esm/chunk-AJTG6FUX.js +0 -1
  36. package/dist/timezone/esm/chunk-EFQWCKYQ.js +0 -818
  37. package/dist/timezone/esm/chunk-JRS2SJNX.js +0 -818
  38. package/dist/timezone/esm/index.js +0 -1
  39. package/dist/timezone/esm/input-timezone-3TSHVJH7.js +0 -766
  40. package/dist/timezone/esm/input-timezone-D6UUK3LG.js +0 -1
  41. package/dist/timezone/esm/input-timezone-E45Y56W6.js +0 -766
  42. package/dist/timezone/esm/input-timezone-K27DM6BM.js +0 -1
  43. package/dist/timezone/esm/timezone-data-G5A3C2I7.js +0 -1
  44. package/dist/timezone/esm/timezone-data-LPD7JMNB.js +0 -412
  45. package/dist/timezone/esm/timezone-data-STGETEL3.js +0 -1
  46. package/dist/timezone/esm/timezone-data-XTIMFTET.js +0 -412
  47. package/dist/types/luna-react/src/client/component/input-registry.d.ts +0 -8
  48. package/dist/types/luna-react/src/client/component/input-timezone.d.ts +0 -2
  49. package/dist/types/luna-react/src/client/hook/use-timezone-options.d.ts +0 -7
  50. package/dist/types/luna-react/src/timezone/index.d.ts +0 -3
@@ -1 +1 @@
1
- import{jsx as In}from"react/jsx-runtime";function ce(e){let t=typeof e.children=="function"?e.children({isPending:e.isPending}):e.children;return In("div",{"data-slot":"field-control",className:"w-full",children:t})}import{Activity as nr,useCallback as rr,useState as or}from"react";import{jsx as de}from"react/jsx-runtime";function ue(e){return de("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:`size-4 transition-transform duration-200 ${e.expanded?"rotate-90":""}`,children:de("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})})}var k="input",fe="input/date",me="input/email",pe="input/number";var ge="input/time";var ye="textarea",xe="radio",be="checkbox",Y="list";var he="select",Re="select/day",Te="select/month";var Fe="select/year";var Ae="chips",Se="chips/day",Ce="chips/month",T="column",Ne="description",z="fields",Ie="label",X="value",P="options",K="email",Ee="number",ve="password",Le="tel",F="text",ke="aria-errormessage",Pe="aria-invalid",De="data-invalid",we="data-readonly",Oe="aria",Me="data",_e="max",Ve="maxLength",He="min",Be="minLength",b="$ref";var Ge="type";function s(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function u(e){return c(e)||typeof e=="number"||En(e)}function c(e){return typeof e=="string"}function En(e){return typeof e=="boolean"}function $e(e,t=X){if(e!=null){if(Array.isArray(e)&&e.every(u)||u(e))return e;if(s(e)){let n=vn(e,t);if(u(n))return n}}}function vn(e,t){let n=f(e,t);if(u(n))return n}function f(e,t){if(!t||!s(e))return null;let n=t.split(".").filter(o=>o!=="");if(n.length===0)return null;let r=e;for(let o of n)if(s(r)&&o in r)r=r[o];else return null;return r}function Ue(e,t={description:Ne,label:Ie,value:X}){return e.map(n=>{if(s(n)){let r=f(n,t.label),o=f(n,t.value);if(u(r)&&u(o)){let i=f(n,t.description);return{label:`${r}`,value:`${o}`,...u(i)&&{description:`${i}`}}}}return n})}function Ye(e=F){let t=e.lastIndexOf("/"),n=t===-1?e:e.slice(t+1);return n&&n!==k?n.trim().toLowerCase():F}var Ln=/\[([^\]]{1,500})\]\(([^)]{1,2000})\)/g;function W(e,t={}){if(c(e))return kn(e,t);if(Array.isArray(e))return e.map(n=>W(n,t));if(s(e)){let n={};for(let r in e)n[r]=W(e[r],t);return n}return e}function D(e,t={}){return q(e)?W(e,t):e}function q(e){return c(e)?/{([^}]{1,200})}/.test(e):Array.isArray(e)?e.some(t=>q(t)):s(e)?Object.values(e).some(t=>q(t)):!1}function kn(e,t={}){return e.replace(/{([^}]{1,200})}/g,(n,r)=>{let o=r.includes(".")?f(t,r):t[r];return u(o)?String(o):n})}function ze(e,t){if(!c(e)||!e||e.trim().length===0)return null;let n,r=0,o=!1,i=[];for(;(n=Ln.exec(e))!==null;){let[l,d,Cn]=n,L=n.index;o=!0,L>r&&i.push(e.substring(r,L));let Nn=t?t(L,Cn,d):l;i.push(Nn),r=L+l.length}return o?(r<e.length&&i.push(e.substring(r)),i):e}var Xe=e=>a(Re)(e),Ke=e=>a(Te)(e),We=e=>a(Fe)(e);var qe=e=>a(Se)(e),Ze=e=>a(Ce)(e),Je=a(fe),Z=a(ge),m=a(be),J=a(Ae),y=a(xe),Qe=a(k),p=a(he),je=a(ye),et=a(F,K,ve,Le),ao=a(me,K),tt=a(pe,Ee);function nt(e){return y(e)||m(e)}function rt(e){return e.type===Y}function h(e){return e.type===T}function w(e){return e.type!==T&&e.type!==Y}function Q(e){return p(e)||y(e)}function A(e){return e!=null&&e!==""}function a(...e){return t=>{let n=c(t.type)?t.type:void 0;return n?e.some(r=>n===r||n?.startsWith(`${r}/`)):!1}}function ot(e,t={}){if(p(e)&&e.disabled){let n=e.name?t?.[e.name]:void 0;if(n&&s(n))return[n]}}function it(e){return y(e)||m(e)?!0:e.advanced?.horizontal??!1}function lt(e){return m(e)?e.advanced?.reverse!==!1:!1}function at(e,t){let n=e.readonly??!1;return t||n}function st(e){if(y(e)||p(e)&&!e.disabled){let t=e.source;if(Array.isArray(t)||s(t)&&!(b in t))return t}}import{isValid as ct,parse as dt,format as ut}from"date-fns";var Pn=/^\d+$/,ft=new Date(2e3,0,1);function j(){return Array.from({length:12},(e,t)=>({value:(t+1).toString(),label:new Date(0,t).toLocaleString("default",{month:"long"})}))}function ee(){return Array.from({length:7},(e,t)=>({value:t.toString(),label:new Date(2e3,0,2+t).toLocaleString("default",{weekday:"long"})}))}function mt(e,t){return t>=e?Array.from({length:t-e+1},(n,r)=>{let o=e+r;return{value:o.toString(),label:o.toString()}}):[]}function te(){return new Date().getFullYear()}function ne(e,t){if(typeof e=="number")return e;let n=t??te(),r=e.trim().toLowerCase();if(r.startsWith("current")){let o=r.match(/^current([+-])(\d+)$/);if(o){let[,i,l]=o,d=parseInt(l,10);if(!isNaN(d))return i==="+"?n+d:n-d}return n}return Pn.test(r)?parseInt(r,10):n}function pt(e,t){if(!e)return"";try{let n=dt(e,t,ft);return ct(n)?ut(n,"yyyy-MM-dd"):""}catch{return""}}function gt(e,t){if(!e)return"";try{let n=dt(e,t,ft);return ct(n)?ut(n,"HH:mm:ss"):""}catch{return""}}function re(e){return e.advanced?.format??"HH:mm"}function yt(e){return e.advanced?.format??"MMMM d, yyyy"}var O=te();function Dn(e){if(J(e))return wn(e)}function wn(e){if(qe(e))return ee();if(Ze(e))return j()}function On(e){if(p(e))return Mn(e)}function Mn(e){if(Xe(e))return ee();if(Ke(e))return j();if(We(e)){let t=e.advanced?.length?.min??O,n=e.advanced?.length?.max??O+5;return mt(ne(t,O),ne(n,O))}}function xt(e,t=!1){let n={disabled:t,id:e.name,name:e.name,placeholder:e.placeholder,required:e.required};return Qe(e)?{...n,..._n(e)}:p(e)?{...n,...bt(e,On)}:je(e)?{...n,...Hn(e)}:J(e)?{...n,...Vn(e)}:n}function _n(e){let t=Ye(e.type),n={...e,type:t};return{...Gn(e),...ht(e),...Bn(n),...et(n)?Rt(n):{},type:t}}function bt(e,t){let n=t(e);return n?{options:n}:{}}function Vn(e){let t=bt(e,Dn),n=e.advanced?.multiple??!0;return{...t,multiple:n}}function Hn(e){return{...ht(e),...Rt(e)}}function ht(e){let t=e.advanced?.autocomplete;return t?{autoComplete:t}:{}}function Bn(e){return tt(e)?$n(e):{}}function Gn(e){if(Z(e)){let t=re(e);return{step:t==="HH:mm:ss"||t==="hh:mm:ss a"?"1":"60"}}return{}}function Rt(e){return Tt(e,{min:Be,max:Ve})}function $n(e){return Tt(e,{min:He,max:_e})}function Tt(e,t){let n={},r=e.advanced?.length;return r&&(r.min!==void 0&&(n[t.min]=r.min),r.max!==void 0&&(n[t.max]=r.max)),n}function Ft(e,t){let n=st(e);return n||ot(e,t)}function Un(e,t){let n=s(t)&&e.name in t?t[e.name]:t,r=$e(n,e.advanced?.entity);return Z(e)&&A(r)?Yn(e,r):Je(e)&&A(r)?Wn(e,r):r}function Yn(e,t){let n=re(e);return c(t)?gt(t,n):t}function zn(e,t,n){return Q(e)&&Array.isArray(n)?{...t,[P]:n}:t}function Xn(e,t,n){if(e.required&&!A(n)&&p(e)&&e.advanced?.preselected!==!1&&P in t){let r=t[P];if(Array.isArray(r)&&r.length===1)return r[0]}return n}function Kn(e,t){return Q(e)&&Array.isArray(t)?Ue(t,e.advanced?.options):t}function At(e,t,n,r){let o=Un(e,r),i=Array.isArray(n)?Kn(e,n):n,l=zn(e,t,i),d=Xn(e,l,o);return{commonPropsWithOptions:l,defaultValue:d}}function St(e,t){return m(e)?{defaultChecked:A(t)}:{defaultValue:t}}function Wn(e,t){let n=yt(e);return c(t)?pt(t,n):t}var qn=/^#\/definition\//;function _(e=[],t){let n=M(e,t);return Array.isArray(n)?n.filter(Jn).sort((r,o)=>Ct(r)-Ct(o)):[]}function M(e,t,n=new Map,r=new WeakSet){if(!Zn(t)||!e||typeof e!="object")return e;if(n.has(e))return n.get(e);if(r.has(e))return e;if(r.add(e),Array.isArray(e))return e.map(i=>M(i,t,n,r));if(b in e&&c(e[b])){let i=e[b].replace(qn,""),l=f(t,i);return l!==null?M(l,t,n,r):e}let o={};for(let[i,l]of Object.entries(e))o[i]=M(l,t,n,r);return r.delete(e),n.set(e,o),o}function Nt(e){return Object.entries(e??{})}function Ct(e){return e.order??Number.MAX_VALUE}function Zn(e){return e!==void 0&&s(e)&&Object.keys(e).length>0}function Jn(e){return Ge in e?!0:Array.isArray(e[z])?e[z].length>0:!0}function It(e,t){let n={};for(let[r,o]of Nt(t))n[`${e}-${r}`]=o;return n}function Qn(e){return It(Oe,e)}function jn(e){return It(Me,e)}function Et(e,t){let n=Qn(e.advanced?.aria);return t&&t.length>0&&(n[Pe]="true",n[ke]=`${e.name}-error`),n}function vt(e){return jn(e.advanced?.data)}var Lt={1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3"},kt={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3"};function Pt(e,t=2){return Lt[e&&e in Lt?e:t]}function Dt(e){if(e&&e in kt)return kt[e]}function er(e,t){let n=e.advanced?.length?.min??1;if(t){let r=f(t,e.name);if(Array.isArray(r))return Math.max(r.length,n)}return Math.max(n,0)}function wt(e){return!Array.isArray(e.fields)||e.fields.length===0?!1:e.fields.length>1||e.fields[0].type===T}function Ot(e,t){let n=er(e,t);return Array.from({length:n},(r,o)=>o)}function Mt(e){return e.label??e.name}function R(e,t){return e?t?t[e]??e:e:""}function V(e,t){return{...e,...t}}import{jsx as tr}from"react/jsx-runtime";function g(e){return ze(e,(t,n,r)=>tr("a",{className:"underline",href:n,rel:"noopener noreferrer",target:"_blank",children:r},`${n}-${t}`))}import{jsx as S,jsxs as oe}from"react/jsx-runtime";function _t(e){let{fields:t=[]}=e.section,[n,r]=or(!1),o=rr(()=>r(i=>!i),[]);return oe("fieldset",{"data-slot":"field-set","data-advanced":"true","data-expanded":n,"data-empty":t.length===0,className:"flex flex-col",id:e.section.id?.toString(),children:[S("legend",{children:oe("button",{className:"flex cursor-pointer items-center gap-2 text-base font-medium text-slate-600 dark:text-slate-400",onClick:o,type:"button",children:[S(ue,{expanded:n}),S("span",{children:g(e.section.title)})]})}),S(nr,{mode:n?"visible":"hidden",children:oe("div",{className:"mt-3 ml-1.5 flex flex-col gap-4 border-l-2 border-slate-300 pl-4 dark:border-slate-600","data-slot":"field-set-content",children:[e.section.description&&S("p",{className:"text-sm leading-normal font-normal text-slate-600 dark:text-slate-400",children:g(e.section.description)}),e.group]})})]})}import{Fragment as ir,jsx as Vt,jsxs as lr}from"react/jsx-runtime";function Ht(e){return lr(ir,{children:[e.title&&Vt("legend",{className:"mb-3 font-medium text-slate-800 dark:text-slate-200",children:g(e.title)}),e.description&&Vt("p",{className:"-mt-2 text-sm leading-normal font-normal text-slate-600 dark:text-slate-400",children:g(e.description)})]})}import{jsx as ar,jsxs as sr}from"react/jsx-runtime";function H(e){return sr("fieldset",{"data-slot":"field-set","data-empty":e.empty,className:"flex flex-col data-[empty=false]:gap-6",id:e.id,children:[ar(Ht,{description:e.description,title:e.title}),e.children]})}import{jsx as cr}from"react/jsx-runtime";function x(e){return cr("div",{"data-slot":"field-group","data-compact":e.compact,className:"flex w-full flex-col gap-8 data-[compact=true]:gap-3",children:e.children})}import{jsx as ie}from"react/jsx-runtime";function Bt(e){let{fields:t=[]}=e.section,{compact:n}=V(e.style,{compact:e.section.compact}),r=ie(x,{compact:n,children:e.children});return!e.section.title&&!e.section.description?r:e.section.advanced?ie(_t,{section:e.section,group:r}):ie(H,{description:e.section.description,empty:t.length===0,id:e.section.id?.toString(),title:e.section.title,children:r})}import{useAtomValue as yr}from"jotai";import{atom as C}from"jotai";import{atomFamily as dr}from"jotai-family";import{deepEqual as Gt}from"fast-equals";function ur(e,t){let{[t]:n,...r}=e;return r}function fr(e){return dr(t=>C(n=>n(e)[t]??void 0,(n,r,o)=>{let i=n(e);if(o!=null){let l=i[t];Gt(l,o)||r(e,{...i,[t]:o})}else t in i&&r(e,ur(i,t))}))}function mr(e){return C(null,(t,n)=>{let r=t(e);r&&Object.keys(r).length>0&&n(e,{})})}function pr(e){return C(null,(t,n,r)=>{let i={...t(e)},l=!1;for(let d of r)d in i&&(delete i[d],l=!0);l&&n(e,i)})}function gr(e){return C(null,(t,n,r)=>{let o=t(e);Gt(o,r)||n(e,r)})}function $t(e={}){let t=C(e);return{atom:t,clearAll:mr(t),clear:pr(t),bulkReport:gr(t),report:fr(t)}}var Ut=$t(),Yt=Ut.atom,di=Ut.report;function xr(e,t){return e.fields.every(n=>zt(n,t))}function zt(e,t){return t[e.name]?.hidden??e.hidden??!1}function br(e,t){return h(e)?xr(e,t):zt(e,t)}function Xt(e){let t=yr(Yt);return e.container&&(t[e.container.name]?.hidden??e.container.hidden??!1)||e.fields.length===0||e.fields.every(r=>br(r,t))?null:e.children}import{jsx as Kt}from"react/jsx-runtime";function Wt(){return Kt("div",{"data-slot":"field-separator",className:"relative -my-2 h-5 text-sm",children:Kt("div",{className:"absolute inset-0 top-1/2 h-px w-full bg-slate-200 dark:bg-slate-800"})})}import{jsx as N,jsxs as qt}from"react/jsx-runtime";function Zt(e){let t=_(e.sections,e.definition);return N("div",{className:"h-full w-full",children:N("form",{noValidate:e.noValidate,action:e.action,children:qt(x,{children:[t.map((n,r)=>qt(Xt,{fields:n.fields??[],children:[N(Bt,{section:n,style:e.config.style,children:e.children({disabled:e.readOnly,fields:n.fields})}),n.separator&&N(Wt,{})]},r)),e.control&&N(ce,{isPending:e.isPending,children:e.control})]})})})}import{jsx as hr}from"react/jsx-runtime";function B(e){return hr("p",{className:"-mt-2 text-xs leading-normal font-normal text-slate-600 dark:text-slate-400",children:e.children})}import{jsx as Rr}from"react/jsx-runtime";function G(e){let t={context:e.context,env:e.config?.env},n=R(D(e.text,t),e.translations),r=g(n);return r?Rr(B,{children:r}):null}import{twMerge as Tr}from"tailwind-merge";import{jsx as Fr,jsxs as Ar}from"react/jsx-runtime";function Jt(e){let t=e.style?.showOptionalLabel??!0,n=y(e.field)||m(e.field);return Ar("label",{"data-slot":"field-label","data-normal":n,className:Tr("flex w-fit items-center gap-2 text-sm leading-snug font-medium select-none","data-[normal=true]:font-normal","group-data-[readonly=true]:cursor-not-allowed group-data-[readonly=true]:opacity-50"),htmlFor:e.field.name,children:[e.children,t&&!e.field.required&&Fr("span",{className:"text-sm text-slate-600 dark:text-slate-400",children:R("(Optional)",e.translations)})]})}import{jsx as Qt,jsxs as Sr}from"react/jsx-runtime";function jt(e){let t={context:e.context,env:e.config?.env},n=D(e.field.label,t);return Sr("div",{"data-slot":"field-content",className:"flex w-full flex-1 flex-col gap-1.5 leading-snug",children:[Qt(Jt,{field:e.field,style:e.config?.style,translations:e.translations,children:R(n,e.translations)}),e.horizontal===!0&&Qt(G,{config:e.config,context:e.context,text:e.field.description,translations:e.translations})]})}import{Fragment as Cr,jsx as en,jsxs as Nr}from"react/jsx-runtime";function tn(e){return Nr(Cr,{children:[e.field.name&&e.field.label&&en(jt,{config:e.config,context:e.context,field:e.field,horizontal:e.horizontal,translations:e.translations}),e.children,e.horizontal===!1&&en(G,{config:e.config,context:e.context,text:e.field.description,translations:e.translations})]})}function nn(e,t){return e?t(e):null}import{jsx as rn}from"react/jsx-runtime";function on(e){let t=Ft(e.field,e.value),{commonPropsWithOptions:n,defaultValue:r}=At(e.field,e.commonProps,t,e.value),o=St(e.field,r);return nn(e.config.inputs[e.field.type],i=>rn(tn,{config:e.config,context:e.context,field:e.field,horizontal:e.horizontal,translations:e.translations,children:rn(i,{...e.ariaAttributes,...n,...e.dataAttributes,...o})}))}import{jsx as ln}from"react/jsx-runtime";function an(e){return!e.errors||e.errors.length===0?null:ln("ul",{className:"text-sm text-red-600 dark:text-red-500",id:e.name?`${e.name}-error`:void 0,children:e.errors?.map((t,n)=>ln("li",{children:t},e.name?`${e.name}-error-${n}`:n))})}import{twMerge as Ir}from"tailwind-merge";import{jsx as Er}from"react/jsx-runtime";function $(e){let t=e.errors&&e.errors.length>0;return Er("div",{"data-slot":"field","data-clickable":e.isClickable?"true":"false",...t&&{[De]:"true"},...e.disabled&&{[we]:"true"},"data-orientation":e.orientation,className:Ir("group flex w-full flex-col items-center data-[invalid=true]:text-red-600 data-[invalid=true]:dark:text-red-500","data-[clickable=true]:items-start",e.isCheckbox&&(e.isReversed?"flex-row-reverse!":"flex-row!"),"data-[clickable=true]:has-[>[data-slot=field-content]]:[&>:first-child]:mt-px",e.className),children:e.children})}import{twMerge as vr}from"tailwind-merge";import{jsx as Lr}from"react/jsx-runtime";function sn(e){return Lr($,{...e,orientation:"vertical",className:vr("gap-3 has-[>[data-slot=field-content]]:items-start",!e.isClickable&&"[&>*]:w-full"),children:e.children})}import{twMerge as kr}from"tailwind-merge";import{jsx as Pr}from"react/jsx-runtime";function cn(e){return Pr($,{...e,orientation:"horizontal",className:kr("gap-2 md:flex-row md:gap-4","[&>[data-slot=field-content]]:min-w-0 [&>[data-slot=field-content]]:flex-grow [&>[data-slot=field-content]]:self-start","[&_[role=checkbox]]:mt-[1.5px]",e.isClickable&&"md:flex-col",!e.isClickable&&["md:justify-between","[&>*:not([data-slot=field-content])]:w-full","[&>*:not([data-slot=field-content])]:md:w-1/2","[&>*:not([data-slot=field-content])]:xl:w-2/5"]),children:e.children})}import{jsx as dn}from"react/jsx-runtime";function un(e){let t=nt(e.field),n=m(e.field),r=lt(e.field);return e.horizontal?dn(cn,{disabled:e.disabled,errors:e.errors,isCheckbox:n,isReversed:r,isClickable:t,children:e.children}):dn(sn,{disabled:e.disabled,errors:e.errors,isCheckbox:n,isReversed:r,isClickable:t,children:e.children})}function fn(e){if(!e.field.type)return null;let t=xt(e.field,e.disabled),n=vt(e.field),r=Et(e.field,e.errors),o={...e.field,disabled:t.disabled};return e.children({ariaAttributes:r,commonProps:t,dataAttributes:n,field:o,horizontal:e.horizontal})}import{twMerge as Dr}from"tailwind-merge";import{jsx as le,jsxs as wr}from"react/jsx-runtime";function mn(e){let t=e.field.advanced?.cols,n=e.field.name?e.errors?.[e.field.name]:void 0,{horizontal:r}=V(e.style,{horizontal:it(e.field)}),o=at(e.field,e.disabled);return wr("div",{className:Dr("flex flex-col gap-3",Dt(t)),children:[le(un,{disabled:o,errors:n,field:e.field,horizontal:r,children:le(fn,{disabled:o,errors:n,field:e.field,horizontal:r,children:e.children})}),le(an,{errors:n,name:e.field.name})]})}import{twMerge as Or}from"tailwind-merge";import{jsx as I,jsxs as U}from"react/jsx-runtime";function pn(e){function t(){e.canRemove&&e.onRemove&&e.onRemove(e.index)}let n=e.canRemove&&e.onRemove!=null&&I("button",{"aria-label":`Remove ${e.label} item ${e.index+1}`,className:Or("rounded p-1 text-xl text-slate-400","transition-colors duration-150","hover:text-red-500","focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:outline-none","dark:text-slate-500 dark:hover:text-red-400"),onClick:t,type:"button",children:I("span",{"aria-hidden":"true",children:"\xD7"})});return e.isMultiField?U("div",{className:"rounded-lg border border-slate-100 p-4 dark:border-slate-900",children:[U("div",{className:"mb-3 flex items-center justify-between",children:[U("span",{className:"text-sm font-medium text-slate-400 dark:text-slate-500",children:[e.label," ",e.index+1]}),n]}),I(x,{children:e.children})]}):U("div",{className:"flex items-start gap-2",children:[I(x,{children:e.children}),n&&I("div",{className:"shrink-0",children:n})]})}import{jsx as Mr}from"react/jsx-runtime";function gn(e){let t=Mt(e.field),n=wt(e.field);return Ot(e.field,e.value).map(r=>Mr(pn,{index:r,isMultiField:n,label:t,children:e.children(r)},r))}import{jsx as _r}from"react/jsx-runtime";function yn(e){let t=Array.isArray(e.field.fields)&&e.field.fields.length===0;return _r(H,{description:e.field.description,empty:t,id:e.field.name,title:e.field.label,children:e.children})}import{jsx as xn}from"react/jsx-runtime";function bn({children:e,field:t,value:n}){return xn(yn,{field:t,children:xn(gn,{field:t,value:n,children:e})})}import{twMerge as Vr}from"tailwind-merge";import{jsx as hn,jsxs as Hr}from"react/jsx-runtime";function Rn(e){let t=Pt(e.column?.advanced?.cols);return Hr("div",{className:"flex w-full flex-col gap-4",children:[hn("div",{className:Vr("grid grid-cols-1 gap-3 sm:gap-4",t),children:e.children}),e.column?.description&&hn(B,{children:e.column.description})]})}import{Fragment as Gr}from"react";import{jsx as Br}from"react/jsx-runtime";function Tn(e){let t=Array.isArray(e.field.fields)?e.field.fields.map(n=>w(n)?{...n,name:`${e.field.name}.${e.index}.${n.name}`}:h(n)?{...n,fields:n.fields.map(r=>({...r,name:`${e.field.name}.${e.index}.${r.name}`}))}:n):[];return Br(E,{children:e.children,components:e.components,disabled:e.disabled,fields:t,style:e.style,value:e.value})}import{jsx as v,jsxs as $r}from"react/jsx-runtime";function E(e){let{field:t,list:n}=e.components;return _(e.fields).map((r,o)=>$r(Gr,{children:[h(r)&&v(Rn,{column:r,children:v(E,{...e,fields:r.fields})}),w(r)&&v(t,{disabled:e.disabled,field:r,style:e.style,children:e.children}),rt(r)&&v(n,{field:r,value:e.value,children:i=>v(Tn,{children:e.children,components:e.components,disabled:e.disabled,field:r,index:i,style:e.style,value:e.value})})]},o))}import{jsx as Ur}from"react/jsx-runtime";function Fn(e){return n=>Ur(E,{...n,components:e})}var An=Fn({field:mn,list:bn});import{jsx as ae}from"react/jsx-runtime";function se(e){let t=e.translations?.[e.lang??""];return ae(Zt,{config:e.config,control:e.children,definition:e.definition,readOnly:e.readOnly,sections:e.sections,children:({disabled:n,fields:r})=>ae(An,{disabled:n,fields:r,style:e.config.style,children:o=>ae(on,{...o,config:e.config,context:e.context,translations:t,value:e.value})})})}import{Suspense as Yr}from"react";import{jsx as Sn}from"react/jsx-runtime";function zr(e){return Sn(Yr,{fallback:Sn(se,{config:e.config,sections:e.sections,readOnly:!0}),children:e.children})}export{zr as Fallback,se as Form};
1
+ import{jsx as Un}from"react/jsx-runtime";function ye(e){let t=typeof e.children=="function"?e.children({isPending:e.isPending}):e.children;return Un("div",{"data-slot":"field-control",className:"w-full",children:t})}import{jsx as be}from"react/jsx-runtime";function T(e){return be("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:`size-4 transition-transform duration-200 ${e.expanded?"rotate-90":""}`,children:be("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"})})}import{Activity as Xn}from"react";import{createContext as Yn}from"react";var Te=Yn(!1);import{jsx as he}from"react/jsx-runtime";function v({children:e,visible:t}){return he(Xn,{mode:t?"visible":"hidden",children:he(Te,{value:!0,children:e})})}var V="input",Re="input/date",Ce="input/email",Fe="input/number";var Ne="input/time";var Se="textarea",Ae="radio",ve="checkbox",q="list";var Ie="select",ke="select/day",Ee="select/month",Le="select/timezone",we="select/year";var Pe="chips",De="chips/day",Oe="chips/month",I="column",Me="description",J="fields",_e="label",Q="value",H="options",j="email",Ve="number",He="password",ze="tel",k="text",$e="aria-errormessage",Ge="aria-invalid",Be="data-invalid",Ue="data-readonly",Ye="aria",Xe="data",Ke="max",Ze="maxLength",We="min",qe="minLength",F="$ref";var Je="type",Qe={Africa:"Africa",America:"Americas",Asia:"Asia / Pacific",Atlantic:"Atlantic",Australia:"Asia / Pacific",Europe:"Europe",Indian:"Asia / Pacific",Pacific:"Asia / Pacific"};function a(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function g(e){return d(e)||typeof e=="number"||Kn(e)}function d(e){return typeof e=="string"}function Kn(e){return typeof e=="boolean"}function je(e,t=Q){if(e!=null){if(Array.isArray(e)&&e.every(g)||g(e))return e;if(a(e)){let n=Zn(e,t);if(g(n))return n}}}function Zn(e,t){let n=p(e,t);if(g(n))return n}function p(e,t){if(!t||!a(e))return null;let n=t.split(".").filter(r=>r!=="");if(n.length===0)return null;let o=e;for(let r of n)if(a(o)&&r in o)o=o[r];else return null;return o}function et(e,t={description:Me,label:_e,value:Q}){return e.map(n=>{if(a(n)){let o=p(n,t.label),r=p(n,t.value);if(g(o)&&g(r)){let i=p(n,t.description);return{label:`${o}`,value:`${r}`,...g(i)&&{description:`${i}`}}}}return n})}function tt(e=k){let t=e.lastIndexOf("/"),n=t===-1?e:e.slice(t+1);return n&&n!==V?n.trim().toLowerCase():k}var Wn=/\[([^\]]{1,500})\]\(([^)]{1,2000})\)/g;function ee(e,t={}){if(d(e))return qn(e,t);if(Array.isArray(e))return e.map(n=>ee(n,t));if(a(e)){let n={};for(let o in e)n[o]=ee(e[o],t);return n}return e}function E(e,t={}){return te(e)?ee(e,t):e}function te(e){return d(e)?/{([^}]{1,200})}/.test(e):Array.isArray(e)?e.some(t=>te(t)):a(e)?Object.values(e).some(t=>te(t)):!1}function qn(e,t={}){return e.replace(/{([^}]{1,200})}/g,(n,o)=>{let r=o.includes(".")?p(t,o):t[o];return g(r)?String(r):n})}function nt(e,t){if(!d(e)||!e||e.trim().length===0)return null;let n,o=0,r=!1,i=[];for(;(n=Wn.exec(e))!==null;){let[l,c,u]=n,m=n.index;r=!0,m>o&&i.push(e.substring(o,m));let A=t?t(m,u,c):l;i.push(A),o=m+l.length}return r?(o<e.length&&i.push(e.substring(o)),i):e}var ot=e=>s(ke)(e),rt=e=>s(Ee)(e),it=e=>s(we)(e),lt=e=>s(Le)(e),at=e=>s(De)(e),st=e=>s(Oe)(e),ct=s(Re),ne=s(Ne),x=s(ve),oe=s(Pe),h=s(Ae),dt=s(V),b=s(Ie),ut=s(Se),ft=s(k,j,He,ze),Pr=s(Ce,j),mt=s(Fe,Ve);function gt(e){return h(e)||x(e)}function pt(e){return e.type===q}function N(e){return e.type===I}function z(e){return e.type!==I&&e.type!==q}function re(e){return b(e)||h(e)}function L(e){return e!=null&&e!==""}function s(...e){return t=>{let n=d(t.type)?t.type:void 0;return n?e.some(o=>n===o||n?.startsWith(`${o}/`)):!1}}function xt(e,t={}){if(b(e)&&e.disabled){let n=e.name?t?.[e.name]:void 0;if(n&&a(n))return[n]}}function yt(e){return h(e)||x(e)?!0:e.advanced?.horizontal??!1}function bt(e){return x(e)?e.advanced?.reverse!==!1:!1}function Tt(e,t){let n=e.readonly??!1;return t||n}function ht(e){if(h(e)||b(e)&&!e.disabled){let t=e.source;if(Array.isArray(t)||a(t)&&!(F in t))return t}}import{isValid as Ft,parse as Nt,format as St}from"date-fns";var Jn=/^\d+$/,At=new Date(2e3,0,1),Qn=()=>"supportedValuesOf"in Intl?Intl.supportedValuesOf("timeZone"):[];function ie(){return Array.from({length:12},(e,t)=>({value:(t+1).toString(),label:new Date(0,t).toLocaleString("default",{month:"long"})}))}function le(){return Array.from({length:7},(e,t)=>({value:t.toString(),label:new Date(2e3,0,2+t).toLocaleString("default",{weekday:"long"})}))}function vt(e,t){return t>=e?Array.from({length:t-e+1},(n,o)=>{let r=e+o;return{value:r.toString(),label:r.toString()}}):[]}function ae(){return new Date().getFullYear()}function jn(){return Intl.DateTimeFormat().resolvedOptions().timeZone}function eo(e){let t=e.indexOf("/"),n=t===-1?e:e.slice(0,t);return Qe[n]??"Other"}function to(e,t){return(e.find(o=>o.type==="timeZoneName")?.value??t).replace(/\s+(?:Standard|Daylight(?: Saving)?|Summer|Winter)\s+Time$/,"")}function Rt(e,t){let n=new Intl.DateTimeFormat("en",{timeZone:e,timeZoneName:"longOffset"}).formatToParts(t),o=new Intl.DateTimeFormat("en",{timeZone:e,timeZoneName:"long"}).formatToParts(t),i=(n.find(c=>c.type==="timeZoneName")?.value??"GMT+00:00").replace("GMT","UTC"),l=to(o,e);return{offset:i,longName:l}}function Ct(e){return e.slice(e.lastIndexOf("/")+1).replace(/_/g," ")}function It(){let e=new Date,t=jn(),n=new Map,o=Ct(t),{offset:r,longName:i}=Rt(t,e),l={value:t,label:`${o} - ${i} (${r})`};for(let u of Qn()){if(u===t)continue;let m=Ct(u),{offset:A,longName:Bn}=Rt(u,e),pe={value:u,label:`${m} - ${Bn} (${A})`},W=eo(u);if(W==="Other")continue;let xe=n.get(W);xe?xe.push(pe):n.set(W,[pe])}for(let u of n.values())u.sort((m,A)=>m.label.localeCompare(A.label));let c=Array.from(n.entries()).sort(([u],[m])=>u.localeCompare(m)).map(([u,m])=>({label:u,items:m}));return[{label:"Suggested",items:[l]},...c]}function se(e,t){if(typeof e=="number")return e;let n=t??ae(),o=e.trim().toLowerCase();if(o.startsWith("current")){let r=o.match(/^current([+-])(\d+)$/);if(r){let[,i,l]=r,c=parseInt(l,10);if(!isNaN(c))return i==="+"?n+c:n-c}return n}return Jn.test(o)?parseInt(o,10):n}function kt(e,t){if(!e)return"";try{let n=Nt(e,t,At);return Ft(n)?St(n,"yyyy-MM-dd"):""}catch{return""}}function Et(e,t){if(!e)return"";try{let n=Nt(e,t,At);return Ft(n)?St(n,"HH:mm:ss"):""}catch{return""}}function ce(e){return e.advanced?.format??"HH:mm"}function Lt(e){return e.advanced?.format??"MMMM d, yyyy"}var $=ae();function no(e){if(oe(e))return oo(e)}function oo(e){if(at(e))return le();if(st(e))return ie()}function ro(e){if(b(e))return io(e)}function io(e){if(ot(e))return le();if(rt(e))return ie();if(it(e)){let t=e.advanced?.length?.min??$,n=e.advanced?.length?.max??$+5;return vt(se(t,$),se(n,$))}if(lt(e))return It()}function wt(e,t=!1){let n={disabled:t,id:e.name,name:e.name,placeholder:e.placeholder,required:e.required};return dt(e)?{...n,...lo(e)}:b(e)?{...n,...Pt(e,ro)}:ut(e)?{...n,...so(e)}:oe(e)?{...n,...ao(e)}:n}function lo(e){let t=tt(e.type),n={...e,type:t};return{...uo(e),...Dt(e),...co(n),...ft(n)?Ot(n):{},type:t}}function Pt(e,t){let n=t(e);return n?{options:n}:{}}function ao(e){let t=Pt(e,no),n=e.advanced?.multiple??!0;return{...t,multiple:n}}function so(e){return{...Dt(e),...Ot(e)}}function Dt(e){let t=e.advanced?.autocomplete;return t?{autoComplete:t}:{}}function co(e){return mt(e)?fo(e):{}}function uo(e){if(ne(e)){let t=ce(e);return{step:t==="HH:mm:ss"||t==="hh:mm:ss a"?"1":"60"}}return{}}function Ot(e){return Mt(e,{min:qe,max:Ze})}function fo(e){return Mt(e,{min:We,max:Ke})}function Mt(e,t){let n={},o=e.advanced?.length;return o&&(o.min!==void 0&&(n[t.min]=o.min),o.max!==void 0&&(n[t.max]=o.max)),n}function _t(e,t){let n=ht(e);return n||xt(e,t)}function mo(e,t){let n=a(t)&&e.name in t?t[e.name]:t,o=je(n,e.advanced?.entity);return ne(e)&&L(o)?go(e,o):ct(e)&&L(o)?bo(e,o):o}function go(e,t){let n=ce(e);return d(t)?Et(t,n):t}function po(e,t,n){return re(e)&&Array.isArray(n)?{...t,[H]:n}:t}function xo(e,t,n){if(e.required&&!L(n)&&b(e)&&e.advanced?.preselected!==!1&&H in t){let o=t[H];if(Array.isArray(o)&&o.length===1)return o[0]}return n}function yo(e,t){return re(e)&&Array.isArray(t)?et(t,e.advanced?.options):t}function Vt(e,t,n,o){let r=mo(e,o),i=Array.isArray(n)?yo(e,n):n,l=po(e,t,i),c=xo(e,l,r);return{commonPropsWithOptions:l,defaultValue:c}}function Ht(e,t){return x(e)?{defaultChecked:L(t)}:{defaultValue:t}}function bo(e,t){let n=Lt(e);return d(t)?kt(t,n):t}var To=/^#\/definition\//;function B(e=[],t){let n=G(e,t);return Array.isArray(n)?n.filter(Ro).sort((o,r)=>zt(o)-zt(r)):[]}function G(e,t,n=new Map,o=new WeakSet){if(!ho(t)||!e||typeof e!="object")return e;if(n.has(e))return n.get(e);if(o.has(e))return e;if(o.add(e),Array.isArray(e))return e.map(i=>G(i,t,n,o));if(F in e&&d(e[F])){let i=e[F].replace(To,""),l=p(t,i);return l!==null?G(l,t,n,o):e}let r={};for(let[i,l]of Object.entries(e))r[i]=G(l,t,n,o);return o.delete(e),n.set(e,r),r}function $t(e){return Object.entries(e??{})}function zt(e){return e.order??Number.MAX_VALUE}function ho(e){return e!==void 0&&a(e)&&Object.keys(e).length>0}function Ro(e){return Je in e?!0:Array.isArray(e[J])?e[J].length>0:!0}function Gt(e,t){let n={};for(let[o,r]of $t(t))n[`${e}-${o}`]=r;return n}function Co(e){return Gt(Ye,e)}function Fo(e){return Gt(Xe,e)}function Bt(e,t){let n=Co(e.advanced?.aria);return t&&t.length>0&&(n[Ge]="true",n[$e]=`${e.name}-error`),n}function Ut(e){return Fo(e.advanced?.data)}var Yt={1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3"},Xt={1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3"};function Kt(e,t=2){return Yt[e&&e in Yt?e:t]}function Zt(e){if(e&&e in Xt)return Xt[e]}function No(e,t){let n=e.advanced?.length?.min??1;if(t){let o=p(t,e.name);if(Array.isArray(o))return Math.max(o.length,n)}return Math.max(n,0)}function Wt(e){return!Array.isArray(e.fields)||e.fields.length===0?!1:e.fields.length>1||e.fields[0].type===I}function qt(e,t){let n=No(e,t);return Array.from({length:n},(o,r)=>r)}function Jt(e){return e.label??e.name}function R(e,t){return e?t?t[e]??e:e:""}function U(e,t){return{...e,...t}}import{jsx as So}from"react/jsx-runtime";function y(e){return nt(e,(t,n,o)=>So("a",{className:"underline",href:n,rel:"noopener noreferrer",target:"_blank",children:o},`${n}-${t}`))}import{useCallback as Ao,useState as vo}from"react";import{jsx as w,jsxs as de}from"react/jsx-runtime";function Qt(e){let{fields:t=[]}=e.section,[n,o]=vo(!1),r=Ao(()=>o(i=>!i),[]);return de("fieldset",{"data-slot":"field-set","data-advanced":"true","data-expanded":n,"data-empty":t.length===0,className:"flex flex-col",id:e.section.id?.toString(),children:[w("legend",{children:de("button",{className:"flex cursor-pointer items-center gap-2 text-base font-medium text-slate-600 dark:text-slate-400",onClick:r,type:"button",children:[w(T,{expanded:n}),w("span",{children:y(e.section.title)})]})}),w(v,{visible:n,children:de("div",{className:"mt-3 ml-1.5 flex flex-col gap-4 border-l-2 border-slate-300 pl-4 dark:border-slate-600","data-slot":"field-set-content",children:[e.section.description&&w("p",{className:"text-sm leading-normal font-normal text-slate-600 dark:text-slate-400",children:y(e.section.description)}),e.group]})})]})}import{jsx as Y,jsxs as jt}from"react/jsx-runtime";function en(e){let t=jt("div",{className:"flex flex-col",children:[e.title&&Y("legend",{className:"mb-3 font-medium text-slate-800 dark:text-slate-200",children:y(e.title)}),e.description&&Y("p",{className:"-mt-2 text-sm leading-normal font-normal text-slate-600 dark:text-slate-400",children:y(e.description)})]});return e.step?jt("div",{className:"flex flex-row items-start gap-4",children:[Y("div",{className:"bg-primary text-primary-foreground flex h-6 w-6 shrink-0 items-center justify-center rounded-full",children:Y("span",{className:"text-sm font-bold",children:e.step})}),t]}):t}import{jsx as Io,jsxs as ko}from"react/jsx-runtime";function X(e){return ko("fieldset",{className:"flex flex-col data-[empty=false]:gap-6","data-empty":e.empty,"data-slot":"field-set",id:e.id,children:[Io(en,{description:e.description,step:e.step,title:e.title}),e.children]})}import{jsx as Eo}from"react/jsx-runtime";function C(e){return Eo("div",{"data-slot":"field-group","data-compact":e.compact,className:"flex w-full flex-col gap-8 data-[compact=true]:gap-3",children:e.children})}import{jsx as ue}from"react/jsx-runtime";function tn(e){let{fields:t=[]}=e.section,n=e.advanced?.step?e.step:void 0,{compact:o}=U(e.style,{compact:e.section.advanced?.compact}),r=ue(C,{compact:o,children:e.children});return!e.section.title&&!e.section.description?r:e.section.advanced?.collapsible?ue(Qt,{section:e.section,group:r}):ue(X,{description:e.section.description,empty:t.length===0,id:e.section.id?.toString(),step:n,title:e.section.title,children:r})}import{jsx as nn}from"react/jsx-runtime";function on(){return nn("div",{"data-slot":"field-separator",className:"relative -my-2 h-5 text-sm",children:nn("div",{className:"absolute inset-0 top-1/2 h-px w-full bg-slate-200 dark:bg-slate-800"})})}import{useAtomValue as _o}from"jotai";import{atom as P}from"jotai";import{atomFamily as Lo}from"jotai-family";import{deepEqual as rn}from"fast-equals";function wo(e,t){let{[t]:n,...o}=e;return o}function Po(e){return Lo(t=>P(n=>n(e)[t]??void 0,(n,o,r)=>{let i=n(e);if(r!=null){let l=i[t];rn(l,r)||o(e,{...i,[t]:r})}else t in i&&o(e,wo(i,t))}))}function Do(e){return P(null,(t,n)=>{let o=t(e);o&&Object.keys(o).length>0&&n(e,{})})}function Oo(e){return P(null,(t,n,o)=>{let i={...t(e)},l=!1;for(let c of o)c in i&&(delete i[c],l=!0);l&&n(e,i)})}function Mo(e){return P(null,(t,n,o)=>{let r=t(e);rn(r,o)||n(e,o)})}function ln(e={}){let t=P(e);return{atom:t,clearAll:Do(t),clear:Oo(t),bulkReport:Mo(t),report:Po(t)}}var an=ln(),sn=an.atom,Hi=an.report;function Vo(e,t){return e.fields.every(n=>cn(n,t))}function cn(e,t){return t[e.name]?.hidden??e.hidden??!1}function Ho(e,t){return N(e)?Vo(e,t):cn(e,t)}function dn(e){let t=_o(sn);return e.container&&(t[e.container.name]?.hidden??e.container.hidden??!1)||e.fields.length===0||e.fields.every(o=>Ho(o,t))?null:e.children}import{jsx as D,jsxs as un}from"react/jsx-runtime";function fn(e){let t=B(e.sections,e.definition);return D("div",{className:"h-full w-full",children:D("form",{noValidate:e.noValidate,action:e.action,children:un(C,{children:[t.map((n,o)=>un(dn,{fields:n.fields??[],children:[D(tn,{advanced:e.advanced,section:n,step:o+1,style:e.config.style,children:e.children({disabled:e.readOnly,fields:n.fields})}),n.advanced?.separator&&D(on,{})]},`key-${n.id}-${o}`)),e.control&&D(ye,{isPending:e.isPending,children:e.control})]})})})}import{jsx as zo}from"react/jsx-runtime";function mn(e){return zo("p",{className:"-mt-2 text-xs leading-normal font-normal text-slate-600 dark:text-slate-400",children:e.children})}import{useState as $o}from"react";import{jsx as gn,jsxs as pn}from"react/jsx-runtime";function S(e){let t={context:e.context,env:e.config?.env},[n,o]=$o(()=>a(e.text)&&"collapsed"in e.text?!e.text.collapsed:!0),r=()=>o(c=>!c),i=a(e.text)&&d(e.text.title)?y(R(E(e.text.title,t),e.translations)):void 0,l=y(R(E(d(e.text)?e.text:e.text?.message,t),e.translations));return l?pn("div",{className:"flex flex-col gap-2",children:[i&&pn("button",{className:"flex items-center gap-1 text-left text-xs font-medium text-slate-700 hover:text-slate-900 dark:text-slate-300 dark:hover:text-slate-100",onClick:r,type:"button",children:[i,gn(T,{expanded:n})]}),n&&gn(mn,{children:l})]}):null}import{twMerge as Go}from"tailwind-merge";import{jsx as Bo,jsxs as Uo}from"react/jsx-runtime";function xn(e){let t=e.style?.showOptionalLabel??!0,n=h(e.field)||x(e.field);return Uo("label",{"data-slot":"field-label","data-normal":n,className:Go("flex w-fit items-center gap-2 text-sm leading-snug font-medium select-none","data-[normal=true]:font-normal","group-data-[readonly=true]:cursor-not-allowed group-data-[readonly=true]:opacity-50"),htmlFor:e.field.name,children:[e.children,t&&!e.field.required&&Bo("span",{className:"text-sm text-slate-600 dark:text-slate-400",children:R("(Optional)",e.translations)})]})}import{jsx as yn,jsxs as Yo}from"react/jsx-runtime";function bn(e){let t={context:e.context,env:e.config?.env},n=E(e.field.label,t);return Yo("div",{"data-slot":"field-content",className:"flex w-full flex-1 flex-col gap-1.5 leading-snug",children:[yn(xn,{field:e.field,style:e.config?.style,translations:e.translations,children:R(n,e.translations)}),e.horizontal===!0&&yn(S,{config:e.config,context:e.context,text:e.field.description,translations:e.translations})]})}import{Fragment as Xo,jsx as Tn,jsxs as Ko}from"react/jsx-runtime";function hn(e){return Ko(Xo,{children:[e.field.name&&e.field.label&&Tn(bn,{config:e.config,context:e.context,field:e.field,horizontal:e.horizontal,translations:e.translations}),e.children,e.horizontal===!1&&Tn(S,{config:e.config,context:e.context,text:e.field.description,translations:e.translations})]})}function Rn(e,t){return e?t(e):null}import{jsx as Cn}from"react/jsx-runtime";function Fn(e){let t=_t(e.field,e.value),{commonPropsWithOptions:n,defaultValue:o}=Vt(e.field,e.commonProps,t,e.value),r=Ht(e.field,o);return Rn(e.config.inputs[e.field.type],i=>Cn(hn,{config:e.config,context:e.context,field:e.field,horizontal:e.horizontal,translations:e.translations,children:Cn(i,{...e.ariaAttributes,...n,...e.dataAttributes,...r})}))}import{jsx as Nn}from"react/jsx-runtime";function Sn(e){return!e.errors||e.errors.length===0?null:Nn("ul",{className:"text-sm text-red-600 dark:text-red-500",id:e.name?`${e.name}-error`:void 0,children:e.errors?.map((t,n)=>Nn("li",{children:t},e.name?`${e.name}-error-${n}`:n))})}import{twMerge as Zo}from"tailwind-merge";import{jsx as Wo}from"react/jsx-runtime";function K(e){let t=e.errors&&e.errors.length>0;return Wo("div",{"data-slot":"field","data-clickable":e.isClickable?"true":"false",...t&&{[Be]:"true"},...e.disabled&&{[Ue]:"true"},"data-orientation":e.orientation,className:Zo("group flex w-full flex-col items-center data-[invalid=true]:text-red-600 data-[invalid=true]:dark:text-red-500","data-[clickable=true]:items-start",e.isCheckbox&&(e.isReversed?"flex-row-reverse!":"flex-row!"),"data-[clickable=true]:has-[>[data-slot=field-content]]:[&>:first-child]:mt-px",e.className),children:e.children})}import{twMerge as qo}from"tailwind-merge";import{jsx as Jo}from"react/jsx-runtime";function An(e){return Jo(K,{...e,orientation:"vertical",className:qo("gap-3 has-[>[data-slot=field-content]]:items-start",!e.isClickable&&"[&>*]:w-full"),children:e.children})}import{twMerge as Qo}from"tailwind-merge";import{jsx as jo}from"react/jsx-runtime";function vn(e){return jo(K,{...e,orientation:"horizontal",className:Qo("gap-2 md:flex-row md:gap-4","[&>[data-slot=field-content]]:min-w-0 [&>[data-slot=field-content]]:flex-grow [&>[data-slot=field-content]]:self-start","[&_[role=checkbox]]:mt-[1.5px]",e.isClickable&&"md:flex-col",!e.isClickable&&["md:justify-between","[&>*:not([data-slot=field-content])]:w-full","[&>*:not([data-slot=field-content])]:md:w-1/2","[&>*:not([data-slot=field-content])]:xl:w-2/5"]),children:e.children})}import{jsx as In}from"react/jsx-runtime";function kn(e){let t=gt(e.field),n=x(e.field),o=bt(e.field);return e.horizontal?In(vn,{disabled:e.disabled,errors:e.errors,isCheckbox:n,isReversed:o,isClickable:t,children:e.children}):In(An,{disabled:e.disabled,errors:e.errors,isCheckbox:n,isReversed:o,isClickable:t,children:e.children})}function En(e){if(!e.field.type)return null;let t=wt(e.field,e.disabled),n=Ut(e.field),o=Bt(e.field,e.errors),r={...e.field,disabled:t.disabled};return e.children({ariaAttributes:o,commonProps:t,dataAttributes:n,field:r,horizontal:e.horizontal})}import{twMerge as er}from"tailwind-merge";import{jsx as fe,jsxs as tr}from"react/jsx-runtime";function Ln(e){let t=e.field.advanced?.cols,n=e.field.name?e.errors?.[e.field.name]:void 0,{horizontal:o}=U(e.style,{horizontal:yt(e.field)}),r=Tt(e.field,e.disabled);return tr("div",{className:er("flex flex-col gap-3",Zt(t)),children:[fe(kn,{disabled:r,errors:n,field:e.field,horizontal:o,children:fe(En,{disabled:r,errors:n,field:e.field,horizontal:o,children:e.children})}),fe(Sn,{errors:n,name:e.field.name})]})}import{twMerge as Z}from"tailwind-merge";import{useState as nr}from"react";import{jsx as f,jsxs as O}from"react/jsx-runtime";function wn(e){let[t,n]=nr(e.collapsible?!e.collapsed:!0);function o(){e.canRemove&&e.onRemove&&e.onRemove(e.index)}function r(){n(l=>!l)}let i=e.canRemove&&e.onRemove!=null&&f("button",{"aria-label":`Remove ${e.label} item ${e.index+1}`,className:Z("rounded p-1 text-xl text-slate-400","transition-colors duration-150","hover:text-red-500","focus-visible:ring-2 focus-visible:ring-slate-400 focus-visible:outline-none","dark:text-slate-500 dark:hover:text-red-400"),onClick:o,type:"button",children:f("span",{"aria-hidden":"true",children:"\xD7"})});return e.isMultiField?O("div",{"data-slot":"list-item-card",className:"rounded-lg border border-slate-100 p-4 dark:border-slate-900",children:[O("div",{className:"mb-3 flex items-center justify-between",children:[O("div",{className:"flex items-center gap-2",children:[e.collapsible&&f("button",{"aria-label":t?"Collapse":"Expand",className:Z("rounded p-1 text-slate-400 hover:bg-slate-50","transition-colors duration-150","dark:text-slate-500 dark:hover:bg-slate-800"),onClick:r,type:"button",children:f(T,{expanded:t})}),O("span",{className:"text-sm font-medium text-slate-300 dark:text-slate-400",children:[e.label," ",e.index+1,!t&&e.preview&&f("div",{className:"flex items-center gap-2 overflow-hidden text-ellipsis whitespace-nowrap text-slate-400 dark:text-slate-500",children:e.preview})]})]}),i]}),f(v,{visible:t,children:f(C,{children:e.children})})]}):O("div",{className:"flex items-start gap-2",children:[e.collapsible&&f("button",{"aria-label":t?"Collapse":"Expand",className:Z("rounded p-1 text-slate-400 hover:bg-slate-50","transition-colors duration-150","dark:text-slate-500 dark:hover:bg-slate-800",t&&"mt-7"),onClick:r,type:"button",children:f(T,{expanded:t})}),f("div",{className:"flex grow flex-col",children:f(v,{visible:t,children:f(C,{children:e.children})})}),i&&f("div",{className:Z("shrink-0",t&&"mt-7"),children:i})]})}import{jsx as or}from"react/jsx-runtime";function Pn(e){let t=Jt(e.field),n=Wt(e.field);return qt(e.field,e.value).map(o=>or(wn,{collapsed:e.field.advanced?.collapsed,collapsible:e.field.advanced?.collapsible,index:o,isMultiField:n,label:t,children:e.children(o)},o))}import{jsx as rr}from"react/jsx-runtime";function Dn(e){let t=Array.isArray(e.field.fields)&&e.field.fields.length===0;return rr(X,{description:e.field.description,empty:t,id:e.field.name,title:e.field.label,children:e.children})}import{jsx as On}from"react/jsx-runtime";function Mn({children:e,field:t,value:n}){return On(Dn,{field:t,children:On(Pn,{field:t,value:n,children:e})})}import{twMerge as ir}from"tailwind-merge";import{jsx as _n,jsxs as lr}from"react/jsx-runtime";function Vn(e){let t=Kt(e.column?.advanced?.cols);return lr("div",{className:"flex w-full flex-col gap-4",children:[_n("div",{className:ir("grid grid-cols-1 gap-3 sm:gap-4",t),children:e.children}),e.column?.description&&_n(S,{config:e.config,context:e.context,text:e.column.description,translations:e.translations})]})}import{Fragment as sr}from"react";import{jsx as ar}from"react/jsx-runtime";function Hn(e){let t=Array.isArray(e.field.fields)?e.field.fields.map(n=>z(n)?{...n,name:`${e.field.name}.${e.index}.${n.name}`}:N(n)?{...n,fields:n.fields.map(o=>({...o,name:`${e.field.name}.${e.index}.${o.name}`}))}:n):[];return ar(M,{children:e.children,components:e.components,config:e.config,context:e.context,disabled:e.disabled,fields:t,style:e.style,translations:e.translations,value:e.value})}import{jsx as _,jsxs as cr}from"react/jsx-runtime";function M(e){let{field:t,list:n}=e.components;return B(e.fields).map((o,r)=>cr(sr,{children:[N(o)&&_(Vn,{column:o,config:e.config,context:e.context,translations:e.translations,children:_(M,{...e,fields:o.fields})}),z(o)&&_(t,{disabled:e.disabled,field:o,style:e.style,children:e.children}),pt(o)&&_(n,{field:o,value:e.value,children:i=>_(Hn,{children:e.children,components:e.components,config:e.config,context:e.context,disabled:e.disabled,field:o,index:i,style:e.style,translations:e.translations,value:e.value})})]},r))}import{jsx as dr}from"react/jsx-runtime";function zn(e){return n=>dr(M,{...n,components:e})}var $n=zn({field:Ln,list:Mn});import{jsx as me}from"react/jsx-runtime";function ge(e){let t=e.translations?.[e.lang??""];return me(fn,{advanced:e.advanced,config:e.config,control:e.children,definition:e.definition,readOnly:e.readOnly,sections:e.sections,children:({disabled:n,fields:o})=>me($n,{config:e.config,context:e.context,disabled:n,fields:o,style:e.config.style,translations:t,value:e.value,children:r=>me(Fn,{...r,config:e.config,context:e.context,translations:t,value:e.value})})})}import{Suspense as ur}from"react";import{jsx as Gn}from"react/jsx-runtime";function fr(e){return Gn(ur,{fallback:Gn(ge,{config:e.config,sections:e.sections,readOnly:!0}),children:e.children})}export{fr as Fallback,ge as Form};
@@ -0,0 +1,4 @@
1
+ export declare function FieldPreviewItem({ name, separator, }: Readonly<{
2
+ name: string;
3
+ separator?: boolean;
4
+ }>): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,4 @@
1
+ export declare function FieldPreview({ name, previews, }: Readonly<{
2
+ name: string;
3
+ previews: string[];
4
+ }>): import("react/jsx-runtime").JSX.Element;
@@ -2,6 +2,9 @@ import { type FormState } from '../hook/use-form-action';
2
2
  import type { Config, Control } from '../../type';
3
3
  import type { Definition, Nullable, Sections, ZodSchema } from '@luna-form/core';
4
4
  export declare function FormContent<T extends Record<string, unknown> = Record<string, unknown>, F = Record<string, unknown>>(props: Readonly<{
5
+ advanced?: {
6
+ step?: boolean;
7
+ };
5
8
  action?: (formData: F, schema?: ZodSchema) => Promise<FormState<T>>;
6
9
  children?: Control;
7
10
  config: Config;
@@ -2,6 +2,9 @@ import type { Config, Control } from '../../type';
2
2
  import type { Definition, Nullable, Sections, ZodSchema } from '@luna-form/core';
3
3
  import type { FormState } from '../hook/use-form-action';
4
4
  export declare function Form<T extends Record<string, unknown> = Record<string, unknown>, F = Record<string, unknown>>(props: Readonly<{
5
+ advanced?: {
6
+ step?: boolean;
7
+ };
5
8
  action?: (formData: F, schema?: ZodSchema) => Promise<FormState<T>>;
6
9
  children?: Control;
7
10
  config: Config;
@@ -1,7 +1,5 @@
1
1
  import { type InputCoreProps } from '../hook/use-input-core';
2
2
  import type { InputStrategies } from './input-strategies';
3
- type InputBaseProps = InputCoreProps & {
3
+ export declare function InputBase(props: InputCoreProps & {
4
4
  strategies: InputStrategies;
5
- };
6
- export declare function InputBase(props: InputBaseProps): import("react").ReactNode;
7
- export {};
5
+ }): import("react").ReactNode;
@@ -1,29 +1,25 @@
1
- import type { DataSource, Field, Nullable } from '@luna-form/core';
2
1
  import type { Config } from '../../type';
3
- type SetSource = (target: string, source?: DataSource) => void;
4
- type SkipChangeCtx = Readonly<{
5
- shouldSkipOnChange: () => boolean;
6
- hasClickable: boolean;
7
- inputValue: string;
8
- valueRef: React.RefObject<unknown>;
9
- }>;
10
- type DispatchChangeCtx = Readonly<{
11
- applyChangeEventsRef: React.RefObject<((s: unknown) => void) | null>;
12
- data: Nullable<unknown[]>;
13
- entity?: string;
14
- inputValue: string;
15
- setTimeoutRef: (cb: () => void, ms: number) => void;
16
- }>;
2
+ import type { DataSource, Field, Nullable } from '@luna-form/core';
17
3
  export type InputStrategies = Readonly<{
18
4
  useSource: (field: Field, config: Config, value?: Nullable<Record<string, unknown>>) => {
19
5
  data: Nullable<unknown[]>;
20
- setSource: SetSource;
6
+ setSource: (target: string, source?: DataSource) => void;
21
7
  };
22
8
  getValue: (event: React.ChangeEvent<HTMLInputElement>, field: Field) => string;
23
- shouldSkipChange: (ctx: SkipChangeCtx) => boolean;
24
- dispatchChange: (ctx: DispatchChangeCtx) => void;
9
+ shouldSkipChange: (ctx: Readonly<{
10
+ shouldSkipOnChange: () => boolean;
11
+ hasClickable: boolean;
12
+ inputValue: string;
13
+ valueRef: React.RefObject<unknown>;
14
+ }>) => boolean;
15
+ dispatchChange: (ctx: Readonly<{
16
+ applyChangeEventsRef: React.RefObject<((s: unknown) => void) | null>;
17
+ data: Nullable<unknown[]>;
18
+ entity?: string;
19
+ inputValue: string;
20
+ setTimeoutRef: (cb: () => void, ms: number) => void;
21
+ }>) => void;
25
22
  buildInitialSelected: (defaultValue: unknown, data: Nullable<unknown[]>, entity: string | undefined) => unknown;
26
23
  isInitialReady: (field: Field, defaultValue: unknown, data: Nullable<unknown[]>) => boolean;
27
24
  useExtraProps?: (field: Field) => Record<string, unknown> | undefined;
28
25
  }>;
29
- export {};
@@ -1,7 +1,10 @@
1
1
  export declare const Slot: (props: Readonly<{
2
2
  children: import("../../../type").Children;
3
+ config: import("../../../type").Config;
4
+ context?: Record<string, unknown>;
3
5
  disabled?: boolean;
4
6
  fields?: import("@luna-form/core").Fields;
5
7
  style?: import("@luna-form/core").Style;
8
+ translations?: Record<string, string>;
6
9
  value?: import("@luna-form/core").Nullable<Record<string, unknown>>;
7
10
  }>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const KeepValueContext: import("react").Context<boolean>;
@@ -1,6 +1,5 @@
1
1
  import { type AriaAttributes, type CommonProps, type DataAttributes, type DataSource, type Field, type Nullable, type Schema } from '@luna-form/core';
2
2
  import type { Config, InputChange } from '../../type';
3
- type SetSource = (target: string, source?: DataSource) => void;
4
3
  export type InputCoreProps = Readonly<{
5
4
  ariaAttributes?: AriaAttributes;
6
5
  commonProps: CommonProps;
@@ -10,18 +9,19 @@ export type InputCoreProps = Readonly<{
10
9
  field: Field;
11
10
  horizontal?: boolean;
12
11
  onMount: (name: string, schema: Schema, field: Field) => void;
13
- onUnmount: (name: string) => void;
12
+ onUnmount: (name: string, options?: {
13
+ keepValue?: boolean;
14
+ }) => void;
14
15
  onValueChange?: (input: InputChange) => void;
15
16
  translations?: Record<string, string>;
16
17
  value?: Nullable<Record<string, unknown>>;
17
18
  }>;
18
- type InputCoreDeps = Readonly<{
19
+ export declare function useInputCore(props: InputCoreProps, deps: Readonly<{
19
20
  setValue: (value: unknown) => void;
20
21
  shouldSkipOnChange: () => boolean;
21
22
  value: unknown;
22
- setSource: SetSource;
23
- }>;
24
- export declare function useInputCore(props: InputCoreProps, deps: InputCoreDeps): {
23
+ setSource: (target: string, source?: DataSource) => void;
24
+ }>): {
25
25
  readonly applyChangeEventsRef: import("react").RefObject<((selected: unknown) => void) | null>;
26
26
  readonly commonProps: {
27
27
  placeholder: string;
@@ -39,4 +39,3 @@ export declare function useInputCore(props: InputCoreProps, deps: InputCoreDeps)
39
39
  readonly validated: (value: string) => void;
40
40
  readonly valueRef: import("react").RefObject<unknown>;
41
41
  };
42
- export {};
@@ -1,2 +1,4 @@
1
1
  import type { Field, Schema } from '@luna-form/core';
2
- export declare function useInput(field: Field, onMount: (name: string, schema: Schema, field: Field) => void, onUnmount: (name: string) => void, translations?: Record<string, string>): import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
2
+ export declare function useInput(field: Field, onMount: (name: string, schema: Schema, field: Field) => void, onUnmount: (name: string, options?: {
3
+ keepValue?: boolean;
4
+ }) => void, translations?: Record<string, string>): import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
@@ -1,2 +1,4 @@
1
1
  import type { Field, Schema, Schemas } from '@luna-form/core';
2
- export declare function useSchema(): readonly [() => readonly [Schemas, Field[]], (name: string, schema: Schema, field: Field) => void, (name: string) => void];
2
+ export declare function useSchema(): readonly [() => readonly [Schemas, Field[]], (name: string, schema: Schema, field: Field) => void, (name: string, options?: {
3
+ keepValue?: boolean;
4
+ }) => void];
@@ -1 +1,3 @@
1
- export declare function useStore(): (names: string | string[]) => void;
1
+ export declare function useStore(): (names: string | string[], options?: {
2
+ keepValue?: boolean;
3
+ }) => void;
@@ -1,7 +1,5 @@
1
1
  import type { DataSource, Field, Nullable } from '@luna-form/core';
2
- type SetSource = (target: string, source?: DataSource) => void;
3
2
  export declare function useWriteOnlySource(field: Field): {
4
3
  data: Nullable<unknown[]>;
5
- setSource: SetSource;
4
+ setSource: (target: string, source?: DataSource) => void;
6
5
  };
7
- export {};
@@ -0,0 +1,4 @@
1
+ export type PersistenceContextValue = {
2
+ isDeleting: boolean;
3
+ };
4
+ export declare const PersistenceContext: import("react").Context<PersistenceContextValue>;
@@ -0,0 +1,4 @@
1
+ export declare function Collapsible({ children, visible, }: Readonly<{
2
+ children: React.ReactNode;
3
+ visible?: boolean;
4
+ }>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,9 @@
1
1
  import { type Column } from '@luna-form/core';
2
+ import type { Config } from '../type';
2
3
  export declare function Column(props: Readonly<{
3
4
  children?: React.ReactNode;
4
5
  column?: Column;
6
+ config?: Config;
7
+ context?: Record<string, unknown>;
8
+ translations?: Record<string, string>;
5
9
  }>): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,11 @@
1
1
  export declare function FieldListItem(props: Readonly<{
2
2
  canRemove?: boolean;
3
3
  children: React.ReactNode;
4
+ collapsed?: boolean;
5
+ collapsible?: boolean;
4
6
  index: number;
5
7
  isMultiField: boolean;
6
8
  label: string;
7
9
  onRemove?: (index: number) => void;
10
+ preview?: React.ReactNode;
8
11
  }>): import("react/jsx-runtime").JSX.Element;
@@ -3,5 +3,6 @@ export declare function FieldSetBase(props: Readonly<{
3
3
  description?: string;
4
4
  empty?: boolean;
5
5
  id?: string;
6
+ step?: number;
6
7
  title?: string;
7
8
  }>): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,10 @@
1
1
  import { type Section, type Style } from '@luna-form/core';
2
2
  export declare function FieldSet(props: Readonly<{
3
+ advanced?: {
4
+ step?: boolean;
5
+ };
3
6
  children?: React.ReactNode;
4
7
  section: Section;
8
+ step?: number;
5
9
  style?: Style;
6
10
  }>): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,9 @@
1
1
  import { type Definition, type Sections } from '@luna-form/core';
2
2
  import type { Config, Control, Slot } from '../type';
3
3
  export declare function Form(props: Readonly<{
4
+ advanced?: {
5
+ step?: boolean;
6
+ };
4
7
  action?: (formData: FormData) => void;
5
8
  children: Slot;
6
9
  config: Config;
@@ -1,7 +1,8 @@
1
+ import { type Description as DescriptionType } from '@luna-form/core';
1
2
  import type { Config } from '../type';
2
3
  export declare function FormattedDescription(props: Readonly<{
3
4
  config?: Config;
4
5
  context?: Record<string, unknown>;
5
- text?: string;
6
+ text?: DescriptionType;
6
7
  translations?: Record<string, string>;
7
8
  }>): import("react/jsx-runtime").JSX.Element | null;
@@ -1,4 +1,5 @@
1
1
  export declare function Legend(props: Readonly<{
2
- title?: string;
3
2
  description?: string;
3
+ step?: number;
4
+ title?: string;
4
5
  }>): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { type Fields, type Nullable, type Style } from '@luna-form/core';
2
- import type { Children } from '../../type';
2
+ import type { Children, Config } from '../../type';
3
3
  import type { FieldProps } from '../field/field';
4
4
  import type { ListProps } from '../field/field-list';
5
5
  export type SlotComponents = {
@@ -9,8 +9,11 @@ export type SlotComponents = {
9
9
  export declare function SlotBase(props: Readonly<{
10
10
  children: Children;
11
11
  components: SlotComponents;
12
+ config: Config;
13
+ context?: Record<string, unknown>;
12
14
  disabled?: boolean;
13
15
  fields?: Fields;
14
16
  style?: Style;
17
+ translations?: Record<string, string>;
15
18
  value?: Nullable<Record<string, unknown>>;
16
19
  }>): import("react/jsx-runtime").JSX.Element[];
@@ -1,10 +1,13 @@
1
- import type { Children } from '../../type';
1
+ import type { Children, Config } from '../../type';
2
2
  import type { Fields, Nullable, Style } from '@luna-form/core';
3
3
  import type { SlotComponents } from './slot-base';
4
4
  export declare function createSlot(components: SlotComponents): (props: Readonly<{
5
5
  children: Children;
6
+ config: Config;
7
+ context?: Record<string, unknown>;
6
8
  disabled?: boolean;
7
9
  fields?: Fields;
8
10
  style?: Style;
11
+ translations?: Record<string, string>;
9
12
  value?: Nullable<Record<string, unknown>>;
10
13
  }>) => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,15 @@
1
1
  import { type List, type Nullable, type Style } from '@luna-form/core';
2
2
  import { type SlotComponents } from './slot-base';
3
- import type { Children } from '../../type';
3
+ import type { Children, Config } from '../../type';
4
4
  export declare function SlotList(props: Readonly<{
5
5
  children: Children;
6
6
  components: SlotComponents;
7
+ config: Config;
8
+ context?: Record<string, unknown>;
7
9
  disabled?: boolean;
8
10
  field: List;
9
11
  index: number;
10
12
  style?: Style;
13
+ translations?: Record<string, string>;
11
14
  value?: Nullable<Record<string, unknown>>;
12
15
  }>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,10 @@
1
1
  export declare const Slot: (props: Readonly<{
2
2
  children: import("../../type").Children;
3
+ config: import("../../type").Config;
4
+ context?: Record<string, unknown>;
3
5
  disabled?: boolean;
4
6
  fields?: import("@luna-form/core").Fields;
5
7
  style?: import("@luna-form/core").Style;
8
+ translations?: Record<string, string>;
6
9
  value?: import("@luna-form/core").Nullable<Record<string, unknown>>;
7
10
  }>) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,9 @@
1
1
  import type { Config } from '../../type';
2
2
  import type { Definition, Sections } from '@luna-form/core';
3
3
  export declare function Form(props: Readonly<{
4
+ advanced?: {
5
+ step?: boolean;
6
+ };
4
7
  children?: React.ReactNode;
5
8
  config: Config;
6
9
  context?: Record<string, unknown>;
package/package.json CHANGED
@@ -1,15 +1,12 @@
1
1
  {
2
2
  "name": "react-luna-form",
3
- "version": "0.0.42",
3
+ "version": "0.0.44",
4
4
  "description": "A React library for building forms based on JSON",
5
5
  "main": "./dist/client/cjs/index.js",
6
6
  "module": "./dist/client/esm/index.js",
7
7
  "types": "./dist/types/luna-react/src/client/index.d.ts",
8
8
  "type": "module",
9
- "sideEffects": [
10
- "./dist/timezone/esm/index.js",
11
- "./dist/timezone/cjs/index.js"
12
- ],
9
+ "sideEffects": false,
13
10
  "keywords": [
14
11
  "event",
15
12
  "forms",
@@ -35,9 +32,9 @@
35
32
  "@types/react": "19.2.14",
36
33
  "@types/react-dom": "19.2.3",
37
34
  "eslint-plugin-react": "7.37.5",
38
- "eslint-plugin-react-hooks": "7.0.1",
35
+ "eslint-plugin-react-hooks": "7.1.1",
39
36
  "eslint-plugin-react-refresh": "0.5.2",
40
- "@luna-form/core": "0.0.42"
37
+ "@luna-form/core": "0.0.44"
41
38
  },
42
39
  "license": "Apache-2.0",
43
40
  "repository": {
@@ -64,12 +61,6 @@
64
61
  "import": "./dist/config/esm/index.js",
65
62
  "require": "./dist/config/cjs/index.js",
66
63
  "default": "./dist/config/cjs/index.js"
67
- },
68
- "./timezone": {
69
- "types": "./dist/types/luna-react/src/timezone/index.d.ts",
70
- "import": "./dist/timezone/esm/index.js",
71
- "require": "./dist/timezone/cjs/index.js",
72
- "default": "./dist/timezone/cjs/index.js"
73
64
  }
74
65
  },
75
66
  "scripts": {