@useblu/ocean-react 1.71.0 → 1.74.0
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/CHANGELOG.md +12 -0
- package/Chips/Chips.d.ts +2 -0
- package/Chips/Chips.d.ts.map +1 -1
- package/TextListItem/TextListItem.d.ts +2 -0
- package/TextListItem/TextListItem.d.ts.map +1 -1
- package/index.es.js +20 -9
- package/index.es.js.map +1 -1
- package/index.js +20 -9
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -6676,7 +6676,7 @@ var TextArea = e__default["default"].forwardRef(function (_a, ref) {
|
|
|
6676
6676
|
TextArea.displayName = 'TextArea';
|
|
6677
6677
|
|
|
6678
6678
|
var TextListItem = e__default["default"].forwardRef(function (_a, ref) {
|
|
6679
|
-
var title = _a.title, description = _a.description, caption = _a.caption, tagLabel = _a.tagLabel, infoText = _a.infoText, _b = _a.infoTextType, infoTextType = _b === void 0 ? 'neutral' : _b, withAction = _a.withAction, onActionClick = _a.onActionClick, checkbox = _a.checkbox, radio = _a.radio, className = _a.className, rest = __rest$2(_a, ["title", "description", "caption", "tagLabel", "infoText", "infoTextType", "withAction", "onActionClick", "checkbox", "radio", "className"]);
|
|
6679
|
+
var title = _a.title, description = _a.description, caption = _a.caption, tagLabel = _a.tagLabel, infoText = _a.infoText, _b = _a.infoTextType, infoTextType = _b === void 0 ? 'neutral' : _b, withAction = _a.withAction, onActionClick = _a.onActionClick, checkbox = _a.checkbox, radio = _a.radio, disabled = _a.disabled, className = _a.className, rest = __rest$2(_a, ["title", "description", "caption", "tagLabel", "infoText", "infoTextType", "withAction", "onActionClick", "checkbox", "radio", "disabled", "className"]);
|
|
6680
6680
|
var buttonElementRef = e.useRef(null);
|
|
6681
6681
|
var divElementRef = e.useRef(null);
|
|
6682
6682
|
var _c = e.useState(false), isWide = _c[0], setIsWide = _c[1];
|
|
@@ -6702,7 +6702,9 @@ var TextListItem = e__default["default"].forwardRef(function (_a, ref) {
|
|
|
6702
6702
|
'ods-text-list-item--wide': isWide,
|
|
6703
6703
|
'ods-text-list-item--selectable': checkbox || radio
|
|
6704
6704
|
}), ref: ref }, rest),
|
|
6705
|
-
e__default["default"].createElement("div", { className:
|
|
6705
|
+
e__default["default"].createElement("div", { className: classNames('ods-text-list-item__default-content', {
|
|
6706
|
+
'ods-text-list-item__default-content--disabled': disabled
|
|
6707
|
+
}) },
|
|
6706
6708
|
e__default["default"].createElement("p", { className: "ods-typography ods-typography__paragraph" },
|
|
6707
6709
|
title,
|
|
6708
6710
|
tagLabel && (e__default["default"].createElement(Tag, { type: "neutral", size: "medium" }, tagLabel))),
|
|
@@ -6723,14 +6725,19 @@ var TextListItem = e__default["default"].forwardRef(function (_a, ref) {
|
|
|
6723
6725
|
isWide,
|
|
6724
6726
|
ref,
|
|
6725
6727
|
rest,
|
|
6728
|
+
disabled,
|
|
6726
6729
|
]);
|
|
6727
6730
|
if (checkbox) {
|
|
6728
|
-
return (e__default["default"].createElement("div", { className:
|
|
6729
|
-
|
|
6731
|
+
return (e__default["default"].createElement("div", { className: classNames('ods-text-list-item-selectable', {
|
|
6732
|
+
'ods-text-list-item-selectable--disabled': disabled
|
|
6733
|
+
}), ref: divElementRef },
|
|
6734
|
+
e__default["default"].createElement(Checkbox, __assign$2({ disabled: disabled }, checkbox, { label: textListitem }))));
|
|
6730
6735
|
}
|
|
6731
6736
|
if (radio) {
|
|
6732
|
-
return (e__default["default"].createElement("div", { className:
|
|
6733
|
-
|
|
6737
|
+
return (e__default["default"].createElement("div", { className: classNames('ods-text-list-item-selectable', {
|
|
6738
|
+
'ods-text-list-item-selectable--disabled': disabled
|
|
6739
|
+
}), ref: divElementRef },
|
|
6740
|
+
e__default["default"].createElement(Radio, __assign$2({ disabled: disabled }, radio, { label: textListitem }))));
|
|
6734
6741
|
}
|
|
6735
6742
|
return (e__default["default"].createElement("button", { ref: buttonElementRef, onClick: onActionClick, type: "button", className: "ods-text-list-item--button" }, textListitem));
|
|
6736
6743
|
});
|
|
@@ -48220,7 +48227,7 @@ var Options = function (_a) {
|
|
|
48220
48227
|
};
|
|
48221
48228
|
|
|
48222
48229
|
var Chips = function (_a) {
|
|
48223
|
-
var label = _a.label, icon = _a.icon, disabled = _a.disabled, defaultValue = _a.defaultValue, _b = _a.options, options = _b === void 0 ? [] : _b, _c = _a.multiChoice, multiChoice = _c === void 0 ? false : _c, _d = _a.clearLabel, clearLabel = _d === void 0 ? 'Limpar' : _d, _e = _a.filterLabel, filterLabel = _e === void 0 ? 'Filtrar' : _e, initialCounter = _a.initialCounter, actived = _a.actived, selectedValue = _a.selectedValue, onClick = _a.onClick, onChange = _a.onChange, onClose = _a.onClose;
|
|
48230
|
+
var label = _a.label, icon = _a.icon, disabled = _a.disabled, defaultValue = _a.defaultValue, _b = _a.options, options = _b === void 0 ? [] : _b, _c = _a.multiChoice, multiChoice = _c === void 0 ? false : _c, _d = _a.clearLabel, clearLabel = _d === void 0 ? 'Limpar' : _d, _e = _a.filterLabel, filterLabel = _e === void 0 ? 'Filtrar' : _e, initialCounter = _a.initialCounter, actived = _a.actived, selectedValue = _a.selectedValue, onClick = _a.onClick, onChange = _a.onChange, onClose = _a.onClose, onConfirm = _a.onConfirm, onClean = _a.onClean;
|
|
48224
48231
|
var wrapperRef = e.useRef(null);
|
|
48225
48232
|
var _f = e__default["default"].useState(0), counter = _f[0], setCounter = _f[1];
|
|
48226
48233
|
var _g = e__default["default"].useState(false), selectionIsOpen = _g[0], setSelectionIsOpen = _g[1];
|
|
@@ -48291,13 +48298,17 @@ var Chips = function (_a) {
|
|
|
48291
48298
|
setSelectedOptions([]);
|
|
48292
48299
|
setCounter(0);
|
|
48293
48300
|
setSelectionIsOpen(false);
|
|
48294
|
-
if (onClose)
|
|
48295
|
-
onClose();
|
|
48296
48301
|
if (onChange)
|
|
48297
48302
|
onChange([]);
|
|
48303
|
+
if (onClean)
|
|
48304
|
+
onClean();
|
|
48305
|
+
if (onClose)
|
|
48306
|
+
onClose();
|
|
48298
48307
|
};
|
|
48299
48308
|
var filterOptions = function () {
|
|
48300
48309
|
setSelectionIsOpen(false);
|
|
48310
|
+
if (onConfirm)
|
|
48311
|
+
onConfirm(selectedOptions);
|
|
48301
48312
|
if (onClose)
|
|
48302
48313
|
onClose();
|
|
48303
48314
|
};
|