@councilbox/councilbox-ui 0.0.9 → 0.0.10

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.
@@ -17,7 +17,9 @@ require("./button.css");
17
17
 
18
18
  var _CircularProgress = _interopRequireDefault(require("@mui/material/CircularProgress"));
19
19
 
20
- var _excluded = ["id", "text", "onClick", "disabled", "loading", "variant", "fullWidth", "icon"];
20
+ var _Typography = _interopRequireDefault(require("../Typography/Typography"));
21
+
22
+ var _excluded = ["id", "text", "onClick", "disabled", "loading", "variant", "fullWidth", "icon", "variantText"];
21
23
 
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
25
 
@@ -42,6 +44,7 @@ var Button = function Button(_ref) {
42
44
  variant = _ref.variant,
43
45
  fullWidth = _ref.fullWidth,
44
46
  icon = _ref.icon,
47
+ variantText = _ref.variantText,
45
48
  props = _objectWithoutProperties(_ref, _excluded);
46
49
 
47
50
  var buttonVariant;
@@ -83,7 +86,8 @@ var Button = function Button(_ref) {
83
86
  minWidth: !isSecondaryOrTernary(variant) ? '140px' : '100px',
84
87
  minHeight: '48px',
85
88
  boxShadow: 'none',
86
- letterSpacing: '1px'
89
+ letterSpacing: '1px',
90
+ lineHeight: 'normal'
87
91
  },
88
92
  className: "cbx-button ".concat(isSecondaryOrTernary(variant) && disabled ? 'cbx-button-outlined-disabled' : '', " ").concat(buttonVariant, " ").concat(icon ? 'cbx-button-with-icon' : '', " ").concat(!isSecondaryOrTernary(variant) && "cbx-button-hoverAndAnimation".concat(fullWidth ? '-fullWidth' : '')),
89
93
  disabled: loading || disabled,
@@ -101,8 +105,9 @@ var Button = function Button(_ref) {
101
105
  startIcon: icon && icon === 'arrow' ? /*#__PURE__*/_react.default.createElement("i", {
102
106
  className: "ri-arrow-left-s-line"
103
107
  }) : icon
104
- }, props), /*#__PURE__*/_react.default.createElement("span", {
105
- className: "button-text"
108
+ }, props), /*#__PURE__*/_react.default.createElement(_Typography.default, {
109
+ color: buttonColor,
110
+ variant: variantText
106
111
  }, text), buttonVariant === 'contained' && !loading && /*#__PURE__*/_react.default.createElement("span", {
107
112
  className: "cbx-button-containerArrow"
108
113
  }, /*#__PURE__*/_react.default.createElement("i", {
@@ -129,7 +134,8 @@ Button.propTypes = {
129
134
  loading: _propTypes.default.bool,
130
135
  variant: _propTypes.default.string,
131
136
  fullWidth: _propTypes.default.bool,
132
- icon: _propTypes.default.node
137
+ icon: _propTypes.default.node,
138
+ variantText: _propTypes.default.string
133
139
  };
134
140
  Button.defaultProps = {
135
141
  backgroundColor: null,
@@ -139,7 +145,8 @@ Button.defaultProps = {
139
145
  loading: false,
140
146
  variant: 'primary',
141
147
  fullWidth: false,
142
- icon: null
148
+ icon: null,
149
+ variantText: ''
143
150
  };
144
151
  var _default = Button;
145
152
  exports.default = _default;
@@ -7,20 +7,18 @@
7
7
  margin-bottom: var(--spacing4);
8
8
 
9
9
  }
10
+
10
11
  .cbx-inputPassword-validation > div {
11
12
  height: var(--spacing8);
12
13
  border-radius: 20px;
13
14
  transition: all .5s;
14
15
  }
15
16
 
16
-
17
- .cbx-inputPassword-icon-button {
17
+ .cbx-inputPassword-icon-button, .cbx-inputPassword-icon-size {
18
+ width: var(--spacing24);
19
+ height: var(--spacing24);
20
+ border: none;
18
21
  outline: none;
19
- width: var(--spacing24);
20
- height: var(--spacing24);
21
22
 
22
23
  }
23
- .cbx-inputPassword-icon-size {
24
- width: var(--spacing24);
25
- height: var(--spacing24);
26
- }
24
+
@@ -86,10 +86,6 @@ var InputPassword = function InputPassword(_ref) {
86
86
  id: id,
87
87
  fullWidth: fullWidth,
88
88
  className: className,
89
- sx: {
90
- width: width || '240px',
91
- height: '48px'
92
- },
93
89
  label: label,
94
90
  onChange: onChange,
95
91
  disabled: disabled,
@@ -4,7 +4,6 @@
4
4
  }
5
5
  .cbx-inputText-infoBtn {
6
6
  margin-right: var(--spacing4);
7
- color: var(--error600);
8
7
  height: 14px;
9
8
  line-height: 1.1;
10
9
  font-size: 14px;
@@ -155,9 +155,12 @@ var InputText = function InputText(_ref2) {
155
155
 
156
156
  return /*#__PURE__*/_react.default.createElement(CssTextField, _extends({
157
157
  id: id,
158
+ style: {
159
+ height: 'auto'
160
+ },
158
161
  className: className,
159
162
  sx: {
160
- width: width || '240px',
163
+ minWidth: width || '240px',
161
164
  height: '48px'
162
165
  },
163
166
  label: label,
@@ -165,10 +168,11 @@ var InputText = function InputText(_ref2) {
165
168
  onChange: onChange,
166
169
  disabled: disabled,
167
170
  error: error,
168
- helperText: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, helperText && !error && helperText, error ? /*#__PURE__*/_react.default.createElement("div", {
171
+ helperText: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, helperText, error ? /*#__PURE__*/_react.default.createElement("div", {
169
172
  className: "cbx-inputText-items-center"
170
173
  }, /*#__PURE__*/_react.default.createElement("i", {
171
- className: 'cbx-inputText-infoBtn ri-information-line'
174
+ className: 'cbx-inputText-infoBtn ri-information-line',
175
+ color: 'var(--error600)'
172
176
  }), /*#__PURE__*/_react.default.createElement(_Typography.default, {
173
177
  variant: "XS",
174
178
  color: 'var(--error600)'
@@ -208,8 +212,7 @@ InputText.defaultProps = {
208
212
  className: '',
209
213
  onChange: undefined,
210
214
  disabled: false,
211
- error: '',
212
- success: false
215
+ error: ''
213
216
  };
214
217
  var _default = InputText;
215
218
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@councilbox/councilbox-ui",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "main": "dist/build-index.js",
5
5
  "files": [
6
6
  "dist",