@arkyn/components 1.2.0 → 1.2.1
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/dist/bundle.js +704 -776
- package/dist/bundle.umd.cjs +11 -11
- package/dist/components/Form/FormError/index.d.ts +5 -1
- package/dist/components/Form/FormError/index.d.ts.map +1 -1
- package/dist/components/Form/FormError/index.js +2 -2
- package/dist/components/Input/CpfCpnjInput/getConfig.d.ts +1 -0
- package/dist/components/Input/CpfCpnjInput/getConfig.d.ts.map +1 -1
- package/dist/components/Input/CpfCpnjInput/getConfig.js +1 -1
- package/dist/components/Input/CurrencyInput/getConfig.d.ts +1 -0
- package/dist/components/Input/CurrencyInput/getConfig.d.ts.map +1 -1
- package/dist/components/Input/CurrencyInput/getConfig.js +1 -1
- package/dist/components/Input/MaskInput/getConfig.d.ts +1 -1
- package/dist/components/Input/MaskInput/getConfig.d.ts.map +1 -1
- package/dist/components/Input/MaskInput/getConfig.js +2 -2
- package/dist/components/Input/MaskInput/index.d.ts.map +1 -1
- package/dist/components/Input/MaskInput/index.js +58 -38
- package/dist/components/Input/SimpleInput/getConfig.d.ts +1 -0
- package/dist/components/Input/SimpleInput/getConfig.d.ts.map +1 -1
- package/dist/components/Input/SimpleInput/getConfig.js +1 -1
- package/dist/config/buildBadgeConfig.d.ts +1 -0
- package/dist/config/buildBadgeConfig.d.ts.map +1 -1
- package/dist/config/buildBreadcrumLinkConfig.d.ts +1 -0
- package/dist/config/buildBreadcrumLinkConfig.d.ts.map +1 -1
- package/dist/config/buildBreadcrumbConfig.d.ts +1 -0
- package/dist/config/buildBreadcrumbConfig.d.ts.map +1 -1
- package/dist/config/buildButtonConfig.d.ts +1 -0
- package/dist/config/buildButtonConfig.d.ts.map +1 -1
- package/dist/config/buildFormLabelConfig.d.ts +1 -0
- package/dist/config/buildFormLabelConfig.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Form/FormError/index.tsx +7 -2
- package/src/components/Input/CpfCpnjInput/getConfig.tsx +1 -1
- package/src/components/Input/CurrencyInput/getConfig.tsx +1 -1
- package/src/components/Input/MaskInput/getConfig.tsx +2 -1
- package/src/components/Input/MaskInput/index.tsx +66 -74
- package/src/components/Input/SimpleInput/getConfig.tsx +1 -1
package/dist/bundle.umd.cjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
(function(
|
1
|
+
(function(E,N){typeof exports=="object"&&typeof module<"u"?N(exports,require("react"),require("lucide-react"),require("@remix-run/react"),require("@react-input/mask"),require("framer-motion")):typeof define=="function"&&define.amd?define(["exports","react","lucide-react","@remix-run/react","@react-input/mask","framer-motion"],N):(E=typeof globalThis<"u"?globalThis:E||self,N(E["@arkyn/components"]={},E.require$$0,E.lucideReact,E.react,E.mask,E.framerMotion))})(this,function(E,N,Q,ye,er,be){"use strict";var xe={exports:{}},ce={};/**
|
2
2
|
* @license React
|
3
3
|
* react-jsx-runtime.production.min.js
|
4
4
|
*
|
@@ -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
|
9
|
+
*/var Ie;function rr(){if(Ie)return ce;Ie=1;var n=N,t=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,c=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function h(f,d,m){var g,x={},C=null,P=null;m!==void 0&&(C=""+m),d.key!==void 0&&(C=""+d.key),d.ref!==void 0&&(P=d.ref);for(g in d)o.call(d,g)&&!l.hasOwnProperty(g)&&(x[g]=d[g]);if(f&&f.defaultProps)for(g in d=f.defaultProps,d)x[g]===void 0&&(x[g]=d[g]);return{$$typeof:t,type:f,key:C,ref:P,props:x,_owner:c.current}}return ce.Fragment=a,ce.jsx=h,ce.jsxs=h,ce}var ue={};/**
|
10
10
|
* @license React
|
11
11
|
* react-jsx-runtime.development.js
|
12
12
|
*
|
@@ -14,19 +14,19 @@
|
|
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 Te;function
|
18
|
-
`+
|
19
|
-
`),
|
20
|
-
`),
|
21
|
-
`+
|
17
|
+
*/var Te;function nr(){return Te||(Te=1,process.env.NODE_ENV!=="production"&&function(){var n=N,t=Symbol.for("react.element"),a=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),f=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),T=Symbol.iterator,L="@@iterator";function $(e){if(e===null||typeof e!="object")return null;var r=T&&e[T]||e[L];return typeof r=="function"?r:null}var R=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(e){{for(var r=arguments.length,s=new Array(r>1?r-1:0),u=1;u<r;u++)s[u-1]=arguments[u];j("error",e,s)}}function j(e,r,s){{var u=R.ReactDebugCurrentFrame,b=u.getStackAddendum();b!==""&&(r+="%s",s=s.concat([b]));var _=s.map(function(p){return String(p)});_.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,_)}}var z=!1,V=!1,A=!1,W=!1,Y=!1,O;O=Symbol.for("react.module.reference");function K(e){return!!(typeof e=="string"||typeof e=="function"||e===o||e===l||Y||e===c||e===m||e===g||W||e===P||z||V||A||typeof e=="object"&&e!==null&&(e.$$typeof===C||e.$$typeof===x||e.$$typeof===h||e.$$typeof===f||e.$$typeof===d||e.$$typeof===O||e.getModuleId!==void 0))}function I(e,r,s){var u=e.displayName;if(u)return u;var b=r.displayName||r.name||"";return b!==""?s+"("+b+")":s}function Z(e){return e.displayName||"Context"}function S(e){if(e==null)return null;if(typeof e.tag=="number"&&y("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 o:return"Fragment";case a:return"Portal";case l:return"Profiler";case c:return"StrictMode";case m:return"Suspense";case g:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case f:var r=e;return Z(r)+".Consumer";case h:var s=e;return Z(s._context)+".Provider";case d:return I(e,e.render,"ForwardRef");case x:var u=e.displayName||null;return u!==null?u:S(e.type)||"Memo";case C:{var b=e,_=b._payload,p=b._init;try{return S(p(_))}catch{return null}}}return null}var B=Object.assign,J=0,X,re,ne,te,se,ae,M;function G(){}G.__reactDisabledLog=!0;function H(){{if(J===0){X=console.log,re=console.info,ne=console.warn,te=console.error,se=console.group,ae=console.groupCollapsed,M=console.groupEnd;var e={configurable:!0,enumerable:!0,value:G,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}J++}}function Ae(){{if(J--,J===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},e,{value:X}),info:B({},e,{value:re}),warn:B({},e,{value:ne}),error:B({},e,{value:te}),group:B({},e,{value:se}),groupCollapsed:B({},e,{value:ae}),groupEnd:B({},e,{value:M})})}J<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Re=R.ReactCurrentDispatcher,Ce;function me(e,r,s){{if(Ce===void 0)try{throw Error()}catch(b){var u=b.stack.trim().match(/\n( *(at )?)/);Ce=u&&u[1]||""}return`
|
18
|
+
`+Ce+e}}var Ee=!1,ve;{var $r=typeof WeakMap=="function"?WeakMap:Map;ve=new $r}function We(e,r){if(!e||Ee)return"";{var s=ve.get(e);if(s!==void 0)return s}var u;Ee=!0;var b=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var _;_=Re.current,Re.current=null,H();try{if(r){var p=function(){throw Error()};if(Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(D){u=D}Reflect.construct(e,[],p)}else{try{p.call()}catch(D){u=D}e.call(p.prototype)}}else{try{throw Error()}catch(D){u=D}e()}}catch(D){if(D&&u&&typeof D.stack=="string"){for(var v=D.stack.split(`
|
19
|
+
`),F=u.stack.split(`
|
20
|
+
`),k=v.length-1,w=F.length-1;k>=1&&w>=0&&v[k]!==F[w];)w--;for(;k>=1&&w>=0;k--,w--)if(v[k]!==F[w]){if(k!==1||w!==1)do if(k--,w--,w<0||v[k]!==F[w]){var U=`
|
21
|
+
`+v[k].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),typeof e=="function"&&ve.set(e,U),U}while(k>=1&&w>=0);break}}}finally{Ee=!1,Re.current=_,Ae(),Error.prepareStackTrace=b}var oe=e?e.displayName||e.name:"",q=oe?me(oe):"";return typeof e=="function"&&ve.set(e,q),q}function zr(e,r,s){return We(e,!1)}function Dr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function pe(e,r,s){if(e==null)return"";if(typeof e=="function")return We(e,Dr(e));if(typeof e=="string")return me(e);switch(e){case m:return me("Suspense");case g:return me("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return zr(e.render);case x:return pe(e.type,r,s);case C:{var u=e,b=u._payload,_=u._init;try{return pe(_(b),r,s)}catch{}}}return""}var fe=Object.prototype.hasOwnProperty,Be={},Ve=R.ReactDebugCurrentFrame;function ge(e){if(e){var r=e._owner,s=pe(e.type,e._source,r?r.type:null);Ve.setExtraStackFrame(s)}else Ve.setExtraStackFrame(null)}function Ar(e,r,s,u,b){{var _=Function.call.bind(fe);for(var p in e)if(_(e,p)){var v=void 0;try{if(typeof e[p]!="function"){var F=Error((u||"React class")+": "+s+" type `"+p+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[p]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw F.name="Invariant Violation",F}v=e[p](r,p,u,s,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(k){v=k}v&&!(v instanceof Error)&&(ge(b),y("%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).",u||"React class",s,p,typeof v),ge(null)),v instanceof Error&&!(v.message in Be)&&(Be[v.message]=!0,ge(b),y("Failed %s type: %s",s,v.message),ge(null))}}}var Wr=Array.isArray;function Se(e){return Wr(e)}function Br(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,s=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return s}}function Vr(e){try{return Ye(e),!1}catch{return!0}}function Ye(e){return""+e}function Me(e){if(Vr(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Br(e)),Ye(e)}var de=R.ReactCurrentOwner,Yr={key:!0,ref:!0,__self:!0,__source:!0},Ue,Ke,je;je={};function Mr(e){if(fe.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Ur(e){if(fe.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Kr(e,r){if(typeof e.ref=="string"&&de.current&&r&&de.current.stateNode!==r){var s=S(de.current.type);je[s]||(y('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',S(de.current.type),e.ref),je[s]=!0)}}function Jr(e,r){{var s=function(){Ue||(Ue=!0,y("%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))};s.isReactWarning=!0,Object.defineProperty(e,"key",{get:s,configurable:!0})}}function Gr(e,r){{var s=function(){Ke||(Ke=!0,y("%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))};s.isReactWarning=!0,Object.defineProperty(e,"ref",{get:s,configurable:!0})}}var Xr=function(e,r,s,u,b,_,p){var v={$$typeof:t,type:e,key:r,ref:s,props:p,_owner:_};return v._store={},Object.defineProperty(v._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(v,"_self",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.defineProperty(v,"_source",{configurable:!1,enumerable:!1,writable:!1,value:b}),Object.freeze&&(Object.freeze(v.props),Object.freeze(v)),v};function Hr(e,r,s,u,b){{var _,p={},v=null,F=null;s!==void 0&&(Me(s),v=""+s),Ur(r)&&(Me(r.key),v=""+r.key),Mr(r)&&(F=r.ref,Kr(r,b));for(_ in r)fe.call(r,_)&&!Yr.hasOwnProperty(_)&&(p[_]=r[_]);if(e&&e.defaultProps){var k=e.defaultProps;for(_ in k)p[_]===void 0&&(p[_]=k[_])}if(v||F){var w=typeof e=="function"?e.displayName||e.name||"Unknown":e;v&&Jr(p,w),F&&Gr(p,w)}return Xr(e,v,F,b,u,de.current,p)}}var ke=R.ReactCurrentOwner,Je=R.ReactDebugCurrentFrame;function ie(e){if(e){var r=e._owner,s=pe(e.type,e._source,r?r.type:null);Je.setExtraStackFrame(s)}else Je.setExtraStackFrame(null)}var Ne;Ne=!1;function Pe(e){return typeof e=="object"&&e!==null&&e.$$typeof===t}function Ge(){{if(ke.current){var e=S(ke.current.type);if(e)return`
|
22
22
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
23
|
+
Check the render method of \``+e+"`."}return""}}function Zr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),s=e.lineNumber;return`
|
24
24
|
|
25
|
-
Check your code at `+r+":"+
|
25
|
+
Check your code at `+r+":"+s+"."}return""}}var Xe={};function Qr(e){{var r=Ge();if(!r){var s=typeof e=="string"?e:e.displayName||e.name;s&&(r=`
|
26
26
|
|
27
|
-
Check the top-level render call using <`+
|
27
|
+
Check the top-level render call using <`+s+">.")}return r}}function He(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var s=Qr(r);if(Xe[s])return;Xe[s]=!0;var u="";e&&e._owner&&e._owner!==ke.current&&(u=" It was passed a child from "+S(e._owner.type)+"."),ie(e),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',s,u),ie(null)}}function Ze(e,r){{if(typeof e!="object")return;if(Se(e))for(var s=0;s<e.length;s++){var u=e[s];Pe(u)&&He(u,r)}else if(Pe(e))e._store&&(e._store.validated=!0);else if(e){var b=$(e);if(typeof b=="function"&&b!==e.entries)for(var _=b.call(e),p;!(p=_.next()).done;)Pe(p.value)&&He(p.value,r)}}}function qr(e){{var r=e.type;if(r==null||typeof r=="string")return;var s;if(typeof r=="function")s=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===d||r.$$typeof===x))s=r.propTypes;else return;if(s){var u=S(r);Ar(s,e.props,"prop",u,e)}else if(r.PropTypes!==void 0&&!Ne){Ne=!0;var b=S(r);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",b||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function en(e){{for(var r=Object.keys(e.props),s=0;s<r.length;s++){var u=r[s];if(u!=="children"&&u!=="key"){ie(e),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",u),ie(null);break}}e.ref!==null&&(ie(e),y("Invalid attribute `ref` supplied to `React.Fragment`."),ie(null))}}var Qe={};function qe(e,r,s,u,b,_){{var p=K(e);if(!p){var v="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(v+=" 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 F=Zr(b);F?v+=F:v+=Ge();var k;e===null?k="null":Se(e)?k="array":e!==void 0&&e.$$typeof===t?(k="<"+(S(e.type)||"Unknown")+" />",v=" Did you accidentally export a JSX literal instead of a component?"):k=typeof e,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",k,v)}var w=Hr(e,r,s,b,_);if(w==null)return w;if(p){var U=r.children;if(U!==void 0)if(u)if(Se(U)){for(var oe=0;oe<U.length;oe++)Ze(U[oe],e);Object.freeze&&Object.freeze(U)}else y("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 Ze(U,e)}if(fe.call(r,"key")){var q=S(e),D=Object.keys(r).filter(function(on){return on!=="key"}),we=D.length>0?"{key: someKey, "+D.join(": ..., ")+": ...}":"{key: someKey}";if(!Qe[q+we]){var an=D.length>0?"{"+D.join(": ..., ")+": ...}":"{}";y(`A props object containing a "key" prop is being spread into JSX:
|
28
28
|
let props = %s;
|
29
29
|
<%s {...props} />
|
30
30
|
React keys must be passed directly to JSX without using spread:
|
31
31
|
let props = %s;
|
32
|
-
<%s key={someKey} {...props} />`,Pe,ee,an,ee),Ze[ee+Pe]=!0}}return e===a?rn(w):en(w),w}}function nn(e,r,i){return Qe(e,r,i,!0)}function tn(e,r,i){return Qe(e,r,i,!1)}var sn=tn,on=nn;le.Fragment=a,le.jsx=sn,le.jsxs=on}()),le}process.env.NODE_ENV==="production"?be.exports=er():be.exports=rr();var o=be.exports;function he(n,s){return s?o.jsx(s,{size:n,strokeWidth:2.5}):o.jsx(o.Fragment,{})}function nr(n){const{variant:s="ghost",scheme:t="primary",size:a="md",leftIcon:c,rightIcon:l,className:h="",children:u,...f}=n,v={md:12,lg:14}[a];return{className:`arkyn_badge ${s} ${t} ${a} ${h}`.trim(),children:u,leftIcon:he(v,c),rightIcon:he(v,l),...f}}function tr(n){const{leftIcon:s,children:t,rightIcon:a,...c}=nr(n);return o.jsxs("div",{...c,children:[s,t,a]})}function sr(n){const{className:s,orientation:t="horizontal",...a}=n,c=`arkyn_divider ${t} ${s}`;return o.jsx("div",{className:c,...a})}function ir(n){const{isLoading:s=!1,scheme:t="primary",variant:a="solid",loadingText:c,size:l="md",leftIcon:h,rightIcon:u,disabled:f,className:m="",children:v,...y}=n,C={xs:12,sm:16,md:20,lg:24}[l];return{className:`arkyn_button loading_text_${!!c} ${a} ${t} ${l} loading_${s} ${m}`.trim(),loadingText:c,children:v,iconSize:C,disabled:f||s,leftIcon:he(C,h),rightIcon:he(C,u),...y}}function or(n){const{leftIcon:s,rightIcon:t,iconSize:a,children:c,loadingText:l,...h}=ir(n);return o.jsxs("button",{...h,children:[o.jsxs("div",{className:"spinner",children:[o.jsx(Q.Loader2,{size:a,strokeWidth:2.5}),l&&l]}),o.jsxs("div",{className:"content",children:[s,c,t]})]})}const Oe=N.createContext({});function ar({children:n,...s}){var u,f;const t=ye.useActionData(),a=N.useRef(null),c=((u=a.current)==null?void 0:u.name)||"",l=((f=t==null?void 0:t.fieldErrors)==null?void 0:f[c])||null,h=N.useId();return o.jsx(Oe.Provider,{value:{error:l,id:h,inputRef:a},children:o.jsx("section",{className:"arkyn_form_controller",...s,children:n})})}function re(){return N.useContext(Oe)}function cr(){const{error:n}=re();return n?o.jsx("strong",{className:"arkyn_form_error",children:n}):o.jsx(o.Fragment,{})}function ur(n){const{showAsterisk:s=!1,className:t="",...a}=n;return{className:`arkyn_form_label ${s?"show-asterisk":""} ${t}`.trim(),...a}}function lr(n){const{id:s}=re();return o.jsx("label",{...ur(n),htmlFor:s})}const Fe={xs:12,sm:16,md:20,lg:24};function fr(n){const{isLoading:s=!1,scheme:t="primary",variant:a="solid",size:c="md",icon:l,disabled:h,className:u="",...f}=n,m=`arkyn_icon_button ${a} ${t} ${c} loading_${s} ${u}`;return o.jsxs("button",{disabled:h||s,className:m.trim(),...f,children:[o.jsx("div",{className:"spinner",children:o.jsx(Q.Loader2,{size:Fe[c],strokeWidth:2.5})}),o.jsx("div",{className:"content "+c,children:o.jsx(l,{size:Fe[c],strokeWidth:2.5})})]})}function q(n,s,t){if(!n)return o.jsx(o.Fragment,{});if(typeof n=="string")return o.jsx("p",{className:t,children:n});const a=n;return o.jsx("p",{className:t,children:o.jsx(a,{color:"var(--secondary-600)",size:s,strokeWidth:2.5})})}function dr(n,s){const{isLoading:t,isError:a,size:c="md",className:l="",variant:h="solid",prefix:u,sufix:f,leftIcon:m,rightIcon:v,disabled:y,readOnly:S,onFocus:C,onBlur:T,title:O,style:F,onChange:b,...g}=n,E=v?"right":"left",L=`arkyn_input ${u?"hasPrefix":""} ${f?"hasSufix":""} ${h} ${c} ${y||S||t?"opacity":""} ${a?"errored":""} ${s?"focused":""} ${l}`,I={md:14,lg:16}[c];return{isLoading:t,className:L,prefix:q(u,I,"prefix"),sufix:q(f,I,"sufix"),LeftIcon:m,RightIcon:v,disabled:y,readOnly:S,onFocus:C,onBlur:T,title:O,style:F,onChange:b,loadingPosition:E,iconSize:I,Spinner:o.jsx(Q.Loader2,{className:"spinner",size:I,strokeWidth:2.5}),...g}}function _e(n){return n&&n.replace(/[^0-9]/g,"")}function hr(n,s){let t="",a=0;return Array.from(n).forEach((c,l)=>{s[l+a].match(/[0-9]/)||(t+=s[l+a],a++),t+=c}),t}function mr(n){return n.length>11?"CNPJ":"CPF"}const Le={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},vr=_e(Le.CNPJ).length;function gr(n){const[s,t]=N.useState(!1),[a,c]=N.useState(_e((n==null?void 0:n.defaultValue)||"")),l=N.useRef(null),{inputRef:h,id:u,error:f}=re(),m=h||l,v=n.isError||!!f,{disabled:y,title:S,style:C,className:T,prefix:O,sufix:F,iconSize:b,loadingPosition:g,isLoading:E,LeftIcon:$,readOnly:V,onFocus:z,onBlur:D,RightIcon:Y,Spinner:L,onChange:A,value:I,defaultValue:W="",...j}=dr({...n,id:u,isError:v},s),U=$&&!E,G=Y&&!E,H=g==="left"&&E,ne=g==="right"&&E;function te(){y||!(m!=null&&m.current)||(t(!0),m.current.focus())}function se(K){let X=_e(K.target.value);const Z=mr(X);X.length>vr||(X=hr(X,Le[Z]),K.target.value=X,c(X),A&&A(K))}function ie(K){t(!0),z&&z(K)}function oe(K){t(!1),D&&D(K)}return o.jsxs("section",{title:S,style:C,onClick:te,className:T,children:[O,H&&L,U&&o.jsx($,{size:b,strokeWidth:2.5}),o.jsx("input",{disabled:y||E,readOnly:V,ref:m,value:I||a,onFocus:ie,onChange:se,onBlur:oe,...j}),G&&o.jsx(Y,{size:b,strokeWidth:2.5}),ne&&L,F]})}function pr(n,s){const{isLoading:t,isError:a,size:c="md",className:l="",variant:h="solid",prefix:u,sufix:f,leftIcon:m,rightIcon:v,disabled:y,readOnly:S,onFocus:C,onBlur:T,title:O,style:F,showCents:b=!1,max:g=1e9,onChange:E,...$}=n,V=v?"right":"left",I=`arkyn_input ${u?"hasPrefix":""} ${f?"hasSufix":""} ${h} ${c} ${y||S||t?"opacity":""} ${a?"errored":""} ${s?"focused":""} ${l}`,j={md:14,lg:16}[c];return{isLoading:t,className:I,prefix:q(u,j,"prefix"),sufix:q(f,j,"sufix"),LeftIcon:m,RightIcon:v,disabled:y,readOnly:S,onFocus:C,onBlur:T,title:O,style:F,max:g,onChange:E,showCents:b,loadingPosition:V,iconSize:j,Spinner:o.jsx(Q.Loader2,{className:"spinner",size:j,strokeWidth:2.5}),...$}}const yr=/^[1-9]{1}$/,xr=/^[0-9]{1}$/,$e=8;function br(n,s){if(n===0)return"";const t=(n/100).toLocaleString("pt-BR",{style:"currency",currency:"BRL"});return s?t:t.replace("R$","").trim()}function _r(n){const{currencyValue:s,event:t,max:a,setCurrencyValue:c}=n,{key:l,keyCode:h}=t;if(s===0&&!yr.test(l)||s!==0&&!xr.test(l)&&h!==$e)return;const u=s.toString();let f;if(h!==$e){const m=s===0?l:`${u}${l}`;f=Number.parseInt(m,10)}else{const m=u.slice(0,-1);f=m===""?0:Number.parseInt(m,10)}f>Number(a)||c(f)}function Sr(n){const[s,t]=N.useState(!1),[a,c]=N.useState(n.defaultValue||0),l=N.useRef(null),{inputRef:h,id:u,error:f}=re(),m=h||l,v=n.isError||!!f,{disabled:y,title:S,style:C,className:T,prefix:O,sufix:F,iconSize:b,loadingPosition:g,isLoading:E,LeftIcon:$,readOnly:V,onFocus:z,onBlur:D,RightIcon:Y,Spinner:L,value:A,max:I,onKeyDown:W,onChange:j,showCents:U,...G}=pr({...n,id:u,isError:v},s),H=$&&!E,ne=Y&&!E,te=g==="left"&&E,se=g==="right"&&E;function ie(){y||!(m!=null&&m.current)||(t(!0),m.current.focus())}function oe(Z){_r({currencyValue:a,event:Z,max:I,setCurrencyValue:c}),j&&j(a),W&&W(Z)}function K(Z){t(!0),z&&z(Z)}function X(Z){t(!1),D&&D(Z)}return o.jsxs("section",{title:S,style:C,onClick:ie,className:T,children:[O,te&&L,H&&o.jsx($,{size:b,strokeWidth:2.5}),o.jsx("input",{value:br(A||a,U),onKeyDown:oe,disabled:y||E,readOnly:V,ref:m,onFocus:K,onChange:()=>{},onBlur:X,...G}),se&&L,ne&&o.jsx(Y,{size:b,strokeWidth:2.5}),F]})}function Rr(n,s){const{isLoading:t,isError:a,size:c="md",className:l="",variant:h="solid",prefix:u,sufix:f,leftIcon:m,rightIcon:v,disabled:y,readOnly:S,onFocus:C,onBlur:T,title:O,style:F,onChange:b,showMask:g=!0,...E}=n,$=v?"right":"left",A=`arkyn_input ${u?"hasPrefix":""} ${f?"hasSufix":""} ${h} ${c} ${y||S||t?"opacity":""} ${a?"errored":""} ${s?"focused":""} ${l}`,W={md:14,lg:16}[c];return{isLoading:t,className:A,prefix:q(u,W,"prefix"),sufix:q(f,W,"sufix"),LeftIcon:m,RightIcon:v,disabled:y,readOnly:S,onFocus:C,onBlur:T,title:O,style:F,onChange:b,loadingPosition:$,iconSize:W,showMask:g,Spinner:o.jsx(Q.Loader2,{className:"spinner",size:W,strokeWidth:2.5}),...E}}function Cr(n){const[s,t]=N.useState(!1),a=N.useRef(null),{inputRef:c,id:l,error:h}=re(),u=c||a,f=n.isError||!!h,{disabled:m,title:v,style:y,className:S,prefix:C,sufix:T,iconSize:O,loadingPosition:F,isLoading:b,LeftIcon:g,readOnly:E,onFocus:$,onBlur:V,RightIcon:z,Spinner:D,...Y}=Rr({...n,id:l,isError:f},s),L=g&&!b,A=z&&!b,I=F==="left"&&b,W=F==="right"&&b;function j(){m||!(u!=null&&u.current)||(t(!0),u.current.focus())}return o.jsxs("section",{title:v,style:y,onClick:j,className:S,children:[C,I&&D,L&&o.jsx(g,{size:O,strokeWidth:2.5}),o.jsx(qe.InputMask,{}),A&&o.jsx(z,{size:O,strokeWidth:2.5}),W&&D,T]})}function Er(n,s){const{isLoading:t,isError:a,size:c="md",className:l="",variant:h="solid",prefix:u,sufix:f,leftIcon:m,rightIcon:v,disabled:y,readOnly:S,onFocus:C,onBlur:T,title:O,style:F,onChange:b,...g}=n,E=v?"right":"left",L=`arkyn_input ${u?"hasPrefix":""} ${f?"hasSufix":""} ${h} ${c} ${y||S||t?"opacity":""} ${a?"errored":""} ${s?"focused":""} ${l}`,I={md:14,lg:16}[c];return{isLoading:t,className:L,prefix:q(u,I,"prefix"),sufix:q(f,I,"sufix"),LeftIcon:m,RightIcon:v,disabled:y,readOnly:S,onFocus:C,onBlur:T,title:O,style:F,onChange:b,loadingPosition:E,iconSize:I,Spinner:o.jsx(Q.Loader2,{className:"spinner",size:I,strokeWidth:2.5}),...g}}function jr(n){const[s,t]=N.useState(!1),a=N.useRef(null),{inputRef:c,id:l,error:h}=re(),u=c||a,f=n.isError||!!h,{disabled:m,title:v,style:y,className:S,prefix:C,sufix:T,iconSize:O,loadingPosition:F,isLoading:b,LeftIcon:g,readOnly:E,onFocus:$,onBlur:V,RightIcon:z,Spinner:D,...Y}=Er({...n,id:l,isError:f},s),L=g&&!b,A=z&&!b,I=F==="left"&&b,W=F==="right"&&b;function j(){m||!(u!=null&&u.current)||(t(!0),u.current.focus())}function U(H){t(!0),$&&$(H)}function G(H){t(!1),V&&V(H)}return o.jsxs("section",{title:v,style:y,onClick:j,className:S,children:[C,I&&D,L&&o.jsx(g,{size:O,strokeWidth:2.5}),o.jsx("input",{disabled:m||b,readOnly:E,ref:u,onFocus:U,onBlur:G,...Y}),A&&o.jsx(z,{size:O,strokeWidth:2.5}),W&&D,T]})}function kr(n){return n.type==="currency"?o.jsx(Sr,{...n}):n.type==="masked"?o.jsx(Cr,{...n}):n.type==="cpf-cpnj"?o.jsx(gr,{...n}):o.jsx(jr,{...n})}function Nr(n){const{className:s="",...t}=n;return{className:`arkyn_breadcrumb ${s}`.trim(),...t}}function Ir(n){const{pathname:s}=ye.useLocation(),{className:t="",disabled:a=!1,to:c,...l}=n,h=s===c?"active":"inactive",u=`arkyn_breadcrumb_link ${h} ${t}`;return{to:c,className:u.trim(),disabled:a||h==="active",...l}}function Pr(n){const{className:s,...t}=Nr(n);return o.jsx("nav",{className:s,...t})}function wr(n){const{children:s,className:t,disabled:a,...c}=Ir(n);return a?o.jsxs("p",{className:t,children:[o.jsx(Q.ChevronRight,{size:14,strokeWidth:2.5}),s]}):o.jsxs(ye.Link,{className:t,...c,children:[o.jsx(Q.ChevronRight,{size:14,strokeWidth:2.5}),s]})}const ze=N.createContext({});function Tr(n){const{isVisibled:s,makeInvisible:t,children:a,className:c="",...l}=n,u=`arkyn_modal_container ${s?"visible":""} ${c}`;return o.jsx(ze.Provider,{value:{makeInvisible:t},children:o.jsx(xe.AnimatePresence,{children:s&&o.jsxs("aside",{className:u.trim(),...l,children:[o.jsx(xe.motion.div,{className:"overlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:t}),o.jsx(xe.motion.div,{className:"content",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:a})]})})})}function Or(n){const{alignment:s="right",className:t,...a}=n,c=`arkyn_modal_footer ${s} ${t}`;return o.jsx("footer",{className:c.trim(),...a})}function Fr(n){const{showCloseButton:s,className:t,children:a,...c}=n,{makeInvisible:l}=N.useContext(ze),u=`arkyn_modal_header ${s?"show-close":""} ${t}`;return o.jsxs("header",{className:u.trim(),...c,children:[a,o.jsx("button",{type:"button",onClick:l,children:o.jsx(Q.X,{size:24})})]})}const Lr={Container:Tr,Header:Fr,Footer:Or};function $r(n){const{text:s,size:t="lg",children:a,orientation:c="top",className:l,...h}=n;return o.jsxs("div",{className:`arkyn_tooltip ${t} ${c} ${l}`,...h,children:[a,o.jsx("div",{className:"arkyn_tooltip_text",children:s})]})}k.Badge=tr,k.Breadcrumb=Pr,k.BreadcrumbLink=wr,k.Button=or,k.Divider=sr,k.FormController=ar,k.FormError=cr,k.FormLabel=lr,k.IconButton=fr,k.Input=kr,k.Modal=Lr,k.Tooltip=$r,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
|
32
|
+
<%s key={someKey} {...props} />`,we,q,an,q),Qe[q+we]=!0}}return e===o?en(w):qr(w),w}}function rn(e,r,s){return qe(e,r,s,!0)}function nn(e,r,s){return qe(e,r,s,!1)}var tn=nn,sn=rn;ue.Fragment=o,ue.jsx=tn,ue.jsxs=sn}()),ue}process.env.NODE_ENV==="production"?xe.exports=rr():xe.exports=nr();var i=xe.exports;function he(n,t){return t?i.jsx(t,{size:n,strokeWidth:2.5}):i.jsx(i.Fragment,{})}function tr(n){const{variant:t="ghost",scheme:a="primary",size:o="md",leftIcon:c,rightIcon:l,className:h="",children:f,...d}=n,g={md:12,lg:14}[o];return{className:`arkyn_badge ${t} ${a} ${o} ${h}`.trim(),children:f,leftIcon:he(g,c),rightIcon:he(g,l),...d}}function sr(n){const{leftIcon:t,children:a,rightIcon:o,...c}=tr(n);return i.jsxs("div",{...c,children:[t,a,o]})}function ar(n){const{className:t,orientation:a="horizontal",...o}=n,c=`arkyn_divider ${a} ${t}`;return i.jsx("div",{className:c,...o})}function ir(n){const{isLoading:t=!1,scheme:a="primary",variant:o="solid",loadingText:c,size:l="md",leftIcon:h,rightIcon:f,disabled:d,className:m="",children:g,...x}=n,P={xs:12,sm:16,md:20,lg:24}[l];return{className:`arkyn_button loading_text_${!!c} ${o} ${a} ${l} loading_${t} ${m}`.trim(),loadingText:c,children:g,iconSize:P,disabled:d||t,leftIcon:he(P,h),rightIcon:he(P,f),...x}}function or(n){const{leftIcon:t,rightIcon:a,iconSize:o,children:c,loadingText:l,...h}=ir(n);return i.jsxs("button",{...h,children:[i.jsxs("div",{className:"spinner",children:[i.jsx(Q.Loader2,{size:o,strokeWidth:2.5}),l&&l]}),i.jsxs("div",{className:"content",children:[t,c,a]})]})}const Oe=N.createContext({});function cr({children:n,...t}){var f,d;const a=ye.useActionData(),o=N.useRef(null),c=((f=o.current)==null?void 0:f.name)||"",l=((d=a==null?void 0:a.fieldErrors)==null?void 0:d[c])||null,h=N.useId();return i.jsx(Oe.Provider,{value:{error:l,id:h,inputRef:o},children:i.jsx("section",{className:"arkyn_form_controller",...t,children:n})})}function le(){return N.useContext(Oe)}function ur({children:n}){const{error:t}=le();return t?i.jsx("strong",{className:"arkyn_form_error",children:n||t}):i.jsx(i.Fragment,{})}function lr(n){const{showAsterisk:t=!1,className:a="",...o}=n;return{className:`arkyn_form_label ${t?"show-asterisk":""} ${a}`.trim(),...o}}function fr(n){const{id:t}=le();return i.jsx("label",{...lr(n),htmlFor:t})}const Fe={xs:12,sm:16,md:20,lg:24};function dr(n){const{isLoading:t=!1,scheme:a="primary",variant:o="solid",size:c="md",icon:l,disabled:h,className:f="",...d}=n,m=`arkyn_icon_button ${o} ${a} ${c} loading_${t} ${f}`;return i.jsxs("button",{disabled:h||t,className:m.trim(),...d,children:[i.jsx("div",{className:"spinner",children:i.jsx(Q.Loader2,{size:Fe[c],strokeWidth:2.5})}),i.jsx("div",{className:"content "+c,children:i.jsx(l,{size:Fe[c],strokeWidth:2.5})})]})}function ee(n,t,a){if(!n)return i.jsx(i.Fragment,{});if(typeof n=="string")return i.jsx("p",{className:a,children:n});const o=n;return i.jsx("p",{className:a,children:i.jsx(o,{color:"var(--secondary-600)",size:t,strokeWidth:2.5})})}function hr(n,t){const{isLoading:a,isError:o,size:c="md",className:l="",variant:h="solid",prefix:f,sufix:d,leftIcon:m,rightIcon:g,disabled:x,readOnly:C,onFocus:P,onBlur:T,title:L,style:$,onChange:R,...y}=n,j=g?"right":"left",O=`arkyn_input ${f?"hasPrefix":""} ${d?"hasSufix":""} ${h} ${c} ${x||C||a?"opacity":""} ${o?"errored":""} ${t?"focused":""} ${l}`,I={md:20,lg:20}[c];return{isLoading:a,className:O,prefix:ee(f,I,"prefix"),sufix:ee(d,I,"sufix"),LeftIcon:m,RightIcon:g,disabled:x,readOnly:C,onFocus:P,onBlur:T,title:L,style:$,onChange:R,loadingPosition:j,iconSize:I,Spinner:i.jsx(Q.Loader2,{className:"spinner",size:I,strokeWidth:2.5}),...y}}function _e(n){return n&&n.replace(/[^0-9]/g,"")}function mr(n,t){let a="",o=0;return Array.from(n).forEach((c,l)=>{t[l+o].match(/[0-9]/)||(a+=t[l+o],o++),a+=c}),a}function vr(n){return n.length>11?"CNPJ":"CPF"}const Le={CPF:"999.999.999-999",CNPJ:"99.999.999/9999-99"},pr=_e(Le.CNPJ).length;function gr(n){const[t,a]=N.useState(!1),[o,c]=N.useState(_e((n==null?void 0:n.defaultValue)||"")),l=N.useRef(null),{inputRef:h,id:f,error:d}=le(),m=h||l,g=n.isError||!!d,{disabled:x,title:C,style:P,className:T,prefix:L,sufix:$,iconSize:R,loadingPosition:y,isLoading:j,LeftIcon:z,readOnly:V,onFocus:A,onBlur:W,RightIcon:Y,Spinner:O,onChange:K,value:I,defaultValue:Z="",...S}=hr({...n,id:f,isError:g},t),B=z&&!j,J=Y&&!j,X=y==="left"&&j,re=y==="right"&&j;function ne(){x||!(m!=null&&m.current)||(a(!0),m.current.focus())}function te(M){let G=_e(M.target.value);const H=vr(G);G.length>pr||(G=mr(G,Le[H]),M.target.value=G,c(G),K&&K(M))}function se(M){a(!0),A&&A(M)}function ae(M){a(!1),W&&W(M)}return i.jsxs("section",{title:C,style:P,onClick:ne,className:T,children:[L,X&&O,B&&i.jsx(z,{size:R,strokeWidth:2.5}),i.jsx("input",{disabled:x||j,readOnly:V,ref:m,value:I||o,onFocus:se,onChange:te,onBlur:ae,...S}),J&&i.jsx(Y,{size:R,strokeWidth:2.5}),re&&O,$]})}function yr(n,t){const{isLoading:a,isError:o,size:c="md",className:l="",variant:h="solid",prefix:f,sufix:d,leftIcon:m,rightIcon:g,disabled:x,readOnly:C,onFocus:P,onBlur:T,title:L,style:$,showCents:R=!1,max:y=1e9,onChange:j,...z}=n,V=g?"right":"left",I=`arkyn_input ${f?"hasPrefix":""} ${d?"hasSufix":""} ${h} ${c} ${x||C||a?"opacity":""} ${o?"errored":""} ${t?"focused":""} ${l}`,S={md:20,lg:20}[c];return{isLoading:a,className:I,prefix:ee(f,S,"prefix"),sufix:ee(d,S,"sufix"),LeftIcon:m,RightIcon:g,disabled:x,readOnly:C,onFocus:P,onBlur:T,title:L,style:$,max:y,onChange:j,showCents:R,loadingPosition:V,iconSize:S,Spinner:i.jsx(Q.Loader2,{className:"spinner",size:S,strokeWidth:2.5}),...z}}const br=/^[1-9]{1}$/,xr=/^[0-9]{1}$/,$e=8;function _r(n,t){if(n===0)return"";const a=(n/100).toLocaleString("pt-BR",{style:"currency",currency:"BRL"});return t?a:a.replace("R$","").trim()}function Rr(n){const{currencyValue:t,event:a,max:o,setCurrencyValue:c}=n,{key:l,keyCode:h}=a;if(t===0&&!br.test(l)||t!==0&&!xr.test(l)&&h!==$e)return;const f=t.toString();let d;if(h!==$e){const m=t===0?l:`${f}${l}`;d=Number.parseInt(m,10)}else{const m=f.slice(0,-1);d=m===""?0:Number.parseInt(m,10)}d>Number(o)||c(d)}function Cr(n){const[t,a]=N.useState(!1),[o,c]=N.useState(n.defaultValue||0),l=N.useRef(null),{inputRef:h,id:f,error:d}=le(),m=h||l,g=n.isError||!!d,{disabled:x,title:C,style:P,className:T,prefix:L,sufix:$,iconSize:R,loadingPosition:y,isLoading:j,LeftIcon:z,readOnly:V,onFocus:A,onBlur:W,RightIcon:Y,Spinner:O,value:K,max:I,onKeyDown:Z,onChange:S,showCents:B,...J}=yr({...n,id:f,isError:g},t),X=z&&!j,re=Y&&!j,ne=y==="left"&&j,te=y==="right"&&j;function se(){x||!(m!=null&&m.current)||(a(!0),m.current.focus())}function ae(H){Rr({currencyValue:o,event:H,max:I,setCurrencyValue:c}),S&&S(o),Z&&Z(H)}function M(H){a(!0),A&&A(H)}function G(H){a(!1),W&&W(H)}return i.jsxs("section",{title:C,style:P,onClick:se,className:T,children:[L,ne&&O,X&&i.jsx(z,{size:R,strokeWidth:2.5}),i.jsx("input",{value:_r(K||o,B),onKeyDown:ae,disabled:x||j,readOnly:V,ref:m,onFocus:M,onChange:()=>{},onBlur:G,...J}),te&&O,re&&i.jsx(Y,{size:R,strokeWidth:2.5}),$]})}function Er(n,t){const{isLoading:a,isError:o,size:c="md",className:l="",variant:h="solid",prefix:f,sufix:d,leftIcon:m,rightIcon:g,disabled:x,readOnly:C,onFocus:P,onBlur:T,title:L,style:$,onChange:R,...y}=n,j=g?"right":"left",O=`arkyn_input ${f?"hasPrefix":""} ${d?"hasSufix":""} ${h} ${c} ${x||C||a?"opacity":""} ${o?"errored":""} ${t?"focused":""} ${l}`,I={md:20,lg:20}[c];return{isLoading:a,className:O,prefix:ee(f,I,"prefix"),sufix:ee(d,I,"sufix"),LeftIcon:m,RightIcon:g,disabled:x,readOnly:C,onFocus:P,onBlur:T,title:L,style:$,onChange:R,loadingPosition:j,iconSize:I,Spinner:i.jsx(Q.Loader2,{className:"spinner",size:I,strokeWidth:2.5}),...y}}function ze(n){const[t,a]=N.useState(!1),o=N.useRef(null),{inputRef:c,id:l,error:h}=le(),f=c||o,d=n.isError||!!h,{disabled:m,title:g,style:x,className:C,prefix:P,sufix:T,iconSize:L,loadingPosition:$,isLoading:R,LeftIcon:y,readOnly:j,onFocus:z,onBlur:V,RightIcon:A,Spinner:W,...Y}=Er({...n,id:l,isError:d},t),O=y&&!R,K=A&&!R,I=$==="left"&&R,Z=$==="right"&&R;function S(){m||!(f!=null&&f.current)||(a(!0),f.current.focus())}function B(X){a(!0),z&&z(X)}function J(X){a(!1),V&&V(X)}return i.jsxs("section",{title:g,style:x,onClick:S,className:C,children:[P,I&&W,O&&i.jsx(y,{size:L,strokeWidth:2.5}),i.jsx("input",{disabled:m||R,readOnly:j,ref:f,onFocus:B,onBlur:J,...Y}),K&&i.jsx(A,{size:L,strokeWidth:2.5}),Z&&W,T]})}function Sr(n){return i.jsx(er.InputMask,{component:ze,...n,type:"text"})}function jr(n){return n.type==="currency"?i.jsx(Cr,{...n}):n.type==="masked"?i.jsx(Sr,{...n}):n.type==="cpf-cpnj"?i.jsx(gr,{...n}):i.jsx(ze,{...n})}function kr(n){const{className:t="",...a}=n;return{className:`arkyn_breadcrumb ${t}`.trim(),...a}}function Nr(n){const{pathname:t}=ye.useLocation(),{className:a="",disabled:o=!1,to:c,...l}=n,h=t===c?"active":"inactive",f=`arkyn_breadcrumb_link ${h} ${a}`;return{to:c,className:f.trim(),disabled:o||h==="active",...l}}function Pr(n){const{className:t,...a}=kr(n);return i.jsx("nav",{className:t,...a})}function wr(n){const{children:t,className:a,disabled:o,...c}=Nr(n);return o?i.jsxs("p",{className:a,children:[i.jsx(Q.ChevronRight,{size:14,strokeWidth:2.5}),t]}):i.jsxs(ye.Link,{className:a,...c,children:[i.jsx(Q.ChevronRight,{size:14,strokeWidth:2.5}),t]})}const De=N.createContext({});function Ir(n){const{isVisibled:t,makeInvisible:a,children:o,className:c="",...l}=n,f=`arkyn_modal_container ${t?"visible":""} ${c}`;return i.jsx(De.Provider,{value:{makeInvisible:a},children:i.jsx(be.AnimatePresence,{children:t&&i.jsxs("aside",{className:f.trim(),...l,children:[i.jsx(be.motion.div,{className:"overlay",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:a}),i.jsx(be.motion.div,{className:"content",transition:{duration:.15,ease:"easeOut"},initial:{opacity:0,scale:.75},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},children:o})]})})})}function Tr(n){const{alignment:t="right",className:a,...o}=n,c=`arkyn_modal_footer ${t} ${a}`;return i.jsx("footer",{className:c.trim(),...o})}function Or(n){const{showCloseButton:t,className:a,children:o,...c}=n,{makeInvisible:l}=N.useContext(De),f=`arkyn_modal_header ${t?"show-close":""} ${a}`;return i.jsxs("header",{className:f.trim(),...c,children:[o,i.jsx("button",{type:"button",onClick:l,children:i.jsx(Q.X,{size:24})})]})}const Fr={Container:Ir,Header:Or,Footer:Tr};function Lr(n){const{text:t,size:a="lg",children:o,orientation:c="top",className:l,...h}=n;return i.jsxs("div",{className:`arkyn_tooltip ${a} ${c} ${l}`,...h,children:[o,i.jsx("div",{className:"arkyn_tooltip_text",children:t})]})}E.Badge=sr,E.Breadcrumb=Pr,E.BreadcrumbLink=wr,E.Button=or,E.Divider=ar,E.FormController=cr,E.FormError=ur,E.FormLabel=fr,E.IconButton=dr,E.Input=jr,E.Modal=Fr,E.Tooltip=Lr,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});
|
@@ -1,4 +1,8 @@
|
|
1
|
+
import { ReactNode } from "react";
|
1
2
|
import "./styles.css";
|
2
|
-
|
3
|
+
type FormErrorProps = {
|
4
|
+
children?: ReactNode;
|
5
|
+
};
|
6
|
+
declare function FormError({ children }: FormErrorProps): import("react/jsx-runtime").JSX.Element;
|
3
7
|
export { FormError };
|
4
8
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FormError/index.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FormError/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,cAAc,CAAC;AAEtB,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,iBAAS,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,cAAc,2CAI9C;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { useFormController } from "../FormController";
|
3
3
|
import "./styles.css";
|
4
|
-
function FormError() {
|
4
|
+
function FormError({ children }) {
|
5
5
|
const { error } = useFormController();
|
6
6
|
if (!error)
|
7
7
|
return _jsx(_Fragment, {});
|
8
|
-
return _jsx("strong", { className: "arkyn_form_error", children: error });
|
8
|
+
return _jsx("strong", { className: "arkyn_form_error", children: children || error });
|
9
9
|
}
|
10
10
|
export { FormError };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/CpfCpnjInput/getConfig.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/CpfCpnjInput/getConfig.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAKtD,iBAAS,SAAS,CAAC,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoD9D;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
@@ -10,7 +10,7 @@ function getConfig(props, isFocused) {
|
|
10
10
|
const opacity = disabled || readOnly || isLoading ? "opacity" : "";
|
11
11
|
const focused = isFocused ? "focused" : "";
|
12
12
|
const className = `arkyn_input ${hasPrefix} ${hasSufix} ${variant} ${size} ${opacity} ${errored} ${focused} ${baseClassName}`;
|
13
|
-
const iconSizes = { md:
|
13
|
+
const iconSizes = { md: 20, lg: 20 };
|
14
14
|
const iconSize = iconSizes[size];
|
15
15
|
return {
|
16
16
|
isLoading,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/CurrencyInput/getConfig.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/CurrencyInput/getConfig.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAKvD,iBAAS,SAAS,CAAC,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwD/D;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
@@ -10,7 +10,7 @@ function getConfig(props, isFocused) {
|
|
10
10
|
const opacity = disabled || readOnly || isLoading ? "opacity" : "";
|
11
11
|
const focused = isFocused ? "focused" : "";
|
12
12
|
const className = `arkyn_input ${hasPrefix} ${hasSufix} ${variant} ${size} ${opacity} ${errored} ${focused} ${baseClassName}`;
|
13
|
-
const iconSizes = { md:
|
13
|
+
const iconSizes = { md: 20, lg: 20 };
|
14
14
|
const iconSize = iconSizes[size];
|
15
15
|
return {
|
16
16
|
isLoading,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
+
/// <reference types="react" />
|
2
3
|
import type { MaskedInputProps } from "@arkyn/types";
|
3
4
|
declare function getConfig(props: MaskedInputProps, isFocused: boolean): {
|
4
|
-
type: "masked";
|
5
5
|
name: string;
|
6
6
|
suppressHydrationWarning?: boolean;
|
7
7
|
color?: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/MaskInput/getConfig.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/MaskInput/getConfig.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKrD,iBAAS,SAAS,CAAC,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuD7D;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Loader2 } from "lucide-react";
|
3
3
|
import { morpheme } from "../utils/morpheme";
|
4
4
|
function getConfig(props, isFocused) {
|
5
|
-
const { isLoading, isError, size = "md", className: baseClassName = "", variant = "solid", prefix: basePrefix, sufix: baseSufix, leftIcon: LeftIcon, rightIcon: RightIcon, disabled, readOnly, onFocus, onBlur, title, style, onChange, showMask = true, ...rest } = props;
|
5
|
+
const { isLoading, isError, size = "md", className: baseClassName = "", variant = "solid", prefix: basePrefix, sufix: baseSufix, leftIcon: LeftIcon, rightIcon: RightIcon, disabled, readOnly, onFocus, onBlur, title, style, onChange, showMask = true, type, ...rest } = props;
|
6
6
|
const loadingPosition = RightIcon ? "right" : "left";
|
7
7
|
const hasPrefix = !!basePrefix ? "hasPrefix" : "";
|
8
8
|
const hasSufix = !!baseSufix ? "hasSufix" : "";
|
@@ -10,7 +10,7 @@ function getConfig(props, isFocused) {
|
|
10
10
|
const opacity = disabled || readOnly || isLoading ? "opacity" : "";
|
11
11
|
const focused = isFocused ? "focused" : "";
|
12
12
|
const className = `arkyn_input ${hasPrefix} ${hasSufix} ${variant} ${size} ${opacity} ${errored} ${focused} ${baseClassName}`;
|
13
|
-
const iconSizes = { md:
|
13
|
+
const iconSizes = { md: 20, lg: 20 };
|
14
14
|
const iconSize = iconSizes[size];
|
15
15
|
return {
|
16
16
|
isLoading,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/MaskInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AASrD,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/MaskInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AASrD,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAqE3C;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
@@ -1,42 +1,62 @@
|
|
1
|
-
import { jsx as _jsx
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
2
|
import { InputMask } from "@react-input/mask";
|
3
|
-
import {
|
4
|
-
import { useFormController } from "../../Form/FormController";
|
5
|
-
import { getConfig } from "./getConfig";
|
3
|
+
import { SimpleInput } from "../SimpleInput";
|
6
4
|
function MaskedInput(props) {
|
7
|
-
const [isFocused, setIsFocused] = useState(false);
|
8
|
-
const baseRef = useRef(null);
|
9
|
-
const { inputRef, id, error } = useFormController();
|
10
|
-
const ref = inputRef || baseRef;
|
11
|
-
const isError = props.isError || !!error;
|
12
|
-
const {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
5
|
+
// const [isFocused, setIsFocused] = useState(false);
|
6
|
+
// const baseRef = useRef<any>(null);
|
7
|
+
// const { inputRef, id, error } = useFormController();
|
8
|
+
// const ref = inputRef || baseRef;
|
9
|
+
// const isError = props.isError || !!error;
|
10
|
+
// const {
|
11
|
+
// disabled,
|
12
|
+
// title,
|
13
|
+
// style,
|
14
|
+
// className,
|
15
|
+
// prefix,
|
16
|
+
// sufix,
|
17
|
+
// iconSize,
|
18
|
+
// loadingPosition,
|
19
|
+
// isLoading,
|
20
|
+
// LeftIcon,
|
21
|
+
// readOnly,
|
22
|
+
// onFocus,
|
23
|
+
// onBlur,
|
24
|
+
// RightIcon,
|
25
|
+
// Spinner,
|
26
|
+
// ...rest
|
27
|
+
// } = getConfig({ ...props, id, isError }, isFocused);
|
28
|
+
// const showLeftIcon = LeftIcon && !isLoading;
|
29
|
+
// const showRightIcon = RightIcon && !isLoading;
|
30
|
+
// const showLeftSpinner = loadingPosition === "left" && isLoading;
|
31
|
+
// const showRightSpinner = loadingPosition === "right" && isLoading;
|
32
|
+
// function handleSectionClick() {
|
33
|
+
// if (disabled || !ref?.current) return;
|
34
|
+
// setIsFocused(true);
|
35
|
+
// ref.current.focus();
|
36
|
+
// }
|
37
|
+
// function handleFocus(e: FocusEvent<HTMLInputElement>) {
|
38
|
+
// setIsFocused(true);
|
39
|
+
// if (onFocus) onFocus(e);
|
40
|
+
// }
|
41
|
+
// function handleBlur(e: FocusEvent<HTMLInputElement>) {
|
42
|
+
// setIsFocused(false);
|
43
|
+
// if (onBlur) onBlur(e);
|
44
|
+
// }
|
45
|
+
return (
|
46
|
+
// <section
|
47
|
+
// title={title}
|
48
|
+
// style={style}
|
49
|
+
// onClick={handleSectionClick}
|
50
|
+
// className={className}
|
51
|
+
// >
|
52
|
+
// {prefix}
|
53
|
+
// {showLeftSpinner && Spinner}
|
54
|
+
// {showLeftIcon && <LeftIcon size={iconSize} strokeWidth={2.5} />}
|
55
|
+
_jsx(InputMask, { component: SimpleInput, ...props, type: "text" })
|
56
|
+
// {showRightIcon && <RightIcon size={iconSize} strokeWidth={2.5} />}
|
57
|
+
// {showRightSpinner && Spinner}
|
58
|
+
// {sufix}
|
59
|
+
// </section>
|
60
|
+
);
|
41
61
|
}
|
42
62
|
export { MaskedInput };
|
@@ -1,4 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
+
/// <reference types="react" />
|
2
3
|
import type { SimpleInputProps } from "@arkyn/types";
|
3
4
|
declare function getConfig(props: SimpleInputProps, isFocused: boolean): {
|
4
5
|
type: "number" | "color" | "search" | "hidden" | "button" | "text" | "tel" | "url" | "email" | "date" | "time" | "submit" | "reset" | "datetime-local" | "file" | "image" | "month" | "password" | "range" | "week";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/SimpleInput/getConfig.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"getConfig.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/SimpleInput/getConfig.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKrD,iBAAS,SAAS,CAAC,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoD7D;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
@@ -10,7 +10,7 @@ function getConfig(props, isFocused) {
|
|
10
10
|
const opacity = disabled || readOnly || isLoading ? "opacity" : "";
|
11
11
|
const focused = isFocused ? "focused" : "";
|
12
12
|
const className = `arkyn_input ${hasPrefix} ${hasSufix} ${variant} ${size} ${opacity} ${errored} ${focused} ${baseClassName}`;
|
13
|
-
const iconSizes = { md:
|
13
|
+
const iconSizes = { md: 20, lg: 20 };
|
14
14
|
const iconSize = iconSizes[size];
|
15
15
|
return {
|
16
16
|
isLoading,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"buildBadgeConfig.d.ts","sourceRoot":"","sources":["../../src/config/buildBadgeConfig.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"buildBadgeConfig.d.ts","sourceRoot":"","sources":["../../src/config/buildBadgeConfig.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,KAAK,qBAAqB,GAAG,UAAU,CAAC;AAExC,iBAAS,gBAAgB,CAAC,IAAI,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBpD;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
+
/// <reference types="react" />
|
2
3
|
import type { BreadcrumbLinkProps } from "@arkyn/types";
|
3
4
|
type BuildBreadcrumbLinkConfigProps = BreadcrumbLinkProps & {};
|
4
5
|
declare function buildBreadcrumbLinkConfig(args: BuildBreadcrumbLinkConfigProps): {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"buildBreadcrumLinkConfig.d.ts","sourceRoot":"","sources":["../../src/config/buildBreadcrumLinkConfig.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"buildBreadcrumLinkConfig.d.ts","sourceRoot":"","sources":["../../src/config/buildBreadcrumLinkConfig.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGxD,KAAK,8BAA8B,GAAG,mBAAmB,GAAG,EAAE,CAAC;AAE/D,iBAAS,yBAAyB,CAAC,IAAI,EAAE,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBtE;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"buildBreadcrumbConfig.d.ts","sourceRoot":"","sources":["../../src/config/buildBreadcrumbConfig.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"buildBreadcrumbConfig.d.ts","sourceRoot":"","sources":["../../src/config/buildBreadcrumbConfig.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,KAAK,0BAA0B,GAAG,eAAe,CAAC;AAElD,iBAAS,qBAAqB,CAAC,IAAI,EAAE,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK9D;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"buildButtonConfig.d.ts","sourceRoot":"","sources":["../../src/config/buildButtonConfig.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"buildButtonConfig.d.ts","sourceRoot":"","sources":["../../src/config/buildButtonConfig.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,KAAK,sBAAsB,GAAG,WAAW,CAAC;AAE1C,iBAAS,iBAAiB,CAAC,IAAI,EAAE,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BtD;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"buildFormLabelConfig.d.ts","sourceRoot":"","sources":["../../src/config/buildFormLabelConfig.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"buildFormLabelConfig.d.ts","sourceRoot":"","sources":["../../src/config/buildFormLabelConfig.tsx"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,KAAK,yBAAyB,GAAG,cAAc,CAAC;AAEhD,iBAAS,oBAAoB,CAAC,IAAI,EAAE,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU5D;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
package/package.json
CHANGED
@@ -1,11 +1,16 @@
|
|
1
|
+
import { ReactNode } from "react";
|
1
2
|
import { useFormController } from "../FormController";
|
2
3
|
|
3
4
|
import "./styles.css";
|
4
5
|
|
5
|
-
|
6
|
+
type FormErrorProps = {
|
7
|
+
children?: ReactNode;
|
8
|
+
};
|
9
|
+
|
10
|
+
function FormError({ children }: FormErrorProps) {
|
6
11
|
const { error } = useFormController();
|
7
12
|
if (!error) return <></>;
|
8
|
-
return <strong className="arkyn_form_error">{error}</strong>;
|
13
|
+
return <strong className="arkyn_form_error">{children || error}</strong>;
|
9
14
|
}
|
10
15
|
|
11
16
|
export { FormError };
|
@@ -33,7 +33,7 @@ function getConfig(props: CpfCnpjInputProps, isFocused: boolean) {
|
|
33
33
|
const focused = isFocused ? "focused" : "";
|
34
34
|
|
35
35
|
const className = `arkyn_input ${hasPrefix} ${hasSufix} ${variant} ${size} ${opacity} ${errored} ${focused} ${baseClassName}`;
|
36
|
-
const iconSizes = { md:
|
36
|
+
const iconSizes = { md: 20, lg: 20 };
|
37
37
|
const iconSize = iconSizes[size];
|
38
38
|
|
39
39
|
return {
|
@@ -35,7 +35,7 @@ function getConfig(props: CurrencyInputProps, isFocused: boolean) {
|
|
35
35
|
const focused = isFocused ? "focused" : "";
|
36
36
|
|
37
37
|
const className = `arkyn_input ${hasPrefix} ${hasSufix} ${variant} ${size} ${opacity} ${errored} ${focused} ${baseClassName}`;
|
38
|
-
const iconSizes = { md:
|
38
|
+
const iconSizes = { md: 20, lg: 20 };
|
39
39
|
const iconSize = iconSizes[size];
|
40
40
|
|
41
41
|
return {
|
@@ -22,6 +22,7 @@ function getConfig(props: MaskedInputProps, isFocused: boolean) {
|
|
22
22
|
style,
|
23
23
|
onChange,
|
24
24
|
showMask = true,
|
25
|
+
type,
|
25
26
|
...rest
|
26
27
|
} = props;
|
27
28
|
|
@@ -34,7 +35,7 @@ function getConfig(props: MaskedInputProps, isFocused: boolean) {
|
|
34
35
|
const focused = isFocused ? "focused" : "";
|
35
36
|
|
36
37
|
const className = `arkyn_input ${hasPrefix} ${hasSufix} ${variant} ${size} ${opacity} ${errored} ${focused} ${baseClassName}`;
|
37
|
-
const iconSizes = { md:
|
38
|
+
const iconSizes = { md: 20, lg: 20 };
|
38
39
|
const iconSize = iconSizes[size];
|
39
40
|
|
40
41
|
return {
|