@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,469 +0,0 @@
|
|
|
1
|
-
import { ComponentDocs, Code } from "@lighting-beetle/lighter-styleguide";
|
|
2
|
-
|
|
3
|
-
import { Preview } from "../../styleguide/";
|
|
4
|
-
import { Controls } from "./Controls";
|
|
5
|
-
|
|
6
|
-
# Controls
|
|
7
|
-
|
|
8
|
-
Controls komponent je univerzálny tlačidlový element určený pre navigáciu a ovládanie aplikácie. Poskytuje konzistentný vzhľad a správanie pre rôzne typy ovládacích prvkov s ikonami.
|
|
9
|
-
|
|
10
|
-
## Základné použitie
|
|
11
|
-
|
|
12
|
-
Controls komponent vyžaduje `icon` prop pre zobrazenie ikony a podporuje všetky štandardné HTML button atribúty. Nový prop `colorScheme` umožňuje prepínať medzi svetlou a tmavou farebnou schémou.
|
|
13
|
-
|
|
14
|
-
<Preview>
|
|
15
|
-
<Controls icon="close" />
|
|
16
|
-
<Controls icon="menu" />
|
|
17
|
-
<Controls icon="search" />
|
|
18
|
-
<Controls icon="close" colorScheme="dark" />
|
|
19
|
-
<Controls icon="menu" colorScheme="dark" />
|
|
20
|
-
<Controls icon="search" colorScheme="dark" />
|
|
21
|
-
</Preview>
|
|
22
|
-
|
|
23
|
-
## Varianty
|
|
24
|
-
|
|
25
|
-
### Štandardný variant (default)
|
|
26
|
-
|
|
27
|
-
Štandardný variant s svetlým pozadím a tmavou ikonou.
|
|
28
|
-
|
|
29
|
-
<Preview>
|
|
30
|
-
<Controls icon="close" colorScheme="light" />
|
|
31
|
-
<Controls icon="menu" colorScheme="light" />
|
|
32
|
-
<Controls icon="search" colorScheme="light" />
|
|
33
|
-
<Controls icon="chevron-down" colorScheme="light" />
|
|
34
|
-
<Controls icon="chevron-up" colorScheme="light" />
|
|
35
|
-
</Preview>
|
|
36
|
-
|
|
37
|
-
### Tmavý variant
|
|
38
|
-
|
|
39
|
-
Tmavý variant s tmavým pozadím a svetlou ikonou, vhodný pre svetlé pozadia.
|
|
40
|
-
|
|
41
|
-
<Preview>
|
|
42
|
-
<div
|
|
43
|
-
style={{ backgroundColor: "#333", padding: "1rem", borderRadius: "4px" }}
|
|
44
|
-
>
|
|
45
|
-
<Controls icon="close" colorScheme="dark" />
|
|
46
|
-
<Controls icon="menu" colorScheme="dark" />
|
|
47
|
-
<Controls icon="search" colorScheme="dark" />
|
|
48
|
-
<Controls icon="chevron-down" colorScheme="dark" />
|
|
49
|
-
<Controls icon="chevron-up" colorScheme="dark" />
|
|
50
|
-
</div>
|
|
51
|
-
</Preview>
|
|
52
|
-
|
|
53
|
-
## Typy ikon
|
|
54
|
-
|
|
55
|
-
Controls komponent podporuje všetky dostupné ikony z Icon komponentu:
|
|
56
|
-
|
|
57
|
-
### Navigačné ikony
|
|
58
|
-
|
|
59
|
-
<Preview>
|
|
60
|
-
<Controls icon="chevron-left" />
|
|
61
|
-
<Controls icon="chevron-right" />
|
|
62
|
-
<Controls icon="chevron-up" />
|
|
63
|
-
<Controls icon="chevron-down" />
|
|
64
|
-
<Controls icon="arrow-left" />
|
|
65
|
-
<Controls icon="arrow-right" />
|
|
66
|
-
</Preview>
|
|
67
|
-
|
|
68
|
-
### Akčné ikony
|
|
69
|
-
|
|
70
|
-
<Preview>
|
|
71
|
-
<Controls icon="close" />
|
|
72
|
-
<Controls icon="check" />
|
|
73
|
-
<Controls icon="plus" />
|
|
74
|
-
<Controls icon="minus" />
|
|
75
|
-
<Controls icon="edit" />
|
|
76
|
-
<Controls icon="delete" />
|
|
77
|
-
</Preview>
|
|
78
|
-
|
|
79
|
-
### Funkčné ikony
|
|
80
|
-
|
|
81
|
-
<Preview>
|
|
82
|
-
<Controls icon="search" />
|
|
83
|
-
<Controls icon="filter" />
|
|
84
|
-
<Controls icon="sort" />
|
|
85
|
-
<Controls icon="refresh" />
|
|
86
|
-
<Controls icon="download" />
|
|
87
|
-
<Controls icon="upload" />
|
|
88
|
-
</Preview>
|
|
89
|
-
|
|
90
|
-
### Menu a navigačné ikony
|
|
91
|
-
|
|
92
|
-
<Preview>
|
|
93
|
-
<Controls icon="menu" />
|
|
94
|
-
<Controls icon="home" />
|
|
95
|
-
<Controls icon="user" />
|
|
96
|
-
<Controls icon="settings" />
|
|
97
|
-
<Controls icon="help" />
|
|
98
|
-
<Controls icon="info" />
|
|
99
|
-
</Preview>
|
|
100
|
-
|
|
101
|
-
## Stavy komponentu
|
|
102
|
-
|
|
103
|
-
### Aktívny stav
|
|
104
|
-
|
|
105
|
-
Controls komponent automaticky zobrazuje hover a focus stavy.
|
|
106
|
-
|
|
107
|
-
<Preview>
|
|
108
|
-
<Controls icon="close" />
|
|
109
|
-
<Controls icon="menu" />
|
|
110
|
-
<Controls icon="search" />
|
|
111
|
-
</Preview>
|
|
112
|
-
|
|
113
|
-
### Zakázaný stav
|
|
114
|
-
|
|
115
|
-
Zakázaný stav sa používa, keď akcia nie je dostupná.
|
|
116
|
-
|
|
117
|
-
<Preview>
|
|
118
|
-
<Controls icon="close" disabled />
|
|
119
|
-
<Controls icon="menu" disabled />
|
|
120
|
-
<Controls icon="search" disabled />
|
|
121
|
-
</Preview>
|
|
122
|
-
|
|
123
|
-
### Kombinované stavy
|
|
124
|
-
|
|
125
|
-
Môžete kombinovať rôzne stavy a varianty.
|
|
126
|
-
|
|
127
|
-
<Preview>
|
|
128
|
-
<div
|
|
129
|
-
style={{ backgroundColor: "#333", padding: "1rem", borderRadius: "4px" }}
|
|
130
|
-
>
|
|
131
|
-
<Controls icon="close" colorScheme="dark" disabled />
|
|
132
|
-
<Controls icon="menu" colorScheme="dark" />
|
|
133
|
-
<Controls icon="search" colorScheme="dark" />
|
|
134
|
-
</div>
|
|
135
|
-
</Preview>
|
|
136
|
-
|
|
137
|
-
## Typy tlačidiel
|
|
138
|
-
|
|
139
|
-
### Štandardné tlačidlo (button)
|
|
140
|
-
|
|
141
|
-
Štandardný typ pre akcie, ktoré neovplyvňujú formulár.
|
|
142
|
-
|
|
143
|
-
<Preview>
|
|
144
|
-
<Controls icon="close" onClick={() => alert("Tlačidlo bolo kliknuté")} />
|
|
145
|
-
</Preview>
|
|
146
|
-
|
|
147
|
-
### Submit tlačidlo
|
|
148
|
-
|
|
149
|
-
Pre odoslanie formulárov.
|
|
150
|
-
|
|
151
|
-
<Preview>
|
|
152
|
-
<form
|
|
153
|
-
onSubmit={(e) => {
|
|
154
|
-
e.preventDefault();
|
|
155
|
-
alert("Formulár odoslaný");
|
|
156
|
-
}}
|
|
157
|
-
>
|
|
158
|
-
<Controls icon="check" type="submit" />
|
|
159
|
-
</form>
|
|
160
|
-
</Preview>
|
|
161
|
-
|
|
162
|
-
### Reset tlačidlo
|
|
163
|
-
|
|
164
|
-
Pre resetovanie formulárov.
|
|
165
|
-
|
|
166
|
-
<Preview>
|
|
167
|
-
<form onReset={() => alert("Formulár resetovaný")}>
|
|
168
|
-
<Controls icon="refresh" type="reset" />
|
|
169
|
-
</form>
|
|
170
|
-
</Preview>
|
|
171
|
-
|
|
172
|
-
## Use Cases
|
|
173
|
-
|
|
174
|
-
### 1. Zatváranie modálnych okien
|
|
175
|
-
|
|
176
|
-
Najčastejšie použitie pre zatváranie dialogov a modálnych okien.
|
|
177
|
-
|
|
178
|
-
```jsx
|
|
179
|
-
<Controls
|
|
180
|
-
icon="close"
|
|
181
|
-
onClick={handleCloseModal}
|
|
182
|
-
aria-label="Zatvoriť dialog"
|
|
183
|
-
/>
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
### 2. Navigačné menu
|
|
187
|
-
|
|
188
|
-
Pre otváranie a zatváranie navigačných menu.
|
|
189
|
-
|
|
190
|
-
```jsx
|
|
191
|
-
<Controls
|
|
192
|
-
icon="menu"
|
|
193
|
-
onClick={toggleNavigation}
|
|
194
|
-
aria-label="Otvoriť navigáciu"
|
|
195
|
-
aria-expanded={isNavigationOpen}
|
|
196
|
-
/>
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### 3. Vyhľadávanie
|
|
200
|
-
|
|
201
|
-
Pre spúšťanie vyhľadávania.
|
|
202
|
-
|
|
203
|
-
```jsx
|
|
204
|
-
<Controls icon="search" onClick={openSearch} aria-label="Vyhľadať" />
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
### 4. Rozbaľovanie/zabaľovanie obsahu
|
|
208
|
-
|
|
209
|
-
Pre accordion komponenty a podobné interakcie.
|
|
210
|
-
|
|
211
|
-
```jsx
|
|
212
|
-
<Controls
|
|
213
|
-
icon={isExpanded ? "chevron-up" : "chevron-down"}
|
|
214
|
-
onClick={toggleExpansion}
|
|
215
|
-
aria-expanded={isExpanded}
|
|
216
|
-
aria-controls="content-section"
|
|
217
|
-
/>
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
### 5. Formulárové akcie
|
|
221
|
-
|
|
222
|
-
Pre odoslanie a resetovanie formulárov.
|
|
223
|
-
|
|
224
|
-
```jsx
|
|
225
|
-
<Controls icon="check" type="submit" aria-label="Uložiť zmeny" />
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
### 6. Filtrovanie a triedenie
|
|
229
|
-
|
|
230
|
-
Pre ovládanie filtrov a triedenia.
|
|
231
|
-
|
|
232
|
-
```jsx
|
|
233
|
-
<Controls icon="filter" onClick={openFilters} aria-label="Filtrovať výsledky" />
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
### 7. Aktualizácia obsahu
|
|
237
|
-
|
|
238
|
-
Pre refresh a aktualizáciu dát.
|
|
239
|
-
|
|
240
|
-
```jsx
|
|
241
|
-
<Controls icon="refresh" onClick={refreshData} aria-label="Aktualizovať" />
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
### 8. Súborové operácie
|
|
245
|
-
|
|
246
|
-
Pre upload a download súborov.
|
|
247
|
-
|
|
248
|
-
```jsx
|
|
249
|
-
<Controls icon="download" onClick={downloadFile} aria-label="Stiahnuť súbor" />
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
### 9. Užívateľské akcie
|
|
253
|
-
|
|
254
|
-
Pre správu užívateľských účtov a nastavení.
|
|
255
|
-
|
|
256
|
-
```jsx
|
|
257
|
-
<Controls icon="settings" onClick={openSettings} aria-label="Nastavenia" />
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
### 10. Pomoc a informácie
|
|
261
|
-
|
|
262
|
-
Pre zobrazenie pomoci a informácií.
|
|
263
|
-
|
|
264
|
-
```jsx
|
|
265
|
-
<Controls icon="help" onClick={showHelp} aria-label="Zobraziť pomoc" />
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
## Prístupnosť (Accessibility)
|
|
269
|
-
|
|
270
|
-
### ARIA atribúty
|
|
271
|
-
|
|
272
|
-
Controls komponent podporuje všetky štandardné ARIA atribúty pre tlačidlá:
|
|
273
|
-
|
|
274
|
-
- `aria-label` - pre popis akcie
|
|
275
|
-
- `aria-describedby` - pre dodatočný popis
|
|
276
|
-
- `aria-expanded` - pre rozbaľovacie/zabaľovacie stavy
|
|
277
|
-
- `aria-pressed` - pre toggle stavy
|
|
278
|
-
- `aria-controls` - pre ovládanie iných elementov
|
|
279
|
-
|
|
280
|
-
### Klávesnicová navigácia
|
|
281
|
-
|
|
282
|
-
Komponent podporuje štandardnú klávesnicovú navigáciu:
|
|
283
|
-
|
|
284
|
-
- **Tab** - pre navigáciu medzi elementmi
|
|
285
|
-
- **Enter** - pre aktiváciu tlačidla
|
|
286
|
-
- **Space** - pre aktiváciu tlačidla
|
|
287
|
-
- **Escape** - pre zatvorenie (ak je implementované)
|
|
288
|
-
|
|
289
|
-
### Screen reader podpora
|
|
290
|
-
|
|
291
|
-
Komponent je plne kompatibilný so screen reader technológiami a poskytuje správne informácie o svojom stave a účele.
|
|
292
|
-
|
|
293
|
-
## Štýlovanie
|
|
294
|
-
|
|
295
|
-
### Základné CSS triedy
|
|
296
|
-
|
|
297
|
-
- `.controls` - základná trieda komponentu
|
|
298
|
-
- `.controls--inverse` - inverzný variant
|
|
299
|
-
|
|
300
|
-
### Vlastné štýly
|
|
301
|
-
|
|
302
|
-
Môžete pridať vlastné CSS triedy cez `className` prop:
|
|
303
|
-
|
|
304
|
-
```jsx
|
|
305
|
-
<Controls icon="close" className="custom-controls my-theme-controls" />
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
### Responzívne správanie
|
|
309
|
-
|
|
310
|
-
Komponent sa automaticky prispôsobuje rôznym veľkostiam obrazovky a zachováva konzistentný vzhľad.
|
|
311
|
-
|
|
312
|
-
## Technické detaily
|
|
313
|
-
|
|
314
|
-
### Rozmery
|
|
315
|
-
|
|
316
|
-
- **Šírka**: 40px (2.5rem)
|
|
317
|
-
- **Výška**: 40px (2.5rem)
|
|
318
|
-
- **Border radius**: 22px (1.375rem)
|
|
319
|
-
|
|
320
|
-
### Transitions
|
|
321
|
-
|
|
322
|
-
- **Dĺžka**: 200ms
|
|
323
|
-
- **Timing function**: ease-in-out
|
|
324
|
-
- **Vlastnosti**: border-color, background-color, color, outline-color
|
|
325
|
-
|
|
326
|
-
### Farbové schémy
|
|
327
|
-
|
|
328
|
-
Komponent podporuje svetlé a tmavé farebné schémy s automatickým prepínaním na základe `isInverse` prop.
|
|
329
|
-
|
|
330
|
-
## Best Practices
|
|
331
|
-
|
|
332
|
-
### 1. Vždy používajte aria-label
|
|
333
|
-
|
|
334
|
-
Pre lepšiu prístupnosť vždy pridajte popisný `aria-label`:
|
|
335
|
-
|
|
336
|
-
```jsx
|
|
337
|
-
// ✅ Správne
|
|
338
|
-
<Controls icon="close" aria-label="Zatvoriť dialog" />
|
|
339
|
-
|
|
340
|
-
// ❌ Nesprávne
|
|
341
|
-
<Controls icon="close" />
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
### 2. Používajte správne ikony
|
|
345
|
-
|
|
346
|
-
Vyberajte ikony, ktoré jasne komunikujú účel tlačidla:
|
|
347
|
-
|
|
348
|
-
```jsx
|
|
349
|
-
// ✅ Správne - jasný účel
|
|
350
|
-
<Controls icon="close" aria-label="Zatvoriť" />
|
|
351
|
-
<Controls icon="check" aria-label="Potvrdiť" />
|
|
352
|
-
|
|
353
|
-
// ❌ Nesprávne - nejasný účel
|
|
354
|
-
<Controls icon="circle" aria-label="Zatvoriť" />
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
### 3. Kombinujte stavy správne
|
|
358
|
-
|
|
359
|
-
Pri kombinovaní rôznych stavov myslite na užívateľskú skúsenosť:
|
|
360
|
-
|
|
361
|
-
```jsx
|
|
362
|
-
// ✅ Správne - zakázané tlačidlo má správne ARIA atribúty
|
|
363
|
-
<Controls
|
|
364
|
-
icon="close"
|
|
365
|
-
disabled
|
|
366
|
-
aria-label="Zatvoriť (nie je dostupné)"
|
|
367
|
-
/>
|
|
368
|
-
|
|
369
|
-
// ✅ Správne - toggle tlačidlo má správne ARIA atribúty
|
|
370
|
-
<Controls
|
|
371
|
-
icon={isOpen ? "chevron-up" : "chevron-down"}
|
|
372
|
-
aria-expanded={isOpen}
|
|
373
|
-
aria-label={isOpen ? "Zabaľovať" : "Rozbaľovať"}
|
|
374
|
-
/>
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
### 4. Testujte klávesnicovú navigáciu
|
|
378
|
-
|
|
379
|
-
Vždy otestujte, či komponent funguje správne s klávesnicou:
|
|
380
|
-
|
|
381
|
-
```jsx
|
|
382
|
-
// Testujte Tab, Enter, Space klávesy
|
|
383
|
-
<Controls
|
|
384
|
-
icon="close"
|
|
385
|
-
onKeyDown={(e) => {
|
|
386
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
387
|
-
handleClose();
|
|
388
|
-
}
|
|
389
|
-
}}
|
|
390
|
-
/>
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
## Props
|
|
394
|
-
|
|
395
|
-
<ComponentDocs title="<Controls />" component={Controls} />
|
|
396
|
-
|
|
397
|
-
### Props
|
|
398
|
-
|
|
399
|
-
- `icon` (string) – názov ikony
|
|
400
|
-
- `colorScheme` ("dark" | "light") – farebná schéma komponentu
|
|
401
|
-
- `isDisabled` (boolean) – zakázaný stav
|
|
402
|
-
- `className` (string) – vlastné CSS triedy
|
|
403
|
-
- všetky štandardné button HTML atribúty
|
|
404
|
-
|
|
405
|
-
## Príklady použitia
|
|
406
|
-
|
|
407
|
-
### Základný príklad
|
|
408
|
-
|
|
409
|
-
```jsx
|
|
410
|
-
import { Controls } from "./Controls";
|
|
411
|
-
|
|
412
|
-
function MyComponent() {
|
|
413
|
-
const handleClose = () => {
|
|
414
|
-
console.log("Tlačidlo bolo kliknuté");
|
|
415
|
-
};
|
|
416
|
-
|
|
417
|
-
return <Controls icon="close" onClick={handleClose} aria-label="Zatvoriť" />;
|
|
418
|
-
}
|
|
419
|
-
```
|
|
420
|
-
|
|
421
|
-
### S tmavým variantom
|
|
422
|
-
|
|
423
|
-
```jsx
|
|
424
|
-
function DarkThemeComponent() {
|
|
425
|
-
return (
|
|
426
|
-
<div style={{ backgroundColor: "#333", padding: "1rem" }}>
|
|
427
|
-
<Controls icon="menu" colorScheme="dark" aria-label="Otvoriť menu" />
|
|
428
|
-
</div>
|
|
429
|
-
);
|
|
430
|
-
}
|
|
431
|
-
```
|
|
432
|
-
|
|
433
|
-
### V formulári
|
|
434
|
-
|
|
435
|
-
```jsx
|
|
436
|
-
function MyForm() {
|
|
437
|
-
const handleSubmit = (e) => {
|
|
438
|
-
e.preventDefault();
|
|
439
|
-
// Spracovanie formulára
|
|
440
|
-
};
|
|
441
|
-
|
|
442
|
-
return (
|
|
443
|
-
<form onSubmit={handleSubmit}>
|
|
444
|
-
<input type="text" placeholder="Zadajte text" />
|
|
445
|
-
<Controls icon="check" type="submit" aria-label="Uložiť" />
|
|
446
|
-
</form>
|
|
447
|
-
);
|
|
448
|
-
}
|
|
449
|
-
```
|
|
450
|
-
|
|
451
|
-
### Toggle príklad
|
|
452
|
-
|
|
453
|
-
```jsx
|
|
454
|
-
function ToggleExample() {
|
|
455
|
-
const [isExpanded, setIsExpanded] = useState(false);
|
|
456
|
-
|
|
457
|
-
return (
|
|
458
|
-
<div>
|
|
459
|
-
<Controls
|
|
460
|
-
icon={isExpanded ? "chevron-up" : "chevron-down"}
|
|
461
|
-
onClick={() => setIsExpanded(!isExpanded)}
|
|
462
|
-
aria-expanded={isExpanded}
|
|
463
|
-
aria-label={isExpanded ? "Zabaľovať" : "Rozbaľovať"}
|
|
464
|
-
/>
|
|
465
|
-
{isExpanded && <div>Rozbaľovaný obsah</div>}
|
|
466
|
-
</div>
|
|
467
|
-
);
|
|
468
|
-
}
|
|
469
|
-
```
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { ComponentDocs } from '@lighting-beetle/lighter-styleguide';
|
|
2
|
-
import { Preview } from '../../styleguide/';
|
|
3
|
-
import Cover from './Cover';
|
|
4
|
-
|
|
5
|
-
# Cover
|
|
6
|
-
|
|
7
|
-
Image overlaid with content.
|
|
8
|
-
|
|
9
|
-
<Preview>
|
|
10
|
-
<Cover bgSrc="https://placehold.co/800x300">
|
|
11
|
-
<h2>Heading</h2>
|
|
12
|
-
</Cover>
|
|
13
|
-
</Preview>
|
|
14
|
-
|
|
15
|
-
## Responsive srcset
|
|
16
|
-
|
|
17
|
-
You can image sources by breakpoints. This is a best practice for designing for
|
|
18
|
-
mobile devices. Making sure small devices get small images. We don't want to
|
|
19
|
-
use more bandwidth if not necessary
|
|
20
|
-
|
|
21
|
-
<Preview>
|
|
22
|
-
<Cover
|
|
23
|
-
bgSrc={{
|
|
24
|
-
default: 'https://placehold.co/800x300',
|
|
25
|
-
lg: 'https://placehold.co/2560x1000',
|
|
26
|
-
md: 'https://placehold.co/1200x500',
|
|
27
|
-
}}
|
|
28
|
-
>
|
|
29
|
-
<h2>Heading</h2>
|
|
30
|
-
</Cover>
|
|
31
|
-
</Preview>
|
|
32
|
-
|
|
33
|
-
## Sizes
|
|
34
|
-
|
|
35
|
-
We have 3 different sizes of overlay. You can choose which one fits your usecase best.
|
|
36
|
-
|
|
37
|
-
<Preview>
|
|
38
|
-
<Cover size="small" bgSrc="https://placehold.co/800x300">
|
|
39
|
-
<h2>Small</h2>
|
|
40
|
-
</Cover>
|
|
41
|
-
<hr />
|
|
42
|
-
<Cover size="medium" bgSrc="https://placehold.co/800x300">
|
|
43
|
-
<h2>Medium</h2>
|
|
44
|
-
</Cover>
|
|
45
|
-
<hr />
|
|
46
|
-
<Cover size="large" bgSrc="https://placehold.co/800x300">
|
|
47
|
-
<h2>Large</h2>
|
|
48
|
-
</Cover>
|
|
49
|
-
<hr />
|
|
50
|
-
<Cover
|
|
51
|
-
size="small"
|
|
52
|
-
bgSrc="https://placehold.co/800x300?text=800x300+small+without+content"
|
|
53
|
-
/>
|
|
54
|
-
<hr />
|
|
55
|
-
<Cover
|
|
56
|
-
size="medium"
|
|
57
|
-
bgSrc="https://placehold.co/800x300?text=800x300+medium+without+content"
|
|
58
|
-
/>
|
|
59
|
-
<hr />
|
|
60
|
-
<Cover
|
|
61
|
-
size="large"
|
|
62
|
-
bgSrc="https://placehold.co/800x300?text=800x300+large+without+content"
|
|
63
|
-
/>
|
|
64
|
-
</Preview>
|
|
65
|
-
|
|
66
|
-
## Background position
|
|
67
|
-
|
|
68
|
-
If you need specific area of the background image to be always visible you can
|
|
69
|
-
"stick it" to that position.
|
|
70
|
-
|
|
71
|
-
<Preview>
|
|
72
|
-
<Cover size="small" bgSrc="https://placehold.co/800x300">
|
|
73
|
-
<h2>Center (default)</h2>
|
|
74
|
-
</Cover>
|
|
75
|
-
<hr />
|
|
76
|
-
<Cover size="small" bgPosition="top" bgSrc="https://placehold.co/800x300">
|
|
77
|
-
<h2>Top</h2>
|
|
78
|
-
</Cover>
|
|
79
|
-
<hr />
|
|
80
|
-
<Cover size="small" bgPosition="bottom" bgSrc="https://placehold.co/800x300">
|
|
81
|
-
<h2>Bottom</h2>
|
|
82
|
-
</Cover>
|
|
83
|
-
</Preview>
|
|
84
|
-
|
|
85
|
-
## Props
|
|
86
|
-
|
|
87
|
-
<ComponentDocs title="<Cover />" component={Cover} />
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { ComponentDocs } from "@lighting-beetle/lighter-styleguide";
|
|
2
|
-
|
|
3
|
-
import { Preview } from "../../styleguide/";
|
|
4
|
-
|
|
5
|
-
import Card, { CardHeader, CardSection } from "../Card";
|
|
6
|
-
import { headerColors } from "../Card/CardHeader";
|
|
7
|
-
import Divider from "../Divider";
|
|
8
|
-
import Button from "../Button";
|
|
9
|
-
import { Image } from "../Image";
|
|
10
|
-
import Grid, { GridCol } from "../Grid";
|
|
11
|
-
|
|
12
|
-
# Divider
|
|
13
|
-
|
|
14
|
-
Divider serves as an option for horizontal division of spaces/elements/contents.
|
|
15
|
-
|
|
16
|
-
## Example
|
|
17
|
-
|
|
18
|
-
<Preview>
|
|
19
|
-
<Divider />
|
|
20
|
-
</Preview>
|
|
21
|
-
|
|
22
|
-
## Width
|
|
23
|
-
|
|
24
|
-
Width of the divider line can be reduced to 1 pixel using `.divider__line--thin` class.
|
|
25
|
-
|
|
26
|
-
<Preview>
|
|
27
|
-
<Divider />
|
|
28
|
-
<Divider thinLine />
|
|
29
|
-
</Preview>
|
|
30
|
-
|
|
31
|
-
## Content
|
|
32
|
-
|
|
33
|
-
Divider can hold different contents if you need to visualise separation with
|
|
34
|
-
something like a word or icon, you can do it here.
|
|
35
|
-
|
|
36
|
-
<Preview>
|
|
37
|
-
<Divider />
|
|
38
|
-
<Divider icon="add" />
|
|
39
|
-
<Divider content={<strong>custom text</strong>} />
|
|
40
|
-
</Preview>
|
|
41
|
-
|
|
42
|
-
## Color
|
|
43
|
-
|
|
44
|
-
If you need to use divider on **non-white backgrounds** use
|
|
45
|
-
`.divider--black` or `.divider--white` class
|
|
46
|
-
|
|
47
|
-
Default color is gray and it's used on white backgrounds only
|
|
48
|
-
|
|
49
|
-
<Preview>
|
|
50
|
-
<Divider />
|
|
51
|
-
<Divider icon="add" />
|
|
52
|
-
<Divider content={<strong>custom text</strong>} />
|
|
53
|
-
<div className="bg-black">
|
|
54
|
-
<Divider color="white" />
|
|
55
|
-
<Divider color="white" icon="add" />
|
|
56
|
-
<Divider color="white" content={<strong>custom text</strong>} />
|
|
57
|
-
</div>
|
|
58
|
-
<Divider color="black" />
|
|
59
|
-
<Divider color="black" icon="add" />
|
|
60
|
-
<Divider color="black" content={<strong>custom text</strong>} />
|
|
61
|
-
</Preview>
|
|
62
|
-
|
|
63
|
-
## Props
|
|
64
|
-
|
|
65
|
-
<ComponentDocs title="<Divider />" component={Divider} />
|