@councilbox/councilbox-ui 0.5.1 → 0.5.3
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/components/1.Introduction.stories.mdx +1 -1
- package/dist/components/2.Changelog.stories.mdx +12 -0
- package/dist/components/FabButton/FabButton.js +4 -2
- package/dist/components/InputText/InputText.js +13 -9
- package/dist/components/SelectInput/DesignSelectInput.js +6 -3
- package/dist/components/SelectInput/SelectInput.js +44 -14
- package/package.json +1 -1
|
@@ -26,6 +26,18 @@ a.noStyles:hover{
|
|
|
26
26
|
|
|
27
27
|
descargar las fuentes y probarlas, no usar @import, meterlas en css descargadas
|
|
28
28
|
</div>
|
|
29
|
+
<h2>v0.5.3</h2>
|
|
30
|
+
<div>Add prop tooltip FabButton</div>
|
|
31
|
+
<div>Fix estilos Inputs</div>
|
|
32
|
+
|
|
33
|
+
<h2>v0.5.2</h2>
|
|
34
|
+
<div>Add prop tooltip FabButton</div>
|
|
35
|
+
<div>Fix estilos SelectInput</div>
|
|
36
|
+
|
|
37
|
+
<h2>v0.5.1</h2>
|
|
38
|
+
<div>Add props FabButton</div>
|
|
39
|
+
<div>Fix estilos InputText</div>
|
|
40
|
+
|
|
29
41
|
<h2>v0.5.0</h2>
|
|
30
42
|
<div>Add FabButton</div>
|
|
31
43
|
<div>Fix Width en inputAutocomplete</div>
|
|
@@ -17,7 +17,7 @@ var _DropDown = _interopRequireDefault(require("../DropDown/DropDown"));
|
|
|
17
17
|
|
|
18
18
|
var _IconButton = _interopRequireDefault(require("../IconButton/IconButton"));
|
|
19
19
|
|
|
20
|
-
var _excluded = ["items", "onClick", "onlyButton", "icon", "propsButton", "backgroundColor", "hoverColor", "placementTooltip", "disabled"];
|
|
20
|
+
var _excluded = ["items", "onClick", "onlyButton", "icon", "propsButton", "backgroundColor", "hoverColor", "placementTooltip", "disabled", "tooltip"];
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
@@ -37,6 +37,7 @@ var FabButton = function FabButton(_ref) {
|
|
|
37
37
|
hoverColor = _ref.hoverColor,
|
|
38
38
|
placementTooltip = _ref.placementTooltip,
|
|
39
39
|
disabled = _ref.disabled,
|
|
40
|
+
tooltip = _ref.tooltip,
|
|
40
41
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
41
42
|
|
|
42
43
|
var button = function button() {
|
|
@@ -49,7 +50,8 @@ var FabButton = function FabButton(_ref) {
|
|
|
49
50
|
backgroundColor: backgroundColor,
|
|
50
51
|
hoverColor: hoverColor,
|
|
51
52
|
placementTooltip: placementTooltip,
|
|
52
|
-
disabled: disabled
|
|
53
|
+
disabled: disabled,
|
|
54
|
+
tooltip: tooltip
|
|
53
55
|
}, propsButton));
|
|
54
56
|
};
|
|
55
57
|
|
|
@@ -41,7 +41,7 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function () {
|
|
|
41
41
|
color: 'var(--primary)',
|
|
42
42
|
borderWidth: '0px!important',
|
|
43
43
|
background: 'white!important',
|
|
44
|
-
transform: 'translate(0
|
|
44
|
+
transform: 'translate(0 ,-0.625rem) scale(0.75)!important'
|
|
45
45
|
},
|
|
46
46
|
'& .MuiInput-underline:after': {
|
|
47
47
|
borderColor: 'var(--primary)',
|
|
@@ -62,32 +62,35 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function () {
|
|
|
62
62
|
'& input.MuiOutlinedInput-input.MuiInputBase-input': {
|
|
63
63
|
height: '1.5rem',
|
|
64
64
|
lineHeight: 'var(--spacing12)',
|
|
65
|
-
padding: 'var(--spacing12)!important',
|
|
65
|
+
padding: 'var(--spacing12) var(--spacing12) var(--spacing12) var(--spacing12)!important',
|
|
66
66
|
paddingRight: 'var(--spacing8)!important'
|
|
67
67
|
},
|
|
68
68
|
'& input.MuiFilledInput-input.MuiInputBase-input': {
|
|
69
69
|
height: '1.5rem',
|
|
70
70
|
lineHeight: 'var(--spacing12)',
|
|
71
|
-
padding: 'var(--spacing12)!important',
|
|
71
|
+
padding: 'var(--spacing12) var(--spacing12) var(--spacing12) 0!important',
|
|
72
72
|
paddingRight: 'var(--spacing8)!important'
|
|
73
73
|
},
|
|
74
74
|
'& .MuiInputLabel-filled.MuiInputLabel-shrink': {
|
|
75
|
-
transform: 'translate(0
|
|
75
|
+
transform: 'translate(0 ,-0.625rem) scale(0.75)!important'
|
|
76
76
|
},
|
|
77
77
|
'& .MuiInputLabel-outlined.MuiFormLabel-root:not(.MuiInputLabel-shrink)': {
|
|
78
|
-
transform: 'translate(0.875rem,0.75rem) scale(1)!important'
|
|
78
|
+
transform: 'translate(0.875rem ,0.75rem) scale(1)!important'
|
|
79
|
+
},
|
|
80
|
+
'& .MuiInputLabel-outlined.MuiFormLabel-root.MuiInputLabel-shrink': {
|
|
81
|
+
transform: 'translate(0.875rem ,-0.625rem) scale(0.75)!important'
|
|
79
82
|
},
|
|
80
83
|
'& .MuiFormLabel-root.MuiInputLabel-root.MuiInputLabel-formControl.MuiInputLabel-animated.MuiInputLabel-filled:not(.MuiInputLabel-shrink)': {
|
|
81
|
-
transform: 'translate(0
|
|
84
|
+
transform: 'translate(0 ,0.75rem) scale(1)!important'
|
|
82
85
|
},
|
|
83
86
|
'& .MuiFormLabel-root.MuiInputLabel-root.MuiInputLabel-formControl.MuiInputLabel-animated.MuiInputLabel-standard:not(.MuiInputLabel-shrink)': {
|
|
84
|
-
transform: 'translate(0
|
|
87
|
+
transform: 'translate(0 ,0.75rem) scale(1)!important'
|
|
85
88
|
},
|
|
86
89
|
'& label.Mui-error': {
|
|
87
90
|
color: 'var(--error)!important'
|
|
88
91
|
},
|
|
89
92
|
'& .MuiInputLabel-shrink': {
|
|
90
|
-
transform: 'translate(0
|
|
93
|
+
transform: 'translate(0 ,-0.625rem) scale(0.75)!important'
|
|
91
94
|
},
|
|
92
95
|
'& .MuiOutlinedInput-notchedOutline': {
|
|
93
96
|
transition: '0.2s',
|
|
@@ -147,7 +150,7 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function () {
|
|
|
147
150
|
'& .MuiInput-input.MuiInputBase-input': {
|
|
148
151
|
height: '1.5rem',
|
|
149
152
|
lineHeight: 'var(--spacing12)',
|
|
150
|
-
padding: 'var(--spacing12)!important',
|
|
153
|
+
padding: 'var(--spacing12) var(--spacing12) var(--spacing12) 0!important',
|
|
151
154
|
paddingRight: 'var(--spacing8)!important'
|
|
152
155
|
},
|
|
153
156
|
'& input.MuiInputBase-root.MuiOutlinedInput-root': {
|
|
@@ -270,6 +273,7 @@ var InputText = function InputText(_ref) {
|
|
|
270
273
|
className: className,
|
|
271
274
|
sx: _objectSpread({
|
|
272
275
|
minWidth: width || '15rem',
|
|
276
|
+
width: width || '',
|
|
273
277
|
minHeight: '3rem',
|
|
274
278
|
'& .MuiOutlinedInput-notchedOutline': {
|
|
275
279
|
'& legend': {
|
|
@@ -39,20 +39,23 @@ var DesignSelectInput = function DesignSelectInput() {
|
|
|
39
39
|
style: {
|
|
40
40
|
display: 'flex'
|
|
41
41
|
}
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
+
style: {
|
|
44
|
+
marginRight: '4px'
|
|
45
|
+
}
|
|
42
46
|
}, /*#__PURE__*/_react.default.createElement(_SelectInput.default, {
|
|
43
47
|
label: 'Majority Type',
|
|
44
48
|
onChange: function onChange(e) {
|
|
45
49
|
return setItem(e.target.value);
|
|
46
50
|
},
|
|
47
|
-
value: item //
|
|
48
|
-
// error={'hola esto es un error '}
|
|
51
|
+
value: item // variant={'filled'}
|
|
49
52
|
|
|
50
53
|
}, majorityTypes.map(function (type) {
|
|
51
54
|
return /*#__PURE__*/_react.default.createElement(_material.MenuItem, {
|
|
52
55
|
key: type,
|
|
53
56
|
value: type
|
|
54
57
|
}, type);
|
|
55
|
-
}))));
|
|
58
|
+
})))));
|
|
56
59
|
};
|
|
57
60
|
|
|
58
61
|
var _default = DesignSelectInput;
|
|
@@ -25,12 +25,18 @@ var _styled = _interopRequireDefault(require("@mui/material/styles/styled"));
|
|
|
25
25
|
|
|
26
26
|
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
27
27
|
|
|
28
|
-
var _excluded = ["id", "className", "onChange", "label", "disabled", "width", "fullWidth", "children", "error", "helperText", "helper", "variant", "endAdornment", "success"];
|
|
28
|
+
var _excluded = ["id", "className", "onChange", "label", "disabled", "width", "fullWidth", "children", "error", "helperText", "helper", "variant", "endAdornment", "success", "sx", "sxFormControl", "propsFormControl"];
|
|
29
29
|
|
|
30
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
31
|
|
|
32
32
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
33
33
|
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
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; }
|
|
37
|
+
|
|
38
|
+
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; }
|
|
39
|
+
|
|
34
40
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
35
41
|
|
|
36
42
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -104,16 +110,22 @@ var CssSelect = (0, _styled.default)(_Select.default)(function () {
|
|
|
104
110
|
color: 'var(--gray5)'
|
|
105
111
|
},
|
|
106
112
|
'&.MuiFilledInput-root .MuiSelect-nativeInput': {
|
|
107
|
-
height: '
|
|
113
|
+
height: '3rem',
|
|
108
114
|
lineHeight: 'var(--spacing12)',
|
|
109
115
|
padding: 'var(--spacing12)',
|
|
110
116
|
paddingRight: 'var(--spacing8)'
|
|
111
117
|
},
|
|
112
118
|
'& .MuiSelect-filled.MuiFilledInput-input': {
|
|
113
|
-
paddingTop: 'var(--spacing12)'
|
|
119
|
+
paddingTop: 'var(--spacing12)',
|
|
120
|
+
padding: 'var(--spacing12) var(--spacing12) var(--spacing12) 0!important'
|
|
114
121
|
},
|
|
115
122
|
'& .MuiSelect-select.MuiSelect-standard': {
|
|
116
|
-
paddingBottom: 'var(--spacing12)'
|
|
123
|
+
paddingBottom: 'var(--spacing12)',
|
|
124
|
+
padding: 'var(--spacing12) var(--spacing12) var(--spacing12) 0!important',
|
|
125
|
+
paddingRight: 'var(--spacing8)!important'
|
|
126
|
+
},
|
|
127
|
+
'&.MuiInputBase-root': {
|
|
128
|
+
marginTop: '0'
|
|
117
129
|
}
|
|
118
130
|
};
|
|
119
131
|
});
|
|
@@ -133,6 +145,9 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
133
145
|
variant = _ref.variant,
|
|
134
146
|
endAdornment = _ref.endAdornment,
|
|
135
147
|
success = _ref.success,
|
|
148
|
+
sx = _ref.sx,
|
|
149
|
+
sxFormControl = _ref.sxFormControl,
|
|
150
|
+
propsFormControl = _ref.propsFormControl,
|
|
136
151
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
137
152
|
|
|
138
153
|
var getIcon = function getIcon() {
|
|
@@ -185,20 +200,18 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
185
200
|
return variantInput;
|
|
186
201
|
};
|
|
187
202
|
|
|
188
|
-
return /*#__PURE__*/_react.default.createElement(_FormControl.default, {
|
|
203
|
+
return /*#__PURE__*/_react.default.createElement(_FormControl.default, _extends({
|
|
189
204
|
fullWidth: fullWidth,
|
|
190
|
-
sx: {
|
|
205
|
+
sx: _objectSpread({
|
|
191
206
|
minWidth: width || '15rem',
|
|
207
|
+
width: width || '',
|
|
192
208
|
minHeight: '3rem'
|
|
193
|
-
}
|
|
194
|
-
}, label && /*#__PURE__*/_react.default.createElement(_InputLabel.default, {
|
|
209
|
+
}, sxFormControl)
|
|
210
|
+
}, propsFormControl), label && /*#__PURE__*/_react.default.createElement(_InputLabel.default, {
|
|
195
211
|
variant: getVariant(),
|
|
196
212
|
disabled: disabled,
|
|
197
213
|
error: error,
|
|
198
214
|
sx: {
|
|
199
|
-
'&.MuiInputLabel-outlined.MuiFormLabel-root:not(.MuiInputLabel-shrink)': {
|
|
200
|
-
top: '-0.25rem'
|
|
201
|
-
},
|
|
202
215
|
'&.MuiInputLabel-root': {
|
|
203
216
|
color: 'var(--gray5)'
|
|
204
217
|
},
|
|
@@ -213,21 +226,38 @@ var SelectInput = function SelectInput(_ref) {
|
|
|
213
226
|
color: 'var(--gray3)'
|
|
214
227
|
},
|
|
215
228
|
'&.MuiInputLabel-filled.MuiInputLabel-shrink': {
|
|
216
|
-
|
|
229
|
+
transform: 'translate(0 ,-0.625rem) scale(0.75)!important'
|
|
230
|
+
},
|
|
231
|
+
'&.MuiInputLabel-outlined.MuiFormLabel-root:not(.MuiInputLabel-shrink)': {
|
|
232
|
+
transform: 'translate(0.875rem ,0.75rem) scale(1)!important'
|
|
233
|
+
},
|
|
234
|
+
'&.MuiInputLabel-outlined.MuiFormLabel-root.MuiInputLabel-shrink': {
|
|
235
|
+
transform: 'translate(0.875rem ,-0.625rem) scale(0.75)!important'
|
|
236
|
+
},
|
|
237
|
+
'&.MuiFormLabel-root.MuiInputLabel-root.MuiInputLabel-formControl.MuiInputLabel-animated.MuiInputLabel-filled:not(.MuiInputLabel-shrink)': {
|
|
238
|
+
transform: 'translate(0 ,0.75rem) scale(1)!important'
|
|
239
|
+
},
|
|
240
|
+
'&.MuiFormLabel-root.MuiInputLabel-root.MuiInputLabel-formControl.MuiInputLabel-animated.MuiInputLabel-standard:not(.MuiInputLabel-shrink)': {
|
|
241
|
+
transform: 'translate(0 ,0.75rem) scale(1)!important'
|
|
242
|
+
},
|
|
243
|
+
'&.MuiInputLabel-shrink': {
|
|
244
|
+
transform: 'translate(0 ,-0.625rem) scale(0.75)!important'
|
|
217
245
|
}
|
|
218
246
|
}
|
|
219
247
|
}, label), /*#__PURE__*/_react.default.createElement(CssSelect, _extends({
|
|
220
248
|
id: id,
|
|
221
249
|
className: className,
|
|
222
|
-
sx: {
|
|
250
|
+
sx: _objectSpread({
|
|
223
251
|
minWidth: width || '15rem',
|
|
252
|
+
width: width || '',
|
|
224
253
|
maxHeight: '3rem',
|
|
254
|
+
height: '3rem',
|
|
225
255
|
'& .MuiOutlinedInput-notchedOutline': {
|
|
226
256
|
'& legend': {
|
|
227
257
|
width: label ? 'auto' : '0px'
|
|
228
258
|
}
|
|
229
259
|
}
|
|
230
|
-
},
|
|
260
|
+
}, sx),
|
|
231
261
|
variant: getVariant(),
|
|
232
262
|
label: label,
|
|
233
263
|
fullWidth: fullWidth,
|