@councilbox/councilbox-ui 2.0.25 → 2.0.27

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.25 &#127881;
19
+ # Librería de componentes ui-councilbox NEW v2.0.27 &#127881;
20
20
 
21
21
  <h2>Componentes:</h2>
22
22
  <div><a class='noStyles' href='/story/components-accordion--default'>Accordion</a></div>
@@ -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.27</h2>
29
+ <div>Add Tooltip en Avatar</div>
30
+ <div>Add Tooltip en Dropdown</div>
31
+
32
+ <h2>v2.0.26</h2>
33
+ <div>Fix margin InputAutocomplete sin X</div>
34
+ <div>Fix Tooltip textos largos</div>
35
+ <div>Add disableBackdropClick en DrawerPanel</div>
36
+
28
37
  <h2>v2.0.25</h2>
29
38
  <div>New component Timeline</div>
30
39
  <div>Add order Date EnhanceTable</div>
@@ -17,7 +17,9 @@ var _Typography = _interopRequireDefault(require("../Typography/Typography"));
17
17
 
18
18
  var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicStyles"));
19
19
 
20
- var _excluded = ["backgroundColor", "text", "src", "label", "colorText", "variantText", "fontWeightText", "textAlignText", "variantLabel", "colorLabel", "fontWeightLabel", "textAlignLabel", "sizeAvatar", "sizeText", "sx", "style"];
20
+ var _Tooltip = _interopRequireDefault(require("../Tooltip/Tooltip"));
21
+
22
+ var _excluded = ["backgroundColor", "text", "src", "label", "colorText", "variantText", "fontWeightText", "textAlignText", "variantLabel", "colorLabel", "fontWeightLabel", "textAlignLabel", "sizeAvatar", "sizeText", "sx", "style", "tooltip", "placementTooltip"];
21
23
 
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
25
 
@@ -71,6 +73,8 @@ var Avatar = function Avatar(_ref) {
71
73
  sizeText = _ref.sizeText,
72
74
  sx = _ref.sx,
73
75
  style = _ref.style,
76
+ tooltip = _ref.tooltip,
77
+ placementTooltip = _ref.placementTooltip,
74
78
  props = _objectWithoutProperties(_ref, _excluded);
75
79
 
76
80
  var _useDynamicStyles = (0, _useDynamicStyles2.default)(sx),
@@ -92,7 +96,10 @@ var Avatar = function Avatar(_ref) {
92
96
  justifyContent: 'center',
93
97
  borderRadius: '50%'
94
98
  }, style), stylesInLine)
95
- }, props), /*#__PURE__*/_react.default.isValidElement(src) ? src : src ? /*#__PURE__*/_react.default.createElement("img", {
99
+ }, props), /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
100
+ title: tooltip || '',
101
+ placement: placementTooltip
102
+ }, /*#__PURE__*/_react.default.isValidElement(src) ? src : src ? /*#__PURE__*/_react.default.createElement("img", {
96
103
  src: src,
97
104
  alt: "Avatar",
98
105
  style: {
@@ -106,7 +113,7 @@ var Avatar = function Avatar(_ref) {
106
113
  fontWeight: fontWeightText,
107
114
  textAlign: textAlignText,
108
115
  prefixClass: prefixClass
109
- }, text)), label && /*#__PURE__*/_react.default.createElement("div", {
116
+ }, text))), label && /*#__PURE__*/_react.default.createElement("div", {
110
117
  className: prefixClass('cbx-avatar-label'),
111
118
  style: {
112
119
  marginLeft: sizeAvatar === 'XS' ? 'var(--spacing4)' : 'var(--spacing8)'
@@ -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
- return closeDrawerPanel(e);
226
+ if (!disableBackdropClick) {
227
+ closeDrawerPanel(e);
228
+ }
226
229
  }
227
230
  })), document.body);
228
231
  };
@@ -21,7 +21,9 @@ var _useDynamicStyles2 = _interopRequireDefault(require("../../HOCs/useDynamicSt
21
21
 
22
22
  var _utils = require("../../utils");
23
23
 
24
- var _excluded = ["text", "Component", "items", "menuItems", "id", "type", "open", "icon", "requestClose", "anchorOrigin", "transformOrigin", "styleComponent", "variantButton", "stylesButtonText", "sxButton", "forceClose", "sx", "style", "styles", "prefixClass", "setOpen", "className", "paperPropsStyles", "textStyle", "closeOnOptionClick"];
24
+ var _Tooltip = _interopRequireDefault(require("../Tooltip/Tooltip"));
25
+
26
+ var _excluded = ["text", "Component", "items", "menuItems", "id", "type", "open", "icon", "requestClose", "anchorOrigin", "transformOrigin", "styleComponent", "variantButton", "stylesButtonText", "sxButton", "forceClose", "sx", "style", "styles", "prefixClass", "setOpen", "className", "paperPropsStyles", "textStyle", "closeOnOptionClick", "tooltip", "placementTooltip"];
25
27
 
26
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
29
 
@@ -203,6 +205,8 @@ var DropDown = function DropDown(_ref2) {
203
205
  textStyle = _ref2.textStyle,
204
206
  _ref2$closeOnOptionCl = _ref2.closeOnOptionClick,
205
207
  closeOnOptionClick = _ref2$closeOnOptionCl === void 0 ? true : _ref2$closeOnOptionCl,
208
+ tooltip = _ref2.tooltip,
209
+ placementTooltip = _ref2.placementTooltip,
206
210
  props = _objectWithoutProperties(_ref2, _excluded);
207
211
 
208
212
  var memoizedSx = _react.default.useMemo(function () {
@@ -376,7 +380,10 @@ var DropDown = function DropDown(_ref2) {
376
380
  return /*#__PURE__*/_react.default.createElement("div", _extends({
377
381
  className: "cbx-dropdown-container ".concat(className || ''),
378
382
  style: _objectSpread(_objectSpread(_objectSpread({}, styles), style), stylesInLine)
379
- }, props), Component ? /*#__PURE__*/_react.default.createElement("div", {
383
+ }, props), /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
384
+ title: tooltip || '',
385
+ placement: placementTooltip
386
+ }, Component ? /*#__PURE__*/_react.default.createElement("div", {
380
387
  onClick: handleClick,
381
388
  id: id,
382
389
  ref: containerDropdownRef,
@@ -393,7 +400,7 @@ var DropDown = function DropDown(_ref2) {
393
400
  text: text,
394
401
  stylesButton: _objectSpread({}, stylesButtonText),
395
402
  sx: _objectSpread({}, sxButton)
396
- })), isDropdownOpen && /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/_react.default.createElement("div", {
403
+ }))), isDropdownOpen && /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/_react.default.createElement("div", {
397
404
  className: prefixClass("cbx-dropdown-presentation ".concat(isInsideModal() ? 'cbx-dropdown-presentation-inModal' : ''))
398
405
  }, /*#__PURE__*/_react.default.createElement("div", {
399
406
  className: prefixClass('cbx-dropdown-backdrop'),
@@ -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
- opacity: 0;
27
- transition: opacity 0.3s ease-in-out;
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
- opacity: 1;
34
+ opacity: 1;
35
35
  }
36
36
 
37
37
  .cbx-inputAutocomplete-icon-button.disabled {
38
- cursor: not-allowed;
39
- opacity: 0.5;
40
- pointer-events: none;
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
- animation: dropdownOpen 150ms ease-out forwards;
86
+ animation: dropdownOpen 150ms ease-out forwards;
87
87
  }
88
88
 
89
89
  .cbx-inputAutocomplete-options-container.cbx-inputAutocomplete-options-container-close {
90
- animation: dropdownClose 150ms ease-out forwards;
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
- 0% {
128
- opacity: 0;
129
- transform: scale(0.75, 0.5625);
130
- }
131
- 100% {
132
- opacity: 1;
133
- transform: scale(1, 1);
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
- 0% {
139
- opacity: 1;
140
- transform: scale(1, 1);
141
- }
142
- 100% {
143
- opacity: 0;
144
- transform: scale(0.75, 0.5625);
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: "cbx-prueba",
328
+ id: id,
328
329
  ref: selectRef
329
330
  }, /*#__PURE__*/_react.default.createElement(_InputText.default, _extends({
330
331
  label: label,
@@ -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
- title: "222\xA1Hola! Esto es un tooltip.",
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
  } : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@councilbox/councilbox-ui",
3
- "version": "2.0.25",
3
+ "version": "2.0.27",
4
4
  "main": "dist/build-index.js",
5
5
  "files": [
6
6
  "dist",