@councilbox/councilbox-ui 0.0.3 → 0.0.6
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 +1 -1
- package/dist/HOCs/useWindowSize.js +78 -0
- package/dist/assets/img/check.svg +3 -0
- package/dist/assets/img/info.svg +5 -0
- package/dist/build-index.js +32 -0
- package/dist/components/Avatar/Avatar.js +46 -57
- package/dist/components/Avatar/Avatar.stories.js +15 -23
- package/dist/components/Avatar/DesignAvatar.stories.js +166 -0
- package/dist/components/Avatar/{DesignAvatarText.js → DesignAvatarText.stories.js} +65 -4
- package/dist/components/AvatarGroup/AvatarGroup.css +33 -0
- package/dist/components/AvatarGroup/AvatarGroup.js +40 -0
- package/dist/components/AvatarGroup/AvatarGroup.stories.js +32 -0
- package/dist/components/AvatarGroup/DesignAvatarGroup.stories.js +129 -0
- package/dist/components/Button/Button.js +90 -16
- package/dist/components/Button/Button.stories.js +26 -37
- package/dist/components/Button/button.css +34 -0
- package/dist/components/Checkbox/Checkbox.css +0 -0
- package/dist/components/Checkbox/Checkbox.js +94 -0
- package/dist/components/Checkbox/Checkbox.stories.js +28 -0
- package/dist/components/Grid/DesignGrid.js +1 -5
- package/dist/components/Grid/Grid.js +1 -5
- package/dist/components/Grid/GridItem.js +1 -5
- package/dist/components/Header/Header.js +4 -4
- package/dist/components/InputPassword/InputPassword.css +26 -0
- package/dist/components/InputPassword/InputPassword.js +126 -27
- package/dist/components/InputPassword/InputPassword.stories.js +32 -33
- package/dist/components/InputText/InputText.css +13 -0
- package/dist/components/InputText/InputText.js +200 -30
- package/dist/components/InputText/InputText.stories.js +27 -35
- package/dist/components/RadioButton/Radio.css +0 -0
- package/dist/components/RadioButton/Radio.js +94 -0
- package/dist/components/RadioButton/Radio.stories.js +28 -0
- package/dist/components/Spacing/Spacing.css +0 -0
- package/dist/components/Spacing/Spacing.js +137 -0
- package/dist/components/Spacing/Spacing.stories.js +28 -0
- package/dist/components/ThemeProvider/Colors.js +102 -0
- package/dist/components/ThemeProvider/ThemeProvider.js +18 -9
- package/dist/components/Typography/Typography.js +37 -13
- package/dist/components/Typography/Typography.stories.js +11 -2
- package/dist/index.js +6 -18
- package/dist/setupTests.js +6 -3
- package/dist/styles/main.css +98 -32
- package/dist/styles/reset.css +69 -37
- package/dist/styles/stylesheet.js +114 -0
- package/dist/testing/TestComponents.js +61 -16
- package/package.json +9 -2
- package/dist/Button/Button.js +0 -36
- package/dist/Button/Button.stories.js +0 -71
- package/dist/Button/button.css +0 -30
- package/dist/HOCs/withWindowSize.js +0 -122
- package/dist/Header/Header.js +0 -68
- package/dist/Header/Header.stories.js +0 -31
- package/dist/Header/header.css +0 -26
- package/dist/Introduction.stories.mdx +0 -211
- package/dist/components/Avatar/DesignAvatar.js +0 -66
- package/dist/components/Avatar/DesignAvatarGroup.js +0 -58
- package/dist/styles/stylesheet.ts +0 -49
package/dist/styles/main.css
CHANGED
|
@@ -1,26 +1,117 @@
|
|
|
1
1
|
@import './reset.css';
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
--font-
|
|
4
|
+
--font-primary: 'Lato', sans-serif;
|
|
5
|
+
--font-secondary: 'Montserrat', sans-serif;
|
|
5
6
|
--primary: #38398C;
|
|
6
|
-
|
|
7
|
-
--
|
|
7
|
+
--secondary: #6BEAF2;
|
|
8
|
+
--primary900: #1F2073;
|
|
9
|
+
--primary800: #38398C;
|
|
10
|
+
--primary700: #5152A5;
|
|
11
|
+
--primary600: #696ABD;
|
|
12
|
+
--primary500: #8889DA;
|
|
13
|
+
--primary400: #A6A7F8;
|
|
14
|
+
--primary300: #BCBDFF;
|
|
15
|
+
--primary200: #CECFF8;
|
|
16
|
+
--primary100: #E1E5FF;
|
|
17
|
+
--primary50: #F2F4FF;
|
|
18
|
+
--secondary900: #0A6169;
|
|
19
|
+
--secondary800: #047A82;
|
|
20
|
+
--secondary700: #1A99A1;
|
|
21
|
+
--secondary600: #3DBCC4;
|
|
22
|
+
--secondary500: #5AD9E1;
|
|
23
|
+
--secondary400: #A6A7F8;
|
|
24
|
+
--secondary300: #89F5FC;
|
|
25
|
+
--secondary200: #B5F5F9;
|
|
26
|
+
--secondary100: #D6FDFF;
|
|
27
|
+
--secondary50: #EAFDFF;
|
|
28
|
+
--neutral900: #222222;
|
|
29
|
+
--neutral800: #363636;
|
|
30
|
+
--neutral700: #4D4D4D;
|
|
31
|
+
--neutral600: #616161;
|
|
32
|
+
--neutral500: #767676;
|
|
33
|
+
--neutral400: #8C8C8C;
|
|
34
|
+
--neutral300: #AAAAAA;
|
|
35
|
+
--neutral200: #C7C7C7;
|
|
36
|
+
--neutral100: #E5E5E5;
|
|
37
|
+
--neutral50: #F6F6F6;
|
|
38
|
+
--info900: #004BA1;
|
|
39
|
+
--info800: #0064B7;
|
|
40
|
+
--info700: #007AD1;
|
|
41
|
+
--info600: #0B8CE4;
|
|
42
|
+
--info500: #1CA2F9;
|
|
43
|
+
--info400: #55B9F9;
|
|
44
|
+
--info300: #86CAF5;
|
|
45
|
+
--info200: #B8E3FF;
|
|
46
|
+
--info100: #CFEDFF;
|
|
47
|
+
--info50: #E5F5FF;
|
|
48
|
+
--error900: #960000;
|
|
49
|
+
--error800: #B60000;
|
|
50
|
+
--error700: #D50000;
|
|
51
|
+
--error600: #E80000;
|
|
52
|
+
--error500: #F63D3D;
|
|
53
|
+
--error400: #FE6A6A;
|
|
54
|
+
--error300: #FF8989;
|
|
55
|
+
--error200: #FFB5B5;
|
|
56
|
+
--error100: #FFCFCF;
|
|
57
|
+
--error50: #FFE5E5;
|
|
58
|
+
--warnig900: #843D00;
|
|
59
|
+
--warnig800: #A44D00;
|
|
60
|
+
--warnig700: #C75D00;
|
|
61
|
+
--warnig600: #EA7405;
|
|
62
|
+
--warnig500: #F98C25;
|
|
63
|
+
--warnig400: #FF9D42;
|
|
64
|
+
--warnig300: #FFB65E;
|
|
65
|
+
--warnig200: #FFC988;
|
|
66
|
+
--warnig100: #FDE2B4;
|
|
67
|
+
--warnig50: #FEF4E1;
|
|
68
|
+
--success900: #004800;
|
|
69
|
+
--success800: #006500;
|
|
70
|
+
--success700: #007A00;
|
|
71
|
+
--success600: #138A00;
|
|
72
|
+
--success500: #039928;
|
|
73
|
+
--success400: #43B952;
|
|
74
|
+
--success300: #6AC572;
|
|
75
|
+
--success200: #97D59B;
|
|
76
|
+
--success100: #C0E5C2;
|
|
77
|
+
--success50: #E2F5E3;
|
|
78
|
+
--spacing4: 0.25rem;
|
|
79
|
+
--spacing8: 0.5rem;
|
|
80
|
+
--spacing12: 0.75rem;
|
|
81
|
+
--spacing16: 1rem;
|
|
82
|
+
--spacing20: 1.25rem;
|
|
83
|
+
--spacing24: 1.5rem;
|
|
84
|
+
--spacing32: 2rem;
|
|
85
|
+
--spacing40: 2.5rem;
|
|
86
|
+
--spacing48: 3rem;
|
|
87
|
+
--spacing56: 3.5rem;
|
|
88
|
+
--spacing64: 4rem;
|
|
89
|
+
--spacing72: 4.5rem;
|
|
90
|
+
--spacing80: 5rem;
|
|
91
|
+
--spacing96: 6rem;
|
|
92
|
+
--spacing112: 7rem;
|
|
93
|
+
--spacing128: 8rem;
|
|
94
|
+
--spacing144: 9rem;
|
|
95
|
+
--spacing160: 10rem;
|
|
96
|
+
--spacing176: 11rem;
|
|
97
|
+
--spacing192: 12rem;
|
|
8
98
|
}
|
|
9
99
|
|
|
10
100
|
html, body {
|
|
11
|
-
font-family:
|
|
101
|
+
font-family: var(--font-primary);
|
|
12
102
|
height: 100%;
|
|
13
103
|
}
|
|
14
104
|
|
|
15
105
|
#root {
|
|
16
106
|
overflow: hidden;
|
|
17
|
-
padding: 0;
|
|
107
|
+
padding: 0.5em;
|
|
108
|
+
/* padding: 0; */
|
|
18
109
|
height: 100%;
|
|
19
110
|
margin: 0;
|
|
20
111
|
}
|
|
21
112
|
|
|
22
113
|
html {
|
|
23
|
-
font-family: var(--font-
|
|
114
|
+
font-family: var(--font-primary);
|
|
24
115
|
height: 100%;
|
|
25
116
|
overflow: hidden !important;
|
|
26
117
|
}
|
|
@@ -29,30 +120,5 @@ body {
|
|
|
29
120
|
margin: 0;
|
|
30
121
|
padding: 0;
|
|
31
122
|
height: 100%;
|
|
32
|
-
font-family: var(--font-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.gapAvatar {
|
|
36
|
-
gap: 16px
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.gapAvatarCompressed > div:not(:first-child){
|
|
40
|
-
margin-left: -16px
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
.gapAvatarCompressedsm > div:not(:first-child){
|
|
45
|
-
margin-left: -6px
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.gapAvatarCompressedxs > div:not(:first-child){
|
|
49
|
-
margin-left: -8px
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.gapAvatarCompressedsm > div:not(:first-child) > div {
|
|
53
|
-
border: 0.571429px solid white;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.gapAvatarCompressedxs > div:not(:first-child) > div {
|
|
57
|
-
border: 0.428571px solid white;
|
|
123
|
+
font-family: var(--font-primary);
|
|
58
124
|
}
|
package/dist/styles/reset.css
CHANGED
|
@@ -1,43 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
b, u, i, center,
|
|
7
|
-
dl, dt, dd, ol, ul, li,
|
|
8
|
-
fieldset, form, label, legend,
|
|
9
|
-
table, caption, tbody, tfoot, thead, tr, th, td,
|
|
10
|
-
article, aside, canvas, details, embed,
|
|
11
|
-
figure, figcaption, footer, header, hgroup,
|
|
12
|
-
menu, nav, output, ruby, section, summary,
|
|
13
|
-
time, mark, audio, video {
|
|
14
|
-
margin: 0;
|
|
15
|
-
padding: 0;
|
|
16
|
-
border: 0;
|
|
17
|
-
font-size: 100%;
|
|
18
|
-
font: inherit;
|
|
19
|
-
vertical-align: baseline;
|
|
20
|
-
}
|
|
21
|
-
/* HTML5 display-role reset for older browsers */
|
|
22
|
-
article, aside, details, figcaption, figure,
|
|
23
|
-
footer, header, hgroup, menu, nav, section {
|
|
24
|
-
display: block;
|
|
1
|
+
/* Box sizing rules */
|
|
2
|
+
*,
|
|
3
|
+
*::before,
|
|
4
|
+
*::after {
|
|
5
|
+
box-sizing: border-box;
|
|
25
6
|
}
|
|
7
|
+
|
|
8
|
+
/* Remove default margin */
|
|
9
|
+
body,
|
|
10
|
+
h1,
|
|
11
|
+
h2,
|
|
12
|
+
h3,
|
|
13
|
+
h4,
|
|
14
|
+
p,
|
|
15
|
+
figure,
|
|
16
|
+
blockquote,
|
|
17
|
+
dl,
|
|
18
|
+
dd {
|
|
19
|
+
margin: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
|
|
23
|
+
ul[role='list'],
|
|
24
|
+
ol[role='list'] {
|
|
25
|
+
list-style: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* Set core root defaults */
|
|
29
|
+
html:focus-within {
|
|
30
|
+
scroll-behavior: smooth;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Set core body defaults, line-height 1.5 it's easier to read, 'default' per se is 1.2 */
|
|
26
34
|
body {
|
|
27
|
-
|
|
35
|
+
min-height: 100vh;
|
|
36
|
+
text-rendering: optimizeSpeed;
|
|
37
|
+
line-height: 1.5;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* A elements that don't have a class get default styles */
|
|
41
|
+
a:not([class]) {
|
|
42
|
+
text-decoration-skip-ink: auto;
|
|
28
43
|
}
|
|
29
|
-
|
|
30
|
-
|
|
44
|
+
|
|
45
|
+
/* Make images easier to work with */
|
|
46
|
+
img,
|
|
47
|
+
picture {
|
|
48
|
+
max-width: 100%;
|
|
49
|
+
display: block;
|
|
31
50
|
}
|
|
32
|
-
|
|
33
|
-
|
|
51
|
+
|
|
52
|
+
/* Inherit fonts for inputs and buttons */
|
|
53
|
+
input,
|
|
54
|
+
button,
|
|
55
|
+
textarea,
|
|
56
|
+
select {
|
|
57
|
+
font: inherit;
|
|
34
58
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
59
|
+
|
|
60
|
+
/* Remove transitions for people that prefer not to see them */
|
|
61
|
+
/* Animations should be handled manually */
|
|
62
|
+
@media (prefers-reduced-motion: reduce) {
|
|
63
|
+
html:focus-within {
|
|
64
|
+
scroll-behavior: auto;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
*,
|
|
68
|
+
*::before,
|
|
69
|
+
*::after {
|
|
70
|
+
animation-duration: 0.01ms !important;
|
|
71
|
+
animation-iteration-count: 1 !important;
|
|
72
|
+
transition-duration: 0.01ms !important;
|
|
73
|
+
scroll-behavior: auto !important;
|
|
74
|
+
}
|
|
39
75
|
}
|
|
40
|
-
table {
|
|
41
|
-
border-collapse: collapse;
|
|
42
|
-
border-spacing: 0;
|
|
43
|
-
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.theme = exports.getSecondary = exports.getPrimary = exports.defaultBreakpoints = void 0;
|
|
7
|
+
|
|
8
|
+
var _styles = require("@mui/material/styles");
|
|
9
|
+
|
|
10
|
+
var _Colors = require("../components/ThemeProvider/Colors");
|
|
11
|
+
|
|
12
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
+
|
|
14
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
+
|
|
16
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
|
|
18
|
+
var defaultBreakpoints = {
|
|
19
|
+
xs: 320,
|
|
20
|
+
sm: 768,
|
|
21
|
+
md: 1024,
|
|
22
|
+
lg: 1440,
|
|
23
|
+
xl: 1920
|
|
24
|
+
};
|
|
25
|
+
exports.defaultBreakpoints = defaultBreakpoints;
|
|
26
|
+
|
|
27
|
+
var getPrimary = function getPrimary() {
|
|
28
|
+
var actual = document.documentElement.style.getPropertyValue('--primary') || _Colors.colorsThemeBrand.primary;
|
|
29
|
+
|
|
30
|
+
return actual;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
exports.getPrimary = getPrimary;
|
|
34
|
+
|
|
35
|
+
var getSecondary = function getSecondary() {
|
|
36
|
+
var actual = document.documentElement.style.getPropertyValue('--secondary') || _Colors.colorsThemeBrand.secondary;
|
|
37
|
+
|
|
38
|
+
return actual;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
exports.getSecondary = getSecondary;
|
|
42
|
+
|
|
43
|
+
var theme = function theme() {
|
|
44
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
45
|
+
_ref$colors = _ref.colors,
|
|
46
|
+
colors = _ref$colors === void 0 ? {} : _ref$colors,
|
|
47
|
+
_ref$breakpoints = _ref.breakpoints,
|
|
48
|
+
breakpoints = _ref$breakpoints === void 0 ? defaultBreakpoints : _ref$breakpoints;
|
|
49
|
+
|
|
50
|
+
return (0, _styles.createTheme)({
|
|
51
|
+
breakpoints: {
|
|
52
|
+
values: _objectSpread(_objectSpread({}, defaultBreakpoints), breakpoints)
|
|
53
|
+
},
|
|
54
|
+
typography: {
|
|
55
|
+
fontFamily: 'var(--font-primary)',
|
|
56
|
+
fontSize: 16,
|
|
57
|
+
body1: {
|
|
58
|
+
color: '#616161',
|
|
59
|
+
fontSize: '16px',
|
|
60
|
+
lineHeight: '24px'
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
spacing: [0, 4, 8, 16, 32, 64],
|
|
64
|
+
palette: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
65
|
+
primary: {
|
|
66
|
+
main: colors.primary || getPrimary()
|
|
67
|
+
},
|
|
68
|
+
secondary: {
|
|
69
|
+
main: colors.secondary || getSecondary()
|
|
70
|
+
}
|
|
71
|
+
}, _Colors.colorsThemePrimary), _Colors.colorsThemeSecondary), _Colors.colorsThemeNeutral), _Colors.colorsThemeInfo), _Colors.colorsThemeError), _Colors.colorsThemeWarnig), _Colors.colorsThemeSuccess),
|
|
72
|
+
components: {
|
|
73
|
+
MuiAvatar: {
|
|
74
|
+
styleOverrides: {
|
|
75
|
+
root: {
|
|
76
|
+
width: 'var(--spacing56)',
|
|
77
|
+
height: 'var(--spacing56)'
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
MuiButton: {
|
|
82
|
+
styleOverrides: {
|
|
83
|
+
root: {
|
|
84
|
+
paddingTop: 'var(--spacing12)',
|
|
85
|
+
paddingBottom: 'var(--spacing12)',
|
|
86
|
+
paddingLeft: 'var(--spacing24)'
|
|
87
|
+
},
|
|
88
|
+
containedPrimary: {
|
|
89
|
+
paddingRight: 'var(--spacing16)'
|
|
90
|
+
},
|
|
91
|
+
outlinedPrimary: {
|
|
92
|
+
paddingRight: 'var(--spacing24)',
|
|
93
|
+
'&:hover': {
|
|
94
|
+
boxShadow: '0 0 0 1px var(--primary)'
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
textPrimary: {
|
|
98
|
+
paddingRight: 'var(--spacing24)',
|
|
99
|
+
'&:hover': {
|
|
100
|
+
backgroundColor: '#FFF',
|
|
101
|
+
boxShadow: '0 0 0 1px white, 0 2px 6px 2px rgba(0,0,0,0.38)'
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
startIcon: {
|
|
105
|
+
paddingRight: 'var(--spacing8)',
|
|
106
|
+
margin: '0'
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
exports.theme = theme;
|
|
@@ -17,33 +17,78 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
17
17
|
|
|
18
18
|
var Body = function Body() {
|
|
19
19
|
var cbxTheme = (0, _CouncilboxThemeContext.useCouncilboxTheme)();
|
|
20
|
-
console.log(cbxTheme);
|
|
21
20
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
22
|
-
color: "primary",
|
|
23
21
|
text: "texto",
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
variant: "primary",
|
|
23
|
+
disabled: true
|
|
24
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
25
|
+
style: {
|
|
26
|
+
padding: '1.5em'
|
|
27
|
+
}
|
|
28
|
+
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
29
|
+
text: "texto",
|
|
30
|
+
variant: "success",
|
|
31
|
+
loading: true
|
|
32
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
33
|
+
style: {
|
|
34
|
+
padding: '1.5em'
|
|
35
|
+
}
|
|
36
|
+
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
37
|
+
text: "texto",
|
|
38
|
+
variant: "primary"
|
|
39
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
+
style: {
|
|
41
|
+
padding: '1.5em'
|
|
42
|
+
}
|
|
43
|
+
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
44
|
+
text: "texto",
|
|
45
|
+
variant: "error"
|
|
46
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
47
|
+
style: {
|
|
48
|
+
padding: '1.5em'
|
|
28
49
|
}
|
|
29
50
|
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
30
|
-
color: "secondary",
|
|
31
51
|
text: "texto",
|
|
52
|
+
variant: "success"
|
|
53
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
54
|
+
style: {
|
|
55
|
+
padding: '1.5em'
|
|
56
|
+
}
|
|
57
|
+
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
58
|
+
text: "texto",
|
|
59
|
+
variant: "warning"
|
|
60
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
61
|
+
style: {
|
|
62
|
+
padding: '1.5em'
|
|
63
|
+
}
|
|
64
|
+
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
65
|
+
text: "texto",
|
|
66
|
+
variant: "tertiary",
|
|
32
67
|
onClick: function onClick() {
|
|
33
|
-
return cbxTheme.
|
|
34
|
-
|
|
35
|
-
|
|
68
|
+
return cbxTheme.setDarkMode(true);
|
|
69
|
+
}
|
|
70
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
71
|
+
style: {
|
|
72
|
+
padding: '1.5em'
|
|
36
73
|
}
|
|
74
|
+
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
75
|
+
text: "texto",
|
|
76
|
+
variant: "secondary",
|
|
77
|
+
icon: /*#__PURE__*/_react.default.createElement("i", {
|
|
78
|
+
className: "ri-save-line"
|
|
79
|
+
})
|
|
80
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
81
|
+
style: {
|
|
82
|
+
padding: '1.5em'
|
|
83
|
+
}
|
|
84
|
+
}), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
85
|
+
text: "texto",
|
|
86
|
+
variant: "secondary"
|
|
37
87
|
}));
|
|
38
88
|
};
|
|
39
89
|
|
|
40
90
|
var TestComponents = function TestComponents() {
|
|
41
|
-
return /*#__PURE__*/_react.default.createElement(_ThemeProvider.default,
|
|
42
|
-
colors: {
|
|
43
|
-
primary: '#000088',
|
|
44
|
-
secondary: '#ff0000'
|
|
45
|
-
}
|
|
46
|
-
}, /*#__PURE__*/_react.default.createElement(Body, null));
|
|
91
|
+
return /*#__PURE__*/_react.default.createElement(_ThemeProvider.default, null, /*#__PURE__*/_react.default.createElement(Body, null));
|
|
47
92
|
};
|
|
48
93
|
|
|
49
94
|
TestComponents.displayName = "TestComponents";
|
package/package.json
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@councilbox/councilbox-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"main": "dist/build-index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
7
7
|
"README.md"
|
|
8
8
|
],
|
|
9
9
|
"author": "Aarón Fuentes González <aaronfuentes86@gmail.com>",
|
|
10
|
+
"contributors": [
|
|
11
|
+
"Anxo Rodriguez <anxo.rodriguez@councilbox.com>",
|
|
12
|
+
"Lorena Vázquez <lorena.vazquez@councilbox.com>",
|
|
13
|
+
"Alexis Sierra <alexis.sierra@councilbox.com>"
|
|
14
|
+
],
|
|
10
15
|
"dependencies": {
|
|
11
16
|
"@emotion/react": "^11.7.1",
|
|
12
17
|
"@emotion/styled": "^11.6.0",
|
|
18
|
+
"@mui/icons-material": "^5.4.4",
|
|
13
19
|
"@mui/material": "^5.2.8",
|
|
14
20
|
"cross-env": "^7.0.3",
|
|
15
21
|
"prop-types": "^15.8.1",
|
|
22
|
+
"remixicon": "^2.5.0",
|
|
16
23
|
"web-vitals": "^2.1.0"
|
|
17
24
|
},
|
|
18
25
|
"scripts": {
|
|
@@ -77,13 +84,13 @@
|
|
|
77
84
|
"@storybook/addon-actions": "^6.4.13",
|
|
78
85
|
"@storybook/addon-essentials": "^6.4.13",
|
|
79
86
|
"@storybook/addon-links": "^6.4.13",
|
|
87
|
+
"@storybook/addon-storyshots": "^6.4.13",
|
|
80
88
|
"@storybook/addons": "^6.4.13",
|
|
81
89
|
"@storybook/builder-webpack5": "^6.4.13",
|
|
82
90
|
"@storybook/manager-webpack5": "^6.4.13",
|
|
83
91
|
"@storybook/node-logger": "^6.4.13",
|
|
84
92
|
"@storybook/preset-create-react-app": "^4.0.0",
|
|
85
93
|
"@storybook/react": "^6.4.13",
|
|
86
|
-
"@storybook/addon-storyshots": "^6.4.13",
|
|
87
94
|
"@storybook/theming": "^6.4.13",
|
|
88
95
|
"@testing-library/jest-dom": "^5.14.1",
|
|
89
96
|
"@testing-library/react": "^12.0.0",
|
package/dist/Button/Button.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
var Button = function Button(_ref) {
|
|
15
|
-
var label = _ref.label,
|
|
16
|
-
backgroundColor = _ref.backgroundColor,
|
|
17
|
-
onClick = _ref.onClick;
|
|
18
|
-
return /*#__PURE__*/_react.default.createElement("button", {
|
|
19
|
-
onClick: onClick,
|
|
20
|
-
style: backgroundColor && {
|
|
21
|
-
backgroundColor: backgroundColor
|
|
22
|
-
}
|
|
23
|
-
}, label);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
Button.propTypes = {
|
|
27
|
-
backgroundColor: _propTypes.default.string,
|
|
28
|
-
label: _propTypes.default.string.isRequired,
|
|
29
|
-
onClick: _propTypes.default.func
|
|
30
|
-
};
|
|
31
|
-
Button.defaultProps = {
|
|
32
|
-
backgroundColor: null,
|
|
33
|
-
onClick: undefined
|
|
34
|
-
};
|
|
35
|
-
var _default = Button;
|
|
36
|
-
exports.default = _default;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.Default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _Button = _interopRequireDefault(require("./Button"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
var _default = {
|
|
15
|
-
title: 'Example/Button',
|
|
16
|
-
component: _Button.default,
|
|
17
|
-
argTypes: {
|
|
18
|
-
backgroundColor: {
|
|
19
|
-
control: 'color'
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
exports.default = _default;
|
|
24
|
-
|
|
25
|
-
var Template = function Template(args) {
|
|
26
|
-
return /*#__PURE__*/_react.default.createElement(_Button.default, args);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
var Default = Template.bind({});
|
|
30
|
-
exports.Default = Default;
|
|
31
|
-
Default.args = {
|
|
32
|
-
label: 'My Button'
|
|
33
|
-
};
|
|
34
|
-
/*
|
|
35
|
-
|
|
36
|
-
export default {
|
|
37
|
-
title: 'Example/Button',
|
|
38
|
-
component: Button,
|
|
39
|
-
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
40
|
-
argTypes: {
|
|
41
|
-
backgroundColor: { control: 'color' },
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
// More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
|
|
46
|
-
const Template = (args) => <Button {...args} />;
|
|
47
|
-
|
|
48
|
-
export const Primary = Template.bind({});
|
|
49
|
-
// More on args: https://storybook.js.org/docs/react/writing-stories/args
|
|
50
|
-
Primary.args = {
|
|
51
|
-
primary: true,
|
|
52
|
-
label: 'Button',
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export const Secondary = Template.bind({});
|
|
56
|
-
Secondary.args = {
|
|
57
|
-
label: 'Button',
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export const Large = Template.bind({});
|
|
61
|
-
Large.args = {
|
|
62
|
-
size: 'large',
|
|
63
|
-
label: 'Button',
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export const Small = Template.bind({});
|
|
67
|
-
Small.args = {
|
|
68
|
-
size: 'small',
|
|
69
|
-
label: 'Button',
|
|
70
|
-
};
|
|
71
|
-
*/
|
package/dist/Button/button.css
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.storybook-button {
|
|
2
|
-
font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
3
|
-
font-weight: 700;
|
|
4
|
-
border: 0;
|
|
5
|
-
border-radius: 3em;
|
|
6
|
-
cursor: pointer;
|
|
7
|
-
display: inline-block;
|
|
8
|
-
line-height: 1;
|
|
9
|
-
}
|
|
10
|
-
.storybook-button--primary {
|
|
11
|
-
color: white;
|
|
12
|
-
background-color: #1ea7fd;
|
|
13
|
-
}
|
|
14
|
-
.storybook-button--secondary {
|
|
15
|
-
color: #333;
|
|
16
|
-
background-color: transparent;
|
|
17
|
-
box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
|
|
18
|
-
}
|
|
19
|
-
.storybook-button--small {
|
|
20
|
-
font-size: 12px;
|
|
21
|
-
padding: 10px 16px;
|
|
22
|
-
}
|
|
23
|
-
.storybook-button--medium {
|
|
24
|
-
font-size: 14px;
|
|
25
|
-
padding: 11px 20px;
|
|
26
|
-
}
|
|
27
|
-
.storybook-button--large {
|
|
28
|
-
font-size: 16px;
|
|
29
|
-
padding: 12px 24px;
|
|
30
|
-
}
|