@ambuj.bhaskar/react-component-library 0.0.6 → 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/README.md CHANGED
@@ -1,16 +1,16 @@
1
- # React UI library
2
-
3
- This package contains a UI library.
4
-
5
- The library has 3 parts:
6
-
7
- - `Components`
8
- - `Themes`
9
- - `Icons`
10
-
11
- ## Components
12
-
13
- Currently it has support for the following components:
14
-
15
- - `Button`
16
- - `Input`
1
+ # React UI library
2
+
3
+ This package contains a UI library.
4
+
5
+ The library has 3 parts:
6
+
7
+ - `Components`
8
+ - `Themes`
9
+ - `Icons`
10
+
11
+ ## Components
12
+
13
+ Currently it has support for the following components:
14
+
15
+ - `Button`
16
+ - `Input`
@@ -0,0 +1 @@
1
+ *{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}
@@ -0,0 +1,82 @@
1
+ import { ComponentProps } from 'react';
2
+ import * as React_2 from 'react';
3
+
4
+ /**
5
+ * Button component props.
6
+ */
7
+ export declare const Button: React.FC<ButtonProps>;
8
+
9
+ declare type ButtonHeight = "s" | "m" | "l";
10
+
11
+ declare type ButtonProps = HTMLButtonProps & {
12
+ variant?: "primary" | "secondary" | "tertiary" | "nav";
13
+ background?: Color;
14
+ backgroundStates?: ColorStatesType;
15
+ border?: Color;
16
+ borderStates?: ColorStatesType;
17
+ container?: "fixed" | "hugging";
18
+ padding?: Padding;
19
+ width?: CSSstring;
20
+ height?: ButtonHeight;
21
+ gap?: CSSstring;
22
+ placement?: JustifyContent;
23
+ loading?: boolean;
24
+ disabled?: boolean;
25
+ text?: string;
26
+ textSize?: TextSize;
27
+ textColor?: Color;
28
+ textColorStates?: ColorStatesType;
29
+ icon?: IconName;
30
+ iconSize?: "s" | "m" | "l";
31
+ iconColor?: Color;
32
+ iconPosition?: IconPositionType;
33
+ iconColorStates?: ColorStatesType;
34
+ className?: string;
35
+ };
36
+
37
+ declare type Color = string;
38
+
39
+ declare type ColorStatesType = {
40
+ default: Color;
41
+ hover?: Color;
42
+ active?: Color;
43
+ };
44
+
45
+ declare type CSSstring = string;
46
+
47
+ declare type HTMLButtonProps = ComponentProps<"button">;
48
+
49
+ declare type HTMLInputProps = ComponentProps<"input">;
50
+
51
+ export declare const Icon: React_2.FunctionComponent<IconProps>;
52
+
53
+ declare type IconName = string;
54
+
55
+ declare type IconPositionType = "before" | "after";
56
+
57
+ declare type IconProps = {
58
+ name: string;
59
+ color: string;
60
+ size: "xs" | "s" | "m" | "l" | "xl";
61
+ };
62
+
63
+ export declare const Input: React.FC<InputProps>;
64
+
65
+ declare type InputProps = HTMLInputProps & {
66
+ variant?: "primary" | "secondary";
67
+ };
68
+
69
+ declare type JustifyContent = "center" | "start" | "end" | "flex-start" | "flex-end" | "left" | "right" | "baseline" | "first baseline" | "last baseline" | "space-between" | "space-around" | "space-evenly" | "stretch";
70
+
71
+ declare type Padding = "s" | "m" | "l";
72
+
73
+ export declare const Spinner: React_2.FC<SpinnerProps>;
74
+
75
+ declare type SpinnerProps = {
76
+ size?: "xs" | "s" | "m" | "l" | "xl";
77
+ color?: string;
78
+ };
79
+
80
+ declare type TextSize = "xs" | "s" | "m" | "l" | "xl";
81
+
82
+ export { }
package/dist/index.js ADDED
@@ -0,0 +1,31 @@
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
+ * @license React
4
+ * react-jsx-runtime.production.min.js
5
+ *
6
+ * Copyright (c) Facebook, Inc. and its affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var pe;function Ve(){if(pe)return Y;pe=1;var u=D,l=Symbol.for("react.element"),h=Symbol.for("react.fragment"),b=Object.prototype.hasOwnProperty,S=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,T={key:!0,ref:!0,__self:!0,__source:!0};function w(k,d,x){var v,m={},O=null,P=null;x!==void 0&&(O=""+x),d.key!==void 0&&(O=""+d.key),d.ref!==void 0&&(P=d.ref);for(v in d)b.call(d,v)&&!T.hasOwnProperty(v)&&(m[v]=d[v]);if(k&&k.defaultProps)for(v in d=k.defaultProps,d)m[v]===void 0&&(m[v]=d[v]);return{$$typeof:l,type:k,key:O,ref:P,props:m,_owner:S.current}}return Y.Fragment=h,Y.jsx=w,Y.jsxs=w,Y}var M={};/**
11
+ * @license React
12
+ * react-jsx-runtime.development.js
13
+ *
14
+ * Copyright (c) Facebook, Inc. and its affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
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];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
+ `+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
+ `),g=n.stack.split(`
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:"",$=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
+
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
+
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
+ let props = %s;
28
+ <%s {...props} />
29
+ React keys must be passed directly to JSX without using spread:
30
+ let props = %s;
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,67 +1,68 @@
1
- {
2
- "name": "@ambuj.bhaskar/react-component-library",
3
- "private": false,
4
- "version": "0.0.6",
5
- "type": "module",
6
- "files": [
7
- "dist"
8
- ],
9
- "main": "dist/awiros-ui-umd.cjs",
10
- "module": "dist/awiros-ui.js",
11
- "types": "dist/awiros-ui.d.ts",
12
- "description": "A React component library for building UI components",
13
- "exports": {
14
- ".": {
15
- "import": "./dist/awiros-ui.js",
16
- "require": "./dist/awiros-ui-umd.cjs"
17
- },
18
- "./style.css": "./dist/awiros-ui.css"
19
- },
20
- "scripts": {
21
- "dev": "vite",
22
- "build": "tsc -b && vite build",
23
- "lint": "eslint .",
24
- "preview": "vite preview",
25
- "storybook": "storybook dev -p 6006",
26
- "build-storybook": "storybook build"
27
- },
28
- "dependencies": {
29
- "class-variance-authority": "^0.7.1"
30
- },
31
- "peerDependencies": {
32
- "react": "^18.3.1",
33
- "react-dom": "^18.3.1"
34
- },
35
- "devDependencies": {
36
- "@chromatic-com/storybook": "^3.2.3",
37
- "@eslint/js": "^9.17.0",
38
- "@storybook/addon-essentials": "^8.4.7",
39
- "@storybook/addon-interactions": "^8.4.7",
40
- "@storybook/addon-onboarding": "^8.4.7",
41
- "@storybook/blocks": "^8.4.7",
42
- "@storybook/manager-api": "^8.4.7",
43
- "@storybook/react": "^8.4.7",
44
- "@storybook/react-vite": "^8.4.7",
45
- "@storybook/test": "^8.4.7",
46
- "@storybook/theming": "^8.4.7",
47
- "@types/react": "^18.3.18",
48
- "@types/react-dom": "^18.3.5",
49
- "@vitejs/plugin-react": "^4.3.4",
50
- "eslint": "^9.17.0",
51
- "eslint-plugin-react-hooks": "^5.0.0",
52
- "eslint-plugin-react-refresh": "^0.4.16",
53
- "eslint-plugin-storybook": "^0.11.1",
54
- "globals": "^15.14.0",
55
- "storybook": "^8.4.7",
56
- "typescript": "~5.6.2",
57
- "typescript-eslint": "^8.18.2",
58
- "vite": "^6.0.5",
59
- "vite-plugin-dts": "^4.4.0",
60
- "vite-tsconfig-paths": "^5.1.4"
61
- },
62
- "eslintConfig": {
63
- "extends": [
64
- "plugin:storybook/recommended"
65
- ]
66
- }
67
- }
1
+ {
2
+ "name": "@ambuj.bhaskar/react-component-library",
3
+ "private": false,
4
+ "version": "0.1.3",
5
+ "type": "module",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "main": "dist/index.umd.js",
10
+ "module": "dist/index.js",
11
+ "types": "dist/index.d.ts",
12
+ "description": "A React component library for building UI components",
13
+ "exports": {
14
+ ".": {
15
+ "import": "./dist/index.js",
16
+ "require": "./dist/index.umd.js"
17
+ },
18
+ "./style.css": "./dist/assets/index.css"
19
+ },
20
+ "scripts": {
21
+ "dev": "vite",
22
+ "build": "tsc -b && vite build",
23
+ "lint": "eslint .",
24
+ "preview": "vite preview",
25
+ "storybook": "storybook dev -p 6006",
26
+ "build-storybook": "storybook build"
27
+ },
28
+ "dependencies": {
29
+ "class-variance-authority": "^0.7.1"
30
+ },
31
+ "peerDependencies": {
32
+ "react": "^18.3.1",
33
+ "react-dom": "^18.3.1"
34
+ },
35
+ "devDependencies": {
36
+ "@chromatic-com/storybook": "^3.2.3",
37
+ "@eslint/js": "^9.17.0",
38
+ "@storybook/addon-essentials": "^8.4.7",
39
+ "@storybook/addon-interactions": "^8.4.7",
40
+ "@storybook/addon-onboarding": "^8.4.7",
41
+ "@storybook/blocks": "^8.4.7",
42
+ "@storybook/manager-api": "^8.4.7",
43
+ "@storybook/react": "^8.4.7",
44
+ "@storybook/react-vite": "^8.4.7",
45
+ "@storybook/test": "^8.4.7",
46
+ "@storybook/theming": "^8.4.7",
47
+ "@types/react": "^18.3.18",
48
+ "@types/react-dom": "^18.3.5",
49
+ "@vitejs/plugin-react": "^4.3.4",
50
+ "eslint": "^9.17.0",
51
+ "eslint-plugin-react-hooks": "^5.0.0",
52
+ "eslint-plugin-react-refresh": "^0.4.16",
53
+ "eslint-plugin-storybook": "^0.11.1",
54
+ "globals": "^15.14.0",
55
+ "storybook": "^8.4.7",
56
+ "typescript": "~5.6.2",
57
+ "typescript-eslint": "^8.18.2",
58
+ "vite": "^6.0.5",
59
+ "vite-plugin-dts": "^4.4.0",
60
+ "vite-plugin-lib-inject-css": "^2.2.1",
61
+ "vite-tsconfig-paths": "^5.1.4"
62
+ },
63
+ "eslintConfig": {
64
+ "extends": [
65
+ "plugin:storybook/recommended"
66
+ ]
67
+ }
68
+ }
@@ -1 +0,0 @@
1
- .button{color:#fff!important;padding:.5rem 1.5rem!important;outline:none!important;border:none!important;border-radius:500px!important;cursor:pointer!important}.button.primary{background-color:red}.button.secondary{background-color:gray}.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}
@@ -1,19 +0,0 @@
1
- import { ComponentProps } from 'react';
2
-
3
- export declare const Button: React.FC<ButtonProps>;
4
-
5
- declare type ButtonProps = HTMLButtonProps & {
6
- variant?: "primary" | "secondary";
7
- };
8
-
9
- declare type HTMLButtonProps = ComponentProps<"button">;
10
-
11
- declare type HTMLInputProps = ComponentProps<"input">;
12
-
13
- export declare const Input: React.FC<InputProps>;
14
-
15
- declare type InputProps = HTMLInputProps & {
16
- variant?: "primary" | "secondary";
17
- };
18
-
19
- export { }
package/dist/awiros-ui.js DELETED
@@ -1,635 +0,0 @@
1
- import Pe from "react";
2
- var M = { exports: {} }, D = {};
3
- /**
4
- * @license React
5
- * react-jsx-runtime.production.min.js
6
- *
7
- * Copyright (c) Facebook, Inc. and its affiliates.
8
- *
9
- * This source code is licensed under the MIT license found in the
10
- * LICENSE file in the root directory of this source tree.
11
- */
12
- var Te;
13
- function cr() {
14
- if (Te) return D;
15
- Te = 1;
16
- var R = Pe, b = Symbol.for("react.element"), U = Symbol.for("react.fragment"), O = Object.prototype.hasOwnProperty, A = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, I = { key: !0, ref: !0, __self: !0, __source: !0 };
17
- function j(_, f, S) {
18
- var p, E = {}, h = null, $ = null;
19
- S !== void 0 && (h = "" + S), f.key !== void 0 && (h = "" + f.key), f.ref !== void 0 && ($ = f.ref);
20
- for (p in f) O.call(f, p) && !I.hasOwnProperty(p) && (E[p] = f[p]);
21
- if (_ && _.defaultProps) for (p in f = _.defaultProps, f) E[p] === void 0 && (E[p] = f[p]);
22
- return { $$typeof: b, type: _, key: h, ref: $, props: E, _owner: A.current };
23
- }
24
- return D.Fragment = U, D.jsx = j, D.jsxs = j, D;
25
- }
26
- var F = {};
27
- /**
28
- * @license React
29
- * react-jsx-runtime.development.js
30
- *
31
- * Copyright (c) Facebook, Inc. and its affiliates.
32
- *
33
- * This source code is licensed under the MIT license found in the
34
- * LICENSE file in the root directory of this source tree.
35
- */
36
- var Oe;
37
- function vr() {
38
- return Oe || (Oe = 1, process.env.NODE_ENV !== "production" && function() {
39
- var R = Pe, b = Symbol.for("react.element"), U = Symbol.for("react.portal"), O = Symbol.for("react.fragment"), A = Symbol.for("react.strict_mode"), I = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), _ = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), $ = Symbol.for("react.offscreen"), H = Symbol.iterator, we = "@@iterator";
40
- function je(e) {
41
- if (e === null || typeof e != "object")
42
- return null;
43
- var r = H && e[H] || e[we];
44
- return typeof r == "function" ? r : null;
45
- }
46
- var P = R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
- function c(e) {
48
- {
49
- for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
50
- t[n - 1] = arguments[n];
51
- xe("error", e, t);
52
- }
53
- }
54
- function xe(e, r, t) {
55
- {
56
- var n = P.ReactDebugCurrentFrame, o = n.getStackAddendum();
57
- o !== "" && (r += "%s", t = t.concat([o]));
58
- var u = t.map(function(i) {
59
- return String(i);
60
- });
61
- u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
62
- }
63
- }
64
- var ke = !1, De = !1, Fe = !1, Ae = !1, Ie = !1, Z;
65
- Z = Symbol.for("react.module.reference");
66
- function $e(e) {
67
- return !!(typeof e == "string" || typeof e == "function" || e === O || e === I || Ie || e === A || e === S || e === p || Ae || e === $ || ke || De || Fe || typeof e == "object" && e !== null && (e.$$typeof === h || e.$$typeof === E || e.$$typeof === j || e.$$typeof === _ || e.$$typeof === f || // This needs to include all possible module reference object
68
- // types supported by any Flight configuration anywhere since
69
- // we don't know which Flight build this will end up being used
70
- // with.
71
- e.$$typeof === Z || e.getModuleId !== void 0));
72
- }
73
- function We(e, r, t) {
74
- var n = e.displayName;
75
- if (n)
76
- return n;
77
- var o = r.displayName || r.name || "";
78
- return o !== "" ? t + "(" + o + ")" : t;
79
- }
80
- function Q(e) {
81
- return e.displayName || "Context";
82
- }
83
- function y(e) {
84
- if (e == null)
85
- return null;
86
- if (typeof e.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
87
- return e.displayName || e.name || null;
88
- if (typeof e == "string")
89
- return e;
90
- switch (e) {
91
- case O:
92
- return "Fragment";
93
- case U:
94
- return "Portal";
95
- case I:
96
- return "Profiler";
97
- case A:
98
- return "StrictMode";
99
- case S:
100
- return "Suspense";
101
- case p:
102
- return "SuspenseList";
103
- }
104
- if (typeof e == "object")
105
- switch (e.$$typeof) {
106
- case _:
107
- var r = e;
108
- return Q(r) + ".Consumer";
109
- case j:
110
- var t = e;
111
- return Q(t._context) + ".Provider";
112
- case f:
113
- return We(e, e.render, "ForwardRef");
114
- case E:
115
- var n = e.displayName || null;
116
- return n !== null ? n : y(e.type) || "Memo";
117
- case h: {
118
- var o = e, u = o._payload, i = o._init;
119
- try {
120
- return y(i(u));
121
- } catch {
122
- return null;
123
- }
124
- }
125
- }
126
- return null;
127
- }
128
- var m = Object.assign, x = 0, ee, re, te, ne, ae, ie, oe;
129
- function ue() {
130
- }
131
- ue.__reactDisabledLog = !0;
132
- function Ye() {
133
- {
134
- if (x === 0) {
135
- ee = console.log, re = console.info, te = console.warn, ne = console.error, ae = console.group, ie = console.groupCollapsed, oe = console.groupEnd;
136
- var e = {
137
- configurable: !0,
138
- enumerable: !0,
139
- value: ue,
140
- writable: !0
141
- };
142
- Object.defineProperties(console, {
143
- info: e,
144
- log: e,
145
- warn: e,
146
- error: e,
147
- group: e,
148
- groupCollapsed: e,
149
- groupEnd: e
150
- });
151
- }
152
- x++;
153
- }
154
- }
155
- function Le() {
156
- {
157
- if (x--, x === 0) {
158
- var e = {
159
- configurable: !0,
160
- enumerable: !0,
161
- writable: !0
162
- };
163
- Object.defineProperties(console, {
164
- log: m({}, e, {
165
- value: ee
166
- }),
167
- info: m({}, e, {
168
- value: re
169
- }),
170
- warn: m({}, e, {
171
- value: te
172
- }),
173
- error: m({}, e, {
174
- value: ne
175
- }),
176
- group: m({}, e, {
177
- value: ae
178
- }),
179
- groupCollapsed: m({}, e, {
180
- value: ie
181
- }),
182
- groupEnd: m({}, e, {
183
- value: oe
184
- })
185
- });
186
- }
187
- x < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
- }
189
- }
190
- var N = P.ReactCurrentDispatcher, J;
191
- function W(e, r, t) {
192
- {
193
- if (J === void 0)
194
- try {
195
- throw Error();
196
- } catch (o) {
197
- var n = o.stack.trim().match(/\n( *(at )?)/);
198
- J = n && n[1] || "";
199
- }
200
- return `
201
- ` + J + e;
202
- }
203
- }
204
- var q = !1, Y;
205
- {
206
- var Ve = typeof WeakMap == "function" ? WeakMap : Map;
207
- Y = new Ve();
208
- }
209
- function se(e, r) {
210
- if (!e || q)
211
- return "";
212
- {
213
- var t = Y.get(e);
214
- if (t !== void 0)
215
- return t;
216
- }
217
- var n;
218
- q = !0;
219
- var o = Error.prepareStackTrace;
220
- Error.prepareStackTrace = void 0;
221
- var u;
222
- u = N.current, N.current = null, Ye();
223
- try {
224
- if (r) {
225
- var i = function() {
226
- throw Error();
227
- };
228
- if (Object.defineProperty(i.prototype, "props", {
229
- set: function() {
230
- throw Error();
231
- }
232
- }), typeof Reflect == "object" && Reflect.construct) {
233
- try {
234
- Reflect.construct(i, []);
235
- } catch (d) {
236
- n = d;
237
- }
238
- Reflect.construct(e, [], i);
239
- } else {
240
- try {
241
- i.call();
242
- } catch (d) {
243
- n = d;
244
- }
245
- e.call(i.prototype);
246
- }
247
- } else {
248
- try {
249
- throw Error();
250
- } catch (d) {
251
- n = d;
252
- }
253
- e();
254
- }
255
- } catch (d) {
256
- if (d && n && typeof d.stack == "string") {
257
- for (var a = d.stack.split(`
258
- `), v = n.stack.split(`
259
- `), s = a.length - 1, l = v.length - 1; s >= 1 && l >= 0 && a[s] !== v[l]; )
260
- l--;
261
- for (; s >= 1 && l >= 0; s--, l--)
262
- if (a[s] !== v[l]) {
263
- if (s !== 1 || l !== 1)
264
- do
265
- if (s--, l--, l < 0 || a[s] !== v[l]) {
266
- var g = `
267
- ` + a[s].replace(" at new ", " at ");
268
- return e.displayName && g.includes("<anonymous>") && (g = g.replace("<anonymous>", e.displayName)), typeof e == "function" && Y.set(e, g), g;
269
- }
270
- while (s >= 1 && l >= 0);
271
- break;
272
- }
273
- }
274
- } finally {
275
- q = !1, N.current = u, Le(), Error.prepareStackTrace = o;
276
- }
277
- var w = e ? e.displayName || e.name : "", T = w ? W(w) : "";
278
- return typeof e == "function" && Y.set(e, T), T;
279
- }
280
- function Me(e, r, t) {
281
- return se(e, !1);
282
- }
283
- function Ue(e) {
284
- var r = e.prototype;
285
- return !!(r && r.isReactComponent);
286
- }
287
- function L(e, r, t) {
288
- if (e == null)
289
- return "";
290
- if (typeof e == "function")
291
- return se(e, Ue(e));
292
- if (typeof e == "string")
293
- return W(e);
294
- switch (e) {
295
- case S:
296
- return W("Suspense");
297
- case p:
298
- return W("SuspenseList");
299
- }
300
- if (typeof e == "object")
301
- switch (e.$$typeof) {
302
- case f:
303
- return Me(e.render);
304
- case E:
305
- return L(e.type, r, t);
306
- case h: {
307
- var n = e, o = n._payload, u = n._init;
308
- try {
309
- return L(u(o), r, t);
310
- } catch {
311
- }
312
- }
313
- }
314
- return "";
315
- }
316
- var k = Object.prototype.hasOwnProperty, le = {}, fe = P.ReactDebugCurrentFrame;
317
- function V(e) {
318
- if (e) {
319
- var r = e._owner, t = L(e.type, e._source, r ? r.type : null);
320
- fe.setExtraStackFrame(t);
321
- } else
322
- fe.setExtraStackFrame(null);
323
- }
324
- function Ne(e, r, t, n, o) {
325
- {
326
- var u = Function.call.bind(k);
327
- for (var i in e)
328
- if (u(e, i)) {
329
- var a = void 0;
330
- try {
331
- if (typeof e[i] != "function") {
332
- var v = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
- throw v.name = "Invariant Violation", v;
334
- }
335
- a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
- } catch (s) {
337
- a = s;
338
- }
339
- a && !(a instanceof Error) && (V(o), c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof a), V(null)), a instanceof Error && !(a.message in le) && (le[a.message] = !0, V(o), c("Failed %s type: %s", t, a.message), V(null));
340
- }
341
- }
342
- }
343
- var Je = Array.isArray;
344
- function B(e) {
345
- return Je(e);
346
- }
347
- function qe(e) {
348
- {
349
- var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
350
- return t;
351
- }
352
- }
353
- function Be(e) {
354
- try {
355
- return ce(e), !1;
356
- } catch {
357
- return !0;
358
- }
359
- }
360
- function ce(e) {
361
- return "" + e;
362
- }
363
- function ve(e) {
364
- if (Be(e))
365
- return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", qe(e)), ce(e);
366
- }
367
- var de = P.ReactCurrentOwner, Ke = {
368
- key: !0,
369
- ref: !0,
370
- __self: !0,
371
- __source: !0
372
- }, pe, ge;
373
- function Ge(e) {
374
- if (k.call(e, "ref")) {
375
- var r = Object.getOwnPropertyDescriptor(e, "ref").get;
376
- if (r && r.isReactWarning)
377
- return !1;
378
- }
379
- return e.ref !== void 0;
380
- }
381
- function ze(e) {
382
- if (k.call(e, "key")) {
383
- var r = Object.getOwnPropertyDescriptor(e, "key").get;
384
- if (r && r.isReactWarning)
385
- return !1;
386
- }
387
- return e.key !== void 0;
388
- }
389
- function Xe(e, r) {
390
- typeof e.ref == "string" && de.current;
391
- }
392
- function He(e, r) {
393
- {
394
- var t = function() {
395
- pe || (pe = !0, c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
396
- };
397
- t.isReactWarning = !0, Object.defineProperty(e, "key", {
398
- get: t,
399
- configurable: !0
400
- });
401
- }
402
- }
403
- function Ze(e, r) {
404
- {
405
- var t = function() {
406
- ge || (ge = !0, c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
407
- };
408
- t.isReactWarning = !0, Object.defineProperty(e, "ref", {
409
- get: t,
410
- configurable: !0
411
- });
412
- }
413
- }
414
- var Qe = function(e, r, t, n, o, u, i) {
415
- var a = {
416
- // This tag allows us to uniquely identify this as a React Element
417
- $$typeof: b,
418
- // Built-in properties that belong on the element
419
- type: e,
420
- key: r,
421
- ref: t,
422
- props: i,
423
- // Record the component responsible for creating this element.
424
- _owner: u
425
- };
426
- return a._store = {}, Object.defineProperty(a._store, "validated", {
427
- configurable: !1,
428
- enumerable: !1,
429
- writable: !0,
430
- value: !1
431
- }), Object.defineProperty(a, "_self", {
432
- configurable: !1,
433
- enumerable: !1,
434
- writable: !1,
435
- value: n
436
- }), Object.defineProperty(a, "_source", {
437
- configurable: !1,
438
- enumerable: !1,
439
- writable: !1,
440
- value: o
441
- }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
442
- };
443
- function er(e, r, t, n, o) {
444
- {
445
- var u, i = {}, a = null, v = null;
446
- t !== void 0 && (ve(t), a = "" + t), ze(r) && (ve(r.key), a = "" + r.key), Ge(r) && (v = r.ref, Xe(r, o));
447
- for (u in r)
448
- k.call(r, u) && !Ke.hasOwnProperty(u) && (i[u] = r[u]);
449
- if (e && e.defaultProps) {
450
- var s = e.defaultProps;
451
- for (u in s)
452
- i[u] === void 0 && (i[u] = s[u]);
453
- }
454
- if (a || v) {
455
- var l = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
- a && He(i, l), v && Ze(i, l);
457
- }
458
- return Qe(e, a, v, o, n, de.current, i);
459
- }
460
- }
461
- var K = P.ReactCurrentOwner, be = P.ReactDebugCurrentFrame;
462
- function C(e) {
463
- if (e) {
464
- var r = e._owner, t = L(e.type, e._source, r ? r.type : null);
465
- be.setExtraStackFrame(t);
466
- } else
467
- be.setExtraStackFrame(null);
468
- }
469
- var G;
470
- G = !1;
471
- function z(e) {
472
- return typeof e == "object" && e !== null && e.$$typeof === b;
473
- }
474
- function Ee() {
475
- {
476
- if (K.current) {
477
- var e = y(K.current.type);
478
- if (e)
479
- return `
480
-
481
- Check the render method of \`` + e + "`.";
482
- }
483
- return "";
484
- }
485
- }
486
- function rr(e) {
487
- return "";
488
- }
489
- var ye = {};
490
- function tr(e) {
491
- {
492
- var r = Ee();
493
- if (!r) {
494
- var t = typeof e == "string" ? e : e.displayName || e.name;
495
- t && (r = `
496
-
497
- Check the top-level render call using <` + t + ">.");
498
- }
499
- return r;
500
- }
501
- }
502
- function Re(e, r) {
503
- {
504
- if (!e._store || e._store.validated || e.key != null)
505
- return;
506
- e._store.validated = !0;
507
- var t = tr(r);
508
- if (ye[t])
509
- return;
510
- ye[t] = !0;
511
- var n = "";
512
- e && e._owner && e._owner !== K.current && (n = " It was passed a child from " + y(e._owner.type) + "."), C(e), c('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), C(null);
513
- }
514
- }
515
- function _e(e, r) {
516
- {
517
- if (typeof e != "object")
518
- return;
519
- if (B(e))
520
- for (var t = 0; t < e.length; t++) {
521
- var n = e[t];
522
- z(n) && Re(n, r);
523
- }
524
- else if (z(e))
525
- e._store && (e._store.validated = !0);
526
- else if (e) {
527
- var o = je(e);
528
- if (typeof o == "function" && o !== e.entries)
529
- for (var u = o.call(e), i; !(i = u.next()).done; )
530
- z(i.value) && Re(i.value, r);
531
- }
532
- }
533
- }
534
- function nr(e) {
535
- {
536
- var r = e.type;
537
- if (r == null || typeof r == "string")
538
- return;
539
- var t;
540
- if (typeof r == "function")
541
- t = r.propTypes;
542
- else if (typeof r == "object" && (r.$$typeof === f || // Note: Memo only checks outer props here.
543
- // Inner props are checked in the reconciler.
544
- r.$$typeof === E))
545
- t = r.propTypes;
546
- else
547
- return;
548
- if (t) {
549
- var n = y(r);
550
- Ne(t, e.props, "prop", n, e);
551
- } else if (r.PropTypes !== void 0 && !G) {
552
- G = !0;
553
- var o = y(r);
554
- c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown");
555
- }
556
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
557
- }
558
- }
559
- function ar(e) {
560
- {
561
- for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
562
- var n = r[t];
563
- if (n !== "children" && n !== "key") {
564
- C(e), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), C(null);
565
- break;
566
- }
567
- }
568
- e.ref !== null && (C(e), c("Invalid attribute `ref` supplied to `React.Fragment`."), C(null));
569
- }
570
- }
571
- var he = {};
572
- function me(e, r, t, n, o, u) {
573
- {
574
- var i = $e(e);
575
- if (!i) {
576
- var a = "";
577
- (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.");
578
- var v = rr();
579
- v ? a += v : a += Ee();
580
- var s;
581
- e === null ? s = "null" : B(e) ? s = "array" : e !== void 0 && e.$$typeof === b ? (s = "<" + (y(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : s = typeof e, c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", s, a);
582
- }
583
- var l = er(e, r, t, o, u);
584
- if (l == null)
585
- return l;
586
- if (i) {
587
- var g = r.children;
588
- if (g !== void 0)
589
- if (n)
590
- if (B(g)) {
591
- for (var w = 0; w < g.length; w++)
592
- _e(g[w], e);
593
- Object.freeze && Object.freeze(g);
594
- } else
595
- c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
596
- else
597
- _e(g, e);
598
- }
599
- if (k.call(r, "key")) {
600
- var T = y(e), d = Object.keys(r).filter(function(fr) {
601
- return fr !== "key";
602
- }), X = d.length > 0 ? "{key: someKey, " + d.join(": ..., ") + ": ...}" : "{key: someKey}";
603
- if (!he[T + X]) {
604
- var lr = d.length > 0 ? "{" + d.join(": ..., ") + ": ...}" : "{}";
605
- c(`A props object containing a "key" prop is being spread into JSX:
606
- let props = %s;
607
- <%s {...props} />
608
- React keys must be passed directly to JSX without using spread:
609
- let props = %s;
610
- <%s key={someKey} {...props} />`, X, T, lr, T), he[T + X] = !0;
611
- }
612
- }
613
- return e === O ? ar(l) : nr(l), l;
614
- }
615
- }
616
- function ir(e, r, t) {
617
- return me(e, r, t, !0);
618
- }
619
- function or(e, r, t) {
620
- return me(e, r, t, !1);
621
- }
622
- var ur = or, sr = ir;
623
- F.Fragment = O, F.jsx = ur, F.jsxs = sr;
624
- }()), F;
625
- }
626
- var Se;
627
- function dr() {
628
- return Se || (Se = 1, process.env.NODE_ENV === "production" ? M.exports = cr() : M.exports = vr()), M.exports;
629
- }
630
- var Ce = dr();
631
- const gr = ({ variant: R, ...b }) => /* @__PURE__ */ Ce.jsx("button", { className: "button " + R, ...b }), br = ({ variant: R, ...b }) => /* @__PURE__ */ Ce.jsx("input", { className: "input " + R, ...b });
632
- export {
633
- gr as Button,
634
- br as Input
635
- };
@@ -1,30 +0,0 @@
1
- (function(h,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],S):(h=typeof globalThis<"u"?globalThis:h||self,S(h["awiros-ui"]={},h.React))})(this,function(h,S){"use strict";var W={exports:{}},k={};/**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Q;function je(){if(Q)return k;Q=1;var R=S,y=Symbol.for("react.element"),B=Symbol.for("react.fragment"),P=Object.prototype.hasOwnProperty,Y=R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$={key:!0,ref:!0,__self:!0,__source:!0};function F(_,l,w){var p,b={},m=null,L=null;w!==void 0&&(m=""+w),l.key!==void 0&&(m=""+l.key),l.ref!==void 0&&(L=l.ref);for(p in l)P.call(l,p)&&!$.hasOwnProperty(p)&&(b[p]=l[p]);if(_&&_.defaultProps)for(p in l=_.defaultProps,l)b[p]===void 0&&(b[p]=l[p]);return{$$typeof:y,type:_,key:m,ref:L,props:b,_owner:Y.current}}return k.Fragment=B,k.jsx=F,k.jsxs=F,k}var D={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var ee;function xe(){return ee||(ee=1,process.env.NODE_ENV!=="production"&&function(){var R=S,y=Symbol.for("react.element"),B=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),_=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),L=Symbol.for("react.offscreen"),ne=Symbol.iterator,Ae="@@iterator";function Ie(e){if(e===null||typeof e!="object")return null;var r=ne&&e[ne]||e[Ae];return typeof r=="function"?r:null}var C=R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function c(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];We("error",e,t)}}function We(e,r,t){{var n=C.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var u=t.map(function(i){return String(i)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var Ye=!1,$e=!1,Le=!1,Me=!1,Ve=!1,ae;ae=Symbol.for("react.module.reference");function Ue(e){return!!(typeof e=="string"||typeof e=="function"||e===P||e===$||Ve||e===Y||e===w||e===p||Me||e===L||Ye||$e||Le||typeof e=="object"&&e!==null&&(e.$$typeof===m||e.$$typeof===b||e.$$typeof===F||e.$$typeof===_||e.$$typeof===l||e.$$typeof===ae||e.getModuleId!==void 0))}function Ne(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function ie(e){return e.displayName||"Context"}function E(e){if(e==null)return null;if(typeof e.tag=="number"&&c("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 P:return"Fragment";case B:return"Portal";case $:return"Profiler";case Y:return"StrictMode";case w:return"Suspense";case p:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _:var r=e;return ie(r)+".Consumer";case F:var t=e;return ie(t._context)+".Provider";case l:return Ne(e,e.render,"ForwardRef");case b:var n=e.displayName||null;return n!==null?n:E(e.type)||"Memo";case m:{var o=e,u=o._payload,i=o._init;try{return E(i(u))}catch{return null}}}return null}var T=Object.assign,A=0,oe,ue,se,fe,le,ce,de;function ve(){}ve.__reactDisabledLog=!0;function Be(){{if(A===0){oe=console.log,ue=console.info,se=console.warn,fe=console.error,le=console.group,ce=console.groupCollapsed,de=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ve,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}A++}}function Je(){{if(A--,A===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},e,{value:oe}),info:T({},e,{value:ue}),warn:T({},e,{value:se}),error:T({},e,{value:fe}),group:T({},e,{value:le}),groupCollapsed:T({},e,{value:ce}),groupEnd:T({},e,{value:de})})}A<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var J=C.ReactCurrentDispatcher,q;function M(e,r,t){{if(q===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);q=n&&n[1]||""}return`
18
- `+q+e}}var K=!1,V;{var qe=typeof WeakMap=="function"?WeakMap:Map;V=new qe}function pe(e,r){if(!e||K)return"";{var t=V.get(e);if(t!==void 0)return t}var n;K=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=J.current,J.current=null,Be();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(v){n=v}Reflect.construct(e,[],i)}else{try{i.call()}catch(v){n=v}e.call(i.prototype)}}else{try{throw Error()}catch(v){n=v}e()}}catch(v){if(v&&n&&typeof v.stack=="string"){for(var a=v.stack.split(`
19
- `),d=n.stack.split(`
20
- `),s=a.length-1,f=d.length-1;s>=1&&f>=0&&a[s]!==d[f];)f--;for(;s>=1&&f>=0;s--,f--)if(a[s]!==d[f]){if(s!==1||f!==1)do if(s--,f--,f<0||a[s]!==d[f]){var g=`
21
- `+a[s].replace(" at new "," at ");return e.displayName&&g.includes("<anonymous>")&&(g=g.replace("<anonymous>",e.displayName)),typeof e=="function"&&V.set(e,g),g}while(s>=1&&f>=0);break}}}finally{K=!1,J.current=u,Je(),Error.prepareStackTrace=o}var x=e?e.displayName||e.name:"",O=x?M(x):"";return typeof e=="function"&&V.set(e,O),O}function Ke(e,r,t){return pe(e,!1)}function Ge(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function U(e,r,t){if(e==null)return"";if(typeof e=="function")return pe(e,Ge(e));if(typeof e=="string")return M(e);switch(e){case w:return M("Suspense");case p:return M("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return Ke(e.render);case b:return U(e.type,r,t);case m:{var n=e,o=n._payload,u=n._init;try{return U(u(o),r,t)}catch{}}}return""}var I=Object.prototype.hasOwnProperty,ge={},ye=C.ReactDebugCurrentFrame;function N(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}function ze(e,r,t,n,o){{var u=Function.call.bind(I);for(var i in e)if(u(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var d=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(N(o),c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof a),N(null)),a instanceof Error&&!(a.message in ge)&&(ge[a.message]=!0,N(o),c("Failed %s type: %s",t,a.message),N(null))}}}var Xe=Array.isArray;function G(e){return Xe(e)}function He(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Ze(e){try{return be(e),!1}catch{return!0}}function be(e){return""+e}function he(e){if(Ze(e))return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",He(e)),be(e)}var Ee=C.ReactCurrentOwner,Qe={key:!0,ref:!0,__self:!0,__source:!0},Re,_e;function er(e){if(I.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function rr(e){if(I.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function tr(e,r){typeof e.ref=="string"&&Ee.current}function nr(e,r){{var t=function(){Re||(Re=!0,c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ar(e,r){{var t=function(){_e||(_e=!0,c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var ir=function(e,r,t,n,o,u,i){var a={$$typeof:y,type:e,key:r,ref:t,props:i,_owner:u};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:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function or(e,r,t,n,o){{var u,i={},a=null,d=null;t!==void 0&&(he(t),a=""+t),rr(r)&&(he(r.key),a=""+r.key),er(r)&&(d=r.ref,tr(r,o));for(u in r)I.call(r,u)&&!Qe.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)i[u]===void 0&&(i[u]=s[u])}if(a||d){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&nr(i,f),d&&ar(i,f)}return ir(e,a,d,o,n,Ee.current,i)}}var z=C.ReactCurrentOwner,me=C.ReactDebugCurrentFrame;function j(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);me.setExtraStackFrame(t)}else me.setExtraStackFrame(null)}var X;X=!1;function H(e){return typeof e=="object"&&e!==null&&e.$$typeof===y}function Te(){{if(z.current){var e=E(z.current.type);if(e)return`
22
-
23
- Check the render method of \``+e+"`."}return""}}function ur(e){return""}var Oe={};function sr(e){{var r=Te();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
24
-
25
- Check the top-level render call using <`+t+">.")}return r}}function Se(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=sr(r);if(Oe[t])return;Oe[t]=!0;var n="";e&&e._owner&&e._owner!==z.current&&(n=" It was passed a child from "+E(e._owner.type)+"."),j(e),c('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),j(null)}}function Pe(e,r){{if(typeof e!="object")return;if(G(e))for(var t=0;t<e.length;t++){var n=e[t];H(n)&&Se(n,r)}else if(H(e))e._store&&(e._store.validated=!0);else if(e){var o=Ie(e);if(typeof o=="function"&&o!==e.entries)for(var u=o.call(e),i;!(i=u.next()).done;)H(i.value)&&Se(i.value,r)}}}function fr(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===l||r.$$typeof===b))t=r.propTypes;else return;if(t){var n=E(r);ze(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!X){X=!0;var o=E(r);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function lr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){j(e),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),j(null);break}}e.ref!==null&&(j(e),c("Invalid attribute `ref` supplied to `React.Fragment`."),j(null))}}var we={};function Ce(e,r,t,n,o,u){{var i=Ue(e);if(!i){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 d=ur();d?a+=d:a+=Te();var s;e===null?s="null":G(e)?s="array":e!==void 0&&e.$$typeof===y?(s="<"+(E(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var f=or(e,r,t,o,u);if(f==null)return f;if(i){var g=r.children;if(g!==void 0)if(n)if(G(g)){for(var x=0;x<g.length;x++)Pe(g[x],e);Object.freeze&&Object.freeze(g)}else c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Pe(g,e)}if(I.call(r,"key")){var O=E(e),v=Object.keys(r).filter(function(yr){return yr!=="key"}),Z=v.length>0?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}";if(!we[O+Z]){var gr=v.length>0?"{"+v.join(": ..., ")+": ...}":"{}";c(`A props object containing a "key" prop is being spread into JSX:
26
- let props = %s;
27
- <%s {...props} />
28
- React keys must be passed directly to JSX without using spread:
29
- let props = %s;
30
- <%s key={someKey} {...props} />`,Z,O,gr,O),we[O+Z]=!0}}return e===P?lr(f):fr(f),f}}function cr(e,r,t){return Ce(e,r,t,!0)}function dr(e,r,t){return Ce(e,r,t,!1)}var vr=dr,pr=cr;D.Fragment=P,D.jsx=vr,D.jsxs=pr}()),D}var re;function ke(){return re||(re=1,process.env.NODE_ENV==="production"?W.exports=je():W.exports=xe()),W.exports}var te=ke();const De=({variant:R,...y})=>te.jsx("button",{className:"button "+R,...y}),Fe=({variant:R,...y})=>te.jsx("input",{className:"input "+R,...y});h.Button=De,h.Input=Fe,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});