@councilbox/councilbox-ui 2.0.24 → 2.0.26
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/1.Introduction.stories.mdx +3 -1
- package/dist/components/2.Changelog.stories.mdx +9 -0
- package/dist/components/DrawerPanel/DesignDrawerPanel.js +1 -0
- package/dist/components/DrawerPanel/DrawerPanel.js +5 -2
- package/dist/components/EnhancedTable/EnhancedTable.js +8 -0
- package/dist/components/InputAutocomplete/InputAutocomplete.css +33 -27
- package/dist/components/InputAutocomplete/InputAutocomplete.js +3 -2
- package/dist/components/Timeline/DesignTimeline.stories.js +25 -0
- package/dist/components/Timeline/Timeline.css +52 -0
- package/dist/components/Timeline/Timeline.js +72 -0
- package/dist/components/Timeline/Timeline.stories.js +44 -0
- package/dist/components/Tooltip/DesignTooltip.stories.js +3 -2
- package/dist/components/Tooltip/Tooltip.js +2 -1
- package/package.json +1 -1
package/dist/build-index.js
CHANGED
|
@@ -261,6 +261,12 @@ Object.defineProperty(exports, "ThemeProvider", {
|
|
|
261
261
|
return _ThemeProvider.default;
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
|
+
Object.defineProperty(exports, "Timeline", {
|
|
265
|
+
enumerable: true,
|
|
266
|
+
get: function get() {
|
|
267
|
+
return _Timeline.default;
|
|
268
|
+
}
|
|
269
|
+
});
|
|
264
270
|
Object.defineProperty(exports, "Toggle", {
|
|
265
271
|
enumerable: true,
|
|
266
272
|
get: function get() {
|
|
@@ -362,6 +368,8 @@ var _TableRow = _interopRequireDefault(require("./components/Table/TableRow"));
|
|
|
362
368
|
|
|
363
369
|
var _TableSortLabel = _interopRequireDefault(require("./components/Table/TableSortLabel"));
|
|
364
370
|
|
|
371
|
+
var _Timeline = _interopRequireDefault(require("./components/Timeline/Timeline"));
|
|
372
|
+
|
|
365
373
|
var _MenuItem = _interopRequireDefault(require("./components/MenuItem/MenuItem"));
|
|
366
374
|
|
|
367
375
|
var _LoadingSection = _interopRequireDefault(require("./components/LoadingSection/LoadingSection"));
|
|
@@ -16,7 +16,7 @@ a.noStyles:hover{
|
|
|
16
16
|
`}</style>
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
# Librería de componentes ui-councilbox NEW v2.0.
|
|
19
|
+
# Librería de componentes ui-councilbox NEW v2.0.26 🎉
|
|
20
20
|
|
|
21
21
|
<h2>Componentes:</h2>
|
|
22
22
|
<div><a class='noStyles' href='/story/components-accordion--default'>Accordion</a></div>
|
|
@@ -54,7 +54,9 @@ a.noStyles:hover{
|
|
|
54
54
|
<div><a class='noStyles' href='/story/components-table--design-template-table'>Table</a></div>
|
|
55
55
|
<div><a class='noStyles' href='/story/components-tabs--design-tabs-template'>Tabs</a></div>
|
|
56
56
|
<div><a class='noStyles' href='/story/components-tag--design-tag-template'>Tag</a></div>
|
|
57
|
+
<div><a class='noStyles' href='/story/components-timeline--design-timeline-template'>Timeline</a></div>
|
|
57
58
|
<div><a class='noStyles' href='/story/components-toggle--default'>Toggle</a></div>
|
|
59
|
+
<div><a class='noStyles' href='/story/components-tooltip--default'>Tooltip</a></div>
|
|
58
60
|
<div><a class='noStyles' href='/story/components-typography--default'>Typography</a></div>
|
|
59
61
|
|
|
60
62
|
<h2>Fuentes:</h2>
|
|
@@ -25,6 +25,15 @@ a.noStyles:hover{
|
|
|
25
25
|
<div>Fix zIndex label InputText y SelectInput</div>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
|
+
<h2>v2.0.26</h2>
|
|
29
|
+
<div>Fix margin InputAutocomplete sin X</div>
|
|
30
|
+
<div>Fix Tooltip textos largos</div>
|
|
31
|
+
<div>Add disableBackdropClick en DrawerPanel</div>
|
|
32
|
+
|
|
33
|
+
<h2>v2.0.25</h2>
|
|
34
|
+
<div>New component Timeline</div>
|
|
35
|
+
<div>Add order Date EnhanceTable</div>
|
|
36
|
+
|
|
28
37
|
<h2>v2.0.24</h2>
|
|
29
38
|
<div>Fix boton desplegar Autocomplete</div>
|
|
30
39
|
|
|
@@ -72,6 +72,7 @@ var DesignDrawerPanel = function DesignDrawerPanel(_ref) {
|
|
|
72
72
|
return requestCloseLeft(true);
|
|
73
73
|
}
|
|
74
74
|
})), /*#__PURE__*/_react.default.createElement(_DrawerPanel.default, {
|
|
75
|
+
disableBackdropClick: true,
|
|
75
76
|
title: 'titulo',
|
|
76
77
|
subTitle: 'subtitulo',
|
|
77
78
|
open: open,
|
|
@@ -23,7 +23,7 @@ var _IconButton = _interopRequireDefault(require("../IconButton/IconButton"));
|
|
|
23
23
|
|
|
24
24
|
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
25
25
|
|
|
26
|
-
var _excluded = ["title", "id", "fullScreen", "sizeContainer", "buttonAccept", "successAction", "open", "requestClose", "loadingAction", "acceptAction", "bodyText", "bodyStyle", "hideAccept", "classNameDialog", "PaperProps", "widthModal", "isMobile", "tabs", "onChange", "titleStyles", "subTitle", "subTitleStyles", "endIcon", "propsButton", "style", "styles", "sx", "prefixClass", "direction", "variantTabs"];
|
|
26
|
+
var _excluded = ["title", "id", "fullScreen", "sizeContainer", "buttonAccept", "successAction", "open", "requestClose", "loadingAction", "acceptAction", "bodyText", "bodyStyle", "hideAccept", "classNameDialog", "PaperProps", "widthModal", "isMobile", "tabs", "onChange", "titleStyles", "subTitle", "subTitleStyles", "endIcon", "propsButton", "style", "styles", "sx", "prefixClass", "direction", "variantTabs", "disableBackdropClick"];
|
|
27
27
|
|
|
28
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
29
|
|
|
@@ -86,6 +86,7 @@ var DrawerPanel = function DrawerPanel(_ref) {
|
|
|
86
86
|
propPrefixClass = _ref.prefixClass,
|
|
87
87
|
direction = _ref.direction,
|
|
88
88
|
variantTabs = _ref.variantTabs,
|
|
89
|
+
disableBackdropClick = _ref.disableBackdropClick,
|
|
89
90
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
90
91
|
|
|
91
92
|
var _useDynamicStyles = (0, _useDynamicStyles2.default)(sx),
|
|
@@ -222,7 +223,9 @@ var DrawerPanel = function DrawerPanel(_ref) {
|
|
|
222
223
|
}, bodyText)), /*#__PURE__*/_react.default.createElement("div", {
|
|
223
224
|
className: "".concat(prefixClass('cbx-drawerPanel-backdrop'), " ").concat(isOpen && !isClosing ? prefixClass('cbx-drawerPanel-backdrop-open') : ''),
|
|
224
225
|
onClick: function onClick(e) {
|
|
225
|
-
|
|
226
|
+
if (!disableBackdropClick) {
|
|
227
|
+
closeDrawerPanel(e);
|
|
228
|
+
}
|
|
226
229
|
}
|
|
227
230
|
})), document.body);
|
|
228
231
|
};
|
|
@@ -220,6 +220,10 @@ var EnhancedTable = function EnhancedTable(_ref) {
|
|
|
220
220
|
|
|
221
221
|
return ((_translate$a$field = translate[a === null || a === void 0 ? void 0 : a[field]]) !== null && _translate$a$field !== void 0 ? _translate$a$field : '').localeCompare((_translate$b$field = translate[b === null || b === void 0 ? void 0 : b[field]]) !== null && _translate$b$field !== void 0 ? _translate$b$field : '');
|
|
222
222
|
});
|
|
223
|
+
} else if (type === 'date') {
|
|
224
|
+
decrescente = _toConsumableArray(dataFiltered).sort(function (a, b) {
|
|
225
|
+
return new Date(a === null || a === void 0 ? void 0 : a[field]) - new Date(b === null || b === void 0 ? void 0 : b[field]);
|
|
226
|
+
});
|
|
223
227
|
} else {
|
|
224
228
|
decrescente = _toConsumableArray(dataFiltered).sort(function (a, b) {
|
|
225
229
|
var _a$field$length, _a$field2, _b$field$length, _b$field2;
|
|
@@ -240,6 +244,10 @@ var EnhancedTable = function EnhancedTable(_ref) {
|
|
|
240
244
|
|
|
241
245
|
return ((_translate$b$field2 = translate[b === null || b === void 0 ? void 0 : b[field]]) !== null && _translate$b$field2 !== void 0 ? _translate$b$field2 : '').localeCompare((_translate$a$field2 = translate[a === null || a === void 0 ? void 0 : a[field]]) !== null && _translate$a$field2 !== void 0 ? _translate$a$field2 : '');
|
|
242
246
|
});
|
|
247
|
+
} else if (type === 'date') {
|
|
248
|
+
decrescente = _toConsumableArray(dataFiltered).sort(function (a, b) {
|
|
249
|
+
return new Date(b === null || b === void 0 ? void 0 : b[field]) - new Date(a === null || a === void 0 ? void 0 : a[field]);
|
|
250
|
+
});
|
|
243
251
|
} else {
|
|
244
252
|
decrescente = _toConsumableArray(dataFiltered).sort(function (a, b) {
|
|
245
253
|
var _b$field$length2, _b$field4, _a$field$length2, _a$field4;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
1
|
.cbx-inputAutocomplete-endAdornment {
|
|
3
2
|
margin-right: var(--spacing20) !important;
|
|
4
3
|
}
|
|
4
|
+
|
|
5
5
|
.cbx-inputAutocomplete-container:after {
|
|
6
6
|
position: absolute;
|
|
7
7
|
top: 1.313rem;
|
|
@@ -17,27 +17,27 @@
|
|
|
17
17
|
transition: .2s;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.cbx-inputAutocomplete-container-open.cbx-inputAutocomplete-container:after{
|
|
20
|
+
.cbx-inputAutocomplete-container-open.cbx-inputAutocomplete-container:after {
|
|
21
21
|
transform: rotate(180deg);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
.cbx-inputAutocomplete-icon-button {
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
opacity: 0;
|
|
27
|
+
transition: opacity 0.3s ease-in-out;
|
|
28
28
|
margin-right: var(--spacing20);
|
|
29
29
|
position: absolute !important;
|
|
30
30
|
right: .30rem;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
.cbx-inputAutocomplete-container:hover .cbx-inputAutocomplete-icon-button {
|
|
34
|
-
|
|
34
|
+
opacity: 1;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.cbx-inputAutocomplete-icon-button.disabled {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
cursor: not-allowed;
|
|
39
|
+
opacity: 0.5;
|
|
40
|
+
pointer-events: none;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.cbx-inputText-container-disabled.cbx-inputText-container-select.cbx-inputText-container:after {
|
|
@@ -83,11 +83,11 @@
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
.cbx-inputAutocomplete-options-container.cbx-inputAutocomplete-options-container-open {
|
|
86
|
-
|
|
86
|
+
animation: dropdownOpen 150ms ease-out forwards;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.cbx-inputAutocomplete-options-container.cbx-inputAutocomplete-options-container-close {
|
|
90
|
-
|
|
90
|
+
animation: dropdownClose 150ms ease-out forwards;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
.cbx-inputAutocomplete-presentation {
|
|
@@ -123,24 +123,30 @@
|
|
|
123
123
|
padding-right: 3.875rem;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
.cbx-inputText-container:not(:has(.cbx-inputAutocomplete-icon-button)) .cbx-inputText-autocomplete.shrink {
|
|
127
|
+
padding-right: 1rem;
|
|
128
|
+
}
|
|
129
|
+
|
|
126
130
|
@keyframes dropdownOpen {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
0% {
|
|
132
|
+
opacity: 0;
|
|
133
|
+
transform: scale(0.75, 0.5625);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
100% {
|
|
137
|
+
opacity: 1;
|
|
138
|
+
transform: scale(1, 1);
|
|
139
|
+
}
|
|
135
140
|
}
|
|
136
141
|
|
|
137
142
|
@keyframes dropdownClose {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
143
|
+
0% {
|
|
144
|
+
opacity: 1;
|
|
145
|
+
transform: scale(1, 1);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
100% {
|
|
149
|
+
opacity: 0;
|
|
150
|
+
transform: scale(0.75, 0.5625);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
@@ -29,7 +29,7 @@ var _autoDetectScroll = require("../../utils/autoDetectScroll");
|
|
|
29
29
|
|
|
30
30
|
var _utils = require("../../utils");
|
|
31
31
|
|
|
32
|
-
var _excluded = ["children", "className", "onChange", "onInputChange", "label", "value", "autoComplete", "inputValue", "style", "styles", "sx", "loadingText", "loading", "prefixClass", "options", "disabled", "getOptionLabel", "clearable", "getOptionSelected", "defaultValue", "filterOptions", "freeSolo", "InputProps", "clearOnBlur", "selectOnFocus"];
|
|
32
|
+
var _excluded = ["children", "className", "onChange", "onInputChange", "label", "value", "autoComplete", "inputValue", "style", "styles", "sx", "loadingText", "loading", "prefixClass", "options", "disabled", "getOptionLabel", "clearable", "getOptionSelected", "defaultValue", "filterOptions", "freeSolo", "InputProps", "clearOnBlur", "selectOnFocus", "id"];
|
|
33
33
|
|
|
34
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
35
|
|
|
@@ -105,6 +105,7 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
|
|
|
105
105
|
clearOnBlur = _ref$clearOnBlur === void 0 ? true : _ref$clearOnBlur,
|
|
106
106
|
_ref$selectOnFocus = _ref.selectOnFocus,
|
|
107
107
|
selectOnFocus = _ref$selectOnFocus === void 0 ? !freeSolo : _ref$selectOnFocus,
|
|
108
|
+
id = _ref.id,
|
|
108
109
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
109
110
|
|
|
110
111
|
var _React$useState = _react.default.useState(false),
|
|
@@ -324,7 +325,7 @@ var InputAutocomplete = function InputAutocomplete(_ref) {
|
|
|
324
325
|
style: _objectSpread(_objectSpread(_objectSpread({
|
|
325
326
|
width: props.fullWidth && '100%'
|
|
326
327
|
}, styles), style), stylesInLine),
|
|
327
|
-
id:
|
|
328
|
+
id: id,
|
|
328
329
|
ref: selectRef
|
|
329
330
|
}, /*#__PURE__*/_react.default.createElement(_InputText.default, _extends({
|
|
330
331
|
label: label,
|
|
@@ -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 _Timeline = _interopRequireDefault(require("./Timeline"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
var DesignTimeline = function DesignTimeline(_ref) {
|
|
17
|
+
var last = _ref.last;
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Timeline.default, null, "Timeline1"), /*#__PURE__*/_react.default.createElement(_Timeline.default, null, "Timeline2"), /*#__PURE__*/_react.default.createElement(_Timeline.default, {
|
|
19
|
+
last: last
|
|
20
|
+
}, "Timeline3"));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
DesignTimeline.displayName = "DesignTimeline";
|
|
24
|
+
var _default = DesignTimeline;
|
|
25
|
+
exports.default = _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.cbx-Timeline {
|
|
2
|
+
padding: 0;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
margin-top: 0;
|
|
6
|
+
margin-bottom: 1rem;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.cbx-Timeline-li {
|
|
10
|
+
display: flex;
|
|
11
|
+
position: relative;
|
|
12
|
+
list-style: none;
|
|
13
|
+
min-height: 70px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.cbx-Timeline-block {
|
|
17
|
+
flex: 0;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
list-style: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.cbx-Timeline-circle {
|
|
25
|
+
box-shadow: none;
|
|
26
|
+
border-color: var(--primary);
|
|
27
|
+
background-color: transparent;
|
|
28
|
+
display: flex;
|
|
29
|
+
padding: 4px;
|
|
30
|
+
align-self: baseline;
|
|
31
|
+
margin-top: 8px;
|
|
32
|
+
border-style: solid;
|
|
33
|
+
border-width: 2px;
|
|
34
|
+
border-radius: 50%;
|
|
35
|
+
margin-bottom: 8px;
|
|
36
|
+
list-style: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.cbx-Timeline-line {
|
|
40
|
+
width: 2px;
|
|
41
|
+
flex-grow: 1;
|
|
42
|
+
background-color: #bdbdbd;
|
|
43
|
+
list-style: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.cbx-Timeline-content {
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
padding: 0px 16px;
|
|
49
|
+
flex: 1;
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
list-style: none;
|
|
52
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
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("./Timeline.css");
|
|
13
|
+
|
|
14
|
+
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
15
|
+
|
|
16
|
+
var _excluded = ["sx", "style", "prefixClass", "className", "last", "children"];
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
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
|
+
|
|
32
|
+
var Timeline = function Timeline(_ref) {
|
|
33
|
+
var sx = _ref.sx,
|
|
34
|
+
style = _ref.style,
|
|
35
|
+
propPrefixClass = _ref.prefixClass,
|
|
36
|
+
className = _ref.className,
|
|
37
|
+
last = _ref.last,
|
|
38
|
+
children = _ref.children,
|
|
39
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
40
|
+
|
|
41
|
+
var _useDynamicStyles = (0, _useDynamicStyles2.default)(sx),
|
|
42
|
+
stylesInLine = _useDynamicStyles.stylesInLine,
|
|
43
|
+
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
44
|
+
|
|
45
|
+
var prefixClass = propPrefixClass || dynamicPrefixClass;
|
|
46
|
+
return /*#__PURE__*/_react.default.createElement("ul", _extends({
|
|
47
|
+
className: "".concat(prefixClass('cbx-Timeline'), " ").concat(className || ''),
|
|
48
|
+
style: _objectSpread(_objectSpread({}, style), stylesInLine)
|
|
49
|
+
}, props), /*#__PURE__*/_react.default.createElement("li", {
|
|
50
|
+
className: prefixClass('cbx-Timeline-li')
|
|
51
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
52
|
+
className: prefixClass('cbx-Timeline-block')
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
54
|
+
className: prefixClass('cbx-Timeline-circle')
|
|
55
|
+
}), !last && /*#__PURE__*/_react.default.createElement("span", {
|
|
56
|
+
className: prefixClass('cbx-Timeline-line')
|
|
57
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
+
className: prefixClass('cbx-Timeline-content')
|
|
59
|
+
}, children)));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
Timeline.displayName = "Timeline";
|
|
63
|
+
Timeline.propTypes = {
|
|
64
|
+
className: _propTypes.default.string,
|
|
65
|
+
last: _propTypes.default.bool
|
|
66
|
+
};
|
|
67
|
+
Timeline.defaultProps = {
|
|
68
|
+
className: '',
|
|
69
|
+
last: false
|
|
70
|
+
};
|
|
71
|
+
var _default = Timeline;
|
|
72
|
+
exports.default = _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.DesignTimelineTemplate = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _Timeline = _interopRequireDefault(require("./Timeline"));
|
|
11
|
+
|
|
12
|
+
var _DesignTimeline = _interopRequireDefault(require("./DesignTimeline.stories"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
var _default = {
|
|
17
|
+
title: 'Components/Timeline',
|
|
18
|
+
component: _Timeline.default,
|
|
19
|
+
parameters: {
|
|
20
|
+
storybookCodePanel: {
|
|
21
|
+
disabled: false,
|
|
22
|
+
files: [{
|
|
23
|
+
fileName: 'Timeline.js',
|
|
24
|
+
// eslint-disable-next-line import/no-webpack-loader-syntax, global-require, import/extensions, import/no-unresolved
|
|
25
|
+
code: require('!!raw-loader!./Timeline.jsx')
|
|
26
|
+
}, {
|
|
27
|
+
fileName: 'Timeline.css',
|
|
28
|
+
// eslint-disable-next-line import/no-webpack-loader-syntax, global-require, import/extensions, import/no-unresolved
|
|
29
|
+
code: require('!!raw-loader!./Timeline.css')
|
|
30
|
+
}]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.default = _default;
|
|
35
|
+
|
|
36
|
+
var Template = function Template(args) {
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement(_DesignTimeline.default, args);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
Template.displayName = "Template";
|
|
41
|
+
var DesignTimelineTemplate = Template.bind({});
|
|
42
|
+
exports.DesignTimelineTemplate = DesignTimelineTemplate;
|
|
43
|
+
DesignTimelineTemplate.parameters = {};
|
|
44
|
+
DesignTimelineTemplate.args = {};
|
|
@@ -23,13 +23,14 @@ var DesignIconButton = function DesignIconButton() {
|
|
|
23
23
|
style: {}
|
|
24
24
|
}, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
25
25
|
title: ""
|
|
26
|
-
}, /*#__PURE__*/_react.default.createElement("div", null, "\xA1Pasa el cursor sobre m\xED!"))), /*#__PURE__*/_react.default.createElement("div", {
|
|
26
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, "\xA1Pasa el cursor sobre m\xED! no tiene tooltip"))), /*#__PURE__*/_react.default.createElement("div", {
|
|
27
27
|
style: {
|
|
28
28
|
textAlign: 'right',
|
|
29
29
|
marginTop: '6rem'
|
|
30
30
|
}
|
|
31
31
|
}, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
32
|
-
|
|
32
|
+
open: true,
|
|
33
|
+
title: "222",
|
|
33
34
|
anchorOrigin: {
|
|
34
35
|
vertical: 'center',
|
|
35
36
|
horizontal: 'right'
|
|
@@ -356,7 +356,8 @@ var Tooltip = function Tooltip(_ref2) {
|
|
|
356
356
|
bottom = _getDefaultCoordinate.bottom;
|
|
357
357
|
|
|
358
358
|
setPopoverStyles(_objectSpread(_objectSpread({
|
|
359
|
-
position: 'absolute'
|
|
359
|
+
position: 'absolute',
|
|
360
|
+
height: 'fit-content'
|
|
360
361
|
}, bottom ? {
|
|
361
362
|
bottom: "".concat(bottom, "px")
|
|
362
363
|
} : {
|