@useblu/ocean-react 1.109.0 → 1.112.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/CardGroup/ActionButton.d.ts +2 -1
- package/CardGroup/ActionButton.d.ts.map +1 -1
- package/CardGroup/CardGroup.d.ts +3 -0
- package/CardGroup/CardGroup.d.ts.map +1 -1
- package/CardGroup/Header.d.ts +3 -1
- package/CardGroup/Header.d.ts.map +1 -1
- package/Tooltip/Tooltip.d.ts +14 -0
- package/Tooltip/Tooltip.d.ts.map +1 -0
- package/Tooltip/index.d.ts +3 -0
- package/Tooltip/index.d.ts.map +1 -0
- package/index.es.js +11 -7
- package/index.es.js.map +1 -1
- package/index.js +11 -7
- package/index.js.map +1 -1
- package/package.json +1 -1
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.112.0](https://github.com/ocean-ds/ocean-web/compare/v1.111.0...v1.112.0) (2025-10-07)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- add tag and actionCount ([#1192](https://github.com/ocean-ds/ocean-web/issues/1192)) ([77e9f5f](https://github.com/ocean-ds/ocean-web/commit/77e9f5fb31eadb1f26820f6b105b966450af6b46))
|
|
11
|
+
|
|
12
|
+
# [1.110.0](https://github.com/ocean-ds/ocean-web/compare/v1.109.0...v1.110.0) (2025-08-25)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
- ocean docs 3 ([#1188](https://github.com/ocean-ds/ocean-web/issues/1188)) ([d67aec1](https://github.com/ocean-ds/ocean-web/commit/d67aec1ee438b332dabd58c5a0be37b5e74fe3d7))
|
|
17
|
+
|
|
6
18
|
# [1.109.0](https://github.com/ocean-ds/ocean-web/compare/v1.108.0...v1.109.0) (2025-08-21)
|
|
7
19
|
|
|
8
20
|
### Features
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
interface IActionButtonProps {
|
|
2
2
|
actionLabel?: string;
|
|
3
|
+
actionCount?: number;
|
|
3
4
|
actionClick?: () => void;
|
|
4
5
|
}
|
|
5
|
-
declare const ActionButton: ({ actionLabel, actionClick, }: IActionButtonProps) => JSX.Element;
|
|
6
|
+
declare const ActionButton: ({ actionLabel, actionCount, actionClick, }: IActionButtonProps) => JSX.Element;
|
|
6
7
|
export default ActionButton;
|
|
7
8
|
//# sourceMappingURL=ActionButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButton.d.ts","sourceRoot":"","sources":["../../src/CardGroup/ActionButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ActionButton.d.ts","sourceRoot":"","sources":["../../src/CardGroup/ActionButton.tsx"],"names":[],"mappings":"AAIA,UAAU,kBAAkB;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,QAAA,MAAM,YAAY,GAAI,4CAInB,kBAAkB,KAAG,GAAG,CAAC,OAsB3B,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
package/CardGroup/CardGroup.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { TagProps } from '../Tag/Tag';
|
|
2
3
|
export interface ICardGroupProps {
|
|
3
4
|
title?: string;
|
|
4
5
|
subtitle?: string;
|
|
5
6
|
variant?: 'minimal' | 'header';
|
|
6
7
|
count?: number;
|
|
8
|
+
tag?: TagProps;
|
|
7
9
|
actionLabel?: string;
|
|
10
|
+
actionCount?: number;
|
|
8
11
|
actionClick?: () => void;
|
|
9
12
|
children?: React.ReactNode;
|
|
10
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardGroup.d.ts","sourceRoot":"","sources":["../../src/CardGroup/CardGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CardGroup.d.ts","sourceRoot":"","sources":["../../src/CardGroup/CardGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,SAAS,wFA0Cd,CAAC;AAIF,eAAe,SAAS,CAAC"}
|
package/CardGroup/Header.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { TagProps } from '../Tag/Tag';
|
|
1
2
|
interface IHeaderProps {
|
|
2
3
|
title?: string;
|
|
3
4
|
subtitle?: string;
|
|
4
5
|
count?: number;
|
|
6
|
+
tag?: TagProps;
|
|
5
7
|
}
|
|
6
|
-
declare const Header: ({ title, subtitle, count }: IHeaderProps) => JSX.Element;
|
|
8
|
+
declare const Header: ({ title, subtitle, count, tag }: IHeaderProps) => JSX.Element;
|
|
7
9
|
export default Header;
|
|
8
10
|
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../src/CardGroup/Header.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../src/CardGroup/Header.tsx"],"names":[],"mappings":"AAEA,OAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,UAAU,YAAY;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,QAAQ,CAAC;CAChB;AACD,QAAA,MAAM,MAAM,GAAI,iCAAiC,YAAY,KAAG,GAAG,CAAC,OAmBnE,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type TooltipProps = {
|
|
3
|
+
text: string;
|
|
4
|
+
position?: 'up' | 'down' | 'left' | 'right' | 'up-left' | 'up-right' | 'down-left' | 'down-right';
|
|
5
|
+
length?: 'small' | 'medium' | 'large' | 'xlarge' | 'fit';
|
|
6
|
+
break?: boolean;
|
|
7
|
+
blunt?: boolean;
|
|
8
|
+
noFocus?: boolean;
|
|
9
|
+
children: React.ReactElement;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLElement>>;
|
|
13
|
+
export default Tooltip;
|
|
14
|
+
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,YAAY,GAAG;IAEzB,IAAI,EAAE,MAAM,CAAC;IAEb,QAAQ,CAAC,EACL,IAAI,GACJ,MAAM,GACN,MAAM,GACN,OAAO,GACP,SAAS,GACT,UAAU,GACV,WAAW,GACX,YAAY,CAAC;IAEjB,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAEzD,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAE7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,OAAO,kFA+BZ,CAAC;AAIF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Tooltip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
|
package/index.es.js
CHANGED
|
@@ -466,31 +466,35 @@ var Badge = e.forwardRef(function (_a, ref) {
|
|
|
466
466
|
Badge.displayName = 'Badge';
|
|
467
467
|
|
|
468
468
|
var Header = function (_a) {
|
|
469
|
-
var title = _a.title, subtitle = _a.subtitle, count = _a.count;
|
|
469
|
+
var title = _a.title, subtitle = _a.subtitle, count = _a.count, tag = _a.tag;
|
|
470
470
|
return (e.createElement("div", { className: "ods-card-group__header" },
|
|
471
471
|
e.createElement("div", { className: "ods-card-group__header--content" },
|
|
472
|
-
e.createElement("
|
|
472
|
+
e.createElement("div", { className: "container-line" },
|
|
473
|
+
e.createElement("p", { className: "ods-typography ods-typography__heading4" }, title),
|
|
474
|
+
tag && e.createElement(Tag, __assign$1({ size: "medium", setIconOff: true }, tag))),
|
|
473
475
|
subtitle && (e.createElement("p", { className: "ods-typography ods-typography__description" }, subtitle))),
|
|
474
476
|
count !== undefined && (e.createElement(Badge, { variation: "medium", color: count === 0 ? 'neutral' : 'alert', count: count }))));
|
|
475
477
|
};
|
|
476
478
|
|
|
477
479
|
var ActionButton = function (_a) {
|
|
478
|
-
var actionLabel = _a.actionLabel, actionClick = _a.actionClick;
|
|
480
|
+
var actionLabel = _a.actionLabel, actionCount = _a.actionCount, actionClick = _a.actionClick;
|
|
479
481
|
return (e.createElement(e.Fragment, null,
|
|
480
482
|
e.createElement("hr", { className: "ods-divider" }),
|
|
481
483
|
e.createElement("button", { onClick: actionClick, type: "button", className: "ods-card-group__action", "aria-label": actionLabel },
|
|
482
484
|
e.createElement("span", { className: "ods-card-group__action--label" }, actionLabel),
|
|
483
|
-
e.createElement(
|
|
485
|
+
e.createElement("div", { className: "ods-card-group__action--right" },
|
|
486
|
+
actionCount !== undefined && (e.createElement(Badge, { variation: "medium", color: actionCount === 0 ? 'neutral' : 'alert', count: actionCount })),
|
|
487
|
+
e.createElement(re, { size: 20 })))));
|
|
484
488
|
};
|
|
485
489
|
|
|
486
490
|
var CardGroup = forwardRef(function (_a, ref) {
|
|
487
|
-
var title = _a.title, subtitle = _a.subtitle, actionLabel = _a.actionLabel, actionClick = _a.actionClick, count = _a.count, children = _a.children, _b = _a.variant, variant = _b === void 0 ? 'minimal' : _b, rest = __rest$1(_a, ["title", "subtitle", "actionLabel", "actionClick", "count", "children", "variant"]);
|
|
491
|
+
var title = _a.title, subtitle = _a.subtitle, actionLabel = _a.actionLabel, actionCount = _a.actionCount, actionClick = _a.actionClick, count = _a.count, tag = _a.tag, children = _a.children, _b = _a.variant, variant = _b === void 0 ? 'minimal' : _b, rest = __rest$1(_a, ["title", "subtitle", "actionLabel", "actionCount", "actionClick", "count", "tag", "children", "variant"]);
|
|
488
492
|
return (e.createElement("div", __assign$1({ ref: ref }, rest, { "data-testid": "card-group", className: classNames('ods-card-group', "ods-card-group--".concat(variant)) }),
|
|
489
|
-
(title || subtitle) && (e.createElement(Header, { title: title, subtitle: subtitle, count: count })),
|
|
493
|
+
(title || subtitle) && (e.createElement(Header, { title: title, subtitle: subtitle, count: count, tag: tag })),
|
|
490
494
|
children && variant !== 'header' && (e.createElement(e.Fragment, null,
|
|
491
495
|
(title || subtitle) && e.createElement("hr", { className: "ods-divider" }),
|
|
492
496
|
e.createElement("div", null, children))),
|
|
493
|
-
actionLabel && variant !== 'header' && (e.createElement(ActionButton, { actionLabel: actionLabel, actionClick: actionClick }))));
|
|
497
|
+
actionLabel && variant !== 'header' && (e.createElement(ActionButton, { actionLabel: actionLabel, actionCount: actionCount, actionClick: actionClick }))));
|
|
494
498
|
});
|
|
495
499
|
CardGroup.displayName = 'CardGroup';
|
|
496
500
|
|