@councilbox/councilbox-ui 0.6.31 → 1.0.1
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 +7 -0
- package/dist/components/Header/Header.js +54 -4
- package/dist/components/IconButton/DesignIconButton.stories.js +15 -0
- package/dist/components/IconButton/IconButton.css +24 -0
- package/dist/components/IconButton/IconButton.js +84 -2
- package/dist/components/InputText/InputText.js +6 -0
- package/dist/components/MenuLateralRight/MenuLateralRight.js +9 -4
- package/package.json +1 -1
|
@@ -24,6 +24,13 @@ 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>v1.0.1</h2>
|
|
28
|
+
<div>Añadido en Header ButtonFileManager</div>
|
|
29
|
+
<div>Añadido progress en IconButton</div>
|
|
30
|
+
|
|
31
|
+
<h2>v1.0.0</h2>
|
|
32
|
+
<div>Fix variant standard inputTextArea</div>
|
|
33
|
+
|
|
27
34
|
<h2>v0.6.31</h2>
|
|
28
35
|
<div>Fix header DrawerPanel direction left</div>
|
|
29
36
|
|
|
@@ -86,7 +86,15 @@ var Header = function Header(_ref) {
|
|
|
86
86
|
styleIconButtonRightContainer = _ref.styleIconButtonRightContainer,
|
|
87
87
|
styleIconButtonRight = _ref.styleIconButtonRight,
|
|
88
88
|
placementTooltipThirdDropdownUser = _ref.placementTooltipThirdDropdownUser,
|
|
89
|
-
tooltipThirdDropdownUser = _ref.tooltipThirdDropdownUser
|
|
89
|
+
tooltipThirdDropdownUser = _ref.tooltipThirdDropdownUser,
|
|
90
|
+
onClickButtonFileManager = _ref.onClickButtonFileManager,
|
|
91
|
+
buttonFileManagerIcon = _ref.buttonFileManagerIcon,
|
|
92
|
+
buttonFileManagerProgressAutoDownload = _ref.buttonFileManagerProgressAutoDownload,
|
|
93
|
+
buttonFileManagerProgressDownload = _ref.buttonFileManagerProgressDownload,
|
|
94
|
+
buttonFileManagerBadge = _ref.buttonFileManagerBadge,
|
|
95
|
+
buttonFileManagerItems = _ref.buttonFileManagerItems,
|
|
96
|
+
buttonFileManagerProps = _ref.buttonFileManagerProps,
|
|
97
|
+
buttonFileManagerDropDownProps = _ref.buttonFileManagerDropDownProps;
|
|
90
98
|
|
|
91
99
|
var _useWindowSize = (0, _useWindowSize2.default)(),
|
|
92
100
|
innerWidth = _useWindowSize.innerWidth,
|
|
@@ -122,7 +130,11 @@ var Header = function Header(_ref) {
|
|
|
122
130
|
}
|
|
123
131
|
|
|
124
132
|
if (!logoRight && !logoRightXS) {
|
|
125
|
-
|
|
133
|
+
if (onClickButtonFileManager || onClickButtonNotification) {
|
|
134
|
+
width = '9.375rem';
|
|
135
|
+
} else {
|
|
136
|
+
width = '2.5rem';
|
|
137
|
+
}
|
|
126
138
|
}
|
|
127
139
|
|
|
128
140
|
return width;
|
|
@@ -380,7 +392,26 @@ var Header = function Header(_ref) {
|
|
|
380
392
|
}
|
|
381
393
|
}, "DEMO"), logoAndDropdownSeparate ? /*#__PURE__*/_react.default.createElement("div", {
|
|
382
394
|
className: "cbx-header-third-container"
|
|
383
|
-
}, !!
|
|
395
|
+
}, !!onClickButtonFileManager && /*#__PURE__*/_react.default.createElement("div", {
|
|
396
|
+
className: 'cbx-header-third-button-notification-container-noSeparate'
|
|
397
|
+
}, /*#__PURE__*/_react.default.createElement(_DropDown.default, _extends({
|
|
398
|
+
color: "transparent",
|
|
399
|
+
Component: function Component() {
|
|
400
|
+
return /*#__PURE__*/_react.default.createElement(_IconButton.default, _extends({
|
|
401
|
+
"aria-label": "",
|
|
402
|
+
id: 'cbx-header-third-button-buttonFileManager',
|
|
403
|
+
className: 'cbx-header-third-button-buttonFileManager',
|
|
404
|
+
onClick: onClickButtonFileManager,
|
|
405
|
+
icon: buttonFileManagerIcon || /*#__PURE__*/_react.default.createElement("i", {
|
|
406
|
+
className: "ri-swap-line"
|
|
407
|
+
}),
|
|
408
|
+
progressAuto: buttonFileManagerProgressAutoDownload,
|
|
409
|
+
progress: buttonFileManagerProgressDownload,
|
|
410
|
+
badge: buttonFileManagerBadge
|
|
411
|
+
}, buttonFileManagerProps));
|
|
412
|
+
},
|
|
413
|
+
items: buttonFileManagerItems
|
|
414
|
+
}, buttonFileManagerDropDownProps))), !!onClickButtonNotification && /*#__PURE__*/_react.default.createElement("div", {
|
|
384
415
|
className: "cbx-header-third-button-notification-container"
|
|
385
416
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.default, _extends({
|
|
386
417
|
"aria-label": "",
|
|
@@ -426,7 +457,26 @@ var Header = function Header(_ref) {
|
|
|
426
457
|
items: itemsDropDownUser
|
|
427
458
|
}, itemsDropDownUserProps)))) : /*#__PURE__*/_react.default.createElement("div", {
|
|
428
459
|
className: "cbx-header-third-container"
|
|
429
|
-
}, !!
|
|
460
|
+
}, !!onClickButtonFileManager && /*#__PURE__*/_react.default.createElement("div", {
|
|
461
|
+
className: 'cbx-header-third-button-notification-container-noSeparate'
|
|
462
|
+
}, /*#__PURE__*/_react.default.createElement(_DropDown.default, _extends({
|
|
463
|
+
color: "transparent",
|
|
464
|
+
Component: function Component() {
|
|
465
|
+
return /*#__PURE__*/_react.default.createElement(_IconButton.default, _extends({
|
|
466
|
+
"aria-label": "",
|
|
467
|
+
id: 'cbx-header-third-button-buttonFileManager',
|
|
468
|
+
className: 'cbx-header-third-button-buttonFileManager',
|
|
469
|
+
onClick: onClickButtonFileManager,
|
|
470
|
+
icon: buttonFileManagerIcon || /*#__PURE__*/_react.default.createElement("i", {
|
|
471
|
+
className: "ri-swap-line"
|
|
472
|
+
}),
|
|
473
|
+
progressAuto: buttonFileManagerProgressAutoDownload,
|
|
474
|
+
progress: buttonFileManagerProgressDownload,
|
|
475
|
+
badge: buttonFileManagerBadge
|
|
476
|
+
}, buttonFileManagerProps));
|
|
477
|
+
},
|
|
478
|
+
items: buttonFileManagerItems
|
|
479
|
+
}, buttonFileManagerDropDownProps))), !!onClickButtonNotification && /*#__PURE__*/_react.default.createElement("div", {
|
|
430
480
|
className: "cbx-header-third-button-notification-container-noSeparate"
|
|
431
481
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.default, _extends({
|
|
432
482
|
"aria-label": "",
|
|
@@ -33,6 +33,21 @@ var DesignIconButton = function DesignIconButton(_ref) {
|
|
|
33
33
|
style: {
|
|
34
34
|
marginRight: '1rem'
|
|
35
35
|
}
|
|
36
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
37
|
+
style: {
|
|
38
|
+
marginRight: '1rem'
|
|
39
|
+
}
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
41
|
+
badge: badge,
|
|
42
|
+
icon: /*#__PURE__*/_react.default.createElement("i", {
|
|
43
|
+
className: "ri-user-3-line"
|
|
44
|
+
}),
|
|
45
|
+
progressAuto: true // progress={'60'}
|
|
46
|
+
|
|
47
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
48
|
+
style: {
|
|
49
|
+
marginRight: '1rem'
|
|
50
|
+
}
|
|
36
51
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
37
52
|
rounded: true,
|
|
38
53
|
badge: badge,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.cbx-IconButton-progressCircle {
|
|
2
|
+
position: absolute;
|
|
3
|
+
z-index: 1;
|
|
4
|
+
transform: rotate(-90deg);
|
|
5
|
+
transform-origin: center;
|
|
6
|
+
top: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@keyframes rotateCircle {
|
|
11
|
+
0% {
|
|
12
|
+
transform: rotate(0deg);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
100% {
|
|
16
|
+
transform: rotate(360deg);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.cbx-IconButton-animatedCircle {
|
|
21
|
+
transform-origin: center;
|
|
22
|
+
animation: rotateCircle 2s linear infinite;
|
|
23
|
+
stroke-linecap: round;
|
|
24
|
+
}
|
|
@@ -19,7 +19,7 @@ require("./IconButton.css");
|
|
|
19
19
|
|
|
20
20
|
var _Tooltip = _interopRequireDefault(require("@mui/material/Tooltip"));
|
|
21
21
|
|
|
22
|
-
var _excluded = ["id", "className", "onClick", "icon", "backgroundColor", "styles", "badge", "classNameBadge", "rounded", "tooltip", "placementTooltip", "disabled", "hoverColor", "type", "inModal"];
|
|
22
|
+
var _excluded = ["id", "className", "onClick", "icon", "backgroundColor", "styles", "badge", "classNameBadge", "rounded", "tooltip", "placementTooltip", "disabled", "hoverColor", "type", "inModal", "colorProgress", "progress", "progressAuto"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -51,6 +51,9 @@ var IconButton = function IconButton(_ref) {
|
|
|
51
51
|
hoverColor = _ref.hoverColor,
|
|
52
52
|
type = _ref.type,
|
|
53
53
|
inModal = _ref.inModal,
|
|
54
|
+
colorProgress = _ref.colorProgress,
|
|
55
|
+
progress = _ref.progress,
|
|
56
|
+
progressAuto = _ref.progressAuto,
|
|
54
57
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
55
58
|
|
|
56
59
|
var getIcon = function getIcon() {
|
|
@@ -60,6 +63,85 @@ var IconButton = function IconButton(_ref) {
|
|
|
60
63
|
}, icon);
|
|
61
64
|
};
|
|
62
65
|
|
|
66
|
+
var circleRadius = 20; // Ajustamos el radio para que encaje bien con el botón
|
|
67
|
+
|
|
68
|
+
var circumference = 2 * Math.PI * circleRadius; // Circunferencia del círculo
|
|
69
|
+
|
|
70
|
+
var progressValue = Math.max(0, Math.min(progress || 0, 100)); // Limitar el progreso entre 0 y 100
|
|
71
|
+
|
|
72
|
+
var dashOffset = circumference - progressValue / 100 * circumference;
|
|
73
|
+
|
|
74
|
+
var getProgressAuto = function getProgressAuto() {
|
|
75
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
76
|
+
className: 'cbx-IconButton-progressCircle cbx-IconButton-animatedCircle',
|
|
77
|
+
width: "100%",
|
|
78
|
+
height: "100%",
|
|
79
|
+
viewBox: "0 0 200 202",
|
|
80
|
+
color: colorProgress || 'var(--primary)',
|
|
81
|
+
fill: "none",
|
|
82
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
83
|
+
}, /*#__PURE__*/_react.default.createElement("defs", null, /*#__PURE__*/_react.default.createElement("linearGradient", {
|
|
84
|
+
id: "spinner-secondHalf"
|
|
85
|
+
}, /*#__PURE__*/_react.default.createElement("stop", {
|
|
86
|
+
offset: "0%",
|
|
87
|
+
stopOpacity: "0",
|
|
88
|
+
stopColor: "currentColor"
|
|
89
|
+
}), /*#__PURE__*/_react.default.createElement("stop", {
|
|
90
|
+
offset: "100%",
|
|
91
|
+
stopOpacity: "0.5",
|
|
92
|
+
stopColor: "currentColor"
|
|
93
|
+
})), /*#__PURE__*/_react.default.createElement("linearGradient", {
|
|
94
|
+
id: "spinner-firstHalf"
|
|
95
|
+
}, /*#__PURE__*/_react.default.createElement("stop", {
|
|
96
|
+
offset: "0%",
|
|
97
|
+
stopOpacity: "1",
|
|
98
|
+
stopColor: "currentColor"
|
|
99
|
+
}), /*#__PURE__*/_react.default.createElement("stop", {
|
|
100
|
+
offset: "100%",
|
|
101
|
+
stopOpacity: "0.5",
|
|
102
|
+
stopColor: "currentColor"
|
|
103
|
+
}))), /*#__PURE__*/_react.default.createElement("g", {
|
|
104
|
+
strokeWidth: "10"
|
|
105
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
106
|
+
stroke: "url(#spinner-secondHalf)",
|
|
107
|
+
d: "M 4 100 A 96 96 0 0 1 196 100"
|
|
108
|
+
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
109
|
+
stroke: "url(#spinner-firstHalf)",
|
|
110
|
+
d: "M 196 100 A 96 96 0 0 1 4 100"
|
|
111
|
+
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
112
|
+
stroke: "currentColor",
|
|
113
|
+
strokeLinecap: "round",
|
|
114
|
+
d: "M 4 100 A 96 96 0 0 1 4 98"
|
|
115
|
+
})));
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
var getProgress = function getProgress() {
|
|
119
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
120
|
+
className: 'cbx-IconButton-progressCircle',
|
|
121
|
+
width: "48",
|
|
122
|
+
height: "48",
|
|
123
|
+
viewBox: "0 0 48 48",
|
|
124
|
+
style: {
|
|
125
|
+
position: 'absolute',
|
|
126
|
+
top: '-4px',
|
|
127
|
+
left: '-4px',
|
|
128
|
+
zIndex: 1
|
|
129
|
+
}
|
|
130
|
+
}, /*#__PURE__*/_react.default.createElement("circle", {
|
|
131
|
+
cx: "24",
|
|
132
|
+
cy: "24",
|
|
133
|
+
r: circleRadius,
|
|
134
|
+
stroke: colorProgress || 'var(--primary)',
|
|
135
|
+
strokeWidth: "2",
|
|
136
|
+
fill: "none",
|
|
137
|
+
strokeDasharray: circumference,
|
|
138
|
+
strokeDashoffset: dashOffset,
|
|
139
|
+
style: {
|
|
140
|
+
transition: 'stroke-dashoffset 0.35s'
|
|
141
|
+
}
|
|
142
|
+
}));
|
|
143
|
+
};
|
|
144
|
+
|
|
63
145
|
return /*#__PURE__*/_react.default.createElement(_IconButton.default, _extends({
|
|
64
146
|
id: id,
|
|
65
147
|
className: "".concat(className || '', " ").concat(type === 'fab' ? 'cbx-fabButton' : ''),
|
|
@@ -90,7 +172,7 @@ var IconButton = function IconButton(_ref) {
|
|
|
90
172
|
background: type === 'fab' && 'var(--gray3)'
|
|
91
173
|
}
|
|
92
174
|
}, styles)
|
|
93
|
-
}, props), badge ? /*#__PURE__*/_react.default.createElement(_Badge.default, {
|
|
175
|
+
}, props), progressAuto ? getProgressAuto() : progress && getProgress(), badge ? /*#__PURE__*/_react.default.createElement(_Badge.default, {
|
|
94
176
|
badgeContent: Number.parseInt(badge, 10) || ' ',
|
|
95
177
|
variant: !Number.parseInt(badge, 10) && 'dot',
|
|
96
178
|
className: classNameBadge,
|
|
@@ -154,6 +154,12 @@ var CssTextField = (0, _styled.default)(_TextField.default)(function () {
|
|
|
154
154
|
padding: 'var(--spacing12) var(--spacing12) var(--spacing12) 0!important',
|
|
155
155
|
paddingRight: 'var(--spacing8)!important'
|
|
156
156
|
},
|
|
157
|
+
'& textarea.MuiInputBase-input.MuiInput-input.MuiInputBase-inputMultiline': {
|
|
158
|
+
padding: '0!important',
|
|
159
|
+
lineHeight: '1.125rem',
|
|
160
|
+
maxHeight: '2.25rem',
|
|
161
|
+
overflowY: 'auto!important'
|
|
162
|
+
},
|
|
157
163
|
'& input.MuiInputBase-root.MuiOutlinedInput-root': {
|
|
158
164
|
padding: '0'
|
|
159
165
|
},
|
|
@@ -40,7 +40,8 @@ var MenuLateralRight = function MenuLateralRight(_ref) {
|
|
|
40
40
|
mobile = _ref.mobile,
|
|
41
41
|
buttonVideo = _ref.buttonVideo,
|
|
42
42
|
noCollapseUpperSection = _ref.noCollapseUpperSection,
|
|
43
|
-
textVisibleMenuMobile = _ref.textVisibleMenuMobile
|
|
43
|
+
textVisibleMenuMobile = _ref.textVisibleMenuMobile,
|
|
44
|
+
textIconButtonMore = _ref.textIconButtonMore;
|
|
44
45
|
|
|
45
46
|
var _useWindowSize = (0, _useWindowSize2.default)(),
|
|
46
47
|
innerWidth = _useWindowSize.innerWidth,
|
|
@@ -83,7 +84,7 @@ var MenuLateralRight = function MenuLateralRight(_ref) {
|
|
|
83
84
|
fontWeight: mobile && textVisibleMenuMobile && '700',
|
|
84
85
|
textVisibleMenuMobile: mobile && textVisibleMenuMobile,
|
|
85
86
|
styles: _objectSpread({}, resize() ? {
|
|
86
|
-
width: mobile && textVisibleMenuMobile ? 'var(--spacing112)' : 'var(--spacing64)',
|
|
87
|
+
width: mobile && textVisibleMenuMobile ? noCollapseUpperSection ? '6.75rem' : 'var(--spacing112)' : 'var(--spacing64)',
|
|
87
88
|
height: 'var(--spacing64)'
|
|
88
89
|
} : {})
|
|
89
90
|
}), noCollapseUpperSection ? upperSection === null || upperSection === void 0 ? void 0 : upperSection.map(function (item, index) {
|
|
@@ -98,7 +99,7 @@ var MenuLateralRight = function MenuLateralRight(_ref) {
|
|
|
98
99
|
fontWeight: mobile && textVisibleMenuMobile && '700',
|
|
99
100
|
textVisibleMenuMobile: mobile && textVisibleMenuMobile,
|
|
100
101
|
styles: _objectSpread({}, resize() ? {
|
|
101
|
-
width: mobile && textVisibleMenuMobile ? 'var(--spacing112)' : 'var(--spacing64)',
|
|
102
|
+
width: mobile && textVisibleMenuMobile ? noCollapseUpperSection ? '6.75rem' : 'var(--spacing112)' : 'var(--spacing64)',
|
|
102
103
|
height: 'var(--spacing64)'
|
|
103
104
|
} : {})
|
|
104
105
|
});
|
|
@@ -126,7 +127,11 @@ var MenuLateralRight = function MenuLateralRight(_ref) {
|
|
|
126
127
|
styles: _objectSpread({}, resize() ? {
|
|
127
128
|
width: 'var(--spacing64)',
|
|
128
129
|
height: 'var(--spacing64)'
|
|
129
|
-
} : {})
|
|
130
|
+
} : {}),
|
|
131
|
+
text: mobile && textVisibleMenuMobile && textIconButtonMore,
|
|
132
|
+
fontWeight: mobile && textVisibleMenuMobile && '700',
|
|
133
|
+
variant: mobile && textVisibleMenuMobile && 'M',
|
|
134
|
+
textVisibleMenuMobile: mobile && textVisibleMenuMobile
|
|
130
135
|
});
|
|
131
136
|
},
|
|
132
137
|
items: upperSection === null || upperSection === void 0 ? void 0 : upperSection.map(function (item, index) {
|