@useblu/ocean-react 1.55.1 → 1.57.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/index.js CHANGED
@@ -303,6 +303,18 @@ var TransactionListItem = e__default["default"].forwardRef(function (_a, ref) {
303
303
  });
304
304
  TransactionListItem.displayName = 'TransactionListItem';
305
305
 
306
+ var UnorderedListItem = e__default["default"].forwardRef(function (_a, ref) {
307
+ var description = _a.description, Icon = _a.icon, title = _a.title, className = _a.className, iconVariant = _a.iconVariant, rest = __rest$1(_a, ["description", "icon", "title", "className", "iconVariant"]);
308
+ return (e__default["default"].createElement("div", __assign$1({ ref: ref, className: classNames('ods-unordered-list-item', className) }, rest),
309
+ Icon && iconVariant !== 'chevron' ? (e__default["default"].createElement(Icon, { size: iconVariant === 'solid' ? 20 : 24, className: classNames('ods-unordered-list-item__icon', iconVariant === 'solid' && 'ods-unordered-list-item__icon--solid') })) : (e__default["default"].createElement("span", { className: "ods-unordered-list-item__icon-container" },
310
+ e__default["default"].createElement(ee, { size: 16 }))),
311
+ e__default["default"].createElement("span", null,
312
+ title && (e__default["default"].createElement(Typography, { variant: "paragraph", className: classNames('ods-unordered-list-item__title', iconVariant === 'solid' &&
313
+ 'ods-unordered-list-item__title--with-solid-icon') }, title)),
314
+ e__default["default"].createElement(Typography, { variant: "description", className: classNames(!title && 'ods-unordered-list-item__description') }, description))));
315
+ });
316
+ UnorderedListItem.displayName = 'UnorderedListItem';
317
+
306
318
  var mapIconsByType$1 = {
307
319
  warning: zi,
308
320
  error: rs,
@@ -46458,13 +46470,16 @@ var Chips = function (_a) {
46458
46470
  var target = event.target;
46459
46471
  if (wrapperRef.current && !wrapperRef.current.contains(target)) {
46460
46472
  setSelectionIsOpen(false);
46461
- if (onClose)
46473
+ if (onClose && selectionIsOpen)
46462
46474
  onClose();
46463
46475
  }
46464
46476
  }
46465
46477
  e.useEffect(function () {
46466
- if (selectedValue && selectedValue !== selectedOptions && !multiChoice) {
46478
+ if (selectedValue && selectedValue !== selectedOptions) {
46467
46479
  setSelectedOptions(selectedValue);
46480
+ if (multiChoice && Array.isArray(selectedValue)) {
46481
+ setCounter(selectedValue.length);
46482
+ }
46468
46483
  }
46469
46484
  }, [selectedValue]);
46470
46485
  e.useEffect(function () {
@@ -46472,7 +46487,7 @@ var Chips = function (_a) {
46472
46487
  return function () {
46473
46488
  document.removeEventListener('mousedown', handleClickOutside);
46474
46489
  };
46475
- }, [wrapperRef]);
46490
+ }, [wrapperRef, selectionIsOpen]);
46476
46491
  var handleClickChips = function () {
46477
46492
  if (options && (options === null || options === void 0 ? void 0 : options.length) > 0) {
46478
46493
  setSelectionIsOpen(!selectionIsOpen);
@@ -46584,4 +46599,5 @@ exports.TextArea = TextArea;
46584
46599
  exports.TopBar = TopBar;
46585
46600
  exports.TransactionListItem = TransactionListItem;
46586
46601
  exports.Typography = Typography;
46602
+ exports.UnorderedListItem = UnorderedListItem;
46587
46603
  //# sourceMappingURL=index.js.map