@transferwise/components 46.166.0 → 46.167.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.
Files changed (83) hide show
  1. package/build/CardContainer/CardContainer.js +34 -0
  2. package/build/CardContainer/CardContainer.js.map +1 -0
  3. package/build/CardContainer/CardContainer.mjs +30 -0
  4. package/build/CardContainer/CardContainer.mjs.map +1 -0
  5. package/build/CardWidget/CardWidget.js +98 -0
  6. package/build/CardWidget/CardWidget.js.map +1 -0
  7. package/build/CardWidget/CardWidget.mjs +94 -0
  8. package/build/CardWidget/CardWidget.mjs.map +1 -0
  9. package/build/CardWidget/CardWidgetAction.js +73 -0
  10. package/build/CardWidget/CardWidgetAction.js.map +1 -0
  11. package/build/CardWidget/CardWidgetAction.mjs +68 -0
  12. package/build/CardWidget/CardWidgetAction.mjs.map +1 -0
  13. package/build/ListItem/ListItem.js +2 -0
  14. package/build/ListItem/ListItem.js.map +1 -1
  15. package/build/ListItem/ListItem.mjs +2 -0
  16. package/build/ListItem/ListItem.mjs.map +1 -1
  17. package/build/index.js +4 -0
  18. package/build/index.js.map +1 -1
  19. package/build/index.mjs +2 -0
  20. package/build/index.mjs.map +1 -1
  21. package/build/main.css +194 -0
  22. package/build/styles/CardContainer/CardContainer.css +108 -0
  23. package/build/styles/CardWidget/CardWidget.css +78 -0
  24. package/build/styles/ListItem/ListItem.css +8 -0
  25. package/build/styles/main.css +194 -0
  26. package/build/types/Body/Body.d.ts +2 -2
  27. package/build/types/CardContainer/CardContainer.d.ts +8 -0
  28. package/build/types/CardContainer/CardContainer.d.ts.map +1 -0
  29. package/build/types/CardContainer/CardContainer.types.d.ts +55 -0
  30. package/build/types/CardContainer/CardContainer.types.d.ts.map +1 -0
  31. package/build/types/CardContainer/_stories/helpers.d.ts +3 -0
  32. package/build/types/CardContainer/_stories/helpers.d.ts.map +1 -0
  33. package/build/types/CardContainer/index.d.ts +3 -0
  34. package/build/types/CardContainer/index.d.ts.map +1 -0
  35. package/build/types/CardWidget/CardWidget.d.ts +10 -0
  36. package/build/types/CardWidget/CardWidget.d.ts.map +1 -0
  37. package/build/types/CardWidget/CardWidget.types.d.ts +55 -0
  38. package/build/types/CardWidget/CardWidget.types.d.ts.map +1 -0
  39. package/build/types/CardWidget/CardWidgetAction.d.ts +54 -0
  40. package/build/types/CardWidget/CardWidgetAction.d.ts.map +1 -0
  41. package/build/types/CardWidget/index.d.ts +4 -0
  42. package/build/types/CardWidget/index.d.ts.map +1 -0
  43. package/build/types/IconButton/IconButton.d.ts +1 -1
  44. package/build/types/ListItem/ListItem.d.ts +1 -1
  45. package/build/types/ListItem/ListItem.d.ts.map +1 -1
  46. package/build/types/MoneyInput/MoneyInput.d.ts +1 -1
  47. package/build/types/MoneyInput/MoneyInput.d.ts.map +1 -1
  48. package/build/types/Title/Title.d.ts +2 -2
  49. package/build/types/Upload/Steps/UploadImageStep/UploadImageStep.d.ts +1 -1
  50. package/build/types/UploadInput/UploadItem/UploadItemLink.d.ts +1 -1
  51. package/build/types/index.d.ts +4 -0
  52. package/build/types/index.d.ts.map +1 -1
  53. package/package.json +3 -3
  54. package/src/CardContainer/CardContainer.css +108 -0
  55. package/src/CardContainer/CardContainer.less +171 -0
  56. package/src/CardContainer/CardContainer.test.tsx +150 -0
  57. package/src/CardContainer/CardContainer.tsx +51 -0
  58. package/src/CardContainer/CardContainer.types.ts +62 -0
  59. package/src/CardContainer/_stories/CardContainer.story.tsx +167 -0
  60. package/src/CardContainer/_stories/CardContainer.test.story.tsx +103 -0
  61. package/src/CardContainer/_stories/helpers.tsx +50 -0
  62. package/src/CardContainer/index.ts +6 -0
  63. package/src/CardWidget/CardWidget.css +78 -0
  64. package/src/CardWidget/CardWidget.less +107 -0
  65. package/src/CardWidget/CardWidget.test.tsx +221 -0
  66. package/src/CardWidget/CardWidget.tsx +78 -0
  67. package/src/CardWidget/CardWidget.types.ts +63 -0
  68. package/src/CardWidget/CardWidgetAction.tsx +128 -0
  69. package/src/CardWidget/_stories/CardWidget.story.tsx +238 -0
  70. package/src/CardWidget/_stories/CardWidget.test.story.tsx +350 -0
  71. package/src/CardWidget/index.ts +3 -0
  72. package/src/ListItem/ListItem.css +8 -0
  73. package/src/ListItem/ListItem.less +8 -0
  74. package/src/ListItem/ListItem.test.tsx +20 -0
  75. package/src/ListItem/ListItem.tsx +3 -1
  76. package/src/ListItem/_stories/ListItem.layout.test.story.tsx +1 -1
  77. package/src/ListItem/_stories/ListItem.story.tsx +1 -1
  78. package/src/Prompt/CriticalBanner/_stories/CriticalBanner.docs.mdx +122 -0
  79. package/src/Prompt/CriticalBanner/_stories/CriticalBanner.story.tsx +0 -2
  80. package/src/index.ts +13 -0
  81. package/src/main.css +194 -0
  82. package/src/main.less +2 -0
  83. package/src/FlowNavigation/_stories/FlowNavigation.CriticalBanner.docs.mdx +0 -66
@@ -150,6 +150,8 @@ const ListItem = ({
150
150
  'wds-list-item-interactive': isFullyInteractive,
151
151
  'wds-list-item-partially-interactive': isPartiallyInteractive,
152
152
  [`wds-list-item-spotlight wds-list-item-spotlight-${spotlight}`]: isFullyInteractive && !!spotlight,
153
+ 'wds-list-item-paddingY-8': paddingY === 8,
154
+ 'wds-list-item-paddingY-16': paddingY === 16,
153
155
  'wds-list-item-paddingY-24': paddingY === 24,
154
156
  disabled: disabled && !isPartiallyInteractive,
155
157
  'disabled--has-prompt-reason': !disabledPromptMessage && disabled && !isPartiallyInteractive
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.mjs","sources":["../../src/ListItem/ListItem.tsx"],"sourcesContent":["import {\n useContext,\n useId,\n useMemo,\n useState,\n type PropsWithChildren,\n type ReactNode,\n} from 'react';\nimport { Sentiment, Typography } from '../common';\nimport Body from '../Body';\nimport { AdditionalInfo } from './AdditionalInfo';\nimport { IconButton, type ListItemIconButtonProps } from './IconButton';\nimport { Checkbox, type ListItemCheckboxProps } from './Checkbox';\nimport { Navigation, type ListItemNavigationProps } from './Navigation';\nimport { clsx } from 'clsx';\nimport { Button, type ListItemButtonProps } from './Button';\nimport { Radio, type ListItemRadioProps } from './Radio';\nimport { Switch, type ListItemSwitchProps } from './Switch';\nimport { AvatarLayout } from './AvatarLayout';\nimport { AvatarView } from './AvatarView';\nimport { Image } from './Image';\nimport { Prompt } from './Prompt';\nimport { PrimitiveAnchor, type PrimitiveAnchorProps } from '../Primitives';\nimport {\n ListItemContext,\n type ListItemContextData,\n type ListItemMediaSize,\n} from './ListItemContext';\n\nexport type ListItemTypes =\n 'non-interactive' | 'navigation' | 'radio' | 'checkbox' | 'switch' | 'button' | 'icon-button';\n\nexport type ListItemControlProps =\n | ListItemNavigationProps\n | ListItemCheckboxProps\n | ListItemButtonProps\n | ListItemIconButtonProps\n | ListItemRadioProps\n | ListItemSwitchProps;\n\nexport type ListItemProps = {\n /** @default 'li' */\n as?: 'li' | 'div';\n /**\n * Swaps vertical hierarchy of title and subtitle and their corresponding right values.\n */\n inverted?: boolean;\n /**\n * Disables the control and renders the ListItem in greyscale and with slightly decreased opacity.\n */\n disabled?: boolean;\n /**\n * If set, it'll extend the `disabled` state, overriding existing or injecting uniquely styled prompt with the message provided via this prop. <br />\n * **NB:** This message cannot house more than **1** link or inline button.<br />\n * **NB:** It must be used together with `disabled` prop and will be disregarded otherwise.\n */\n disabledPromptMessage?: ReactNode;\n /**\n * Highlights the list item as an action to be taken or already taken. <br />\n */\n spotlight?: 'active' | 'inactive';\n /**\n * Vertical padding of the list item, in pixels.\n * @default 12\n */\n paddingY?: 12 | 24;\n title: ReactNode;\n subtitle?: ReactNode;\n /**\n * Requires `<ListItem.AdditionalInfo />` component as a sole child. <br />\n * Can be only rendered if `subtitle` is also provided.\n */\n additionalInfo?: ReactNode;\n valueTitle?: ReactNode;\n valueSubtitle?: ReactNode;\n /**\n * Requires one of the following as a sole child: <br />\n * `<ListItem.AvatarView />`,\n * `<ListItem.AvatarLayout />` or\n * `<ListItem.Image />`\n */\n media?: ReactNode;\n /**\n * Requires one of the following as a sole child: <br/>\n * `<ListItem.Button />`, <br/>\n * `<ListItem.Checkbox />`, <br/>\n * `<ListItem.IconButton />`, <br/>\n * `<ListItem.Navigation />`, <br/>\n * `<ListItem.Radio />`, or\n * `<ListItem.Switch />`\n * @default null\n */\n control?: ReactNode;\n /**\n * Requires `<ListItem.Prompt />` component as a sole child.\n */\n prompt?: ReactNode;\n className?: string;\n /**\n * A number between `0–100` which resolves to a `fr` value of a `grid-template-columns` declaration. E.g. `valueColumnWidth={25}` will result in a `75fr 25fr`. <br />\n * Controls the width ratio of left side content (title and subtitle) to the right side content.\n */\n valueColumnWidth?: number;\n id?: string;\n};\n\n/**\n * @see [Design documentation](https://docs.wise.design/components/list-item)\n * @see [Storybook documentation](https://storybook.wise.design/?path=/docs/content-listitem--docs)\n */\nexport const ListItem = ({\n as: ListItemElement = 'li',\n title,\n subtitle,\n additionalInfo,\n prompt,\n inverted,\n media,\n spotlight,\n paddingY = 12,\n valueTitle,\n valueSubtitle,\n control = null,\n disabled,\n disabledPromptMessage,\n className,\n valueColumnWidth,\n id,\n}: ListItemProps) => {\n const idPrefix = useId();\n const [controlProps, setControlProps] = useState<ListItemControlProps>({});\n const [controlType, setControlType] = useState<ListItemTypes>('non-interactive');\n const [mediaSize, setMediaSize] = useState<ListItemMediaSize | undefined>();\n\n const ids: ListItemContextData['ids'] = {\n title: `${idPrefix}_title`,\n ...(subtitle ? { subtitle: `${idPrefix}_subtitle` } : {}),\n ...(valueTitle ? { valueTitle: `${idPrefix}_value-title` } : {}),\n ...(valueSubtitle ? { valueSubtitle: `${idPrefix}_value-subtitle` } : {}),\n control: `${idPrefix}_control`,\n ...(prompt || (disabled && disabledPromptMessage) ? { prompt: `${idPrefix}_prompt` } : {}),\n ...(additionalInfo ? { additionalInfo: `${idPrefix}_additional-info` } : {}),\n };\n\n const isPartiallyInteractive = Boolean(\n (controlType === 'button' || controlType === 'icon-button') &&\n (controlProps as ListItemButtonProps | ListItemIconButtonProps)?.partiallyInteractive,\n );\n const isFullyInteractive = controlType !== 'non-interactive' && !isPartiallyInteractive;\n const isButtonAsLink =\n (controlType === 'button' || controlType === 'icon-button') &&\n Boolean((controlProps as ListItemButtonProps | ListItemIconButtonProps)?.href);\n const isNavigationIndicatorHidden =\n controlType === 'navigation' &&\n Boolean((controlProps as ListItemNavigationProps)?.hideIndicator);\n\n const titlesAndValues = [\n inverted ? ids.subtitle : ids.title,\n inverted ? ids.title : ids.subtitle,\n inverted ? ids.valueSubtitle : ids.valueTitle,\n inverted ? ids.valueTitle : ids.valueSubtitle,\n ].join(' ');\n const additionalInfoPrompt = [ids.additionalInfo, ids.prompt].filter(Boolean).join(' ');\n\n const describedByIds = useMemo(() => {\n return isFullyInteractive && !isButtonAsLink\n ? additionalInfoPrompt\n : `${titlesAndValues} ${additionalInfoPrompt}`;\n }, [additionalInfoPrompt, isButtonAsLink, isFullyInteractive, titlesAndValues]);\n const listItemContext = useMemo(\n () => ({\n setControlType,\n setControlProps,\n setMediaSize,\n ids,\n props: { disabled, inverted, disabledPromptMessage },\n mediaSize,\n isPartiallyInteractive,\n describedByIds,\n }),\n [describedByIds, mediaSize, disabled, inverted, disabledPromptMessage, isPartiallyInteractive],\n );\n const gridColumnsStyle = {\n '--wds-list-item-body-left': valueColumnWidth ? `${100 - valueColumnWidth}fr` : '50fr',\n '--wds-list-item-body-right': valueColumnWidth ? `${valueColumnWidth}fr` : '50fr',\n } as React.CSSProperties;\n\n const getFeatureClassName = () => {\n const partials = [];\n const hasMedia = Boolean(media);\n const hasVisibleControl = Boolean(control) && !isNavigationIndicatorHidden;\n const hasInfo = Boolean(additionalInfo);\n const hasPrompt = Boolean(prompt) || (disabled && Boolean(disabledPromptMessage));\n\n /* eslint-disable functional/immutable-data */\n if (hasMedia && hasVisibleControl) {\n partials.push('wds-list-item-hasMedia-hasControl');\n }\n\n if (hasMedia && !hasVisibleControl) {\n partials.push('wds-list-item-hasMedia-noControl');\n }\n\n if (!hasMedia && hasVisibleControl) {\n partials.push('wds-list-item-noMedia-hasControl');\n }\n\n if (!hasMedia && !hasVisibleControl) {\n partials.push('wds-list-item-noMedia-noControl');\n }\n\n if (hasInfo && hasPrompt) {\n partials.push('wds-list-item-hasInfo-hasPrompt');\n }\n if (hasInfo && !hasPrompt) {\n partials.push('wds-list-item-hasInfo-noPrompt');\n }\n if (!hasInfo && hasPrompt) {\n partials.push('wds-list-item-noInfo-hasPrompt');\n }\n if (!hasInfo && !hasPrompt) {\n partials.push('wds-list-item-noInfo-noPrompt');\n }\n /* eslint-enable functional/immutable-data */\n\n return partials.join(' ');\n };\n\n return (\n <ListItemContext.Provider value={listItemContext}>\n <ListItemElement\n className={clsx(\n 'wds-list-item',\n `wds-list-item-${controlType}`,\n getFeatureClassName(),\n {\n 'wds-list-item-interactive': isFullyInteractive,\n 'wds-list-item-partially-interactive': isPartiallyInteractive,\n [`wds-list-item-spotlight wds-list-item-spotlight-${spotlight}`]:\n isFullyInteractive && !!spotlight,\n 'wds-list-item-paddingY-24': paddingY === 24,\n disabled: disabled && !isPartiallyInteractive,\n 'disabled--has-prompt-reason':\n !disabledPromptMessage && disabled && !isPartiallyInteractive,\n },\n className,\n )}\n id={id}\n aria-disabled={disabled}\n style={\n {\n '--wds-list-item-value-min-height': mediaSize ? `${mediaSize}px` : undefined,\n } as React.CSSProperties\n }\n >\n {isFullyInteractive && spotlight === 'inactive' && (\n <svg aria-hidden=\"true\" className=\"wds-list-item-spotlight__border\">\n <rect />\n </svg>\n )}\n\n <View\n {...{\n isPartiallyInteractive,\n subtitle,\n additionalInfo,\n disabled,\n disabledPromptMessage,\n prompt,\n controlType,\n controlProps,\n }}\n className={getFeatureClassName()}\n >\n {media && <div className=\"wds-list-item-media\">{media}</div>}\n\n {/* Title + Subtitle + Values - Group */}\n <div\n className=\"wds-list-item-body\"\n style={valueColumnWidth ? gridColumnsStyle : undefined}\n >\n {/* Title + Subtitle + Values - Group */}\n <span className=\"wds-list-item-titles\">\n {(() => {\n const titles = [\n <Body\n key={ids.title}\n id={ids.title}\n type={Typography.BODY_LARGE_BOLD}\n className=\"wds-list-item-title\"\n >\n {title}\n </Body>,\n ];\n if (subtitle) {\n titles.push(\n <Body key={ids.subtitle} id={ids.subtitle} className=\"wds-list-item-subtitle\">\n {subtitle}\n </Body>,\n );\n }\n return inverted ? [...titles].reverse() : titles;\n })()}\n </span>\n\n {(valueTitle || valueSubtitle) && (\n <span\n className={clsx('wds-list-item-value', {\n 'flex-column': valueTitle !== undefined || valueSubtitle !== undefined,\n })}\n >\n {(() => {\n const values = [];\n if (valueTitle) {\n values.push(\n <Body\n key={ids.valueTitle}\n id={ids.valueTitle}\n type={Typography.BODY_LARGE_BOLD}\n className=\"wds-list-item-title-value\"\n >\n {valueTitle}\n </Body>,\n );\n }\n if (valueSubtitle) {\n values.push(\n <Body\n key={ids.valueSubtitle}\n id={ids.valueSubtitle}\n className=\"wds-list-item-subtitle-value\"\n >\n {valueSubtitle}\n </Body>,\n );\n }\n return inverted ? [...values].reverse() : values;\n })()}\n </span>\n )}\n </div>\n\n {control === null ? null : (\n <Body\n className={clsx('wds-list-item-control-wrapper', {\n 'wds-list-item-button-control': controlType === 'button',\n 'wds-list-item-button-control--hasPrompt':\n controlType === 'button' && Boolean(prompt),\n })}\n style={\n {\n '--wds-list-item-control-wrapper-height': mediaSize ? `${mediaSize}px` : 'auto',\n } as React.CSSProperties\n }\n >\n {control}\n </Body>\n )}\n </View>\n </ListItemElement>\n </ListItemContext.Provider>\n );\n};\n\ntype ViewProps = PropsWithChildren<{\n isPartiallyInteractive: boolean;\n controlType?: ListItemTypes;\n controlProps?: ListItemControlProps;\n}> &\n Pick<\n ListItemProps,\n 'subtitle' | 'additionalInfo' | 'prompt' | 'disabled' | 'disabledPromptMessage' | 'className'\n >;\n\nfunction View({\n children,\n additionalInfo,\n prompt,\n disabled,\n disabledPromptMessage,\n isPartiallyInteractive,\n controlType = 'non-interactive',\n controlProps,\n className = '',\n}: ViewProps) {\n const { ids, describedByIds } = useContext<ListItemContextData>(ListItemContext);\n const isLinkControl = ['navigation'].includes(controlType);\n\n const isHrefProvided = isLinkControl && !!(controlProps as ListItemNavigationProps)?.href;\n\n const renderExtras = () => {\n const resolvedPrompt =\n disabled && disabledPromptMessage && !prompt ? (\n <Prompt sentiment={Sentiment.NEUTRAL}>{disabledPromptMessage}</Prompt>\n ) : (\n prompt\n );\n\n return (\n <>\n {additionalInfo}\n {resolvedPrompt}\n </>\n );\n };\n\n if (isLinkControl && isHrefProvided) {\n return (\n // for link instances of .Navigation, .IconButton, .Button\n <div className={clsx('wds-list-item-gridWrapper', className)}>\n <PrimitiveAnchor\n aria-describedby={describedByIds}\n href={(controlProps as ListItemNavigationProps)?.href}\n target={(controlProps as ListItemNavigationProps)?.target}\n className={clsx('wds-list-item-view', {\n 'wds-list-item-control': controlType === 'navigation',\n fullyInteractive: !isPartiallyInteractive,\n })}\n disabled={disabled}\n onClick={(controlProps as PrimitiveAnchorProps | undefined)?.onClick}\n >\n {children}\n </PrimitiveAnchor>\n\n {renderExtras()}\n </div>\n );\n }\n\n if (isPartiallyInteractive || controlType === 'non-interactive') {\n return (\n <div className={clsx('wds-list-item-gridWrapper', className)}>\n <div className=\"wds-list-item-view\">{children}</div>\n\n {renderExtras()}\n </div>\n );\n }\n\n // for form control instances of .Radio, .Checkbox, .Switch, .Button, .Navigation etc\n // Radio cannot be wrapped in a <fieldset> element to announce it as a group.\n const InputWrapper = controlType === 'radio' ? 'div' : 'fieldset';\n return (\n <InputWrapper className={clsx('wds-list-item-gridWrapper', className)}>\n <label\n htmlFor={ids.control}\n className={clsx('wds-list-item-view', {\n clickable: !disabled,\n fullyInteractive: !isPartiallyInteractive,\n })}\n >\n {children}\n </label>\n\n {renderExtras()}\n </InputWrapper>\n );\n}\n\nListItem.Image = Image;\nListItem.AvatarView = AvatarView;\nListItem.AvatarLayout = AvatarLayout;\nListItem.AdditionalInfo = AdditionalInfo;\nListItem.Checkbox = Checkbox;\nListItem.Radio = Radio;\nListItem.IconButton = IconButton;\nListItem.Navigation = Navigation;\nListItem.Button = Button;\nListItem.Switch = Switch;\nListItem.Prompt = Prompt;\n\nexport default ListItem;\n"],"names":["ListItem","as","ListItemElement","title","subtitle","additionalInfo","prompt","inverted","media","spotlight","paddingY","valueTitle","valueSubtitle","control","disabled","disabledPromptMessage","className","valueColumnWidth","id","idPrefix","useId","controlProps","setControlProps","useState","controlType","setControlType","mediaSize","setMediaSize","ids","isPartiallyInteractive","Boolean","partiallyInteractive","isFullyInteractive","isButtonAsLink","href","isNavigationIndicatorHidden","hideIndicator","titlesAndValues","join","additionalInfoPrompt","filter","describedByIds","useMemo","listItemContext","props","gridColumnsStyle","getFeatureClassName","partials","hasMedia","hasVisibleControl","hasInfo","hasPrompt","push","_jsx","ListItemContext","Provider","value","children","_jsxs","clsx","style","undefined","View","titles","Body","type","Typography","BODY_LARGE_BOLD","reverse","values","useContext","isLinkControl","includes","isHrefProvided","renderExtras","resolvedPrompt","Prompt","sentiment","Sentiment","NEUTRAL","_Fragment","PrimitiveAnchor","target","fullyInteractive","onClick","InputWrapper","htmlFor","clickable","Image","AvatarView","AvatarLayout","AdditionalInfo","Checkbox","Radio","IconButton","Navigation","Button","Switch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8GO,MAAMA,QAAQ,GAAGA,CAAC;EACvBC,EAAE,EAAEC,eAAe,GAAG,IAAI;EAC1BC,KAAK;EACLC,QAAQ;EACRC,cAAc;EACdC,MAAM;EACNC,QAAQ;EACRC,KAAK;EACLC,SAAS;AACTC,EAAAA,QAAQ,GAAG,EAAE;EACbC,UAAU;EACVC,aAAa;AACbC,EAAAA,OAAO,GAAG,IAAI;EACdC,QAAQ;EACRC,qBAAqB;EACrBC,SAAS;EACTC,gBAAgB;AAChBC,EAAAA;AAAE,CACY,KAAI;AAClB,EAAA,MAAMC,QAAQ,GAAGC,KAAK,EAAE;EACxB,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGC,QAAQ,CAAuB,EAAE,CAAC;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;QACpC4B,SAAS,EAAE,CAACzE,QAAQ;AACpBqE,QAAAA,gBAAgB,EAAE,CAACtD;AACpB,OAAA,CAAE;AAAA4B,MAAAA,QAAA,EAEFA;AAAQ,KACJ,CAEP,EAACiB,YAAY,EAAE;AAAA,GACH,CAAC;AAEnB;AAEA1E,QAAQ,CAACwF,KAAK,GAAGA,KAAK;AACtBxF,QAAQ,CAACyF,UAAU,GAAGA,UAAU;AAChCzF,QAAQ,CAAC0F,YAAY,GAAGA,YAAY;AACpC1F,QAAQ,CAAC2F,cAAc,GAAGA,cAAc;AACxC3F,QAAQ,CAAC4F,QAAQ,GAAGA,QAAQ;AAC5B5F,QAAQ,CAAC6F,KAAK,GAAGA,KAAK;AACtB7F,QAAQ,CAAC8F,UAAU,GAAGA,UAAU;AAChC9F,QAAQ,CAAC+F,UAAU,GAAGA,UAAU;AAChC/F,QAAQ,CAACgG,MAAM,GAAGA,MAAM;AACxBhG,QAAQ,CAACiG,MAAM,GAAGA,MAAM;AACxBjG,QAAQ,CAAC4E,MAAM,GAAGA,MAAM;;"}
1
+ {"version":3,"file":"ListItem.mjs","sources":["../../src/ListItem/ListItem.tsx"],"sourcesContent":["import {\n useContext,\n useId,\n useMemo,\n useState,\n type PropsWithChildren,\n type ReactNode,\n} from 'react';\nimport { Sentiment, Typography } from '../common';\nimport Body from '../Body';\nimport { AdditionalInfo } from './AdditionalInfo';\nimport { IconButton, type ListItemIconButtonProps } from './IconButton';\nimport { Checkbox, type ListItemCheckboxProps } from './Checkbox';\nimport { Navigation, type ListItemNavigationProps } from './Navigation';\nimport { clsx } from 'clsx';\nimport { Button, type ListItemButtonProps } from './Button';\nimport { Radio, type ListItemRadioProps } from './Radio';\nimport { Switch, type ListItemSwitchProps } from './Switch';\nimport { AvatarLayout } from './AvatarLayout';\nimport { AvatarView } from './AvatarView';\nimport { Image } from './Image';\nimport { Prompt } from './Prompt';\nimport { PrimitiveAnchor, type PrimitiveAnchorProps } from '../Primitives';\nimport {\n ListItemContext,\n type ListItemContextData,\n type ListItemMediaSize,\n} from './ListItemContext';\n\nexport type ListItemTypes =\n 'non-interactive' | 'navigation' | 'radio' | 'checkbox' | 'switch' | 'button' | 'icon-button';\n\nexport type ListItemControlProps =\n | ListItemNavigationProps\n | ListItemCheckboxProps\n | ListItemButtonProps\n | ListItemIconButtonProps\n | ListItemRadioProps\n | ListItemSwitchProps;\n\nexport type ListItemProps = {\n /** @default 'li' */\n as?: 'li' | 'div';\n /**\n * Swaps vertical hierarchy of title and subtitle and their corresponding right values.\n */\n inverted?: boolean;\n /**\n * Disables the control and renders the ListItem in greyscale and with slightly decreased opacity.\n */\n disabled?: boolean;\n /**\n * If set, it'll extend the `disabled` state, overriding existing or injecting uniquely styled prompt with the message provided via this prop. <br />\n * **NB:** This message cannot house more than **1** link or inline button.<br />\n * **NB:** It must be used together with `disabled` prop and will be disregarded otherwise.\n */\n disabledPromptMessage?: ReactNode;\n /**\n * Highlights the list item as an action to be taken or already taken. <br />\n */\n spotlight?: 'active' | 'inactive';\n /**\n * Vertical padding of the list item, in pixels.\n * @default 12\n */\n paddingY?: 8 | 12 | 16 | 24;\n title: ReactNode;\n subtitle?: ReactNode;\n /**\n * Requires `<ListItem.AdditionalInfo />` component as a sole child. <br />\n * Can be only rendered if `subtitle` is also provided.\n */\n additionalInfo?: ReactNode;\n valueTitle?: ReactNode;\n valueSubtitle?: ReactNode;\n /**\n * Requires one of the following as a sole child: <br />\n * `<ListItem.AvatarView />`,\n * `<ListItem.AvatarLayout />` or\n * `<ListItem.Image />`\n */\n media?: ReactNode;\n /**\n * Requires one of the following as a sole child: <br/>\n * `<ListItem.Button />`, <br/>\n * `<ListItem.Checkbox />`, <br/>\n * `<ListItem.IconButton />`, <br/>\n * `<ListItem.Navigation />`, <br/>\n * `<ListItem.Radio />`, or\n * `<ListItem.Switch />`\n * @default null\n */\n control?: ReactNode;\n /**\n * Requires `<ListItem.Prompt />` component as a sole child.\n */\n prompt?: ReactNode;\n className?: string;\n /**\n * A number between `0–100` which resolves to a `fr` value of a `grid-template-columns` declaration. E.g. `valueColumnWidth={25}` will result in a `75fr 25fr`. <br />\n * Controls the width ratio of left side content (title and subtitle) to the right side content.\n */\n valueColumnWidth?: number;\n id?: string;\n};\n\n/**\n * @see [Design documentation](https://docs.wise.design/components/list-item)\n * @see [Storybook documentation](https://storybook.wise.design/?path=/docs/content-listitem--docs)\n */\nexport const ListItem = ({\n as: ListItemElement = 'li',\n title,\n subtitle,\n additionalInfo,\n prompt,\n inverted,\n media,\n spotlight,\n paddingY = 12,\n valueTitle,\n valueSubtitle,\n control = null,\n disabled,\n disabledPromptMessage,\n className,\n valueColumnWidth,\n id,\n}: ListItemProps) => {\n const idPrefix = useId();\n const [controlProps, setControlProps] = useState<ListItemControlProps>({});\n const [controlType, setControlType] = useState<ListItemTypes>('non-interactive');\n const [mediaSize, setMediaSize] = useState<ListItemMediaSize | undefined>();\n\n const ids: ListItemContextData['ids'] = {\n title: `${idPrefix}_title`,\n ...(subtitle ? { subtitle: `${idPrefix}_subtitle` } : {}),\n ...(valueTitle ? { valueTitle: `${idPrefix}_value-title` } : {}),\n ...(valueSubtitle ? { valueSubtitle: `${idPrefix}_value-subtitle` } : {}),\n control: `${idPrefix}_control`,\n ...(prompt || (disabled && disabledPromptMessage) ? { prompt: `${idPrefix}_prompt` } : {}),\n ...(additionalInfo ? { additionalInfo: `${idPrefix}_additional-info` } : {}),\n };\n\n const isPartiallyInteractive = Boolean(\n (controlType === 'button' || controlType === 'icon-button') &&\n (controlProps as ListItemButtonProps | ListItemIconButtonProps)?.partiallyInteractive,\n );\n const isFullyInteractive = controlType !== 'non-interactive' && !isPartiallyInteractive;\n const isButtonAsLink =\n (controlType === 'button' || controlType === 'icon-button') &&\n Boolean((controlProps as ListItemButtonProps | ListItemIconButtonProps)?.href);\n const isNavigationIndicatorHidden =\n controlType === 'navigation' &&\n Boolean((controlProps as ListItemNavigationProps)?.hideIndicator);\n\n const titlesAndValues = [\n inverted ? ids.subtitle : ids.title,\n inverted ? ids.title : ids.subtitle,\n inverted ? ids.valueSubtitle : ids.valueTitle,\n inverted ? ids.valueTitle : ids.valueSubtitle,\n ].join(' ');\n const additionalInfoPrompt = [ids.additionalInfo, ids.prompt].filter(Boolean).join(' ');\n\n const describedByIds = useMemo(() => {\n return isFullyInteractive && !isButtonAsLink\n ? additionalInfoPrompt\n : `${titlesAndValues} ${additionalInfoPrompt}`;\n }, [additionalInfoPrompt, isButtonAsLink, isFullyInteractive, titlesAndValues]);\n const listItemContext = useMemo(\n () => ({\n setControlType,\n setControlProps,\n setMediaSize,\n ids,\n props: { disabled, inverted, disabledPromptMessage },\n mediaSize,\n isPartiallyInteractive,\n describedByIds,\n }),\n [describedByIds, mediaSize, disabled, inverted, disabledPromptMessage, isPartiallyInteractive],\n );\n const gridColumnsStyle = {\n '--wds-list-item-body-left': valueColumnWidth ? `${100 - valueColumnWidth}fr` : '50fr',\n '--wds-list-item-body-right': valueColumnWidth ? `${valueColumnWidth}fr` : '50fr',\n } as React.CSSProperties;\n\n const getFeatureClassName = () => {\n const partials = [];\n const hasMedia = Boolean(media);\n const hasVisibleControl = Boolean(control) && !isNavigationIndicatorHidden;\n const hasInfo = Boolean(additionalInfo);\n const hasPrompt = Boolean(prompt) || (disabled && Boolean(disabledPromptMessage));\n\n /* eslint-disable functional/immutable-data */\n if (hasMedia && hasVisibleControl) {\n partials.push('wds-list-item-hasMedia-hasControl');\n }\n\n if (hasMedia && !hasVisibleControl) {\n partials.push('wds-list-item-hasMedia-noControl');\n }\n\n if (!hasMedia && hasVisibleControl) {\n partials.push('wds-list-item-noMedia-hasControl');\n }\n\n if (!hasMedia && !hasVisibleControl) {\n partials.push('wds-list-item-noMedia-noControl');\n }\n\n if (hasInfo && hasPrompt) {\n partials.push('wds-list-item-hasInfo-hasPrompt');\n }\n if (hasInfo && !hasPrompt) {\n partials.push('wds-list-item-hasInfo-noPrompt');\n }\n if (!hasInfo && hasPrompt) {\n partials.push('wds-list-item-noInfo-hasPrompt');\n }\n if (!hasInfo && !hasPrompt) {\n partials.push('wds-list-item-noInfo-noPrompt');\n }\n /* eslint-enable functional/immutable-data */\n\n return partials.join(' ');\n };\n\n return (\n <ListItemContext.Provider value={listItemContext}>\n <ListItemElement\n className={clsx(\n 'wds-list-item',\n `wds-list-item-${controlType}`,\n getFeatureClassName(),\n {\n 'wds-list-item-interactive': isFullyInteractive,\n 'wds-list-item-partially-interactive': isPartiallyInteractive,\n [`wds-list-item-spotlight wds-list-item-spotlight-${spotlight}`]:\n isFullyInteractive && !!spotlight,\n 'wds-list-item-paddingY-8': paddingY === 8,\n 'wds-list-item-paddingY-16': paddingY === 16,\n 'wds-list-item-paddingY-24': paddingY === 24,\n disabled: disabled && !isPartiallyInteractive,\n 'disabled--has-prompt-reason':\n !disabledPromptMessage && disabled && !isPartiallyInteractive,\n },\n className,\n )}\n id={id}\n aria-disabled={disabled}\n style={\n {\n '--wds-list-item-value-min-height': mediaSize ? `${mediaSize}px` : undefined,\n } as React.CSSProperties\n }\n >\n {isFullyInteractive && spotlight === 'inactive' && (\n <svg aria-hidden=\"true\" className=\"wds-list-item-spotlight__border\">\n <rect />\n </svg>\n )}\n\n <View\n {...{\n isPartiallyInteractive,\n subtitle,\n additionalInfo,\n disabled,\n disabledPromptMessage,\n prompt,\n controlType,\n controlProps,\n }}\n className={getFeatureClassName()}\n >\n {media && <div className=\"wds-list-item-media\">{media}</div>}\n\n {/* Title + Subtitle + Values - Group */}\n <div\n className=\"wds-list-item-body\"\n style={valueColumnWidth ? gridColumnsStyle : undefined}\n >\n {/* Title + Subtitle + Values - Group */}\n <span className=\"wds-list-item-titles\">\n {(() => {\n const titles = [\n <Body\n key={ids.title}\n id={ids.title}\n type={Typography.BODY_LARGE_BOLD}\n className=\"wds-list-item-title\"\n >\n {title}\n </Body>,\n ];\n if (subtitle) {\n titles.push(\n <Body key={ids.subtitle} id={ids.subtitle} className=\"wds-list-item-subtitle\">\n {subtitle}\n </Body>,\n );\n }\n return inverted ? [...titles].reverse() : titles;\n })()}\n </span>\n\n {(valueTitle || valueSubtitle) && (\n <span\n className={clsx('wds-list-item-value', {\n 'flex-column': valueTitle !== undefined || valueSubtitle !== undefined,\n })}\n >\n {(() => {\n const values = [];\n if (valueTitle) {\n values.push(\n <Body\n key={ids.valueTitle}\n id={ids.valueTitle}\n type={Typography.BODY_LARGE_BOLD}\n className=\"wds-list-item-title-value\"\n >\n {valueTitle}\n </Body>,\n );\n }\n if (valueSubtitle) {\n values.push(\n <Body\n key={ids.valueSubtitle}\n id={ids.valueSubtitle}\n className=\"wds-list-item-subtitle-value\"\n >\n {valueSubtitle}\n </Body>,\n );\n }\n return inverted ? [...values].reverse() : values;\n })()}\n </span>\n )}\n </div>\n\n {control === null ? null : (\n <Body\n className={clsx('wds-list-item-control-wrapper', {\n 'wds-list-item-button-control': controlType === 'button',\n 'wds-list-item-button-control--hasPrompt':\n controlType === 'button' && Boolean(prompt),\n })}\n style={\n {\n '--wds-list-item-control-wrapper-height': mediaSize ? `${mediaSize}px` : 'auto',\n } as React.CSSProperties\n }\n >\n {control}\n </Body>\n )}\n </View>\n </ListItemElement>\n </ListItemContext.Provider>\n );\n};\n\ntype ViewProps = PropsWithChildren<{\n isPartiallyInteractive: boolean;\n controlType?: ListItemTypes;\n controlProps?: ListItemControlProps;\n}> &\n Pick<\n ListItemProps,\n 'subtitle' | 'additionalInfo' | 'prompt' | 'disabled' | 'disabledPromptMessage' | 'className'\n >;\n\nfunction View({\n children,\n additionalInfo,\n prompt,\n disabled,\n disabledPromptMessage,\n isPartiallyInteractive,\n controlType = 'non-interactive',\n controlProps,\n className = '',\n}: ViewProps) {\n const { ids, describedByIds } = useContext<ListItemContextData>(ListItemContext);\n const isLinkControl = ['navigation'].includes(controlType);\n\n const isHrefProvided = isLinkControl && !!(controlProps as ListItemNavigationProps)?.href;\n\n const renderExtras = () => {\n const resolvedPrompt =\n disabled && disabledPromptMessage && !prompt ? (\n <Prompt sentiment={Sentiment.NEUTRAL}>{disabledPromptMessage}</Prompt>\n ) : (\n prompt\n );\n\n return (\n <>\n {additionalInfo}\n {resolvedPrompt}\n </>\n );\n };\n\n if (isLinkControl && isHrefProvided) {\n return (\n // for link instances of .Navigation, .IconButton, .Button\n <div className={clsx('wds-list-item-gridWrapper', className)}>\n <PrimitiveAnchor\n aria-describedby={describedByIds}\n href={(controlProps as ListItemNavigationProps)?.href}\n target={(controlProps as ListItemNavigationProps)?.target}\n className={clsx('wds-list-item-view', {\n 'wds-list-item-control': controlType === 'navigation',\n fullyInteractive: !isPartiallyInteractive,\n })}\n disabled={disabled}\n onClick={(controlProps as PrimitiveAnchorProps | undefined)?.onClick}\n >\n {children}\n </PrimitiveAnchor>\n\n {renderExtras()}\n </div>\n );\n }\n\n if (isPartiallyInteractive || controlType === 'non-interactive') {\n return (\n <div className={clsx('wds-list-item-gridWrapper', className)}>\n <div className=\"wds-list-item-view\">{children}</div>\n\n {renderExtras()}\n </div>\n );\n }\n\n // for form control instances of .Radio, .Checkbox, .Switch, .Button, .Navigation etc\n // Radio cannot be wrapped in a <fieldset> element to announce it as a group.\n const InputWrapper = controlType === 'radio' ? 'div' : 'fieldset';\n return (\n <InputWrapper className={clsx('wds-list-item-gridWrapper', className)}>\n <label\n htmlFor={ids.control}\n className={clsx('wds-list-item-view', {\n clickable: !disabled,\n fullyInteractive: !isPartiallyInteractive,\n })}\n >\n {children}\n </label>\n\n {renderExtras()}\n </InputWrapper>\n );\n}\n\nListItem.Image = Image;\nListItem.AvatarView = AvatarView;\nListItem.AvatarLayout = AvatarLayout;\nListItem.AdditionalInfo = AdditionalInfo;\nListItem.Checkbox = Checkbox;\nListItem.Radio = Radio;\nListItem.IconButton = IconButton;\nListItem.Navigation = Navigation;\nListItem.Button = Button;\nListItem.Switch = Switch;\nListItem.Prompt = Prompt;\n\nexport default ListItem;\n"],"names":["ListItem","as","ListItemElement","title","subtitle","additionalInfo","prompt","inverted","media","spotlight","paddingY","valueTitle","valueSubtitle","control","disabled","disabledPromptMessage","className","valueColumnWidth","id","idPrefix","useId","controlProps","setControlProps","useState","controlType","setControlType","mediaSize","setMediaSize","ids","isPartiallyInteractive","Boolean","partiallyInteractive","isFullyInteractive","isButtonAsLink","href","isNavigationIndicatorHidden","hideIndicator","titlesAndValues","join","additionalInfoPrompt","filter","describedByIds","useMemo","listItemContext","props","gridColumnsStyle","getFeatureClassName","partials","hasMedia","hasVisibleControl","hasInfo","hasPrompt","push","_jsx","ListItemContext","Provider","value","children","_jsxs","clsx","style","undefined","View","titles","Body","type","Typography","BODY_LARGE_BOLD","reverse","values","useContext","isLinkControl","includes","isHrefProvided","renderExtras","resolvedPrompt","Prompt","sentiment","Sentiment","NEUTRAL","_Fragment","PrimitiveAnchor","target","fullyInteractive","onClick","InputWrapper","htmlFor","clickable","Image","AvatarView","AvatarLayout","AdditionalInfo","Checkbox","Radio","IconButton","Navigation","Button","Switch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8GO,MAAMA,QAAQ,GAAGA,CAAC;EACvBC,EAAE,EAAEC,eAAe,GAAG,IAAI;EAC1BC,KAAK;EACLC,QAAQ;EACRC,cAAc;EACdC,MAAM;EACNC,QAAQ;EACRC,KAAK;EACLC,SAAS;AACTC,EAAAA,QAAQ,GAAG,EAAE;EACbC,UAAU;EACVC,aAAa;AACbC,EAAAA,OAAO,GAAG,IAAI;EACdC,QAAQ;EACRC,qBAAqB;EACrBC,SAAS;EACTC,gBAAgB;AAChBC,EAAAA;AAAE,CACY,KAAI;AAClB,EAAA,MAAMC,QAAQ,GAAGC,KAAK,EAAE;EACxB,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGC,QAAQ,CAAuB,EAAE,CAAC;EAC1E,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAGF,QAAQ,CAAgB,iBAAiB,CAAC;EAChF,MAAM,CAACG,SAAS,EAAEC,YAAY,CAAC,GAAGJ,QAAQ,EAAiC;AAE3E,EAAA,MAAM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AAA,CAAE;AAAA4B,MAAAA,QAAA,EAEFA;AAAQ,KACJ,CAEP,EAACiB,YAAY,EAAE;AAAA,GACH,CAAC;AAEnB;AAEA1E,QAAQ,CAACwF,KAAK,GAAGA,KAAK;AACtBxF,QAAQ,CAACyF,UAAU,GAAGA,UAAU;AAChCzF,QAAQ,CAAC0F,YAAY,GAAGA,YAAY;AACpC1F,QAAQ,CAAC2F,cAAc,GAAGA,cAAc;AACxC3F,QAAQ,CAAC4F,QAAQ,GAAGA,QAAQ;AAC5B5F,QAAQ,CAAC6F,KAAK,GAAGA,KAAK;AACtB7F,QAAQ,CAAC8F,UAAU,GAAGA,UAAU;AAChC9F,QAAQ,CAAC+F,UAAU,GAAGA,UAAU;AAChC/F,QAAQ,CAACgG,MAAM,GAAGA,MAAM;AACxBhG,QAAQ,CAACiG,MAAM,GAAGA,MAAM;AACxBjG,QAAQ,CAAC4E,MAAM,GAAGA,MAAM;;"}
package/build/index.js CHANGED
@@ -26,6 +26,8 @@ var Chips = require('./Chips/Chips.js');
26
26
  var Chip = require('./Chips/Chip/Chip.js');
27
27
  var CircularButton = require('./CircularButton/CircularButton.js');
28
28
  var Container = require('./Container/Container.js');
29
+ var CardContainer = require('./CardContainer/CardContainer.js');
30
+ var CardWidget = require('./CardWidget/CardWidget.js');
29
31
  var Option = require('./common/Option/Option.js');
30
32
  var BottomSheet = require('./common/BottomSheet/BottomSheet.js');
31
33
  var BaseCard = require('./common/BaseCard/BaseCard.js');
@@ -188,6 +190,8 @@ exports.Chips = Chips.default;
188
190
  exports.Chip = Chip.default;
189
191
  exports.CircularButton = CircularButton.default;
190
192
  exports.Container = Container.default;
193
+ exports.CardContainer = CardContainer.default;
194
+ exports.CardWidget = CardWidget.default;
191
195
  exports.Option = Option.default;
192
196
  exports.BottomSheet = BottomSheet.default;
193
197
  exports.BaseCard = BaseCard.default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/build/index.mjs CHANGED
@@ -24,6 +24,8 @@ export { default as Chips } from './Chips/Chips.mjs';
24
24
  export { default as Chip } from './Chips/Chip/Chip.mjs';
25
25
  export { default as CircularButton } from './CircularButton/CircularButton.mjs';
26
26
  export { default as Container } from './Container/Container.mjs';
27
+ export { default as CardContainer } from './CardContainer/CardContainer.mjs';
28
+ export { default as CardWidget } from './CardWidget/CardWidget.mjs';
27
29
  export { default as Option } from './common/Option/Option.mjs';
28
30
  export { default as BottomSheet } from './common/BottomSheet/BottomSheet.mjs';
29
31
  export { default as BaseCard } from './common/BaseCard/BaseCard.mjs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/build/main.css CHANGED
@@ -26203,6 +26203,192 @@ a[data-toggle="tooltip"] {
26203
26203
  .wds-container--fluid {
26204
26204
  max-inline-size: var(--wds-container-width-fluid);
26205
26205
  }
26206
+ .wds-card-container {
26207
+ --CardContainer-shadow: var(--CardContainer-theme-shadow, none);
26208
+ --CardContainer-background-color: var(--color-background-screen);
26209
+ --CardContainer-border-color: var(--color-border-neutral);
26210
+ --CardContainer-border-radius: var(--radius-large);
26211
+ --CardContainer-padding-block: var(--size-8);
26212
+ --CardContainer-padding-inline: var(--size-8);
26213
+ background-color: var(--CardContainer-background-color);
26214
+ border: 1px solid var(--CardContainer-border-color);
26215
+ border-radius: var(--CardContainer-border-radius);
26216
+ box-sizing: border-box;
26217
+ display: flex;
26218
+ flex-direction: column;
26219
+ padding-block: var(--CardContainer-padding-block);
26220
+ padding-inline: var(--CardContainer-padding-inline);
26221
+ inline-size: 100%;
26222
+ }
26223
+ @media (min-width: 840px) {
26224
+ .wds-card-container {
26225
+ --CardContainer-padding-block: var(--size-16);
26226
+ --CardContainer-padding-inline: var(--size-16);
26227
+ }
26228
+ }
26229
+ .wds-card-container--padding-none {
26230
+ --CardContainer-padding-block: 0px;
26231
+ --CardContainer-padding-inline: 0px;
26232
+ overflow: clip;
26233
+ }
26234
+ .wds-card-container--active {
26235
+ --CardContainer-background-color: var(--color-background-elevated);
26236
+ --CardContainer-border-color: color-mix(in srgb, var(--color-border-neutral) 25%, transparent);
26237
+ box-shadow: var(--CardContainer-shadow);
26238
+ }
26239
+ .wds-card-container--inactive {
26240
+ --CardContainer-background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
26241
+ border-width: 0;
26242
+ padding-block: calc(var(--CardContainer-padding-block) + 1px);
26243
+ padding-inline: calc(var(--CardContainer-padding-inline) + 1px);
26244
+ position: relative;
26245
+ }
26246
+ .wds-card-container--interactive:has(
26247
+ > a[href]:hover,
26248
+ > button:enabled:hover,
26249
+ > a[href]:focus-visible,
26250
+ > button:enabled:focus-visible
26251
+ ).wds-card-container--active {
26252
+ --CardContainer-border-color: color-mix(in srgb, var(--color-border-neutral) 75%, transparent);
26253
+ }
26254
+ .wds-card-container--interactive:has(
26255
+ > a[href]:hover,
26256
+ > button:enabled:hover,
26257
+ > a[href]:focus-visible,
26258
+ > button:enabled:focus-visible
26259
+ ).wds-card-container--inactive {
26260
+ --CardContainer-background-color: color-mix(in srgb, var(--color-background-neutral-hover) 25%, transparent);
26261
+ }
26262
+ .wds-card-container--interactive:has(> a[href]:active, > button:enabled:active).wds-card-container--active {
26263
+ --CardContainer-border-color: var(--color-border-neutral);
26264
+ }
26265
+ .wds-card-container--interactive:has(> a[href]:active, > button:enabled:active).wds-card-container--inactive {
26266
+ --CardContainer-background-color: color-mix(in srgb, var(--color-background-neutral-active) 25%, transparent);
26267
+ }
26268
+ .wds-card-container__border {
26269
+ container-type: size;
26270
+ inset: 0;
26271
+ pointer-events: none;
26272
+ position: absolute;
26273
+ }
26274
+ .wds-card-container__border svg {
26275
+ display: block;
26276
+ block-size: 100%;
26277
+ inline-size: 100%;
26278
+ }
26279
+ .wds-card-container__border rect {
26280
+ --CardContainer-border-dash-size: calc(var(--size-12) * 0.5);
26281
+ --CardContainer-border-stroke-radius: calc(min(var(--CardContainer-border-radius), 50cqh, 50cqw) - 0.5px);
26282
+ fill: none;
26283
+ block-size: calc(100% - 1px);
26284
+ rx: var(--CardContainer-border-stroke-radius);
26285
+ ry: var(--CardContainer-border-stroke-radius);
26286
+ stroke: var(--color-border-neutral);
26287
+ stroke-dasharray: var(--CardContainer-border-dash-size) var(--CardContainer-border-dash-size);
26288
+ inline-size: calc(100% - 1px);
26289
+ x: 0.5px;
26290
+ y: 0.5px;
26291
+ }
26292
+ /**
26293
+ * The active spotlight's resting shadow, only designed for the light themes. Set on every theme
26294
+ * root, as a nested ThemeProvider renders its own, so a card follows its nearest theme: a dark or
26295
+ * green provider inside a light one turns the shadow off.
26296
+ *
26297
+ * There is no shadow or elevation token in @transferwise/neptune-tokens, so the value is
26298
+ * component-scoped for now, the way PromoCard scopes `--Card-box-shadow`. It is the "Card Active
26299
+ * shadow" effect style from Figma: `#0e0f0c` at 4%, kept literal so it doesn't drift with a
26300
+ * theme's tokens. Collapses to a token reference once one is minted.
26301
+ */
26302
+ .np-theme-personal {
26303
+ --CardContainer-theme-shadow: 0 2px 12px rgba(14, 15, 12, 0.04), 0 2px 32px rgba(14, 15, 12, 0.04);
26304
+ }
26305
+ .np-theme-personal.np-theme-personal--dark,
26306
+ .np-theme-personal.np-theme-personal--bright-green,
26307
+ .np-theme-personal.np-theme-personal--forest-green,
26308
+ .np-theme-personal.np-theme-business--dark,
26309
+ .np-theme-personal.np-theme-business--bright-green,
26310
+ .np-theme-personal.np-theme-business--forest-green,
26311
+ .np-theme-personal.np-theme-platform--forest-green {
26312
+ --CardContainer-theme-shadow: none;
26313
+ }
26314
+ .wds-card-widget {
26315
+ --CardWidget-inset: var(--size-8);
26316
+ --CardWidget-header-spacing: var(--size-8);
26317
+ --CardWidget-actions-gap: var(--size-8);
26318
+ }
26319
+ .wds-card-widget__header {
26320
+ align-items: center;
26321
+ -moz-column-gap: var(--size-24);
26322
+ column-gap: var(--size-24);
26323
+ container-type: inline-size;
26324
+ display: flex;
26325
+ flex-wrap: wrap;
26326
+ padding-inline-start: var(--CardWidget-inset);
26327
+ row-gap: var(--size-8);
26328
+ }
26329
+ .wds-card-widget__header + .wds-card-widget__content {
26330
+ margin-block-start: var(--CardWidget-header-spacing);
26331
+ }
26332
+ .wds-card-widget__title {
26333
+ align-items: center;
26334
+ color: var(--color-content-secondary);
26335
+ display: grid;
26336
+ flex: 1 1 0;
26337
+ margin: 0;
26338
+ min-block-size: var(--size-32);
26339
+ }
26340
+ @container (width <= 360px) {
26341
+ .wds-card-widget__title {
26342
+ flex-basis: auto;
26343
+ }
26344
+ }
26345
+ .wds-card-widget__title-link.np-link {
26346
+ color: inherit;
26347
+ display: inline;
26348
+ font: inherit;
26349
+ justify-self: start;
26350
+ letter-spacing: inherit;
26351
+ text-align: start;
26352
+ -webkit-text-decoration: none;
26353
+ text-decoration: none;
26354
+ }
26355
+ .wds-card-widget__title-link.np-link:hover,
26356
+ .wds-card-widget__title-link.np-link:focus-visible {
26357
+ -webkit-text-decoration: underline;
26358
+ text-decoration: underline;
26359
+ }
26360
+ .wds-card-widget__title-link.np-link .tw-icon {
26361
+ display: inline-block;
26362
+ vertical-align: text-bottom;
26363
+ }
26364
+ .wds-card-widget__title-link.np-link .wds-card-widget__title-chevron {
26365
+ white-space: nowrap;
26366
+ }
26367
+ .wds-card-widget__title-link.np-link .wds-card-widget__title-chevron .tw-icon {
26368
+ margin: 0;
26369
+ }
26370
+ .wds-card-widget__actions {
26371
+ align-self: start;
26372
+ align-items: center;
26373
+ display: flex;
26374
+ flex: none;
26375
+ gap: var(--CardWidget-actions-gap);
26376
+ }
26377
+ .wds-card-widget--with-header .wds-card-widget__content {
26378
+ padding-inline: var(--CardWidget-inset);
26379
+ }
26380
+ .wds-card-widget:has(.wds-card-widget__title-link:hover, .wds-card-widget__title-link:focus-visible).wds-card-container--active {
26381
+ --CardContainer-border-color: color-mix(in srgb, var(--color-border-neutral) 75%, transparent);
26382
+ }
26383
+ .wds-card-widget:has(.wds-card-widget__title-link:hover, .wds-card-widget__title-link:focus-visible).wds-card-container--inactive {
26384
+ --CardContainer-background-color: color-mix(in srgb, var(--color-background-neutral-hover) 25%, transparent);
26385
+ }
26386
+ .wds-card-widget:has(.wds-card-widget__title-link:active).wds-card-container--active {
26387
+ --CardContainer-border-color: var(--color-border-neutral);
26388
+ }
26389
+ .wds-card-widget:has(.wds-card-widget__title-link:active).wds-card-container--inactive {
26390
+ --CardContainer-background-color: color-mix(in srgb, var(--color-background-neutral-active) 25%, transparent);
26391
+ }
26206
26392
  .critical-comms {
26207
26393
  border-radius: var(--radius-medium);
26208
26394
  overflow: hidden;
@@ -29190,6 +29376,14 @@ button.np-option {
29190
29376
  padding-inline: 0;
29191
29377
  container-type: inline-size;
29192
29378
  }
29379
+ .wds-list-item-paddingY-8 {
29380
+ padding-block: var(--size-8);
29381
+ padding-inline: 0;
29382
+ }
29383
+ .wds-list-item-paddingY-16 {
29384
+ padding-block: var(--size-16);
29385
+ padding-inline: 0;
29386
+ }
29193
29387
  .wds-list-item-paddingY-24 {
29194
29388
  padding-block: var(--size-24);
29195
29389
  padding-inline: 0;
@@ -0,0 +1,108 @@
1
+ .wds-card-container {
2
+ --CardContainer-shadow: var(--CardContainer-theme-shadow, none);
3
+ --CardContainer-background-color: var(--color-background-screen);
4
+ --CardContainer-border-color: var(--color-border-neutral);
5
+ --CardContainer-border-radius: var(--radius-large);
6
+ --CardContainer-padding-block: var(--size-8);
7
+ --CardContainer-padding-inline: var(--size-8);
8
+ background-color: var(--CardContainer-background-color);
9
+ border: 1px solid var(--CardContainer-border-color);
10
+ border-radius: var(--CardContainer-border-radius);
11
+ box-sizing: border-box;
12
+ display: flex;
13
+ flex-direction: column;
14
+ padding-block: var(--CardContainer-padding-block);
15
+ padding-inline: var(--CardContainer-padding-inline);
16
+ inline-size: 100%;
17
+ }
18
+ @media (min-width: 840px) {
19
+ .wds-card-container {
20
+ --CardContainer-padding-block: var(--size-16);
21
+ --CardContainer-padding-inline: var(--size-16);
22
+ }
23
+ }
24
+ .wds-card-container--padding-none {
25
+ --CardContainer-padding-block: 0px;
26
+ --CardContainer-padding-inline: 0px;
27
+ overflow: clip;
28
+ }
29
+ .wds-card-container--active {
30
+ --CardContainer-background-color: var(--color-background-elevated);
31
+ --CardContainer-border-color: color-mix(in srgb, var(--color-border-neutral) 25%, transparent);
32
+ box-shadow: var(--CardContainer-shadow);
33
+ }
34
+ .wds-card-container--inactive {
35
+ --CardContainer-background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
36
+ border-width: 0;
37
+ padding-block: calc(var(--CardContainer-padding-block) + 1px);
38
+ padding-inline: calc(var(--CardContainer-padding-inline) + 1px);
39
+ position: relative;
40
+ }
41
+ .wds-card-container--interactive:has(
42
+ > a[href]:hover,
43
+ > button:enabled:hover,
44
+ > a[href]:focus-visible,
45
+ > button:enabled:focus-visible
46
+ ).wds-card-container--active {
47
+ --CardContainer-border-color: color-mix(in srgb, var(--color-border-neutral) 75%, transparent);
48
+ }
49
+ .wds-card-container--interactive:has(
50
+ > a[href]:hover,
51
+ > button:enabled:hover,
52
+ > a[href]:focus-visible,
53
+ > button:enabled:focus-visible
54
+ ).wds-card-container--inactive {
55
+ --CardContainer-background-color: color-mix(in srgb, var(--color-background-neutral-hover) 25%, transparent);
56
+ }
57
+ .wds-card-container--interactive:has(> a[href]:active, > button:enabled:active).wds-card-container--active {
58
+ --CardContainer-border-color: var(--color-border-neutral);
59
+ }
60
+ .wds-card-container--interactive:has(> a[href]:active, > button:enabled:active).wds-card-container--inactive {
61
+ --CardContainer-background-color: color-mix(in srgb, var(--color-background-neutral-active) 25%, transparent);
62
+ }
63
+ .wds-card-container__border {
64
+ container-type: size;
65
+ inset: 0;
66
+ pointer-events: none;
67
+ position: absolute;
68
+ }
69
+ .wds-card-container__border svg {
70
+ display: block;
71
+ block-size: 100%;
72
+ inline-size: 100%;
73
+ }
74
+ .wds-card-container__border rect {
75
+ --CardContainer-border-dash-size: calc(var(--size-12) * 0.5);
76
+ --CardContainer-border-stroke-radius: calc(min(var(--CardContainer-border-radius), 50cqh, 50cqw) - 0.5px);
77
+ fill: none;
78
+ block-size: calc(100% - 1px);
79
+ rx: var(--CardContainer-border-stroke-radius);
80
+ ry: var(--CardContainer-border-stroke-radius);
81
+ stroke: var(--color-border-neutral);
82
+ stroke-dasharray: var(--CardContainer-border-dash-size) var(--CardContainer-border-dash-size);
83
+ inline-size: calc(100% - 1px);
84
+ x: 0.5px;
85
+ y: 0.5px;
86
+ }
87
+ /**
88
+ * The active spotlight's resting shadow, only designed for the light themes. Set on every theme
89
+ * root, as a nested ThemeProvider renders its own, so a card follows its nearest theme: a dark or
90
+ * green provider inside a light one turns the shadow off.
91
+ *
92
+ * There is no shadow or elevation token in @transferwise/neptune-tokens, so the value is
93
+ * component-scoped for now, the way PromoCard scopes `--Card-box-shadow`. It is the "Card Active
94
+ * shadow" effect style from Figma: `#0e0f0c` at 4%, kept literal so it doesn't drift with a
95
+ * theme's tokens. Collapses to a token reference once one is minted.
96
+ */
97
+ .np-theme-personal {
98
+ --CardContainer-theme-shadow: 0 2px 12px rgba(14, 15, 12, 0.04), 0 2px 32px rgba(14, 15, 12, 0.04);
99
+ }
100
+ .np-theme-personal.np-theme-personal--dark,
101
+ .np-theme-personal.np-theme-personal--bright-green,
102
+ .np-theme-personal.np-theme-personal--forest-green,
103
+ .np-theme-personal.np-theme-business--dark,
104
+ .np-theme-personal.np-theme-business--bright-green,
105
+ .np-theme-personal.np-theme-business--forest-green,
106
+ .np-theme-personal.np-theme-platform--forest-green {
107
+ --CardContainer-theme-shadow: none;
108
+ }
@@ -0,0 +1,78 @@
1
+ .wds-card-widget {
2
+ --CardWidget-inset: var(--size-8);
3
+ --CardWidget-header-spacing: var(--size-8);
4
+ --CardWidget-actions-gap: var(--size-8);
5
+ }
6
+ .wds-card-widget__header {
7
+ align-items: center;
8
+ -moz-column-gap: var(--size-24);
9
+ column-gap: var(--size-24);
10
+ container-type: inline-size;
11
+ display: flex;
12
+ flex-wrap: wrap;
13
+ padding-inline-start: var(--CardWidget-inset);
14
+ row-gap: var(--size-8);
15
+ }
16
+ .wds-card-widget__header + .wds-card-widget__content {
17
+ margin-block-start: var(--CardWidget-header-spacing);
18
+ }
19
+ .wds-card-widget__title {
20
+ align-items: center;
21
+ color: var(--color-content-secondary);
22
+ display: grid;
23
+ flex: 1 1 0;
24
+ margin: 0;
25
+ min-block-size: var(--size-32);
26
+ }
27
+ @container (width <= 360px) {
28
+ .wds-card-widget__title {
29
+ flex-basis: auto;
30
+ }
31
+ }
32
+ .wds-card-widget__title-link.np-link {
33
+ color: inherit;
34
+ display: inline;
35
+ font: inherit;
36
+ justify-self: start;
37
+ letter-spacing: inherit;
38
+ text-align: start;
39
+ -webkit-text-decoration: none;
40
+ text-decoration: none;
41
+ }
42
+ .wds-card-widget__title-link.np-link:hover,
43
+ .wds-card-widget__title-link.np-link:focus-visible {
44
+ -webkit-text-decoration: underline;
45
+ text-decoration: underline;
46
+ }
47
+ .wds-card-widget__title-link.np-link .tw-icon {
48
+ display: inline-block;
49
+ vertical-align: text-bottom;
50
+ }
51
+ .wds-card-widget__title-link.np-link .wds-card-widget__title-chevron {
52
+ white-space: nowrap;
53
+ }
54
+ .wds-card-widget__title-link.np-link .wds-card-widget__title-chevron .tw-icon {
55
+ margin: 0;
56
+ }
57
+ .wds-card-widget__actions {
58
+ align-self: start;
59
+ align-items: center;
60
+ display: flex;
61
+ flex: none;
62
+ gap: var(--CardWidget-actions-gap);
63
+ }
64
+ .wds-card-widget--with-header .wds-card-widget__content {
65
+ padding-inline: var(--CardWidget-inset);
66
+ }
67
+ .wds-card-widget:has(.wds-card-widget__title-link:hover, .wds-card-widget__title-link:focus-visible).wds-card-container--active {
68
+ --CardContainer-border-color: color-mix(in srgb, var(--color-border-neutral) 75%, transparent);
69
+ }
70
+ .wds-card-widget:has(.wds-card-widget__title-link:hover, .wds-card-widget__title-link:focus-visible).wds-card-container--inactive {
71
+ --CardContainer-background-color: color-mix(in srgb, var(--color-background-neutral-hover) 25%, transparent);
72
+ }
73
+ .wds-card-widget:has(.wds-card-widget__title-link:active).wds-card-container--active {
74
+ --CardContainer-border-color: var(--color-border-neutral);
75
+ }
76
+ .wds-card-widget:has(.wds-card-widget__title-link:active).wds-card-container--inactive {
77
+ --CardContainer-background-color: color-mix(in srgb, var(--color-background-neutral-active) 25%, transparent);
78
+ }
@@ -391,6 +391,14 @@
391
391
  padding-inline: 0;
392
392
  container-type: inline-size;
393
393
  }
394
+ .wds-list-item-paddingY-8 {
395
+ padding-block: var(--size-8);
396
+ padding-inline: 0;
397
+ }
398
+ .wds-list-item-paddingY-16 {
399
+ padding-block: var(--size-16);
400
+ padding-inline: 0;
401
+ }
394
402
  .wds-list-item-paddingY-24 {
395
403
  padding-block: var(--size-24);
396
404
  padding-inline: 0;