@transferwise/components 46.107.0 → 46.108.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/header/Header.js +1 -0
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +1 -0
- package/build/header/Header.mjs.map +1 -1
- package/build/link/Link.js +6 -2
- package/build/link/Link.js.map +1 -1
- package/build/link/Link.mjs +6 -2
- package/build/link/Link.mjs.map +1 -1
- package/build/listItem/ListItem.js +20 -8
- package/build/listItem/ListItem.js.map +1 -1
- package/build/listItem/ListItem.mjs +20 -8
- 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 -3
- package/build/listItem/Navigation/ListItemNavigation.js.map +1 -1
- package/build/listItem/Navigation/ListItemNavigation.mjs +2 -4
- package/build/listItem/Navigation/ListItemNavigation.mjs.map +1 -1
- package/build/listItem/Prompt/InlinePrompt/InlinePrompt.js +74 -0
- package/build/listItem/Prompt/InlinePrompt/InlinePrompt.js.map +1 -0
- package/build/listItem/Prompt/InlinePrompt/InlinePrompt.mjs +72 -0
- package/build/listItem/Prompt/InlinePrompt/InlinePrompt.mjs.map +1 -0
- package/build/listItem/Prompt/ListItemPrompt.js +10 -15
- package/build/listItem/Prompt/ListItemPrompt.js.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.mjs +11 -16
- package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -1
- package/build/main.css +94 -74
- package/build/styles/link/Link.css +7 -0
- package/build/styles/listItem/ListItem.css +87 -74
- package/build/styles/listItem/Prompt/InlinePrompt/InlinePrompt.css +153 -0
- package/build/styles/listItem/Prompt/ListItemPrompt.css +72 -72
- package/build/styles/main.css +94 -74
- package/build/types/header/Header.d.ts +1 -0
- package/build/types/header/Header.d.ts.map +1 -1
- package/build/types/link/Link.d.ts +1 -1
- package/build/types/link/Link.d.ts.map +1 -1
- package/build/types/listItem/ListItem.d.ts +10 -1
- package/build/types/listItem/ListItem.d.ts.map +1 -1
- package/build/types/listItem/ListItemContext.d.ts +2 -1
- package/build/types/listItem/ListItemContext.d.ts.map +1 -1
- package/build/types/listItem/Navigation/ListItemNavigation.d.ts.map +1 -1
- package/build/types/listItem/Prompt/InlinePrompt/InlinePrompt.d.ts +15 -0
- package/build/types/listItem/Prompt/InlinePrompt/InlinePrompt.d.ts.map +1 -0
- package/build/types/listItem/Prompt/InlinePrompt/index.d.ts +3 -0
- package/build/types/listItem/Prompt/InlinePrompt/index.d.ts.map +1 -0
- package/build/types/listItem/Prompt/ListItemPrompt.d.ts +4 -6
- package/build/types/listItem/Prompt/ListItemPrompt.d.ts.map +1 -1
- package/build/types/listItem/_stories/helpers.d.ts.map +1 -1
- package/build/types/listItem/_stories/subcomponents.d.ts +1 -0
- package/build/types/listItem/_stories/subcomponents.d.ts.map +1 -1
- package/build/types/listItem/useListItemControl.d.ts +1 -1
- package/package.json +4 -4
- package/src/header/Header.story.tsx +14 -0
- package/src/header/Header.tsx +2 -0
- package/src/link/Link.css +7 -0
- package/src/link/Link.less +8 -0
- package/src/link/Link.spec.tsx +28 -0
- package/src/link/Link.story.tsx +72 -16
- package/src/link/Link.tsx +5 -1
- package/src/listItem/ListItem.css +87 -74
- package/src/listItem/ListItem.less +19 -4
- package/src/listItem/ListItem.spec.tsx +33 -0
- package/src/listItem/ListItem.tsx +38 -12
- package/src/listItem/ListItemContext.tsx +2 -1
- package/src/listItem/Navigation/ListItemNavigation.spec.tsx +1 -10
- package/src/listItem/Navigation/ListItemNavigation.story.tsx +0 -22
- package/src/listItem/Navigation/ListItemNavigation.tsx +2 -3
- package/src/listItem/Prompt/InlinePrompt/InlinePrompt.css +153 -0
- package/src/listItem/Prompt/InlinePrompt/InlinePrompt.less +162 -0
- package/src/listItem/Prompt/InlinePrompt/InlinePrompt.spec.tsx +66 -0
- package/src/listItem/Prompt/InlinePrompt/InlinePrompt.tsx +56 -0
- package/src/listItem/Prompt/InlinePrompt/index.ts +2 -0
- package/src/listItem/Prompt/ListItemPrompt.css +72 -72
- package/src/listItem/Prompt/ListItemPrompt.less +2 -130
- package/src/listItem/Prompt/ListItemPrompt.spec.tsx +36 -0
- package/src/listItem/Prompt/ListItemPrompt.story.tsx +4 -2
- package/src/listItem/Prompt/ListItemPrompt.tsx +14 -14
- package/src/listItem/_stories/ListItem.disabled.story.tsx +433 -0
- package/src/listItem/_stories/ListItem.story.tsx +1 -177
- package/src/listItem/_stories/helpers.tsx +1 -0
- package/src/listItem/_stories/subcomponents.tsx +5 -0
- package/src/main.css +94 -74
|
@@ -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 { 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'\n | 'navigation'\n | 'radio'\n | 'checkbox'\n | 'switch'\n | 'button'\n | 'icon-button';\n\nexport type ListItemControlProps =\n | ListItemNavigationProps\n | ListItemCheckboxProps\n | ListItemButtonProps\n | ListItemIconButtonProps\n | ListItemRadioProps\n | ListItemSwitchProps;\n\nexport type ListItemProps = {\n as?: 'li' | 'div';\n /**\n * Swaps vertical hierarchy of title and subtitle and their corresponding right values.\n */\n inverted?: boolean;\n disabled?: boolean;\n /**\n * Highlights the list item as an action to be taken or already taken. <br />\n */\n spotlight?: 'active' | 'inactive';\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 */\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://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 valueTitle,\n valueSubtitle,\n control = null,\n disabled,\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 ? { 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\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 }, [isFullyInteractive]);\n\n const listItemContext = useMemo(\n () => ({\n setControlType,\n setControlProps,\n setMediaSize,\n ids,\n props: { disabled, inverted },\n mediaSize,\n describedByIds,\n }),\n [describedByIds, mediaSize],\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 hasControl = Boolean(control);\n const hasInfo = Boolean(additionalInfo);\n const hasPrompt = Boolean(prompt);\n\n /* eslint-disable functional/immutable-data */\n if (hasMedia && hasControl) {\n partials.push('wds-list-item-hasMedia-hasControl');\n }\n\n if (hasMedia && !hasControl) {\n partials.push('wds-list-item-hasMedia-noControl');\n }\n\n if (!hasMedia && hasControl) {\n partials.push('wds-list-item-noMedia-hasControl');\n }\n\n if (!hasMedia && !hasControl) {\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 disabled,\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 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<ListItemProps, 'subtitle' | 'additionalInfo' | 'disabled' | 'prompt' | 'className'>;\n\nfunction View({\n children,\n additionalInfo,\n prompt,\n disabled,\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 <>\n {additionalInfo}\n {prompt}\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 d-flex flex-row', {\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={clsx('wds-list-item-view d-flex flex-row')}>{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","valueTitle","valueSubtitle","control","disabled","className","valueColumnWidth","id","idPrefix","useId","controlProps","setControlProps","useState","controlType","setControlType","mediaSize","setMediaSize","ids","isPartiallyInteractive","Boolean","partiallyInteractive","isFullyInteractive","isButtonAsLink","href","titlesAndValues","join","additionalInfoPrompt","filter","describedByIds","useMemo","listItemContext","props","gridColumnsStyle","getFeatureClassName","partials","hasMedia","hasControl","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","_Fragment","PrimitiveAnchor","target","fullyInteractive","onClick","InputWrapper","htmlFor","clickable","Image","AvatarView","AvatarLayout","AdditionalInfo","Checkbox","Radio","IconButton","Navigation","Button","Switch","Prompt"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoGO,MAAMA,QAAQ,GAAGA,CAAC;EACvBC,EAAE,EAAEC,eAAe,GAAG,IAAI;EAC1BC,KAAK;EACLC,QAAQ;EACRC,cAAc;EACdC,MAAM;EACNC,QAAQ;EACRC,KAAK;EACLC,SAAS;EACTC,UAAU;EACVC,aAAa;AACbC,EAAAA,OAAO,GAAG,IAAI;EACdC,QAAQ;EACRC,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,MAAMK,GAAG,GAA+B;IACtCvB,KAAK,EAAE,CA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D,WAAW,KAAK,OAAO,GAAG,KAAK,GAAG,UAAU;EACjE,oBACEgC,IAAA,CAACsB,YAAY,EAAA;AAAC9D,IAAAA,SAAS,EAAEyC,IAAI,CAAC,2BAA2B,EAAEzC,SAAS,CAAE;AAAAuC,IAAAA,QAAA,gBACpEJ,GAAA,CAAA,OAAA,EAAA;MACE4B,OAAO,EAAEnD,GAAG,CAACd,OAAQ;AACrBE,MAAAA,SAAS,EAAEyC,IAAI,CAAC,oBAAoB,EAAE;QACpCuB,SAAS,EAAE,CAACjE,QAAQ;AACpB6D,QAAAA,gBAAgB,EAAE,CAAC/C;AACpB,OAAA,CAAE;AAAA0B,MAAAA,QAAA,EAEFA;AAAQ,KACJ,CAEP,EAACiB,YAAY,EAAE;AAAA,GACH,CAAC;AAEnB;AAEAtE,QAAQ,CAAC+E,KAAK,GAAGA,KAAK;AACtB/E,QAAQ,CAACgF,UAAU,GAAGA,UAAU;AAChChF,QAAQ,CAACiF,YAAY,GAAGA,YAAY;AACpCjF,QAAQ,CAACkF,cAAc,GAAGA,cAAc;AACxClF,QAAQ,CAACmF,QAAQ,GAAGA,QAAQ;AAC5BnF,QAAQ,CAACoF,KAAK,GAAGA,KAAK;AACtBpF,QAAQ,CAACqF,UAAU,GAAGA,UAAU;AAChCrF,QAAQ,CAACsF,UAAU,GAAGA,UAAU;AAChCtF,QAAQ,CAACuF,MAAM,GAAGA,MAAM;AACxBvF,QAAQ,CAACwF,MAAM,GAAGA,MAAM;AACxBxF,QAAQ,CAACyF,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'\n | 'navigation'\n | 'radio'\n | 'checkbox'\n | 'switch'\n | 'button'\n | 'icon-button';\n\nexport type ListItemControlProps =\n | ListItemNavigationProps\n | ListItemCheckboxProps\n | ListItemButtonProps\n | ListItemIconButtonProps\n | ListItemRadioProps\n | ListItemSwitchProps;\n\nexport type ListItemProps = {\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 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 */\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://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 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\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 }, [isFullyInteractive]);\n\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],\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 hasControl = Boolean(control);\n const hasInfo = Boolean(additionalInfo);\n const hasPrompt = Boolean(prompt) || (disabled && Boolean(disabledPromptMessage));\n\n /* eslint-disable functional/immutable-data */\n if (hasMedia && hasControl) {\n partials.push('wds-list-item-hasMedia-hasControl');\n }\n\n if (hasMedia && !hasControl) {\n partials.push('wds-list-item-hasMedia-noControl');\n }\n\n if (!hasMedia && hasControl) {\n partials.push('wds-list-item-noMedia-hasControl');\n }\n\n if (!hasMedia && !hasControl) {\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 disabled: disabled && !isPartiallyInteractive,\n 'disabled--has-prompt-reason': !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 d-flex flex-row', {\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={clsx('wds-list-item-view d-flex flex-row')}>{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","valueTitle","valueSubtitle","control","disabled","disabledPromptMessage","className","valueColumnWidth","id","idPrefix","useId","controlProps","setControlProps","useState","controlType","setControlType","mediaSize","setMediaSize","ids","isPartiallyInteractive","Boolean","partiallyInteractive","isFullyInteractive","isButtonAsLink","href","titlesAndValues","join","additionalInfoPrompt","filter","describedByIds","useMemo","listItemContext","props","gridColumnsStyle","getFeatureClassName","partials","hasMedia","hasControl","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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6GO,MAAMA,QAAQ,GAAGA,CAAC;EACvBC,EAAE,EAAEC,eAAe,GAAG,IAAI;EAC1BC,KAAK;EACLC,QAAQ;EACRC,cAAc;EACdC,MAAM;EACNC,QAAQ;EACRC,KAAK;EACLC,SAAS;EACTC,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,MAAMK,GAAG,GAA+B;IACtCxB,KAAK,EAAE,CAAA,EAAGe,QAAQ,CAAA,MAAA,CAAQ;AAC1B,IAAA,IAAId,QAAQ,GAAG;MAAE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;AAChC5F,QAAQ,CAAC6F,MAAM,GAAGA,MAAM;AACxB7F,QAAQ,CAAC8F,MAAM,GAAGA,MAAM;AACxB9F,QAAQ,CAACyE,MAAM,GAAGA,MAAM;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemContext.js","sources":["../../src/listItem/ListItemContext.tsx"],"sourcesContent":["import { createContext } from 'react';\nimport type { ListItemTypes, ListItemControlProps, ListItemProps } from './ListItem';\n\nexport type ListItemMediaSize = 32 | 40 | 48 | 56 | 72;\n\nexport type ListItemContextData = {\n setControlType: (type: ListItemTypes) => void;\n setControlProps: (props: ListItemControlProps) => void;\n setMediaSize: (size: ListItemMediaSize | undefined) => void;\n ids: {\n title: string;\n subtitle?: string;\n valueTitle?: string;\n valueSubtitle?: string;\n additionalInfo?: string;\n control: string;\n prompt?: string;\n };\n props: Pick<ListItemProps, 'disabled' | 'inverted'>;\n mediaSize?: ListItemMediaSize;\n describedByIds: string;\n};\n\nexport const ListItemContext = createContext<ListItemContextData>(\n null as unknown as ListItemContextData,\n);\n"],"names":["ListItemContext","createContext"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"ListItemContext.js","sources":["../../src/listItem/ListItemContext.tsx"],"sourcesContent":["import { createContext } from 'react';\nimport type { ListItemTypes, ListItemControlProps, ListItemProps } from './ListItem';\n\nexport type ListItemMediaSize = 32 | 40 | 48 | 56 | 72;\n\nexport type ListItemContextData = {\n setControlType: (type: ListItemTypes) => void;\n setControlProps: (props: ListItemControlProps) => void;\n setMediaSize: (size: ListItemMediaSize | undefined) => void;\n ids: {\n title: string;\n subtitle?: string;\n valueTitle?: string;\n valueSubtitle?: string;\n additionalInfo?: string;\n control: string;\n prompt?: string;\n };\n props: Pick<ListItemProps, 'disabled' | 'inverted' | 'disabledPromptMessage'>;\n mediaSize?: ListItemMediaSize;\n isPartiallyInteractive?: boolean;\n describedByIds: string;\n};\n\nexport const ListItemContext = createContext<ListItemContextData>(\n null as unknown as ListItemContextData,\n);\n"],"names":["ListItemContext","createContext"],"mappings":";;;;MAwBaA,eAAe,gBAAGC,mBAAa,CAC1C,IAAsC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemContext.mjs","sources":["../../src/listItem/ListItemContext.tsx"],"sourcesContent":["import { createContext } from 'react';\nimport type { ListItemTypes, ListItemControlProps, ListItemProps } from './ListItem';\n\nexport type ListItemMediaSize = 32 | 40 | 48 | 56 | 72;\n\nexport type ListItemContextData = {\n setControlType: (type: ListItemTypes) => void;\n setControlProps: (props: ListItemControlProps) => void;\n setMediaSize: (size: ListItemMediaSize | undefined) => void;\n ids: {\n title: string;\n subtitle?: string;\n valueTitle?: string;\n valueSubtitle?: string;\n additionalInfo?: string;\n control: string;\n prompt?: string;\n };\n props: Pick<ListItemProps, 'disabled' | 'inverted'>;\n mediaSize?: ListItemMediaSize;\n describedByIds: string;\n};\n\nexport const ListItemContext = createContext<ListItemContextData>(\n null as unknown as ListItemContextData,\n);\n"],"names":["ListItemContext","createContext"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ListItemContext.mjs","sources":["../../src/listItem/ListItemContext.tsx"],"sourcesContent":["import { createContext } from 'react';\nimport type { ListItemTypes, ListItemControlProps, ListItemProps } from './ListItem';\n\nexport type ListItemMediaSize = 32 | 40 | 48 | 56 | 72;\n\nexport type ListItemContextData = {\n setControlType: (type: ListItemTypes) => void;\n setControlProps: (props: ListItemControlProps) => void;\n setMediaSize: (size: ListItemMediaSize | undefined) => void;\n ids: {\n title: string;\n subtitle?: string;\n valueTitle?: string;\n valueSubtitle?: string;\n additionalInfo?: string;\n control: string;\n prompt?: string;\n };\n props: Pick<ListItemProps, 'disabled' | 'inverted' | 'disabledPromptMessage'>;\n mediaSize?: ListItemMediaSize;\n isPartiallyInteractive?: boolean;\n describedByIds: string;\n};\n\nexport const ListItemContext = createContext<ListItemContextData>(\n null as unknown as ListItemContextData,\n);\n"],"names":["ListItemContext","createContext"],"mappings":";;MAwBaA,eAAe,gBAAGC,aAAa,CAC1C,IAAsC;;;;"}
|
|
@@ -25,12 +25,10 @@ const Navigation = function Navigation({
|
|
|
25
25
|
const icon = /*#__PURE__*/jsxRuntime.jsx(icons.ChevronRight, {
|
|
26
26
|
size: 16
|
|
27
27
|
});
|
|
28
|
-
if (baseItemProps.disabled) return /*#__PURE__*/jsxRuntime.jsx(icons.BackslashCircle, {
|
|
29
|
-
size: 24
|
|
30
|
-
});
|
|
31
28
|
return href ? /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
32
29
|
children: icon
|
|
33
30
|
}) : /*#__PURE__*/jsxRuntime.jsx(PrimitiveButton.default, {
|
|
31
|
+
disabled: baseItemProps.disabled,
|
|
34
32
|
"aria-describedby": describedByIds,
|
|
35
33
|
id: ids.control,
|
|
36
34
|
className: "btn-unstyled wds-list-item-control",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemNavigation.js","sources":["../../../src/listItem/Navigation/ListItemNavigation.tsx"],"sourcesContent":["import { ChevronRight
|
|
1
|
+
{"version":3,"file":"ListItemNavigation.js","sources":["../../../src/listItem/Navigation/ListItemNavigation.tsx"],"sourcesContent":["import { ChevronRight } 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 icon = <ChevronRight size={16} />;\n\n return href ? (\n <>{icon}</>\n ) : (\n <PrimitiveButton\n disabled={baseItemProps.disabled}\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","icon","_jsx","ChevronRight","size","_Fragment","children","PrimitiveButton","disabled","id","control","className","onClick","displayName"],"mappings":";;;;;;;;;;AAiBO,MAAMA,UAAU,GAAG,SAASA,UAAUA,CAAC;EAAEC,IAAI;EAAE,GAAGC;AAAK,CAA2B,EAAA;EACvF,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,IAAI,gBAAGC,cAAA,CAACC,kBAAY,EAAA;AAACC,IAAAA,IAAI,EAAE;AAAG,GAAA,CAAG;AAEvC,EAAA,OAAOX,IAAI,gBACTS,cAAA,CAAAG,mBAAA,EAAA;AAAAC,IAAAA,QAAA,EAAGL;AAAI,GAAC,CAAG,gBAEXC,cAAA,CAACK,uBAAe,EAAA;IACdC,QAAQ,EAAEb,aAAa,CAACa,QAAS;AACjC,IAAA,kBAAA,EAAkBV,cAAe;IACjCW,EAAE,EAAEZ,GAAG,CAACa,OAAQ;AAChBC,IAAAA,SAAS,EAAC,oCAAoC;IAC9CC,OAAO,EAAElB,KAAK,CAACkB,OAAkE;AAAAN,IAAAA,QAAA,EAEhFL;AAAI,GACU,CAClB;AACH;AAEAT,UAAU,CAACqB,WAAW,GAAG,qBAAqB;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChevronRight } from '@transferwise/icons';
|
|
2
2
|
import { useListItemControl } from '../useListItemControl.mjs';
|
|
3
3
|
import PrimitiveButton from '../../primitives/PrimitiveButton/PrimitiveButton.mjs';
|
|
4
4
|
import '../../primitives/PrimitiveAnchor/PrimitiveAnchor.mjs';
|
|
@@ -23,12 +23,10 @@ const Navigation = function Navigation({
|
|
|
23
23
|
const icon = /*#__PURE__*/jsx(ChevronRight, {
|
|
24
24
|
size: 16
|
|
25
25
|
});
|
|
26
|
-
if (baseItemProps.disabled) return /*#__PURE__*/jsx(BackslashCircle, {
|
|
27
|
-
size: 24
|
|
28
|
-
});
|
|
29
26
|
return href ? /*#__PURE__*/jsx(Fragment, {
|
|
30
27
|
children: icon
|
|
31
28
|
}) : /*#__PURE__*/jsx(PrimitiveButton, {
|
|
29
|
+
disabled: baseItemProps.disabled,
|
|
32
30
|
"aria-describedby": describedByIds,
|
|
33
31
|
id: ids.control,
|
|
34
32
|
className: "btn-unstyled wds-list-item-control",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemNavigation.mjs","sources":["../../../src/listItem/Navigation/ListItemNavigation.tsx"],"sourcesContent":["import { ChevronRight
|
|
1
|
+
{"version":3,"file":"ListItemNavigation.mjs","sources":["../../../src/listItem/Navigation/ListItemNavigation.tsx"],"sourcesContent":["import { ChevronRight } 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 icon = <ChevronRight size={16} />;\n\n return href ? (\n <>{icon}</>\n ) : (\n <PrimitiveButton\n disabled={baseItemProps.disabled}\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","icon","_jsx","ChevronRight","size","_Fragment","children","PrimitiveButton","disabled","id","control","className","onClick","displayName"],"mappings":";;;;;;;;AAiBO,MAAMA,UAAU,GAAG,SAASA,UAAUA,CAAC;EAAEC,IAAI;EAAE,GAAGC;AAAK,CAA2B,EAAA;EACvF,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,IAAI,gBAAGC,GAAA,CAACC,YAAY,EAAA;AAACC,IAAAA,IAAI,EAAE;AAAG,GAAA,CAAG;AAEvC,EAAA,OAAOX,IAAI,gBACTS,GAAA,CAAAG,QAAA,EAAA;AAAAC,IAAAA,QAAA,EAAGL;AAAI,GAAC,CAAG,gBAEXC,GAAA,CAACK,eAAe,EAAA;IACdC,QAAQ,EAAEb,aAAa,CAACa,QAAS;AACjC,IAAA,kBAAA,EAAkBV,cAAe;IACjCW,EAAE,EAAEZ,GAAG,CAACa,OAAQ;AAChBC,IAAAA,SAAS,EAAC,oCAAoC;IAC9CC,OAAO,EAAElB,KAAK,CAACkB,OAAkE;AAAAN,IAAAA,QAAA,EAEhFL;AAAI,GACU,CAClB;AACH;AAEAT,UAAU,CAACqB,WAAW,GAAG,qBAAqB;;;;"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('../../../common/theme.js');
|
|
4
|
+
require('../../../common/direction.js');
|
|
5
|
+
require('../../../common/propsValues/control.js');
|
|
6
|
+
require('../../../common/propsValues/breakpoint.js');
|
|
7
|
+
require('../../../common/propsValues/size.js');
|
|
8
|
+
require('../../../common/propsValues/typography.js');
|
|
9
|
+
require('../../../common/propsValues/width.js');
|
|
10
|
+
require('../../../common/propsValues/type.js');
|
|
11
|
+
require('../../../common/propsValues/dateMode.js');
|
|
12
|
+
require('../../../common/propsValues/monthFormat.js');
|
|
13
|
+
require('../../../common/propsValues/position.js');
|
|
14
|
+
require('../../../common/propsValues/layouts.js');
|
|
15
|
+
require('../../../common/propsValues/status.js');
|
|
16
|
+
var sentiment = require('../../../common/propsValues/sentiment.js');
|
|
17
|
+
require('../../../common/propsValues/profileType.js');
|
|
18
|
+
require('../../../common/propsValues/variant.js');
|
|
19
|
+
require('../../../common/propsValues/scroll.js');
|
|
20
|
+
require('../../../common/propsValues/markdownNodeType.js');
|
|
21
|
+
require('../../../common/fileType.js');
|
|
22
|
+
var icons = require('@transferwise/icons');
|
|
23
|
+
var clsx = require('clsx');
|
|
24
|
+
require('react');
|
|
25
|
+
require('react-intl');
|
|
26
|
+
require('../../../common/closeButton/CloseButton.messages.js');
|
|
27
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
28
|
+
var ProcessIndicator = require('../../../processIndicator/ProcessIndicator.js');
|
|
29
|
+
var StatusIcon = require('../../../statusIcon/StatusIcon.js');
|
|
30
|
+
var Body = require('../../../body/Body.js');
|
|
31
|
+
|
|
32
|
+
const InlinePrompt = ({
|
|
33
|
+
sentiment: sentiment$1 = sentiment.Sentiment.POSITIVE,
|
|
34
|
+
muted = false,
|
|
35
|
+
loading = false,
|
|
36
|
+
className,
|
|
37
|
+
children,
|
|
38
|
+
...rest
|
|
39
|
+
}) => {
|
|
40
|
+
const renderMedia = () => {
|
|
41
|
+
if (muted) {
|
|
42
|
+
return /*#__PURE__*/jsxRuntime.jsx(icons.BackslashCircle, {
|
|
43
|
+
size: 16,
|
|
44
|
+
"data-testid": "InlinePrompt_Muted"
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
if (loading) {
|
|
48
|
+
return /*#__PURE__*/jsxRuntime.jsx(ProcessIndicator.default, {
|
|
49
|
+
"data-testid": "InlinePrompt_ProcessIndicator",
|
|
50
|
+
size: "xxs"
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return /*#__PURE__*/jsxRuntime.jsx(StatusIcon.default, {
|
|
54
|
+
size: 16,
|
|
55
|
+
sentiment: sentiment$1
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
59
|
+
className: clsx.clsx('wds-inline-prompt', `wds-inline-prompt--${sentiment$1}`, {
|
|
60
|
+
'wds-inline-prompt--muted': muted,
|
|
61
|
+
'wds-inline-prompt--loading': loading
|
|
62
|
+
}, className),
|
|
63
|
+
...rest,
|
|
64
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
65
|
+
className: "wds-inline-prompt__media-wrapper",
|
|
66
|
+
children: renderMedia()
|
|
67
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Body.default, {
|
|
68
|
+
children: children
|
|
69
|
+
})]
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
exports.InlinePrompt = InlinePrompt;
|
|
74
|
+
//# sourceMappingURL=InlinePrompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlinePrompt.js","sources":["../../../../src/listItem/Prompt/InlinePrompt/InlinePrompt.tsx"],"sourcesContent":["import { Sentiment } from '../../../common';\nimport { BackslashCircle } from '@transferwise/icons';\nimport ProcessIndicator from '../../../processIndicator';\nimport StatusIcon from '../../../statusIcon';\nimport { clsx } from 'clsx';\nimport Body from '../../../body';\n\nexport type InlinePromptProps = {\n sentiment?: `${Sentiment.POSITIVE | Sentiment.NEGATIVE | Sentiment.NEUTRAL | Sentiment.WARNING}`;\n loading?: boolean;\n /**\n * Use for short-lived inline prompts to avoid swap of the icon (which is bad UX for short-lived prompts, e.g. when submit form)\n */\n muted?: boolean;\n id?: string;\n className?: string;\n 'data-testid'?: string;\n children: React.ReactNode;\n};\n\nexport const InlinePrompt = ({\n sentiment = Sentiment.POSITIVE,\n muted = false,\n loading = false,\n className,\n children,\n ...rest\n}: InlinePromptProps) => {\n const renderMedia = () => {\n if (muted) {\n return <BackslashCircle size={16} data-testid=\"InlinePrompt_Muted\" />;\n }\n if (loading) {\n return <ProcessIndicator data-testid=\"InlinePrompt_ProcessIndicator\" size=\"xxs\" />;\n }\n return <StatusIcon size={16} sentiment={sentiment} />;\n };\n\n return (\n <div\n className={clsx(\n 'wds-inline-prompt',\n `wds-inline-prompt--${sentiment}`,\n {\n 'wds-inline-prompt--muted': muted,\n 'wds-inline-prompt--loading': loading,\n },\n className,\n )}\n {...rest}\n >\n <div className=\"wds-inline-prompt__media-wrapper\">{renderMedia()}</div>\n <Body>{children}</Body>\n </div>\n );\n};\n"],"names":["InlinePrompt","sentiment","Sentiment","POSITIVE","muted","loading","className","children","rest","renderMedia","_jsx","BackslashCircle","size","ProcessIndicator","StatusIcon","_jsxs","clsx","Body"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBO,MAAMA,YAAY,GAAGA,CAAC;aAC3BC,WAAS,GAAGC,mBAAS,CAACC,QAAQ;AAC9BC,EAAAA,KAAK,GAAG,KAAK;AACbC,EAAAA,OAAO,GAAG,KAAK;EACfC,SAAS;EACTC,QAAQ;EACR,GAAGC;AAAI,CACW,KAAI;EACtB,MAAMC,WAAW,GAAGA,MAAK;AACvB,IAAA,IAAIL,KAAK,EAAE;MACT,oBAAOM,cAAA,CAACC,qBAAe,EAAA;AAACC,QAAAA,IAAI,EAAE,EAAG;QAAC,aAAA,EAAY;AAAoB,QAAG;AACvE,IAAA;AACA,IAAA,IAAIP,OAAO,EAAE;MACX,oBAAOK,cAAA,CAACG,wBAAgB,EAAA;AAAC,QAAA,aAAA,EAAY,+BAA+B;AAACD,QAAAA,IAAI,EAAC;AAAK,OAAA,CAAG;AACpF,IAAA;IACA,oBAAOF,cAAA,CAACI,kBAAU,EAAA;AAACF,MAAAA,IAAI,EAAE,EAAG;AAACX,MAAAA,SAAS,EAAEA;AAAU,MAAG;EACvD,CAAC;AAED,EAAA,oBACEc,eAAA,CAAA,KAAA,EAAA;IACET,SAAS,EAAEU,SAAI,CACb,mBAAmB,EACnB,CAAA,mBAAA,EAAsBf,WAAS,EAAE,EACjC;AACE,MAAA,0BAA0B,EAAEG,KAAK;AACjC,MAAA,4BAA4B,EAAEC;KAC/B,EACDC,SAAS,CACT;AAAA,IAAA,GACEE,IAAI;AAAAD,IAAAA,QAAA,gBAERG,cAAA,CAAA,KAAA,EAAA;AAAKJ,MAAAA,SAAS,EAAC,kCAAkC;MAAAC,QAAA,EAAEE,WAAW;AAAE,KAAM,CACtE,eAAAC,cAAA,CAACO,YAAI,EAAA;AAAAV,MAAAA,QAAA,EAAEA;AAAQ,KAAO,CACxB;AAAA,GAAK,CAAC;AAEV;;;;"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import '../../../common/theme.mjs';
|
|
2
|
+
import '../../../common/direction.mjs';
|
|
3
|
+
import '../../../common/propsValues/control.mjs';
|
|
4
|
+
import '../../../common/propsValues/breakpoint.mjs';
|
|
5
|
+
import '../../../common/propsValues/size.mjs';
|
|
6
|
+
import '../../../common/propsValues/typography.mjs';
|
|
7
|
+
import '../../../common/propsValues/width.mjs';
|
|
8
|
+
import '../../../common/propsValues/type.mjs';
|
|
9
|
+
import '../../../common/propsValues/dateMode.mjs';
|
|
10
|
+
import '../../../common/propsValues/monthFormat.mjs';
|
|
11
|
+
import '../../../common/propsValues/position.mjs';
|
|
12
|
+
import '../../../common/propsValues/layouts.mjs';
|
|
13
|
+
import '../../../common/propsValues/status.mjs';
|
|
14
|
+
import { Sentiment } from '../../../common/propsValues/sentiment.mjs';
|
|
15
|
+
import '../../../common/propsValues/profileType.mjs';
|
|
16
|
+
import '../../../common/propsValues/variant.mjs';
|
|
17
|
+
import '../../../common/propsValues/scroll.mjs';
|
|
18
|
+
import '../../../common/propsValues/markdownNodeType.mjs';
|
|
19
|
+
import '../../../common/fileType.mjs';
|
|
20
|
+
import { BackslashCircle } from '@transferwise/icons';
|
|
21
|
+
import { clsx } from 'clsx';
|
|
22
|
+
import 'react';
|
|
23
|
+
import 'react-intl';
|
|
24
|
+
import '../../../common/closeButton/CloseButton.messages.mjs';
|
|
25
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
26
|
+
import ProcessIndicator from '../../../processIndicator/ProcessIndicator.mjs';
|
|
27
|
+
import StatusIcon from '../../../statusIcon/StatusIcon.mjs';
|
|
28
|
+
import Body from '../../../body/Body.mjs';
|
|
29
|
+
|
|
30
|
+
const InlinePrompt = ({
|
|
31
|
+
sentiment = Sentiment.POSITIVE,
|
|
32
|
+
muted = false,
|
|
33
|
+
loading = false,
|
|
34
|
+
className,
|
|
35
|
+
children,
|
|
36
|
+
...rest
|
|
37
|
+
}) => {
|
|
38
|
+
const renderMedia = () => {
|
|
39
|
+
if (muted) {
|
|
40
|
+
return /*#__PURE__*/jsx(BackslashCircle, {
|
|
41
|
+
size: 16,
|
|
42
|
+
"data-testid": "InlinePrompt_Muted"
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
if (loading) {
|
|
46
|
+
return /*#__PURE__*/jsx(ProcessIndicator, {
|
|
47
|
+
"data-testid": "InlinePrompt_ProcessIndicator",
|
|
48
|
+
size: "xxs"
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return /*#__PURE__*/jsx(StatusIcon, {
|
|
52
|
+
size: 16,
|
|
53
|
+
sentiment: sentiment
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
return /*#__PURE__*/jsxs("div", {
|
|
57
|
+
className: clsx('wds-inline-prompt', `wds-inline-prompt--${sentiment}`, {
|
|
58
|
+
'wds-inline-prompt--muted': muted,
|
|
59
|
+
'wds-inline-prompt--loading': loading
|
|
60
|
+
}, className),
|
|
61
|
+
...rest,
|
|
62
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
63
|
+
className: "wds-inline-prompt__media-wrapper",
|
|
64
|
+
children: renderMedia()
|
|
65
|
+
}), /*#__PURE__*/jsx(Body, {
|
|
66
|
+
children: children
|
|
67
|
+
})]
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export { InlinePrompt };
|
|
72
|
+
//# sourceMappingURL=InlinePrompt.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlinePrompt.mjs","sources":["../../../../src/listItem/Prompt/InlinePrompt/InlinePrompt.tsx"],"sourcesContent":["import { Sentiment } from '../../../common';\nimport { BackslashCircle } from '@transferwise/icons';\nimport ProcessIndicator from '../../../processIndicator';\nimport StatusIcon from '../../../statusIcon';\nimport { clsx } from 'clsx';\nimport Body from '../../../body';\n\nexport type InlinePromptProps = {\n sentiment?: `${Sentiment.POSITIVE | Sentiment.NEGATIVE | Sentiment.NEUTRAL | Sentiment.WARNING}`;\n loading?: boolean;\n /**\n * Use for short-lived inline prompts to avoid swap of the icon (which is bad UX for short-lived prompts, e.g. when submit form)\n */\n muted?: boolean;\n id?: string;\n className?: string;\n 'data-testid'?: string;\n children: React.ReactNode;\n};\n\nexport const InlinePrompt = ({\n sentiment = Sentiment.POSITIVE,\n muted = false,\n loading = false,\n className,\n children,\n ...rest\n}: InlinePromptProps) => {\n const renderMedia = () => {\n if (muted) {\n return <BackslashCircle size={16} data-testid=\"InlinePrompt_Muted\" />;\n }\n if (loading) {\n return <ProcessIndicator data-testid=\"InlinePrompt_ProcessIndicator\" size=\"xxs\" />;\n }\n return <StatusIcon size={16} sentiment={sentiment} />;\n };\n\n return (\n <div\n className={clsx(\n 'wds-inline-prompt',\n `wds-inline-prompt--${sentiment}`,\n {\n 'wds-inline-prompt--muted': muted,\n 'wds-inline-prompt--loading': loading,\n },\n className,\n )}\n {...rest}\n >\n <div className=\"wds-inline-prompt__media-wrapper\">{renderMedia()}</div>\n <Body>{children}</Body>\n </div>\n );\n};\n"],"names":["InlinePrompt","sentiment","Sentiment","POSITIVE","muted","loading","className","children","rest","renderMedia","_jsx","BackslashCircle","size","ProcessIndicator","StatusIcon","_jsxs","clsx","Body"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBO,MAAMA,YAAY,GAAGA,CAAC;EAC3BC,SAAS,GAAGC,SAAS,CAACC,QAAQ;AAC9BC,EAAAA,KAAK,GAAG,KAAK;AACbC,EAAAA,OAAO,GAAG,KAAK;EACfC,SAAS;EACTC,QAAQ;EACR,GAAGC;AAAI,CACW,KAAI;EACtB,MAAMC,WAAW,GAAGA,MAAK;AACvB,IAAA,IAAIL,KAAK,EAAE;MACT,oBAAOM,GAAA,CAACC,eAAe,EAAA;AAACC,QAAAA,IAAI,EAAE,EAAG;QAAC,aAAA,EAAY;AAAoB,QAAG;AACvE,IAAA;AACA,IAAA,IAAIP,OAAO,EAAE;MACX,oBAAOK,GAAA,CAACG,gBAAgB,EAAA;AAAC,QAAA,aAAA,EAAY,+BAA+B;AAACD,QAAAA,IAAI,EAAC;AAAK,OAAA,CAAG;AACpF,IAAA;IACA,oBAAOF,GAAA,CAACI,UAAU,EAAA;AAACF,MAAAA,IAAI,EAAE,EAAG;AAACX,MAAAA,SAAS,EAAEA;AAAU,MAAG;EACvD,CAAC;AAED,EAAA,oBACEc,IAAA,CAAA,KAAA,EAAA;IACET,SAAS,EAAEU,IAAI,CACb,mBAAmB,EACnB,CAAA,mBAAA,EAAsBf,SAAS,EAAE,EACjC;AACE,MAAA,0BAA0B,EAAEG,KAAK;AACjC,MAAA,4BAA4B,EAAEC;KAC/B,EACDC,SAAS,CACT;AAAA,IAAA,GACEE,IAAI;AAAAD,IAAAA,QAAA,gBAERG,GAAA,CAAA,KAAA,EAAA;AAAKJ,MAAAA,SAAS,EAAC,kCAAkC;MAAAC,QAAA,EAAEE,WAAW;AAAE,KAAM,CACtE,eAAAC,GAAA,CAACO,IAAI,EAAA;AAAAV,MAAAA,QAAA,EAAEA;AAAQ,KAAO,CACxB;AAAA,GAAK,CAAC;AAEV;;;;"}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var clsx = require('clsx');
|
|
7
6
|
require('../../common/theme.js');
|
|
8
7
|
require('../../common/direction.js');
|
|
9
8
|
require('../../common/propsValues/control.js');
|
|
@@ -24,32 +23,28 @@ require('../../common/propsValues/scroll.js');
|
|
|
24
23
|
require('../../common/propsValues/markdownNodeType.js');
|
|
25
24
|
require('../../common/fileType.js');
|
|
26
25
|
require('@transferwise/icons');
|
|
26
|
+
require('clsx');
|
|
27
27
|
require('react-intl');
|
|
28
28
|
require('../../common/closeButton/CloseButton.messages.js');
|
|
29
29
|
var jsxRuntime = require('react/jsx-runtime');
|
|
30
|
-
var StatusIcon = require('../../statusIcon/StatusIcon.js');
|
|
31
|
-
var Body = require('../../body/Body.js');
|
|
32
30
|
var ListItemContext = require('../ListItemContext.js');
|
|
31
|
+
var InlinePrompt = require('./InlinePrompt/InlinePrompt.js');
|
|
33
32
|
|
|
34
33
|
const Prompt = ({
|
|
35
34
|
sentiment: sentiment$1 = sentiment.Sentiment.NEUTRAL,
|
|
36
35
|
children
|
|
37
36
|
}) => {
|
|
38
37
|
const {
|
|
39
|
-
ids
|
|
38
|
+
ids,
|
|
39
|
+
props
|
|
40
40
|
} = React.useContext(ListItemContext.ListItemContext);
|
|
41
|
-
|
|
41
|
+
const isLongLivedMuted = props.disabled && Boolean(props.disabledPromptMessage);
|
|
42
|
+
return /*#__PURE__*/jsxRuntime.jsx(InlinePrompt.InlinePrompt, {
|
|
42
43
|
id: ids.prompt,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
size: 16,
|
|
48
|
-
sentiment: sentiment$1
|
|
49
|
-
})
|
|
50
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Body.default, {
|
|
51
|
-
children: children
|
|
52
|
-
})]
|
|
44
|
+
sentiment: sentiment$1,
|
|
45
|
+
muted: isLongLivedMuted,
|
|
46
|
+
className: "wds-list-item-prompt",
|
|
47
|
+
children: isLongLivedMuted ? props.disabledPromptMessage : children
|
|
53
48
|
});
|
|
54
49
|
};
|
|
55
50
|
Prompt.displayName = 'ListItem.Prompt';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemPrompt.js","sources":["../../../src/listItem/Prompt/ListItemPrompt.tsx"],"sourcesContent":["import { useContext } from 'react';\nimport { clsx } from 'clsx';\nimport { Sentiment } from '../../common';\nimport
|
|
1
|
+
{"version":3,"file":"ListItemPrompt.js","sources":["../../../src/listItem/Prompt/ListItemPrompt.tsx"],"sourcesContent":["import { useContext } from 'react';\nimport { clsx } from 'clsx';\nimport { Sentiment } from '../../common';\nimport { ListItemContext, type ListItemContextData } from '../ListItemContext';\nimport { InlinePrompt, type InlinePromptProps } from './InlinePrompt';\n\nexport type ListItemPromptProps = Pick<InlinePromptProps, 'children' | 'sentiment' | 'muted'>;\n\n/**\n * This component allows for rendering an Inline Prompt. <br />\n * In the future it will be a thin wrapper around a standalone component.<br />\n *\n * Please refer to the [Design documentation](https://wise.design/components/list-item#prompt) for details.\n */\nexport const Prompt = ({ sentiment = Sentiment.NEUTRAL, children }: ListItemPromptProps) => {\n const { ids, props } = useContext<ListItemContextData>(ListItemContext);\n const isLongLivedMuted = props.disabled && Boolean(props.disabledPromptMessage);\n\n return (\n <InlinePrompt\n id={ids.prompt}\n sentiment={sentiment}\n muted={isLongLivedMuted}\n className=\"wds-list-item-prompt\"\n >\n {isLongLivedMuted ? props.disabledPromptMessage : children}\n </InlinePrompt>\n );\n};\n\nPrompt.displayName = 'ListItem.Prompt';\nexport default Prompt;\n"],"names":["Prompt","sentiment","Sentiment","NEUTRAL","children","ids","props","useContext","ListItemContext","isLongLivedMuted","disabled","Boolean","disabledPromptMessage","_jsx","InlinePrompt","id","prompt","muted","className","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcO,MAAMA,MAAM,GAAGA,CAAC;aAAEC,WAAS,GAAGC,mBAAS,CAACC,OAAO;AAAEC,EAAAA;AAAQ,CAAuB,KAAI;EACzF,MAAM;IAAEC,GAAG;AAAEC,IAAAA;AAAK,GAAE,GAAGC,gBAAU,CAAsBC,+BAAe,CAAC;EACvE,MAAMC,gBAAgB,GAAGH,KAAK,CAACI,QAAQ,IAAIC,OAAO,CAACL,KAAK,CAACM,qBAAqB,CAAC;EAE/E,oBACEC,cAAA,CAACC,yBAAY,EAAA;IACXC,EAAE,EAAEV,GAAG,CAACW,MAAO;AACff,IAAAA,SAAS,EAAEA,WAAU;AACrBgB,IAAAA,KAAK,EAAER,gBAAiB;AACxBS,IAAAA,SAAS,EAAC,sBAAsB;AAAAd,IAAAA,QAAA,EAE/BK,gBAAgB,GAAGH,KAAK,CAACM,qBAAqB,GAAGR;AAAQ,GAC9C,CAAC;AAEnB;AAEAJ,MAAM,CAACmB,WAAW,GAAG,iBAAiB;;;;;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useContext } from 'react';
|
|
2
|
-
import { clsx } from 'clsx';
|
|
3
2
|
import '../../common/theme.mjs';
|
|
4
3
|
import '../../common/direction.mjs';
|
|
5
4
|
import '../../common/propsValues/control.mjs';
|
|
@@ -20,32 +19,28 @@ import '../../common/propsValues/scroll.mjs';
|
|
|
20
19
|
import '../../common/propsValues/markdownNodeType.mjs';
|
|
21
20
|
import '../../common/fileType.mjs';
|
|
22
21
|
import '@transferwise/icons';
|
|
22
|
+
import 'clsx';
|
|
23
23
|
import 'react-intl';
|
|
24
24
|
import '../../common/closeButton/CloseButton.messages.mjs';
|
|
25
|
-
import {
|
|
26
|
-
import StatusIcon from '../../statusIcon/StatusIcon.mjs';
|
|
27
|
-
import Body from '../../body/Body.mjs';
|
|
25
|
+
import { jsx } from 'react/jsx-runtime';
|
|
28
26
|
import { ListItemContext } from '../ListItemContext.mjs';
|
|
27
|
+
import { InlinePrompt } from './InlinePrompt/InlinePrompt.mjs';
|
|
29
28
|
|
|
30
29
|
const Prompt = ({
|
|
31
30
|
sentiment = Sentiment.NEUTRAL,
|
|
32
31
|
children
|
|
33
32
|
}) => {
|
|
34
33
|
const {
|
|
35
|
-
ids
|
|
34
|
+
ids,
|
|
35
|
+
props
|
|
36
36
|
} = useContext(ListItemContext);
|
|
37
|
-
|
|
37
|
+
const isLongLivedMuted = props.disabled && Boolean(props.disabledPromptMessage);
|
|
38
|
+
return /*#__PURE__*/jsx(InlinePrompt, {
|
|
38
39
|
id: ids.prompt,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
size: 16,
|
|
44
|
-
sentiment: sentiment
|
|
45
|
-
})
|
|
46
|
-
}), /*#__PURE__*/jsx(Body, {
|
|
47
|
-
children: children
|
|
48
|
-
})]
|
|
40
|
+
sentiment: sentiment,
|
|
41
|
+
muted: isLongLivedMuted,
|
|
42
|
+
className: "wds-list-item-prompt",
|
|
43
|
+
children: isLongLivedMuted ? props.disabledPromptMessage : children
|
|
49
44
|
});
|
|
50
45
|
};
|
|
51
46
|
Prompt.displayName = 'ListItem.Prompt';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemPrompt.mjs","sources":["../../../src/listItem/Prompt/ListItemPrompt.tsx"],"sourcesContent":["import { useContext } from 'react';\nimport { clsx } from 'clsx';\nimport { Sentiment } from '../../common';\nimport
|
|
1
|
+
{"version":3,"file":"ListItemPrompt.mjs","sources":["../../../src/listItem/Prompt/ListItemPrompt.tsx"],"sourcesContent":["import { useContext } from 'react';\nimport { clsx } from 'clsx';\nimport { Sentiment } from '../../common';\nimport { ListItemContext, type ListItemContextData } from '../ListItemContext';\nimport { InlinePrompt, type InlinePromptProps } from './InlinePrompt';\n\nexport type ListItemPromptProps = Pick<InlinePromptProps, 'children' | 'sentiment' | 'muted'>;\n\n/**\n * This component allows for rendering an Inline Prompt. <br />\n * In the future it will be a thin wrapper around a standalone component.<br />\n *\n * Please refer to the [Design documentation](https://wise.design/components/list-item#prompt) for details.\n */\nexport const Prompt = ({ sentiment = Sentiment.NEUTRAL, children }: ListItemPromptProps) => {\n const { ids, props } = useContext<ListItemContextData>(ListItemContext);\n const isLongLivedMuted = props.disabled && Boolean(props.disabledPromptMessage);\n\n return (\n <InlinePrompt\n id={ids.prompt}\n sentiment={sentiment}\n muted={isLongLivedMuted}\n className=\"wds-list-item-prompt\"\n >\n {isLongLivedMuted ? props.disabledPromptMessage : children}\n </InlinePrompt>\n );\n};\n\nPrompt.displayName = 'ListItem.Prompt';\nexport default Prompt;\n"],"names":["Prompt","sentiment","Sentiment","NEUTRAL","children","ids","props","useContext","ListItemContext","isLongLivedMuted","disabled","Boolean","disabledPromptMessage","_jsx","InlinePrompt","id","prompt","muted","className","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcO,MAAMA,MAAM,GAAGA,CAAC;EAAEC,SAAS,GAAGC,SAAS,CAACC,OAAO;AAAEC,EAAAA;AAAQ,CAAuB,KAAI;EACzF,MAAM;IAAEC,GAAG;AAAEC,IAAAA;AAAK,GAAE,GAAGC,UAAU,CAAsBC,eAAe,CAAC;EACvE,MAAMC,gBAAgB,GAAGH,KAAK,CAACI,QAAQ,IAAIC,OAAO,CAACL,KAAK,CAACM,qBAAqB,CAAC;EAE/E,oBACEC,GAAA,CAACC,YAAY,EAAA;IACXC,EAAE,EAAEV,GAAG,CAACW,MAAO;AACff,IAAAA,SAAS,EAAEA,SAAU;AACrBgB,IAAAA,KAAK,EAAER,gBAAiB;AACxBS,IAAAA,SAAS,EAAC,sBAAsB;AAAAd,IAAAA,QAAA,EAE/BK,gBAAgB,GAAGH,KAAK,CAACM,qBAAqB,GAAGR;AAAQ,GAC9C,CAAC;AAEnB;AAEAJ,MAAM,CAACmB,WAAW,GAAG,iBAAiB;;;;"}
|