@aveonline/ui-react 0.0.1-alpha.0

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.
@@ -0,0 +1,28 @@
1
+ (function(_,k){typeof exports=="object"&&typeof module<"u"?k(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],k):(_=typeof globalThis<"u"?globalThis:_||self,k(_["@aveonline/ui-react"]={},_.React))})(this,function(_,k){"use strict";var Q=document.createElement("style");Q.innerHTML=`.storybook-button{border:0;border-radius:3em;cursor:pointer;display:inline-block;font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif;font-weight:700;line-height:1}.storybook-button--primary{background-color:#1ea7fd;color:#fff}.storybook-button--secondary{background-color:transparent;box-shadow:inset 0 0 0 1px #00000026;color:#333}.storybook-button--small{font-size:12px;padding:10px 16px}.storybook-button--medium{font-size:14px;padding:11px 20px}.storybook-button--large{font-size:16px;padding:12px 24px}
2
+ `,document.head.appendChild(Q);const ee=(v=>v&&typeof v=="object"&&"default"in v?v:{default:v})(k),yr="";var Y={exports:{}},D={};/**
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 re;function Pe(){if(re)return D;re=1;var v=ee.default,E=Symbol.for("react.element"),A=Symbol.for("react.fragment"),h=Object.prototype.hasOwnProperty,O=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,S={key:!0,ref:!0,__self:!0,__source:!0};function I(R,f,C){var p,y={},T=null,N=null;C!==void 0&&(T=""+C),f.key!==void 0&&(T=""+f.key),f.ref!==void 0&&(N=f.ref);for(p in f)h.call(f,p)&&!S.hasOwnProperty(p)&&(y[p]=f[p]);if(R&&R.defaultProps)for(p in f=R.defaultProps,f)y[p]===void 0&&(y[p]=f[p]);return{$$typeof:E,type:R,key:T,ref:N,props:y,_owner:O.current}}return D.Fragment=A,D.jsx=I,D.jsxs=I,D}var F={};/**
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 te;function je(){return te||(te=1,process.env.NODE_ENV!=="production"&&function(){var v=ee.default,E=Symbol.for("react.element"),A=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),I=Symbol.for("react.provider"),R=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),ae=Symbol.iterator,Ae="@@iterator";function Ie(e){if(e===null||typeof e!="object")return null;var r=ae&&e[ae]||e[Ae];return typeof r=="function"?r:null}var w=v.__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];$e("error",e,t)}}function $e(e,r,t){{var n=w.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 We=!1,Ye=!1,Ne=!1,Le=!1,Me=!1,oe;oe=Symbol.for("react.module.reference");function Ve(e){return!!(typeof e=="string"||typeof e=="function"||e===h||e===S||Me||e===O||e===C||e===p||Le||e===N||We||Ye||Ne||typeof e=="object"&&e!==null&&(e.$$typeof===T||e.$$typeof===y||e.$$typeof===I||e.$$typeof===R||e.$$typeof===f||e.$$typeof===oe||e.getModuleId!==void 0))}function Ue(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function ie(e){return e.displayName||"Context"}function g(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 h:return"Fragment";case A:return"Portal";case S:return"Profiler";case O:return"StrictMode";case C:return"Suspense";case p:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case R:var r=e;return ie(r)+".Consumer";case I:var t=e;return ie(t._context)+".Provider";case f:return Ue(e,e.render,"ForwardRef");case y:var n=e.displayName||null;return n!==null?n:g(e.type)||"Memo";case T:{var i=e,u=i._payload,o=i._init;try{return g(o(u))}catch{return null}}}return null}var x=Object.assign,$=0,ue,se,le,fe,ce,de,ve;function pe(){}pe.__reactDisabledLog=!0;function Be(){{if($===0){ue=console.log,se=console.info,le=console.warn,fe=console.error,ce=console.group,de=console.groupCollapsed,ve=console.groupEnd;var e={configurable:!0,enumerable:!0,value:pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$++}}function qe(){{if($--,$===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:x({},e,{value:ue}),info:x({},e,{value:se}),warn:x({},e,{value:le}),error:x({},e,{value:fe}),group:x({},e,{value:ce}),groupCollapsed:x({},e,{value:de}),groupEnd:x({},e,{value:ve})})}$<0&&c("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=w.ReactCurrentDispatcher,z;function L(e,r,t){{if(z===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);z=n&&n[1]||""}return`
19
+ `+z+e}}var J=!1,M;{var ze=typeof WeakMap=="function"?WeakMap:Map;M=new ze}function be(e,r){if(!e||J)return"";{var t=M.get(e);if(t!==void 0)return t}var n;J=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=q.current,q.current=null,Be();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(`
20
+ `),d=n.stack.split(`
21
+ `),s=a.length-1,l=d.length-1;s>=1&&l>=0&&a[s]!==d[l];)l--;for(;s>=1&&l>=0;s--,l--)if(a[s]!==d[l]){if(s!==1||l!==1)do if(s--,l--,l<0||a[s]!==d[l]){var b=`
22
+ `+a[s].replace(" at new "," at ");return e.displayName&&b.includes("<anonymous>")&&(b=b.replace("<anonymous>",e.displayName)),typeof e=="function"&&M.set(e,b),b}while(s>=1&&l>=0);break}}}finally{J=!1,q.current=u,qe(),Error.prepareStackTrace=i}var j=e?e.displayName||e.name:"",we=j?L(j):"";return typeof e=="function"&&M.set(e,we),we}function Je(e,r,t){return be(e,!1)}function Ge(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function V(e,r,t){if(e==null)return"";if(typeof e=="function")return be(e,Ge(e));if(typeof e=="string")return L(e);switch(e){case C:return L("Suspense");case p:return L("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case f:return Je(e.render);case y:return V(e.type,r,t);case T:{var n=e,i=n._payload,u=n._init;try{return V(u(i),r,t)}catch{}}}return""}var U=Object.prototype.hasOwnProperty,ye={},ge=w.ReactDebugCurrentFrame;function B(e){if(e){var r=e._owner,t=V(e.type,e._source,r?r.type:null);ge.setExtraStackFrame(t)}else ge.setExtraStackFrame(null)}function He(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 d=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 d.name="Invariant Violation",d}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)&&(B(i),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,o,typeof a),B(null)),a instanceof Error&&!(a.message in ye)&&(ye[a.message]=!0,B(i),c("Failed %s type: %s",t,a.message),B(null))}}}var Ke=Array.isArray;function G(e){return Ke(e)}function Xe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Ze(e){try{return me(e),!1}catch{return!0}}function me(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.",Xe(e)),me(e)}var W=w.ReactCurrentOwner,Qe={key:!0,ref:!0,__self:!0,__source:!0},_e,Ee,H;H={};function er(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 rr(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 tr(e,r){if(typeof e.ref=="string"&&W.current&&r&&W.current.stateNode!==r){var t=g(W.current.type);H[t]||(c('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',g(W.current.type),e.ref),H[t]=!0)}}function nr(e,r){{var t=function(){_e||(_e=!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(){Ee||(Ee=!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 or=function(e,r,t,n,i,u,o){var a={$$typeof:E,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 ir(e,r,t,n,i){{var u,o={},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,i));for(u in r)U.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||d){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&nr(o,l),d&&ar(o,l)}return or(e,a,d,i,n,W.current,o)}}var K=w.ReactCurrentOwner,Re=w.ReactDebugCurrentFrame;function P(e){if(e){var r=e._owner,t=V(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(t)}else Re.setExtraStackFrame(null)}var X;X=!1;function Z(e){return typeof e=="object"&&e!==null&&e.$$typeof===E}function Te(){{if(K.current){var e=g(K.current.type);if(e)return`
23
+
24
+ Check the render method of \``+e+"`."}return""}}function ur(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
25
+
26
+ Check your code at `+r+":"+t+"."}return""}}var xe={};function sr(e){{var r=Te();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
27
+
28
+ Check the top-level render call using <`+t+">.")}return r}}function Oe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=sr(r);if(xe[t])return;xe[t]=!0;var n="";e&&e._owner&&e._owner!==K.current&&(n=" It was passed a child from "+g(e._owner.type)+"."),P(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),P(null)}}function Se(e,r){{if(typeof e!="object")return;if(G(e))for(var t=0;t<e.length;t++){var n=e[t];Z(n)&&Oe(n,r)}else if(Z(e))e._store&&(e._store.validated=!0);else if(e){var i=Ie(e);if(typeof i=="function"&&i!==e.entries)for(var u=i.call(e),o;!(o=u.next()).done;)Z(o.value)&&Oe(o.value,r)}}}function lr(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===y))t=r.propTypes;else return;if(t){var n=g(r);He(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!X){X=!0;var i=g(r);c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"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 fr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){P(e),c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),P(null);break}}e.ref!==null&&(P(e),c("Invalid attribute `ref` supplied to `React.Fragment`."),P(null))}}function Ce(e,r,t,n,i,u){{var o=Ve(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 d=ur(i);d?a+=d:a+=Te();var s;e===null?s="null":G(e)?s="array":e!==void 0&&e.$$typeof===E?(s="<"+(g(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 l=ir(e,r,t,i,u);if(l==null)return l;if(o){var b=r.children;if(b!==void 0)if(n)if(G(b)){for(var j=0;j<b.length;j++)Se(b[j],e);Object.freeze&&Object.freeze(b)}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 Se(b,e)}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;F.Fragment=h,F.jsx=vr,F.jsxs=pr}()),F}(function(v){process.env.NODE_ENV==="production"?v.exports=Pe():v.exports=je()})(Y);const ke=Y.exports.Fragment,ne=Y.exports.jsx,De=Y.exports.jsxs,Fe=({primary:v=!1,size:E="medium",backgroundColor:A,label:h,...O})=>{const S=v?"storybook-button--primary":"storybook-button--secondary";return De(ke,{children:[ne("button",{type:"button",className:["storybook-button",`storybook-button--${E}`,S].join(" "),style:{backgroundColor:A},...O,children:h}),ne("p",{className:"text-letter-disabled",children:"test"})]})};_.Button=Fe,Object.defineProperties(_,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "@aveonline/ui-react",
3
+ "description": "Home base for Aveonline design system - ecosystem react",
4
+ "private": false,
5
+ "version": "0.0.1-alpha.0",
6
+ "types": "./dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/ui-react.mjs",
13
+ "require": "./dist/ui-react.umd.mjs"
14
+ },
15
+ "./tailwind.css": {
16
+ "import": "./dist/tailwind.css",
17
+ "require": "./dist/tailwind.css"
18
+ },
19
+ "./tokens.css": {
20
+ "import": "./dist/tokens.css",
21
+ "require": "./dist/tokens.css"
22
+ },
23
+ "./tailwind.config.js": {
24
+ "import": "./dist/tailwind.config.js",
25
+ "require": "./dist/tailwind.config.js"
26
+ },
27
+ "./postcss.config.js": {
28
+ "import": "./dist/postcss.config.js",
29
+ "require": "./dist/postcss.config.js"
30
+ }
31
+ },
32
+ "keywords": [
33
+ "react",
34
+ "react-kit"
35
+ ],
36
+ "license": "MIT",
37
+ "scripts": {
38
+ "build": "vite build && npm run build:tailwind && npm run cp:tailwind && npm run cp:postcss",
39
+ "dev": "start-storybook -p 6006",
40
+ "build:storybook": "build-storybook",
41
+ "lint": "eslint --ignore-path .gitignore \"./src/**/*.+(tsx,ts)\" --fix",
42
+ "build:tailwind": "npx tailwindcss -o ./dist/tailwind.css --minify",
43
+ "clean": "rm -rf dist",
44
+ "cp:tailwind": "cp ../tailwind-config/tailwind.config.js dist/",
45
+ "cp:postcss": "cp ../tailwind-config/postcss.config.js dist/"
46
+ },
47
+ "dependencies": {
48
+ "design-tokens": "*",
49
+ "react": "18.2.0",
50
+ "react-dom": "18.2.0"
51
+ },
52
+ "devDependencies": {
53
+ "tailwind-config": "*",
54
+ "tsconfig": "*",
55
+ "eslint-config-custom": "*",
56
+ "@storybook/addon-essentials": "6.5.13",
57
+ "@storybook/addon-interactions": "6.5.13",
58
+ "@storybook/addon-links": "6.5.13",
59
+ "@storybook/builder-vite": "0.2.5",
60
+ "@storybook/react": "6.5.13",
61
+ "@types/node": "16.11.6",
62
+ "@types/react": "18.0.22",
63
+ "@types/react-dom": "18.0.7",
64
+ "@vitejs/plugin-react": "2.2.0",
65
+ "happy-dom": "7.6.6",
66
+ "typescript": "4.6.4",
67
+ "vite": "3.2.0",
68
+ "vite-plugin-dts": "1.6.6",
69
+ "vitest": "0.24.4"
70
+ }
71
+ }