@councilbox/councilbox-ui 0.6.15 → 0.6.17
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 +13 -0
- package/dist/components/Block/Block.css +0 -2
- package/dist/components/IconButtonSquare/IconButtonSquare.css +21 -1
- package/dist/components/IconButtonSquare/IconButtonSquare.js +12 -5
- package/dist/components/MenuLateralRight/MenuLateralRight.js +23 -6
- package/dist/components/Tabs/Tabs.js +12 -3
- package/package.json +1 -1
|
@@ -24,6 +24,19 @@ a.noStyles:hover{
|
|
|
24
24
|
<h2>v0.5.4</h2>
|
|
25
25
|
<div>Fix zIndex label InputText y SelectInput</div>
|
|
26
26
|
</div>
|
|
27
|
+
<h2>v0.6.17</h2>
|
|
28
|
+
<div>Nueva variante en los Tab permite fullwidth y scrollable</div>
|
|
29
|
+
|
|
30
|
+
<h2>v0.6.16</h2>
|
|
31
|
+
<div>Cambios padding en block</div>
|
|
32
|
+
<div>Texto en el MenuLateralRight en formato mobile</div>
|
|
33
|
+
<div>Cambio de tamaño de botones MenuLateralRight en formato mobile</div>
|
|
34
|
+
<div>Nueva prop en iconButtonSquare</div>
|
|
35
|
+
|
|
36
|
+
<h2>v0.6.15</h2>
|
|
37
|
+
<div>Cambios padding en block</div>
|
|
38
|
+
<div>Cambios Button en DrawerPanel</div>
|
|
39
|
+
|
|
27
40
|
<h2>v0.6.14</h2>
|
|
28
41
|
<div>fix error en Autocomplete</div>
|
|
29
42
|
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
background: var(--error);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
.cbx-iconButtonSquare-container.menuMobile .cbx-iconButtonSquare-red-dot {
|
|
12
|
+
right: -.625rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
11
15
|
.cbx-iconButtonSquare-red-dot-noText {
|
|
12
16
|
right: -0.813rem;
|
|
13
17
|
}
|
|
@@ -15,9 +19,25 @@
|
|
|
15
19
|
.cbx-iconButtonSquare-containerIcon {
|
|
16
20
|
font-size: 1.5rem;
|
|
17
21
|
position: relative;
|
|
18
|
-
color: var(--gray3)
|
|
22
|
+
color: var(--gray3);
|
|
19
23
|
}
|
|
20
24
|
|
|
21
25
|
.cbx-iconButtonSquare-containerIcon-active {
|
|
22
26
|
color: var(--primary)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.cbx-iconButtonSquare-container.menuMobile{
|
|
30
|
+
text-align: center;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
width: 100%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.cbx-iconButtonSquare-container.menuMobile .cbx-iconButtonSquare-containerIcon {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
width: 1.5rem;
|
|
42
|
+
height: 1.5rem;
|
|
23
43
|
}
|
|
@@ -37,7 +37,10 @@ var IconButtonSquare = function IconButtonSquare(_ref) {
|
|
|
37
37
|
onClick = _ref.onClick,
|
|
38
38
|
styles = _ref.styles,
|
|
39
39
|
tooltip = _ref.tooltip,
|
|
40
|
-
placementTooltip = _ref.placementTooltip
|
|
40
|
+
placementTooltip = _ref.placementTooltip,
|
|
41
|
+
variant = _ref.variant,
|
|
42
|
+
fontWeight = _ref.fontWeight,
|
|
43
|
+
textVisibleMenuMobile = _ref.textVisibleMenuMobile;
|
|
41
44
|
|
|
42
45
|
var rippleRef = _react.default.useRef(null);
|
|
43
46
|
|
|
@@ -60,7 +63,8 @@ var IconButtonSquare = function IconButtonSquare(_ref) {
|
|
|
60
63
|
borderRadius: '0',
|
|
61
64
|
'&:focus': {
|
|
62
65
|
outline: 'none!important'
|
|
63
|
-
}
|
|
66
|
+
},
|
|
67
|
+
padding: textVisibleMenuMobile && '8px 20px'
|
|
64
68
|
}, styles),
|
|
65
69
|
onClick: onClick
|
|
66
70
|
}, /*#__PURE__*/_react.default.createElement(_TouchRipple.default, {
|
|
@@ -69,18 +73,21 @@ var IconButtonSquare = function IconButtonSquare(_ref) {
|
|
|
69
73
|
}), /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
70
74
|
title: tooltip || '',
|
|
71
75
|
placement: placementTooltip
|
|
72
|
-
}, /*#__PURE__*/_react.default.createElement("div",
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
77
|
+
className: "cbx-iconButtonSquare-container ".concat(textVisibleMenuMobile ? 'menuMobile' : '')
|
|
78
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
73
79
|
className: "cbx-iconButtonSquare-containerIcon ".concat(active ? 'cbx-iconButtonSquare-containerIcon-active' : '')
|
|
74
80
|
}, badge && /*#__PURE__*/_react.default.createElement("div", {
|
|
75
81
|
className: "cbx-iconButtonSquare-red-dot ".concat(text ? '' : 'cbx-iconButtonSquare-red-dot-noText')
|
|
76
82
|
}), icon), text && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
77
|
-
variant: 'XS',
|
|
83
|
+
variant: variant || 'XS',
|
|
78
84
|
color: active ? 'var(--primary)' : 'var(--gray3)',
|
|
85
|
+
fontWeight: fontWeight,
|
|
79
86
|
styles: {
|
|
80
87
|
overflow: 'hidden',
|
|
81
88
|
whiteSpace: 'nowrap',
|
|
82
89
|
textOverflow: 'ellipsis',
|
|
83
|
-
maxWidth: '3.25rem'
|
|
90
|
+
maxWidth: textVisibleMenuMobile ? '4.5rem' : '3.25rem'
|
|
84
91
|
}
|
|
85
92
|
}, text)))));
|
|
86
93
|
};
|
|
@@ -39,7 +39,8 @@ var MenuLateralRight = function MenuLateralRight(_ref) {
|
|
|
39
39
|
underSection = _ref.underSection,
|
|
40
40
|
mobile = _ref.mobile,
|
|
41
41
|
buttonVideo = _ref.buttonVideo,
|
|
42
|
-
noCollapseUpperSection = _ref.noCollapseUpperSection
|
|
42
|
+
noCollapseUpperSection = _ref.noCollapseUpperSection,
|
|
43
|
+
textVisibleMenuMobile = _ref.textVisibleMenuMobile;
|
|
43
44
|
|
|
44
45
|
var _useWindowSize = (0, _useWindowSize2.default)(),
|
|
45
46
|
innerWidth = _useWindowSize.innerWidth,
|
|
@@ -77,8 +78,12 @@ var MenuLateralRight = function MenuLateralRight(_ref) {
|
|
|
77
78
|
active: buttonVideo.active,
|
|
78
79
|
onClick: buttonVideo.action,
|
|
79
80
|
badge: buttonVideo.badge,
|
|
81
|
+
text: mobile && textVisibleMenuMobile && buttonVideo.text,
|
|
82
|
+
variant: mobile && textVisibleMenuMobile && 'M',
|
|
83
|
+
fontWeight: mobile && textVisibleMenuMobile && '700',
|
|
84
|
+
textVisibleMenuMobile: mobile && textVisibleMenuMobile,
|
|
80
85
|
styles: _objectSpread({}, resize() ? {
|
|
81
|
-
width: 'var(--spacing64)',
|
|
86
|
+
width: mobile && textVisibleMenuMobile ? 'var(--spacing112)' : 'var(--spacing64)',
|
|
82
87
|
height: 'var(--spacing64)'
|
|
83
88
|
} : {})
|
|
84
89
|
}), noCollapseUpperSection ? upperSection === null || upperSection === void 0 ? void 0 : upperSection.map(function (item, index) {
|
|
@@ -88,8 +93,12 @@ var MenuLateralRight = function MenuLateralRight(_ref) {
|
|
|
88
93
|
active: buttonVideo.active ? false : item.active,
|
|
89
94
|
onClick: item.action,
|
|
90
95
|
badge: item.badge,
|
|
96
|
+
text: mobile && textVisibleMenuMobile && item.text,
|
|
97
|
+
variant: mobile && textVisibleMenuMobile && 'M',
|
|
98
|
+
fontWeight: mobile && textVisibleMenuMobile && '700',
|
|
99
|
+
textVisibleMenuMobile: mobile && textVisibleMenuMobile,
|
|
91
100
|
styles: _objectSpread({}, resize() ? {
|
|
92
|
-
width: 'var(--spacing64)',
|
|
101
|
+
width: mobile && textVisibleMenuMobile ? 'var(--spacing112)' : 'var(--spacing64)',
|
|
93
102
|
height: 'var(--spacing64)'
|
|
94
103
|
} : {})
|
|
95
104
|
});
|
|
@@ -98,8 +107,12 @@ var MenuLateralRight = function MenuLateralRight(_ref) {
|
|
|
98
107
|
active: buttonVideo.active ? false : iconSelectDropDown().active,
|
|
99
108
|
onClick: iconSelectDropDown().action,
|
|
100
109
|
badge: iconSelectDropDown().badge,
|
|
110
|
+
text: mobile && textVisibleMenuMobile && iconSelectDropDown().text,
|
|
111
|
+
variant: mobile && textVisibleMenuMobile && 'M',
|
|
112
|
+
fontWeight: mobile && textVisibleMenuMobile && '700',
|
|
113
|
+
textVisibleMenuMobile: mobile && textVisibleMenuMobile,
|
|
101
114
|
styles: _objectSpread({}, resize() ? {
|
|
102
|
-
width: 'var(--spacing64)',
|
|
115
|
+
width: mobile && textVisibleMenuMobile ? 'var(--spacing112)' : 'var(--spacing64)',
|
|
103
116
|
height: 'var(--spacing64)'
|
|
104
117
|
} : {})
|
|
105
118
|
}), !noCollapseUpperSection && /*#__PURE__*/_react.default.createElement(_DropDown.default, {
|
|
@@ -198,14 +211,18 @@ MenuLateralRight.propTypes = {
|
|
|
198
211
|
mobile: _propTypes.default.bool,
|
|
199
212
|
upperSection: _propTypes.default.array,
|
|
200
213
|
underSection: _propTypes.default.array,
|
|
201
|
-
buttonVideo: _propTypes.default.object
|
|
214
|
+
buttonVideo: _propTypes.default.object,
|
|
215
|
+
noCollapseUpperSection: _propTypes.default.bool,
|
|
216
|
+
textVisibleMenuMobile: _propTypes.default.bool
|
|
202
217
|
};
|
|
203
218
|
MenuLateralRight.defaultProps = {
|
|
204
219
|
id: '',
|
|
205
220
|
mobile: false,
|
|
206
221
|
upperSection: [],
|
|
207
222
|
underSection: [],
|
|
208
|
-
buttonVideo: {}
|
|
223
|
+
buttonVideo: {},
|
|
224
|
+
noCollapseUpperSection: false,
|
|
225
|
+
textVisibleMenuMobile: false
|
|
209
226
|
};
|
|
210
227
|
var _default = MenuLateralRight;
|
|
211
228
|
exports.default = _default;
|
|
@@ -23,6 +23,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
23
23
|
|
|
24
24
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
25
|
|
|
26
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
|
+
|
|
28
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29
|
+
|
|
30
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31
|
+
|
|
26
32
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
27
33
|
|
|
28
34
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -41,17 +47,20 @@ var Tabs = function Tabs(_ref) {
|
|
|
41
47
|
className: className,
|
|
42
48
|
value: value,
|
|
43
49
|
onChange: onChange,
|
|
44
|
-
variant: variant,
|
|
50
|
+
variant: variant === 'scrollable-fullWidth' ? 'scrollable' : variant,
|
|
45
51
|
scrollButtons: "auto"
|
|
46
52
|
}, props), itemsTab === null || itemsTab === void 0 ? void 0 : itemsTab.map(function (item, index) {
|
|
47
53
|
return /*#__PURE__*/_react.default.createElement(_Tab.default, _extends({
|
|
48
54
|
key: "".concat(item.text, "-").concat(index),
|
|
49
|
-
sx: {
|
|
55
|
+
sx: _objectSpread(_objectSpread({
|
|
50
56
|
borderBottom: '2px solid var(--gray2)',
|
|
51
57
|
'&:focus': {
|
|
52
58
|
outline: 'none'
|
|
53
59
|
}
|
|
54
|
-
},
|
|
60
|
+
}, variant === 'scrollable-fullWidth' ? {
|
|
61
|
+
minWidth: 'fit-content',
|
|
62
|
+
flex: 1
|
|
63
|
+
} : {}), item.sx),
|
|
55
64
|
disabled: item.disabled,
|
|
56
65
|
value: item.value || index,
|
|
57
66
|
label: /*#__PURE__*/_react.default.createElement("div", {
|