@councilbox/councilbox-ui 0.1.1 → 0.1.4
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 +8 -0
- package/dist/components/Button/Button.js +9 -8
- package/dist/components/ButtonBasic/ButtonBasic.js +1 -3
- package/dist/components/DrawerPanel/{DrawerPanelPrueba.js → DesignDrawerPanel.js} +17 -4
- package/dist/components/DrawerPanel/DrawerPanel.css +15 -0
- package/dist/components/DrawerPanel/DrawerPanel.js +37 -4
- package/dist/components/DrawerPanel/DrawerPanel.stories.js +9 -8
- package/dist/components/DropDown/DropDown.css +3 -0
- package/dist/components/DropDown/DropDown.js +4 -7
- package/dist/components/DropDown/DropDown.stories.js +1 -10
- package/dist/components/Header/Header.js +32 -21
- package/dist/components/Header/Header.stories.js +1 -0
- package/dist/components/Header/header.css +0 -1
- package/dist/components/IconButton/DesignIconButton.stories.js +25 -0
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/IconButton/IconButton.stories.js +14 -7
- package/dist/components/InputPassword/InputPassword.js +3 -3
- package/dist/components/InputText/InputText.js +31 -32
- package/dist/components/MenuLateralRight/MenuLateralRight.css +0 -0
- package/dist/components/MenuLateralRight/MenuLateralRight.js +30 -0
- package/dist/components/MenuLateralRight/MenuLateralRight.stories.js +34 -0
- package/dist/components/Modal/Modal.js +5 -6
- package/dist/components/TextInput/TextInput.js +21 -21
- package/dist/components/ThemeProvider/Colors.js +1 -1
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/styles/main.css +1 -1
- package/package.json +1 -1
package/dist/build-index.js
CHANGED
|
@@ -81,6 +81,12 @@ Object.defineProperty(exports, "InputText", {
|
|
|
81
81
|
return _InputText.default;
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
|
+
Object.defineProperty(exports, "MenuLateralRight", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function get() {
|
|
87
|
+
return _MenuLateralRight.default;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
84
90
|
Object.defineProperty(exports, "Modal", {
|
|
85
91
|
enumerable: true,
|
|
86
92
|
get: function get() {
|
|
@@ -160,6 +166,8 @@ var _IconButton = _interopRequireDefault(require("./components/IconButton/IconBu
|
|
|
160
166
|
|
|
161
167
|
var _DropDown = _interopRequireDefault(require("./components/DropDown/DropDown"));
|
|
162
168
|
|
|
169
|
+
var _MenuLateralRight = _interopRequireDefault(require("./components/MenuLateralRight/MenuLateralRight"));
|
|
170
|
+
|
|
163
171
|
var _ThemeProvider = _interopRequireDefault(require("./components/ThemeProvider/ThemeProvider"));
|
|
164
172
|
|
|
165
173
|
var _CouncilboxThemeContext = require("./components/ThemeProvider/CouncilboxThemeContext");
|
|
@@ -21,7 +21,7 @@ var _styled = _interopRequireDefault(require("@mui/material/styles/styled"));
|
|
|
21
21
|
|
|
22
22
|
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
23
23
|
|
|
24
|
-
var _excluded = ["id", "text", "onClick", "disabled", "loading", "variant", "fullWidth", "icon", "variantText"];
|
|
24
|
+
var _excluded = ["id", "text", "onClick", "disabled", "loading", "variant", "fullWidth", "icon", "variantText", "stylesButton", "stylesText"];
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
@@ -77,6 +77,8 @@ var Button = function Button(_ref) {
|
|
|
77
77
|
fullWidth = _ref.fullWidth,
|
|
78
78
|
icon = _ref.icon,
|
|
79
79
|
variantText = _ref.variantText,
|
|
80
|
+
stylesButton = _ref.stylesButton,
|
|
81
|
+
stylesText = _ref.stylesText,
|
|
80
82
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
81
83
|
|
|
82
84
|
var buttonVariant;
|
|
@@ -97,7 +99,7 @@ var Button = function Button(_ref) {
|
|
|
97
99
|
buttonColor = 'var(--gray1)';
|
|
98
100
|
} else if (variant === 'warning') {
|
|
99
101
|
buttonVariant = 'contained';
|
|
100
|
-
background = 'var(--
|
|
102
|
+
background = 'var(--warning)';
|
|
101
103
|
buttonColor = 'var(--gray1)';
|
|
102
104
|
} else if (variant === 'success') {
|
|
103
105
|
buttonVariant = 'contained';
|
|
@@ -124,11 +126,11 @@ var Button = function Button(_ref) {
|
|
|
124
126
|
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' : '')),
|
|
125
127
|
disabled: loading || disabled,
|
|
126
128
|
variant: buttonVariant,
|
|
127
|
-
style: _objectSpread({
|
|
129
|
+
style: _objectSpread(_objectSpread({
|
|
128
130
|
backgroundColor: background,
|
|
129
131
|
color: buttonColor,
|
|
130
132
|
lineHeight: 'normal'
|
|
131
|
-
}, disabled || loading ? {
|
|
133
|
+
}, stylesButton), disabled || loading ? {
|
|
132
134
|
opacity: '0.4'
|
|
133
135
|
} : {}),
|
|
134
136
|
disableFocusRipple: true,
|
|
@@ -139,7 +141,8 @@ var Button = function Button(_ref) {
|
|
|
139
141
|
}) : icon
|
|
140
142
|
}, props), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
141
143
|
color: buttonColor,
|
|
142
|
-
variant: variantText
|
|
144
|
+
variant: variantText,
|
|
145
|
+
styles: _objectSpread({}, stylesText)
|
|
143
146
|
}, text), buttonVariant === 'contained' && !loading && /*#__PURE__*/_react.default.createElement("span", {
|
|
144
147
|
className: "cbx-button-containerArrow"
|
|
145
148
|
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
@@ -159,8 +162,7 @@ var Button = function Button(_ref) {
|
|
|
159
162
|
|
|
160
163
|
Button.displayName = "Button";
|
|
161
164
|
Button.propTypes = {
|
|
162
|
-
|
|
163
|
-
text: _propTypes.default.string.isRequired,
|
|
165
|
+
text: _propTypes.default.node,
|
|
164
166
|
onClick: _propTypes.default.func,
|
|
165
167
|
disabled: _propTypes.default.bool,
|
|
166
168
|
loading: _propTypes.default.bool,
|
|
@@ -170,7 +172,6 @@ Button.propTypes = {
|
|
|
170
172
|
variantText: _propTypes.default.string
|
|
171
173
|
};
|
|
172
174
|
Button.defaultProps = {
|
|
173
|
-
backgroundColor: null,
|
|
174
175
|
text: null,
|
|
175
176
|
onClick: undefined,
|
|
176
177
|
disabled: false,
|
|
@@ -92,8 +92,7 @@ var ButtonBasic = function ButtonBasic(_ref) {
|
|
|
92
92
|
|
|
93
93
|
ButtonBasic.displayName = "ButtonBasic";
|
|
94
94
|
ButtonBasic.propTypes = {
|
|
95
|
-
|
|
96
|
-
text: _propTypes.default.string.isRequired,
|
|
95
|
+
text: _propTypes.default.node,
|
|
97
96
|
onClick: _propTypes.default.func,
|
|
98
97
|
disabled: _propTypes.default.bool,
|
|
99
98
|
loading: _propTypes.default.bool,
|
|
@@ -103,7 +102,6 @@ ButtonBasic.propTypes = {
|
|
|
103
102
|
variantText: _propTypes.default.string
|
|
104
103
|
};
|
|
105
104
|
ButtonBasic.defaultProps = {
|
|
106
|
-
backgroundColor: null,
|
|
107
105
|
text: null,
|
|
108
106
|
onClick: undefined,
|
|
109
107
|
disabled: false,
|
|
@@ -23,7 +23,9 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
23
23
|
|
|
24
24
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var DesignDrawerPanel = function DesignDrawerPanel(_ref) {
|
|
27
|
+
var sizeContainer = _ref.sizeContainer;
|
|
28
|
+
|
|
27
29
|
var _React$useState = _react.default.useState(false),
|
|
28
30
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
29
31
|
open = _React$useState2[0],
|
|
@@ -43,10 +45,21 @@ var DrawerPanelPrueba = function DrawerPanelPrueba() {
|
|
|
43
45
|
return _requestClose(false);
|
|
44
46
|
},
|
|
45
47
|
buttonAccept: 'Guardar',
|
|
46
|
-
|
|
48
|
+
sizeContainer: sizeContainer,
|
|
49
|
+
bodyText: /*#__PURE__*/_react.default.createElement("div", null, "Contenido") // tabs={[
|
|
50
|
+
// {
|
|
51
|
+
// label: 'tab1',
|
|
52
|
+
// active: true
|
|
53
|
+
// },
|
|
54
|
+
// {
|
|
55
|
+
// label: 'tab2',
|
|
56
|
+
// active: false
|
|
57
|
+
// }
|
|
58
|
+
// ]}
|
|
59
|
+
|
|
47
60
|
}));
|
|
48
61
|
};
|
|
49
62
|
|
|
50
|
-
|
|
51
|
-
var _default =
|
|
63
|
+
DesignDrawerPanel.displayName = "DesignDrawerPanel";
|
|
64
|
+
var _default = DesignDrawerPanel;
|
|
52
65
|
exports.default = _default;
|
|
@@ -27,6 +27,21 @@
|
|
|
27
27
|
padding: 1.125rem!important;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
.cbx-DrawerPanel-container-tabs {
|
|
31
|
+
width: 100%;
|
|
32
|
+
margin-right: 4.25rem;
|
|
33
|
+
margin-left: 4.25rem;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.cbx-DrawerPanel-tabs {
|
|
38
|
+
color: var(--white)!important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.cbx-DrawerPanel-tabs-opacity {
|
|
42
|
+
opacity: 50%
|
|
43
|
+
}
|
|
44
|
+
|
|
30
45
|
.cbx-DrawerPanel-dialogContent {
|
|
31
46
|
min-width: 40vw;
|
|
32
47
|
max-width: 95vw;
|
|
@@ -25,6 +25,8 @@ var _Slide = _interopRequireDefault(require("@mui/material/Slide"));
|
|
|
25
25
|
|
|
26
26
|
var _Toolbar = _interopRequireDefault(require("@mui/material/Toolbar"));
|
|
27
27
|
|
|
28
|
+
var _material = require("@mui/material");
|
|
29
|
+
|
|
28
30
|
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
29
31
|
|
|
30
32
|
var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
@@ -66,7 +68,9 @@ var DrawerPanel = function DrawerPanel(_ref) {
|
|
|
66
68
|
classNameDialog = _ref.classNameDialog,
|
|
67
69
|
PaperProps = _ref.PaperProps,
|
|
68
70
|
widthModal = _ref.widthModal,
|
|
69
|
-
isMobile = _ref.isMobile
|
|
71
|
+
isMobile = _ref.isMobile,
|
|
72
|
+
tabs = _ref.tabs,
|
|
73
|
+
onChange = _ref.onChange;
|
|
70
74
|
return /*#__PURE__*/_react.default.createElement(_Dialog.default, {
|
|
71
75
|
TransitionComponent: Transition,
|
|
72
76
|
className: "".concat(classNameDialog, " cbx-DrawerPanel-dialog"),
|
|
@@ -116,7 +120,30 @@ var DrawerPanel = function DrawerPanel(_ref) {
|
|
|
116
120
|
loadingColor: "white",
|
|
117
121
|
success: successAction,
|
|
118
122
|
onClick: acceptAction
|
|
119
|
-
}))), /*#__PURE__*/_react.default.createElement(
|
|
123
|
+
}))), /*#__PURE__*/_react.default.createElement(_AppBar.default, {
|
|
124
|
+
sx: {
|
|
125
|
+
position: 'relative',
|
|
126
|
+
flexDirection: 'row'
|
|
127
|
+
},
|
|
128
|
+
elevation: 0
|
|
129
|
+
}, tabs.length > 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
130
|
+
className: 'cbx-DrawerPanel-container-tabs'
|
|
131
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Tabs, {
|
|
132
|
+
indicatorColor: "secondary",
|
|
133
|
+
textColor: "secondary",
|
|
134
|
+
onChange: onChange,
|
|
135
|
+
value: tabs.findIndex(function (tab) {
|
|
136
|
+
return tab.active;
|
|
137
|
+
}),
|
|
138
|
+
variant: "scrollable",
|
|
139
|
+
scrollButtons: "auto"
|
|
140
|
+
}, tabs.map(function (tab, index) {
|
|
141
|
+
return /*#__PURE__*/_react.default.createElement(_material.Tab, {
|
|
142
|
+
label: tab.label,
|
|
143
|
+
key: index,
|
|
144
|
+
className: "cbx-DrawerPanel-tabs ".concat(!tab.active ? 'cbx-DrawerPanel-tabs-opacity' : '')
|
|
145
|
+
});
|
|
146
|
+
})))), /*#__PURE__*/_react.default.createElement(_DialogContent.default, {
|
|
120
147
|
className: 'cbx-DrawerPanel-dialogContent',
|
|
121
148
|
style: _objectSpread({}, bodyStyle)
|
|
122
149
|
}, bodyText));
|
|
@@ -140,7 +167,10 @@ DrawerPanel.propTypes = {
|
|
|
140
167
|
classNameDialog: _propTypes.default.string,
|
|
141
168
|
PaperProps: _propTypes.default.object,
|
|
142
169
|
widthModal: _propTypes.default.object,
|
|
143
|
-
isMobile: _propTypes.default.bool
|
|
170
|
+
isMobile: _propTypes.default.bool,
|
|
171
|
+
loadingColor: _propTypes.default.string,
|
|
172
|
+
tabs: _propTypes.default.array,
|
|
173
|
+
onChange: _propTypes.default.func
|
|
144
174
|
};
|
|
145
175
|
DrawerPanel.defaultProps = {
|
|
146
176
|
open: true,
|
|
@@ -159,7 +189,10 @@ DrawerPanel.defaultProps = {
|
|
|
159
189
|
classNameDialog: '',
|
|
160
190
|
PaperProps: undefined,
|
|
161
191
|
widthModal: undefined,
|
|
162
|
-
isMobile: false
|
|
192
|
+
isMobile: false,
|
|
193
|
+
loadingColor: 'white',
|
|
194
|
+
tabs: [],
|
|
195
|
+
onChange: undefined
|
|
163
196
|
};
|
|
164
197
|
var _default = DrawerPanel;
|
|
165
198
|
exports.default = _default;
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.
|
|
6
|
+
exports.default = exports.DesignDrawerPanelTemplate = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
10
|
var _DrawerPanel = _interopRequireDefault(require("./DrawerPanel"));
|
|
11
11
|
|
|
12
|
+
var _DesignDrawerPanel = _interopRequireDefault(require("./DesignDrawerPanel"));
|
|
13
|
+
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
15
|
|
|
14
|
-
// import DrawerPanelPrueba from './DrawerPanelPrueba';
|
|
15
16
|
var _default = {
|
|
16
17
|
title: 'Example/DrawerPanel',
|
|
17
18
|
component: _DrawerPanel.default,
|
|
@@ -26,13 +27,13 @@ var _default = {
|
|
|
26
27
|
};
|
|
27
28
|
exports.default = _default;
|
|
28
29
|
|
|
29
|
-
var
|
|
30
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
30
|
+
var TemplateDrawerPanel = function TemplateDrawerPanel(args) {
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_DesignDrawerPanel.default, args);
|
|
31
32
|
};
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
var
|
|
35
|
-
exports.
|
|
36
|
-
|
|
34
|
+
TemplateDrawerPanel.displayName = "TemplateDrawerPanel";
|
|
35
|
+
var DesignDrawerPanelTemplate = TemplateDrawerPanel.bind({});
|
|
36
|
+
exports.DesignDrawerPanelTemplate = DesignDrawerPanelTemplate;
|
|
37
|
+
DesignDrawerPanelTemplate.args = {
|
|
37
38
|
sizeContainer: 'LG'
|
|
38
39
|
};
|
|
@@ -98,9 +98,8 @@ var DropDown = function DropDown(_ref) {
|
|
|
98
98
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, Component ? /*#__PURE__*/_react.default.createElement("div", {
|
|
99
99
|
onClick: handleClick,
|
|
100
100
|
id: id,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}, styleComponent)
|
|
101
|
+
className: "cbx-dropdown-component-container",
|
|
102
|
+
style: _objectSpread({}, styleComponent)
|
|
104
103
|
}, /*#__PURE__*/_react.default.createElement(Component, null)) : /*#__PURE__*/_react.default.createElement(_ButtonBasic.default, {
|
|
105
104
|
variant: variantButton,
|
|
106
105
|
type: type,
|
|
@@ -130,8 +129,7 @@ var DropDown = function DropDown(_ref) {
|
|
|
130
129
|
DropDown.displayName = "DropDown";
|
|
131
130
|
DropDown.propTypes = {
|
|
132
131
|
id: _propTypes.default.string,
|
|
133
|
-
text: _propTypes.default.
|
|
134
|
-
Component: _propTypes.default.node,
|
|
132
|
+
text: _propTypes.default.node,
|
|
135
133
|
items: _propTypes.default.node,
|
|
136
134
|
type: _propTypes.default.string,
|
|
137
135
|
open: _propTypes.default.bool,
|
|
@@ -145,8 +143,7 @@ DropDown.propTypes = {
|
|
|
145
143
|
};
|
|
146
144
|
DropDown.defaultProps = {
|
|
147
145
|
id: '',
|
|
148
|
-
text:
|
|
149
|
-
Component: null,
|
|
146
|
+
text: null,
|
|
150
147
|
items: null,
|
|
151
148
|
type: '',
|
|
152
149
|
open: null,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.DesignDropDownTemplate =
|
|
6
|
+
exports.default = exports.DesignDropDownTemplate = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -19,20 +19,11 @@ var _default = {
|
|
|
19
19
|
};
|
|
20
20
|
exports.default = _default;
|
|
21
21
|
|
|
22
|
-
var Template = function Template(args) {
|
|
23
|
-
return /*#__PURE__*/_react.default.createElement(_DropDown.default, args);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
Template.displayName = "Template";
|
|
27
|
-
|
|
28
22
|
var TemplateDropDown = function TemplateDropDown(args) {
|
|
29
23
|
return /*#__PURE__*/_react.default.createElement(_DesignDropDown.default, args);
|
|
30
24
|
};
|
|
31
25
|
|
|
32
26
|
TemplateDropDown.displayName = "TemplateDropDown";
|
|
33
|
-
var Default = Template.bind({});
|
|
34
|
-
exports.Default = Default;
|
|
35
|
-
Default.args = {};
|
|
36
27
|
var DesignDropDownTemplate = TemplateDropDown.bind({});
|
|
37
28
|
exports.DesignDropDownTemplate = DesignDropDownTemplate;
|
|
38
29
|
DesignDropDownTemplate.parameters = {
|
|
@@ -29,7 +29,7 @@ var Header = function Header(_ref) {
|
|
|
29
29
|
logoLeftXS = _ref.logoLeftXS,
|
|
30
30
|
title = _ref.title,
|
|
31
31
|
lock = _ref.lock,
|
|
32
|
-
|
|
32
|
+
itemsDropDownMore = _ref.itemsDropDownMore,
|
|
33
33
|
logoRight = _ref.logoRight,
|
|
34
34
|
logoRightXS = _ref.logoRightXS,
|
|
35
35
|
finish = _ref.finish,
|
|
@@ -37,12 +37,12 @@ var Header = function Header(_ref) {
|
|
|
37
37
|
textFinishButton = _ref.textFinishButton,
|
|
38
38
|
companyName = _ref.companyName,
|
|
39
39
|
moreIcon = _ref.moreIcon,
|
|
40
|
-
|
|
40
|
+
iconButtonRight = _ref.iconButtonRight,
|
|
41
41
|
sectionCenter = _ref.sectionCenter,
|
|
42
|
-
itemsDropDown = _ref.itemsDropDown,
|
|
43
42
|
itemsDropDownUser = _ref.itemsDropDownUser,
|
|
44
43
|
lockIcon = _ref.lockIcon,
|
|
45
|
-
logoAndDropdownSeparate = _ref.logoAndDropdownSeparate
|
|
44
|
+
logoAndDropdownSeparate = _ref.logoAndDropdownSeparate,
|
|
45
|
+
backgroundIconButtonRight = _ref.backgroundIconButtonRight;
|
|
46
46
|
|
|
47
47
|
var _useWindowSize = (0, _useWindowSize2.default)(),
|
|
48
48
|
innerWidth = _useWindowSize.innerWidth,
|
|
@@ -54,7 +54,7 @@ var Header = function Header(_ref) {
|
|
|
54
54
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
55
55
|
className: "cbx-header-first-block",
|
|
56
56
|
style: {
|
|
57
|
-
minWidth: innerWidth > breakpoints.md ? '185px' : !logoLeft ? '145px' : '
|
|
57
|
+
minWidth: innerWidth > breakpoints.md ? logoLeft === 'noLogo' ? 'var(--spacing40)' : '185px' : !logoLeft ? '145px' : '95px',
|
|
58
58
|
marginRight: innerWidth < breakpoints.md ? 'var(--spacing8)' : 'var(--spacing24)'
|
|
59
59
|
}
|
|
60
60
|
}, back && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
@@ -65,11 +65,11 @@ var Header = function Header(_ref) {
|
|
|
65
65
|
icon: /*#__PURE__*/_react.default.createElement("i", {
|
|
66
66
|
className: "ri-arrow-left-line"
|
|
67
67
|
})
|
|
68
|
-
})), logoLeft ? /*#__PURE__*/_react.default.createElement("div", {
|
|
68
|
+
})), logoLeft ? logoLeft !== 'noLogo' && /*#__PURE__*/_react.default.createElement("div", {
|
|
69
69
|
className: "cbx-header-first-container-app-logo"
|
|
70
70
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
71
71
|
id: 'cbx-header-first-app-logo',
|
|
72
|
-
src: innerWidth < breakpoints.md ?
|
|
72
|
+
src: innerWidth < breakpoints.md ? logoLeftXS : logoLeft || logoLeft,
|
|
73
73
|
className: "App-logo",
|
|
74
74
|
alt: "logo"
|
|
75
75
|
})) : /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -109,7 +109,7 @@ var Header = function Header(_ref) {
|
|
|
109
109
|
fontSize: '18px',
|
|
110
110
|
lineHeight: '22px'
|
|
111
111
|
}
|
|
112
|
-
}, title)),
|
|
112
|
+
}, title)), itemsDropDownMore && /*#__PURE__*/_react.default.createElement("div", {
|
|
113
113
|
className: "cbx-header-second-container-more",
|
|
114
114
|
style: {
|
|
115
115
|
margin: innerWidth > breakpoints.md && '0 16px'
|
|
@@ -126,17 +126,18 @@ var Header = function Header(_ref) {
|
|
|
126
126
|
})
|
|
127
127
|
});
|
|
128
128
|
},
|
|
129
|
-
items:
|
|
129
|
+
items: itemsDropDownMore
|
|
130
130
|
})), finish && /*#__PURE__*/_react.default.createElement("div", {
|
|
131
131
|
className: "cbx-header-second-container-finish"
|
|
132
132
|
}, innerWidth < breakpoints.md ? /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
133
133
|
"aria-label": "",
|
|
134
134
|
id: 'cbx-header-button-logout',
|
|
135
135
|
className: "cbx-header-second-button-icon-logout cbx-header-button",
|
|
136
|
-
onClick: finish
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
onClick: finish,
|
|
137
|
+
icon: /*#__PURE__*/_react.default.createElement("i", {
|
|
138
|
+
className: "ri-logout-circle-r-line"
|
|
139
|
+
})
|
|
140
|
+
}) : /*#__PURE__*/_react.default.createElement(_ButtonBasic.default, {
|
|
140
141
|
id: 'cbx-header-button-logout',
|
|
141
142
|
variant: 'secondary',
|
|
142
143
|
style: {
|
|
@@ -157,7 +158,15 @@ var Header = function Header(_ref) {
|
|
|
157
158
|
className: "cbx-header-third-logo-right",
|
|
158
159
|
src: innerWidth < breakpoints.md ? logoRight : logoRightXS || logoRight,
|
|
159
160
|
alt: "logo"
|
|
160
|
-
})),
|
|
161
|
+
})), iconButtonRight && /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
162
|
+
"aria-label": "",
|
|
163
|
+
id: 'cbx-header-third-button-user',
|
|
164
|
+
className: "cbx-header-third-button-user cbx-header-button",
|
|
165
|
+
icon: iconButtonRight,
|
|
166
|
+
sx: {
|
|
167
|
+
background: backgroundIconButtonRight
|
|
168
|
+
}
|
|
169
|
+
}), itemsDropDownUser && /*#__PURE__*/_react.default.createElement("div", {
|
|
161
170
|
style: {
|
|
162
171
|
marginLeft: 'var(--spacing4)'
|
|
163
172
|
}
|
|
@@ -176,7 +185,7 @@ var Header = function Header(_ref) {
|
|
|
176
185
|
"aria-label": "",
|
|
177
186
|
id: 'cbx-header-third-button-user',
|
|
178
187
|
className: "cbx-header-third-button-user cbx-header-button",
|
|
179
|
-
icon:
|
|
188
|
+
icon: iconButtonRight || /*#__PURE__*/_react.default.createElement("i", {
|
|
180
189
|
className: "ri-user-3-line"
|
|
181
190
|
})
|
|
182
191
|
});
|
|
@@ -208,7 +217,7 @@ var Header = function Header(_ref) {
|
|
|
208
217
|
alt: "logo"
|
|
209
218
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
210
219
|
className: "cbx-header-third-button-user-logo "
|
|
211
|
-
},
|
|
220
|
+
}, iconButtonRight || /*#__PURE__*/_react.default.createElement("i", {
|
|
212
221
|
className: "ri-user-3-line"
|
|
213
222
|
}))),
|
|
214
223
|
onClick: finish
|
|
@@ -233,13 +242,14 @@ Header.propTypes = {
|
|
|
233
242
|
finish: _propTypes.default.func,
|
|
234
243
|
textFinishButton: _propTypes.default.string,
|
|
235
244
|
companyName: _propTypes.default.string,
|
|
236
|
-
|
|
245
|
+
iconButtonRight: _propTypes.default.string,
|
|
237
246
|
lockIcon: _propTypes.default.string,
|
|
247
|
+
backgroundIconButtonRight: _propTypes.default.string,
|
|
238
248
|
itemsDropDownUser: _propTypes.default.node,
|
|
239
|
-
|
|
249
|
+
itemsDropDownMore: _propTypes.default.node
|
|
240
250
|
};
|
|
241
251
|
Header.defaultProps = {
|
|
242
|
-
back:
|
|
252
|
+
back: undefined,
|
|
243
253
|
logoLeft: '',
|
|
244
254
|
logoLeftXS: '',
|
|
245
255
|
title: 'Lorem ipsum dolor sit amet. Leverage agile frameworks to provide',
|
|
@@ -252,10 +262,11 @@ Header.defaultProps = {
|
|
|
252
262
|
finish: Function.prototype,
|
|
253
263
|
textFinishButton: 'Finalizar Cita',
|
|
254
264
|
companyName: 'Entity 1 Entity 1 Entity 1',
|
|
255
|
-
|
|
265
|
+
iconButtonRight: '',
|
|
256
266
|
lockIcon: '',
|
|
267
|
+
backgroundIconButtonRight: '',
|
|
257
268
|
itemsDropDownUser: '',
|
|
258
|
-
|
|
269
|
+
itemsDropDownMore: ''
|
|
259
270
|
};
|
|
260
271
|
var _default = Header;
|
|
261
272
|
exports.default = _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
require("../../styles/main.css");
|
|
11
|
+
|
|
12
|
+
var _IconButton = _interopRequireDefault(require("./IconButton"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
var DesignIconButton = function DesignIconButton() {
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
18
|
+
icon: /*#__PURE__*/_react.default.createElement("i", {
|
|
19
|
+
className: "ri-user-3-line"
|
|
20
|
+
})
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var _default = DesignIconButton;
|
|
25
|
+
exports.default = _default;
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.
|
|
6
|
+
exports.default = exports.DesignIconButtonTemplate = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
10
|
var _IconButton = _interopRequireDefault(require("./IconButton"));
|
|
11
11
|
|
|
12
|
+
var _DesignIconButton = _interopRequireDefault(require("./DesignIconButton.stories"));
|
|
13
|
+
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
15
|
|
|
14
16
|
var _default = {
|
|
@@ -17,11 +19,16 @@ var _default = {
|
|
|
17
19
|
};
|
|
18
20
|
exports.default = _default;
|
|
19
21
|
|
|
20
|
-
var
|
|
21
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
22
|
+
var TemplateIconButton = function TemplateIconButton(args) {
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement(_DesignIconButton.default, args);
|
|
22
24
|
};
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
exports.
|
|
27
|
-
|
|
26
|
+
TemplateIconButton.displayName = "TemplateIconButton";
|
|
27
|
+
var DesignIconButtonTemplate = TemplateIconButton.bind({});
|
|
28
|
+
exports.DesignIconButtonTemplate = DesignIconButtonTemplate;
|
|
29
|
+
DesignIconButtonTemplate.parameters = {
|
|
30
|
+
controls: {
|
|
31
|
+
disable: true
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
DesignIconButtonTemplate.args = {};
|
|
@@ -72,7 +72,7 @@ var InputPassword = function InputPassword(_ref) {
|
|
|
72
72
|
var color = themeData.theme.colors.error;
|
|
73
73
|
|
|
74
74
|
if (percent > 30 && percent < 90) {
|
|
75
|
-
color =
|
|
75
|
+
color = 'var(--warning)';
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
if (percent >= 90) {
|
|
@@ -132,7 +132,7 @@ InputPassword.propTypes = {
|
|
|
132
132
|
className: _propTypes.default.string,
|
|
133
133
|
onChange: _propTypes.default.func,
|
|
134
134
|
disabled: _propTypes.default.bool,
|
|
135
|
-
error: _propTypes.default.
|
|
135
|
+
error: _propTypes.default.node,
|
|
136
136
|
validation: _propTypes.default.bool,
|
|
137
137
|
percentageError: _propTypes.default.number
|
|
138
138
|
};
|
|
@@ -144,7 +144,7 @@ InputPassword.defaultProps = {
|
|
|
144
144
|
className: '',
|
|
145
145
|
onChange: undefined,
|
|
146
146
|
disabled: false,
|
|
147
|
-
error:
|
|
147
|
+
error: undefined,
|
|
148
148
|
validation: false,
|
|
149
149
|
percentageError: 0
|
|
150
150
|
};
|
|
@@ -29,8 +29,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
29
29
|
|
|
30
30
|
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; }
|
|
31
31
|
|
|
32
|
-
var CssTextField = (0, _styled.default)(_TextField.default)(function (
|
|
33
|
-
var theme = _ref.theme;
|
|
32
|
+
var CssTextField = (0, _styled.default)(_TextField.default)(function () {
|
|
34
33
|
return {
|
|
35
34
|
'& label.Mui-focused': {
|
|
36
35
|
color: 'primary',
|
|
@@ -39,7 +38,7 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function (_ref) {
|
|
|
39
38
|
top: '1px'
|
|
40
39
|
},
|
|
41
40
|
'& .MuiInput-underline:after': {
|
|
42
|
-
borderBottomColor:
|
|
41
|
+
borderBottomColor: 'var(--gray5)',
|
|
43
42
|
borderWidth: '2px'
|
|
44
43
|
},
|
|
45
44
|
'& .MuiFormHelperText-root': {
|
|
@@ -57,16 +56,16 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function (_ref) {
|
|
|
57
56
|
top: '-4px'
|
|
58
57
|
},
|
|
59
58
|
'& .Mui-error': {
|
|
60
|
-
color:
|
|
59
|
+
color: 'var(--error)'
|
|
61
60
|
},
|
|
62
61
|
'& .MuiInputLabel-shrink': {
|
|
63
62
|
top: '1px'
|
|
64
63
|
},
|
|
65
64
|
'& .MuiOutlinedInput-root': {
|
|
66
|
-
color:
|
|
65
|
+
color: 'var(--gray5)',
|
|
67
66
|
paddingRight: 'var(--spacing8)',
|
|
68
67
|
'& fieldset': {
|
|
69
|
-
borderColor:
|
|
68
|
+
borderColor: 'var(--gray3)',
|
|
70
69
|
borderWidth: '1px',
|
|
71
70
|
'& legend': {
|
|
72
71
|
'& span': {
|
|
@@ -76,47 +75,47 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function (_ref) {
|
|
|
76
75
|
}
|
|
77
76
|
},
|
|
78
77
|
'&:hover fieldset': {
|
|
79
|
-
borderColor:
|
|
78
|
+
borderColor: 'var(--gray3)',
|
|
80
79
|
borderWidth: '2px'
|
|
81
80
|
},
|
|
82
81
|
'&:active fieldset': {
|
|
83
|
-
borderColor:
|
|
82
|
+
borderColor: 'var(--gray3)',
|
|
84
83
|
borderWidth: '2px'
|
|
85
84
|
},
|
|
86
85
|
'&.Mui-focused fieldset': {
|
|
87
|
-
borderColor:
|
|
86
|
+
borderColor: 'var(--primary)',
|
|
88
87
|
borderWidth: '2px'
|
|
89
88
|
},
|
|
90
89
|
'&:focus-visible': {
|
|
91
90
|
outline: 'none',
|
|
92
91
|
'& fieldset': {
|
|
93
92
|
outline: 'none',
|
|
94
|
-
boxShadow:
|
|
95
|
-
border:
|
|
93
|
+
boxShadow: '0 0 0 3px white, 0 0 7px 4px var(--primary)',
|
|
94
|
+
border: '2px solid var(--gray4)'
|
|
96
95
|
}
|
|
97
96
|
}
|
|
98
97
|
},
|
|
99
98
|
'& .MuiOutlinedInput-root.Mui-error': {
|
|
100
99
|
'& fieldset': {
|
|
101
|
-
borderColor:
|
|
100
|
+
borderColor: 'var(--error)'
|
|
102
101
|
},
|
|
103
102
|
'&:hover fieldset': {
|
|
104
|
-
borderColor:
|
|
103
|
+
borderColor: 'var(--error)',
|
|
105
104
|
borderWidth: '2px'
|
|
106
105
|
},
|
|
107
106
|
'&:active fieldset': {
|
|
108
|
-
borderColor:
|
|
107
|
+
borderColor: 'var(--error)',
|
|
109
108
|
borderWidth: '2px'
|
|
110
109
|
},
|
|
111
110
|
'&.Mui-focused fieldset': {
|
|
112
|
-
borderColor:
|
|
111
|
+
borderColor: 'var(--error)',
|
|
113
112
|
borderWidth: '2px'
|
|
114
113
|
},
|
|
115
114
|
'&:focus-visible': {
|
|
116
115
|
// falta revisar esto
|
|
117
|
-
borderColor:
|
|
116
|
+
borderColor: 'var(--gray4)',
|
|
118
117
|
borderWidth: '2px',
|
|
119
|
-
boxShadow:
|
|
118
|
+
boxShadow: '0 0 0 3px white, 0 0 7px 4px var(--primary)'
|
|
120
119
|
}
|
|
121
120
|
},
|
|
122
121
|
'& .MuiOutlinedInput-root.Mui-disabled': {
|
|
@@ -140,19 +139,19 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function (_ref) {
|
|
|
140
139
|
};
|
|
141
140
|
});
|
|
142
141
|
|
|
143
|
-
var InputText = function InputText(
|
|
144
|
-
var id =
|
|
145
|
-
className =
|
|
146
|
-
onChange =
|
|
147
|
-
label =
|
|
148
|
-
disabled =
|
|
149
|
-
error =
|
|
150
|
-
helper =
|
|
151
|
-
success =
|
|
152
|
-
width =
|
|
153
|
-
helperText =
|
|
154
|
-
fullWidth =
|
|
155
|
-
props = _objectWithoutProperties(
|
|
142
|
+
var InputText = function InputText(_ref) {
|
|
143
|
+
var id = _ref.id,
|
|
144
|
+
className = _ref.className,
|
|
145
|
+
onChange = _ref.onChange,
|
|
146
|
+
label = _ref.label,
|
|
147
|
+
disabled = _ref.disabled,
|
|
148
|
+
error = _ref.error,
|
|
149
|
+
helper = _ref.helper,
|
|
150
|
+
success = _ref.success,
|
|
151
|
+
width = _ref.width,
|
|
152
|
+
helperText = _ref.helperText,
|
|
153
|
+
fullWidth = _ref.fullWidth,
|
|
154
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
156
155
|
|
|
157
156
|
return /*#__PURE__*/_react.default.createElement(CssTextField, _extends({
|
|
158
157
|
id: id,
|
|
@@ -199,7 +198,7 @@ InputText.propTypes = {
|
|
|
199
198
|
className: _propTypes.default.string,
|
|
200
199
|
onChange: _propTypes.default.func,
|
|
201
200
|
disabled: _propTypes.default.bool,
|
|
202
|
-
error: _propTypes.default.
|
|
201
|
+
error: _propTypes.default.node,
|
|
203
202
|
success: _propTypes.default.bool
|
|
204
203
|
};
|
|
205
204
|
InputText.defaultProps = {
|
|
@@ -210,7 +209,7 @@ InputText.defaultProps = {
|
|
|
210
209
|
className: '',
|
|
211
210
|
onChange: undefined,
|
|
212
211
|
disabled: false,
|
|
213
|
-
error:
|
|
212
|
+
error: undefined
|
|
214
213
|
};
|
|
215
214
|
var _default = InputText;
|
|
216
215
|
exports.default = _default;
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
require("./MenuLateralRight.css");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
var MenuLateralRight = function MenuLateralRight() {
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement("div", null);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
MenuLateralRight.displayName = "MenuLateralRight";
|
|
23
|
+
MenuLateralRight.propTypes = {
|
|
24
|
+
id: _propTypes.default.string
|
|
25
|
+
};
|
|
26
|
+
MenuLateralRight.defaultProps = {
|
|
27
|
+
id: ''
|
|
28
|
+
};
|
|
29
|
+
var _default = MenuLateralRight;
|
|
30
|
+
exports.default = _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.DesignMenuLateralRightTemplate = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _MenuLateralRight = _interopRequireDefault(require("./MenuLateralRight"));
|
|
11
|
+
|
|
12
|
+
var _MenuLateralRight2 = _interopRequireDefault(require("./MenuLateralRight.stories"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
var _default = {
|
|
17
|
+
title: 'Example/DropDown',
|
|
18
|
+
component: _MenuLateralRight.default
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
|
|
22
|
+
var TemplateMenuLateralRight = function TemplateMenuLateralRight(args) {
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement(_MenuLateralRight2.default, args);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
TemplateMenuLateralRight.displayName = "TemplateMenuLateralRight";
|
|
27
|
+
var DesignMenuLateralRightTemplate = TemplateMenuLateralRight.bind({});
|
|
28
|
+
exports.DesignMenuLateralRightTemplate = DesignMenuLateralRightTemplate;
|
|
29
|
+
DesignMenuLateralRightTemplate.parameters = {
|
|
30
|
+
controls: {
|
|
31
|
+
disable: true
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
DesignMenuLateralRightTemplate.args = {};
|
|
@@ -41,8 +41,6 @@ var Modal = function Modal(_ref) {
|
|
|
41
41
|
fullScreen = _ref.fullScreen,
|
|
42
42
|
buttonAccept = _ref.buttonAccept,
|
|
43
43
|
buttonCancel = _ref.buttonCancel,
|
|
44
|
-
_ref$successAction = _ref.successAction,
|
|
45
|
-
successAction = _ref$successAction === void 0 ? false : _ref$successAction,
|
|
46
44
|
open = _ref.open,
|
|
47
45
|
requestClose = _ref.requestClose,
|
|
48
46
|
loadingAction = _ref.loadingAction,
|
|
@@ -70,8 +68,8 @@ var Modal = function Modal(_ref) {
|
|
|
70
68
|
})), extraActions && /*#__PURE__*/_react.default.createElement("div", null, extraActions), !hideAccept && !!buttonAccept && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
71
69
|
text: buttonAccept,
|
|
72
70
|
id: "".concat(id, "-button-accept"),
|
|
73
|
-
loading: loadingAction
|
|
74
|
-
|
|
71
|
+
loading: loadingAction // success={successAction}
|
|
72
|
+
,
|
|
75
73
|
color: "primary",
|
|
76
74
|
onClick: acceptAction
|
|
77
75
|
})));
|
|
@@ -90,6 +88,7 @@ var Modal = function Modal(_ref) {
|
|
|
90
88
|
} : {})
|
|
91
89
|
}
|
|
92
90
|
}, !!title && /*#__PURE__*/_react.default.createElement(_material.DialogTitle, {
|
|
91
|
+
component: 'span',
|
|
93
92
|
sx: {
|
|
94
93
|
padding: '1.5rem'
|
|
95
94
|
}
|
|
@@ -129,7 +128,7 @@ Modal.propTypes = {
|
|
|
129
128
|
fullScreen: _propTypes.default.bool,
|
|
130
129
|
buttonAccept: _propTypes.default.string,
|
|
131
130
|
buttonCancel: _propTypes.default.string,
|
|
132
|
-
successAction:
|
|
131
|
+
// successAction: PropTypes.bool,
|
|
133
132
|
open: _propTypes.default.bool,
|
|
134
133
|
requestClose: _propTypes.default.func,
|
|
135
134
|
loadingAction: _propTypes.default.bool,
|
|
@@ -150,7 +149,7 @@ Modal.defaultProps = {
|
|
|
150
149
|
fullScreen: false,
|
|
151
150
|
buttonAccept: '',
|
|
152
151
|
buttonCancel: '',
|
|
153
|
-
successAction: false,
|
|
152
|
+
// successAction: false,
|
|
154
153
|
open: false,
|
|
155
154
|
requestClose: undefined,
|
|
156
155
|
loadingAction: false,
|
|
@@ -39,7 +39,6 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function (_ref) {
|
|
|
39
39
|
top: '1px'
|
|
40
40
|
},
|
|
41
41
|
'& .MuiInput-underline:after': {
|
|
42
|
-
borderBottomColor: theme.palette.primary700,
|
|
43
42
|
borderWidth: '2px'
|
|
44
43
|
},
|
|
45
44
|
'& .MuiFormHelperText-root': {
|
|
@@ -62,10 +61,10 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function (_ref) {
|
|
|
62
61
|
top: '1px'
|
|
63
62
|
},
|
|
64
63
|
'& .MuiOutlinedInput-root': {
|
|
65
|
-
color:
|
|
64
|
+
color: 'var(--gray4)',
|
|
66
65
|
paddingRight: 'var(--spacing8)',
|
|
67
66
|
'& fieldset': {
|
|
68
|
-
borderColor:
|
|
67
|
+
borderColor: 'var(--gray3)',
|
|
69
68
|
borderWidth: '1px',
|
|
70
69
|
'& legend': {
|
|
71
70
|
'& span': {
|
|
@@ -75,47 +74,46 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function (_ref) {
|
|
|
75
74
|
}
|
|
76
75
|
},
|
|
77
76
|
'&:hover fieldset': {
|
|
78
|
-
borderColor:
|
|
77
|
+
borderColor: 'var(--gray3)',
|
|
79
78
|
borderWidth: '2px'
|
|
80
79
|
},
|
|
81
80
|
'&:active fieldset': {
|
|
82
|
-
borderColor:
|
|
81
|
+
borderColor: 'var(--gray4)',
|
|
83
82
|
borderWidth: '2px'
|
|
84
83
|
},
|
|
85
84
|
'&.Mui-focused fieldset': {
|
|
86
|
-
borderColor:
|
|
85
|
+
borderColor: 'var(--gray4)',
|
|
87
86
|
borderWidth: '2px'
|
|
88
87
|
},
|
|
89
88
|
'&:focus-visible': {
|
|
90
89
|
outline: 'none',
|
|
91
90
|
'& fieldset': {
|
|
92
91
|
outline: 'none',
|
|
93
|
-
boxShadow:
|
|
94
|
-
border:
|
|
92
|
+
boxShadow: '0 0 0 3px white, 0 0 7px 4px var(--primary)',
|
|
93
|
+
border: '2px solid var(--gray4)'
|
|
95
94
|
}
|
|
96
95
|
}
|
|
97
96
|
},
|
|
98
97
|
'& .MuiOutlinedInput-root.Mui-error': {
|
|
99
98
|
'& fieldset': {
|
|
100
|
-
borderColor:
|
|
99
|
+
borderColor: 'var(--error)'
|
|
101
100
|
},
|
|
102
101
|
'&:hover fieldset': {
|
|
103
|
-
borderColor:
|
|
102
|
+
borderColor: 'var(--error)',
|
|
104
103
|
borderWidth: '2px'
|
|
105
104
|
},
|
|
106
105
|
'&:active fieldset': {
|
|
107
|
-
borderColor:
|
|
106
|
+
borderColor: 'var(--error)',
|
|
108
107
|
borderWidth: '2px'
|
|
109
108
|
},
|
|
110
109
|
'&.Mui-focused fieldset': {
|
|
111
|
-
borderColor:
|
|
110
|
+
borderColor: 'var(--error)',
|
|
112
111
|
borderWidth: '2px'
|
|
113
112
|
},
|
|
114
113
|
'&:focus-visible': {
|
|
115
|
-
|
|
116
|
-
borderColor: theme.palette.primary700,
|
|
114
|
+
borderColor: 'var(--gray4)',
|
|
117
115
|
borderWidth: '2px',
|
|
118
|
-
boxShadow:
|
|
116
|
+
boxShadow: '0 0 0 3px white, 0 0 7px 4px var(--primary)'
|
|
119
117
|
}
|
|
120
118
|
},
|
|
121
119
|
'& .MuiOutlinedInput-root.Mui-disabled': {
|
|
@@ -166,21 +164,23 @@ var TextInput = function TextInput(_ref2) {
|
|
|
166
164
|
onChange: onChange,
|
|
167
165
|
disabled: disabled,
|
|
168
166
|
error: error,
|
|
169
|
-
helperText: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, helperText, error ? /*#__PURE__*/_react.default.createElement("
|
|
167
|
+
helperText: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, helperText, error ? /*#__PURE__*/_react.default.createElement("span", {
|
|
170
168
|
className: "cbx-TextInput-items-center"
|
|
171
169
|
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
172
170
|
className: 'cbx-TextInput-infoBtn ri-information-line',
|
|
173
171
|
color: 'var(--error)'
|
|
174
172
|
}), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
175
173
|
variant: "XS",
|
|
176
|
-
color: 'var(--error)'
|
|
177
|
-
|
|
174
|
+
color: 'var(--error)',
|
|
175
|
+
component: 'span'
|
|
176
|
+
}, error)) : helper && /*#__PURE__*/_react.default.createElement("span", {
|
|
178
177
|
className: "cbx-TextInput-items-center"
|
|
179
178
|
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
180
179
|
className: 'cbx-TextInput-infoBtn ri-information-line'
|
|
181
180
|
}), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
182
181
|
color: !disabled ? 'var(--gray4)' : 'var(--gray3)',
|
|
183
|
-
variant: "XS"
|
|
182
|
+
variant: "XS",
|
|
183
|
+
component: 'span'
|
|
184
184
|
}, helper))),
|
|
185
185
|
InputProps: {
|
|
186
186
|
endAdornment: success && /*#__PURE__*/_react.default.createElement("i", {
|
|
@@ -199,7 +199,7 @@ TextInput.propTypes = {
|
|
|
199
199
|
className: _propTypes.default.string,
|
|
200
200
|
onChange: _propTypes.default.func,
|
|
201
201
|
disabled: _propTypes.default.bool,
|
|
202
|
-
error: _propTypes.default.
|
|
202
|
+
error: _propTypes.default.node,
|
|
203
203
|
success: _propTypes.default.bool
|
|
204
204
|
};
|
|
205
205
|
TextInput.defaultProps = {
|
|
@@ -210,7 +210,7 @@ TextInput.defaultProps = {
|
|
|
210
210
|
className: '',
|
|
211
211
|
onChange: undefined,
|
|
212
212
|
disabled: false,
|
|
213
|
-
error:
|
|
213
|
+
error: undefined
|
|
214
214
|
};
|
|
215
215
|
var _default = TextInput;
|
|
216
216
|
exports.default = _default;
|
|
@@ -112,7 +112,7 @@ Typography.propTypes = {
|
|
|
112
112
|
variant: _propTypes.default.string,
|
|
113
113
|
color: _propTypes.default.string,
|
|
114
114
|
styles: _propTypes.default.object,
|
|
115
|
-
children: _propTypes.default.
|
|
115
|
+
children: _propTypes.default.node,
|
|
116
116
|
fontWeight: _propTypes.default.string,
|
|
117
117
|
textAlign: _propTypes.default.string,
|
|
118
118
|
component: _propTypes.default.string,
|
package/dist/styles/main.css
CHANGED