@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,40 +1,40 @@
|
|
|
1
1
|
export const singleImage = {
|
|
2
|
-
src:
|
|
3
|
-
srcSet:
|
|
2
|
+
src: "https://placehold.co/626x540",
|
|
3
|
+
srcSet: "https://placehold.co/626x540, https://placehold.co/1252x1080 2x",
|
|
4
4
|
};
|
|
5
5
|
|
|
6
6
|
export const halfImages = {
|
|
7
|
-
default:
|
|
8
|
-
sm:
|
|
9
|
-
md:
|
|
10
|
-
lg:
|
|
11
|
-
xl:
|
|
12
|
-
xxl:
|
|
7
|
+
default: "https://placehold.co/768x540",
|
|
8
|
+
sm: "https://placehold.co/768x540, https://placehold.co/1536x1080 2x",
|
|
9
|
+
md: "https://placehold.co/768x510, https://placehold.co/1536x1080 2x",
|
|
10
|
+
lg: "https://placehold.co/470x540, https://placehold.co/940x1080 2x",
|
|
11
|
+
xl: "https://placehold.co/590x540, https://placehold.co/1180x1080 2x",
|
|
12
|
+
xxl: "https://placehold.co/650x540, https://placehold.co/1300x1080 2x",
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export const halfImagesDark = {
|
|
16
|
-
default:
|
|
17
|
-
sm:
|
|
18
|
-
md:
|
|
19
|
-
lg:
|
|
20
|
-
xl:
|
|
21
|
-
xxl:
|
|
16
|
+
default: "https://placehold.co/768x540/222/666",
|
|
17
|
+
sm: "https://placehold.co/768x540/222/666, https://placehold.co/1536x1080/222/666 2x",
|
|
18
|
+
md: "https://placehold.co/768x510/222/666, https://placehold.co/1536x1080/222/666 2x",
|
|
19
|
+
lg: "https://placehold.co/470x540/222/666, https://placehold.co/940x1080/222/666 2x",
|
|
20
|
+
xl: "https://placehold.co/590x540/222/666, https://placehold.co/1180x1080/222/666 2x",
|
|
21
|
+
xxl: "https://placehold.co/650x540/222/666, https://placehold.co/1300x1080/222/666 2x",
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export const fullwidthImages = {
|
|
25
|
-
default:
|
|
26
|
-
sm:
|
|
27
|
-
md:
|
|
28
|
-
lg:
|
|
29
|
-
xl:
|
|
30
|
-
xxl:
|
|
25
|
+
default: "https://placehold.co/768x540",
|
|
26
|
+
sm: "https://placehold.co/768x540, https://placehold.co/1536x1080 2x",
|
|
27
|
+
md: "https://placehold.co/768x510, https://placehold.co/1536x1080 2x",
|
|
28
|
+
lg: "https://placehold.co/1024x540, https://placehold.co/2048x1080 2x",
|
|
29
|
+
xl: "https://placehold.co/1280x540, https://placehold.co/2520x1080 2x",
|
|
30
|
+
xxl: "https://placehold.co/1400x540, https://placehold.co/2800x1080 2x",
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
export const fullwidthImagesDark = {
|
|
34
|
-
default:
|
|
35
|
-
sm:
|
|
36
|
-
md:
|
|
37
|
-
lg:
|
|
38
|
-
xl:
|
|
39
|
-
xxl:
|
|
34
|
+
default: "https://placehold.co/768x540/222/666",
|
|
35
|
+
sm: "https://placehold.co/768x540/222/666, https://placehold.co/1536x1080/222/666 2x",
|
|
36
|
+
md: "https://placehold.co/768x510/222/666, https://placehold.co/1536x1080/222/666 2x",
|
|
37
|
+
lg: "https://placehold.co/1024x540/222/666, https://placehold.co/2048x1080/222/666 2x",
|
|
38
|
+
xl: "https://placehold.co/1280x540/222/666, https://placehold.co/2520x1080/222/666 2x",
|
|
39
|
+
xxl: "https://placehold.co/1400x540/222/666, https://placehold.co/2800x1080/222/666 2x",
|
|
40
40
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import React, { useContext } from "react";
|
|
4
3
|
import cx from "classnames";
|
|
4
|
+
import React, { useContext } from "react";
|
|
5
5
|
import { SpritePathContext } from "./SpritePathContext";
|
|
6
6
|
|
|
7
7
|
export type IconColor = "info" | "success" | "warning" | "danger" | "orange";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { useEffect, useState, useRef } from "react";
|
|
4
3
|
import cx from "classnames";
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
Bar,
|
|
@@ -9,14 +9,14 @@ import {
|
|
|
9
9
|
Button,
|
|
10
10
|
Container,
|
|
11
11
|
Field,
|
|
12
|
+
Fieldset,
|
|
12
13
|
Grid,
|
|
13
|
-
Icon,
|
|
14
14
|
GridCol,
|
|
15
|
-
|
|
15
|
+
Icon,
|
|
16
16
|
Label,
|
|
17
17
|
} from "..";
|
|
18
18
|
|
|
19
|
-
import {
|
|
19
|
+
import { iconsWithTags, tags } from "./iconSearchTags";
|
|
20
20
|
import { handleSvgClick, loadIconNames } from "./iconUtils";
|
|
21
21
|
|
|
22
22
|
// Icon names will be loaded dynamically on the client
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { useEffect, useState } from "react";
|
|
4
3
|
import cx from "classnames";
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
Bar,
|
|
8
|
-
BarItem,
|
|
9
|
-
Button,
|
|
10
|
-
Container,
|
|
11
|
-
Field,
|
|
12
|
-
Grid,
|
|
13
|
-
GridCol,
|
|
14
|
-
Fieldset,
|
|
15
|
-
Label,
|
|
16
|
-
} from "..";
|
|
17
|
-
|
|
18
|
-
import { Pictogram } from "./Pictogram";
|
|
6
|
+
import { Bar, BarItem, Button, Container, Label } from "..";
|
|
19
7
|
import { handleSvgClick, loadIconNames } from "./iconUtils";
|
|
8
|
+
import { Pictogram } from "./Pictogram";
|
|
20
9
|
|
|
21
10
|
// Pictogram names will be loaded dynamically on the client
|
|
22
11
|
let pictogramNamesCache = [];
|
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
@use "./mixins";
|
|
2
|
+
@use "./config";
|
|
2
3
|
@use "../../../styles/tools/convert";
|
|
4
|
+
@use "../../../styles/tools/generate";
|
|
5
|
+
@use "../../../styles/tokens/breakpoint";
|
|
3
6
|
@use "../../../styles/tokens/space";
|
|
4
7
|
|
|
5
8
|
@layer components {
|
|
9
|
+
$with-text-end-host-selectors: ":where(p, div, li, span, a, label)";
|
|
10
|
+
|
|
11
|
+
#{$with-text-end-host-selectors}:has(> .icon--with-text-end:first-child) {
|
|
12
|
+
--icon-with-text-end-size: 1em;
|
|
13
|
+
padding-inline-start: calc(
|
|
14
|
+
var(--icon-with-text-end-size) + #{convert.to-rem(5px)}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@each $breakpoint-name, $sizes in config.$sizes {
|
|
19
|
+
@include breakpoint.get($breakpoint-name) {
|
|
20
|
+
@each $variant, $size in $sizes {
|
|
21
|
+
#{$with-text-end-host-selectors}:has(
|
|
22
|
+
> .icon--with-text-end.icon#{generate.variant-name($variant)}:first-child
|
|
23
|
+
) {
|
|
24
|
+
--icon-with-text-end-size: #{$size};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
6
30
|
.icon {
|
|
7
31
|
@include mixins.base;
|
|
8
32
|
@include mixins.sizes;
|
|
@@ -43,6 +67,12 @@
|
|
|
43
67
|
|
|
44
68
|
&--with-text-end {
|
|
45
69
|
margin-inline-end: convert.to-rem(5px);
|
|
70
|
+
|
|
71
|
+
&:first-child {
|
|
72
|
+
margin-inline-start: calc(
|
|
73
|
+
(var(--icon-with-text-end-size, 1em) + #{convert.to-rem(5px)}) * -1
|
|
74
|
+
);
|
|
75
|
+
}
|
|
46
76
|
}
|
|
47
77
|
}
|
|
48
78
|
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
* @vitest-environment jsdom
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import React from "react";
|
|
6
5
|
import { render } from "@testing-library/react";
|
|
7
|
-
|
|
8
|
-
import { SpritePathContext } from "../SpritePathContext";
|
|
9
6
|
import { Icon } from "../";
|
|
7
|
+
import { SpritePathContext } from "../SpritePathContext";
|
|
10
8
|
|
|
11
9
|
//name prop is required
|
|
12
10
|
describe("rendering Icon", () => {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import { Icon } from
|
|
5
|
-
import { InfoTooltip } from
|
|
6
|
-
import ConditionalWrapper from '../../utils/ConditionalWrapper';
|
|
1
|
+
import cx from "classnames";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import ConditionalWrapper from "../../utils/ConditionalWrapper";
|
|
4
|
+
import { Icon } from "../Icon";
|
|
5
|
+
import { InfoTooltip } from "../Tooltip";
|
|
7
6
|
|
|
8
7
|
interface ItemProps {
|
|
9
8
|
icon: string;
|
|
@@ -12,12 +11,17 @@ interface ItemProps {
|
|
|
12
11
|
[key: string]: any;
|
|
13
12
|
}
|
|
14
13
|
|
|
15
|
-
const CLASS_ROOT =
|
|
14
|
+
const CLASS_ROOT = "icon-list";
|
|
16
15
|
|
|
17
|
-
export const Item: React.FC<ItemProps> = ({
|
|
16
|
+
export const Item: React.FC<ItemProps> = ({
|
|
17
|
+
icon,
|
|
18
|
+
children,
|
|
19
|
+
tooltip,
|
|
20
|
+
...other
|
|
21
|
+
}) => (
|
|
18
22
|
<li {...other}>
|
|
19
23
|
<Icon name={icon} size="medium" className={`${CLASS_ROOT}__icon`} />
|
|
20
|
-
<div className={cx(`${CLASS_ROOT}__content`, {
|
|
24
|
+
<div className={cx(`${CLASS_ROOT}__content`, { "text-nowrap": tooltip })}>
|
|
21
25
|
<ConditionalWrapper
|
|
22
26
|
condition={!!tooltip}
|
|
23
27
|
wrapper={
|
|
@@ -26,7 +30,7 @@ export const Item: React.FC<ItemProps> = ({ icon, children, tooltip, ...other })
|
|
|
26
30
|
>
|
|
27
31
|
{children}
|
|
28
32
|
</ConditionalWrapper>
|
|
29
|
-
{tooltip &&
|
|
33
|
+
{tooltip && "\xa0"}
|
|
30
34
|
{tooltip && (
|
|
31
35
|
<InfoTooltip className="bold" placement="right">
|
|
32
36
|
{tooltip}
|
|
@@ -36,4 +40,4 @@ export const Item: React.FC<ItemProps> = ({ icon, children, tooltip, ...other })
|
|
|
36
40
|
</li>
|
|
37
41
|
);
|
|
38
42
|
|
|
39
|
-
Item.displayName =
|
|
43
|
+
Item.displayName = "IconListItem";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use "../../../styles/tokens/space";
|
|
2
2
|
|
|
3
|
-
$spacing: space.get(
|
|
3
|
+
$spacing: space.get("small");
|
|
@@ -1,37 +1,40 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { render } from '@testing-library/react';
|
|
1
|
+
import { render } from "@testing-library/react";
|
|
3
2
|
|
|
4
3
|
// Mock Tooltip komponent
|
|
5
|
-
vi.mock(
|
|
6
|
-
InfoTooltip: ({ children, ...props }) =>
|
|
4
|
+
vi.mock("../../Tooltip", () => ({
|
|
5
|
+
InfoTooltip: ({ children, ...props }) => (
|
|
6
|
+
<div data-testid="info-tooltip" {...props}>
|
|
7
|
+
{children}
|
|
8
|
+
</div>
|
|
9
|
+
),
|
|
7
10
|
}));
|
|
8
11
|
|
|
9
|
-
import { IconList } from
|
|
12
|
+
import { IconList } from "../IconList";
|
|
10
13
|
|
|
11
14
|
const items = [
|
|
12
15
|
{
|
|
13
|
-
icon:
|
|
16
|
+
icon: "test-icon",
|
|
14
17
|
content: <p>test-content</p>,
|
|
15
18
|
tooltip: <p>test-tooltip</p>,
|
|
16
19
|
},
|
|
17
20
|
];
|
|
18
21
|
|
|
19
|
-
describe(
|
|
20
|
-
describe(
|
|
21
|
-
it(
|
|
22
|
+
describe("rendering IconList", () => {
|
|
23
|
+
describe("initial state", () => {
|
|
24
|
+
it("div has default class icon-list", () => {
|
|
22
25
|
const { getByTestId } = render(
|
|
23
26
|
<>
|
|
24
27
|
<div id="root">
|
|
25
28
|
<IconList data-testid="test-id" items={[]} />
|
|
26
29
|
</div>
|
|
27
30
|
<div id="root-tooltips" />
|
|
28
|
-
|
|
31
|
+
</>,
|
|
29
32
|
);
|
|
30
|
-
expect(getByTestId(
|
|
33
|
+
expect(getByTestId("test-id")).toHaveClass("icon-list");
|
|
31
34
|
});
|
|
32
35
|
});
|
|
33
36
|
|
|
34
|
-
describe(
|
|
37
|
+
describe("passed props", () => {
|
|
35
38
|
let iconList;
|
|
36
39
|
|
|
37
40
|
beforeEach(() => {
|
|
@@ -45,35 +48,35 @@ describe('rendering IconList', () => {
|
|
|
45
48
|
/>
|
|
46
49
|
</div>
|
|
47
50
|
<div id="root-tooltips" />
|
|
48
|
-
|
|
51
|
+
</>,
|
|
49
52
|
);
|
|
50
53
|
});
|
|
51
|
-
it(
|
|
54
|
+
it("has additional class when className is set", () => {
|
|
52
55
|
const { getByTestId } = iconList;
|
|
53
|
-
expect(getByTestId(
|
|
54
|
-
expect(getByTestId(
|
|
56
|
+
expect(getByTestId("test-id")).toHaveClass("icon-list");
|
|
57
|
+
expect(getByTestId("test-id")).toHaveClass("test-class");
|
|
55
58
|
});
|
|
56
|
-
it(
|
|
59
|
+
it("renders items[index].content inside Item component", () => {
|
|
57
60
|
const { container } = render(
|
|
58
61
|
<>
|
|
59
62
|
<div id="root">
|
|
60
63
|
<IconList data-testid="test-id" items={items} />
|
|
61
64
|
</div>
|
|
62
65
|
<div id="root-tooltips" />
|
|
63
|
-
|
|
66
|
+
</>,
|
|
64
67
|
);
|
|
65
|
-
const item = container.querySelector(
|
|
66
|
-
expect(item).toHaveClass(
|
|
67
|
-
expect(item.querySelector(
|
|
68
|
+
const item = container.querySelector("li").querySelector("div");
|
|
69
|
+
expect(item).toHaveClass("icon-list__content");
|
|
70
|
+
expect(item.querySelector("p").textContent).toBe("test-content");
|
|
68
71
|
});
|
|
69
|
-
it(
|
|
72
|
+
it("renders icon with /sprite.svg#test-icon xlinkhref when icon prop is set to test-icon", () => {
|
|
70
73
|
const { container } = iconList;
|
|
71
|
-
const use = container.querySelector(
|
|
72
|
-
expect(use.getAttribute(
|
|
74
|
+
const use = container.querySelector("li").querySelector("use");
|
|
75
|
+
expect(use.getAttribute("xlink:href")).toEqual("/sprite.svg#test-icon");
|
|
73
76
|
});
|
|
74
|
-
it(
|
|
77
|
+
it("renders items[index].tooltip", () => {
|
|
75
78
|
const { getByText } = iconList;
|
|
76
|
-
expect(getByText(
|
|
79
|
+
expect(getByText("test-tooltip")).toBeInTheDocument();
|
|
77
80
|
});
|
|
78
81
|
});
|
|
79
82
|
});
|
|
@@ -19,7 +19,7 @@ Conformance tests for the Link component:
|
|
|
19
19
|
- Does not create unnecessary wrapper elements.
|
|
20
20
|
*/
|
|
21
21
|
import { render, screen } from "@testing-library/react";
|
|
22
|
-
import { axe } from
|
|
22
|
+
import { axe } from "vitest-axe";
|
|
23
23
|
import "@testing-library/jest-dom/vitest";
|
|
24
24
|
|
|
25
25
|
import { Link } from "../";
|
|
@@ -24,7 +24,7 @@ Unit tests for the Link component:
|
|
|
24
24
|
- Component Display Name:
|
|
25
25
|
- Has correct display name 'Link'.
|
|
26
26
|
*/
|
|
27
|
-
import { render, screen
|
|
27
|
+
import { fireEvent, render, screen } from "@testing-library/react";
|
|
28
28
|
import "@testing-library/jest-dom/vitest";
|
|
29
29
|
|
|
30
30
|
import { Link } from "../";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import cx from "classnames";
|
|
2
|
+
import React from "react";
|
|
3
3
|
|
|
4
|
-
import { Icon } from
|
|
4
|
+
import { Icon } from "../Icon";
|
|
5
5
|
|
|
6
6
|
interface ClickableControlProps {
|
|
7
7
|
href?: string;
|
|
@@ -10,16 +10,16 @@ interface ClickableControlProps {
|
|
|
10
10
|
[key: string]: any;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const CLASS_ROOT =
|
|
13
|
+
const CLASS_ROOT = "list__control";
|
|
14
14
|
|
|
15
|
-
export const ClickableControl: React.FC<ClickableControlProps> = ({
|
|
16
|
-
href,
|
|
17
|
-
className,
|
|
18
|
-
children,
|
|
19
|
-
...other
|
|
15
|
+
export const ClickableControl: React.FC<ClickableControlProps> = ({
|
|
16
|
+
href,
|
|
17
|
+
className,
|
|
18
|
+
children,
|
|
19
|
+
...other
|
|
20
20
|
}) => {
|
|
21
|
-
const Tag = href ?
|
|
22
|
-
const type = Tag ===
|
|
21
|
+
const Tag = href ? "a" : "button";
|
|
22
|
+
const type = Tag === "button" ? "button" : undefined;
|
|
23
23
|
const classes = cx(CLASS_ROOT, className);
|
|
24
24
|
|
|
25
25
|
return (
|
|
@@ -30,4 +30,4 @@ export const ClickableControl: React.FC<ClickableControlProps> = ({
|
|
|
30
30
|
);
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
ClickableControl.displayName =
|
|
33
|
+
ClickableControl.displayName = "ListItemClickableControl";
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import cx from "classnames";
|
|
2
|
+
import React from "react";
|
|
3
3
|
|
|
4
4
|
interface ListProps {
|
|
5
5
|
/** Size determines color of list items and color of their borders*/
|
|
6
|
-
color?:
|
|
6
|
+
color?: "gray";
|
|
7
7
|
/** Spacious lists have horizontal spacing */
|
|
8
8
|
isEnclosed?: boolean;
|
|
9
9
|
/** Size determines vertical spacing */
|
|
10
|
-
size?:
|
|
10
|
+
size?: "small";
|
|
11
11
|
className?: string;
|
|
12
12
|
children?: React.ReactNode;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const CLASS_ROOT =
|
|
15
|
+
const CLASS_ROOT = "list";
|
|
16
16
|
|
|
17
|
-
export const List: React.FC<ListProps> = ({
|
|
18
|
-
color,
|
|
19
|
-
isEnclosed,
|
|
20
|
-
size,
|
|
21
|
-
className,
|
|
22
|
-
children,
|
|
23
|
-
...other
|
|
17
|
+
export const List: React.FC<ListProps> = ({
|
|
18
|
+
color,
|
|
19
|
+
isEnclosed,
|
|
20
|
+
size,
|
|
21
|
+
className,
|
|
22
|
+
children,
|
|
23
|
+
...other
|
|
24
24
|
}) => {
|
|
25
25
|
const classes = cx(
|
|
26
26
|
CLASS_ROOT,
|
|
@@ -29,7 +29,7 @@ export const List: React.FC<ListProps> = ({
|
|
|
29
29
|
[`${CLASS_ROOT}--${color}`]: color,
|
|
30
30
|
[`${CLASS_ROOT}--enclosed`]: isEnclosed,
|
|
31
31
|
},
|
|
32
|
-
className
|
|
32
|
+
className,
|
|
33
33
|
);
|
|
34
34
|
|
|
35
35
|
return (
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import cx from "classnames";
|
|
2
|
+
import React from "react";
|
|
3
3
|
|
|
4
|
-
import ConditionalWrapper from
|
|
5
|
-
import { ClickableControl } from
|
|
4
|
+
import ConditionalWrapper from "../../utils/ConditionalWrapper";
|
|
5
|
+
import { ClickableControl } from "./ClickableControl";
|
|
6
6
|
|
|
7
7
|
interface ControlProps {
|
|
8
8
|
href?: string;
|
|
@@ -19,13 +19,13 @@ interface ListItemProps {
|
|
|
19
19
|
[key: string]: any;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
const CLASS_ROOT =
|
|
22
|
+
const CLASS_ROOT = "list__item";
|
|
23
23
|
|
|
24
|
-
export const ListItem: React.FC<ListItemProps> = ({
|
|
25
|
-
controlProps,
|
|
26
|
-
className,
|
|
27
|
-
children,
|
|
28
|
-
...other
|
|
24
|
+
export const ListItem: React.FC<ListItemProps> = ({
|
|
25
|
+
controlProps,
|
|
26
|
+
className,
|
|
27
|
+
children,
|
|
28
|
+
...other
|
|
29
29
|
}) => {
|
|
30
30
|
const classes = cx(CLASS_ROOT, className);
|
|
31
31
|
|
|
@@ -41,4 +41,4 @@ export const ListItem: React.FC<ListItemProps> = ({
|
|
|
41
41
|
);
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
-
ListItem.displayName =
|
|
44
|
+
ListItem.displayName = "ListItem";
|