@useblu/ocean-react 1.133.0 → 1.134.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/ListAction/ListAction.d.ts +3 -0
- package/ListAction/ListAction.d.ts.map +1 -1
- package/ListExpandable/ListExpandable.d.ts +3 -0
- package/ListExpandable/ListExpandable.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 +3 -0
- package/ListSelectable/ListSelectable.d.ts.map +1 -1
- package/ListSettings/ListSettings.d.ts +3 -0
- package/ListSettings/ListSettings.d.ts.map +1 -1
- package/_shared/components/ListContainer/ListContainer.d.ts +24 -0
- package/_shared/components/ListContainer/ListContainer.d.ts.map +1 -0
- package/_shared/components/ListContainer/index.d.ts +4 -0
- package/_shared/components/ListContainer/index.d.ts.map +1 -0
- package/index.es.js +62 -49
- package/index.es.js.map +1 -1
- package/index.js +62 -49
- 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.134.1](https://github.com/ocean-ds/ocean-web/compare/v1.134.0...v1.134.1) (2026-03-18)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- adjust is selectable disabled type ([#1233](https://github.com/ocean-ds/ocean-web/issues/1233)) ([a491433](https://github.com/ocean-ds/ocean-web/commit/a491433adc26e2f2035e95fa16ee2de3c45620af))
|
|
11
|
+
|
|
12
|
+
# [1.134.0](https://github.com/ocean-ds/ocean-web/compare/v1.133.1...v1.134.0) (2026-03-18)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
- adjust list components ([#1232](https://github.com/ocean-ds/ocean-web/issues/1232)) ([1888076](https://github.com/ocean-ds/ocean-web/commit/1888076b0d5f7c443f9863497e150ee431791e17))
|
|
17
|
+
|
|
6
18
|
# [1.133.0](https://github.com/ocean-ds/ocean-web/compare/v1.132.0...v1.133.0) (2026-03-05)
|
|
7
19
|
|
|
8
20
|
### Features
|
|
@@ -2,6 +2,7 @@ import React, { ReactNode } from 'react';
|
|
|
2
2
|
import { ContentListProps } from '../_shared/components/ContentList';
|
|
3
3
|
import { ActionItem } from '../_shared/components/InternalListActions';
|
|
4
4
|
import { AmountDetailsProps } from '../_shared/components/AmountDetails';
|
|
5
|
+
import { ListContainerHighlight } from '../_shared/components/ListContainer';
|
|
5
6
|
export type ListActionProps = {
|
|
6
7
|
title: string;
|
|
7
8
|
description?: string;
|
|
@@ -21,6 +22,7 @@ export type ListActionProps = {
|
|
|
21
22
|
showDivider?: boolean;
|
|
22
23
|
amountDetails?: AmountDetailsProps;
|
|
23
24
|
position?: 'first' | 'middle' | 'last';
|
|
25
|
+
highlight?: ListContainerHighlight;
|
|
24
26
|
} & Omit<React.ComponentPropsWithoutRef<'button'>, 'type'>;
|
|
25
27
|
declare const ListAction: React.ForwardRefExoticComponent<{
|
|
26
28
|
title: string;
|
|
@@ -41,6 +43,7 @@ declare const ListAction: React.ForwardRefExoticComponent<{
|
|
|
41
43
|
showDivider?: boolean;
|
|
42
44
|
amountDetails?: AmountDetailsProps;
|
|
43
45
|
position?: "first" | "middle" | "last";
|
|
46
|
+
highlight?: ListContainerHighlight;
|
|
44
47
|
} & Omit<Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof React.ButtonHTMLAttributes<HTMLButtonElement>>, "type"> & React.RefAttributes<HTMLButtonElement>>;
|
|
45
48
|
export default ListAction;
|
|
46
49
|
//# sourceMappingURL=ListAction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListAction.d.ts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GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;AAE3D,QAAA,MAAM,UAAU;WApFP,MAAM;kBAIC,MAAM;+BAIO,MAAM;cAIvB,MAAM;eAKL,OAAO;WAKX,MAAM,GAAG,MAAM;aAKb,gBAAgB,CAAC,MAAM,CAAC;eAKtB,OAAO;cAKR,OAAO;WAIV,SAAS;gBAIJ,SAAS;iBAKR,SAAS,GAAG,MAAM,GAAG,OAAO;kBAI3B,UAAU,EAAE;mBAKX,aAAa,GAAG,cAAc,GAAG,UAAU,GAAG,WAAW;cAI9D,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI;kBAKhD,OAAO;oBAIL,kBAAkB;eAKvB,OAAO,GAAG,QAAQ,GAAG,MAAM;gBAI1B,sBAAsB;wNAiKnC,CAAC;AAIF,eAAe,UAAU,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { ContentListProps } from '../_shared/components/ContentList';
|
|
3
|
+
import { ListContainerHighlight } from '../_shared/components/ListContainer';
|
|
3
4
|
export type ListExpandableProps = {
|
|
4
5
|
title: string;
|
|
5
6
|
description?: string;
|
|
@@ -17,6 +18,7 @@ export type ListExpandableProps = {
|
|
|
17
18
|
children?: ReactNode;
|
|
18
19
|
disabled?: boolean;
|
|
19
20
|
showDivider?: boolean;
|
|
21
|
+
highlight?: ListContainerHighlight;
|
|
20
22
|
} & Omit<React.ComponentPropsWithoutRef<'div'>, 'children'>;
|
|
21
23
|
declare const ListExpandable: React.ForwardRefExoticComponent<{
|
|
22
24
|
title: string;
|
|
@@ -35,6 +37,7 @@ declare const ListExpandable: React.ForwardRefExoticComponent<{
|
|
|
35
37
|
children?: ReactNode;
|
|
36
38
|
disabled?: boolean;
|
|
37
39
|
showDivider?: boolean;
|
|
40
|
+
highlight?: ListContainerHighlight;
|
|
38
41
|
} & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "children"> & React.RefAttributes<HTMLDivElement>>;
|
|
39
42
|
export default ListExpandable;
|
|
40
43
|
//# sourceMappingURL=ListExpandable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListExpandable.d.ts","sourceRoot":"","sources":["../../src/ListExpandable/ListExpandable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAGnD,OAAoB,EAClB,gBAAgB,EACjB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"ListExpandable.d.ts","sourceRoot":"","sources":["../../src/ListExpandable/ListExpandable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAGnD,OAAoB,EAClB,gBAAgB,EACjB,MAAM,mCAAmC,CAAC;AAE3C,OAAsB,EACpB,sBAAsB,EACvB,MAAM,qCAAqC,CAAC;AAE7C,MAAM,MAAM,mBAAmB,GAAG;IAIhC,KAAK,EAAE,MAAM,CAAC;IAId,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAIlC,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAKnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAKvB,MAAM,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAKlC,OAAO,CAAC,EAAE,OAAO,CAAC;IAIlB,IAAI,CAAC,EAAE,SAAS,CAAC;IAIjB,SAAS,CAAC,EAAE,SAAS,CAAC;IAItB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAKnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAI1B,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAIvC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAKrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAKnB,WAAW,CAAC,EAAE,OAAO,CAAC;IAItB,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC;AAE5D,QAAA,MAAM,cAAc;WA1EX,MAAM;kBAIC,MAAM;+BAIO,MAAM;cAIvB,MAAM;eAKL,OAAO;WAKX,MAAM,GAAG,MAAM;aAKb,gBAAgB,CAAC,MAAM,CAAC;cAKvB,OAAO;WAIV,SAAS;gBAIJ,SAAS;eAIV,OAAO;sBAKA,OAAO;eAId,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI;eAI3B,SAAS;eAKT,OAAO;kBAKJ,OAAO;gBAIT,sBAAsB;oMA2HnC,CAAC;AAIF,eAAe,cAAc,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { ContentListProps } from '../_shared/components/ContentList';
|
|
3
|
+
import { ListContainerHighlight } from '../_shared/components/ListContainer';
|
|
3
4
|
export type ListReadOnlyProps = {
|
|
4
5
|
title: string;
|
|
5
6
|
description?: string;
|
|
@@ -13,6 +14,7 @@ export type ListReadOnlyProps = {
|
|
|
13
14
|
disabled?: boolean;
|
|
14
15
|
loading?: boolean;
|
|
15
16
|
showDivider?: boolean;
|
|
17
|
+
highlight?: ListContainerHighlight;
|
|
16
18
|
} & React.ComponentPropsWithoutRef<'div'>;
|
|
17
19
|
declare const ListReadOnly: React.ForwardRefExoticComponent<{
|
|
18
20
|
title: string;
|
|
@@ -27,6 +29,7 @@ declare const ListReadOnly: React.ForwardRefExoticComponent<{
|
|
|
27
29
|
disabled?: boolean;
|
|
28
30
|
loading?: boolean;
|
|
29
31
|
showDivider?: boolean;
|
|
32
|
+
highlight?: ListContainerHighlight;
|
|
30
33
|
} & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>;
|
|
31
34
|
export default ListReadOnly;
|
|
32
35
|
//# 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;
|
|
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;AAE7C,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;CACpC,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAE1C,QAAA,MAAM,YAAY;WAzDT,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;kLAiFnC,CAAC;AAIF,eAAe,YAAY,CAAC"}
|
|
@@ -2,6 +2,7 @@ import React, { ReactNode } from 'react';
|
|
|
2
2
|
import { ContentListProps } from '../_shared/components/ContentList/ContentList';
|
|
3
3
|
import { CheckboxProps } from '../Checkbox/Checkbox';
|
|
4
4
|
import { RadioProps } from '../Radio/Radio';
|
|
5
|
+
import { ListContainerHighlight } from '../_shared/components/ListContainer';
|
|
5
6
|
interface ListSelectableProps {
|
|
6
7
|
title: string;
|
|
7
8
|
description?: string;
|
|
@@ -18,6 +19,8 @@ interface ListSelectableProps {
|
|
|
18
19
|
status?: ContentListProps['type'];
|
|
19
20
|
type?: 'card' | 'text';
|
|
20
21
|
platform?: 'web' | 'app';
|
|
22
|
+
isSelectableDisabled?: boolean;
|
|
23
|
+
highlight?: ListContainerHighlight;
|
|
21
24
|
}
|
|
22
25
|
declare const ListSelectable: React.ForwardRefExoticComponent<ListSelectableProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
26
|
export default ListSelectable;
|
|
@@ -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,EAA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ElC,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,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEvB,QAAQ,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAEzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC;AAED,QAAA,MAAM,cAAc,4FAwHnB,CAAC;AAGF,eAAe,cAAc,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { ContentListProps } from '../_shared/components/ContentList';
|
|
3
|
+
import { ListContainerHighlight } from '../_shared/components/ListContainer';
|
|
3
4
|
export type ListSettingsProps = {
|
|
4
5
|
title: string;
|
|
5
6
|
description?: string;
|
|
@@ -19,6 +20,7 @@ export type ListSettingsProps = {
|
|
|
19
20
|
onButtonClick?: () => void;
|
|
20
21
|
onToggleChange?: (checked: boolean) => void;
|
|
21
22
|
showDivider?: boolean;
|
|
23
|
+
highlight?: ListContainerHighlight;
|
|
22
24
|
} & Omit<React.ComponentPropsWithoutRef<'div'>, 'children'>;
|
|
23
25
|
declare const ListSettings: React.ForwardRefExoticComponent<{
|
|
24
26
|
title: string;
|
|
@@ -39,6 +41,7 @@ declare const ListSettings: React.ForwardRefExoticComponent<{
|
|
|
39
41
|
onButtonClick?: () => void;
|
|
40
42
|
onToggleChange?: (checked: boolean) => void;
|
|
41
43
|
showDivider?: boolean;
|
|
44
|
+
highlight?: ListContainerHighlight;
|
|
42
45
|
} & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "children"> & React.RefAttributes<HTMLDivElement>>;
|
|
43
46
|
export default ListSettings;
|
|
44
47
|
//# sourceMappingURL=ListSettings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListSettings.d.ts","sourceRoot":"","sources":["../../src/ListSettings/ListSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAoB,EAClB,gBAAgB,EACjB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"ListSettings.d.ts","sourceRoot":"","sources":["../../src/ListSettings/ListSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAoB,EAClB,gBAAgB,EACjB,MAAM,mCAAmC,CAAC;AAI3C,OAAsB,EACpB,sBAAsB,EACvB,MAAM,qCAAqC,CAAC;AAE7C,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;IAKjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAKnB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAKvB,MAAM,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAKlC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAKnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAIlB,IAAI,CAAC,EAAE,SAAS,CAAC;IAKjB,UAAU,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAKjC,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAKzB,aAAa,CAAC,EACV,SAAS,GACT,iBAAiB,GACjB,WAAW,GACX,mBAAmB,GACnB,UAAU,GACV,kBAAkB,CAAC;IAKvB,aAAa,CAAC,EAAE,OAAO,CAAC;IAIxB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAI3B,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAK5C,WAAW,CAAC,EAAE,OAAO,CAAC;IAItB,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACpC,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC;AAE5D,QAAA,MAAM,YAAY;WA5FT,MAAM;kBAIC,MAAM;+BAIO,MAAM;cAIvB,MAAM;eAKL,OAAO;WAKX,MAAM,GAAG,MAAM;aAKb,gBAAgB,CAAC,MAAM,CAAC;eAKtB,OAAO;cAKR,OAAO;WAIV,SAAS;iBAKH,QAAQ,GAAG,QAAQ;kBAKlB,MAAM;iBAKP,IAAI,GAAG,IAAI;oBAMpB,SAAS,GACT,iBAAiB,GACjB,WAAW,GACX,mBAAmB,GACnB,UAAU,GACV,kBAAkB;oBAKN,OAAO;oBAIP,MAAM,IAAI;qBAIT,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI;kBAK7B,OAAO;gBAIT,sBAAsB;oMA8GnC,CAAC;AAIF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export type ListContainerHighlight = {
|
|
3
|
+
caption: string | ReactNode;
|
|
4
|
+
captionColor?: string;
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
};
|
|
7
|
+
export type ListContainerProps = {
|
|
8
|
+
type?: 'card' | 'text';
|
|
9
|
+
showDivider?: boolean;
|
|
10
|
+
hasError?: boolean;
|
|
11
|
+
highlight?: ListContainerHighlight;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
} & React.ComponentPropsWithoutRef<'div'>;
|
|
15
|
+
declare const ListContainer: React.ForwardRefExoticComponent<{
|
|
16
|
+
type?: "card" | "text";
|
|
17
|
+
showDivider?: boolean;
|
|
18
|
+
hasError?: boolean;
|
|
19
|
+
highlight?: ListContainerHighlight;
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
className?: string;
|
|
22
|
+
} & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export default ListContainer;
|
|
24
|
+
//# sourceMappingURL=ListContainer.d.ts.map
|
|
@@ -0,0 +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;AAGzC,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;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;AAE1C,QAAA,MAAM,aAAa;WAnBV,MAAM,GAAG,MAAM;kBAKR,OAAO;eAKV,OAAO;gBAIN,sBAAsB;cACxB,SAAS;gBACP,MAAM;kLAgDnB,CAAC;AAIF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/_shared/components/ListContainer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,YAAY,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC"}
|
package/index.es.js
CHANGED
|
@@ -5476,9 +5476,49 @@ 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
|
|
5479
|
+
var ListContainer = e.forwardRef(function (_a, ref) {
|
|
5480
5480
|
var _b, _c;
|
|
5481
|
-
var
|
|
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"]);
|
|
5482
|
+
return (e.createElement("div", { className: "ods-list-container" },
|
|
5483
|
+
e.createElement("div", __assign$1({ ref: ref, className: classNames('ods-list-container__content', className, {
|
|
5484
|
+
'ods-list-container__content--card': type === 'card',
|
|
5485
|
+
'ods-list-container__content--card--error': type === 'card' && hasError,
|
|
5486
|
+
'ods-list-container__content--text': type === 'text',
|
|
5487
|
+
}) }, rest),
|
|
5488
|
+
children,
|
|
5489
|
+
showDivider && type === 'text' && (e.createElement("div", { className: "ods-list-container__content__divider" }))),
|
|
5490
|
+
(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
|
+
e.createElement("p", { className: "ods-typography ods-typography__caption", style: { color: (_c = highlight.captionColor) !== null && _c !== void 0 ? _c : '#67697A' } }, highlight.caption)))));
|
|
5492
|
+
});
|
|
5493
|
+
ListContainer.displayName = 'ListContainer';
|
|
5494
|
+
|
|
5495
|
+
var ListReadOnly = e.forwardRef(function (_a, ref) {
|
|
5496
|
+
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"]);
|
|
5498
|
+
var renderLoadingContent = function () { return (e.createElement("div", { className: "ods-list-readonly__skeleton" },
|
|
5499
|
+
e.createElement(SkeletonBar, { width: "40%", height: "16px" }),
|
|
5500
|
+
e.createElement(SkeletonBar, { width: "100%", height: "16px" }))); };
|
|
5501
|
+
var renderContent = function () { return (e.createElement(e.Fragment, null,
|
|
5502
|
+
icon && (e.createElement("div", { className: classNames('ods-list-readonly__icon', {
|
|
5503
|
+
'ods-list-readonly__icon--inactive': status === 'inactive',
|
|
5504
|
+
}) }, icon)),
|
|
5505
|
+
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status }),
|
|
5506
|
+
indicator && (e.createElement("div", { className: "ods-list-readonly__trailing" },
|
|
5507
|
+
e.createElement("div", { className: "ods-list-readonly__indicator" }, indicator))))); };
|
|
5508
|
+
var cardClassName = classNames('ods-list-readonly', className, (_b = {
|
|
5509
|
+
'ods-list-readonly--loading': loading,
|
|
5510
|
+
'ods-list-readonly--disabled': disabled
|
|
5511
|
+
},
|
|
5512
|
+
_b["ods-list-readonly--".concat(type)] = type,
|
|
5513
|
+
_b));
|
|
5514
|
+
return (e.createElement(ListContainer, { type: type, showDivider: showDivider, highlight: highlight },
|
|
5515
|
+
e.createElement("div", __assign$1({ ref: ref, "data-testid": "card-list-readonly", className: cardClassName }, rest), loading ? renderLoadingContent() : renderContent())));
|
|
5516
|
+
});
|
|
5517
|
+
ListReadOnly.displayName = 'ListReadOnly';
|
|
5518
|
+
|
|
5519
|
+
var ListSelectable = e.forwardRef(function (_a, ref) {
|
|
5520
|
+
var _b;
|
|
5521
|
+
var title = _a.title, description = _a.description, caption = _a.caption, strikethroughDescription = _a.strikethroughDescription, inverted = _a.inverted, loading = _a.loading, disabled = _a.disabled, checkbox = _a.checkbox, radio = _a.radio, className = _a.className, showDivider = _a.showDivider, indicator = _a.indicator, isSelectableDisabled = _a.isSelectableDisabled, highlight = _a.highlight, _c = _a.status, status = _c === void 0 ? 'default' : _c, _d = _a.type, type = _d === void 0 ? 'card' : _d, _e = _a.platform, platform = _e === void 0 ? 'web' : _e, rest = __rest$1(_a, ["title", "description", "caption", "strikethroughDescription", "inverted", "loading", "disabled", "checkbox", "radio", "className", "showDivider", "indicator", "isSelectableDisabled", "highlight", "status", "type", "platform"]);
|
|
5482
5522
|
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]);
|
|
5483
5523
|
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]);
|
|
5484
5524
|
var internalList = useMemo(function () {
|
|
@@ -5504,18 +5544,17 @@ var ListSelectable = e.forwardRef(function (_a, ref) {
|
|
|
5504
5544
|
e.createElement(SkeletonBar, { width: "40%", height: "16px" }),
|
|
5505
5545
|
e.createElement(SkeletonBar, { width: "100%", height: "16px" })));
|
|
5506
5546
|
}
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
e.createElement("div", __assign$1({ className: classNames('ods-list-selectable', className, (
|
|
5547
|
+
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 })));
|
|
5549
|
+
}
|
|
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, (_b = {
|
|
5512
5552
|
'ods-list-selectable--disabled': isInputDisabled
|
|
5513
5553
|
},
|
|
5514
|
-
|
|
5515
|
-
|
|
5554
|
+
_b["ods-list-selectable--".concat(platform)] = platform,
|
|
5555
|
+
_b)), ref: ref }, rest),
|
|
5516
5556
|
checkbox && e.createElement(Checkbox, __assign$1({}, checkbox, { label: internalList })),
|
|
5517
|
-
radio && e.createElement(Radio, __assign$1({}, radio, { label: internalList })))
|
|
5518
|
-
showDivider && type === 'text' && (e.createElement("div", { className: "ods-list-selectable__root--text--divider" }))));
|
|
5557
|
+
radio && e.createElement(Radio, __assign$1({}, radio, { label: internalList })))));
|
|
5519
5558
|
});
|
|
5520
5559
|
ListSelectable.displayName = 'ListSelectable';
|
|
5521
5560
|
|
|
@@ -47804,7 +47843,7 @@ var AmountDetails = function (_a) {
|
|
|
47804
47843
|
|
|
47805
47844
|
var ListAction = e.forwardRef(function (_a, ref) {
|
|
47806
47845
|
var _b;
|
|
47807
|
-
var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, _c = _a.inverted, inverted = _c === void 0 ? false : _c, _d = _a.type, type = _d === void 0 ? 'card' : _d, _e = _a.status, status = _e === void 0 ? 'default' : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.loading, loading = _g === void 0 ? false : _g, icon = _a.icon, indicator = _a.indicator, _h = _a.actionType, actionType = _h === void 0 ? 'chevron' : _h, menuActions = _a.menuActions, _j = _a.menuPosition, menuPosition = _j === void 0 ? 'bottom-right' : _j, onClick = _a.onClick, className = _a.className, _k = _a.showDivider, showDivider = _k === void 0 ? false : _k, amountDetails = _a.amountDetails, position = _a.position, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "inverted", "type", "status", "disabled", "loading", "icon", "indicator", "actionType", "menuActions", "menuPosition", "onClick", "className", "showDivider", "amountDetails", "position"]);
|
|
47846
|
+
var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, _c = _a.inverted, inverted = _c === void 0 ? false : _c, _d = _a.type, type = _d === void 0 ? 'card' : _d, _e = _a.status, status = _e === void 0 ? 'default' : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.loading, loading = _g === void 0 ? false : _g, icon = _a.icon, indicator = _a.indicator, _h = _a.actionType, actionType = _h === void 0 ? 'chevron' : _h, menuActions = _a.menuActions, _j = _a.menuPosition, menuPosition = _j === void 0 ? 'bottom-right' : _j, onClick = _a.onClick, className = _a.className, _k = _a.showDivider, showDivider = _k === void 0 ? false : _k, amountDetails = _a.amountDetails, position = _a.position, highlight = _a.highlight, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "inverted", "type", "status", "disabled", "loading", "icon", "indicator", "actionType", "menuActions", "menuPosition", "onClick", "className", "showDivider", "amountDetails", "position", "highlight"]);
|
|
47808
47847
|
var _l = useState(false), isSwipeOpen = _l[0], setIsSwipeOpen = _l[1];
|
|
47809
47848
|
var _m = useState(0), menuWidth = _m[0], setMenuWidth = _m[1];
|
|
47810
47849
|
var handleSwipeOpenChange = function (isOpen, width) {
|
|
@@ -47858,40 +47897,14 @@ var ListAction = e.forwardRef(function (_a, ref) {
|
|
|
47858
47897
|
},
|
|
47859
47898
|
_b["ods-list-action--".concat(type)] = type,
|
|
47860
47899
|
_b));
|
|
47861
|
-
return (e.createElement(
|
|
47862
|
-
e.createElement("button", __assign$1({ ref: ref, type: "button", "data-testid": "list-action", className: buttonClassName, onClick: loading ? undefined : onClick, disabled: disabled || loading }, rest), loading ? renderLoadingContent() : renderContent())
|
|
47863
|
-
showDivider && type === 'text' && (e.createElement("div", { className: "ods-list-action__divider" }))));
|
|
47900
|
+
return (e.createElement(ListContainer, { type: type, showDivider: showDivider, highlight: highlight },
|
|
47901
|
+
e.createElement("button", __assign$1({ ref: ref, type: "button", "data-testid": "list-action", className: buttonClassName, onClick: loading ? undefined : onClick, disabled: disabled || loading }, rest), loading ? renderLoadingContent() : renderContent())));
|
|
47864
47902
|
});
|
|
47865
47903
|
ListAction.displayName = 'ListAction';
|
|
47866
47904
|
|
|
47867
|
-
var ListReadOnly = e.forwardRef(function (_a, ref) {
|
|
47868
|
-
var _b;
|
|
47869
|
-
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, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "icon", "indicator", "type", "status", "inverted", "disabled", "loading", "className", "showDivider"]);
|
|
47870
|
-
var renderLoadingContent = function () { return (e.createElement("div", { className: 'ods-list-readonly__skeleton' },
|
|
47871
|
-
e.createElement(SkeletonBar, { width: '40%', height: '16px' }),
|
|
47872
|
-
e.createElement(SkeletonBar, { width: '100%', height: '16px' }))); };
|
|
47873
|
-
var renderContent = function () { return (e.createElement(e.Fragment, null,
|
|
47874
|
-
icon && (e.createElement("div", { className: classNames('ods-list-readonly__icon', {
|
|
47875
|
-
'ods-list-readonly__icon--inactive': status === 'inactive',
|
|
47876
|
-
}) }, icon)),
|
|
47877
|
-
e.createElement(ContentList, { title: title, description: description, strikethroughDescription: strikethroughDescription, caption: caption, inverted: inverted, type: status }),
|
|
47878
|
-
indicator && (e.createElement("div", { className: 'ods-list-readonly__trailing' },
|
|
47879
|
-
e.createElement("div", { className: 'ods-list-readonly__indicator' }, indicator))))); };
|
|
47880
|
-
var cardClassName = classNames('ods-list-readonly', className, (_b = {
|
|
47881
|
-
'ods-list-readonly--loading': loading,
|
|
47882
|
-
'ods-list-readonly--disabled': disabled
|
|
47883
|
-
},
|
|
47884
|
-
_b["ods-list-readonly--".concat(type)] = type,
|
|
47885
|
-
_b));
|
|
47886
|
-
return (e.createElement("div", { className: 'ods-list-readonly__container' },
|
|
47887
|
-
e.createElement("div", __assign$1({ ref: ref, "data-testid": 'card-list-readonly', className: cardClassName }, rest), loading ? renderLoadingContent() : renderContent()),
|
|
47888
|
-
showDivider && type === 'text' && (e.createElement("div", { className: 'ods-list-readonly__divider' }))));
|
|
47889
|
-
});
|
|
47890
|
-
ListReadOnly.displayName = 'ListReadOnly';
|
|
47891
|
-
|
|
47892
47905
|
var ListExpandable = e.forwardRef(function (_a, ref) {
|
|
47893
47906
|
var _b;
|
|
47894
|
-
var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, _c = _a.inverted, inverted = _c === void 0 ? false : _c, _d = _a.type, type = _d === void 0 ? 'card' : _d, _e = _a.status, status = _e === void 0 ? 'default' : _e, _f = _a.loading, loading = _f === void 0 ? false : _f, icon = _a.icon, indicator = _a.indicator, controlledExpanded = _a.expanded, _g = _a.defaultExpanded, defaultExpanded = _g === void 0 ? false : _g, onToggle = _a.onToggle, children = _a.children, className = _a.className, _h = _a.disabled, disabled = _h === void 0 ? false : _h, _j = _a.showDivider, showDivider = _j === void 0 ? false : _j, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "inverted", "type", "status", "loading", "icon", "indicator", "expanded", "defaultExpanded", "onToggle", "children", "className", "disabled", "showDivider"]);
|
|
47907
|
+
var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, _c = _a.inverted, inverted = _c === void 0 ? false : _c, _d = _a.type, type = _d === void 0 ? 'card' : _d, _e = _a.status, status = _e === void 0 ? 'default' : _e, _f = _a.loading, loading = _f === void 0 ? false : _f, icon = _a.icon, indicator = _a.indicator, controlledExpanded = _a.expanded, _g = _a.defaultExpanded, defaultExpanded = _g === void 0 ? false : _g, onToggle = _a.onToggle, children = _a.children, className = _a.className, _h = _a.disabled, disabled = _h === void 0 ? false : _h, _j = _a.showDivider, showDivider = _j === void 0 ? false : _j, highlight = _a.highlight, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "inverted", "type", "status", "loading", "icon", "indicator", "expanded", "defaultExpanded", "onToggle", "children", "className", "disabled", "showDivider", "highlight"]);
|
|
47895
47908
|
var _k = useState(defaultExpanded), internalExpanded = _k[0], setInternalExpanded = _k[1];
|
|
47896
47909
|
var isControlled = controlledExpanded !== undefined;
|
|
47897
47910
|
var isExpanded = isControlled ? controlledExpanded : internalExpanded;
|
|
@@ -47920,10 +47933,11 @@ var ListExpandable = e.forwardRef(function (_a, ref) {
|
|
|
47920
47933
|
},
|
|
47921
47934
|
_b["ods-list-expandable--".concat(type)] = type,
|
|
47922
47935
|
_b));
|
|
47923
|
-
return (e.createElement(
|
|
47924
|
-
e.createElement("
|
|
47925
|
-
|
|
47926
|
-
|
|
47936
|
+
return (e.createElement(ListContainer, { type: type, showDivider: false, highlight: highlight, ref: ref },
|
|
47937
|
+
e.createElement("div", __assign$1({ "data-testid": "list-expandable", className: containerClassName }, rest),
|
|
47938
|
+
e.createElement("button", { type: "button", className: "ods-list-expandable__main", onClick: loading ? undefined : handleToggle, disabled: disabled || loading, "aria-expanded": isExpanded, "aria-label": "".concat(isExpanded ? 'Recolher' : 'Expandir', " ").concat(title), "data-testid": "list-expandable-button" }, loading ? renderLoadingContent() : renderContent()),
|
|
47939
|
+
showDivider && (e.createElement("div", { className: "ods-list-expandable__divider", "data-testid": "list-expandable-divider" })),
|
|
47940
|
+
isExpanded && children && (e.createElement("div", { className: "ods-list-expandable__content" }, children)))));
|
|
47927
47941
|
});
|
|
47928
47942
|
ListExpandable.displayName = 'ListExpandable';
|
|
47929
47943
|
|
|
@@ -48014,7 +48028,7 @@ InternalContextualHero.displayName = 'InternalContextualHero';
|
|
|
48014
48028
|
|
|
48015
48029
|
var ListSettings = e.forwardRef(function (_a, ref) {
|
|
48016
48030
|
var _b;
|
|
48017
|
-
var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, _c = _a.inverted, inverted = _c === void 0 ? false : _c, _d = _a.type, type = _d === void 0 ? 'card' : _d, _e = _a.status, status = _e === void 0 ? 'default' : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.loading, loading = _g === void 0 ? false : _g, icon = _a.icon, _h = _a.actionType, actionType = _h === void 0 ? 'button' : _h, _j = _a.buttonLabel, buttonLabel = _j === void 0 ? 'Label' : _j, _k = _a.buttonSize, buttonSize = _k === void 0 ? 'sm' : _k, _l = _a.buttonVariant, buttonVariant = _l === void 0 ? 'primary' : _l, _m = _a.toggleChecked, toggleChecked = _m === void 0 ? false : _m, onButtonClick = _a.onButtonClick, onToggleChange = _a.onToggleChange, _o = _a.showDivider, showDivider = _o === void 0 ? false : _o, className = _a.className, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "inverted", "type", "status", "disabled", "loading", "icon", "actionType", "buttonLabel", "buttonSize", "buttonVariant", "toggleChecked", "onButtonClick", "onToggleChange", "showDivider", "className"]);
|
|
48031
|
+
var title = _a.title, description = _a.description, strikethroughDescription = _a.strikethroughDescription, caption = _a.caption, _c = _a.inverted, inverted = _c === void 0 ? false : _c, _d = _a.type, type = _d === void 0 ? 'card' : _d, _e = _a.status, status = _e === void 0 ? 'default' : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, _g = _a.loading, loading = _g === void 0 ? false : _g, icon = _a.icon, _h = _a.actionType, actionType = _h === void 0 ? 'button' : _h, _j = _a.buttonLabel, buttonLabel = _j === void 0 ? 'Label' : _j, _k = _a.buttonSize, buttonSize = _k === void 0 ? 'sm' : _k, _l = _a.buttonVariant, buttonVariant = _l === void 0 ? 'primary' : _l, _m = _a.toggleChecked, toggleChecked = _m === void 0 ? false : _m, onButtonClick = _a.onButtonClick, onToggleChange = _a.onToggleChange, _o = _a.showDivider, showDivider = _o === void 0 ? false : _o, highlight = _a.highlight, className = _a.className, rest = __rest$1(_a, ["title", "description", "strikethroughDescription", "caption", "inverted", "type", "status", "disabled", "loading", "icon", "actionType", "buttonLabel", "buttonSize", "buttonVariant", "toggleChecked", "onButtonClick", "onToggleChange", "showDivider", "highlight", "className"]);
|
|
48018
48032
|
var renderActionElement = function () {
|
|
48019
48033
|
if (actionType === 'button') {
|
|
48020
48034
|
return (e.createElement(Button$1, { variant: buttonVariant, size: buttonSize, onClick: onButtonClick, disabled: disabled }, buttonLabel));
|
|
@@ -48039,9 +48053,8 @@ var ListSettings = e.forwardRef(function (_a, ref) {
|
|
|
48039
48053
|
},
|
|
48040
48054
|
_b["ods-list-settings--".concat(type)] = type,
|
|
48041
48055
|
_b));
|
|
48042
|
-
return (e.createElement(
|
|
48043
|
-
e.createElement("div", __assign$1({ ref: ref, "data-testid": "list-settings", className: containerClassName }, rest), loading ? renderLoadingContent() : renderContent())
|
|
48044
|
-
showDivider && type === 'text' && (e.createElement("div", { className: "ods-list-settings__divider" }))));
|
|
48056
|
+
return (e.createElement(ListContainer, { type: type, showDivider: showDivider, highlight: highlight },
|
|
48057
|
+
e.createElement("div", __assign$1({ ref: ref, "data-testid": "list-settings", className: containerClassName }, rest), loading ? renderLoadingContent() : renderContent())));
|
|
48045
48058
|
});
|
|
48046
48059
|
ListSettings.displayName = 'ListSettings';
|
|
48047
48060
|
|