@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
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { render, screen, waitFor } from '@testing-library/react';
|
|
2
|
+
import Sticky, { StickyProps } from './Sticky';
|
|
3
|
+
|
|
4
|
+
describe('Sticky', () => {
|
|
5
|
+
const defaultProps = {
|
|
6
|
+
open: true,
|
|
7
|
+
children: <div>Test Content</div>,
|
|
8
|
+
position: 'bottom' as const,
|
|
9
|
+
testId: 'test-sticky-panel',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
let rerenderSticky: (props?: StickyProps) => void;
|
|
13
|
+
|
|
14
|
+
beforeEach(() => {
|
|
15
|
+
const { rerender } = render(<Sticky {...defaultProps} />);
|
|
16
|
+
|
|
17
|
+
rerenderSticky = (props?: StickyProps) => {
|
|
18
|
+
rerender(<Sticky {...defaultProps} {...props} />);
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
test('renders with default props', () => {
|
|
23
|
+
expect(screen.getByTestId('test-sticky-panel')).toBeVisible();
|
|
24
|
+
expect(screen.getByTestId('test-sticky-panel')).toHaveClass('sliding-panel--open-bottom');
|
|
25
|
+
expect(screen.getByText('Test Content')).toBeInTheDocument();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
test('renders with open `false`', async () => {
|
|
29
|
+
const props: StickyProps = {
|
|
30
|
+
...defaultProps,
|
|
31
|
+
open: false, // Ensure the Sticky is initially open
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
expect(screen.getByTestId('test-sticky-panel')).toBeVisible();
|
|
35
|
+
|
|
36
|
+
// Change props to close the Sticky
|
|
37
|
+
rerenderSticky(props);
|
|
38
|
+
|
|
39
|
+
await waitFor(() => {
|
|
40
|
+
// Use queryByText instead of getByText for conditional presence checks
|
|
41
|
+
expect(screen.queryByText('Test Content')).not.toBeInTheDocument();
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('renders new content', () => {
|
|
46
|
+
const props: StickyProps = {
|
|
47
|
+
...defaultProps,
|
|
48
|
+
children: <div>New Test Content</div>,
|
|
49
|
+
};
|
|
50
|
+
expect(screen.getByText('Test Content')).toBeInTheDocument();
|
|
51
|
+
|
|
52
|
+
// Change props
|
|
53
|
+
rerenderSticky(props);
|
|
54
|
+
|
|
55
|
+
expect(screen.getByText('New Test Content')).toBeInTheDocument();
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it('renders with position set to `top`', () => {
|
|
59
|
+
const props: StickyProps = {
|
|
60
|
+
...defaultProps,
|
|
61
|
+
position: 'top',
|
|
62
|
+
};
|
|
63
|
+
expect(screen.getByTestId('test-sticky-panel')).toBeInTheDocument();
|
|
64
|
+
expect(screen.getByTestId('test-sticky-panel')).toHaveClass('sliding-panel--open-bottom');
|
|
65
|
+
|
|
66
|
+
// Change props
|
|
67
|
+
rerenderSticky(props);
|
|
68
|
+
|
|
69
|
+
expect(screen.getByTestId('test-sticky-panel')).toHaveClass('sliding-panel--open-top');
|
|
70
|
+
});
|
|
71
|
+
});
|
|
@@ -1,22 +1,79 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import Sticky from './Sticky';
|
|
4
|
+
import { allModes } from '../../.storybook/modes';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
const meta: Meta<typeof Sticky> = {
|
|
6
7
|
component: Sticky,
|
|
7
|
-
title: '
|
|
8
|
+
title: 'Dialogs/Sticky',
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
args: {
|
|
11
|
+
open: true,
|
|
12
|
+
position: 'bottom', // Default position
|
|
13
|
+
children: (
|
|
14
|
+
<div className="d-flex justify-content-start align-items-start flex-wrap p-x-4 p-y-4">
|
|
15
|
+
<p className="m-b-0">Default text for Sticky component.</p>
|
|
16
|
+
</div>
|
|
17
|
+
),
|
|
18
|
+
},
|
|
19
|
+
parameters: {
|
|
20
|
+
chromatic: {
|
|
21
|
+
// 🔶 Test each story for Sticky
|
|
22
|
+
modes: {
|
|
23
|
+
ltr: allModes.ltr,
|
|
24
|
+
rtl: allModes.rtl,
|
|
25
|
+
light: allModes.light,
|
|
26
|
+
dark: allModes.dark,
|
|
27
|
+
brightGreen: allModes.brightGreen,
|
|
28
|
+
forestGreen: allModes.forestGreen,
|
|
29
|
+
desktop: allModes.desktop,
|
|
30
|
+
tablet: allModes.tablet,
|
|
31
|
+
largeMobile: allModes.largeMobile,
|
|
32
|
+
smallMobile: allModes.smallMobile,
|
|
33
|
+
zoom400: allModes.zoom400,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
docs: {
|
|
37
|
+
canvas: {
|
|
38
|
+
layout: 'padded',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
8
42
|
};
|
|
9
43
|
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
44
|
+
export default meta;
|
|
45
|
+
|
|
46
|
+
// Represents a story object for the `Sticky` component.
|
|
47
|
+
type Story = StoryObj<typeof Sticky>;
|
|
48
|
+
|
|
49
|
+
export const Default: Story = {}; // Default story with no additional props
|
|
50
|
+
|
|
51
|
+
export const PositionTop: Story = {
|
|
52
|
+
args: {
|
|
53
|
+
position: 'top', // Set the position prop to 'top'
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const WithLongContent: Story = {
|
|
58
|
+
args: {
|
|
59
|
+
children: (
|
|
60
|
+
<div className="p-x-4 p-y-4">
|
|
61
|
+
<p>
|
|
62
|
+
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Optio ipsa rem fugiat
|
|
63
|
+
repellendus nisi dolorum, recusandae aperiam repudiandae natus quaerat, explicabo fugit!
|
|
64
|
+
Odit illum vero eius quasi, error soluta veritatis.
|
|
65
|
+
</p>
|
|
66
|
+
<p>
|
|
67
|
+
Recusandae a animi tenetur magni itaque optio in aut enim odio. Minima, veritatis error
|
|
68
|
+
dicta expedita aliquam officiis deleniti repellat rerum nam ad quam dolorum reiciendis
|
|
69
|
+
voluptas doloremque quis eveniet.
|
|
70
|
+
</p>
|
|
71
|
+
<p>
|
|
72
|
+
Adipisci nulla quos magnam blanditiis minima nesciunt odio mollitia, fuga ullam aliquid
|
|
73
|
+
qui iure delectus dolores corporis officiis autem iste quia at ea sint tempore,
|
|
74
|
+
repudiandae amet? Error, praesentium eaque.
|
|
75
|
+
</p>
|
|
19
76
|
</div>
|
|
20
|
-
|
|
21
|
-
|
|
77
|
+
),
|
|
78
|
+
},
|
|
22
79
|
};
|
package/src/sticky/Sticky.tsx
CHANGED
|
@@ -1,16 +1,60 @@
|
|
|
1
1
|
import { Position } from '../common';
|
|
2
2
|
import SlidingPanel from '../slidingPanel';
|
|
3
|
+
import { FunctionComponent } from 'react';
|
|
3
4
|
|
|
4
5
|
export interface StickyProps {
|
|
5
|
-
|
|
6
|
-
position?: `${Position.TOP | Position.BOTTOM}`;
|
|
6
|
+
/** Optional prop for children components to be rendered inside the Sticky component. */
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
+
|
|
9
|
+
/** Optional props that determines if the Sticky component is open or closed. Default value is `true`. */
|
|
10
|
+
open?: boolean;
|
|
11
|
+
|
|
12
|
+
/** Optional props that specifies the position of the Sticky component on the screen. Can be either `top` or `bottom`. */
|
|
13
|
+
position?: `${Position.TOP}` | `${Position.BOTTOM}`;
|
|
14
|
+
|
|
15
|
+
/** Optional prop to specify the ID used for testing */
|
|
16
|
+
testId?: string;
|
|
8
17
|
}
|
|
9
18
|
|
|
10
|
-
|
|
19
|
+
/**
|
|
20
|
+
* ### Sticky Component
|
|
21
|
+
*
|
|
22
|
+
* `<Sticky />` is a component that renders a `<SlidingPanel />` with specified props.
|
|
23
|
+
* It uses the `<SlidingPanel />` component to create a panel that can slide in and out of view,
|
|
24
|
+
* based on the `open` prop. It can be positioned at the top or bottom of the container,
|
|
25
|
+
* as specified by the `position` prop.
|
|
26
|
+
*
|
|
27
|
+
* @component
|
|
28
|
+
* @param {ReactNode} children - Children content.
|
|
29
|
+
* @param {boolean} open - Determines if the Sticky component is open or closed.
|
|
30
|
+
* @param {('top'|'bottom')} position - Specifies the position.
|
|
31
|
+
* @param {string} testId - ID used for testing.
|
|
32
|
+
* @returns {JSX.Element} The `SlidingPanel` component with applied props.
|
|
33
|
+
* @example
|
|
34
|
+
* <Button onClick={() => setOpen(!open)}>Open Sticky</Button>
|
|
35
|
+
* <Sticky open={open} position={'bottom'}>
|
|
36
|
+
* <div>
|
|
37
|
+
* <Button onClick={() => setOpen(!open)}>Close Sticky</Button>
|
|
38
|
+
* </div>
|
|
39
|
+
* </Sticky>
|
|
40
|
+
*/
|
|
41
|
+
const Sticky: FunctionComponent<StickyProps> = ({
|
|
42
|
+
children,
|
|
43
|
+
open = true,
|
|
44
|
+
position = Position.BOTTOM,
|
|
45
|
+
testId,
|
|
46
|
+
}: StickyProps) => {
|
|
11
47
|
return (
|
|
12
|
-
<SlidingPanel
|
|
48
|
+
<SlidingPanel
|
|
49
|
+
testId={testId}
|
|
50
|
+
open={open}
|
|
51
|
+
position={position}
|
|
52
|
+
slidingPanelPositionFixed
|
|
53
|
+
showSlidingPanelBorder
|
|
54
|
+
>
|
|
13
55
|
{children}
|
|
14
56
|
</SlidingPanel>
|
|
15
57
|
);
|
|
16
|
-
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default Sticky;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MouseEvent
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
2
|
|
|
3
3
|
import Option from '../common/Option';
|
|
4
4
|
import Switch from '../switch';
|
|
@@ -6,15 +6,15 @@ import Switch from '../switch';
|
|
|
6
6
|
export type SwitchOptionProps = {
|
|
7
7
|
checked?: boolean;
|
|
8
8
|
complex?: boolean;
|
|
9
|
-
content?:
|
|
9
|
+
content?: React.ReactNode;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
showMediaCircle?: boolean;
|
|
12
12
|
showMediaAtAllSizes?: boolean;
|
|
13
13
|
isContainerAligned?: boolean;
|
|
14
14
|
id?: string;
|
|
15
|
-
media?:
|
|
15
|
+
media?: React.ReactNode;
|
|
16
16
|
onChange: (newValue: boolean) => void;
|
|
17
|
-
title:
|
|
17
|
+
title: React.ReactNode;
|
|
18
18
|
'aria-label': string;
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -22,9 +22,7 @@ const stopPropagation = (event?: MouseEvent<HTMLSpanElement>) => {
|
|
|
22
22
|
if (event) {
|
|
23
23
|
event.stopPropagation();
|
|
24
24
|
event.preventDefault();
|
|
25
|
-
|
|
26
|
-
event.nativeEvent.stopImmediatePropagation();
|
|
27
|
-
}
|
|
25
|
+
event.nativeEvent?.stopImmediatePropagation?.();
|
|
28
26
|
}
|
|
29
27
|
};
|
|
30
28
|
|
package/src/tabs/Tabs.js
CHANGED
|
@@ -3,7 +3,7 @@ import { Spring, SpringValue, animated } from '@react-spring/web';
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import clamp from 'lodash.clamp';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import { Component, createRef, Fragment
|
|
6
|
+
import { Component, createRef, Fragment } from 'react';
|
|
7
7
|
|
|
8
8
|
import { Size, Width, Direction } from '../common';
|
|
9
9
|
import { DirectionContext } from '../provider/direction';
|
|
@@ -27,7 +27,7 @@ const enabledTabsFilter = (tab) => !tab.disabled;
|
|
|
27
27
|
const SpacerWidth = { default: 0, xs: 8, sm: 16, md: 24, lg: 32 };
|
|
28
28
|
|
|
29
29
|
class Tabs extends Component {
|
|
30
|
-
/** @type {RefObject<HTMLDivElement>} */
|
|
30
|
+
/** @type {React.RefObject<HTMLDivElement | null>} */
|
|
31
31
|
containerReference = createRef();
|
|
32
32
|
|
|
33
33
|
constructor(props) {
|
|
@@ -576,7 +576,6 @@ Tabs.propTypes = {
|
|
|
576
576
|
}),
|
|
577
577
|
).isRequired,
|
|
578
578
|
selected: PropTypes.number.isRequired,
|
|
579
|
-
onTabSelect: PropTypes.func.isRequired,
|
|
580
579
|
name: PropTypes.string.isRequired,
|
|
581
580
|
animatePanelsOnClick: PropTypes.bool,
|
|
582
581
|
changeTabOnSwipe: PropTypes.bool,
|
|
@@ -584,6 +583,7 @@ Tabs.propTypes = {
|
|
|
584
583
|
transitionSpacing: PropTypes.oneOf(['default', 'xs', 'sm', 'md', 'lg']),
|
|
585
584
|
headerWidth: PropTypes.oneOf(['auto', 'block']),
|
|
586
585
|
id: PropTypes.string,
|
|
586
|
+
onTabSelect: PropTypes.func.isRequired,
|
|
587
587
|
};
|
|
588
588
|
|
|
589
589
|
Tabs.defaultProps = {
|
|
@@ -58,4 +58,12 @@ export interface ChromaticParameters {
|
|
|
58
58
|
* @default 0.063
|
|
59
59
|
*/
|
|
60
60
|
diffThreshold?: number;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Modes for Chromatic testing.
|
|
64
|
+
*
|
|
65
|
+
* Specify the mode in which Chromatic should run tests. For example, 'light' for light mode,
|
|
66
|
+
* 'dark' for dark mode, or `rtl` for right to left content.
|
|
67
|
+
*/
|
|
68
|
+
modes?: object;
|
|
61
69
|
}
|
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
2
|
|
|
4
3
|
import Body from '../body';
|
|
5
4
|
import { Size, Typography } from '../common';
|
|
6
5
|
import Title from '../title';
|
|
7
6
|
|
|
8
|
-
export
|
|
7
|
+
export interface TileProps {
|
|
8
|
+
/** Classes to apply to the Tile container */
|
|
9
|
+
className?: string;
|
|
10
|
+
description?: React.ReactNode;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
href?: string;
|
|
13
|
+
target?: React.HTMLAttributeAnchorTarget;
|
|
14
|
+
/** Accepts only Avatar and images */
|
|
15
|
+
media: React.ReactNode;
|
|
16
|
+
/** Function called onClick or onKeyDown */
|
|
17
|
+
onClick?: (event?: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
18
|
+
/** The size applied to Tile */
|
|
19
|
+
size?: `${Size.SMALL | Size.MEDIUM}`;
|
|
20
|
+
title: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default function Tile({
|
|
9
24
|
className,
|
|
10
25
|
description,
|
|
11
26
|
disabled,
|
|
@@ -13,10 +28,10 @@ export const Tile = ({
|
|
|
13
28
|
target,
|
|
14
29
|
media,
|
|
15
30
|
onClick,
|
|
16
|
-
size,
|
|
31
|
+
size = 'md',
|
|
17
32
|
title,
|
|
18
|
-
})
|
|
19
|
-
const isSmall = size ===
|
|
33
|
+
}: TileProps) {
|
|
34
|
+
const isSmall = size === 'sm';
|
|
20
35
|
const Element = href ? 'a' : 'button';
|
|
21
36
|
|
|
22
37
|
return (
|
|
@@ -36,13 +51,13 @@ export const Tile = ({
|
|
|
36
51
|
)}
|
|
37
52
|
href={href}
|
|
38
53
|
target={target}
|
|
39
|
-
onClick={disabled ?
|
|
54
|
+
onClick={disabled ? undefined : onClick}
|
|
40
55
|
onKeyDown={
|
|
41
56
|
disabled
|
|
42
|
-
?
|
|
57
|
+
? undefined
|
|
43
58
|
: ({ key }) => {
|
|
44
59
|
if (key === 'Enter' || key === ' ') {
|
|
45
|
-
onClick();
|
|
60
|
+
onClick?.();
|
|
46
61
|
}
|
|
47
62
|
}
|
|
48
63
|
}
|
|
@@ -58,30 +73,4 @@ export const Tile = ({
|
|
|
58
73
|
) : null}
|
|
59
74
|
</Element>
|
|
60
75
|
);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
Tile.propTypes = {
|
|
64
|
-
/** Classes to apply to the Tile container */
|
|
65
|
-
className: PropTypes.string,
|
|
66
|
-
description: PropTypes.node,
|
|
67
|
-
disabled: PropTypes.bool,
|
|
68
|
-
href: PropTypes.string,
|
|
69
|
-
target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
|
|
70
|
-
/** Accepts only Avatar and images */
|
|
71
|
-
media: PropTypes.node.isRequired,
|
|
72
|
-
/** Function called onClick or onKeyDown */
|
|
73
|
-
onClick: PropTypes.func,
|
|
74
|
-
/** The size applied to Tile */
|
|
75
|
-
size: PropTypes.oneOf(['sm', 'md']),
|
|
76
|
-
title: PropTypes.node.isRequired,
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
Tile.defaultProps = {
|
|
80
|
-
className: '',
|
|
81
|
-
description: null,
|
|
82
|
-
disabled: false,
|
|
83
|
-
size: Size.MEDIUM,
|
|
84
|
-
target: undefined,
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export default Tile;
|
|
76
|
+
}
|
package/src/tooltip/Tooltip.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import {
|
|
4
|
+
AriaAttributes,
|
|
4
5
|
PropsWithChildren,
|
|
5
6
|
ReactElement,
|
|
6
7
|
ReactNode,
|
|
@@ -84,7 +85,7 @@ const Tooltip = ({
|
|
|
84
85
|
onBlur={() => setOpen(false)}
|
|
85
86
|
>
|
|
86
87
|
{children
|
|
87
|
-
? cloneElement(children as ReactElement, {
|
|
88
|
+
? cloneElement(children as ReactElement<Pick<AriaAttributes, 'aria-describedby'>>, {
|
|
88
89
|
'aria-describedby': `${tooltipId}-tooltip`,
|
|
89
90
|
})
|
|
90
91
|
: null}
|
|
@@ -1,46 +1,40 @@
|
|
|
1
|
-
.np-upload-input {
|
|
2
|
-
border: 1px solid #c9cbce;
|
|
3
|
-
border: 1px solid var(--color-interactive-secondary);
|
|
4
|
-
border-radius: 10px;
|
|
5
|
-
border-radius: var(--radius-small);
|
|
6
|
-
}
|
|
7
|
-
.np-upload-input:has(:focus-visible) {
|
|
8
|
-
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
9
|
-
outline-offset: var(--ring-outline-offset);
|
|
10
|
-
}
|
|
11
1
|
.np-upload-input.form-control {
|
|
12
2
|
height: auto;
|
|
13
3
|
padding: 0;
|
|
14
4
|
padding: initial;
|
|
15
5
|
}
|
|
16
|
-
.np-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
.np-upload-input > div:first-child,
|
|
7
|
+
.np-upload-input > div:first-child .np-upload-item--single-file,
|
|
8
|
+
.np-upload-input > div:first-child .np-upload-item--link {
|
|
9
|
+
border-top-left-radius: 10px;
|
|
10
|
+
border-top-left-radius: var(--radius-small);
|
|
11
|
+
border-top-right-radius: 10px;
|
|
12
|
+
border-top-right-radius: var(--radius-small);
|
|
13
|
+
}
|
|
14
|
+
.np-upload-input > div:last-child {
|
|
15
|
+
border-bottom-left-radius: 10px;
|
|
16
|
+
border-bottom-left-radius: var(--radius-small);
|
|
17
|
+
border-bottom-right-radius: 10px;
|
|
18
|
+
border-bottom-right-radius: var(--radius-small);
|
|
19
19
|
}
|
|
20
20
|
.np-theme-personal .np-upload-input.disabled .btn {
|
|
21
21
|
cursor: inherit;
|
|
22
22
|
}
|
|
23
|
-
.np-theme-personal .np-upload-input .np-upload-button {
|
|
24
|
-
border-radius: calc(10px - 1px);
|
|
25
|
-
border-radius: calc(var(--radius-small) - 1px);
|
|
26
|
-
padding: 16px;
|
|
27
|
-
padding: var(--padding-small);
|
|
28
|
-
}
|
|
29
|
-
.np-theme-personal .np-upload-input .np-upload-input--square-top {
|
|
30
|
-
border-top-right-radius: 0px;
|
|
31
|
-
border-top-left-radius: 0px;
|
|
32
|
-
}
|
|
33
|
-
.np-theme-personal .np-upload-input .np-upload-item__remove-button {
|
|
34
|
-
border-radius: 0;
|
|
35
|
-
border-radius: initial;
|
|
36
|
-
}
|
|
37
23
|
.np-theme-personal .np-upload-input .np-upload-icon {
|
|
38
24
|
color: var(--color-interactive-primary);
|
|
39
25
|
}
|
|
40
26
|
.np-theme-personal .np-upload-input .media-body {
|
|
27
|
+
padding-right: 32px;
|
|
28
|
+
padding-right: var(--size-32);
|
|
41
29
|
color: var(--color-content-link);
|
|
42
30
|
white-space: break-spaces;
|
|
43
31
|
}
|
|
32
|
+
@media (max-width: 320px) {
|
|
33
|
+
.np-theme-personal .np-upload-input .media-body {
|
|
34
|
+
padding-right: 64px;
|
|
35
|
+
padding-right: var(--size-64);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
44
38
|
.np-theme-personal .np-upload-input .media-body .np-text-body-large-bold {
|
|
45
39
|
-webkit-text-decoration: underline;
|
|
46
40
|
text-decoration: underline;
|
|
@@ -55,6 +49,10 @@
|
|
|
55
49
|
.np-theme-personal .np-upload-input .media-body .text-negative {
|
|
56
50
|
color: var(--color-sentiment-negative) !important;
|
|
57
51
|
}
|
|
52
|
+
.np-theme-personal .np-upload-input-errors {
|
|
53
|
+
padding-left: 0;
|
|
54
|
+
list-style-position: inside;
|
|
55
|
+
}
|
|
58
56
|
.np-theme-personal .np-upload-input .status-circle {
|
|
59
57
|
width: 24px;
|
|
60
58
|
width: var(--size-x-small);
|
|
@@ -3,49 +3,45 @@
|
|
|
3
3
|
@import (reference) './uploadItem/UploadItem.less';
|
|
4
4
|
|
|
5
5
|
.np-upload-input {
|
|
6
|
-
border: 1px solid var(--color-interactive-secondary);
|
|
7
|
-
border-radius: var(--radius-small);
|
|
8
|
-
|
|
9
|
-
&:has(:focus-visible) {
|
|
10
|
-
.ring();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
6
|
&.form-control {
|
|
14
7
|
height: auto;
|
|
15
8
|
padding: initial;
|
|
16
9
|
}
|
|
10
|
+
|
|
11
|
+
& > div {
|
|
12
|
+
&:first-child,
|
|
13
|
+
&:first-child .np-upload-item--single-file,
|
|
14
|
+
&:first-child .np-upload-item--link {
|
|
15
|
+
border-top-left-radius: var(--radius-small);
|
|
16
|
+
border-top-right-radius: var(--radius-small);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:last-child {
|
|
20
|
+
border-bottom-left-radius: var(--radius-small);
|
|
21
|
+
border-bottom-right-radius: var(--radius-small);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
17
24
|
}
|
|
18
25
|
|
|
19
26
|
.np-theme-personal {
|
|
20
27
|
.np-upload-input {
|
|
21
|
-
border-radius: var(--radius-small);
|
|
22
|
-
|
|
23
28
|
&.disabled .btn {
|
|
24
29
|
cursor: inherit;
|
|
25
30
|
}
|
|
26
31
|
|
|
27
|
-
.np-upload-button {
|
|
28
|
-
border-radius: @small-border-minus-one;
|
|
29
|
-
padding: var(--padding-small);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.np-upload-input--square-top {
|
|
33
|
-
border-top-right-radius: 0px;
|
|
34
|
-
border-top-left-radius: 0px;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.np-upload-item__remove-button {
|
|
38
|
-
border-radius: unset;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
32
|
.np-upload-icon {
|
|
42
33
|
color: var(--color-interactive-primary);
|
|
43
34
|
}
|
|
44
35
|
|
|
45
36
|
.media-body {
|
|
37
|
+
padding-right: var(--size-32);
|
|
46
38
|
color: var(--color-content-link);
|
|
47
39
|
white-space: break-spaces;
|
|
48
40
|
|
|
41
|
+
@media (--screen-400-zoom) {
|
|
42
|
+
padding-right: var(--size-64);
|
|
43
|
+
}
|
|
44
|
+
|
|
49
45
|
.np-text-body-large-bold {
|
|
50
46
|
text-decoration: underline;
|
|
51
47
|
.link-underline();
|
|
@@ -62,6 +58,11 @@
|
|
|
62
58
|
}
|
|
63
59
|
}
|
|
64
60
|
|
|
61
|
+
&-errors {
|
|
62
|
+
padding-left: 0;
|
|
63
|
+
list-style-position: inside;
|
|
64
|
+
}
|
|
65
|
+
|
|
65
66
|
.status-circle {
|
|
66
67
|
width: var(--size-x-small);
|
|
67
68
|
height: var(--size-x-small);
|