extended-dynamic-forms 0.1.0
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 +583 -0
- package/dist/ExtendedForm.d.ts +4 -0
- package/dist/components/fields/AddressField.d.ts +4 -0
- package/dist/components/fields/CurrencyField.d.ts +4 -0
- package/dist/components/fields/PhoneField.d.ts +4 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/card.d.ts +8 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/events/FormEventContext.d.ts +20 -0
- package/dist/events/FormEventHub.d.ts +27 -0
- package/dist/events/FormEventManager.d.ts +10 -0
- package/dist/events/index.d.ts +4 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.es.js +4748 -0
- package/dist/index.umd.js +50 -0
- package/dist/layouts/grid/GridLayout.d.ts +11 -0
- package/dist/layouts/horizontal/HorizontalLayout.d.ts +10 -0
- package/dist/layouts/index.d.ts +3 -0
- package/dist/layouts/vertical/VerticalLayout.d.ts +9 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/style.css +1 -0
- package/dist/types/index.d.ts +47 -0
- package/dist/utils/formDataUtils.d.ts +22 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/schemaUtils.d.ts +24 -0
- package/dist/utils/validationUtils.d.ts +26 -0
- package/dist/widgets/date/DateWidget.d.ts +4 -0
- package/dist/widgets/file/FileWidget.d.ts +4 -0
- package/dist/widgets/index.d.ts +14 -0
- package/dist/widgets/input/ColorWidget.d.ts +4 -0
- package/dist/widgets/input/RangeWidget.d.ts +4 -0
- package/dist/widgets/input/RatingWidget.d.ts +4 -0
- package/package.json +73 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
(function(_,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("react"),require("react-dom"),require("@rjsf/shadcn"),require("@rjsf/validator-ajv8")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@rjsf/shadcn","@rjsf/validator-ajv8"],A):(_=typeof globalThis<"u"?globalThis:_||self,A(_.ExtendedDynamicForms={},_.React,_.ReactDOM,_.RJSFShadcn,_.RJSFValidatorAjv8))})(this,function(_,A,ye,vr,yr){"use strict";var Po=Object.defineProperty;var No=(_,A,ye)=>A in _?Po(_,A,{enumerable:!0,configurable:!0,writable:!0,value:ye}):_[A]=ye;var ue=(_,A,ye)=>No(_,typeof A!="symbol"?A+"":A,ye);function xr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const y=xr(A);var Fe={exports:{}},xe={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Je;function wr(){if(Je)return xe;Je=1;var e=A,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function l(a,c,f){var p,d={},h=null,w=null;f!==void 0&&(h=""+f),c.key!==void 0&&(h=""+c.key),c.ref!==void 0&&(w=c.ref);for(p in c)n.call(c,p)&&!i.hasOwnProperty(p)&&(d[p]=c[p]);if(a&&a.defaultProps)for(p in c=a.defaultProps,c)d[p]===void 0&&(d[p]=c[p]);return{$$typeof:t,type:a,key:h,ref:w,props:d,_owner:s.current}}return xe.Fragment=r,xe.jsx=l,xe.jsxs=l,xe}var we={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Qe;function Cr(){return Qe||(Qe=1,process.env.NODE_ENV!=="production"&&function(){var e=A,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),S=Symbol.iterator,v="@@iterator";function g(o){if(o===null||typeof o!="object")return null;var m=S&&o[S]||o[v];return typeof m=="function"?m:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(o){{for(var m=arguments.length,x=new Array(m>1?m-1:0),R=1;R<m;R++)x[R-1]=arguments[R];E("error",o,x)}}function E(o,m,x){{var R=b.ReactDebugCurrentFrame,F=R.getStackAddendum();F!==""&&(m+="%s",x=x.concat([F]));var O=x.map(function(T){return String(T)});O.unshift("Warning: "+m),Function.prototype.apply.call(console[o],console,O)}}var j=!1,z=!1,B=!1,J=!1,ce=!1,ne;ne=Symbol.for("react.module.reference");function D(o){return!!(typeof o=="string"||typeof o=="function"||o===n||o===i||ce||o===s||o===f||o===p||J||o===w||j||z||B||typeof o=="object"&&o!==null&&(o.$$typeof===h||o.$$typeof===d||o.$$typeof===l||o.$$typeof===a||o.$$typeof===c||o.$$typeof===ne||o.getModuleId!==void 0))}function $(o,m,x){var R=o.displayName;if(R)return R;var F=m.displayName||m.name||"";return F!==""?x+"("+F+")":x}function P(o){return o.displayName||"Context"}function W(o){if(o==null)return null;if(typeof o.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case s:return"StrictMode";case f:return"Suspense";case p:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case a:var m=o;return P(m)+".Consumer";case l:var x=o;return P(x._context)+".Provider";case c:return $(o,o.render,"ForwardRef");case d:var R=o.displayName||null;return R!==null?R:W(o.type)||"Memo";case h:{var F=o,O=F._payload,T=F._init;try{return W(T(O))}catch{return null}}}return null}var H=Object.assign,Q=0,q,X,G,re,Re,Z,tr;function rr(){}rr.__reactDisabledLog=!0;function to(){{if(Q===0){q=console.log,X=console.info,G=console.warn,re=console.error,Re=console.group,Z=console.groupCollapsed,tr=console.groupEnd;var o={configurable:!0,enumerable:!0,value:rr,writable:!0};Object.defineProperties(console,{info:o,log:o,warn:o,error:o,group:o,groupCollapsed:o,groupEnd:o})}Q++}}function ro(){{if(Q--,Q===0){var o={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},o,{value:q}),info:H({},o,{value:X}),warn:H({},o,{value:G}),error:H({},o,{value:re}),group:H({},o,{value:Re}),groupCollapsed:H({},o,{value:Z}),groupEnd:H({},o,{value:tr})})}Q<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Le=b.ReactCurrentDispatcher,Be;function Pe(o,m,x){{if(Be===void 0)try{throw Error()}catch(F){var R=F.stack.trim().match(/\n( *(at )?)/);Be=R&&R[1]||""}return`
|
|
18
|
+
`+Be+o}}var He=!1,Ne;{var no=typeof WeakMap=="function"?WeakMap:Map;Ne=new no}function nr(o,m){if(!o||He)return"";{var x=Ne.get(o);if(x!==void 0)return x}var R;He=!0;var F=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var O;O=Le.current,Le.current=null,to();try{if(m){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(K){R=K}Reflect.construct(o,[],T)}else{try{T.call()}catch(K){R=K}o.call(T.prototype)}}else{try{throw Error()}catch(K){R=K}o()}}catch(K){if(K&&R&&typeof K.stack=="string"){for(var N=K.stack.split(`
|
|
19
|
+
`),U=R.stack.split(`
|
|
20
|
+
`),V=N.length-1,I=U.length-1;V>=1&&I>=0&&N[V]!==U[I];)I--;for(;V>=1&&I>=0;V--,I--)if(N[V]!==U[I]){if(V!==1||I!==1)do if(V--,I--,I<0||N[V]!==U[I]){var ee=`
|
|
21
|
+
`+N[V].replace(" at new "," at ");return o.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",o.displayName)),typeof o=="function"&&Ne.set(o,ee),ee}while(V>=1&&I>=0);break}}}finally{He=!1,Le.current=O,ro(),Error.prepareStackTrace=F}var ve=o?o.displayName||o.name:"",de=ve?Pe(ve):"";return typeof o=="function"&&Ne.set(o,de),de}function oo(o,m,x){return nr(o,!1)}function so(o){var m=o.prototype;return!!(m&&m.isReactComponent)}function Te(o,m,x){if(o==null)return"";if(typeof o=="function")return nr(o,so(o));if(typeof o=="string")return Pe(o);switch(o){case f:return Pe("Suspense");case p:return Pe("SuspenseList")}if(typeof o=="object")switch(o.$$typeof){case c:return oo(o.render);case d:return Te(o.type,m,x);case h:{var R=o,F=R._payload,O=R._init;try{return Te(O(F),m,x)}catch{}}}return""}var je=Object.prototype.hasOwnProperty,or={},sr=b.ReactDebugCurrentFrame;function Ae(o){if(o){var m=o._owner,x=Te(o.type,o._source,m?m.type:null);sr.setExtraStackFrame(x)}else sr.setExtraStackFrame(null)}function io(o,m,x,R,F){{var O=Function.call.bind(je);for(var T in o)if(O(o,T)){var N=void 0;try{if(typeof o[T]!="function"){var U=Error((R||"React class")+": "+x+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw U.name="Invariant Violation",U}N=o[T](m,T,R,x,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(V){N=V}N&&!(N instanceof Error)&&(Ae(F),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",R||"React class",x,T,typeof N),Ae(null)),N instanceof Error&&!(N.message in or)&&(or[N.message]=!0,Ae(F),C("Failed %s type: %s",x,N.message),Ae(null))}}}var ao=Array.isArray;function Ue(o){return ao(o)}function lo(o){{var m=typeof Symbol=="function"&&Symbol.toStringTag,x=m&&o[Symbol.toStringTag]||o.constructor.name||"Object";return x}}function co(o){try{return ir(o),!1}catch{return!0}}function ir(o){return""+o}function ar(o){if(co(o))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",lo(o)),ir(o)}var lr=b.ReactCurrentOwner,uo={key:!0,ref:!0,__self:!0,__source:!0},cr,ur;function fo(o){if(je.call(o,"ref")){var m=Object.getOwnPropertyDescriptor(o,"ref").get;if(m&&m.isReactWarning)return!1}return o.ref!==void 0}function po(o){if(je.call(o,"key")){var m=Object.getOwnPropertyDescriptor(o,"key").get;if(m&&m.isReactWarning)return!1}return o.key!==void 0}function mo(o,m){typeof o.ref=="string"&&lr.current}function ho(o,m){{var x=function(){cr||(cr=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};x.isReactWarning=!0,Object.defineProperty(o,"key",{get:x,configurable:!0})}}function go(o,m){{var x=function(){ur||(ur=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",m))};x.isReactWarning=!0,Object.defineProperty(o,"ref",{get:x,configurable:!0})}}var bo=function(o,m,x,R,F,O,T){var N={$$typeof:t,type:o,key:m,ref:x,props:T,_owner:O};return N._store={},Object.defineProperty(N._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(N,"_self",{configurable:!1,enumerable:!1,writable:!1,value:R}),Object.defineProperty(N,"_source",{configurable:!1,enumerable:!1,writable:!1,value:F}),Object.freeze&&(Object.freeze(N.props),Object.freeze(N)),N};function vo(o,m,x,R,F){{var O,T={},N=null,U=null;x!==void 0&&(ar(x),N=""+x),po(m)&&(ar(m.key),N=""+m.key),fo(m)&&(U=m.ref,mo(m,F));for(O in m)je.call(m,O)&&!uo.hasOwnProperty(O)&&(T[O]=m[O]);if(o&&o.defaultProps){var V=o.defaultProps;for(O in V)T[O]===void 0&&(T[O]=V[O])}if(N||U){var I=typeof o=="function"?o.displayName||o.name||"Unknown":o;N&&ho(T,I),U&&go(T,I)}return bo(o,N,U,F,R,lr.current,T)}}var Ge=b.ReactCurrentOwner,dr=b.ReactDebugCurrentFrame;function be(o){if(o){var m=o._owner,x=Te(o.type,o._source,m?m.type:null);dr.setExtraStackFrame(x)}else dr.setExtraStackFrame(null)}var Ke;Ke=!1;function Ye(o){return typeof o=="object"&&o!==null&&o.$$typeof===t}function fr(){{if(Ge.current){var o=W(Ge.current.type);if(o)return`
|
|
22
|
+
|
|
23
|
+
Check the render method of \``+o+"`."}return""}}function yo(o){return""}var pr={};function xo(o){{var m=fr();if(!m){var x=typeof o=="string"?o:o.displayName||o.name;x&&(m=`
|
|
24
|
+
|
|
25
|
+
Check the top-level render call using <`+x+">.")}return m}}function mr(o,m){{if(!o._store||o._store.validated||o.key!=null)return;o._store.validated=!0;var x=xo(m);if(pr[x])return;pr[x]=!0;var R="";o&&o._owner&&o._owner!==Ge.current&&(R=" It was passed a child from "+W(o._owner.type)+"."),be(o),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',x,R),be(null)}}function hr(o,m){{if(typeof o!="object")return;if(Ue(o))for(var x=0;x<o.length;x++){var R=o[x];Ye(R)&&mr(R,m)}else if(Ye(o))o._store&&(o._store.validated=!0);else if(o){var F=g(o);if(typeof F=="function"&&F!==o.entries)for(var O=F.call(o),T;!(T=O.next()).done;)Ye(T.value)&&mr(T.value,m)}}}function wo(o){{var m=o.type;if(m==null||typeof m=="string")return;var x;if(typeof m=="function")x=m.propTypes;else if(typeof m=="object"&&(m.$$typeof===c||m.$$typeof===d))x=m.propTypes;else return;if(x){var R=W(m);io(x,o.props,"prop",R,o)}else if(m.PropTypes!==void 0&&!Ke){Ke=!0;var F=W(m);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",F||"Unknown")}typeof m.getDefaultProps=="function"&&!m.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Co(o){{for(var m=Object.keys(o.props),x=0;x<m.length;x++){var R=m[x];if(R!=="children"&&R!=="key"){be(o),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",R),be(null);break}}o.ref!==null&&(be(o),C("Invalid attribute `ref` supplied to `React.Fragment`."),be(null))}}var gr={};function br(o,m,x,R,F,O){{var T=D(o);if(!T){var N="";(o===void 0||typeof o=="object"&&o!==null&&Object.keys(o).length===0)&&(N+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var U=yo();U?N+=U:N+=fr();var V;o===null?V="null":Ue(o)?V="array":o!==void 0&&o.$$typeof===t?(V="<"+(W(o.type)||"Unknown")+" />",N=" Did you accidentally export a JSX literal instead of a component?"):V=typeof o,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",V,N)}var I=vo(o,m,x,F,O);if(I==null)return I;if(T){var ee=m.children;if(ee!==void 0)if(R)if(Ue(ee)){for(var ve=0;ve<ee.length;ve++)hr(ee[ve],o);Object.freeze&&Object.freeze(ee)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else hr(ee,o)}if(je.call(m,"key")){var de=W(o),K=Object.keys(m).filter(function(_o){return _o!=="key"}),qe=K.length>0?"{key: someKey, "+K.join(": ..., ")+": ...}":"{key: someKey}";if(!gr[de+qe]){var ko=K.length>0?"{"+K.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
+
let props = %s;
|
|
27
|
+
<%s {...props} />
|
|
28
|
+
React keys must be passed directly to JSX without using spread:
|
|
29
|
+
let props = %s;
|
|
30
|
+
<%s key={someKey} {...props} />`,qe,de,ko,de),gr[de+qe]=!0}}return o===n?Co(I):wo(I),I}}function So(o,m,x){return br(o,m,x,!0)}function Ro(o,m,x){return br(o,m,x,!1)}var jo=Ro,Eo=So;we.Fragment=n,we.jsx=jo,we.jsxs=Eo}()),we}process.env.NODE_ENV==="production"?Fe.exports=wr():Fe.exports=Cr();var u=Fe.exports;function Xe(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Xe(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ze(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Xe(e))&&(n&&(n+=" "),n+=t);return n}const Oe="-",Sr=e=>{const t=jr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:l=>{const a=l.split(Oe);return a[0]===""&&a.length!==1&&a.shift(),et(a,t)||Rr(l)},getConflictingClassGroupIds:(l,a)=>{const c=r[l]||[];return a&&n[l]?[...c,...n[l]]:c}}},et=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?et(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(Oe);return(l=t.validators.find(({validator:a})=>a(i)))==null?void 0:l.classGroupId},tt=/^\[(.+)\]$/,Rr=e=>{if(tt.test(e)){const t=tt.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},jr=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return kr(Object.entries(e.classGroups),r).forEach(([i,l])=>{Me(l,n,i,t)}),n},Me=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:rt(t,s);i.classGroupId=r;return}if(typeof s=="function"){if(Er(s)){Me(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,l])=>{Me(l,rt(t,i),r,n)})})},rt=(e,t)=>{let r=e;return t.split(Oe).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Er=e=>e.isThemeGetter,kr=(e,t)=>t?e.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,a])=>[t+l,a])):i);return[r,s]}):e,_r=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(i,l)=>{r.set(i,l),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let l=r.get(i);if(l!==void 0)return l;if((l=n.get(i))!==void 0)return s(i,l),l},set(i,l){r.has(i)?r.set(i,l):s(i,l)}}},nt="!",Pr=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],i=t.length,l=a=>{const c=[];let f=0,p=0,d;for(let g=0;g<a.length;g++){let b=a[g];if(f===0){if(b===s&&(n||a.slice(g,g+i)===t)){c.push(a.slice(p,g)),p=g+i;continue}if(b==="/"){d=g;continue}}b==="["?f++:b==="]"&&f--}const h=c.length===0?a:a.substring(p),w=h.startsWith(nt),S=w?h.substring(1):h,v=d&&d>p?d-p:void 0;return{modifiers:c,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:v}};return r?a=>r({className:a,parseClassName:l}):l},Nr=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},Tr=e=>({cache:_r(e.cacheSize),parseClassName:Pr(e),...Sr(e)}),Ar=/\s+/,Fr=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,i=[],l=e.trim().split(Ar);let a="";for(let c=l.length-1;c>=0;c-=1){const f=l[c],{modifiers:p,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:w}=r(f);let S=!!w,v=n(S?h.substring(0,w):h);if(!v){if(!S){a=f+(a.length>0?" "+a:a);continue}if(v=n(h),!v){a=f+(a.length>0?" "+a:a);continue}S=!1}const g=Nr(p).join(":"),b=d?g+nt:g,C=b+v;if(i.includes(C))continue;i.push(C);const E=s(v,S);for(let j=0;j<E.length;++j){const z=E[j];i.push(b+z)}a=f+(a.length>0?" "+a:a)}return a};function Or(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=ot(t))&&(n&&(n+=" "),n+=r);return n}const ot=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=ot(e[n]))&&(r&&(r+=" "),r+=t);return r};function Mr(e,...t){let r,n,s,i=l;function l(c){const f=t.reduce((p,d)=>d(p),e());return r=Tr(f),n=r.cache.get,s=r.cache.set,i=a,a(c)}function a(c){const f=n(c);if(f)return f;const p=Fr(c,r);return s(c,p),p}return function(){return i(Or.apply(null,arguments))}}const M=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},st=/^\[(?:([a-z-]+):)?(.+)\]$/i,$r=/^\d+\/\d+$/,Vr=new Set(["px","full","screen"]),Ir=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Dr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Wr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Lr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oe=e=>fe(e)||Vr.has(e)||$r.test(e),se=e=>pe(e,"length",Jr),fe=e=>!!e&&!Number.isNaN(Number(e)),$e=e=>pe(e,"number",fe),Ce=e=>!!e&&Number.isInteger(Number(e)),Br=e=>e.endsWith("%")&&fe(e.slice(0,-1)),k=e=>st.test(e),ie=e=>Ir.test(e),Hr=new Set(["length","size","percentage"]),Ur=e=>pe(e,Hr,it),Gr=e=>pe(e,"position",it),Kr=new Set(["image","url"]),Yr=e=>pe(e,Kr,Xr),qr=e=>pe(e,"",Qr),Se=()=>!0,pe=(e,t,r)=>{const n=st.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Jr=e=>zr.test(e)&&!Dr.test(e),it=()=>!1,Qr=e=>Wr.test(e),Xr=e=>Lr.test(e),Zr=Mr(()=>{const e=M("colors"),t=M("spacing"),r=M("blur"),n=M("brightness"),s=M("borderColor"),i=M("borderRadius"),l=M("borderSpacing"),a=M("borderWidth"),c=M("contrast"),f=M("grayscale"),p=M("hueRotate"),d=M("invert"),h=M("gap"),w=M("gradientColorStops"),S=M("gradientColorStopPositions"),v=M("inset"),g=M("margin"),b=M("opacity"),C=M("padding"),E=M("saturate"),j=M("scale"),z=M("sepia"),B=M("skew"),J=M("space"),ce=M("translate"),ne=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",k,t],P=()=>[k,t],W=()=>["",oe,se],H=()=>["auto",fe,k],Q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],G=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",k],Re=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>[fe,k];return{cacheSize:500,separator:":",theme:{colors:[Se],spacing:[oe,se],blur:["none","",ie,k],brightness:Z(),borderColor:[e],borderRadius:["none","","full",ie,k],borderSpacing:P(),borderWidth:W(),contrast:Z(),grayscale:re(),hueRotate:Z(),invert:re(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[Br,se],inset:$(),margin:$(),opacity:Z(),padding:P(),saturate:Z(),scale:Z(),sepia:re(),skew:Z(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",k]}],container:["container"],columns:[{columns:[ie]}],"break-after":[{"break-after":Re()}],"break-before":[{"break-before":Re()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Q(),k]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:ne()}],"overscroll-x":[{"overscroll-x":ne()}],"overscroll-y":[{"overscroll-y":ne()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ce,k]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",k]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",Ce,k]}],"grid-cols":[{"grid-cols":[Se]}],"col-start-end":[{col:["auto",{span:["full",Ce,k]},k]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[Se]}],"row-start-end":[{row:["auto",{span:[Ce,k]},k]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",k]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",k]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...G()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...G(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...G(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[J]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[J]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",k,t]}],"min-w":[{"min-w":[k,t,"min","max","fit"]}],"max-w":[{"max-w":[k,t,"none","full","min","max","fit","prose",{screen:[ie]},ie]}],h:[{h:[k,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[k,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[k,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[k,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ie,se]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$e]}],"font-family":[{font:[Se]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",k]}],"line-clamp":[{"line-clamp":["none",fe,$e]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",oe,k]}],"list-image":[{"list-image":["none",k]}],"list-style-type":[{list:["none","disc","decimal",k]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",oe,se]}],"underline-offset":[{"underline-offset":["auto",oe,k]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",k]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",k]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Q(),Gr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ur]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Yr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:q()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...q()]}],"outline-offset":[{"outline-offset":[oe,k]}],"outline-w":[{outline:[oe,se]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[oe,se]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ie,qr]}],"shadow-color":[{shadow:[Se]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ie,k]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[d]}],saturate:[{saturate:[E]}],sepia:[{sepia:[z]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",k]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",k]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",k]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[Ce,k]}],"translate-x":[{"translate-x":[ce]}],"translate-y":[{"translate-y":[ce]}],"skew-x":[{"skew-x":[B]}],"skew-y":[{"skew-y":[B]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",k]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",k]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",k]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[oe,se,$e]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function L(...e){return Zr(Ze(e))}const te=y.forwardRef(({className:e,type:t,...r},n)=>u.jsx("input",{type:t,className:L("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...r}));te.displayName="Input";function at(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lt(...e){return t=>{let r=!1;const n=e.map(s=>{const i=at(s,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():at(e[s],null)}}}}function ae(...e){return y.useCallback(lt(...e),e)}function Ee(e){const t=tn(e),r=y.forwardRef((n,s)=>{const{children:i,...l}=n,a=y.Children.toArray(i),c=a.find(nn);if(c){const f=c.props.children,p=a.map(d=>d===c?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:d);return u.jsx(t,{...l,ref:s,children:y.isValidElement(f)?y.cloneElement(f,void 0,p):null})}return u.jsx(t,{...l,ref:s,children:i})});return r.displayName=`${e}.Slot`,r}var en=Ee("Slot");function tn(e){const t=y.forwardRef((r,n)=>{const{children:s,...i}=r;if(y.isValidElement(s)){const l=sn(s),a=on(i,s.props);return s.type!==y.Fragment&&(a.ref=n?lt(n,l):l),y.cloneElement(s,a)}return y.Children.count(s)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rn=Symbol("radix.slottable");function nn(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rn}function on(e,t){const r={...t};for(const n in t){const s=e[n],i=t[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{const c=i(...a);return s(...a),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...e,...r}}function sn(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var an=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],me=an.reduce((e,t)=>{const r=Ee(`Primitive.${t}`),n=y.forwardRef((s,i)=>{const{asChild:l,...a}=s,c=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(c,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),ln="Label",ct=y.forwardRef((e,t)=>u.jsx(me.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));ct.displayName=ln;var ut=ct;const dt=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ft=Ze,Ve=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return ft(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=t,l=Object.keys(s).map(f=>{const p=r==null?void 0:r[f],d=i==null?void 0:i[f];if(p===null)return null;const h=dt(p)||dt(d);return s[f][h]}),a=r&&Object.entries(r).reduce((f,p)=>{let[d,h]=p;return h===void 0||(f[d]=h),f},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((f,p)=>{let{class:d,className:h,...w}=p;return Object.entries(w).every(S=>{let[v,g]=S;return Array.isArray(g)?g.includes({...i,...a}[v]):{...i,...a}[v]===g})?[...f,d,h]:f},[]);return ft(e,l,c,r==null?void 0:r.class,r==null?void 0:r.className)},cn=Ve("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Y=y.forwardRef(({className:e,...t},r)=>u.jsx(ut,{ref:r,className:L(cn(),e),...t}));Y.displayName=ut.displayName;const pt=y.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:L("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));pt.displayName="Card";const mt=y.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:L("flex flex-col space-y-1.5 p-6",e),...t}));mt.displayName="CardHeader";const ht=y.forwardRef(({className:e,...t},r)=>u.jsx("h3",{ref:r,className:L("text-2xl font-semibold leading-none tracking-tight",e),...t}));ht.displayName="CardTitle";const un=y.forwardRef(({className:e,...t},r)=>u.jsx("p",{ref:r,className:L("text-sm text-muted-foreground",e),...t}));un.displayName="CardDescription";const gt=y.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:L("p-6 pt-0",e),...t}));gt.displayName="CardContent";const dn=y.forwardRef(({className:e,...t},r)=>u.jsx("div",{ref:r,className:L("flex items-center p-6 pt-0",e),...t}));dn.displayName="CardFooter";const bt=({formData:e,onChange:t,required:r,disabled:n,readonly:s,schema:i,idSchema:l})=>{const a=c=>f=>{t({...e,[c]:f.target.value})};return u.jsxs(pt,{children:[u.jsx(mt,{className:"pb-4",children:u.jsx(ht,{className:"text-lg",children:i.title||"Address"})}),u.jsxs(gt,{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:`${l.$id}_street`,children:["Street Address",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:`${l.$id}_street`,type:"text",value:(e==null?void 0:e.street)||"",onChange:a("street"),disabled:n||s,placeholder:"123 Main St"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:`${l.$id}_city`,children:["City",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:`${l.$id}_city`,type:"text",value:(e==null?void 0:e.city)||"",onChange:a("city"),disabled:n||s,placeholder:"New York"})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:`${l.$id}_state`,children:["State/Province",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:`${l.$id}_state`,type:"text",value:(e==null?void 0:e.state)||"",onChange:a("state"),disabled:n||s,placeholder:"NY"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:`${l.$id}_zip`,children:["ZIP/Postal Code",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:`${l.$id}_zip`,type:"text",value:(e==null?void 0:e.zip)||"",onChange:a("zip"),disabled:n||s,placeholder:"10001"})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Y,{htmlFor:`${l.$id}_country`,children:"Country"}),u.jsx(te,{id:`${l.$id}_country`,type:"text",value:(e==null?void 0:e.country)||"",onChange:a("country"),disabled:n||s,placeholder:"United States"})]})]})]})},vt=A.createContext(null),yt=({eventHub:e,formData:t,children:r})=>u.jsx(vt.Provider,{value:{eventHub:e,formData:t},children:r}),xt=()=>{const e=A.useContext(vt);if(!e)throw new Error("useFormEventHub must be used within a FormEventProvider");return e},le=(e,t,r)=>{const{eventHub:n,formData:s}=xt();return A.useMemo(()=>n.createFieldEventHandlers(e,t,s,r),[n,e,t,s,r])},wt=({formData:e,onChange:t,required:r,disabled:n,readonly:s,schema:i,idSchema:l})=>{const a=le(l.$id,i),c=p=>{const d=p.replace(/\D/g,""),h=d.length;return h<4?d:h<7?`(${d.slice(0,3)}) ${d.slice(3)}`:`(${d.slice(0,3)}) ${d.slice(3,6)}-${d.slice(6,10)}`},f=async p=>{const d=c(p.target.value);t(d),await a.onChange(d)};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:l.$id,children:[i.title||"Phone Number",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:l.$id,type:"tel",value:e||"",onChange:f,disabled:n||s,placeholder:"(555) 123-4567",maxLength:14})]})},Ct=({formData:e,onChange:t,required:r,disabled:n,readonly:s,schema:i,uiSchema:l,idSchema:a})=>{var S,v;const c=((S=l==null?void 0:l["ui:options"])==null?void 0:S.currency)||"USD",f=((v=l==null?void 0:l["ui:options"])==null?void 0:v.symbol)||"$",p=le(a.$id,i),d=g=>{const b=parseFloat(g.replace(/[^0-9.-]+/g,""));return isNaN(b)?"":b.toFixed(2)},h=async g=>{const b=g.target.value.replace(/[^0-9.-]+/g,""),C=b?parseFloat(b):void 0;t(C),await p.onChange(C)},w=async g=>{const b=d(g.target.value),C=b?parseFloat(b):void 0;t(C),await p.onBlur(C)};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:a.$id,children:[i.title||"Amount",r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsxs("div",{className:"relative",children:[u.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:String(f)}),u.jsx(te,{id:a.$id,type:"text",inputMode:"decimal",value:e||"",onChange:h,onBlur:w,disabled:n||s,placeholder:"0.00",className:"pl-8 pr-12"}),u.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:String(c)})]})]})},St={address:bt,phone:wt,currency:Ct},Rt=({id:e,value:t,required:r,disabled:n,readonly:s,label:i,onChange:l,onBlur:a,onFocus:c,schema:f})=>{const p=le(e,f),d=async S=>{const v=S.target.value;l(v),await p.onChange(v)},h=async S=>{const v=S.target.value;a&&a(e,v),await p.onBlur(v)},w=async S=>{const v=S.target.value;c&&c(e,v),await p.onFocus(v)};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:e,children:[i||f.title,r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:e,type:"color",value:t||"#000000",required:r,disabled:n||s,onChange:d,onBlur:h,onFocus:w,className:"h-10 w-full cursor-pointer"})]})},jt=({id:e,value:t,required:r,disabled:n,readonly:s,label:i,onChange:l,onBlur:a,onFocus:c,options:f,schema:p})=>{const d=f.inputType||"date",h=le(e,p),w=async g=>{const b=g.target.value;l(b),await h.onChange(b)},S=async g=>{const b=g.target.value;a&&a(e,b),await h.onBlur(b)},v=async g=>{const b=g.target.value;c&&c(e,b),await h.onFocus(b)};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:e,children:[i||p.title,r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{id:e,type:d,value:t||"",required:r,disabled:n||s,onChange:w,onBlur:S,onFocus:v,min:typeof f.minDate=="string"||typeof f.minDate=="number"?f.minDate:void 0,max:typeof f.maxDate=="string"||typeof f.maxDate=="number"?f.maxDate:void 0,className:"w-full"})]})},fn=Ve("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ke=y.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},i)=>{const l=n?en:"button";return u.jsx(l,{className:L(fn({variant:t,size:r,className:e})),ref:i,...s})});ke.displayName="Button";const pn=Ve("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Et({className:e,variant:t,...r}){return u.jsx("div",{className:L(pn({variant:t}),e),...r})}/**
|
|
31
|
+
* @license lucide-react v0.303.0 - ISC
|
|
32
|
+
*
|
|
33
|
+
* This source code is licensed under the ISC license.
|
|
34
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
35
|
+
*/var mn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
36
|
+
* @license lucide-react v0.303.0 - ISC
|
|
37
|
+
*
|
|
38
|
+
* This source code is licensed under the ISC license.
|
|
39
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
40
|
+
*/const hn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),kt=(e,t)=>{const r=A.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:a="",children:c,...f},p)=>A.createElement("svg",{ref:p,...mn,width:s,height:s,stroke:n,strokeWidth:l?Number(i)*24/Number(s):i,className:["lucide",`lucide-${hn(e)}`,a].join(" "),...f},[...t.map(([d,h])=>A.createElement(d,h)),...Array.isArray(c)?c:[c]]));return r.displayName=`${e}`,r};/**
|
|
41
|
+
* @license lucide-react v0.303.0 - ISC
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the ISC license.
|
|
44
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/const gn=kt("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
|
|
46
|
+
* @license lucide-react v0.303.0 - ISC
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the ISC license.
|
|
49
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
+
*/const _t=kt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Pt=({id:e,value:t,required:r,disabled:n,readonly:s,label:i,onChange:l,options:a,schema:c})=>{const f=A.useRef(null),p=a.accept||"*/*",d=a.multiple||!1,h=le(e,c),w=async g=>{const b=g.target.files;if(!b)return;let C;if(d){const E=Array.from(b).map(j=>({name:j.name,size:j.size,type:j.type,lastModified:j.lastModified}));C=E,l(E)}else{const E=b[0];E&&(C={name:E.name,size:E.size,type:E.type,lastModified:E.lastModified},l(C))}C&&await h.onChange(C)},S=async()=>{f.current&&(f.current.value=""),l(null),await h.onChange(null)},v=g=>g<1024?g+" B":g<1024*1024?(g/1024).toFixed(1)+" KB":(g/(1024*1024)).toFixed(1)+" MB";return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:e,children:[i||c.title,r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx(te,{ref:f,id:e,type:"file",accept:p,multiple:d,required:r,disabled:n||s,onChange:w,className:"cursor-pointer"}),t&&u.jsx("div",{className:"space-y-2",children:d&&Array.isArray(t)?u.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((g,b)=>u.jsxs(Et,{variant:"secondary",className:"flex items-center gap-1 pr-1",children:[u.jsxs("span",{className:"text-xs",children:[g.name," (",v(g.size),")"]}),!n&&!s&&u.jsx(ke,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-transparent",onClick:S,children:u.jsx(_t,{className:"h-3 w-3"})})]},b))}):t&&typeof t=="object"&&"name"in t?u.jsxs(Et,{variant:"secondary",className:"inline-flex items-center gap-1 pr-1",children:[u.jsxs("span",{className:"text-xs",children:[t.name," (",v(t.size),")"]}),!n&&!s&&u.jsx(ke,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-transparent",onClick:S,children:u.jsx(_t,{className:"h-3 w-3"})})]}):null})]})};function Nt(e,[t,r]){return Math.min(r,Math.max(t,e))}function he(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Tt(e,t=[]){let r=[];function n(i,l){const a=y.createContext(l),c=r.length;r=[...r,l];const f=d=>{var b;const{scope:h,children:w,...S}=d,v=((b=h==null?void 0:h[e])==null?void 0:b[c])||a,g=y.useMemo(()=>S,Object.values(S));return u.jsx(v.Provider,{value:g,children:w})};f.displayName=i+"Provider";function p(d,h){var v;const w=((v=h==null?void 0:h[e])==null?void 0:v[c])||a,S=y.useContext(w);if(S)return S;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[f,p]}const s=()=>{const i=r.map(l=>y.createContext(l));return function(a){const c=(a==null?void 0:a[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return s.scopeName=e,[n,bn(s,...t)]}function bn(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const l=n.reduce((a,{useScope:c,scopeName:f})=>{const d=c(i)[`__scope${f}`];return{...a,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return r.scopeName=t.scopeName,r}var At=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},vn=y[" useInsertionEffect ".trim().toString()]||At;function yn({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,i,l]=xn({defaultProp:t,onChange:r}),a=e!==void 0,c=a?e:s;{const p=y.useRef(e!==void 0);y.useEffect(()=>{const d=p.current;d!==a&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=a},[a,n])}const f=y.useCallback(p=>{var d;if(a){const h=wn(p)?p(e):p;h!==e&&((d=l.current)==null||d.call(l,h))}else i(p)},[a,e,i,l]);return[c,f]}function xn({defaultProp:e,onChange:t}){const[r,n]=y.useState(e),s=y.useRef(r),i=y.useRef(t);return vn(()=>{i.current=t},[t]),y.useEffect(()=>{var l;s.current!==r&&((l=i.current)==null||l.call(i,r),s.current=r)},[r,s]),[r,n,i]}function wn(e){return typeof e=="function"}var Cn=y.createContext(void 0);function Sn(e){const t=y.useContext(Cn);return e||t||"ltr"}function Rn(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function jn(e){const[t,r]=y.useState(void 0);return At(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let l,a;if("borderBoxSize"in i){const c=i.borderBoxSize,f=Array.isArray(c)?c[0]:c;l=f.inlineSize,a=f.blockSize}else l=e.offsetWidth,a=e.offsetHeight;r({width:l,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}function En(e){const t=e+"CollectionProvider",[r,n]=Tt(t),[s,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),l=v=>{const{scope:g,children:b}=v,C=A.useRef(null),E=A.useRef(new Map).current;return u.jsx(s,{scope:g,itemMap:E,collectionRef:C,children:b})};l.displayName=t;const a=e+"CollectionSlot",c=Ee(a),f=A.forwardRef((v,g)=>{const{scope:b,children:C}=v,E=i(a,b),j=ae(g,E.collectionRef);return u.jsx(c,{ref:j,children:C})});f.displayName=a;const p=e+"CollectionItemSlot",d="data-radix-collection-item",h=Ee(p),w=A.forwardRef((v,g)=>{const{scope:b,children:C,...E}=v,j=A.useRef(null),z=ae(g,j),B=i(p,b);return A.useEffect(()=>(B.itemMap.set(j,{ref:j,...E}),()=>void B.itemMap.delete(j))),u.jsx(h,{[d]:"",ref:z,children:C})});w.displayName=p;function S(v){const g=i(e+"CollectionConsumer",v);return A.useCallback(()=>{const C=g.collectionRef.current;if(!C)return[];const E=Array.from(C.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((B,J)=>E.indexOf(B.ref.current)-E.indexOf(J.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:l,Slot:f,ItemSlot:w},S,n]}var Ft=["PageUp","PageDown"],Ot=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Mt={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ge="Slider",[Ie,kn,_n]=En(ge),[$t,Ao]=Tt(ge,[_n]),[Pn,_e]=$t(ge),Vt=y.forwardRef((e,t)=>{const{name:r,min:n=0,max:s=100,step:i=1,orientation:l="horizontal",disabled:a=!1,minStepsBetweenThumbs:c=0,defaultValue:f=[n],value:p,onValueChange:d=()=>{},onValueCommit:h=()=>{},inverted:w=!1,form:S,...v}=e,g=y.useRef(new Set),b=y.useRef(0),E=l==="horizontal"?Nn:Tn,[j=[],z]=yn({prop:p,defaultProp:f,onChange:$=>{var W;(W=[...g.current][b.current])==null||W.focus(),d($)}}),B=y.useRef(j);function J($){const P=$n(j,$);D($,P)}function ce($){D($,b.current)}function ne(){const $=B.current[b.current];j[b.current]!==$&&h(j)}function D($,P,{commit:W}={commit:!1}){const H=Dn(i),Q=Wn(Math.round(($-n)/i)*i+n,H),q=Nt(Q,[n,s]);z((X=[])=>{const G=On(X,q,P);if(zn(G,c*i)){b.current=G.indexOf(q);const re=String(G)!==String(X);return re&&W&&h(G),re?G:X}else return X})}return u.jsx(Pn,{scope:e.__scopeSlider,name:r,disabled:a,min:n,max:s,valueIndexToChangeRef:b,thumbs:g.current,values:j,orientation:l,form:S,children:u.jsx(Ie.Provider,{scope:e.__scopeSlider,children:u.jsx(Ie.Slot,{scope:e.__scopeSlider,children:u.jsx(E,{"aria-disabled":a,"data-disabled":a?"":void 0,...v,ref:t,onPointerDown:he(v.onPointerDown,()=>{a||(B.current=j)}),min:n,max:s,inverted:w,onSlideStart:a?void 0:J,onSlideMove:a?void 0:ce,onSlideEnd:a?void 0:ne,onHomeKeyDown:()=>!a&&D(n,0,{commit:!0}),onEndKeyDown:()=>!a&&D(s,j.length-1,{commit:!0}),onStepKeyDown:({event:$,direction:P})=>{if(!a){const Q=Ft.includes($.key)||$.shiftKey&&Ot.includes($.key)?10:1,q=b.current,X=j[q],G=i*Q*P;D(X+G,q,{commit:!0})}}})})})})});Vt.displayName=ge;var[It,zt]=$t(ge,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Nn=y.forwardRef((e,t)=>{const{min:r,max:n,dir:s,inverted:i,onSlideStart:l,onSlideMove:a,onSlideEnd:c,onStepKeyDown:f,...p}=e,[d,h]=y.useState(null),w=ae(t,E=>h(E)),S=y.useRef(void 0),v=Sn(s),g=v==="ltr",b=g&&!i||!g&&i;function C(E){const j=S.current||d.getBoundingClientRect(),z=[0,j.width],J=We(z,b?[r,n]:[n,r]);return S.current=j,J(E-j.left)}return u.jsx(It,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:u.jsx(Dt,{dir:v,"data-orientation":"horizontal",...p,ref:w,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:E=>{const j=C(E.clientX);l==null||l(j)},onSlideMove:E=>{const j=C(E.clientX);a==null||a(j)},onSlideEnd:()=>{S.current=void 0,c==null||c()},onStepKeyDown:E=>{const z=Mt[b?"from-left":"from-right"].includes(E.key);f==null||f({event:E,direction:z?-1:1})}})})}),Tn=y.forwardRef((e,t)=>{const{min:r,max:n,inverted:s,onSlideStart:i,onSlideMove:l,onSlideEnd:a,onStepKeyDown:c,...f}=e,p=y.useRef(null),d=ae(t,p),h=y.useRef(void 0),w=!s;function S(v){const g=h.current||p.current.getBoundingClientRect(),b=[0,g.height],E=We(b,w?[n,r]:[r,n]);return h.current=g,E(v-g.top)}return u.jsx(It,{scope:e.__scopeSlider,startEdge:w?"bottom":"top",endEdge:w?"top":"bottom",size:"height",direction:w?1:-1,children:u.jsx(Dt,{"data-orientation":"vertical",...f,ref:d,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:v=>{const g=S(v.clientY);i==null||i(g)},onSlideMove:v=>{const g=S(v.clientY);l==null||l(g)},onSlideEnd:()=>{h.current=void 0,a==null||a()},onStepKeyDown:v=>{const b=Mt[w?"from-bottom":"from-top"].includes(v.key);c==null||c({event:v,direction:b?-1:1})}})})}),Dt=y.forwardRef((e,t)=>{const{__scopeSlider:r,onSlideStart:n,onSlideMove:s,onSlideEnd:i,onHomeKeyDown:l,onEndKeyDown:a,onStepKeyDown:c,...f}=e,p=_e(ge,r);return u.jsx(me.span,{...f,ref:t,onKeyDown:he(e.onKeyDown,d=>{d.key==="Home"?(l(d),d.preventDefault()):d.key==="End"?(a(d),d.preventDefault()):Ft.concat(Ot).includes(d.key)&&(c(d),d.preventDefault())}),onPointerDown:he(e.onPointerDown,d=>{const h=d.target;h.setPointerCapture(d.pointerId),d.preventDefault(),p.thumbs.has(h)?h.focus():n(d)}),onPointerMove:he(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&s(d)}),onPointerUp:he(e.onPointerUp,d=>{const h=d.target;h.hasPointerCapture(d.pointerId)&&(h.releasePointerCapture(d.pointerId),i(d))})})}),Wt="SliderTrack",Lt=y.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,s=_e(Wt,r);return u.jsx(me.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});Lt.displayName=Wt;var ze="SliderRange",Bt=y.forwardRef((e,t)=>{const{__scopeSlider:r,...n}=e,s=_e(ze,r),i=zt(ze,r),l=y.useRef(null),a=ae(t,l),c=s.values.length,f=s.values.map(h=>Gt(h,s.min,s.max)),p=c>1?Math.min(...f):0,d=100-Math.max(...f);return u.jsx(me.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[i.startEdge]:p+"%",[i.endEdge]:d+"%"}})});Bt.displayName=ze;var De="SliderThumb",Ht=y.forwardRef((e,t)=>{const r=kn(e.__scopeSlider),[n,s]=y.useState(null),i=ae(t,a=>s(a)),l=y.useMemo(()=>n?r().findIndex(a=>a.ref.current===n):-1,[r,n]);return u.jsx(An,{...e,ref:i,index:l})}),An=y.forwardRef((e,t)=>{const{__scopeSlider:r,index:n,name:s,...i}=e,l=_e(De,r),a=zt(De,r),[c,f]=y.useState(null),p=ae(t,C=>f(C)),d=c?l.form||!!c.closest("form"):!0,h=jn(c),w=l.values[n],S=w===void 0?0:Gt(w,l.min,l.max),v=Mn(n,l.values.length),g=h==null?void 0:h[a.size],b=g?Vn(g,S,a.direction):0;return y.useEffect(()=>{if(c)return l.thumbs.add(c),()=>{l.thumbs.delete(c)}},[c,l.thumbs]),u.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${S}% + ${b}px)`},children:[u.jsx(Ie.ItemSlot,{scope:e.__scopeSlider,children:u.jsx(me.span,{role:"slider","aria-label":e["aria-label"]||v,"aria-valuemin":l.min,"aria-valuenow":w,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...i,ref:p,style:w===void 0?{display:"none"}:e.style,onFocus:he(e.onFocus,()=>{l.valueIndexToChangeRef.current=n})})}),d&&u.jsx(Ut,{name:s??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:w},n)]})});Ht.displayName=De;var Fn="RadioBubbleInput",Ut=y.forwardRef(({__scopeSlider:e,value:t,...r},n)=>{const s=y.useRef(null),i=ae(s,n),l=Rn(t);return y.useEffect(()=>{const a=s.current;if(!a)return;const c=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(c,"value").set;if(l!==t&&p){const d=new Event("input",{bubbles:!0});p.call(a,t),a.dispatchEvent(d)}},[l,t]),u.jsx(me.input,{style:{display:"none"},...r,ref:i,defaultValue:t})});Ut.displayName=Fn;function On(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function Gt(e,t,r){const i=100/(r-t)*(e-t);return Nt(i,[0,100])}function Mn(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function $n(e,t){if(e.length===1)return 0;const r=e.map(s=>Math.abs(s-t)),n=Math.min(...r);return r.indexOf(n)}function Vn(e,t,r){const n=e/2,i=We([0,50],[0,n]);return(n-i(t)*r)*r}function In(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function zn(e,t){if(t>0){const r=In(e);return Math.min(...r)>=t}return!0}function We(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Dn(e){return(String(e).split(".")[1]||"").length}function Wn(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}var Kt=Vt,Ln=Lt,Bn=Bt,Hn=Ht;const Yt=y.forwardRef(({className:e,...t},r)=>u.jsxs(Kt,{ref:r,className:L("relative flex w-full touch-none select-none items-center",e),...t,children:[u.jsx(Ln,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:u.jsx(Bn,{className:"absolute h-full bg-primary"})}),u.jsx(Hn,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));Yt.displayName=Kt.displayName;const qt=({id:e,value:t,required:r,disabled:n,readonly:s,label:i,onChange:l,onBlur:a,schema:c})=>{const f=c.minimum||0,p=c.maximum||100,d=c.multipleOf||1,h=le(e,c),w=async S=>{const v=S[0];l(v),a&&a(e,v),await h.onChange(v)};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs(Y,{htmlFor:e,children:[i||c.title,r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx("span",{className:"text-sm font-medium tabular-nums",children:t||f})]}),u.jsx(Yt,{id:e,min:f,max:p,step:d,value:[t||f],onValueChange:w,disabled:n||s,className:"w-full"})]})},Jt=({id:e,value:t,required:r,disabled:n,readonly:s,label:i,onChange:l,options:a,schema:c})=>{const f=Number(a.max||c.maximum||5),p=Array.from({length:f},(w,S)=>S+1),d=le(e,c),h=async w=>{!n&&!s&&(l(w),await d.onChange(w))};return u.jsxs("div",{className:"space-y-2",children:[u.jsxs(Y,{htmlFor:e,children:[i||c.title,r&&u.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),u.jsx("div",{className:"flex items-center gap-1",role:"radiogroup","aria-labelledby":e,children:p.map(w=>u.jsx(ke,{type:"button",variant:"ghost",size:"icon",className:L("h-8 w-8 p-0 hover:bg-transparent",n||s?"cursor-not-allowed opacity-50":"cursor-pointer"),onClick:()=>h(w),disabled:n||s,"aria-label":`Rate ${w} out of ${f}`,role:"radio","aria-checked":w===t,children:u.jsx(gn,{className:L("h-5 w-5 transition-colors",w<=(t||0)?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})},w))})]})},Qt={color:Rt,date:jt,file:Pt,range:qt,rating:Jt},Un={small:"space-y-2",medium:"space-y-4",large:"space-y-6"},Gn=({children:e,spacing:t="medium",className:r=""})=>u.jsx("div",{className:L("flex flex-col",Un[t],r),children:e}),Kn={small:"space-x-2",medium:"space-x-4",large:"space-x-6"},Yn={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},qn=({children:e,spacing:t="medium",align:r="center",className:n=""})=>u.jsx("div",{className:L("flex flex-row",Kn[t],Yn[r],n),children:e}),Jn={small:"gap-2",medium:"gap-4",large:"gap-6"},Qn=({children:e,columns:t="auto-fit",gap:r="medium",minItemWidth:n="250px",className:s=""})=>{const i={display:"grid"};return typeof t=="number"?i.gridTemplateColumns=`repeat(${t}, 1fr)`:i.gridTemplateColumns=`repeat(${t}, minmax(${n}, 1fr))`,u.jsx("div",{className:L("grid",Jn[r],s),style:i,children:e})};class Xn{constructor(t){ue(this,"handlers");this.handlers=t}async handleBeforeSubmit(t){return this.handlers.beforeSubmit?await this.handlers.beforeSubmit(t):t}async handleAfterSubmit(t){this.handlers.afterSubmit&&await this.handlers.afterSubmit(t)}async handleBeforeValidation(t){return this.handlers.beforeValidation?await this.handlers.beforeValidation(t):t}async handleAfterValidation(t,r){this.handlers.afterValidation&&await this.handlers.afterValidation(t,r)}}class Xt{constructor(t,r={},n=[]){ue(this,"formHandlers");ue(this,"fieldHandlers");ue(this,"webhooks");ue(this,"debounceTimers",new Map);ue(this,"webhookQueue",[]);ue(this,"isProcessingQueue",!1);this.formHandlers=t,this.fieldHandlers=r,this.webhooks=n}async handleBeforeSubmit(t){return this.formHandlers.beforeSubmit?await this.formHandlers.beforeSubmit(t):t}async handleAfterSubmit(t){this.formHandlers.afterSubmit&&await this.formHandlers.afterSubmit(t)}async handleBeforeValidation(t){return this.formHandlers.beforeValidation?await this.formHandlers.beforeValidation(t):t}async handleAfterValidation(t,r){this.formHandlers.afterValidation&&await this.formHandlers.afterValidation(t,r)}async handleFieldEvent(t,r,n,s,i,l){const a={eventType:t,fieldId:r,fieldValue:n,schema:s,formData:i,timestamp:Date.now(),fieldPath:l};try{switch(t){case"focus":this.fieldHandlers.onFieldFocus&&await this.fieldHandlers.onFieldFocus(a);break;case"blur":this.fieldHandlers.onFieldBlur&&await this.fieldHandlers.onFieldBlur(a);break;case"change":this.fieldHandlers.onFieldChange&&await this.fieldHandlers.onFieldChange(a);break}}catch(c){console.error(`Error in field event handler (${t}):`,c)}this.processWebhooks(a)}processWebhooks(t){const r=this.webhooks.filter(n=>!n.events||n.events.includes(t.eventType));for(const n of r)n.debounceMs&&n.debounceMs>0?this.debounceWebhook(n,t):this.queueWebhook(n,t)}debounceWebhook(t,r){const n=`${t.url}-${r.fieldId}-${r.eventType}`;this.debounceTimers.has(n)&&clearTimeout(this.debounceTimers.get(n));const s=setTimeout(()=>{this.queueWebhook(t,r),this.debounceTimers.delete(n)},t.debounceMs);this.debounceTimers.set(n,s)}queueWebhook(t,r){this.webhookQueue.push({config:t,event:r,retryCount:0}),this.isProcessingQueue||this.processWebhookQueue()}async processWebhookQueue(){if(!(this.isProcessingQueue||this.webhookQueue.length===0)){for(this.isProcessingQueue=!0;this.webhookQueue.length>0;){const t=this.webhookQueue.shift();try{await this.callWebhook(t.config,t.event)}catch(r){const n=t.config.retries||3;t.retryCount<n?(t.retryCount++,setTimeout(()=>{this.webhookQueue.push(t)},Math.pow(2,t.retryCount)*1e3)):console.error(`Webhook failed after ${n} retries:`,r)}}this.isProcessingQueue=!1}}async callWebhook(t,r){const n={event:r,timestamp:Date.now(),source:"extended-dynamic-forms"},s={method:t.method||"POST",headers:{"Content-Type":"application/json",...t.headers},body:JSON.stringify(n)};t.timeout&&(s.signal=AbortSignal.timeout(t.timeout));const i=await fetch(t.url,s);if(!i.ok)throw new Error(`Webhook request failed: ${i.status} ${i.statusText}`)}createFieldEventHandlers(t,r,n,s){return{onFocus:i=>this.handleFieldEvent("focus",t,i,r,n,s),onBlur:i=>this.handleFieldEvent("blur",t,i,r,n,s),onChange:i=>this.handleFieldEvent("change",t,i,r,n,s)}}cleanup(){for(const t of this.debounceTimers.values())clearTimeout(t);this.debounceTimers.clear()}}const Zt={cloneFormData:e=>JSON.parse(JSON.stringify(e)),mergeFormData:(e,t)=>({...e,...t}),getNestedValue:(e,t)=>{const r=t.split(".");let n=e;for(const s of r)if(n&&typeof n=="object"&&s in n)n=n[s];else return;return n},setNestedValue:(e,t,r)=>{const n=t.split("."),s={...e};let i=s;for(let l=0;l<n.length-1;l++){const a=n[l];(!(a in i)||typeof i[a]!="object")&&(i[a]={}),i=i[a]}return i[n[n.length-1]]=r,s},removeEmptyValues:e=>{if(Array.isArray(e))return e.filter(t=>t!=null&&t!=="");if(e!==null&&typeof e=="object"){const t={};for(const[r,n]of Object.entries(e))n!=null&&n!==""&&(t[r]=Zt.removeEmptyValues(n));return t}return e}},er={getRequiredFields:e=>e.required||[],isFieldRequired:(e,t)=>(e.required||[]).includes(t),getFieldSchema:(e,t)=>{const r=t.split(".");let n=e;for(const s of r)if(n.type==="object"&&n.properties)n=n.properties[s];else if(n.type==="array"&&n.items)n=n.items;else return;return n},mergeSchemas:(e,t)=>({...e,...t,properties:{...e.properties,...t.properties},required:[...new Set([...e.required||[],...t.required||[]])]}),getAllFieldPaths:(e,t="")=>{const r=[];if(e.type==="object"&&e.properties)for(const[n,s]of Object.entries(e.properties)){const i=t?`${t}.${n}`:n;r.push(i),r.push(...er.getAllFieldPaths(s,i))}return r}},Zn={isValidEmail:e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),isValidPhone:e=>/^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/.test(e),isValidUrl:e=>{try{return new URL(e),!0}catch{return!1}},isValidDate:e=>{const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())},isInRange:(e,t,r)=>!(t!==void 0&&e<t||r!==void 0&&e>r),getValidationMessage:(e,t)=>({required:"This field is required",email:"Please enter a valid email address",phone:"Please enter a valid phone number",url:"Please enter a valid URL",date:"Please enter a valid date",min:`Value must be at least ${t==null?void 0:t.min}`,max:`Value must be at most ${t==null?void 0:t.max}`,minLength:`Must be at least ${t==null?void 0:t.minLength} characters`,maxLength:`Must be at most ${t==null?void 0:t.maxLength} characters`})[e]||"Invalid value"},eo=({schema:e,uiSchema:t,formData:r,onSubmit:n,onChange:s,onError:i,onBlur:l,onFocus:a,beforeSubmit:c,afterSubmit:f,beforeValidation:p,afterValidation:d,onFieldFocus:h,onFieldBlur:w,onFieldChange:S,webhooks:v=[],widgets:g={},fields:b={},templates:C={},...E})=>{const j=A.useRef(null),z=A.useMemo(()=>{const D=new Xt({beforeSubmit:c,afterSubmit:f,beforeValidation:p,afterValidation:d},{onFieldFocus:h,onFieldBlur:w,onFieldChange:S},v);return j.current=D,D},[c,f,p,d,h,w,S,v]);A.useEffect(()=>()=>{j.current&&j.current.cleanup()},[]);const B=async(D,$)=>{const P=await z.handleBeforeSubmit(D);n&&await n(P,$),await z.handleAfterSubmit(P)},J=D=>{s&&s(D)},ce={...Qt,...g},ne={...St,...b};return u.jsx(yt,{eventHub:z,formData:r,children:u.jsx(vr,{schema:e,uiSchema:t,formData:r,validator:yr,onSubmit:B,onChange:J,onError:i,onBlur:l,onFocus:a,widgets:ce,fields:ne,templates:C,...E})})};_.AddressField=bt,_.ColorWidget=Rt,_.CurrencyField=Ct,_.DateWidget=jt,_.ExtendedForm=eo,_.FileWidget=Pt,_.FormEventHub=Xt,_.FormEventManager=Xn,_.FormEventProvider=yt,_.GridLayout=Qn,_.HorizontalLayout=qn,_.PhoneField=wt,_.RangeWidget=qt,_.RatingWidget=Jt,_.VerticalLayout=Gn,_.cn=L,_.customFields=St,_.customWidgets=Qt,_.formDataUtils=Zt,_.schemaUtils=er,_.useFieldEventHandlers=le,_.useFormEventHub=xt,_.validationUtils=Zn,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface GridLayoutProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
columns?: number | 'auto-fit' | 'auto-fill';
|
|
6
|
+
gap?: 'small' | 'medium' | 'large';
|
|
7
|
+
minItemWidth?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const GridLayout: React.FC<GridLayoutProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface HorizontalLayoutProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
spacing?: 'small' | 'medium' | 'large';
|
|
6
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const HorizontalLayout: React.FC<HorizontalLayoutProps>;
|
|
10
|
+
export {};
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.absolute{position:absolute}.relative{position:relative}.left-3{left:.75rem}.right-3{right:.75rem}.top-1\/2{top:50%}.ml-1{margin-left:.25rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-full{height:100%}.w-10{width:2.5rem}.w-3{width:.75rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-8{width:2rem}.w-full{width:100%}.grow{flex-grow:1}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.border{border-width:1px}.border-2{border-width:2px}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-transparent{border-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-primary{background-color:hsl(var(--primary))}.bg-secondary{background-color:hsl(var(--secondary))}.fill-yellow-400{fill:#facc15}.p-0{padding:0}.p-6{padding:1.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pr-12{padding-right:3rem}.pt-0{padding-top:0}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.text-card-foreground{color:hsl(var(--card-foreground))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.underline-offset-4{text-underline-offset:4px}.opacity-50{opacity:.5}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-transparent:hover{background-color:transparent}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:underline:hover{text-decoration-line:underline}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { FormProps } from '@rjsf/core';
|
|
2
|
+
import { RJSFSchema, UiSchema } from '@rjsf/utils';
|
|
3
|
+
|
|
4
|
+
export interface FormEventHandlers {
|
|
5
|
+
beforeSubmit?: (data: any) => Promise<any> | any;
|
|
6
|
+
afterSubmit?: (data: any) => Promise<void> | void;
|
|
7
|
+
beforeValidation?: (data: any) => Promise<any> | any;
|
|
8
|
+
afterValidation?: (data: any, errors: any) => Promise<void> | void;
|
|
9
|
+
}
|
|
10
|
+
export interface FormFieldEvent {
|
|
11
|
+
eventType: 'focus' | 'blur' | 'change';
|
|
12
|
+
fieldId: string;
|
|
13
|
+
fieldValue: any;
|
|
14
|
+
schema?: any;
|
|
15
|
+
formData?: any;
|
|
16
|
+
timestamp: number;
|
|
17
|
+
fieldPath?: string[];
|
|
18
|
+
}
|
|
19
|
+
export interface WebhookConfig {
|
|
20
|
+
url: string;
|
|
21
|
+
method?: 'POST' | 'PUT' | 'PATCH';
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
events?: ('focus' | 'blur' | 'change')[];
|
|
24
|
+
debounceMs?: number;
|
|
25
|
+
retries?: number;
|
|
26
|
+
timeout?: number;
|
|
27
|
+
}
|
|
28
|
+
export interface FieldEventHandlers {
|
|
29
|
+
onFieldFocus?: (event: FormFieldEvent) => Promise<void> | void;
|
|
30
|
+
onFieldBlur?: (event: FormFieldEvent) => Promise<void> | void;
|
|
31
|
+
onFieldChange?: (event: FormFieldEvent) => Promise<void> | void;
|
|
32
|
+
}
|
|
33
|
+
export interface ExtendedFormProps extends Omit<FormProps, 'validator'>, FormEventHandlers, FieldEventHandlers {
|
|
34
|
+
schema: RJSFSchema;
|
|
35
|
+
uiSchema?: UiSchema;
|
|
36
|
+
webhooks?: WebhookConfig[];
|
|
37
|
+
}
|
|
38
|
+
export interface CustomWidgetProps {
|
|
39
|
+
label?: string;
|
|
40
|
+
required?: boolean;
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
readonly?: boolean;
|
|
43
|
+
autofocus?: boolean;
|
|
44
|
+
placeholder?: string;
|
|
45
|
+
help?: string;
|
|
46
|
+
rawErrors?: string[];
|
|
47
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const formDataUtils: {
|
|
2
|
+
/**
|
|
3
|
+
* Deep clone form data to avoid mutations
|
|
4
|
+
*/
|
|
5
|
+
cloneFormData: (data: any) => any;
|
|
6
|
+
/**
|
|
7
|
+
* Merge two form data objects
|
|
8
|
+
*/
|
|
9
|
+
mergeFormData: (current: any, updates: any) => any;
|
|
10
|
+
/**
|
|
11
|
+
* Get nested value from form data using dot notation
|
|
12
|
+
*/
|
|
13
|
+
getNestedValue: (data: any, path: string) => any;
|
|
14
|
+
/**
|
|
15
|
+
* Set nested value in form data using dot notation
|
|
16
|
+
*/
|
|
17
|
+
setNestedValue: (data: any, path: string, value: any) => any;
|
|
18
|
+
/**
|
|
19
|
+
* Remove empty values from form data
|
|
20
|
+
*/
|
|
21
|
+
removeEmptyValues: (data: any) => any;
|
|
22
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { RJSFSchema } from '@rjsf/utils';
|
|
2
|
+
|
|
3
|
+
export declare const schemaUtils: {
|
|
4
|
+
/**
|
|
5
|
+
* Get required fields from schema
|
|
6
|
+
*/
|
|
7
|
+
getRequiredFields: (schema: RJSFSchema) => string[];
|
|
8
|
+
/**
|
|
9
|
+
* Check if a field is required
|
|
10
|
+
*/
|
|
11
|
+
isFieldRequired: (schema: RJSFSchema, fieldName: string) => boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Get field schema by path
|
|
14
|
+
*/
|
|
15
|
+
getFieldSchema: (schema: RJSFSchema, path: string) => RJSFSchema | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Merge two schemas
|
|
18
|
+
*/
|
|
19
|
+
mergeSchemas: (schema1: RJSFSchema, schema2: RJSFSchema) => RJSFSchema;
|
|
20
|
+
/**
|
|
21
|
+
* Get all field paths from schema
|
|
22
|
+
*/
|
|
23
|
+
getAllFieldPaths: (schema: RJSFSchema, prefix?: string) => string[];
|
|
24
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const validationUtils: {
|
|
2
|
+
/**
|
|
3
|
+
* Validate email format
|
|
4
|
+
*/
|
|
5
|
+
isValidEmail: (email: string) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Validate phone number format
|
|
8
|
+
*/
|
|
9
|
+
isValidPhone: (phone: string) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Validate URL format
|
|
12
|
+
*/
|
|
13
|
+
isValidUrl: (url: string) => boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Validate date format
|
|
16
|
+
*/
|
|
17
|
+
isValidDate: (date: string) => boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Validate number in range
|
|
20
|
+
*/
|
|
21
|
+
isInRange: (value: number, min?: number, max?: number) => boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Custom validation messages
|
|
24
|
+
*/
|
|
25
|
+
getValidationMessage: (type: string, params?: any) => string;
|
|
26
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ColorWidget } from './input/ColorWidget';
|
|
2
|
+
import { DateWidget } from './date/DateWidget';
|
|
3
|
+
import { FileWidget } from './file/FileWidget';
|
|
4
|
+
import { RangeWidget } from './input/RangeWidget';
|
|
5
|
+
import { RatingWidget } from './input/RatingWidget';
|
|
6
|
+
|
|
7
|
+
export declare const customWidgets: {
|
|
8
|
+
color: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
|
|
9
|
+
date: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
|
|
10
|
+
file: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
|
|
11
|
+
range: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
|
|
12
|
+
rating: import('react').FC<import('@rjsf/utils').WidgetProps<any, import('@rjsf/utils').RJSFSchema, any>>;
|
|
13
|
+
};
|
|
14
|
+
export { ColorWidget, DateWidget, FileWidget, RangeWidget, RatingWidget, };
|
package/package.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "extended-dynamic-forms",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Extended React JSON Schema Form (RJSF) v6 with custom components, widgets, templates, layouts, and form events",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.es.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"dev": "vite",
|
|
13
|
+
"build": "tsc && vite build",
|
|
14
|
+
"preview": "vite preview",
|
|
15
|
+
"test": "vitest",
|
|
16
|
+
"test:ui": "vitest --ui",
|
|
17
|
+
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
18
|
+
"prepublishOnly": "npm run build"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"react",
|
|
22
|
+
"json-schema",
|
|
23
|
+
"forms",
|
|
24
|
+
"rjsf",
|
|
25
|
+
"dynamic-forms",
|
|
26
|
+
"typescript"
|
|
27
|
+
],
|
|
28
|
+
"author": "",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"react": "^18.0.0",
|
|
32
|
+
"react-dom": "^18.0.0",
|
|
33
|
+
"@rjsf/core": "^6.0.0-beta.11",
|
|
34
|
+
"@rjsf/utils": "^6.0.0-beta.11",
|
|
35
|
+
"@rjsf/validator-ajv8": "^6.0.0-beta.11",
|
|
36
|
+
"@rjsf/shadcn": "^6.0.0-beta.10"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/react": "^18.2.43",
|
|
40
|
+
"@types/react-dom": "^18.2.17",
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
|
42
|
+
"@typescript-eslint/parser": "^6.14.0",
|
|
43
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
44
|
+
"eslint": "^8.55.0",
|
|
45
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
46
|
+
"eslint-plugin-react-refresh": "^0.4.5",
|
|
47
|
+
"react": "^18.2.0",
|
|
48
|
+
"react-dom": "^18.2.0",
|
|
49
|
+
"typescript": "^5.2.2",
|
|
50
|
+
"vite": "^5.0.8",
|
|
51
|
+
"vite-plugin-dts": "^3.7.0",
|
|
52
|
+
"vitest": "^1.0.0",
|
|
53
|
+
"@rjsf/core": "^5.15.0",
|
|
54
|
+
"@rjsf/utils": "^5.15.0",
|
|
55
|
+
"@rjsf/validator-ajv8": "^5.15.0",
|
|
56
|
+
"@rjsf/shadcn": "^0.1.0",
|
|
57
|
+
"@radix-ui/react-label": "^2.0.2",
|
|
58
|
+
"@radix-ui/react-select": "^2.0.0",
|
|
59
|
+
"@radix-ui/react-slider": "^1.1.2",
|
|
60
|
+
"@radix-ui/react-switch": "^1.0.3",
|
|
61
|
+
"class-variance-authority": "^0.7.0",
|
|
62
|
+
"clsx": "^2.1.0",
|
|
63
|
+
"lucide-react": "^0.303.0",
|
|
64
|
+
"tailwind-merge": "^2.2.0",
|
|
65
|
+
"tailwindcss-animate": "^1.0.7",
|
|
66
|
+
"autoprefixer": "^10.4.16",
|
|
67
|
+
"postcss": "^8.4.32",
|
|
68
|
+
"tailwindcss": "^3.4.0"
|
|
69
|
+
},
|
|
70
|
+
"dependencies": {
|
|
71
|
+
"@radix-ui/react-slot": "^1.0.2"
|
|
72
|
+
}
|
|
73
|
+
}
|