@councilbox/councilbox-ui 0.1.0 → 0.1.1

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.
Files changed (42) hide show
  1. package/dist/HOCs/useWindowSize.js +8 -5
  2. package/dist/build-index.js +48 -0
  3. package/dist/components/Avatar/Avatar.js +1 -6
  4. package/dist/components/Button/Button.js +85 -21
  5. package/dist/components/Button/Button.stories.js +2 -1
  6. package/dist/components/Button/button.css +34 -6
  7. package/dist/components/ButtonBasic/ButtonBasic.css +3 -0
  8. package/dist/components/ButtonBasic/ButtonBasic.js +117 -0
  9. package/dist/components/ButtonBasic/ButtonBasic.stories.js +72 -0
  10. package/dist/components/DrawerPanel/DrawerPanel.css +33 -0
  11. package/dist/components/DrawerPanel/DrawerPanel.js +165 -0
  12. package/dist/components/DrawerPanel/DrawerPanel.stories.js +38 -0
  13. package/dist/components/DrawerPanel/DrawerPanelPrueba.js +52 -0
  14. package/dist/components/DropDown/DesignDropDown.stories.js +82 -0
  15. package/dist/components/DropDown/DropDown.css +0 -0
  16. package/dist/components/DropDown/DropDown.js +162 -0
  17. package/dist/components/DropDown/DropDown.stories.js +43 -0
  18. package/dist/components/Header/Header.js +235 -43
  19. package/dist/components/Header/Header.stories.js +31 -10
  20. package/dist/components/Header/header.css +121 -19
  21. package/dist/components/IconButton/IconButton.css +0 -0
  22. package/dist/components/IconButton/IconButton.js +72 -0
  23. package/dist/components/IconButton/IconButton.stories.js +27 -0
  24. package/dist/components/InputPassword/InputPassword.css +28 -0
  25. package/dist/components/InputPassword/InputPassword.js +37 -162
  26. package/dist/components/InputPassword/InputPassword.stories.js +33 -2
  27. package/dist/components/InputText/InputText.css +18 -0
  28. package/dist/components/InputText/InputText.js +71 -60
  29. package/dist/components/InputText/InputText.stories.js +26 -2
  30. package/dist/components/Modal/Modal.css +0 -0
  31. package/dist/components/Modal/Modal.js +166 -0
  32. package/dist/components/Modal/Modal.stories.js +49 -0
  33. package/dist/components/Spacing/Spacing.js +1 -1
  34. package/dist/components/TextInput/TextInput.css +12 -0
  35. package/dist/components/TextInput/TextInput.js +216 -0
  36. package/dist/components/TextInput/TextInput.stories.js +52 -0
  37. package/dist/components/ThemeProvider/Colors.js +24 -95
  38. package/dist/components/ThemeProvider/ThemeProvider.js +1 -1
  39. package/dist/components/Typography/Typography.js +7 -8
  40. package/dist/styles/main.css +21 -71
  41. package/dist/styles/stylesheet.js +6 -39
  42. package/package.json +1 -1
@@ -13,9 +13,7 @@ require("../../styles/main.css");
13
13
 
14
14
  var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
15
15
 
16
- var _CouncilboxThemeContext = require("../ThemeProvider/CouncilboxThemeContext");
17
-
18
- var _excluded = ["children", "styles", "variant", "fontWeight", "textAlign", "color", "secondaryFont"];
16
+ var _excluded = ["children", "styles", "variant", "fontWeight", "textAlign", "color", "secondaryFont", "component"];
19
17
 
20
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
19
 
@@ -94,19 +92,18 @@ var Typography = function Typography(_ref) {
94
92
  textAlign = _ref.textAlign,
95
93
  color = _ref.color,
96
94
  secondaryFont = _ref.secondaryFont,
95
+ component = _ref.component,
97
96
  props = _objectWithoutProperties(_ref, _excluded);
98
97
 
99
- var _useCouncilboxTheme = (0, _CouncilboxThemeContext.useCouncilboxTheme)(),
100
- theme = _useCouncilboxTheme.theme;
101
-
102
98
  return /*#__PURE__*/_react.default.createElement(_Typography.default, _extends({
103
99
  sx: _objectSpread(_objectSpread({}, stylesVariants[variant || 'M']), {}, {
104
- color: color || theme.colors.neutral600,
100
+ color: color || 'var(--gray5)',
105
101
  fontWeight: fontWeight || '400',
106
102
  textAlign: textAlign,
107
103
  fontFamily: secondaryFont && 'var(--font-secondary)'
108
104
  }, styles),
109
- variant: nameVariant[variant || 'M']
105
+ variant: nameVariant[variant || 'M'],
106
+ component: component
110
107
  }, props), children);
111
108
  };
112
109
 
@@ -118,6 +115,7 @@ Typography.propTypes = {
118
115
  children: _propTypes.default.string,
119
116
  fontWeight: _propTypes.default.string,
120
117
  textAlign: _propTypes.default.string,
118
+ component: _propTypes.default.string,
121
119
  secondaryFont: _propTypes.default.bool
122
120
  };
123
121
  Typography.defaultProps = {
@@ -127,6 +125,7 @@ Typography.defaultProps = {
127
125
  children: 'texto',
128
126
  fontWeight: '',
129
127
  textAlign: '',
128
+ component: '',
130
129
  secondaryFont: false
131
130
  };
132
131
  var _default = Typography;
@@ -4,77 +4,27 @@
4
4
  --font-primary: 'Lato', sans-serif;
5
5
  --font-secondary: 'Montserrat', sans-serif;
6
6
  --primary: #38398C;
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;
7
+ --secondary: #9B9BC5;
8
+ --accent: #6BEAF2;
9
+ --success: #128851;
10
+ --error: #D14642;
11
+ --info: #3B70D8;
12
+ --warnig: #EA7405;
13
+ --primary75: #6A6BA9;
14
+ --primary50: #9B9BC5;
15
+ --primary25: #CDCDE2;
16
+ --primary10: #ECECF4;
17
+ --accent75: #90F0F6;
18
+ --accent50: #B4F4F8;
19
+ --accent25: #DAFAFC;
20
+ --accent10: #F1FDFE;
21
+ --black: #000000;
22
+ --gray5: #333333;
23
+ --gray4: #595959;
24
+ --gray3: #767676;
25
+ --gray2: #CCCCCC;
26
+ --gray1: #EEEEEE;
27
+ --white: #FFFFFF;
78
28
  --spacing4: 0.25rem;
79
29
  --spacing8: 0.5rem;
80
30
  --spacing12: 0.75rem;
@@ -16,10 +16,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
16
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
17
 
18
18
  var defaultBreakpoints = {
19
- xs: 320,
20
- sm: 768,
21
- md: 1024,
22
- lg: 1440,
19
+ xs: 0,
20
+ sm: 600,
21
+ md: 960,
22
+ lg: 1280,
23
23
  xl: 1920
24
24
  };
25
25
  exports.defaultBreakpoints = defaultBreakpoints;
@@ -61,14 +61,14 @@ var theme = function theme() {
61
61
  }
62
62
  },
63
63
  spacing: [0, 4, 8, 16, 32, 64],
64
- palette: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
64
+ palette: {
65
65
  primary: {
66
66
  main: colors.primary || getPrimary()
67
67
  },
68
68
  secondary: {
69
69
  main: colors.secondary || getSecondary()
70
70
  }
71
- }, _Colors.colorsThemePrimary), _Colors.colorsThemeSecondary), _Colors.colorsThemeNeutral), _Colors.colorsThemeInfo), _Colors.colorsThemeError), _Colors.colorsThemeWarnig), _Colors.colorsThemeSuccess),
71
+ },
72
72
  components: {
73
73
  MuiAvatar: {
74
74
  styleOverrides: {
@@ -77,39 +77,6 @@ var theme = function theme() {
77
77
  height: 'var(--spacing56)'
78
78
  }
79
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
- '&:hover': {
91
- paddingRight: 'var(--spacing8)',
92
- transition: 'all .5s'
93
- }
94
- },
95
- outlinedPrimary: {
96
- paddingRight: 'var(--spacing24)',
97
- '&:hover': {
98
- boxShadow: '0 0 0 1px var(--primary)'
99
- }
100
- },
101
- textPrimary: {
102
- paddingRight: 'var(--spacing24)',
103
- '&:hover': {
104
- backgroundColor: '#FFF',
105
- boxShadow: '0 0 0 1px white, 0 2px 6px 2px rgba(0,0,0,0.38)'
106
- }
107
- },
108
- startIcon: {
109
- paddingRight: 'var(--spacing8)',
110
- margin: '0'
111
- }
112
- }
113
80
  }
114
81
  }
115
82
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@councilbox/councilbox-ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "main": "dist/build-index.js",
5
5
  "files": [
6
6
  "dist",