@councilbox/councilbox-ui 2.0.44 → 2.0.46

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.
@@ -16,7 +16,7 @@ a.noStyles:hover{
16
16
  `}</style>
17
17
 
18
18
 
19
- # Librería de componentes ui-councilbox NEW v2.0.41 &#127881;
19
+ # Librería de componentes ui-councilbox NEW v2.0.46 &#127881;
20
20
 
21
21
  <h2>Componentes:</h2>
22
22
  <div><a class='noStyles' href='/story/components-accordion--default'>Accordion</a></div>
@@ -25,7 +25,14 @@ a.noStyles:hover{
25
25
  <div>Fix zIndex label InputText y SelectInput</div>
26
26
  </div>
27
27
 
28
- <h2>v2.0.40</h2>
28
+ <h2>v2.0.46</h2>
29
+ <div>Added keydown validation in InputText to prevent entering scientific notation characters (e, E) for number inputs.</div>
30
+ <div>Add moreButton in DrawerPanel</div>
31
+
32
+ <h2>v2.0.45</h2>
33
+ <div>Add prop MenuItem</div>
34
+
35
+ <h2>v2.0.41</h2>
29
36
  <div>Add component Slider</div>
30
37
 
31
38
  <h2>v2.0.40</h2>
@@ -83,13 +83,18 @@
83
83
  padding: 0 1rem
84
84
  }
85
85
 
86
+ .cbx-drawerPanel-moreButton {
87
+ padding: 0 1rem 0 0;
88
+ }
89
+
86
90
  .cbx-drawerPanel-tabs-container {
87
91
  display: flex;
88
92
  align-items: center;
89
93
  background-color: var(--primary);
90
94
  }
91
95
 
92
- .cbx-drawerPanel-tabs-block, .cbx-drawerPanel-tabs-block-mobile {
96
+ .cbx-drawerPanel-tabs-block,
97
+ .cbx-drawerPanel-tabs-block-mobile {
93
98
  width: 100%;
94
99
  overflow: hidden;
95
100
  }
@@ -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", "disableBackdropClick"];
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", "moreButton"];
27
27
 
28
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
29
 
@@ -87,6 +87,7 @@ var DrawerPanel = function DrawerPanel(_ref) {
87
87
  direction = _ref.direction,
88
88
  variantTabs = _ref.variantTabs,
89
89
  disableBackdropClick = _ref.disableBackdropClick,
90
+ moreButton = _ref.moreButton,
90
91
  props = _objectWithoutProperties(_ref, _excluded);
91
92
 
92
93
  var _useDynamicStyles = (0, _useDynamicStyles2.default)(sx),
@@ -202,7 +203,9 @@ var DrawerPanel = function DrawerPanel(_ref) {
202
203
  variant: 'secondaryDark',
203
204
  endIcon: endIcon,
204
205
  prefixClass: prefixClass
205
- }, propsButton)))), /*#__PURE__*/_react.default.createElement("div", {
206
+ }, propsButton))), moreButton && /*#__PURE__*/_react.default.createElement("div", {
207
+ className: prefixClass('cbx-drawerPanel-moreButton')
208
+ }, moreButton)), /*#__PURE__*/_react.default.createElement("div", {
206
209
  className: prefixClass('cbx-drawerPanel-tabs-container')
207
210
  }, tabs.length > 0 && /*#__PURE__*/_react.default.createElement("div", {
208
211
  className: prefixClass(isMobile ? 'cbx-drawerPanel-tabs-block-mobile' : 'cbx-drawerPanel-tabs-block')
@@ -126,7 +126,6 @@ var Header = function Header(_ref) {
126
126
  setIsEllipsisActive = _React$useState2[1];
127
127
 
128
128
  _react.default.useEffect(function () {
129
- ;
130
129
  if (!companyNameRef.current) return;
131
130
  var element = companyNameRef.current;
132
131
 
@@ -304,6 +304,19 @@ var InputText = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
304
304
  };
305
305
 
306
306
  var Component = type === 'select' || type === 'autocomplete' ? 'input' : type === 'textArea' ? 'textarea' : 'input';
307
+
308
+ var handleKeyDown = function handleKeyDown(event) {
309
+ if (type === 'number') {
310
+ if (['e', 'E'].includes(event.key)) {
311
+ event.preventDefault();
312
+ }
313
+ }
314
+
315
+ if (props !== null && props !== void 0 && props.onKeyDown) {
316
+ props.onKeyDown(event);
317
+ }
318
+ };
319
+
307
320
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
308
321
  className: prefixClass("cbx-inputText-allContainer ".concat(fullWidth || width === '100%' ? 'cbx-inputText-allContainer-fullWidth' : '', " cbx-inputText-allContainer-").concat(getVariant())),
309
322
  style: _objectSpread(_objectSpread({}, style), stylesInLine)
@@ -345,6 +358,7 @@ var InputText = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
345
358
  onFocus: handleInputFocus,
346
359
  onBlur: handleInputBlur,
347
360
  onMouseEnter: handleMouseEnter,
361
+ onKeyDown: handleKeyDown,
348
362
  onMouseLeave: handleMouseLeave,
349
363
  value: value || '',
350
364
  onChange: handleInputChange,
@@ -23,7 +23,7 @@ var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicSt
23
23
 
24
24
  var _useRipple3 = _interopRequireDefault(require("../../HOCs/useRipple"));
25
25
 
26
- var _excluded = ["id", "children", "icon", "sx", "badge", "menuItems", "setOpen", "onClick", "endIcon", "className", "style", "active", "fullWidth", "value", "disabled"];
26
+ var _excluded = ["id", "children", "icon", "sx", "badge", "menuItems", "setOpen", "onClick", "endIcon", "className", "style", "active", "fullWidth", "value", "disabled", "placementTooltip"];
27
27
 
28
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
29
 
@@ -67,6 +67,7 @@ var MenuItem = function MenuItem(_ref) {
67
67
  fullWidth = _ref.fullWidth,
68
68
  value = _ref.value,
69
69
  disabled = _ref.disabled,
70
+ placementTooltip = _ref.placementTooltip,
70
71
  props = _objectWithoutProperties(_ref, _excluded);
71
72
 
72
73
  var _useDynamicStyles = (0, _useDynamicStyles2.default)(sx),
@@ -149,7 +150,7 @@ var MenuItem = function MenuItem(_ref) {
149
150
  }
150
151
  }, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
151
152
  title: isEllipsisActive ? extractText(children) : '',
152
- placement: "right"
153
+ placement: placementTooltip || 'right'
153
154
  }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
154
155
  color: 'var(--black)',
155
156
  prefixClass: prefixClass,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@councilbox/councilbox-ui",
3
- "version": "2.0.44",
3
+ "version": "2.0.46",
4
4
  "main": "dist/build-index.js",
5
5
  "files": [
6
6
  "dist",