@useblu/ocean-react 1.135.0 → 1.136.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 +10 -0
- package/CornerTag/CornerTag.d.ts +10 -0
- package/CornerTag/CornerTag.d.ts.map +1 -0
- package/CornerTag/index.d.ts +3 -0
- package/CornerTag/index.d.ts.map +1 -0
- package/Date/utils/testHelpers.d.ts +1 -1
- package/Date/utils/testHelpers.d.ts.map +1 -1
- package/ListReadOnly/ListReadOnly.d.ts +3 -0
- package/ListReadOnly/ListReadOnly.d.ts.map +1 -1
- package/ListSelectable/ListSelectable.d.ts +11 -2
- package/ListSelectable/ListSelectable.d.ts.map +1 -1
- package/_shared/components/ListContainer/ListContainer.d.ts +3 -0
- package/_shared/components/ListContainer/ListContainer.d.ts.map +1 -1
- package/index.es.js +22 -12
- package/index.es.js.map +1 -1
- package/index.js +22 -12
- package/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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.136.0](https://github.com/ocean-ds/ocean-web/compare/v1.135.3...v1.136.0) (2026-05-11)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **list-selectable:** add cornerTag prop with Highlight Corner Tag (MR-490) ([#1244](https://github.com/ocean-ds/ocean-web/issues/1244)) ([d30ed92](https://github.com/ocean-ds/ocean-web/commit/d30ed92d41b2837a42749ca0056314b6cda9243f)), closes [/github.com/Pagnet/pagnet/issues/16178#issuecomment-4343595459](https://github.com//github.com/Pagnet/pagnet/issues/16178/issues/issuecomment-4343595459)
|
|
11
|
+
|
|
12
|
+
## [1.135.3](https://github.com/ocean-ds/ocean-web/compare/v1.135.2...v1.135.3) (2026-04-30)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @useblu/ocean-react
|
|
15
|
+
|
|
6
16
|
# [1.135.0](https://github.com/ocean-ds/ocean-web/compare/v1.134.1...v1.135.0) (2026-04-14)
|
|
7
17
|
|
|
8
18
|
### Features
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type CornerTagColor = 'primaryDown' | 'complementaryPure';
|
|
3
|
+
export interface CornerTagProps {
|
|
4
|
+
label: string;
|
|
5
|
+
color?: CornerTagColor;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const CornerTag: React.ForwardRefExoticComponent<CornerTagProps & React.RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
export default CornerTag;
|
|
10
|
+
//# sourceMappingURL=CornerTag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CornerTag.d.ts","sourceRoot":"","sources":["../../src/CornerTag/CornerTag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,mBAAmB,CAAC;AAEjE,MAAM,WAAW,cAAc;IAE7B,KAAK,EAAE,MAAM,CAAC;IAEd,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,SAAS,wFAkBd,CAAC;AAIF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/CornerTag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -5,7 +5,7 @@ export declare function expectTooltipToAppear(message: string, timeout?: number)
|
|
|
5
5
|
export declare function expectTooltipNotToAppear(): void;
|
|
6
6
|
export declare function expectTooltipNotToAppearAsync(): Promise<void>;
|
|
7
7
|
export declare const commonDisabledDaysProps: {
|
|
8
|
-
disabledDays: Matcher[];
|
|
8
|
+
readonly disabledDays: Matcher[];
|
|
9
9
|
disabledDaysMessage: string;
|
|
10
10
|
};
|
|
11
11
|
export declare function getFirstDisabledDate(): Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testHelpers.d.ts","sourceRoot":"","sources":["../../../src/Date/utils/testHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAK3C,wBAAgB,gBAAgB,IAAI,IAAI,CAavC;AAKD,wBAAgB,YAAY,CAAC,WAAW,SAAuB,GAAG,IAAI,CAIrE;AAKD,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,EACf,OAAO,SAAO,GACb,OAAO,CAAC,IAAI,CAAC,CASf;AAKD,wBAAgB,wBAAwB,IAAI,IAAI,CAI/C;AAKD,wBAAsB,6BAA6B,IAAI,OAAO,CAAC,IAAI,CAAC,CAMnE;AAED,eAAO,MAAM,uBAAuB;
|
|
1
|
+
{"version":3,"file":"testHelpers.d.ts","sourceRoot":"","sources":["../../../src/Date/utils/testHelpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAK3C,wBAAgB,gBAAgB,IAAI,IAAI,CAavC;AAKD,wBAAgB,YAAY,CAAC,WAAW,SAAuB,GAAG,IAAI,CAIrE;AAKD,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,EACf,OAAO,SAAO,GACb,OAAO,CAAC,IAAI,CAAC,CASf;AAKD,wBAAgB,wBAAwB,IAAI,IAAI,CAI/C;AAKD,wBAAsB,6BAA6B,IAAI,OAAO,CAAC,IAAI,CAAC,CAMnE;AAED,eAAO,MAAM,uBAAuB;2BACd,OAAO,EAAE;;CAI9B,CAAC;AAEF,wBAAgB,oBAAoB,IAAI,IAAI,CAG3C;AAGD,eAAO,MAAM,qBAAqB,sBAAsB,CAAC;AAEzD,wBAAgB,yBAAyB,IAAI;IAC3C,YAAY,EAAE,OAAO,EAAE,CAAC;IACxB,mBAAmB,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACxD,CAOA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { ContentListProps } from '../_shared/components/ContentList';
|
|
3
3
|
import { ListContainerHighlight } from '../_shared/components/ListContainer';
|
|
4
|
+
import { CornerTagProps } from '../CornerTag/CornerTag';
|
|
4
5
|
export type ListReadOnlyProps = {
|
|
5
6
|
title: string;
|
|
6
7
|
description?: string;
|
|
@@ -15,6 +16,7 @@ export type ListReadOnlyProps = {
|
|
|
15
16
|
loading?: boolean;
|
|
16
17
|
showDivider?: boolean;
|
|
17
18
|
highlight?: ListContainerHighlight;
|
|
19
|
+
cornerTag?: CornerTagProps;
|
|
18
20
|
} & React.ComponentPropsWithoutRef<'div'>;
|
|
19
21
|
declare const ListReadOnly: React.ForwardRefExoticComponent<{
|
|
20
22
|
title: string;
|
|
@@ -30,6 +32,7 @@ declare const ListReadOnly: React.ForwardRefExoticComponent<{
|
|
|
30
32
|
loading?: boolean;
|
|
31
33
|
showDivider?: boolean;
|
|
32
34
|
highlight?: ListContainerHighlight;
|
|
35
|
+
cornerTag?: CornerTagProps;
|
|
33
36
|
} & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>;
|
|
34
37
|
export default ListReadOnly;
|
|
35
38
|
//# sourceMappingURL=ListReadOnly.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListReadOnly.d.ts","sourceRoot":"","sources":["../../src/ListReadOnly/ListReadOnly.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAoB,EAClB,gBAAgB,EACjB,MAAM,mCAAmC,CAAC;AAE3C,OAAsB,EACpB,sBAAsB,EACvB,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"ListReadOnly.d.ts","sourceRoot":"","sources":["../../src/ListReadOnly/ListReadOnly.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAoB,EAClB,gBAAgB,EACjB,MAAM,mCAAmC,CAAC;AAE3C,OAAsB,EACpB,sBAAsB,EACvB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,MAAM,iBAAiB,GAAG;IAI9B,KAAK,EAAE,MAAM,CAAC;IAId,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAIlC,OAAO,CAAC,EAAE,MAAM,CAAC;IAIjB,IAAI,CAAC,EAAE,SAAS,CAAC;IAIjB,SAAS,CAAC,EAAE,SAAS,CAAC;IAKtB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAKvB,MAAM,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAKlC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAKnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAKnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAKlB,WAAW,CAAC,EAAE,OAAO,CAAC;IAItB,SAAS,CAAC,EAAE,sBAAsB,CAAC;IAKnC,SAAS,CAAC,EAAE,cAAc,CAAC;CAC5B,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAE1C,QAAA,MAAM,YAAY;WA9DT,MAAM;kBAIC,MAAM;+BAIO,MAAM;cAIvB,MAAM;WAIT,SAAS;gBAIJ,SAAS;WAKd,MAAM,GAAG,MAAM;aAKb,gBAAgB,CAAC,MAAM,CAAC;eAKtB,OAAO;eAKP,OAAO;cAKR,OAAO;kBAKH,OAAO;gBAIT,sBAAsB;gBAKtB,cAAc;kLAmF3B,CAAC;AAIF,eAAe,YAAY,CAAC"}
|
|
@@ -3,7 +3,8 @@ import { ContentListProps } from '../_shared/components/ContentList/ContentList'
|
|
|
3
3
|
import { CheckboxProps } from '../Checkbox/Checkbox';
|
|
4
4
|
import { RadioProps } from '../Radio/Radio';
|
|
5
5
|
import { ListContainerHighlight } from '../_shared/components/ListContainer';
|
|
6
|
-
|
|
6
|
+
import { CornerTagProps } from '../CornerTag/CornerTag';
|
|
7
|
+
interface ListSelectableBaseProps {
|
|
7
8
|
title: string;
|
|
8
9
|
description?: string;
|
|
9
10
|
caption?: string;
|
|
@@ -17,11 +18,19 @@ interface ListSelectableProps {
|
|
|
17
18
|
showDivider?: boolean;
|
|
18
19
|
indicator?: ReactNode;
|
|
19
20
|
status?: ContentListProps['type'];
|
|
20
|
-
type?: 'card' | 'text';
|
|
21
21
|
platform?: 'web' | 'app';
|
|
22
22
|
isSelectableDisabled?: boolean;
|
|
23
23
|
highlight?: ListContainerHighlight;
|
|
24
24
|
}
|
|
25
|
+
type ListSelectableCardProps = ListSelectableBaseProps & {
|
|
26
|
+
type?: 'card';
|
|
27
|
+
cornerTag?: CornerTagProps;
|
|
28
|
+
};
|
|
29
|
+
type ListSelectableTextProps = ListSelectableBaseProps & {
|
|
30
|
+
type: 'text';
|
|
31
|
+
cornerTag?: never;
|
|
32
|
+
};
|
|
33
|
+
type ListSelectableProps = ListSelectableCardProps | ListSelectableTextProps;
|
|
25
34
|
declare const ListSelectable: React.ForwardRefExoticComponent<ListSelectableProps & React.RefAttributes<HTMLDivElement>>;
|
|
26
35
|
export default ListSelectable;
|
|
27
36
|
//# sourceMappingURL=ListSelectable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListSelectable.d.ts","sourceRoot":"","sources":["../../src/ListSelectable/ListSelectable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAElD,OAAoB,EAClB,gBAAgB,EACjB,MAAM,+CAA+C,CAAC;AACvD,OAAiB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGnD,OAAsB,EACpB,sBAAsB,EACvB,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"ListSelectable.d.ts","sourceRoot":"","sources":["../../src/ListSelectable/ListSelectable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAElD,OAAoB,EAClB,gBAAgB,EACjB,MAAM,+CAA+C,CAAC;AACvD,OAAiB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGnD,OAAsB,EACpB,sBAAsB,EACvB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,UAAU,uBAAuB;IAE/B,KAAK,EAAE,MAAM,CAAC;IAEd,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,QAAQ,CAAC,EAAE,aAAa,CAAC;IAEzB,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,MAAM,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAElC,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAEzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC;AAED,KAAK,uBAAuB,GAAG,uBAAuB,GAAG;IAEvD,IAAI,CAAC,EAAE,MAAM,CAAC;IAKd,SAAS,CAAC,EAAE,cAAc,CAAC;CAC5B,CAAC;AAEF,KAAK,uBAAuB,GAAG,uBAAuB,GAAG;IACvD,IAAI,EAAE,MAAM,CAAC;IAEb,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB,CAAC;AAEF,KAAK,mBAAmB,GAAG,uBAAuB,GAAG,uBAAuB,CAAC;AAE7E,QAAA,MAAM,cAAc,4FA0HnB,CAAC;AAGF,eAAe,cAAc,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
+
import { CornerTagProps } from '../../../CornerTag/CornerTag';
|
|
2
3
|
export type ListContainerHighlight = {
|
|
3
4
|
caption: string | ReactNode;
|
|
4
5
|
captionColor?: string;
|
|
@@ -9,6 +10,7 @@ export type ListContainerProps = {
|
|
|
9
10
|
showDivider?: boolean;
|
|
10
11
|
hasError?: boolean;
|
|
11
12
|
highlight?: ListContainerHighlight;
|
|
13
|
+
cornerTag?: CornerTagProps;
|
|
12
14
|
children: ReactNode;
|
|
13
15
|
className?: string;
|
|
14
16
|
} & React.ComponentPropsWithoutRef<'div'>;
|
|
@@ -17,6 +19,7 @@ declare const ListContainer: React.ForwardRefExoticComponent<{
|
|
|
17
19
|
showDivider?: boolean;
|
|
18
20
|
hasError?: boolean;
|
|
19
21
|
highlight?: ListContainerHighlight;
|
|
22
|
+
cornerTag?: CornerTagProps;
|
|
20
23
|
children: ReactNode;
|
|
21
24
|
className?: string;
|
|
22
25
|
} & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListContainer.d.ts","sourceRoot":"","sources":["../../../../src/_shared/components/ListContainer/ListContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ListContainer.d.ts","sourceRoot":"","sources":["../../../../src/_shared/components/ListContainer/ListContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAkB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEzE,MAAM,MAAM,sBAAsB,GAAG;IAInC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAI5B,YAAY,CAAC,EAAE,MAAM,CAAC;IAItB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAK/B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAKvB,WAAW,CAAC,EAAE,OAAO,CAAC;IAKtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAInB,SAAS,CAAC,EAAE,sBAAsB,CAAC;IAKnC,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAE1C,QAAA,MAAM,aAAa;WAxBV,MAAM,GAAG,MAAM;kBAKR,OAAO;eAKV,OAAO;gBAIN,sBAAsB;gBAKtB,cAAc;cAChB,SAAS;gBACP,MAAM;kLAkDnB,CAAC;AAIF,eAAe,aAAa,CAAC"}
|
package/index.es.js
CHANGED
|
@@ -5476,9 +5476,17 @@ var SkeletonBar = function (_a) {
|
|
|
5476
5476
|
return (e.createElement("div", __assign$1({ className: "ods-skeleton-bar", style: { width: width, height: height } }, props)));
|
|
5477
5477
|
};
|
|
5478
5478
|
|
|
5479
|
+
var CornerTag = e.forwardRef(function (_a, ref) {
|
|
5480
|
+
var label = _a.label, _b = _a.color, color = _b === void 0 ? 'primaryDown' : _b, className = _a.className;
|
|
5481
|
+
if (!label)
|
|
5482
|
+
return null;
|
|
5483
|
+
return (e.createElement("span", { ref: ref, className: classNames('ods-corner-tag', "ods-corner-tag--".concat(color), className), "aria-label": label }, label));
|
|
5484
|
+
});
|
|
5485
|
+
CornerTag.displayName = 'CornerTag';
|
|
5486
|
+
|
|
5479
5487
|
var ListContainer = e.forwardRef(function (_a, ref) {
|
|
5480
5488
|
var _b, _c;
|
|
5481
|
-
var _d = _a.type, type = _d === void 0 ? 'card' : _d, _e = _a.showDivider, showDivider = _e === void 0 ? false : _e, _f = _a.hasError, hasError = _f === void 0 ? false : _f, highlight = _a.highlight, children = _a.children, className = _a.className, rest = __rest$1(_a, ["type", "showDivider", "hasError", "highlight", "children", "className"]);
|
|
5489
|
+
var _d = _a.type, type = _d === void 0 ? 'card' : _d, _e = _a.showDivider, showDivider = _e === void 0 ? false : _e, _f = _a.hasError, hasError = _f === void 0 ? false : _f, highlight = _a.highlight, cornerTag = _a.cornerTag, children = _a.children, className = _a.className, rest = __rest$1(_a, ["type", "showDivider", "hasError", "highlight", "cornerTag", "children", "className"]);
|
|
5482
5490
|
return (e.createElement("div", { className: "ods-list-container" },
|
|
5483
5491
|
e.createElement("div", __assign$1({ ref: ref, className: classNames('ods-list-container__content', className, {
|
|
5484
5492
|
'ods-list-container__content--card': type === 'card',
|
|
@@ -5486,7 +5494,8 @@ var ListContainer = e.forwardRef(function (_a, ref) {
|
|
|
5486
5494
|
'ods-list-container__content--text': type === 'text',
|
|
5487
5495
|
}) }, rest),
|
|
5488
5496
|
children,
|
|
5489
|
-
showDivider && type === 'text' && (e.createElement("div", { className: "ods-list-container__content__divider" }))
|
|
5497
|
+
showDivider && type === 'text' && (e.createElement("div", { className: "ods-list-container__content__divider" })),
|
|
5498
|
+
type === 'card' && (cornerTag === null || cornerTag === void 0 ? void 0 : cornerTag.label) && e.createElement(CornerTag, __assign$1({}, cornerTag))),
|
|
5490
5499
|
(highlight === null || highlight === void 0 ? void 0 : highlight.caption) && (e.createElement("div", { className: "ods-list-container__highlight", "data-testid": "list-container-highlight", style: { backgroundColor: (_b = highlight.backgroundColor) !== null && _b !== void 0 ? _b : '#F3F5FE' } },
|
|
5491
5500
|
e.createElement("p", { className: "ods-typography ods-typography__caption", style: { color: (_c = highlight.captionColor) !== null && _c !== void 0 ? _c : '#67697A' } }, highlight.caption)))));
|
|
5492
5501
|
});
|
|
@@ -5494,7 +5503,7 @@ ListContainer.displayName = 'ListContainer';
|
|
|
5494
5503
|
|
|
5495
5504
|
var ListReadOnly = e.forwardRef(function (_a, ref) {
|
|
5496
5505
|
var _b;
|
|
5497
|
-
var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, icon = _a.icon, indicator = _a.indicator, _c = _a.type, type = _c === void 0 ? 'card' : _c, _d = _a.status, status = _d === void 0 ? 'default' : _d, _e = _a.inverted, inverted = _e === void 0 ? false : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.loading, loading = _g === void 0 ? false : _g, className = _a.className, _h = _a.showDivider, showDivider = _h === void 0 ? false : _h, highlight = _a.highlight, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "icon", "indicator", "type", "status", "inverted", "disabled", "loading", "className", "showDivider", "highlight"]);
|
|
5506
|
+
var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, icon = _a.icon, indicator = _a.indicator, _c = _a.type, type = _c === void 0 ? 'card' : _c, _d = _a.status, status = _d === void 0 ? 'default' : _d, _e = _a.inverted, inverted = _e === void 0 ? false : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.loading, loading = _g === void 0 ? false : _g, className = _a.className, _h = _a.showDivider, showDivider = _h === void 0 ? false : _h, highlight = _a.highlight, cornerTag = _a.cornerTag, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "icon", "indicator", "type", "status", "inverted", "disabled", "loading", "className", "showDivider", "highlight", "cornerTag"]);
|
|
5498
5507
|
var renderLoadingContent = function () { return (e.createElement("div", { className: "ods-list-readonly__skeleton" },
|
|
5499
5508
|
e.createElement(SkeletonBar, { width: "40%", height: "16px" }),
|
|
5500
5509
|
e.createElement(SkeletonBar, { width: "100%", height: "16px" }))); };
|
|
@@ -5511,14 +5520,15 @@ var ListReadOnly = e.forwardRef(function (_a, ref) {
|
|
|
5511
5520
|
},
|
|
5512
5521
|
_b["ods-list-readonly--".concat(type)] = type,
|
|
5513
5522
|
_b));
|
|
5514
|
-
return (e.createElement(ListContainer, { type: type, showDivider: showDivider, highlight: highlight },
|
|
5523
|
+
return (e.createElement(ListContainer, { type: type, showDivider: showDivider, highlight: highlight, cornerTag: cornerTag },
|
|
5515
5524
|
e.createElement("div", __assign$1({ ref: ref, "data-testid": "card-list-readonly", className: cardClassName }, rest), loading ? renderLoadingContent() : renderContent())));
|
|
5516
5525
|
});
|
|
5517
5526
|
ListReadOnly.displayName = 'ListReadOnly';
|
|
5518
5527
|
|
|
5519
|
-
var ListSelectable = e.forwardRef(function (
|
|
5520
|
-
var
|
|
5521
|
-
var title =
|
|
5528
|
+
var ListSelectable = e.forwardRef(function (props, ref) {
|
|
5529
|
+
var _a;
|
|
5530
|
+
var _b = props, title = _b.title, description = _b.description, caption = _b.caption, strikethroughDescription = _b.strikethroughDescription, inverted = _b.inverted, loading = _b.loading, disabled = _b.disabled, checkbox = _b.checkbox, radio = _b.radio, className = _b.className, showDivider = _b.showDivider, indicator = _b.indicator, isSelectableDisabled = _b.isSelectableDisabled, highlight = _b.highlight, _c = _b.status, status = _c === void 0 ? 'default' : _c, _d = _b.type, type = _d === void 0 ? 'card' : _d, _e = _b.platform, platform = _e === void 0 ? 'web' : _e, cornerTag = _b.cornerTag, rest = __rest$1(_b, ["title", "description", "caption", "strikethroughDescription", "inverted", "loading", "disabled", "checkbox", "radio", "className", "showDivider", "indicator", "isSelectableDisabled", "highlight", "status", "type", "platform", "cornerTag"]);
|
|
5531
|
+
var cardCornerTag = type === 'card' ? cornerTag : undefined;
|
|
5522
5532
|
var hasError = useMemo(function () { return (radio === null || radio === void 0 ? void 0 : radio.error) || (checkbox === null || checkbox === void 0 ? void 0 : checkbox.error); }, [radio === null || radio === void 0 ? void 0 : radio.error, checkbox === null || checkbox === void 0 ? void 0 : checkbox.error]);
|
|
5523
5533
|
var isInputDisabled = useMemo(function () { return (radio === null || radio === void 0 ? void 0 : radio.disabled) || (checkbox === null || checkbox === void 0 ? void 0 : checkbox.disabled) || disabled; }, [radio === null || radio === void 0 ? void 0 : radio.disabled, checkbox === null || checkbox === void 0 ? void 0 : checkbox.disabled, disabled]);
|
|
5524
5534
|
var internalList = useMemo(function () {
|
|
@@ -5545,14 +5555,14 @@ var ListSelectable = e.forwardRef(function (_a, ref) {
|
|
|
5545
5555
|
e.createElement(SkeletonBar, { width: "100%", height: "16px" })));
|
|
5546
5556
|
}
|
|
5547
5557
|
if (isSelectableDisabled) {
|
|
5548
|
-
return (e.createElement(ListReadOnly, __assign$1({ title: title, description: description, status: status, type: type, inverted: inverted, disabled: disabled, loading: loading, className: className, showDivider: showDivider, indicator: indicator, caption: caption, strikethroughDescription: strikethroughDescription, highlight: highlight }, rest, { ref: ref })));
|
|
5558
|
+
return (e.createElement(ListReadOnly, __assign$1({ title: title, description: description, status: status, type: type, inverted: inverted, disabled: disabled, loading: loading, className: className, showDivider: showDivider, indicator: indicator, caption: caption, strikethroughDescription: strikethroughDescription, highlight: highlight, cornerTag: cardCornerTag }, rest, { ref: ref })));
|
|
5549
5559
|
}
|
|
5550
|
-
return (e.createElement(ListContainer, { type: type, showDivider: showDivider, hasError: hasError, highlight: highlight },
|
|
5551
|
-
e.createElement("div", __assign$1({ className: classNames('ods-list-selectable', className, (
|
|
5560
|
+
return (e.createElement(ListContainer, { type: type, showDivider: showDivider, hasError: hasError, highlight: highlight, cornerTag: cardCornerTag },
|
|
5561
|
+
e.createElement("div", __assign$1({ className: classNames('ods-list-selectable', className, (_a = {
|
|
5552
5562
|
'ods-list-selectable--disabled': isInputDisabled
|
|
5553
5563
|
},
|
|
5554
|
-
|
|
5555
|
-
|
|
5564
|
+
_a["ods-list-selectable--".concat(platform)] = platform,
|
|
5565
|
+
_a)), ref: ref }, rest),
|
|
5556
5566
|
checkbox && e.createElement(Checkbox, __assign$1({}, checkbox, { label: internalList })),
|
|
5557
5567
|
radio && e.createElement(Radio, __assign$1({}, radio, { label: internalList })))));
|
|
5558
5568
|
});
|