@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,119 +0,0 @@
|
|
|
1
|
-
import { ComponentDocs } from '@lighting-beetle/lighter-styleguide';
|
|
2
|
-
import Preview from '../../styleguide/Preview';
|
|
3
|
-
|
|
4
|
-
import Progress from './';
|
|
5
|
-
import Bar, { BarItem } from '../Bar';
|
|
6
|
-
import Icon from '../Icon';
|
|
7
|
-
import { InfoTooltip } from '../Tooltip';
|
|
8
|
-
|
|
9
|
-
# Progress
|
|
10
|
-
|
|
11
|
-
Horizontal indicator of a task progress or scalar value.
|
|
12
|
-
|
|
13
|
-
## Label and value
|
|
14
|
-
|
|
15
|
-
Authors are required to provide a clear, explanatory Label and textual Value to ensure all users can access the displayed information.
|
|
16
|
-
|
|
17
|
-
<Preview>
|
|
18
|
-
<Progress
|
|
19
|
-
label="Zdieľanie dát: zostavajuce predplatené"
|
|
20
|
-
value="4.1 GB / 7.9 GB"
|
|
21
|
-
width={0.8}
|
|
22
|
-
/>
|
|
23
|
-
</Preview>
|
|
24
|
-
|
|
25
|
-
## Variants
|
|
26
|
-
|
|
27
|
-
<Preview>
|
|
28
|
-
{['orange', 'green', 'red', 'blue', 'yellow'].map(color => {
|
|
29
|
-
const randomWidth = Math.round(Math.random() * 10000) / 10000;
|
|
30
|
-
return (
|
|
31
|
-
<Progress
|
|
32
|
-
label="Example label"
|
|
33
|
-
key={color}
|
|
34
|
-
color={color}
|
|
35
|
-
width={randomWidth}
|
|
36
|
-
value={`${randomWidth} / 1`}
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
})}
|
|
40
|
-
</Preview>
|
|
41
|
-
|
|
42
|
-
## Complex description of Progress bar
|
|
43
|
-
|
|
44
|
-
<Preview>
|
|
45
|
-
<Progress
|
|
46
|
-
label={
|
|
47
|
-
<Bar className="justify-content-space-between mb-none" space="small">
|
|
48
|
-
<BarItem canShrink>
|
|
49
|
-
<Bar align="start" className="mb-none" space="small" canWrap={false}>
|
|
50
|
-
<BarItem>
|
|
51
|
-
<Icon name="data-traffic" />
|
|
52
|
-
</BarItem>
|
|
53
|
-
<BarItem canShrink>
|
|
54
|
-
<p className="text-nowrap mb-none">
|
|
55
|
-
<span className="text-wrap">Label with icon and tooltip</span>
|
|
56
|
-
|
|
57
|
-
<InfoTooltip>
|
|
58
|
-
Tooltip should always be next to label, so we use combination
|
|
59
|
-
of .text-nowrap and .text-wrap classes.
|
|
60
|
-
</InfoTooltip>
|
|
61
|
-
</p>
|
|
62
|
-
</BarItem>
|
|
63
|
-
</Bar>
|
|
64
|
-
</BarItem>
|
|
65
|
-
<BarItem>
|
|
66
|
-
<Bar className="mb-none" space="small">
|
|
67
|
-
<BarItem>
|
|
68
|
-
<p className="reset-font-weight mb-none">breaks to left</p>
|
|
69
|
-
</BarItem>
|
|
70
|
-
<BarItem>
|
|
71
|
-
<Icon color="danger" name="error-severe" size="medium" />
|
|
72
|
-
</BarItem>
|
|
73
|
-
</Bar>
|
|
74
|
-
</BarItem>
|
|
75
|
-
</Bar>
|
|
76
|
-
}
|
|
77
|
-
color="red"
|
|
78
|
-
width={0.4}
|
|
79
|
-
value={
|
|
80
|
-
<>
|
|
81
|
-
<p className="mb-small">
|
|
82
|
-
<span className="reset-font-weight">Avaible:</span> 4
|
|
83
|
-
<span className="reset-font-weight"> / 8 GB</span>
|
|
84
|
-
</p>
|
|
85
|
-
<Bar align="start" className="mb-none" space="small" canWrap={false}>
|
|
86
|
-
<BarItem>
|
|
87
|
-
<Icon name="info" />
|
|
88
|
-
</BarItem>
|
|
89
|
-
<BarItem canShrink>
|
|
90
|
-
<p className="mb-none">
|
|
91
|
-
<span className="reset-font-weight">
|
|
92
|
-
Yes we need to use another bar element in label, so icon and
|
|
93
|
-
text stays on same line. Also this text in
|
|
94
|
-
</span>{' '}
|
|
95
|
-
paragraph{' '}
|
|
96
|
-
<span className="reset-font-weight">
|
|
97
|
-
{' '}
|
|
98
|
-
so it has set max-width. If you have label with longer text, you
|
|
99
|
-
should also use paragraph in there. And one last last think - yes
|
|
100
|
-
we need to have that many bars in label, so the text doesnt break
|
|
101
|
-
to newline without icon.
|
|
102
|
-
</span>
|
|
103
|
-
</p>
|
|
104
|
-
</BarItem>
|
|
105
|
-
</Bar>
|
|
106
|
-
</>
|
|
107
|
-
}
|
|
108
|
-
/>
|
|
109
|
-
</Preview>
|
|
110
|
-
|
|
111
|
-
## Accessibility
|
|
112
|
-
|
|
113
|
-
Progress component can be used with `role="progressbar"` when it's needed to "indicate that the user's request has been received and the application is making progress toward completing the requested action." [role="progressbar"](https://www.w3.org/TR/wai-aria-1.1/#progressbar).
|
|
114
|
-
|
|
115
|
-
It's not recommended to use `role="meter"` when the component should represent a scalar value as it's screenreader support is poor.
|
|
116
|
-
|
|
117
|
-
Since label and textual value are required when using this component, all relevant infomation is provided in an understandable way, not relying on visual representation only. [Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element.](https://www.w3.org/TR/WCAG21/#use-of-color)
|
|
118
|
-
|
|
119
|
-
<ComponentDocs title="<Progress />" component={Progress} />
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import { ComponentDocs } from '@lighting-beetle/lighter-styleguide';
|
|
2
|
-
import Preview from '../../styleguide/Preview';
|
|
3
|
-
import Image from '../../components/Image';
|
|
4
|
-
|
|
5
|
-
import PromotionCard, {
|
|
6
|
-
PromotionCardContent,
|
|
7
|
-
PromotionCardImageWrapper,
|
|
8
|
-
PromotionCardSection,
|
|
9
|
-
PromotionCardTitle,
|
|
10
|
-
} from './';
|
|
11
|
-
import { Button } from '../index';
|
|
12
|
-
import Divider from '../Divider';
|
|
13
|
-
import Pagination from '../Pagination';
|
|
14
|
-
|
|
15
|
-
import phones from '../../assets/images/developers/phones.png';
|
|
16
|
-
import Grid, { GridCol } from '../Grid';
|
|
17
|
-
|
|
18
|
-
export const getItems = (count = 10, current = Math.ceil(count / 2)) =>
|
|
19
|
-
[
|
|
20
|
-
...Array(count)
|
|
21
|
-
.fill('')
|
|
22
|
-
.map((_, i) => i + 1),
|
|
23
|
-
].map(n => ({
|
|
24
|
-
label: `${n}`,
|
|
25
|
-
ariaLabel: `Strana ${n}`,
|
|
26
|
-
href: `/?page=${n}`,
|
|
27
|
-
...(current === n ? { isActive: true } : {}),
|
|
28
|
-
}));
|
|
29
|
-
|
|
30
|
-
export const label = 'Výber stránok';
|
|
31
|
-
|
|
32
|
-
export const DefaultPromotionsCard = () => (
|
|
33
|
-
<PromotionCard>
|
|
34
|
-
<PromotionCardSection>
|
|
35
|
-
<PromotionCardContent>
|
|
36
|
-
<PromotionCardTitle>
|
|
37
|
-
<h2>Online ochrana pre váš digitálny svet</h2>
|
|
38
|
-
</PromotionCardTitle>
|
|
39
|
-
<p className="mb-none">
|
|
40
|
-
Orange je tu, aby ste mohli používať internet bezpečne a bez obáv.
|
|
41
|
-
</p>
|
|
42
|
-
</PromotionCardContent>
|
|
43
|
-
<Button href="#">Zistiť viac</Button>
|
|
44
|
-
</PromotionCardSection>
|
|
45
|
-
<PromotionCardImageWrapper>
|
|
46
|
-
<Image src={phones} alt="iPhone image" />
|
|
47
|
-
</PromotionCardImageWrapper>
|
|
48
|
-
</PromotionCard>
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
export const DarkPromotionsCard = () => (
|
|
52
|
-
<PromotionCard colorScheme="dark">
|
|
53
|
-
<PromotionCardSection>
|
|
54
|
-
<PromotionCardContent>
|
|
55
|
-
<PromotionCardTitle>
|
|
56
|
-
<h2>Online ochrana pre váš digitálny svet</h2>
|
|
57
|
-
</PromotionCardTitle>
|
|
58
|
-
<p className="mb-none">
|
|
59
|
-
Orange je tu, aby ste mohli používať internet bezpečne a bez obáv.
|
|
60
|
-
</p>
|
|
61
|
-
</PromotionCardContent>
|
|
62
|
-
<Button href="#">Zistiť viac</Button>
|
|
63
|
-
</PromotionCardSection>
|
|
64
|
-
<PromotionCardImageWrapper>
|
|
65
|
-
<Image src={phones} alt="iPhone image" />
|
|
66
|
-
</PromotionCardImageWrapper>
|
|
67
|
-
</PromotionCard>
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
export const InversePromotionsCard = () => (
|
|
71
|
-
<PromotionCard colorScheme="dark">
|
|
72
|
-
<PromotionCardSection isInverse>
|
|
73
|
-
<PromotionCardContent>
|
|
74
|
-
<PromotionCardTitle>
|
|
75
|
-
<h2>Online ochrana pre váš digitálny svet</h2>
|
|
76
|
-
</PromotionCardTitle>
|
|
77
|
-
<p className="mb-none">
|
|
78
|
-
Orange je tu, aby ste mohli používať internet bezpečne a bez obáv.
|
|
79
|
-
</p>
|
|
80
|
-
</PromotionCardContent>
|
|
81
|
-
<Button href="#">Zistiť viac</Button>
|
|
82
|
-
</PromotionCardSection>
|
|
83
|
-
<PromotionCardImageWrapper>
|
|
84
|
-
<Image src={phones} alt="iPhone image" />
|
|
85
|
-
</PromotionCardImageWrapper>
|
|
86
|
-
</PromotionCard>
|
|
87
|
-
);
|
|
88
|
-
|
|
89
|
-
# Promotion card
|
|
90
|
-
|
|
91
|
-
Karta, ktorá propaguje produkt alebo službu. Komponent Promotion card je adaptáciou [Card komponentu](/components/card).
|
|
92
|
-
|
|
93
|
-
## Príklady
|
|
94
|
-
|
|
95
|
-
### Základný
|
|
96
|
-
|
|
97
|
-
<Preview>
|
|
98
|
-
<Grid>
|
|
99
|
-
<GridCol size={{ default: 12, xxl: 8 }}>
|
|
100
|
-
<DefaultPromotionsCard />
|
|
101
|
-
</GridCol>
|
|
102
|
-
</Grid>
|
|
103
|
-
</Preview>
|
|
104
|
-
|
|
105
|
-
### Tmavý variant
|
|
106
|
-
|
|
107
|
-
<Preview>
|
|
108
|
-
<Grid>
|
|
109
|
-
<GridCol size={{ default: 12, xxl: 8 }}>
|
|
110
|
-
<DarkPromotionsCard />
|
|
111
|
-
</GridCol>
|
|
112
|
-
</Grid>
|
|
113
|
-
</Preview>
|
|
114
|
-
|
|
115
|
-
### Inverzný variant
|
|
116
|
-
|
|
117
|
-
<Preview>
|
|
118
|
-
<Grid>
|
|
119
|
-
<GridCol size={{ default: 12, xxl: 8 }}>
|
|
120
|
-
<InversePromotionsCard />
|
|
121
|
-
</GridCol>
|
|
122
|
-
</Grid>
|
|
123
|
-
</Preview>
|
|
124
|
-
|
|
125
|
-
### Viacero kariet
|
|
126
|
-
|
|
127
|
-
<Preview>
|
|
128
|
-
<Grid>
|
|
129
|
-
<GridCol size={{ default: 12, xxl: 8 }}>
|
|
130
|
-
<DefaultPromotionsCard />
|
|
131
|
-
<DarkPromotionsCard />
|
|
132
|
-
<DefaultPromotionsCard />
|
|
133
|
-
</GridCol>
|
|
134
|
-
</Grid>
|
|
135
|
-
</Preview>
|
|
136
|
-
|
|
137
|
-
## Použitie
|
|
138
|
-
|
|
139
|
-
### Grid
|
|
140
|
-
|
|
141
|
-
Šírka karty na väčších obrazovkách je obmedzená gridom. Pozri príklad kódu nižšie:
|
|
142
|
-
|
|
143
|
-
<Preview>
|
|
144
|
-
<Grid>
|
|
145
|
-
<GridCol size={{ default: 12, xxl: 8 }}>
|
|
146
|
-
<p className="mb-small">
|
|
147
|
-
<b>Nové</b>
|
|
148
|
-
</p>
|
|
149
|
-
<Divider
|
|
150
|
-
thinLine
|
|
151
|
-
className="pr-none pb-none pl-none pt-none mb-medium mb-md-none"
|
|
152
|
-
/>
|
|
153
|
-
<DefaultPromotionsCard />
|
|
154
|
-
<p className="mb-small">
|
|
155
|
-
<b>Staršie</b>
|
|
156
|
-
</p>
|
|
157
|
-
<Divider
|
|
158
|
-
thinLine
|
|
159
|
-
className="pr-none pb-none pl-none pt-none mb-medium mb-md-none"
|
|
160
|
-
/>
|
|
161
|
-
<DarkPromotionsCard />
|
|
162
|
-
<DefaultPromotionsCard />
|
|
163
|
-
<InversePromotionsCard />
|
|
164
|
-
<Pagination label={label} items={getItems(10, 1)} isCompact />
|
|
165
|
-
</GridCol>
|
|
166
|
-
</Grid>
|
|
167
|
-
</Preview>
|
|
168
|
-
|
|
169
|
-
## Props
|
|
170
|
-
|
|
171
|
-
<ComponentDocs title="<PromotionCard />" component={PromotionCard} />
|
|
172
|
-
|
|
173
|
-
<ComponentDocs
|
|
174
|
-
title="<PromotionCardSection />"
|
|
175
|
-
component={PromotionCardSection}
|
|
176
|
-
/>
|
|
177
|
-
|
|
178
|
-
<ComponentDocs
|
|
179
|
-
title="<PromotionCardContent />"
|
|
180
|
-
component={PromotionCardContent}
|
|
181
|
-
/>
|
|
182
|
-
|
|
183
|
-
<ComponentDocs
|
|
184
|
-
title="<PromotionCardTitle />"
|
|
185
|
-
component={PromotionCardTitle}
|
|
186
|
-
/>
|
|
187
|
-
|
|
188
|
-
<ComponentDocs
|
|
189
|
-
title="<PromotionCardImageWrapper />"
|
|
190
|
-
component={PromotionCardImageWrapper}
|
|
191
|
-
/>
|
|
@@ -1,397 +0,0 @@
|
|
|
1
|
-
import { ComponentDocs } from "@lighting-beetle/lighter-styleguide";
|
|
2
|
-
import { loremIpsum as lipsum } from "lorem-ipsum";
|
|
3
|
-
import Preview, { PreviewSpacing } from "../../styleguide/Preview/";
|
|
4
|
-
import cx from "classnames";
|
|
5
|
-
import Grid, { GridCol } from "../Grid";
|
|
6
|
-
import ToggleButton from "../../docs/utils/ToggleButton";
|
|
7
|
-
import Button from "../Button";
|
|
8
|
-
import { Section } from "./";
|
|
9
|
-
|
|
10
|
-
# Section
|
|
11
|
-
|
|
12
|
-
Section is an element that helps to separate page segments with consistent spacing. The content is automatically wrapped in a Container component for consistent layout and spacing.
|
|
13
|
-
|
|
14
|
-
<Preview>
|
|
15
|
-
<Section children="This is a section. You can use it to space out certain parts of the page with standardized spaces. The content is wrapped in a Container component." />
|
|
16
|
-
</Preview>
|
|
17
|
-
|
|
18
|
-
## Structure
|
|
19
|
-
|
|
20
|
-
Section automatically wraps its content in a Container component, which provides consistent layout constraints and spacing. This ensures that content is properly contained and aligned within the section.
|
|
21
|
-
|
|
22
|
-
<Preview>
|
|
23
|
-
<Section>
|
|
24
|
-
<div style={{ border: "1px dashed #ccc", padding: "10px" }}>
|
|
25
|
-
This content is wrapped in a Container component
|
|
26
|
-
</div>
|
|
27
|
-
</Section>
|
|
28
|
-
</Preview>
|
|
29
|
-
|
|
30
|
-
## Colors
|
|
31
|
-
|
|
32
|
-
<Preview>
|
|
33
|
-
<Section children="Gray Section" color="gray" />
|
|
34
|
-
<Section children="White (default) Section" />
|
|
35
|
-
<Section children="Black Section" color="black" />
|
|
36
|
-
<Section children="Orange Section" color="orange" />
|
|
37
|
-
</Preview>
|
|
38
|
-
|
|
39
|
-
## HTML Tags
|
|
40
|
-
|
|
41
|
-
Section can render as different HTML elements using the `tag` prop. This is useful for semantic HTML structure.
|
|
42
|
-
|
|
43
|
-
<Preview>
|
|
44
|
-
<Section children="Default div tag" />
|
|
45
|
-
<Section children="Section tag" tag="section" />
|
|
46
|
-
<Section children="Article tag" tag="article" />
|
|
47
|
-
<Section children="Main tag" tag="main" />
|
|
48
|
-
<Section children="Aside tag" tag="aside" />
|
|
49
|
-
<Section children="Header tag" tag="header" />
|
|
50
|
-
<Section children="Footer tag" tag="footer" />
|
|
51
|
-
</Preview>
|
|
52
|
-
|
|
53
|
-
## Spacing variants and rules
|
|
54
|
-
|
|
55
|
-
### Default
|
|
56
|
-
|
|
57
|
-
<PreviewSpacing>
|
|
58
|
-
<Section children="Default section" />
|
|
59
|
-
</PreviewSpacing>
|
|
60
|
-
|
|
61
|
-
### Small
|
|
62
|
-
|
|
63
|
-
A small section has smaller spacing on its top side.
|
|
64
|
-
|
|
65
|
-
<PreviewSpacing>
|
|
66
|
-
<Section children="Small section" spacing="small" />
|
|
67
|
-
</PreviewSpacing>
|
|
68
|
-
|
|
69
|
-
### Extra small
|
|
70
|
-
|
|
71
|
-
This section has 10 px spacings from both top and bottom.
|
|
72
|
-
|
|
73
|
-
<PreviewSpacing>
|
|
74
|
-
<Section children="Extra small section" spacing="xsmall" />
|
|
75
|
-
</PreviewSpacing>
|
|
76
|
-
|
|
77
|
-
### Rules
|
|
78
|
-
|
|
79
|
-
First section appearing in a group of sections is always `default`. Following sections of the same color
|
|
80
|
-
are `small`. Following sections of a different color are always `default`.
|
|
81
|
-
|
|
82
|
-
Default, white, gray, black, and orange sections have these rules applied automatically without specifying the sections's size.
|
|
83
|
-
|
|
84
|
-
<PreviewSpacing>
|
|
85
|
-
<Section children="Gray" color="gray" />
|
|
86
|
-
<Section children="Another gray" color="gray" />
|
|
87
|
-
<Section children="Black" color="black" />
|
|
88
|
-
<Section children="White" />
|
|
89
|
-
<Section children="Another white" />
|
|
90
|
-
</PreviewSpacing>
|
|
91
|
-
|
|
92
|
-
#### Breaking the rules
|
|
93
|
-
|
|
94
|
-
Spacing rules can be broken using `section--default` and `section--small` classNames.
|
|
95
|
-
|
|
96
|
-
<PreviewSpacing>
|
|
97
|
-
<Section
|
|
98
|
-
children="Small spacing breaking the rules (first section should be default)"
|
|
99
|
-
spacing="small"
|
|
100
|
-
/>
|
|
101
|
-
<Section
|
|
102
|
-
children="Default spacing breaking the rules (adjacent section of the same color should be small)"
|
|
103
|
-
spacing="default"
|
|
104
|
-
/>
|
|
105
|
-
</PreviewSpacing>
|
|
106
|
-
|
|
107
|
-
## Accessibility
|
|
108
|
-
|
|
109
|
-
Section supports various accessibility features through ARIA attributes and semantic HTML tags. The Container wrapper maintains accessibility while providing consistent layout.
|
|
110
|
-
|
|
111
|
-
### Semantic HTML
|
|
112
|
-
|
|
113
|
-
Use appropriate HTML tags for better accessibility:
|
|
114
|
-
|
|
115
|
-
<Preview>
|
|
116
|
-
<Section tag="main" aria-label="Main content">
|
|
117
|
-
<h1>Main Content</h1>
|
|
118
|
-
<p>
|
|
119
|
-
This section uses the main tag for semantic meaning and wraps content in a
|
|
120
|
-
Container.
|
|
121
|
-
</p>
|
|
122
|
-
</Section>
|
|
123
|
-
</Preview>
|
|
124
|
-
|
|
125
|
-
### ARIA Attributes
|
|
126
|
-
|
|
127
|
-
<Preview>
|
|
128
|
-
<Section
|
|
129
|
-
tag="section"
|
|
130
|
-
aria-labelledby="section-title"
|
|
131
|
-
aria-describedby="section-description"
|
|
132
|
-
>
|
|
133
|
-
<h2 id="section-title">Section Title</h2>
|
|
134
|
-
<p id="section-description">
|
|
135
|
-
This section has proper ARIA labeling and Container wrapper.
|
|
136
|
-
</p>
|
|
137
|
-
</Section>
|
|
138
|
-
</Preview>
|
|
139
|
-
|
|
140
|
-
### Interactive Elements
|
|
141
|
-
|
|
142
|
-
<Preview>
|
|
143
|
-
<Section>
|
|
144
|
-
<button type="button" onClick={() => alert("Button clicked!")}>
|
|
145
|
-
Interactive Button
|
|
146
|
-
</button>
|
|
147
|
-
<input type="text" aria-label="Search input" placeholder="Search..." />
|
|
148
|
-
</Section>
|
|
149
|
-
</Preview>
|
|
150
|
-
|
|
151
|
-
## Spacing problems and solutions
|
|
152
|
-
|
|
153
|
-
### 1. Last element
|
|
154
|
-
|
|
155
|
-
#### Problem:
|
|
156
|
-
|
|
157
|
-
If there is **just one element at the end** of the section and this element has
|
|
158
|
-
its **own bottom spacing** defined, these spaces would add up and we would lose spacing
|
|
159
|
-
consistency.
|
|
160
|
-
|
|
161
|
-
<PreviewSpacing>
|
|
162
|
-
<Section color="gray">
|
|
163
|
-
<p>
|
|
164
|
-
Et irure sit ut deserunt irure quis enim amet mollit. Adipisicing ullamco
|
|
165
|
-
adipisicing.
|
|
166
|
-
</p>
|
|
167
|
-
<Button type="primary">Button</Button>
|
|
168
|
-
</Section>
|
|
169
|
-
</PreviewSpacing>
|
|
170
|
-
|
|
171
|
-
#### Solution:
|
|
172
|
-
|
|
173
|
-
1. remove last element spacing
|
|
174
|
-
|
|
175
|
-
<PreviewSpacing>
|
|
176
|
-
<Section color="gray">
|
|
177
|
-
<p>
|
|
178
|
-
Et irure sit ut deserunt irure quis enim amet mollit. Adipisicing ullamco
|
|
179
|
-
adipisicing.
|
|
180
|
-
</p>
|
|
181
|
-
<Button type="primary" className="mb-none">
|
|
182
|
-
Button
|
|
183
|
-
</Button>
|
|
184
|
-
</Section>
|
|
185
|
-
</PreviewSpacing>
|
|
186
|
-
|
|
187
|
-
### 2. Stacking elements
|
|
188
|
-
|
|
189
|
-
#### Problem:
|
|
190
|
-
|
|
191
|
-
There are **multiple elements** in row at the end of a section and **they define their own
|
|
192
|
-
bottom spacing** (`p` in this case, uses default `medium` margin), because
|
|
193
|
-
they need to stack on smaller devices. The space of the section and elements
|
|
194
|
-
would add up and we would lose spacing consistency.
|
|
195
|
-
|
|
196
|
-
export const cols1 = [5, 2, 3, 4].map((count) => lipsum({ count }));
|
|
197
|
-
|
|
198
|
-
<PreviewSpacing>
|
|
199
|
-
<Section color="gray">
|
|
200
|
-
<Grid>
|
|
201
|
-
{cols1.map((content, index, arr) => (
|
|
202
|
-
<GridCol key={index.toString()} size={{ md: 3 }}>
|
|
203
|
-
<p>{content}</p>
|
|
204
|
-
</GridCol>
|
|
205
|
-
))}
|
|
206
|
-
</Grid>
|
|
207
|
-
</Section>
|
|
208
|
-
</PreviewSpacing>
|
|
209
|
-
|
|
210
|
-
#### Solution:
|
|
211
|
-
|
|
212
|
-
Use [Grid row gap](/components/grid#row-gap-size)
|
|
213
|
-
|
|
214
|
-
<PreviewSpacing>
|
|
215
|
-
<Section color="gray">
|
|
216
|
-
<Grid rowGapSize="medium">
|
|
217
|
-
{cols1.map((content, index, arr) => (
|
|
218
|
-
<GridCol key={index.toString()} size={{ md: 3 }}>
|
|
219
|
-
<p>{content}</p>
|
|
220
|
-
</GridCol>
|
|
221
|
-
))}
|
|
222
|
-
</Grid>
|
|
223
|
-
</Section>
|
|
224
|
-
</PreviewSpacing>
|
|
225
|
-
|
|
226
|
-
### 3. Dynamic visibility of a last element
|
|
227
|
-
|
|
228
|
-
#### Problem
|
|
229
|
-
|
|
230
|
-
If there is a possibility of **last element** of a section (`<button>` in this case) to disappear,
|
|
231
|
-
spacing of elements above this element would collide with a section spacing and we would lose spacing consistency.
|
|
232
|
-
|
|
233
|
-
export const cols2 = [1, 2, 3, 4, 5, 6, 7, 8].map((count) => lipsum({ count }));
|
|
234
|
-
|
|
235
|
-
<PreviewSpacing>
|
|
236
|
-
<Section color="gray">
|
|
237
|
-
<Grid>
|
|
238
|
-
{cols2.map((content, index, arr) => (
|
|
239
|
-
<GridCol
|
|
240
|
-
key={index.toString()}
|
|
241
|
-
size={{ md: 3 }}
|
|
242
|
-
className={
|
|
243
|
-
index < arr.length / 2 ? "" : "hidden-problem-element hide"
|
|
244
|
-
}
|
|
245
|
-
>
|
|
246
|
-
<p>{content}</p>
|
|
247
|
-
</GridCol>
|
|
248
|
-
))}
|
|
249
|
-
</Grid>
|
|
250
|
-
<ToggleButton
|
|
251
|
-
className="mb-none"
|
|
252
|
-
type="primary"
|
|
253
|
-
data-toggle={JSON.stringify([
|
|
254
|
-
{
|
|
255
|
-
target: ".hidden-problem-element.hide",
|
|
256
|
-
attribute: "class",
|
|
257
|
-
value: "hide",
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
target: "self",
|
|
261
|
-
attribute: "class",
|
|
262
|
-
value: "hide",
|
|
263
|
-
},
|
|
264
|
-
])}
|
|
265
|
-
>
|
|
266
|
-
Show more
|
|
267
|
-
</ToggleButton>
|
|
268
|
-
</Section>
|
|
269
|
-
</PreviewSpacing>
|
|
270
|
-
|
|
271
|
-
#### Solution:
|
|
272
|
-
|
|
273
|
-
1. Use [Grid row gap](/components/grid#row-gap-size)
|
|
274
|
-
2. Add additional spacing between grid and button and remove this spacing after
|
|
275
|
-
showing hidden element
|
|
276
|
-
|
|
277
|
-
##### Example:
|
|
278
|
-
|
|
279
|
-
<PreviewSpacing>
|
|
280
|
-
<Section color="gray">
|
|
281
|
-
<Grid rowGapSize="medium" className="mb-medium">
|
|
282
|
-
{cols2.map((content, index, arr) => (
|
|
283
|
-
<GridCol
|
|
284
|
-
key={index.toString()}
|
|
285
|
-
size={{ md: 3 }}
|
|
286
|
-
className={cx({
|
|
287
|
-
"hidden-solution-element hide": index >= arr.length / 2,
|
|
288
|
-
})}
|
|
289
|
-
>
|
|
290
|
-
<p>{content}</p>
|
|
291
|
-
</GridCol>
|
|
292
|
-
))}
|
|
293
|
-
</Grid>
|
|
294
|
-
<ToggleButton
|
|
295
|
-
className="mb-none"
|
|
296
|
-
type="primary"
|
|
297
|
-
data-toggle={JSON.stringify([
|
|
298
|
-
{
|
|
299
|
-
target: ".hidden-solution-element.hide",
|
|
300
|
-
attribute: "class",
|
|
301
|
-
value: "hide",
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
target: "previous",
|
|
305
|
-
attribute: "class",
|
|
306
|
-
value: "mb-medium",
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
target: "self",
|
|
310
|
-
attribute: "class",
|
|
311
|
-
value: "hide",
|
|
312
|
-
},
|
|
313
|
-
])}
|
|
314
|
-
>
|
|
315
|
-
<span>Show more</span>
|
|
316
|
-
</ToggleButton>
|
|
317
|
-
</Section>
|
|
318
|
-
</PreviewSpacing>
|
|
319
|
-
|
|
320
|
-
## Advanced Usage
|
|
321
|
-
|
|
322
|
-
### Container Integration
|
|
323
|
-
|
|
324
|
-
The Container wrapper provides consistent layout constraints. You can see this in action with complex content structures:
|
|
325
|
-
|
|
326
|
-
<Preview>
|
|
327
|
-
<Section tag="article" color="gray" spacing="small">
|
|
328
|
-
<header>
|
|
329
|
-
<h1>Article Title</h1>
|
|
330
|
-
<time dateTime="2024-01-01">January 1, 2024</time>
|
|
331
|
-
</header>
|
|
332
|
-
<main>
|
|
333
|
-
<p>
|
|
334
|
-
Article content with <a href="#link">links</a> and{" "}
|
|
335
|
-
<strong>emphasis</strong>.
|
|
336
|
-
</p>
|
|
337
|
-
<blockquote>
|
|
338
|
-
<p>This is a quote within the section, properly contained.</p>
|
|
339
|
-
</blockquote>
|
|
340
|
-
</main>
|
|
341
|
-
<footer>
|
|
342
|
-
<p>Article footer with additional information.</p>
|
|
343
|
-
</footer>
|
|
344
|
-
</Section>
|
|
345
|
-
</Preview>
|
|
346
|
-
|
|
347
|
-
### Custom Data Attributes
|
|
348
|
-
|
|
349
|
-
<Preview>
|
|
350
|
-
<Section
|
|
351
|
-
data-testid="custom-section"
|
|
352
|
-
data-analytics="section-tracking"
|
|
353
|
-
data-section-type="content"
|
|
354
|
-
>
|
|
355
|
-
<p>This section has custom data attributes for testing and analytics.</p>
|
|
356
|
-
</Section>
|
|
357
|
-
</Preview>
|
|
358
|
-
|
|
359
|
-
### Event Handling
|
|
360
|
-
|
|
361
|
-
<Preview>
|
|
362
|
-
<Section
|
|
363
|
-
onClick={() => alert("Section clicked!")}
|
|
364
|
-
onFocus={() => console.log("Section focused")}
|
|
365
|
-
role="button"
|
|
366
|
-
tabIndex={0}
|
|
367
|
-
>
|
|
368
|
-
<p>This section is clickable and focusable.</p>
|
|
369
|
-
</Section>
|
|
370
|
-
</Preview>
|
|
371
|
-
|
|
372
|
-
### Complex Content Structure
|
|
373
|
-
|
|
374
|
-
<Preview>
|
|
375
|
-
<Section tag="article" color="gray" spacing="small">
|
|
376
|
-
<header>
|
|
377
|
-
<h1>Article Title</h1>
|
|
378
|
-
<time dateTime="2024-01-01">January 1, 2024</time>
|
|
379
|
-
</header>
|
|
380
|
-
<main>
|
|
381
|
-
<p>
|
|
382
|
-
Article content with <a href="#link">links</a> and{" "}
|
|
383
|
-
<strong>emphasis</strong>.
|
|
384
|
-
</p>
|
|
385
|
-
<blockquote>
|
|
386
|
-
<p>This is a quote within the section.</p>
|
|
387
|
-
</blockquote>
|
|
388
|
-
</main>
|
|
389
|
-
<footer>
|
|
390
|
-
<p>Article footer with additional information.</p>
|
|
391
|
-
</footer>
|
|
392
|
-
</Section>
|
|
393
|
-
</Preview>
|
|
394
|
-
|
|
395
|
-
## Props
|
|
396
|
-
|
|
397
|
-
<ComponentDocs title="<Section />" component={Section} />
|