@sakura-ui/forms 0.1.11 → 0.1.12
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../src/components/FileInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAI7C,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CACvC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAA;IACzC,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC/C,IAAI,GAAG,CAAC,UAAU,EAAE;QAClB,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAA;KAC1B;IAED,MAAM,IAAI,GAAG
|
|
1
|
+
{"version":3,"file":"FileInput.js","sourceRoot":"","sources":["../../src/components/FileInput.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAA;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAI7C,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CACvC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACb,MAAM,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAA;IACzC,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAA;IAC/C,IAAI,GAAG,CAAC,UAAU,EAAE;QAClB,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAA;KAC1B;IAED,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;KAgBZ,CAAA;IAED,MAAM,SAAS,GAAG;;;;;;;;;KASjB,CAAA;IACD,MAAM,OAAO,GAAG;;;;KAIf,CAAA;IACD,MAAM,UAAU,GAAG;;;;;;;;KAQlB,CAAA;IAED,OAAO,CACL,gBACE,IAAI,EAAC,MAAM,EACX,EAAE,EAAE,SAAS,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,EAC1B,SAAS,EAAE,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,CAAC,sBAC5C,GAAG,CAAC,YAAY,uBACf,GAAG,CAAC,cAAc,kBACvB,GAAG,CAAC,SAAS,IAAI,KAAK,mBACrB,GAAG,CAAC,UAAU,IAAI,KAAK,EACtC,GAAG,EAAE,GAAG,KACJ,SAAS,GACb,CACH,CAAA;AACH,CAAC,CACF,CAAA;AAED,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Se;function Rr(){if(Se)return W;Se=1;var f=g,
|
|
9
|
+
*/var Se;function Rr(){if(Se)return W;Se=1;var f=g,m=Symbol.for("react.element"),v=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function b(c,o,T){var h,y={},j=null,_=null;T!==void 0&&(j=""+T),o.key!==void 0&&(j=""+o.key),o.ref!==void 0&&(_=o.ref);for(h in o)u.call(o,h)&&!a.hasOwnProperty(h)&&(y[h]=o[h]);if(c&&c.defaultProps)for(h in o=c.defaultProps,o)y[h]===void 0&&(y[h]=o[h]);return{$$typeof:m,type:c,key:j,ref:_,props:y,_owner:n.current}}return W.Fragment=v,W.jsx=b,W.jsxs=b,W}var L={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Oe;function Er(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&function(){var f=g,
|
|
17
|
+
*/var Oe;function Er(){return Oe||(Oe=1,process.env.NODE_ENV!=="production"&&function(){var f=g,m=Symbol.for("react.element"),v=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),c=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),F=Symbol.iterator,We="@@iterator";function Le(e){if(e===null||typeof e!="object")return null;var r=F&&e[F]||e[We];return typeof r=="function"?r:null}var q=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),i=1;i<r;i++)t[i-1]=arguments[i];Ye("error",e,t)}}function Ye(e,r,t){{var i=q.ReactDebugCurrentFrame,p=i.getStackAddendum();p!==""&&(r+="%s",t=t.concat([p]));var x=t.map(function(d){return String(d)});x.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,x)}}var Ve=!1,Ue=!1,Ge=!1,Be=!1,Je=!1,oe;oe=Symbol.for("react.module.reference");function ze(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===a||Je||e===n||e===T||e===h||Be||e===_||Ve||Ue||Ge||typeof e=="object"&&e!==null&&(e.$$typeof===j||e.$$typeof===y||e.$$typeof===b||e.$$typeof===c||e.$$typeof===o||e.$$typeof===oe||e.getModuleId!==void 0))}function He(e,r,t){var i=e.displayName;if(i)return i;var p=r.displayName||r.name||"";return p!==""?t+"("+p+")":t}function le(e){return e.displayName||"Context"}function I(e){if(e==null)return null;if(typeof e.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case u:return"Fragment";case v:return"Portal";case a:return"Profiler";case n:return"StrictMode";case T:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case c:var r=e;return le(r)+".Consumer";case b:var t=e;return le(t._context)+".Provider";case o:return He(e,e.render,"ForwardRef");case y:var i=e.displayName||null;return i!==null?i:I(e.type)||"Memo";case j:{var p=e,x=p._payload,d=p._init;try{return I(d(x))}catch{return null}}}return null}var k=Object.assign,A=0,ue,ce,de,fe,pe,ve,me;function be(){}be.__reactDisabledLog=!0;function Ke(){{if(A===0){ue=console.log,ce=console.info,de=console.warn,fe=console.error,pe=console.group,ve=console.groupCollapsed,me=console.groupEnd;var e={configurable:!0,enumerable:!0,value:be,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}A++}}function Xe(){{if(A--,A===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k({},e,{value:ue}),info:k({},e,{value:ce}),warn:k({},e,{value:de}),error:k({},e,{value:fe}),group:k({},e,{value:pe}),groupCollapsed:k({},e,{value:ve}),groupEnd:k({},e,{value:me})})}A<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var H=q.ReactCurrentDispatcher,K;function Y(e,r,t){{if(K===void 0)try{throw Error()}catch(p){var i=p.stack.trim().match(/\n( *(at )?)/);K=i&&i[1]||""}return`
|
|
18
18
|
`+K+e}}var X=!1,V;{var Ze=typeof WeakMap=="function"?WeakMap:Map;V=new Ze}function he(e,r){if(!e||X)return"";{var t=V.get(e);if(t!==void 0)return t}var i;X=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var x;x=H.current,H.current=null,Ke();try{if(r){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(S){i=S}Reflect.construct(e,[],d)}else{try{d.call()}catch(S){i=S}e.call(d.prototype)}}else{try{throw Error()}catch(S){i=S}e()}}catch(S){if(S&&i&&typeof S.stack=="string"){for(var l=S.stack.split(`
|
|
19
19
|
`),C=i.stack.split(`
|
|
20
20
|
`),R=l.length-1,E=C.length-1;R>=1&&E>=0&&l[R]!==C[E];)E--;for(;R>=1&&E>=0;R--,E--)if(l[R]!==C[E]){if(R!==1||E!==1)do if(R--,E--,E<0||l[R]!==C[E]){var P=`
|
|
21
|
-
`+l[R].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&V.set(e,P),P}while(R>=1&&E>=0);break}}}finally{X=!1,H.current=x,Xe(),Error.prepareStackTrace=p}var M=e?e.displayName||e.name:"",Ie=M?Y(M):"";return typeof e=="function"&&V.set(e,Ie),Ie}function Qe(e,r,t){return he(e,!1)}function er(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function U(e,r,t){if(e==null)return"";if(typeof e=="function")return he(e,er(e));if(typeof e=="string")return Y(e);switch(e){case T:return Y("Suspense");case h:return Y("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case o:return Qe(e.render);case y:return U(e.type,r,t);case j:{var i=e,p=i._payload,x=i._init;try{return U(x(p),r,t)}catch{}}}return""}var G=Object.prototype.hasOwnProperty,xe={},ge=q.ReactDebugCurrentFrame;function B(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);ge.setExtraStackFrame(t)}else ge.setExtraStackFrame(null)}function rr(e,r,t,i,p){{var x=Function.call.bind(G);for(var d in e)if(x(e,d)){var l=void 0;try{if(typeof e[d]!="function"){var C=Error((i||"React class")+": "+t+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw C.name="Invariant Violation",C}l=e[d](r,d,i,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){l=R}l&&!(l instanceof Error)&&(B(p),w("%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).",i||"React class",t,d,typeof l),B(null)),l instanceof Error&&!(l.message in xe)&&(xe[l.message]=!0,B(p),w("Failed %s type: %s",t,l.message),B(null))}}}var tr=Array.isArray;function Z(e){return tr(e)}function ar(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function nr(e){try{return ye(e),!1}catch{return!0}}function ye(e){return""+e}function Re(e){if(nr(e))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ar(e)),ye(e)}var $=q.ReactCurrentOwner,sr={key:!0,ref:!0,__self:!0,__source:!0},Ee,_e,Q;Q={};function ir(e){if(G.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function or(e){if(G.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function lr(e,r){if(typeof e.ref=="string"&&$.current&&r&&$.current.stateNode!==r){var t=I($.current.type);Q[t]||(w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',I($.current.type),e.ref),Q[t]=!0)}}function ur(e,r){{var t=function(){Ee||(Ee=!0,w("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function cr(e,r){{var t=function(){_e||(_e=!0,w("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var dr=function(e,r,t,i,p,x,d){var l={$$typeof:
|
|
21
|
+
`+l[R].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&V.set(e,P),P}while(R>=1&&E>=0);break}}}finally{X=!1,H.current=x,Xe(),Error.prepareStackTrace=p}var M=e?e.displayName||e.name:"",Ie=M?Y(M):"";return typeof e=="function"&&V.set(e,Ie),Ie}function Qe(e,r,t){return he(e,!1)}function er(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function U(e,r,t){if(e==null)return"";if(typeof e=="function")return he(e,er(e));if(typeof e=="string")return Y(e);switch(e){case T:return Y("Suspense");case h:return Y("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case o:return Qe(e.render);case y:return U(e.type,r,t);case j:{var i=e,p=i._payload,x=i._init;try{return U(x(p),r,t)}catch{}}}return""}var G=Object.prototype.hasOwnProperty,xe={},ge=q.ReactDebugCurrentFrame;function B(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);ge.setExtraStackFrame(t)}else ge.setExtraStackFrame(null)}function rr(e,r,t,i,p){{var x=Function.call.bind(G);for(var d in e)if(x(e,d)){var l=void 0;try{if(typeof e[d]!="function"){var C=Error((i||"React class")+": "+t+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw C.name="Invariant Violation",C}l=e[d](r,d,i,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(R){l=R}l&&!(l instanceof Error)&&(B(p),w("%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).",i||"React class",t,d,typeof l),B(null)),l instanceof Error&&!(l.message in xe)&&(xe[l.message]=!0,B(p),w("Failed %s type: %s",t,l.message),B(null))}}}var tr=Array.isArray;function Z(e){return tr(e)}function ar(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function nr(e){try{return ye(e),!1}catch{return!0}}function ye(e){return""+e}function Re(e){if(nr(e))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ar(e)),ye(e)}var $=q.ReactCurrentOwner,sr={key:!0,ref:!0,__self:!0,__source:!0},Ee,_e,Q;Q={};function ir(e){if(G.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function or(e){if(G.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function lr(e,r){if(typeof e.ref=="string"&&$.current&&r&&$.current.stateNode!==r){var t=I($.current.type);Q[t]||(w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',I($.current.type),e.ref),Q[t]=!0)}}function ur(e,r){{var t=function(){Ee||(Ee=!0,w("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function cr(e,r){{var t=function(){_e||(_e=!0,w("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var dr=function(e,r,t,i,p,x,d){var l={$$typeof:m,type:e,key:r,ref:t,props:d,_owner:x};return l._store={},Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:p}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l};function fr(e,r,t,i,p){{var x,d={},l=null,C=null;t!==void 0&&(Re(t),l=""+t),or(r)&&(Re(r.key),l=""+r.key),ir(r)&&(C=r.ref,lr(r,p));for(x in r)G.call(r,x)&&!sr.hasOwnProperty(x)&&(d[x]=r[x]);if(e&&e.defaultProps){var R=e.defaultProps;for(x in R)d[x]===void 0&&(d[x]=R[x])}if(l||C){var E=typeof e=="function"?e.displayName||e.name||"Unknown":e;l&&ur(d,E),C&&cr(d,E)}return dr(e,l,C,p,i,$.current,d)}}var ee=q.ReactCurrentOwner,Te=q.ReactDebugCurrentFrame;function D(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(t)}else Te.setExtraStackFrame(null)}var re;re=!1;function te(e){return typeof e=="object"&&e!==null&&e.$$typeof===m}function je(){{if(ee.current){var e=I(ee.current.type);if(e)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+e+"`."}return""}}function pr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
24
24
|
|
|
25
25
|
Check your code at `+r+":"+t+"."}return""}}var we={};function vr(e){{var r=je();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=vr(r);if(we[t])return;we[t]=!0;var i="";e&&e._owner&&e._owner!==ee.current&&(i=" It was passed a child from "+I(e._owner.type)+"."),D(e),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,i),D(null)}}function Ne(e,r){{if(typeof e!="object")return;if(Z(e))for(var t=0;t<e.length;t++){var i=e[t];te(i)&&Ce(i,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var p=Le(e);if(typeof p=="function"&&p!==e.entries)for(var x=p.call(e),d;!(d=x.next()).done;)te(d.value)&&Ce(d.value,r)}}}function
|
|
27
|
+
Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=vr(r);if(we[t])return;we[t]=!0;var i="";e&&e._owner&&e._owner!==ee.current&&(i=" It was passed a child from "+I(e._owner.type)+"."),D(e),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,i),D(null)}}function Ne(e,r){{if(typeof e!="object")return;if(Z(e))for(var t=0;t<e.length;t++){var i=e[t];te(i)&&Ce(i,r)}else if(te(e))e._store&&(e._store.validated=!0);else if(e){var p=Le(e);if(typeof p=="function"&&p!==e.entries)for(var x=p.call(e),d;!(d=x.next()).done;)te(d.value)&&Ce(d.value,r)}}}function mr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===o||r.$$typeof===y))t=r.propTypes;else return;if(t){var i=I(r);rr(t,e.props,"prop",i,e)}else if(r.PropTypes!==void 0&&!re){re=!0;var p=I(r);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",p||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function br(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var i=r[t];if(i!=="children"&&i!=="key"){D(e),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",i),D(null);break}}e.ref!==null&&(D(e),w("Invalid attribute `ref` supplied to `React.Fragment`."),D(null))}}function Pe(e,r,t,i,p,x){{var d=ze(e);if(!d){var l="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(l+=" 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 C=pr(p);C?l+=C:l+=je();var R;e===null?R="null":Z(e)?R="array":e!==void 0&&e.$$typeof===m?(R="<"+(I(e.type)||"Unknown")+" />",l=" Did you accidentally export a JSX literal instead of a component?"):R=typeof e,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,l)}var E=fr(e,r,t,p,x);if(E==null)return E;if(d){var P=r.children;if(P!==void 0)if(i)if(Z(P)){for(var M=0;M<P.length;M++)Ne(P[M],e);Object.freeze&&Object.freeze(P)}else w("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 Ne(P,e)}return e===u?br(E):mr(E),E}}function hr(e,r,t){return Pe(e,r,t,!0)}function xr(e,r,t){return Pe(e,r,t,!1)}var gr=xr,yr=hr;L.Fragment=u,L.jsx=gr,L.jsxs=yr}()),L}process.env.NODE_ENV==="production"?ae.exports=Rr():ae.exports=Er();var s=ae.exports;const N=(...f)=>f.filter(Boolean).join(" "),O=g.createContext({helperTextId:"",errorMessageId:"",isInvalid:!1,isRequired:!1}),ne=g.forwardRef((f,m)=>{const{className:v,children:u,...n}=f,a=g.useContext(O);a.isRequired&&(n.required=!0),a.groupName&&(n.name=a.groupName);const b=`
|
|
28
28
|
inline-block
|
|
29
29
|
text-base
|
|
30
30
|
cursor-pointer
|
|
@@ -50,7 +50,7 @@ Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(
|
|
|
50
50
|
peer-focus-visible:ring-2
|
|
51
51
|
peer-focus-visible:ring-offset-2
|
|
52
52
|
peer-focus-visible:ring-wood-500
|
|
53
|
-
`;return s.jsx("label",{htmlFor:n.id,className:N(
|
|
53
|
+
`;return s.jsx("label",{htmlFor:n.id,className:N(b,v),children:s.jsxs("span",{className:"flex items-center",children:[s.jsx("input",{className:c,type:"checkbox","aria-describedby":a.helperTextId,"aria-errormessage":a.errorMessageId,"aria-invalid":a.isInvalid??!1,"aria-required":a.isRequired??!1,...n,ref:m}),s.jsx("span",{className:o,children:s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",children:s.jsx("path",{d:"m9.55 17.65-5.325-5.325 1.05-1.075 4.275 4.275 9.175-9.175 1.05 1.075Z"})})}),s.jsx("span",{className:"peer-disabled:text-sumi-500",children:u})]})})});ne.displayName="Checkbox";const se=g.forwardRef((f,m)=>{const{className:v,children:u,...n}=f,a=g.useContext(O);a.isRequired&&(n.required=!0),a.groupName&&(n.name=a.groupName);const b=`
|
|
54
54
|
inline-block
|
|
55
55
|
text-base
|
|
56
56
|
cursor-pointer
|
|
@@ -75,7 +75,7 @@ Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(
|
|
|
75
75
|
peer-focus-visible:ring-2
|
|
76
76
|
peer-focus-visible:ring-offset-2
|
|
77
77
|
peer-focus-visible:ring-wood-500
|
|
78
|
-
`;return s.jsx("label",{htmlFor:n.id,className:N(
|
|
78
|
+
`;return s.jsx("label",{htmlFor:n.id,className:N(b,v),children:s.jsxs("span",{className:"flex items-center",children:[s.jsx("input",{className:c,type:"radio","aria-describedby":a.helperTextId,"aria-errormessage":a.errorMessageId,"aria-invalid":a.isInvalid??!1,"aria-required":a.isRequired??!1,...n,ref:m}),s.jsx("span",{className:o}),s.jsx("span",{className:"peer-disabled:text-sumi-500",children:u})]})})});se.displayName="Radio";const ke=g.forwardRef((f,m)=>{const{className:v,children:u,...n}=f,a=g.useContext(O);a.isRequired&&(n.required=!0);const b=`
|
|
79
79
|
peer
|
|
80
80
|
cursor-pointer
|
|
81
81
|
appearance-none
|
|
@@ -101,12 +101,14 @@ Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(
|
|
|
101
101
|
px-2
|
|
102
102
|
pointer-events-none
|
|
103
103
|
peer-disabled:fill-sumi-500
|
|
104
|
-
`;return s.jsxs("label",{className:"inline-block relative",children:[s.jsx("select",{id:n.id??a.id,className:N(
|
|
104
|
+
`;return s.jsxs("label",{className:"inline-block relative",children:[s.jsx("select",{id:n.id??a.id,className:N(b,f.className),"aria-describedby":a.helperTextId,"aria-errormessage":a.errorMessageId,"aria-invalid":a.isInvalid??!1,"aria-required":a.isRequired??!1,...n,ref:m,children:u}),s.jsx("span",{className:c,children:s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",children:s.jsx("path",{d:"M12 15.05 6.35 9.4 7.4 8.35l4.6 4.6 4.6-4.6 1.05 1.05Z"})})})]})}),Fe=g.forwardRef((f,m)=>{const{className:v,...u}=f,n=g.useContext(O);n.isRequired&&(u.required=!0);const a=`
|
|
105
105
|
file:mr-2
|
|
106
106
|
file:inline-block
|
|
107
107
|
file:text-button
|
|
108
108
|
file:text-center
|
|
109
109
|
file:cursor-pointer
|
|
110
|
+
file:select-none
|
|
111
|
+
file:touch-manipulation
|
|
110
112
|
file:whitespace-nowrap
|
|
111
113
|
file:border
|
|
112
114
|
file:border-solid
|
|
@@ -115,7 +117,7 @@ Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(
|
|
|
115
117
|
file:hover:border-sea-900
|
|
116
118
|
file:disabled:border-sumi-500
|
|
117
119
|
file:disabled:cursor-not-allowed
|
|
118
|
-
`,
|
|
120
|
+
`,b=`
|
|
119
121
|
file:text-sea-800
|
|
120
122
|
file:bg-transparent
|
|
121
123
|
file:active:bg-sea-200
|
|
@@ -136,7 +138,7 @@ Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(
|
|
|
136
138
|
focus:outline-2
|
|
137
139
|
focus:outline-wood-600
|
|
138
140
|
aria-invalid:text-sun-800
|
|
139
|
-
`;return s.jsx("input",{type:"file",id:u.id??n.id,className:N(a,
|
|
141
|
+
`;return s.jsx("input",{type:"file",id:u.id??n.id,className:N(a,b,c,o,v),"aria-describedby":n.helperTextId,"aria-errormessage":n.errorMessageId,"aria-invalid":n.isInvalid??!1,"aria-required":n.isRequired??!1,ref:m,...u})});Fe.displayName="FileInput";const qe=g.forwardRef((f,m)=>{const{className:v,...u}=f,n=g.useContext(O);n.isRequired&&(u.required=!0);const a=`
|
|
140
142
|
p-4
|
|
141
143
|
rounded-lg
|
|
142
144
|
border
|
|
@@ -150,7 +152,7 @@ Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(
|
|
|
150
152
|
disabled:text-sumi-500
|
|
151
153
|
disabled:border-sumi-500
|
|
152
154
|
aria-invalid:border-sun-800
|
|
153
|
-
`;return s.jsx("input",{type:"text",id:u.id??n.id,className:N(a,v),"aria-describedby":n.helperTextId,"aria-errormessage":n.errorMessageId,"aria-invalid":n.isInvalid??!1,"aria-required":n.isRequired??!1,ref:
|
|
155
|
+
`;return s.jsx("input",{type:"text",id:u.id??n.id,className:N(a,v),"aria-describedby":n.helperTextId,"aria-errormessage":n.errorMessageId,"aria-invalid":n.isInvalid??!1,"aria-required":n.isRequired??!1,ref:m,...u})});qe.displayName="Input";const ie=g.forwardRef((f,m)=>{const{className:v,children:u,onChange:n,maxLength:a,...b}=f,[c,o]=g.useState(0),T=_=>{n&&n(_),o(_.target.value.length)},h=g.useContext(O);h.isRequired&&(b.required=!0);const y=c>(a||0)?"text-sun-800":"text-sumi-700",j=`
|
|
154
156
|
p-4
|
|
155
157
|
rounded-lg
|
|
156
158
|
border
|
|
@@ -164,8 +166,8 @@ Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(
|
|
|
164
166
|
disabled:text-sumi-500
|
|
165
167
|
disabled:border-sumi-500
|
|
166
168
|
aria-invalid:border-sun-800
|
|
167
|
-
`;return s.jsxs(s.Fragment,{children:[s.jsx("textarea",{id:
|
|
169
|
+
`;return s.jsxs(s.Fragment,{children:[s.jsx("textarea",{id:b.id??h.id,className:N(j,v),"aria-describedby":h.helperTextId,"aria-errormessage":h.errorMessageId,"aria-invalid":h.isInvalid??!1,"aria-required":h.isRequired??!1,onChange:T,...b,ref:m,children:u}),a?s.jsxs("p",{className:"text-sup text-sumi-700",children:[s.jsx("span",{className:y,children:c}),"/",s.jsx("span",{children:a})]}):""]})});ie.displayName="Textarea";const J=g.forwardRef((f,m)=>{const v=g.useId(),{labelText:u,className:n,helperText:a,errorMessage:b,isInvalid:c,isRequired:o,children:T,...h}=f,y={id:f.htmlFor??`input-${v}`,helperTextId:`helper-text-${v}`,errorMessageId:`error-message-${v}`,isInvalid:c??!1,isRequired:o??!1},j=`
|
|
168
170
|
text-sup text-sumi-700
|
|
169
171
|
`,_=`
|
|
170
172
|
text-sup text-sun-800
|
|
171
|
-
`;return s.jsx(O.Provider,{value:y,children:s.jsxs("div",{className:N("mb-4",n),children:[s.jsxs("label",{className:N("block mb-2 text-label",c&&"text-sun-800"),htmlFor:y.id,ref:
|
|
173
|
+
`;return s.jsx(O.Provider,{value:y,children:s.jsxs("div",{className:N("mb-4",n),children:[s.jsxs("label",{className:N("block mb-2 text-label",c&&"text-sun-800"),htmlFor:y.id,ref:m,...h,children:[u,o&&s.jsx("span",{className:"text-label text-sun-800",children:" *"})]}),a&&s.jsx("p",{id:y.helperTextId,className:N(j,"mb-2"),children:a}),T,c&&s.jsx("p",{id:y.errorMessageId,className:N(_,a?"mt-1":"mt-2"),children:b})]})})});J.displayName="LabelControl";const z=g.forwardRef((f,m)=>{const v=g.useId(),{labelText:u,className:n,helperText:a,errorMessage:b,isInvalid:c,isRequired:o,direction:T,children:h,...y}=f,_={groupName:y.name??`group-${v}`,helperTextId:`helper-text-${v}`,errorMessageId:`error-message-${v}`,isInvalid:c??!1,isRequired:o??!1},F=T??"flex-col";return s.jsx(O.Provider,{value:_,children:s.jsxs("fieldset",{className:N("mb-4",n),ref:m,...y,children:[s.jsx("legend",{children:s.jsxs("p",{className:N("block mb-2 text-label",c&&"text-sun-800"),children:[u,o&&s.jsx("span",{className:"text-sun-800",children:" *"})]})}),s.jsx("div",{className:N("inline-flex",F),children:h}),a&&s.jsx("p",{id:_.helperTextId,className:"text-sup text-sumi-700 mt-2",children:a}),c&&s.jsx("p",{id:_.errorMessageId,className:N("text-sup text-sun-800",a?"mt-1":"mt-2"),children:b})]})})});z.displayName="FieldsetControl";const De=g.forwardRef((f,m)=>{const{items:v,onChange:u,className:n,labelText:a,helperText:b,errorMessage:c,isInvalid:o,isRequired:T,...h}=f;return s.jsx(z,{className:n,labelText:a,helperText:b,errorMessage:c,isInvalid:o,isRequired:T,ref:m,...h,children:v.map(({label:y,value:j},_)=>s.jsx(ne,{value:j,onChange:u,children:y},_))})});De.displayName="CheckboxGroup";const Me=g.forwardRef((f,m)=>{const{items:v,onChange:u,className:n,labelText:a,helperText:b,errorMessage:c,isInvalid:o,isRequired:T,defaultValue:h,...y}=f;return s.jsx(z,{className:n,labelText:a,helperText:b,errorMessage:c,isInvalid:o,isRequired:T,ref:m,...y,children:v.map(({label:j,value:_},F)=>s.jsx(se,{value:_,onChange:u,defaultChecked:h===_,children:j},F))})});Me.displayName="RadioGroup";const Ae=g.forwardRef((f,m)=>{const{className:v,labelText:u,helperText:n,errorMessage:a,isInvalid:b,isRequired:c,...o}=f;return s.jsx(J,{className:v,labelText:u,helperText:n,errorMessage:a,isInvalid:b,isRequired:c,children:s.jsx(ke,{ref:m,...o})})});Ae.displayName="SelectControl";const $e=g.forwardRef((f,m)=>{const{className:v,labelText:u,helperText:n,errorMessage:a,isInvalid:b,isRequired:c,...o}=f;return s.jsx(J,{className:v,labelText:u,helperText:n,errorMessage:a,isInvalid:b,isRequired:c,children:s.jsx(ie,{ref:m,...o})})});$e.displayName="TextareaControl";exports.Checkbox=ne;exports.CheckboxGroup=De;exports.FieldsetControl=z;exports.FileInput=Fe;exports.Input=qe;exports.LabelControl=J;exports.Radio=se;exports.RadioGroup=Me;exports.Select=ke;exports.SelectControl=Ae;exports.Textarea=ie;exports.TextareaControl=$e;
|
package/dist/index.es.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../src/components/FileInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC;CAAG;AAE/E,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"FileInput.d.ts","sourceRoot":"","sources":["../../../src/components/FileInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC;CAAG;AAE/E,eAAO,MAAM,SAAS,sGAiErB,CAAA"}
|