@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,1170 @@
|
|
|
1
|
+
import React, { createContext, useRef, useEffect, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
function _arrayLikeToArray(r, a) {
|
|
4
|
+
(null == a || a > r.length) && (a = r.length);
|
|
5
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
6
|
+
return n;
|
|
7
|
+
}
|
|
8
|
+
function _arrayWithoutHoles(r) {
|
|
9
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
10
|
+
}
|
|
11
|
+
function _classCallCheck(a, n) {
|
|
12
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
13
|
+
}
|
|
14
|
+
function _defineProperties(e, r) {
|
|
15
|
+
for (var t = 0; t < r.length; t++) {
|
|
16
|
+
var o = r[t];
|
|
17
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function _createClass(e, r, t) {
|
|
21
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
22
|
+
writable: false
|
|
23
|
+
}), e;
|
|
24
|
+
}
|
|
25
|
+
function _defineProperty(e, r, t) {
|
|
26
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
27
|
+
value: t,
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true
|
|
31
|
+
}) : e[r] = t, e;
|
|
32
|
+
}
|
|
33
|
+
function _iterableToArray(r) {
|
|
34
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
35
|
+
}
|
|
36
|
+
function _nonIterableSpread() {
|
|
37
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
38
|
+
}
|
|
39
|
+
function ownKeys(e, r) {
|
|
40
|
+
var t = Object.keys(e);
|
|
41
|
+
if (Object.getOwnPropertySymbols) {
|
|
42
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
43
|
+
r && (o = o.filter(function (r) {
|
|
44
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
45
|
+
})), t.push.apply(t, o);
|
|
46
|
+
}
|
|
47
|
+
return t;
|
|
48
|
+
}
|
|
49
|
+
function _objectSpread2(e) {
|
|
50
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
51
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
52
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
53
|
+
_defineProperty(e, r, t[r]);
|
|
54
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
55
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return e;
|
|
59
|
+
}
|
|
60
|
+
function _toConsumableArray(r) {
|
|
61
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
62
|
+
}
|
|
63
|
+
function _toPrimitive(t, r) {
|
|
64
|
+
if ("object" != typeof t || !t) return t;
|
|
65
|
+
var e = t[Symbol.toPrimitive];
|
|
66
|
+
if (void 0 !== e) {
|
|
67
|
+
var i = e.call(t, r);
|
|
68
|
+
if ("object" != typeof i) return i;
|
|
69
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
70
|
+
}
|
|
71
|
+
return (String )(t);
|
|
72
|
+
}
|
|
73
|
+
function _toPropertyKey(t) {
|
|
74
|
+
var i = _toPrimitive(t, "string");
|
|
75
|
+
return "symbol" == typeof i ? i : i + "";
|
|
76
|
+
}
|
|
77
|
+
function _unsupportedIterableToArray(r, a) {
|
|
78
|
+
if (r) {
|
|
79
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
80
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
81
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/******************************************************************************
|
|
86
|
+
Copyright (c) Microsoft Corporation.
|
|
87
|
+
|
|
88
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
89
|
+
purpose with or without fee is hereby granted.
|
|
90
|
+
|
|
91
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
92
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
93
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
94
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
95
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
96
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
97
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
98
|
+
***************************************************************************** */
|
|
99
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
function __rest(s, e) {
|
|
103
|
+
var t = {};
|
|
104
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
105
|
+
t[p] = s[p];
|
|
106
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
107
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
108
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
109
|
+
t[p[i]] = s[p[i]];
|
|
110
|
+
}
|
|
111
|
+
return t;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
115
|
+
var e = new Error(message);
|
|
116
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
function getDefaultExportFromCjs (x) {
|
|
120
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
var classnames = {exports: {}};
|
|
124
|
+
|
|
125
|
+
/*!
|
|
126
|
+
Copyright (c) 2018 Jed Watson.
|
|
127
|
+
Licensed under the MIT License (MIT), see
|
|
128
|
+
http://jedwatson.github.io/classnames
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
var hasRequiredClassnames;
|
|
132
|
+
|
|
133
|
+
function requireClassnames () {
|
|
134
|
+
if (hasRequiredClassnames) return classnames.exports;
|
|
135
|
+
hasRequiredClassnames = 1;
|
|
136
|
+
(function (module) {
|
|
137
|
+
/* global define */
|
|
138
|
+
|
|
139
|
+
(function () {
|
|
140
|
+
|
|
141
|
+
var hasOwn = {}.hasOwnProperty;
|
|
142
|
+
|
|
143
|
+
function classNames () {
|
|
144
|
+
var classes = '';
|
|
145
|
+
|
|
146
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
147
|
+
var arg = arguments[i];
|
|
148
|
+
if (arg) {
|
|
149
|
+
classes = appendClass(classes, parseValue(arg));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return classes;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function parseValue (arg) {
|
|
157
|
+
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
158
|
+
return arg;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (typeof arg !== 'object') {
|
|
162
|
+
return '';
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (Array.isArray(arg)) {
|
|
166
|
+
return classNames.apply(null, arg);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
170
|
+
return arg.toString();
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
var classes = '';
|
|
174
|
+
|
|
175
|
+
for (var key in arg) {
|
|
176
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
177
|
+
classes = appendClass(classes, key);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return classes;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function appendClass (value, newClass) {
|
|
185
|
+
if (!newClass) {
|
|
186
|
+
return value;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if (value) {
|
|
190
|
+
return value + ' ' + newClass;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return value + newClass;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
if (module.exports) {
|
|
197
|
+
classNames.default = classNames;
|
|
198
|
+
module.exports = classNames;
|
|
199
|
+
} else {
|
|
200
|
+
window.classNames = classNames;
|
|
201
|
+
}
|
|
202
|
+
}());
|
|
203
|
+
} (classnames));
|
|
204
|
+
return classnames.exports;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
var classnamesExports = requireClassnames();
|
|
208
|
+
var cx = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
209
|
+
|
|
210
|
+
// we use array to include old browser key names like IE11
|
|
211
|
+
// ie. navigation keys https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values#navigation_keys
|
|
212
|
+
var keys = {
|
|
213
|
+
TAB: ['Tab'],
|
|
214
|
+
ARROWLEFT: ['Left', 'ArrowLeft'],
|
|
215
|
+
ARROWUP: ['Up', 'ArrowUp'],
|
|
216
|
+
ARROWRIGHT: ['Right', 'ArrowRight'],
|
|
217
|
+
ARROWDOWN: ['Down', 'ArrowDown']
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
var RovingTabindex = /*#__PURE__*/function () {
|
|
221
|
+
function RovingTabindex(elems) {
|
|
222
|
+
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
223
|
+
direction: 'horizontal'
|
|
224
|
+
};
|
|
225
|
+
_classCallCheck(this, RovingTabindex);
|
|
226
|
+
this.elems = elems;
|
|
227
|
+
this.config = config;
|
|
228
|
+
this.isActive = false;
|
|
229
|
+
this.onKeydown = this.onKeydown.bind(this);
|
|
230
|
+
}
|
|
231
|
+
return _createClass(RovingTabindex, [{
|
|
232
|
+
key: "init",
|
|
233
|
+
value: function init() {
|
|
234
|
+
document.addEventListener('keydown', this.onKeydown);
|
|
235
|
+
this.isActive = true;
|
|
236
|
+
}
|
|
237
|
+
}, {
|
|
238
|
+
key: "destroy",
|
|
239
|
+
value: function destroy() {
|
|
240
|
+
document.removeEventListener('keydown', this.onKeydown);
|
|
241
|
+
this.isActive = false;
|
|
242
|
+
}
|
|
243
|
+
}, {
|
|
244
|
+
key: "update",
|
|
245
|
+
value: function update(elems) {
|
|
246
|
+
this.elems = elems;
|
|
247
|
+
}
|
|
248
|
+
}, {
|
|
249
|
+
key: "onKeydown",
|
|
250
|
+
value: function onKeydown(e) {
|
|
251
|
+
var activeElemIndex = this.elems.indexOf(document.activeElement);
|
|
252
|
+
if ((keys.ARROWUP.includes(e.key) || keys.ARROWDOWN.includes(e.key)) && this.config.direction === 'horizontal') {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
if ((keys.ARROWLEFT.includes(e.key) || keys.ARROWRIGHT.includes(e.key)) && this.config.direction === 'vertical') {
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
if (keys.ARROWDOWN.includes(e.key) || keys.ARROWRIGHT.includes(e.key)) {
|
|
259
|
+
e.preventDefault();
|
|
260
|
+
if (activeElemIndex >= 0 && activeElemIndex < this.elems.length - 1) {
|
|
261
|
+
this.elems[activeElemIndex + 1].focus();
|
|
262
|
+
} else {
|
|
263
|
+
this.elems[0].focus();
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
if (keys.ARROWUP.includes(e.key) || keys.ARROWLEFT.includes(e.key)) {
|
|
267
|
+
e.preventDefault();
|
|
268
|
+
if (activeElemIndex >= 1) {
|
|
269
|
+
this.elems[activeElemIndex - 1].focus();
|
|
270
|
+
} else {
|
|
271
|
+
this.elems[this.elems.length - 1].focus();
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
if (keys.TAB.includes(e.key)) {
|
|
275
|
+
this.destroy();
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}]);
|
|
279
|
+
}();
|
|
280
|
+
|
|
281
|
+
var TRIGGER_EVT = 'toggleTrigger';
|
|
282
|
+
var TOGGLE_EVT = 'toggle';
|
|
283
|
+
var defaultConfig$1 = {
|
|
284
|
+
activeClass: 'is-active',
|
|
285
|
+
settingsAttr: 'data-toggle'
|
|
286
|
+
};
|
|
287
|
+
var Toggle = /*#__PURE__*/function () {
|
|
288
|
+
function Toggle(element, config) {
|
|
289
|
+
_classCallCheck(this, Toggle);
|
|
290
|
+
this.element = element;
|
|
291
|
+
this.config = _objectSpread2(_objectSpread2({}, defaultConfig$1), config);
|
|
292
|
+
this.settings = {};
|
|
293
|
+
this.targets = [];
|
|
294
|
+
this.handleClick = this.handleClick.bind(this);
|
|
295
|
+
this.element.ODS_Toggle = this;
|
|
296
|
+
this.init();
|
|
297
|
+
return this;
|
|
298
|
+
}
|
|
299
|
+
return _createClass(Toggle, [{
|
|
300
|
+
key: "doToggle",
|
|
301
|
+
value: function doToggle(props) {
|
|
302
|
+
var _props$dispatchEvent = props.dispatchEvent,
|
|
303
|
+
dispatchEvent = _props$dispatchEvent === void 0 ? true : _props$dispatchEvent;
|
|
304
|
+
var element = props.element,
|
|
305
|
+
attribute = props.attribute,
|
|
306
|
+
value = props.value,
|
|
307
|
+
action = props.action;
|
|
308
|
+
var returnProps = _objectSpread2({}, props);
|
|
309
|
+
var eventDetail = {
|
|
310
|
+
trigger: this.element,
|
|
311
|
+
element: element
|
|
312
|
+
};
|
|
313
|
+
if (attribute === 'icon') {
|
|
314
|
+
attribute = 'xlink:href';
|
|
315
|
+
element = element.querySelector('use');
|
|
316
|
+
}
|
|
317
|
+
if (attribute === 'text') {
|
|
318
|
+
element = element.querySelector('[data-toggle-text-target]') || element;
|
|
319
|
+
}
|
|
320
|
+
if (typeof value === 'undefined') {
|
|
321
|
+
value = false;
|
|
322
|
+
}
|
|
323
|
+
returnProps.value = toggle({
|
|
324
|
+
element: element,
|
|
325
|
+
attribute: attribute,
|
|
326
|
+
action: action,
|
|
327
|
+
value: value,
|
|
328
|
+
dispatchEvent: dispatchEvent,
|
|
329
|
+
eventDetail: eventDetail
|
|
330
|
+
});
|
|
331
|
+
return returnProps;
|
|
332
|
+
}
|
|
333
|
+
}, {
|
|
334
|
+
key: "init",
|
|
335
|
+
value: function init() {
|
|
336
|
+
this.settings = this.parseSettings();
|
|
337
|
+
this.targets = this.setupTargets();
|
|
338
|
+
this.element.addEventListener('click', this.handleClick);
|
|
339
|
+
return this.targets;
|
|
340
|
+
}
|
|
341
|
+
}, {
|
|
342
|
+
key: "handleClick",
|
|
343
|
+
value: function handleClick() {
|
|
344
|
+
var _this = this;
|
|
345
|
+
this.targets = this.targets.map(function (target) {
|
|
346
|
+
return _this.doToggle(target);
|
|
347
|
+
});
|
|
348
|
+
this.element.dispatchEvent(new CustomEvent(TRIGGER_EVT, {
|
|
349
|
+
bubbles: true
|
|
350
|
+
}));
|
|
351
|
+
}
|
|
352
|
+
}, {
|
|
353
|
+
key: "destroy",
|
|
354
|
+
value: function destroy() {
|
|
355
|
+
this.element.removeEventListener('click', this.handleClick);
|
|
356
|
+
this.settings = [];
|
|
357
|
+
this.targets = [];
|
|
358
|
+
}
|
|
359
|
+
}, {
|
|
360
|
+
key: "update",
|
|
361
|
+
value: function update() {
|
|
362
|
+
this.removeNonExistentTargets();
|
|
363
|
+
this.addNewTargets();
|
|
364
|
+
}
|
|
365
|
+
}, {
|
|
366
|
+
key: "parseSettings",
|
|
367
|
+
value: function parseSettings() {
|
|
368
|
+
var jsonSettings = this.element.getAttribute(this.config.settingsAttr);
|
|
369
|
+
var ariaControls = this.element.getAttribute('aria-controls');
|
|
370
|
+
var settings = JSON.parse(jsonSettings);
|
|
371
|
+
if (ariaControls) {
|
|
372
|
+
var ariaExpanded = this.element.getAttribute('aria-expanded');
|
|
373
|
+
settings = [].concat(_toConsumableArray(ariaExpanded ? [{
|
|
374
|
+
target: 'self',
|
|
375
|
+
attribute: 'aria-expanded'
|
|
376
|
+
}] : []), [{
|
|
377
|
+
target: ariaControls.split(' ').map(function (a) {
|
|
378
|
+
return "#".concat(a);
|
|
379
|
+
}).join(','),
|
|
380
|
+
attribute: 'hidden'
|
|
381
|
+
}], _toConsumableArray(Array.isArray(settings) ? settings : []));
|
|
382
|
+
}
|
|
383
|
+
return settings;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// get all the possible settings for all target elements
|
|
387
|
+
}, {
|
|
388
|
+
key: "setupTargets",
|
|
389
|
+
value: function setupTargets() {
|
|
390
|
+
var trigger = this.element;
|
|
391
|
+
return this.settings.reduce(function (allSettings, setting) {
|
|
392
|
+
return [].concat(_toConsumableArray(allSettings), _toConsumableArray(setting === null || setting === void 0 ? void 0 : setting.target.split(',') // separate target selectors
|
|
393
|
+
.reduce(function (targetSettings, target) {
|
|
394
|
+
return [].concat(_toConsumableArray(targetSettings), _toConsumableArray(Toggle
|
|
395
|
+
// get target elements from DOM
|
|
396
|
+
.getTargetElementsFromString({
|
|
397
|
+
target: target,
|
|
398
|
+
trigger: trigger
|
|
399
|
+
})
|
|
400
|
+
// duplicate setting for each DOM element
|
|
401
|
+
.map(function (element) {
|
|
402
|
+
return _objectSpread2(_objectSpread2({}, setting), {}, {
|
|
403
|
+
element: element
|
|
404
|
+
});
|
|
405
|
+
})));
|
|
406
|
+
}, [])));
|
|
407
|
+
}, []);
|
|
408
|
+
}
|
|
409
|
+
}, {
|
|
410
|
+
key: "removeNonExistentTargets",
|
|
411
|
+
value: function removeNonExistentTargets() {
|
|
412
|
+
this.targets = this.targets.filter(function (target) {
|
|
413
|
+
return document.contains(target.element);
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
}, {
|
|
417
|
+
key: "addNewTargets",
|
|
418
|
+
value: function addNewTargets() {
|
|
419
|
+
var _this2 = this;
|
|
420
|
+
var allTargets = this.setupTargets();
|
|
421
|
+
var newTargets = allTargets.filter(function (newTarget) {
|
|
422
|
+
return !_this2.targets.find(function (target) {
|
|
423
|
+
return target.element === newTarget.element && target.action === newTarget.action;
|
|
424
|
+
});
|
|
425
|
+
});
|
|
426
|
+
this.targets = [].concat(_toConsumableArray(this.targets), _toConsumableArray(newTargets));
|
|
427
|
+
}
|
|
428
|
+
}], [{
|
|
429
|
+
key: "getTargetElementsFromString",
|
|
430
|
+
value: function getTargetElementsFromString(_ref) {
|
|
431
|
+
var target = _ref.target,
|
|
432
|
+
trigger = _ref.trigger;
|
|
433
|
+
var selector = target.trim();
|
|
434
|
+
if (selector === 'self') {
|
|
435
|
+
return [trigger];
|
|
436
|
+
}
|
|
437
|
+
if (selector === 'parent') {
|
|
438
|
+
return [trigger.parentNode];
|
|
439
|
+
}
|
|
440
|
+
if (selector === 'previous') {
|
|
441
|
+
return [trigger.previousElementSibling];
|
|
442
|
+
}
|
|
443
|
+
if (selector === 'next') {
|
|
444
|
+
return [trigger.nextElementSibling];
|
|
445
|
+
}
|
|
446
|
+
if (typeof selector === 'string') {
|
|
447
|
+
// don't be tempted to remove this querySelectorAll
|
|
448
|
+
// selector like '.target-elements' whould not work as expected
|
|
449
|
+
return Array.from(document.querySelectorAll(selector));
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
// add log why we endup here
|
|
453
|
+
return selector;
|
|
454
|
+
}
|
|
455
|
+
}, {
|
|
456
|
+
key: "getInstance",
|
|
457
|
+
value: function getInstance(el) {
|
|
458
|
+
return el && el.ODS_Toggle ? el.ODS_Toggle : null;
|
|
459
|
+
}
|
|
460
|
+
}]);
|
|
461
|
+
}();
|
|
462
|
+
Toggle.getTargetElements;
|
|
463
|
+
Toggle.setTargets;
|
|
464
|
+
|
|
465
|
+
function toggle(props) {
|
|
466
|
+
var element = props.element,
|
|
467
|
+
attribute = props.attribute,
|
|
468
|
+
action = props.action,
|
|
469
|
+
value = props.value,
|
|
470
|
+
_props$dispatchEvent = props.dispatchEvent,
|
|
471
|
+
dispatchEvent = _props$dispatchEvent === void 0 ? true : _props$dispatchEvent,
|
|
472
|
+
eventDetail = props.eventDetail;
|
|
473
|
+
var returnValue = null;
|
|
474
|
+
if (!element || !(element instanceof Element)) {
|
|
475
|
+
return returnValue;
|
|
476
|
+
}
|
|
477
|
+
if (action === 'focus') {
|
|
478
|
+
setTimeout(element.focus(), 20);
|
|
479
|
+
}
|
|
480
|
+
if (action === 'click') {
|
|
481
|
+
element.click();
|
|
482
|
+
}
|
|
483
|
+
if (attribute === 'class') {
|
|
484
|
+
element.classList.toggle(value);
|
|
485
|
+
returnValue = value;
|
|
486
|
+
}
|
|
487
|
+
if (attribute === 'text') {
|
|
488
|
+
var oldText = element.textContent;
|
|
489
|
+
element.textContent = value;
|
|
490
|
+
returnValue = oldText;
|
|
491
|
+
}
|
|
492
|
+
if (attribute !== 'class' && attribute !== 'text' && typeof action === 'undefined') {
|
|
493
|
+
returnValue = element.getAttribute(attribute);
|
|
494
|
+
if (attribute === 'hidden') {
|
|
495
|
+
if (element.hasAttribute(attribute)) {
|
|
496
|
+
element.removeAttribute(attribute);
|
|
497
|
+
} else {
|
|
498
|
+
element.setAttribute(attribute, '');
|
|
499
|
+
}
|
|
500
|
+
} else if (!value) {
|
|
501
|
+
element.setAttribute(attribute, !(returnValue === 'true'));
|
|
502
|
+
} else {
|
|
503
|
+
element.setAttribute(attribute, value);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
if (dispatchEvent) {
|
|
507
|
+
element.dispatchEvent(new CustomEvent(TOGGLE_EVT, {
|
|
508
|
+
detail: eventDetail,
|
|
509
|
+
bubbles: true
|
|
510
|
+
}));
|
|
511
|
+
}
|
|
512
|
+
return returnValue;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
var defaultConfig = {
|
|
516
|
+
buttonSelector: '[data-accordion-toggle]'
|
|
517
|
+
};
|
|
518
|
+
var Accordion$1 = /*#__PURE__*/function () {
|
|
519
|
+
function Accordion(element, config) {
|
|
520
|
+
_classCallCheck(this, Accordion);
|
|
521
|
+
this.element = element;
|
|
522
|
+
this.config = Object.assign(Object.assign({}, defaultConfig), config);
|
|
523
|
+
this.onFocus = this.onFocus.bind(this);
|
|
524
|
+
this.onClick = this.onClick.bind(this);
|
|
525
|
+
this.element.ODS_Accordion = this;
|
|
526
|
+
this.init();
|
|
527
|
+
return this;
|
|
528
|
+
}
|
|
529
|
+
return _createClass(Accordion, [{
|
|
530
|
+
key: "onFocus",
|
|
531
|
+
value: function onFocus(e) {
|
|
532
|
+
if (!this.rovingTabindex.isActive) {
|
|
533
|
+
this.rovingTabindex.init();
|
|
534
|
+
}
|
|
535
|
+
var button = e.currentTarget;
|
|
536
|
+
if (window.location.hash.substring(1) === button.getAttribute('id') && button.getAttribute('aria-expanded') === 'false') {
|
|
537
|
+
button.click();
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}, {
|
|
541
|
+
key: "init",
|
|
542
|
+
value: function init() {
|
|
543
|
+
var _this = this;
|
|
544
|
+
this.buttons = Array.from(this.element.querySelectorAll(this.config.buttonSelector));
|
|
545
|
+
if (!this.rovingTabindex) {
|
|
546
|
+
this.rovingTabindex = new RovingTabindex(this.buttons, {
|
|
547
|
+
direction: 'vertical'
|
|
548
|
+
});
|
|
549
|
+
} else {
|
|
550
|
+
this.rovingTabindex.update(this.buttons);
|
|
551
|
+
}
|
|
552
|
+
this.buttons.forEach(function (button) {
|
|
553
|
+
button.addEventListener('focus', _this.onFocus);
|
|
554
|
+
// only add click events when there are no toggle actions defined
|
|
555
|
+
if (!button.getAttribute('data-toggle')) {
|
|
556
|
+
button.addEventListener('click', _this.onClick);
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
}, {
|
|
561
|
+
key: "onClick",
|
|
562
|
+
value: function onClick(e) {
|
|
563
|
+
var button = e.currentTarget;
|
|
564
|
+
var accordionSection = this.element.querySelector("#".concat(button.getAttribute('aria-controls')));
|
|
565
|
+
toggle({
|
|
566
|
+
element: button,
|
|
567
|
+
attribute: 'aria-expanded'
|
|
568
|
+
});
|
|
569
|
+
toggle({
|
|
570
|
+
element: accordionSection,
|
|
571
|
+
attribute: 'hidden'
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
}, {
|
|
575
|
+
key: "destroy",
|
|
576
|
+
value: function destroy() {
|
|
577
|
+
var _this2 = this;
|
|
578
|
+
this.rovingTabindex.destroy();
|
|
579
|
+
this.buttons.forEach(function (button) {
|
|
580
|
+
button.removeEventListener('focus', _this2.onFocus);
|
|
581
|
+
button.removeEventListener('click', _this2.onClick);
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
}, {
|
|
585
|
+
key: "update",
|
|
586
|
+
value: function update() {
|
|
587
|
+
this.destroy();
|
|
588
|
+
this.init();
|
|
589
|
+
}
|
|
590
|
+
}], [{
|
|
591
|
+
key: "getInstance",
|
|
592
|
+
value: function getInstance(el) {
|
|
593
|
+
return el && el.ODS_Accordion ? el.ODS_Accordion : null;
|
|
594
|
+
}
|
|
595
|
+
}]);
|
|
596
|
+
}();
|
|
597
|
+
|
|
598
|
+
var HeadingContext = /*#__PURE__*/createContext(null);
|
|
599
|
+
|
|
600
|
+
var jsxRuntime = {exports: {}};
|
|
601
|
+
|
|
602
|
+
var reactJsxRuntime_production = {};
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* @license React
|
|
606
|
+
* react-jsx-runtime.production.js
|
|
607
|
+
*
|
|
608
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
609
|
+
*
|
|
610
|
+
* This source code is licensed under the MIT license found in the
|
|
611
|
+
* LICENSE file in the root directory of this source tree.
|
|
612
|
+
*/
|
|
613
|
+
|
|
614
|
+
var hasRequiredReactJsxRuntime_production;
|
|
615
|
+
|
|
616
|
+
function requireReactJsxRuntime_production () {
|
|
617
|
+
if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
|
|
618
|
+
hasRequiredReactJsxRuntime_production = 1;
|
|
619
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
620
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
621
|
+
function jsxProd(type, config, maybeKey) {
|
|
622
|
+
var key = null;
|
|
623
|
+
void 0 !== maybeKey && (key = "" + maybeKey);
|
|
624
|
+
void 0 !== config.key && (key = "" + config.key);
|
|
625
|
+
if ("key" in config) {
|
|
626
|
+
maybeKey = {};
|
|
627
|
+
for (var propName in config)
|
|
628
|
+
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
629
|
+
} else maybeKey = config;
|
|
630
|
+
config = maybeKey.ref;
|
|
631
|
+
return {
|
|
632
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
633
|
+
type: type,
|
|
634
|
+
key: key,
|
|
635
|
+
ref: void 0 !== config ? config : null,
|
|
636
|
+
props: maybeKey
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
|
|
640
|
+
reactJsxRuntime_production.jsx = jsxProd;
|
|
641
|
+
reactJsxRuntime_production.jsxs = jsxProd;
|
|
642
|
+
return reactJsxRuntime_production;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
var reactJsxRuntime_development = {};
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* @license React
|
|
649
|
+
* react-jsx-runtime.development.js
|
|
650
|
+
*
|
|
651
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
652
|
+
*
|
|
653
|
+
* This source code is licensed under the MIT license found in the
|
|
654
|
+
* LICENSE file in the root directory of this source tree.
|
|
655
|
+
*/
|
|
656
|
+
|
|
657
|
+
var hasRequiredReactJsxRuntime_development;
|
|
658
|
+
|
|
659
|
+
function requireReactJsxRuntime_development () {
|
|
660
|
+
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
661
|
+
hasRequiredReactJsxRuntime_development = 1;
|
|
662
|
+
"production" !== process.env.NODE_ENV &&
|
|
663
|
+
(function () {
|
|
664
|
+
function getComponentNameFromType(type) {
|
|
665
|
+
if (null == type) return null;
|
|
666
|
+
if ("function" === typeof type)
|
|
667
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE
|
|
668
|
+
? null
|
|
669
|
+
: type.displayName || type.name || null;
|
|
670
|
+
if ("string" === typeof type) return type;
|
|
671
|
+
switch (type) {
|
|
672
|
+
case REACT_FRAGMENT_TYPE:
|
|
673
|
+
return "Fragment";
|
|
674
|
+
case REACT_PROFILER_TYPE:
|
|
675
|
+
return "Profiler";
|
|
676
|
+
case REACT_STRICT_MODE_TYPE:
|
|
677
|
+
return "StrictMode";
|
|
678
|
+
case REACT_SUSPENSE_TYPE:
|
|
679
|
+
return "Suspense";
|
|
680
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
681
|
+
return "SuspenseList";
|
|
682
|
+
case REACT_ACTIVITY_TYPE:
|
|
683
|
+
return "Activity";
|
|
684
|
+
}
|
|
685
|
+
if ("object" === typeof type)
|
|
686
|
+
switch (
|
|
687
|
+
("number" === typeof type.tag &&
|
|
688
|
+
console.error(
|
|
689
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
690
|
+
),
|
|
691
|
+
type.$$typeof)
|
|
692
|
+
) {
|
|
693
|
+
case REACT_PORTAL_TYPE:
|
|
694
|
+
return "Portal";
|
|
695
|
+
case REACT_CONTEXT_TYPE:
|
|
696
|
+
return (type.displayName || "Context") + ".Provider";
|
|
697
|
+
case REACT_CONSUMER_TYPE:
|
|
698
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
699
|
+
case REACT_FORWARD_REF_TYPE:
|
|
700
|
+
var innerType = type.render;
|
|
701
|
+
type = type.displayName;
|
|
702
|
+
type ||
|
|
703
|
+
((type = innerType.displayName || innerType.name || ""),
|
|
704
|
+
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
|
|
705
|
+
return type;
|
|
706
|
+
case REACT_MEMO_TYPE:
|
|
707
|
+
return (
|
|
708
|
+
(innerType = type.displayName || null),
|
|
709
|
+
null !== innerType
|
|
710
|
+
? innerType
|
|
711
|
+
: getComponentNameFromType(type.type) || "Memo"
|
|
712
|
+
);
|
|
713
|
+
case REACT_LAZY_TYPE:
|
|
714
|
+
innerType = type._payload;
|
|
715
|
+
type = type._init;
|
|
716
|
+
try {
|
|
717
|
+
return getComponentNameFromType(type(innerType));
|
|
718
|
+
} catch (x) {}
|
|
719
|
+
}
|
|
720
|
+
return null;
|
|
721
|
+
}
|
|
722
|
+
function testStringCoercion(value) {
|
|
723
|
+
return "" + value;
|
|
724
|
+
}
|
|
725
|
+
function checkKeyStringCoercion(value) {
|
|
726
|
+
try {
|
|
727
|
+
testStringCoercion(value);
|
|
728
|
+
var JSCompiler_inline_result = !1;
|
|
729
|
+
} catch (e) {
|
|
730
|
+
JSCompiler_inline_result = true;
|
|
731
|
+
}
|
|
732
|
+
if (JSCompiler_inline_result) {
|
|
733
|
+
JSCompiler_inline_result = console;
|
|
734
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
735
|
+
var JSCompiler_inline_result$jscomp$0 =
|
|
736
|
+
("function" === typeof Symbol &&
|
|
737
|
+
Symbol.toStringTag &&
|
|
738
|
+
value[Symbol.toStringTag]) ||
|
|
739
|
+
value.constructor.name ||
|
|
740
|
+
"Object";
|
|
741
|
+
JSCompiler_temp_const.call(
|
|
742
|
+
JSCompiler_inline_result,
|
|
743
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
744
|
+
JSCompiler_inline_result$jscomp$0
|
|
745
|
+
);
|
|
746
|
+
return testStringCoercion(value);
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
function getTaskName(type) {
|
|
750
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
751
|
+
if (
|
|
752
|
+
"object" === typeof type &&
|
|
753
|
+
null !== type &&
|
|
754
|
+
type.$$typeof === REACT_LAZY_TYPE
|
|
755
|
+
)
|
|
756
|
+
return "<...>";
|
|
757
|
+
try {
|
|
758
|
+
var name = getComponentNameFromType(type);
|
|
759
|
+
return name ? "<" + name + ">" : "<...>";
|
|
760
|
+
} catch (x) {
|
|
761
|
+
return "<...>";
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
function getOwner() {
|
|
765
|
+
var dispatcher = ReactSharedInternals.A;
|
|
766
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
767
|
+
}
|
|
768
|
+
function UnknownOwner() {
|
|
769
|
+
return Error("react-stack-top-frame");
|
|
770
|
+
}
|
|
771
|
+
function hasValidKey(config) {
|
|
772
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
773
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
774
|
+
if (getter && getter.isReactWarning) return false;
|
|
775
|
+
}
|
|
776
|
+
return void 0 !== config.key;
|
|
777
|
+
}
|
|
778
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
779
|
+
function warnAboutAccessingKey() {
|
|
780
|
+
specialPropKeyWarningShown ||
|
|
781
|
+
((specialPropKeyWarningShown = true),
|
|
782
|
+
console.error(
|
|
783
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
784
|
+
displayName
|
|
785
|
+
));
|
|
786
|
+
}
|
|
787
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
788
|
+
Object.defineProperty(props, "key", {
|
|
789
|
+
get: warnAboutAccessingKey,
|
|
790
|
+
configurable: true
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
794
|
+
var componentName = getComponentNameFromType(this.type);
|
|
795
|
+
didWarnAboutElementRef[componentName] ||
|
|
796
|
+
((didWarnAboutElementRef[componentName] = true),
|
|
797
|
+
console.error(
|
|
798
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
799
|
+
));
|
|
800
|
+
componentName = this.props.ref;
|
|
801
|
+
return void 0 !== componentName ? componentName : null;
|
|
802
|
+
}
|
|
803
|
+
function ReactElement(
|
|
804
|
+
type,
|
|
805
|
+
key,
|
|
806
|
+
self,
|
|
807
|
+
source,
|
|
808
|
+
owner,
|
|
809
|
+
props,
|
|
810
|
+
debugStack,
|
|
811
|
+
debugTask
|
|
812
|
+
) {
|
|
813
|
+
self = props.ref;
|
|
814
|
+
type = {
|
|
815
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
816
|
+
type: type,
|
|
817
|
+
key: key,
|
|
818
|
+
props: props,
|
|
819
|
+
_owner: owner
|
|
820
|
+
};
|
|
821
|
+
null !== (void 0 !== self ? self : null)
|
|
822
|
+
? Object.defineProperty(type, "ref", {
|
|
823
|
+
enumerable: false,
|
|
824
|
+
get: elementRefGetterWithDeprecationWarning
|
|
825
|
+
})
|
|
826
|
+
: Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
827
|
+
type._store = {};
|
|
828
|
+
Object.defineProperty(type._store, "validated", {
|
|
829
|
+
configurable: false,
|
|
830
|
+
enumerable: false,
|
|
831
|
+
writable: true,
|
|
832
|
+
value: 0
|
|
833
|
+
});
|
|
834
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
835
|
+
configurable: false,
|
|
836
|
+
enumerable: false,
|
|
837
|
+
writable: true,
|
|
838
|
+
value: null
|
|
839
|
+
});
|
|
840
|
+
Object.defineProperty(type, "_debugStack", {
|
|
841
|
+
configurable: false,
|
|
842
|
+
enumerable: false,
|
|
843
|
+
writable: true,
|
|
844
|
+
value: debugStack
|
|
845
|
+
});
|
|
846
|
+
Object.defineProperty(type, "_debugTask", {
|
|
847
|
+
configurable: false,
|
|
848
|
+
enumerable: false,
|
|
849
|
+
writable: true,
|
|
850
|
+
value: debugTask
|
|
851
|
+
});
|
|
852
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
853
|
+
return type;
|
|
854
|
+
}
|
|
855
|
+
function jsxDEVImpl(
|
|
856
|
+
type,
|
|
857
|
+
config,
|
|
858
|
+
maybeKey,
|
|
859
|
+
isStaticChildren,
|
|
860
|
+
source,
|
|
861
|
+
self,
|
|
862
|
+
debugStack,
|
|
863
|
+
debugTask
|
|
864
|
+
) {
|
|
865
|
+
var children = config.children;
|
|
866
|
+
if (void 0 !== children)
|
|
867
|
+
if (isStaticChildren)
|
|
868
|
+
if (isArrayImpl(children)) {
|
|
869
|
+
for (
|
|
870
|
+
isStaticChildren = 0;
|
|
871
|
+
isStaticChildren < children.length;
|
|
872
|
+
isStaticChildren++
|
|
873
|
+
)
|
|
874
|
+
validateChildKeys(children[isStaticChildren]);
|
|
875
|
+
Object.freeze && Object.freeze(children);
|
|
876
|
+
} else
|
|
877
|
+
console.error(
|
|
878
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
879
|
+
);
|
|
880
|
+
else validateChildKeys(children);
|
|
881
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
882
|
+
children = getComponentNameFromType(type);
|
|
883
|
+
var keys = Object.keys(config).filter(function (k) {
|
|
884
|
+
return "key" !== k;
|
|
885
|
+
});
|
|
886
|
+
isStaticChildren =
|
|
887
|
+
0 < keys.length
|
|
888
|
+
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
|
|
889
|
+
: "{key: someKey}";
|
|
890
|
+
didWarnAboutKeySpread[children + isStaticChildren] ||
|
|
891
|
+
((keys =
|
|
892
|
+
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
|
|
893
|
+
console.error(
|
|
894
|
+
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
|
|
895
|
+
isStaticChildren,
|
|
896
|
+
children,
|
|
897
|
+
keys,
|
|
898
|
+
children
|
|
899
|
+
),
|
|
900
|
+
(didWarnAboutKeySpread[children + isStaticChildren] = true));
|
|
901
|
+
}
|
|
902
|
+
children = null;
|
|
903
|
+
void 0 !== maybeKey &&
|
|
904
|
+
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
|
|
905
|
+
hasValidKey(config) &&
|
|
906
|
+
(checkKeyStringCoercion(config.key), (children = "" + config.key));
|
|
907
|
+
if ("key" in config) {
|
|
908
|
+
maybeKey = {};
|
|
909
|
+
for (var propName in config)
|
|
910
|
+
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
911
|
+
} else maybeKey = config;
|
|
912
|
+
children &&
|
|
913
|
+
defineKeyPropWarningGetter(
|
|
914
|
+
maybeKey,
|
|
915
|
+
"function" === typeof type
|
|
916
|
+
? type.displayName || type.name || "Unknown"
|
|
917
|
+
: type
|
|
918
|
+
);
|
|
919
|
+
return ReactElement(
|
|
920
|
+
type,
|
|
921
|
+
children,
|
|
922
|
+
self,
|
|
923
|
+
source,
|
|
924
|
+
getOwner(),
|
|
925
|
+
maybeKey,
|
|
926
|
+
debugStack,
|
|
927
|
+
debugTask
|
|
928
|
+
);
|
|
929
|
+
}
|
|
930
|
+
function validateChildKeys(node) {
|
|
931
|
+
"object" === typeof node &&
|
|
932
|
+
null !== node &&
|
|
933
|
+
node.$$typeof === REACT_ELEMENT_TYPE &&
|
|
934
|
+
node._store &&
|
|
935
|
+
(node._store.validated = 1);
|
|
936
|
+
}
|
|
937
|
+
var React$1 = React,
|
|
938
|
+
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
939
|
+
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
940
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
941
|
+
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
942
|
+
REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
943
|
+
var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
944
|
+
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
945
|
+
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
946
|
+
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
947
|
+
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
|
948
|
+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
949
|
+
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
950
|
+
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
951
|
+
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
|
|
952
|
+
ReactSharedInternals =
|
|
953
|
+
React$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
|
954
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
955
|
+
isArrayImpl = Array.isArray,
|
|
956
|
+
createTask = console.createTask
|
|
957
|
+
? console.createTask
|
|
958
|
+
: function () {
|
|
959
|
+
return null;
|
|
960
|
+
};
|
|
961
|
+
React$1 = {
|
|
962
|
+
"react-stack-bottom-frame": function (callStackForError) {
|
|
963
|
+
return callStackForError();
|
|
964
|
+
}
|
|
965
|
+
};
|
|
966
|
+
var specialPropKeyWarningShown;
|
|
967
|
+
var didWarnAboutElementRef = {};
|
|
968
|
+
var unknownOwnerDebugStack = React$1["react-stack-bottom-frame"].bind(
|
|
969
|
+
React$1,
|
|
970
|
+
UnknownOwner
|
|
971
|
+
)();
|
|
972
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
973
|
+
var didWarnAboutKeySpread = {};
|
|
974
|
+
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
975
|
+
reactJsxRuntime_development.jsx = function (type, config, maybeKey, source, self) {
|
|
976
|
+
var trackActualOwner =
|
|
977
|
+
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
978
|
+
return jsxDEVImpl(
|
|
979
|
+
type,
|
|
980
|
+
config,
|
|
981
|
+
maybeKey,
|
|
982
|
+
false,
|
|
983
|
+
source,
|
|
984
|
+
self,
|
|
985
|
+
trackActualOwner
|
|
986
|
+
? Error("react-stack-top-frame")
|
|
987
|
+
: unknownOwnerDebugStack,
|
|
988
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
989
|
+
);
|
|
990
|
+
};
|
|
991
|
+
reactJsxRuntime_development.jsxs = function (type, config, maybeKey, source, self) {
|
|
992
|
+
var trackActualOwner =
|
|
993
|
+
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
994
|
+
return jsxDEVImpl(
|
|
995
|
+
type,
|
|
996
|
+
config,
|
|
997
|
+
maybeKey,
|
|
998
|
+
true,
|
|
999
|
+
source,
|
|
1000
|
+
self,
|
|
1001
|
+
trackActualOwner
|
|
1002
|
+
? Error("react-stack-top-frame")
|
|
1003
|
+
: unknownOwnerDebugStack,
|
|
1004
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
1005
|
+
);
|
|
1006
|
+
};
|
|
1007
|
+
})();
|
|
1008
|
+
return reactJsxRuntime_development;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
var hasRequiredJsxRuntime;
|
|
1012
|
+
|
|
1013
|
+
function requireJsxRuntime () {
|
|
1014
|
+
if (hasRequiredJsxRuntime) return jsxRuntime.exports;
|
|
1015
|
+
hasRequiredJsxRuntime = 1;
|
|
1016
|
+
|
|
1017
|
+
if (process.env.NODE_ENV === 'production') {
|
|
1018
|
+
jsxRuntime.exports = requireReactJsxRuntime_production();
|
|
1019
|
+
} else {
|
|
1020
|
+
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
1021
|
+
}
|
|
1022
|
+
return jsxRuntime.exports;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
var jsxRuntimeExports = requireJsxRuntime();
|
|
1026
|
+
|
|
1027
|
+
var CLASS_ROOT$3 = 'accordion';
|
|
1028
|
+
var Accordion = function Accordion(_a) {
|
|
1029
|
+
var className = _a.className,
|
|
1030
|
+
children = _a.children,
|
|
1031
|
+
_a$headingLevel = _a.headingLevel,
|
|
1032
|
+
headingLevel = _a$headingLevel === void 0 ? 3 : _a$headingLevel,
|
|
1033
|
+
size = _a.size,
|
|
1034
|
+
isEnclosed = _a.isEnclosed,
|
|
1035
|
+
other = __rest(_a, ["className", "children", "headingLevel", "size", "isEnclosed"]);
|
|
1036
|
+
var accordionRef = useRef(null);
|
|
1037
|
+
var classes = cx(CLASS_ROOT$3, _defineProperty(_defineProperty({}, "".concat(CLASS_ROOT$3, "--").concat(size), size), "".concat(CLASS_ROOT$3, "--enclosed"), isEnclosed), className);
|
|
1038
|
+
useEffect(function () {
|
|
1039
|
+
if (accordionRef.current) {
|
|
1040
|
+
var accordion = new Accordion$1(accordionRef.current);
|
|
1041
|
+
return function () {
|
|
1042
|
+
accordion.destroy();
|
|
1043
|
+
};
|
|
1044
|
+
}
|
|
1045
|
+
}, []);
|
|
1046
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(HeadingContext.Provider, {
|
|
1047
|
+
value: headingLevel,
|
|
1048
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx("ul", _objectSpread2(_objectSpread2({
|
|
1049
|
+
"data-accordion": true,
|
|
1050
|
+
className: classes,
|
|
1051
|
+
ref: accordionRef
|
|
1052
|
+
}, other), {}, {
|
|
1053
|
+
children: children
|
|
1054
|
+
}))
|
|
1055
|
+
});
|
|
1056
|
+
};
|
|
1057
|
+
Accordion.displayName = 'Accordion';
|
|
1058
|
+
|
|
1059
|
+
var idx = 0;
|
|
1060
|
+
var uuid = function uuid() {
|
|
1061
|
+
return idx += 1;
|
|
1062
|
+
};
|
|
1063
|
+
/**
|
|
1064
|
+
* Generates a unique ID string with an optional name prefix
|
|
1065
|
+
* @param name Optional prefix for the ID
|
|
1066
|
+
* @returns A unique ID string
|
|
1067
|
+
*/
|
|
1068
|
+
function generateId(name) {
|
|
1069
|
+
return "id".concat('', "-").concat(uuid());
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
var SpritePathContext = /*#__PURE__*/React.createContext("/sprite.svg");
|
|
1073
|
+
|
|
1074
|
+
var CLASS_ROOT$2 = "icon";
|
|
1075
|
+
var Icon = function Icon(_a) {
|
|
1076
|
+
var className = _a.className,
|
|
1077
|
+
alt = _a.alt,
|
|
1078
|
+
color = _a.color,
|
|
1079
|
+
name = _a.name,
|
|
1080
|
+
size = _a.size,
|
|
1081
|
+
_a$spritePath = _a.spritePath,
|
|
1082
|
+
spritePath = _a$spritePath === void 0 ? "/sprite.svg" : _a$spritePath,
|
|
1083
|
+
other = __rest(_a, ["className", "alt", "color", "name", "size", "spritePath"]);
|
|
1084
|
+
var contextPath = useContext(SpritePathContext);
|
|
1085
|
+
var classes = cx(CLASS_ROOT$2, _defineProperty(_defineProperty({}, "".concat(CLASS_ROOT$2, "--").concat(size), size), "".concat(CLASS_ROOT$2, "--").concat(color), color), className);
|
|
1086
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs("svg", _objectSpread2(_objectSpread2({
|
|
1087
|
+
className: classes,
|
|
1088
|
+
"aria-hidden": alt !== undefined ? undefined : "true",
|
|
1089
|
+
role: alt !== undefined ? "img" : undefined
|
|
1090
|
+
}, other), {}, {
|
|
1091
|
+
children: [alt !== undefined && alt.length > 0 && /*#__PURE__*/jsxRuntimeExports.jsx("title", {
|
|
1092
|
+
children: alt
|
|
1093
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx("use", {
|
|
1094
|
+
xlinkHref: spritePath !== "/sprite.svg" || typeof contextPath === "undefined" ? "".concat(spritePath, "#").concat(name) : "".concat(contextPath, "#").concat(name)
|
|
1095
|
+
})]
|
|
1096
|
+
}));
|
|
1097
|
+
};
|
|
1098
|
+
Icon.displayName = "Icon";
|
|
1099
|
+
|
|
1100
|
+
var CLASS_ROOT$1 = 'accordion';
|
|
1101
|
+
var AccordionHeader = function AccordionHeader(_a) {
|
|
1102
|
+
var className = _a.className,
|
|
1103
|
+
title = _a.title,
|
|
1104
|
+
id = _a.id,
|
|
1105
|
+
isActive = _a.isActive,
|
|
1106
|
+
other = __rest(_a, ["className", "title", "id", "isActive"]);
|
|
1107
|
+
var headingLevel = React.useContext(HeadingContext);
|
|
1108
|
+
var Heading = "h".concat(headingLevel || 3);
|
|
1109
|
+
return /*#__PURE__*/jsxRuntimeExports.jsx(Heading, {
|
|
1110
|
+
className: cx("".concat(CLASS_ROOT$1, "__header"), className),
|
|
1111
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsxs("button", _objectSpread2(_objectSpread2({
|
|
1112
|
+
type: "button",
|
|
1113
|
+
"aria-expanded": isActive,
|
|
1114
|
+
className: "".concat(CLASS_ROOT$1, "__button"),
|
|
1115
|
+
"aria-controls": "".concat(id, "-section"),
|
|
1116
|
+
id: id,
|
|
1117
|
+
"data-accordion-toggle": true
|
|
1118
|
+
}, other), {}, {
|
|
1119
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
|
1120
|
+
className: "accordion__title",
|
|
1121
|
+
children: title
|
|
1122
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx(Icon, {
|
|
1123
|
+
className: "".concat(CLASS_ROOT$1, "__icon"),
|
|
1124
|
+
name: "chevron-down",
|
|
1125
|
+
size: "medium"
|
|
1126
|
+
})]
|
|
1127
|
+
}))
|
|
1128
|
+
});
|
|
1129
|
+
};
|
|
1130
|
+
AccordionHeader.displayName = 'AccordionHeader';
|
|
1131
|
+
|
|
1132
|
+
var CLASS_ROOT = 'accordion__item';
|
|
1133
|
+
var AccordionItem = function AccordionItem(_a) {
|
|
1134
|
+
var id = _a.id,
|
|
1135
|
+
isActive = _a.isActive,
|
|
1136
|
+
title = _a.title,
|
|
1137
|
+
renderHeader = _a.renderHeader,
|
|
1138
|
+
children = _a.children,
|
|
1139
|
+
className = _a.className,
|
|
1140
|
+
other = __rest(_a, ["id", "isActive", "title", "renderHeader", "children", "className"]);
|
|
1141
|
+
var classes = cx(CLASS_ROOT, className);
|
|
1142
|
+
var currentId = id || generateId();
|
|
1143
|
+
return /*#__PURE__*/jsxRuntimeExports.jsxs("li", {
|
|
1144
|
+
className: classes,
|
|
1145
|
+
children: [renderHeader ? renderHeader(title, currentId, isActive || false) : /*#__PURE__*/jsxRuntimeExports.jsx(AccordionHeader, _objectSpread2({
|
|
1146
|
+
id: currentId,
|
|
1147
|
+
isActive: isActive,
|
|
1148
|
+
title: title
|
|
1149
|
+
}, other)), isActive ? /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
1150
|
+
id: "".concat(currentId, "-section"),
|
|
1151
|
+
"aria-labelledby": currentId,
|
|
1152
|
+
className: cx('accordion__body', {
|
|
1153
|
+
'is-active': isActive
|
|
1154
|
+
}),
|
|
1155
|
+
children: children
|
|
1156
|
+
}) : /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
1157
|
+
id: "".concat(currentId, "-section"),
|
|
1158
|
+
"aria-labelledby": currentId,
|
|
1159
|
+
className: cx('accordion__body', {
|
|
1160
|
+
'is-active': isActive
|
|
1161
|
+
}),
|
|
1162
|
+
hidden: true,
|
|
1163
|
+
children: children
|
|
1164
|
+
})]
|
|
1165
|
+
});
|
|
1166
|
+
};
|
|
1167
|
+
AccordionItem.displayName = 'AccordionItem';
|
|
1168
|
+
|
|
1169
|
+
export { AccordionItem, Accordion as default };
|
|
1170
|
+
//# sourceMappingURL=index.js.map
|