@orangesk/orange-design-system 2.0.0-beta.36 → 2.0.0-beta.38
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 +8 -2
- package/build/components/Icon/style.css +1 -1
- package/build/components/Icon/style.css.map +1 -1
- package/build/components/Loader/style.css +1 -1
- package/build/components/Loader/style.css.map +1 -1
- package/build/components/PromoBanner/style.css +1 -1
- package/build/components/PromoBanner/style.css.map +1 -1
- package/build/components/Table/style.css +1 -1
- package/build/components/Table/style.css.map +1 -1
- package/build/components/index.js +1 -1
- package/build/components/index.js.map +1 -1
- package/build/components/tsconfig.tsbuildinfo +1 -1
- package/build/components/types/index.d.ts +737 -729
- package/build/components/types/src/components/Accordion/Accordion.static.d.ts +2 -0
- package/build/components/types/src/components/Bar/index.d.ts +1 -1
- package/build/components/types/src/components/BlockAction/Context.d.ts +1 -1
- package/build/components/types/src/components/BlockAction/index.d.ts +2 -4
- package/build/components/types/src/components/Button/index.d.ts +1 -1
- package/build/components/types/src/components/Card/index.d.ts +2 -2
- package/build/components/types/src/components/Carousel/Carousel.d.ts +1 -1
- package/build/components/types/src/components/Carousel/CarouselItem.d.ts +1 -1
- package/build/components/types/src/components/CarouselHero/CarouselHero.d.ts +1 -1
- package/build/components/types/src/components/CarouselHero/CarouselHero.static.d.ts +1 -1
- package/build/components/types/src/components/CarouselHero/CarouselHeroItem.d.ts +1 -1
- package/build/components/types/src/components/CarouselHero/index.d.ts +1 -1
- package/build/components/types/src/components/CartTable/CartTable.d.ts +1 -1
- package/build/components/types/src/components/CartTable/data.d.ts +1 -1
- package/build/components/types/src/components/Code/Code.d.ts +1 -1
- package/build/components/types/src/components/Divider/Divider.d.ts +1 -1
- package/build/components/types/src/components/DocumentationSidebar/index.d.ts +1 -1
- package/build/components/types/src/components/Dropdown/index.d.ts +1 -1
- package/build/components/types/src/components/Forms/Autocomplete/Autocomplete.d.ts +3 -1
- package/build/components/types/src/components/Forms/Autocomplete/Autocomplete.static.d.ts +1 -0
- package/build/components/types/src/components/Forms/Group/Group.d.ts +1 -1
- package/build/components/types/src/components/Forms/Group/Item.d.ts +1 -1
- package/build/components/types/src/components/Forms/index.d.ts +1 -1
- package/build/components/types/src/components/Grid/GridCol.d.ts +3 -3
- package/build/components/types/src/components/Icon/iconSearchTags.d.ts +1 -0
- package/build/components/types/src/components/Icon/index.d.ts +1 -2
- package/build/components/types/src/components/IconList/Item.d.ts +1 -1
- package/build/components/types/src/components/List/ClickableControl.d.ts +1 -1
- package/build/components/types/src/components/List/List.d.ts +3 -3
- package/build/components/types/src/components/List/ListItem.d.ts +1 -1
- package/build/components/types/src/components/Loader/LoaderFullscreen.d.ts +7 -0
- package/build/components/types/src/components/Loader/index.d.ts +1 -0
- package/build/components/types/src/components/Megamenu/index.d.ts +1 -1
- package/build/components/types/src/components/Modal/ModalCloseButton.d.ts +1 -1
- package/build/components/types/src/components/Modal/index.d.ts +2 -2
- package/build/components/types/src/components/Pagination/helpers.d.ts +1 -1
- package/build/components/types/src/components/Pill/Pill.d.ts +1 -1
- package/build/components/types/src/components/Preview/Preview.d.ts +1 -1
- package/build/components/types/src/components/Preview/PreviewGenerator.d.ts +1 -1
- package/build/components/types/src/components/PromotionCard/PromotionCardContent.d.ts +1 -1
- package/build/components/types/src/components/PromotionCard/PromotionCardImageWrapper.d.ts +1 -1
- package/build/components/types/src/components/PromotionCard/PromotionCardTitle.d.ts +1 -1
- package/build/components/types/src/components/Sticker/Sticker.d.ts +3 -3
- package/build/components/types/src/components/Table/Table.d.ts +1 -1
- package/build/components/types/src/components/Table/index.d.ts +1 -1
- package/build/components/types/src/components/Tabs/index.d.ts +2 -2
- package/build/components/types/src/components/Tag/index.d.ts +1 -1
- package/build/components/types/src/components/Testimonial/Testimonial.d.ts +2 -2
- package/build/components/types/src/components/Tooltip/Tooltip.static.d.ts +6 -2
- package/build/components/types/src/components/Tooltip/index.d.ts +1 -1
- package/build/components/types/src/components/index.d.ts +21 -21
- package/build/components/types/src/scripts/index.d.ts +5 -5
- package/build/components/types/src/scripts/modules/SpacePreview/index.d.ts +1 -1
- package/build/components/types/src/utils/hooks.d.ts +1 -1
- package/build/components/types/src/utils/index.d.ts +2 -2
- package/build/lib/base.css +1 -1
- package/build/lib/base.css.map +1 -1
- package/build/lib/components.css +1 -1
- package/build/lib/components.css.map +1 -1
- package/build/lib/footer.js +1 -1
- package/build/lib/footer.js.map +1 -1
- package/build/lib/megamenu.js +1 -1
- package/build/lib/megamenu.js.map +1 -1
- package/build/lib/scripts.js +1 -1
- package/build/lib/scripts.js.map +1 -1
- package/build/lib/style.css +1 -1
- package/build/lib/style.css.map +1 -1
- package/build/lib/tsconfig.tsbuildinfo +1 -1
- package/build/sprite.svg +1 -1
- package/package.json +39 -30
- package/src/assets/icons/discount-price.svg +4 -0
- package/src/components/Accordion/Accordion.static.ts +44 -1
- package/src/components/Accordion/Accordion.tsx +2 -3
- package/src/components/Accordion/AccordionHeader.tsx +1 -1
- package/src/components/Accordion/AccordionItem.tsx +2 -1
- package/src/components/Accordion/HeadingContext.tsx +1 -1
- package/src/components/Accordion/tests/Accordion.unit.test.jsx +112 -4
- package/src/components/Alert/Alert.tsx +3 -4
- package/src/components/Alert/tests/Alert.conformance.test.jsx +2 -3
- package/src/components/Alert/tests/Alert.test.jsx +1 -1
- package/src/components/Alert/tests/Alert.visual.test.jsx +1 -2
- package/src/components/AnchorNavigation/AnchorNavigation.tsx +3 -3
- package/src/components/AnchorNavigation/tests/AnchorNavigation.conformance.test.jsx +1 -1
- package/src/components/Bar/Bar.tsx +1 -1
- package/src/components/Bar/BarBreak.tsx +1 -1
- package/src/components/Bar/BarItem.tsx +1 -1
- package/src/components/Bar/index.ts +1 -1
- package/src/components/Bar/tests/Bar.conformance.test.jsx +1 -1
- package/src/components/BlockAction/BlockAction.tsx +1 -1
- package/src/components/BlockAction/BlockActionControl.tsx +2 -3
- package/src/components/BlockAction/BlockActionIndicator.tsx +2 -3
- package/src/components/BlockAction/CloneElementWithClassName.tsx +1 -1
- package/src/components/BlockAction/Context.tsx +1 -1
- package/src/components/BlockAction/index.tsx +3 -8
- package/src/components/BlockAction/styles/config.scss +6 -6
- package/src/components/BlockAction/tests/BlockActionControl.unit.test.jsx +1 -1
- package/src/components/BodyBanner/BodyBanner.tsx +2 -2
- package/src/components/BodyBanner/tests/BodyBanner.conformance.test.jsx +1 -1
- package/src/components/Breadcrumbs/BreadcrumbItem.tsx +1 -1
- package/src/components/Breadcrumbs/tests/Breadcrumbs.conformance.test.jsx +1 -1
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/Button/IconButton.tsx +7 -3
- package/src/components/Button/index.tsx +1 -3
- package/src/components/Button/tests/Button.conformance.test.jsx +1 -2
- package/src/components/Button/tests/Button.test.jsx +0 -1
- package/src/components/Button/tests/IconButton.unit.test.jsx +0 -1
- package/src/components/Buttons/tests/Buttons.conformance.test.jsx +1 -1
- package/src/components/Card/Card.tsx +1 -1
- package/src/components/Card/CardProductHeader.tsx +1 -1
- package/src/components/Card/CardSection.tsx +1 -1
- package/src/components/Card/index.ts +2 -2
- package/src/components/Card/tests/Card.conformance.test.jsx +2 -2
- package/src/components/Card/tests/CardProductHeader.unit.test.jsx +1 -1
- package/src/components/Carousel/Carousel.static.ts +15 -15
- package/src/components/Carousel/Carousel.tsx +9 -11
- package/src/components/Carousel/CarouselItem.tsx +1 -1
- package/src/components/Carousel/tests/Carousel.conformance.test.jsx +2 -4
- package/src/components/CarouselHero/CarouselHero.static.ts +15 -15
- package/src/components/CarouselHero/CarouselHero.tsx +12 -13
- package/src/components/CarouselHero/CarouselHeroItem.tsx +2 -2
- package/src/components/CarouselHero/index.ts +1 -1
- package/src/components/CarouselHero/tests/CarouselHeroItem.conformance.test.jsx +1 -1
- package/src/components/CarouselPromotions/CarouselPromotions.static.ts +10 -10
- package/src/components/CarouselPromotions/CarouselPromotions.tsx +6 -7
- package/src/components/CarouselPromotions/CarouselPromotionsItem.tsx +3 -3
- package/src/components/CarouselPromotions/tests/CarouselPromotions.conformance.test.jsx +1 -3
- package/src/components/CarouselPromotions/tests/CarouselPromotions.unit.test.jsx +1 -2
- package/src/components/CartTable/CartTable.tsx +3 -4
- package/src/components/CartTable/FooterPriceColumn.tsx +1 -1
- package/src/components/CartTable/Price.tsx +1 -1
- package/src/components/CartTable/data.ts +1 -1
- package/src/components/CartTable/generateFooter.tsx +1 -1
- package/src/components/CartTable/generateRow.tsx +6 -8
- package/src/components/CartTable/styles/mixins.scss +46 -49
- package/src/components/CartTable/tests/CartTable.conformance.test.jsx +1 -1
- package/src/components/Code/Code.tsx +1 -1
- package/src/components/Container/Container.tsx +1 -1
- package/src/components/Container/styles/config.scss +2 -2
- package/src/components/Container/styles/mixins.scss +4 -4
- package/src/components/Container/tests/Container.unit.test.jsx +3 -2
- package/src/components/Controls/Controls.tsx +1 -1
- package/src/components/Controls/tests/Controls.test.jsx +2 -2
- package/src/components/Cover/Cover.tsx +1 -1
- package/src/components/Cover/index.ts +1 -0
- package/src/components/Cover/tests/Cover.conformance.test.jsx +8 -9
- package/src/components/Cover/tests/Cover.unit.test.jsx +0 -1
- package/src/components/Divider/Divider.tsx +1 -1
- package/src/components/Divider/tests/Divider.conformance.test.jsx +1 -1
- package/src/components/DocumentationSidebar/DocumentationSidebar.tsx +7 -7
- package/src/components/DocumentationSidebar/index.ts +2 -2
- package/src/components/Dropdown/Dropdown.static.ts +1 -1
- package/src/components/Dropdown/Dropdown.tsx +3 -5
- package/src/components/Dropdown/DropdownDivider.tsx +1 -1
- package/src/components/Dropdown/DropdownItem.tsx +1 -1
- package/src/components/Dropdown/DropdownToggleButton.tsx +1 -1
- package/src/components/Dropdown/index.ts +1 -1
- package/src/components/Dropdown/tests/Dropdown.conformance.test.jsx +2 -2
- package/src/components/Dropdown/tests/Dropdown.unit.test.jsx +1 -2
- package/src/components/Expander/Expander.tsx +1 -1
- package/src/components/Expander/tests/Expander.conformance.test.jsx +2 -4
- package/src/components/Expander/tests/Expander.unit.test.jsx +2 -4
- package/src/components/FeatureAccordion/FeatureAccordion.tsx +2 -2
- package/src/components/FeatureAccordion/FeatureAccordionItem.tsx +2 -1
- package/src/components/FeatureAccordion/tests/FeatureAccordion.conformance.test.jsx +1 -1
- package/src/components/FeatureAccordion/tests/FeatureAccordion.unit.test.jsx +2 -3
- package/src/components/Footer/Footer.tsx +4 -5
- package/src/components/Footer/static.ts +2 -2
- package/src/components/Footer/tests/Footer.unit.test.jsx +1 -1
- package/src/components/Forms/Autocomplete/Autocomplete.static.ts +1 -0
- package/src/components/Forms/Autocomplete/Autocomplete.tsx +8 -3
- package/src/components/Forms/Autocomplete/styles/config.scss +3 -3
- package/src/components/Forms/Checkbox/Checkbox.tsx +1 -1
- package/src/components/Forms/Checkbox/styles/mixins.scss +2 -2
- package/src/components/Forms/DatePicker/DatePicker.tsx +1 -2
- package/src/components/Forms/Field/Control.tsx +3 -3
- package/src/components/Forms/Field/Description.tsx +1 -1
- package/src/components/Forms/Field/Field.tsx +4 -4
- package/src/components/Forms/Field/Label.tsx +1 -1
- package/src/components/Forms/Field/Messages.tsx +2 -2
- package/src/components/Forms/Field/tests/Autocomplete.Field.conformance.test.jsx +1 -1
- package/src/components/Forms/Field/tests/Checkbox.Field.conformance.test.jsx +1 -1
- package/src/components/Forms/Field/tests/File.Field.conformance.test.jsx +1 -1
- package/src/components/Forms/Field/tests/Group.Field.conformance.test.jsx +1 -1
- package/src/components/Forms/Field/tests/Radio.Field.conformance.test.jsx +1 -1
- package/src/components/Forms/Field/tests/Rangeslider.Field.test.jsx +1 -1
- package/src/components/Forms/Field/tests/Select.Field.conformance.test.jsx +1 -1
- package/src/components/Forms/Field/tests/Text.Field.conformance.test.jsx +1 -1
- package/src/components/Forms/Field/tests/Textarea.Field.conformance.test.jsx +1 -1
- package/src/components/Forms/Field/tests/Tooltip.unit.test.jsx +1 -2
- package/src/components/Forms/Fieldset/Fieldset.tsx +1 -1
- package/src/components/Forms/File/File.tsx +4 -7
- package/src/components/Forms/File/styles/config.scss +5 -5
- package/src/components/Forms/Group/Group.tsx +2 -3
- package/src/components/Forms/Group/Item.tsx +1 -1
- package/src/components/Forms/Hint/Hint.tsx +1 -1
- package/src/components/Forms/Hint/styles/config.scss +1 -1
- package/src/components/Forms/Hint/styles/mixins.scss +2 -2
- package/src/components/Forms/InputStepper/InputStepper.tsx +1 -1
- package/src/components/Forms/Label/Label.tsx +1 -1
- package/src/components/Forms/Label/styles/mixins.scss +2 -2
- package/src/components/Forms/Message/Message.tsx +9 -5
- package/src/components/Forms/Radio/Radio.tsx +1 -1
- package/src/components/Forms/Radio/styles/mixins.scss +2 -2
- package/src/components/Forms/RangeSlider/RangeSlider.tsx +1 -1
- package/src/components/Forms/Select/Select.tsx +1 -1
- package/src/components/Forms/Select/styles/mixins.scss +6 -6
- package/src/components/Forms/TextArea/TextArea.tsx +1 -1
- package/src/components/Forms/TextInput/TextInput.tsx +3 -5
- package/src/components/Forms/TextInput/styles/mixins.scss +10 -10
- package/src/components/Forms/index.ts +1 -1
- package/src/components/Gauge/Gauge.tsx +1 -1
- package/src/components/Gauge/GaugeMaker.tsx +3 -3
- package/src/components/Gauge/tests/Gauge.unit.test.jsx +0 -1
- package/src/components/Grid/Grid.tsx +1 -1
- package/src/components/Grid/GridCol.tsx +21 -10
- package/src/components/Grid/tests/Grid.unit.test.jsx +0 -1
- package/src/components/Grid/tests/GridCol.unit.test.jsx +0 -1
- package/src/components/Hero/Hero.tsx +1 -1
- package/src/components/Hero/styles/config.scss +0 -1
- package/src/components/Hero/tests/Hero.conformance.test.jsx +1 -2
- package/src/components/Hero/tests/Hero.unit.test.jsx +0 -1
- package/src/components/Hero/tests/data.js +26 -26
- package/src/components/Icon/Icon.tsx +1 -1
- package/src/components/Icon/IconSearch.jsx +4 -4
- package/src/components/Icon/PictogramSearch.jsx +3 -14
- package/src/components/Icon/iconSearchTags.ts +1 -0
- package/src/components/Icon/index.ts +1 -2
- package/src/components/Icon/styles/export/size.scss +2 -2
- package/src/components/Icon/styles/mixins.scss +3 -3
- package/src/components/Icon/styles/style.scss +30 -0
- package/src/components/Icon/tests/Icon.conformance.test.jsx +1 -2
- package/src/components/Icon/tests/Icon.unit.test.jsx +1 -3
- package/src/components/Icon/tests/Pictogram.unit.test.jsx +1 -2
- package/src/components/IconList/IconList.tsx +1 -1
- package/src/components/IconList/Item.tsx +15 -11
- package/src/components/IconList/styles/config.scss +2 -2
- package/src/components/IconList/styles/style.scss +1 -1
- package/src/components/IconList/tests/IconList.conformance.test.jsx +1 -2
- package/src/components/IconList/tests/IconList.unit.test.jsx +29 -26
- package/src/components/Image/Image.tsx +1 -1
- package/src/components/Image/tests/Image.conformance.test.jsx +1 -1
- package/src/components/Image/tests/Image.unit.test.jsx +0 -1
- package/src/components/Link/Link.tsx +1 -1
- package/src/components/Link/tests/Link.conformance.test.jsx +1 -1
- package/src/components/Link/tests/Link.unit.test.jsx +1 -1
- package/src/components/List/ClickableControl.tsx +12 -12
- package/src/components/List/List.tsx +13 -13
- package/src/components/List/ListItem.tsx +11 -11
- package/src/components/List/tests/ClickableControl.unit.test.jsx +0 -1
- package/src/components/List/tests/List.conformance.test.jsx +16 -17
- package/src/components/List/tests/ListItem.unit.test.jsx +46 -47
- package/src/components/Loader/Loader.tsx +1 -1
- package/src/components/Loader/LoaderFullscreen.tsx +32 -0
- package/src/components/Loader/index.ts +1 -0
- package/src/components/Loader/styles/config.scss +5 -5
- package/src/components/Loader/styles/mixins.scss +24 -0
- package/src/components/Loader/styles/style.scss +9 -0
- package/src/components/Loader/tests/Loader.conformance.test.jsx +1 -1
- package/src/components/Loader/tests/LoaderFullscreen.conformance.test.jsx +21 -0
- package/src/components/Loader/tests/LoaderFullscreen.unit.test.jsx +41 -0
- package/src/components/Loader/tests/test.scss +1 -1
- package/src/components/Megamenu/MegaMenuIcon.tsx +1 -1
- package/src/components/Megamenu/Megamenu.static.ts +5 -5
- package/src/components/Megamenu/Megamenu.tsx +28 -29
- package/src/components/Megamenu/MegamenuBlog.tsx +17 -19
- package/src/components/Megamenu/MegamenuSearchContent.tsx +2 -2
- package/src/components/Megamenu/MyOrangeMobilePanel.tsx +11 -12
- package/src/components/Megamenu/index.ts +1 -1
- package/src/components/Megamenu/static.ts +2 -2
- package/src/components/Modal/Modal.tsx +3 -4
- package/src/components/Modal/ModalBody.tsx +1 -1
- package/src/components/Modal/ModalCloseButton.tsx +1 -1
- package/src/components/Modal/ModalProductFooter.tsx +1 -1
- package/src/components/Modal/ModalProductHeader.tsx +1 -1
- package/src/components/Modal/index.ts +2 -2
- package/src/components/Modal/tests/Modal.conformance.test.jsx +2 -3
- package/src/components/Modal/tests/Modal.unit.test.jsx +0 -1
- package/src/components/Modal/tests/ModalProductHeader.unit.test.jsx +0 -1
- package/src/components/Modal/tests/ModalTitle.unit.test.jsx +0 -1
- package/src/components/Pagination/Pagination.tsx +2 -3
- package/src/components/Pagination/PaginationItem.tsx +1 -1
- package/src/components/Pagination/Separator.tsx +1 -1
- package/src/components/Pagination/helpers.ts +6 -1
- package/src/components/Pagination/tests/Item.unit.test.jsx +38 -39
- package/src/components/Pagination/tests/Pagination.conformance.test.jsx +7 -8
- package/src/components/Pagination/tests/Pagination.unit.test.jsx +39 -40
- package/src/components/Pagination/tests/Separator.unit.test.jsx +10 -11
- package/src/components/Pill/Pill.tsx +1 -1
- package/src/components/Pill/tests/Pill.conformance.test.jsx +1 -1
- package/src/components/Preview/CodeExample.tsx +6 -9
- package/src/components/Preview/Preview.tsx +2 -1
- package/src/components/Preview/PreviewGenerator.tsx +8 -8
- package/src/components/Preview/PreviewTitleBar.tsx +1 -1
- package/src/components/Preview/index.tsx +1 -1
- package/src/components/Progress/Progress.tsx +1 -1
- package/src/components/Progress/index.ts +1 -1
- package/src/components/Progress/tests/Progress.conformance.test.jsx +6 -7
- package/src/components/Progress/tests/Progress.unit.test.jsx +42 -39
- package/src/components/PromoBanner/PromoBanner.tsx +1 -1
- package/src/components/PromoBanner/styles/style.scss +2 -2
- package/src/components/PromoBanner/tests/PromoBanner.conformance.test.jsx +1 -2
- package/src/components/PromoBanner/tests/PromoBanner.unit.test.jsx +0 -1
- package/src/components/PromotionCard/PromotionCard.tsx +1 -1
- package/src/components/PromotionCard/PromotionCardContent.tsx +8 -8
- package/src/components/PromotionCard/PromotionCardImageWrapper.tsx +7 -9
- package/src/components/PromotionCard/PromotionCardSection.tsx +1 -1
- package/src/components/PromotionCard/PromotionCardTitle.tsx +11 -11
- package/src/components/PromotionCard/constants.ts +2 -2
- package/src/components/PromotionCard/styles/config.scss +2 -4
- package/src/components/PromotionCard/tests/PromotionCard.conformance.test.jsx +1 -2
- package/src/components/PromotionCard/tests/PromotionCard.unit.test.jsx +0 -1
- package/src/components/Section/Section.tsx +1 -1
- package/src/components/Section/tests/Section.conformance.test.jsx +1 -2
- package/src/components/Section/tests/Section.unit.test.jsx +0 -1
- package/src/components/Skeleton/Skeleton.tsx +1 -1
- package/src/components/Skeleton/styles/mixins.scss +3 -3
- package/src/components/Skeleton/tests/Skeleton.conformance.test.jsx +1 -1
- package/src/components/SkipLink/SkipLink.tsx +1 -1
- package/src/components/SkipLink/tests/SkipLink.unit.test.jsx +0 -4
- package/src/components/SocialButton/SocialButton.tsx +1 -1
- package/src/components/SocialButton/tests/SocialButton.unit.test.jsx +1 -1
- package/src/components/Stepbar/Stepbar.tsx +1 -1
- package/src/components/Stepbar/tests/Stepbar.conformance.test.jsx +1 -1
- package/src/components/Sticker/Sticker.tsx +14 -8
- package/src/components/Sticker/index.ts +1 -0
- package/src/components/Sticker/styles/mixins.scss +2 -2
- package/src/components/Sticker/tests/Sticker.conformance.test.jsx +5 -6
- package/src/components/Sticker/tests/Sticker.unit.test.jsx +16 -19
- package/src/components/Table/Header.tsx +1 -2
- package/src/components/Table/Row.tsx +1 -2
- package/src/components/Table/Rows.tsx +1 -2
- package/src/components/Table/Table.tsx +4 -5
- package/src/components/Table/docsData.ts +0 -1
- package/src/components/Table/index.ts +1 -1
- package/src/components/Table/styles/mixins.scss +5 -0
- package/src/components/Table/tests/Footer.unit.test.jsx +1 -2
- package/src/components/Table/tests/Header.unit.test.jsx +1 -2
- package/src/components/Table/tests/Row.unit.test.jsx +1 -2
- package/src/components/Table/tests/Rows.unit.test.jsx +1 -2
- package/src/components/Table/tests/Table.conformance.test.jsx +6 -6
- package/src/components/Table/tests/Table.unit.test.jsx +1 -1
- package/src/components/Tabs/Tabs.tsx +2 -2
- package/src/components/Tabs/index.ts +2 -2
- package/src/components/Tabs/tests/Tabs.unit.test.jsx +2 -3
- package/src/components/Tag/Tag.tsx +1 -1
- package/src/components/Tag/TagButton.tsx +1 -1
- package/src/components/Tag/index.ts +1 -1
- package/src/components/Tag/styles/mixins.scss +1 -1
- package/src/components/Tag/tests/Tag.conformance.test.jsx +2 -3
- package/src/components/Tag/tests/Tag.unit.test.jsx +1 -3
- package/src/components/Tag/tests/TagButton.conformance.test.jsx +1 -1
- package/src/components/Tag/tests/TagButton.unit.test.jsx +1 -1
- package/src/components/Testimonial/Testimonial.tsx +15 -15
- package/src/components/Testimonial/styles/config.scss +25 -22
- package/src/components/Testimonial/styles/mixins.scss +36 -32
- package/src/components/Testimonial/tests/Testimonial.conformance.test.jsx +5 -6
- package/src/components/Testimonial/tests/Testimonial.unit.test.jsx +22 -23
- package/src/components/Tile/Tile.tsx +2 -3
- package/src/components/Tile/tests/Tile.conformance.test.jsx +1 -1
- package/src/components/Tooltip/InfoTooltip.tsx +1 -1
- package/src/components/Tooltip/Tooltip.static.ts +100 -66
- package/src/components/Tooltip/Tooltip.tsx +2 -3
- package/src/components/Tooltip/index.ts +1 -1
- package/src/components/Tooltip/styles/mixins.scss +14 -13
- package/src/components/Tooltip/tests/Tooltip.conformance.test.jsx +1 -1
- package/src/components/Tooltip/tests/Tooltip.unit.test.jsx +43 -34
- package/src/components/index.ts +41 -40
- package/src/styles/base/globals.scss +17 -1
- package/src/styles/export/breakpoint.scss +1 -1
- package/src/styles/export/breakpoint.ts +7 -7
- package/src/styles/export/space.scss +1 -1
- package/src/styles/tokens/breakpoint.scss +64 -49
- package/src/styles/tokens/space.scss +9 -9
- package/src/styles/tools/generate.scss +6 -6
- package/src/styles/tools/layout.scss +3 -3
- package/src/styles/tools/map.scss +2 -2
- package/src/styles/tools/text.scss +1 -1
- package/src/styles/utilities/index.scss +7 -7
- package/build/search-index.json +0 -426
|
@@ -1,42 +1,39 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
1
|
+
import { render } from "@testing-library/react";
|
|
3
2
|
|
|
4
|
-
import { Sticker } from
|
|
3
|
+
import { Sticker } from "../Sticker";
|
|
5
4
|
|
|
6
|
-
describe(
|
|
7
|
-
describe(
|
|
8
|
-
it(
|
|
5
|
+
describe("rendering Sticker", () => {
|
|
6
|
+
describe("initial state", () => {
|
|
7
|
+
it("has default class sticker", () => {
|
|
9
8
|
const { getByTestId } = render(<Sticker data-testid="test-id" />);
|
|
10
|
-
expect(getByTestId(
|
|
9
|
+
expect(getByTestId("test-id")).toHaveClass("sticker");
|
|
11
10
|
});
|
|
12
11
|
});
|
|
13
12
|
|
|
14
|
-
describe(
|
|
15
|
-
it(
|
|
13
|
+
describe("passed props", () => {
|
|
14
|
+
it("renders children", () => {
|
|
16
15
|
const { getByText } = render(<Sticker>test</Sticker>);
|
|
17
|
-
expect(getByText(
|
|
16
|
+
expect(getByText("test")).toBeInTheDocument();
|
|
18
17
|
});
|
|
19
18
|
|
|
20
|
-
it(
|
|
19
|
+
it("has class test-class when className is set to test-class", () => {
|
|
21
20
|
const { getByTestId } = render(
|
|
22
|
-
<Sticker data-testid="test-id" className="test-class"
|
|
21
|
+
<Sticker data-testid="test-id" className="test-class" />,
|
|
23
22
|
);
|
|
24
|
-
expect(getByTestId(
|
|
23
|
+
expect(getByTestId("test-id")).toHaveClass("test-class");
|
|
25
24
|
});
|
|
26
|
-
[
|
|
25
|
+
["black", "orange"].map((color) => {
|
|
27
26
|
it(`has sticker--${color} class when color is ${color}`, () => {
|
|
28
27
|
const { container } = render(<Sticker color={color} />);
|
|
29
28
|
expect(
|
|
30
|
-
container.getElementsByClassName(`sticker--${color}`).length
|
|
29
|
+
container.getElementsByClassName(`sticker--${color}`).length,
|
|
31
30
|
).toBe(1);
|
|
32
31
|
});
|
|
33
32
|
});
|
|
34
33
|
|
|
35
|
-
it(
|
|
34
|
+
it("has sticker--small class when size is small", () => {
|
|
36
35
|
const { container } = render(<Sticker size="small" />);
|
|
37
|
-
expect(
|
|
38
|
-
container.getElementsByClassName('sticker--small').length
|
|
39
|
-
).toBe(1);
|
|
36
|
+
expect(container.getElementsByClassName("sticker--small").length).toBe(1);
|
|
40
37
|
});
|
|
41
38
|
});
|
|
42
39
|
});
|
|
@@ -4,9 +4,8 @@ import React from "react";
|
|
|
4
4
|
|
|
5
5
|
import { Button } from "../Button/";
|
|
6
6
|
import { Icon } from "../Icon/";
|
|
7
|
-
|
|
8
|
-
import TableContext from "./TableContext";
|
|
9
7
|
import { Cell } from "./Cell";
|
|
8
|
+
import TableContext from "./TableContext";
|
|
10
9
|
import { TableRow } from "./types";
|
|
11
10
|
|
|
12
11
|
interface RowProps {
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import React, { useId } from "react";
|
|
4
3
|
import cx from "classnames";
|
|
4
|
+
import React, { useId } from "react";
|
|
5
5
|
|
|
6
6
|
import ConditionalWrapper from "../../utils/ConditionalWrapper";
|
|
7
7
|
import { useStatic } from "../../utils/hooks";
|
|
8
|
-
|
|
8
|
+
import { Footer } from "./Footer";
|
|
9
9
|
import { Header } from "./Header";
|
|
10
|
-
import TableContext from "./TableContext";
|
|
11
10
|
import { Rows } from "./Rows";
|
|
12
|
-
import { Footer } from "./Footer";
|
|
13
11
|
import TableStatic from "./Table.static";
|
|
14
|
-
import
|
|
12
|
+
import TableContext from "./TableContext";
|
|
13
|
+
import { ExpandableRowsCaptions, TableHeader, TableRow } from "./types";
|
|
15
14
|
|
|
16
15
|
interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {
|
|
17
16
|
/** Caption helps users with screen readers to find a table and understand what it's about and decide if they want to read it. */
|
|
@@ -142,7 +142,6 @@ export const scrollableHeaders: TableHeader[] = [
|
|
|
142
142
|
key: "col5",
|
|
143
143
|
label:
|
|
144
144
|
"Maecenas faucibus mollis interdum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Sed posuere consectetur est at lobortis. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.",
|
|
145
|
-
cellProps: { className: "text-nowrap" },
|
|
146
145
|
},
|
|
147
146
|
];
|
|
148
147
|
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { render } from "@testing-library/react";
|
|
2
|
-
import { axe } from
|
|
2
|
+
import { axe } from "vitest-axe";
|
|
3
3
|
|
|
4
4
|
import "../../../../__mocks__/resizeObserverMock";
|
|
5
5
|
import { Table } from "../";
|
|
6
6
|
import {
|
|
7
|
-
headers,
|
|
8
|
-
rows,
|
|
9
|
-
unsortedHeaders,
|
|
10
7
|
ascendingHeaders,
|
|
11
|
-
descendingHeaders,
|
|
12
|
-
sortableRows,
|
|
13
8
|
ascendingRowsByDate,
|
|
9
|
+
descendingHeaders,
|
|
14
10
|
descendingRowsByDate,
|
|
15
11
|
expandableTableRows,
|
|
16
12
|
footer,
|
|
13
|
+
headers,
|
|
14
|
+
rows,
|
|
17
15
|
scrollableHeaders,
|
|
18
16
|
scrollableRows,
|
|
17
|
+
sortableRows,
|
|
18
|
+
unsortedHeaders,
|
|
19
19
|
} from "../docsData";
|
|
20
20
|
|
|
21
21
|
const defaultProps = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import React from "react";
|
|
4
3
|
import cx from "classnames";
|
|
4
|
+
import React from "react";
|
|
5
5
|
|
|
6
6
|
import { useStatic } from "../../utils/hooks";
|
|
7
7
|
import { Tab } from "./Tab";
|
|
8
|
-
import TabsStatic from "./Tabs.static";
|
|
9
8
|
import type { TabPanelProps } from "./TabPanel";
|
|
9
|
+
import TabsStatic from "./Tabs.static";
|
|
10
10
|
|
|
11
11
|
export const variants = ["standard", "light"] as const;
|
|
12
12
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fireEvent, render, screen } from "@testing-library/react";
|
|
2
2
|
import userEvent from "@testing-library/user-event";
|
|
3
|
-
|
|
4
|
-
import { Tabs } from "../Tabs";
|
|
5
3
|
import { TabPanel } from "../TabPanel";
|
|
4
|
+
import { Tabs } from "../Tabs";
|
|
6
5
|
|
|
7
6
|
const arr = [1, 2, 3, 4];
|
|
8
7
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { render } from "@testing-library/react";
|
|
2
|
-
import { axe } from
|
|
3
|
-
|
|
4
|
-
import { colors } from "../Tag";
|
|
2
|
+
import { axe } from "vitest-axe";
|
|
5
3
|
import { Tag, TagButton } from "..";
|
|
4
|
+
import { colors } from "../Tag";
|
|
6
5
|
|
|
7
6
|
const sizes = ["small", "large"];
|
|
8
7
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { render } from "@testing-library/react";
|
|
2
|
-
|
|
3
|
-
import { Tag } from "../Tag";
|
|
2
|
+
import { colors, Tag } from "../Tag";
|
|
4
3
|
import { TagButton } from "../TagButton";
|
|
5
|
-
import { colors } from "../Tag";
|
|
6
4
|
|
|
7
5
|
describe("rendering", () => {
|
|
8
6
|
describe("initial state", () => {
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import cx from "classnames";
|
|
2
|
+
import React from "react";
|
|
3
3
|
|
|
4
4
|
interface TestimonialProps {
|
|
5
5
|
className?: string;
|
|
6
6
|
children?: React.ReactNode;
|
|
7
|
-
color?:
|
|
7
|
+
color?: "default" | "orange";
|
|
8
8
|
isDiv?: boolean;
|
|
9
9
|
[key: string]: any;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
const CLASS_ROOT =
|
|
12
|
+
const CLASS_ROOT = "testimonial";
|
|
13
13
|
|
|
14
|
-
export const Testimonial: React.FC<TestimonialProps> = ({
|
|
15
|
-
className,
|
|
16
|
-
children,
|
|
17
|
-
color =
|
|
18
|
-
isDiv = false,
|
|
19
|
-
...other
|
|
14
|
+
export const Testimonial: React.FC<TestimonialProps> = ({
|
|
15
|
+
className,
|
|
16
|
+
children,
|
|
17
|
+
color = "default",
|
|
18
|
+
isDiv = false,
|
|
19
|
+
...other
|
|
20
20
|
}) => {
|
|
21
|
-
const Tag = isDiv ?
|
|
21
|
+
const Tag = isDiv ? "div" : "p";
|
|
22
22
|
|
|
23
23
|
const classes = cx(
|
|
24
24
|
CLASS_ROOT,
|
|
25
25
|
{
|
|
26
|
-
[`testimonial--${color}`]: color ===
|
|
26
|
+
[`testimonial--${color}`]: color === "orange",
|
|
27
27
|
},
|
|
28
|
-
className
|
|
28
|
+
className,
|
|
29
29
|
);
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
return (
|
|
32
32
|
<Tag className={classes} {...other}>
|
|
33
33
|
{children}
|
|
@@ -35,4 +35,4 @@ export const Testimonial: React.FC<TestimonialProps> = ({
|
|
|
35
35
|
);
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
Testimonial.displayName =
|
|
38
|
+
Testimonial.displayName = "Testimonial";
|
|
@@ -6,34 +6,37 @@ $black: var(--color-background-contrast);
|
|
|
6
6
|
$orange: var(--color-surface-secondary);
|
|
7
7
|
|
|
8
8
|
$quotation-mark-bottom: (
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
-webkit-mask-image:
|
|
10
|
+
url('data:image/svg+xml,<svg width="20" height="18" viewBox="0 0 20 18" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 0H7.55102V7.55102C7.55102 8.91157 7.39229 10.2041 7.07483 11.4286C6.80272 12.6077 6.34921 13.6508 5.71429 14.5578C5.12472 15.4649 4.35374 16.1905 3.40136 16.7347C2.49433 17.2789 1.38322 17.551 0.0680272 17.551V14.1497C0.839002 14.1497 1.47392 13.9683 1.97279 13.6054C2.47166 13.1973 2.87982 12.6757 3.19728 12.0408C3.51474 11.4059 3.71882 10.703 3.80952 9.93198C3.94558 9.11565 4.01361 8.322 4.01361 7.55102H0V0ZM12.449 0H20V7.55102C20 8.91157 19.8413 10.2041 19.5238 11.4286C19.2517 12.6077 18.7982 13.6508 18.1633 14.5578C17.5737 15.4649 16.8027 16.1905 15.8503 16.7347C14.9433 17.2789 13.8322 17.551 12.517 17.551V14.1497C13.288 14.1497 13.9229 13.9683 14.4218 13.6054C14.9206 13.1973 15.3288 12.6757 15.6463 12.0408C15.9637 11.4059 16.1678 10.703 16.2585 9.93198C16.3946 9.11565 16.4626 8.322 16.4626 7.55102H12.449V0Z" /></svg>'),
|
|
11
|
+
mask-image:
|
|
12
|
+
url('data:image/svg+xml,<svg width="20" height="18" viewBox="0 0 20 18" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 0H7.55102V7.55102C7.55102 8.91157 7.39229 10.2041 7.07483 11.4286C6.80272 12.6077 6.34921 13.6508 5.71429 14.5578C5.12472 15.4649 4.35374 16.1905 3.40136 16.7347C2.49433 17.2789 1.38322 17.551 0.0680272 17.551V14.1497C0.839002 14.1497 1.47392 13.9683 1.97279 13.6054C2.47166 13.1973 2.87982 12.6757 3.19728 12.0408C3.51474 11.4059 3.71882 10.703 3.80952 9.93198C3.94558 9.11565 4.01361 8.322 4.01361 7.55102H0V0ZM12.449 0H20V7.55102C20 8.91157 19.8413 10.2041 19.5238 11.4286C19.2517 12.6077 18.7982 13.6508 18.1633 14.5578C17.5737 15.4649 16.8027 16.1905 15.8503 16.7347C14.9433 17.2789 13.8322 17.551 12.517 17.551V14.1497C13.288 14.1497 13.9229 13.9683 14.4218 13.6054C14.9206 13.1973 15.3288 12.6757 15.6463 12.0408C15.9637 11.4059 16.1678 10.703 16.2585 9.93198C16.3946 9.11565 16.4626 8.322 16.4626 7.55102H12.449V0Z" /></svg>')
|
|
11
13
|
);
|
|
12
14
|
|
|
13
15
|
$quotation-mark-top: (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
mask-image:
|
|
17
|
+
url('data:image/svg+xml,<svg width="20" height="18" viewBox="0 0 20 18" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.55102 17.551H0V10C0 8.63946 0.136054 7.36962 0.408163 6.19048C0.725624 4.96599 1.17914 3.90023 1.76871 2.9932C2.40363 2.08617 3.19728 1.36055 4.14966 0.81633C5.10204 0.272111 6.21315 0 7.48299 0V3.40136C6.71202 3.40136 6.0771 3.60544 5.57823 4.01361C5.07937 4.37642 4.6712 4.87528 4.35374 5.5102C4.03628 6.14513 3.80952 6.87075 3.67347 7.68708C3.58277 8.45805 3.53742 9.22902 3.53742 10H7.55102V17.551ZM20 17.551H12.449V10C12.449 8.63946 12.585 7.36962 12.8571 6.19048C13.1746 4.96599 13.6281 3.90023 14.2177 2.9932C14.8526 2.08617 15.6463 1.36055 16.5986 0.81633C17.551 0.272111 18.6621 0 19.932 0V3.40136C19.161 3.40136 18.5261 3.60544 18.0272 4.01361C17.5283 4.37642 17.1202 4.87528 16.8027 5.5102C16.4853 6.14513 16.2585 6.87075 16.1224 7.68708C16.0317 8.45805 15.9864 9.22902 15.9864 10H20V17.551Z" /></svg>'),
|
|
18
|
+
-webkit-mask-image:
|
|
19
|
+
url('data:image/svg+xml,<svg width="20" height="18" viewBox="0 0 20 18" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.55102 17.551H0V10C0 8.63946 0.136054 7.36962 0.408163 6.19048C0.725624 4.96599 1.17914 3.90023 1.76871 2.9932C2.40363 2.08617 3.19728 1.36055 4.14966 0.81633C5.10204 0.272111 6.21315 0 7.48299 0V3.40136C6.71202 3.40136 6.0771 3.60544 5.57823 4.01361C5.07937 4.37642 4.6712 4.87528 4.35374 5.5102C4.03628 6.14513 3.80952 6.87075 3.67347 7.68708C3.58277 8.45805 3.53742 9.22902 3.53742 10H7.55102V17.551ZM20 17.551H12.449V10C12.449 8.63946 12.585 7.36962 12.8571 6.19048C13.1746 4.96599 13.6281 3.90023 14.2177 2.9932C14.8526 2.08617 15.6463 1.36055 16.5986 0.81633C17.551 0.272111 18.6621 0 19.932 0V3.40136C19.161 3.40136 18.5261 3.60544 18.0272 4.01361C17.5283 4.37642 17.1202 4.87528 16.8027 5.5102C16.4853 6.14513 16.2585 6.87075 16.1224 7.68708C16.0317 8.45805 15.9864 9.22902 15.9864 10H20V17.551Z" /></svg>'),
|
|
16
20
|
);
|
|
17
21
|
|
|
18
22
|
$quotation-mark-top-position: (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
default: (
|
|
24
|
+
top: 0,
|
|
25
|
+
right: 0,
|
|
26
|
+
),
|
|
27
|
+
oneline: (
|
|
28
|
+
top: 0,
|
|
29
|
+
right: 0,
|
|
30
|
+
),
|
|
27
31
|
);
|
|
28
32
|
|
|
29
33
|
$quotation-mark-bottom-position: (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
)
|
|
39
|
-
|
|
34
|
+
default: (
|
|
35
|
+
left: 0,
|
|
36
|
+
bottom: 0,
|
|
37
|
+
),
|
|
38
|
+
oneline: (
|
|
39
|
+
left: 0,
|
|
40
|
+
bottom: 0,
|
|
41
|
+
),
|
|
42
|
+
);
|
|
@@ -1,40 +1,44 @@
|
|
|
1
|
-
@use
|
|
2
|
-
@use
|
|
3
|
-
@use
|
|
4
|
-
@use
|
|
5
|
-
@use
|
|
1
|
+
@use "./config";
|
|
2
|
+
@use "../../../styles/tokens/base";
|
|
3
|
+
@use "../../../styles/tokens/space";
|
|
4
|
+
@use "../../../styles/tools/generate";
|
|
5
|
+
@use "../../../styles/tools/convert";
|
|
6
6
|
|
|
7
7
|
@mixin base {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
padding: space.get("small") space.get("large") space.get("small")
|
|
9
|
+
convert.to-rem(40px);
|
|
10
|
+
width: fit-content;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
@mixin quotation-mark {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
14
|
+
font-size: convert.to-rem(14px);
|
|
15
|
+
position: relative;
|
|
16
|
+
&::before,
|
|
17
|
+
&::after {
|
|
18
|
+
content: "";
|
|
19
|
+
display: block;
|
|
20
|
+
position: absolute;
|
|
21
|
+
height: convert.to-rem(18px);
|
|
22
|
+
width: convert.to-rem(20px);
|
|
23
|
+
background-repeat: no-repeat;
|
|
24
|
+
background-color: config.$black;
|
|
25
|
+
}
|
|
26
|
+
&::before {
|
|
27
|
+
@include generate.css-map(config.$quotation-mark-bottom);
|
|
28
|
+
@include generate.css-map(
|
|
29
|
+
config.$quotation-mark-bottom-position,
|
|
30
|
+
"default"
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
&::after {
|
|
34
|
+
@include generate.css-map(config.$quotation-mark-top);
|
|
35
|
+
@include generate.css-map(config.$quotation-mark-top-position, "default");
|
|
36
|
+
}
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
@mixin orange {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
40
|
+
&::before,
|
|
41
|
+
&::after {
|
|
42
|
+
background-color: config.$orange;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { axe } from 'vitest-axe';
|
|
1
|
+
import { render } from "@testing-library/react";
|
|
2
|
+
import { axe } from "vitest-axe";
|
|
4
3
|
|
|
5
|
-
import { Testimonial } from
|
|
4
|
+
import { Testimonial } from "../";
|
|
6
5
|
|
|
7
6
|
const example = <Testimonial />;
|
|
8
7
|
|
|
9
|
-
it(
|
|
8
|
+
it("is valid html", () => {
|
|
10
9
|
const { container } = render(example);
|
|
11
10
|
expect(container).toHTMLValidate();
|
|
12
11
|
});
|
|
13
12
|
|
|
14
|
-
it(
|
|
13
|
+
it("is accessible", async () => {
|
|
15
14
|
const { container } = render(example);
|
|
16
15
|
expect(await axe(container)).toHaveNoViolations();
|
|
17
16
|
});
|
|
@@ -1,44 +1,43 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
1
|
+
import { render } from "@testing-library/react";
|
|
3
2
|
|
|
4
|
-
import { Testimonial } from
|
|
3
|
+
import { Testimonial } from "../";
|
|
5
4
|
|
|
6
|
-
describe(
|
|
7
|
-
describe(
|
|
8
|
-
it(
|
|
5
|
+
describe("rendering Testimonial", () => {
|
|
6
|
+
describe("initial state", () => {
|
|
7
|
+
it("has default class testimonial", () => {
|
|
9
8
|
const { getByTestId } = render(<Testimonial data-testid="test-id" />);
|
|
10
|
-
expect(getByTestId(
|
|
9
|
+
expect(getByTestId("test-id")).toHaveClass("testimonial");
|
|
11
10
|
});
|
|
12
|
-
it(
|
|
11
|
+
it("its rendered as paragraph", () => {
|
|
13
12
|
const { getByTestId } = render(<Testimonial data-testid="test-id" />);
|
|
14
|
-
expect(getByTestId(
|
|
13
|
+
expect(getByTestId("test-id").tagName).toBe("P");
|
|
15
14
|
});
|
|
16
15
|
});
|
|
17
16
|
|
|
18
|
-
describe(
|
|
19
|
-
it(
|
|
17
|
+
describe("passed props", () => {
|
|
18
|
+
it("renders children", () => {
|
|
20
19
|
const { getByText } = render(<Testimonial>test</Testimonial>);
|
|
21
|
-
expect(getByText(
|
|
20
|
+
expect(getByText("test")).toBeInTheDocument();
|
|
22
21
|
});
|
|
23
|
-
it(
|
|
22
|
+
it("has additional class when className is set", () => {
|
|
24
23
|
const { getByTestId } = render(
|
|
25
|
-
<Testimonial className="test" data-testid="test-id"
|
|
24
|
+
<Testimonial className="test" data-testid="test-id" />,
|
|
26
25
|
);
|
|
27
|
-
expect(getByTestId(
|
|
28
|
-
expect(getByTestId(
|
|
26
|
+
expect(getByTestId("test-id")).toHaveClass("testimonial");
|
|
27
|
+
expect(getByTestId("test-id")).toHaveClass("test");
|
|
29
28
|
});
|
|
30
|
-
it(
|
|
29
|
+
it("has additional className testimonial--orange prop color with value orange is passed", () => {
|
|
31
30
|
const { getByTestId } = render(
|
|
32
|
-
<Testimonial className="test" data-testid="test-id" color="orange"
|
|
31
|
+
<Testimonial className="test" data-testid="test-id" color="orange" />,
|
|
33
32
|
);
|
|
34
|
-
expect(getByTestId(
|
|
35
|
-
expect(getByTestId(
|
|
33
|
+
expect(getByTestId("test-id")).toHaveClass("testimonial");
|
|
34
|
+
expect(getByTestId("test-id")).toHaveClass("testimonial--orange");
|
|
36
35
|
});
|
|
37
|
-
it(
|
|
36
|
+
it("its rendered as div when isDiv prop is passed", () => {
|
|
38
37
|
const { getByTestId } = render(
|
|
39
|
-
<Testimonial data-testid="test-id" isDiv
|
|
38
|
+
<Testimonial data-testid="test-id" isDiv />,
|
|
40
39
|
);
|
|
41
|
-
expect(getByTestId(
|
|
40
|
+
expect(getByTestId("test-id").tagName).toBe("DIV");
|
|
42
41
|
});
|
|
43
42
|
});
|
|
44
43
|
});
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React, { ReactNode } from "react";
|
|
2
1
|
import cx from "classnames";
|
|
3
|
-
|
|
4
|
-
import { Image } from "../Image";
|
|
2
|
+
import React, { ReactNode } from "react";
|
|
5
3
|
import { Icon } from "../Icon";
|
|
6
4
|
import { IconProps } from "../Icon/Icon";
|
|
5
|
+
import { Image } from "../Image";
|
|
7
6
|
|
|
8
7
|
export const tileColors = [
|
|
9
8
|
"surface-primary",
|