@orangesk/orange-design-system 2.0.0-beta.0 → 2.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/index.css +1 -2
- package/build/components/index.css.map +1 -1
- package/build/components/index.js +7 -7
- package/build/components/index.js.map +1 -1
- package/build/components/tsconfig.tsbuildinfo +1 -1
- package/build/components/types/index.d.ts +1508 -0
- package/build/components/types/src/components/Accordion/Accordion.d.ts +2 -0
- package/build/components/types/src/components/Accordion/AccordionHeader.d.ts +2 -1
- package/build/components/types/src/components/Accordion/AccordionItem.d.ts +2 -1
- package/build/components/types/src/components/AnchorNavigation/AnchorNavigation.d.ts +1 -1
- package/build/components/types/src/components/AnchorNavigation/AnchorNavigation.static.d.ts +19 -17
- package/build/components/types/src/components/AnchorNavigation/index.d.ts +0 -1
- package/build/components/types/src/components/BlockAction/index.d.ts +0 -1
- package/build/components/types/src/components/BodyBanner/index.d.ts +0 -1
- package/build/components/types/src/components/Button/Button.d.ts +1 -0
- package/build/components/types/src/components/Button/index.d.ts +0 -1
- package/build/components/types/src/components/Card/Card.d.ts +2 -4
- package/build/components/types/src/components/Card/CardSection.d.ts +2 -2
- package/build/components/types/src/components/Carousel/Carousel.d.ts +4 -0
- package/build/components/types/src/components/Carousel/Carousel.static.d.ts +1 -0
- package/build/components/types/src/components/Carousel/constants.d.ts +2 -0
- package/build/components/types/src/components/CarouselHero/CarouselHero.d.ts +18 -0
- package/build/components/types/src/components/CarouselHero/CarouselHero.static.d.ts +47 -0
- package/build/components/types/src/components/CarouselHero/CarouselHeroItem.d.ts +8 -0
- package/build/components/types/src/components/CarouselHero/constants.d.ts +33 -0
- package/build/components/types/src/components/CarouselHero/index.d.ts +2 -0
- package/build/components/types/src/components/Cover/index.d.ts +1 -2
- package/build/components/types/src/components/Divider/Divider.d.ts +0 -4
- package/build/components/types/src/components/Expander/Expander.d.ts +2 -2
- package/build/components/types/src/components/Footer/Footer.d.ts +1 -5
- package/build/components/types/src/components/Footer/constants.d.ts +9 -0
- package/build/components/types/src/components/Forms/Select/index.d.ts +0 -1
- package/build/components/types/src/components/Icon/iconSearchTags.d.ts +253 -251
- package/build/components/types/src/components/IconList/index.d.ts +2 -3
- package/build/components/types/src/components/List/index.d.ts +2 -3
- package/build/components/types/src/components/Megamenu/MegaMenuIcon.d.ts +13 -0
- package/build/components/types/src/components/Megamenu/Megamenu.d.ts +1 -9
- package/build/components/types/src/components/Megamenu/Megamenu.static.d.ts +47 -0
- package/build/components/types/src/components/Megamenu/MegamenuBlog.d.ts +1 -0
- package/build/components/types/src/components/Megamenu/constants.d.ts +48 -0
- package/build/components/types/src/components/Megamenu/index.d.ts +2 -3
- package/build/components/types/src/components/Megamenu/static.d.ts +22 -0
- package/build/components/types/src/components/Modal/Modal.d.ts +6 -0
- package/build/components/types/src/components/Modal/ModalBody.d.ts +4 -3
- package/build/components/types/src/components/Modal/ModalProductBody.d.ts +10 -0
- package/build/components/types/src/components/Modal/ModalProductFooter.d.ts +10 -0
- package/build/components/types/src/components/Modal/index.d.ts +2 -0
- package/build/components/types/src/components/Pagination/Pagination.d.ts +2 -3
- package/build/components/types/src/components/Pill/Pill.d.ts +4 -1
- package/build/components/types/src/components/Preview/PreviewGenerator.d.ts +1 -1
- package/build/components/types/src/components/PromoBanner/PromoBanner.d.ts +9 -5
- package/build/components/types/src/components/PromotionCard/PromotionCard.d.ts +2 -2
- package/build/components/types/src/components/Section/Section.d.ts +4 -1
- package/build/components/types/src/components/Tag/Tag.d.ts +9 -2
- package/build/components/types/src/components/index.d.ts +3 -5
- package/build/components/types/src/scripts/index.d.ts +10 -0
- package/build/lib/after-components.css +1 -1
- package/build/lib/after-components.css.map +1 -1
- package/build/lib/before-components.css +1 -1
- package/build/lib/before-components.css.map +1 -1
- package/build/lib/components.css +1 -1
- package/build/lib/components.css.map +1 -1
- package/build/lib/footer.css +2 -0
- package/build/lib/footer.css.map +1 -0
- package/build/lib/megamenu.css +2 -0
- package/build/lib/megamenu.css.map +1 -0
- package/build/lib/megamenu.js +2 -0
- package/build/lib/megamenu.js.map +1 -0
- package/build/lib/scripts.css +1 -1
- package/build/lib/scripts.css.map +1 -1
- package/build/lib/scripts.js +5 -5
- 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/logo-line.svg +5 -0
- package/build/sprite.svg +1 -1
- package/package.json +35 -29
- package/src/assets/icons/ai.svg +6 -0
- package/src/assets/icons/article.svg +7 -0
- package/src/assets/icons/pictogram-activation--dark.svg +10 -11
- package/src/assets/icons/pictogram-activation-free--dark.svg +4 -5
- package/src/assets/icons/pictogram-activation-free.svg +4 -5
- package/src/assets/icons/pictogram-activation.svg +10 -11
- package/src/assets/icons/pictogram-archive--dark.svg +3 -4
- package/src/assets/icons/pictogram-archive.svg +3 -4
- package/src/assets/icons/pictogram-calling-minutes--dark.svg +3 -4
- package/src/assets/icons/pictogram-calling-minutes.svg +3 -4
- package/src/assets/icons/pictogram-canal-plus--dark.svg +3 -4
- package/src/assets/icons/pictogram-canal-plus.svg +3 -4
- package/src/assets/icons/pictogram-competition-tickets--dark.svg +11 -12
- package/src/assets/icons/pictogram-competition-tickets.svg +11 -12
- package/src/assets/icons/pictogram-device-discount--dark.svg +7 -6
- package/src/assets/icons/pictogram-device-discount.svg +5 -6
- package/src/assets/icons/pictogram-discount-general--dark.svg +5 -6
- package/src/assets/icons/pictogram-discount-general.svg +5 -6
- package/src/assets/icons/pictogram-discount-price--dark.svg +5 -6
- package/src/assets/icons/pictogram-discount-price.svg +5 -6
- package/src/assets/icons/pictogram-extra-data--dark.svg +6 -7
- package/src/assets/icons/pictogram-extra-data.svg +6 -7
- package/src/assets/icons/pictogram-free-payment--dark.svg +5 -6
- package/src/assets/icons/pictogram-free-payment.svg +3 -6
- package/src/assets/icons/pictogram-gift--dark.svg +12 -13
- package/src/assets/icons/pictogram-gift-one-benefit--dark.svg +7 -8
- package/src/assets/icons/pictogram-gift-one-benefit.svg +7 -8
- package/src/assets/icons/pictogram-gift-two-benefits--dark.svg +8 -9
- package/src/assets/icons/pictogram-gift-two-benefits.svg +8 -9
- package/src/assets/icons/pictogram-gift.svg +3 -4
- package/src/assets/icons/pictogram-hbo-max--dark.svg +5 -6
- package/src/assets/icons/pictogram-hbo-max.svg +5 -6
- package/src/assets/icons/pictogram-infinite-sms--dark.svg +3 -4
- package/src/assets/icons/pictogram-infinite-sms.svg +3 -4
- package/src/assets/icons/pictogram-installation--dark.svg +4 -5
- package/src/assets/icons/pictogram-installation-free--dark.svg +4 -5
- package/src/assets/icons/pictogram-installation-free.svg +4 -5
- package/src/assets/icons/pictogram-installation.svg +4 -5
- package/src/assets/icons/pictogram-max--dark.svg +3 -4
- package/src/assets/icons/pictogram-max-canal-plus--dark.svg +5 -6
- package/src/assets/icons/pictogram-max-canal-plus.svg +5 -6
- package/src/assets/icons/pictogram-max.svg +3 -4
- package/src/assets/icons/pictogram-moj-orange-app--dark.svg +3 -4
- package/src/assets/icons/pictogram-moj-orange-app.svg +3 -4
- package/src/assets/icons/pictogram-movie-storage--dark.svg +4 -5
- package/src/assets/icons/pictogram-movie-storage.svg +4 -5
- package/src/assets/icons/pictogram-online-protection--dark.svg +3 -4
- package/src/assets/icons/pictogram-online-protection.svg +3 -4
- package/src/assets/icons/pictogram-random-damage--dark.svg +4 -8
- package/src/assets/icons/pictogram-random-damage.svg +4 -8
- package/src/assets/icons/pictogram-recycling--dark.svg +7 -8
- package/src/assets/icons/pictogram-recycling.svg +14 -15
- package/src/assets/icons/pictogram-repair--dark.svg +12 -13
- package/src/assets/icons/pictogram-repair.svg +12 -13
- package/src/assets/icons/pictogram-roaming--dark.svg +3 -4
- package/src/assets/icons/pictogram-roaming-discount--dark.svg +3 -16
- package/src/assets/icons/pictogram-roaming-discount.svg +15 -16
- package/src/assets/icons/pictogram-roaming.svg +3 -4
- package/src/assets/icons/pictogram-skylink--dark.svg +10 -11
- package/src/assets/icons/pictogram-skylink-live-tv--dark.svg +7 -8
- package/src/assets/icons/pictogram-skylink-live-tv.svg +7 -8
- package/src/assets/icons/pictogram-skylink.svg +10 -11
- package/src/assets/icons/pictogram-sms--dark.svg +5 -6
- package/src/assets/icons/pictogram-sms.svg +5 -6
- package/src/assets/icons/pictogram-theft--dark.svg +3 -7
- package/src/assets/icons/pictogram-theft.svg +3 -7
- package/src/assets/icons/pictogram-three-devices--dark.svg +4 -8
- package/src/assets/icons/pictogram-three-devices.svg +4 -8
- package/src/assets/icons/pictogram-trust--dark.svg +3 -4
- package/src/assets/icons/pictogram-trust.svg +3 -4
- package/src/assets/icons/pictogram-water-damage--dark.svg +5 -6
- package/src/assets/icons/pictogram-water-damage.svg +5 -6
- package/src/components/Accordion/Accordion.tsx +4 -0
- package/src/components/Accordion/AccordionHeader.tsx +9 -2
- package/src/components/Accordion/AccordionItem.tsx +5 -2
- package/src/components/Accordion/styles/config.scss +4 -4
- package/src/components/Accordion/styles/mixins.scss +9 -3
- package/src/components/Accordion/styles/style.scss +4 -0
- package/src/components/Accordion/tests/Accordion.unit.test.js +11 -0
- package/src/components/AnchorNavigation/AnchorNavigation.static.ts +253 -73
- package/src/components/AnchorNavigation/AnchorNavigation.tsx +20 -16
- package/src/components/AnchorNavigation/index.tsx +0 -2
- package/src/components/AnchorNavigation/styles/mixins.scss +14 -27
- package/src/components/AnchorNavigation/tests/AnchorNavigation.conformance.test.js +67 -0
- package/src/components/AnchorNavigation/tests/AnchorNavigation.unit.test.js +163 -0
- package/src/components/Bar/styles/config.scss +4 -5
- package/src/components/BlockAction/index.tsx +0 -2
- package/src/components/BlockAction/styles/mixins.scss +0 -6
- package/src/components/BodyBanner/index.tsx +0 -2
- package/src/components/Breadcrumbs/styles/mixins.scss +2 -4
- package/src/components/Button/Button.tsx +2 -2
- package/src/components/Button/index.tsx +0 -2
- package/src/components/Button/styles/config.scss +1 -1
- package/src/components/Button/styles/mixins.scss +5 -0
- package/src/components/Button/styles/style.scss +4 -0
- package/src/components/Card/Card.tsx +20 -8
- package/src/components/Card/CardSection.tsx +7 -11
- package/src/components/Card/styles/config.scss +1 -1
- package/src/components/Card/styles/mixins.scss +8 -6
- package/src/components/Card/styles/style.scss +4 -0
- package/src/components/Card/tests/Card.unit.test.js +45 -11
- package/src/components/Card/tests/CardSection.unit.test.js +36 -3
- package/src/components/Carousel/Carousel.static.ts +67 -1
- package/src/components/Carousel/Carousel.tsx +41 -19
- package/src/components/Carousel/constants.ts +2 -0
- package/src/components/Carousel/styles/config.scss +1 -2
- package/src/components/Carousel/styles/mixins.scss +35 -2
- package/src/components/Carousel/styles/style.scss +8 -0
- package/src/components/CarouselHero/CarouselHero.static.ts +528 -0
- package/src/components/CarouselHero/CarouselHero.tsx +147 -0
- package/src/components/CarouselHero/CarouselHeroItem.tsx +40 -0
- package/src/components/CarouselHero/constants.ts +36 -0
- package/src/components/CarouselHero/index.ts +2 -0
- package/src/components/CarouselHero/styles/config.scss +54 -0
- package/src/components/CarouselHero/styles/mixins.scss +278 -0
- package/src/components/CarouselHero/styles/style.scss +63 -0
- package/src/components/CarouselHero/tests/CarouselHero.conformance.test.js +130 -0
- package/src/components/CarouselHero/tests/CarouselHero.unit.test.js +346 -0
- package/src/components/CarouselHero/tests/CarouselHeroItem.conformance.test.js +135 -0
- package/src/components/CarouselHero/tests/CarouselHeroItem.unit.test.js +143 -0
- package/src/components/CarouselPromotions/styles/mixins.scss +10 -3
- package/src/components/CartTable/FooterPriceColumn.tsx +5 -3
- package/src/components/CartTable/Price.tsx +1 -1
- package/src/components/Controls/styles/config.scss +2 -2
- package/src/components/Controls/tests/Controls.test.js +0 -9
- package/src/components/Cover/index.ts +1 -2
- package/src/components/Divider/Divider.tsx +2 -16
- package/src/components/Divider/styles/config.scss +0 -17
- package/src/components/Divider/styles/mixins.scss +8 -10
- package/src/components/Divider/styles/style.scss +2 -16
- package/src/components/Divider/tests/Divider.conformance.test.js +1 -1
- package/src/components/Divider/tests/Divider.unit.test.js +0 -17
- package/src/components/Dropdown/styles/mixins.scss +1 -1
- package/src/components/Expander/Expander.tsx +4 -2
- package/src/components/Expander/styles/style.scss +7 -0
- package/src/components/Footer/Footer.tsx +86 -70
- package/src/components/Footer/constants.ts +10 -0
- package/src/components/Footer/styles/config.scss +1 -0
- package/src/components/Footer/styles/mixins.scss +172 -0
- package/src/components/Footer/styles/style.scss +48 -0
- package/src/components/Footer/tests/Footer.conformance.test.js +133 -8
- package/src/components/Footer/tests/Footer.unit.test.js +71 -6
- package/src/components/Forms/DatePicker/styles/style.scss +1 -1
- package/src/components/Forms/File/styles/mixins.scss +1 -1
- package/src/components/Forms/InputStepper/styles/style.scss +0 -66
- package/src/components/Forms/RangeSlider/styles/mixins.scss +1 -1
- package/src/components/Forms/Select/index.tsx +0 -2
- package/src/components/Forms/TextInput/styles/config.scss +1 -1
- package/src/components/Forms/styles/config.scss +3 -3
- package/src/components/Icon/iconSearchTags.ts +434 -432
- package/src/components/Icon/styles/style.scss +15 -0
- package/src/components/Icon/tests/Pictogram.unit.test.js +38 -0
- package/src/components/IconList/index.ts +2 -3
- package/src/components/Link/styles/style.scss +6 -2
- package/src/components/Link/tests/Link.conformance.test.js +5 -20
- package/src/components/Link/tests/Link.unit.test.js +1 -10
- package/src/components/List/index.ts +2 -3
- package/src/components/Loader/Loader.tsx +2 -10
- package/src/components/Loader/styles/mixins.scss +1 -1
- package/src/components/Loader/styles/style.scss +6 -4
- package/src/components/Megamenu/MegaMenuIcon.tsx +48 -0
- package/src/components/Megamenu/Megamenu.static.ts +600 -0
- package/src/components/Megamenu/Megamenu.tsx +799 -356
- package/src/components/Megamenu/MegamenuBlog.tsx +309 -0
- package/src/components/Megamenu/constants.ts +56 -0
- package/src/components/Megamenu/index.ts +2 -5
- package/src/components/Megamenu/static.ts +73 -0
- package/src/components/Megamenu/styles/config.scss +2 -13
- package/src/components/Megamenu/styles/mixins.scss +647 -208
- package/src/components/Megamenu/styles/style.scss +173 -61
- package/src/components/Modal/Modal.tsx +17 -2
- package/src/components/Modal/ModalBody.tsx +29 -14
- package/src/components/Modal/ModalProductBody.tsx +52 -0
- package/src/components/Modal/ModalProductFooter.tsx +38 -0
- package/src/components/Modal/index.ts +2 -0
- package/src/components/Modal/styles/config.scss +7 -0
- package/src/components/Modal/styles/mixins.scss +121 -14
- package/src/components/Modal/styles/style.scss +28 -0
- package/src/components/Modal/tests/Modal.unit.test.js +73 -0
- package/src/components/Modal/tests/ModalBody.unit.test.js +28 -12
- package/src/components/Pagination/Pagination.tsx +2 -2
- package/src/components/Pill/Pill.tsx +8 -3
- package/src/components/Pill/styles/config.scss +22 -2
- package/src/components/Pill/styles/style.scss +7 -3
- package/src/components/Pill/tests/Pill.conformance.test.js +7 -3
- package/src/components/Pill/tests/Pill.unit.test.js +45 -7
- package/src/components/Preview/PreviewGenerator.tsx +78 -34
- package/src/components/PromoBanner/PromoBanner.tsx +52 -34
- package/src/components/PromoBanner/styles/mixins.scss +37 -20
- package/src/components/PromoBanner/styles/style.scss +5 -11
- package/src/components/PromoBanner/tests/PromoBanner.conformance.test.js +781 -0
- package/src/components/PromoBanner/tests/PromoBanner.unit.test.js +529 -0
- package/src/components/PromotionCard/PromotionCard.tsx +13 -12
- package/src/components/PromotionCard/tests/PromotionCard.conformance.test.js +567 -0
- package/src/components/PromotionCard/tests/PromotionCard.unit.test.js +500 -0
- package/src/components/Section/Section.tsx +20 -4
- package/src/components/Section/styles/config.scss +18 -16
- package/src/components/Section/styles/mixins.scss +16 -13
- package/src/components/Section/styles/style.scss +1 -0
- package/src/components/Section/tests/Section.conformance.test.js +27 -10
- package/src/components/Section/tests/Section.unit.test.js +73 -25
- package/src/components/Tag/Tag.tsx +27 -3
- package/src/components/Tag/styles/config.scss +31 -0
- package/src/components/Tag/styles/mixins.scss +39 -3
- package/src/components/Tag/styles/style.scss +28 -2
- package/src/components/Tag/tests/Tag.conformance.test.js +19 -1
- package/src/components/Tag/tests/Tag.unit.test.js +93 -0
- package/src/components/Tile/styles/style.scss +1 -1
- package/src/components/index.ts +5 -6
- package/src/styles/base/globals.scss +19 -0
- package/src/styles/base/styleguide.scss +17 -17
- package/src/styles/export/base.js +2 -2
- package/src/styles/export/color.js +2 -2
- package/src/styles/shame.scss +2 -1
- package/src/styles/tokens/base.scss +1 -1
- package/src/styles/tokens/color.scss +12 -8
- package/src/styles/typography/mixins.scss +3 -2
- package/src/styles/utilities/border.scss +1 -1
- package/src/styles/utilities/color.scss +113 -20
- package/src/styles/utilities/index.scss +1 -0
- package/src/styles/utilities/layout.scss +9 -0
- package/src/styles/utilities/ordering.scss +44 -0
- package/build/components/Accordion/index.js +0 -16
- package/build/components/Accordion/index.js.map +0 -1
- package/build/components/Accordion/tsconfig.tsbuildinfo +0 -1
- package/build/components/Alert/index.js +0 -16
- package/build/components/Alert/index.js.map +0 -1
- package/build/components/Alert/tsconfig.tsbuildinfo +0 -1
- package/build/components/AnchorNavigation/index.js +0 -16
- package/build/components/AnchorNavigation/index.js.map +0 -1
- package/build/components/AnchorNavigation/style.css +0 -2
- package/build/components/AnchorNavigation/style.css.map +0 -1
- package/build/components/AnchorNavigation/tsconfig.tsbuildinfo +0 -1
- package/build/components/Bar/index.js +0 -16
- package/build/components/Bar/index.js.map +0 -1
- package/build/components/Bar/tsconfig.tsbuildinfo +0 -1
- package/build/components/BlockAction/index.js +0 -16
- package/build/components/BlockAction/index.js.map +0 -1
- package/build/components/BlockAction/style.css +0 -2
- package/build/components/BlockAction/style.css.map +0 -1
- package/build/components/BlockAction/tsconfig.tsbuildinfo +0 -1
- package/build/components/BodyBanner/index.js +0 -16
- package/build/components/BodyBanner/index.js.map +0 -1
- package/build/components/BodyBanner/style.css +0 -2
- package/build/components/BodyBanner/style.css.map +0 -1
- package/build/components/BodyBanner/tsconfig.tsbuildinfo +0 -1
- package/build/components/Breadcrumbs/index.js +0 -16
- package/build/components/Breadcrumbs/index.js.map +0 -1
- package/build/components/Breadcrumbs/tsconfig.tsbuildinfo +0 -1
- package/build/components/Button/index.js +0 -16
- package/build/components/Button/index.js.map +0 -1
- package/build/components/Button/style.css +0 -2
- package/build/components/Button/style.css.map +0 -1
- package/build/components/Button/tsconfig.tsbuildinfo +0 -1
- package/build/components/Buttons/index.js +0 -16
- package/build/components/Buttons/index.js.map +0 -1
- package/build/components/Buttons/tsconfig.tsbuildinfo +0 -1
- package/build/components/Card/index.js +0 -16
- package/build/components/Card/index.js.map +0 -1
- package/build/components/Card/tsconfig.tsbuildinfo +0 -1
- package/build/components/Carousel/index.js +0 -16
- package/build/components/Carousel/index.js.map +0 -1
- package/build/components/Carousel/style.css +0 -2
- package/build/components/Carousel/style.css.map +0 -1
- package/build/components/Carousel/tsconfig.tsbuildinfo +0 -1
- package/build/components/CarouselPromotions/index.js +0 -16
- package/build/components/CarouselPromotions/index.js.map +0 -1
- package/build/components/CarouselPromotions/tsconfig.tsbuildinfo +0 -1
- package/build/components/CartTable/index.js +0 -16
- package/build/components/CartTable/index.js.map +0 -1
- package/build/components/CartTable/style.css +0 -2
- package/build/components/CartTable/style.css.map +0 -1
- package/build/components/CartTable/tsconfig.tsbuildinfo +0 -1
- package/build/components/Code/index.js +0 -11
- package/build/components/Code/index.js.map +0 -1
- package/build/components/Code/style.css +0 -2
- package/build/components/Code/style.css.map +0 -1
- package/build/components/Code/tsconfig.tsbuildinfo +0 -1
- package/build/components/Container/index.js +0 -16
- package/build/components/Container/index.js.map +0 -1
- package/build/components/Container/tsconfig.tsbuildinfo +0 -1
- package/build/components/Controls/index.js +0 -16
- package/build/components/Controls/index.js.map +0 -1
- package/build/components/Controls/tsconfig.tsbuildinfo +0 -1
- package/build/components/Cover/index.js +0 -16
- package/build/components/Cover/index.js.map +0 -1
- package/build/components/Cover/style.css +0 -2
- package/build/components/Cover/style.css.map +0 -1
- package/build/components/Cover/tsconfig.tsbuildinfo +0 -1
- package/build/components/Divider/index.js +0 -16
- package/build/components/Divider/index.js.map +0 -1
- package/build/components/Divider/tsconfig.tsbuildinfo +0 -1
- package/build/components/DocumentationSidebar/index.js +0 -16
- package/build/components/DocumentationSidebar/index.js.map +0 -1
- package/build/components/DocumentationSidebar/style.css +0 -2
- package/build/components/DocumentationSidebar/style.css.map +0 -1
- package/build/components/DocumentationSidebar/tsconfig.tsbuildinfo +0 -1
- package/build/components/Dropdown/index.js +0 -16
- package/build/components/Dropdown/index.js.map +0 -1
- package/build/components/Dropdown/style.css +0 -2
- package/build/components/Dropdown/style.css.map +0 -1
- package/build/components/Dropdown/tsconfig.tsbuildinfo +0 -1
- package/build/components/Expander/index.js +0 -16
- package/build/components/Expander/index.js.map +0 -1
- package/build/components/Expander/tsconfig.tsbuildinfo +0 -1
- package/build/components/FeatureAccordion/index.js +0 -16
- package/build/components/FeatureAccordion/index.js.map +0 -1
- package/build/components/FeatureAccordion/style.css +0 -2
- package/build/components/FeatureAccordion/style.css.map +0 -1
- package/build/components/FeatureAccordion/tsconfig.tsbuildinfo +0 -1
- package/build/components/Footer/index.js +0 -16
- package/build/components/Footer/index.js.map +0 -1
- package/build/components/Footer/style.css +0 -2
- package/build/components/Footer/style.css.map +0 -1
- package/build/components/Footer/tsconfig.tsbuildinfo +0 -1
- package/build/components/Forms/index.js +0 -20
- package/build/components/Forms/index.js.map +0 -1
- package/build/components/Forms/style.css +0 -2
- package/build/components/Forms/style.css.map +0 -1
- package/build/components/Forms/tsconfig.tsbuildinfo +0 -1
- package/build/components/Gauge/index.js +0 -16
- package/build/components/Gauge/index.js.map +0 -1
- package/build/components/Gauge/tsconfig.tsbuildinfo +0 -1
- package/build/components/Grid/index.js +0 -16
- package/build/components/Grid/index.js.map +0 -1
- package/build/components/Grid/style.css +0 -2
- package/build/components/Grid/style.css.map +0 -1
- package/build/components/Grid/tsconfig.tsbuildinfo +0 -1
- package/build/components/Hero/index.js +0 -16
- package/build/components/Hero/index.js.map +0 -1
- package/build/components/Hero/style.css +0 -2
- package/build/components/Hero/style.css.map +0 -1
- package/build/components/Hero/tsconfig.tsbuildinfo +0 -1
- package/build/components/Icon/index.js +0 -11
- package/build/components/Icon/index.js.map +0 -1
- package/build/components/Icon/tsconfig.tsbuildinfo +0 -1
- package/build/components/IconList/index.js +0 -16
- package/build/components/IconList/index.js.map +0 -1
- package/build/components/IconList/style.css +0 -2
- package/build/components/IconList/style.css.map +0 -1
- package/build/components/IconList/tsconfig.tsbuildinfo +0 -1
- package/build/components/Image/index.js +0 -16
- package/build/components/Image/index.js.map +0 -1
- package/build/components/Image/tsconfig.tsbuildinfo +0 -1
- package/build/components/Link/index.js +0 -7
- package/build/components/Link/index.js.map +0 -1
- package/build/components/Link/tsconfig.tsbuildinfo +0 -1
- package/build/components/List/index.js +0 -16
- package/build/components/List/index.js.map +0 -1
- package/build/components/List/style.css +0 -2
- package/build/components/List/style.css.map +0 -1
- package/build/components/List/tsconfig.tsbuildinfo +0 -1
- package/build/components/Loader/index.js +0 -16
- package/build/components/Loader/index.js.map +0 -1
- package/build/components/Loader/tsconfig.tsbuildinfo +0 -1
- package/build/components/Megamenu/index.js +0 -20
- package/build/components/Megamenu/index.js.map +0 -1
- package/build/components/Megamenu/style.css +0 -2
- package/build/components/Megamenu/style.css.map +0 -1
- package/build/components/Megamenu/tsconfig.tsbuildinfo +0 -1
- package/build/components/Modal/index.js +0 -20
- package/build/components/Modal/index.js.map +0 -1
- package/build/components/Modal/style.css +0 -2
- package/build/components/Modal/style.css.map +0 -1
- package/build/components/Modal/tsconfig.tsbuildinfo +0 -1
- package/build/components/Pagination/index.js +0 -16
- package/build/components/Pagination/index.js.map +0 -1
- package/build/components/Pagination/tsconfig.tsbuildinfo +0 -1
- package/build/components/Pill/index.js +0 -16
- package/build/components/Pill/index.js.map +0 -1
- package/build/components/Pill/tsconfig.tsbuildinfo +0 -1
- package/build/components/Preview/index.js +0 -77
- package/build/components/Preview/index.js.map +0 -1
- package/build/components/Preview/style.css +0 -2
- package/build/components/Preview/style.css.map +0 -1
- package/build/components/Preview/tsconfig.tsbuildinfo +0 -1
- package/build/components/Progress/index.js +0 -16
- package/build/components/Progress/index.js.map +0 -1
- package/build/components/Progress/tsconfig.tsbuildinfo +0 -1
- package/build/components/PromoBanner/index.js +0 -16
- package/build/components/PromoBanner/index.js.map +0 -1
- package/build/components/PromoBanner/style.css +0 -2
- package/build/components/PromoBanner/style.css.map +0 -1
- package/build/components/PromoBanner/tsconfig.tsbuildinfo +0 -1
- package/build/components/PromotionCard/index.js +0 -16
- package/build/components/PromotionCard/index.js.map +0 -1
- package/build/components/PromotionCard/tsconfig.tsbuildinfo +0 -1
- package/build/components/Section/index.js +0 -16
- package/build/components/Section/index.js.map +0 -1
- package/build/components/Section/tsconfig.tsbuildinfo +0 -1
- package/build/components/Skeleton/index.js +0 -16
- package/build/components/Skeleton/index.js.map +0 -1
- package/build/components/Skeleton/tsconfig.tsbuildinfo +0 -1
- package/build/components/SkipLink/index.js +0 -16
- package/build/components/SkipLink/index.js.map +0 -1
- package/build/components/SkipLink/tsconfig.tsbuildinfo +0 -1
- package/build/components/Stepbar/index.js +0 -16
- package/build/components/Stepbar/index.js.map +0 -1
- package/build/components/Stepbar/tsconfig.tsbuildinfo +0 -1
- package/build/components/Sticker/index.js +0 -16
- package/build/components/Sticker/index.js.map +0 -1
- package/build/components/Sticker/tsconfig.tsbuildinfo +0 -1
- package/build/components/Table/index.js +0 -16
- package/build/components/Table/index.js.map +0 -1
- package/build/components/Table/style.css +0 -2
- package/build/components/Table/style.css.map +0 -1
- package/build/components/Table/tsconfig.tsbuildinfo +0 -1
- package/build/components/Tabs/index.js +0 -16
- package/build/components/Tabs/index.js.map +0 -1
- package/build/components/Tabs/tsconfig.tsbuildinfo +0 -1
- package/build/components/Tag/index.js +0 -16
- package/build/components/Tag/index.js.map +0 -1
- package/build/components/Tag/tsconfig.tsbuildinfo +0 -1
- package/build/components/Testimonial/index.js +0 -16
- package/build/components/Testimonial/index.js.map +0 -1
- package/build/components/Testimonial/tsconfig.tsbuildinfo +0 -1
- package/build/components/Tile/index.js +0 -16
- package/build/components/Tile/index.js.map +0 -1
- package/build/components/Tile/tsconfig.tsbuildinfo +0 -1
- package/build/components/Tooltip/index.js +0 -16
- package/build/components/Tooltip/index.js.map +0 -1
- package/build/components/Tooltip/style.css +0 -2
- package/build/components/Tooltip/style.css.map +0 -1
- package/build/components/Tooltip/tsconfig.tsbuildinfo +0 -1
- package/build/components/static.css +0 -2
- package/build/components/static.css.map +0 -1
- package/build/components/static.js +0 -10
- package/build/components/static.js.map +0 -1
- package/build/components/types/src/components/Hero/HeroPlayground.d.ts +0 -2
- package/build/components/types/src/components/Megamenu/MegamenuDropdown.d.ts +0 -17
- package/src/components/Accordion/Accordion.mdx +0 -222
- package/src/components/Alert/Alert.mdx +0 -141
- package/src/components/Bar/Bar.mdx +0 -203
- package/src/components/BlockAction/BlockAction.mdx +0 -244
- package/src/components/BodyBanner/BodyBanner.mdx +0 -268
- package/src/components/Breadcrumbs/Breadcrumbs.mdx +0 -84
- package/src/components/Button/Button.mdx +0 -273
- package/src/components/Buttons/Buttons.mdx +0 -39
- package/src/components/Card/Card.mdx +0 -334
- package/src/components/Carousel/Carousel.mdx +0 -159
- package/src/components/CarouselPromotions/CarouselPromotions.mdx +0 -246
- package/src/components/CartTable/CartTable.mdx +0 -129
- package/src/components/Container/Container.mdx +0 -73
- package/src/components/Controls/Controls.mdx +0 -469
- package/src/components/Cover/Cover.mdx +0 -87
- package/src/components/Divider/Divider.mdx +0 -65
- package/src/components/Dropdown/Dropdown.mdx +0 -260
- package/src/components/Expander/Expander.mdx +0 -153
- package/src/components/FeatureAccordion/FeatureAccordion.mdx +0 -33
- package/src/components/Forms/Autocomplete/Autocomplete.mdx +0 -198
- package/src/components/Forms/Checkbox/Checkbox.mdx +0 -139
- package/src/components/Forms/DatePicker/DatePicker.mdx +0 -149
- package/src/components/Forms/Field/Field.mdx +0 -383
- package/src/components/Forms/Fieldset/Fieldset.mdx +0 -178
- package/src/components/Forms/File/File.mdx +0 -88
- package/src/components/Forms/FormTooltip.mdx +0 -51
- package/src/components/Forms/Forms.mdx +0 -48
- package/src/components/Forms/Group/Group.mdx +0 -146
- package/src/components/Forms/Hint/Hint.mdx +0 -40
- package/src/components/Forms/InputStepper/InputStepper.mdx +0 -147
- package/src/components/Forms/Label/Label.mdx +0 -95
- package/src/components/Forms/Message/Message.mdx +0 -40
- package/src/components/Forms/Radio/Radio.mdx +0 -98
- package/src/components/Forms/RangeSlider/RangeSlider.mdx +0 -304
- package/src/components/Forms/Select/Select.mdx +0 -106
- package/src/components/Forms/TextArea/TextArea.mdx +0 -109
- package/src/components/Forms/TextInput/TextInput.mdx +0 -153
- package/src/components/Gauge/Gauge.mdx +0 -35
- package/src/components/Grid/Grid.mdx +0 -320
- package/src/components/Hero/Hero.mdx +0 -168
- package/src/components/Hero/HeroPlayground.tsx +0 -369
- package/src/components/Icon/Icon.mdx +0 -172
- package/src/components/IconList/IconList.mdx +0 -53
- package/src/components/Image/Image.mdx +0 -175
- package/src/components/Link/Link.mdx +0 -224
- package/src/components/List/List.mdx +0 -216
- package/src/components/Loader/Loader.mdx +0 -148
- package/src/components/Megamenu/MegamenuDropdown.tsx +0 -64
- package/src/components/Modal/Modal.mdx +0 -565
- package/src/components/Pagination/Pagination.mdx +0 -45
- package/src/components/Pill/Pill.mdx +0 -41
- package/src/components/Progress/Progress.mdx +0 -119
- package/src/components/PromotionCard/PromotionCard.mdx +0 -191
- package/src/components/Section/Section.mdx +0 -397
- package/src/components/Skeleton/Skeleton.mdx +0 -90
- package/src/components/SkipLink/SkipLink.mdx +0 -23
- package/src/components/Stepbar/Stepbar.mdx +0 -137
- package/src/components/Sticker/Sticker.mdx +0 -50
- package/src/components/Table/Table.mdx +0 -199
- package/src/components/Tabs/Tabs.mdx +0 -373
- package/src/components/Tag/Tag.mdx +0 -52
- package/src/components/Testimonial/Testimonial.mdx +0 -41
- package/src/components/Tile/Tile.mdx +0 -163
- package/src/components/Tooltip/Tooltip.mdx +0 -227
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface MegamenuDropdownProps {
|
|
3
|
-
/** Unique identifier for the dropdown */
|
|
4
|
-
id: string;
|
|
5
|
-
/** Title of the dropdown */
|
|
6
|
-
title: string;
|
|
7
|
-
/** Icon of the dropdown */
|
|
8
|
-
icon?: string;
|
|
9
|
-
/** Additional CSS classes */
|
|
10
|
-
className?: string;
|
|
11
|
-
/** Children of the dropdown */
|
|
12
|
-
children?: React.ReactNode;
|
|
13
|
-
/** Color scheme of the dropdown */
|
|
14
|
-
colorScheme?: "light" | "dark";
|
|
15
|
-
}
|
|
16
|
-
declare const MegamenuDropdown: ({ id, title, children, className, icon, colorScheme, }: MegamenuDropdownProps) => React.JSX.Element;
|
|
17
|
-
export default MegamenuDropdown;
|
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
import { CodeBlock, ComponentDocs } from '@lighting-beetle/lighter-styleguide';
|
|
2
|
-
import { loremIpsum } from 'lorem-ipsum';
|
|
3
|
-
|
|
4
|
-
import { Preview } from '../../styleguide/';
|
|
5
|
-
import BlockAction, {
|
|
6
|
-
BlockActionControl,
|
|
7
|
-
BlockActionIndicator,
|
|
8
|
-
} from '../BlockAction';
|
|
9
|
-
import Grid, { GridCol } from '../Grid';
|
|
10
|
-
import Bar, { BarItem } from '../Bar';
|
|
11
|
-
import Icon from '../Icon';
|
|
12
|
-
import Card, { CardSection } from '../Card';
|
|
13
|
-
|
|
14
|
-
import { Accordion } from './Accordion';
|
|
15
|
-
import { AccordionItem } from './AccordionItem';
|
|
16
|
-
|
|
17
|
-
export const AccordionHeader = ({ title, currentId, isActive }) => (
|
|
18
|
-
<BlockAction>
|
|
19
|
-
<Bar className="accordion__header">
|
|
20
|
-
<BarItem isFilling>
|
|
21
|
-
<Grid vAlign="middle">
|
|
22
|
-
<GridCol size={{ md: 6 }}>
|
|
23
|
-
<h3 className="mb-small" hasMdxLink={false}>
|
|
24
|
-
<BlockActionControl>
|
|
25
|
-
<button
|
|
26
|
-
type="button"
|
|
27
|
-
aria-expanded={isActive}
|
|
28
|
-
className="accordion__button"
|
|
29
|
-
aria-controls={`${currentId}-section`}
|
|
30
|
-
id={currentId}
|
|
31
|
-
data-accordion-toggle
|
|
32
|
-
>
|
|
33
|
-
<span className="accordion__title">{title}</span>
|
|
34
|
-
</button>
|
|
35
|
-
</BlockActionControl>
|
|
36
|
-
</h3>
|
|
37
|
-
<p className="mb-none">{loremIpsum({ count: 1 })}</p>
|
|
38
|
-
</GridCol>
|
|
39
|
-
<GridCol size={{ md: 6 }}>
|
|
40
|
-
<p className="mb-none">{loremIpsum({ count: 1 })}</p>
|
|
41
|
-
</GridCol>
|
|
42
|
-
</Grid>
|
|
43
|
-
</BarItem>
|
|
44
|
-
<BarItem>
|
|
45
|
-
<BlockActionIndicator>
|
|
46
|
-
<Icon className="accordion__icon" name="chevron-down" size="medium" />
|
|
47
|
-
</BlockActionIndicator>
|
|
48
|
-
</BarItem>
|
|
49
|
-
</Bar>
|
|
50
|
-
</BlockAction>
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
# Accordion
|
|
54
|
-
|
|
55
|
-
Accordion expands and collapses sections of content.
|
|
56
|
-
|
|
57
|
-
<Preview>
|
|
58
|
-
<Accordion>
|
|
59
|
-
<AccordionItem title={loremIpsum({ count: 1 })}>
|
|
60
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
61
|
-
</AccordionItem>
|
|
62
|
-
<AccordionItem title={loremIpsum({ count: 1 })}>
|
|
63
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
64
|
-
</AccordionItem>
|
|
65
|
-
<AccordionItem title={loremIpsum({ count: 1 })}>
|
|
66
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
67
|
-
</AccordionItem>
|
|
68
|
-
</Accordion>
|
|
69
|
-
</Preview>
|
|
70
|
-
|
|
71
|
-
## Custom heading level
|
|
72
|
-
|
|
73
|
-
Accordion titles are rendered inside a `h3` element, which can be overriden.
|
|
74
|
-
|
|
75
|
-
<Preview>
|
|
76
|
-
<Accordion headingLevel={2}>
|
|
77
|
-
<AccordionItem title={loremIpsum({ count: 1 })}>
|
|
78
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
79
|
-
</AccordionItem>
|
|
80
|
-
<AccordionItem title={loremIpsum({ count: 1 })}>
|
|
81
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
82
|
-
</AccordionItem>
|
|
83
|
-
<AccordionItem title={loremIpsum({ count: 1 })}>
|
|
84
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
85
|
-
</AccordionItem>
|
|
86
|
-
</Accordion>
|
|
87
|
-
</Preview>
|
|
88
|
-
|
|
89
|
-
## Size
|
|
90
|
-
|
|
91
|
-
### Default
|
|
92
|
-
|
|
93
|
-
<Preview>
|
|
94
|
-
<Accordion>
|
|
95
|
-
<AccordionItem title={loremIpsum({ count: 1 })}>
|
|
96
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
97
|
-
</AccordionItem>
|
|
98
|
-
<AccordionItem title={loremIpsum({ count: 1 })}>
|
|
99
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
100
|
-
</AccordionItem>
|
|
101
|
-
<AccordionItem title={loremIpsum({ count: 1 })}>
|
|
102
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
103
|
-
</AccordionItem>
|
|
104
|
-
</Accordion>
|
|
105
|
-
</Preview>
|
|
106
|
-
|
|
107
|
-
### Large
|
|
108
|
-
|
|
109
|
-
<Preview>
|
|
110
|
-
<Accordion size="large">
|
|
111
|
-
<AccordionItem title={loremIpsum({ count: 1 })}>
|
|
112
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
113
|
-
</AccordionItem>
|
|
114
|
-
<AccordionItem title={loremIpsum({ count: 1 })}>
|
|
115
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
116
|
-
</AccordionItem>
|
|
117
|
-
<AccordionItem title={loremIpsum({ count: 1 })}>
|
|
118
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
119
|
-
</AccordionItem>
|
|
120
|
-
</Accordion>
|
|
121
|
-
</Preview>
|
|
122
|
-
|
|
123
|
-
## Enclosed accordion
|
|
124
|
-
|
|
125
|
-
Enclosed accordions are usually placed inside a [Card](/components/card)
|
|
126
|
-
and labelled with a heading element in a separate CardSection.
|
|
127
|
-
|
|
128
|
-
<Preview bgTheme="gray">
|
|
129
|
-
<Card>
|
|
130
|
-
<CardSection>
|
|
131
|
-
<h2>Enclosed accordion</h2>
|
|
132
|
-
</CardSection>
|
|
133
|
-
<Accordion isEnclosed>
|
|
134
|
-
<AccordionItem title={loremIpsum({ count: 1 })}>
|
|
135
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
136
|
-
</AccordionItem>
|
|
137
|
-
<AccordionItem title={loremIpsum({ count: 1 })}>
|
|
138
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
139
|
-
</AccordionItem>
|
|
140
|
-
<AccordionItem title={loremIpsum({ count: 1 })}>
|
|
141
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
142
|
-
</AccordionItem>
|
|
143
|
-
</Accordion>
|
|
144
|
-
</Card>
|
|
145
|
-
</Preview>
|
|
146
|
-
|
|
147
|
-
## Advanced layout using [Block Action](/components/block-action)
|
|
148
|
-
|
|
149
|
-
<Preview>
|
|
150
|
-
<Accordion size="large">
|
|
151
|
-
<AccordionItem
|
|
152
|
-
title={loremIpsum({ count: 1 })}
|
|
153
|
-
renderHeader={(title, currentId, isActive) => (
|
|
154
|
-
<AccordionHeader
|
|
155
|
-
title={title}
|
|
156
|
-
currentId={currentId}
|
|
157
|
-
isActive={isActive}
|
|
158
|
-
/>
|
|
159
|
-
)}
|
|
160
|
-
>
|
|
161
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
162
|
-
</AccordionItem>
|
|
163
|
-
<AccordionItem
|
|
164
|
-
title={loremIpsum({ count: 1 })}
|
|
165
|
-
renderHeader={(title, currentId, isActive) => (
|
|
166
|
-
<AccordionHeader
|
|
167
|
-
title={title}
|
|
168
|
-
currentId={currentId}
|
|
169
|
-
isActive={isActive}
|
|
170
|
-
/>
|
|
171
|
-
)}
|
|
172
|
-
>
|
|
173
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
174
|
-
</AccordionItem>
|
|
175
|
-
<AccordionItem
|
|
176
|
-
title={loremIpsum({ count: 1 })}
|
|
177
|
-
renderHeader={(title, currentId, isActive) => (
|
|
178
|
-
<AccordionHeader
|
|
179
|
-
title={title}
|
|
180
|
-
currentId={currentId}
|
|
181
|
-
isActive={isActive}
|
|
182
|
-
/>
|
|
183
|
-
)}
|
|
184
|
-
>
|
|
185
|
-
<p>{loremIpsum({ count: 3 })}</p>
|
|
186
|
-
</AccordionItem>
|
|
187
|
-
</Accordion>
|
|
188
|
-
</Preview>
|
|
189
|
-
|
|
190
|
-
## Props
|
|
191
|
-
|
|
192
|
-
<ComponentDocs title="<Accordion />" component={Accordion} />
|
|
193
|
-
|
|
194
|
-
<ComponentDocs title="<AccordionItem />" component={AccordionItem} />
|
|
195
|
-
|
|
196
|
-
## JS module reference
|
|
197
|
-
|
|
198
|
-
All elements with `[data-accordion]` will be initialised automatically.
|
|
199
|
-
|
|
200
|
-
### Custom initialization
|
|
201
|
-
|
|
202
|
-
```javascript
|
|
203
|
-
const myAccordion = new window.ODS.modules.Accordion(
|
|
204
|
-
document.getElementById('my-accordion'),
|
|
205
|
-
config
|
|
206
|
-
);
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
#### Default config
|
|
210
|
-
|
|
211
|
-
```javascript
|
|
212
|
-
{
|
|
213
|
-
buttonSelector: '[data-accordion-toggle]', // element for activating/deactivating accordion sections. also enables roving tabindex navigation.
|
|
214
|
-
}
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
## Accessibility
|
|
218
|
-
|
|
219
|
-
Accordion is built according to [WAI-ARIA Authoring Practices 1.1](https://www.w3.org/TR/wai-aria-practices/#accordion).
|
|
220
|
-
Current implementation differs in markup from WAI-ARIA Authoring Practices 1.1 recommended markup. We used unoredered list instead of description list. This shoud not have any implications on accessibility or semantics.
|
|
221
|
-
|
|
222
|
-
Accordion.static.js provides keyboard navigation via roving tabindex.
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { ComponentDocs } from '@lighting-beetle/lighter-styleguide';
|
|
2
|
-
import { Preview } from '../../styleguide/';
|
|
3
|
-
|
|
4
|
-
import Button from '../Button';
|
|
5
|
-
import LinkDefault from '../Link';
|
|
6
|
-
import IconList from '../IconList';
|
|
7
|
-
|
|
8
|
-
import Alert from './';
|
|
9
|
-
|
|
10
|
-
# Alert
|
|
11
|
-
|
|
12
|
-
If you need to notify user about something specific, or if you want to explain
|
|
13
|
-
something shortly, this is the element to do it.
|
|
14
|
-
|
|
15
|
-
## Variants
|
|
16
|
-
|
|
17
|
-
### Title
|
|
18
|
-
|
|
19
|
-
<Preview>
|
|
20
|
-
<Alert title="Toto je jednoduchá správa" />
|
|
21
|
-
</Preview>
|
|
22
|
-
|
|
23
|
-
### Title and Description
|
|
24
|
-
|
|
25
|
-
<Preview>
|
|
26
|
-
<Alert
|
|
27
|
-
title="Dobre vedieť!"
|
|
28
|
-
description="Popis toho čo by bolo dobré vysvetliť. Aj na viac riadkov. Niekedy veci nie sú samozrejmé, ale ak sa ich pokúsime vysvetliť, tak sa môžme stretnúť s pochopením."
|
|
29
|
-
/>
|
|
30
|
-
</Preview>
|
|
31
|
-
|
|
32
|
-
### Title and Buttons
|
|
33
|
-
|
|
34
|
-
<Preview>
|
|
35
|
-
<Alert
|
|
36
|
-
title="Prosím prihláste sa."
|
|
37
|
-
actionButtons={[<Button>Prihlásiť sa</Button>, <Button>Skryť</Button>]}
|
|
38
|
-
/>
|
|
39
|
-
</Preview>
|
|
40
|
-
|
|
41
|
-
### Title, Description and Buttons
|
|
42
|
-
|
|
43
|
-
<Preview>
|
|
44
|
-
<Alert
|
|
45
|
-
title="Prihlásiť sa je jednoduché a rozumné"
|
|
46
|
-
description="Napríklad: Prihlásení používatelia vidia krajšie ceny ako neprihlásení. Zváž to, ak máš u nás už účet. Neoľutuješ."
|
|
47
|
-
actionButtons={<Button>Prihlásiť sa</Button>}
|
|
48
|
-
/>
|
|
49
|
-
</Preview>
|
|
50
|
-
|
|
51
|
-
## Types
|
|
52
|
-
|
|
53
|
-
There are four types of alert messages you can choose from.
|
|
54
|
-
|
|
55
|
-
- [Info](#info)
|
|
56
|
-
- [Success](#success)
|
|
57
|
-
- [Warning](#warning)
|
|
58
|
-
- [Danger](#danger)
|
|
59
|
-
|
|
60
|
-
### Info
|
|
61
|
-
|
|
62
|
-
`info` is default type of alert. It's used for simple, not most important,
|
|
63
|
-
messages for the user if something happend.
|
|
64
|
-
|
|
65
|
-
<Preview>
|
|
66
|
-
<Alert title="Toto je jednoduchá správa" />
|
|
67
|
-
</Preview>
|
|
68
|
-
|
|
69
|
-
### Success
|
|
70
|
-
|
|
71
|
-
Best feeling is when something went well. You can notify the user about successful
|
|
72
|
-
things with `success` type.
|
|
73
|
-
|
|
74
|
-
<Preview>
|
|
75
|
-
<Alert type="success" title="Výborne. Všetko prebehlo rýchlo a hladko" />
|
|
76
|
-
</Preview>
|
|
77
|
-
|
|
78
|
-
### Warning
|
|
79
|
-
|
|
80
|
-
If you need to warn user about anything use `warning` type.
|
|
81
|
-
|
|
82
|
-
<Preview>
|
|
83
|
-
<Alert type="warning" title="Na toto si daj pozor!" />
|
|
84
|
-
</Preview>
|
|
85
|
-
|
|
86
|
-
### Danger
|
|
87
|
-
|
|
88
|
-
If warning is not enought and you need to show error message, use `danger` type.
|
|
89
|
-
|
|
90
|
-
<Preview>
|
|
91
|
-
<Alert type="danger" title="Stala sa chyba" />
|
|
92
|
-
</Preview>
|
|
93
|
-
|
|
94
|
-
## Custom title renderer
|
|
95
|
-
|
|
96
|
-
Alert spacing is quite strict and works 99% of time. In rare cases, the title requires a little more space to breathe. To achieve that, you can render a custom title using the `renderTitle` prop.
|
|
97
|
-
|
|
98
|
-
<Preview>
|
|
99
|
-
<Alert
|
|
100
|
-
title="Prihlásiť sa je jednoduché a rozumné"
|
|
101
|
-
renderTitle={props => (
|
|
102
|
-
<h3 className="alert__title mb-medium">{props.title}</h3>
|
|
103
|
-
)}
|
|
104
|
-
description={
|
|
105
|
-
<IconList
|
|
106
|
-
className="reset-font-weight"
|
|
107
|
-
items={[
|
|
108
|
-
{
|
|
109
|
-
icon: 'tick',
|
|
110
|
-
content: 'Bonus na nové zariadenie až do 440 €',
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
icon: 'tick',
|
|
114
|
-
content: 'Bezúročné splátky zariadenia',
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
icon: 'tick',
|
|
118
|
-
content: 'Doručenie zadarmo',
|
|
119
|
-
},
|
|
120
|
-
]}
|
|
121
|
-
/>
|
|
122
|
-
}
|
|
123
|
-
actionButtons={<Button>Prihlásiť sa</Button>}
|
|
124
|
-
/>
|
|
125
|
-
</Preview>
|
|
126
|
-
|
|
127
|
-
## Full width
|
|
128
|
-
|
|
129
|
-
If you need full width Alert, you can use `isFullWidth` prop. Max width on text remamains the same, because of readability.
|
|
130
|
-
|
|
131
|
-
<Preview>
|
|
132
|
-
<Alert
|
|
133
|
-
isFullWidth
|
|
134
|
-
title="Dobre vedieť!"
|
|
135
|
-
description="Popis toho čo by bolo dobré vysvetliť. Aj na viac riadkov. Niekedy veci nie sú samozrejmé, ale ak sa ich pokúsime vysvetliť, tak sa môžme stretnúť s pochopením."
|
|
136
|
-
/>
|
|
137
|
-
</Preview>
|
|
138
|
-
|
|
139
|
-
## Props
|
|
140
|
-
|
|
141
|
-
<ComponentDocs title="<Alert />" component={Alert} />
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import { Code, ComponentDocs, md } from '@lighting-beetle/lighter-styleguide';
|
|
2
|
-
|
|
3
|
-
import { Preview } from '../../styleguide/';
|
|
4
|
-
|
|
5
|
-
import Bar, { BarItem, BarBreak } from './index';
|
|
6
|
-
|
|
7
|
-
export const capitalize = s => s.charAt(0).toUpperCase() + s.slice(1);
|
|
8
|
-
export const spaces = ['small', 'default', 'large'];
|
|
9
|
-
export const alignments = ['start', 'center', 'end'];
|
|
10
|
-
|
|
11
|
-
# Bar
|
|
12
|
-
|
|
13
|
-
We use bar to create horizontal layouts with predefined spacings between items.
|
|
14
|
-
|
|
15
|
-
<Preview>
|
|
16
|
-
<Bar tag="ul">
|
|
17
|
-
<BarItem tag="li">
|
|
18
|
-
<div className="l-debug">Item</div>
|
|
19
|
-
</BarItem>
|
|
20
|
-
<BarItem tag="li" isFilling>
|
|
21
|
-
<div className="l-debug">I'm filling good</div>
|
|
22
|
-
</BarItem>
|
|
23
|
-
<BarItem tag="li">
|
|
24
|
-
<div className="l-debug">Item</div>
|
|
25
|
-
</BarItem>
|
|
26
|
-
</Bar>
|
|
27
|
-
</Preview>
|
|
28
|
-
|
|
29
|
-
## Spacing
|
|
30
|
-
|
|
31
|
-
If you need to adjust space widths between items, it can be done by adjusted with
|
|
32
|
-
`.bar--space-small` and `.bar--space-large` classes.
|
|
33
|
-
|
|
34
|
-
<Preview>
|
|
35
|
-
{spaces.map(space => (
|
|
36
|
-
<Bar key={space} space={space === 'default' ? undefined : space}>
|
|
37
|
-
<BarItem>
|
|
38
|
-
<div className="l-debug">space</div>
|
|
39
|
-
</BarItem>
|
|
40
|
-
<BarItem>
|
|
41
|
-
<div className="l-debug">set</div>
|
|
42
|
-
</BarItem>
|
|
43
|
-
<BarItem>
|
|
44
|
-
<div className="l-debug">to</div>
|
|
45
|
-
</BarItem>
|
|
46
|
-
<BarItem>
|
|
47
|
-
<div className="l-debug">
|
|
48
|
-
<strong>{space}</strong>
|
|
49
|
-
</div>
|
|
50
|
-
</BarItem>
|
|
51
|
-
</Bar>
|
|
52
|
-
))}
|
|
53
|
-
</Preview>
|
|
54
|
-
|
|
55
|
-
## Vertical alignment
|
|
56
|
-
|
|
57
|
-
You have three options to vertically align all items of the `.bar` component.
|
|
58
|
-
You can use a standard `.align-items-start`, `.align-items-center`,
|
|
59
|
-
`.align-items-end` known as [vertical utility classes](/utilities/flex-alignment#vertical).
|
|
60
|
-
|
|
61
|
-
<Preview>
|
|
62
|
-
{alignments.map(align => (
|
|
63
|
-
<Bar key={align} align={align}>
|
|
64
|
-
<BarItem>
|
|
65
|
-
<div className="l-debug">
|
|
66
|
-
<strong>{capitalize(align)}</strong> alignment
|
|
67
|
-
</div>
|
|
68
|
-
</BarItem>
|
|
69
|
-
<BarItem isFilling>
|
|
70
|
-
<div className="l-debug">
|
|
71
|
-
<p>
|
|
72
|
-
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Eaque,
|
|
73
|
-
ipsum deleniti quia iure similique mollitia quam excepturi
|
|
74
|
-
laudantium architecto, aperiam magnam exercitationem magni commodi
|
|
75
|
-
laborum molestiae dolore. Corrupti, officia perferendis?
|
|
76
|
-
</p>
|
|
77
|
-
</div>
|
|
78
|
-
</BarItem>
|
|
79
|
-
<BarItem>
|
|
80
|
-
<div className="l-debug">Item</div>
|
|
81
|
-
</BarItem>
|
|
82
|
-
</Bar>
|
|
83
|
-
))}
|
|
84
|
-
</Preview>
|
|
85
|
-
|
|
86
|
-
## Vertical bar
|
|
87
|
-
|
|
88
|
-
Bar can be use to stack elements vertically with `.bar--vertical` class.
|
|
89
|
-
|
|
90
|
-
<Preview>
|
|
91
|
-
<Bar isVertical>
|
|
92
|
-
<BarItem>
|
|
93
|
-
<div className="l-debug">Item</div>
|
|
94
|
-
</BarItem>
|
|
95
|
-
<BarItem isFilling>
|
|
96
|
-
<div className="l-debug">
|
|
97
|
-
<p>
|
|
98
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Animi,
|
|
99
|
-
incidunt veniam minima quasi eligendi amet ullam explicabo laborum
|
|
100
|
-
aperiam accusantium hic laboriosam doloremque expedita odit ex
|
|
101
|
-
consequatur voluptas aliquid soluta.
|
|
102
|
-
</p>
|
|
103
|
-
</div>
|
|
104
|
-
</BarItem>
|
|
105
|
-
<BarItem>
|
|
106
|
-
<div className="l-debug">Item</div>
|
|
107
|
-
</BarItem>
|
|
108
|
-
</Bar>
|
|
109
|
-
</Preview>
|
|
110
|
-
|
|
111
|
-
## Item filling the space
|
|
112
|
-
|
|
113
|
-
If one or more items need to fill maximum available space available you can use
|
|
114
|
-
`.bar__item--fill` class to do that.
|
|
115
|
-
|
|
116
|
-
<Preview>
|
|
117
|
-
<Bar>
|
|
118
|
-
<BarItem>
|
|
119
|
-
<div className="l-debug">Item</div>
|
|
120
|
-
</BarItem>
|
|
121
|
-
<BarItem isFilling>
|
|
122
|
-
<div className="l-debug">I'm filling good</div>
|
|
123
|
-
</BarItem>
|
|
124
|
-
<BarItem>
|
|
125
|
-
<div className="l-debug">Third item</div>
|
|
126
|
-
</BarItem>
|
|
127
|
-
</Bar>
|
|
128
|
-
</Preview>
|
|
129
|
-
|
|
130
|
-
## Item shrinking to fit
|
|
131
|
-
|
|
132
|
-
If you need an item to shrink where there is lack of space, there is a
|
|
133
|
-
`.bar__item--shrink` class to do that.
|
|
134
|
-
|
|
135
|
-
<Preview>
|
|
136
|
-
<Bar>
|
|
137
|
-
<BarItem>
|
|
138
|
-
<div className="l-debug">Item</div>
|
|
139
|
-
</BarItem>
|
|
140
|
-
<BarItem canShrink>
|
|
141
|
-
<div className="l-debug">
|
|
142
|
-
<p>
|
|
143
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Accusantium
|
|
144
|
-
deleniti dignissimos recusandae nesciunt perferendis cupiditate
|
|
145
|
-
perspiciatis harum odit eaque aspernatur dolorem rerum ratione
|
|
146
|
-
repudiandae qui alias assumenda saepe, atque reiciendis?
|
|
147
|
-
</p>
|
|
148
|
-
</div>
|
|
149
|
-
</BarItem>
|
|
150
|
-
<BarItem>
|
|
151
|
-
<div className="l-debug">Third item</div>
|
|
152
|
-
</BarItem>
|
|
153
|
-
</Bar>
|
|
154
|
-
</Preview>
|
|
155
|
-
|
|
156
|
-
## Bar nowrap
|
|
157
|
-
|
|
158
|
-
`.bar--nowrap` is used to **force bar items to stay in one line** at all times.
|
|
159
|
-
|
|
160
|
-
<Preview>
|
|
161
|
-
<Bar canWrap={false}>
|
|
162
|
-
{[...Array(20)].map((_, i) => (
|
|
163
|
-
<BarItem key={i.toString()}>
|
|
164
|
-
<div className="l-debug">Item</div>
|
|
165
|
-
</BarItem>
|
|
166
|
-
))}
|
|
167
|
-
</Bar>
|
|
168
|
-
</Preview>
|
|
169
|
-
|
|
170
|
-
## Bar break
|
|
171
|
-
|
|
172
|
-
`.bar__break` breaks horizontal bar into multiple lines.
|
|
173
|
-
|
|
174
|
-
Pro tip: use [visibility classes](/utilities/visibility) to show
|
|
175
|
-
and hide the break to adjust layout for different breakpoints.
|
|
176
|
-
|
|
177
|
-
<Preview>
|
|
178
|
-
<Bar>
|
|
179
|
-
<BarItem>
|
|
180
|
-
<div className="l-debug">Item</div>
|
|
181
|
-
</BarItem>
|
|
182
|
-
<BarBreak />
|
|
183
|
-
<BarItem>
|
|
184
|
-
<div className="l-debug">Item</div>
|
|
185
|
-
</BarItem>
|
|
186
|
-
</Bar>
|
|
187
|
-
</Preview>
|
|
188
|
-
|
|
189
|
-
## Props
|
|
190
|
-
|
|
191
|
-
<ComponentDocs title="<Bar />" component={Bar} />
|
|
192
|
-
|
|
193
|
-
<ComponentDocs title="<BarItem />" component={BarItem} />
|
|
194
|
-
|
|
195
|
-
## Accessibility
|
|
196
|
-
|
|
197
|
-
The Bar component is primarily used for layout, and as such, should not have any
|
|
198
|
-
impact on accessibility.
|
|
199
|
-
|
|
200
|
-
Beware however when you are using it for layouts inside
|
|
201
|
-
[inline elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements)
|
|
202
|
-
such as form labels. `<Bar />` and `<BarItem />` benefit from the tag prop to
|
|
203
|
-
render any html element you want it to.
|