@orangesk/orange-design-system 2.0.0-alpha.0 → 2.0.0-alpha.1
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/404.html +1 -1
- package/build/_next/static/CRhIjUFtohDOfdDfzvfXM/_buildManifest.js +1 -0
- package/build/_next/static/chunks/925.75d0c8afa7ab7cfa.js +1 -0
- package/build/_next/static/chunks/998-a45c3cf6f575e126.js +1 -0
- package/build/_next/static/chunks/app/components/alert/page-d591b03a7394f81e.js +1 -0
- package/build/_next/static/chunks/app/components/button/page-b922a8f5114b0a69.js +1 -0
- package/build/_next/static/chunks/app/components/buttons/page-0a5bf7e5ac7991fb.js +1 -0
- package/build/_next/static/chunks/app/components/icon/page-dac6ba29b85d924d.js +1 -0
- package/build/_next/static/chunks/app/components/modal/page-4a249b6d271eea91.js +1 -0
- package/build/_next/static/chunks/app/components/tabs/page-7d82e8eafd25b86e.js +1 -0
- package/build/_next/static/chunks/app/layout-f74d44a2772d8d63.js +1 -0
- package/build/_next/static/chunks/app/page-9efa16a51ef59461.js +1 -0
- package/build/_next/static/chunks/webpack-623f6e616651e1c0.js +1 -0
- package/build/_next/static/css/14f3a3e0186fb7a8.css +3 -0
- package/build/_next/static/css/168dd2b7e791cf72.css +1 -0
- package/build/_next/static/css/28a41a1d7dcdbfd9.css +1 -0
- package/build/_next/static/css/291602d64f1f3570.css +1 -0
- package/build/_next/static/css/4c4366b3963177f0.css +1 -0
- package/build/_next/static/css/5481aeac9adca710.css +1 -0
- package/build/_next/static/css/73b136688c14b891.css +1 -0
- package/build/_next/static/css/91c8cf755bf9ff19.css +1 -0
- package/build/_next/static/css/c1b0424033f305ff.css +1 -0
- package/build/_next/static/css/eea9fd9ccdd56c76.css +1 -0
- package/build/_next/static/media/671791babd225be4-s.p.woff2 +0 -0
- package/build/_next/static/media/c62d990acddde5f0-s.p.woff2 +0 -0
- package/build/_next/static/media/dfdbb1c4973e0bd7-s.p.woff2 +0 -0
- package/build/components/Accordion/index.js +1170 -0
- package/build/components/Accordion/index.js.map +1 -0
- package/build/components/Accordion/style.css +2 -0
- package/build/components/Accordion/style.css.map +1 -0
- package/build/components/Alert/index.js +1920 -0
- package/build/components/Alert/index.js.map +1 -0
- package/build/components/Alert/style.css +2 -0
- package/build/components/Alert/style.css.map +1 -0
- package/build/components/Badge/index.js +6 -3
- package/build/components/Badge/index.js.map +1 -1
- package/build/components/Badge/style.css +1 -1
- package/build/components/Badge/style.css.map +1 -1
- package/build/components/Breadcrumbs/index.js +687 -0
- package/build/components/Breadcrumbs/index.js.map +1 -0
- package/build/components/Breadcrumbs/style.css +2 -0
- package/build/components/Breadcrumbs/style.css.map +1 -0
- package/build/components/Button/index.js +734 -0
- package/build/components/Button/index.js.map +1 -0
- package/build/components/Button/style.css +2 -0
- package/build/components/Button/style.css.map +1 -0
- package/build/components/Buttons/index.js +614 -0
- package/build/components/Buttons/index.js.map +1 -0
- package/build/components/Buttons/style.css +2 -0
- package/build/components/Buttons/style.css.map +1 -0
- package/build/components/Container/index.js +611 -0
- package/build/components/Container/index.js.map +1 -0
- package/build/components/Container/style.css +2 -0
- package/build/components/Container/style.css.map +1 -0
- package/build/components/Grid/index.js +1082 -0
- package/build/components/Grid/index.js.map +1 -0
- package/build/components/Grid/style.css +2 -0
- package/build/components/Grid/style.css.map +1 -0
- package/build/components/Icon/index.js +628 -0
- package/build/components/Icon/index.js.map +1 -0
- package/build/components/Icon/style.css +2 -0
- package/build/components/Icon/style.css.map +1 -0
- package/build/components/Image/index.js +659 -0
- package/build/components/Image/index.js.map +1 -0
- package/build/components/Image/style.css +2 -0
- package/build/components/Image/style.css.map +1 -0
- package/build/components/Link/index.js +173 -0
- package/build/components/Link/index.js.map +1 -0
- package/build/components/Link/style.css +2 -0
- package/build/components/Link/style.css.map +1 -0
- package/build/components/Modal/index.js +3170 -0
- package/build/components/Modal/index.js.map +1 -0
- package/build/components/Modal/style.css +2 -0
- package/build/components/Modal/style.css.map +1 -0
- package/build/components/Section/index.js +632 -0
- package/build/components/Section/index.js.map +1 -0
- package/build/components/Section/style.css +2 -0
- package/build/components/Section/style.css.map +1 -0
- package/build/components/Tabs/index.js +1056 -0
- package/build/components/Tabs/index.js.map +1 -0
- package/build/components/Tabs/style.css +2 -0
- package/build/components/Tabs/style.css.map +1 -0
- package/build/components/alert.html +2 -0
- package/build/components/alert.txt +30 -0
- package/build/components/badge.html +4 -1
- package/build/components/badge.txt +23 -18
- package/build/components/button.html +2 -0
- package/build/components/button.txt +27 -0
- package/build/components/buttons.html +1 -0
- package/build/components/buttons.txt +27 -0
- package/build/components/icon.html +1 -0
- package/build/components/icon.txt +23 -0
- package/build/components/index.css +1 -1
- package/build/components/index.css.map +1 -1
- package/build/components/index.js +3079 -17
- package/build/components/index.js.map +1 -1
- package/build/components/modal.html +1 -0
- package/build/components/modal.txt +29 -0
- package/build/components/static.js +1261 -17
- package/build/components/static.js.map +1 -1
- package/build/components/tabs.html +1 -0
- package/build/components/tabs.txt +27 -0
- package/build/components/types/components/Alert/Alert.d.ts +25 -0
- package/build/components/types/components/Alert/data.d.ts +7 -0
- package/build/components/types/components/Alert/index.d.ts +2 -0
- package/build/components/types/{Badge → components/Badge}/Badge.d.ts +2 -2
- package/build/components/types/components/Badge/index.d.ts +2 -0
- package/build/components/types/components/Button/Button.d.ts +25 -0
- package/build/components/types/components/Button/IconButton.d.ts +18 -0
- package/build/components/types/components/Button/index.d.ts +17 -0
- package/build/components/types/components/Buttons/Buttons.d.ts +8 -0
- package/build/components/types/components/Buttons/index.d.ts +2 -0
- package/build/components/types/components/Container/Container.d.ts +6 -0
- package/build/components/types/components/Container/index.d.ts +3 -0
- package/build/components/types/components/Icon/Icon.d.ts +18 -0
- package/build/components/types/components/Icon/SpritePathContext.d.ts +8 -0
- package/build/components/types/components/Icon/index.d.ts +3 -0
- package/build/components/types/components/Modal/Modal.d.ts +33 -0
- package/build/components/types/components/Modal/Modal.static.d.ts +33 -0
- package/build/components/types/components/Modal/ModalBody.d.ts +10 -0
- package/build/components/types/components/Modal/ModalCloseButton.d.ts +8 -0
- package/build/components/types/components/Modal/ModalTitle.d.ts +9 -0
- package/build/components/types/components/Modal/index.d.ts +5 -0
- package/build/components/types/components/Section/Section.d.ts +23 -0
- package/build/components/types/components/Section/index.d.ts +2 -0
- package/build/components/types/components/Tabs/Tab.d.ts +13 -0
- package/build/components/types/components/Tabs/TabPanel.d.ts +14 -0
- package/build/components/types/components/Tabs/Tabs.d.ts +33 -0
- package/build/components/types/components/Tabs/Tabs.static.d.ts +28 -0
- package/build/components/types/components/Tabs/index.d.ts +4 -0
- package/build/components/types/components/index.d.ts +11 -0
- package/build/components/types/utils/ConditionalWrapper.d.ts +13 -0
- package/build/components/types/utils/constants.d.ts +18 -0
- package/build/components/types/utils/generateId.d.ts +6 -0
- package/build/components/types/utils/hooks.d.ts +29 -0
- package/build/components/types/utils/keyboard.d.ts +14 -0
- package/build/fonts/HelveticaNeue-Bold.woff2 +0 -0
- package/build/fonts/HelveticaNeue-Light.woff2 +0 -0
- package/build/fonts/HelveticaNeue-Roman.woff2 +0 -0
- package/build/index.html +11 -46
- package/build/index.txt +22 -17
- 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/fonts.css +1 -1
- package/build/lib/fonts.css.map +1 -1
- package/build/lib/scripts.js +1261 -17
- 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/sprite.svg +1 -0
- package/package.json +8 -4
- package/public/fonts/HelveticaNeue-Bold.woff2 +0 -0
- package/public/fonts/HelveticaNeue-Light.woff2 +0 -0
- package/public/fonts/HelveticaNeue-Roman.woff2 +0 -0
- package/src/assets/icons/4g.svg +1 -0
- package/src/assets/icons/5g.svg +1 -0
- package/src/assets/icons/accessibility-mobility.svg +1 -0
- package/src/assets/icons/accessibility-motor.svg +1 -0
- package/src/assets/icons/accessibility-vision.svg +1 -0
- package/src/assets/icons/accessibility.svg +1 -0
- package/src/assets/icons/add.svg +1 -0
- package/src/assets/icons/advertising.svg +1 -0
- package/src/assets/icons/aeroplane.svg +1 -0
- package/src/assets/icons/age-rating-3.svg +1 -0
- package/src/assets/icons/airbox-auto.svg +1 -0
- package/src/assets/icons/alias-numbers.svg +1 -0
- package/src/assets/icons/android-manage.svg +1 -0
- package/src/assets/icons/antenna.svg +1 -0
- package/src/assets/icons/apartment-building.svg +1 -0
- package/src/assets/icons/apps.svg +1 -0
- package/src/assets/icons/assistance.svg +1 -0
- package/src/assets/icons/assistent.svg +1 -0
- package/src/assets/icons/at.svg +1 -0
- package/src/assets/icons/avatar.svg +1 -0
- package/src/assets/icons/backup-internet.svg +1 -0
- package/src/assets/icons/bank.svg +1 -0
- package/src/assets/icons/battery-charging.svg +1 -0
- package/src/assets/icons/battery-full.svg +1 -0
- package/src/assets/icons/battery-status-1-3.svg +1 -0
- package/src/assets/icons/battery-status-charging.svg +1 -0
- package/src/assets/icons/battery-status-full.svg +1 -0
- package/src/assets/icons/bed.svg +1 -0
- package/src/assets/icons/birth.svg +1 -0
- package/src/assets/icons/birthday.svg +1 -0
- package/src/assets/icons/bluetooth.svg +1 -0
- package/src/assets/icons/boarding-pass.svg +1 -0
- package/src/assets/icons/book-award.svg +1 -0
- package/src/assets/icons/book.svg +1 -0
- package/src/assets/icons/boxes.svg +1 -0
- package/src/assets/icons/briefcase.svg +1 -0
- package/src/assets/icons/browser-plug-in.svg +1 -0
- package/src/assets/icons/business-advisor.svg +1 -0
- package/src/assets/icons/business-consultant.svg +1 -0
- package/src/assets/icons/business-lounge.svg +1 -0
- package/src/assets/icons/buy.svg +1 -0
- package/src/assets/icons/calendar-30.svg +1 -0
- package/src/assets/icons/calendar-alarm.svg +1 -0
- package/src/assets/icons/calendar-day.svg +1 -0
- package/src/assets/icons/calendar-month.svg +1 -0
- package/src/assets/icons/call-in.svg +1 -0
- package/src/assets/icons/call-out.svg +1 -0
- package/src/assets/icons/call.svg +1 -0
- package/src/assets/icons/camera.svg +1 -0
- package/src/assets/icons/car-park.svg +1 -0
- package/src/assets/icons/car.svg +1 -0
- package/src/assets/icons/card-reader.svg +1 -0
- package/src/assets/icons/casting.svg +1 -0
- package/src/assets/icons/cest-ici.svg +1 -0
- package/src/assets/icons/charger.svg +1 -0
- package/src/assets/icons/chatbot.svg +1 -0
- package/src/assets/icons/check-your-balance.svg +1 -0
- package/src/assets/icons/checked.svg +1 -0
- package/src/assets/icons/chevron-down.svg +1 -0
- package/src/assets/icons/chevron-end.svg +1 -0
- package/src/assets/icons/chevron-left.svg +1 -0
- package/src/assets/icons/chevron-right.svg +1 -0
- package/src/assets/icons/chevron-start.svg +1 -0
- package/src/assets/icons/chevron-up.svg +1 -0
- package/src/assets/icons/child.svg +1 -0
- package/src/assets/icons/children-channel.svg +1 -0
- package/src/assets/icons/childrens-content.svg +1 -0
- package/src/assets/icons/christmas-tree.svg +1 -0
- package/src/assets/icons/cinema-ticket-2-for-1.svg +1 -0
- package/src/assets/icons/cle-pc.svg +1 -0
- package/src/assets/icons/clock.svg +1 -0
- package/src/assets/icons/close.svg +5 -0
- package/src/assets/icons/closed-captions.svg +1 -0
- package/src/assets/icons/cloud-backup.svg +1 -0
- package/src/assets/icons/cloud-security.svg +1 -0
- package/src/assets/icons/collective-class-training.svg +1 -0
- package/src/assets/icons/community-sms.svg +1 -0
- package/src/assets/icons/company-structure.svg +1 -0
- package/src/assets/icons/connections.svg +1 -0
- package/src/assets/icons/control-centre.svg +1 -0
- package/src/assets/icons/control-my-data.svg +3 -0
- package/src/assets/icons/cpu.svg +1 -0
- package/src/assets/icons/currency-euro.svg +1 -0
- package/src/assets/icons/cyber-shield.svg +1 -0
- package/src/assets/icons/dashboard-display.svg +1 -0
- package/src/assets/icons/data-analytics.svg +1 -0
- package/src/assets/icons/data-centre.svg +1 -0
- package/src/assets/icons/data-services.svg +1 -0
- package/src/assets/icons/data-traffic.svg +1 -0
- package/src/assets/icons/data.svg +1 -0
- package/src/assets/icons/delete.svg +1 -0
- package/src/assets/icons/desk-phone.svg +1 -0
- package/src/assets/icons/desktop-pc.svg +1 -0
- package/src/assets/icons/device-fixed-line-phone.svg +1 -0
- package/src/assets/icons/device-laptop-computer-connected.svg +1 -0
- package/src/assets/icons/device-laptop-computer.svg +1 -0
- package/src/assets/icons/device-smart-phone.svg +1 -0
- package/src/assets/icons/device-tablet.svg +1 -0
- package/src/assets/icons/device-tv.svg +1 -0
- package/src/assets/icons/diagnostic.svg +1 -0
- package/src/assets/icons/digital-frame.svg +1 -0
- package/src/assets/icons/discussion-more.svg +1 -0
- package/src/assets/icons/doctor.svg +1 -0
- package/src/assets/icons/documentary.svg +1 -0
- package/src/assets/icons/donation.svg +1 -0
- package/src/assets/icons/download-file.svg +1 -0
- package/src/assets/icons/download.svg +1 -0
- package/src/assets/icons/e-reader.svg +1 -0
- package/src/assets/icons/e-shop.svg +1 -0
- package/src/assets/icons/easy-internet.svg +1 -0
- package/src/assets/icons/eco-mode.svg +1 -0
- package/src/assets/icons/edit.svg +1 -0
- package/src/assets/icons/electrcar.svg +1 -0
- package/src/assets/icons/email.svg +1 -0
- package/src/assets/icons/employees.svg +1 -0
- package/src/assets/icons/empty-trash.svg +1 -0
- package/src/assets/icons/entertainment.svg +1 -0
- package/src/assets/icons/epg.svg +1 -0
- package/src/assets/icons/error-severe.svg +1 -0
- package/src/assets/icons/ethernet.svg +1 -0
- package/src/assets/icons/euro.svg +1 -0
- package/src/assets/icons/exit.svg +1 -0
- package/src/assets/icons/facebook-2.svg +1 -0
- package/src/assets/icons/facebook.svg +1 -0
- package/src/assets/icons/factory.svg +1 -0
- package/src/assets/icons/family-place.svg +1 -0
- package/src/assets/icons/fashion.svg +1 -0
- package/src/assets/icons/fast-delivery.svg +1 -0
- package/src/assets/icons/file-compressed.svg +1 -0
- package/src/assets/icons/file-copy.svg +1 -0
- package/src/assets/icons/file-document-compose.svg +1 -0
- package/src/assets/icons/file-download.svg +1 -0
- package/src/assets/icons/file-draft-edit.svg +1 -0
- package/src/assets/icons/file-pdf.svg +1 -0
- package/src/assets/icons/file-terms-and-conditions.svg +1 -0
- package/src/assets/icons/files.svg +1 -0
- package/src/assets/icons/film.svg +1 -0
- package/src/assets/icons/filter.svg +1 -0
- package/src/assets/icons/finance.svg +1 -0
- package/src/assets/icons/firewall.svg +1 -0
- package/src/assets/icons/flag.svg +1 -0
- package/src/assets/icons/flashlight.svg +1 -0
- package/src/assets/icons/flexible-storage.svg +1 -0
- package/src/assets/icons/folder.svg +1 -0
- package/src/assets/icons/football-match.svg +1 -0
- package/src/assets/icons/football-quiz.svg +1 -0
- package/src/assets/icons/football.svg +1 -0
- package/src/assets/icons/form-tick.svg +1 -0
- package/src/assets/icons/front-end-dashboard.svg +1 -0
- package/src/assets/icons/funny.svg +1 -0
- package/src/assets/icons/futher-education.svg +1 -0
- package/src/assets/icons/games.svg +1 -0
- package/src/assets/icons/garage-closed.svg +1 -0
- package/src/assets/icons/gauge-rate.svg +1 -0
- package/src/assets/icons/gears.svg +1 -0
- package/src/assets/icons/geolocation.svg +1 -0
- package/src/assets/icons/guide-info.svg +1 -0
- package/src/assets/icons/hammer.svg +1 -0
- package/src/assets/icons/hand-shake.svg +1 -0
- package/src/assets/icons/hard-drive.svg +1 -0
- package/src/assets/icons/hdmi-key.svg +1 -0
- package/src/assets/icons/headphones.svg +1 -0
- package/src/assets/icons/health-app.svg +1 -0
- package/src/assets/icons/health-monitor.svg +1 -0
- package/src/assets/icons/health-patient.svg +1 -0
- package/src/assets/icons/heart.svg +1 -0
- package/src/assets/icons/home-appliance.svg +1 -0
- package/src/assets/icons/home.svg +1 -0
- package/src/assets/icons/homelive.svg +1 -0
- package/src/assets/icons/hourglass.svg +1 -0
- package/src/assets/icons/house.svg +1 -0
- package/src/assets/icons/id-card.svg +1 -0
- package/src/assets/icons/image.svg +1 -0
- package/src/assets/icons/important.svg +1 -0
- package/src/assets/icons/improvement.svg +1 -0
- package/src/assets/icons/inbox.svg +1 -0
- package/src/assets/icons/info.svg +1 -0
- package/src/assets/icons/information-data.svg +1 -0
- package/src/assets/icons/instagram.svg +1 -0
- package/src/assets/icons/international-globe.svg +1 -0
- package/src/assets/icons/internet-browser.svg +1 -0
- package/src/assets/icons/internet-security-desktop.svg +1 -0
- package/src/assets/icons/internet-security-mobile.svg +1 -0
- package/src/assets/icons/internet-security-password.svg +1 -0
- package/src/assets/icons/internet-usage.svg +1 -0
- package/src/assets/icons/internet.svg +1 -0
- package/src/assets/icons/invoice-euro.svg +1 -0
- package/src/assets/icons/invoices-euro.svg +1 -0
- package/src/assets/icons/iso.svg +1 -0
- package/src/assets/icons/it-infrastructure.svg +1 -0
- package/src/assets/icons/keyboard.svg +1 -0
- package/src/assets/icons/la-cle-tv.svg +1 -0
- package/src/assets/icons/laptop-connected.svg +1 -0
- package/src/assets/icons/laptop.svg +1 -0
- package/src/assets/icons/le-vote.svg +1 -0
- package/src/assets/icons/link.svg +1 -0
- package/src/assets/icons/linkedin-2.svg +1 -0
- package/src/assets/icons/linkedin.svg +1 -0
- package/src/assets/icons/location-on-map.svg +1 -0
- package/src/assets/icons/location-pin.svg +1 -0
- package/src/assets/icons/lock-open.svg +1 -0
- package/src/assets/icons/lock.svg +1 -0
- package/src/assets/icons/logistics.svg +1 -0
- package/src/assets/icons/love-logo.svg +1 -0
- package/src/assets/icons/mahali.svg +1 -0
- package/src/assets/icons/maintenance-man.svg +1 -0
- package/src/assets/icons/map-pin.svg +1 -0
- package/src/assets/icons/map.svg +1 -0
- package/src/assets/icons/medal.svg +1 -0
- package/src/assets/icons/medical-app.svg +1 -0
- package/src/assets/icons/medical-chart.svg +1 -0
- package/src/assets/icons/medicine.svg +1 -0
- package/src/assets/icons/menu-arrow.svg +1 -0
- package/src/assets/icons/menu-grid.svg +1 -0
- package/src/assets/icons/menu.svg +1 -0
- package/src/assets/icons/message-alert.svg +1 -0
- package/src/assets/icons/messages.svg +1 -0
- package/src/assets/icons/micro-sd-card.svg +1 -0
- package/src/assets/icons/microphone-mute.svg +1 -0
- package/src/assets/icons/microphone.svg +1 -0
- package/src/assets/icons/mini-games.svg +1 -0
- package/src/assets/icons/mobile-applications.svg +1 -0
- package/src/assets/icons/mobile-data-toggle.svg +1 -0
- package/src/assets/icons/mobile-insurance.svg +1 -0
- package/src/assets/icons/mobile-network-coverage.svg +1 -0
- package/src/assets/icons/mobile-payment.svg +1 -0
- package/src/assets/icons/mobile-security.svg +1 -0
- package/src/assets/icons/mobile-setup.svg +1 -0
- package/src/assets/icons/modem.svg +1 -0
- package/src/assets/icons/modifier-delete.svg +1 -0
- package/src/assets/icons/modifier-done.svg +1 -0
- package/src/assets/icons/modifier-download.svg +1 -0
- package/src/assets/icons/modifier-upload.svg +1 -0
- package/src/assets/icons/money-box.svg +1 -0
- package/src/assets/icons/more-dots.svg +1 -0
- package/src/assets/icons/multi-sim.svg +1 -0
- package/src/assets/icons/music.svg +1 -0
- package/src/assets/icons/my-account.svg +1 -0
- package/src/assets/icons/my-orange.svg +1 -0
- package/src/assets/icons/my-skills.svg +1 -0
- package/src/assets/icons/my-vacation.svg +1 -0
- package/src/assets/icons/network-dslam.svg +1 -0
- package/src/assets/icons/network-gatekeeper.svg +1 -0
- package/src/assets/icons/network-gateway.svg +1 -0
- package/src/assets/icons/network-optical-amplifier.svg +1 -0
- package/src/assets/icons/network-optical-transport.svg +1 -0
- package/src/assets/icons/network-wan-optimisation-engine.svg +1 -0
- package/src/assets/icons/networks.svg +1 -0
- package/src/assets/icons/newspaper.svg +1 -0
- package/src/assets/icons/not-checked.svg +1 -0
- package/src/assets/icons/notification-alert.svg +1 -0
- package/src/assets/icons/office.svg +1 -0
- package/src/assets/icons/online-help.svg +1 -0
- package/src/assets/icons/orange-assistant.svg +1 -0
- package/src/assets/icons/orange-cash.svg +1 -0
- package/src/assets/icons/orange-detente.svg +1 -0
- package/src/assets/icons/orange-dialler.svg +1 -0
- package/src/assets/icons/orange-events.svg +1 -0
- package/src/assets/icons/orange-experts-expert.svg +1 -0
- package/src/assets/icons/orange-experts-insurance.svg +1 -0
- package/src/assets/icons/orange-experts-orange-business-consultant.svg +1 -0
- package/src/assets/icons/orange-experts-recycle.svg +1 -0
- package/src/assets/icons/orange-experts-repair.svg +1 -0
- package/src/assets/icons/orange-football-club.svg +1 -0
- package/src/assets/icons/orange-games.svg +1 -0
- package/src/assets/icons/orange-messenger.svg +1 -0
- package/src/assets/icons/orange-money-nfc.svg +1 -0
- package/src/assets/icons/orange-reflect.svg +1 -0
- package/src/assets/icons/orange-rewards.svg +1 -0
- package/src/assets/icons/orange-tv.svg +1 -0
- package/src/assets/icons/orange-vr-experience.svg +1 -0
- package/src/assets/icons/outbox.svg +1 -0
- package/src/assets/icons/package-content.svg +1 -0
- package/src/assets/icons/package-services.svg +1 -0
- package/src/assets/icons/package.svg +1 -0
- package/src/assets/icons/packaging-icon-hd.svg +1 -0
- package/src/assets/icons/parabole-tv.svg +1 -0
- package/src/assets/icons/parental-control.svg +1 -0
- package/src/assets/icons/pause.svg +1 -0
- package/src/assets/icons/payment-card.svg +1 -0
- package/src/assets/icons/payment-euro.svg +1 -0
- package/src/assets/icons/pda.svg +1 -0
- package/src/assets/icons/pdf-file.svg +1 -0
- package/src/assets/icons/pencil.svg +1 -0
- package/src/assets/icons/personal-hotspot.svg +1 -0
- package/src/assets/icons/personal-smartphone-trainer.svg +1 -0
- package/src/assets/icons/phone-advisor.svg +1 -0
- package/src/assets/icons/play-and-win.svg +1 -0
- package/src/assets/icons/play.svg +1 -0
- package/src/assets/icons/plug-socket.svg +1 -0
- package/src/assets/icons/power.svg +1 -0
- package/src/assets/icons/powerstation.svg +1 -0
- package/src/assets/icons/presentation.svg +1 -0
- package/src/assets/icons/print.svg +1 -0
- package/src/assets/icons/printer.svg +1 -0
- package/src/assets/icons/real-time.svg +1 -0
- package/src/assets/icons/recycle-device.svg +1 -0
- package/src/assets/icons/recycle.svg +1 -0
- package/src/assets/icons/reduction.svg +1 -0
- package/src/assets/icons/reload.svg +1 -0
- package/src/assets/icons/reminders.svg +1 -0
- package/src/assets/icons/remote-desktop-protocol.svg +1 -0
- package/src/assets/icons/remove.svg +1 -0
- package/src/assets/icons/repair.svg +1 -0
- package/src/assets/icons/reseau.svg +1 -0
- package/src/assets/icons/restaurant.svg +1 -0
- package/src/assets/icons/rewards.svg +1 -0
- package/src/assets/icons/running.svg +1 -0
- package/src/assets/icons/safety.svg +1 -0
- package/src/assets/icons/satallite.svg +1 -0
- package/src/assets/icons/save.svg +1 -0
- package/src/assets/icons/school.svg +1 -0
- package/src/assets/icons/science.svg +1 -0
- package/src/assets/icons/sd-card.svg +1 -0
- package/src/assets/icons/search.svg +1 -0
- package/src/assets/icons/security-status-good.svg +1 -0
- package/src/assets/icons/send.svg +1 -0
- package/src/assets/icons/senior-person.svg +1 -0
- package/src/assets/icons/server-storage-array.svg +1 -0
- package/src/assets/icons/server-tower.svg +1 -0
- package/src/assets/icons/session-enter.svg +1 -0
- package/src/assets/icons/session-leave.svg +1 -0
- package/src/assets/icons/settings.svg +1 -0
- package/src/assets/icons/share.svg +1 -0
- package/src/assets/icons/shop-pin.svg +1 -0
- package/src/assets/icons/shop.svg +1 -0
- package/src/assets/icons/showroom-mobile-pro.svg +1 -0
- package/src/assets/icons/signal-5-5.svg +1 -0
- package/src/assets/icons/silence.svg +1 -0
- package/src/assets/icons/sim-e.svg +1 -0
- package/src/assets/icons/sim.svg +1 -0
- package/src/assets/icons/simple-mode.svg +1 -0
- package/src/assets/icons/simplicity.svg +1 -0
- package/src/assets/icons/siren.svg +1 -0
- package/src/assets/icons/skiing.svg +1 -0
- package/src/assets/icons/skip-to-end.svg +1 -0
- package/src/assets/icons/skip-to-start.svg +1 -0
- package/src/assets/icons/sleep.svg +1 -0
- package/src/assets/icons/smart-care.svg +1 -0
- package/src/assets/icons/smart-home.svg +1 -0
- package/src/assets/icons/smart-tap.svg +1 -0
- package/src/assets/icons/smart-watch.svg +1 -0
- package/src/assets/icons/sms-alert.svg +1 -0
- package/src/assets/icons/sms-message-compose.svg +1 -0
- package/src/assets/icons/sms-message.svg +1 -0
- package/src/assets/icons/social-network.svg +1 -0
- package/src/assets/icons/sofa.svg +1 -0
- package/src/assets/icons/sort.svg +1 -0
- package/src/assets/icons/stadium.svg +1 -0
- package/src/assets/icons/star-empty.svg +1 -0
- package/src/assets/icons/star-favourite-half.svg +1 -0
- package/src/assets/icons/star-favourite.svg +1 -0
- package/src/assets/icons/startover.svg +1 -0
- package/src/assets/icons/statistics.svg +1 -0
- package/src/assets/icons/stop-secret.svg +1 -0
- package/src/assets/icons/storage-cloud.svg +1 -0
- package/src/assets/icons/store-locator.svg +1 -0
- package/src/assets/icons/street.svg +1 -0
- package/src/assets/icons/subscription-package.svg +1 -0
- package/src/assets/icons/suitcase.svg +1 -0
- package/src/assets/icons/support.svg +1 -0
- package/src/assets/icons/surveillance-camera.svg +1 -0
- package/src/assets/icons/syncronise.svg +1 -0
- package/src/assets/icons/tag-advertising.svg +1 -0
- package/src/assets/icons/tag.svg +1 -0
- package/src/assets/icons/target-location.svg +1 -0
- package/src/assets/icons/tarif.svg +1 -0
- package/src/assets/icons/task-list.svg +1 -0
- package/src/assets/icons/team-connect.svg +1 -0
- package/src/assets/icons/thumb-up.svg +1 -0
- package/src/assets/icons/tick.svg +1 -0
- package/src/assets/icons/ticket.svg +1 -0
- package/src/assets/icons/top-up-card-euro.svg +1 -0
- package/src/assets/icons/top-up-euro.svg +1 -0
- package/src/assets/icons/top-up-time.svg +1 -0
- package/src/assets/icons/town.svg +1 -0
- package/src/assets/icons/townhall.svg +1 -0
- package/src/assets/icons/train.svg +1 -0
- package/src/assets/icons/training-session.svg +1 -0
- package/src/assets/icons/tranquility.svg +1 -0
- package/src/assets/icons/transfer-data.svg +1 -0
- package/src/assets/icons/transfers.svg +1 -0
- package/src/assets/icons/trash.svg +1 -0
- package/src/assets/icons/tv-channel-list.svg +1 -0
- package/src/assets/icons/tv-commande.svg +1 -0
- package/src/assets/icons/unlimited-calls.svg +1 -0
- package/src/assets/icons/upload.svg +1 -0
- package/src/assets/icons/usb-hard-drive.svg +1 -0
- package/src/assets/icons/usb-key.svg +1 -0
- package/src/assets/icons/user-manual.svg +1 -0
- package/src/assets/icons/user.svg +1 -0
- package/src/assets/icons/video-call.svg +1 -0
- package/src/assets/icons/video-live.svg +1 -0
- package/src/assets/icons/video-phone.svg +1 -0
- package/src/assets/icons/video-record.svg +1 -0
- package/src/assets/icons/video.svg +1 -0
- package/src/assets/icons/vip-contact.svg +1 -0
- package/src/assets/icons/virtual-gamepad.svg +1 -0
- package/src/assets/icons/vod-portrait.svg +1 -0
- package/src/assets/icons/volte.svg +1 -0
- package/src/assets/icons/volume-status-4-4.svg +1 -0
- package/src/assets/icons/vowifi.svg +1 -0
- package/src/assets/icons/wallet.svg +1 -0
- package/src/assets/icons/warning-important.svg +1 -0
- package/src/assets/icons/washroom.svg +1 -0
- package/src/assets/icons/watch.svg +1 -0
- package/src/assets/icons/water.svg +1 -0
- package/src/assets/icons/weather.svg +1 -0
- package/src/assets/icons/web-browser.svg +1 -0
- package/src/assets/icons/web-camera.svg +1 -0
- package/src/assets/icons/weighing-scales.svg +1 -0
- package/src/assets/icons/widget.svg +1 -0
- package/src/assets/icons/wifi-home.svg +1 -0
- package/src/assets/icons/wifi.svg +1 -0
- package/src/assets/icons/x.svg +1 -0
- package/src/assets/icons/your-balance.svg +1 -0
- package/src/assets/icons/youtube.svg +1 -0
- package/src/assets/icons/zoom-in.svg +1 -0
- package/src/assets/icons/zoom-out.svg +1 -0
- package/src/assets/images/developers/hands-with-phones.svg +90 -0
- package/src/assets/images/developers/iphone-size-2x.png +0 -0
- package/src/assets/images/developers/iphone-xr-white-select.png +0 -0
- package/src/assets/images/developers/phones.png +0 -0
- package/src/assets/images/developers/router.png +0 -0
- package/src/assets/images/developers/rule-component-block.png +0 -0
- package/src/assets/images/developers/rule-component-inline.png +0 -0
- package/src/assets/images/developers/rule-container.png +0 -0
- package/src/assets/images/developers/rule-content.png +0 -0
- package/src/assets/images/developers/two-phones.png +0 -0
- package/src/assets/logo/logo.svg +1 -0
- package/src/components/Accordion/Accordion.mdx +222 -0
- package/src/components/Accordion/Accordion.static.ts +104 -0
- package/src/components/Accordion/Accordion.tsx +70 -0
- package/src/components/Accordion/AccordionHeader.tsx +59 -0
- package/src/components/Accordion/AccordionItem.tsx +76 -0
- package/src/components/Accordion/HeadingContext.tsx +5 -0
- package/src/components/Accordion/index.ts +4 -0
- package/src/components/Accordion/styles/config.scss +8 -0
- package/src/components/Accordion/styles/mixins.scss +91 -0
- package/src/components/Accordion/styles/style.scss +47 -0
- package/src/components/Accordion/tests/Accordion.static.test.js +207 -0
- package/src/components/Accordion/tests/Accordion.unit.test.js +822 -0
- package/src/components/Accordion/tests/data.js +18 -0
- package/src/components/Alert/Alert.mdx +141 -0
- package/src/components/Alert/Alert.tsx +119 -0
- package/src/components/Alert/CHANGELOG.md +33 -0
- package/src/components/Alert/data.ts +8 -0
- package/src/components/Alert/index.ts +3 -0
- package/src/components/Alert/styles/config.scss +58 -0
- package/src/components/Alert/styles/mixins.scss +54 -0
- package/src/components/Alert/styles/style.scss +44 -0
- package/src/components/Alert/tests/Alert.conformance.test.js +30 -0
- package/src/components/Alert/tests/Alert.test.js +87 -0
- package/src/components/Badge/Badge.tsx +5 -3
- package/src/components/Badge/index.ts +1 -1
- package/src/components/Badge/styles/config.scss +53 -17
- package/src/components/Badge/styles/mixins.scss +8 -2
- package/src/components/Badge/styles/style.scss +7 -3
- package/src/components/Badge/tests/Badge.conformance.test.js +8 -8
- package/src/components/Badge/tests/Badge.unit.test.js +3 -3
- package/src/components/Breadcrumbs/BreadcrumbItem.tsx +54 -0
- package/src/components/Breadcrumbs/Breadcrumbs.mdx +84 -0
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +60 -0
- package/src/components/Breadcrumbs/index.ts +5 -0
- package/src/components/Breadcrumbs/styles/config.scss +2 -0
- package/src/components/Breadcrumbs/styles/mixins.scss +105 -0
- package/src/components/Breadcrumbs/styles/style.scss +37 -0
- package/src/components/Breadcrumbs/tests/BreadcrumbItem.unit.test.js +295 -0
- package/src/components/Breadcrumbs/tests/Breadcrumbs.conformance.test.js +53 -0
- package/src/components/Breadcrumbs/tests/Breadcrumbs.integration.test.js +309 -0
- package/src/components/Breadcrumbs/tests/Breadcrumbs.unit.test.js +280 -0
- package/src/components/Button/Button.mdx +273 -0
- package/src/components/Button/Button.tsx +105 -0
- package/src/components/Button/IconButton.tsx +67 -0
- package/src/components/Button/index.tsx +23 -0
- package/src/components/Button/styles/config.scss +229 -0
- package/src/components/Button/styles/mixins.scss +164 -0
- package/src/components/Button/styles/style.scss +66 -0
- package/src/components/Button/tests/Button.conformance.test.js +37 -0
- package/src/components/Button/tests/Button.test.js +114 -0
- package/src/components/Button/tests/IconButton.unit.test.js +107 -0
- package/src/components/Buttons/Buttons.mdx +39 -0
- package/src/components/Buttons/Buttons.tsx +34 -0
- package/src/components/Buttons/index.ts +3 -0
- package/src/components/Buttons/styles/config.scss +3 -0
- package/src/components/Buttons/styles/mixins.scss +39 -0
- package/src/components/Buttons/styles/style.scss +10 -0
- package/src/components/Buttons/tests/Buttons.conformance.test.js +22 -0
- package/src/components/Buttons/tests/Buttons.unit.test.js +26 -0
- package/src/components/Container/Container.mdx +73 -0
- package/src/components/Container/Container.tsx +15 -0
- package/src/components/Container/index.ts +5 -0
- package/src/components/Container/styles/config.scss +11 -0
- package/src/components/Container/styles/mixins.scss +22 -0
- package/src/components/Container/styles/style.scss +5 -0
- package/src/components/Container/tests/Container.conformance.test.js +209 -0
- package/src/components/Container/tests/Container.unit.test.js +320 -0
- package/src/components/Grid/Grid.mdx +319 -0
- package/src/components/Grid/Grid.tsx +51 -0
- package/src/components/Grid/GridCol.tsx +33 -0
- package/src/components/Grid/index.ts +6 -0
- package/src/components/Grid/styles/config.scss +10 -0
- package/src/components/Grid/styles/mixins.scss +126 -0
- package/src/components/Grid/styles/style.scss +41 -0
- package/src/components/Grid/tests/Grid.unit.test.tsx +533 -0
- package/src/components/Grid/tests/GridCol.unit.test.tsx +199 -0
- package/src/components/Icon/Icon.mdx +172 -0
- package/src/components/Icon/Icon.tsx +73 -0
- package/src/components/Icon/IconSearch.jsx +247 -0
- package/src/components/Icon/SpritePathContext.tsx +22 -0
- package/src/components/Icon/iconSearchTags.ts +437 -0
- package/src/components/Icon/index.ts +5 -0
- package/src/components/Icon/styles/config.scss +27 -0
- package/src/components/Icon/styles/export/color.scss +8 -0
- package/src/components/Icon/styles/export/size.scss +13 -0
- package/src/components/Icon/styles/mixins.scss +31 -0
- package/src/components/Icon/styles/style.scss +13 -0
- package/src/components/Icon/tests/Icon.conformance.test.js +22 -0
- package/src/components/Icon/tests/Icon.unit.test.js +112 -0
- package/src/components/Image/Image.mdx +166 -0
- package/src/components/Image/Image.tsx +65 -0
- package/src/components/Image/index.ts +7 -0
- package/src/components/Image/styles/mixins.scss +12 -0
- package/src/components/Image/styles/style.scss +9 -0
- package/src/components/Image/tests/Image.conformance.test.js +264 -0
- package/src/components/Image/tests/Image.unit.test.js +338 -0
- package/src/components/Link/Link.mdx +224 -0
- package/src/components/Link/Link.tsx +52 -0
- package/src/components/Link/index.ts +3 -0
- package/src/components/Link/styles/config.scss +85 -0
- package/src/components/Link/styles/mixins.scss +42 -0
- package/src/components/Link/styles/style.scss +59 -0
- package/src/components/Link/tests/Link.conformance.test.js +302 -0
- package/src/components/Link/tests/Link.integration.test.js +393 -0
- package/src/components/Link/tests/Link.unit.test.js +308 -0
- package/src/components/Modal/Modal.mdx +449 -0
- package/src/components/Modal/Modal.static.ts +223 -0
- package/src/components/Modal/Modal.tsx +145 -0
- package/src/components/Modal/ModalBody.tsx +46 -0
- package/src/components/Modal/ModalCloseButton.tsx +26 -0
- package/src/components/Modal/ModalTitle.tsx +32 -0
- package/src/components/Modal/TODO.md +2 -0
- package/src/components/Modal/index.ts +6 -0
- package/src/components/Modal/styles/config.scss +42 -0
- package/src/components/Modal/styles/mixins.scss +200 -0
- package/src/components/Modal/styles/style.scss +97 -0
- package/src/components/Modal/tests/Modal.conformance.test.js +41 -0
- package/src/components/Modal/tests/Modal.unit.test.js +56 -0
- package/src/components/Modal/tests/ModalBody.unit.test.js +39 -0
- package/src/components/Modal/tests/ModalCloseButton.unit.test.js +84 -0
- package/src/components/Modal/tests/ModalTitle.unit.test.js +25 -0
- package/src/components/Section/Section.mdx +397 -0
- package/src/components/Section/Section.tsx +54 -0
- package/src/components/Section/index.ts +3 -0
- package/src/components/Section/styles/config.scss +38 -0
- package/src/components/Section/styles/mixins.scss +30 -0
- package/src/components/Section/styles/style.scss +35 -0
- package/src/components/Section/tests/Section.conformance.test.js +502 -0
- package/src/components/Section/tests/Section.unit.test.js +642 -0
- package/src/components/Tabs/TODO.md +2 -0
- package/src/components/Tabs/Tab.tsx +55 -0
- package/src/components/Tabs/TabPanel.tsx +42 -0
- package/src/components/Tabs/Tabs.mdx +373 -0
- package/src/components/Tabs/Tabs.static.ts +185 -0
- package/src/components/Tabs/Tabs.tsx +130 -0
- package/src/components/Tabs/index.ts +5 -0
- package/src/components/Tabs/styles/config.scss +78 -0
- package/src/components/Tabs/styles/mixins.scss +107 -0
- package/src/components/Tabs/styles/style.scss +64 -0
- package/src/components/Tabs/tests/Tab.unit.test.js +85 -0
- package/src/components/Tabs/tests/TabPanel.unit.test.js +53 -0
- package/src/components/Tabs/tests/Tabs.unit.test.js +260 -0
- package/src/components/index.ts +33 -2
- package/src/styles/base/globals.scss +18 -13
- package/src/styles/base/styleguide.scss +1 -1
- package/src/styles/before-components.scss +1 -1
- package/src/styles/export/breakpoint.ts +12 -0
- package/src/styles/export/color.scss +1 -1
- package/src/styles/tokens/base.scss +6 -4
- package/src/styles/tokens/color.scss +127 -25
- package/src/styles/tools/convert.scss +1 -1
- package/src/styles/typography/config.scss +187 -0
- package/src/{components/Typography/styles → styles/typography}/mixins.scss +31 -24
- package/src/{components/Typography/styles → styles/typography}/style.scss +9 -3
- package/src/styles/utilities/text.scss +2 -2
- package/build/.htaccess +0 -7
- package/build/_next/static/chunks/app/layout-69efc42b1696abf9.js +0 -1
- package/build/_next/static/chunks/app/page-687dfdffc8d1b6e5.js +0 -1
- package/build/_next/static/chunks/webpack-778f3ec87f8d2826.js +0 -1
- package/build/_next/static/css/08a2fcd6f5aac3e0.css +0 -1
- package/build/_next/static/css/d2fc2f581fe4b371.css +0 -1
- package/build/_next/static/rsiMOOYAxBtOjvpzBN4vJ/_buildManifest.js +0 -1
- package/build/_redirects +0 -1
- package/build/components/types/Badge/index.d.ts +0 -2
- package/build/components/types/index.d.ts +0 -4
- package/build/fonts/HelvNeue55_W1G.eot +0 -0
- package/build/fonts/HelvNeue55_W1G.svg +0 -653
- package/build/fonts/HelvNeue55_W1G.ttf +0 -0
- package/build/fonts/HelvNeue55_W1G.woff +0 -0
- package/build/fonts/HelvNeue55_W1G.woff2 +0 -0
- package/build/fonts/HelvNeue75_W1G.eot +0 -0
- package/build/fonts/HelvNeue75_W1G.svg +0 -653
- package/build/fonts/HelvNeue75_W1G.ttf +0 -0
- package/build/fonts/HelvNeue75_W1G.woff +0 -0
- package/build/fonts/HelvNeue75_W1G.woff2 +0 -0
- package/build/manifest.json +0 -15
- package/build/sprite-sg.svg +0 -1
- package/public/fonts/HelvNeue55_W1G.eot +0 -0
- package/public/fonts/HelvNeue55_W1G.svg +0 -653
- package/public/fonts/HelvNeue55_W1G.ttf +0 -0
- package/public/fonts/HelvNeue55_W1G.woff +0 -0
- package/public/fonts/HelvNeue55_W1G.woff2 +0 -0
- package/public/fonts/HelvNeue75_W1G.eot +0 -0
- package/public/fonts/HelvNeue75_W1G.svg +0 -653
- package/public/fonts/HelvNeue75_W1G.ttf +0 -0
- package/public/fonts/HelvNeue75_W1G.woff +0 -0
- package/public/fonts/HelvNeue75_W1G.woff2 +0 -0
- package/src/components/Badge/Badge.test.js +0 -45
- package/src/components/Typography/styles/config.scss +0 -181
- /package/build/_next/static/{rsiMOOYAxBtOjvpzBN4vJ → CRhIjUFtohDOfdDfzvfXM}/_ssgManifest.js +0 -0
- /package/build/_next/static/chunks/{4bd1b696-67ee12fb04071d3b.js → 4bd1b696-40a218329c8ae32b.js} +0 -0
- /package/build/_next/static/chunks/{684-2d117c50cbadadca.js → 684-c72f8f73e7f2d568.js} +0 -0
- /package/build/_next/static/chunks/app/_not-found/{page-f08302ee705a96b1.js → page-c799b4c91b89a5c2.js} +0 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
|
|
4
|
+
// Mock breakpoints since SCSS modules don't work in tests
|
|
5
|
+
jest.mock('../../../styles/export/breakpoint', () => ({
|
|
6
|
+
xs: '0px',
|
|
7
|
+
sm: '480px',
|
|
8
|
+
md: '768px',
|
|
9
|
+
lg: '992px',
|
|
10
|
+
xl: '1240px',
|
|
11
|
+
xxl: '1380px',
|
|
12
|
+
xxxl: '1920px',
|
|
13
|
+
}));
|
|
14
|
+
|
|
15
|
+
import Image from '../Image';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Unit testy pre Image komponentu
|
|
19
|
+
*
|
|
20
|
+
* Testy pokrývajú:
|
|
21
|
+
*
|
|
22
|
+
* **Základné renderovanie:**
|
|
23
|
+
* • Renderovanie s predvolenou CSS triedou 'img'
|
|
24
|
+
* • Pridávanie dodatočných CSS tried cez className prop
|
|
25
|
+
* • Správne nastavenie alt atribútu
|
|
26
|
+
* • Správne nastavenie src atribútu pre string src
|
|
27
|
+
* • Predávanie dodatočných props do img elementu
|
|
28
|
+
*
|
|
29
|
+
* **String src (jednoduché obrázky):**
|
|
30
|
+
* • Renderovanie ako img element keď je src string
|
|
31
|
+
* • Žiadne source elementy pre string src
|
|
32
|
+
*
|
|
33
|
+
* **Object src (responzívne obrázky):**
|
|
34
|
+
* • Renderovanie ako picture element keď je src objekt
|
|
35
|
+
* • Nastavenie default src pre img element
|
|
36
|
+
* • Správny počet source elementov (bez default)
|
|
37
|
+
* • Vylúčenie default z source elementov
|
|
38
|
+
* • Správne srcSet atribúty pre source elementy
|
|
39
|
+
* • Správne media atribúty pre source elementy
|
|
40
|
+
* • Sortovanie breakpointov v zostupnom poradí
|
|
41
|
+
*
|
|
42
|
+
* **Všetky breakpointy:**
|
|
43
|
+
* • Správne spracovanie všetkých možných breakpointov (xxxl, xxl, xl, lg, md, sm, xs)
|
|
44
|
+
* • Sortovanie všetkých breakpointov v správnom zostupnom poradí
|
|
45
|
+
* • Správne media queries pre všetky breakpointy
|
|
46
|
+
*
|
|
47
|
+
* **Edge cases:**
|
|
48
|
+
* • Objekt s len default vlastnosťou
|
|
49
|
+
* • Objekt bez default vlastnosti
|
|
50
|
+
* • Prázdny objekt
|
|
51
|
+
* • Objekt s vlastnými breakpoint kľúčmi
|
|
52
|
+
*
|
|
53
|
+
* **Accessibility:**
|
|
54
|
+
* • Vždy má alt atribút
|
|
55
|
+
* • Prázdny alt pre dekoratívne obrázky
|
|
56
|
+
* • Zachovanie alt atribútu v picture elemente
|
|
57
|
+
*
|
|
58
|
+
* **Component metadata:**
|
|
59
|
+
* • Správny displayName
|
|
60
|
+
*/
|
|
61
|
+
|
|
62
|
+
const singleSource = '/__image_snapshots__/picture-element-md-snap.png';
|
|
63
|
+
const multipleSources = {
|
|
64
|
+
default: '/__image_snapshots__/picture-element-md-snap.png',
|
|
65
|
+
xl: '/__image_snapshots__/picture-element-xl-snap.png',
|
|
66
|
+
lg: '/__image_snapshots__/picture-element-lg-snap.png',
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const allBreakpoints = {
|
|
70
|
+
default: '/__image_snapshots__/default.png',
|
|
71
|
+
xxxl: '/__image_snapshots__/xxxl.png',
|
|
72
|
+
xxl: '/__image_snapshots__/xxl.png',
|
|
73
|
+
xl: '/__image_snapshots__/xl.png',
|
|
74
|
+
lg: '/__image_snapshots__/lg.png',
|
|
75
|
+
md: '/__image_snapshots__/md.png',
|
|
76
|
+
sm: '/__image_snapshots__/sm.png',
|
|
77
|
+
xs: '/__image_snapshots__/xs.png',
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
describe('Image Component', () => {
|
|
81
|
+
describe('Basic rendering', () => {
|
|
82
|
+
it('renders with default class when no className provided', () => {
|
|
83
|
+
const { getByTestId } = render(
|
|
84
|
+
<Image data-testid="test-id" alt="test" src={singleSource} />
|
|
85
|
+
);
|
|
86
|
+
expect(getByTestId('test-id')).toHaveClass('img');
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it('renders with additional class when className is provided', () => {
|
|
90
|
+
const { getByTestId } = render(
|
|
91
|
+
<Image
|
|
92
|
+
data-testid="test-id"
|
|
93
|
+
className="test-class"
|
|
94
|
+
alt="test"
|
|
95
|
+
src={singleSource}
|
|
96
|
+
/>
|
|
97
|
+
);
|
|
98
|
+
expect(getByTestId('test-id')).toHaveClass('img', 'test-class');
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it('renders with correct alt attribute', () => {
|
|
102
|
+
render(<Image alt="Test alt text" src={singleSource} />);
|
|
103
|
+
expect(screen.getByAltText('Test alt text')).toBeInTheDocument();
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it('renders with correct src attribute for string src', () => {
|
|
107
|
+
const { container } = render(
|
|
108
|
+
<Image alt="test" src={singleSource} />
|
|
109
|
+
);
|
|
110
|
+
expect(container.querySelector('img').src).toEqual(
|
|
111
|
+
'http://localhost' + singleSource
|
|
112
|
+
);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
it('passes through additional props to img element', () => {
|
|
116
|
+
const { container } = render(
|
|
117
|
+
<Image
|
|
118
|
+
alt="test"
|
|
119
|
+
src={singleSource}
|
|
120
|
+
data-custom="custom-value"
|
|
121
|
+
id="test-id"
|
|
122
|
+
/>
|
|
123
|
+
);
|
|
124
|
+
const img = container.querySelector('img');
|
|
125
|
+
expect(img.getAttribute('data-custom')).toBe('custom-value');
|
|
126
|
+
expect(img.getAttribute('id')).toBe('test-id');
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
describe('String src (simple image)', () => {
|
|
131
|
+
it('renders as img element when src is string', () => {
|
|
132
|
+
const { container } = render(
|
|
133
|
+
<Image alt="test" src={singleSource} />
|
|
134
|
+
);
|
|
135
|
+
expect(container.querySelector('img')).toBeTruthy();
|
|
136
|
+
expect(container.querySelector('picture')).toBeFalsy();
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it('does not render source elements when src is string', () => {
|
|
140
|
+
const { container } = render(
|
|
141
|
+
<Image alt="test" src={singleSource} />
|
|
142
|
+
);
|
|
143
|
+
expect(container.querySelectorAll('source')).toHaveLength(0);
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
describe('Object src (responsive image)', () => {
|
|
148
|
+
it('renders as picture element when src is object', () => {
|
|
149
|
+
const { container } = render(
|
|
150
|
+
<Image alt="test" src={multipleSources} />
|
|
151
|
+
);
|
|
152
|
+
expect(container.querySelector('picture')).toBeTruthy();
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
it('renders img with default src when src is object', () => {
|
|
156
|
+
const { container } = render(
|
|
157
|
+
<Image alt="test" src={multipleSources} />
|
|
158
|
+
);
|
|
159
|
+
const img = container.querySelector('img');
|
|
160
|
+
expect(img.getAttribute('src')).toEqual(multipleSources.default);
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
it('renders correct number of source elements', () => {
|
|
164
|
+
const { container } = render(
|
|
165
|
+
<Image alt="test" src={multipleSources} />
|
|
166
|
+
);
|
|
167
|
+
// Should have 2 source elements (xl and lg, excluding default)
|
|
168
|
+
expect(container.querySelectorAll('source')).toHaveLength(2);
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
it('excludes default from source elements', () => {
|
|
172
|
+
const { container } = render(
|
|
173
|
+
<Image alt="test" src={multipleSources} />
|
|
174
|
+
);
|
|
175
|
+
const sources = container.querySelectorAll('source');
|
|
176
|
+
sources.forEach(source => {
|
|
177
|
+
expect(source.getAttribute('srcSet')).not.toBe(multipleSources.default);
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
it('renders source elements with correct srcSet attributes', () => {
|
|
182
|
+
const { container } = render(
|
|
183
|
+
<Image alt="test" src={multipleSources} />
|
|
184
|
+
);
|
|
185
|
+
const sources = container.querySelectorAll('source');
|
|
186
|
+
|
|
187
|
+
const srcSetValues = Array.from(sources).map(s => s.getAttribute('srcSet'));
|
|
188
|
+
expect(srcSetValues).toContain(multipleSources.xl);
|
|
189
|
+
expect(srcSetValues).toContain(multipleSources.lg);
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
it('renders source elements with correct media attributes', () => {
|
|
193
|
+
const { container } = render(
|
|
194
|
+
<Image alt="test" src={multipleSources} />
|
|
195
|
+
);
|
|
196
|
+
const sources = container.querySelectorAll('source');
|
|
197
|
+
|
|
198
|
+
const mediaValues = Array.from(sources).map(s => s.getAttribute('media'));
|
|
199
|
+
expect(mediaValues).toContain('(min-width: 1240px)'); // xl
|
|
200
|
+
expect(mediaValues).toContain('(min-width: 992px)'); // lg
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
it('sorts breakpoints in descending order', () => {
|
|
204
|
+
const { container } = render(
|
|
205
|
+
<Image alt="test" src={multipleSources} />
|
|
206
|
+
);
|
|
207
|
+
const sources = container.querySelectorAll('source');
|
|
208
|
+
|
|
209
|
+
// First source should be xl (larger breakpoint)
|
|
210
|
+
expect(sources[0].getAttribute('media')).toBe('(min-width: 1240px)');
|
|
211
|
+
// Second source should be lg (smaller breakpoint)
|
|
212
|
+
expect(sources[1].getAttribute('media')).toBe('(min-width: 992px)');
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
describe('All breakpoints support', () => {
|
|
217
|
+
it('handles all possible breakpoints correctly', () => {
|
|
218
|
+
const { container } = render(
|
|
219
|
+
<Image alt="test" src={allBreakpoints} />
|
|
220
|
+
);
|
|
221
|
+
const sources = container.querySelectorAll('source');
|
|
222
|
+
|
|
223
|
+
// Should have 7 source elements (all except default)
|
|
224
|
+
expect(sources).toHaveLength(7);
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
it('sorts all breakpoints in correct descending order', () => {
|
|
228
|
+
const { container } = render(
|
|
229
|
+
<Image alt="test" src={allBreakpoints} />
|
|
230
|
+
);
|
|
231
|
+
const sources = container.querySelectorAll('source');
|
|
232
|
+
|
|
233
|
+
const expectedOrder = ['xxxl', 'xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
|
|
234
|
+
const actualOrder = Array.from(sources).map(s => {
|
|
235
|
+
const srcSet = s.getAttribute('srcSet');
|
|
236
|
+
return Object.keys(allBreakpoints).find(key => allBreakpoints[key] === srcSet);
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
expect(actualOrder).toEqual(expectedOrder);
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
it('renders correct media queries for all breakpoints', () => {
|
|
243
|
+
const { container } = render(
|
|
244
|
+
<Image alt="test" src={allBreakpoints} />
|
|
245
|
+
);
|
|
246
|
+
const sources = container.querySelectorAll('source');
|
|
247
|
+
|
|
248
|
+
const expectedMediaQueries = [
|
|
249
|
+
'(min-width: 1920px)', // xxxl (custom)
|
|
250
|
+
'(min-width: 1380px)', // xxl (from SCSS)
|
|
251
|
+
'(min-width: 1240px)', // xl
|
|
252
|
+
'(min-width: 992px)', // lg
|
|
253
|
+
'(min-width: 768px)', // md
|
|
254
|
+
'(min-width: 480px)', // sm
|
|
255
|
+
'(min-width: 0px)', // xs
|
|
256
|
+
];
|
|
257
|
+
|
|
258
|
+
const actualMediaQueries = Array.from(sources).map(s => s.getAttribute('media'));
|
|
259
|
+
expect(actualMediaQueries).toEqual(expectedMediaQueries);
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
describe('Edge cases', () => {
|
|
264
|
+
it('handles object with only default property', () => {
|
|
265
|
+
const srcOnlyDefault = { default: singleSource };
|
|
266
|
+
const { container } = render(
|
|
267
|
+
<Image alt="test" src={srcOnlyDefault} />
|
|
268
|
+
);
|
|
269
|
+
|
|
270
|
+
expect(container.querySelector('picture')).toBeTruthy();
|
|
271
|
+
expect(container.querySelectorAll('source')).toHaveLength(0);
|
|
272
|
+
expect(container.querySelector('img').getAttribute('src')).toBe(singleSource);
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
it('handles object with missing default property gracefully', () => {
|
|
276
|
+
const srcWithoutDefault = { xl: '/test-xl.png', lg: '/test-lg.png' };
|
|
277
|
+
const { container } = render(
|
|
278
|
+
<Image alt="test" src={srcWithoutDefault} />
|
|
279
|
+
);
|
|
280
|
+
|
|
281
|
+
expect(container.querySelector('picture')).toBeTruthy();
|
|
282
|
+
expect(container.querySelectorAll('source')).toHaveLength(2);
|
|
283
|
+
// Should still render img but with undefined src
|
|
284
|
+
expect(container.querySelector('img')).toBeTruthy();
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
it('handles empty object gracefully', () => {
|
|
288
|
+
const emptySrc = {};
|
|
289
|
+
const { container } = render(
|
|
290
|
+
<Image alt="test" src={emptySrc} />
|
|
291
|
+
);
|
|
292
|
+
|
|
293
|
+
expect(container.querySelector('picture')).toBeTruthy();
|
|
294
|
+
expect(container.querySelectorAll('source')).toHaveLength(0);
|
|
295
|
+
expect(container.querySelector('img')).toBeTruthy();
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
it('handles object with custom breakpoint keys', () => {
|
|
299
|
+
const customSrc = {
|
|
300
|
+
default: '/default.png',
|
|
301
|
+
custom: '/custom.png',
|
|
302
|
+
another: '/another.png'
|
|
303
|
+
};
|
|
304
|
+
const { container } = render(
|
|
305
|
+
<Image alt="test" src={customSrc} />
|
|
306
|
+
);
|
|
307
|
+
|
|
308
|
+
expect(container.querySelector('picture')).toBeTruthy();
|
|
309
|
+
expect(container.querySelectorAll('source')).toHaveLength(2);
|
|
310
|
+
});
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
describe('Accessibility', () => {
|
|
314
|
+
it('always has alt attribute', () => {
|
|
315
|
+
render(<Image alt="Accessible image" src={singleSource} />);
|
|
316
|
+
expect(screen.getByAltText('Accessible image')).toBeInTheDocument();
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
it('works with empty alt for decorative images', () => {
|
|
320
|
+
render(<Image alt="" src={singleSource} />);
|
|
321
|
+
expect(screen.getByAltText('')).toBeInTheDocument();
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
it('maintains alt attribute in picture element', () => {
|
|
325
|
+
const { container } = render(
|
|
326
|
+
<Image alt="Responsive image" src={multipleSources} />
|
|
327
|
+
);
|
|
328
|
+
const img = container.querySelector('img');
|
|
329
|
+
expect(img.getAttribute('alt')).toBe('Responsive image');
|
|
330
|
+
});
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
describe('Component metadata', () => {
|
|
334
|
+
it('has correct displayName', () => {
|
|
335
|
+
expect(Image.displayName).toBe('Image');
|
|
336
|
+
});
|
|
337
|
+
});
|
|
338
|
+
});
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { ComponentDocs } from '@lighting-beetle/lighter-styleguide';
|
|
2
|
+
|
|
3
|
+
import { Preview } from '../../styleguide/';
|
|
4
|
+
import Icon from '../Icon';
|
|
5
|
+
|
|
6
|
+
import Link from './Link';
|
|
7
|
+
|
|
8
|
+
# Link
|
|
9
|
+
|
|
10
|
+
Links are basic navigation elements that provide interactive text-based navigation. They are always underlined and have consistent styling across the application. Standalone links are bold by default, but when used inline with other text, they inherit the font weight from their parent element.
|
|
11
|
+
|
|
12
|
+
## Basic Usage
|
|
13
|
+
|
|
14
|
+
<Preview>
|
|
15
|
+
<a href="/" className="">
|
|
16
|
+
Standalone link
|
|
17
|
+
</a>
|
|
18
|
+
<p>
|
|
19
|
+
Links in text{' '}
|
|
20
|
+
<a href="/" className="">
|
|
21
|
+
inherit font weight
|
|
22
|
+
</a>
|
|
23
|
+
</p>
|
|
24
|
+
<p>
|
|
25
|
+
Links in text that are{' '}
|
|
26
|
+
<a href="/" className="">
|
|
27
|
+
way too long and need to wrap at the end of the line so it will not break
|
|
28
|
+
the paragraph of text
|
|
29
|
+
</a>
|
|
30
|
+
</p>
|
|
31
|
+
</Preview>
|
|
32
|
+
|
|
33
|
+
## Link Class Behavior
|
|
34
|
+
|
|
35
|
+
Default Link styling is automatically applied to all `<a>` elements except those with specific classes: `.btn`, `.list__control`, `.tab-list__tab`, `.stepbar__link`, `.osk-breadcrumbs__link`, `.skip-link`, `.dropdown__item`, `.carousel-promotions__slide`, and elements within `.osk-footer` or `.mm-header`. To force Link styling on these elements, use the `.link` class.
|
|
36
|
+
|
|
37
|
+
<Preview>
|
|
38
|
+
<div className="mm-header">
|
|
39
|
+
<a href="/" className="">
|
|
40
|
+
Link in megamenu (no styling)
|
|
41
|
+
</a>
|
|
42
|
+
<br />
|
|
43
|
+
<Link href="/">Link with class .link in megamenu</Link>
|
|
44
|
+
</div>
|
|
45
|
+
</Preview>
|
|
46
|
+
|
|
47
|
+
## Color Variants
|
|
48
|
+
|
|
49
|
+
### Default (Black)
|
|
50
|
+
|
|
51
|
+
The standard link color that works on light backgrounds.
|
|
52
|
+
|
|
53
|
+
<Preview>
|
|
54
|
+
<a href="/" className="">
|
|
55
|
+
Default Link
|
|
56
|
+
</a>
|
|
57
|
+
</Preview>
|
|
58
|
+
|
|
59
|
+
### Orange
|
|
60
|
+
|
|
61
|
+
**Accessibility Warning**: Orange links on white background do not meet [Success Criterion 1.4.3: Contrast (Minimum)](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html) due to insufficient contrast between white and orange brand colors.
|
|
62
|
+
|
|
63
|
+
<Preview>
|
|
64
|
+
<a className="link--orange" href="/">
|
|
65
|
+
Orange Link
|
|
66
|
+
</a>
|
|
67
|
+
</Preview>
|
|
68
|
+
|
|
69
|
+
### Inverse (White)
|
|
70
|
+
|
|
71
|
+
For use on dark backgrounds.
|
|
72
|
+
|
|
73
|
+
<Preview bgTheme="black">
|
|
74
|
+
<div className="bg-black">
|
|
75
|
+
<a href="/">Inverse link without class .link--is-inverse</a>
|
|
76
|
+
</div>
|
|
77
|
+
<a className="link--is-inverse" href="/">
|
|
78
|
+
Inverse Link
|
|
79
|
+
</a>
|
|
80
|
+
<div className="bg-black">
|
|
81
|
+
<a className="link--orange" href="/">
|
|
82
|
+
Orange Inverse link without class .link--is-inverse
|
|
83
|
+
</a>
|
|
84
|
+
</div>
|
|
85
|
+
<a className="link--is-inverse link--orange" href="/">
|
|
86
|
+
Orange Inverse Link
|
|
87
|
+
</a>
|
|
88
|
+
</Preview>
|
|
89
|
+
|
|
90
|
+
### Black
|
|
91
|
+
|
|
92
|
+
Link stays black even during focus and hover. Should be used on orange backgrounds.
|
|
93
|
+
|
|
94
|
+
<Preview>
|
|
95
|
+
<div className="bg-orange">
|
|
96
|
+
<a className="link--black" href="/">
|
|
97
|
+
Black Link
|
|
98
|
+
</a>
|
|
99
|
+
</div>
|
|
100
|
+
</Preview>
|
|
101
|
+
|
|
102
|
+
### Default Important
|
|
103
|
+
|
|
104
|
+
When white background is used inside black background, links automatically use inverse styling and become white (invisible). Use `.link--default` class to force default black styling.
|
|
105
|
+
|
|
106
|
+
<Preview bgTheme="black">
|
|
107
|
+
<div className="bg-black">
|
|
108
|
+
<div className="bg-white">
|
|
109
|
+
<div className="d-block">
|
|
110
|
+
<a href="/">I don't have class link--default {':('}</a>
|
|
111
|
+
<a className="color-black">{"<-- there's a link"}</a>
|
|
112
|
+
</div>
|
|
113
|
+
<a className="link--default" href="/">
|
|
114
|
+
I do have class link--default {':)'}
|
|
115
|
+
</a>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
</Preview>
|
|
119
|
+
|
|
120
|
+
## Icon Integration
|
|
121
|
+
|
|
122
|
+
### With Icons
|
|
123
|
+
|
|
124
|
+
Links can include icons positioned to the left or right of the text.
|
|
125
|
+
|
|
126
|
+
<Preview>
|
|
127
|
+
<a href="/">
|
|
128
|
+
<Icon name="chevron-left" className="link__icon-left" />
|
|
129
|
+
Back
|
|
130
|
+
</a>
|
|
131
|
+
<br />
|
|
132
|
+
<a href="/">
|
|
133
|
+
Next
|
|
134
|
+
<Icon name="chevron-right" className="link__icon-right" />
|
|
135
|
+
</a>
|
|
136
|
+
<br />
|
|
137
|
+
<br />
|
|
138
|
+
<a href="/">
|
|
139
|
+
<Icon name="chevron-left" size="large" className="link__icon-left" />
|
|
140
|
+
Back
|
|
141
|
+
</a>
|
|
142
|
+
<br />
|
|
143
|
+
<a href="/">
|
|
144
|
+
Next
|
|
145
|
+
<Icon name="chevron-right" size="large" className="link__icon-right" />
|
|
146
|
+
</a>
|
|
147
|
+
</Preview>
|
|
148
|
+
|
|
149
|
+
## Element Types
|
|
150
|
+
|
|
151
|
+
### Render as Button
|
|
152
|
+
|
|
153
|
+
When a Link doesn't navigate but controls the document (e.g., opens a modal), it can be rendered as a `button` element.
|
|
154
|
+
|
|
155
|
+
<Preview>
|
|
156
|
+
<Link tag="button">Perform click action</Link>
|
|
157
|
+
</Preview>
|
|
158
|
+
|
|
159
|
+
## Use Cases
|
|
160
|
+
|
|
161
|
+
### 1. Navigation Links
|
|
162
|
+
- **Primary navigation**: Main menu items, breadcrumbs
|
|
163
|
+
- **Secondary navigation**: Footer links, sidebar navigation
|
|
164
|
+
- **Inline navigation**: Links within content text
|
|
165
|
+
|
|
166
|
+
### 2. Action Links
|
|
167
|
+
- **Modal triggers**: Opening dialogs, popups, or overlays
|
|
168
|
+
- **Form submissions**: Submit buttons styled as links
|
|
169
|
+
- **Toggle actions**: Show/hide content, expand/collapse sections
|
|
170
|
+
|
|
171
|
+
### 3. External Links
|
|
172
|
+
- **Social media**: Links to external platforms
|
|
173
|
+
- **Documentation**: Links to help pages, guides
|
|
174
|
+
- **Partner sites**: Affiliate or partner website links
|
|
175
|
+
|
|
176
|
+
### 4. Download Links
|
|
177
|
+
- **File downloads**: PDFs, documents, media files
|
|
178
|
+
- **Software downloads**: Applications, tools, utilities
|
|
179
|
+
|
|
180
|
+
### 5. Email Links
|
|
181
|
+
- **Contact information**: Email addresses with mailto: protocol
|
|
182
|
+
- **Support links**: Direct email to support teams
|
|
183
|
+
|
|
184
|
+
### 6. Phone Links
|
|
185
|
+
- **Contact numbers**: Phone numbers with tel: protocol
|
|
186
|
+
- **Support hotlines**: Direct calling to support
|
|
187
|
+
|
|
188
|
+
### 7. Back/Forward Navigation
|
|
189
|
+
- **Breadcrumb navigation**: Previous page links
|
|
190
|
+
- **Wizard steps**: Next/previous step navigation
|
|
191
|
+
- **Pagination**: Page navigation controls
|
|
192
|
+
|
|
193
|
+
### 8. Contextual Links
|
|
194
|
+
- **Related content**: "See also" links
|
|
195
|
+
- **Reference links**: Citations, sources, footnotes
|
|
196
|
+
- **Cross-references**: Links to related sections
|
|
197
|
+
|
|
198
|
+
### 9. Call-to-Action Links
|
|
199
|
+
- **Primary CTAs**: "Get Started", "Learn More", "Sign Up"
|
|
200
|
+
- **Secondary CTAs**: "Cancel", "Back", "Skip"
|
|
201
|
+
|
|
202
|
+
### 10. Accessibility Links
|
|
203
|
+
- **Skip links**: Jump to main content
|
|
204
|
+
- **Accessibility help**: Screen reader support links
|
|
205
|
+
|
|
206
|
+
## Accessibility
|
|
207
|
+
|
|
208
|
+
### Color Contrast
|
|
209
|
+
Orange links on white background do not meet [Success Criterion 1.4.3: Contrast (Minimum)](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html) due to insufficient contrast between white and orange brand colors.
|
|
210
|
+
|
|
211
|
+
### Focus States
|
|
212
|
+
All links have visible focus states with proper contrast and outline styling.
|
|
213
|
+
|
|
214
|
+
### Screen Reader Support
|
|
215
|
+
- Links are properly announced to screen readers
|
|
216
|
+
- Icon-only links should include descriptive text
|
|
217
|
+
- External links should indicate they open in new windows
|
|
218
|
+
|
|
219
|
+
### Keyboard Navigation
|
|
220
|
+
- All links are keyboard accessible
|
|
221
|
+
- Focus order follows logical document flow
|
|
222
|
+
- Focus indicators are clearly visible
|
|
223
|
+
|
|
224
|
+
<ComponentDocs component={Link} />
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import cx from "classnames";
|
|
3
|
+
|
|
4
|
+
const CLASS_ROOT = "link";
|
|
5
|
+
|
|
6
|
+
export interface LinkProps {
|
|
7
|
+
/** link color. default color is black, and inverts to white */
|
|
8
|
+
color?: "default" | "orange" | "black";
|
|
9
|
+
/** destination address */
|
|
10
|
+
href?: string;
|
|
11
|
+
/** invert link color for dark background */
|
|
12
|
+
isInverse?: boolean;
|
|
13
|
+
/** rendereded HTML element */
|
|
14
|
+
tag?: "a" | "button";
|
|
15
|
+
/** additional CSS classes */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** link content */
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const Link: React.FC<LinkProps & React.HTMLAttributes<HTMLElement>> = ({
|
|
22
|
+
className,
|
|
23
|
+
children,
|
|
24
|
+
color,
|
|
25
|
+
isInverse,
|
|
26
|
+
tag = "a",
|
|
27
|
+
href,
|
|
28
|
+
...other
|
|
29
|
+
}) => {
|
|
30
|
+
const classes = cx(
|
|
31
|
+
CLASS_ROOT,
|
|
32
|
+
{
|
|
33
|
+
[`${CLASS_ROOT}--is-inverse`]: isInverse,
|
|
34
|
+
[`${CLASS_ROOT}--${color}`]: color,
|
|
35
|
+
},
|
|
36
|
+
className,
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
if (tag === "a" && !href) {
|
|
40
|
+
console.warn(
|
|
41
|
+
"Anchor element requires a valid address. Provide a valid, navigable address as the href value. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#href",
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return React.createElement(
|
|
46
|
+
tag,
|
|
47
|
+
{ href, className: classes, ...other },
|
|
48
|
+
children,
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
Link.displayName = "Link";
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
@use '../../../styles/tokens/color';
|
|
2
|
+
|
|
3
|
+
$variants: (
|
|
4
|
+
'default': (
|
|
5
|
+
'default': (
|
|
6
|
+
color: color.$black,
|
|
7
|
+
),
|
|
8
|
+
'hover': (
|
|
9
|
+
color: color.$orange-dark,
|
|
10
|
+
),
|
|
11
|
+
'focus': (
|
|
12
|
+
color: color.$white,
|
|
13
|
+
background-color: color.$info,
|
|
14
|
+
box-shadow: 0 2px 0 0 color.$black,
|
|
15
|
+
text-decoration: none,
|
|
16
|
+
outline-width: 0 !important,
|
|
17
|
+
outline-color: transparent !important,
|
|
18
|
+
)
|
|
19
|
+
),
|
|
20
|
+
'default-important': (
|
|
21
|
+
'default': (
|
|
22
|
+
color: color.$black !important,
|
|
23
|
+
),
|
|
24
|
+
'hover': (
|
|
25
|
+
color: color.$orange-dark !important,
|
|
26
|
+
),
|
|
27
|
+
'focus': (
|
|
28
|
+
color: color.$white !important,
|
|
29
|
+
box-shadow: 0 2px 0 0 color.$black !important,
|
|
30
|
+
)
|
|
31
|
+
),
|
|
32
|
+
'black': (
|
|
33
|
+
'default': (
|
|
34
|
+
color: color.$black !important,
|
|
35
|
+
),
|
|
36
|
+
'hover': (
|
|
37
|
+
color: color.$black !important,
|
|
38
|
+
),
|
|
39
|
+
'focus': (
|
|
40
|
+
color: color.$white !important,
|
|
41
|
+
box-shadow: 0 2px 0 0 color.$white !important,
|
|
42
|
+
)
|
|
43
|
+
),
|
|
44
|
+
'default-inverse': (
|
|
45
|
+
'default': (
|
|
46
|
+
color: color.$white,
|
|
47
|
+
),
|
|
48
|
+
'hover': (
|
|
49
|
+
color: color.$orange,
|
|
50
|
+
),
|
|
51
|
+
'focus': (
|
|
52
|
+
box-shadow: 0 2px 0 0 color.$white,
|
|
53
|
+
)
|
|
54
|
+
),
|
|
55
|
+
'inverse-important': (
|
|
56
|
+
'default': (
|
|
57
|
+
color: color.$white !important,
|
|
58
|
+
),
|
|
59
|
+
'hover': (
|
|
60
|
+
color: color.$orange !important,
|
|
61
|
+
),
|
|
62
|
+
'focus': (
|
|
63
|
+
box-shadow: 0 2px 0 0 color.$white !important,
|
|
64
|
+
)
|
|
65
|
+
),
|
|
66
|
+
'orange': (
|
|
67
|
+
'default': (
|
|
68
|
+
color: color.$orange-dark !important,
|
|
69
|
+
),
|
|
70
|
+
'hover': (
|
|
71
|
+
color: color.$black !important,
|
|
72
|
+
),
|
|
73
|
+
),
|
|
74
|
+
'orange-inverse': (
|
|
75
|
+
'default': (
|
|
76
|
+
color: color.$orange !important,
|
|
77
|
+
),
|
|
78
|
+
'hover': (
|
|
79
|
+
color: color.$white !important,
|
|
80
|
+
),
|
|
81
|
+
'focus': (
|
|
82
|
+
color: color.$white !important,
|
|
83
|
+
)
|
|
84
|
+
),
|
|
85
|
+
);
|