next-ui-lib 0.1.10 → 0.1.11
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/components/button/button.d.ts +1 -1
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.stories.d.ts +1 -1
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/card.stories.d.ts +1 -1
- package/dist/ui.cjs.js +9 -14
- package/dist/ui.es.js +224 -239
- package/dist/ui.umd.js +9 -14
- package/package.json +5 -5
|
@@ -6,6 +6,6 @@ export interface ButtonProps {
|
|
|
6
6
|
size?: "small" | "medium" | "large" | "full";
|
|
7
7
|
customClass?: string;
|
|
8
8
|
}
|
|
9
|
-
declare const Button: ({ color, onClick, label, size, customClass, }: ButtonProps) =>
|
|
9
|
+
declare const Button: ({ color, onClick, label, size, customClass, }: ButtonProps) => JSX.Element;
|
|
10
10
|
export { Button };
|
|
11
11
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAExE,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,MAAM,GAAI,+CAMb,WAAW,
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAExE,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,MAAM,GAAI,+CAMb,WAAW,gBA6Bb,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ color, onClick, label, size, customClass, }: import('./button').ButtonProps) =>
|
|
4
|
+
component: ({ color, onClick, label, size, customClass, }: import('./button').ButtonProps) => JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
};
|
|
7
7
|
export default meta;
|
|
@@ -2,6 +2,6 @@ type CardProps = {
|
|
|
2
2
|
title: string;
|
|
3
3
|
description: string;
|
|
4
4
|
};
|
|
5
|
-
export declare const Card: ({ title, description }: CardProps) =>
|
|
5
|
+
export declare const Card: ({ title, description }: CardProps) => JSX.Element;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAAA,KAAK,SAAS,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,wBAAwB,SAAS,
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAAA,KAAK,SAAS,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,wBAAwB,SAAS,gBAerD,CAAC"}
|
package/dist/ui.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Oe=require("react");var L={exports:{}},D={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var _e;function ur(){if(_e)return D;_e=1;var j=Oe,h=Symbol.for("react.element"),F=Symbol.for("react.fragment"),y=Object.prototype.hasOwnProperty,T=j.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,O={key:!0,ref:!0,__self:!0,__source:!0};function g(b,f,w){var v,E={},_=null,$=null;w!==void 0&&(_=""+w),f.key!==void 0&&(_=""+f.key),f.ref!==void 0&&($=f.ref);for(v in f)y.call(f,v)&&!O.hasOwnProperty(v)&&(E[v]=f[v]);if(b&&b.defaultProps)for(v in f=b.defaultProps,f)E[v]===void 0&&(E[v]=f[v]);return{$$typeof:h,type:b,key:_,ref:$,props:E,_owner:T.current}}return D.Fragment=F,D.jsx=g,D.jsxs=g,D}var A={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,12 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+
|
|
19
|
-
`),
|
|
20
|
-
`),s=a.length-1,l=
|
|
21
|
-
`+a[s].replace(" at new "," at ");return e.displayName&&
|
|
17
|
+
*/var Re;function sr(){return Re||(Re=1,process.env.NODE_ENV!=="production"&&(function(){var j=Oe,h=Symbol.for("react.element"),F=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),b=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),$=Symbol.for("react.offscreen"),K=Symbol.iterator,we="@@iterator";function Ce(e){if(e===null||typeof e!="object")return null;var r=K&&e[K]||e[we];return typeof r=="function"?r:null}var C=j.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function d(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Se("error",e,t)}}function Se(e,r,t){{var n=C.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var u=t.map(function(o){return String(o)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var Pe=!1,je=!1,Fe=!1,ke=!1,De=!1,H;H=Symbol.for("react.module.reference");function Ae(e){return!!(typeof e=="string"||typeof e=="function"||e===y||e===O||De||e===T||e===w||e===v||ke||e===$||Pe||je||Fe||typeof e=="object"&&e!==null&&(e.$$typeof===_||e.$$typeof===E||e.$$typeof===g||e.$$typeof===b||e.$$typeof===f||e.$$typeof===H||e.getModuleId!==void 0))}function $e(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function X(e){return e.displayName||"Context"}function R(e){if(e==null)return null;if(typeof e.tag=="number"&&d("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 y:return"Fragment";case F:return"Portal";case O:return"Profiler";case T:return"StrictMode";case w:return"Suspense";case v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b:var r=e;return X(r)+".Consumer";case g:var t=e;return X(t._context)+".Provider";case f:return $e(e,e.render,"ForwardRef");case E:var n=e.displayName||null;return n!==null?n:R(e.type)||"Memo";case _:{var i=e,u=i._payload,o=i._init;try{return R(o(u))}catch{return null}}}return null}var x=Object.assign,k=0,Z,Q,ee,re,te,ne,ae;function oe(){}oe.__reactDisabledLog=!0;function Ie(){{if(k===0){Z=console.log,Q=console.info,ee=console.warn,re=console.error,te=console.group,ne=console.groupCollapsed,ae=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})}k++}}function Ye(){{if(k--,k===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:x({},e,{value:Z}),info:x({},e,{value:Q}),warn:x({},e,{value:ee}),error:x({},e,{value:re}),group:x({},e,{value:te}),groupCollapsed:x({},e,{value:ne}),groupEnd:x({},e,{value:ae})})}k<0&&d("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var U=C.ReactCurrentDispatcher,V;function I(e,r,t){{if(V===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);V=n&&n[1]||""}return`
|
|
18
|
+
`+V+e}}var B=!1,Y;{var We=typeof WeakMap=="function"?WeakMap:Map;Y=new We}function ie(e,r){if(!e||B)return"";{var t=Y.get(e);if(t!==void 0)return t}var n;B=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=U.current,U.current=null,Ie();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(m){n=m}Reflect.construct(e,[],o)}else{try{o.call()}catch(m){n=m}e.call(o.prototype)}}else{try{throw Error()}catch(m){n=m}e()}}catch(m){if(m&&n&&typeof m.stack=="string"){for(var a=m.stack.split(`
|
|
19
|
+
`),c=n.stack.split(`
|
|
20
|
+
`),s=a.length-1,l=c.length-1;s>=1&&l>=0&&a[s]!==c[l];)l--;for(;s>=1&&l>=0;s--,l--)if(a[s]!==c[l]){if(s!==1||l!==1)do if(s--,l--,l<0||a[s]!==c[l]){var p=`
|
|
21
|
+
`+a[s].replace(" at new "," at ");return e.displayName&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",e.displayName)),typeof e=="function"&&Y.set(e,p),p}while(s>=1&&l>=0);break}}}finally{B=!1,U.current=u,Ye(),Error.prepareStackTrace=i}var P=e?e.displayName||e.name:"",he=P?I(P):"";return typeof e=="function"&&Y.set(e,he),he}function Me(e,r,t){return ie(e,!1)}function Ne(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function W(e,r,t){if(e==null)return"";if(typeof e=="function")return ie(e,Ne(e));if(typeof e=="string")return I(e);switch(e){case w:return I("Suspense");case v:return I("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return Me(e.render);case E:return W(e.type,r,t);case _:{var n=e,i=n._payload,u=n._init;try{return W(u(i),r,t)}catch{}}}return""}var M=Object.prototype.hasOwnProperty,ue={},se=C.ReactDebugCurrentFrame;function N(e){if(e){var r=e._owner,t=W(e.type,e._source,r?r.type:null);se.setExtraStackFrame(t)}else se.setExtraStackFrame(null)}function Le(e,r,t,n,i){{var u=Function.call.bind(M);for(var o in e)if(u(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var c=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 c.name="Invariant Violation",c}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(N(i),d("%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),N(null)),a instanceof Error&&!(a.message in ue)&&(ue[a.message]=!0,N(i),d("Failed %s type: %s",t,a.message),N(null))}}}var Ue=Array.isArray;function q(e){return Ue(e)}function Ve(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Be(e){try{return le(e),!1}catch{return!0}}function le(e){return""+e}function fe(e){if(Be(e))return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ve(e)),le(e)}var ce=C.ReactCurrentOwner,qe={key:!0,ref:!0,__self:!0,__source:!0},de,ve;function Je(e){if(M.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Ge(e){if(M.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ze(e,r){typeof e.ref=="string"&&ce.current}function Ke(e,r){{var t=function(){de||(de=!0,d("%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 He(e,r){{var t=function(){ve||(ve=!0,d("%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 Xe=function(e,r,t,n,i,u,o){var a={$$typeof:h,type:e,key:r,ref:t,props:o,_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:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function Ze(e,r,t,n,i){{var u,o={},a=null,c=null;t!==void 0&&(fe(t),a=""+t),Ge(r)&&(fe(r.key),a=""+r.key),Je(r)&&(c=r.ref,ze(r,i));for(u in r)M.call(r,u)&&!qe.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)o[u]===void 0&&(o[u]=s[u])}if(a||c){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&Ke(o,l),c&&He(o,l)}return Xe(e,a,c,i,n,ce.current,o)}}var J=C.ReactCurrentOwner,pe=C.ReactDebugCurrentFrame;function S(e){if(e){var r=e._owner,t=W(e.type,e._source,r?r.type:null);pe.setExtraStackFrame(t)}else pe.setExtraStackFrame(null)}var G;G=!1;function z(e){return typeof e=="object"&&e!==null&&e.$$typeof===h}function be(){{if(J.current){var e=R(J.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function Qe(e){return""}var ge={};function er(e){{var r=be();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+t+">.")}return r}}function
|
|
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} />`,X,T,lr,T),_e[T+X]=!0}}return e===h?ar(l):nr(l),l}}function or(e,r,t){return me(e,r,t,!0)}function ir(e,r,t){return me(e,r,t,!1)}var ur=ir,sr=or;I.Fragment=h,I.jsx=ur,I.jsxs=sr})()),I}var Se;function vr(){return Se||(Se=1,process.env.NODE_ENV==="production"?V.exports=cr():V.exports=dr()),V.exports}var Oe=vr();const pr={primary:{text:"#FFFFFF",value:"#27a7e3",dark:"#1f8ecb"},secondary:{text:"#1CB0F6",value:"#E0F3FF",dark:"#B3DFFC"}},yr=({color:k="primary",onClick:_,label:F,size:h="medium",customClass:S=""})=>{const O={small:"px-2 py-1 text-xs rounded-lg",medium:"px-3 py-1 text-base rounded-xl",large:"px-8 py-3 text-2xl rounded-2xl",full:"px-8 py-2 text-xl rounded-2xl w-full"},b=pr[k];return Oe.jsx("button",{className:`relative flex items-center justify-center cursor-pointer transition duration-150 ease-in-out whitespace-nowrap active:translate-y-[4px] ${O[h]} ${S}`,style:{backgroundColor:b.value,boxShadow:`0 ${h==="large"?"6px":"4px"} 0 ${b.dark}`,color:b.text},onMouseDown:g=>{g.currentTarget.style.boxShadow="none"},onMouseUp:g=>{g.currentTarget.style.boxShadow=`0 4px 0 ${b.dark}`},onClick:_,children:Oe.jsx("span",{className:"font-bold",children:F})})};exports.Button=yr;
|
|
25
|
+
Check the top-level render call using <`+t+">.")}return r}}function ye(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=er(r);if(ge[t])return;ge[t]=!0;var n="";e&&e._owner&&e._owner!==J.current&&(n=" It was passed a child from "+R(e._owner.type)+"."),S(e),d('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),S(null)}}function Ee(e,r){{if(typeof e!="object")return;if(q(e))for(var t=0;t<e.length;t++){var n=e[t];z(n)&&ye(n,r)}else if(z(e))e._store&&(e._store.validated=!0);else if(e){var i=Ce(e);if(typeof i=="function"&&i!==e.entries)for(var u=i.call(e),o;!(o=u.next()).done;)z(o.value)&&ye(o.value,r)}}}function rr(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===f||r.$$typeof===E))t=r.propTypes;else return;if(t){var n=R(r);Le(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!G){G=!0;var i=R(r);d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function tr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){S(e),d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),S(null);break}}e.ref!==null&&(S(e),d("Invalid attribute `ref` supplied to `React.Fragment`."),S(null))}}function me(e,r,t,n,i,u){{var o=Ae(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 c=Qe();c?a+=c:a+=be();var s;e===null?s="null":q(e)?s="array":e!==void 0&&e.$$typeof===h?(s="<"+(R(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,d("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 l=Ze(e,r,t,i,u);if(l==null)return l;if(o){var p=r.children;if(p!==void 0)if(n)if(q(p)){for(var P=0;P<p.length;P++)Ee(p[P],e);Object.freeze&&Object.freeze(p)}else d("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 Ee(p,e)}return e===y?tr(l):rr(l),l}}function nr(e,r,t){return me(e,r,t,!0)}function ar(e,r,t){return me(e,r,t,!1)}var or=ar,ir=nr;A.Fragment=y,A.jsx=or,A.jsxs=ir})()),A}var xe;function lr(){return xe||(xe=1,process.env.NODE_ENV==="production"?L.exports=ur():L.exports=sr()),L.exports}var Te=lr();const fr={primary:{text:"#FFFFFF",value:"#27a7e3",dark:"#1f8ecb"},secondary:{text:"#1CB0F6",value:"#E0F3FF",dark:"#B3DFFC"}},cr=({color:j="primary",onClick:h,label:F,size:y="medium",customClass:T=""})=>{const O={small:"px-2 py-1 text-xs rounded-lg",medium:"px-3 py-1 text-base rounded-xl",large:"px-8 py-3 text-2xl rounded-2xl",full:"px-8 py-2 text-xl rounded-2xl w-full"},g=fr[j];return Te.jsx("button",{className:`relative flex items-center justify-center cursor-pointer transition duration-150 ease-in-out whitespace-nowrap active:translate-y-[4px] ${O[y]} ${T}`,style:{backgroundColor:g.value,boxShadow:`0 ${y==="large"?"6px":"4px"} 0 ${g.dark}`,color:g.text},onMouseDown:b=>{b.currentTarget.style.boxShadow="none"},onMouseUp:b=>{b.currentTarget.style.boxShadow=`0 4px 0 ${g.dark}`},onClick:h,children:Te.jsx("span",{className:"font-bold",children:F})})};exports.Button=cr;
|
package/dist/ui.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import we from "react";
|
|
2
|
+
var L = { exports: {} }, D = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -9,21 +9,21 @@ var V = { exports: {} }, $ = {};
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
function b
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
for (
|
|
21
|
-
if (
|
|
22
|
-
return { $$typeof:
|
|
12
|
+
var _e;
|
|
13
|
+
function ur() {
|
|
14
|
+
if (_e) return D;
|
|
15
|
+
_e = 1;
|
|
16
|
+
var j = we, h = Symbol.for("react.element"), F = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, T = j.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, w = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
|
+
function g(b, f, C) {
|
|
18
|
+
var v, E = {}, _ = null, $ = null;
|
|
19
|
+
C !== void 0 && (_ = "" + C), f.key !== void 0 && (_ = "" + f.key), f.ref !== void 0 && ($ = f.ref);
|
|
20
|
+
for (v in f) m.call(f, v) && !w.hasOwnProperty(v) && (E[v] = f[v]);
|
|
21
|
+
if (b && b.defaultProps) for (v in f = b.defaultProps, f) E[v] === void 0 && (E[v] = f[v]);
|
|
22
|
+
return { $$typeof: h, type: b, key: _, ref: $, props: E, _owner: T.current };
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return D.Fragment = F, D.jsx = g, D.jsxs = g, D;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
26
|
+
var A = {};
|
|
27
27
|
/**
|
|
28
28
|
* @license React
|
|
29
29
|
* react-jsx-runtime.development.js
|
|
@@ -33,27 +33,27 @@ var I = {};
|
|
|
33
33
|
* This source code is licensed under the MIT license found in the
|
|
34
34
|
* LICENSE file in the root directory of this source tree.
|
|
35
35
|
*/
|
|
36
|
-
var
|
|
37
|
-
function
|
|
38
|
-
return
|
|
39
|
-
var
|
|
40
|
-
function
|
|
36
|
+
var Re;
|
|
37
|
+
function sr() {
|
|
38
|
+
return Re || (Re = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
39
|
+
var j = we, h = Symbol.for("react.element"), F = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), b = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), $ = Symbol.for("react.offscreen"), K = Symbol.iterator, Ce = "@@iterator";
|
|
40
|
+
function Oe(e) {
|
|
41
41
|
if (e === null || typeof e != "object")
|
|
42
42
|
return null;
|
|
43
|
-
var r =
|
|
43
|
+
var r = K && e[K] || e[Ce];
|
|
44
44
|
return typeof r == "function" ? r : null;
|
|
45
45
|
}
|
|
46
|
-
var
|
|
47
|
-
function
|
|
46
|
+
var O = j.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
47
|
+
function d(e) {
|
|
48
48
|
{
|
|
49
49
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
50
50
|
t[n - 1] = arguments[n];
|
|
51
|
-
|
|
51
|
+
Se("error", e, t);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function Se(e, r, t) {
|
|
55
55
|
{
|
|
56
|
-
var n =
|
|
56
|
+
var n = O.ReactDebugCurrentFrame, i = n.getStackAddendum();
|
|
57
57
|
i !== "" && (r += "%s", t = t.concat([i]));
|
|
58
58
|
var u = t.map(function(o) {
|
|
59
59
|
return String(o);
|
|
@@ -61,63 +61,63 @@ function dr() {
|
|
|
61
61
|
u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
function
|
|
67
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
64
|
+
var Pe = !1, je = !1, Fe = !1, ke = !1, De = !1, H;
|
|
65
|
+
H = Symbol.for("react.module.reference");
|
|
66
|
+
function Ae(e) {
|
|
67
|
+
return !!(typeof e == "string" || typeof e == "function" || e === m || e === w || De || e === T || e === C || e === v || ke || e === $ || Pe || je || Fe || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === E || e.$$typeof === g || e.$$typeof === b || e.$$typeof === f || // This needs to include all possible module reference object
|
|
68
68
|
// types supported by any Flight configuration anywhere since
|
|
69
69
|
// we don't know which Flight build this will end up being used
|
|
70
70
|
// with.
|
|
71
|
-
e.$$typeof ===
|
|
71
|
+
e.$$typeof === H || e.getModuleId !== void 0));
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function $e(e, r, t) {
|
|
74
74
|
var n = e.displayName;
|
|
75
75
|
if (n)
|
|
76
76
|
return n;
|
|
77
77
|
var i = r.displayName || r.name || "";
|
|
78
78
|
return i !== "" ? t + "(" + i + ")" : t;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function X(e) {
|
|
81
81
|
return e.displayName || "Context";
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function R(e) {
|
|
84
84
|
if (e == null)
|
|
85
85
|
return null;
|
|
86
|
-
if (typeof e.tag == "number" &&
|
|
86
|
+
if (typeof e.tag == "number" && d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
87
87
|
return e.displayName || e.name || null;
|
|
88
88
|
if (typeof e == "string")
|
|
89
89
|
return e;
|
|
90
90
|
switch (e) {
|
|
91
|
-
case
|
|
91
|
+
case m:
|
|
92
92
|
return "Fragment";
|
|
93
93
|
case F:
|
|
94
94
|
return "Portal";
|
|
95
|
-
case O:
|
|
96
|
-
return "Profiler";
|
|
97
95
|
case w:
|
|
96
|
+
return "Profiler";
|
|
97
|
+
case T:
|
|
98
98
|
return "StrictMode";
|
|
99
|
-
case
|
|
99
|
+
case C:
|
|
100
100
|
return "Suspense";
|
|
101
|
-
case
|
|
101
|
+
case v:
|
|
102
102
|
return "SuspenseList";
|
|
103
103
|
}
|
|
104
104
|
if (typeof e == "object")
|
|
105
105
|
switch (e.$$typeof) {
|
|
106
|
-
case g:
|
|
107
|
-
var r = e;
|
|
108
|
-
return Q(r) + ".Consumer";
|
|
109
106
|
case b:
|
|
107
|
+
var r = e;
|
|
108
|
+
return X(r) + ".Consumer";
|
|
109
|
+
case g:
|
|
110
110
|
var t = e;
|
|
111
|
-
return
|
|
111
|
+
return X(t._context) + ".Provider";
|
|
112
112
|
case f:
|
|
113
|
-
return
|
|
113
|
+
return $e(e, e.render, "ForwardRef");
|
|
114
114
|
case E:
|
|
115
115
|
var n = e.displayName || null;
|
|
116
|
-
return n !== null ? n :
|
|
116
|
+
return n !== null ? n : R(e.type) || "Memo";
|
|
117
117
|
case _: {
|
|
118
118
|
var i = e, u = i._payload, o = i._init;
|
|
119
119
|
try {
|
|
120
|
-
return
|
|
120
|
+
return R(o(u));
|
|
121
121
|
} catch {
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
@@ -125,18 +125,18 @@ function dr() {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
|
-
var x = Object.assign,
|
|
129
|
-
function
|
|
128
|
+
var x = Object.assign, k = 0, Z, Q, ee, re, te, ne, ae;
|
|
129
|
+
function oe() {
|
|
130
130
|
}
|
|
131
|
-
|
|
132
|
-
function
|
|
131
|
+
oe.__reactDisabledLog = !0;
|
|
132
|
+
function Ie() {
|
|
133
133
|
{
|
|
134
|
-
if (
|
|
135
|
-
|
|
134
|
+
if (k === 0) {
|
|
135
|
+
Z = console.log, Q = console.info, ee = console.warn, re = console.error, te = console.group, ne = console.groupCollapsed, ae = console.groupEnd;
|
|
136
136
|
var e = {
|
|
137
137
|
configurable: !0,
|
|
138
138
|
enumerable: !0,
|
|
139
|
-
value:
|
|
139
|
+
value: oe,
|
|
140
140
|
writable: !0
|
|
141
141
|
};
|
|
142
142
|
Object.defineProperties(console, {
|
|
@@ -149,12 +149,12 @@ function dr() {
|
|
|
149
149
|
groupEnd: e
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
k++;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Ye() {
|
|
156
156
|
{
|
|
157
|
-
if (
|
|
157
|
+
if (k--, k === 0) {
|
|
158
158
|
var e = {
|
|
159
159
|
configurable: !0,
|
|
160
160
|
enumerable: !0,
|
|
@@ -162,64 +162,64 @@ function dr() {
|
|
|
162
162
|
};
|
|
163
163
|
Object.defineProperties(console, {
|
|
164
164
|
log: x({}, e, {
|
|
165
|
-
value:
|
|
165
|
+
value: Z
|
|
166
166
|
}),
|
|
167
167
|
info: x({}, e, {
|
|
168
|
-
value:
|
|
168
|
+
value: Q
|
|
169
169
|
}),
|
|
170
170
|
warn: x({}, e, {
|
|
171
|
-
value:
|
|
171
|
+
value: ee
|
|
172
172
|
}),
|
|
173
173
|
error: x({}, e, {
|
|
174
|
-
value:
|
|
174
|
+
value: re
|
|
175
175
|
}),
|
|
176
176
|
group: x({}, e, {
|
|
177
|
-
value:
|
|
177
|
+
value: te
|
|
178
178
|
}),
|
|
179
179
|
groupCollapsed: x({}, e, {
|
|
180
|
-
value:
|
|
180
|
+
value: ne
|
|
181
181
|
}),
|
|
182
182
|
groupEnd: x({}, e, {
|
|
183
|
-
value:
|
|
183
|
+
value: ae
|
|
184
184
|
})
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
k < 0 && d("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
var
|
|
191
|
-
function
|
|
190
|
+
var U = O.ReactCurrentDispatcher, V;
|
|
191
|
+
function I(e, r, t) {
|
|
192
192
|
{
|
|
193
|
-
if (
|
|
193
|
+
if (V === void 0)
|
|
194
194
|
try {
|
|
195
195
|
throw Error();
|
|
196
196
|
} catch (i) {
|
|
197
197
|
var n = i.stack.trim().match(/\n( *(at )?)/);
|
|
198
|
-
|
|
198
|
+
V = n && n[1] || "";
|
|
199
199
|
}
|
|
200
200
|
return `
|
|
201
|
-
` +
|
|
201
|
+
` + V + e;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
var
|
|
204
|
+
var B = !1, Y;
|
|
205
205
|
{
|
|
206
|
-
var
|
|
207
|
-
|
|
206
|
+
var We = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
|
+
Y = new We();
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
if (!e ||
|
|
209
|
+
function ie(e, r) {
|
|
210
|
+
if (!e || B)
|
|
211
211
|
return "";
|
|
212
212
|
{
|
|
213
|
-
var t =
|
|
213
|
+
var t = Y.get(e);
|
|
214
214
|
if (t !== void 0)
|
|
215
215
|
return t;
|
|
216
216
|
}
|
|
217
217
|
var n;
|
|
218
|
-
|
|
218
|
+
B = !0;
|
|
219
219
|
var i = Error.prepareStackTrace;
|
|
220
220
|
Error.prepareStackTrace = void 0;
|
|
221
221
|
var u;
|
|
222
|
-
u =
|
|
222
|
+
u = U.current, U.current = null, Ie();
|
|
223
223
|
try {
|
|
224
224
|
if (r) {
|
|
225
225
|
var o = function() {
|
|
@@ -232,167 +232,167 @@ function dr() {
|
|
|
232
232
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
233
233
|
try {
|
|
234
234
|
Reflect.construct(o, []);
|
|
235
|
-
} catch (
|
|
236
|
-
n =
|
|
235
|
+
} catch (y) {
|
|
236
|
+
n = y;
|
|
237
237
|
}
|
|
238
238
|
Reflect.construct(e, [], o);
|
|
239
239
|
} else {
|
|
240
240
|
try {
|
|
241
241
|
o.call();
|
|
242
|
-
} catch (
|
|
243
|
-
n =
|
|
242
|
+
} catch (y) {
|
|
243
|
+
n = y;
|
|
244
244
|
}
|
|
245
245
|
e.call(o.prototype);
|
|
246
246
|
}
|
|
247
247
|
} else {
|
|
248
248
|
try {
|
|
249
249
|
throw Error();
|
|
250
|
-
} catch (
|
|
251
|
-
n =
|
|
250
|
+
} catch (y) {
|
|
251
|
+
n = y;
|
|
252
252
|
}
|
|
253
253
|
e();
|
|
254
254
|
}
|
|
255
|
-
} catch (
|
|
256
|
-
if (
|
|
257
|
-
for (var a =
|
|
258
|
-
`),
|
|
259
|
-
`), s = a.length - 1, l =
|
|
255
|
+
} catch (y) {
|
|
256
|
+
if (y && n && typeof y.stack == "string") {
|
|
257
|
+
for (var a = y.stack.split(`
|
|
258
|
+
`), c = n.stack.split(`
|
|
259
|
+
`), s = a.length - 1, l = c.length - 1; s >= 1 && l >= 0 && a[s] !== c[l]; )
|
|
260
260
|
l--;
|
|
261
261
|
for (; s >= 1 && l >= 0; s--, l--)
|
|
262
|
-
if (a[s] !==
|
|
262
|
+
if (a[s] !== c[l]) {
|
|
263
263
|
if (s !== 1 || l !== 1)
|
|
264
264
|
do
|
|
265
|
-
if (s--, l--, l < 0 || a[s] !==
|
|
266
|
-
var
|
|
265
|
+
if (s--, l--, l < 0 || a[s] !== c[l]) {
|
|
266
|
+
var p = `
|
|
267
267
|
` + a[s].replace(" at new ", " at ");
|
|
268
|
-
return e.displayName &&
|
|
268
|
+
return e.displayName && p.includes("<anonymous>") && (p = p.replace("<anonymous>", e.displayName)), typeof e == "function" && Y.set(e, p), p;
|
|
269
269
|
}
|
|
270
270
|
while (s >= 1 && l >= 0);
|
|
271
271
|
break;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
} finally {
|
|
275
|
-
|
|
275
|
+
B = !1, U.current = u, Ye(), Error.prepareStackTrace = i;
|
|
276
276
|
}
|
|
277
|
-
var
|
|
278
|
-
return typeof e == "function" &&
|
|
277
|
+
var P = e ? e.displayName || e.name : "", he = P ? I(P) : "";
|
|
278
|
+
return typeof e == "function" && Y.set(e, he), he;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
return
|
|
280
|
+
function Me(e, r, t) {
|
|
281
|
+
return ie(e, !1);
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function Ne(e) {
|
|
284
284
|
var r = e.prototype;
|
|
285
285
|
return !!(r && r.isReactComponent);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function W(e, r, t) {
|
|
288
288
|
if (e == null)
|
|
289
289
|
return "";
|
|
290
290
|
if (typeof e == "function")
|
|
291
|
-
return
|
|
291
|
+
return ie(e, Ne(e));
|
|
292
292
|
if (typeof e == "string")
|
|
293
|
-
return
|
|
293
|
+
return I(e);
|
|
294
294
|
switch (e) {
|
|
295
|
-
case
|
|
296
|
-
return
|
|
297
|
-
case
|
|
298
|
-
return
|
|
295
|
+
case C:
|
|
296
|
+
return I("Suspense");
|
|
297
|
+
case v:
|
|
298
|
+
return I("SuspenseList");
|
|
299
299
|
}
|
|
300
300
|
if (typeof e == "object")
|
|
301
301
|
switch (e.$$typeof) {
|
|
302
302
|
case f:
|
|
303
|
-
return
|
|
303
|
+
return Me(e.render);
|
|
304
304
|
case E:
|
|
305
|
-
return
|
|
305
|
+
return W(e.type, r, t);
|
|
306
306
|
case _: {
|
|
307
307
|
var n = e, i = n._payload, u = n._init;
|
|
308
308
|
try {
|
|
309
|
-
return
|
|
309
|
+
return W(u(i), r, t);
|
|
310
310
|
} catch {
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
return "";
|
|
315
315
|
}
|
|
316
|
-
var
|
|
317
|
-
function
|
|
316
|
+
var M = Object.prototype.hasOwnProperty, ue = {}, se = O.ReactDebugCurrentFrame;
|
|
317
|
+
function N(e) {
|
|
318
318
|
if (e) {
|
|
319
|
-
var r = e._owner, t =
|
|
320
|
-
|
|
319
|
+
var r = e._owner, t = W(e.type, e._source, r ? r.type : null);
|
|
320
|
+
se.setExtraStackFrame(t);
|
|
321
321
|
} else
|
|
322
|
-
|
|
322
|
+
se.setExtraStackFrame(null);
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Le(e, r, t, n, i) {
|
|
325
325
|
{
|
|
326
|
-
var u = Function.call.bind(
|
|
326
|
+
var u = Function.call.bind(M);
|
|
327
327
|
for (var o in e)
|
|
328
328
|
if (u(e, o)) {
|
|
329
329
|
var a = void 0;
|
|
330
330
|
try {
|
|
331
331
|
if (typeof e[o] != "function") {
|
|
332
|
-
var
|
|
333
|
-
throw
|
|
332
|
+
var c = 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`.");
|
|
333
|
+
throw c.name = "Invariant Violation", c;
|
|
334
334
|
}
|
|
335
335
|
a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
336
336
|
} catch (s) {
|
|
337
337
|
a = s;
|
|
338
338
|
}
|
|
339
|
-
a && !(a instanceof Error) && (
|
|
339
|
+
a && !(a instanceof Error) && (N(i), d("%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), N(null)), a instanceof Error && !(a.message in ue) && (ue[a.message] = !0, N(i), d("Failed %s type: %s", t, a.message), N(null));
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
-
var
|
|
343
|
+
var Ue = Array.isArray;
|
|
344
344
|
function q(e) {
|
|
345
|
-
return
|
|
345
|
+
return Ue(e);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function Ve(e) {
|
|
348
348
|
{
|
|
349
349
|
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
350
350
|
return t;
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function Be(e) {
|
|
354
354
|
try {
|
|
355
|
-
return
|
|
355
|
+
return le(e), !1;
|
|
356
356
|
} catch {
|
|
357
357
|
return !0;
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function le(e) {
|
|
361
361
|
return "" + e;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
if (
|
|
365
|
-
return
|
|
363
|
+
function fe(e) {
|
|
364
|
+
if (Be(e))
|
|
365
|
+
return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ve(e)), le(e);
|
|
366
366
|
}
|
|
367
|
-
var
|
|
367
|
+
var ce = O.ReactCurrentOwner, qe = {
|
|
368
368
|
key: !0,
|
|
369
369
|
ref: !0,
|
|
370
370
|
__self: !0,
|
|
371
371
|
__source: !0
|
|
372
|
-
},
|
|
373
|
-
function
|
|
374
|
-
if (
|
|
372
|
+
}, de, ve;
|
|
373
|
+
function Je(e) {
|
|
374
|
+
if (M.call(e, "ref")) {
|
|
375
375
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
376
376
|
if (r && r.isReactWarning)
|
|
377
377
|
return !1;
|
|
378
378
|
}
|
|
379
379
|
return e.ref !== void 0;
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
if (
|
|
381
|
+
function Ge(e) {
|
|
382
|
+
if (M.call(e, "key")) {
|
|
383
383
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
384
384
|
if (r && r.isReactWarning)
|
|
385
385
|
return !1;
|
|
386
386
|
}
|
|
387
387
|
return e.key !== void 0;
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
typeof e.ref == "string" &&
|
|
389
|
+
function ze(e, r) {
|
|
390
|
+
typeof e.ref == "string" && ce.current;
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function Ke(e, r) {
|
|
393
393
|
{
|
|
394
394
|
var t = function() {
|
|
395
|
-
|
|
395
|
+
de || (de = !0, d("%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
396
|
};
|
|
397
397
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
398
398
|
get: t,
|
|
@@ -400,10 +400,10 @@ function dr() {
|
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function He(e, r) {
|
|
404
404
|
{
|
|
405
405
|
var t = function() {
|
|
406
|
-
|
|
406
|
+
ve || (ve = !0, d("%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
407
|
};
|
|
408
408
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
409
409
|
get: t,
|
|
@@ -411,10 +411,10 @@ function dr() {
|
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
var
|
|
414
|
+
var Xe = function(e, r, t, n, i, u, o) {
|
|
415
415
|
var a = {
|
|
416
416
|
// This tag allows us to uniquely identify this as a React Element
|
|
417
|
-
$$typeof:
|
|
417
|
+
$$typeof: h,
|
|
418
418
|
// Built-in properties that belong on the element
|
|
419
419
|
type: e,
|
|
420
420
|
key: r,
|
|
@@ -440,41 +440,41 @@ function dr() {
|
|
|
440
440
|
value: i
|
|
441
441
|
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
442
442
|
};
|
|
443
|
-
function
|
|
443
|
+
function Ze(e, r, t, n, i) {
|
|
444
444
|
{
|
|
445
|
-
var u, o = {}, a = null,
|
|
446
|
-
t !== void 0 && (
|
|
445
|
+
var u, o = {}, a = null, c = null;
|
|
446
|
+
t !== void 0 && (fe(t), a = "" + t), Ge(r) && (fe(r.key), a = "" + r.key), Je(r) && (c = r.ref, ze(r, i));
|
|
447
447
|
for (u in r)
|
|
448
|
-
|
|
448
|
+
M.call(r, u) && !qe.hasOwnProperty(u) && (o[u] = r[u]);
|
|
449
449
|
if (e && e.defaultProps) {
|
|
450
450
|
var s = e.defaultProps;
|
|
451
451
|
for (u in s)
|
|
452
452
|
o[u] === void 0 && (o[u] = s[u]);
|
|
453
453
|
}
|
|
454
|
-
if (a ||
|
|
454
|
+
if (a || c) {
|
|
455
455
|
var l = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
456
|
-
a &&
|
|
456
|
+
a && Ke(o, l), c && He(o, l);
|
|
457
457
|
}
|
|
458
|
-
return
|
|
458
|
+
return Xe(e, a, c, i, n, ce.current, o);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var
|
|
462
|
-
function
|
|
461
|
+
var J = O.ReactCurrentOwner, pe = O.ReactDebugCurrentFrame;
|
|
462
|
+
function S(e) {
|
|
463
463
|
if (e) {
|
|
464
|
-
var r = e._owner, t =
|
|
465
|
-
|
|
464
|
+
var r = e._owner, t = W(e.type, e._source, r ? r.type : null);
|
|
465
|
+
pe.setExtraStackFrame(t);
|
|
466
466
|
} else
|
|
467
|
-
|
|
467
|
+
pe.setExtraStackFrame(null);
|
|
468
468
|
}
|
|
469
469
|
var G;
|
|
470
470
|
G = !1;
|
|
471
471
|
function z(e) {
|
|
472
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
472
|
+
return typeof e == "object" && e !== null && e.$$typeof === h;
|
|
473
473
|
}
|
|
474
474
|
function be() {
|
|
475
475
|
{
|
|
476
|
-
if (
|
|
477
|
-
var e =
|
|
476
|
+
if (J.current) {
|
|
477
|
+
var e = R(J.current.type);
|
|
478
478
|
if (e)
|
|
479
479
|
return `
|
|
480
480
|
|
|
@@ -483,11 +483,11 @@ Check the render method of \`` + e + "`.";
|
|
|
483
483
|
return "";
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function Qe(e) {
|
|
487
487
|
return "";
|
|
488
488
|
}
|
|
489
|
-
var
|
|
490
|
-
function
|
|
489
|
+
var ge = {};
|
|
490
|
+
function er(e) {
|
|
491
491
|
{
|
|
492
492
|
var r = be();
|
|
493
493
|
if (!r) {
|
|
@@ -499,39 +499,39 @@ Check the top-level render call using <` + t + ">.");
|
|
|
499
499
|
return r;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function me(e, r) {
|
|
503
503
|
{
|
|
504
504
|
if (!e._store || e._store.validated || e.key != null)
|
|
505
505
|
return;
|
|
506
506
|
e._store.validated = !0;
|
|
507
|
-
var t =
|
|
508
|
-
if (
|
|
507
|
+
var t = er(r);
|
|
508
|
+
if (ge[t])
|
|
509
509
|
return;
|
|
510
|
-
|
|
510
|
+
ge[t] = !0;
|
|
511
511
|
var n = "";
|
|
512
|
-
e && e._owner && e._owner !==
|
|
512
|
+
e && e._owner && e._owner !== J.current && (n = " It was passed a child from " + R(e._owner.type) + "."), S(e), d('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), S(null);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function Ee(e, r) {
|
|
516
516
|
{
|
|
517
517
|
if (typeof e != "object")
|
|
518
518
|
return;
|
|
519
519
|
if (q(e))
|
|
520
520
|
for (var t = 0; t < e.length; t++) {
|
|
521
521
|
var n = e[t];
|
|
522
|
-
z(n) &&
|
|
522
|
+
z(n) && me(n, r);
|
|
523
523
|
}
|
|
524
524
|
else if (z(e))
|
|
525
525
|
e._store && (e._store.validated = !0);
|
|
526
526
|
else if (e) {
|
|
527
|
-
var i =
|
|
527
|
+
var i = Oe(e);
|
|
528
528
|
if (typeof i == "function" && i !== e.entries)
|
|
529
529
|
for (var u = i.call(e), o; !(o = u.next()).done; )
|
|
530
|
-
z(o.value) &&
|
|
530
|
+
z(o.value) && me(o.value, r);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function rr(e) {
|
|
535
535
|
{
|
|
536
536
|
var r = e.type;
|
|
537
537
|
if (r == null || typeof r == "string")
|
|
@@ -546,124 +546,109 @@ Check the top-level render call using <` + t + ">.");
|
|
|
546
546
|
else
|
|
547
547
|
return;
|
|
548
548
|
if (t) {
|
|
549
|
-
var n =
|
|
550
|
-
|
|
549
|
+
var n = R(r);
|
|
550
|
+
Le(t, e.props, "prop", n, e);
|
|
551
551
|
} else if (r.PropTypes !== void 0 && !G) {
|
|
552
552
|
G = !0;
|
|
553
|
-
var i =
|
|
554
|
-
|
|
553
|
+
var i = R(r);
|
|
554
|
+
d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
|
|
555
555
|
}
|
|
556
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
556
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function tr(e) {
|
|
560
560
|
{
|
|
561
561
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
562
562
|
var n = r[t];
|
|
563
563
|
if (n !== "children" && n !== "key") {
|
|
564
|
-
|
|
564
|
+
S(e), d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), S(null);
|
|
565
565
|
break;
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
e.ref !== null && (
|
|
568
|
+
e.ref !== null && (S(e), d("Invalid attribute `ref` supplied to `React.Fragment`."), S(null));
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
|
|
572
|
-
function _e(e, r, t, n, i, u) {
|
|
571
|
+
function ye(e, r, t, n, i, u) {
|
|
573
572
|
{
|
|
574
|
-
var o =
|
|
573
|
+
var o = Ae(e);
|
|
575
574
|
if (!o) {
|
|
576
575
|
var a = "";
|
|
577
576
|
(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
|
|
579
|
-
|
|
577
|
+
var c = Qe();
|
|
578
|
+
c ? a += c : a += be();
|
|
580
579
|
var s;
|
|
581
|
-
e === null ? s = "null" : q(e) ? s = "array" : e !== void 0 && e.$$typeof ===
|
|
580
|
+
e === null ? s = "null" : q(e) ? s = "array" : e !== void 0 && e.$$typeof === h ? (s = "<" + (R(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : s = typeof e, d("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
581
|
}
|
|
583
|
-
var l =
|
|
582
|
+
var l = Ze(e, r, t, i, u);
|
|
584
583
|
if (l == null)
|
|
585
584
|
return l;
|
|
586
585
|
if (o) {
|
|
587
|
-
var
|
|
588
|
-
if (
|
|
586
|
+
var p = r.children;
|
|
587
|
+
if (p !== void 0)
|
|
589
588
|
if (n)
|
|
590
|
-
if (q(
|
|
591
|
-
for (var
|
|
592
|
-
|
|
593
|
-
Object.freeze && Object.freeze(
|
|
589
|
+
if (q(p)) {
|
|
590
|
+
for (var P = 0; P < p.length; P++)
|
|
591
|
+
Ee(p[P], e);
|
|
592
|
+
Object.freeze && Object.freeze(p);
|
|
594
593
|
} else
|
|
595
|
-
|
|
594
|
+
d("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
595
|
else
|
|
597
|
-
|
|
598
|
-
}
|
|
599
|
-
if (A.call(r, "key")) {
|
|
600
|
-
var T = m(e), v = Object.keys(r).filter(function(fr) {
|
|
601
|
-
return fr !== "key";
|
|
602
|
-
}), X = v.length > 0 ? "{key: someKey, " + v.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
603
|
-
if (!Re[T + X]) {
|
|
604
|
-
var lr = v.length > 0 ? "{" + v.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), Re[T + X] = !0;
|
|
611
|
-
}
|
|
596
|
+
Ee(p, e);
|
|
612
597
|
}
|
|
613
|
-
return e ===
|
|
598
|
+
return e === m ? tr(l) : rr(l), l;
|
|
614
599
|
}
|
|
615
600
|
}
|
|
616
|
-
function
|
|
617
|
-
return
|
|
601
|
+
function nr(e, r, t) {
|
|
602
|
+
return ye(e, r, t, !0);
|
|
618
603
|
}
|
|
619
|
-
function
|
|
620
|
-
return
|
|
604
|
+
function ar(e, r, t) {
|
|
605
|
+
return ye(e, r, t, !1);
|
|
621
606
|
}
|
|
622
|
-
var
|
|
623
|
-
|
|
624
|
-
})()),
|
|
607
|
+
var or = ar, ir = nr;
|
|
608
|
+
A.Fragment = m, A.jsx = or, A.jsxs = ir;
|
|
609
|
+
})()), A;
|
|
625
610
|
}
|
|
626
|
-
var
|
|
627
|
-
function
|
|
628
|
-
return
|
|
611
|
+
var xe;
|
|
612
|
+
function lr() {
|
|
613
|
+
return xe || (xe = 1, process.env.NODE_ENV === "production" ? L.exports = ur() : L.exports = sr()), L.exports;
|
|
629
614
|
}
|
|
630
|
-
var
|
|
631
|
-
const
|
|
615
|
+
var Te = lr();
|
|
616
|
+
const fr = {
|
|
632
617
|
primary: { text: "#FFFFFF", value: "#27a7e3", dark: "#1f8ecb" },
|
|
633
618
|
secondary: { text: "#1CB0F6", value: "#E0F3FF", dark: "#B3DFFC" }
|
|
634
|
-
},
|
|
635
|
-
color:
|
|
636
|
-
onClick:
|
|
619
|
+
}, dr = ({
|
|
620
|
+
color: j = "primary",
|
|
621
|
+
onClick: h,
|
|
637
622
|
label: F,
|
|
638
|
-
size:
|
|
639
|
-
customClass:
|
|
623
|
+
size: m = "medium",
|
|
624
|
+
customClass: T = ""
|
|
640
625
|
}) => {
|
|
641
|
-
const
|
|
626
|
+
const w = {
|
|
642
627
|
small: "px-2 py-1 text-xs rounded-lg",
|
|
643
628
|
medium: "px-3 py-1 text-base rounded-xl",
|
|
644
629
|
large: "px-8 py-3 text-2xl rounded-2xl",
|
|
645
630
|
full: "px-8 py-2 text-xl rounded-2xl w-full"
|
|
646
|
-
},
|
|
647
|
-
return /* @__PURE__ */
|
|
631
|
+
}, g = fr[j];
|
|
632
|
+
return /* @__PURE__ */ Te.jsx(
|
|
648
633
|
"button",
|
|
649
634
|
{
|
|
650
|
-
className: `relative flex items-center justify-center cursor-pointer transition duration-150 ease-in-out whitespace-nowrap active:translate-y-[4px] ${
|
|
635
|
+
className: `relative flex items-center justify-center cursor-pointer transition duration-150 ease-in-out whitespace-nowrap active:translate-y-[4px] ${w[m]} ${T}`,
|
|
651
636
|
style: {
|
|
652
|
-
backgroundColor:
|
|
653
|
-
boxShadow: `0 ${
|
|
654
|
-
color:
|
|
637
|
+
backgroundColor: g.value,
|
|
638
|
+
boxShadow: `0 ${m === "large" ? "6px" : "4px"} 0 ${g.dark}`,
|
|
639
|
+
color: g.text
|
|
655
640
|
},
|
|
656
|
-
onMouseDown: (
|
|
657
|
-
|
|
641
|
+
onMouseDown: (b) => {
|
|
642
|
+
b.currentTarget.style.boxShadow = "none";
|
|
658
643
|
},
|
|
659
|
-
onMouseUp: (
|
|
660
|
-
|
|
644
|
+
onMouseUp: (b) => {
|
|
645
|
+
b.currentTarget.style.boxShadow = `0 4px 0 ${g.dark}`;
|
|
661
646
|
},
|
|
662
|
-
onClick:
|
|
663
|
-
children: /* @__PURE__ */
|
|
647
|
+
onClick: h,
|
|
648
|
+
children: /* @__PURE__ */ Te.jsx("span", { className: "font-bold", children: F })
|
|
664
649
|
}
|
|
665
650
|
);
|
|
666
651
|
};
|
|
667
652
|
export {
|
|
668
|
-
|
|
653
|
+
dr as Button
|
|
669
654
|
};
|
package/dist/ui.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(E,O){typeof exports=="object"&&typeof module<"u"?O(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],O):(E=typeof globalThis<"u"?globalThis:E||self,O(E.ui={},E.React))})(this,(function(E,O){"use strict";var Y={exports:{}},k={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var X;function Ce(){if(X)return k;X=1;var A=O,R=Symbol.for("react.element"),I=Symbol.for("react.fragment"),g=Object.prototype.hasOwnProperty,w=A.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,C={key:!0,ref:!0,__self:!0,__source:!0};function y(b,f,S){var v,h={},_=null,W=null;S!==void 0&&(_=""+S),f.key!==void 0&&(_=""+f.key),f.ref!==void 0&&(W=f.ref);for(v in f)g.call(f,v)&&!C.hasOwnProperty(v)&&(h[v]=f[v]);if(b&&b.defaultProps)for(v in f=b.defaultProps,f)h[v]===void 0&&(h[v]=f[v]);return{$$typeof:R,type:b,key:_,ref:W,props:h,_owner:w.current}}return k.Fragment=I,k.jsx=y,k.jsxs=y,k}var D={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,17 +14,12 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+q+e}}var
|
|
19
|
-
`),
|
|
20
|
-
`),s=a.length-1,l=
|
|
21
|
-
`+a[s].replace(" at new "," at ");return e.displayName&&
|
|
17
|
+
*/var Z;function Se(){return Z||(Z=1,process.env.NODE_ENV!=="production"&&(function(){var A=O,R=Symbol.for("react.element"),I=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),y=Symbol.for("react.provider"),b=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),re=Symbol.iterator,ke="@@iterator";function De(e){if(e===null||typeof e!="object")return null;var r=re&&e[re]||e[ke];return typeof r=="function"?r:null}var P=A.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function d(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Ae("error",e,t)}}function Ae(e,r,t){{var n=P.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var u=t.map(function(o){return String(o)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var Ie=!1,$e=!1,Ye=!1,We=!1,Me=!1,te;te=Symbol.for("react.module.reference");function Ne(e){return!!(typeof e=="string"||typeof e=="function"||e===g||e===C||Me||e===w||e===S||e===v||We||e===W||Ie||$e||Ye||typeof e=="object"&&e!==null&&(e.$$typeof===_||e.$$typeof===h||e.$$typeof===y||e.$$typeof===b||e.$$typeof===f||e.$$typeof===te||e.getModuleId!==void 0))}function Le(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function ne(e){return e.displayName||"Context"}function x(e){if(e==null)return null;if(typeof e.tag=="number"&&d("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 g:return"Fragment";case I:return"Portal";case C:return"Profiler";case w:return"StrictMode";case S:return"Suspense";case v:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b:var r=e;return ne(r)+".Consumer";case y:var t=e;return ne(t._context)+".Provider";case f:return Le(e,e.render,"ForwardRef");case h:var n=e.displayName||null;return n!==null?n:x(e.type)||"Memo";case _:{var i=e,u=i._payload,o=i._init;try{return x(o(u))}catch{return null}}}return null}var T=Object.assign,$=0,ae,oe,ie,ue,se,le,fe;function ce(){}ce.__reactDisabledLog=!0;function Ue(){{if($===0){ae=console.log,oe=console.info,ie=console.warn,ue=console.error,se=console.group,le=console.groupCollapsed,fe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ce,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$++}}function Ve(){{if($--,$===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},e,{value:ae}),info:T({},e,{value:oe}),warn:T({},e,{value:ie}),error:T({},e,{value:ue}),group:T({},e,{value:se}),groupCollapsed:T({},e,{value:le}),groupEnd:T({},e,{value:fe})})}$<0&&d("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var B=P.ReactCurrentDispatcher,q;function M(e,r,t){{if(q===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);q=n&&n[1]||""}return`
|
|
18
|
+
`+q+e}}var J=!1,N;{var Be=typeof WeakMap=="function"?WeakMap:Map;N=new Be}function de(e,r){if(!e||J)return"";{var t=N.get(e);if(t!==void 0)return t}var n;J=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=B.current,B.current=null,Ue();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(m){n=m}Reflect.construct(e,[],o)}else{try{o.call()}catch(m){n=m}e.call(o.prototype)}}else{try{throw Error()}catch(m){n=m}e()}}catch(m){if(m&&n&&typeof m.stack=="string"){for(var a=m.stack.split(`
|
|
19
|
+
`),c=n.stack.split(`
|
|
20
|
+
`),s=a.length-1,l=c.length-1;s>=1&&l>=0&&a[s]!==c[l];)l--;for(;s>=1&&l>=0;s--,l--)if(a[s]!==c[l]){if(s!==1||l!==1)do if(s--,l--,l<0||a[s]!==c[l]){var p=`
|
|
21
|
+
`+a[s].replace(" at new "," at ");return e.displayName&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",e.displayName)),typeof e=="function"&&N.set(e,p),p}while(s>=1&&l>=0);break}}}finally{J=!1,B.current=u,Ve(),Error.prepareStackTrace=i}var F=e?e.displayName||e.name:"",we=F?M(F):"";return typeof e=="function"&&N.set(e,we),we}function qe(e,r,t){return de(e,!1)}function Je(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function L(e,r,t){if(e==null)return"";if(typeof e=="function")return de(e,Je(e));if(typeof e=="string")return M(e);switch(e){case S:return M("Suspense");case v:return M("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return qe(e.render);case h:return L(e.type,r,t);case _:{var n=e,i=n._payload,u=n._init;try{return L(u(i),r,t)}catch{}}}return""}var U=Object.prototype.hasOwnProperty,ve={},pe=P.ReactDebugCurrentFrame;function V(e){if(e){var r=e._owner,t=L(e.type,e._source,r?r.type:null);pe.setExtraStackFrame(t)}else pe.setExtraStackFrame(null)}function Ge(e,r,t,n,i){{var u=Function.call.bind(U);for(var o in e)if(u(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var c=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 c.name="Invariant Violation",c}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(V(i),d("%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),V(null)),a instanceof Error&&!(a.message in ve)&&(ve[a.message]=!0,V(i),d("Failed %s type: %s",t,a.message),V(null))}}}var ze=Array.isArray;function G(e){return ze(e)}function Ke(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function He(e){try{return be(e),!1}catch{return!0}}function be(e){return""+e}function ye(e){if(He(e))return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ke(e)),be(e)}var ge=P.ReactCurrentOwner,Xe={key:!0,ref:!0,__self:!0,__source:!0},he,me;function Ze(e){if(U.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Qe(e){if(U.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function er(e,r){typeof e.ref=="string"&&ge.current}function rr(e,r){{var t=function(){he||(he=!0,d("%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 tr(e,r){{var t=function(){me||(me=!0,d("%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 nr=function(e,r,t,n,i,u,o){var a={$$typeof:R,type:e,key:r,ref:t,props:o,_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:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function ar(e,r,t,n,i){{var u,o={},a=null,c=null;t!==void 0&&(ye(t),a=""+t),Qe(r)&&(ye(r.key),a=""+r.key),Ze(r)&&(c=r.ref,er(r,i));for(u in r)U.call(r,u)&&!Xe.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)o[u]===void 0&&(o[u]=s[u])}if(a||c){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&rr(o,l),c&&tr(o,l)}return nr(e,a,c,i,n,ge.current,o)}}var z=P.ReactCurrentOwner,Ee=P.ReactDebugCurrentFrame;function j(e){if(e){var r=e._owner,t=L(e.type,e._source,r?r.type:null);Ee.setExtraStackFrame(t)}else Ee.setExtraStackFrame(null)}var K;K=!1;function H(e){return typeof e=="object"&&e!==null&&e.$$typeof===R}function Re(){{if(z.current){var e=x(z.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function or(e){return""}var _e={};function ir(e){{var r=Re();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+t+">.")}return r}}function
|
|
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,S,yr,S),we[S+Z]=!0}}return e===h?fr(l):lr(l),l}}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;A.Fragment=h,A.jsx=vr,A.jsxs=pr})()),A}var re;function ke(){return re||(re=1,process.env.NODE_ENV==="production"?M.exports=Pe():M.exports=je()),M.exports}var te=ke();const Fe={primary:{text:"#FFFFFF",value:"#27a7e3",dark:"#1f8ecb"},secondary:{text:"#1CB0F6",value:"#E0F3FF",dark:"#B3DFFC"}},De=({color:I="primary",onClick:_,label:$,size:h="medium",customClass:w=""})=>{const C={small:"px-2 py-1 text-xs rounded-lg",medium:"px-3 py-1 text-base rounded-xl",large:"px-8 py-3 text-2xl rounded-2xl",full:"px-8 py-2 text-xl rounded-2xl w-full"},g=Fe[I];return te.jsx("button",{className:`relative flex items-center justify-center cursor-pointer transition duration-150 ease-in-out whitespace-nowrap active:translate-y-[4px] ${C[h]} ${w}`,style:{backgroundColor:g.value,boxShadow:`0 ${h==="large"?"6px":"4px"} 0 ${g.dark}`,color:g.text},onMouseDown:b=>{b.currentTarget.style.boxShadow="none"},onMouseUp:b=>{b.currentTarget.style.boxShadow=`0 4px 0 ${g.dark}`},onClick:_,children:te.jsx("span",{className:"font-bold",children:$})})};R.Button=De,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})}));
|
|
25
|
+
Check the top-level render call using <`+t+">.")}return r}}function xe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ir(r);if(_e[t])return;_e[t]=!0;var n="";e&&e._owner&&e._owner!==z.current&&(n=" It was passed a child from "+x(e._owner.type)+"."),j(e),d('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 Te(e,r){{if(typeof e!="object")return;if(G(e))for(var t=0;t<e.length;t++){var n=e[t];H(n)&&xe(n,r)}else if(H(e))e._store&&(e._store.validated=!0);else if(e){var i=De(e);if(typeof i=="function"&&i!==e.entries)for(var u=i.call(e),o;!(o=u.next()).done;)H(o.value)&&xe(o.value,r)}}}function ur(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===f||r.$$typeof===h))t=r.propTypes;else return;if(t){var n=x(r);Ge(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!K){K=!0;var i=x(r);d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function sr(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),d("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),d("Invalid attribute `ref` supplied to `React.Fragment`."),j(null))}}function Oe(e,r,t,n,i,u){{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 c=or();c?a+=c:a+=Re();var s;e===null?s="null":G(e)?s="array":e!==void 0&&e.$$typeof===R?(s="<"+(x(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,d("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 l=ar(e,r,t,i,u);if(l==null)return l;if(o){var p=r.children;if(p!==void 0)if(n)if(G(p)){for(var F=0;F<p.length;F++)Te(p[F],e);Object.freeze&&Object.freeze(p)}else d("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 Te(p,e)}return e===g?sr(l):ur(l),l}}function lr(e,r,t){return Oe(e,r,t,!0)}function fr(e,r,t){return Oe(e,r,t,!1)}var cr=fr,dr=lr;D.Fragment=g,D.jsx=cr,D.jsxs=dr})()),D}var Q;function Pe(){return Q||(Q=1,process.env.NODE_ENV==="production"?Y.exports=Ce():Y.exports=Se()),Y.exports}var ee=Pe();const je={primary:{text:"#FFFFFF",value:"#27a7e3",dark:"#1f8ecb"},secondary:{text:"#1CB0F6",value:"#E0F3FF",dark:"#B3DFFC"}},Fe=({color:A="primary",onClick:R,label:I,size:g="medium",customClass:w=""})=>{const C={small:"px-2 py-1 text-xs rounded-lg",medium:"px-3 py-1 text-base rounded-xl",large:"px-8 py-3 text-2xl rounded-2xl",full:"px-8 py-2 text-xl rounded-2xl w-full"},y=je[A];return ee.jsx("button",{className:`relative flex items-center justify-center cursor-pointer transition duration-150 ease-in-out whitespace-nowrap active:translate-y-[4px] ${C[g]} ${w}`,style:{backgroundColor:y.value,boxShadow:`0 ${g==="large"?"6px":"4px"} 0 ${y.dark}`,color:y.text},onMouseDown:b=>{b.currentTarget.style.boxShadow="none"},onMouseUp:b=>{b.currentTarget.style.boxShadow=`0 4px 0 ${y.dark}`},onClick:R,children:ee.jsx("span",{className:"font-bold",children:I})})};E.Button=Fe,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-ui-lib",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"prepublishOnly": "npm run build"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"react": "
|
|
33
|
-
"react-dom": "
|
|
32
|
+
"react": "18.2.0",
|
|
33
|
+
"react-dom": "18.2.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@chromatic-com/storybook": "^4.1.1",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"@storybook/addon-docs": "^9.1.5",
|
|
41
41
|
"@storybook/addon-vitest": "^9.1.5",
|
|
42
42
|
"@storybook/react-vite": "^9.1.5",
|
|
43
|
-
"@types/react": "
|
|
44
|
-
"@types/react-dom": "
|
|
43
|
+
"@types/react": "18.2.0",
|
|
44
|
+
"@types/react-dom": "18.2.0",
|
|
45
45
|
"@vitejs/plugin-react": "^5.0.0",
|
|
46
46
|
"@vitest/browser": "^3.2.4",
|
|
47
47
|
"@vitest/coverage-v8": "^3.2.4",
|