@useblu/ocean-react 1.59.1 → 1.60.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.60.0](https://github.com/ocean-ds/ocean-web/compare/v1.59.3...v1.60.0) (2024-06-13)
7
+
8
+ ### Features
9
+
10
+ - add tag size variant ([#1104](https://github.com/ocean-ds/ocean-web/issues/1104)) ([90e4a71](https://github.com/ocean-ds/ocean-web/commit/90e4a716c21902069d4260c0e6e71bf62f8f48c7))
11
+
12
+ ## [1.59.2](https://github.com/ocean-ds/ocean-web/compare/v1.59.1...v1.59.2) (2024-06-05)
13
+
14
+ ### Bug Fixes
15
+
16
+ - transaction list item ([#1102](https://github.com/ocean-ds/ocean-web/issues/1102)) ([94768d5](https://github.com/ocean-ds/ocean-web/commit/94768d5f50d45ca5f3779c92b6496f87952c20b2))
17
+
6
18
  ## [1.59.1](https://github.com/ocean-ds/ocean-web/compare/v1.59.0...v1.59.1) (2024-05-29)
7
19
 
8
20
  ### Bug Fixes
package/Tag/Tag.d.ts CHANGED
@@ -1,13 +1,18 @@
1
1
  import React from 'react';
2
- export declare type TagProps = {
3
- type?: 'positive' | 'warning' | 'negative' | 'neutral' | 'neutral-02' | 'neutral-03' | 'default';
2
+ export declare type BaseTagProps = {
3
+ size?: 'small' | 'medium';
4
4
  icon?: React.ReactElement;
5
5
  setIconOff?: boolean;
6
6
  } & React.ComponentPropsWithoutRef<'div'>;
7
- declare const Tag: React.ForwardRefExoticComponent<{
8
- type?: "positive" | "warning" | "negative" | "neutral" | "neutral-02" | "neutral-03" | "default" | undefined;
9
- icon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
10
- setIconOff?: boolean | undefined;
11
- } & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>;
7
+ declare type DefaultType = {
8
+ variant?: 'default';
9
+ type?: 'positive' | 'warning' | 'negative' | 'neutral' | 'neutral-02' | 'neutral-03' | 'default';
10
+ } & BaseTagProps;
11
+ declare type HighlightType = {
12
+ variant: 'highlight';
13
+ type: 'important' | 'neutral';
14
+ } & BaseTagProps;
15
+ export declare type TagProps = DefaultType | HighlightType;
16
+ declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLDivElement>>;
12
17
  export default Tag;
13
18
  //# sourceMappingURL=Tag.d.ts.map
package/Tag/Tag.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../src/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,oBAAY,QAAQ,GAAG;IAKrB,IAAI,CAAC,EACD,UAAU,GACV,SAAS,GACT,UAAU,GACV,SAAS,GACT,YAAY,GACZ,YAAY,GACZ,SAAS,CAAC;IAId,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAI1B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAE1C,QAAA,MAAM,GAAG;;;;kLAsBR,CAAC;AAIF,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../src/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,oBAAY,YAAY,GAAG;IAIzB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAI1B,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAI1B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,C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G,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAE1C,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;kLA2ExB,CAAC;AAIF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"TransactionListItem.d.ts","sourceRoot":"","sources":["../../src/TransactionListItem/TransactionListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,oBAAY,wBAAwB,GAAG;IAIrC,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IAIrC,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IAIrC,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IAIrC,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IAIpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAInB,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IAInC,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IAInC,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAI1B,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAE1C,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;kLA+ExB,CAAC;AAIF,eAAe,mBAAmB,CAAC"}
package/index.es.js CHANGED
@@ -253,8 +253,14 @@ var TagIcon = e.memo(function (_a) {
253
253
  TagIcon.displayName = 'TagIcon';
254
254
 
255
255
  var Tag = e.forwardRef(function (_a, ref) {
256
- var children = _a.children, _b = _a.type, type = _b === void 0 ? 'default' : _b, className = _a.className, icon = _a.icon, _c = _a.setIconOff, setIconOff = _c === void 0 ? false : _c, rest = __rest$2(_a, ["children", "type", "className", "icon", "setIconOff"]);
257
- return (e.createElement("div", __assign$2({ ref: ref, role: "Tag", className: classNames('ods-tag', "ods-tag--".concat(type), className) }, rest),
256
+ var children = _a.children, _b = _a.variant, variant = _b === void 0 ? 'default' : _b, _c = _a.type, type = _c === void 0 ? 'default' : _c, _d = _a.size, size = _d === void 0 ? 'medium' : _d, className = _a.className, icon = _a.icon, _e = _a.setIconOff, setIconOff = _e === void 0 ? false : _e, rest = __rest$2(_a, ["children", "variant", "type", "size", "className", "icon", "setIconOff"]);
257
+ var hasIcon = (type === 'positive' ||
258
+ type === 'warning' ||
259
+ type === 'negative' ||
260
+ icon) &&
261
+ !setIconOff;
262
+ var isHighlight = variant === 'highlight';
263
+ return (e.createElement("div", __assign$2({ ref: ref, role: "Tag", className: classNames('ods-tag', "ods-tag--".concat(size), hasIcon && "ods-tag--".concat(size, "__with-icon"), isHighlight ? "ods-tag--".concat(variant, "__").concat(type) : "ods-tag--".concat(type), className) }, rest),
258
264
  !setIconOff && e.createElement(TagIcon, { type: type, icon: icon }),
259
265
  e.createElement("div", { className: "ods-tag__content" }, children)));
260
266
  });
@@ -279,7 +285,7 @@ var TransactionListItem = e.forwardRef(function (_a, ref) {
279
285
  return (e.createElement("div", __assign$2({ ref: ref, className: classNames('ods-transaction-list-item', { 'ods-transaction-list-item--chevron': withChevron }, { 'ods-transaction-list-item--readonly': readOnly }, { 'ods-transaction-list-item--isloading': isLoading }, className) }, rest),
280
286
  e.createElement("div", { className: "ods-transaction-list-item__content" },
281
287
  icon && e.createElement("div", { className: "ods-transaction-list-item__icon" }, icon),
282
- e.createElement("div", { className: "ods-transaction-list-item__information" },
288
+ e.createElement("div", { className: "ods-transaction-list-item__information ".concat(icon ? 'ods-transaction-list-item__information--with-icon' : '') },
283
289
  level4 && (e.createElement("div", { className: "ods-transaction-list-item__level4" }, level4)),
284
290
  e.createElement("div", { className: "ods-transaction-list-item__level1" }, children),
285
291
  level2 && (e.createElement("div", { className: "ods-transaction-list-item__level2" }, level2)),