@transferwise/components 46.36.1 → 46.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/index.js +169 -348
- package/build/index.js.map +1 -1
- package/build/index.mjs +164 -342
- package/build/index.mjs.map +1 -1
- package/build/main.css +127 -108
- package/build/styles/main.css +127 -108
- package/build/styles/uploadInput/UploadInput.css +25 -27
- package/build/styles/uploadInput/uploadButton/UploadButton.css +24 -38
- package/build/styles/uploadInput/uploadItem/UploadItem.css +81 -46
- package/build/types/accordion/AccordionItem/AccordionItem.d.ts.map +1 -1
- package/build/types/actionButton/ActionButton.d.ts +2 -2
- package/build/types/actionButton/ActionButton.d.ts.map +1 -1
- package/build/types/actionOption/ActionOption.d.ts +4 -5
- package/build/types/actionOption/ActionOption.d.ts.map +1 -1
- package/build/types/alert/Alert.d.ts +1 -2
- package/build/types/alert/Alert.d.ts.map +1 -1
- package/build/types/alert/inlineMarkdown/InlineMarkdown.d.ts +4 -11
- package/build/types/alert/inlineMarkdown/InlineMarkdown.d.ts.map +1 -1
- package/build/types/alert/inlineMarkdown/index.d.ts +2 -1
- package/build/types/alert/inlineMarkdown/index.d.ts.map +1 -1
- package/build/types/avatar/Avatar.d.ts +0 -1
- package/build/types/avatar/Avatar.d.ts.map +1 -1
- package/build/types/avatar/colors/colors.d.ts.map +1 -1
- package/build/types/avatarWrapper/AvatarWrapper.d.ts +0 -1
- package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
- package/build/types/body/Body.d.ts +3 -3
- package/build/types/body/Body.d.ts.map +1 -1
- package/build/types/button/Button.d.ts +0 -1
- package/build/types/button/Button.d.ts.map +1 -1
- package/build/types/button/Button.messages.d.ts +3 -3
- package/build/types/button/classMap.d.ts +6 -6
- package/build/types/card/Card.d.ts +16 -20
- package/build/types/card/Card.d.ts.map +1 -1
- package/build/types/card/index.d.ts +2 -1
- package/build/types/card/index.d.ts.map +1 -1
- package/build/types/checkbox/Checkbox.d.ts +15 -20
- package/build/types/checkbox/Checkbox.d.ts.map +1 -1
- package/build/types/checkbox/index.d.ts +2 -2
- package/build/types/checkbox/index.d.ts.map +1 -1
- package/build/types/checkboxOption/CheckboxOption.d.ts +2 -3
- package/build/types/checkboxOption/CheckboxOption.d.ts.map +1 -1
- package/build/types/chevron/Chevron.d.ts +0 -1
- package/build/types/chevron/Chevron.d.ts.map +1 -1
- package/build/types/chips/Chip.d.ts +1 -2
- package/build/types/chips/Chip.d.ts.map +1 -1
- package/build/types/chips/Chips.d.ts +1 -2
- package/build/types/chips/Chips.d.ts.map +1 -1
- package/build/types/circularButton/CircularButton.d.ts +0 -1
- package/build/types/circularButton/CircularButton.d.ts.map +1 -1
- package/build/types/common/RadioButton/RadioButton.d.ts +0 -1
- package/build/types/common/RadioButton/RadioButton.d.ts.map +1 -1
- package/build/types/common/action/Action.d.ts +0 -1
- package/build/types/common/action/Action.d.ts.map +1 -1
- package/build/types/common/bottomSheet/BottomSheet.d.ts +2 -2
- package/build/types/common/bottomSheet/BottomSheet.d.ts.map +1 -1
- package/build/types/common/closeButton/CloseButton.d.ts +5 -6
- package/build/types/common/closeButton/CloseButton.d.ts.map +1 -1
- package/build/types/common/commonProps.d.ts +0 -1
- package/build/types/common/commonProps.d.ts.map +1 -1
- package/build/types/common/dateUtils/getMonthNames/getMonthNames.d.ts +1 -1
- package/build/types/common/dateUtils/getMonthNames/getMonthNames.d.ts.map +1 -1
- package/build/types/common/flowHeader/FlowHeader.d.ts +1 -1
- package/build/types/common/flowHeader/FlowHeader.d.ts.map +1 -1
- package/build/types/common/focusBoundary/FocusBoundary.d.ts +0 -1
- package/build/types/common/focusBoundary/FocusBoundary.d.ts.map +1 -1
- package/build/types/common/hooks/useDirection/useDirection.d.ts.map +1 -1
- package/build/types/common/hooks/useResizeObserver.d.ts +1 -2
- package/build/types/common/hooks/useResizeObserver.d.ts.map +1 -1
- package/build/types/common/panel/Panel.d.ts +11 -11
- package/build/types/common/panel/Panel.d.ts.map +1 -1
- package/build/types/common/polymorphicWithOverrides/PolymorphicWithOverrides.d.ts +1 -2
- package/build/types/common/polymorphicWithOverrides/PolymorphicWithOverrides.d.ts.map +1 -1
- package/build/types/common/responsivePanel/ResponsivePanel.d.ts +9 -10
- package/build/types/common/responsivePanel/ResponsivePanel.d.ts.map +1 -1
- package/build/types/criticalBanner/CriticalCommsBanner.d.ts +0 -1
- package/build/types/criticalBanner/CriticalCommsBanner.d.ts.map +1 -1
- package/build/types/dateInput/DateInput.d.ts +0 -1
- package/build/types/dateInput/DateInput.d.ts.map +1 -1
- package/build/types/dateLookup/DateLookup.d.ts +1 -1
- package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/dateLookup/dateHeader/DateHeader.d.ts +0 -1
- package/build/types/dateLookup/dateHeader/DateHeader.d.ts.map +1 -1
- package/build/types/dateLookup/dateTrigger/DateTrigger.d.ts +0 -1
- package/build/types/dateLookup/dateTrigger/DateTrigger.d.ts.map +1 -1
- package/build/types/dateLookup/dayCalendar/DayCalendar.d.ts +0 -1
- package/build/types/dateLookup/dayCalendar/DayCalendar.d.ts.map +1 -1
- package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts +0 -1
- package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts.map +1 -1
- package/build/types/dateLookup/monthCalendar/MonthCalendar.d.ts +0 -1
- package/build/types/dateLookup/monthCalendar/MonthCalendar.d.ts.map +1 -1
- package/build/types/dateLookup/monthCalendar/table/MonthCalendarTable.d.ts +0 -1
- package/build/types/dateLookup/monthCalendar/table/MonthCalendarTable.d.ts.map +1 -1
- package/build/types/dateLookup/tableLink/TableLink.d.ts +0 -1
- package/build/types/dateLookup/tableLink/TableLink.d.ts.map +1 -1
- package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts +0 -1
- package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts.map +1 -1
- package/build/types/dateLookup/yearCalendar/table/YearCalendarTable.d.ts +0 -1
- package/build/types/dateLookup/yearCalendar/table/YearCalendarTable.d.ts.map +1 -1
- package/build/types/decision/Decision.d.ts +1 -2
- package/build/types/decision/Decision.d.ts.map +1 -1
- package/build/types/definitionList/DefinitionList.d.ts +19 -24
- package/build/types/definitionList/DefinitionList.d.ts.map +1 -1
- package/build/types/definitionList/index.d.ts +2 -1
- package/build/types/definitionList/index.d.ts.map +1 -1
- package/build/types/dimmer/Dimmer.d.ts +3 -3
- package/build/types/dimmer/Dimmer.d.ts.map +1 -1
- package/build/types/drawer/Drawer.d.ts +18 -36
- package/build/types/drawer/Drawer.d.ts.map +1 -1
- package/build/types/drawer/index.d.ts +2 -1
- package/build/types/drawer/index.d.ts.map +1 -1
- package/build/types/dropFade/DropFade.d.ts.map +1 -1
- package/build/types/emphasis/Emphasis.d.ts +1 -2
- package/build/types/emphasis/Emphasis.d.ts.map +1 -1
- package/build/types/field/Field.d.ts +0 -1
- package/build/types/field/Field.d.ts.map +1 -1
- package/build/types/flowNavigation/FlowNavigation.d.ts +0 -1
- package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
- package/build/types/flowNavigation/backButton/BackButton.d.ts +3 -3
- package/build/types/flowNavigation/backButton/index.d.ts +1 -1
- package/build/types/flowNavigation/backButton/index.d.ts.map +1 -1
- package/build/types/header/Header.d.ts +0 -1
- package/build/types/header/Header.d.ts.map +1 -1
- package/build/types/image/Image.d.ts +0 -1
- package/build/types/image/Image.d.ts.map +1 -1
- package/build/types/index.d.ts +4 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/info/Info.d.ts +0 -1
- package/build/types/info/Info.d.ts.map +1 -1
- package/build/types/inputWithDisplayFormat/InputWithDisplayFormat.d.ts +0 -1
- package/build/types/inputWithDisplayFormat/InputWithDisplayFormat.d.ts.map +1 -1
- package/build/types/inputs/Input.d.ts +1 -2
- package/build/types/inputs/Input.d.ts.map +1 -1
- package/build/types/inputs/InputGroup.d.ts +0 -1
- package/build/types/inputs/InputGroup.d.ts.map +1 -1
- package/build/types/inputs/SearchInput.d.ts +1 -2
- package/build/types/inputs/SearchInput.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts +0 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/inputs/TextArea.d.ts +1 -2
- package/build/types/inputs/TextArea.d.ts.map +1 -1
- package/build/types/inputs/_BottomSheet.d.ts +1 -2
- package/build/types/inputs/_BottomSheet.d.ts.map +1 -1
- package/build/types/inputs/_ButtonInput.d.ts +1 -2
- package/build/types/inputs/_ButtonInput.d.ts.map +1 -1
- package/build/types/inputs/_Popover.d.ts +0 -1
- package/build/types/inputs/_Popover.d.ts.map +1 -1
- package/build/types/inputs/contexts.d.ts +0 -1
- package/build/types/inputs/contexts.d.ts.map +1 -1
- package/build/types/label/Label.d.ts +0 -1
- package/build/types/label/Label.d.ts.map +1 -1
- package/build/types/loader/Loader.d.ts +0 -1
- package/build/types/loader/Loader.d.ts.map +1 -1
- package/build/types/logo/Logo.d.ts +15 -23
- package/build/types/logo/Logo.d.ts.map +1 -1
- package/build/types/logo/index.d.ts +1 -2
- package/build/types/logo/index.d.ts.map +1 -1
- package/build/types/markdown/Markdown.d.ts +0 -1
- package/build/types/markdown/Markdown.d.ts.map +1 -1
- package/build/types/money/Money.d.ts +0 -1
- package/build/types/money/Money.d.ts.map +1 -1
- package/build/types/moneyInput/MoneyInput.d.ts +0 -1
- package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/navigationOption/NavigationOption.d.ts +0 -1
- package/build/types/navigationOption/NavigationOption.d.ts.map +1 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts +0 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
- package/build/types/popover/Popover.d.ts +0 -1
- package/build/types/popover/Popover.d.ts.map +1 -1
- package/build/types/progress/Progress.d.ts +1 -2
- package/build/types/progress/Progress.d.ts.map +1 -1
- package/build/types/progressBar/ProgressBar.d.ts +1 -2
- package/build/types/progressBar/ProgressBar.d.ts.map +1 -1
- package/build/types/promoCard/PromoCard.d.ts +1 -1
- package/build/types/promoCard/PromoCard.d.ts.map +1 -1
- package/build/types/provider/Provider.d.ts +0 -1
- package/build/types/provider/Provider.d.ts.map +1 -1
- package/build/types/provider/direction/DirectionProvider.d.ts +2 -2
- package/build/types/provider/direction/DirectionProvider.d.ts.map +1 -1
- package/build/types/provider/language/LanguageProvider.d.ts +2 -2
- package/build/types/provider/language/LanguageProvider.d.ts.map +1 -1
- package/build/types/radio/Radio.d.ts +0 -1
- package/build/types/radio/Radio.d.ts.map +1 -1
- package/build/types/radioGroup/RadioGroup.d.ts +0 -1
- package/build/types/radioGroup/RadioGroup.d.ts.map +1 -1
- package/build/types/radioOption/RadioOption.d.ts +0 -1
- package/build/types/radioOption/RadioOption.d.ts.map +1 -1
- package/build/types/segmentedControl/SegmentedControl.d.ts +0 -1
- package/build/types/segmentedControl/SegmentedControl.d.ts.map +1 -1
- package/build/types/select/index.d.ts +1 -1
- package/build/types/select/index.d.ts.map +1 -1
- package/build/types/select/option/Option.d.ts +2 -1
- package/build/types/select/option/Option.d.ts.map +1 -1
- package/build/types/select/option/index.d.ts +1 -1
- package/build/types/select/option/index.d.ts.map +1 -1
- package/build/types/select/searchBox/SearchBox.d.ts +3 -3
- package/build/types/select/searchBox/SearchBox.d.ts.map +1 -1
- package/build/types/slidingPanel/SlidingPanel.d.ts +2 -2
- package/build/types/slidingPanel/SlidingPanel.d.ts.map +1 -1
- package/build/types/snackbar/Snackbar.d.ts +2 -1
- package/build/types/snackbar/Snackbar.d.ts.map +1 -1
- package/build/types/snackbar/SnackbarContext.d.ts +0 -1
- package/build/types/snackbar/SnackbarContext.d.ts.map +1 -1
- package/build/types/snackbar/SnackbarProvider.d.ts +0 -1
- package/build/types/snackbar/SnackbarProvider.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts +0 -1
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/types/sticky/Sticky.d.ts +32 -4
- package/build/types/sticky/Sticky.d.ts.map +1 -1
- package/build/types/switchOption/SwitchOption.d.ts +3 -4
- package/build/types/switchOption/SwitchOption.d.ts.map +1 -1
- package/build/types/tabs/TabList.d.ts +1 -1
- package/build/types/tabs/TabPanel.d.ts +4 -4
- package/build/types/tabs/Tabs.d.ts +1 -1
- package/build/types/tabs/Tabs.d.ts.map +1 -1
- package/build/types/test-utils/story-config.d.ts +8 -0
- package/build/types/test-utils/story-config.d.ts.map +1 -1
- package/build/types/textareaWithDisplayFormat/TextareaWithDisplayFormat.d.ts +0 -1
- package/build/types/textareaWithDisplayFormat/TextareaWithDisplayFormat.d.ts.map +1 -1
- package/build/types/tile/Tile.d.ts +16 -37
- package/build/types/tile/Tile.d.ts.map +1 -1
- package/build/types/tile/index.d.ts +1 -1
- package/build/types/tile/index.d.ts.map +1 -1
- package/build/types/tooltip/Tooltip.d.ts.map +1 -1
- package/build/types/typeahead/Typeahead.d.ts.map +1 -1
- package/build/types/typeahead/typeaheadOption/TypeaheadOption.d.ts +0 -1
- package/build/types/typeahead/typeaheadOption/TypeaheadOption.d.ts.map +1 -1
- package/build/types/typeahead/util/highlight.d.ts +0 -1
- package/build/types/typeahead/util/highlight.d.ts.map +1 -1
- package/build/types/upload/Upload.d.ts.map +1 -1
- package/build/types/upload/Upload.messages.d.ts +20 -20
- package/build/types/upload/steps/completeStep/completeStep.d.ts +10 -10
- package/build/types/upload/steps/mediaUploadStep/mediaUploadStep.d.ts +8 -8
- package/build/types/upload/steps/processingStep/processingStep.d.ts +8 -8
- package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts +9 -9
- package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts.map +1 -1
- package/build/types/uploadInput/UploadInput.d.ts +1 -2
- package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
- package/build/types/uploadInput/types.d.ts +9 -1
- package/build/types/uploadInput/types.d.ts.map +1 -1
- package/build/types/uploadInput/uploadButton/UploadButton.d.ts +1 -6
- package/build/types/uploadInput/uploadButton/UploadButton.d.ts.map +1 -1
- package/build/types/uploadInput/uploadItem/UploadItem.d.ts +0 -1
- package/build/types/uploadInput/uploadItem/UploadItem.d.ts.map +1 -1
- package/build/types/withDisplayFormat/WithDisplayFormat.d.ts +4 -4
- package/build/types/withDisplayFormat/WithDisplayFormat.d.ts.map +1 -1
- package/build/types/withNextPortal/withNextPortal.d.ts +0 -1
- package/build/types/withNextPortal/withNextPortal.d.ts.map +1 -1
- package/package.json +3 -4
- package/src/accordion/AccordionItem/AccordionItem.tsx +5 -2
- package/src/actionOption/ActionOption.tsx +4 -5
- package/src/alert/Alert.tsx +1 -1
- package/src/alert/inlineMarkdown/InlineMarkdown.tsx +13 -0
- package/src/alert/inlineMarkdown/index.ts +2 -0
- package/src/body/Body.tsx +4 -3
- package/src/card/{Card.story.js → Card.story.tsx} +6 -15
- package/src/card/{Card.js → Card.tsx} +23 -34
- package/src/card/index.ts +2 -0
- package/src/checkbox/{Checkbox.spec.js → Checkbox.spec.tsx} +5 -5
- package/src/checkbox/{Checkbox.js → Checkbox.tsx} +19 -41
- package/src/checkbox/index.ts +2 -0
- package/src/chips/Chip.tsx +5 -6
- package/src/chips/Chips.tsx +1 -2
- package/src/common/bottomSheet/BottomSheet.tsx +2 -9
- package/src/common/closeButton/CloseButton.tsx +1 -1
- package/src/common/flowHeader/FlowHeader.tsx +1 -1
- package/src/common/hooks/useResizeObserver.ts +1 -1
- package/src/common/panel/Panel.spec.tsx +1 -1
- package/src/common/panel/Panel.tsx +7 -7
- package/src/common/polymorphicWithOverrides/PolymorphicWithOverrides.tsx +1 -1
- package/src/decision/Decision.tsx +1 -1
- package/src/definitionList/{DefinitionList.story.js → DefinitionList.story.tsx} +22 -2
- package/src/definitionList/DefinitionList.tsx +95 -0
- package/src/definitionList/index.ts +2 -0
- package/src/dimmer/Dimmer.tsx +2 -10
- package/src/drawer/{Drawer.rtl.spec.js → Drawer.rtl.spec.tsx} +4 -2
- package/src/drawer/{Drawer.story.js → Drawer.story.tsx} +20 -28
- package/src/drawer/{Drawer.js → Drawer.tsx} +26 -31
- package/src/drawer/index.ts +2 -0
- package/src/emphasis/Emphasis.tsx +1 -3
- package/src/index.ts +4 -0
- package/src/inputs/Input.tsx +1 -1
- package/src/inputs/SearchInput.tsx +1 -1
- package/src/inputs/SelectInput.tsx +4 -4
- package/src/inputs/TextArea.tsx +1 -1
- package/src/inputs/_BottomSheet.tsx +1 -1
- package/src/inputs/_ButtonInput.tsx +1 -1
- package/src/logo/Logo.story.tsx +3 -6
- package/src/logo/{Logo.js → Logo.tsx} +25 -35
- package/src/logo/index.ts +1 -0
- package/src/main.css +127 -108
- package/src/progress/Progress.tsx +3 -15
- package/src/progressBar/ProgressBar.tsx +1 -2
- package/src/promoCard/PromoCard.tsx +2 -2
- package/src/promoCard/PromoCardContext.spec.tsx +1 -1
- package/src/provider/direction/DirectionProvider.tsx +2 -5
- package/src/provider/language/LanguageProvider.tsx +2 -2
- package/src/section/Section.story.tsx +0 -2
- package/src/segmentedControl/SegmentedControl.tsx +2 -2
- package/src/select/option/Option.tsx +6 -18
- package/src/slidingPanel/SlidingPanel.spec.js +2 -1
- package/src/slidingPanel/SlidingPanel.tsx +4 -1
- package/src/snackbar/Snackbar.story.tsx +20 -100
- package/src/snackbar/Snackbar.tests.story.tsx +281 -0
- package/src/snackbar/Snackbar.tsx +8 -12
- package/src/ssr.spec.js +6 -0
- package/src/sticky/Sticky.spec.tsx +71 -0
- package/src/sticky/Sticky.story.tsx +72 -15
- package/src/sticky/Sticky.tsx +49 -5
- package/src/switchOption/SwitchOption.tsx +5 -7
- package/src/tabs/Tabs.js +3 -3
- package/src/test-utils/Parameters.d.ts +8 -0
- package/src/test-utils/story-config.ts +5 -0
- package/src/tile/{Tile.spec.js → Tile.spec.tsx} +1 -1
- package/src/tile/{Tile.js → Tile.tsx} +24 -35
- package/src/tooltip/Tooltip.tsx +2 -1
- package/src/uploadInput/UploadInput.css +25 -27
- package/src/uploadInput/UploadInput.less +24 -23
- package/src/uploadInput/UploadInput.story.tsx +60 -10
- package/src/uploadInput/UploadInput.tsx +3 -6
- package/src/uploadInput/types.ts +11 -1
- package/src/uploadInput/uploadButton/UploadButton.css +24 -38
- package/src/uploadInput/uploadButton/UploadButton.less +27 -40
- package/src/uploadInput/uploadButton/UploadButton.spec.tsx +0 -1
- package/src/uploadInput/uploadButton/UploadButton.tsx +12 -37
- package/src/uploadInput/uploadItem/UploadItem.css +81 -46
- package/src/uploadInput/uploadItem/UploadItem.less +75 -40
- package/src/uploadInput/uploadItem/UploadItem.tsx +33 -29
- package/src/uploadInput/uploadItem/UploadItemBody.tsx +1 -1
- package/src/withDisplayFormat/WithDisplayFormat.tsx +3 -3
- package/build/types/logo/logoTypes.d.ts +0 -6
- package/build/types/logo/logoTypes.d.ts.map +0 -1
- package/src/alert/inlineMarkdown/InlineMarkdown.js +0 -21
- package/src/alert/inlineMarkdown/index.js +0 -1
- package/src/card/index.js +0 -1
- package/src/checkbox/index.js +0 -3
- package/src/definitionList/DefinitionList.js +0 -100
- package/src/definitionList/index.js +0 -1
- package/src/drawer/index.js +0 -1
- package/src/logo/index.js +0 -2
- package/src/logo/logoTypes.ts +0 -6
- package/src/snackbar/Snackbar.spec.js +0 -112
- package/src/sticky/Sticky.spec.js +0 -34
- /package/src/card/{Card.spec.js → Card.spec.tsx} +0 -0
- /package/src/checkbox/__snapshots__/{Checkbox.spec.js.snap → Checkbox.spec.tsx.snap} +0 -0
- /package/src/drawer/__snapshots__/{Drawer.rtl.spec.js.snap → Drawer.rtl.spec.tsx.snap} +0 -0
- /package/src/logo/{Logo.spec.js → Logo.spec.tsx} +0 -0
- /package/src/logo/__snapshots__/{Logo.spec.js.snap → Logo.spec.tsx.snap} +0 -0
- /package/src/tile/{Tile.story.js → Tile.story.tsx} +0 -0
- /package/src/tile/__snapshots__/{Tile.spec.js.snap → Tile.spec.tsx.snap} +0 -0
- /package/src/tile/{index.js → index.ts} +0 -0
|
@@ -1 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,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC;CACtD;wBA2cwE,CAAC,CAAC,EACzE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,KACrB,KAAK,CAAC,YAAY;AAFvB,wBAEwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeaheadOption.d.ts","sourceRoot":"","sources":["../../../../src/typeahead/typeaheadOption/TypeaheadOption.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TypeaheadOption.d.ts","sourceRoot":"","sources":["../../../../src/typeahead/typeaheadOption/TypeaheadOption.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI;IACpC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,QAAA,MAAM,MAAM,GAAI,CAAC,SAAU,oBAAoB,CAAC,CAAC,CAAC,gCAqBjD,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight.d.ts","sourceRoot":"","sources":["../../../../src/typeahead/util/highlight.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"highlight.d.ts","sourceRoot":"","sources":["../../../../src/typeahead/util/highlight.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,wCAe7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Upload.d.ts","sourceRoot":"","sources":["../../../src/upload/Upload.js"],"names":[],"mappings":";;;;AA2BA;IACE,wBAeC;IAbC,oBAAoB;IACpB,gCAAoB;IAEpB;;;;;;;;;MASC;IAGH,kCAiBC;IAED,8BAMC;IAED,8BAQC;IAED,yBAUC;IAED,qDA6BE;IAEF,4CAQE;IAEF,kDASE;IAEF,8CAKE;IAEF,oCAQE;IAEF,kBASE;IAEF,sCAOE;IAEF,6CAyEE;IAEF,sCA2GC;CACF
|
|
1
|
+
{"version":3,"file":"Upload.d.ts","sourceRoot":"","sources":["../../../src/upload/Upload.js"],"names":[],"mappings":";;;;AA2BA;IACE,wBAeC;IAbC,oBAAoB;IACpB,gCAAoB;IAEpB;;;;;;;;;MASC;IAGH,kCAiBC;IAED,8BAMC;IAED,8BAQC;IAED,yBAUC;IAED,qDA6BE;IAEF,4CAQE;IAEF,kDASE;IAEF,8CAKE;IAEF,oCAQE;IAEF,kBASE;IAEF,sCAOE;IAEF,6CAyEE;IAEF,sCA2GC;CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BA3WyB,OAAO;AAkBjC,wCAAiC;2BAVN,eAAe"}
|
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
2
|
namespace csButtonText {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
let id: string;
|
|
4
|
+
let defaultMessage: string;
|
|
5
5
|
}
|
|
6
6
|
namespace csFailureText {
|
|
7
|
-
|
|
7
|
+
let id_1: string;
|
|
8
8
|
export { id_1 as id };
|
|
9
|
-
|
|
9
|
+
let defaultMessage_1: string;
|
|
10
10
|
export { defaultMessage_1 as defaultMessage };
|
|
11
11
|
}
|
|
12
12
|
namespace csSuccessText {
|
|
13
|
-
|
|
13
|
+
let id_2: string;
|
|
14
14
|
export { id_2 as id };
|
|
15
|
-
|
|
15
|
+
let defaultMessage_2: string;
|
|
16
16
|
export { defaultMessage_2 as defaultMessage };
|
|
17
17
|
}
|
|
18
18
|
namespace csTooLargeMessage {
|
|
19
|
-
|
|
19
|
+
let id_3: string;
|
|
20
20
|
export { id_3 as id };
|
|
21
|
-
|
|
21
|
+
let defaultMessage_3: string;
|
|
22
22
|
export { defaultMessage_3 as defaultMessage };
|
|
23
23
|
}
|
|
24
24
|
namespace csWrongTypeMessage {
|
|
25
|
-
|
|
25
|
+
let id_4: string;
|
|
26
26
|
export { id_4 as id };
|
|
27
|
-
|
|
27
|
+
let defaultMessage_4: string;
|
|
28
28
|
export { defaultMessage_4 as defaultMessage };
|
|
29
29
|
}
|
|
30
30
|
namespace psButtonText {
|
|
31
|
-
|
|
31
|
+
let id_5: string;
|
|
32
32
|
export { id_5 as id };
|
|
33
|
-
|
|
33
|
+
let defaultMessage_5: string;
|
|
34
34
|
export { defaultMessage_5 as defaultMessage };
|
|
35
35
|
}
|
|
36
36
|
namespace psProcessingText {
|
|
37
|
-
|
|
37
|
+
let id_6: string;
|
|
38
38
|
export { id_6 as id };
|
|
39
|
-
|
|
39
|
+
let defaultMessage_6: string;
|
|
40
40
|
export { defaultMessage_6 as defaultMessage };
|
|
41
41
|
}
|
|
42
42
|
namespace usButtonText {
|
|
43
|
-
|
|
43
|
+
let id_7: string;
|
|
44
44
|
export { id_7 as id };
|
|
45
|
-
|
|
45
|
+
let defaultMessage_7: string;
|
|
46
46
|
export { defaultMessage_7 as defaultMessage };
|
|
47
47
|
}
|
|
48
48
|
namespace usDropMessage {
|
|
49
|
-
|
|
49
|
+
let id_8: string;
|
|
50
50
|
export { id_8 as id };
|
|
51
|
-
|
|
51
|
+
let defaultMessage_8: string;
|
|
52
52
|
export { defaultMessage_8 as defaultMessage };
|
|
53
53
|
}
|
|
54
54
|
namespace usPlaceholder {
|
|
55
|
-
|
|
55
|
+
let id_9: string;
|
|
56
56
|
export { id_9 as id };
|
|
57
|
-
|
|
57
|
+
let defaultMessage_9: string;
|
|
58
58
|
export { defaultMessage_9 as defaultMessage };
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -2,18 +2,18 @@ export default CompleteStep;
|
|
|
2
2
|
declare function CompleteStep(props: any): import("react").JSX.Element;
|
|
3
3
|
declare namespace CompleteStep {
|
|
4
4
|
namespace propTypes {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
let csButtonText: any;
|
|
6
|
+
let csSuccessText: any;
|
|
7
|
+
let csFailureText: any;
|
|
8
|
+
let fileName: any;
|
|
9
|
+
let isComplete: any;
|
|
10
|
+
let isError: any;
|
|
11
|
+
let isImage: any;
|
|
12
|
+
let onClear: any;
|
|
13
|
+
let uploadedImage: any;
|
|
14
14
|
}
|
|
15
15
|
namespace defaultProps {
|
|
16
|
-
|
|
16
|
+
let uploadedImage_1: null;
|
|
17
17
|
export { uploadedImage_1 as uploadedImage };
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -11,14 +11,14 @@ declare function MediaUploadStep({ isComplete, usAccept, usButtonText, usDisable
|
|
|
11
11
|
}): import("react").JSX.Element;
|
|
12
12
|
declare namespace MediaUploadStep {
|
|
13
13
|
namespace propTypes {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
let fileDropped: any;
|
|
15
|
+
let isComplete: any;
|
|
16
|
+
let usAccept: any;
|
|
17
|
+
let usButtonText: any;
|
|
18
|
+
let usDisabled: any;
|
|
19
|
+
let usHelpImage: any;
|
|
20
|
+
let usLabel: any;
|
|
21
|
+
let usPlaceholder: any;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=mediaUploadStep.d.ts.map
|
|
@@ -2,14 +2,14 @@ export default ProcessingStep;
|
|
|
2
2
|
declare function ProcessingStep(props: any): import("react").JSX.Element;
|
|
3
3
|
declare namespace ProcessingStep {
|
|
4
4
|
namespace propTypes {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
let isComplete: any;
|
|
6
|
+
let isError: any;
|
|
7
|
+
let isSuccess: any;
|
|
8
|
+
let onAnimationCompleted: any;
|
|
9
|
+
let onClear: any;
|
|
10
|
+
let psButtonText: any;
|
|
11
|
+
let psProcessingText: any;
|
|
12
|
+
let psButtonDisabled: any;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=processingStep.d.ts.map
|
|
@@ -8,15 +8,15 @@ declare class UploadImageStep extends PureComponent<any, any, any> {
|
|
|
8
8
|
}
|
|
9
9
|
declare namespace UploadImageStep {
|
|
10
10
|
namespace propTypes {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
let fileDropped: any;
|
|
12
|
+
let isComplete: any;
|
|
13
|
+
let usAccept: any;
|
|
14
|
+
let usButtonText: any;
|
|
15
|
+
let usDisabled: any;
|
|
16
|
+
let usHelpImage: any;
|
|
17
|
+
let usLabel: any;
|
|
18
|
+
let usPlaceholder: any;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
import { PureComponent } from
|
|
21
|
+
import { PureComponent } from 'react';
|
|
22
22
|
//# sourceMappingURL=uploadImageStep.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadImageStep.d.ts","sourceRoot":"","sources":["../../../../../src/upload/steps/uploadImageStep/uploadImageStep.js"],"names":[],"mappings":";AAIA;IACE,cAGC;IADC,+CAAiC;IAGnC,2BAME;IAEF,oBAgBE;IAEF,sCA8BC;CACF"}
|
|
1
|
+
{"version":3,"file":"uploadImageStep.d.ts","sourceRoot":"","sources":["../../../../../src/upload/steps/uploadImageStep/uploadImageStep.js"],"names":[],"mappings":";AAIA;IACE,cAGC;IADC,+CAAiC;IAGnC,2BAME;IAEF,oBAgBE;IAEF,sCA8BC;CACF;;;;;;;;;;;;;8BAjEwC,OAAO"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
1
|
import { CommonProps } from '../common';
|
|
3
2
|
import { UploadedFile, UploadResponse } from './types';
|
|
4
3
|
import { UploadButtonProps } from './uploadButton/UploadButton';
|
|
@@ -71,6 +70,6 @@ export type UploadInputProps = {
|
|
|
71
70
|
*/
|
|
72
71
|
sizeLimitErrorMessage?: string;
|
|
73
72
|
} & Pick<UploadButtonProps, 'disabled' | 'multiple' | 'fileTypes' | 'sizeLimit' | 'description' | 'id' | 'uploadButtonTitle'> & Pick<UploadItemProps, 'onDownload'> & CommonProps;
|
|
74
|
-
declare const UploadInput: ({ files, fileInputName, className, deleteConfirm, disabled, multiple, fileTypes, sizeLimit, description, onUploadFile, onDeleteFile, onValidationError, onFilesChange, onDownload, maxFiles, maxFilesErrorMessage, id, sizeLimitErrorMessage, uploadButtonTitle, }: UploadInputProps) =>
|
|
73
|
+
declare const UploadInput: ({ files, fileInputName, className, deleteConfirm, disabled, multiple, fileTypes, sizeLimit, description, onUploadFile, onDeleteFile, onValidationError, onFilesChange, onDownload, maxFiles, maxFilesErrorMessage, id, sizeLimitErrorMessage, uploadButtonTitle, }: UploadInputProps) => import("react").JSX.Element;
|
|
75
74
|
export default UploadInput;
|
|
76
75
|
//# sourceMappingURL=UploadInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadInput.d.ts","sourceRoot":"","sources":["../../../src/uploadInput/UploadInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UploadInput.d.ts","sourceRoot":"","sources":["../../../src/uploadInput/UploadInput.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAiC,MAAM,WAAW,CAAC;AAMvE,OAAO,EAAE,YAAY,EAAe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,GACnC,WAAW,CAAC;AAQd,QAAA,MAAM,WAAW,uQAoBd,gBAAgB,gCAwPlB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -13,9 +13,13 @@ export type UploadResponse = {
|
|
|
13
13
|
*/
|
|
14
14
|
url?: string;
|
|
15
15
|
/**
|
|
16
|
-
* Optionally
|
|
16
|
+
* Optionally sets translated error message when a file gets rejected
|
|
17
17
|
*/
|
|
18
18
|
error?: UploadError;
|
|
19
|
+
/**
|
|
20
|
+
* Optionally sets translated error messages when a file gets rejected
|
|
21
|
+
*/
|
|
22
|
+
errors?: UploadError[];
|
|
19
23
|
[key: string]: any;
|
|
20
24
|
};
|
|
21
25
|
export type UploadedFile = {
|
|
@@ -35,6 +39,10 @@ export type UploadedFile = {
|
|
|
35
39
|
* Any API errors. The message should be localized.
|
|
36
40
|
*/
|
|
37
41
|
error?: UploadError;
|
|
42
|
+
/**
|
|
43
|
+
* Any API errors array. The messages should be localized.
|
|
44
|
+
*/
|
|
45
|
+
errors?: UploadError[];
|
|
38
46
|
/**
|
|
39
47
|
* Optional. An external URL where the file can be opened from.
|
|
40
48
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/uploadInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,MAAM,MAAM,WAAW,GACnB;IACE,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GACD,MAAM,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IAEpB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/uploadInput/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,MAAM,MAAM,WAAW,GACnB;IACE,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GACD,MAAM,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IAEpB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IAEvB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FileType } from '../../common';
|
|
3
2
|
type AllowedFileTypes = string | readonly string[] | readonly FileType[];
|
|
4
3
|
export type UploadButtonProps = {
|
|
@@ -40,15 +39,11 @@ export type UploadButtonProps = {
|
|
|
40
39
|
* Title for the upload button
|
|
41
40
|
*/
|
|
42
41
|
uploadButtonTitle?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Are there any uploaded items on a multiple-file upload? Used for calculating border radiuses
|
|
45
|
-
*/
|
|
46
|
-
multipleFileInputWithFilesAdded: boolean;
|
|
47
42
|
};
|
|
48
43
|
export declare enum TEST_IDS {
|
|
49
44
|
uploadInput = "uploadInput",
|
|
50
45
|
mediaBody = "mediaBody"
|
|
51
46
|
}
|
|
52
|
-
declare const UploadButton: ({ disabled, multiple, description, fileTypes, sizeLimit, maxFiles, onChange, id, uploadButtonTitle,
|
|
47
|
+
declare const UploadButton: ({ disabled, multiple, description, fileTypes, sizeLimit, maxFiles, onChange, id, uploadButtonTitle, }: UploadButtonProps) => import("react").JSX.Element;
|
|
53
48
|
export default UploadButton;
|
|
54
49
|
//# sourceMappingURL=UploadButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadButton.d.ts","sourceRoot":"","sources":["../../../../src/uploadInput/uploadButton/UploadButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UploadButton.d.ts","sourceRoot":"","sources":["../../../../src/uploadInput/uploadButton/UploadButton.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAc,MAAM,cAAc,CAAC;AAMpD,KAAK,gBAAgB,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,QAAQ,EAAE,CAAC;AACzE,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IAEpC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,oBAAY,QAAQ;IAClB,WAAW,gBAAgB;IAC3B,SAAS,cAAc;CACxB;AAOD,QAAA,MAAM,YAAY,0GAUf,iBAAiB,gCA6JnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UploadItem.d.ts","sourceRoot":"","sources":["../../../../src/uploadInput/uploadItem/UploadItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UploadItem.d.ts","sourceRoot":"","sources":["../../../../src/uploadInput/uploadItem/UploadItem.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAe,MAAM,UAAU,CAAC;AAKrD,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC,mBAAmB,GAAG;IACtD,IAAI,EAAE,YAAY,CAAC;IACnB;;OAEG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF,oBAAY,QAAQ;IAClB,UAAU,eAAe;IACzB,SAAS,cAAc;CACxB;AAED,QAAA,MAAM,UAAU,iEAMb,eAAe,gCAyHjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { HistoryNavigator } from '../common';
|
|
3
3
|
import { InputProps } from '../inputs/Input';
|
|
4
4
|
import { TextAreaProps } from '../inputs/TextArea';
|
|
@@ -27,9 +27,9 @@ export interface WithDisplayFormatProps<T extends TextElementProps = TextElement
|
|
|
27
27
|
onChange?: (value: string) => void;
|
|
28
28
|
onBlur?: (value: string) => void;
|
|
29
29
|
onFocus?: (value: string) => void;
|
|
30
|
-
render: (renderProps: T) => JSX.Element;
|
|
30
|
+
render: (renderProps: T) => React.JSX.Element;
|
|
31
31
|
}
|
|
32
|
-
declare class WithDisplayFormat<T extends TextElementProps> extends Component<WithDisplayFormatProps<T>, WithDisplayFormatState> {
|
|
32
|
+
declare class WithDisplayFormat<T extends TextElementProps> extends React.Component<WithDisplayFormatProps<T>, WithDisplayFormatState> {
|
|
33
33
|
props: WithDisplayFormatProps<T> & Required<Pick<WithDisplayFormatProps<T>, keyof typeof WithDisplayFormat.defaultProps>>;
|
|
34
34
|
static defaultProps: {
|
|
35
35
|
autoComplete: string;
|
|
@@ -56,7 +56,7 @@ declare class WithDisplayFormat<T extends TextElementProps> extends Component<Wi
|
|
|
56
56
|
handleOnFocus: React.FocusEventHandler<HTMLTextElement>;
|
|
57
57
|
handleDelete: (unformattedValue: string, action: EventType) => string;
|
|
58
58
|
handleCursorPositioning: (action: string) => void;
|
|
59
|
-
render(): JSX.Element;
|
|
59
|
+
render(): React.JSX.Element;
|
|
60
60
|
}
|
|
61
61
|
export default WithDisplayFormat;
|
|
62
62
|
//# sourceMappingURL=WithDisplayFormat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithDisplayFormat.d.ts","sourceRoot":"","sources":["../../../src/withDisplayFormat/WithDisplayFormat.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"WithDisplayFormat.d.ts","sourceRoot":"","sources":["../../../src/withDisplayFormat/WithDisplayFormat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAS7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,KAAK,eAAe,GAA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tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"withNextPortal.d.ts","sourceRoot":"","sources":["../../../src/withNextPortal/withNextPortal.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzE,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,WAET,CAAC,wCAQ1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "46.
|
|
3
|
+
"version": "46.38.0",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -94,9 +94,9 @@
|
|
|
94
94
|
"react-intl": "^6.6.6",
|
|
95
95
|
"rollup": "^4.17.2",
|
|
96
96
|
"storybook": "^7.6.19",
|
|
97
|
-
"@transferwise/
|
|
97
|
+
"@transferwise/less-config": "3.1.0",
|
|
98
98
|
"@wise/components-theming": "1.3.0",
|
|
99
|
-
"@transferwise/
|
|
99
|
+
"@transferwise/neptune-css": "14.10.0"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
|
102
102
|
"@transferwise/icons": "^3.7.0",
|
|
@@ -127,7 +127,6 @@
|
|
|
127
127
|
"merge-props": "^6.0.0",
|
|
128
128
|
"prop-types": "^15.8.1",
|
|
129
129
|
"react-popper": "^2.3.0",
|
|
130
|
-
"react-required-if": "^1.0.3",
|
|
131
130
|
"react-transition-group": "^4.4.5"
|
|
132
131
|
},
|
|
133
132
|
"publishConfig": {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { IdIconProps } from '@transferwise/icons';
|
|
1
2
|
import classNames from 'classnames';
|
|
2
|
-
import {
|
|
3
|
+
import { FC, ReactNode, cloneElement, useId } from 'react';
|
|
3
4
|
|
|
4
5
|
import Body from '../../body';
|
|
5
6
|
import Chevron from '../../chevron';
|
|
@@ -73,7 +74,9 @@ const AccordionItem: FC<AccordionItemProps> = ({
|
|
|
73
74
|
icon,
|
|
74
75
|
theme = 'light',
|
|
75
76
|
}) => {
|
|
76
|
-
const iconElement = icon
|
|
77
|
+
const iconElement = icon
|
|
78
|
+
? cloneElement(icon as React.ReactElement<IdIconProps>, { size: 24 })
|
|
79
|
+
: null;
|
|
77
80
|
const fallbackId = useId();
|
|
78
81
|
const accordionId = id ?? fallbackId;
|
|
79
82
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
|
-
import { ReactChild } from 'react';
|
|
3
2
|
|
|
4
3
|
import ActionButton from '../actionButton';
|
|
5
4
|
import { CommonProps, Priority, PriorityPrimary, PrioritySecondary } from '../common';
|
|
@@ -7,13 +6,13 @@ import Option from '../common/Option';
|
|
|
7
6
|
|
|
8
7
|
export type ActionOptionProps = {
|
|
9
8
|
complex?: boolean;
|
|
10
|
-
content?:
|
|
9
|
+
content?: React.ReactNode;
|
|
11
10
|
disabled?: boolean;
|
|
12
|
-
media?:
|
|
11
|
+
media?: React.ReactNode;
|
|
13
12
|
showMediaAtAllSizes?: boolean;
|
|
14
13
|
onClick: () => void;
|
|
15
|
-
title:
|
|
16
|
-
action:
|
|
14
|
+
title: React.ReactNode;
|
|
15
|
+
action: React.ReactNode;
|
|
17
16
|
priority?: PriorityPrimary | PrioritySecondary;
|
|
18
17
|
showMediaCircle?: boolean;
|
|
19
18
|
isContainerAligned?: boolean;
|
package/src/alert/Alert.tsx
CHANGED
|
@@ -42,7 +42,7 @@ export interface AlertProps {
|
|
|
42
42
|
action?: AlertAction;
|
|
43
43
|
className?: string;
|
|
44
44
|
/** An optional icon. If not provided, we will default the icon to something appropriate for the type */
|
|
45
|
-
icon?: React.
|
|
45
|
+
icon?: React.ReactNode;
|
|
46
46
|
/** Title for the alert component */
|
|
47
47
|
title?: string;
|
|
48
48
|
/** The main body of the alert. Accepts plain text and bold words specified with **double stars */
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MarkdownNodeType } from '../../common';
|
|
2
|
+
import Markdown from '../../markdown';
|
|
3
|
+
|
|
4
|
+
const allowList = [MarkdownNodeType.STRONG];
|
|
5
|
+
|
|
6
|
+
export interface InlineMarkdownProps {
|
|
7
|
+
children?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function InlineMarkdown(props: InlineMarkdownProps) {
|
|
12
|
+
return <Markdown {...props} as="span" allowList={allowList} blockList={undefined} />;
|
|
13
|
+
}
|
package/src/body/Body.tsx
CHANGED
|
@@ -26,9 +26,10 @@ type Props = HTMLAttributes<HTMLSpanElement | HTMLParagraphElement> & {
|
|
|
26
26
|
const Body = forwardRef(function Body(
|
|
27
27
|
{ as: Element = 'div', type = DEFAULT_TYPE, className, ...props }: Props,
|
|
28
28
|
reference: React.ForwardedRef<
|
|
29
|
-
{
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
| {
|
|
30
|
+
[key in typeof Element]: React.ElementRef<key>;
|
|
31
|
+
}[typeof Element]
|
|
32
|
+
| null
|
|
32
33
|
>,
|
|
33
34
|
) {
|
|
34
35
|
const isTypeSupported = bodyTypes.has(type);
|
|
@@ -3,27 +3,21 @@ import { FastFlag as FastFlagIcon } from '@transferwise/icons';
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
|
|
5
5
|
import Card from '.';
|
|
6
|
+
import { CardProps } from './Card';
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
9
|
component: Card,
|
|
9
10
|
title: 'Layouts/Card',
|
|
10
11
|
};
|
|
11
12
|
|
|
12
|
-
const Template = (props) => {
|
|
13
|
+
const Template = (props: Pick<CardProps, 'isExpanded' | 'icon' | 'onClick'>) => {
|
|
13
14
|
const elementType = select('elementType', ['div', 'li'], 'div');
|
|
14
15
|
const title = text('title', 'A card');
|
|
15
16
|
const details = text('details', 'Some details about this card');
|
|
16
17
|
const content = text('content', 'Lorem ipsum dolor sit amet.');
|
|
17
18
|
|
|
18
19
|
return (
|
|
19
|
-
<Card
|
|
20
|
-
as={elementType}
|
|
21
|
-
title={title}
|
|
22
|
-
details={details}
|
|
23
|
-
isExpanded={props.isExpanded}
|
|
24
|
-
icon={props.icon}
|
|
25
|
-
onClick={props.onClick}
|
|
26
|
-
>
|
|
20
|
+
<Card as={elementType} title={title} details={details} {...props}>
|
|
27
21
|
{content}
|
|
28
22
|
</Card>
|
|
29
23
|
);
|
|
@@ -36,13 +30,10 @@ export const Basic = () => {
|
|
|
36
30
|
};
|
|
37
31
|
|
|
38
32
|
export const Multiple = () => {
|
|
39
|
-
const [expandedCardIndex, setExpandedCardIndex] = useState(0);
|
|
33
|
+
const [expandedCardIndex, setExpandedCardIndex] = useState<number | null>(0);
|
|
40
34
|
|
|
41
|
-
const handleOnCardClick = (index) => {
|
|
42
|
-
|
|
43
|
-
return setExpandedCardIndex(null);
|
|
44
|
-
}
|
|
45
|
-
setExpandedCardIndex(index);
|
|
35
|
+
const handleOnCardClick = (index: number) => {
|
|
36
|
+
setExpandedCardIndex(index !== expandedCardIndex ? index : null);
|
|
46
37
|
};
|
|
47
38
|
|
|
48
39
|
return (
|