@useblu/ocean-react 1.128.0 → 1.130.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/Badge/Badge.d.ts +2 -2
- package/Badge/Badge.d.ts.map +1 -1
- package/CHANGELOG.md +12 -0
- package/CardGroup/ActionButton.d.ts +3 -1
- package/CardGroup/ActionButton.d.ts.map +1 -1
- package/CardGroup/CardGroup.d.ts +2 -0
- package/CardGroup/CardGroup.d.ts.map +1 -1
- package/InternalContextualHero/InternalContextualHero.d.ts +2 -0
- package/InternalContextualHero/InternalContextualHero.d.ts.map +1 -1
- package/index.es.js +24 -9
- package/index.es.js.map +1 -1
- package/index.js +24 -9
- package/index.js.map +1 -1
- package/package.json +1 -1
package/Badge/Badge.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type BadgeProps = {
|
|
3
3
|
variation?: 'tiny' | 'small' | 'medium';
|
|
4
|
-
color?: 'brand' | 'complementary' | 'alert' | 'neutral';
|
|
4
|
+
color?: 'brand' | 'complementary' | 'alert' | 'neutral' | 'highlight';
|
|
5
5
|
count?: number;
|
|
6
6
|
} & React.ComponentPropsWithoutRef<'div'>;
|
|
7
7
|
declare const Badge: React.ForwardRefExoticComponent<{
|
|
8
8
|
variation?: "tiny" | "small" | "medium";
|
|
9
|
-
color?: "brand" | "complementary" | "alert" | "neutral";
|
|
9
|
+
color?: "brand" | "complementary" | "alert" | "neutral" | "highlight";
|
|
10
10
|
count?: number;
|
|
11
11
|
} & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
export default Badge;
|
package/Badge/Badge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,UAAU,GAAG;IAKvB,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAIxC,KAAK,CAAC,EAAE,OAAO,GAAG,eAAe,GAAG,OAAO,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,UAAU,GAAG;IAKvB,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAIxC,KAAK,CAAC,EAAE,OAAO,GAAG,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;IAItE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAE1C,QAAA,MAAM,KAAK;gBAXG,MAAM,GAAG,OAAO,GAAG,QAAQ;YAI/B,OAAO,GAAG,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW;YAI7D,MAAM;kLAuCf,CAAC;AAIF,eAAe,KAAK,CAAC"}
|
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.130.0](https://github.com/ocean-ds/ocean-web/compare/v1.129.0...v1.130.0) (2026-02-12)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- add action badge color on cardgroup ([#1226](https://github.com/ocean-ds/ocean-web/issues/1226)) ([527aaa4](https://github.com/ocean-ds/ocean-web/commit/527aaa494be3914d60b3046c63b0763f88909cc2))
|
|
11
|
+
|
|
12
|
+
# [1.129.0](https://github.com/ocean-ds/ocean-web/compare/v1.128.1...v1.129.0) (2026-02-05)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
- create new properties to internal contextual hero ([#1223](https://github.com/ocean-ds/ocean-web/issues/1223)) ([5e2103c](https://github.com/ocean-ds/ocean-web/commit/5e2103cc6d2f16c6f06cf702686409381d4e99d6))
|
|
17
|
+
|
|
6
18
|
# [1.128.0](https://github.com/ocean-ds/ocean-web/compare/v1.127.0...v1.128.0) (2026-02-04)
|
|
7
19
|
|
|
8
20
|
### Features
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
type BadgeColor = 'brand' | 'complementary' | 'alert' | 'neutral' | 'highlight';
|
|
1
2
|
interface IActionButtonProps {
|
|
2
3
|
actionLabel?: string;
|
|
3
4
|
actionCount?: number;
|
|
4
5
|
actionClick?: () => void;
|
|
6
|
+
actionBadgeColor?: BadgeColor;
|
|
5
7
|
}
|
|
6
|
-
declare const ActionButton: ({ actionLabel, actionCount, actionClick, }: IActionButtonProps) => JSX.Element;
|
|
8
|
+
declare const ActionButton: ({ actionLabel, actionCount, actionClick, actionBadgeColor, }: IActionButtonProps) => JSX.Element;
|
|
7
9
|
export default ActionButton;
|
|
8
10
|
//# sourceMappingURL=ActionButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
1
|
+
{"version":3,"file":"ActionButton.d.ts","sourceRoot":"","sources":["../../src/CardGroup/ActionButton.tsx"],"names":[],"mappings":"AAIA,KAAK,UAAU,GAAG,OAAO,GAAG,eAAe,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AAEhF,UAAU,kBAAkB;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,gBAAgB,CAAC,EAAE,UAAU,CAAC;CAC/B;AAED,QAAA,MAAM,YAAY,GAAI,8DAKnB,kBAAkB,KAAG,GAAG,CAAC,OAuB3B,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
package/CardGroup/CardGroup.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TagProps } from '../Tag/Tag';
|
|
3
|
+
export type CardGroupActionBadgeColor = 'brand' | 'complementary' | 'alert' | 'neutral' | 'highlight';
|
|
3
4
|
export interface ICardGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
5
|
title?: string;
|
|
5
6
|
subtitle?: string;
|
|
@@ -9,6 +10,7 @@ export interface ICardGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
9
10
|
actionLabel?: string;
|
|
10
11
|
actionCount?: number;
|
|
11
12
|
actionClick?: () => void;
|
|
13
|
+
actionBadgeColor?: CardGroupActionBadgeColor;
|
|
12
14
|
children?: React.ReactNode;
|
|
13
15
|
}
|
|
14
16
|
declare const CardGroup: React.ForwardRefExoticComponent<ICardGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
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,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,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,
|
|
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,MAAM,yBAAyB,GACjC,OAAO,GACP,eAAe,GACf,OAAO,GACP,SAAS,GACT,WAAW,CAAC;AAEhB,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,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,gBAAgB,CAAC,EAAE,yBAAyB,CAAC;IAC7C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,SAAS,wFAuCd,CAAC;AAIF,eAAe,SAAS,CAAC"}
|
|
@@ -8,12 +8,14 @@ export type InternalContextualHeroAction = {
|
|
|
8
8
|
onClick: () => void;
|
|
9
9
|
};
|
|
10
10
|
export type InternalContextualHeroProps = {
|
|
11
|
+
type?: 'default' | 'warning' | 'negative';
|
|
11
12
|
title: string;
|
|
12
13
|
description: string;
|
|
13
14
|
image?: string | ReactNode;
|
|
14
15
|
listItems: (ReactNode | InternalContextualHeroListItemString)[];
|
|
15
16
|
actions?: [InternalContextualHeroAction] | [InternalContextualHeroAction, InternalContextualHeroAction];
|
|
16
17
|
className?: string;
|
|
18
|
+
imagePosition?: 'top' | 'bottom' | 'full';
|
|
17
19
|
};
|
|
18
20
|
declare const InternalContextualHero: React.ForwardRefExoticComponent<InternalContextualHeroProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
21
|
export default InternalContextualHero;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalContextualHero.d.ts","sourceRoot":"","sources":["../../src/InternalContextualHero/InternalContextualHero.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKzC,MAAM,MAAM,oCAAoC,GAAG;
|
|
1
|
+
{"version":3,"file":"InternalContextualHero.d.ts","sourceRoot":"","sources":["../../src/InternalContextualHero/InternalContextualHero.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKzC,MAAM,MAAM,oCAAoC,GAAG;IAIjD,IAAI,CAAC,EAAE,SAAS,CAAC;IAIjB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IAIzC,KAAK,EAAE,MAAM,CAAC;IAId,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IAKxC,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAI1C,KAAK,EAAE,MAAM,CAAC;IAId,WAAW,EAAE,MAAM,CAAC;IAIpB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAK3B,SAAS,EAAE,CAAC,SAAS,GAAG,oCAAoC,CAAC,EAAE,CAAC;IAKhE,OAAO,CAAC,EAAE,CAAC,4BAA4B,CAAC,GAAG,CAAC,4BAA4B,EAAE,4BAA4B,CAAC,CAAC;IAIxG,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,aAAa,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;CAC3C,CAAC;AAmBF,QAAA,MAAM,sBAAsB,oGA0D3B,CAAC;AAIF,eAAe,sBAAsB,CAAC"}
|
package/index.es.js
CHANGED
|
@@ -503,22 +503,23 @@ var Header = function (_a) {
|
|
|
503
503
|
};
|
|
504
504
|
|
|
505
505
|
var ActionButton = function (_a) {
|
|
506
|
-
var actionLabel = _a.actionLabel, actionCount = _a.actionCount, actionClick = _a.actionClick;
|
|
506
|
+
var actionLabel = _a.actionLabel, actionCount = _a.actionCount, actionClick = _a.actionClick, actionBadgeColor = _a.actionBadgeColor;
|
|
507
|
+
var badgeColor = actionBadgeColor !== null && actionBadgeColor !== void 0 ? actionBadgeColor : (actionCount === 0 ? 'neutral' : 'alert');
|
|
507
508
|
return (e.createElement(e.Fragment, null,
|
|
508
509
|
e.createElement("hr", { className: "ods-divider" }),
|
|
509
510
|
e.createElement("button", { onClick: actionClick, type: "button", className: "ods-card-group__action", "aria-label": actionLabel },
|
|
510
511
|
e.createElement("span", { className: "ods-card-group__action--label" }, actionLabel),
|
|
511
512
|
e.createElement("div", { className: "ods-card-group__action--right" },
|
|
512
|
-
actionCount !== undefined && (e.createElement(Badge, { variation: "medium", color:
|
|
513
|
+
actionCount !== undefined && (e.createElement(Badge, { variation: "medium", color: badgeColor, count: actionCount })),
|
|
513
514
|
e.createElement(re, { size: 20 })))));
|
|
514
515
|
};
|
|
515
516
|
|
|
516
517
|
var CardGroup = forwardRef(function (_a, ref) {
|
|
517
|
-
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"]);
|
|
518
|
+
var title = _a.title, subtitle = _a.subtitle, actionLabel = _a.actionLabel, actionCount = _a.actionCount, actionClick = _a.actionClick, actionBadgeColor = _a.actionBadgeColor, 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", "actionBadgeColor", "count", "tag", "children", "variant"]);
|
|
518
519
|
return (e.createElement("div", __assign$1({ ref: ref }, rest, { "data-testid": "card-group", className: classNames('ods-card-group', "ods-card-group--".concat(variant)) }),
|
|
519
520
|
(title || subtitle) && (e.createElement(Header, { title: title, subtitle: subtitle, count: count, tag: tag })),
|
|
520
521
|
children && variant !== 'header' && e.createElement("div", null, children),
|
|
521
|
-
actionLabel && variant !== 'header' && (e.createElement(ActionButton, { actionLabel: actionLabel, actionCount: actionCount, actionClick: actionClick }))));
|
|
522
|
+
actionLabel && variant !== 'header' && (e.createElement(ActionButton, { actionLabel: actionLabel, actionCount: actionCount, actionClick: actionClick, actionBadgeColor: actionBadgeColor }))));
|
|
522
523
|
});
|
|
523
524
|
CardGroup.displayName = 'CardGroup';
|
|
524
525
|
|
|
@@ -47808,26 +47809,40 @@ ListExpandable.displayName = 'ListExpandable';
|
|
|
47808
47809
|
var isListItemString = function (item) {
|
|
47809
47810
|
return typeof item === 'object' && item !== null && 'description' in item;
|
|
47810
47811
|
};
|
|
47812
|
+
var primaryButtonVariants = {
|
|
47813
|
+
default: 'primary',
|
|
47814
|
+
warning: 'primaryWarning',
|
|
47815
|
+
negative: 'primaryCritical',
|
|
47816
|
+
};
|
|
47817
|
+
var secondaryButtonVariants = {
|
|
47818
|
+
default: 'tertiary',
|
|
47819
|
+
warning: 'tertiaryWarning',
|
|
47820
|
+
negative: 'tertiaryCritical',
|
|
47821
|
+
};
|
|
47811
47822
|
var InternalContextualHero = e.forwardRef(function (_a, ref) {
|
|
47812
|
-
var
|
|
47823
|
+
var _b;
|
|
47824
|
+
var title = _a.title, description = _a.description, image = _a.image, listItems = _a.listItems, actions = _a.actions, className = _a.className, _c = _a.imagePosition, imagePosition = _c === void 0 ? 'top' : _c, _d = _a.type, type = _d === void 0 ? 'default' : _d;
|
|
47813
47825
|
var renderImage = function () {
|
|
47814
47826
|
if (typeof image === 'string') {
|
|
47815
47827
|
return e.createElement("img", { src: image, alt: title });
|
|
47816
47828
|
}
|
|
47817
47829
|
return image;
|
|
47818
47830
|
};
|
|
47819
|
-
return (e.createElement("div", { "data-testid": "internal-contextual-hero", className: classNames('ods-internal-contextual-hero', className
|
|
47831
|
+
return (e.createElement("div", { "data-testid": "internal-contextual-hero", className: classNames('ods-internal-contextual-hero', className, (_b = {},
|
|
47832
|
+
_b["ods-internal-contextual-hero--".concat(type)] = type,
|
|
47833
|
+
_b["ods-internal-contextual-hero--".concat(imagePosition)] = imagePosition,
|
|
47834
|
+
_b)), ref: ref },
|
|
47820
47835
|
e.createElement("div", { className: 'ods-internal-contextual-hero__body' },
|
|
47821
47836
|
e.createElement("div", { className: 'ods-internal-contextual-hero__content' },
|
|
47822
47837
|
e.createElement("div", { className: 'ods-internal-contextual-hero__header' },
|
|
47823
47838
|
e.createElement(Typography, { variant: "heading3" }, title),
|
|
47824
47839
|
e.createElement(Typography, { variant: "description" }, description)),
|
|
47825
47840
|
actions && actions.length > 0 && (e.createElement("div", { className: 'ods-internal-contextual-hero__actions' },
|
|
47826
|
-
e.createElement(Button$1, { variant:
|
|
47827
|
-
actions[1] && (e.createElement(Button$1, { variant:
|
|
47841
|
+
e.createElement(Button$1, { variant: primaryButtonVariants[type], size: 'sm', onClick: actions[0].onClick }, actions[0].label),
|
|
47842
|
+
actions[1] && (e.createElement(Button$1, { variant: secondaryButtonVariants[type], size: 'sm', onClick: actions[1].onClick }, actions[1].label))))),
|
|
47828
47843
|
e.createElement("div", { className: 'ods-internal-contextual-hero__list' }, listItems === null || listItems === void 0 ? void 0 : listItems.map(function (item) {
|
|
47829
47844
|
return isListItemString(item) ? (e.createElement("div", { key: item.description, className: 'ods-internal-contextual-hero__list-item' },
|
|
47830
|
-
item.icon && e.createElement("div",
|
|
47845
|
+
item.icon && e.createElement("div", { className: "ods-internal-contextual-hero__list-item-icon" }, item.icon),
|
|
47831
47846
|
e.createElement(Typography, { variant: "description" }, item.description))) : (item);
|
|
47832
47847
|
}))),
|
|
47833
47848
|
image && (e.createElement("div", { className: 'ods-internal-contextual-hero__image' }, renderImage()))));
|