@transferwise/components 0.0.0-experimental-d7fd1c8 → 0.0.0-experimental-55ad5c7
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/build/listItem/AvatarLayout/ListItemAvatarLayout.js +2 -0
- package/build/listItem/AvatarLayout/ListItemAvatarLayout.js.map +1 -1
- package/build/listItem/AvatarLayout/ListItemAvatarLayout.mjs +2 -0
- package/build/listItem/AvatarLayout/ListItemAvatarLayout.mjs.map +1 -1
- package/build/listItem/AvatarView/ListItemAvatarView.js +2 -0
- package/build/listItem/AvatarView/ListItemAvatarView.js.map +1 -1
- package/build/listItem/AvatarView/ListItemAvatarView.mjs +2 -0
- package/build/listItem/AvatarView/ListItemAvatarView.mjs.map +1 -1
- package/build/listItem/Image/ListItemImage.js +3 -0
- package/build/listItem/Image/ListItemImage.js.map +1 -1
- package/build/listItem/Image/ListItemImage.mjs +3 -0
- package/build/listItem/Image/ListItemImage.mjs.map +1 -1
- package/build/listItem/ListItem.js +13 -7
- package/build/listItem/ListItem.js.map +1 -1
- package/build/listItem/ListItem.mjs +13 -7
- package/build/listItem/ListItem.mjs.map +1 -1
- package/build/listItem/ListItemContext.js.map +1 -1
- package/build/listItem/ListItemContext.mjs.map +1 -1
- package/build/listItem/Navigation/ListItemNavigation.js +1 -1
- package/build/listItem/Navigation/ListItemNavigation.js.map +1 -1
- package/build/listItem/Navigation/ListItemNavigation.mjs +1 -1
- package/build/listItem/Navigation/ListItemNavigation.mjs.map +1 -1
- package/build/listItem/useListItemMedia.js +21 -0
- package/build/listItem/useListItemMedia.js.map +1 -0
- package/build/listItem/useListItemMedia.mjs +19 -0
- package/build/listItem/useListItemMedia.mjs.map +1 -0
- package/build/main.css +23 -12
- package/build/styles/listItem/ListItem.css +23 -12
- package/build/styles/listItem/ListItem.grid.css +7 -7
- package/build/styles/main.css +23 -12
- package/build/types/listItem/AvatarLayout/ListItemAvatarLayout.d.ts.map +1 -1
- package/build/types/listItem/AvatarView/ListItemAvatarView.d.ts.map +1 -1
- package/build/types/listItem/Image/ListItemImage.d.ts +5 -1
- package/build/types/listItem/Image/ListItemImage.d.ts.map +1 -1
- package/build/types/listItem/ListItem.d.ts +1 -1
- package/build/types/listItem/ListItem.d.ts.map +1 -1
- package/build/types/listItem/ListItemContext.d.ts +3 -0
- package/build/types/listItem/ListItemContext.d.ts.map +1 -1
- package/build/types/listItem/_stories/subcomponents.d.ts.map +1 -1
- package/build/types/listItem/test-utils.d.ts +7 -0
- package/build/types/listItem/test-utils.d.ts.map +1 -0
- package/build/types/listItem/useListItemMedia.d.ts +5 -0
- package/build/types/listItem/useListItemMedia.d.ts.map +1 -0
- package/package.json +4 -4
- package/src/listItem/AvatarLayout/ListItemAvatarLayout.tsx +3 -0
- package/src/listItem/AvatarView/ListItemAvatarView.tsx +3 -0
- package/src/listItem/Button/ListItemButton.spec.tsx +10 -35
- package/src/listItem/Image/ListItemImage.spec.tsx +8 -5
- package/src/listItem/Image/ListItemImage.story.tsx +2 -1
- package/src/listItem/Image/ListItemImage.tsx +8 -1
- package/src/listItem/ListItem.css +23 -12
- package/src/listItem/ListItem.grid.css +7 -7
- package/src/listItem/ListItem.grid.less +11 -11
- package/src/listItem/ListItem.less +20 -7
- package/src/listItem/ListItem.tsx +24 -12
- package/src/listItem/ListItemContext.tsx +5 -0
- package/src/listItem/Navigation/ListItemNavigation.tsx +1 -1
- package/src/listItem/_stories/ListItem.story.tsx +2 -39
- package/src/listItem/_stories/ListItem.variants.test.story.tsx +7 -2
- package/src/listItem/_stories/subcomponents.tsx +1 -0
- package/src/listItem/test-utils.tsx +33 -0
- package/src/listItem/useListItemMedia.tsx +12 -0
- package/src/main.css +23 -12
|
@@ -24,7 +24,7 @@ const Navigation = function Navigation({
|
|
|
24
24
|
} = React.useContext(ListItemContext.ListItemContext);
|
|
25
25
|
const isLink = href !== '#';
|
|
26
26
|
const icon = /*#__PURE__*/jsxRuntime.jsx(icons.ChevronRight, {
|
|
27
|
-
size:
|
|
27
|
+
size: 16
|
|
28
28
|
});
|
|
29
29
|
if (baseItemProps.disabled) return /*#__PURE__*/jsxRuntime.jsx(icons.BackslashCircle, {
|
|
30
30
|
size: 24
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemNavigation.js","sources":["../../../src/listItem/Navigation/ListItemNavigation.tsx"],"sourcesContent":["import { ChevronRight, BackslashCircle } from '@transferwise/icons';\nimport type { ButtonProps } from '../../button/Button.types';\nimport { useListItemControl } from '../useListItemControl';\nimport { PrimitiveButton } from '../../primitives';\nimport { useContext } from 'react';\nimport { ListItemContext } from '../ListItemContext';\n\nexport type ListItemNavigationProps = Pick<ButtonProps, 'onClick' | 'href' | 'target'>;\n\n/**\n * This component allows for rendering a control functionally synonymous with HTML `anchor` or a\n * `button`, giving users a rich way to choose between options and navigate to another screen or\n * step in a flow. It offers only a subset of features of the HTML element in line with the\n * ListItem's constraints.<br />\n * <br />\n * Please refer to the [Design documentation](https://wise.design/components/list-item---navigation) for details.\n */\nexport const Navigation = function Navigation({ href = '#', ...props }: ListItemNavigationProps) {\n const { baseItemProps } = useListItemControl('navigation', { href, ...props });\n const { ids, describedByIds } = useContext(ListItemContext);\n const isLink = href !== '#';\n const icon = <ChevronRight size={
|
|
1
|
+
{"version":3,"file":"ListItemNavigation.js","sources":["../../../src/listItem/Navigation/ListItemNavigation.tsx"],"sourcesContent":["import { ChevronRight, BackslashCircle } from '@transferwise/icons';\nimport type { ButtonProps } from '../../button/Button.types';\nimport { useListItemControl } from '../useListItemControl';\nimport { PrimitiveButton } from '../../primitives';\nimport { useContext } from 'react';\nimport { ListItemContext } from '../ListItemContext';\n\nexport type ListItemNavigationProps = Pick<ButtonProps, 'onClick' | 'href' | 'target'>;\n\n/**\n * This component allows for rendering a control functionally synonymous with HTML `anchor` or a\n * `button`, giving users a rich way to choose between options and navigate to another screen or\n * step in a flow. It offers only a subset of features of the HTML element in line with the\n * ListItem's constraints.<br />\n * <br />\n * Please refer to the [Design documentation](https://wise.design/components/list-item---navigation) for details.\n */\nexport const Navigation = function Navigation({ href = '#', ...props }: ListItemNavigationProps) {\n const { baseItemProps } = useListItemControl('navigation', { href, ...props });\n const { ids, describedByIds } = useContext(ListItemContext);\n const isLink = href !== '#';\n const icon = <ChevronRight size={16} />;\n\n if (baseItemProps.disabled) return <BackslashCircle size={24} />;\n\n return isLink ? (\n <>{icon}</>\n ) : (\n <PrimitiveButton\n aria-describedby={describedByIds}\n id={ids.control}\n className=\"btn-unstyled wds-list-item-control\"\n onClick={props.onClick as React.MouseEventHandler<HTMLButtonElement> | undefined}\n >\n {icon}\n </PrimitiveButton>\n );\n};\n\nNavigation.displayName = 'ListItem.Navigation';\n"],"names":["Navigation","href","props","baseItemProps","useListItemControl","ids","describedByIds","useContext","ListItemContext","isLink","icon","_jsx","ChevronRight","size","disabled","BackslashCircle","_Fragment","children","PrimitiveButton","id","control","className","onClick","displayName"],"mappings":";;;;;;;;;;AAiBO,MAAMA,UAAU,GAAG,SAASA,UAAUA,CAAC;AAAEC,EAAAA,IAAI,GAAG,GAAG;EAAE,GAAGC;AAAK,CAA2B,EAAA;EAC7F,MAAM;AAAEC,IAAAA;AAAa,GAAE,GAAGC,qCAAkB,CAAC,YAAY,EAAE;IAAEH,IAAI;IAAE,GAAGC;AAAK,GAAE,CAAC;EAC9E,MAAM;IAAEG,GAAG;AAAEC,IAAAA;AAAc,GAAE,GAAGC,gBAAU,CAACC,+BAAe,CAAC;AAC3D,EAAA,MAAMC,MAAM,GAAGR,IAAI,KAAK,GAAG;AAC3B,EAAA,MAAMS,IAAI,gBAAGC,cAAA,CAACC,kBAAY,EAAA;AAACC,IAAAA,IAAI,EAAE;AAAG,GAAA,CAAG;AAEvC,EAAA,IAAIV,aAAa,CAACW,QAAQ,EAAE,oBAAOH,cAAA,CAACI,qBAAe,EAAA;AAACF,IAAAA,IAAI,EAAE;AAAG,GAAA,CAAG;AAEhE,EAAA,OAAOJ,MAAM,gBACXE,cAAA,CAAAK,mBAAA,EAAA;AAAAC,IAAAA,QAAA,EAAGP;AAAI,IAAI,gBAEXC,cAAA,CAACO,uBAAe,EAAA;AACd,IAAA,kBAAA,EAAkBZ,cAAe;IACjCa,EAAE,EAAEd,GAAG,CAACe,OAAQ;AAChBC,IAAAA,SAAS,EAAC,oCAAoC;IAC9CC,OAAO,EAAEpB,KAAK,CAACoB,OAAkE;AAAAL,IAAAA,QAAA,EAEhFP;AAAI,GACU,CAClB;AACH;AAEAV,UAAU,CAACuB,WAAW,GAAG,qBAAqB;;;;"}
|
|
@@ -22,7 +22,7 @@ const Navigation = function Navigation({
|
|
|
22
22
|
} = useContext(ListItemContext);
|
|
23
23
|
const isLink = href !== '#';
|
|
24
24
|
const icon = /*#__PURE__*/jsx(ChevronRight, {
|
|
25
|
-
size:
|
|
25
|
+
size: 16
|
|
26
26
|
});
|
|
27
27
|
if (baseItemProps.disabled) return /*#__PURE__*/jsx(BackslashCircle, {
|
|
28
28
|
size: 24
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemNavigation.mjs","sources":["../../../src/listItem/Navigation/ListItemNavigation.tsx"],"sourcesContent":["import { ChevronRight, BackslashCircle } from '@transferwise/icons';\nimport type { ButtonProps } from '../../button/Button.types';\nimport { useListItemControl } from '../useListItemControl';\nimport { PrimitiveButton } from '../../primitives';\nimport { useContext } from 'react';\nimport { ListItemContext } from '../ListItemContext';\n\nexport type ListItemNavigationProps = Pick<ButtonProps, 'onClick' | 'href' | 'target'>;\n\n/**\n * This component allows for rendering a control functionally synonymous with HTML `anchor` or a\n * `button`, giving users a rich way to choose between options and navigate to another screen or\n * step in a flow. It offers only a subset of features of the HTML element in line with the\n * ListItem's constraints.<br />\n * <br />\n * Please refer to the [Design documentation](https://wise.design/components/list-item---navigation) for details.\n */\nexport const Navigation = function Navigation({ href = '#', ...props }: ListItemNavigationProps) {\n const { baseItemProps } = useListItemControl('navigation', { href, ...props });\n const { ids, describedByIds } = useContext(ListItemContext);\n const isLink = href !== '#';\n const icon = <ChevronRight size={
|
|
1
|
+
{"version":3,"file":"ListItemNavigation.mjs","sources":["../../../src/listItem/Navigation/ListItemNavigation.tsx"],"sourcesContent":["import { ChevronRight, BackslashCircle } from '@transferwise/icons';\nimport type { ButtonProps } from '../../button/Button.types';\nimport { useListItemControl } from '../useListItemControl';\nimport { PrimitiveButton } from '../../primitives';\nimport { useContext } from 'react';\nimport { ListItemContext } from '../ListItemContext';\n\nexport type ListItemNavigationProps = Pick<ButtonProps, 'onClick' | 'href' | 'target'>;\n\n/**\n * This component allows for rendering a control functionally synonymous with HTML `anchor` or a\n * `button`, giving users a rich way to choose between options and navigate to another screen or\n * step in a flow. It offers only a subset of features of the HTML element in line with the\n * ListItem's constraints.<br />\n * <br />\n * Please refer to the [Design documentation](https://wise.design/components/list-item---navigation) for details.\n */\nexport const Navigation = function Navigation({ href = '#', ...props }: ListItemNavigationProps) {\n const { baseItemProps } = useListItemControl('navigation', { href, ...props });\n const { ids, describedByIds } = useContext(ListItemContext);\n const isLink = href !== '#';\n const icon = <ChevronRight size={16} />;\n\n if (baseItemProps.disabled) return <BackslashCircle size={24} />;\n\n return isLink ? (\n <>{icon}</>\n ) : (\n <PrimitiveButton\n aria-describedby={describedByIds}\n id={ids.control}\n className=\"btn-unstyled wds-list-item-control\"\n onClick={props.onClick as React.MouseEventHandler<HTMLButtonElement> | undefined}\n >\n {icon}\n </PrimitiveButton>\n );\n};\n\nNavigation.displayName = 'ListItem.Navigation';\n"],"names":["Navigation","href","props","baseItemProps","useListItemControl","ids","describedByIds","useContext","ListItemContext","isLink","icon","_jsx","ChevronRight","size","disabled","BackslashCircle","_Fragment","children","PrimitiveButton","id","control","className","onClick","displayName"],"mappings":";;;;;;;;AAiBO,MAAMA,UAAU,GAAG,SAASA,UAAUA,CAAC;AAAEC,EAAAA,IAAI,GAAG,GAAG;EAAE,GAAGC;AAAK,CAA2B,EAAA;EAC7F,MAAM;AAAEC,IAAAA;AAAa,GAAE,GAAGC,kBAAkB,CAAC,YAAY,EAAE;IAAEH,IAAI;IAAE,GAAGC;AAAK,GAAE,CAAC;EAC9E,MAAM;IAAEG,GAAG;AAAEC,IAAAA;AAAc,GAAE,GAAGC,UAAU,CAACC,eAAe,CAAC;AAC3D,EAAA,MAAMC,MAAM,GAAGR,IAAI,KAAK,GAAG;AAC3B,EAAA,MAAMS,IAAI,gBAAGC,GAAA,CAACC,YAAY,EAAA;AAACC,IAAAA,IAAI,EAAE;AAAG,GAAA,CAAG;AAEvC,EAAA,IAAIV,aAAa,CAACW,QAAQ,EAAE,oBAAOH,GAAA,CAACI,eAAe,EAAA;AAACF,IAAAA,IAAI,EAAE;AAAG,GAAA,CAAG;AAEhE,EAAA,OAAOJ,MAAM,gBACXE,GAAA,CAAAK,QAAA,EAAA;AAAAC,IAAAA,QAAA,EAAGP;AAAI,IAAI,gBAEXC,GAAA,CAACO,eAAe,EAAA;AACd,IAAA,kBAAA,EAAkBZ,cAAe;IACjCa,EAAE,EAAEd,GAAG,CAACe,OAAQ;AAChBC,IAAAA,SAAS,EAAC,oCAAoC;IAC9CC,OAAO,EAAEpB,KAAK,CAACoB,OAAkE;AAAAL,IAAAA,QAAA,EAEhFP;AAAI,GACU,CAClB;AACH;AAEAV,UAAU,CAACuB,WAAW,GAAG,qBAAqB;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var ListItemContext = require('./ListItemContext.js');
|
|
5
|
+
|
|
6
|
+
function useListItemMedia(size) {
|
|
7
|
+
const {
|
|
8
|
+
setMediaSize,
|
|
9
|
+
mediaSize
|
|
10
|
+
} = React.useContext(ListItemContext.ListItemContext);
|
|
11
|
+
React.useEffect(() => {
|
|
12
|
+
setMediaSize(size);
|
|
13
|
+
}, [size, setMediaSize]);
|
|
14
|
+
return {
|
|
15
|
+
mediaSize,
|
|
16
|
+
setMediaSize
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
exports.useListItemMedia = useListItemMedia;
|
|
21
|
+
//# sourceMappingURL=useListItemMedia.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useListItemMedia.js","sources":["../../src/listItem/useListItemMedia.tsx"],"sourcesContent":["import { useContext, useEffect } from 'react';\nimport { ListItemContext, type ListItemContextData } from './ListItemContext';\n\nexport function useListItemMedia(size?: number) {\n const { setMediaSize, mediaSize } = useContext<ListItemContextData>(ListItemContext);\n\n useEffect(() => {\n setMediaSize(size);\n }, [size, setMediaSize]);\n\n return { mediaSize, setMediaSize };\n}\n"],"names":["useListItemMedia","size","setMediaSize","mediaSize","useContext","ListItemContext","useEffect"],"mappings":";;;;;AAGM,SAAUA,gBAAgBA,CAACC,IAAa,EAAA;EAC5C,MAAM;IAAEC,YAAY;AAAEC,IAAAA;AAAS,GAAE,GAAGC,gBAAU,CAAsBC,+BAAe,CAAC;AAEpFC,EAAAA,eAAS,CAAC,MAAK;IACbJ,YAAY,CAACD,IAAI,CAAC;AACpB,EAAA,CAAC,EAAE,CAACA,IAAI,EAAEC,YAAY,CAAC,CAAC;EAExB,OAAO;IAAEC,SAAS;AAAED,IAAAA;GAAc;AACpC;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useContext, useEffect } from 'react';
|
|
2
|
+
import { ListItemContext } from './ListItemContext.mjs';
|
|
3
|
+
|
|
4
|
+
function useListItemMedia(size) {
|
|
5
|
+
const {
|
|
6
|
+
setMediaSize,
|
|
7
|
+
mediaSize
|
|
8
|
+
} = useContext(ListItemContext);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
setMediaSize(size);
|
|
11
|
+
}, [size, setMediaSize]);
|
|
12
|
+
return {
|
|
13
|
+
mediaSize,
|
|
14
|
+
setMediaSize
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { useListItemMedia };
|
|
19
|
+
//# sourceMappingURL=useListItemMedia.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useListItemMedia.mjs","sources":["../../src/listItem/useListItemMedia.tsx"],"sourcesContent":["import { useContext, useEffect } from 'react';\nimport { ListItemContext, type ListItemContextData } from './ListItemContext';\n\nexport function useListItemMedia(size?: number) {\n const { setMediaSize, mediaSize } = useContext<ListItemContextData>(ListItemContext);\n\n useEffect(() => {\n setMediaSize(size);\n }, [size, setMediaSize]);\n\n return { mediaSize, setMediaSize };\n}\n"],"names":["useListItemMedia","size","setMediaSize","mediaSize","useContext","ListItemContext","useEffect"],"mappings":";;;AAGM,SAAUA,gBAAgBA,CAACC,IAAa,EAAA;EAC5C,MAAM;IAAEC,YAAY;AAAEC,IAAAA;AAAS,GAAE,GAAGC,UAAU,CAAsBC,eAAe,CAAC;AAEpFC,EAAAA,SAAS,CAAC,MAAK;IACbJ,YAAY,CAACD,IAAI,CAAC;AACpB,EAAA,CAAC,EAAE,CAACA,IAAI,EAAEC,YAAY,CAAC,CAAC;EAExB,OAAO;IAAEC,SAAS;AAAED,IAAAA;GAAc;AACpC;;;;"}
|
package/build/main.css
CHANGED
|
@@ -2644,17 +2644,17 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2644
2644
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
2645
2645
|
grid-template-columns: auto 1fr auto;
|
|
2646
2646
|
grid-template-rows: auto auto auto;
|
|
2647
|
-
grid-template-areas: "media body control" "media info
|
|
2647
|
+
grid-template-areas: "media body control" "media info ." ". prompt prompt";
|
|
2648
2648
|
}
|
|
2649
2649
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-noPrompt {
|
|
2650
2650
|
grid-template-columns: auto 1fr auto;
|
|
2651
2651
|
grid-template-rows: auto auto;
|
|
2652
|
-
grid-template-areas: "media body control" "media info
|
|
2652
|
+
grid-template-areas: "media body control" "media info .";
|
|
2653
2653
|
}
|
|
2654
2654
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-noInfo-hasPrompt {
|
|
2655
2655
|
grid-template-columns: auto 1fr auto;
|
|
2656
2656
|
grid-template-rows: auto auto;
|
|
2657
|
-
grid-template-areas: "media body control" "
|
|
2657
|
+
grid-template-areas: "media body control" ". prompt prompt";
|
|
2658
2658
|
}
|
|
2659
2659
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-noInfo-noPrompt {
|
|
2660
2660
|
grid-template-columns: auto 1fr auto;
|
|
@@ -2664,7 +2664,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2664
2664
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-hasInfo-hasPrompt {
|
|
2665
2665
|
grid-template-columns: auto 1fr;
|
|
2666
2666
|
grid-template-rows: auto auto;
|
|
2667
|
-
grid-template-areas: "media body" "media info" "
|
|
2667
|
+
grid-template-areas: "media body" "media info" ". prompt";
|
|
2668
2668
|
}
|
|
2669
2669
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-hasInfo-noPrompt {
|
|
2670
2670
|
grid-template-columns: auto 1fr;
|
|
@@ -2687,12 +2687,12 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2687
2687
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
2688
2688
|
grid-template-columns: 1fr auto;
|
|
2689
2689
|
grid-template-rows: auto auto auto;
|
|
2690
|
-
grid-template-areas: "body control" "info
|
|
2690
|
+
grid-template-areas: "body control" "info ." "prompt prompt";
|
|
2691
2691
|
}
|
|
2692
2692
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-hasInfo-noPrompt {
|
|
2693
2693
|
grid-template-columns: 1fr auto;
|
|
2694
2694
|
grid-template-rows: auto auto;
|
|
2695
|
-
grid-template-areas: "body control" "info
|
|
2695
|
+
grid-template-areas: "body control" "info .";
|
|
2696
2696
|
}
|
|
2697
2697
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-noInfo-hasPrompt {
|
|
2698
2698
|
grid-template-columns: 1fr auto;
|
|
@@ -2856,7 +2856,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2856
2856
|
grid-template-areas: "body";
|
|
2857
2857
|
}
|
|
2858
2858
|
}
|
|
2859
|
-
@container (max-width:
|
|
2859
|
+
@container (max-width: 297px) {
|
|
2860
2860
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
2861
2861
|
grid-template-columns: auto 1fr;
|
|
2862
2862
|
grid-template-rows: auto auto auto;
|
|
@@ -3085,7 +3085,8 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3085
3085
|
}
|
|
3086
3086
|
.wds-list-item-media-image {
|
|
3087
3087
|
width: var(--item-media-image-size);
|
|
3088
|
-
height:
|
|
3088
|
+
height: auto;
|
|
3089
|
+
height: var(--wds-list-item-control-wrapper-height, auto);
|
|
3089
3090
|
}
|
|
3090
3091
|
.wds-list-item-body {
|
|
3091
3092
|
grid-area: body;
|
|
@@ -3103,6 +3104,14 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3103
3104
|
color: #37517e;
|
|
3104
3105
|
color: var(--color-content-primary);
|
|
3105
3106
|
}
|
|
3107
|
+
.wds-list-item-value {
|
|
3108
|
+
text-align: right;
|
|
3109
|
+
}
|
|
3110
|
+
.wds-list-item-body-center {
|
|
3111
|
+
display: flex;
|
|
3112
|
+
flex-direction: row;
|
|
3113
|
+
align-items: center;
|
|
3114
|
+
}
|
|
3106
3115
|
.wds-list-item-additional-info {
|
|
3107
3116
|
grid-area: info;
|
|
3108
3117
|
color: #768e9c;
|
|
@@ -3110,12 +3119,14 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3110
3119
|
margin-top: calc(4px * -1);
|
|
3111
3120
|
margin-top: calc(var(--size-4) * -1);
|
|
3112
3121
|
}
|
|
3113
|
-
.wds-list-item-value {
|
|
3114
|
-
align-items: end;
|
|
3115
|
-
text-align: right;
|
|
3116
|
-
}
|
|
3117
3122
|
.wds-list-item-control-wrapper {
|
|
3118
3123
|
grid-area: control;
|
|
3124
|
+
align-content: center;
|
|
3125
|
+
max-height: var(--wds-list-item-control-wrapper-height);
|
|
3126
|
+
}
|
|
3127
|
+
.wds-list-item-navigation .tw-icon-chevron-right {
|
|
3128
|
+
color: #c9cbce;
|
|
3129
|
+
color: var(--color-interactive-secondary);
|
|
3119
3130
|
}
|
|
3120
3131
|
.wds-list-item-control {
|
|
3121
3132
|
flex: 0 0 auto;
|
|
@@ -9,17 +9,17 @@
|
|
|
9
9
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
10
10
|
grid-template-columns: auto 1fr auto;
|
|
11
11
|
grid-template-rows: auto auto auto;
|
|
12
|
-
grid-template-areas: "media body control" "media info
|
|
12
|
+
grid-template-areas: "media body control" "media info ." ". prompt prompt";
|
|
13
13
|
}
|
|
14
14
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-noPrompt {
|
|
15
15
|
grid-template-columns: auto 1fr auto;
|
|
16
16
|
grid-template-rows: auto auto;
|
|
17
|
-
grid-template-areas: "media body control" "media info
|
|
17
|
+
grid-template-areas: "media body control" "media info .";
|
|
18
18
|
}
|
|
19
19
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-noInfo-hasPrompt {
|
|
20
20
|
grid-template-columns: auto 1fr auto;
|
|
21
21
|
grid-template-rows: auto auto;
|
|
22
|
-
grid-template-areas: "media body control" "
|
|
22
|
+
grid-template-areas: "media body control" ". prompt prompt";
|
|
23
23
|
}
|
|
24
24
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-noInfo-noPrompt {
|
|
25
25
|
grid-template-columns: auto 1fr auto;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-hasInfo-hasPrompt {
|
|
30
30
|
grid-template-columns: auto 1fr;
|
|
31
31
|
grid-template-rows: auto auto;
|
|
32
|
-
grid-template-areas: "media body" "media info" "
|
|
32
|
+
grid-template-areas: "media body" "media info" ". prompt";
|
|
33
33
|
}
|
|
34
34
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-hasInfo-noPrompt {
|
|
35
35
|
grid-template-columns: auto 1fr;
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
53
53
|
grid-template-columns: 1fr auto;
|
|
54
54
|
grid-template-rows: auto auto auto;
|
|
55
|
-
grid-template-areas: "body control" "info
|
|
55
|
+
grid-template-areas: "body control" "info ." "prompt prompt";
|
|
56
56
|
}
|
|
57
57
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-hasInfo-noPrompt {
|
|
58
58
|
grid-template-columns: 1fr auto;
|
|
59
59
|
grid-template-rows: auto auto;
|
|
60
|
-
grid-template-areas: "body control" "info
|
|
60
|
+
grid-template-areas: "body control" "info .";
|
|
61
61
|
}
|
|
62
62
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-noInfo-hasPrompt {
|
|
63
63
|
grid-template-columns: 1fr auto;
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
grid-template-areas: "body";
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
@container (max-width:
|
|
224
|
+
@container (max-width: 297px) {
|
|
225
225
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
226
226
|
grid-template-columns: auto 1fr;
|
|
227
227
|
grid-template-rows: auto auto auto;
|
|
@@ -450,7 +450,8 @@
|
|
|
450
450
|
}
|
|
451
451
|
.wds-list-item-media-image {
|
|
452
452
|
width: var(--item-media-image-size);
|
|
453
|
-
height:
|
|
453
|
+
height: auto;
|
|
454
|
+
height: var(--wds-list-item-control-wrapper-height, auto);
|
|
454
455
|
}
|
|
455
456
|
.wds-list-item-body {
|
|
456
457
|
grid-area: body;
|
|
@@ -468,6 +469,14 @@
|
|
|
468
469
|
color: #37517e;
|
|
469
470
|
color: var(--color-content-primary);
|
|
470
471
|
}
|
|
472
|
+
.wds-list-item-value {
|
|
473
|
+
text-align: right;
|
|
474
|
+
}
|
|
475
|
+
.wds-list-item-body-center {
|
|
476
|
+
display: flex;
|
|
477
|
+
flex-direction: row;
|
|
478
|
+
align-items: center;
|
|
479
|
+
}
|
|
471
480
|
.wds-list-item-additional-info {
|
|
472
481
|
grid-area: info;
|
|
473
482
|
color: #768e9c;
|
|
@@ -475,12 +484,14 @@
|
|
|
475
484
|
margin-top: calc(4px * -1);
|
|
476
485
|
margin-top: calc(var(--size-4) * -1);
|
|
477
486
|
}
|
|
478
|
-
.wds-list-item-value {
|
|
479
|
-
align-items: end;
|
|
480
|
-
text-align: right;
|
|
481
|
-
}
|
|
482
487
|
.wds-list-item-control-wrapper {
|
|
483
488
|
grid-area: control;
|
|
489
|
+
align-content: center;
|
|
490
|
+
max-height: var(--wds-list-item-control-wrapper-height);
|
|
491
|
+
}
|
|
492
|
+
.wds-list-item-navigation .tw-icon-chevron-right {
|
|
493
|
+
color: #c9cbce;
|
|
494
|
+
color: var(--color-interactive-secondary);
|
|
484
495
|
}
|
|
485
496
|
.wds-list-item-control {
|
|
486
497
|
flex: 0 0 auto;
|
|
@@ -9,17 +9,17 @@
|
|
|
9
9
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
10
10
|
grid-template-columns: auto 1fr auto;
|
|
11
11
|
grid-template-rows: auto auto auto;
|
|
12
|
-
grid-template-areas: "media body control" "media info
|
|
12
|
+
grid-template-areas: "media body control" "media info ." ". prompt prompt";
|
|
13
13
|
}
|
|
14
14
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-noPrompt {
|
|
15
15
|
grid-template-columns: auto 1fr auto;
|
|
16
16
|
grid-template-rows: auto auto;
|
|
17
|
-
grid-template-areas: "media body control" "media info
|
|
17
|
+
grid-template-areas: "media body control" "media info .";
|
|
18
18
|
}
|
|
19
19
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-noInfo-hasPrompt {
|
|
20
20
|
grid-template-columns: auto 1fr auto;
|
|
21
21
|
grid-template-rows: auto auto;
|
|
22
|
-
grid-template-areas: "media body control" "
|
|
22
|
+
grid-template-areas: "media body control" ". prompt prompt";
|
|
23
23
|
}
|
|
24
24
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-noInfo-noPrompt {
|
|
25
25
|
grid-template-columns: auto 1fr auto;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-hasInfo-hasPrompt {
|
|
30
30
|
grid-template-columns: auto 1fr;
|
|
31
31
|
grid-template-rows: auto auto;
|
|
32
|
-
grid-template-areas: "media body" "media info" "
|
|
32
|
+
grid-template-areas: "media body" "media info" ". prompt";
|
|
33
33
|
}
|
|
34
34
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-hasInfo-noPrompt {
|
|
35
35
|
grid-template-columns: auto 1fr;
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
53
53
|
grid-template-columns: 1fr auto;
|
|
54
54
|
grid-template-rows: auto auto auto;
|
|
55
|
-
grid-template-areas: "body control" "info
|
|
55
|
+
grid-template-areas: "body control" "info ." "prompt prompt";
|
|
56
56
|
}
|
|
57
57
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-hasInfo-noPrompt {
|
|
58
58
|
grid-template-columns: 1fr auto;
|
|
59
59
|
grid-template-rows: auto auto;
|
|
60
|
-
grid-template-areas: "body control" "info
|
|
60
|
+
grid-template-areas: "body control" "info .";
|
|
61
61
|
}
|
|
62
62
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-noInfo-hasPrompt {
|
|
63
63
|
grid-template-columns: 1fr auto;
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
grid-template-areas: "body";
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
@container (max-width:
|
|
224
|
+
@container (max-width: 297px) {
|
|
225
225
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
226
226
|
grid-template-columns: auto 1fr;
|
|
227
227
|
grid-template-rows: auto auto auto;
|
package/build/styles/main.css
CHANGED
|
@@ -2644,17 +2644,17 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2644
2644
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
2645
2645
|
grid-template-columns: auto 1fr auto;
|
|
2646
2646
|
grid-template-rows: auto auto auto;
|
|
2647
|
-
grid-template-areas: "media body control" "media info
|
|
2647
|
+
grid-template-areas: "media body control" "media info ." ". prompt prompt";
|
|
2648
2648
|
}
|
|
2649
2649
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-noPrompt {
|
|
2650
2650
|
grid-template-columns: auto 1fr auto;
|
|
2651
2651
|
grid-template-rows: auto auto;
|
|
2652
|
-
grid-template-areas: "media body control" "media info
|
|
2652
|
+
grid-template-areas: "media body control" "media info .";
|
|
2653
2653
|
}
|
|
2654
2654
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-noInfo-hasPrompt {
|
|
2655
2655
|
grid-template-columns: auto 1fr auto;
|
|
2656
2656
|
grid-template-rows: auto auto;
|
|
2657
|
-
grid-template-areas: "media body control" "
|
|
2657
|
+
grid-template-areas: "media body control" ". prompt prompt";
|
|
2658
2658
|
}
|
|
2659
2659
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-noInfo-noPrompt {
|
|
2660
2660
|
grid-template-columns: auto 1fr auto;
|
|
@@ -2664,7 +2664,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2664
2664
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-hasInfo-hasPrompt {
|
|
2665
2665
|
grid-template-columns: auto 1fr;
|
|
2666
2666
|
grid-template-rows: auto auto;
|
|
2667
|
-
grid-template-areas: "media body" "media info" "
|
|
2667
|
+
grid-template-areas: "media body" "media info" ". prompt";
|
|
2668
2668
|
}
|
|
2669
2669
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-noControl.wds-list-item-hasInfo-noPrompt {
|
|
2670
2670
|
grid-template-columns: auto 1fr;
|
|
@@ -2687,12 +2687,12 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2687
2687
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
2688
2688
|
grid-template-columns: 1fr auto;
|
|
2689
2689
|
grid-template-rows: auto auto auto;
|
|
2690
|
-
grid-template-areas: "body control" "info
|
|
2690
|
+
grid-template-areas: "body control" "info ." "prompt prompt";
|
|
2691
2691
|
}
|
|
2692
2692
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-hasInfo-noPrompt {
|
|
2693
2693
|
grid-template-columns: 1fr auto;
|
|
2694
2694
|
grid-template-rows: auto auto;
|
|
2695
|
-
grid-template-areas: "body control" "info
|
|
2695
|
+
grid-template-areas: "body control" "info .";
|
|
2696
2696
|
}
|
|
2697
2697
|
.wds-list-item-gridWrapper.wds-list-item-noMedia-hasControl.wds-list-item-noInfo-hasPrompt {
|
|
2698
2698
|
grid-template-columns: 1fr auto;
|
|
@@ -2856,7 +2856,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2856
2856
|
grid-template-areas: "body";
|
|
2857
2857
|
}
|
|
2858
2858
|
}
|
|
2859
|
-
@container (max-width:
|
|
2859
|
+
@container (max-width: 297px) {
|
|
2860
2860
|
.wds-list-item-gridWrapper.wds-list-item-hasMedia-hasControl.wds-list-item-hasInfo-hasPrompt {
|
|
2861
2861
|
grid-template-columns: auto 1fr;
|
|
2862
2862
|
grid-template-rows: auto auto auto;
|
|
@@ -3085,7 +3085,8 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3085
3085
|
}
|
|
3086
3086
|
.wds-list-item-media-image {
|
|
3087
3087
|
width: var(--item-media-image-size);
|
|
3088
|
-
height:
|
|
3088
|
+
height: auto;
|
|
3089
|
+
height: var(--wds-list-item-control-wrapper-height, auto);
|
|
3089
3090
|
}
|
|
3090
3091
|
.wds-list-item-body {
|
|
3091
3092
|
grid-area: body;
|
|
@@ -3103,6 +3104,14 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3103
3104
|
color: #37517e;
|
|
3104
3105
|
color: var(--color-content-primary);
|
|
3105
3106
|
}
|
|
3107
|
+
.wds-list-item-value {
|
|
3108
|
+
text-align: right;
|
|
3109
|
+
}
|
|
3110
|
+
.wds-list-item-body-center {
|
|
3111
|
+
display: flex;
|
|
3112
|
+
flex-direction: row;
|
|
3113
|
+
align-items: center;
|
|
3114
|
+
}
|
|
3106
3115
|
.wds-list-item-additional-info {
|
|
3107
3116
|
grid-area: info;
|
|
3108
3117
|
color: #768e9c;
|
|
@@ -3110,12 +3119,14 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
3110
3119
|
margin-top: calc(4px * -1);
|
|
3111
3120
|
margin-top: calc(var(--size-4) * -1);
|
|
3112
3121
|
}
|
|
3113
|
-
.wds-list-item-value {
|
|
3114
|
-
align-items: end;
|
|
3115
|
-
text-align: right;
|
|
3116
|
-
}
|
|
3117
3122
|
.wds-list-item-control-wrapper {
|
|
3118
3123
|
grid-area: control;
|
|
3124
|
+
align-content: center;
|
|
3125
|
+
max-height: var(--wds-list-item-control-wrapper-height);
|
|
3126
|
+
}
|
|
3127
|
+
.wds-list-item-navigation .tw-icon-chevron-right {
|
|
3128
|
+
color: #c9cbce;
|
|
3129
|
+
color: var(--color-interactive-secondary);
|
|
3119
3130
|
}
|
|
3120
3131
|
.wds-list-item-control {
|
|
3121
3132
|
flex: 0 0 auto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemAvatarLayout.d.ts","sourceRoot":"","sources":["../../../../src/listItem/AvatarLayout/ListItemAvatarLayout.tsx"],"names":[],"mappings":"AAAA,OAAyB,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"ListItemAvatarLayout.d.ts","sourceRoot":"","sources":["../../../../src/listItem/AvatarLayout/ListItemAvatarLayout.tsx"],"names":[],"mappings":"AAAA,OAAyB,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAI9E,KAAK,QAAQ,GAAG;IAAE,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAA;CAAE,CAAC;AAElD,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,aAAa,CAAC,GAAG,QAAQ,CAAC;AAEnG;;;;;;GAMG;AACH,eAAO,MAAM,YAAY;oCAAwC,yBAAyB;;CAUzF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemAvatarView.d.ts","sourceRoot":"","sources":["../../../../src/listItem/AvatarView/ListItemAvatarView.tsx"],"names":[],"mappings":"AACA,OAAuB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ListItemAvatarView.d.ts","sourceRoot":"","sources":["../../../../src/listItem/AvatarView/ListItemAvatarView.tsx"],"names":[],"mappings":"AACA,OAAuB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGnE,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,aAAa,CAAC,GAAG;IACpF,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;CAC/B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU;oCAAwC,uBAAuB;;CAUrF,CAAC"}
|
|
@@ -4,6 +4,10 @@ export type ListItemImageProps = Omit<ImageProps, 'stretch' | 'shrink' | 'id' |
|
|
|
4
4
|
* The size of square container for the image, matching available avatar sizes.
|
|
5
5
|
*/
|
|
6
6
|
size?: 32 | 40 | 48 | 56 | 72;
|
|
7
|
+
/**
|
|
8
|
+
* If you're using an image that isn't a square or circle, also tell us the height so that we can align the control to it properly.
|
|
9
|
+
*/
|
|
10
|
+
height?: number;
|
|
7
11
|
/**
|
|
8
12
|
* When unset, it will force `role="presentation"` on the image. Otherwise, it will set `role="graphics-symbol"`.
|
|
9
13
|
*/
|
|
@@ -19,7 +23,7 @@ export type ListItemImageProps = Omit<ImageProps, 'stretch' | 'shrink' | 'id' |
|
|
|
19
23
|
* > **NB**: This component is [not intended for use with illustrations](https://wise.design/foundations/illustration#scale).
|
|
20
24
|
*/
|
|
21
25
|
export declare const Image: {
|
|
22
|
-
({ alt, size, ...props }: ListItemImageProps): import("react").JSX.Element;
|
|
26
|
+
({ alt, size, height, ...props }: ListItemImageProps): import("react").JSX.Element;
|
|
23
27
|
displayName: string;
|
|
24
28
|
};
|
|
25
29
|
//# sourceMappingURL=ListItemImage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemImage.d.ts","sourceRoot":"","sources":["../../../../src/listItem/Image/ListItemImage.tsx"],"names":[],"mappings":"AAAA,OAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ListItemImage.d.ts","sourceRoot":"","sources":["../../../../src/listItem/Image/ListItemImage.tsx"],"names":[],"mappings":"AAAA,OAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAMzD,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,UAAU,EAAE,SAAS,GAAG,QAAQ,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,CAAC,GAAG;IAChG;;OAEG;IACH,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK;sCAA+C,kBAAkB;;CAelF,CAAC"}
|
|
@@ -65,7 +65,7 @@ export type Props = {
|
|
|
65
65
|
export declare const ListItem: {
|
|
66
66
|
({ as: ListItemElement, title, subtitle, additionalInfo, prompt, inverted, media, spotlight, valueTitle, valueSubtitle, control, disabled, className, valueColumnWidth, role, id, "aria-labelledby": ariaLabelledby, }: Props): import("react").JSX.Element;
|
|
67
67
|
Image: {
|
|
68
|
-
({ alt, size, ...props }: import("./Image").ListItemImageProps): import("react").JSX.Element;
|
|
68
|
+
({ alt, size, height, ...props }: import("./Image").ListItemImageProps): import("react").JSX.Element;
|
|
69
69
|
displayName: string;
|
|
70
70
|
};
|
|
71
71
|
AvatarView: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../src/listItem/ListItem.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../src/listItem/ListItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAc,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAY,KAAK,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAc,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAExE,OAAO,EAAU,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAS,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAU,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAY5D,MAAM,MAAM,aAAa,GACrB,iBAAiB,GACjB,YAAY,GACZ,OAAO,GACP,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,aAAa,CAAC;AAElB,MAAM,MAAM,oBAAoB,GAC5B,uBAAuB,GACvB,qBAAqB,GACrB,mBAAmB,GACnB,uBAAuB,GACvB,kBAAkB,GAClB,mBAAmB,CAAC;AAExB,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAClC,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ;4NAkBlB,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4NP,CAAC;AAkGF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { ListItemTypes, ListItemControlProps, Props as ListItemProps } from './ListItem';
|
|
2
|
+
export type ListItemMediaSize = 32 | 40 | 48 | 56 | 72;
|
|
2
3
|
export type ListItemContextData = {
|
|
3
4
|
setControlType: (type: ListItemTypes) => void;
|
|
4
5
|
setControlProps: (props: ListItemControlProps) => void;
|
|
6
|
+
setMediaSize: (size: number | undefined) => void;
|
|
5
7
|
ids: {
|
|
6
8
|
title: string;
|
|
7
9
|
subtitle?: string;
|
|
@@ -12,6 +14,7 @@ export type ListItemContextData = {
|
|
|
12
14
|
prompt?: string;
|
|
13
15
|
};
|
|
14
16
|
props: Pick<ListItemProps, 'disabled' | 'inverted'>;
|
|
17
|
+
mediaSize?: number;
|
|
15
18
|
describedByIds: string;
|
|
16
19
|
};
|
|
17
20
|
export declare const ListItemContext: import("react").Context<ListItemContextData>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemContext.d.ts","sourceRoot":"","sources":["../../../src/listItem/ListItemContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"ListItemContext.d.ts","sourceRoot":"","sources":["../../../src/listItem/ListItemContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,aAAa,EAAE,MAAM,YAAY,CAAC;AAG9F,MAAM,MAAM,iBAAiB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEvD,MAAM,MAAM,mBAAmB,GAAG;IAChC,cAAc,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC9C,eAAe,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACvD,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACjD,GAAG,EAAE;QACH,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,eAAe,8CAE3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subcomponents.d.ts","sourceRoot":"","sources":["../../../../src/listItem/_stories/subcomponents.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOlC,MAAM,MAAM,uBAAuB,GAC/B,QAAQ,GACR,cAAc,GACd,eAAe,GACf,qBAAqB,GACrB,YAAY,GACZ,kBAAkB,GAClB,qBAAqB,GACrB,2BAA2B,GAC3B,mBAAmB,GACnB,yBAAyB,GACzB,4BAA4B,GAC5B,kCAAkC,GAClC,YAAY,GACZ,oBAAoB,GACpB,UAAU,GACV,OAAO,GACP,QAAQ,CAAC;AAEb,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,uBAAuB,EAAE,SAAS,CA0DnE,CAAC;AAEX,eAAO,MAAM,4BAA4B;;;CAe/B,CAAC;AAEX,eAAO,MAAM,oBAAoB;;;CAavB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;
|
|
1
|
+
{"version":3,"file":"subcomponents.d.ts","sourceRoot":"","sources":["../../../../src/listItem/_stories/subcomponents.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOlC,MAAM,MAAM,uBAAuB,GAC/B,QAAQ,GACR,cAAc,GACd,eAAe,GACf,qBAAqB,GACrB,YAAY,GACZ,kBAAkB,GAClB,qBAAqB,GACrB,2BAA2B,GAC3B,mBAAmB,GACnB,yBAAyB,GACzB,4BAA4B,GAC5B,kCAAkC,GAClC,YAAY,GACZ,oBAAoB,GACpB,UAAU,GACV,OAAO,GACP,QAAQ,CAAC;AAEb,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,uBAAuB,EAAE,SAAS,CA0DnE,CAAC;AAEX,eAAO,MAAM,4BAA4B;;;CAe/B,CAAC;AAEX,eAAO,MAAM,oBAAoB;;;CAavB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;CAqBrB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type RenderResult } from '../test-utils';
|
|
2
|
+
export declare const mockSetControlType: jest.Mock<any, any, any>;
|
|
3
|
+
export declare const mockSetControlProps: jest.Mock<any, any, any>;
|
|
4
|
+
export declare const mockSetMediaSize: jest.Mock<any, any, any>;
|
|
5
|
+
export declare const renderWithListItemContext: (ui: React.ReactNode) => RenderResult;
|
|
6
|
+
export declare const clearListItemMocks: () => void;
|
|
7
|
+
//# sourceMappingURL=test-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../../../src/listItem/test-utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAG1D,eAAO,MAAM,kBAAkB,0BAAY,CAAC;AAC5C,eAAO,MAAM,mBAAmB,0BAAY,CAAC;AAC7C,eAAO,MAAM,gBAAgB,0BAAY,CAAC;AAE1C,eAAO,MAAM,yBAAyB,GAAI,IAAI,KAAK,CAAC,SAAS,KAAG,YAqB/D,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAE9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useListItemMedia.d.ts","sourceRoot":"","sources":["../../../src/listItem/useListItemMedia.tsx"],"names":[],"mappings":"AAGA,wBAAgB,gBAAgB,CAAC,IAAI,CAAC,EAAE,MAAM;;;EAQ7C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-55ad5c7",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -83,10 +83,10 @@
|
|
|
83
83
|
"storybook": "^9.0.18",
|
|
84
84
|
"storybook-addon-tag-badges": "^2.0.1",
|
|
85
85
|
"storybook-addon-test-codegen": "^2.0.1",
|
|
86
|
-
"@transferwise/neptune-css": "14.24.5",
|
|
87
86
|
"@wise/components-theming": "1.6.4",
|
|
88
|
-
"@
|
|
89
|
-
"@transferwise/
|
|
87
|
+
"@transferwise/less-config": "3.1.2",
|
|
88
|
+
"@transferwise/neptune-css": "14.24.5",
|
|
89
|
+
"@wise/wds-configs": "0.0.0"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"@transferwise/icons": "^3.22.3",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import AvatarLayoutComp, { type AvatarLayoutProps } from '../../avatarLayout';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
|
+
import { useListItemMedia } from '../useListItemMedia';
|
|
3
4
|
|
|
4
5
|
type SizeProp = { size?: 32 | 40 | 48 | 56 | 72 };
|
|
5
6
|
|
|
@@ -13,6 +14,8 @@ export type ListItemAvatarLayoutProps = Omit<AvatarLayoutProps, 'size' | 'intera
|
|
|
13
14
|
* Please refer to the [Design documentation](https://wise.design/components/list-item#avatar) for details.
|
|
14
15
|
*/
|
|
15
16
|
export const AvatarLayout = ({ className, size = 48, ...props }: ListItemAvatarLayoutProps) => {
|
|
17
|
+
useListItemMedia(size);
|
|
18
|
+
|
|
16
19
|
return (
|
|
17
20
|
<AvatarLayoutComp
|
|
18
21
|
{...props}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
import AvatarViewComp, { AvatarViewProps } from '../../avatarView';
|
|
3
|
+
import { useListItemMedia } from '../useListItemMedia';
|
|
3
4
|
|
|
4
5
|
export type ListItemAvatarViewProps = Omit<AvatarViewProps, 'size' | 'interactive'> & {
|
|
5
6
|
size?: 32 | 40 | 48 | 56 | 72;
|
|
@@ -13,6 +14,8 @@ export type ListItemAvatarViewProps = Omit<AvatarViewProps, 'size' | 'interactiv
|
|
|
13
14
|
* Please refer to the [Design documentation](https://wise.design/components/list-item#avatar) for details.
|
|
14
15
|
*/
|
|
15
16
|
export const AvatarView = ({ className, size = 48, ...props }: ListItemAvatarViewProps) => {
|
|
17
|
+
useListItemMedia(size);
|
|
18
|
+
|
|
16
19
|
return (
|
|
17
20
|
<AvatarViewComp
|
|
18
21
|
{...props}
|