@councilbox/councilbox-ui 0.4.0 → 0.4.2
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/build-index.js +23 -7
- package/dist/components/1.Introduction.stories.mdx +50 -0
- package/dist/components/2.Changelog.stories.mdx +46 -0
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Accordion/Accordion.stories.js +4 -2
- package/dist/components/Alert/Alert.css +10 -0
- package/dist/components/Alert/Alert.js +134 -0
- package/dist/components/Alert/Alert.stories.js +38 -0
- package/dist/components/Avatar/Avatar.stories.js +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.stories.js +1 -1
- package/dist/components/Button/Button.stories.js +1 -1
- package/dist/components/ButtonBasic/ButtonBasic.stories.js +1 -1
- package/dist/components/Checkbox/Checkbox.css +1 -1
- package/dist/components/Checkbox/Checkbox.js +24 -16
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/DrawerPanel/DrawerPanel.stories.js +1 -1
- package/dist/components/DropDown/DropDown.stories.js +1 -1
- package/dist/components/Grid/Grid.stories.js +1 -1
- package/dist/components/Header/Header.stories.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/IconButtonSquare/IconButtonSquare.stories.js +1 -1
- package/dist/components/{FontCBX/FontCBX.css → IconFont/IconFont.css} +0 -0
- package/dist/components/IconFont/IconFont.js +100 -0
- package/dist/components/{FontCBX/FontCBX.stories.js → IconFont/IconFont.stories.js} +4 -4
- package/dist/components/InputAutocomplete/InputAutocomplete.css +0 -0
- package/dist/components/InputAutocomplete/InputAutocomplete.js +137 -0
- package/dist/components/InputAutocomplete/InputAutocomplete.stories.js +61 -0
- package/dist/components/InputPassword/InputPassword.stories.js +10 -2
- package/dist/components/InputText/InputText.css +2 -10
- package/dist/components/InputText/InputText.js +95 -59
- package/dist/components/InputText/InputText.stories.js +12 -3
- package/dist/components/MenuLateralLeft/MenuLateralLeft.stories.js +1 -1
- package/dist/components/MenuLateralRight/MenuLateralRight.stories.js +1 -1
- package/dist/components/Modal/Modal.js +15 -4
- package/dist/components/Modal/Modal.stories.js +1 -1
- package/dist/components/RadioButton/Radio.css +31 -0
- package/dist/components/RadioButton/Radio.js +67 -19
- package/dist/components/RadioButton/Radio.stories.js +1 -1
- package/dist/components/Scrollbar/Scrollbar.stories.js +1 -1
- package/dist/components/SelectInput/DesignSelectInput.js +2 -1
- package/dist/components/SelectInput/SelectInput.js +109 -56
- package/dist/components/SelectInput/SelectInput.stories.js +41 -4
- package/dist/components/Spacing/Spacing.stories.js +1 -1
- package/dist/components/Stars/Stars.js +1 -1
- package/dist/components/Stars/Stars.stories.js +1 -1
- package/dist/components/Tabs/Tabs.stories.js +1 -1
- package/dist/components/Tag/Tag.stories.js +1 -1
- package/dist/components/TextInput/TextInput.stories.js +1 -1
- package/dist/components/Toggle/Toggle.stories.js +1 -1
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/Typography/Typography.stories.js +1 -1
- package/dist/config.js +8 -0
- package/dist/fonts/IconNames.json +6848 -0
- package/dist/styles/styleFont.css +4626 -2342
- package/package.json +1 -1
- package/dist/components/FontCBX/FontCBX.js +0 -36
- package/dist/components/Introduction.stories.mdx +0 -211
|
@@ -7,19 +7,19 @@ exports.default = exports.Default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _IconFont = _interopRequireDefault(require("./IconFont"));
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
14
|
var _default = {
|
|
15
|
-
title: '
|
|
16
|
-
component:
|
|
15
|
+
title: 'Fonts/IconFont',
|
|
16
|
+
component: _IconFont.default,
|
|
17
17
|
argTypes: {}
|
|
18
18
|
};
|
|
19
19
|
exports.default = _default;
|
|
20
20
|
|
|
21
21
|
var Template = function Template(args) {
|
|
22
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement(_IconFont.default, args);
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
Template.displayName = "Template";
|
|
File without changes
|
|
@@ -0,0 +1,137 @@
|
|
|
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
|
+
require("../../styles/main.css");
|
|
13
|
+
|
|
14
|
+
var _Autocomplete = _interopRequireDefault(require("@mui/material/Autocomplete"));
|
|
15
|
+
|
|
16
|
+
require("./InputAutocomplete.css");
|
|
17
|
+
|
|
18
|
+
var _InputText = _interopRequireDefault(require("../InputText/InputText"));
|
|
19
|
+
|
|
20
|
+
var _excluded = ["width", "id", "className", "onChange", "label", "disabled", "error", "helper", "success", "helperText", "fullWidth", "sx", "endAdornment", "variant"];
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
+
|
|
24
|
+
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); }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
var top100Films = [{
|
|
37
|
+
label: 'The Shawshank Redemption',
|
|
38
|
+
year: 1994
|
|
39
|
+
}, {
|
|
40
|
+
label: 'The Godfather',
|
|
41
|
+
year: 1972
|
|
42
|
+
}, {
|
|
43
|
+
label: 'The Godfather: Part II',
|
|
44
|
+
year: 1974
|
|
45
|
+
}, {
|
|
46
|
+
label: 'The Dark Knight',
|
|
47
|
+
year: 2008
|
|
48
|
+
}, {
|
|
49
|
+
label: '12 Angry Men',
|
|
50
|
+
year: 1957
|
|
51
|
+
}, {
|
|
52
|
+
label: "Schindler's List",
|
|
53
|
+
year: 1993
|
|
54
|
+
}, {
|
|
55
|
+
label: 'Pulp Fiction',
|
|
56
|
+
year: 1994
|
|
57
|
+
}];
|
|
58
|
+
|
|
59
|
+
var InputAutocomplete = function InputAutocomplete(_ref) {
|
|
60
|
+
var width = _ref.width,
|
|
61
|
+
id = _ref.id,
|
|
62
|
+
className = _ref.className,
|
|
63
|
+
onChange = _ref.onChange,
|
|
64
|
+
label = _ref.label,
|
|
65
|
+
disabled = _ref.disabled,
|
|
66
|
+
error = _ref.error,
|
|
67
|
+
helper = _ref.helper,
|
|
68
|
+
success = _ref.success,
|
|
69
|
+
helperText = _ref.helperText,
|
|
70
|
+
fullWidth = _ref.fullWidth,
|
|
71
|
+
sx = _ref.sx,
|
|
72
|
+
endAdornment = _ref.endAdornment,
|
|
73
|
+
variant = _ref.variant,
|
|
74
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
75
|
+
|
|
76
|
+
return /*#__PURE__*/_react.default.createElement(_Autocomplete.default, _extends({
|
|
77
|
+
id: id,
|
|
78
|
+
className: className,
|
|
79
|
+
onChange: onChange,
|
|
80
|
+
disabled: disabled,
|
|
81
|
+
sx: _objectSpread({
|
|
82
|
+
minWidth: width || '15rem',
|
|
83
|
+
'&.MuiAutocomplete-root .MuiOutlinedInput-root': {
|
|
84
|
+
padding: '0'
|
|
85
|
+
},
|
|
86
|
+
'&.MuiAutocomplete-root .MuiFilledInput-root': {
|
|
87
|
+
paddingTop: '0',
|
|
88
|
+
paddingLeft: '0'
|
|
89
|
+
},
|
|
90
|
+
'&.MuiAutocomplete-root .MuiInput-root': {
|
|
91
|
+
paddingBottom: '0!important'
|
|
92
|
+
}
|
|
93
|
+
}, sx),
|
|
94
|
+
disablePortal: true,
|
|
95
|
+
freeSolo: true,
|
|
96
|
+
options: top100Films,
|
|
97
|
+
renderInput: function renderInput(params) {
|
|
98
|
+
return /*#__PURE__*/_react.default.createElement(_InputText.default, _extends({}, params, {
|
|
99
|
+
error: error,
|
|
100
|
+
label: label,
|
|
101
|
+
helper: helper,
|
|
102
|
+
success: success,
|
|
103
|
+
helperText: helperText,
|
|
104
|
+
endAdornment: endAdornment,
|
|
105
|
+
variant: variant,
|
|
106
|
+
fullWidth: fullWidth
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
109
|
+
}, props));
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
InputAutocomplete.displayName = "InputAutocomplete";
|
|
113
|
+
InputAutocomplete.propTypes = {
|
|
114
|
+
label: _propTypes.default.string,
|
|
115
|
+
helper: _propTypes.default.string,
|
|
116
|
+
width: _propTypes.default.string,
|
|
117
|
+
id: _propTypes.default.string,
|
|
118
|
+
className: _propTypes.default.string,
|
|
119
|
+
onChange: _propTypes.default.func,
|
|
120
|
+
disabled: _propTypes.default.bool,
|
|
121
|
+
error: _propTypes.default.node,
|
|
122
|
+
success: _propTypes.default.bool,
|
|
123
|
+
fullWidth: _propTypes.default.bool
|
|
124
|
+
};
|
|
125
|
+
InputAutocomplete.defaultProps = {
|
|
126
|
+
label: '',
|
|
127
|
+
helper: '',
|
|
128
|
+
width: '',
|
|
129
|
+
id: '',
|
|
130
|
+
className: '',
|
|
131
|
+
onChange: undefined,
|
|
132
|
+
disabled: false,
|
|
133
|
+
error: undefined,
|
|
134
|
+
fullWidth: false
|
|
135
|
+
};
|
|
136
|
+
var _default = InputAutocomplete;
|
|
137
|
+
exports.default = _default;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Success = exports.Helper = exports.Error = exports.Disabled = exports.Default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _InputAutocomplete = _interopRequireDefault(require("./InputAutocomplete"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
var _default = {
|
|
15
|
+
title: 'Components/Input Autocomplete',
|
|
16
|
+
component: _InputAutocomplete.default,
|
|
17
|
+
argTypes: {
|
|
18
|
+
variant: {
|
|
19
|
+
options: ['outlined', 'filled', 'standard'],
|
|
20
|
+
control: {
|
|
21
|
+
type: 'radio'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
exports.default = _default;
|
|
27
|
+
|
|
28
|
+
var Template = function Template(args) {
|
|
29
|
+
return /*#__PURE__*/_react.default.createElement(_InputAutocomplete.default, args);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
Template.displayName = "Template";
|
|
33
|
+
var Default = Template.bind({});
|
|
34
|
+
exports.Default = Default;
|
|
35
|
+
Default.args = {
|
|
36
|
+
variant: 'outlined'
|
|
37
|
+
};
|
|
38
|
+
var Helper = Template.bind({});
|
|
39
|
+
exports.Helper = Helper;
|
|
40
|
+
Helper.args = {
|
|
41
|
+
value: 'Occaecat',
|
|
42
|
+
helper: 'Helper'
|
|
43
|
+
};
|
|
44
|
+
var Success = Template.bind({});
|
|
45
|
+
exports.Success = Success;
|
|
46
|
+
Success.args = {
|
|
47
|
+
value: 'Occaecat',
|
|
48
|
+
success: true
|
|
49
|
+
};
|
|
50
|
+
var Disabled = Template.bind({});
|
|
51
|
+
exports.Disabled = Disabled;
|
|
52
|
+
Disabled.args = {
|
|
53
|
+
value: 'Occaecat',
|
|
54
|
+
disabled: true
|
|
55
|
+
};
|
|
56
|
+
var Error = Template.bind({});
|
|
57
|
+
exports.Error = Error;
|
|
58
|
+
Error.args = {
|
|
59
|
+
value: 'Occaecat',
|
|
60
|
+
error: 'Error'
|
|
61
|
+
};
|
|
@@ -12,9 +12,16 @@ var _InputPassword = _interopRequireDefault(require("./InputPassword"));
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
14
|
var _default = {
|
|
15
|
-
title: '
|
|
15
|
+
title: 'Components/Input Password',
|
|
16
16
|
component: _InputPassword.default,
|
|
17
|
-
argTypes: {
|
|
17
|
+
argTypes: {
|
|
18
|
+
variant: {
|
|
19
|
+
options: ['outlined', 'filled', 'standard'],
|
|
20
|
+
control: {
|
|
21
|
+
type: 'radio'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
18
25
|
};
|
|
19
26
|
exports.default = _default;
|
|
20
27
|
|
|
@@ -26,6 +33,7 @@ Template.displayName = "Template";
|
|
|
26
33
|
var Default = Template.bind({});
|
|
27
34
|
exports.Default = Default;
|
|
28
35
|
Default.args = {
|
|
36
|
+
variant: 'outlined',
|
|
29
37
|
label: 'password',
|
|
30
38
|
value: 'abc123.'
|
|
31
39
|
};
|
|
@@ -2,17 +2,9 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
}
|
|
5
|
-
.cbx-inputText-infoBtn {
|
|
6
|
-
margin-right: var(--spacing4);
|
|
7
|
-
height: 0.875rem;
|
|
8
|
-
line-height: 1.1;
|
|
9
|
-
font-size: 0.875rem;
|
|
10
|
-
}
|
|
11
5
|
|
|
12
6
|
.cbx-inputText-endAdornment {
|
|
13
7
|
margin-right: var(--spacing4);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
color: var(--success);
|
|
17
|
-
font-size: 1.188rem;
|
|
8
|
+
color: var(--gray3);
|
|
9
|
+
font-size: 1.25rem;
|
|
18
10
|
}
|
|
@@ -19,7 +19,7 @@ var _styled = _interopRequireDefault(require("@mui/material/styles/styled"));
|
|
|
19
19
|
|
|
20
20
|
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
21
21
|
|
|
22
|
-
var _excluded = ["id", "className", "onChange", "label", "disabled", "error", "helper", "success", "width", "helperText", "fullWidth", "sx"];
|
|
22
|
+
var _excluded = ["id", "className", "onChange", "label", "disabled", "error", "helper", "success", "width", "helperText", "fullWidth", "sx", "endAdornment", "variant"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -38,7 +38,7 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function () {
|
|
|
38
38
|
top: '1px'
|
|
39
39
|
},
|
|
40
40
|
'& .MuiInput-underline:after': {
|
|
41
|
-
borderBottomColor: 'var(--
|
|
41
|
+
borderBottomColor: 'var(--primary)',
|
|
42
42
|
borderWidth: '2px'
|
|
43
43
|
},
|
|
44
44
|
'& .MuiFormHelperText-root': {
|
|
@@ -46,22 +46,32 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function () {
|
|
|
46
46
|
marginLeft: '0px',
|
|
47
47
|
marginRight: '0px'
|
|
48
48
|
},
|
|
49
|
-
'& .MuiInputBase-input': {
|
|
49
|
+
'& .MuiOutlinedInput-input.MuiInputBase-input': {
|
|
50
50
|
height: '1.5rem',
|
|
51
51
|
lineHeight: 'var(--spacing12)',
|
|
52
|
-
padding: 'var(--spacing12)',
|
|
53
|
-
paddingRight: 'var(--spacing8)'
|
|
52
|
+
padding: 'var(--spacing12)!important',
|
|
53
|
+
paddingRight: 'var(--spacing8)!important'
|
|
54
54
|
},
|
|
55
|
-
'& .
|
|
55
|
+
'& .MuiFilledInput-input.MuiInputBase-input': {
|
|
56
|
+
height: '1.5rem',
|
|
57
|
+
lineHeight: 'var(--spacing12)',
|
|
58
|
+
padding: 'var(--spacing12)!important',
|
|
59
|
+
paddingRight: 'var(--spacing8)!important'
|
|
60
|
+
},
|
|
61
|
+
'& .MuiInputLabel-filled.MuiInputLabel-shrink': {
|
|
62
|
+
top: '-0.625rem'
|
|
63
|
+
},
|
|
64
|
+
'& .MuiInputLabel-outlined.MuiFormLabel-root:not(.MuiInputLabel-shrink)': {
|
|
56
65
|
top: '-0.25rem'
|
|
57
66
|
},
|
|
58
|
-
'& .Mui-error': {
|
|
67
|
+
'& label.Mui-error': {
|
|
59
68
|
color: 'var(--error)!important'
|
|
60
69
|
},
|
|
61
70
|
'& .MuiInputLabel-shrink': {
|
|
62
71
|
top: '1px'
|
|
63
72
|
},
|
|
64
73
|
'& .MuiOutlinedInput-notchedOutline': {
|
|
74
|
+
transition: '0.2s',
|
|
65
75
|
color: 'var(--gray5)',
|
|
66
76
|
paddingRight: 'var(--spacing8)',
|
|
67
77
|
'& fieldset': {
|
|
@@ -95,46 +105,24 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function () {
|
|
|
95
105
|
}
|
|
96
106
|
}
|
|
97
107
|
},
|
|
98
|
-
'& .MuiOutlinedInput-
|
|
99
|
-
'
|
|
100
|
-
borderColor: 'var(--error)'
|
|
101
|
-
},
|
|
102
|
-
'&:hover fieldset': {
|
|
103
|
-
borderColor: 'var(--error)',
|
|
104
|
-
borderWidth: '2px'
|
|
105
|
-
},
|
|
106
|
-
'&:active fieldset': {
|
|
107
|
-
borderColor: 'var(--error)',
|
|
108
|
-
borderWidth: '2px'
|
|
109
|
-
},
|
|
110
|
-
'&.Mui-focused fieldset': {
|
|
111
|
-
borderColor: 'var(--error)',
|
|
112
|
-
borderWidth: '2px'
|
|
113
|
-
},
|
|
114
|
-
'&:focus-visible': {
|
|
115
|
-
// falta revisar esto
|
|
116
|
-
borderColor: 'var(--gray4)',
|
|
117
|
-
borderWidth: '2px',
|
|
118
|
-
boxShadow: '0 0 0 3px white, 0 0 7px 4px var(--primary)'
|
|
119
|
-
}
|
|
108
|
+
'& .MuiOutlinedInput-root.Mui-disabled .MuiOutlinedInput-notchedOutline': {
|
|
109
|
+
border: '1px dashed var(--gray2)'
|
|
120
110
|
},
|
|
121
|
-
'& .MuiOutlinedInput-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
borderWidth: '1px'
|
|
137
|
-
}
|
|
111
|
+
'& .MuiOutlinedInput-input.Mui-disabled': {
|
|
112
|
+
color: 'var(--gray5)',
|
|
113
|
+
WebkitTextFillColor: 'unset'
|
|
114
|
+
},
|
|
115
|
+
'& .MuiInputLabel-root, .MuiInputBase-root.MuiOutlinedInput-root': {
|
|
116
|
+
color: 'var(--gray5)'
|
|
117
|
+
},
|
|
118
|
+
'& .MuiInputLabel-root.Mui-disabled': {
|
|
119
|
+
color: 'var(--gray3)'
|
|
120
|
+
},
|
|
121
|
+
'& .MuiFormHelperText-root.Mui-focused div h6': {
|
|
122
|
+
color: 'var(--primary)'
|
|
123
|
+
},
|
|
124
|
+
'& .MuiInput-input.MuiInputBase-input': {
|
|
125
|
+
paddingBottom: 'var(--spacing12)!important'
|
|
138
126
|
}
|
|
139
127
|
};
|
|
140
128
|
});
|
|
@@ -152,8 +140,60 @@ var InputText = function InputText(_ref) {
|
|
|
152
140
|
helperText = _ref.helperText,
|
|
153
141
|
fullWidth = _ref.fullWidth,
|
|
154
142
|
sx = _ref.sx,
|
|
143
|
+
endAdornment = _ref.endAdornment,
|
|
144
|
+
variant = _ref.variant,
|
|
155
145
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
156
146
|
|
|
147
|
+
var getIcon = function getIcon() {
|
|
148
|
+
var icon = /*#__PURE__*/_react.default.createElement("i", {
|
|
149
|
+
className: "cbx-inputText-endAdornment ".concat(endAdornment)
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
if (success) {
|
|
153
|
+
icon = /*#__PURE__*/_react.default.createElement("i", {
|
|
154
|
+
className: "cbx-inputText-endAdornment ri-check-line",
|
|
155
|
+
style: {
|
|
156
|
+
color: 'var(--success)'
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (error) {
|
|
162
|
+
icon = /*#__PURE__*/_react.default.createElement("i", {
|
|
163
|
+
className: 'cbx-inputText-endAdornment ri-information-line',
|
|
164
|
+
style: {
|
|
165
|
+
color: 'var(--error)'
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (helper) {
|
|
171
|
+
icon = /*#__PURE__*/_react.default.createElement("i", {
|
|
172
|
+
className: 'cbx-inputText-endAdornment ri-information-line'
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return icon;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
var getVariant = function getVariant() {
|
|
180
|
+
var variantInput = 'outlined';
|
|
181
|
+
|
|
182
|
+
if (variant === 'outlined') {
|
|
183
|
+
variantInput = variant;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if (variant === 'filled') {
|
|
187
|
+
variantInput = variant;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (variant === 'standard') {
|
|
191
|
+
variantInput = variant;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return variantInput;
|
|
195
|
+
};
|
|
196
|
+
|
|
157
197
|
return /*#__PURE__*/_react.default.createElement(CssTextField, _extends({
|
|
158
198
|
id: id,
|
|
159
199
|
className: className,
|
|
@@ -167,6 +207,7 @@ var InputText = function InputText(_ref) {
|
|
|
167
207
|
},
|
|
168
208
|
sx: sx
|
|
169
209
|
},
|
|
210
|
+
variant: getVariant(),
|
|
170
211
|
label: label,
|
|
171
212
|
fullWidth: fullWidth,
|
|
172
213
|
onChange: onChange,
|
|
@@ -174,24 +215,17 @@ var InputText = function InputText(_ref) {
|
|
|
174
215
|
error: error,
|
|
175
216
|
helperText: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, helperText, error ? /*#__PURE__*/_react.default.createElement("div", {
|
|
176
217
|
className: "cbx-inputText-items-center"
|
|
177
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
178
|
-
className: 'cbx-inputText-infoBtn ri-information-line',
|
|
179
|
-
color: 'var(--error)'
|
|
180
|
-
}), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
218
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
181
219
|
variant: "XS",
|
|
182
|
-
color: 'var(--error)'
|
|
220
|
+
color: 'var(--error)!important'
|
|
183
221
|
}, error)) : helper && /*#__PURE__*/_react.default.createElement("div", {
|
|
184
222
|
className: "cbx-inputText-items-center"
|
|
185
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
186
|
-
className: 'cbx-inputText-infoBtn ri-information-line'
|
|
187
|
-
}), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
223
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
188
224
|
color: !disabled ? 'var(--gray4)' : 'var(--gray3)',
|
|
189
225
|
variant: "XS"
|
|
190
226
|
}, helper))),
|
|
191
227
|
InputProps: {
|
|
192
|
-
endAdornment:
|
|
193
|
-
className: "cbx-inputText-endAdornment ri-check-line"
|
|
194
|
-
})
|
|
228
|
+
endAdornment: getIcon()
|
|
195
229
|
}
|
|
196
230
|
}, props));
|
|
197
231
|
};
|
|
@@ -206,7 +240,8 @@ InputText.propTypes = {
|
|
|
206
240
|
onChange: _propTypes.default.func,
|
|
207
241
|
disabled: _propTypes.default.bool,
|
|
208
242
|
error: _propTypes.default.node,
|
|
209
|
-
success: _propTypes.default.bool
|
|
243
|
+
success: _propTypes.default.bool,
|
|
244
|
+
fullWidth: _propTypes.default.bool
|
|
210
245
|
};
|
|
211
246
|
InputText.defaultProps = {
|
|
212
247
|
label: '',
|
|
@@ -216,7 +251,8 @@ InputText.defaultProps = {
|
|
|
216
251
|
className: '',
|
|
217
252
|
onChange: undefined,
|
|
218
253
|
disabled: false,
|
|
219
|
-
error: undefined
|
|
254
|
+
error: undefined,
|
|
255
|
+
fullWidth: false
|
|
220
256
|
};
|
|
221
257
|
var _default = InputText;
|
|
222
258
|
exports.default = _default;
|
|
@@ -12,9 +12,16 @@ var _InputText = _interopRequireDefault(require("./InputText"));
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
14
|
var _default = {
|
|
15
|
-
title: '
|
|
15
|
+
title: 'Components/InputText',
|
|
16
16
|
component: _InputText.default,
|
|
17
|
-
argTypes: {
|
|
17
|
+
argTypes: {
|
|
18
|
+
variant: {
|
|
19
|
+
options: ['outlined', 'filled', 'standard'],
|
|
20
|
+
control: {
|
|
21
|
+
type: 'radio'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
18
25
|
};
|
|
19
26
|
exports.default = _default;
|
|
20
27
|
|
|
@@ -25,7 +32,9 @@ var Template = function Template(args) {
|
|
|
25
32
|
Template.displayName = "Template";
|
|
26
33
|
var Default = Template.bind({});
|
|
27
34
|
exports.Default = Default;
|
|
28
|
-
Default.args = {
|
|
35
|
+
Default.args = {
|
|
36
|
+
variant: 'outlined'
|
|
37
|
+
};
|
|
29
38
|
var Helper = Template.bind({});
|
|
30
39
|
exports.Helper = Helper;
|
|
31
40
|
Helper.args = {
|
|
@@ -14,7 +14,7 @@ var _MenuLateralLeft2 = _interopRequireDefault(require("./MenuLateralLeft.storie
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
16
|
var _default = {
|
|
17
|
-
title: '
|
|
17
|
+
title: 'Components/MenuLateralLeft',
|
|
18
18
|
component: _MenuLateralLeft.default
|
|
19
19
|
};
|
|
20
20
|
exports.default = _default;
|
|
@@ -14,7 +14,7 @@ var _MenuLateralRight2 = _interopRequireDefault(require("./MenuLateralRight.stor
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
16
|
var _default = {
|
|
17
|
-
title: '
|
|
17
|
+
title: 'Components/MenuLateralRight',
|
|
18
18
|
component: _MenuLateralRight.default
|
|
19
19
|
};
|
|
20
20
|
exports.default = _default;
|
|
@@ -21,18 +21,26 @@ var _ButtonBasic = _interopRequireDefault(require("../ButtonBasic/ButtonBasic"))
|
|
|
21
21
|
|
|
22
22
|
var _CouncilboxThemeContext = require("../ThemeProvider/CouncilboxThemeContext");
|
|
23
23
|
|
|
24
|
+
var _excluded = ["title", "fullWidth", "id", "fullScreen", "buttonAccept", "buttonCancel", "open", "requestClose", "loadingAction", "acceptAction", "cancelAction", "body", "hideAccept", "extraActions", "classNameDialog", "PaperProps", "widthModal", "actions", "sx"];
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
26
28
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
29
|
|
|
28
30
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
31
|
|
|
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
|
+
|
|
30
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; }
|
|
31
35
|
|
|
32
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; }
|
|
33
37
|
|
|
34
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; }
|
|
35
39
|
|
|
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; }
|
|
41
|
+
|
|
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; }
|
|
43
|
+
|
|
36
44
|
var Modal = function Modal(_ref) {
|
|
37
45
|
var title = _ref.title,
|
|
38
46
|
fullWidth = _ref.fullWidth,
|
|
@@ -52,7 +60,9 @@ var Modal = function Modal(_ref) {
|
|
|
52
60
|
classNameDialog = _ref.classNameDialog,
|
|
53
61
|
PaperProps = _ref.PaperProps,
|
|
54
62
|
widthModal = _ref.widthModal,
|
|
55
|
-
actions = _ref.actions
|
|
63
|
+
actions = _ref.actions,
|
|
64
|
+
sx = _ref.sx,
|
|
65
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
56
66
|
|
|
57
67
|
var _useCouncilboxTheme = (0, _CouncilboxThemeContext.useCouncilboxTheme)(),
|
|
58
68
|
size = _useCouncilboxTheme.size;
|
|
@@ -69,7 +79,7 @@ var Modal = function Modal(_ref) {
|
|
|
69
79
|
onClick: acceptAction
|
|
70
80
|
})));
|
|
71
81
|
|
|
72
|
-
return /*#__PURE__*/_react.default.createElement(_material.Dialog, {
|
|
82
|
+
return /*#__PURE__*/_react.default.createElement(_material.Dialog, _extends({
|
|
73
83
|
className: classNameDialog,
|
|
74
84
|
fullWidth: size === 'sm' || fullWidth,
|
|
75
85
|
fullScreen: fullScreen,
|
|
@@ -81,8 +91,9 @@ var Modal = function Modal(_ref) {
|
|
|
81
91
|
style: _objectSpread(_objectSpread(_objectSpread({}, widthModal), PaperProps ? PaperProps.style : {}), size === 'sm' ? {
|
|
82
92
|
margin: 0
|
|
83
93
|
} : {})
|
|
84
|
-
}
|
|
85
|
-
|
|
94
|
+
},
|
|
95
|
+
sx: sx
|
|
96
|
+
}, props), !!title && /*#__PURE__*/_react.default.createElement(_material.DialogTitle, {
|
|
86
97
|
component: 'span',
|
|
87
98
|
sx: {
|
|
88
99
|
padding: '1.5rem'
|
|
@@ -12,7 +12,7 @@ var _Modal = _interopRequireDefault(require("./Modal"));
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
14
|
var _default = {
|
|
15
|
-
title: '
|
|
15
|
+
title: 'Components/Modal',
|
|
16
16
|
component: _Modal.default,
|
|
17
17
|
argTypes: {
|
|
18
18
|
title: {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.cbx-radio-container {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.cbx-radio-container:hover:before {
|
|
6
|
+
animation: ripple .6s ease;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.cbx-radio-container:before {
|
|
10
|
+
content: "";
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
background-color: var(--accent25);
|
|
17
|
+
border-radius: 50%;
|
|
18
|
+
transform: scale(0);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@keyframes ripple {
|
|
22
|
+
from {
|
|
23
|
+
transform: scale(0);
|
|
24
|
+
opacity: 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
to {
|
|
28
|
+
transform: scale(2.1);
|
|
29
|
+
opacity: .6;
|
|
30
|
+
}
|
|
31
|
+
}
|