@ambuj.bhaskar/react-component-library 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(R,D){typeof exports=="object"&&typeof module<"u"?D(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],D):(R=typeof globalThis<"u"?globalThis:R||self,D(R["awiros-ui"]={},R.React))})(this,function(R,D){"use strict";var de=document.createElement("style");de.textContent=`*{box-sizing:border-box}body{margin:0;font-family:var(-_body_font);background:var(-_background_color)!important;color:var(-_c_secondary)}mark{background-color:unset!important;padding:0rem!important}hr{margin:0}label{font-size:var(-_font_m)}p{margin:0}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}}.button{transition:all .2s ease-in-out;display:flex;align-items:center;cursor:pointer;position:relative;background-color:unset;border:none}.button .background{position:absolute;z-index:1;width:100%;height:100%;top:0;left:0;border-radius:500px}.button .background.primary{filter:opacity(.05)}.button .background.primary:hover{filter:opacity(.15)}.button .background.primary:active{filter:opacity(1)}.button .background.secondary{filter:opacity(.1)}.button .background.secondary:hover{filter:opacity(.15)}.button .background.secondary:active{filter:opacity(.2)}.button .background.tertiary{filter:opacity(0)}.button .background.tertiary:hover{filter:opacity(.1)}.button .background.tertiary:active{filter:opacity(.2)}.button .background.nav{filter:opacity(0)}.button .background.nav:hover{filter:opacity(.1)}.button .background.nav:active{filter:opacity(.2)}.button .background.disabled{filter:opacity(.05)!important}.button .background.disabled.tertiary,.button .background.disabled.nav{filter:opacity(0)!important}.button>p{align-self:center;font-weight:var(--hydra_font_weight_m);z-index:2}.button.disabled,.button.disabled:hover,.button.disabled:active{cursor:no-drop!important;color:var(--hydra_c_disabled)!important}.button.disabled{cursor:no-drop;color:var(--hydra_c_disabled)}.button.disabled.primary,.button.disabled.primary:hover,.button.disabled.primary:active{outline-width:1px!important}.button.disabled.secondary,.button.disabled.secondary:hover,.button.disabled.secondary:active,.button.disabled.tertiary,.button.disabled.tertiary:hover,.button.disabled.tertiary:active,.button.disabled.nav,.button.disabled.nav:hover,.button.disabled.nav:active{outline-width:0px!important}.button.disabled.primary{outline-width:1px!important}.button.secondary{outline-width:0px!important}.button.secondary:hover,.button.secondary:active{outline-width:1px!important}.button.nav,.button.nav:hover{outline-width:0px!important}.button.nav:active{outline-width:1px!important}.button>p,.button>svg{z-index:2;pointer-events:none}.button.primary:active>p{color:var(--hydra_c_text_tertiary)!important}.button.fixed.h_s{--button_height: 30px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);font-size:var(--font_s);padding:0px calc(var(--button_height) / 5)}.button.fixed.h_m{--button_height: 40px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);padding:0px calc(var(--button_height) / 5)}.button.fixed.h_l{--button_height: 50px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);padding:0px calc(var(--button_height) / 5)}.button.hugging.p_s{padding:3px 10px;border-radius:500px;font-size:var(--font_s)}.button.hugging.p_m{padding:6px 18px;border-radius:500px}.button.hugging.p_l{padding:10px 22px;border-radius:500px}.button.fixed.h_s.icon{--button_height: 30px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);font-size:var(--font_s);padding:calc(var(--button_height) / 5) calc(var(--button_height) / 5)}.button.fixed.h_m.icon{--button_height: 40px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);padding:calc(var(--button_height) / 5) calc(var(--button_height) / 5)}.button.fixed.h_l.icon{--button_height: 50px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);padding:calc(var(--button_height) / 5) calc(var(--button_height) / 5)}.button.hugging.p_s.icon{padding:5px;border-radius:500px;font-size:var(--font_s)}.button.hugging.p_m.icon{padding:10px;border-radius:500px}.button.hugging.p_l.icon{padding:15px;border-radius:500px}.button.text_xs{font-size:var(--font_xs)!important}.button.text_s{font-size:var(--font_s)!important}.button.text_m{font-size:var(--font_m)!important}.button.text_l{font-size:var(--font_l)!important}.button.text_xl{font-size:var(--font_xl)!important}.input{padding:.5rem 1.5rem!important;outline:none!important;border:none!important;border-radius:500px!important}.input.primary{background-color:#ff000080!important}.input.secondary{background-color:#0000004d!important}
2
- /*$vite$:1*/`,document.head.appendChild(de);function Ue(u){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(u){for(const h in u)if(h!=="default"){const b=Object.getOwnPropertyDescriptor(u,h);Object.defineProperty(l,h,b.get?b:{enumerable:!0,get:()=>u[h]})}}return l.default=u,Object.freeze(l)}const I=Ue(D);var B={exports:{}},Y={};/**
1
+ (function(R,D){typeof exports=="object"&&typeof module<"u"?D(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],D):(R=typeof globalThis<"u"?globalThis:R||self,D(R["Awiros UI"]={},R.React))})(this,function(R,D){"use strict";var de=document.createElement("style");de.textContent=`*{box-sizing:border-box}body{margin:0;font-family:var(-_body_font);background:var(-_background_color)!important;color:var(-_c_secondary)}mark{background-color:unset!important;padding:0rem!important}hr{margin:0}label{font-size:var(-_font_m)}p{margin:0}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}}.button{transition:all .2s ease-in-out;display:flex;align-items:center;cursor:pointer;position:relative;background-color:unset;border:none}.button .background{position:absolute;z-index:1;width:100%;height:100%;top:0;left:0;border-radius:500px}.button .background.primary{filter:opacity(.05)}.button .background.primary:hover{filter:opacity(.15)}.button .background.primary:active{filter:opacity(1)}.button .background.secondary{filter:opacity(.1)}.button .background.secondary:hover{filter:opacity(.15)}.button .background.secondary:active{filter:opacity(.2)}.button .background.tertiary{filter:opacity(0)}.button .background.tertiary:hover{filter:opacity(.1)}.button .background.tertiary:active{filter:opacity(.2)}.button .background.nav{filter:opacity(0)}.button .background.nav:hover{filter:opacity(.1)}.button .background.nav:active{filter:opacity(.2)}.button .background.disabled{filter:opacity(.05)!important}.button .background.disabled.tertiary,.button .background.disabled.nav{filter:opacity(0)!important}.button>p{align-self:center;font-weight:var(--hydra_font_weight_m);z-index:2}.button.disabled,.button.disabled:hover,.button.disabled:active{cursor:no-drop!important;color:var(--hydra_c_disabled)!important}.button.disabled{cursor:no-drop;color:var(--hydra_c_disabled)}.button.disabled.primary,.button.disabled.primary:hover,.button.disabled.primary:active{outline-width:1px!important}.button.disabled.secondary,.button.disabled.secondary:hover,.button.disabled.secondary:active,.button.disabled.tertiary,.button.disabled.tertiary:hover,.button.disabled.tertiary:active,.button.disabled.nav,.button.disabled.nav:hover,.button.disabled.nav:active{outline-width:0px!important}.button.disabled.primary{outline-width:1px!important}.button.secondary{outline-width:0px!important}.button.secondary:hover,.button.secondary:active{outline-width:1px!important}.button.nav,.button.nav:hover{outline-width:0px!important}.button.nav:active{outline-width:1px!important}.button>p,.button>svg{z-index:2;pointer-events:none}.button.primary:active>p{color:var(--hydra_c_text_tertiary)!important}.button.fixed.h_s{--button_height: 30px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);font-size:var(--font_s);padding:0px calc(var(--button_height) / 5)}.button.fixed.h_m{--button_height: 40px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);padding:0px calc(var(--button_height) / 5)}.button.fixed.h_l{--button_height: 50px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);padding:0px calc(var(--button_height) / 5)}.button.hugging.p_s{padding:3px 10px;border-radius:500px;font-size:var(--font_s)}.button.hugging.p_m{padding:6px 18px;border-radius:500px}.button.hugging.p_l{padding:10px 22px;border-radius:500px}.button.fixed.h_s.icon{--button_height: 30px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);font-size:var(--font_s);padding:calc(var(--button_height) / 5) calc(var(--button_height) / 5)}.button.fixed.h_m.icon{--button_height: 40px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);padding:calc(var(--button_height) / 5) calc(var(--button_height) / 5)}.button.fixed.h_l.icon{--button_height: 50px;height:var(--button_height);border-radius:calc(var(--button_height) / 2);padding:calc(var(--button_height) / 5) calc(var(--button_height) / 5)}.button.hugging.p_s.icon{padding:5px;border-radius:500px;font-size:var(--font_s)}.button.hugging.p_m.icon{padding:10px;border-radius:500px}.button.hugging.p_l.icon{padding:15px;border-radius:500px}.button.text_xs{font-size:var(--font_xs)!important}.button.text_s{font-size:var(--font_s)!important}.button.text_m{font-size:var(--font_m)!important}.button.text_l{font-size:var(--font_l)!important}.button.text_xl{font-size:var(--font_xl)!important}.input{padding:.5rem 1.5rem!important;outline:none!important;border:none!important;border-radius:500px!important}.input.primary{background-color:#ff000080!important}.input.secondary{background-color:#0000004d!important}
2
+ /*$vite$:1*/`,document.head.appendChild(de);function Ne(u){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(u){for(const h in u)if(h!=="default"){const b=Object.getOwnPropertyDescriptor(u,h);Object.defineProperty(l,h,b.get?b:{enumerable:!0,get:()=>u[h]})}}return l.default=u,Object.freeze(l)}const I=Ne(D);var B={exports:{}},Y={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.min.js
5
5
  *
@@ -15,17 +15,17 @@
15
15
  *
16
16
  * This source code is licensed under the MIT license found in the
17
17
  * LICENSE file in the root directory of this source tree.
18
- */var ve;function Be(){return ve||(ve=1,process.env.NODE_ENV!=="production"&&function(){var u=D,l=Symbol.for("react.element"),h=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),k=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),z=Symbol.iterator,J="@@iterator";function Q(e){if(e===null||typeof e!="object")return null;var r=z&&e[z]||e[J];return typeof r=="function"?r:null}var j=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];N("error",e,t)}}function N(e,r,t){{var n=j.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var s=t.map(function(o){return String(o)});s.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,s)}}var q=!1,ee=!1,F=!1,re=!1,te=!1,K;K=Symbol.for("react.module.reference");function ne(e){return!!(typeof e=="string"||typeof e=="function"||e===b||e===T||te||e===S||e===x||e===v||re||e===P||q||ee||F||typeof e=="object"&&e!==null&&(e.$$typeof===O||e.$$typeof===m||e.$$typeof===w||e.$$typeof===k||e.$$typeof===d||e.$$typeof===K||e.getModuleId!==void 0))}function Xe(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function me(e){return e.displayName||"Context"}function C(e){if(e==null)return null;if(typeof e.tag=="number"&&p("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 b:return"Fragment";case h:return"Portal";case T:return"Profiler";case S:return"StrictMode";case x:return"Suspense";case v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case k:var r=e;return me(r)+".Consumer";case w:var t=e;return me(t._context)+".Provider";case d:return Xe(e,e.render,"ForwardRef");case m:var n=e.displayName||null;return n!==null?n:C(e.type)||"Memo";case O:{var i=e,s=i._payload,o=i._init;try{return C(o(s))}catch{return null}}}return null}var $=Object.assign,U=0,ye,xe,Ee,Re,we,ke,Te;function Oe(){}Oe.__reactDisabledLog=!0;function He(){{if(U===0){ye=console.log,xe=console.info,Ee=console.warn,Re=console.error,we=console.group,ke=console.groupCollapsed,Te=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Oe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}U++}}function Ze(){{if(U--,U===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},e,{value:ye}),info:$({},e,{value:xe}),warn:$({},e,{value:Ee}),error:$({},e,{value:Re}),group:$({},e,{value:we}),groupCollapsed:$({},e,{value:ke}),groupEnd:$({},e,{value:Te})})}U<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ae=j.ReactCurrentDispatcher,oe;function G(e,r,t){{if(oe===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);oe=n&&n[1]||""}return`
18
+ */var ve;function Be(){return ve||(ve=1,process.env.NODE_ENV!=="production"&&function(){var u=D,l=Symbol.for("react.element"),h=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),k=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),z=Symbol.iterator,J="@@iterator";function Q(e){if(e===null||typeof e!="object")return null;var r=z&&e[z]||e[J];return typeof r=="function"?r:null}var j=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];U("error",e,t)}}function U(e,r,t){{var n=j.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var s=t.map(function(o){return String(o)});s.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,s)}}var q=!1,ee=!1,A=!1,re=!1,te=!1,K;K=Symbol.for("react.module.reference");function ne(e){return!!(typeof e=="string"||typeof e=="function"||e===b||e===T||te||e===S||e===x||e===v||re||e===P||q||ee||A||typeof e=="object"&&e!==null&&(e.$$typeof===O||e.$$typeof===m||e.$$typeof===w||e.$$typeof===k||e.$$typeof===d||e.$$typeof===K||e.getModuleId!==void 0))}function Xe(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function me(e){return e.displayName||"Context"}function C(e){if(e==null)return null;if(typeof e.tag=="number"&&p("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 b:return"Fragment";case h:return"Portal";case T:return"Profiler";case S:return"StrictMode";case x:return"Suspense";case v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case k:var r=e;return me(r)+".Consumer";case w:var t=e;return me(t._context)+".Provider";case d:return Xe(e,e.render,"ForwardRef");case m:var n=e.displayName||null;return n!==null?n:C(e.type)||"Memo";case O:{var i=e,s=i._payload,o=i._init;try{return C(o(s))}catch{return null}}}return null}var F=Object.assign,N=0,ye,xe,Ee,Re,we,ke,Te;function Oe(){}Oe.__reactDisabledLog=!0;function He(){{if(N===0){ye=console.log,xe=console.info,Ee=console.warn,Re=console.error,we=console.group,ke=console.groupCollapsed,Te=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Oe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}N++}}function Ze(){{if(N--,N===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:F({},e,{value:ye}),info:F({},e,{value:xe}),warn:F({},e,{value:Ee}),error:F({},e,{value:Re}),group:F({},e,{value:we}),groupCollapsed:F({},e,{value:ke}),groupEnd:F({},e,{value:Te})})}N<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ae=j.ReactCurrentDispatcher,oe;function G(e,r,t){{if(oe===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);oe=n&&n[1]||""}return`
19
19
  `+oe+e}}var ie=!1,X;{var Qe=typeof WeakMap=="function"?WeakMap:Map;X=new Qe}function je(e,r){if(!e||ie)return"";{var t=X.get(e);if(t!==void 0)return t}var n;ie=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var s;s=ae.current,ae.current=null,He();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(y){n=y}Reflect.construct(e,[],o)}else{try{o.call()}catch(y){n=y}e.call(o.prototype)}}else{try{throw Error()}catch(y){n=y}e()}}catch(y){if(y&&n&&typeof y.stack=="string"){for(var a=y.stack.split(`
20
20
  `),g=n.stack.split(`
21
21
  `),c=a.length-1,f=g.length-1;c>=1&&f>=0&&a[c]!==g[f];)f--;for(;c>=1&&f>=0;c--,f--)if(a[c]!==g[f]){if(c!==1||f!==1)do if(c--,f--,f<0||a[c]!==g[f]){var E=`
22
- `+a[c].replace(" at new "," at ");return e.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",e.displayName)),typeof e=="function"&&X.set(e,E),E}while(c>=1&&f>=0);break}}}finally{ie=!1,ae.current=s,Ze(),Error.prepareStackTrace=i}var L=e?e.displayName||e.name:"",A=L?G(L):"";return typeof e=="function"&&X.set(e,A),A}function er(e,r,t){return je(e,!1)}function rr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function H(e,r,t){if(e==null)return"";if(typeof e=="function")return je(e,rr(e));if(typeof e=="string")return G(e);switch(e){case x:return G("Suspense");case v:return G("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return er(e.render);case m:return H(e.type,r,t);case O:{var n=e,i=n._payload,s=n._init;try{return H(s(i),r,t)}catch{}}}return""}var V=Object.prototype.hasOwnProperty,Se={},Pe=j.ReactDebugCurrentFrame;function Z(e){if(e){var r=e._owner,t=H(e.type,e._source,r?r.type:null);Pe.setExtraStackFrame(t)}else Pe.setExtraStackFrame(null)}function tr(e,r,t,n,i){{var s=Function.call.bind(V);for(var o in e)if(s(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var g=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){a=c}a&&!(a instanceof Error)&&(Z(i),p("%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).",n||"React class",t,o,typeof a),Z(null)),a instanceof Error&&!(a.message in Se)&&(Se[a.message]=!0,Z(i),p("Failed %s type: %s",t,a.message),Z(null))}}}var nr=Array.isArray;function ue(e){return nr(e)}function ar(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function or(e){try{return Ce(e),!1}catch{return!0}}function Ce(e){return""+e}function De(e){if(or(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ar(e)),Ce(e)}var Fe=j.ReactCurrentOwner,ir={key:!0,ref:!0,__self:!0,__source:!0},$e,Ae;function ur(e){if(V.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function sr(e){if(V.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function cr(e,r){typeof e.ref=="string"&&Fe.current}function lr(e,r){{var t=function(){$e||($e=!0,p("%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 fr(e,r){{var t=function(){Ae||(Ae=!0,p("%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,n,i,s,o){var a={$$typeof:l,type:e,key:r,ref:t,props:o,_owner:s};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function pr(e,r,t,n,i){{var s,o={},a=null,g=null;t!==void 0&&(De(t),a=""+t),sr(r)&&(De(r.key),a=""+r.key),ur(r)&&(g=r.ref,cr(r,i));for(s in r)V.call(r,s)&&!ir.hasOwnProperty(s)&&(o[s]=r[s]);if(e&&e.defaultProps){var c=e.defaultProps;for(s in c)o[s]===void 0&&(o[s]=c[s])}if(a||g){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&lr(o,f),g&&fr(o,f)}return dr(e,a,g,i,n,Fe.current,o)}}var se=j.ReactCurrentOwner,Ie=j.ReactDebugCurrentFrame;function W(e){if(e){var r=e._owner,t=H(e.type,e._source,r?r.type:null);Ie.setExtraStackFrame(t)}else Ie.setExtraStackFrame(null)}var ce;ce=!1;function le(e){return typeof e=="object"&&e!==null&&e.$$typeof===l}function ze(){{if(se.current){var e=C(se.current.type);if(e)return`
22
+ `+a[c].replace(" at new "," at ");return e.displayName&&E.includes("<anonymous>")&&(E=E.replace("<anonymous>",e.displayName)),typeof e=="function"&&X.set(e,E),E}while(c>=1&&f>=0);break}}}finally{ie=!1,ae.current=s,Ze(),Error.prepareStackTrace=i}var L=e?e.displayName||e.name:"",$=L?G(L):"";return typeof e=="function"&&X.set(e,$),$}function er(e,r,t){return je(e,!1)}function rr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function H(e,r,t){if(e==null)return"";if(typeof e=="function")return je(e,rr(e));if(typeof e=="string")return G(e);switch(e){case x:return G("Suspense");case v:return G("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return er(e.render);case m:return H(e.type,r,t);case O:{var n=e,i=n._payload,s=n._init;try{return H(s(i),r,t)}catch{}}}return""}var V=Object.prototype.hasOwnProperty,Se={},Pe=j.ReactDebugCurrentFrame;function Z(e){if(e){var r=e._owner,t=H(e.type,e._source,r?r.type:null);Pe.setExtraStackFrame(t)}else Pe.setExtraStackFrame(null)}function tr(e,r,t,n,i){{var s=Function.call.bind(V);for(var o in e)if(s(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var g=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){a=c}a&&!(a instanceof Error)&&(Z(i),p("%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).",n||"React class",t,o,typeof a),Z(null)),a instanceof Error&&!(a.message in Se)&&(Se[a.message]=!0,Z(i),p("Failed %s type: %s",t,a.message),Z(null))}}}var nr=Array.isArray;function ue(e){return nr(e)}function ar(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function or(e){try{return Ce(e),!1}catch{return!0}}function Ce(e){return""+e}function De(e){if(or(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ar(e)),Ce(e)}var Ae=j.ReactCurrentOwner,ir={key:!0,ref:!0,__self:!0,__source:!0},Fe,$e;function ur(e){if(V.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function sr(e){if(V.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function cr(e,r){typeof e.ref=="string"&&Ae.current}function lr(e,r){{var t=function(){Fe||(Fe=!0,p("%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 fr(e,r){{var t=function(){$e||($e=!0,p("%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,n,i,s,o){var a={$$typeof:l,type:e,key:r,ref:t,props:o,_owner:s};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function pr(e,r,t,n,i){{var s,o={},a=null,g=null;t!==void 0&&(De(t),a=""+t),sr(r)&&(De(r.key),a=""+r.key),ur(r)&&(g=r.ref,cr(r,i));for(s in r)V.call(r,s)&&!ir.hasOwnProperty(s)&&(o[s]=r[s]);if(e&&e.defaultProps){var c=e.defaultProps;for(s in c)o[s]===void 0&&(o[s]=c[s])}if(a||g){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&lr(o,f),g&&fr(o,f)}return dr(e,a,g,i,n,Ae.current,o)}}var se=j.ReactCurrentOwner,Ie=j.ReactDebugCurrentFrame;function W(e){if(e){var r=e._owner,t=H(e.type,e._source,r?r.type:null);Ie.setExtraStackFrame(t)}else Ie.setExtraStackFrame(null)}var ce;ce=!1;function le(e){return typeof e=="object"&&e!==null&&e.$$typeof===l}function ze(){{if(se.current){var e=C(se.current.type);if(e)return`
23
23
 
24
24
  Check the render method of \``+e+"`."}return""}}function vr(e){return""}var We={};function br(e){{var r=ze();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
25
25
 
26
- Check the top-level render call using <`+t+">.")}return r}}function Le(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=br(r);if(We[t])return;We[t]=!0;var n="";e&&e._owner&&e._owner!==se.current&&(n=" It was passed a child from "+C(e._owner.type)+"."),W(e),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),W(null)}}function Ye(e,r){{if(typeof e!="object")return;if(ue(e))for(var t=0;t<e.length;t++){var n=e[t];le(n)&&Le(n,r)}else if(le(e))e._store&&(e._store.validated=!0);else if(e){var i=Q(e);if(typeof i=="function"&&i!==e.entries)for(var s=i.call(e),o;!(o=s.next()).done;)le(o.value)&&Le(o.value,r)}}}function hr(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===d||r.$$typeof===m))t=r.propTypes;else return;if(t){var n=C(r);tr(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!ce){ce=!0;var i=C(r);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function gr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){W(e),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),W(null);break}}e.ref!==null&&(W(e),p("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}var Me={};function Ne(e,r,t,n,i,s){{var o=ne(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" 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 g=vr();g?a+=g:a+=ze();var c;e===null?c="null":ue(e)?c="array":e!==void 0&&e.$$typeof===l?(c="<"+(C(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,a)}var f=pr(e,r,t,i,s);if(f==null)return f;if(o){var E=r.children;if(E!==void 0)if(n)if(ue(E)){for(var L=0;L<E.length;L++)Ye(E[L],e);Object.freeze&&Object.freeze(E)}else p("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 Ye(E,e)}if(V.call(r,"key")){var A=C(e),y=Object.keys(r).filter(function(Rr){return Rr!=="key"}),fe=y.length>0?"{key: someKey, "+y.join(": ..., ")+": ...}":"{key: someKey}";if(!Me[A+fe]){var Er=y.length>0?"{"+y.join(": ..., ")+": ...}":"{}";p(`A props object containing a "key" prop is being spread into JSX:
26
+ Check the top-level render call using <`+t+">.")}return r}}function Le(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=br(r);if(We[t])return;We[t]=!0;var n="";e&&e._owner&&e._owner!==se.current&&(n=" It was passed a child from "+C(e._owner.type)+"."),W(e),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),W(null)}}function Ye(e,r){{if(typeof e!="object")return;if(ue(e))for(var t=0;t<e.length;t++){var n=e[t];le(n)&&Le(n,r)}else if(le(e))e._store&&(e._store.validated=!0);else if(e){var i=Q(e);if(typeof i=="function"&&i!==e.entries)for(var s=i.call(e),o;!(o=s.next()).done;)le(o.value)&&Le(o.value,r)}}}function hr(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===d||r.$$typeof===m))t=r.propTypes;else return;if(t){var n=C(r);tr(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!ce){ce=!0;var i=C(r);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function gr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){W(e),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),W(null);break}}e.ref!==null&&(W(e),p("Invalid attribute `ref` supplied to `React.Fragment`."),W(null))}}var Me={};function Ue(e,r,t,n,i,s){{var o=ne(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" 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 g=vr();g?a+=g:a+=ze();var c;e===null?c="null":ue(e)?c="array":e!==void 0&&e.$$typeof===l?(c="<"+(C(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,a)}var f=pr(e,r,t,i,s);if(f==null)return f;if(o){var E=r.children;if(E!==void 0)if(n)if(ue(E)){for(var L=0;L<E.length;L++)Ye(E[L],e);Object.freeze&&Object.freeze(E)}else p("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 Ye(E,e)}if(V.call(r,"key")){var $=C(e),y=Object.keys(r).filter(function(Rr){return Rr!=="key"}),fe=y.length>0?"{key: someKey, "+y.join(": ..., ")+": ...}":"{key: someKey}";if(!Me[$+fe]){var Er=y.length>0?"{"+y.join(": ..., ")+": ...}":"{}";p(`A props object containing a "key" prop is being spread into JSX:
27
27
  let props = %s;
28
28
  <%s {...props} />
29
29
  React keys must be passed directly to JSX without using spread:
30
30
  let props = %s;
31
- <%s key={someKey} {...props} />`,fe,A,Er,A),Me[A+fe]=!0}}return e===b?gr(f):hr(f),f}}function _r(e,r,t){return Ne(e,r,t,!0)}function mr(e,r,t){return Ne(e,r,t,!1)}var yr=mr,xr=_r;M.Fragment=b,M.jsx=yr,M.jsxs=xr}()),M}var be;function Je(){return be||(be=1,process.env.NODE_ENV==="production"?B.exports=Ve():B.exports=Be()),B.exports}var _=Je();const he={s:"xs",m:"s",l:"m"},ge=({size:u,color:l})=>_.jsx("div",{className:`spinner ${u}`,style:{color:l},children:"Loading..."}),_e=({name:u,color:l,size:h})=>_.jsx("div",{style:{color:l},className:`icon ${h}`,children:u}),qe=()=>{const u=I.useRef(!1),[l,h]=I.useState(!1),b=I.useCallback(()=>{u.current=!0},[]),S=I.useCallback(()=>{u.current=!1},[]),T=I.useCallback(()=>{h(!0)},[]),w=I.useCallback(()=>{h(!1)},[]);return{pointerState:l?"active":u.current?"hover":"default",pointerEnter:b,pointerLeave:S,pointerDown:T,pointerUp:w}},Ke=({variant:u="primary",background:l="rgb(255, 204, 0)",border:h="#292929",container:b="hugging",width:S="13.5rem",height:T="m",padding:w="m",gap:k="0.25rem",placement:d="center",disabled:x,loading:v,text:m,textSize:O="s",textColor:P="#292929",textColorStates:z,icon:J,iconSize:Q="s",iconColor:j="#292929",iconPosition:p="before",iconColorStates:N,className:q},...ee)=>{const{pointerState:F,pointerDown:re,pointerUp:te,pointerEnter:K,pointerLeave:ne}=qe();return z&&z[F]&&(P=z[F]),N&&N[F]&&(j=N[F]),x&&(l="red"),(v||!m)&&(d="center"),_.jsxs("button",{className:`button ${u} ${x?"disabled":""} ${b} h_${T} p_${w} ${p} ${m?"":"icon"} ${q||""}`,style:{justifyContent:d,outlineWidth:u=="primary"||u=="nav"?"1px":"0px",outlineStyle:"solid",outlineColor:h,flexDirection:p==="before"?"row":"row-reverse",width:b==="hugging"?"max-content":S,gap:k},disabled:x||v,onMouseDown:re,onMouseUp:te,onMouseLeave:ne,onMouseEnter:K,...ee,children:[_.jsx("div",{className:`background ${x?"disabled":u} ${b}`,style:{backgroundColor:x&&(u=="nav"||u=="tertiary")?"none":l}}),v?_.jsx(ge,{color:P,size:b==="hugging"?he[w]:he[T]}):_.jsxs(_.Fragment,{children:[J?_.jsx(_e,{name:J,color:F=="active"&&u=="primary"?"white":j,size:Q}):_.jsx(_.Fragment,{}),m?_.jsx("p",{style:{color:P},className:`text_${O}`,children:m}):_.jsx(_.Fragment,{})]})]})},Ge=({variant:u,...l})=>_.jsx("input",{className:"input "+u,...l});R.Button=Ke,R.Icon=_e,R.Input=Ge,R.Spinner=ge,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
31
+ <%s key={someKey} {...props} />`,fe,$,Er,$),Me[$+fe]=!0}}return e===b?gr(f):hr(f),f}}function _r(e,r,t){return Ue(e,r,t,!0)}function mr(e,r,t){return Ue(e,r,t,!1)}var yr=mr,xr=_r;M.Fragment=b,M.jsx=yr,M.jsxs=xr}()),M}var be;function Je(){return be||(be=1,process.env.NODE_ENV==="production"?B.exports=Ve():B.exports=Be()),B.exports}var _=Je();const he={s:"xs",m:"s",l:"m"},ge=({size:u,color:l})=>_.jsx("div",{className:`spinner ${u}`,style:{color:l},children:"Loading..."}),_e=({name:u,color:l,size:h})=>_.jsx("div",{style:{color:l},className:`icon ${h}`,children:u}),qe=()=>{const u=I.useRef(!1),[l,h]=I.useState(!1),b=I.useCallback(()=>{u.current=!0},[]),S=I.useCallback(()=>{u.current=!1},[]),T=I.useCallback(()=>{h(!0)},[]),w=I.useCallback(()=>{h(!1)},[]);return{pointerState:l?"active":u.current?"hover":"default",pointerEnter:b,pointerLeave:S,pointerDown:T,pointerUp:w}},Ke=({variant:u="primary",background:l="rgb(255, 204, 0)",border:h="#292929",container:b="hugging",width:S="13.5rem",height:T="m",padding:w="m",gap:k="0.25rem",placement:d="center",disabled:x,loading:v,text:m,textSize:O="s",textColor:P="#292929",textColorStates:z,icon:J,iconSize:Q="s",iconColor:j="#292929",iconPosition:p="before",iconColorStates:U,className:q},...ee)=>{const{pointerState:A,pointerDown:re,pointerUp:te,pointerEnter:K,pointerLeave:ne}=qe();return z&&z[A]&&(P=z[A]),U&&U[A]&&(j=U[A]),x&&(l="red"),(v||!m)&&(d="center"),_.jsxs("button",{className:`button ${u} ${x?"disabled":""} ${b} h_${T} p_${w} ${p} ${m?"":"icon"} ${q||""}`,style:{justifyContent:d,outlineWidth:u=="primary"||u=="nav"?"1px":"0px",outlineStyle:"solid",outlineColor:h,flexDirection:p==="before"?"row":"row-reverse",width:b==="hugging"?"max-content":S,gap:k},disabled:x||v,onMouseDown:re,onMouseUp:te,onMouseLeave:ne,onMouseEnter:K,...ee,children:[_.jsx("div",{className:`background ${x?"disabled":u} ${b}`,style:{backgroundColor:x&&(u=="nav"||u=="tertiary")?"none":l}}),v?_.jsx(ge,{color:P,size:b==="hugging"?he[w]:he[T]}):_.jsxs(_.Fragment,{children:[J?_.jsx(_e,{name:J,color:A=="active"&&u=="primary"?"white":j,size:Q}):_.jsx(_.Fragment,{}),m?_.jsx("p",{style:{color:P},className:`text_${O}`,children:m}):_.jsx(_.Fragment,{})]})]})},Ge=({variant:u,...l})=>_.jsx("input",{className:"input "+u,...l});R.Button=Ke,R.Icon=_e,R.Input=Ge,R.Spinner=ge,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@ambuj.bhaskar/react-component-library",
3
3
  "private": false,
4
- "version": "0.1.1",
4
+ "version": "0.1.3",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
- "main": "dist/awiros-ui-umd.cjs",
10
- "module": "dist/awiros-ui.js",
11
- "types": "dist/awiros-ui.d.ts",
9
+ "main": "dist/index.umd.js",
10
+ "module": "dist/index.js",
11
+ "types": "dist/index.d.ts",
12
12
  "description": "A React component library for building UI components",
13
13
  "exports": {
14
14
  ".": {
15
15
  "import": "./dist/index.js",
16
- "require": "./dist/awiros-ui-umd.cjs"
16
+ "require": "./dist/index.umd.js"
17
17
  },
18
18
  "./style.css": "./dist/assets/index.css"
19
19
  },
File without changes