@transferwise/components 0.0.0-experimental-9f96230 → 0.0.0-experimental-9b505c9
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/accordion/AccordionItem/AccordionItem.js +22 -3
- package/build/accordion/AccordionItem/AccordionItem.js.map +1 -1
- package/build/accordion/AccordionItem/AccordionItem.mjs +22 -3
- package/build/accordion/AccordionItem/AccordionItem.mjs.map +1 -1
- package/build/actionButton/ActionButton.js +22 -1
- package/build/actionButton/ActionButton.js.map +1 -1
- package/build/actionButton/ActionButton.mjs +22 -1
- package/build/actionButton/ActionButton.mjs.map +1 -1
- package/build/actionOption/ActionOption.js +24 -2
- package/build/actionOption/ActionOption.js.map +1 -1
- package/build/actionOption/ActionOption.mjs +24 -2
- package/build/actionOption/ActionOption.mjs.map +1 -1
- package/build/alert/Alert.js +21 -5
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs +21 -5
- package/build/alert/Alert.mjs.map +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.js +25 -2
- package/build/alert/inlineMarkdown/InlineMarkdown.js.map +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.mjs +25 -2
- package/build/alert/inlineMarkdown/InlineMarkdown.mjs.map +1 -1
- package/build/avatar/Avatar.js +25 -9
- package/build/avatar/Avatar.js.map +1 -1
- package/build/avatar/Avatar.mjs +25 -9
- package/build/avatar/Avatar.mjs.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.js +23 -3
- package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.mjs +23 -3
- package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
- package/build/badge/Badge.js +24 -12
- package/build/badge/Badge.js.map +1 -1
- package/build/badge/Badge.mjs +24 -12
- package/build/badge/Badge.mjs.map +1 -1
- package/build/button/Button.js +22 -3
- package/build/button/Button.js.map +1 -1
- package/build/button/Button.mjs +22 -3
- package/build/button/Button.mjs.map +1 -1
- package/build/button/classMap.js +24 -0
- package/build/button/classMap.js.map +1 -1
- package/build/button/classMap.mjs +24 -0
- package/build/button/classMap.mjs.map +1 -1
- package/build/button/legacyUtils/legacyUtils.js +24 -2
- package/build/button/legacyUtils/legacyUtils.js.map +1 -1
- package/build/button/legacyUtils/legacyUtils.mjs +24 -2
- package/build/button/legacyUtils/legacyUtils.mjs.map +1 -1
- package/build/card/Card.js +23 -3
- package/build/card/Card.js.map +1 -1
- package/build/card/Card.mjs +23 -3
- package/build/card/Card.mjs.map +1 -1
- package/build/checkbox/Checkbox.js +23 -1
- package/build/checkbox/Checkbox.js.map +1 -1
- package/build/checkbox/Checkbox.mjs +23 -1
- package/build/checkbox/Checkbox.mjs.map +1 -1
- package/build/chevron/Chevron.js +21 -1
- package/build/chevron/Chevron.js.map +1 -1
- package/build/chevron/Chevron.mjs +21 -1
- package/build/chevron/Chevron.mjs.map +1 -1
- package/build/chips/Chip.js +19 -1
- package/build/chips/Chip.js.map +1 -1
- package/build/chips/Chip.mjs +19 -1
- package/build/chips/Chip.mjs.map +1 -1
- package/build/circularButton/CircularButton.js +24 -5
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.mjs +24 -5
- package/build/circularButton/CircularButton.mjs.map +1 -1
- package/build/common/bottomSheet/BottomSheet.js +3 -2
- package/build/common/bottomSheet/BottomSheet.js.map +1 -1
- package/build/common/bottomSheet/BottomSheet.mjs +3 -2
- package/build/common/bottomSheet/BottomSheet.mjs.map +1 -1
- package/build/common/circle/Circle.js +15 -2
- package/build/common/circle/Circle.js.map +1 -1
- package/build/common/circle/Circle.mjs +15 -2
- package/build/common/circle/Circle.mjs.map +1 -1
- package/build/common/hooks/useHasIntersected/useHasIntersected.js +10 -10
- package/build/common/hooks/useHasIntersected/useHasIntersected.js.map +1 -1
- package/build/common/hooks/useHasIntersected/useHasIntersected.mjs +10 -10
- package/build/common/hooks/useHasIntersected/useHasIntersected.mjs.map +1 -1
- package/build/common/locale/index.js +24 -0
- package/build/common/locale/index.js.map +1 -1
- package/build/common/locale/index.mjs +24 -0
- package/build/common/locale/index.mjs.map +1 -1
- package/build/common/panel/Panel.js +23 -2
- package/build/common/panel/Panel.js.map +1 -1
- package/build/common/panel/Panel.mjs +23 -2
- package/build/common/panel/Panel.mjs.map +1 -1
- package/build/common/responsivePanel/ResponsivePanel.js +27 -3
- package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
- package/build/common/responsivePanel/ResponsivePanel.mjs +27 -3
- package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +22 -3
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +22 -3
- package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
- package/build/dateInput/DateInput.js +22 -5
- package/build/dateInput/DateInput.js.map +1 -1
- package/build/dateInput/DateInput.mjs +22 -5
- package/build/dateInput/DateInput.mjs.map +1 -1
- package/build/dateLookup/DateLookup.js +24 -6
- package/build/dateLookup/DateLookup.js.map +1 -1
- package/build/dateLookup/DateLookup.mjs +24 -6
- package/build/dateLookup/DateLookup.mjs.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.js +26 -5
- package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.mjs +26 -5
- package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.js +19 -3
- package/build/dateLookup/dateTrigger/DateTrigger.js.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.mjs +19 -3
- package/build/dateLookup/dateTrigger/DateTrigger.mjs.map +1 -1
- package/build/decision/Decision.js +24 -3
- package/build/decision/Decision.js.map +1 -1
- package/build/decision/Decision.mjs +24 -3
- package/build/decision/Decision.mjs.map +1 -1
- package/build/definitionList/DefinitionList.js +23 -1
- package/build/definitionList/DefinitionList.js.map +1 -1
- package/build/definitionList/DefinitionList.mjs +23 -1
- package/build/definitionList/DefinitionList.mjs.map +1 -1
- package/build/dimmer/Dimmer.js +24 -2
- package/build/dimmer/Dimmer.js.map +1 -1
- package/build/dimmer/Dimmer.mjs +24 -2
- package/build/dimmer/Dimmer.mjs.map +1 -1
- package/build/display/Display.js +23 -1
- package/build/display/Display.js.map +1 -1
- package/build/display/Display.mjs +23 -1
- package/build/display/Display.mjs.map +1 -1
- package/build/drawer/Drawer.js +22 -3
- package/build/drawer/Drawer.js.map +1 -1
- package/build/drawer/Drawer.mjs +22 -3
- package/build/drawer/Drawer.mjs.map +1 -1
- package/build/field/Field.js +23 -2
- package/build/field/Field.js.map +1 -1
- package/build/field/Field.mjs +23 -2
- package/build/field/Field.mjs.map +1 -1
- package/build/flowNavigation/FlowNavigation.js +19 -2
- package/build/flowNavigation/FlowNavigation.js.map +1 -1
- package/build/flowNavigation/FlowNavigation.mjs +19 -2
- package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
- package/build/header/Header.js +24 -2
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +24 -2
- package/build/header/Header.mjs.map +1 -1
- package/build/i18n/en.json +0 -5
- package/build/i18n/en.json.js +0 -5
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +0 -5
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/image/Image.js +4 -1
- package/build/image/Image.js.map +1 -1
- package/build/image/Image.mjs +4 -1
- package/build/image/Image.mjs.map +1 -1
- package/build/index.js +69 -62
- package/build/index.js.map +1 -1
- package/build/index.mjs +27 -20
- package/build/index.mjs.map +1 -1
- package/build/info/Info.js +21 -3
- package/build/info/Info.js.map +1 -1
- package/build/info/Info.mjs +21 -3
- package/build/info/Info.mjs.map +1 -1
- package/build/inlineAlert/InlineAlert.js +24 -3
- package/build/inlineAlert/InlineAlert.js.map +1 -1
- package/build/inlineAlert/InlineAlert.mjs +24 -3
- package/build/inlineAlert/InlineAlert.mjs.map +1 -1
- package/build/inputs/SearchInput.js +23 -2
- package/build/inputs/SearchInput.js.map +1 -1
- package/build/inputs/SearchInput.mjs +23 -2
- package/build/inputs/SearchInput.mjs.map +1 -1
- package/build/instructionsList/InstructionsList.js +22 -1
- package/build/instructionsList/InstructionsList.js.map +1 -1
- package/build/instructionsList/InstructionsList.mjs +22 -1
- package/build/instructionsList/InstructionsList.mjs.map +1 -1
- package/build/loader/Loader.js +22 -1
- package/build/loader/Loader.js.map +1 -1
- package/build/loader/Loader.mjs +22 -1
- package/build/loader/Loader.mjs.map +1 -1
- package/build/main.css +46 -322
- package/build/markdown/Markdown.js +24 -1
- package/build/markdown/Markdown.js.map +1 -1
- package/build/markdown/Markdown.mjs +24 -1
- package/build/markdown/Markdown.mjs.map +1 -1
- package/build/modal/Modal.js +22 -5
- package/build/modal/Modal.js.map +1 -1
- package/build/modal/Modal.mjs +22 -5
- package/build/modal/Modal.mjs.map +1 -1
- package/build/moneyInput/MoneyInput.js +22 -3
- package/build/moneyInput/MoneyInput.js.map +1 -1
- package/build/moneyInput/MoneyInput.mjs +22 -3
- package/build/moneyInput/MoneyInput.mjs.map +1 -1
- package/build/navigationOption/NavigationOption.js +23 -2
- package/build/navigationOption/NavigationOption.js.map +1 -1
- package/build/navigationOption/NavigationOption.mjs +23 -2
- package/build/navigationOption/NavigationOption.mjs.map +1 -1
- package/build/nudge/Nudge.js +19 -1
- package/build/nudge/Nudge.js.map +1 -1
- package/build/nudge/Nudge.mjs +19 -1
- package/build/nudge/Nudge.mjs.map +1 -1
- package/build/overlayHeader/OverlayHeader.js +19 -1
- package/build/overlayHeader/OverlayHeader.js.map +1 -1
- package/build/overlayHeader/OverlayHeader.mjs +19 -1
- package/build/overlayHeader/OverlayHeader.mjs.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.js +23 -2
- package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.mjs +23 -2
- package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
- package/build/popover/Popover.js +24 -4
- package/build/popover/Popover.js.map +1 -1
- package/build/popover/Popover.mjs +24 -4
- package/build/popover/Popover.mjs.map +1 -1
- package/build/processIndicator/ProcessIndicator.js +22 -1
- package/build/processIndicator/ProcessIndicator.js.map +1 -1
- package/build/processIndicator/ProcessIndicator.mjs +22 -1
- package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
- package/build/progressBar/ProgressBar.js +24 -2
- package/build/progressBar/ProgressBar.js.map +1 -1
- package/build/progressBar/ProgressBar.mjs +24 -2
- package/build/progressBar/ProgressBar.mjs.map +1 -1
- package/build/promoCard/PromoCard.js +22 -2
- package/build/promoCard/PromoCard.js.map +1 -1
- package/build/promoCard/PromoCard.mjs +22 -2
- package/build/promoCard/PromoCard.mjs.map +1 -1
- package/build/promoCard/PromoCardIndicator.js +22 -1
- package/build/promoCard/PromoCardIndicator.js.map +1 -1
- package/build/promoCard/PromoCardIndicator.mjs +22 -1
- package/build/promoCard/PromoCardIndicator.mjs.map +1 -1
- package/build/provider/Provider.js +25 -2
- package/build/provider/Provider.js.map +1 -1
- package/build/provider/Provider.mjs +25 -2
- package/build/provider/Provider.mjs.map +1 -1
- package/build/radio/Radio.js +24 -2
- package/build/radio/Radio.js.map +1 -1
- package/build/radio/Radio.mjs +24 -2
- package/build/radio/Radio.mjs.map +1 -1
- package/build/segmentedControl/SegmentedControl.js +22 -1
- package/build/segmentedControl/SegmentedControl.js.map +1 -1
- package/build/segmentedControl/SegmentedControl.mjs +22 -1
- package/build/segmentedControl/SegmentedControl.mjs.map +1 -1
- package/build/select/Select.js +26 -4
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.mjs +26 -4
- package/build/select/Select.mjs.map +1 -1
- package/build/select/option/Option.js +22 -1
- package/build/select/option/Option.js.map +1 -1
- package/build/select/option/Option.mjs +22 -1
- package/build/select/option/Option.mjs.map +1 -1
- package/build/selectOption/SelectOption.js +24 -6
- package/build/selectOption/SelectOption.js.map +1 -1
- package/build/selectOption/SelectOption.mjs +24 -6
- package/build/selectOption/SelectOption.mjs.map +1 -1
- package/build/statusIcon/StatusIcon.js +26 -8
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +26 -8
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/stepper/Stepper.js +25 -3
- package/build/stepper/Stepper.js.map +1 -1
- package/build/stepper/Stepper.mjs +25 -3
- package/build/stepper/Stepper.mjs.map +1 -1
- package/build/sticky/Sticky.js +25 -2
- package/build/sticky/Sticky.js.map +1 -1
- package/build/sticky/Sticky.mjs +25 -2
- package/build/sticky/Sticky.mjs.map +1 -1
- package/build/styles/avatar/Avatar.css +29 -0
- package/build/styles/badge/Badge.css +6 -0
- package/build/styles/circularButton/CircularButton.css +2 -2
- package/build/styles/common/circle/Circle.css +4 -0
- package/build/styles/main.css +46 -322
- package/build/styles/statusIcon/StatusIcon.css +0 -20
- package/build/summary/Summary.js +21 -5
- package/build/summary/Summary.js.map +1 -1
- package/build/summary/Summary.mjs +21 -5
- package/build/summary/Summary.mjs.map +1 -1
- package/build/tabs/Tabs.js +23 -3
- package/build/tabs/Tabs.js.map +1 -1
- package/build/tabs/Tabs.mjs +23 -3
- package/build/tabs/Tabs.mjs.map +1 -1
- package/build/tile/Tile.js +24 -2
- package/build/tile/Tile.js.map +1 -1
- package/build/tile/Tile.mjs +24 -2
- package/build/tile/Tile.mjs.map +1 -1
- package/build/title/Title.js +23 -1
- package/build/title/Title.js.map +1 -1
- package/build/title/Title.mjs +23 -1
- package/build/title/Title.mjs.map +1 -1
- package/build/tooltip/Tooltip.js +22 -1
- package/build/tooltip/Tooltip.js.map +1 -1
- package/build/tooltip/Tooltip.mjs +22 -1
- package/build/tooltip/Tooltip.mjs.map +1 -1
- package/build/typeahead/Typeahead.js +22 -4
- package/build/typeahead/Typeahead.js.map +1 -1
- package/build/typeahead/Typeahead.mjs +22 -4
- package/build/typeahead/Typeahead.mjs.map +1 -1
- package/build/types/avatar/Avatar.d.ts.map +1 -1
- package/build/types/badge/Badge.d.ts.map +1 -1
- package/build/types/common/circle/Circle.d.ts +1 -1
- package/build/types/common/circle/Circle.d.ts.map +1 -1
- package/build/types/common/fakeEvents.d.ts +23 -0
- package/build/types/common/fakeEvents.d.ts.map +1 -0
- package/build/types/common/hooks/index.d.ts +4 -4
- package/build/types/common/hooks/index.d.ts.map +1 -1
- package/build/types/common/hooks/useConditionalListener/index.d.ts +1 -1
- package/build/types/common/hooks/useConditionalListener/index.d.ts.map +1 -1
- package/build/types/common/hooks/useDirection/index.d.ts +1 -1
- package/build/types/common/hooks/useDirection/index.d.ts.map +1 -1
- package/build/types/common/hooks/useHasIntersected/index.d.ts +1 -1
- package/build/types/common/hooks/useHasIntersected/index.d.ts.map +1 -1
- package/build/types/common/hooks/useHasIntersected/useHasIntersected.d.ts +15 -4
- package/build/types/common/hooks/useHasIntersected/useHasIntersected.d.ts.map +1 -1
- package/build/types/common/index.d.ts +28 -28
- package/build/types/common/index.d.ts.map +1 -1
- package/build/types/common/responsivePanel/index.d.ts +1 -1
- package/build/types/common/responsivePanel/index.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/navigationOption/NavigationOption.d.ts +1 -0
- package/build/types/navigationOption/NavigationOption.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts +7 -3
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/upload/Upload.js +21 -2
- package/build/upload/Upload.js.map +1 -1
- package/build/upload/Upload.mjs +21 -2
- package/build/upload/Upload.mjs.map +1 -1
- package/build/upload/steps/processingStep/processingStep.js +25 -3
- package/build/upload/steps/processingStep/processingStep.js.map +1 -1
- package/build/upload/steps/processingStep/processingStep.mjs +25 -3
- package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.js +23 -3
- package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +23 -3
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
- package/build/uploadInput/UploadInput.js +22 -3
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.mjs +22 -3
- package/build/uploadInput/UploadInput.mjs.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.js +21 -2
- package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.mjs +21 -2
- package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
- package/build/uploadInput/uploadButton/defaults.js +24 -0
- package/build/uploadInput/uploadButton/defaults.js.map +1 -1
- package/build/uploadInput/uploadButton/defaults.mjs +24 -0
- package/build/uploadInput/uploadButton/defaults.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.js +21 -4
- package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.mjs +21 -4
- package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.js +25 -1
- package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.mjs +25 -1
- package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
- package/package.json +3 -3
- package/src/avatar/Avatar.css +29 -0
- package/src/avatar/Avatar.less +12 -0
- package/src/avatar/Avatar.tsx +4 -8
- package/src/avatarWrapper/__snapshots__/AvatarWrapper.spec.tsx.snap +11 -22
- package/src/badge/Badge.css +6 -0
- package/src/badge/Badge.less +6 -0
- package/src/badge/Badge.tsx +1 -11
- package/src/circularButton/CircularButton.css +2 -2
- package/src/circularButton/CircularButton.less +1 -1
- package/src/circularButton/CircularButton.story.tsx +3 -0
- package/src/circularButton/CircularButton.tsx +1 -1
- package/src/circularButton/__snapshots__/CircularButton.spec.tsx.snap +10 -10
- package/src/common/circle/Circle.css +4 -0
- package/src/common/circle/Circle.less +6 -0
- package/src/common/circle/Circle.story.tsx +2 -2
- package/src/common/circle/Circle.tsx +25 -2
- package/src/common/{fakeEvents.js → fakeEvents.ts} +1 -1
- package/src/common/hooks/useHasIntersected/{useHasIntersected.js → useHasIntersected.ts} +20 -11
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +4 -8
- package/src/i18n/en.json +0 -5
- package/src/index.ts +1 -0
- package/src/main.css +46 -322
- package/src/main.less +0 -1
- package/src/navigationOption/{NavigationOption.story.js → NavigationOption.story.tsx} +23 -5
- package/src/navigationOption/NavigationOption.tsx +1 -1
- package/src/overlayHeader/__snapshots__/OverlayHeader.spec.tsx.snap +2 -4
- package/src/promoCard/PromoCard.spec.tsx +1 -1
- package/src/radio/__snapshots__/Radio.rtl.spec.tsx.snap +2 -4
- package/src/statusIcon/StatusIcon.css +0 -20
- package/src/statusIcon/StatusIcon.less +0 -17
- package/src/statusIcon/StatusIcon.spec.tsx +2 -21
- package/src/statusIcon/StatusIcon.story.tsx +32 -1
- package/src/statusIcon/StatusIcon.tsx +11 -10
- package/build/styles/table/Table.css +0 -300
- package/build/types/table/Table.d.ts +0 -24
- package/build/types/table/Table.d.ts.map +0 -1
- package/build/types/table/Table.messages.d.ts +0 -24
- package/build/types/table/Table.messages.d.ts.map +0 -1
- package/build/types/table/TableCell.d.ts +0 -44
- package/build/types/table/TableCell.d.ts.map +0 -1
- package/build/types/table/TableHeader.d.ts +0 -13
- package/build/types/table/TableHeader.d.ts.map +0 -1
- package/build/types/table/TableRow.d.ts +0 -17
- package/build/types/table/TableRow.d.ts.map +0 -1
- package/build/types/table/TableStatusText.d.ts +0 -9
- package/build/types/table/TableStatusText.d.ts.map +0 -1
- package/build/types/table/index.d.ts +0 -6
- package/build/types/table/index.d.ts.map +0 -1
- package/src/common/requirements.js +0 -440
- package/src/table/Table.css +0 -300
- package/src/table/Table.less +0 -361
- package/src/table/Table.messages.ts +0 -24
- package/src/table/Table.spec.tsx +0 -89
- package/src/table/Table.story.tsx +0 -364
- package/src/table/Table.tsx +0 -167
- package/src/table/TableCell.spec.tsx +0 -304
- package/src/table/TableCell.tsx +0 -170
- package/src/table/TableHeader.spec.tsx +0 -55
- package/src/table/TableHeader.tsx +0 -75
- package/src/table/TableRow.spec.tsx +0 -117
- package/src/table/TableRow.tsx +0 -67
- package/src/table/TableStatusText.spec.tsx +0 -53
- package/src/table/TableStatusText.tsx +0 -36
- package/src/table/index.ts +0 -11
- /package/src/common/hooks/{index.js → index.ts} +0 -0
- /package/src/common/hooks/useConditionalListener/{index.js → index.ts} +0 -0
- /package/src/common/hooks/useDirection/{index.js → index.ts} +0 -0
- /package/src/common/hooks/useHasIntersected/{index.js → index.ts} +0 -0
- /package/src/common/{index.js → index.ts} +0 -0
- /package/src/common/responsivePanel/{index.js → index.ts} +0 -0
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { render, screen, within } from '@testing-library/react';
|
|
2
|
-
import TableRow, { TableRowType, TableRowClickableType } from './TableRow';
|
|
3
|
-
import { IntlProvider } from 'react-intl';
|
|
4
|
-
import { userEvent } from '@testing-library/user-event';
|
|
5
|
-
|
|
6
|
-
describe('TableRow Component', () => {
|
|
7
|
-
const mockData = {
|
|
8
|
-
cells: [
|
|
9
|
-
{
|
|
10
|
-
cell: {
|
|
11
|
-
type: 'text',
|
|
12
|
-
text: 'Cell content 1',
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
cell: {
|
|
17
|
-
type: 'text',
|
|
18
|
-
text: 'Cell content 2',
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
} satisfies TableRowType;
|
|
23
|
-
|
|
24
|
-
const mockDataClickable = {
|
|
25
|
-
id: 1,
|
|
26
|
-
cells: mockData.cells,
|
|
27
|
-
} satisfies TableRowClickableType;
|
|
28
|
-
|
|
29
|
-
const handleClick = jest.fn();
|
|
30
|
-
|
|
31
|
-
const renderWithIntl = (component: React.ReactElement) => {
|
|
32
|
-
return render(<IntlProvider locale="en">{component}</IntlProvider>);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
it('renders row', () => {
|
|
36
|
-
renderWithIntl(<TableRow />);
|
|
37
|
-
expect(screen.getByTestId('np-table-row')).toBeInTheDocument();
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it('renders `children` when data is not provided', () => {
|
|
41
|
-
renderWithIntl(
|
|
42
|
-
<TableRow>
|
|
43
|
-
<td>Cell text</td>
|
|
44
|
-
</TableRow>,
|
|
45
|
-
);
|
|
46
|
-
expect(screen.getByText('Cell text')).toBeInTheDocument();
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('renders cells when data is provided', () => {
|
|
50
|
-
renderWithIntl(<TableRow rowData={mockData} />);
|
|
51
|
-
expect(screen.getByText('Cell content 1')).toBeInTheDocument();
|
|
52
|
-
expect(screen.getByText('Cell content 2')).toBeInTheDocument();
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
it('renders correct number of cells', () => {
|
|
56
|
-
renderWithIntl(<TableRow rowData={mockData} />);
|
|
57
|
-
expect(screen.getAllByRole('cell')).toHaveLength(mockData.cells.length);
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
it('renders correct number of cells with chevron when clickable', () => {
|
|
61
|
-
renderWithIntl(<TableRow rowData={mockDataClickable} onRowClick={handleClick} />);
|
|
62
|
-
expect(screen.getAllByRole('cell')).toHaveLength(mockDataClickable.cells.length + 1);
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
it('renders a separator row when `hasSeparator` is passed', () => {
|
|
66
|
-
renderWithIntl(<TableRow rowData={mockData} hasSeparator />);
|
|
67
|
-
expect(screen.getAllByTestId('np-table-row')).toHaveLength(1);
|
|
68
|
-
expect(screen.getAllByTestId('np-table-row--separator')).toHaveLength(1);
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
it('renders correct `colSpan` for separator row', () => {
|
|
72
|
-
renderWithIntl(<TableRow rowData={mockData} hasSeparator />);
|
|
73
|
-
const separatorCell = within(screen.getByTestId('np-table-row--separator')).getByRole('cell');
|
|
74
|
-
expect(separatorCell).toHaveAttribute('colSpan', mockData.cells.length.toString());
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
it('renders correct `colSpan` for separator row with clickable row', () => {
|
|
78
|
-
renderWithIntl(<TableRow rowData={mockDataClickable} hasSeparator onRowClick={handleClick} />);
|
|
79
|
-
const separatorCell = within(screen.getByTestId('np-table-row--separator')).getByRole('cell');
|
|
80
|
-
expect(separatorCell).toHaveAttribute(
|
|
81
|
-
'colSpan',
|
|
82
|
-
(mockDataClickable.cells.length + 1).toString(),
|
|
83
|
-
);
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
it('does not render separator row when `hasSeparator` is not provided', () => {
|
|
87
|
-
renderWithIntl(<TableRow rowData={mockData} />);
|
|
88
|
-
expect(screen.queryByTestId('np-table-row--separator')).not.toBeInTheDocument();
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
it('does not call `onRowClick` when row is not clickable', async () => {
|
|
92
|
-
renderWithIntl(<TableRow rowData={mockData} />);
|
|
93
|
-
await userEvent.click(screen.getByTestId('np-table-row'));
|
|
94
|
-
expect(handleClick).not.toHaveBeenCalled();
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
it('applies the clickable class when row is clickable', () => {
|
|
98
|
-
renderWithIntl(<TableRow rowData={mockDataClickable} onRowClick={handleClick} />);
|
|
99
|
-
expect(screen.getAllByTestId('np-table-row')[0]).toHaveClass('np-table-row--clickable');
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
it('calls `onRowClick` when row is clicked for clickable row', async () => {
|
|
103
|
-
renderWithIntl(<TableRow rowData={mockDataClickable} onRowClick={handleClick} />);
|
|
104
|
-
await userEvent.click(screen.getByTestId('np-table-row'));
|
|
105
|
-
expect(handleClick).toHaveBeenCalledWith(mockDataClickable);
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
it('renders a chevron icon when row is clickable', () => {
|
|
109
|
-
renderWithIntl(<TableRow rowData={mockDataClickable} onRowClick={handleClick} />);
|
|
110
|
-
expect(screen.getByTestId('chevron-up-icon')).toBeInTheDocument();
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
it('does not render a chevron icon when row is not clickable', () => {
|
|
114
|
-
renderWithIntl(<TableRow rowData={mockData} />);
|
|
115
|
-
expect(screen.queryByTestId('chevron-up-icon')).not.toBeInTheDocument();
|
|
116
|
-
});
|
|
117
|
-
});
|
package/src/table/TableRow.tsx
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import TableCell, { TableCellProps } from './TableCell';
|
|
3
|
-
import Chevron from '../chevron';
|
|
4
|
-
import { Position } from '../common';
|
|
5
|
-
import { clsx } from 'clsx';
|
|
6
|
-
|
|
7
|
-
export interface TableRowType {
|
|
8
|
-
cells?: TableCellProps[];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface TableRowClickableType extends TableRowType {
|
|
12
|
-
id: number | string; // `id` is mandatory for clickable rows
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface TableRowProps {
|
|
16
|
-
rowData?: TableRowType | TableRowClickableType;
|
|
17
|
-
hasSeparator?: boolean;
|
|
18
|
-
children?: React.ReactNode;
|
|
19
|
-
onRowClick?: (rowData: TableRowType | TableRowClickableType) => void;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const TableRow = ({ rowData, hasSeparator = false, children, onRowClick }: TableRowProps) => {
|
|
23
|
-
return (
|
|
24
|
-
<>
|
|
25
|
-
<tr
|
|
26
|
-
className={clsx('np-table-row', { 'np-table-row--clickable': !!onRowClick })}
|
|
27
|
-
data-testid="np-table-row"
|
|
28
|
-
role={onRowClick ? 'button' : undefined}
|
|
29
|
-
tabIndex={onRowClick ? 0 : undefined}
|
|
30
|
-
onClick={onRowClick && rowData ? () => onRowClick(rowData) : undefined}
|
|
31
|
-
onKeyDown={({ key }) => {
|
|
32
|
-
if (onRowClick && rowData && key === 'Enter') {
|
|
33
|
-
onRowClick(rowData);
|
|
34
|
-
}
|
|
35
|
-
}}
|
|
36
|
-
>
|
|
37
|
-
{rowData?.cells
|
|
38
|
-
? rowData?.cells?.map((item, index) => {
|
|
39
|
-
const itemIndex = item.cell?.text ? item.cell?.text.concat(index.toString()) : index;
|
|
40
|
-
return <TableCell key={itemIndex} {...item} />;
|
|
41
|
-
})
|
|
42
|
-
: children}
|
|
43
|
-
{onRowClick && (
|
|
44
|
-
<TableCell className="np-table-cell--action">
|
|
45
|
-
<Chevron orientation={Position.RIGHT} />
|
|
46
|
-
</TableCell>
|
|
47
|
-
)}
|
|
48
|
-
</tr>
|
|
49
|
-
{hasSeparator && (
|
|
50
|
-
<tr
|
|
51
|
-
role="presentation"
|
|
52
|
-
className="np-table-row np-table-row--separator"
|
|
53
|
-
data-testid="np-table-row--separator"
|
|
54
|
-
>
|
|
55
|
-
<td
|
|
56
|
-
className="np-table-cell np-table-cell--cosmetic"
|
|
57
|
-
colSpan={onRowClick ? Number(rowData?.cells?.length) + 1 : rowData?.cells?.length}
|
|
58
|
-
>
|
|
59
|
-
<div className="np-table-cell-separator" data-testid="np-table-cell-separator" />
|
|
60
|
-
</td>
|
|
61
|
-
</tr>
|
|
62
|
-
)}
|
|
63
|
-
</>
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export default TableRow;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { render, screen } from '@testing-library/react';
|
|
2
|
-
import TableStatusText, { TableStatusTextProps } from './TableStatusText';
|
|
3
|
-
|
|
4
|
-
describe('TableStatusText Component', () => {
|
|
5
|
-
const renderComponent = (props: Partial<TableStatusTextProps> = {}) => {
|
|
6
|
-
const defaultProps: TableStatusTextProps = {
|
|
7
|
-
text: 'Status Text',
|
|
8
|
-
...props,
|
|
9
|
-
};
|
|
10
|
-
return render(<TableStatusText {...defaultProps} />);
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
it('renders the text and applies the default class', () => {
|
|
14
|
-
renderComponent();
|
|
15
|
-
expect(screen.getByText('Status Text')).toBeInTheDocument();
|
|
16
|
-
expect(screen.getByText('Status Text')).toHaveClass('np-text-body-default');
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('applies the custom class name', () => {
|
|
20
|
-
renderComponent({ className: 'custom-class' });
|
|
21
|
-
expect(screen.getByText('Status Text')).toHaveClass('custom-class');
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it('applies the default typography class when typography is not provided', () => {
|
|
25
|
-
renderComponent();
|
|
26
|
-
expect(screen.getByText('Status Text')).toHaveClass('np-text-body-default');
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
it('applies the typography class when typography equals `default-bold`', () => {
|
|
30
|
-
renderComponent({ typography: 'default-bold' });
|
|
31
|
-
expect(screen.getByText('Status Text')).toHaveClass('np-text-body-default-bold');
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it('does not render any icon when status is not provided', () => {
|
|
35
|
-
renderComponent();
|
|
36
|
-
expect(screen.queryByTestId('check-icon')).not.toBeInTheDocument();
|
|
37
|
-
expect(screen.queryByTestId('alert-icon')).not.toBeInTheDocument();
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it('applies the typography and status classes, renders the error icon when status equals `error`', () => {
|
|
41
|
-
renderComponent({ status: 'error' });
|
|
42
|
-
expect(screen.getByText('Status Text')).toHaveClass('np-text-body-default-bold');
|
|
43
|
-
expect(screen.getByText('Status Text')).toHaveClass('np-table-content--error');
|
|
44
|
-
expect(screen.getByTestId('alert-icon')).toBeInTheDocument();
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it('applies the typography and status classes, renders the success icon when status equals `success`', () => {
|
|
48
|
-
renderComponent({ status: 'success' });
|
|
49
|
-
expect(screen.getByText('Status Text')).toHaveClass('np-text-body-default-bold');
|
|
50
|
-
expect(screen.getByText('Status Text')).toHaveClass('np-table-content--success');
|
|
51
|
-
expect(screen.getByTestId('check-icon')).toBeInTheDocument();
|
|
52
|
-
});
|
|
53
|
-
});
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { AlertCircle, CheckCircle } from '@transferwise/icons';
|
|
2
|
-
import { clsx } from 'clsx';
|
|
3
|
-
|
|
4
|
-
export interface TableStatusTextProps {
|
|
5
|
-
text: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
status?: 'success' | 'error';
|
|
8
|
-
typography?: 'default' | 'default-bold';
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const TableStatusText: React.FC<TableStatusTextProps> = ({
|
|
12
|
-
text,
|
|
13
|
-
className,
|
|
14
|
-
status,
|
|
15
|
-
typography = 'default',
|
|
16
|
-
}: TableStatusTextProps) => {
|
|
17
|
-
let typographyClass = 'np-text-body-default';
|
|
18
|
-
if (status ?? typography === 'default-bold') {
|
|
19
|
-
typographyClass += '-bold';
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<div
|
|
24
|
-
className={clsx(className, typographyClass, {
|
|
25
|
-
'np-table-content--success': status === 'success',
|
|
26
|
-
'np-table-content--error': status === 'error',
|
|
27
|
-
})}
|
|
28
|
-
>
|
|
29
|
-
{text}
|
|
30
|
-
{status === 'success' && <CheckCircle className="tw-icon--status" data-testid="check-icon" />}
|
|
31
|
-
{status === 'error' && <AlertCircle className="tw-icon--status" data-testid="alert-icon" />}
|
|
32
|
-
</div>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export default TableStatusText;
|
package/src/table/index.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { default } from './Table';
|
|
2
|
-
export type { TableProps } from './Table';
|
|
3
|
-
export type { TableRowType, TableRowClickableType } from './TableRow';
|
|
4
|
-
export type { TableHeaderType } from './TableHeader';
|
|
5
|
-
export type {
|
|
6
|
-
TableCellLeading,
|
|
7
|
-
TableCellText,
|
|
8
|
-
TableCellCurrency,
|
|
9
|
-
TableCellStatus,
|
|
10
|
-
TableCellType,
|
|
11
|
-
} from './TableCell';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|