@transferwise/components 46.141.0 β 46.143.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/build/accordion/AccordionItem/AccordionItem.js +1 -1
- package/build/accordion/AccordionItem/AccordionItem.mjs +1 -1
- package/build/actionButton/ActionButton.js +1 -1
- package/build/actionButton/ActionButton.mjs +1 -1
- package/build/actionOption/ActionOption.js +1 -1
- package/build/actionOption/ActionOption.mjs +1 -1
- package/build/alert/Alert.js +1 -1
- package/build/alert/Alert.mjs +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.js +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.mjs +1 -1
- package/build/avatar/Avatar.js +1 -1
- package/build/avatar/Avatar.mjs +1 -1
- package/build/avatarLayout/AvatarLayout.js +16 -2
- package/build/avatarLayout/AvatarLayout.js.map +1 -1
- package/build/avatarLayout/AvatarLayout.mjs +16 -2
- package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
- package/build/avatarView/AvatarView.js +7 -3
- package/build/avatarView/AvatarView.js.map +1 -1
- package/build/avatarView/AvatarView.mjs +7 -3
- package/build/avatarView/AvatarView.mjs.map +1 -1
- package/build/avatarView/Dot.js +8 -0
- package/build/avatarView/Dot.js.map +1 -1
- package/build/avatarView/Dot.mjs +8 -0
- package/build/avatarView/Dot.mjs.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.js +1 -1
- package/build/avatarWrapper/AvatarWrapper.mjs +1 -1
- package/build/badge/Badge.js +1 -1
- package/build/badge/Badge.mjs +1 -1
- package/build/button/Button.js +1 -1
- package/build/button/Button.mjs +1 -1
- package/build/button/LegacyButton.js +1 -1
- package/build/button/LegacyButton.mjs +1 -1
- package/build/button/classMap.js +1 -1
- package/build/button/classMap.mjs +1 -1
- package/build/button/legacyUtils/legacyUtils.js +1 -1
- package/build/button/legacyUtils/legacyUtils.mjs +1 -1
- package/build/card/Card.js +1 -1
- package/build/card/Card.mjs +1 -1
- package/build/checkbox/Checkbox.js +1 -1
- package/build/checkbox/Checkbox.mjs +1 -1
- package/build/chevron/Chevron.js +1 -1
- package/build/chevron/Chevron.mjs +1 -1
- package/build/chips/Chip.js +1 -1
- package/build/chips/Chip.mjs +1 -1
- package/build/circularButton/CircularButton.js +2 -2
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.mjs +2 -2
- package/build/circularButton/CircularButton.mjs.map +1 -1
- package/build/common/bottomSheet/BottomSheet.js +2 -2
- package/build/common/bottomSheet/BottomSheet.js.map +1 -1
- package/build/common/bottomSheet/BottomSheet.mjs +2 -2
- package/build/common/bottomSheet/BottomSheet.mjs.map +1 -1
- package/build/common/circle/Circle.js +8 -4
- package/build/common/circle/Circle.js.map +1 -1
- package/build/common/circle/Circle.mjs +8 -4
- package/build/common/circle/Circle.mjs.map +1 -1
- package/build/common/hooks/useLayout/useLayout.js +6 -6
- package/build/common/hooks/useLayout/useLayout.js.map +1 -1
- package/build/common/hooks/useLayout/useLayout.mjs +1 -1
- package/build/common/hooks/useLayout/useLayout.mjs.map +1 -1
- package/build/common/hooks/useScreenSize.js.map +1 -1
- package/build/common/hooks/useScreenSize.mjs.map +1 -1
- package/build/common/panel/Panel.js +1 -1
- package/build/common/panel/Panel.mjs +1 -1
- package/build/common/responsivePanel/ResponsivePanel.js +1 -1
- package/build/common/responsivePanel/ResponsivePanel.mjs +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +1 -1
- package/build/dateInput/DateInput.js +1 -1
- package/build/dateInput/DateInput.mjs +1 -1
- package/build/dateLookup/DateLookup.js +2 -2
- package/build/dateLookup/DateLookup.js.map +1 -1
- package/build/dateLookup/DateLookup.mjs +1 -1
- package/build/dateLookup/DateLookup.mjs.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.js +1 -1
- package/build/dateLookup/dateHeader/DateHeader.mjs +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.js +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.mjs +1 -1
- package/build/decision/Decision.js +3 -3
- package/build/decision/Decision.js.map +1 -1
- package/build/decision/Decision.mjs +1 -1
- package/build/decision/Decision.mjs.map +1 -1
- package/build/definitionList/DefinitionList.js +1 -1
- package/build/definitionList/DefinitionList.mjs +1 -1
- package/build/dimmer/Dimmer.js +1 -1
- package/build/dimmer/Dimmer.mjs +1 -1
- package/build/display/Display.js +1 -1
- package/build/display/Display.mjs +1 -1
- package/build/drawer/Drawer.js +1 -1
- package/build/drawer/Drawer.mjs +1 -1
- package/build/expressiveMoneyInput/amountInput/AmountInput.js +1 -1
- package/build/expressiveMoneyInput/amountInput/AmountInput.js.map +1 -1
- package/build/expressiveMoneyInput/amountInput/AmountInput.mjs +1 -1
- package/build/expressiveMoneyInput/amountInput/AmountInput.mjs.map +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs +1 -1
- package/build/field/Field.js +64 -33
- package/build/field/Field.js.map +1 -1
- package/build/field/Field.messages.js +14 -0
- package/build/field/Field.messages.js.map +1 -0
- package/build/field/Field.messages.mjs +10 -0
- package/build/field/Field.messages.mjs.map +1 -0
- package/build/field/Field.mjs +66 -35
- package/build/field/Field.mjs.map +1 -1
- package/build/flowNavigation/FlowNavigation.js +3 -3
- package/build/flowNavigation/FlowNavigation.js.map +1 -1
- package/build/flowNavigation/FlowNavigation.mjs +1 -1
- package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
- package/build/header/Header.js +1 -1
- package/build/header/Header.mjs +1 -1
- package/build/i18n/en.json +1 -0
- package/build/i18n/en.json.js +1 -0
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +1 -0
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/image/Image.js +1 -1
- package/build/image/Image.mjs +1 -1
- package/build/index.js +2 -2
- package/build/index.mjs +1 -1
- package/build/info/Info.js +1 -1
- package/build/info/Info.mjs +1 -1
- package/build/inlineAlert/InlineAlert.js +1 -1
- package/build/inlineAlert/InlineAlert.mjs +1 -1
- package/build/inputs/SearchInput.js +1 -1
- package/build/inputs/SearchInput.mjs +1 -1
- package/build/inputs/SelectInput/SelectInput.js +2 -2
- package/build/inputs/SelectInput/SelectInput.js.map +1 -1
- package/build/inputs/SelectInput/SelectInput.mjs +1 -1
- package/build/inputs/SelectInput/SelectInput.mjs.map +1 -1
- package/build/inputs/TextArea.js +5 -0
- package/build/inputs/TextArea.js.map +1 -1
- package/build/inputs/TextArea.mjs +6 -1
- package/build/inputs/TextArea.mjs.map +1 -1
- package/build/inputs/contexts.js +16 -0
- package/build/inputs/contexts.js.map +1 -1
- package/build/inputs/contexts.mjs +16 -2
- package/build/inputs/contexts.mjs.map +1 -1
- package/build/instructionsList/InstructionsList.js +1 -1
- package/build/instructionsList/InstructionsList.mjs +1 -1
- package/build/link/Link.js +1 -1
- package/build/link/Link.mjs +1 -1
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.js +1 -1
- package/build/listItem/AdditionalInfo/ListItemAdditionalInfo.mjs +1 -1
- package/build/listItem/ListItem.js +1 -1
- package/build/listItem/ListItem.mjs +1 -1
- package/build/listItem/Prompt/ListItemPrompt.js +1 -1
- package/build/listItem/Prompt/ListItemPrompt.mjs +1 -1
- package/build/loader/Loader.js +1 -1
- package/build/loader/Loader.mjs +1 -1
- package/build/logo/Logo.js +3 -3
- package/build/logo/Logo.js.map +1 -1
- package/build/logo/Logo.mjs +2 -2
- package/build/logo/Logo.mjs.map +1 -1
- package/build/main.css +350 -402
- package/build/markdown/Markdown.js +1 -1
- package/build/markdown/Markdown.mjs +1 -1
- package/build/modal/Modal.js +3 -3
- package/build/modal/Modal.js.map +1 -1
- package/build/modal/Modal.mjs +3 -3
- package/build/modal/Modal.mjs.map +1 -1
- package/build/moneyInput/MoneyInput.js +1 -1
- package/build/moneyInput/MoneyInput.mjs +1 -1
- package/build/navigationOption/NavigationOption.js +1 -1
- package/build/navigationOption/NavigationOption.mjs +1 -1
- package/build/nudge/Nudge.js +1 -1
- package/build/nudge/Nudge.mjs +1 -1
- package/build/overlayHeader/OverlayHeader.js +1 -1
- package/build/overlayHeader/OverlayHeader.mjs +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.js +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.mjs +1 -1
- package/build/popover/Popover.js +1 -1
- package/build/popover/Popover.mjs +1 -1
- package/build/processIndicator/ProcessIndicator.js +1 -1
- package/build/processIndicator/ProcessIndicator.mjs +1 -1
- package/build/progressBar/ProgressBar.js +1 -1
- package/build/progressBar/ProgressBar.mjs +1 -1
- package/build/promoCard/PromoCard.js +1 -1
- package/build/promoCard/PromoCard.mjs +1 -1
- package/build/promoCard/PromoCardIndicator.js +1 -1
- package/build/promoCard/PromoCardIndicator.mjs +1 -1
- package/build/prompt/ActionPrompt/ActionPrompt.js +2 -2
- package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -1
- package/build/prompt/ActionPrompt/ActionPrompt.mjs +2 -2
- package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -1
- package/build/prompt/CriticalBanner/CriticalBanner.js +2 -2
- package/build/prompt/CriticalBanner/CriticalBanner.js.map +1 -1
- package/build/prompt/CriticalBanner/CriticalBanner.mjs +1 -1
- package/build/prompt/InfoPrompt/InfoPrompt.js +1 -1
- package/build/prompt/InfoPrompt/InfoPrompt.mjs +1 -1
- package/build/prompt/InlinePrompt/InlinePrompt.js +1 -1
- package/build/prompt/InlinePrompt/InlinePrompt.mjs +1 -1
- package/build/provider/Provider.js +1 -1
- package/build/provider/Provider.mjs +1 -1
- package/build/radio/Radio.js +1 -1
- package/build/radio/Radio.mjs +1 -1
- package/build/segmentedControl/SegmentedControl.js +1 -1
- package/build/segmentedControl/SegmentedControl.mjs +1 -1
- package/build/select/Select.js +1 -1
- package/build/select/Select.mjs +1 -1
- package/build/select/option/Option.js +1 -1
- package/build/select/option/Option.mjs +1 -1
- package/build/statusIcon/StatusIcon.js +2 -2
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +2 -2
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/stepper/Stepper.js +1 -1
- package/build/stepper/Stepper.mjs +1 -1
- package/build/sticky/Sticky.js +1 -1
- package/build/sticky/Sticky.mjs +1 -1
- package/build/styles/accordion/Accordion.css +1 -1
- package/build/styles/avatarView/AvatarView.css +4 -4
- package/build/styles/avatarView/Dot.css +4 -4
- package/build/styles/card/Card.css +2 -2
- package/build/styles/carousel/Carousel.css +5 -5
- package/build/styles/common/Option/Option.css +2 -4
- package/build/styles/common/baseCard/BaseCard.css +1 -1
- package/build/styles/container/Container.css +3 -3
- package/build/styles/criticalBanner/CriticalCommsBanner.css +1 -1
- package/build/styles/css/accordion.css +4 -4
- package/build/styles/css/button-groups.css +6 -6
- package/build/styles/css/buttons.css +1 -1
- package/build/styles/css/circles.css +1 -1
- package/build/styles/css/column-layout.css +4 -4
- package/build/styles/css/decision.css +4 -4
- package/build/styles/css/dropdowns.css +10 -10
- package/build/styles/css/droppable.css +8 -8
- package/build/styles/css/flex.css +13 -15
- package/build/styles/css/footer.css +3 -3
- package/build/styles/css/grid.css +19 -19
- package/build/styles/css/input-groups.css +12 -12
- package/build/styles/css/list-group.css +8 -8
- package/build/styles/css/modals.css +6 -6
- package/build/styles/css/navbar.css +62 -62
- package/build/styles/css/navs.css +2 -2
- package/build/styles/css/neptune.css +274 -328
- package/build/styles/css/panels.css +9 -9
- package/build/styles/css/popovers.css +13 -13
- package/build/styles/css/select.css +1 -1
- package/build/styles/css/sequences.css +6 -6
- package/build/styles/css/table.css +6 -6
- package/build/styles/css/utilities.css +8 -20
- package/build/styles/css/wells.css +4 -18
- package/build/styles/dateInput/DateInput.css +1 -1
- package/build/styles/definitionList/DefinitionList.css +2 -2
- package/build/styles/drawer/Drawer.css +2 -2
- package/build/styles/expressiveMoneyInput/ExpressiveMoneyInput.css +2 -0
- package/build/styles/expressiveMoneyInput/amountInput/AmountInput.css +2 -0
- package/build/styles/field/Field.css +19 -3
- package/build/styles/flowNavigation/FlowNavigation.css +1 -1
- package/build/styles/inputs/Input.css +3 -3
- package/build/styles/inputs/SelectInput/Options/SelectInputOptions.css +2 -2
- package/build/styles/inputs/SelectInput/SelectInput.css +2 -2
- package/build/styles/inputs/TextArea.css +3 -3
- package/build/styles/less/legacy-variables.less +34 -47
- package/build/styles/main.css +350 -402
- package/build/styles/modal/Modal.css +7 -20
- package/build/styles/overlayHeader/OverlayHeader.css +1 -1
- package/build/styles/popover/Popover.css +3 -3
- package/build/styles/promoCard/PromoCard.css +1 -1
- package/build/styles/prompt/ActionPrompt/ActionPrompt.css +1 -1
- package/build/styles/prompt/CriticalBanner/CriticalBanner.css +1 -1
- package/build/styles/prompt/PrimitivePrompt/PrimitivePrompt.css +1 -1
- package/build/styles/props/custom-media.css +23 -11
- package/build/styles/snackbar/Snackbar.css +2 -2
- package/build/styles/stepper/Stepper.css +2 -2
- package/build/styles/styles/less/accordion.css +4 -4
- package/build/styles/styles/less/button-groups.css +6 -6
- package/build/styles/styles/less/buttons.css +1 -1
- package/build/styles/styles/less/circles.css +1 -1
- package/build/styles/styles/less/column-layout.css +4 -4
- package/build/styles/styles/less/decision.css +4 -4
- package/build/styles/styles/less/dropdowns.css +10 -10
- package/build/styles/styles/less/droppable.css +8 -8
- package/build/styles/styles/less/flex.css +13 -15
- package/build/styles/styles/less/footer.css +3 -3
- package/build/styles/styles/less/forms/bootstrap-forms.css +9 -9
- package/build/styles/styles/less/grid.css +19 -19
- package/build/styles/styles/less/input-groups.css +12 -12
- package/build/styles/styles/less/list-group.css +8 -8
- package/build/styles/styles/less/modals.css +6 -6
- package/build/styles/styles/less/navbar.css +62 -62
- package/build/styles/styles/less/navs.css +2 -2
- package/build/styles/styles/less/neptune.css +274 -328
- package/build/styles/styles/less/panels.css +9 -9
- package/build/styles/styles/less/popovers.css +13 -13
- package/build/styles/styles/less/select.css +1 -1
- package/build/styles/styles/less/sequences.css +6 -6
- package/build/styles/styles/less/table.css +6 -6
- package/build/styles/styles/less/utilities.css +8 -20
- package/build/styles/styles/less/wells.css +4 -18
- package/build/styles/styles/props/custom-media.css +1 -11
- package/build/styles/table/Table.css +1 -1
- package/build/styles/tabs/Tabs.css +2 -2
- package/build/styles/typeahead/Typeahead.css +1 -1
- package/build/summary/Summary.js +1 -1
- package/build/summary/Summary.mjs +1 -1
- package/build/table/Table.js +1 -1
- package/build/table/Table.mjs +1 -1
- package/build/table/TableRow.js +1 -1
- package/build/table/TableRow.mjs +1 -1
- package/build/table/TableStatusText.js +1 -1
- package/build/table/TableStatusText.mjs +1 -1
- package/build/tabs/Tabs.js +1 -1
- package/build/tabs/Tabs.mjs +1 -1
- package/build/tile/Tile.js +1 -1
- package/build/tile/Tile.mjs +1 -1
- package/build/title/Title.js +1 -1
- package/build/title/Title.mjs +1 -1
- package/build/tooltip/Tooltip.js +1 -1
- package/build/tooltip/Tooltip.mjs +1 -1
- package/build/typeahead/Typeahead.js +1 -1
- package/build/typeahead/Typeahead.mjs +1 -1
- package/build/types/avatarView/AvatarView.d.ts +1 -1
- package/build/types/avatarView/AvatarView.d.ts.map +1 -1
- package/build/types/avatarView/Dot.d.ts.map +1 -1
- package/build/types/circularButton/CircularButton.d.ts.map +1 -1
- package/build/types/common/bottomSheet/BottomSheet.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/hooks/useScreenSize.d.ts +1 -1
- package/build/types/common/hooks/useScreenSize.d.ts.map +1 -1
- package/build/types/common/index.d.ts +1 -1
- package/build/types/common/index.d.ts.map +1 -1
- package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/decision/Decision.d.ts.map +1 -1
- package/build/types/field/Field.d.ts.map +1 -1
- package/build/types/field/Field.messages.d.ts +8 -0
- package/build/types/field/Field.messages.d.ts.map +1 -0
- package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
- package/build/types/index.d.ts +2 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inputs/TextArea.d.ts.map +1 -1
- package/build/types/inputs/contexts.d.ts +6 -0
- package/build/types/inputs/contexts.d.ts.map +1 -1
- package/build/types/logo/Logo.d.ts +1 -1
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/types/test-utils/index.d.ts +2 -0
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/build/upload/Upload.js +1 -1
- package/build/upload/Upload.mjs +1 -1
- package/build/upload/steps/completeStep/completeStep.js +1 -1
- package/build/upload/steps/completeStep/completeStep.mjs +1 -1
- package/build/upload/steps/processingStep/processingStep.js +1 -1
- package/build/upload/steps/processingStep/processingStep.mjs +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.js +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +1 -1
- package/build/uploadInput/UploadInput.js +1 -1
- package/build/uploadInput/UploadInput.mjs +1 -1
- package/build/uploadInput/uploadButton/UploadButton.js +1 -1
- package/build/uploadInput/uploadButton/UploadButton.mjs +1 -1
- package/build/uploadInput/uploadButton/defaults.js +1 -1
- package/build/uploadInput/uploadButton/defaults.mjs +1 -1
- package/build/uploadInput/uploadItem/UploadItem.js +1 -1
- package/build/uploadInput/uploadItem/UploadItem.mjs +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.js +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.mjs +1 -1
- package/package.json +3 -3
- package/src/accordion/Accordion.css +1 -1
- package/src/avatarLayout/AvatarLayout.story.tsx +1 -1
- package/src/avatarLayout/AvatarLayout.tsx +4 -0
- package/src/avatarView/AvatarView.css +4 -4
- package/src/avatarView/AvatarView.story.tsx +17 -13
- package/src/avatarView/AvatarView.tsx +5 -1
- package/src/avatarView/Dot.css +4 -4
- package/src/avatarView/Dot.less +6 -6
- package/src/avatarView/Dot.tsx +2 -0
- package/src/card/Card.css +2 -2
- package/src/carousel/Carousel.css +5 -5
- package/src/carousel/Carousel.less +3 -3
- package/src/circularButton/CircularButton.tsx +3 -2
- package/src/common/Option/Option.css +2 -4
- package/src/common/Option/Option.less +2 -4
- package/src/common/baseCard/BaseCard.css +1 -1
- package/src/common/bottomSheet/BottomSheet.tsx +2 -2
- package/src/common/circle/Circle.tsx +7 -3
- package/src/common/hooks/useLayout/useLayout.ts +1 -1
- package/src/common/hooks/useScreenSize.ts +1 -1
- package/src/common/index.ts +1 -1
- package/src/common/responsivePanel/ResponsivePanel.test.js +3 -2
- package/src/container/Container.css +3 -3
- package/src/criticalBanner/CriticalCommsBanner.css +1 -1
- package/src/dateInput/DateInput.css +1 -1
- package/src/dateLookup/DateLookup.tsx +1 -1
- package/src/decision/Decision.test.tsx +2 -1
- package/src/decision/Decision.tsx +2 -1
- package/src/definitionList/DefinitionList.css +2 -2
- package/src/definitionList/DefinitionList.less +2 -2
- package/src/drawer/Drawer.css +2 -2
- package/src/drawer/Drawer.less +4 -3
- package/src/expressiveMoneyInput/ExpressiveMoneyInput.css +2 -0
- package/src/expressiveMoneyInput/ExpressiveMoneyInput.test.story.tsx +43 -0
- package/src/expressiveMoneyInput/amountInput/AmountInput.css +2 -0
- package/src/expressiveMoneyInput/amountInput/AmountInput.less +2 -0
- package/src/expressiveMoneyInput/amountInput/AmountInput.tsx +1 -1
- package/src/field/Field.css +19 -3
- package/src/field/Field.less +17 -3
- package/src/field/Field.messages.ts +8 -0
- package/src/field/Field.story.tsx +5 -1
- package/src/field/Field.test.tsx +90 -0
- package/src/field/Field.tsx +84 -37
- package/src/flowNavigation/FlowNavigation.css +1 -1
- package/src/flowNavigation/FlowNavigation.less +2 -1
- package/src/flowNavigation/FlowNavigation.story.tsx +6 -3
- package/src/flowNavigation/FlowNavigation.test.js +1 -1
- package/src/flowNavigation/FlowNavigation.tsx +2 -1
- package/src/i18n/en.json +1 -0
- package/src/index.ts +1 -1
- package/src/inputs/Input.css +3 -3
- package/src/inputs/SelectInput/Options/SelectInputOptions.css +2 -2
- package/src/inputs/SelectInput/SelectInput.css +2 -2
- package/src/inputs/SelectInput/SelectInput.tsx +1 -1
- package/src/inputs/TextArea.css +3 -3
- package/src/inputs/TextArea.story.tsx +97 -0
- package/src/inputs/TextArea.test.story.tsx +142 -0
- package/src/inputs/TextArea.tsx +7 -2
- package/src/inputs/contexts.tsx +18 -1
- package/src/logo/Logo.tsx +1 -1
- package/src/main.css +350 -402
- package/src/modal/Modal.css +7 -20
- package/src/modal/Modal.less +7 -19
- package/src/modal/Modal.tsx +2 -2
- package/src/overlayHeader/OverlayHeader.css +1 -1
- package/src/overlayHeader/OverlayHeader.less +3 -2
- package/src/popover/Popover.css +3 -3
- package/src/popover/Popover.test.tsx +2 -1
- package/src/promoCard/PromoCard.css +1 -1
- package/src/prompt/ActionPrompt/ActionPrompt.css +1 -1
- package/src/prompt/ActionPrompt/ActionPrompt.less +1 -1
- package/src/prompt/ActionPrompt/ActionPrompt.test.tsx +37 -6
- package/src/prompt/ActionPrompt/ActionPrompt.tsx +3 -2
- package/src/prompt/CriticalBanner/CriticalBanner.css +1 -1
- package/src/prompt/CriticalBanner/CriticalBanner.less +2 -2
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.css +1 -1
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.less +1 -1
- package/src/select/Select.test.tsx +1 -1
- package/src/snackbar/Snackbar.css +2 -2
- package/src/statusIcon/StatusIcon.tsx +3 -2
- package/src/stepper/Stepper.css +2 -2
- package/src/styles/less/accordion.css +4 -4
- package/src/styles/less/addons/_display-utilities.less +13 -27
- package/src/styles/less/button-groups.css +6 -6
- package/src/styles/less/buttons.css +1 -1
- package/src/styles/less/circles.css +1 -1
- package/src/styles/less/column-layout.css +4 -4
- package/src/styles/less/core/_typography-utilities.less +10 -22
- package/src/styles/less/core/_typography.less +28 -6
- package/src/styles/less/decision.css +4 -4
- package/src/styles/less/dropdowns.css +10 -10
- package/src/styles/less/droppable.css +8 -8
- package/src/styles/less/flex.css +13 -15
- package/src/styles/less/flex.less +1 -3
- package/src/styles/less/footer.css +3 -3
- package/src/styles/less/forms/bootstrap-forms.css +9 -9
- package/src/styles/less/forms/bootstrap-forms.less +1 -1
- package/src/styles/less/grid.css +19 -19
- package/src/styles/less/input-groups.css +12 -12
- package/src/styles/less/list-group.css +8 -8
- package/src/styles/less/modals.css +6 -6
- package/src/styles/less/modals.less +4 -4
- package/src/styles/less/navbar.css +62 -62
- package/src/styles/less/navbar.less +2 -2
- package/src/styles/less/navs.css +2 -2
- package/src/styles/less/neptune.bundle.less +1 -0
- package/src/styles/less/neptune.css +274 -328
- package/src/styles/less/panels.css +9 -9
- package/src/styles/less/popovers.css +13 -13
- package/src/styles/less/popovers.less +6 -6
- package/src/styles/less/select.css +1 -1
- package/src/styles/less/sequences.css +6 -6
- package/src/styles/less/table.css +6 -6
- package/src/styles/less/table.less +1 -1
- package/src/styles/less/utilities.css +8 -20
- package/src/styles/less/utilities.less +6 -14
- package/src/styles/less/wells.css +4 -18
- package/src/styles/less/wells.less +3 -5
- package/src/styles/props/custom-media.css +1 -11
- package/src/styles/variables/legacy-variables.less +4 -47
- package/src/table/Table.css +1 -1
- package/src/tabs/Tabs.css +2 -2
- package/src/textareaWithDisplayFormat/TextareaWithDisplayFormat.story.tsx +1 -0
- package/src/typeahead/Typeahead.css +1 -1
- package/src/uploadInput/uploadItem/UploadItem.less +2 -2
- package/build/common/propsValues/breakpoint.js +0 -12
- package/build/common/propsValues/breakpoint.js.map +0 -1
- package/build/common/propsValues/breakpoint.mjs +0 -12
- package/build/common/propsValues/breakpoint.mjs.map +0 -1
- package/build/types/common/propsValues/breakpoint.d.ts +0 -9
- package/build/types/common/propsValues/breakpoint.d.ts.map +0 -1
- package/src/common/propsValues/breakpoint.ts +0 -8
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
3
|
+
|
|
4
|
+
import { Field } from '../field/Field';
|
|
5
|
+
import { Sentiment } from '../common';
|
|
6
|
+
import { TextArea } from './TextArea';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* TextArea must be the only input with `maxLength` inside a given Field.
|
|
10
|
+
* The character counter uses shared context β multiple TextAreas with maxLength
|
|
11
|
+
* in the same Field will race to set the counter state.
|
|
12
|
+
*/
|
|
13
|
+
const meta: Meta<typeof TextArea> = {
|
|
14
|
+
title: 'Forms/TextArea',
|
|
15
|
+
component: TextArea,
|
|
16
|
+
argTypes: {
|
|
17
|
+
value: {
|
|
18
|
+
control: 'text',
|
|
19
|
+
},
|
|
20
|
+
maxLength: {
|
|
21
|
+
control: 'number',
|
|
22
|
+
},
|
|
23
|
+
placeholder: {
|
|
24
|
+
control: 'text',
|
|
25
|
+
},
|
|
26
|
+
disabled: {
|
|
27
|
+
control: 'boolean',
|
|
28
|
+
},
|
|
29
|
+
rows: {
|
|
30
|
+
control: 'number',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default meta;
|
|
36
|
+
type Story = StoryObj<typeof TextArea>;
|
|
37
|
+
|
|
38
|
+
/** Explore all props via the controls panel. */
|
|
39
|
+
export const Playground: Story = {
|
|
40
|
+
args: {
|
|
41
|
+
value: '',
|
|
42
|
+
maxLength: 200,
|
|
43
|
+
placeholder: 'Type something...',
|
|
44
|
+
},
|
|
45
|
+
render: (args) => {
|
|
46
|
+
const [value, setValue] = useState(args.value ?? '');
|
|
47
|
+
useEffect(() => setValue(args.value ?? ''), [args.value]);
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<Field label="Message" required={false}>
|
|
51
|
+
<TextArea {...args} value={value} onChange={({ target }) => setValue(target.value)} />
|
|
52
|
+
</Field>
|
|
53
|
+
);
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const Basic: Story = {
|
|
58
|
+
render: () => {
|
|
59
|
+
const [value, setValue] = useState('');
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<Field label="Message" required={false}>
|
|
63
|
+
<TextArea maxLength={200} value={value} onChange={({ target }) => setValue(target.value)} />
|
|
64
|
+
</Field>
|
|
65
|
+
);
|
|
66
|
+
},
|
|
67
|
+
parameters: {
|
|
68
|
+
docs: {
|
|
69
|
+
source: {
|
|
70
|
+
code: `<Field label="Message" required={false}>
|
|
71
|
+
<TextArea
|
|
72
|
+
maxLength={200}
|
|
73
|
+
value={value}
|
|
74
|
+
onChange={({ target }) => setValue(target.value)}
|
|
75
|
+
/>
|
|
76
|
+
</Field>`,
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const WithError: Story = {
|
|
83
|
+
render: () => {
|
|
84
|
+
const [value, setValue] = useState('');
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<Field
|
|
88
|
+
label="Message"
|
|
89
|
+
required={false}
|
|
90
|
+
sentiment={Sentiment.NEGATIVE}
|
|
91
|
+
message="You have exceeded the character limit"
|
|
92
|
+
>
|
|
93
|
+
<TextArea maxLength={200} value={value} onChange={({ target }) => setValue(target.value)} />
|
|
94
|
+
</Field>
|
|
95
|
+
);
|
|
96
|
+
},
|
|
97
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { userEvent, within } from 'storybook/test';
|
|
3
|
+
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
4
|
+
|
|
5
|
+
import { Field } from '../field/Field';
|
|
6
|
+
import { TextArea } from './TextArea';
|
|
7
|
+
|
|
8
|
+
const meta: Meta<typeof TextArea> = {
|
|
9
|
+
title: 'Forms/TextArea/Tests',
|
|
10
|
+
component: TextArea,
|
|
11
|
+
tags: ['!autodocs', '!manifest'],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
type Story = StoryObj<typeof TextArea>;
|
|
16
|
+
|
|
17
|
+
export const AsciiCharacters: Story = {
|
|
18
|
+
name: 'counter at limit with ASCII input',
|
|
19
|
+
render: () => {
|
|
20
|
+
const [value, setValue] = useState('');
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Field label="Message" required={false}>
|
|
24
|
+
<TextArea maxLength={10} value={value} onChange={({ target }) => setValue(target.value)} />
|
|
25
|
+
</Field>
|
|
26
|
+
);
|
|
27
|
+
},
|
|
28
|
+
play: async ({ canvasElement }) => {
|
|
29
|
+
const canvas = within(canvasElement);
|
|
30
|
+
await userEvent.type(canvas.getByRole('textbox'), '0123456789');
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const EmojiCharacters: Story = {
|
|
35
|
+
name: 'counter with emoji input',
|
|
36
|
+
render: () => {
|
|
37
|
+
const [value, setValue] = useState('');
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<Field label="Message" required={false}>
|
|
41
|
+
<TextArea maxLength={10} value={value} onChange={({ target }) => setValue(target.value)} />
|
|
42
|
+
</Field>
|
|
43
|
+
);
|
|
44
|
+
},
|
|
45
|
+
play: async ({ canvasElement }) => {
|
|
46
|
+
const canvas = within(canvasElement);
|
|
47
|
+
const textarea = canvas.getByRole('textbox');
|
|
48
|
+
await userEvent.click(textarea);
|
|
49
|
+
await userEvent.paste('π±ππ±π');
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const EmojiAtLimit: Story = {
|
|
54
|
+
name: 'truncates emoji paste exceeding limit',
|
|
55
|
+
render: () => {
|
|
56
|
+
const [value, setValue] = useState('');
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<Field label="Message" required={false}>
|
|
60
|
+
<TextArea maxLength={10} value={value} onChange={({ target }) => setValue(target.value)} />
|
|
61
|
+
</Field>
|
|
62
|
+
);
|
|
63
|
+
},
|
|
64
|
+
play: async ({ canvasElement }) => {
|
|
65
|
+
const canvas = within(canvasElement);
|
|
66
|
+
const textarea = canvas.getByRole('textbox');
|
|
67
|
+
await userEvent.click(textarea);
|
|
68
|
+
await userEvent.paste('π±ππ±ππ±ππ±ππ±ππ±ππ±π');
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const CJKCharacters: Story = {
|
|
73
|
+
name: 'truncates CJK paste exceeding limit',
|
|
74
|
+
render: () => {
|
|
75
|
+
const [value, setValue] = useState('');
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<Field label="Message" required={false}>
|
|
79
|
+
<TextArea maxLength={10} value={value} onChange={({ target }) => setValue(target.value)} />
|
|
80
|
+
</Field>
|
|
81
|
+
);
|
|
82
|
+
},
|
|
83
|
+
play: async ({ canvasElement }) => {
|
|
84
|
+
const canvas = within(canvasElement);
|
|
85
|
+
const textarea = canvas.getByRole('textbox');
|
|
86
|
+
await userEvent.click(textarea);
|
|
87
|
+
await userEvent.paste('επ£Ίεπ£Ίεπ£Ίεπ£Ίεπ£Ίεπ£Ί');
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const InitialValueExceedsLimit: Story = {
|
|
92
|
+
name: 'initial value exceeding maxLength is preserved',
|
|
93
|
+
render: () => {
|
|
94
|
+
const [value, setValue] = useState('Hello World!');
|
|
95
|
+
|
|
96
|
+
return (
|
|
97
|
+
<Field label="Message" required={false}>
|
|
98
|
+
<TextArea maxLength={3} value={value} onChange={({ target }) => setValue(target.value)} />
|
|
99
|
+
</Field>
|
|
100
|
+
);
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export const EmojiTypingBlocked: Story = {
|
|
105
|
+
name: 'blocks emoji paste when already at limit',
|
|
106
|
+
render: () => {
|
|
107
|
+
const [value, setValue] = useState('');
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
<Field label="Message" required={false}>
|
|
111
|
+
<TextArea maxLength={3} value={value} onChange={({ target }) => setValue(target.value)} />
|
|
112
|
+
</Field>
|
|
113
|
+
);
|
|
114
|
+
},
|
|
115
|
+
play: async ({ canvasElement }) => {
|
|
116
|
+
const canvas = within(canvasElement);
|
|
117
|
+
const textarea = canvas.getByRole('textbox');
|
|
118
|
+
await userEvent.click(textarea);
|
|
119
|
+
await userEvent.paste('π±π');
|
|
120
|
+
await userEvent.paste('πππ');
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export const CJKTypingBlocked: Story = {
|
|
125
|
+
name: 'blocks CJK paste when already at limit',
|
|
126
|
+
render: () => {
|
|
127
|
+
const [value, setValue] = useState('');
|
|
128
|
+
|
|
129
|
+
return (
|
|
130
|
+
<Field label="Message" required={false}>
|
|
131
|
+
<TextArea maxLength={3} value={value} onChange={({ target }) => setValue(target.value)} />
|
|
132
|
+
</Field>
|
|
133
|
+
);
|
|
134
|
+
},
|
|
135
|
+
play: async ({ canvasElement }) => {
|
|
136
|
+
const canvas = within(canvasElement);
|
|
137
|
+
const textarea = canvas.getByRole('textbox');
|
|
138
|
+
await userEvent.click(textarea);
|
|
139
|
+
await userEvent.paste('επ£Ί');
|
|
140
|
+
await userEvent.paste('επ£Ίεπ£Ίεπ£Ί');
|
|
141
|
+
},
|
|
142
|
+
};
|
package/src/inputs/TextArea.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
|
|
4
4
|
import { Merge } from '../utils';
|
|
5
5
|
import { inputClassNameBase } from './_common';
|
|
6
|
-
import { useInputAttributes } from './contexts';
|
|
6
|
+
import { useTextareaCharacterCount, useInputAttributes } from './contexts';
|
|
7
7
|
|
|
8
8
|
export interface TextAreaProps extends Merge<
|
|
9
9
|
React.ComponentPropsWithRef<'textarea'>,
|
|
@@ -13,15 +13,20 @@ export interface TextAreaProps extends Merge<
|
|
|
13
13
|
> {}
|
|
14
14
|
|
|
15
15
|
export const TextArea = forwardRef(function TextArea(
|
|
16
|
-
{ className, ...restProps }: TextAreaProps,
|
|
16
|
+
{ className, maxLength, ...restProps }: TextAreaProps,
|
|
17
17
|
reference: React.ForwardedRef<HTMLTextAreaElement | null>,
|
|
18
18
|
) {
|
|
19
19
|
const inputAttributes = useInputAttributes();
|
|
20
|
+
const value = restProps.value ?? restProps.defaultValue ?? '';
|
|
21
|
+
const currentLength = typeof value === 'string' ? value.length : String(value).length;
|
|
22
|
+
|
|
23
|
+
useTextareaCharacterCount(currentLength, maxLength);
|
|
20
24
|
|
|
21
25
|
return (
|
|
22
26
|
<textarea
|
|
23
27
|
ref={reference}
|
|
24
28
|
className={clsx(className, inputClassNameBase(), 'np-text-area')}
|
|
29
|
+
maxLength={maxLength}
|
|
25
30
|
{...inputAttributes}
|
|
26
31
|
{...restProps}
|
|
27
32
|
/>
|
package/src/inputs/contexts.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createContext, useContext } from 'react';
|
|
1
|
+
import { createContext, useContext, useEffect } from 'react';
|
|
2
2
|
|
|
3
3
|
type FieldLabelContextType = {
|
|
4
4
|
id?: string;
|
|
@@ -36,6 +36,23 @@ export function useFieldLabelRef() {
|
|
|
36
36
|
return useContext(FieldLabelContext)?.ref;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
export type TextareaCharacterCountState = { current: number; max: number } | null;
|
|
40
|
+
|
|
41
|
+
const TextareaCharacterCountContext = createContext<
|
|
42
|
+
((state: TextareaCharacterCountState) => void) | undefined
|
|
43
|
+
>(undefined);
|
|
44
|
+
export const TextareaCharacterCountProvider = TextareaCharacterCountContext.Provider;
|
|
45
|
+
|
|
46
|
+
export function useTextareaCharacterCount(current: number, max: number | undefined) {
|
|
47
|
+
const setCharacterCount = useContext(TextareaCharacterCountContext);
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
if (setCharacterCount && max != null) {
|
|
50
|
+
setCharacterCount({ current, max });
|
|
51
|
+
return () => setCharacterCount(null);
|
|
52
|
+
}
|
|
53
|
+
}, [setCharacterCount, current, max]);
|
|
54
|
+
}
|
|
55
|
+
|
|
39
56
|
export interface WithInputAttributesProps {
|
|
40
57
|
inputAttributes: ReturnType<typeof useInputAttributes>;
|
|
41
58
|
}
|
package/src/logo/Logo.tsx
CHANGED
|
@@ -92,7 +92,7 @@ const logoAssets: Record<LogoAssetName, () => JSX.Element> = {
|
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
94
|
* Renders the Wise wordmark logo. Responsive β shows the flag-only mark on small viewports
|
|
95
|
-
* and the full wordmark on β₯
|
|
95
|
+
* and the full wordmark on β₯600px (small breakpoint and above).
|
|
96
96
|
*
|
|
97
97
|
* @see {@link https://wise.design/foundations/logo Design Spec}
|
|
98
98
|
*/
|