@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 CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.74.0](https://github.com/ocean-ds/ocean-web/compare/v1.73.0...v1.74.0) (2025-01-17)
7
+
8
+ ### Features
9
+
10
+ - include events for buttons when multichoice ([#1127](https://github.com/ocean-ds/ocean-web/issues/1127)) ([7eb5aed](https://github.com/ocean-ds/ocean-web/commit/7eb5aed6299ce8c13166c51e40a361b66cda84c6))
11
+
12
+ # [1.73.0](https://github.com/ocean-ds/ocean-web/compare/v1.72.0...v1.73.0) (2024-12-26)
13
+
14
+ ### Features
15
+
16
+ - add disabled text list item ([#1125](https://github.com/ocean-ds/ocean-web/issues/1125)) ([56e6bba](https://github.com/ocean-ds/ocean-web/commit/56e6bba63a60f55798de64d9abdeb16340269d16))
17
+
6
18
  # [1.71.0](https://github.com/ocean-ds/ocean-web/compare/v1.70.1...v1.71.0) (2024-12-06)
7
19
 
8
20
  ### Features
package/Chips/Chips.d.ts CHANGED
@@ -18,6 +18,8 @@ interface IChips {
18
18
  onClick?: () => void;
19
19
  onChange?: (value: ChipValue[] | ChipValue) => void;
20
20
  onClose?: () => void;
21
+ onConfirm?: (value: ChipValue[] | ChipValue) => void;
22
+ onClean?: () => void;
21
23
  }
22
24
  declare const Chips: React.FunctionComponent<IChips>;
23
25
  export default Chips;
@@ -1 +1 @@
1
- {"version":3,"file":"Chips.d.ts","sourceRoot":"","sources":["../../src/Chips/Chips.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAMjD,oBAAY,SAAS,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzD,UAAU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AAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,KAAK,IAAI,CAAC;IACpD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,KAAK,IAAI,CAAC;IACrD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAgK1C,CAAC;AAIF,eAAe,KAAK,CAAC"}
@@ -12,6 +12,7 @@ export declare type TextListItemProps = {
12
12
  onActionClick?: () => void;
13
13
  checkbox?: CheckboxProps;
14
14
  radio?: RadioProps;
15
+ disabled?: boolean;
15
16
  className?: string;
16
17
  } & React.ComponentPropsWithoutRef<'div'>;
17
18
  declare const TextListItem: React.ForwardRefExoticComponent<{
@@ -25,6 +26,7 @@ declare const TextListItem: React.ForwardRefExoticComponent<{
25
26
  onActionClick?: (() => void) | undefined;
26
27
  checkbox?: CheckboxProps | undefined;
27
28
  radio?: RadioProps | undefined;
29
+ disabled?: boolean | undefined;
28
30
  className?: string | undefined;
29
31
  } & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>;
30
32
  export default TextListItem;
@@ -1 +1 @@
1
- {"version":3,"file":"TextListItem.d.ts","sourceRoot":"","sources":["../../src/TextListItem/TextListItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAEpE,OAAiB,EAAE,aAAa,EAAE,MAAM,s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AAI,CAAC;IAI3B,QAAQ,CAAC,EAAE,aAAa,CAAC;IAIzB,KAAK,CAAC,EAAE,UAAU,CAAC;IAInB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAInB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAE1C,QAAA,MAAM,YAAY;WA/CT,MAAM;iBAIA,MAAM;;;;;;2BAwBG,IAAI;;;;;kLAoK3B,CAAC;AAIF,eAAe,YAAY,CAAC"}
package/index.es.js CHANGED
@@ -6667,7 +6667,7 @@ var TextArea = e.forwardRef(function (_a, ref) {
6667
6667
  TextArea.displayName = 'TextArea';
6668
6668
 
6669
6669
  var TextListItem = e.forwardRef(function (_a, ref) {
6670
- 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"]);
6670
+ 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"]);
6671
6671
  var buttonElementRef = useRef(null);
6672
6672
  var divElementRef = useRef(null);
6673
6673
  var _c = useState(false), isWide = _c[0], setIsWide = _c[1];
@@ -6693,7 +6693,9 @@ var TextListItem = e.forwardRef(function (_a, ref) {
6693
6693
  'ods-text-list-item--wide': isWide,
6694
6694
  'ods-text-list-item--selectable': checkbox || radio
6695
6695
  }), ref: ref }, rest),
6696
- e.createElement("div", { className: "ods-text-list-item__default-content" },
6696
+ e.createElement("div", { className: classNames('ods-text-list-item__default-content', {
6697
+ 'ods-text-list-item__default-content--disabled': disabled
6698
+ }) },
6697
6699
  e.createElement("p", { className: "ods-typography ods-typography__paragraph" },
6698
6700
  title,
6699
6701
  tagLabel && (e.createElement(Tag, { type: "neutral", size: "medium" }, tagLabel))),
@@ -6714,14 +6716,19 @@ var TextListItem = e.forwardRef(function (_a, ref) {
6714
6716
  isWide,
6715
6717
  ref,
6716
6718
  rest,
6719
+ disabled,
6717
6720
  ]);
6718
6721
  if (checkbox) {
6719
- return (e.createElement("div", { className: "ods-text-list-item-selectable", ref: divElementRef },
6720
- e.createElement(Checkbox, __assign$2({}, checkbox, { label: textListitem }))));
6722
+ return (e.createElement("div", { className: classNames('ods-text-list-item-selectable', {
6723
+ 'ods-text-list-item-selectable--disabled': disabled
6724
+ }), ref: divElementRef },
6725
+ e.createElement(Checkbox, __assign$2({ disabled: disabled }, checkbox, { label: textListitem }))));
6721
6726
  }
6722
6727
  if (radio) {
6723
- return (e.createElement("div", { className: "ods-text-list-item-selectable", ref: divElementRef },
6724
- e.createElement(Radio, __assign$2({}, radio, { label: textListitem }))));
6728
+ return (e.createElement("div", { className: classNames('ods-text-list-item-selectable', {
6729
+ 'ods-text-list-item-selectable--disabled': disabled
6730
+ }), ref: divElementRef },
6731
+ e.createElement(Radio, __assign$2({ disabled: disabled }, radio, { label: textListitem }))));
6725
6732
  }
6726
6733
  return (e.createElement("button", { ref: buttonElementRef, onClick: onActionClick, type: "button", className: "ods-text-list-item--button" }, textListitem));
6727
6734
  });
@@ -48211,7 +48218,7 @@ var Options = function (_a) {
48211
48218
  };
48212
48219
 
48213
48220
  var Chips = function (_a) {
48214
- 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;
48221
+ 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;
48215
48222
  var wrapperRef = useRef(null);
48216
48223
  var _f = e.useState(0), counter = _f[0], setCounter = _f[1];
48217
48224
  var _g = e.useState(false), selectionIsOpen = _g[0], setSelectionIsOpen = _g[1];
@@ -48282,13 +48289,17 @@ var Chips = function (_a) {
48282
48289
  setSelectedOptions([]);
48283
48290
  setCounter(0);
48284
48291
  setSelectionIsOpen(false);
48285
- if (onClose)
48286
- onClose();
48287
48292
  if (onChange)
48288
48293
  onChange([]);
48294
+ if (onClean)
48295
+ onClean();
48296
+ if (onClose)
48297
+ onClose();
48289
48298
  };
48290
48299
  var filterOptions = function () {
48291
48300
  setSelectionIsOpen(false);
48301
+ if (onConfirm)
48302
+ onConfirm(selectedOptions);
48292
48303
  if (onClose)
48293
48304
  onClose();
48294
48305
  };