@councilbox/councilbox-ui 0.4.13 → 0.4.15
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 +10 -2
- package/dist/components/DragDrop/DragDrop.css +14 -0
- package/dist/components/DragDrop/DragDrop.js +5 -2
- package/dist/components/Modal/Modal.js +5 -2
- package/dist/components/Scrollbar/Scrollbar.js +21 -23
- package/package.json +1 -1
|
@@ -21,11 +21,19 @@ a.noStyles:hover{
|
|
|
21
21
|
|
|
22
22
|
# Changelog ui-councilbox
|
|
23
23
|
<div class="hide">
|
|
24
|
-
<h2>v0.4.
|
|
25
|
-
<div
|
|
24
|
+
<h2>v0.4.15</h2>
|
|
25
|
+
<div>Añadida prop en modal</div>
|
|
26
|
+
<div>Fix estilos en input en componente Dragdrop</div>
|
|
26
27
|
|
|
27
28
|
descargar las fuentes y probarlas, no usar @import, meterlas en css descargadas
|
|
28
29
|
</div>
|
|
30
|
+
<h2>v0.4.15</h2>
|
|
31
|
+
<div>Añadida prop en modal</div>
|
|
32
|
+
<div>Fix estilos en input en componente Dragdrop</div>
|
|
33
|
+
<div>fixed scrollbar para poder acceder a los metodos internos</div>
|
|
34
|
+
<h2>v0.4.14</h2>
|
|
35
|
+
<div>Añadidas props en DragDrop</div>
|
|
36
|
+
|
|
29
37
|
<h2>v0.4.13</h2>
|
|
30
38
|
<div>Añadida prop thickness en componente LoadingSection</div>
|
|
31
39
|
<div>Añadido visualización de codigo en los componentes</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.cbx-dragDrop-container {
|
|
2
2
|
background-color: var(--gray1);
|
|
3
|
+
position: relative;
|
|
3
4
|
}
|
|
4
5
|
|
|
5
6
|
.cbx-dragDrop-principal-container {
|
|
@@ -36,4 +37,17 @@
|
|
|
36
37
|
|
|
37
38
|
.cbx-dragDrop-container-alertProps {
|
|
38
39
|
margin: var(--spacing32) var(--spacing24) 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.cbx-dragDrop-input {
|
|
43
|
+
display: block!important;
|
|
44
|
+
width: 100%;
|
|
45
|
+
height: 100%;
|
|
46
|
+
position: absolute;
|
|
47
|
+
top: 0;
|
|
48
|
+
left: 0;
|
|
49
|
+
right: 0;
|
|
50
|
+
bottom: 0;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
opacity: 0
|
|
39
53
|
}
|
|
@@ -21,7 +21,7 @@ var _IconButton = _interopRequireDefault(require("../IconButton/IconButton"));
|
|
|
21
21
|
|
|
22
22
|
var _Alert = _interopRequireDefault(require("../Alert/Alert"));
|
|
23
23
|
|
|
24
|
-
var _excluded = ["text", "id", "icon", "iconButtonProps", "alertProps", "actionButtons"];
|
|
24
|
+
var _excluded = ["text", "id", "icon", "iconButtonProps", "alertProps", "actionButtons", "inputProps"];
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
@@ -38,6 +38,7 @@ var DragDrop = function DragDrop(_ref) {
|
|
|
38
38
|
iconButtonProps = _ref.iconButtonProps,
|
|
39
39
|
alertProps = _ref.alertProps,
|
|
40
40
|
actionButtons = _ref.actionButtons,
|
|
41
|
+
inputProps = _ref.inputProps,
|
|
41
42
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
42
43
|
|
|
43
44
|
var _useDropzone = (0, _reactDropzone.useDropzone)({
|
|
@@ -63,7 +64,9 @@ var DragDrop = function DragDrop(_ref) {
|
|
|
63
64
|
}),
|
|
64
65
|
type: 'fab',
|
|
65
66
|
hoverColor: 'var(--primary75)'
|
|
66
|
-
}, iconButtonProps))), /*#__PURE__*/_react.default.createElement("input", getInputProps()
|
|
67
|
+
}, iconButtonProps))), /*#__PURE__*/_react.default.createElement("input", _extends({}, getInputProps(), inputProps, {
|
|
68
|
+
className: 'cbx-dragDrop-input'
|
|
69
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
67
70
|
onClick: function onClick(e) {
|
|
68
71
|
e.stopPropagation();
|
|
69
72
|
e.preventDefault();
|
|
@@ -19,7 +19,7 @@ var _ButtonBasic = _interopRequireDefault(require("../ButtonBasic/ButtonBasic"))
|
|
|
19
19
|
|
|
20
20
|
var _CouncilboxThemeContext = require("../ThemeProvider/CouncilboxThemeContext");
|
|
21
21
|
|
|
22
|
-
var _excluded = ["title", "fullWidth", "id", "fullScreen", "buttonAccept", "buttonCancel", "open", "requestClose", "loadingAction", "acceptAction", "cancelAction", "body", "hideAccept", "extraActions", "classNameDialog", "PaperProps", "widthModal", "actions", "sx", "buttonCancelProps", "buttonAcceptProps", "breakpointsButtons"];
|
|
22
|
+
var _excluded = ["title", "fullWidth", "id", "fullScreen", "buttonAccept", "buttonCancel", "open", "requestClose", "loadingAction", "acceptAction", "cancelAction", "body", "bodyText", "hideAccept", "extraActions", "classNameDialog", "PaperProps", "widthModal", "actions", "sx", "buttonCancelProps", "buttonAcceptProps", "breakpointsButtons"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -49,6 +49,7 @@ var Modal = function Modal(_ref) {
|
|
|
49
49
|
acceptAction = _ref.acceptAction,
|
|
50
50
|
cancelAction = _ref.cancelAction,
|
|
51
51
|
body = _ref.body,
|
|
52
|
+
bodyText = _ref.bodyText,
|
|
52
53
|
hideAccept = _ref.hideAccept,
|
|
53
54
|
extraActions = _ref.extraActions,
|
|
54
55
|
classNameDialog = _ref.classNameDialog,
|
|
@@ -138,7 +139,7 @@ var Modal = function Modal(_ref) {
|
|
|
138
139
|
padding: '0 2rem',
|
|
139
140
|
overflow: 'hidden'
|
|
140
141
|
}
|
|
141
|
-
}, body), (!!buttonCancel || !!buttonAccept) && /*#__PURE__*/_react.default.createElement(_material.DialogActions, {
|
|
142
|
+
}, body || bodyText), (!!buttonCancel || !!buttonAccept) && /*#__PURE__*/_react.default.createElement(_material.DialogActions, {
|
|
142
143
|
className: "cbx-modal-contentButtons",
|
|
143
144
|
sx: {
|
|
144
145
|
padding: '1.5rem 2rem',
|
|
@@ -175,6 +176,7 @@ Modal.propTypes = {
|
|
|
175
176
|
acceptAction: _propTypes.default.func,
|
|
176
177
|
cancelAction: _propTypes.default.func,
|
|
177
178
|
body: _propTypes.default.node,
|
|
179
|
+
bodyText: _propTypes.default.node,
|
|
178
180
|
hideAccept: _propTypes.default.bool,
|
|
179
181
|
extraActions: _propTypes.default.node,
|
|
180
182
|
classNameDialog: _propTypes.default.string,
|
|
@@ -196,6 +198,7 @@ Modal.defaultProps = {
|
|
|
196
198
|
acceptAction: undefined,
|
|
197
199
|
cancelAction: undefined,
|
|
198
200
|
body: '',
|
|
201
|
+
bodyText: '',
|
|
199
202
|
hideAccept: false,
|
|
200
203
|
extraActions: undefined,
|
|
201
204
|
classNameDialog: '',
|
|
@@ -25,26 +25,27 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
25
25
|
|
|
26
26
|
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); }
|
|
27
27
|
|
|
28
|
-
var Scrollbar = function
|
|
28
|
+
var Scrollbar = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
29
29
|
var props = _extends({}, _ref);
|
|
30
30
|
|
|
31
|
-
var scrollbar = null;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
31
|
+
var scrollbar = _react.default.useRef(null);
|
|
32
|
+
|
|
33
|
+
_react.default.useImperativeHandle(ref, function () {
|
|
34
|
+
return {
|
|
35
|
+
scrollToBottom: function scrollToBottom() {
|
|
36
|
+
scrollbar.current.scrollToBottom();
|
|
37
|
+
},
|
|
38
|
+
scrollToTop: function scrollToTop() {
|
|
39
|
+
scrollbar.current.scrollToTop();
|
|
40
|
+
},
|
|
41
|
+
getScrollHeight: function getScrollHeight() {
|
|
42
|
+
return scrollbar.current.getScrollHeight();
|
|
43
|
+
},
|
|
44
|
+
getValues: function getValues() {
|
|
45
|
+
return scrollbar.current.getValues();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
}, []);
|
|
48
49
|
|
|
49
50
|
var style = props.style,
|
|
50
51
|
autoHide = props.autoHide,
|
|
@@ -62,9 +63,7 @@ var Scrollbar = function Scrollbar(_ref) {
|
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
return /*#__PURE__*/_react.default.createElement(_reactCustomScrollbarsCbx.Scrollbars, _extends({
|
|
65
|
-
ref:
|
|
66
|
-
scrollbar = _ref2;
|
|
67
|
-
},
|
|
66
|
+
ref: scrollbar,
|
|
68
67
|
autoHide: autoHide,
|
|
69
68
|
className: "Scrollbar ".concat(classFix, " ").concat(extraClass, " ").concat(horizontalScroll ? 'scrollbarBoth' : 'scrollbarOnlyY', " scrollbarFixHeight"),
|
|
70
69
|
onScrollStop: onScrollStop,
|
|
@@ -88,8 +87,7 @@ var Scrollbar = function Scrollbar(_ref) {
|
|
|
88
87
|
});
|
|
89
88
|
}
|
|
90
89
|
} : {}), children);
|
|
91
|
-
};
|
|
90
|
+
});
|
|
92
91
|
|
|
93
|
-
Scrollbar.displayName = "Scrollbar";
|
|
94
92
|
var _default = Scrollbar;
|
|
95
93
|
exports.default = _default;
|