@councilbox/councilbox-ui 2.0.28 → 2.0.30
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 +3 -0
- package/dist/components/ButtonBasic/ButtonBasic.css +2 -2
- package/dist/components/DropDown/DropDown.js +1 -1
- package/dist/components/EnhancedTable/EnhancedTable.js +29 -6
- package/dist/components/Header/DesignHeader.stories.js +1 -1
- package/dist/components/IconButton/IconButton.js +7 -2
- package/dist/components/MenuLateralRight/MenuLateralRight.css +83 -0
- package/dist/components/MenuLateralRight/MenuLateralRight.js +20 -8
- package/dist/components/PaginationFooter/PaginationFooter.js +39 -10
- package/dist/components/Stars/Stars.css +9 -8
- package/dist/components/Stars/Stars.js +1 -1
- package/package.json +1 -1
|
@@ -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.29 🎉
|
|
20
20
|
|
|
21
21
|
<h2>Componentes:</h2>
|
|
22
22
|
<div><a class='noStyles' href='/story/components-accordion--default'>Accordion</a></div>
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
.cbx-buttonBasic.cbx-primary:not(.cbx-buttonBasic-disabled):hover .cbx-buttonBasic-container span,
|
|
66
|
-
.cbx-buttonBasic.cbx-primary:hover .cbx-buttonBasic-container .cbx-buttonBasic-container-start-icon,
|
|
67
|
-
.cbx-buttonBasic.cbx-primary:hover .cbx-buttonBasic-container .cbx-buttonBasic-container-end-icon {
|
|
66
|
+
.cbx-buttonBasic.cbx-primary:not(.cbx-buttonBasic-disabled):hover .cbx-buttonBasic-container .cbx-buttonBasic-container-start-icon,
|
|
67
|
+
.cbx-buttonBasic.cbx-primary:not(.cbx-buttonBasic-disabled):hover .cbx-buttonBasic-container .cbx-buttonBasic-container-end-icon {
|
|
68
68
|
color: var(--accent);
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -378,7 +378,7 @@ var DropDown = function DropDown(_ref2) {
|
|
|
378
378
|
};
|
|
379
379
|
|
|
380
380
|
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
381
|
-
className: "cbx-dropdown-container ".concat(className || ''),
|
|
381
|
+
className: prefixClass("cbx-dropdown-container ".concat(className || '')),
|
|
382
382
|
style: _objectSpread(_objectSpread(_objectSpread({}, styles), style), stylesInLine)
|
|
383
383
|
}, props), /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
384
384
|
title: tooltip || '',
|
|
@@ -27,7 +27,9 @@ var _EnhancedTableHead = _interopRequireDefault(require("./EnhancedTableHead"));
|
|
|
27
27
|
|
|
28
28
|
var _PaginationFooter = _interopRequireDefault(require("../PaginationFooter/PaginationFooter"));
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
31
|
+
|
|
32
|
+
var _excluded = ["defaultFilter", "defaultLimit", "defaultOrder", "selectedCategories", "paperStyle", "refetch", "dataFiltered", "setDataFiltered", "options", "stickyHeader", "styleContainer", "translate", "isMobile", "sx", "prefixClass"];
|
|
31
33
|
|
|
32
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
35
|
|
|
@@ -77,8 +79,15 @@ var EnhancedTable = function EnhancedTable(_ref) {
|
|
|
77
79
|
styleContainer = _ref.styleContainer,
|
|
78
80
|
translate = _ref.translate,
|
|
79
81
|
isMobile = _ref.isMobile,
|
|
82
|
+
sx = _ref.sx,
|
|
83
|
+
propPrefixClass = _ref.prefixClass,
|
|
80
84
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
81
85
|
|
|
86
|
+
var _useDynamicStyles = (0, _useDynamicStyles2.default)(sx),
|
|
87
|
+
stylesInLine = _useDynamicStyles.stylesInLine,
|
|
88
|
+
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
89
|
+
|
|
90
|
+
var prefixClass = propPrefixClass || dynamicPrefixClass;
|
|
82
91
|
var actualPage = props.actualPage || (options ? options.offset / options.limit + 1 : null);
|
|
83
92
|
|
|
84
93
|
var initialState = _react.default.useRef({
|
|
@@ -266,52 +275,66 @@ var EnhancedTable = function EnhancedTable(_ref) {
|
|
|
266
275
|
|
|
267
276
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
268
277
|
className: "w-full",
|
|
269
|
-
style: _objectSpread({}, styleContainer)
|
|
278
|
+
style: _objectSpread(_objectSpread({}, styleContainer), stylesInLine)
|
|
270
279
|
}, !isMobile ? /*#__PURE__*/_react.default.createElement(_EnhancedMyTable.default, {
|
|
271
280
|
stickyHeader: stickyHeader,
|
|
272
281
|
style: {
|
|
273
282
|
maxWidth: '100%',
|
|
274
283
|
tableLayout: 'auto'
|
|
275
|
-
}
|
|
284
|
+
},
|
|
285
|
+
prefixClass: prefixClass
|
|
276
286
|
}, (headers === null || headers === void 0 ? void 0 : headers.length) > 0 && /*#__PURE__*/_react.default.createElement(_EnhancedTableHead.default, {
|
|
287
|
+
prefixClass: prefixClass,
|
|
277
288
|
sx: {
|
|
278
289
|
heigth: '48px'
|
|
279
290
|
}
|
|
280
291
|
}, /*#__PURE__*/_react.default.createElement(_EnhancedTableRow.default, {
|
|
292
|
+
prefixClass: prefixClass,
|
|
281
293
|
sx: {
|
|
282
294
|
background: '#fafafa'
|
|
283
295
|
}
|
|
284
296
|
}, headers.map(function (header, index) {
|
|
285
297
|
return header.selectAll ? /*#__PURE__*/_react.default.createElement(_EnhancedTableCell.default, {
|
|
298
|
+
prefixClass: prefixClass,
|
|
286
299
|
padding: header.padding,
|
|
287
300
|
key: "header_".concat(index)
|
|
288
301
|
}, header.selectAll) : /*#__PURE__*/_react.default.createElement(_EnhancedTableCell.default, {
|
|
302
|
+
prefixClass: prefixClass,
|
|
289
303
|
padding: header.padding,
|
|
290
304
|
key: "header_".concat(index),
|
|
291
305
|
sortDirection: state.orderDirection
|
|
292
306
|
}, header.canOrder && /*#__PURE__*/_react.default.createElement(_EnhancedTableSortLabel.default, {
|
|
307
|
+
prefixClass: prefixClass,
|
|
293
308
|
active: header.name === orderBy,
|
|
294
309
|
direction: orderDirection,
|
|
295
310
|
onClick: function onClick() {
|
|
296
311
|
return updateOrderBy(header.name);
|
|
297
312
|
}
|
|
298
313
|
}, header.text), header.canOrderByArray && /*#__PURE__*/_react.default.createElement(_EnhancedTableSortLabel.default, {
|
|
314
|
+
prefixClass: prefixClass,
|
|
299
315
|
active: header.name === orderBy,
|
|
300
316
|
direction: orderDirection,
|
|
301
317
|
onClick: function onClick() {
|
|
302
318
|
return orderByArray(header.name, header.typeof);
|
|
303
319
|
}
|
|
304
320
|
}, header.text), !header.canOrderByArray && !header.canOrder && header.text);
|
|
305
|
-
}))), /*#__PURE__*/_react.default.createElement(_EnhancedTableBody.default,
|
|
321
|
+
}))), /*#__PURE__*/_react.default.createElement(_EnhancedTableBody.default, {
|
|
322
|
+
prefixClass: prefixClass
|
|
323
|
+
}, !loading && children)) : children, loading && /*#__PURE__*/_react.default.createElement("div", {
|
|
306
324
|
style: {
|
|
307
325
|
marginTop: '3em'
|
|
308
326
|
}
|
|
309
|
-
}, /*#__PURE__*/_react.default.createElement(_LoadingSection.default,
|
|
327
|
+
}, /*#__PURE__*/_react.default.createElement(_LoadingSection.default, {
|
|
328
|
+
prefixClass: prefixClass
|
|
329
|
+
})), !loading && !props.hidePagination && /*#__PURE__*/_react.default.createElement(_Grid.default, {
|
|
330
|
+
prefixClass: prefixClass,
|
|
310
331
|
style: {
|
|
311
332
|
fontSize: '0.9em',
|
|
312
333
|
marginTop: '1em'
|
|
313
|
-
}
|
|
334
|
+
},
|
|
335
|
+
className: prefixClass('cbx-pagination-container-footer')
|
|
314
336
|
}, /*#__PURE__*/_react.default.createElement(_PaginationFooter.default, {
|
|
337
|
+
prefixClass: prefixClass,
|
|
315
338
|
page: page,
|
|
316
339
|
translate: translate,
|
|
317
340
|
length: length,
|
|
@@ -20,7 +20,7 @@ var DesignHeader = function DesignHeader() {
|
|
|
20
20
|
title: 'título aquí',
|
|
21
21
|
itemsDropDownUser: /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
22
22
|
key: "1"
|
|
23
|
-
}, "
|
|
23
|
+
}, "Loremq ipsum dolor"), /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
24
24
|
key: "2"
|
|
25
25
|
}, "Lorem ipsum dolor"), /*#__PURE__*/_react.default.createElement(_MenuItem.default, {
|
|
26
26
|
key: "3"
|
|
@@ -21,7 +21,7 @@ var _Typography = _interopRequireDefault(require("../Typography/Typography"));
|
|
|
21
21
|
|
|
22
22
|
var _Tooltip = _interopRequireDefault(require("../Tooltip/Tooltip"));
|
|
23
23
|
|
|
24
|
-
var _excluded = ["id", "className", "onClick", "icon", "backgroundColor", "styles", "style", "badge", "classNameBadge", "rounded", "tooltip", "placementTooltip", "disabled", "hoverColor", "type", "inModal", "prefixClass", "sx", "active", "text", "variant", "fontWeight", "textVisibleMenuMobile", "stylesText", "progress", "progressAuto", "colorProgress"];
|
|
24
|
+
var _excluded = ["id", "className", "onClick", "icon", "backgroundColor", "styles", "style", "badge", "classNameBadge", "rounded", "tooltip", "placementTooltip", "disabled", "hoverColor", "type", "inModal", "prefixClass", "sx", "active", "text", "variant", "fontWeight", "textVisibleMenuMobile", "stylesText", "progress", "progressAuto", "colorProgress", "secondaryFont", "colorActive", "color"];
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
@@ -77,6 +77,9 @@ var IconButton = function IconButton(_ref) {
|
|
|
77
77
|
progress = _ref.progress,
|
|
78
78
|
progressAuto = _ref.progressAuto,
|
|
79
79
|
colorProgress = _ref.colorProgress,
|
|
80
|
+
secondaryFont = _ref.secondaryFont,
|
|
81
|
+
colorActive = _ref.colorActive,
|
|
82
|
+
color = _ref.color,
|
|
80
83
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
81
84
|
|
|
82
85
|
var _useDynamicStyles = (0, _useDynamicStyles2.default)(sx),
|
|
@@ -114,8 +117,10 @@ var IconButton = function IconButton(_ref) {
|
|
|
114
117
|
}
|
|
115
118
|
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
116
119
|
variant: variant || 'XS',
|
|
117
|
-
color: active ? 'var(--primary)' : 'var(--gray3)',
|
|
120
|
+
color: active ? colorActive || 'var(--primary)' : color || 'var(--gray3)',
|
|
118
121
|
fontWeight: fontWeight,
|
|
122
|
+
secondaryFont: secondaryFont,
|
|
123
|
+
prefixClass: prefixClass,
|
|
119
124
|
styles: _objectSpread({
|
|
120
125
|
overflow: 'hidden',
|
|
121
126
|
whiteSpace: 'nowrap',
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
width: 4.75rem;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
.cbx-menuLateralRight-block-expanded {
|
|
8
|
+
height: 100%;
|
|
9
|
+
min-width: 18rem !important;
|
|
10
|
+
width: 18rem !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
7
13
|
.cbx-menuLateralRight-block-resize {
|
|
8
14
|
min-width: var(--spacing64);
|
|
9
15
|
width: var(--spacing64);
|
|
@@ -26,6 +32,10 @@
|
|
|
26
32
|
background: var(--gray1);
|
|
27
33
|
}
|
|
28
34
|
|
|
35
|
+
.cbx-menuLateralRight-block-expanded {
|
|
36
|
+
background: var(--white);
|
|
37
|
+
}
|
|
38
|
+
|
|
29
39
|
.cbx-menuLateralRight-block-mobile,
|
|
30
40
|
.cbx-menuLateralRight-block-upper-mobile,
|
|
31
41
|
.cbx-menuLateralRight-icon-burguer-mobile,
|
|
@@ -107,4 +117,77 @@
|
|
|
107
117
|
width: 2.5rem;
|
|
108
118
|
height: 2.5rem;
|
|
109
119
|
background: transparent;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.cbx-menuLateralRight-block-expanded .cbx-menuLateralRight-block-upper {
|
|
123
|
+
margin-top: 1.5rem;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.cbx-menuLateralRight-block-expanded div div .cbx-IconButton-active {
|
|
127
|
+
background: var(--gray1);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.cbx-menuLateralRight-block-expanded div div .cbx-IconButton-squareButton {
|
|
131
|
+
width: 100% !important;
|
|
132
|
+
flex-direction: row;
|
|
133
|
+
height: 5rem !important;
|
|
134
|
+
padding: 1.5rem;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.cbx-menuLateralRight-block-expanded div div .cbx-IconButton-squareButton .cbx-IconButton-containerBadge {
|
|
138
|
+
display: flex;
|
|
139
|
+
align-items: center;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.cbx-menuLateralRight-block-expanded div div .cbx-IconButton-squareButton:not(.cbx-IconButton-active) i {
|
|
143
|
+
color: var(--gray4)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.cbx-menuLateralRight-block-expanded div div .cbx-IconButton-squareButton i {
|
|
147
|
+
margin-right: 1.25rem;
|
|
148
|
+
font-size: 2rem;
|
|
149
|
+
transition: .2s;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.cbx-menuLateralRight-block-expanded div div .cbx-IconButton-squareButton div p {
|
|
153
|
+
font-size: 18px !important;
|
|
154
|
+
font-weight: 700;
|
|
155
|
+
text-align: left;
|
|
156
|
+
transition: .2s;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.cbx-menuLateralRight-block-expanded div div .cbx-IconButton-squareButton.cbx-IconButton-active {
|
|
160
|
+
border: none;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.cbx-menuLateralRight-block-expanded div div .cbx-IconButton-squareButton {
|
|
164
|
+
border-top: 1px solid var(--gray2);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.cbx-menuLateralRight-block-expanded div div:last-child .cbx-IconButton-squareButton {
|
|
168
|
+
border-bottom: 1px solid var(--gray2);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.cbx-menuLateralRight-block-expanded div div:has(.cbx-IconButton-squareButton.cbx-IconButton-active)+div .cbx-IconButton-squareButton {
|
|
172
|
+
border-top: none;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.cbx-menuLateralRight-block-expanded .cbx-menuLateralRight-container-under {
|
|
176
|
+
padding-left: 1.5rem;
|
|
177
|
+
justify-content: flex-start;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.cbx-menuLateralRight-block-expanded .cbx-menuLateralRight-container-under .cbx-IconButton i{
|
|
181
|
+
font-size: 2rem;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.cbx-menuLateralRight-block-expanded .cbx-menuLateralRight-container-under .cbx-IconButton {
|
|
185
|
+
margin-right: 0.75rem;
|
|
186
|
+
width: var(--spacing64);
|
|
187
|
+
height: var(--spacing64);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.cbx-menuLateralRight-block-expanded .cbx-menuLateralRight-container-under .cbx-menuLateralRight-text-under {
|
|
191
|
+
display: flex;
|
|
192
|
+
align-items: center;
|
|
110
193
|
}
|
|
@@ -45,7 +45,8 @@ var MenuLateralRight = function MenuLateralRight(_ref) {
|
|
|
45
45
|
textVisibleMenuMobile = _ref.textVisibleMenuMobile,
|
|
46
46
|
sx = _ref.sx,
|
|
47
47
|
style = _ref.style,
|
|
48
|
-
textIconButtonMore = _ref.textIconButtonMore
|
|
48
|
+
textIconButtonMore = _ref.textIconButtonMore,
|
|
49
|
+
expanded = _ref.expanded;
|
|
49
50
|
|
|
50
51
|
var _useDynamicStyles = (0, _useDynamicStyles2.default)(sx),
|
|
51
52
|
stylesInLine = _useDynamicStyles.stylesInLine,
|
|
@@ -75,7 +76,7 @@ var MenuLateralRight = function MenuLateralRight(_ref) {
|
|
|
75
76
|
|
|
76
77
|
return /*#__PURE__*/_react.default.createElement("nav", {
|
|
77
78
|
id: id,
|
|
78
|
-
className: mobile ? prefixClass('cbx-menuLateralRight-block-mobile') : prefixClass("cbx-menuLateralRight-block ".concat(resize() ? 'cbx-menuLateralRight-block-resize' : '')),
|
|
79
|
+
className: mobile ? prefixClass('cbx-menuLateralRight-block-mobile') : prefixClass("cbx-menuLateralRight-block ".concat(resize() ? 'cbx-menuLateralRight-block-resize' : '', " ").concat(expanded && !resize() ? 'cbx-menuLateralRight-block-expanded' : '')),
|
|
79
80
|
style: _objectSpread(_objectSpread({}, style), stylesInLine)
|
|
80
81
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
81
82
|
className: prefixClass(mobile ? 'cbx-menuLateralRight-block-upper-mobile' : 'cbx-menuLateralRight-block-upper')
|
|
@@ -170,9 +171,10 @@ var MenuLateralRight = function MenuLateralRight(_ref) {
|
|
|
170
171
|
})
|
|
171
172
|
})) : upperSection === null || upperSection === void 0 ? void 0 : upperSection.map(function (item, index) {
|
|
172
173
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
173
|
-
key: "upper-section-".concat(index)
|
|
174
|
+
key: "upper-section-".concat(index),
|
|
175
|
+
className: prefixClass("cbx-menuLateralRight-containerItem-upper ".concat(item.active ? 'active' : ''))
|
|
174
176
|
}, /*#__PURE__*/_react.default.createElement(_IconButtonSquare.default, {
|
|
175
|
-
icon: item.icon,
|
|
177
|
+
icon: expanded ? item.active ? item.iconActive || item.icon : item.icon : item.icon,
|
|
176
178
|
text: !mobile && item.text,
|
|
177
179
|
tooltip: item.text,
|
|
178
180
|
active: item.active,
|
|
@@ -183,7 +185,9 @@ var MenuLateralRight = function MenuLateralRight(_ref) {
|
|
|
183
185
|
width: 'var(--spacing64)',
|
|
184
186
|
height: 'var(--spacing64)'
|
|
185
187
|
} : {}),
|
|
186
|
-
sx: item.sx
|
|
188
|
+
sx: item.sx,
|
|
189
|
+
secondaryFont: expanded,
|
|
190
|
+
color: expanded && 'var(--gray4)'
|
|
187
191
|
}));
|
|
188
192
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
189
193
|
className: prefixClass(mobile ? 'cbx-menuLateralRight-block-under-mobile' : 'cbx-menuLateralRight-block-under')
|
|
@@ -219,7 +223,13 @@ var MenuLateralRight = function MenuLateralRight(_ref) {
|
|
|
219
223
|
} : {}),
|
|
220
224
|
sx: item.sx,
|
|
221
225
|
rounded: true
|
|
222
|
-
}))
|
|
226
|
+
}), expanded && !mobile && !resize() && /*#__PURE__*/_react.default.createElement("div", {
|
|
227
|
+
className: prefixClass('cbx-menuLateralRight-text-under')
|
|
228
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
229
|
+
variant: 'L',
|
|
230
|
+
fontWeight: 'bold',
|
|
231
|
+
color: 'var(--gray4)'
|
|
232
|
+
}, item.text)));
|
|
223
233
|
})));
|
|
224
234
|
};
|
|
225
235
|
|
|
@@ -231,7 +241,8 @@ MenuLateralRight.propTypes = {
|
|
|
231
241
|
underSection: _propTypes.default.array,
|
|
232
242
|
buttonVideo: _propTypes.default.object,
|
|
233
243
|
noCollapseUpperSection: _propTypes.default.bool,
|
|
234
|
-
textVisibleMenuMobile: _propTypes.default.bool
|
|
244
|
+
textVisibleMenuMobile: _propTypes.default.bool,
|
|
245
|
+
expanded: _propTypes.default.bool
|
|
235
246
|
};
|
|
236
247
|
MenuLateralRight.defaultProps = {
|
|
237
248
|
id: '',
|
|
@@ -240,7 +251,8 @@ MenuLateralRight.defaultProps = {
|
|
|
240
251
|
underSection: [],
|
|
241
252
|
buttonVideo: {},
|
|
242
253
|
noCollapseUpperSection: false,
|
|
243
|
-
textVisibleMenuMobile: false
|
|
254
|
+
textVisibleMenuMobile: false,
|
|
255
|
+
expanded: false
|
|
244
256
|
};
|
|
245
257
|
var _default = MenuLateralRight;
|
|
246
258
|
exports.default = _default;
|
|
@@ -15,6 +15,8 @@ var _MenuItem = _interopRequireDefault(require("../MenuItem/MenuItem"));
|
|
|
15
15
|
|
|
16
16
|
var _SelectInput = _interopRequireDefault(require("../SelectInput/SelectInput"));
|
|
17
17
|
|
|
18
|
+
var _useDynamicStyles4 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
|
|
19
|
+
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
21
|
|
|
20
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; }
|
|
@@ -53,7 +55,12 @@ var paginationButtonStyle = {
|
|
|
53
55
|
transition: '.2s'
|
|
54
56
|
};
|
|
55
57
|
|
|
56
|
-
var showPages = function showPages(numPages, active, changePage, classes, isChangingPage) {
|
|
58
|
+
var showPages = function showPages(numPages, active, changePage, classes, isChangingPage, sx, propPrefixClass) {
|
|
59
|
+
var _useDynamicStyles = (0, _useDynamicStyles4.default)(sx),
|
|
60
|
+
stylesInLine = _useDynamicStyles.stylesInLine,
|
|
61
|
+
dynamicPrefixClass = _useDynamicStyles.prefixClass;
|
|
62
|
+
|
|
63
|
+
var prefixClass = propPrefixClass || dynamicPrefixClass;
|
|
57
64
|
var pages = [];
|
|
58
65
|
|
|
59
66
|
var _loop = function _loop(_i) {
|
|
@@ -74,12 +81,13 @@ var showPages = function showPages(numPages, active, changePage, classes, isChan
|
|
|
74
81
|
}
|
|
75
82
|
|
|
76
83
|
pages.push( /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
77
|
-
style: {
|
|
84
|
+
style: _objectSpread({
|
|
78
85
|
width: '3rem'
|
|
79
|
-
}
|
|
86
|
+
}, stylesInLine)
|
|
80
87
|
}, /*#__PURE__*/_react.default.createElement(_SelectInput.default, {
|
|
81
88
|
variant: "standard",
|
|
82
89
|
autoWidth: true,
|
|
90
|
+
prefixClass: prefixClass,
|
|
83
91
|
disabled: isChangingPage,
|
|
84
92
|
value: active,
|
|
85
93
|
renderValue: function renderValue() {
|
|
@@ -131,9 +139,18 @@ var showPages = function showPages(numPages, active, changePage, classes, isChan
|
|
|
131
139
|
return pages;
|
|
132
140
|
};
|
|
133
141
|
|
|
134
|
-
var showPagesMobile = function showPagesMobile(numPages, active, changePage) {
|
|
142
|
+
var showPagesMobile = function showPagesMobile(numPages, active, changePage, sx, propPrefixClass) {
|
|
143
|
+
var _useDynamicStyles2 = (0, _useDynamicStyles4.default)(sx),
|
|
144
|
+
stylesInLine = _useDynamicStyles2.stylesInLine,
|
|
145
|
+
dynamicPrefixClass = _useDynamicStyles2.prefixClass;
|
|
146
|
+
|
|
147
|
+
var prefixClass = propPrefixClass || dynamicPrefixClass;
|
|
148
|
+
|
|
135
149
|
if (numPages > 1) {
|
|
136
|
-
return /*#__PURE__*/_react.default.createElement("div",
|
|
150
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
151
|
+
style: _objectSpread({}, stylesInLine)
|
|
152
|
+
}, /*#__PURE__*/_react.default.createElement(_SelectInput.default, {
|
|
153
|
+
prefixClass: prefixClass,
|
|
137
154
|
value: active,
|
|
138
155
|
onChange: function onChange(event) {
|
|
139
156
|
return changePage(event.target.value);
|
|
@@ -163,13 +180,23 @@ var PaginationFooter = function PaginationFooter(_ref) {
|
|
|
163
180
|
xs = _ref.xs,
|
|
164
181
|
changePage = _ref.changePage,
|
|
165
182
|
isChangingPage = _ref.isChangingPage,
|
|
166
|
-
isMobile = _ref.isMobile
|
|
183
|
+
isMobile = _ref.isMobile,
|
|
184
|
+
sx = _ref.sx,
|
|
185
|
+
propPrefixClass = _ref.prefixClass;
|
|
186
|
+
|
|
187
|
+
var _useDynamicStyles3 = (0, _useDynamicStyles4.default)(sx),
|
|
188
|
+
stylesInLine = _useDynamicStyles3.stylesInLine,
|
|
189
|
+
dynamicPrefixClass = _useDynamicStyles3.prefixClass;
|
|
190
|
+
|
|
191
|
+
var prefixClass = propPrefixClass || dynamicPrefixClass;
|
|
167
192
|
var totalPages = Math.ceil(total / limit);
|
|
168
193
|
|
|
169
194
|
var footerLength = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, total && length > 0 && "".concat((page - 1) * limit + 1, " ", '-', " ").concat((page - 1) * limit + length, " ").concat(translate === null || translate === void 0 ? void 0 : translate.of, " ").concat(total), length < 1 && " - ".concat(translate === null || translate === void 0 ? void 0 : translate.table_no_results));
|
|
170
195
|
|
|
171
196
|
if (isMobile) {
|
|
172
|
-
return /*#__PURE__*/_react.default.createElement("div",
|
|
197
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
198
|
+
style: _objectSpread({}, stylesInLine)
|
|
199
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, footerLength), /*#__PURE__*/_react.default.createElement("div", {
|
|
173
200
|
style: {
|
|
174
201
|
marginTop: '0.6em',
|
|
175
202
|
display: 'flex',
|
|
@@ -190,10 +217,11 @@ var PaginationFooter = function PaginationFooter(_ref) {
|
|
|
190
217
|
style: {
|
|
191
218
|
display: 'flex'
|
|
192
219
|
}
|
|
193
|
-
}, showPagesMobile(totalPages, page, changePage)))));
|
|
220
|
+
}, showPagesMobile(totalPages, page, changePage, prefixClass)))));
|
|
194
221
|
}
|
|
195
222
|
|
|
196
223
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_GridItem.default, {
|
|
224
|
+
prefixClass: prefixClass,
|
|
197
225
|
xs: window.innerWidth < 480 ? 12 : xs || 12,
|
|
198
226
|
lg: lg || 12,
|
|
199
227
|
md: md || 12,
|
|
@@ -214,13 +242,14 @@ var PaginationFooter = function PaginationFooter(_ref) {
|
|
|
214
242
|
}, /*#__PURE__*/_react.default.createElement(_LoadingSection.default, {
|
|
215
243
|
size: 16
|
|
216
244
|
})))), totalPages > 1 && /*#__PURE__*/_react.default.createElement(_GridItem.default, {
|
|
245
|
+
prefixClass: prefixClass,
|
|
217
246
|
xs: window.innerWidth < 480 ? 12 : xs || 12,
|
|
218
247
|
lg: lg || 12,
|
|
219
248
|
md: md || 12,
|
|
220
|
-
style: {
|
|
249
|
+
style: _objectSpread({
|
|
221
250
|
display: 'flex',
|
|
222
251
|
justifyContent: 'center'
|
|
223
|
-
}
|
|
252
|
+
}, stylesInLine)
|
|
224
253
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
225
254
|
style: {
|
|
226
255
|
display: 'flex',
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
color: var(--primary);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.cbx-rating.secondary>input:checked~label {
|
|
40
|
+
.cbx-rating.cbx-rating-secondary>input:checked~label {
|
|
41
41
|
color: var(--secondary);
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
color: var(--primary);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.cbx-rating.secondary:not(:checked)>label:hover,
|
|
50
|
-
.cbx-rating.secondary:not(:checked)>label:hover~label {
|
|
49
|
+
.cbx-rating.cbx-rating-secondary:not(:checked)>label:hover,
|
|
50
|
+
.cbx-rating.cbx-rating-secondary:not(:checked)>label:hover~label {
|
|
51
51
|
color: var(--secondary);
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
color: var(--primary);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
.cbx-rating.secondary>input:checked+label:hover,
|
|
63
|
-
.cbx-rating.secondary>input:checked+label:hover~label,
|
|
64
|
-
.cbx-rating.secondary>input:checked~label:hover,
|
|
65
|
-
.cbx-rating.secondary>input:checked~label:hover~label,
|
|
66
|
-
.cbx-rating.secondary>label:hover~input:checked~label {
|
|
62
|
+
.cbx-rating.cbx-rating-secondary>input:checked+label:hover,
|
|
63
|
+
.cbx-rating.cbx-rating-secondary>input:checked+label:hover~label,
|
|
64
|
+
.cbx-rating.cbx-rating-secondary>input:checked~label:hover,
|
|
65
|
+
.cbx-rating.cbx-rating-secondary>input:checked~label:hover~label,
|
|
66
|
+
.cbx-rating.cbx-rating-secondary>label:hover~input:checked~label {
|
|
67
67
|
color: var(--secondary);
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -99,6 +99,7 @@
|
|
|
99
99
|
|
|
100
100
|
.cbx-rating-disabled:not(:checked)>label.cbx-lowStars {
|
|
101
101
|
font-size: 200%;
|
|
102
|
+
width: 2.125rem;
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
.cbx-rating-disabled:not(:checked)>label:before {
|
|
@@ -59,7 +59,7 @@ var Stars = function Stars(_ref) {
|
|
|
59
59
|
}, style), stylesInLine),
|
|
60
60
|
className: prefixClass('cbx-RatingStarts')
|
|
61
61
|
}, /*#__PURE__*/_react.default.createElement("fieldset", {
|
|
62
|
-
className: prefixClass(disabled ? 'cbx-rating-disabled' : "cbx-rating ".concat(variant === 'secondary' ?
|
|
62
|
+
className: prefixClass(disabled ? 'cbx-rating-disabled' : "cbx-rating ".concat(variant === 'secondary' ? 'cbx-rating-secondary' : '')),
|
|
63
63
|
"aria-label": "Fieldset stars"
|
|
64
64
|
}, /*#__PURE__*/_react.default.createElement("legend", {
|
|
65
65
|
className: "cbx-rating-legend-hidden"
|