@useblu/ocean-react 1.110.0 → 1.112.1
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/Shortcut/Shortcut.d.ts +11 -3
- package/Shortcut/Shortcut.d.ts.map +1 -1
- package/index.es.js +14 -9
- package/index.es.js.map +1 -1
- package/index.js +14 -9
- 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.1](https://github.com/ocean-ds/ocean-web/compare/v1.112.0...v1.112.1) (2025-10-07)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- tag position and limit props to accept only tag or count prop ([#1191](https://github.com/ocean-ds/ocean-web/issues/1191)) ([7d0952f](https://github.com/ocean-ds/ocean-web/commit/7d0952fe23e34c5ebb36ab30303e2a0bbf39028f))
|
|
11
|
+
|
|
12
|
+
# [1.112.0](https://github.com/ocean-ds/ocean-web/compare/v1.111.0...v1.112.0) (2025-10-07)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
- add tag and actionCount ([#1192](https://github.com/ocean-ds/ocean-web/issues/1192)) ([77e9f5f](https://github.com/ocean-ds/ocean-web/commit/77e9f5fb31eadb1f26820f6b105b966450af6b46))
|
|
17
|
+
|
|
6
18
|
# [1.110.0](https://github.com/ocean-ds/ocean-web/compare/v1.109.0...v1.110.0) (2025-08-25)
|
|
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"}
|
package/Shortcut/Shortcut.d.ts
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type ShortcutSize = 'tiny' | 'small' | 'medium';
|
|
3
|
+
type ExclusiveTagOrCount = {
|
|
4
|
+
tag: string;
|
|
5
|
+
count?: never;
|
|
6
|
+
} | {
|
|
7
|
+
tag?: never;
|
|
8
|
+
count: number;
|
|
9
|
+
} | {
|
|
10
|
+
tag?: never;
|
|
11
|
+
count?: never;
|
|
12
|
+
};
|
|
3
13
|
export type ShortcutProps = {
|
|
4
14
|
icon: React.ReactNode;
|
|
5
15
|
label: string;
|
|
@@ -7,11 +17,9 @@ export type ShortcutProps = {
|
|
|
7
17
|
size?: ShortcutSize;
|
|
8
18
|
blocked?: boolean;
|
|
9
19
|
disabled?: boolean;
|
|
10
|
-
count?: number;
|
|
11
20
|
fullWidth?: boolean;
|
|
12
21
|
orientation?: 'horizontal' | 'vertical';
|
|
13
|
-
|
|
14
|
-
} & React.ComponentPropsWithoutRef<'div'>;
|
|
22
|
+
} & ExclusiveTagOrCount & React.ComponentPropsWithoutRef<'div'>;
|
|
15
23
|
declare const Shortcut: ({ icon, label, description, size, blocked, disabled, fullWidth, orientation, count, tag, ...rest }: ShortcutProps) => React.ReactElement;
|
|
16
24
|
export default Shortcut;
|
|
17
25
|
//# sourceMappingURL=Shortcut.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Shortcut.d.ts","sourceRoot":"","sources":["../../src/Shortcut/Shortcut.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,KAAK,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEhD,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,
|
|
1
|
+
{"version":3,"file":"Shortcut.d.ts","sourceRoot":"","sources":["../../src/Shortcut/Shortcut.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,KAAK,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEhD,KAAK,mBAAmB,GACpB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GAC9B;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAEnC,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;CACzC,GAAG,mBAAmB,GACrB,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAExC,QAAA,MAAM,QAAQ,GAAI,oGAYf,aAAa,KAAG,KAAK,CAAC,YA+DxB,CAAC;AAEF,eAAe,QAAQ,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
|
|
|
@@ -46883,11 +46887,12 @@ var Shortcut = function (_a) {
|
|
|
46883
46887
|
return (e.createElement("div", __assign$1({ className: classNames('ods-shortcut', "ods-shortcut--".concat(size), blocked && 'ods-shortcut--blocked', disabled && 'ods-shortcut--disabled', fullWidth && 'ods-shortcut--full-width', count && 'ods-shortcut--with-badge', "ods-shortcut--".concat(orientation)) }, rest),
|
|
46884
46888
|
blocked && (e.createElement("div", { className: "ods-shortcut__blocked" },
|
|
46885
46889
|
e.createElement(At, null))),
|
|
46886
|
-
count ? (e.createElement(Badge, { className: "ods-shortcut__badge", variation: "small", color:
|
|
46890
|
+
!blocked && count ? (e.createElement(Badge, { className: "ods-shortcut__badge", variation: "small", color: disabled ? 'neutral' : 'alert', count: count })) : null,
|
|
46891
|
+
!blocked && tag && orientation === 'vertical' && (e.createElement(Tag, { className: "ods-shortcut__tag", variant: "highlight", type: "important" }, tag)),
|
|
46887
46892
|
e.createElement("div", { className: classNames('ods-shortcut__content', "ods-shortcut__content--".concat(orientation)) },
|
|
46888
46893
|
e.createElement("div", { className: "ods-shortcut__icon" }, icon),
|
|
46889
46894
|
e.createElement("h5", { className: classNames('ods-shortcut__label', 'ods-typography__heading5') }, label),
|
|
46890
|
-
tag && (e.createElement(Tag, { variant: "highlight", type: "important" }, tag))),
|
|
46895
|
+
tag && orientation === 'horizontal' && (e.createElement(Tag, { variant: "highlight", type: "important" }, tag))),
|
|
46891
46896
|
size === 'medium' && description && (e.createElement("span", { className: classNames('ods-shortcut__description', 'ods-typography__description') }, description))));
|
|
46892
46897
|
};
|
|
46893
46898
|
|