@orangesk/orange-design-system 2.0.0-beta.36 → 2.0.0-beta.37
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/PromoBanner/style.css +1 -1
- package/build/components/PromoBanner/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 +729 -729
- 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/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/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 +20 -20
- 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/search-index.json +3 -3
- package/build/sprite.svg +1 -1
- package/package.json +28 -26
- package/src/assets/icons/discount-price.svg +4 -0
- 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 +3 -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/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/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/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.tsx +2 -2
- package/src/components/Forms/Checkbox/Checkbox.tsx +1 -1
- 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/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/InputStepper/InputStepper.tsx +1 -1
- package/src/components/Forms/Label/Label.tsx +1 -1
- package/src/components/Forms/Message/Message.tsx +9 -5
- package/src/components/Forms/Radio/Radio.tsx +1 -1
- package/src/components/Forms/RangeSlider/RangeSlider.tsx +1 -1
- package/src/components/Forms/Select/Select.tsx +1 -1
- package/src/components/Forms/TextArea/TextArea.tsx +1 -1
- package/src/components/Forms/TextInput/TextInput.tsx +3 -5
- 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/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/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/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/tests/Loader.conformance.test.jsx +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/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/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/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/index.ts +1 -1
- 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/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/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/tests/Tooltip.conformance.test.jsx +1 -1
- package/src/components/Tooltip/tests/Tooltip.unit.test.jsx +43 -34
- package/src/components/index.ts +39 -39
- package/src/styles/base/globals.scss +17 -1
- package/src/styles/export/breakpoint.ts +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { fireEvent, render } from "@testing-library/react";
|
|
2
2
|
|
|
3
3
|
import { Tooltip } from "../Tooltip";
|
|
4
4
|
|
|
@@ -223,79 +223,88 @@ describe("rendering Tooltip", () => {
|
|
|
223
223
|
</Base>,
|
|
224
224
|
);
|
|
225
225
|
});
|
|
226
|
-
it("button
|
|
226
|
+
it("button does not get class is-active when focused", () => {
|
|
227
227
|
const { container } = tooltip;
|
|
228
228
|
fireEvent.focus(container.querySelector("button"));
|
|
229
|
-
expect(container.querySelector("button")).toHaveClass("is-active");
|
|
229
|
+
expect(container.querySelector("button")).not.toHaveClass("is-active");
|
|
230
230
|
});
|
|
231
231
|
|
|
232
|
-
it("tooltip
|
|
232
|
+
it("tooltip is not visible when button is focused", () => {
|
|
233
233
|
const { container, getByTestId } = tooltip;
|
|
234
234
|
fireEvent.focus(container.querySelector("button"));
|
|
235
|
-
expect(getByTestId("test-id")).toHaveClass("is-visible");
|
|
235
|
+
expect(getByTestId("test-id")).not.toHaveClass("is-visible");
|
|
236
236
|
});
|
|
237
|
-
it("button has class is-active when
|
|
237
|
+
it("button has class is-active when clicked", () => {
|
|
238
238
|
const { container } = tooltip;
|
|
239
|
-
fireEvent.
|
|
239
|
+
fireEvent.click(container.querySelector("button"));
|
|
240
240
|
expect(container.querySelector("button")).toHaveClass("is-active");
|
|
241
241
|
});
|
|
242
242
|
|
|
243
|
-
it("tooltip has class is-visible when
|
|
243
|
+
it("tooltip has class is-visible when button is clicked", () => {
|
|
244
244
|
const { container, getByTestId } = tooltip;
|
|
245
|
-
fireEvent.
|
|
245
|
+
fireEvent.click(container.querySelector("button"));
|
|
246
246
|
expect(getByTestId("test-id")).toHaveClass("is-visible");
|
|
247
247
|
});
|
|
248
|
-
it("has hidden attribute set to false after
|
|
248
|
+
it("has hidden attribute set to false after button click", () => {
|
|
249
249
|
const { getByTestId, container } = tooltip;
|
|
250
|
-
fireEvent.
|
|
250
|
+
fireEvent.click(container.querySelector("button"));
|
|
251
251
|
expect(getByTestId("test-id").hidden).toBe(false);
|
|
252
252
|
});
|
|
253
|
-
it("
|
|
253
|
+
it("keeps hidden attribute set to true after button focus", () => {
|
|
254
254
|
const { getByTestId, container } = tooltip;
|
|
255
255
|
fireEvent.focus(container.querySelector("button"));
|
|
256
|
-
expect(getByTestId("test-id").hidden).toBe(
|
|
256
|
+
expect(getByTestId("test-id").hidden).toBe(true);
|
|
257
257
|
});
|
|
258
|
-
it("button
|
|
258
|
+
it("button loses class is-active after blur", () => {
|
|
259
259
|
const { container } = tooltip;
|
|
260
|
-
fireEvent.
|
|
260
|
+
fireEvent.click(container.querySelector("button"));
|
|
261
261
|
fireEvent.blur(container.querySelector("button"));
|
|
262
262
|
expect(container.querySelector("button")).not.toHaveClass("is-active");
|
|
263
263
|
});
|
|
264
264
|
|
|
265
|
-
it("tooltip
|
|
265
|
+
it("tooltip loses class is-visible after blur", () => {
|
|
266
266
|
const { container, getByTestId } = tooltip;
|
|
267
|
-
fireEvent.
|
|
267
|
+
fireEvent.click(container.querySelector("button"));
|
|
268
268
|
fireEvent.blur(container.querySelector("button"));
|
|
269
269
|
expect(getByTestId("test-id")).not.toHaveClass("is-visible");
|
|
270
270
|
});
|
|
271
|
-
it("button
|
|
271
|
+
it("button loses class is-active after second click", () => {
|
|
272
272
|
const { container } = tooltip;
|
|
273
|
-
fireEvent.
|
|
274
|
-
fireEvent.
|
|
273
|
+
fireEvent.click(container.querySelector("button"));
|
|
274
|
+
fireEvent.click(container.querySelector("button"));
|
|
275
275
|
expect(container.querySelector("button")).not.toHaveClass("is-active");
|
|
276
276
|
});
|
|
277
277
|
|
|
278
|
-
it("tooltip
|
|
278
|
+
it("tooltip loses class is-visible after second click", () => {
|
|
279
279
|
const { container, getByTestId } = tooltip;
|
|
280
|
-
fireEvent.
|
|
281
|
-
fireEvent.
|
|
280
|
+
fireEvent.click(container.querySelector("button"));
|
|
281
|
+
fireEvent.click(container.querySelector("button"));
|
|
282
282
|
expect(getByTestId("test-id")).not.toHaveClass("is-visible");
|
|
283
283
|
});
|
|
284
|
-
it("
|
|
284
|
+
it("hides on blur after being opened by click", () => {
|
|
285
285
|
const { getByTestId, container } = tooltip;
|
|
286
|
-
fireEvent.
|
|
287
|
-
fireEvent.
|
|
288
|
-
|
|
289
|
-
expect(getByTestId("test-id").hidden).toBe(false);
|
|
290
|
-
});
|
|
286
|
+
fireEvent.click(container.querySelector("button"));
|
|
287
|
+
fireEvent.blur(container.querySelector("button"));
|
|
288
|
+
expect(getByTestId("test-id")).not.toHaveClass("is-visible");
|
|
291
289
|
});
|
|
292
|
-
it("
|
|
290
|
+
it("stays visible when tooltip content is clicked", () => {
|
|
293
291
|
const { getByTestId, container } = tooltip;
|
|
294
|
-
fireEvent.
|
|
292
|
+
fireEvent.click(container.querySelector("button"));
|
|
293
|
+
fireEvent.mouseDown(getByTestId("test-id"));
|
|
295
294
|
fireEvent.blur(container.querySelector("button"));
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
295
|
+
expect(getByTestId("test-id")).toHaveClass("is-visible");
|
|
296
|
+
});
|
|
297
|
+
it("hides when clicking outside tooltip and trigger", () => {
|
|
298
|
+
const { getByTestId, container } = tooltip;
|
|
299
|
+
fireEvent.click(container.querySelector("button"));
|
|
300
|
+
fireEvent.click(document.body);
|
|
301
|
+
expect(getByTestId("test-id")).not.toHaveClass("is-visible");
|
|
302
|
+
});
|
|
303
|
+
it("hides on Escape key press", () => {
|
|
304
|
+
const { getByTestId, container } = tooltip;
|
|
305
|
+
fireEvent.click(container.querySelector("button"));
|
|
306
|
+
fireEvent.keyDown(container.querySelector("button"), { key: "Escape" });
|
|
307
|
+
expect(getByTestId("test-id")).not.toHaveClass("is-visible");
|
|
299
308
|
});
|
|
300
309
|
});
|
|
301
310
|
});
|
package/src/components/index.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Accordion, AccordionItem } from "./Accordion";
|
|
2
2
|
import { Alert } from "./Alert";
|
|
3
3
|
import { AnchorNavigation } from "./AnchorNavigation";
|
|
4
|
-
import { Tag, TagButton } from "./Tag";
|
|
5
4
|
import { Bar, BarBreak, BarItem } from "./Bar";
|
|
6
5
|
import {
|
|
7
6
|
BlockAction,
|
|
@@ -19,12 +18,14 @@ import {
|
|
|
19
18
|
IconButton,
|
|
20
19
|
} from "./Button";
|
|
21
20
|
import { Buttons } from "./Buttons";
|
|
21
|
+
import { Card, CardProductHeader, CardSection } from "./Card";
|
|
22
22
|
import { Carousel } from "./Carousel";
|
|
23
23
|
import { CarouselHero, CarouselHeroItem } from "./CarouselHero";
|
|
24
24
|
import { CarouselPromotions } from "./CarouselPromotions";
|
|
25
25
|
import { CartTable } from "./CartTable";
|
|
26
26
|
import { Container } from "./Container";
|
|
27
27
|
import { Controls } from "./Controls";
|
|
28
|
+
import { Cover } from "./Cover";
|
|
28
29
|
import { Divider } from "./Divider";
|
|
29
30
|
import {
|
|
30
31
|
Dropdown,
|
|
@@ -34,65 +35,64 @@ import {
|
|
|
34
35
|
} from "./Dropdown";
|
|
35
36
|
import { Expander } from "./Expander/Expander";
|
|
36
37
|
import { FeatureAccordion, FeatureAccordionItem } from "./FeatureAccordion";
|
|
37
|
-
import {
|
|
38
|
-
|
|
38
|
+
import {
|
|
39
|
+
Autocomplete,
|
|
40
|
+
Checkbox,
|
|
41
|
+
Field,
|
|
42
|
+
Fieldset,
|
|
43
|
+
File,
|
|
44
|
+
Group,
|
|
45
|
+
Hint,
|
|
46
|
+
InputStepper,
|
|
47
|
+
Label,
|
|
48
|
+
Message,
|
|
49
|
+
Radio,
|
|
50
|
+
RangeSlider,
|
|
51
|
+
Select,
|
|
52
|
+
TextArea,
|
|
53
|
+
TextInput,
|
|
54
|
+
} from "./Forms";
|
|
39
55
|
import { Gauge } from "./Gauge";
|
|
40
56
|
import { Grid, GridCol } from "./Grid";
|
|
57
|
+
import { Hero } from "./Hero";
|
|
58
|
+
import { Icon, Pictogram, SpritePathContext, SpritePathProvider } from "./Icon";
|
|
59
|
+
import { IconList, Item } from "./IconList";
|
|
41
60
|
import { Image } from "./Image";
|
|
42
61
|
import { Link } from "./Link";
|
|
62
|
+
import { List, ListItem } from "./List";
|
|
43
63
|
import { Loader } from "./Loader";
|
|
44
64
|
import { Megamenu, MegamenuBlog } from "./Megamenu";
|
|
45
65
|
import {
|
|
46
66
|
Modal,
|
|
47
67
|
ModalBody,
|
|
48
68
|
ModalCloseButton,
|
|
49
|
-
ModalTitle,
|
|
50
|
-
ModalProductHeader,
|
|
51
69
|
ModalProductFooter,
|
|
70
|
+
ModalProductHeader,
|
|
71
|
+
ModalTitle,
|
|
52
72
|
} from "./Modal";
|
|
53
|
-
import { Section } from "./Section";
|
|
54
|
-
import { Sticker } from "./Sticker";
|
|
55
|
-
import { SkipLink } from "./SkipLink";
|
|
56
|
-
import { List, ListItem } from "./List";
|
|
57
|
-
import { Progress } from "./Progress";
|
|
58
73
|
import { Pagination } from "./Pagination";
|
|
74
|
+
import { Pill } from "./Pill";
|
|
75
|
+
import { Progress } from "./Progress";
|
|
59
76
|
import { PromoBanner } from "./PromoBanner";
|
|
60
77
|
import {
|
|
61
78
|
PromotionCard,
|
|
62
|
-
PromotionCardSection,
|
|
63
79
|
PromotionCardContent,
|
|
64
|
-
PromotionCardTitle,
|
|
65
80
|
PromotionCardImageWrapper,
|
|
81
|
+
PromotionCardSection,
|
|
82
|
+
PromotionCardTitle,
|
|
66
83
|
} from "./PromotionCard";
|
|
67
|
-
import {
|
|
68
|
-
Autocomplete,
|
|
69
|
-
Select,
|
|
70
|
-
TextInput,
|
|
71
|
-
TextArea,
|
|
72
|
-
RangeSlider,
|
|
73
|
-
Message,
|
|
74
|
-
Label,
|
|
75
|
-
Hint,
|
|
76
|
-
Radio,
|
|
77
|
-
Checkbox,
|
|
78
|
-
File,
|
|
79
|
-
InputStepper,
|
|
80
|
-
Group,
|
|
81
|
-
Fieldset,
|
|
82
|
-
Field,
|
|
83
|
-
} from "./Forms";
|
|
84
|
+
import { Section } from "./Section";
|
|
84
85
|
import { Skeleton } from "./Skeleton";
|
|
85
|
-
import {
|
|
86
|
+
import { SkipLink } from "./SkipLink";
|
|
87
|
+
import { SocialButton } from "./SocialButton";
|
|
86
88
|
import { Stepbar } from "./Stepbar";
|
|
87
|
-
import {
|
|
89
|
+
import { Sticker } from "./Sticker";
|
|
88
90
|
import { Table } from "./Table";
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
91
|
-
import { Cover } from "./Cover";
|
|
91
|
+
import { Tab, TabPanel, Tabs } from "./Tabs";
|
|
92
|
+
import { Tag, TagButton } from "./Tag";
|
|
92
93
|
import { Testimonial } from "./Testimonial";
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import { SocialButton } from "./SocialButton";
|
|
94
|
+
import { Tile } from "./Tile";
|
|
95
|
+
import { InfoTooltip, Tooltip } from "./Tooltip";
|
|
96
96
|
|
|
97
97
|
export {
|
|
98
98
|
Accordion,
|
|
@@ -166,8 +166,6 @@ export {
|
|
|
166
166
|
ModalTitle,
|
|
167
167
|
Pagination,
|
|
168
168
|
Pictogram,
|
|
169
|
-
SpritePathContext,
|
|
170
|
-
SpritePathProvider,
|
|
171
169
|
Pill,
|
|
172
170
|
Progress,
|
|
173
171
|
PromoBanner,
|
|
@@ -183,6 +181,8 @@ export {
|
|
|
183
181
|
Skeleton,
|
|
184
182
|
SkipLink,
|
|
185
183
|
SocialButton,
|
|
184
|
+
SpritePathContext,
|
|
185
|
+
SpritePathProvider,
|
|
186
186
|
Stepbar,
|
|
187
187
|
Sticker,
|
|
188
188
|
Tab,
|
|
@@ -32,7 +32,21 @@ body {
|
|
|
32
32
|
padding: 0;
|
|
33
33
|
margin: 0;
|
|
34
34
|
text-size-adjust: 100%;
|
|
35
|
-
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (prefers-reduced-motion: reduce) {
|
|
38
|
+
html:focus-within {
|
|
39
|
+
scroll-behavior: auto;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
*,
|
|
43
|
+
*::before,
|
|
44
|
+
*::after {
|
|
45
|
+
animation-duration: 0.01ms !important;
|
|
46
|
+
animation-iteration-count: 1 !important;
|
|
47
|
+
transition-duration: 0.01ms !important;
|
|
48
|
+
scroll-behavior: auto !important;
|
|
49
|
+
}
|
|
36
50
|
}
|
|
37
51
|
|
|
38
52
|
body {
|
|
@@ -40,6 +54,8 @@ body {
|
|
|
40
54
|
background-color: base.$background;
|
|
41
55
|
font-family: #{base.$font-family};
|
|
42
56
|
color: base.$text-color;
|
|
57
|
+
-webkit-font-smoothing: antialiased;
|
|
58
|
+
-moz-osx-font-smoothing: grayscale;
|
|
43
59
|
}
|
|
44
60
|
|
|
45
61
|
* {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// Export breakpoints from SCSS tokens
|
|
2
2
|
// TODO: Remove this file and use the SCSS module instead but now is best solution this one
|
|
3
3
|
const breakpoints = {
|
|
4
|
-
xs:
|
|
5
|
-
sm:
|
|
6
|
-
md:
|
|
7
|
-
lg:
|
|
8
|
-
xl:
|
|
9
|
-
xxl:
|
|
4
|
+
xs: "0px",
|
|
5
|
+
sm: "480px",
|
|
6
|
+
md: "768px",
|
|
7
|
+
lg: "992px",
|
|
8
|
+
xl: "1240px",
|
|
9
|
+
xxl: "1380px",
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
export default breakpoints;
|
|
12
|
+
export default breakpoints;
|