@transferwise/components 0.0.0-experimental-e068634 → 0.0.0-experimental-0e166d9
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/button/Button.js +0 -1
- package/build/button/Button.js.map +1 -1
- package/build/button/Button.mjs +0 -1
- package/build/button/Button.mjs.map +1 -1
- package/build/common/RadioButton/RadioButton.js +2 -5
- package/build/common/RadioButton/RadioButton.js.map +1 -1
- package/build/common/RadioButton/RadioButton.mjs +2 -5
- package/build/common/RadioButton/RadioButton.mjs.map +1 -1
- package/build/common/initials.js +4 -1
- package/build/common/initials.js.map +1 -1
- package/build/common/initials.mjs +4 -1
- package/build/common/initials.mjs.map +1 -1
- package/build/flowNavigation/animatedLabel/AnimatedLabel.js +3 -2
- package/build/flowNavigation/animatedLabel/AnimatedLabel.js.map +1 -1
- package/build/flowNavigation/animatedLabel/AnimatedLabel.mjs +2 -1
- package/build/flowNavigation/animatedLabel/AnimatedLabel.mjs.map +1 -1
- package/build/i18n/de.json +2 -0
- package/build/i18n/de.json.js +2 -0
- package/build/i18n/de.json.js.map +1 -1
- package/build/i18n/de.json.mjs +2 -0
- package/build/i18n/de.json.mjs.map +1 -1
- package/build/i18n/fr.json +2 -0
- package/build/i18n/fr.json.js +2 -0
- package/build/i18n/fr.json.js.map +1 -1
- package/build/i18n/fr.json.mjs +2 -0
- package/build/i18n/fr.json.mjs.map +1 -1
- package/build/i18n/hu.json +2 -0
- package/build/i18n/hu.json.js +2 -0
- package/build/i18n/hu.json.js.map +1 -1
- package/build/i18n/hu.json.mjs +2 -0
- package/build/i18n/hu.json.mjs.map +1 -1
- package/build/i18n/it.json +2 -0
- package/build/i18n/it.json.js +2 -0
- package/build/i18n/it.json.js.map +1 -1
- package/build/i18n/it.json.mjs +2 -0
- package/build/i18n/it.json.mjs.map +1 -1
- package/build/i18n/ja.json +2 -0
- package/build/i18n/ja.json.js +2 -0
- package/build/i18n/ja.json.js.map +1 -1
- package/build/i18n/ja.json.mjs +2 -0
- package/build/i18n/ja.json.mjs.map +1 -1
- package/build/i18n/pl.json +2 -0
- package/build/i18n/pl.json.js +2 -0
- package/build/i18n/pl.json.js.map +1 -1
- package/build/i18n/pl.json.mjs +2 -0
- package/build/i18n/pl.json.mjs.map +1 -1
- package/build/i18n/pt.json +2 -0
- package/build/i18n/pt.json.js +2 -0
- package/build/i18n/pt.json.js.map +1 -1
- package/build/i18n/pt.json.mjs +2 -0
- package/build/i18n/pt.json.mjs.map +1 -1
- package/build/i18n/ro.json +2 -0
- package/build/i18n/ro.json.js +2 -0
- package/build/i18n/ro.json.js.map +1 -1
- package/build/i18n/ro.json.mjs +2 -0
- package/build/i18n/ro.json.mjs.map +1 -1
- package/build/i18n/ru.json +2 -0
- package/build/i18n/ru.json.js +2 -0
- package/build/i18n/ru.json.js.map +1 -1
- package/build/i18n/ru.json.mjs +2 -0
- package/build/i18n/ru.json.mjs.map +1 -1
- package/build/i18n/tr.json +2 -0
- package/build/i18n/tr.json.js +2 -0
- package/build/i18n/tr.json.js.map +1 -1
- package/build/i18n/tr.json.mjs +2 -0
- package/build/i18n/tr.json.mjs.map +1 -1
- package/build/i18n/zh-CN.json +2 -0
- package/build/i18n/zh-CN.json.js +2 -0
- package/build/i18n/zh-CN.json.js.map +1 -1
- package/build/i18n/zh-CN.json.mjs +2 -0
- package/build/i18n/zh-CN.json.mjs.map +1 -1
- package/build/i18n/zh-HK.json +2 -0
- package/build/i18n/zh-HK.json.js +2 -0
- package/build/i18n/zh-HK.json.js.map +1 -1
- package/build/i18n/zh-HK.json.mjs +2 -0
- package/build/i18n/zh-HK.json.mjs.map +1 -1
- package/build/iconButton/IconButton.js.map +1 -1
- package/build/iconButton/IconButton.mjs.map +1 -1
- package/build/image/Image.js.map +1 -1
- package/build/image/Image.mjs.map +1 -1
- package/build/index.js +2 -4
- package/build/index.js.map +1 -1
- package/build/index.mjs +1 -2
- package/build/index.mjs.map +1 -1
- package/build/legacylistItem/List.js +17 -0
- package/build/legacylistItem/List.js.map +1 -0
- package/build/legacylistItem/List.mjs +15 -0
- package/build/legacylistItem/List.mjs.map +1 -0
- package/build/main.css +2 -774
- package/build/styles/avatarView/AvatarView.css +1 -3
- package/build/styles/button/Button.css +1 -1
- package/build/styles/main.css +2 -774
- package/build/switch/Switch.js +1 -3
- package/build/switch/Switch.js.map +1 -1
- package/build/switch/Switch.mjs +1 -3
- package/build/switch/Switch.mjs.map +1 -1
- package/build/types/button/Button.d.ts.map +1 -1
- package/build/types/button/Button.types.d.ts +1 -1
- package/build/types/button/Button.types.d.ts.map +1 -1
- package/build/types/button/index.d.ts +1 -1
- package/build/types/button/index.d.ts.map +1 -1
- package/build/types/common/RadioButton/RadioButton.d.ts +1 -3
- package/build/types/common/RadioButton/RadioButton.d.ts.map +1 -1
- package/build/types/common/initials.d.ts.map +1 -1
- package/build/types/iconButton/IconButton.d.ts +2 -2
- package/build/types/iconButton/IconButton.d.ts.map +1 -1
- package/build/types/image/Image.d.ts +0 -3
- package/build/types/image/Image.d.ts.map +1 -1
- package/build/types/image/index.d.ts +0 -1
- package/build/types/image/index.d.ts.map +1 -1
- package/build/types/index.d.ts +2 -6
- package/build/types/index.d.ts.map +1 -1
- package/build/types/legacylistItem/List.d.ts +6 -0
- package/build/types/legacylistItem/List.d.ts.map +1 -0
- package/build/types/legacylistItem/index.d.ts +2 -0
- package/build/types/legacylistItem/index.d.ts.map +1 -1
- package/build/types/switch/Switch.d.ts +1 -3
- package/build/types/switch/Switch.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/avatarView/AvatarView.css +1 -3
- package/src/avatarView/AvatarView.less +1 -2
- package/src/button/Button.css +1 -1
- package/src/button/Button.less +1 -1
- package/src/button/Button.spec.tsx +0 -18
- package/src/button/Button.story.tsx +9 -4
- package/src/button/Button.tsx +1 -5
- package/src/button/Button.types.ts +1 -1
- package/src/button/index.ts +1 -1
- package/src/checkboxButton/CheckboxButton.story.tsx +4 -4
- package/src/common/RadioButton/RadioButton.tsx +1 -6
- package/src/common/initials.spec.tsx +13 -0
- package/src/common/initials.ts +5 -0
- package/src/flowNavigation/animatedLabel/AnimatedLabel.tsx +1 -1
- package/src/i18n/de.json +2 -0
- package/src/i18n/fr.json +2 -0
- package/src/i18n/hu.json +2 -0
- package/src/i18n/it.json +2 -0
- package/src/i18n/ja.json +2 -0
- package/src/i18n/pl.json +2 -0
- package/src/i18n/pt.json +2 -0
- package/src/i18n/ro.json +2 -0
- package/src/i18n/ru.json +2 -0
- package/src/i18n/tr.json +2 -0
- package/src/i18n/zh-CN.json +2 -0
- package/src/i18n/zh-HK.json +2 -0
- package/src/iconButton/IconButton.story.tsx +1 -1
- package/src/iconButton/IconButton.tsx +1 -1
- package/src/image/Image.tsx +0 -3
- package/src/image/index.ts +0 -1
- package/src/index.ts +2 -6
- package/src/legacylistItem/LegacyListItem.story.tsx +2 -2
- package/src/legacylistItem/LegacyListItem.tests.story.tsx +1 -2
- package/src/legacylistItem/List.tsx +10 -0
- package/src/legacylistItem/index.ts +2 -0
- package/src/main.css +2 -774
- package/src/main.less +0 -1
- package/src/switch/Switch.tsx +2 -6
- package/src/test-utils/Parameters.d.ts +77 -0
- package/build/list/List.js +0 -21
- package/build/list/List.js.map +0 -1
- package/build/list/List.mjs +0 -17
- package/build/list/List.mjs.map +0 -1
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js +0 -56
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js.map +0 -1
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs +0 -54
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs.map +0 -1
- package/build/listItem/AvatarLayout/ListItemAvatarLayout.js +0 -23
- package/build/listItem/AvatarLayout/ListItemAvatarLayout.js.map +0 -1
- package/build/listItem/AvatarLayout/ListItemAvatarLayout.mjs +0 -21
- package/build/listItem/AvatarLayout/ListItemAvatarLayout.mjs.map +0 -1
- package/build/listItem/AvatarView/ListItemAvatarView.js +0 -23
- package/build/listItem/AvatarView/ListItemAvatarView.js.map +0 -1
- package/build/listItem/AvatarView/ListItemAvatarView.mjs +0 -21
- package/build/listItem/AvatarView/ListItemAvatarView.mjs.map +0 -1
- package/build/listItem/Button/ListItemButton.js +0 -43
- package/build/listItem/Button/ListItemButton.js.map +0 -1
- package/build/listItem/Button/ListItemButton.mjs +0 -41
- package/build/listItem/Button/ListItemButton.mjs.map +0 -1
- package/build/listItem/Checkbox/ListItemCheckbox.js +0 -30
- package/build/listItem/Checkbox/ListItemCheckbox.js.map +0 -1
- package/build/listItem/Checkbox/ListItemCheckbox.mjs +0 -28
- package/build/listItem/Checkbox/ListItemCheckbox.mjs.map +0 -1
- package/build/listItem/IconButton/ListItemIconButton.js +0 -56
- package/build/listItem/IconButton/ListItemIconButton.js.map +0 -1
- package/build/listItem/IconButton/ListItemIconButton.mjs +0 -54
- package/build/listItem/IconButton/ListItemIconButton.mjs.map +0 -1
- package/build/listItem/Image/ListItemImage.js +0 -31
- package/build/listItem/Image/ListItemImage.js.map +0 -1
- package/build/listItem/Image/ListItemImage.mjs +0 -29
- package/build/listItem/Image/ListItemImage.mjs.map +0 -1
- package/build/listItem/ListItem.js +0 -312
- package/build/listItem/ListItem.js.map +0 -1
- package/build/listItem/ListItem.mjs +0 -307
- package/build/listItem/ListItem.mjs.map +0 -1
- package/build/listItem/ListItemContext.js +0 -8
- package/build/listItem/ListItemContext.js.map +0 -1
- package/build/listItem/ListItemContext.mjs +0 -6
- package/build/listItem/ListItemContext.mjs.map +0 -1
- package/build/listItem/Navigation/ListItemNavigation.js +0 -45
- package/build/listItem/Navigation/ListItemNavigation.js.map +0 -1
- package/build/listItem/Navigation/ListItemNavigation.mjs +0 -43
- package/build/listItem/Navigation/ListItemNavigation.mjs.map +0 -1
- package/build/listItem/Prompt/ListItemPrompt.js +0 -59
- package/build/listItem/Prompt/ListItemPrompt.js.map +0 -1
- package/build/listItem/Prompt/ListItemPrompt.mjs +0 -54
- package/build/listItem/Prompt/ListItemPrompt.mjs.map +0 -1
- package/build/listItem/Radio/ListItemRadio.js +0 -30
- package/build/listItem/Radio/ListItemRadio.js.map +0 -1
- package/build/listItem/Radio/ListItemRadio.mjs +0 -28
- package/build/listItem/Radio/ListItemRadio.mjs.map +0 -1
- package/build/listItem/Switch/ListItemSwitch.js +0 -30
- package/build/listItem/Switch/ListItemSwitch.js.map +0 -1
- package/build/listItem/Switch/ListItemSwitch.mjs +0 -28
- package/build/listItem/Switch/ListItemSwitch.mjs.map +0 -1
- package/build/listItem/useListItemControl.js +0 -22
- package/build/listItem/useListItemControl.js.map +0 -1
- package/build/listItem/useListItemControl.mjs +0 -20
- package/build/listItem/useListItemControl.mjs.map +0 -1
- package/build/listItem/useListItemMedia.js +0 -21
- package/build/listItem/useListItemMedia.js.map +0 -1
- package/build/listItem/useListItemMedia.mjs +0 -19
- package/build/listItem/useListItemMedia.mjs.map +0 -1
- package/build/styles/listItem/ListItem.css +0 -770
- package/build/styles/listItem/ListItem.grid.css +0 -370
- package/build/test-utils/assets/placeholder-landscape.svg +0 -1
- package/build/test-utils/assets/placeholder-portrait.svg +0 -1
- package/build/types/list/List.d.ts +0 -10
- package/build/types/list/List.d.ts.map +0 -1
- package/build/types/list/index.d.ts +0 -3
- package/build/types/list/index.d.ts.map +0 -1
- package/build/types/listItem/AdditionalInfo/ListItemAdditionalInfo.d.ts +0 -15
- package/build/types/listItem/AdditionalInfo/ListItemAdditionalInfo.d.ts.map +0 -1
- package/build/types/listItem/AdditionalInfo/index.d.ts +0 -3
- package/build/types/listItem/AdditionalInfo/index.d.ts.map +0 -1
- package/build/types/listItem/AvatarLayout/ListItemAvatarLayout.d.ts +0 -18
- package/build/types/listItem/AvatarLayout/ListItemAvatarLayout.d.ts.map +0 -1
- package/build/types/listItem/AvatarLayout/index.d.ts +0 -3
- package/build/types/listItem/AvatarLayout/index.d.ts.map +0 -1
- package/build/types/listItem/AvatarView/ListItemAvatarView.d.ts +0 -16
- package/build/types/listItem/AvatarView/ListItemAvatarView.d.ts.map +0 -1
- package/build/types/listItem/AvatarView/index.d.ts +0 -3
- package/build/types/listItem/AvatarView/index.d.ts.map +0 -1
- package/build/types/listItem/Button/ListItemButton.d.ts +0 -20
- package/build/types/listItem/Button/ListItemButton.d.ts.map +0 -1
- package/build/types/listItem/Button/index.d.ts +0 -3
- package/build/types/listItem/Button/index.d.ts.map +0 -1
- package/build/types/listItem/Checkbox/ListItemCheckbox.d.ts +0 -14
- package/build/types/listItem/Checkbox/ListItemCheckbox.d.ts.map +0 -1
- package/build/types/listItem/Checkbox/index.d.ts +0 -3
- package/build/types/listItem/Checkbox/index.d.ts.map +0 -1
- package/build/types/listItem/IconButton/ListItemIconButton.d.ts +0 -18
- package/build/types/listItem/IconButton/ListItemIconButton.d.ts.map +0 -1
- package/build/types/listItem/IconButton/index.d.ts +0 -3
- package/build/types/listItem/IconButton/index.d.ts.map +0 -1
- package/build/types/listItem/Image/ListItemImage.d.ts +0 -25
- package/build/types/listItem/Image/ListItemImage.d.ts.map +0 -1
- package/build/types/listItem/Image/index.d.ts +0 -3
- package/build/types/listItem/Image/index.d.ts.map +0 -1
- package/build/types/listItem/ListItem.d.ts +0 -113
- package/build/types/listItem/ListItem.d.ts.map +0 -1
- package/build/types/listItem/ListItemContext.d.ts +0 -22
- package/build/types/listItem/ListItemContext.d.ts.map +0 -1
- package/build/types/listItem/Navigation/ListItemNavigation.d.ts +0 -15
- package/build/types/listItem/Navigation/ListItemNavigation.d.ts.map +0 -1
- package/build/types/listItem/Navigation/index.d.ts +0 -3
- package/build/types/listItem/Navigation/index.d.ts.map +0 -1
- package/build/types/listItem/Prompt/ListItemPrompt.d.ts +0 -16
- package/build/types/listItem/Prompt/ListItemPrompt.d.ts.map +0 -1
- package/build/types/listItem/Prompt/index.d.ts +0 -3
- package/build/types/listItem/Prompt/index.d.ts.map +0 -1
- package/build/types/listItem/Radio/ListItemRadio.d.ts +0 -14
- package/build/types/listItem/Radio/ListItemRadio.d.ts.map +0 -1
- package/build/types/listItem/Radio/index.d.ts +0 -3
- package/build/types/listItem/Radio/index.d.ts.map +0 -1
- package/build/types/listItem/Switch/ListItemSwitch.d.ts +0 -14
- package/build/types/listItem/Switch/ListItemSwitch.d.ts.map +0 -1
- package/build/types/listItem/Switch/index.d.ts +0 -3
- package/build/types/listItem/Switch/index.d.ts.map +0 -1
- package/build/types/listItem/_stories/helpers.d.ts +0 -27
- package/build/types/listItem/_stories/helpers.d.ts.map +0 -1
- package/build/types/listItem/_stories/subcomponents.d.ts +0 -18
- package/build/types/listItem/_stories/subcomponents.d.ts.map +0 -1
- package/build/types/listItem/index.d.ts +0 -14
- package/build/types/listItem/index.d.ts.map +0 -1
- package/build/types/listItem/test-utils.d.ts +0 -7
- package/build/types/listItem/test-utils.d.ts.map +0 -1
- package/build/types/listItem/useListItemControl.d.ts +0 -5
- package/build/types/listItem/useListItemControl.d.ts.map +0 -1
- package/build/types/listItem/useListItemMedia.d.ts +0 -6
- package/build/types/listItem/useListItemMedia.d.ts.map +0 -1
- package/src/list/List.spec.tsx +0 -52
- package/src/list/List.story.tsx +0 -30
- package/src/list/List.tsx +0 -14
- package/src/list/index.ts +0 -2
- package/src/listItem/AdditionalInfo/ListItemAdditionalInfo.spec.tsx +0 -56
- package/src/listItem/AdditionalInfo/ListItemAdditionalInfo.story.tsx +0 -198
- package/src/listItem/AdditionalInfo/ListItemAdditionalInfo.tsx +0 -36
- package/src/listItem/AdditionalInfo/index.ts +0 -2
- package/src/listItem/AvatarLayout/ListItemAvatarLayout.spec.tsx +0 -59
- package/src/listItem/AvatarLayout/ListItemAvatarLayout.story.tsx +0 -124
- package/src/listItem/AvatarLayout/ListItemAvatarLayout.tsx +0 -27
- package/src/listItem/AvatarLayout/index.ts +0 -2
- package/src/listItem/AvatarView/ListItemAvatarView.spec.tsx +0 -75
- package/src/listItem/AvatarView/ListItemAvatarView.story.tsx +0 -339
- package/src/listItem/AvatarView/ListItemAvatarView.tsx +0 -27
- package/src/listItem/AvatarView/index.ts +0 -2
- package/src/listItem/Button/ListItemButton.spec.tsx +0 -68
- package/src/listItem/Button/ListItemButton.story.tsx +0 -473
- package/src/listItem/Button/ListItemButton.tsx +0 -56
- package/src/listItem/Button/index.ts +0 -2
- package/src/listItem/Checkbox/ListItemCheckbox.spec.tsx +0 -82
- package/src/listItem/Checkbox/ListItemCheckbox.story.tsx +0 -128
- package/src/listItem/Checkbox/ListItemCheckbox.tsx +0 -33
- package/src/listItem/Checkbox/index.ts +0 -2
- package/src/listItem/IconButton/ListItemIconButton.spec.tsx +0 -119
- package/src/listItem/IconButton/ListItemIconButton.story.tsx +0 -284
- package/src/listItem/IconButton/ListItemIconButton.tsx +0 -73
- package/src/listItem/IconButton/index.ts +0 -2
- package/src/listItem/Image/ListItemImage.spec.tsx +0 -30
- package/src/listItem/Image/ListItemImage.story.tsx +0 -80
- package/src/listItem/Image/ListItemImage.tsx +0 -46
- package/src/listItem/Image/index.ts +0 -2
- package/src/listItem/ListItem.css +0 -770
- package/src/listItem/ListItem.grid.css +0 -370
- package/src/listItem/ListItem.grid.less +0 -622
- package/src/listItem/ListItem.less +0 -421
- package/src/listItem/ListItem.spec.tsx +0 -1521
- package/src/listItem/ListItem.tsx +0 -447
- package/src/listItem/ListItemContext.tsx +0 -27
- package/src/listItem/Navigation/ListItemNavigation.spec.tsx +0 -59
- package/src/listItem/Navigation/ListItemNavigation.story.tsx +0 -112
- package/src/listItem/Navigation/ListItemNavigation.tsx +0 -40
- package/src/listItem/Navigation/index.ts +0 -2
- package/src/listItem/Prompt/ListItemPrompt.spec.tsx +0 -36
- package/src/listItem/Prompt/ListItemPrompt.story.tsx +0 -204
- package/src/listItem/Prompt/ListItemPrompt.tsx +0 -32
- package/src/listItem/Prompt/index.ts +0 -2
- package/src/listItem/Radio/ListItemRadio.spec.tsx +0 -66
- package/src/listItem/Radio/ListItemRadio.story.tsx +0 -111
- package/src/listItem/Radio/ListItemRadio.tsx +0 -33
- package/src/listItem/Radio/index.ts +0 -2
- package/src/listItem/Switch/ListItemSwitch.spec.tsx +0 -47
- package/src/listItem/Switch/ListItemSwitch.story.tsx +0 -79
- package/src/listItem/Switch/ListItemSwitch.tsx +0 -33
- package/src/listItem/Switch/index.ts +0 -2
- package/src/listItem/_stories/ListItem.focus.test.story.tsx +0 -265
- package/src/listItem/_stories/ListItem.layout.test.story.tsx +0 -354
- package/src/listItem/_stories/ListItem.scenarios.story.tsx +0 -228
- package/src/listItem/_stories/ListItem.story.tsx +0 -775
- package/src/listItem/_stories/ListItem.variants.test.story.tsx +0 -271
- package/src/listItem/_stories/helpers.tsx +0 -53
- package/src/listItem/_stories/subcomponents.tsx +0 -139
- package/src/listItem/index.ts +0 -14
- package/src/listItem/test-utils.tsx +0 -33
- package/src/listItem/useListItemControl.tsx +0 -18
- package/src/listItem/useListItemMedia.tsx +0 -13
- package/src/test-utils/assets/placeholder-landscape.svg +0 -1
- package/src/test-utils/assets/placeholder-portrait.svg +0 -1
package/build/switch/Switch.js
CHANGED
|
@@ -16,7 +16,6 @@ const Switch = props => {
|
|
|
16
16
|
id = inputAttributes.id,
|
|
17
17
|
'aria-label': ariaLabel,
|
|
18
18
|
'aria-labelledby': ariaLabelledbyProp,
|
|
19
|
-
'aria-describedby': ariaDescribedbyProp,
|
|
20
19
|
onClick,
|
|
21
20
|
disabled
|
|
22
21
|
} = props;
|
|
@@ -31,10 +30,9 @@ const Switch = props => {
|
|
|
31
30
|
role: "switch",
|
|
32
31
|
...inputAttributes,
|
|
33
32
|
id: id,
|
|
34
|
-
"aria-checked":
|
|
33
|
+
"aria-checked": checked,
|
|
35
34
|
"aria-label": ariaLabel,
|
|
36
35
|
"aria-labelledby": ariaLabelledby,
|
|
37
|
-
"aria-describedby": ariaDescribedbyProp,
|
|
38
36
|
disabled: disabled,
|
|
39
37
|
onClick: !disabled ? onClick : undefined,
|
|
40
38
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.js","sources":["../../src/switch/Switch.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { KeyboardEventHandler, MouseEvent } from 'react';\n\nimport type { CommonProps } from '../common';\nimport { useInputAttributes } from '../inputs/contexts';\n\nexport type SwitchProps = CommonProps & {\n /**\n * Used to describe the purpose of the switch. To be used if there is no external label (i.e. aria-labelledby is null)\n * @deprecated Use `Field` wrapper or the `aria-labelledby` attribute instead.\n */\n 'aria-label'?: string;\n /** A reference to a label that describes the purpose of the switch. Ignored if aria-label is provided */\n 'aria-labelledby'?: string;\n /**
|
|
1
|
+
{"version":3,"file":"Switch.js","sources":["../../src/switch/Switch.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { KeyboardEventHandler, MouseEvent } from 'react';\n\nimport type { CommonProps } from '../common';\nimport { useInputAttributes } from '../inputs/contexts';\n\nexport type SwitchProps = CommonProps & {\n /**\n * Used to describe the purpose of the switch. To be used if there is no external label (i.e. aria-labelledby is null)\n * @deprecated Use `Field` wrapper or the `aria-labelledby` attribute instead.\n */\n 'aria-label'?: string;\n /** A reference to a label that describes the purpose of the switch. Ignored if aria-label is provided */\n 'aria-labelledby'?: string;\n /** Whether the switch is checked or not */\n checked?: boolean;\n disabled?: boolean;\n /** ID to apply to the switch container */\n id?: string;\n /** Function called when the switch is toggled */\n onClick: (event?: MouseEvent<HTMLSpanElement>) => void;\n};\n\nconst Switch = (props: SwitchProps) => {\n const inputAttributes = useInputAttributes({ nonLabelable: true });\n\n const {\n checked,\n className,\n id = inputAttributes.id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledbyProp,\n onClick,\n disabled,\n } = props;\n\n const ariaLabelledby =\n (ariaLabel ? undefined : ariaLabelledbyProp) ?? inputAttributes['aria-labelledby'];\n\n return (\n <button\n className={clsx(\n 'np-switch',\n {\n 'np-switch--unchecked': !checked,\n 'np-switch--checked': checked,\n disabled,\n },\n className,\n )}\n type=\"button\"\n role=\"switch\"\n {...inputAttributes}\n id={id}\n aria-checked={checked}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n disabled={disabled}\n onClick={!disabled ? onClick : undefined}\n >\n <span className=\"np-switch--thumb\" />\n </button>\n );\n};\n\nexport default Switch;\n"],"names":["Switch","props","inputAttributes","useInputAttributes","nonLabelable","checked","className","id","ariaLabel","ariaLabelledbyProp","onClick","disabled","ariaLabelledby","undefined","_jsx","clsx","type","role","children"],"mappings":";;;;;;;;AAuBA,MAAMA,MAAM,GAAIC,KAAkB,IAAI;EACpC,MAAMC,eAAe,GAAGC,2BAAkB,CAAC;AAAEC,IAAAA,YAAY,EAAE;AAAI,GAAE,CAAC;EAElE,MAAM;IACJC,OAAO;IACPC,SAAS;IACTC,EAAE,GAAGL,eAAe,CAACK,EAAE;AACvB,IAAA,YAAY,EAAEC,SAAS;AACvB,IAAA,iBAAiB,EAAEC,kBAAkB;IACrCC,OAAO;AACPC,IAAAA;AAAQ,GACT,GAAGV,KAAK;AAET,EAAA,MAAMW,cAAc,GAClB,CAACJ,SAAS,GAAGK,SAAS,GAAGJ,kBAAkB,KAAKP,eAAe,CAAC,iBAAiB,CAAC;AAEpF,EAAA,oBACEY,cAAA,CAAA,QAAA,EAAA;AACER,IAAAA,SAAS,EAAES,SAAI,CACb,WAAW,EACX;MACE,sBAAsB,EAAE,CAACV,OAAO;AAChC,MAAA,oBAAoB,EAAEA,OAAO;AAC7BM,MAAAA;KACD,EACDL,SAAS,CACT;AACFU,IAAAA,IAAI,EAAC,QAAQ;AACbC,IAAAA,IAAI,EAAC,QAAQ;AAAA,IAAA,GACTf,eAAe;AACnBK,IAAAA,EAAE,EAAEA,EAAG;AACP,IAAA,cAAA,EAAcF,OAAQ;AACtB,IAAA,YAAA,EAAYG,SAAU;AACtB,IAAA,iBAAA,EAAiBI,cAAe;AAChCD,IAAAA,QAAQ,EAAEA,QAAS;AACnBD,IAAAA,OAAO,EAAE,CAACC,QAAQ,GAAGD,OAAO,GAAGG,SAAU;AAAAK,IAAAA,QAAA,eAEzCJ,cAAA,CAAA,MAAA,EAAA;AAAMR,MAAAA,SAAS,EAAC;KAAkB;AACpC,GAAQ,CAAC;AAEb;;;;"}
|
package/build/switch/Switch.mjs
CHANGED
|
@@ -12,7 +12,6 @@ const Switch = props => {
|
|
|
12
12
|
id = inputAttributes.id,
|
|
13
13
|
'aria-label': ariaLabel,
|
|
14
14
|
'aria-labelledby': ariaLabelledbyProp,
|
|
15
|
-
'aria-describedby': ariaDescribedbyProp,
|
|
16
15
|
onClick,
|
|
17
16
|
disabled
|
|
18
17
|
} = props;
|
|
@@ -27,10 +26,9 @@ const Switch = props => {
|
|
|
27
26
|
role: "switch",
|
|
28
27
|
...inputAttributes,
|
|
29
28
|
id: id,
|
|
30
|
-
"aria-checked":
|
|
29
|
+
"aria-checked": checked,
|
|
31
30
|
"aria-label": ariaLabel,
|
|
32
31
|
"aria-labelledby": ariaLabelledby,
|
|
33
|
-
"aria-describedby": ariaDescribedbyProp,
|
|
34
32
|
disabled: disabled,
|
|
35
33
|
onClick: !disabled ? onClick : undefined,
|
|
36
34
|
children: /*#__PURE__*/jsx("span", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.mjs","sources":["../../src/switch/Switch.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { KeyboardEventHandler, MouseEvent } from 'react';\n\nimport type { CommonProps } from '../common';\nimport { useInputAttributes } from '../inputs/contexts';\n\nexport type SwitchProps = CommonProps & {\n /**\n * Used to describe the purpose of the switch. To be used if there is no external label (i.e. aria-labelledby is null)\n * @deprecated Use `Field` wrapper or the `aria-labelledby` attribute instead.\n */\n 'aria-label'?: string;\n /** A reference to a label that describes the purpose of the switch. Ignored if aria-label is provided */\n 'aria-labelledby'?: string;\n /**
|
|
1
|
+
{"version":3,"file":"Switch.mjs","sources":["../../src/switch/Switch.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { KeyboardEventHandler, MouseEvent } from 'react';\n\nimport type { CommonProps } from '../common';\nimport { useInputAttributes } from '../inputs/contexts';\n\nexport type SwitchProps = CommonProps & {\n /**\n * Used to describe the purpose of the switch. To be used if there is no external label (i.e. aria-labelledby is null)\n * @deprecated Use `Field` wrapper or the `aria-labelledby` attribute instead.\n */\n 'aria-label'?: string;\n /** A reference to a label that describes the purpose of the switch. Ignored if aria-label is provided */\n 'aria-labelledby'?: string;\n /** Whether the switch is checked or not */\n checked?: boolean;\n disabled?: boolean;\n /** ID to apply to the switch container */\n id?: string;\n /** Function called when the switch is toggled */\n onClick: (event?: MouseEvent<HTMLSpanElement>) => void;\n};\n\nconst Switch = (props: SwitchProps) => {\n const inputAttributes = useInputAttributes({ nonLabelable: true });\n\n const {\n checked,\n className,\n id = inputAttributes.id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledbyProp,\n onClick,\n disabled,\n } = props;\n\n const ariaLabelledby =\n (ariaLabel ? undefined : ariaLabelledbyProp) ?? inputAttributes['aria-labelledby'];\n\n return (\n <button\n className={clsx(\n 'np-switch',\n {\n 'np-switch--unchecked': !checked,\n 'np-switch--checked': checked,\n disabled,\n },\n className,\n )}\n type=\"button\"\n role=\"switch\"\n {...inputAttributes}\n id={id}\n aria-checked={checked}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledby}\n disabled={disabled}\n onClick={!disabled ? onClick : undefined}\n >\n <span className=\"np-switch--thumb\" />\n </button>\n );\n};\n\nexport default Switch;\n"],"names":["Switch","props","inputAttributes","useInputAttributes","nonLabelable","checked","className","id","ariaLabel","ariaLabelledbyProp","onClick","disabled","ariaLabelledby","undefined","_jsx","clsx","type","role","children"],"mappings":";;;;AAuBA,MAAMA,MAAM,GAAIC,KAAkB,IAAI;EACpC,MAAMC,eAAe,GAAGC,kBAAkB,CAAC;AAAEC,IAAAA,YAAY,EAAE;AAAI,GAAE,CAAC;EAElE,MAAM;IACJC,OAAO;IACPC,SAAS;IACTC,EAAE,GAAGL,eAAe,CAACK,EAAE;AACvB,IAAA,YAAY,EAAEC,SAAS;AACvB,IAAA,iBAAiB,EAAEC,kBAAkB;IACrCC,OAAO;AACPC,IAAAA;AAAQ,GACT,GAAGV,KAAK;AAET,EAAA,MAAMW,cAAc,GAClB,CAACJ,SAAS,GAAGK,SAAS,GAAGJ,kBAAkB,KAAKP,eAAe,CAAC,iBAAiB,CAAC;AAEpF,EAAA,oBACEY,GAAA,CAAA,QAAA,EAAA;AACER,IAAAA,SAAS,EAAES,IAAI,CACb,WAAW,EACX;MACE,sBAAsB,EAAE,CAACV,OAAO;AAChC,MAAA,oBAAoB,EAAEA,OAAO;AAC7BM,MAAAA;KACD,EACDL,SAAS,CACT;AACFU,IAAAA,IAAI,EAAC,QAAQ;AACbC,IAAAA,IAAI,EAAC,QAAQ;AAAA,IAAA,GACTf,eAAe;AACnBK,IAAAA,EAAE,EAAEA,EAAG;AACP,IAAA,cAAA,EAAcF,OAAQ;AACtB,IAAA,YAAA,EAAYG,SAAU;AACtB,IAAA,iBAAA,EAAiBI,cAAe;AAChCD,IAAAA,QAAQ,EAAEA,QAAS;AACnBD,IAAAA,OAAO,EAAE,CAACC,QAAQ,GAAGD,OAAO,GAAGG,SAAU;AAAAK,IAAAA,QAAA,eAEzCJ,GAAA,CAAA,MAAA,EAAA;AAAMR,MAAAA,SAAS,EAAC;KAAkB;AACpC,GAAQ,CAAC;AAEb;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/button/Button.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAOpF,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElF,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/button/Button.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAOpF,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElF,QAAA,MAAM,MAAM,gHAiHX,CAAC;AAEF,eAAe,MAAM,CAAC;AAKtB,OAAO,EAAE,WAAW,EAAE,iBAAiB,IAAI,KAAK,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -4,7 +4,7 @@ export type ButtonSentiment = 'default' | 'negative';
|
|
|
4
4
|
export type ButtonPriority = 'primary' | 'secondary' | 'secondary-neutral' | 'tertiary';
|
|
5
5
|
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
6
6
|
export type ButtonReferenceType = HTMLButtonElement | HTMLAnchorElement;
|
|
7
|
-
|
|
7
|
+
type ButtonAddonIcon = {
|
|
8
8
|
type: 'icon';
|
|
9
9
|
value: ReactNode;
|
|
10
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../src/button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,UAAU,CAAC;AACrD,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,mBAAmB,GAAG,UAAU,CAAC;AACxF,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5C,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AACxE,
|
|
1
|
+
{"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../src/button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,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AC;IAE1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,WAAW,CACzB,GACC,WAAW,GAAG;IACZ,EAAE,CAAC,EAAE,QAAQ,CAAC;CACf,CAAC;AAEJ,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,WAAW,CAC3C,GACC,WAAW,GAAG;IACZ,EAAE,CAAC,EAAE,GAAG,CAAC;CACV,CAAC;AAEJ,MAAM,MAAM,WAAW,GAAG,kBAAkB,GAAG,kBAAkB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default } from './Button.resolver';
|
|
2
|
-
export type { ButtonProps as NewButtonProps
|
|
2
|
+
export type { ButtonProps as NewButtonProps } from './Button.types';
|
|
3
3
|
export type { LegacyButtonProps as ButtonProps } from './LegacyButton';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,YAAY,EAAE,WAAW,IAAI,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,YAAY,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAKpE,YAAY,EAAE,iBAAiB,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -6,8 +6,6 @@ export interface RadioButtonProps<T extends string | number = string> {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
value?: T;
|
|
8
8
|
readOnly?: boolean;
|
|
9
|
-
className?: string;
|
|
10
|
-
'aria-describedby'?: string;
|
|
11
9
|
}
|
|
12
|
-
export default function RadioButton<T extends string | number = ''>({ id, value, name, checked, onChange, disabled, readOnly,
|
|
10
|
+
export default function RadioButton<T extends string | number = ''>({ id, value, name, checked, onChange, disabled, readOnly, }: RadioButtonProps<T>): import("react").JSX.Element;
|
|
13
11
|
//# sourceMappingURL=RadioButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../../../../src/common/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM;IAClE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../../../../src/common/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM;IAClE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,EAAE,EAAE,EAClE,EAAE,EACF,KAAe,EACf,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,gBAAgB,CAAC,CAAC,CAAC,+BAsBrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initials.d.ts","sourceRoot":"","sources":["../../../src/common/initials.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"initials.d.ts","sourceRoot":"","sources":["../../../src/common/initials.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,UAqBvC"}
|
|
@@ -4,12 +4,12 @@ export type Props = {
|
|
|
4
4
|
priority?: 'primary' | 'secondary' | 'tertiary' | 'minimal';
|
|
5
5
|
type?: 'default' | 'negative';
|
|
6
6
|
'data-testid'?: string;
|
|
7
|
-
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'onClick'> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'disabled'> & Pick<HTMLAttributes<HTMLDivElement>, '
|
|
7
|
+
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'onClick'> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'disabled'> & Pick<HTMLAttributes<HTMLDivElement>, 'className' | 'role' | 'children' | 'aria-label' | 'tabIndex'>;
|
|
8
8
|
declare const IconButton: import("react").ForwardRefExoticComponent<{
|
|
9
9
|
size?: 16 | 24 | 32 | 40 | 48 | 56 | 72;
|
|
10
10
|
priority?: "primary" | "secondary" | "tertiary" | "minimal";
|
|
11
11
|
type?: "default" | "negative";
|
|
12
12
|
'data-testid'?: string;
|
|
13
|
-
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target" | "href"> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, "onClick" | "disabled"> & Pick<HTMLAttributes<HTMLDivElement>, "className" | "
|
|
13
|
+
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target" | "href"> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, "onClick" | "disabled"> & Pick<HTMLAttributes<HTMLDivElement>, "className" | "tabIndex" | "role" | "aria-label" | "children"> & import("react").RefAttributes<unknown>>;
|
|
14
14
|
export default IconButton;
|
|
15
15
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/iconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAc,cAAc,EAAE,MAAM,OAAO,CAAC;AAK/F,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACxC,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC;IAC5D,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,GAAG,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC,GAC9E,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,GACrE,IAAI,CACF,cAAc,CAAC,cAAc,CAAC,EAC9B,
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/iconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAc,cAAc,EAAE,MAAM,OAAO,CAAC;AAK/F,MAAM,MAAM,KAAK,GAAG;IAClB,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACxC,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC;IAC5D,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,GAAG,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC,GAC9E,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,GACrE,IAAI,CACF,cAAc,CAAC,cAAc,CAAC,EAC9B,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,CAC9D,CAAC;AAEJ,QAAA,MAAM,UAAU;WAXP,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;eAC5B,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS;WACpD,SAAS,GAAG,UAAU;oBACb,MAAM;wSA0CtB,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -5,9 +5,6 @@ export interface ImageProps {
|
|
|
5
5
|
onLoad?: () => void;
|
|
6
6
|
onError?: () => void;
|
|
7
7
|
className?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Specifies the [loading behavior of the image](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img#loading).
|
|
10
|
-
*/
|
|
11
8
|
loading?: 'lazy' | 'eager';
|
|
12
9
|
stretch?: boolean;
|
|
13
10
|
role?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/image/Image.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/image/Image.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,KAAK,GAAI,+EAWZ,UAAU,gCA+BZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/image/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/image/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export type { SelectInputGroupItem, SelectInputItem, SelectInputOptionContentPro
|
|
|
33
33
|
export type { TextAreaProps } from './inputs/TextArea';
|
|
34
34
|
export type { InstructionsListProps } from './instructionsList';
|
|
35
35
|
export type { LabelProps, LabelOptionalProps, LabelDescriptionProps } from './label/Label';
|
|
36
|
-
export type { LegacyListItemProps } from './legacylistItem';
|
|
36
|
+
export type { ListProps, LegacyListItemProps } from './legacylistItem';
|
|
37
37
|
export type { LoaderProps } from './loader';
|
|
38
38
|
export type { MarkdownProps } from './markdown';
|
|
39
39
|
export type { ModalProps } from './modal';
|
|
@@ -71,8 +71,6 @@ export type { UploadError, UploadResponse, UploadedFile } from './uploadInput/ty
|
|
|
71
71
|
export type { WithIdProps } from './withId';
|
|
72
72
|
export type { IconButtonProps } from './iconButton';
|
|
73
73
|
export type { TableProps, TableRowType, TableRowClickableType, TableHeaderType, TableCellLeading, TableCellText, TableCellCurrency, TableCellStatus, TableCellType, } from './table';
|
|
74
|
-
export type { ListItemProps, ListItemAdditionalInfoProps, ListItemCheckboxProps } from './listItem';
|
|
75
|
-
export type { ListProps } from './list';
|
|
76
74
|
/**
|
|
77
75
|
* Components
|
|
78
76
|
*/
|
|
@@ -125,7 +123,7 @@ export { TextArea } from './inputs/TextArea';
|
|
|
125
123
|
export { default as InstructionsList } from './instructionsList';
|
|
126
124
|
export { Label } from './label/Label';
|
|
127
125
|
export { default as Link } from './link';
|
|
128
|
-
export { default as LegacyListItem } from './legacylistItem';
|
|
126
|
+
export { List, default as LegacyListItem } from './legacylistItem';
|
|
129
127
|
export { default as Loader } from './loader';
|
|
130
128
|
export { default as Logo } from './logo';
|
|
131
129
|
export { default as Markdown } from './markdown';
|
|
@@ -169,8 +167,6 @@ export { default as Typeahead } from './typeahead';
|
|
|
169
167
|
export { default as Upload } from './upload';
|
|
170
168
|
export { default as UploadInput } from './uploadInput';
|
|
171
169
|
export { default as Table } from './table';
|
|
172
|
-
export { default as ListItem } from './listItem';
|
|
173
|
-
export { default as List } from './list';
|
|
174
170
|
/**
|
|
175
171
|
* Hooks
|
|
176
172
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot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AAS,EACT,IAAI,EACJ,MAAM,EACN,KAAK,EACL,IAAI,EACJ,UAAU,EACV,OAAO,EACP,KAAK,GACN,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;GAEG;AACH,OAAO,EACL,YAAY,EACZ,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEjD;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/legacylistItem/List.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,IAAI,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,SAAS,+BAEtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/legacylistItem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/legacylistItem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -8,15 +8,13 @@ export type SwitchProps = CommonProps & {
|
|
|
8
8
|
'aria-label'?: string;
|
|
9
9
|
/** A reference to a label that describes the purpose of the switch. Ignored if aria-label is provided */
|
|
10
10
|
'aria-labelledby'?: string;
|
|
11
|
-
/** Identifies the element(s) that describes the element on which the attribute is set */
|
|
12
|
-
'aria-describedby'?: string;
|
|
13
11
|
/** Whether the switch is checked or not */
|
|
14
12
|
checked?: boolean;
|
|
15
13
|
disabled?: boolean;
|
|
16
14
|
/** ID to apply to the switch container */
|
|
17
15
|
id?: string;
|
|
18
16
|
/** Function called when the switch is toggled */
|
|
19
|
-
onClick: (event?: MouseEvent<
|
|
17
|
+
onClick: (event?: MouseEvent<HTMLSpanElement>) => void;
|
|
20
18
|
};
|
|
21
19
|
declare const Switch: (props: SwitchProps) => import("react").JSX.Element;
|
|
22
20
|
export default Switch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/switch/Switch.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAwB,UAAU,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG7C,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG;IACtC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yGAAyG;IACzG,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../src/switch/Switch.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAwB,UAAU,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG7C,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG;IACtC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yGAAyG;IACzG,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,iDAAiD;IACjD,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,QAAA,MAAM,MAAM,GAAI,OAAO,WAAW,gCAwCjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
right: 0;
|
|
20
20
|
}
|
|
21
21
|
.np-avatar-view .np-avatar-view-content {
|
|
22
|
-
color:
|
|
23
|
-
color: var(--color-content-primary);
|
|
22
|
+
color: var(--color-interactive-primary);
|
|
24
23
|
}
|
|
25
24
|
.np-avatar-view-interactive {
|
|
26
25
|
cursor: pointer;
|
|
@@ -28,7 +27,6 @@
|
|
|
28
27
|
.np-avatar-view-interactive .np-circle {
|
|
29
28
|
background-color: rgba(134,167,189,0.10196);
|
|
30
29
|
background-color: var(--color-background-neutral);
|
|
31
|
-
color: var(--color-interactive-primary);
|
|
32
30
|
}
|
|
33
31
|
.np-avatar-view-non-interactive .np-circle {
|
|
34
32
|
background-color: transparent;
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
.np-avatar-view {
|
|
4
4
|
.np-avatar-view-content {
|
|
5
|
-
color: var(--color-
|
|
5
|
+
color: var(--color-interactive-primary);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
&-interactive {
|
|
9
9
|
cursor: pointer;
|
|
10
10
|
.np-circle {
|
|
11
11
|
background-color: var(--color-background-neutral);
|
|
12
|
-
color: var(--color-interactive-primary);
|
|
13
12
|
}
|
|
14
13
|
}
|
|
15
14
|
|
package/src/button/Button.css
CHANGED
package/src/button/Button.less
CHANGED
|
@@ -202,24 +202,6 @@ describe('Button', () => {
|
|
|
202
202
|
expect(button).not.toHaveAttribute('href');
|
|
203
203
|
});
|
|
204
204
|
});
|
|
205
|
-
|
|
206
|
-
describe('content id', () => {
|
|
207
|
-
it('should not set id for content by default', () => {
|
|
208
|
-
const { container } = render(<Button v2>clickMe</Button>);
|
|
209
|
-
|
|
210
|
-
expect(container.querySelector('[id$="_content"]')).not.toBeInTheDocument();
|
|
211
|
-
});
|
|
212
|
-
|
|
213
|
-
it('should set id for content by default if `id` is passed as a button prop', () => {
|
|
214
|
-
const { container } = render(
|
|
215
|
-
<Button v2 id="myId">
|
|
216
|
-
clickMe
|
|
217
|
-
</Button>,
|
|
218
|
-
);
|
|
219
|
-
|
|
220
|
-
expect(container.querySelector('#myId_content')).toBeInTheDocument();
|
|
221
|
-
});
|
|
222
|
-
});
|
|
223
205
|
});
|
|
224
206
|
});
|
|
225
207
|
});
|
|
@@ -4,7 +4,7 @@ import { Freeze, ArrowRight, ChevronRight } from '@transferwise/icons';
|
|
|
4
4
|
import { Flag } from '@wise/art';
|
|
5
5
|
import Button from './Button.resolver';
|
|
6
6
|
import type { ButtonProps, ButtonPriority } from './Button.types';
|
|
7
|
-
import { storyConfig } from '../test-utils';
|
|
7
|
+
import { lorem20, storyConfig } from '../test-utils';
|
|
8
8
|
|
|
9
9
|
const withContainer = (Story: any) => (
|
|
10
10
|
<div style={{ display: 'flex', justifyContent: 'center' }}>
|
|
@@ -503,9 +503,14 @@ export const DisplayBlock: StoryObj<PreviewStoryArgs> = {
|
|
|
503
503
|
const [props, previewProps] = getPropsForPreview(args);
|
|
504
504
|
|
|
505
505
|
return (
|
|
506
|
-
<
|
|
507
|
-
|
|
508
|
-
|
|
506
|
+
<div className="d-flex flex-column gap-y-1">
|
|
507
|
+
<Button {...props} {...previewProps}>
|
|
508
|
+
Full-width button
|
|
509
|
+
</Button>
|
|
510
|
+
<Button {...props} {...previewProps}>
|
|
511
|
+
{lorem20}
|
|
512
|
+
</Button>
|
|
513
|
+
</div>
|
|
509
514
|
);
|
|
510
515
|
},
|
|
511
516
|
argTypes: {
|
package/src/button/Button.tsx
CHANGED
|
@@ -62,11 +62,7 @@ const Button = forwardRef<ButtonReferenceType, NewButtonProps>(
|
|
|
62
62
|
data-testid="button-loader-indicator"
|
|
63
63
|
/>
|
|
64
64
|
)}
|
|
65
|
-
<span
|
|
66
|
-
className="wds-Button-label"
|
|
67
|
-
id={props.id ? `${props.id}_content` : undefined}
|
|
68
|
-
aria-hidden={loading}
|
|
69
|
-
>
|
|
65
|
+
<span className="wds-Button-label" aria-hidden={loading}>
|
|
70
66
|
{size === 'lg' ? (
|
|
71
67
|
<span className="wds-Button-labelText">{children}</span>
|
|
72
68
|
) : (
|
|
@@ -5,7 +5,7 @@ export type ButtonSentiment = 'default' | 'negative';
|
|
|
5
5
|
export type ButtonPriority = 'primary' | 'secondary' | 'secondary-neutral' | 'tertiary';
|
|
6
6
|
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
7
7
|
export type ButtonReferenceType = HTMLButtonElement | HTMLAnchorElement;
|
|
8
|
-
|
|
8
|
+
type ButtonAddonIcon = {
|
|
9
9
|
type: 'icon';
|
|
10
10
|
value: ReactNode;
|
|
11
11
|
};
|
package/src/button/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default } from './Button.resolver';
|
|
2
|
-
export type { ButtonProps as NewButtonProps
|
|
2
|
+
export type { ButtonProps as NewButtonProps } from './Button.types';
|
|
3
3
|
|
|
4
4
|
// export legacy button props for backwards compatibility with legacy Button interface
|
|
5
5
|
// delete this when migration to new Button is done (or aleast no more deep imports, use following query)
|
|
@@ -35,14 +35,14 @@ export const Indeterminate: Story = {
|
|
|
35
35
|
indeterminate: true,
|
|
36
36
|
},
|
|
37
37
|
render: (args) => {
|
|
38
|
-
const [
|
|
38
|
+
const [indeterminate, setIndeterminate] = useState(true);
|
|
39
39
|
|
|
40
40
|
return (
|
|
41
41
|
<CheckboxButton
|
|
42
42
|
{...args}
|
|
43
|
-
checked
|
|
44
|
-
indeterminate={
|
|
45
|
-
onChange={() =>
|
|
43
|
+
checked
|
|
44
|
+
indeterminate={indeterminate}
|
|
45
|
+
onChange={() => setIndeterminate(!indeterminate)}
|
|
46
46
|
/>
|
|
47
47
|
);
|
|
48
48
|
},
|
|
@@ -8,8 +8,6 @@ export interface RadioButtonProps<T extends string | number = string> {
|
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
value?: T;
|
|
10
10
|
readOnly?: boolean;
|
|
11
|
-
className?: string;
|
|
12
|
-
'aria-describedby'?: string;
|
|
13
11
|
}
|
|
14
12
|
|
|
15
13
|
export default function RadioButton<T extends string | number = ''>({
|
|
@@ -20,20 +18,17 @@ export default function RadioButton<T extends string | number = ''>({
|
|
|
20
18
|
onChange,
|
|
21
19
|
disabled,
|
|
22
20
|
readOnly,
|
|
23
|
-
className,
|
|
24
|
-
'aria-describedby': ariaDescribedBy,
|
|
25
21
|
}: RadioButtonProps<T>) {
|
|
26
22
|
return (
|
|
27
23
|
<>
|
|
28
24
|
<input
|
|
29
25
|
type="radio"
|
|
30
|
-
className=
|
|
26
|
+
className="sr-only"
|
|
31
27
|
id={id}
|
|
32
28
|
value={value}
|
|
33
29
|
name={name}
|
|
34
30
|
checked={checked}
|
|
35
31
|
disabled={disabled || readOnly}
|
|
36
|
-
aria-describedby={ariaDescribedBy}
|
|
37
32
|
onChange={() => {
|
|
38
33
|
if (!checked) {
|
|
39
34
|
onChange?.(value);
|
|
@@ -39,4 +39,17 @@ describe('getInitials', () => {
|
|
|
39
39
|
it('handles single character', () => {
|
|
40
40
|
expect(getInitials('Q')).toBe('Q');
|
|
41
41
|
});
|
|
42
|
+
|
|
43
|
+
it('handles names with (parenthesized) values', () => {
|
|
44
|
+
expect(getInitials('Squirrel (GBP)')).toBe('S');
|
|
45
|
+
expect(getInitials('Fantastic Squirrel (USD)')).toBe('FS');
|
|
46
|
+
expect(getInitials('Squirrel [GBP]')).toBe('S');
|
|
47
|
+
expect(getInitials('Fantastic Squirrel [USD]')).toBe('FS');
|
|
48
|
+
expect(getInitials('Squirrel {GBP}')).toBe('S');
|
|
49
|
+
expect(getInitials('Fantastic Squirrel {USD}')).toBe('FS');
|
|
50
|
+
expect(getInitials('Squirrel <GBP>')).toBe('S');
|
|
51
|
+
expect(getInitials('Fantastic Squirrel <USD>')).toBe('FS');
|
|
52
|
+
expect(getInitials('(Super) Fantastic Squirrel')).toBe('FS');
|
|
53
|
+
expect(getInitials('Super (Fantastic) Squirrel')).toBe('SS');
|
|
54
|
+
});
|
|
42
55
|
});
|
package/src/common/initials.ts
CHANGED
|
@@ -5,6 +5,7 @@ export function getInitials(name: string) {
|
|
|
5
5
|
|
|
6
6
|
const allInitials = name
|
|
7
7
|
.split(' ')
|
|
8
|
+
.filter((part) => !startsWithParenthesis(part))
|
|
8
9
|
.map((part) => part[0])
|
|
9
10
|
.join('')
|
|
10
11
|
.toUpperCase();
|
|
@@ -14,4 +15,8 @@ export function getInitials(name: string) {
|
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
return allInitials[0] + allInitials.slice(-1);
|
|
18
|
+
|
|
19
|
+
function startsWithParenthesis(part: string) {
|
|
20
|
+
return /^[({[<]/.test(part);
|
|
21
|
+
}
|
|
17
22
|
}
|
|
@@ -6,7 +6,7 @@ import BottomSheet from '../../common/bottomSheet';
|
|
|
6
6
|
import Option from '../../common/Option';
|
|
7
7
|
import { Check, ChevronDown } from '@transferwise/icons';
|
|
8
8
|
import { OverlayIdContext, OverlayIdProvider } from '../../provider/overlay/OverlayIdProvider';
|
|
9
|
-
import List from '../../
|
|
9
|
+
import { List } from '../../legacylistItem';
|
|
10
10
|
|
|
11
11
|
export interface AnimatedLabelProps {
|
|
12
12
|
activeLabel: number;
|
package/src/i18n/de.json
CHANGED
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"neptune.Upload.csFailureText": "Hochladen fehlgeschlagen. Bitte versuche es erneut",
|
|
46
46
|
"neptune.Upload.csSuccessText": "Fertig hochgeladen!",
|
|
47
47
|
"neptune.Upload.csTooLargeMessage": "Bitte wähle eine Datei aus, die kleiner als {maxSize} MB ist",
|
|
48
|
+
"neptune.Upload.csTooLargeNoLimitMessage": "Bitte stelle eine kleinere Datei zur Verfügung",
|
|
48
49
|
"neptune.Upload.csWrongTypeMessage": "Dateityp wird nicht unterstützt. Bitte versuche es erneut mit einer anderen Datei",
|
|
49
50
|
"neptune.Upload.psButtonText": "Abbrechen",
|
|
50
51
|
"neptune.Upload.psProcessingText": "Wird hochgeladen...",
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
"neptune.Upload.usButtonText": "Oder wähle eine Datei aus",
|
|
53
54
|
"neptune.Upload.usDropMessage": "Datei zum Hochladen in dieses Feld ziehen",
|
|
54
55
|
"neptune.Upload.usPlaceholder": "Zieh eine Datei in dieses Feld, die kleiner als {maxSize} MB ist",
|
|
56
|
+
"neptune.Upload.usPlaceholderNoLimit": "Ziehe eine Datei hierher",
|
|
55
57
|
"neptune.UploadButton.allFileTypes": "Alle Dateiformate",
|
|
56
58
|
"neptune.UploadButton.dropFiles": "Datei zum Hochladen in dieses Feld ziehen",
|
|
57
59
|
"neptune.UploadButton.instructions": "{fileTypes}, kleiner als {size} MB",
|