@aleleba/ro-ut-ui 2.1.12 → 2.2.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.
- package/dist/index.js +1 -1
- package/package.json +8 -3
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@aleleba/ro-ut-ui"]=t():e["@aleleba/ro-ut-ui"]=t()}(this,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{BorderCard:()=>d,Button:()=>i,ButtonThemes:()=>o,ButtonTypes:()=>u,Card:()=>s,CardThemes:()=>c,FontWeight:()=>h,Input:()=>p,InputThemes:()=>f,getBorderCard:()=>m,getButtonThemeClass:()=>l,getCardThemeClass:()=>y,getInputThemeClass:()=>b});const r=require("react");var n=e.n(r);const a=(...e)=>e.filter((e=>e)).join(" "),i=({id:e="",children:t="",className:r="",theme:i=o.primary,hardBorder:s=!1,type:c=u.button,onClick:d})=>{const y=a("btn",l({theme:i}),s?"btn-border-hard":"",r);return n().createElement("button",{id:e,className:y,type:c,onClick:d},t)};let o,u;!function(e){e.primary="primary",e.secondary="secondary",e.tertiary="tertiary",e.quaternary="quaternary",e.quinary="quinary",e.primaryOutline="primaryOutline",e.secondaryOutline="secondaryOutline",e.tertiaryOutline="tertiaryOutline",e.quaternaryOutline="quaternaryOutline",e.quinaryOutline="quinaryOutline"}(o||(o={})),function(e){e.submit="submit",e.reset="reset",e.button="button"}(u||(u={}));const l=({theme:e})=>{switch(e){case"primary":return"btn-purple-main";case"secondary":return"btn-green-main";case"tertiary":return"btn-white";case"quaternary":return"btn-purple-dark";case"quinary":return"btn-gray-main";case"primaryOutline":return"btn-outline-purple-main";case"secondaryOutline":return"btn-outline-green-main";case"tertiaryOutline":return"btn-outline-white";case"quaternaryOutline":return"btn-outline-purple-dark";case"quinaryOutline":return"btn-outline-gray-main";default:return""}},s=({children:e="",className:t="",theme:r=c.primary,border:i=d.soft})=>{const o=a("card",y({theme:r}),m({border:i}),t);return n().createElement("div",{className:o},e)};let c,d;!function(e){e.primary="primary",e.secondary="secondary",e.tertiary="tertiary",e.quaternary="quaternary"}(c||(c={})),function(e){e.soft="soft",e.hard="hard"}(d||(d={}));const y=({theme:e})=>{switch(e){case"primary":return"bg-white text-black";case"secondary":return"bg-mid-blue text-white";case"tertiary":return"bg-light-blue text-white";case"quaternary":return"bg-dark-blue text-white";default:return""}},m=({border:e})=>{switch(e){case"soft":return"border-soft";case"hard":return"border-hard";default:return""}},p=({id:e="",className:t="",type:r="text",theme:i=f.primary,placeholder:o="",hardBorder:u=!1,fontWeight:l=h.fwLight,onChange:s=(e=>{})})=>{const c=a("form-control",b({theme:i}),l,u?"input-border-hard":"",t);return n().createElement("input",{id:e,className:c,placeholder:o,type:r,onChange:s})};let f;!function(e){e.primary="primary",e.secondary="secondary",e.tertiary="tertiary"}(f||(f={}));const b=({theme:e})=>{switch(e){case"primary":default:return"";case"secondary":return"input-secondary";case"tertiary":return"input-tertiary"}};let h;return function(e){e.fwBold="fw-bold",e.fwBolder="fw-bolder",e.fwSemiBold="fw-semibold",e.fwNormal="fw-normal",e.fwLight="fw-light",e.fwLighter="fw-lighter",e.fstItalic="fst-italic",e.fstNormal="fst-normal"}(h||(h={})),t})()));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aleleba/ro-ut-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "UI Component for Ro-ut App",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
"test:watch": "jest --watch",
|
|
13
13
|
"storybook": "start-storybook -p 3000",
|
|
14
14
|
"build-storybook": "build-storybook",
|
|
15
|
-
"check-updates": "npx npm-check-updates -u && npm i --legacy-peer-deps"
|
|
15
|
+
"check-updates": "npx npm-check-updates -u && npm i --legacy-peer-deps",
|
|
16
|
+
"cy:open": "npx cypress open",
|
|
17
|
+
"cy:run": "cypress install && cypress run --headless --component"
|
|
16
18
|
},
|
|
17
19
|
"repository": {
|
|
18
20
|
"type": "git",
|
|
@@ -63,11 +65,13 @@
|
|
|
63
65
|
"clean-webpack-plugin": "^4.0.0",
|
|
64
66
|
"css-loader": "^6.7.3",
|
|
65
67
|
"css-minimizer-webpack-plugin": "^4.2.2",
|
|
68
|
+
"cypress": "^12.7.0",
|
|
66
69
|
"dotenv": "^16.0.3",
|
|
67
70
|
"eslint": "^8.35.0",
|
|
68
71
|
"eslint-plugin-react": "^7.32.2",
|
|
69
72
|
"eslint-plugin-storybook": "^0.6.11",
|
|
70
73
|
"eslint-webpack-plugin": "^4.0.0",
|
|
74
|
+
"html-webpack-plugin": "^5.5.0",
|
|
71
75
|
"identity-obj-proxy": "^3.0.0",
|
|
72
76
|
"jest": "^29.4.3",
|
|
73
77
|
"jest-environment-jsdom": "^29.4.3",
|
|
@@ -75,11 +79,12 @@
|
|
|
75
79
|
"mini-css-extract-plugin": "^2.7.2",
|
|
76
80
|
"react": "^18.2.0",
|
|
77
81
|
"react-dom": "^18.2.0",
|
|
82
|
+
"resolve-ts-aliases": "^1.0.1",
|
|
78
83
|
"sass": "^1.58.3",
|
|
79
84
|
"sass-loader": "^13.2.0",
|
|
80
85
|
"style-loader": "^3.3.1",
|
|
81
86
|
"terser-webpack-plugin": "^5.3.6",
|
|
82
|
-
"ts-
|
|
87
|
+
"ts-jest": "^29.0.5",
|
|
83
88
|
"tsconfig-paths-webpack-plugin": "^4.0.0",
|
|
84
89
|
"typescript": "^4.9.5",
|
|
85
90
|
"url-loader": "^4.1.1",
|