@inera/ids-react 7.2.0 → 8.1.0
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/components/accordion/accordion.d.ts +1 -0
- package/components/accordion/accordion.js +5 -43
- package/components/alert/alert.d.ts +3 -3
- package/components/alert/alert.js +8 -5
- package/components/badge/badge.d.ts +3 -6
- package/components/badge/badge.js +3 -3
- package/components/box-link/box-link.d.ts +3 -5
- package/components/box-link/box-link.js +3 -4
- package/components/breadcrumbs/breadcrumbs.d.ts +2 -3
- package/components/breadcrumbs/breadcrumbs.js +5 -6
- package/components/button/button.d.ts +6 -8
- package/components/button/button.js +5 -79
- package/components/button-group/button-group.d.ts +2 -3
- package/components/button-group/button-group.js +2 -2
- package/components/card/card.d.ts +6 -7
- package/components/card/card.js +16 -10
- package/components/carousel/carousel-item.js +5 -5
- package/components/carousel/carousel.d.ts +0 -2
- package/components/carousel/carousel.js +22 -42
- package/components/date-label/date-label.d.ts +8 -2
- package/components/date-label/date-label.js +10 -17
- package/components/dialog/dialog.d.ts +13 -13
- package/components/dialog/dialog.js +10 -13
- package/components/dropdown/dropdown-content-button.d.ts +7 -0
- package/components/dropdown/dropdown-content-button.js +11 -0
- package/components/dropdown/dropdown-content-link.d.ts +1 -1
- package/components/dropdown/dropdown-content-link.js +4 -3
- package/components/dropdown/dropdown.d.ts +6 -5
- package/components/dropdown/dropdown.js +12 -11
- package/components/footer-1177/footer-1177.d.ts +3 -7
- package/components/footer-1177/footer-1177.js +9 -52
- package/components/footer-1177-admin/footer-1177-admin.d.ts +6 -8
- package/components/footer-1177-admin/footer-1177-admin.js +11 -53
- package/components/footer-1177-pro/footer-1177-pro.d.ts +16 -11
- package/components/footer-1177-pro/footer-1177-pro.js +13 -31
- package/components/footer-inera/footer-inera.d.ts +3 -7
- package/components/footer-inera/footer-inera.js +10 -53
- package/components/footer-inera-admin/footer-inera-admin.d.ts +3 -7
- package/components/footer-inera-admin/footer-inera-admin.js +12 -52
- package/components/form/check-button/check-button.d.ts +1 -0
- package/components/form/check-button/check-button.js +2 -2
- package/components/form/checkbox/checkbox-group.d.ts +1 -1
- package/components/form/checkbox/checkbox-group.js +6 -6
- package/components/form/checkbox/checkbox.d.ts +1 -0
- package/components/form/checkbox/checkbox.js +3 -3
- package/components/form/input/input.d.ts +2 -4
- package/components/form/input/input.js +16 -37
- package/components/form/radio/radio-group.d.ts +2 -2
- package/components/form/radio/radio-group.js +6 -6
- package/components/form/radio/radio.d.ts +3 -3
- package/components/form/radio/radio.js +2 -2
- package/components/form/radio-button/radio-button-group.d.ts +2 -2
- package/components/form/radio-button/radio-button-group.js +7 -7
- package/components/form/radio-button/radio-button.d.ts +4 -3
- package/components/form/radio-button/radio-button.js +2 -2
- package/components/form/range/range.d.ts +1 -0
- package/components/form/range/range.js +2 -2
- package/components/form/select/select.d.ts +1 -1
- package/components/form/select/select.js +5 -3
- package/components/form/select-multiple/select-multiple.d.ts +3 -0
- package/components/form/select-multiple/select-multiple.js +13 -6
- package/components/form/textarea/textarea.d.ts +1 -0
- package/components/form/textarea/textarea.js +2 -2
- package/components/form/time/time.d.ts +1 -0
- package/components/form/time/time.js +6 -6
- package/components/form/toggle/toggle.d.ts +1 -0
- package/components/form/toggle/toggle.js +5 -5
- package/components/global-alert/global-alert.d.ts +16 -0
- package/components/global-alert/global-alert.js +26 -0
- package/components/grid/column.d.ts +3 -4
- package/components/grid/column.js +2 -3
- package/components/grid/container.d.ts +4 -4
- package/components/grid/container.js +7 -18
- package/components/grid/row.d.ts +4 -4
- package/components/grid/row.js +6 -11
- package/components/header-1177/header-1177-avatar.d.ts +5 -2
- package/components/header-1177/header-1177-avatar.js +21 -10
- package/components/header-1177/header-1177-item.d.ts +3 -2
- package/components/header-1177/header-1177-item.js +22 -16
- package/components/header-1177/header-1177-menu-mobile.d.ts +1 -1
- package/components/header-1177/header-1177-menu-mobile.js +29 -18
- package/components/header-1177/header-1177-nav-item-mobile.js +7 -12
- package/components/header-1177/header-1177-nav-item.d.ts +4 -4
- package/components/header-1177/header-1177-nav-item.js +23 -18
- package/components/header-1177/header-1177-nav.d.ts +4 -2
- package/components/header-1177/header-1177-nav.js +6 -8
- package/components/header-1177/header-1177-region-picker-mobile.d.ts +9 -0
- package/components/header-1177/header-1177-region-picker-mobile.js +36 -0
- package/components/header-1177/header-1177-region-picker.d.ts +9 -0
- package/components/header-1177/header-1177-region-picker.js +34 -0
- package/components/header-1177/header-1177.d.ts +3 -7
- package/components/header-1177/header-1177.js +7 -36
- package/components/header-1177-admin/header-1177-admin-avatar-mobile.d.ts +3 -0
- package/components/header-1177-admin/header-1177-admin-avatar-mobile.js +28 -3
- package/components/header-1177-admin/header-1177-admin-avatar.d.ts +3 -2
- package/components/header-1177-admin/header-1177-admin-avatar.js +31 -18
- package/components/header-1177-admin/header-1177-admin-item.d.ts +2 -2
- package/components/header-1177-admin/header-1177-admin-item.js +23 -19
- package/components/header-1177-admin/header-1177-admin-menu-mobile.d.ts +11 -0
- package/components/header-1177-admin/header-1177-admin-menu-mobile.js +53 -0
- package/components/header-1177-admin/header-1177-admin-nav-item.d.ts +4 -4
- package/components/header-1177-admin/header-1177-admin-nav-item.js +22 -17
- package/components/header-1177-admin/header-1177-admin-nav.d.ts +2 -2
- package/components/header-1177-admin/header-1177-admin-nav.js +7 -9
- package/components/header-1177-admin/header-1177-admin.d.ts +3 -6
- package/components/header-1177-admin/header-1177-admin.js +7 -21
- package/components/header-1177-pro/header-1177-pro-avatar-mobile.d.ts +3 -0
- package/components/header-1177-pro/header-1177-pro-avatar-mobile.js +28 -3
- package/components/header-1177-pro/header-1177-pro-avatar.d.ts +3 -2
- package/components/header-1177-pro/header-1177-pro-avatar.js +31 -18
- package/components/header-1177-pro/header-1177-pro-item.d.ts +2 -2
- package/components/header-1177-pro/header-1177-pro-item.js +23 -16
- package/components/header-1177-pro/{header-1177-pro-nav-menu-mobile.d.ts → header-1177-pro-menu-mobile.d.ts} +3 -3
- package/components/header-1177-pro/header-1177-pro-menu-mobile.js +53 -0
- package/components/header-1177-pro/header-1177-pro-nav-item.d.ts +5 -5
- package/components/header-1177-pro/header-1177-pro-nav-item.js +17 -21
- package/components/header-1177-pro/header-1177-pro-nav.d.ts +4 -5
- package/components/header-1177-pro/header-1177-pro-nav.js +8 -25
- package/components/header-1177-pro/header-1177-pro-region-picker-mobile.d.ts +9 -0
- package/components/header-1177-pro/header-1177-pro-region-picker-mobile.js +36 -0
- package/components/header-1177-pro/header-1177-pro-region-picker.d.ts +9 -0
- package/components/header-1177-pro/header-1177-pro-region-picker.js +34 -0
- package/components/header-1177-pro/header-1177-pro.d.ts +6 -9
- package/components/header-1177-pro/header-1177-pro.js +6 -34
- package/components/header-inera/header-inera-item.d.ts +3 -4
- package/components/header-inera/header-inera-item.js +30 -15
- package/components/header-inera/header-inera-menu-mobile.d.ts +11 -0
- package/components/header-inera/header-inera-menu-mobile.js +54 -0
- package/components/header-inera/header-inera-nav-item.js +9 -25
- package/components/header-inera/header-inera-nav.d.ts +1 -1
- package/components/header-inera/header-inera-nav.js +6 -8
- package/components/header-inera/header-inera.d.ts +3 -4
- package/components/header-inera/header-inera.js +6 -13
- package/components/header-inera-admin/header-inera-admin-avatar-mobile.d.ts +5 -2
- package/components/header-inera-admin/header-inera-admin-avatar-mobile.js +23 -3
- package/components/header-inera-admin/header-inera-admin-avatar.d.ts +3 -4
- package/components/header-inera-admin/header-inera-admin-avatar.js +34 -22
- package/components/header-inera-admin/header-inera-admin-item.d.ts +3 -4
- package/components/header-inera-admin/header-inera-admin-item.js +17 -13
- package/components/header-inera-admin/header-inera-admin-menu-mobile.d.ts +11 -0
- package/components/header-inera-admin/header-inera-admin-menu-mobile.js +53 -0
- package/components/header-inera-admin/header-inera-admin-nav-item.d.ts +1 -3
- package/components/header-inera-admin/header-inera-admin-nav-item.js +15 -31
- package/components/header-inera-admin/header-inera-admin-nav.d.ts +2 -3
- package/components/header-inera-admin/header-inera-admin-nav.js +4 -6
- package/components/header-inera-admin/header-inera-admin.d.ts +2 -2
- package/components/header-inera-admin/header-inera-admin.js +6 -8
- package/components/header-patient/header-patient.d.ts +3 -3
- package/components/header-patient/header-patient.js +2 -2
- package/components/link/link.d.ts +4 -4
- package/components/link/link.js +17 -15
- package/components/mobile/menu/item/mobile-item.js +4 -4
- package/components/navigation/content/navigation-content.d.ts +3 -3
- package/components/navigation/content/navigation-content.js +7 -13
- package/components/navigation/local/navigation-local.d.ts +2 -3
- package/components/navigation/local/navigation-local.js +2 -2
- package/components/notification/badge/notification-badge.d.ts +2 -3
- package/components/notification/badge/notification-badge.js +2 -2
- package/components/pagination/data-pagination/data-pagination.d.ts +8 -13
- package/components/pagination/data-pagination/data-pagination.js +7 -8
- package/components/pagination/list-pagination/list-pagination.d.ts +1 -1
- package/components/pagination/list-pagination/list-pagination.js +7 -13
- package/components/popover/popover.js +9 -9
- package/components/progressbar/progressbar.d.ts +5 -3
- package/components/progressbar/progressbar.js +4 -4
- package/components/puff-list/puff-list-item/puff-list-item-date.d.ts +13 -0
- package/components/puff-list/puff-list-item/puff-list-item-date.js +23 -0
- package/components/puff-list/puff-list-item/puff-list-item-header.d.ts +10 -0
- package/components/puff-list/puff-list-item/puff-list-item-header.js +11 -0
- package/components/puff-list/puff-list-item/puff-list-item-info.d.ts +4 -5
- package/components/puff-list/puff-list-item/puff-list-item-info.js +5 -3
- package/components/puff-list/puff-list-item/puff-list-item.d.ts +10 -13
- package/components/puff-list/puff-list-item/puff-list-item.js +10 -46
- package/components/puff-list/puff-list.d.ts +1 -1
- package/components/puff-list/puff-list.js +4 -3
- package/components/region-icon/region-icon.d.ts +2 -2
- package/components/region-icon/region-icon.js +6 -6
- package/components/side-menu/side-menu.d.ts +1 -1
- package/components/side-menu/side-menu.js +7 -7
- package/components/side-panel/side-panel.d.ts +2 -0
- package/components/side-panel/side-panel.js +5 -5
- package/components/stepper/step.js +2 -2
- package/components/stepper/stepper.d.ts +1 -1
- package/components/stepper/stepper.js +5 -5
- package/components/tabs/tab-panel.js +2 -2
- package/components/tabs/tab.js +2 -2
- package/components/tabs/tabs.js +13 -13
- package/components/tag/tag.d.ts +11 -4
- package/components/tag/tag.js +7 -7
- package/components/tooltip/tooltip.d.ts +1 -0
- package/components/tooltip/tooltip.js +8 -7
- package/components/utils/contexts/HeaderContext.d.ts +0 -2
- package/components/utils/hooks/useFocusTrap.js +2 -1
- package/index.d.ts +18 -144
- package/index.js +18 -144
- package/package.json +2 -3
- package/components/agent/agent.d.ts +0 -12
- package/components/agent/agent.js +0 -18
- package/components/alert-global/alert-global.d.ts +0 -16
- package/components/alert-global/alert-global.js +0 -28
- package/components/header-1177-pro/header-1177-pro-nav-menu-mobile.js +0 -35
- package/components/header-inera/header-inera-nav-mobile.d.ts +0 -11
- package/components/header-inera/header-inera-nav-mobile.js +0 -47
- package/components/header-inera-admin/header-inera-admin-nav-mobile.d.ts +0 -12
- package/components/header-inera-admin/header-inera-admin-nav-mobile.js +0 -35
- package/components/icons/icon-1177.d.ts +0 -3
- package/components/icons/icon-1177.js +0 -12
- package/components/icons/icon-activity.d.ts +0 -3
- package/components/icons/icon-activity.js +0 -12
- package/components/icons/icon-agent.d.ts +0 -3
- package/components/icons/icon-agent.js +0 -12
- package/components/icons/icon-alarm-clock-inactivity.d.ts +0 -3
- package/components/icons/icon-alarm-clock-inactivity.js +0 -12
- package/components/icons/icon-alarm-clock-neutral.d.ts +0 -3
- package/components/icons/icon-alarm-clock-neutral.js +0 -12
- package/components/icons/icon-archive.d.ts +0 -3
- package/components/icons/icon-archive.js +0 -12
- package/components/icons/icon-arrow.d.ts +0 -3
- package/components/icons/icon-arrow.js +0 -12
- package/components/icons/icon-attention.d.ts +0 -3
- package/components/icons/icon-attention.js +0 -12
- package/components/icons/icon-blekinge.d.ts +0 -3
- package/components/icons/icon-blekinge.js +0 -12
- package/components/icons/icon-bookmark.d.ts +0 -3
- package/components/icons/icon-bookmark.js +0 -12
- package/components/icons/icon-calendar.d.ts +0 -3
- package/components/icons/icon-calendar.js +0 -12
- package/components/icons/icon-call-active.d.ts +0 -3
- package/components/icons/icon-call-active.js +0 -12
- package/components/icons/icon-call.d.ts +0 -3
- package/components/icons/icon-call.js +0 -12
- package/components/icons/icon-camera-off.d.ts +0 -3
- package/components/icons/icon-camera-off.js +0 -12
- package/components/icons/icon-camera-on.d.ts +0 -3
- package/components/icons/icon-camera-on.js +0 -12
- package/components/icons/icon-camera-switch.d.ts +0 -3
- package/components/icons/icon-camera-switch.js +0 -12
- package/components/icons/icon-chart-bar.d.ts +0 -3
- package/components/icons/icon-chart-bar.js +0 -12
- package/components/icons/icon-chart-line.d.ts +0 -3
- package/components/icons/icon-chart-line.js +0 -12
- package/components/icons/icon-chat.d.ts +0 -3
- package/components/icons/icon-chat.js +0 -12
- package/components/icons/icon-check.d.ts +0 -3
- package/components/icons/icon-check.js +0 -12
- package/components/icons/icon-chevron-bold.d.ts +0 -3
- package/components/icons/icon-chevron-bold.js +0 -12
- package/components/icons/icon-chevron.d.ts +0 -3
- package/components/icons/icon-chevron.js +0 -12
- package/components/icons/icon-clipboard-cross.d.ts +0 -3
- package/components/icons/icon-clipboard-cross.js +0 -12
- package/components/icons/icon-clipboard-text.d.ts +0 -3
- package/components/icons/icon-clipboard-text.js +0 -12
- package/components/icons/icon-clipboard.d.ts +0 -3
- package/components/icons/icon-clipboard.js +0 -12
- package/components/icons/icon-clock.d.ts +0 -3
- package/components/icons/icon-clock.js +0 -12
- package/components/icons/icon-close-bold.d.ts +0 -3
- package/components/icons/icon-close-bold.js +0 -12
- package/components/icons/icon-close.d.ts +0 -3
- package/components/icons/icon-close.js +0 -12
- package/components/icons/icon-cog.d.ts +0 -3
- package/components/icons/icon-cog.js +0 -12
- package/components/icons/icon-computer-inera.d.ts +0 -3
- package/components/icons/icon-computer-inera.js +0 -12
- package/components/icons/icon-computer.d.ts +0 -3
- package/components/icons/icon-computer.js +0 -12
- package/components/icons/icon-copy-file.d.ts +0 -3
- package/components/icons/icon-copy-file.js +0 -12
- package/components/icons/icon-copy-link.d.ts +0 -3
- package/components/icons/icon-copy-link.js +0 -12
- package/components/icons/icon-dalarna.d.ts +0 -3
- package/components/icons/icon-dalarna.js +0 -12
- package/components/icons/icon-denied.d.ts +0 -3
- package/components/icons/icon-denied.js +0 -12
- package/components/icons/icon-doctors-bag.d.ts +0 -3
- package/components/icons/icon-doctors-bag.js +0 -12
- package/components/icons/icon-document.d.ts +0 -3
- package/components/icons/icon-document.js +0 -12
- package/components/icons/icon-download.d.ts +0 -3
- package/components/icons/icon-download.js +0 -12
- package/components/icons/icon-drag-n-drop.d.ts +0 -3
- package/components/icons/icon-drag-n-drop.js +0 -12
- package/components/icons/icon-ear-hearing.d.ts +0 -3
- package/components/icons/icon-ear-hearing.js +0 -12
- package/components/icons/icon-edit.d.ts +0 -3
- package/components/icons/icon-edit.js +0 -12
- package/components/icons/icon-email-sent.d.ts +0 -3
- package/components/icons/icon-email-sent.js +0 -12
- package/components/icons/icon-email-unread.d.ts +0 -3
- package/components/icons/icon-email-unread.js +0 -12
- package/components/icons/icon-email.d.ts +0 -3
- package/components/icons/icon-email.js +0 -12
- package/components/icons/icon-expand.d.ts +0 -3
- package/components/icons/icon-expand.js +0 -12
- package/components/icons/icon-external.d.ts +0 -3
- package/components/icons/icon-external.js +0 -12
- package/components/icons/icon-facebook.d.ts +0 -3
- package/components/icons/icon-facebook.js +0 -12
- package/components/icons/icon-file-csv.d.ts +0 -3
- package/components/icons/icon-file-csv.js +0 -12
- package/components/icons/icon-file-excel.d.ts +0 -3
- package/components/icons/icon-file-excel.js +0 -12
- package/components/icons/icon-file-other.d.ts +0 -3
- package/components/icons/icon-file-other.js +0 -12
- package/components/icons/icon-file-pdf.d.ts +0 -3
- package/components/icons/icon-file-pdf.js +0 -12
- package/components/icons/icon-file-picture.d.ts +0 -3
- package/components/icons/icon-file-picture.js +0 -12
- package/components/icons/icon-file-powerpoint.d.ts +0 -3
- package/components/icons/icon-file-powerpoint.js +0 -12
- package/components/icons/icon-file-word.d.ts +0 -3
- package/components/icons/icon-file-word.js +0 -12
- package/components/icons/icon-find-care.d.ts +0 -3
- package/components/icons/icon-find-care.js +0 -12
- package/components/icons/icon-find-region.d.ts +0 -3
- package/components/icons/icon-find-region.js +0 -12
- package/components/icons/icon-flag.d.ts +0 -3
- package/components/icons/icon-flag.js +0 -12
- package/components/icons/icon-form-numbered-reocurring.d.ts +0 -3
- package/components/icons/icon-form-numbered-reocurring.js +0 -12
- package/components/icons/icon-form-numbered.d.ts +0 -3
- package/components/icons/icon-form-numbered.js +0 -12
- package/components/icons/icon-gavleborg.d.ts +0 -3
- package/components/icons/icon-gavleborg.js +0 -12
- package/components/icons/icon-gotland.d.ts +0 -3
- package/components/icons/icon-gotland.js +0 -12
- package/components/icons/icon-halland.d.ts +0 -3
- package/components/icons/icon-halland.js +0 -12
- package/components/icons/icon-headphones.d.ts +0 -3
- package/components/icons/icon-headphones.js +0 -12
- package/components/icons/icon-hourglass-end.d.ts +0 -3
- package/components/icons/icon-hourglass-end.js +0 -12
- package/components/icons/icon-hourglass-start.d.ts +0 -3
- package/components/icons/icon-hourglass-start.js +0 -12
- package/components/icons/icon-hourglass.d.ts +0 -3
- package/components/icons/icon-hourglass.js +0 -12
- package/components/icons/icon-house.d.ts +0 -3
- package/components/icons/icon-house.js +0 -12
- package/components/icons/icon-id-card-locked.d.ts +0 -3
- package/components/icons/icon-id-card-locked.js +0 -12
- package/components/icons/icon-id-card.d.ts +0 -3
- package/components/icons/icon-id-card.js +0 -12
- package/components/icons/icon-image.d.ts +0 -3
- package/components/icons/icon-image.js +0 -12
- package/components/icons/icon-inera-legacy.d.ts +0 -3
- package/components/icons/icon-inera-legacy.js +0 -12
- package/components/icons/icon-inera.d.ts +0 -3
- package/components/icons/icon-inera.js +0 -12
- package/components/icons/icon-information.d.ts +0 -3
- package/components/icons/icon-information.js +0 -12
- package/components/icons/icon-jamtland-harjedalen.d.ts +0 -3
- package/components/icons/icon-jamtland-harjedalen.js +0 -12
- package/components/icons/icon-jonkoping.d.ts +0 -3
- package/components/icons/icon-jonkoping.js +0 -12
- package/components/icons/icon-kalmar.d.ts +0 -3
- package/components/icons/icon-kalmar.js +0 -12
- package/components/icons/icon-kronoberg.d.ts +0 -3
- package/components/icons/icon-kronoberg.js +0 -12
- package/components/icons/icon-lightbulb.d.ts +0 -3
- package/components/icons/icon-lightbulb.js +0 -12
- package/components/icons/icon-linkedin.d.ts +0 -3
- package/components/icons/icon-linkedin.js +0 -12
- package/components/icons/icon-list.d.ts +0 -3
- package/components/icons/icon-list.js +0 -12
- package/components/icons/icon-lock-open.d.ts +0 -3
- package/components/icons/icon-lock-open.js +0 -12
- package/components/icons/icon-lock.d.ts +0 -3
- package/components/icons/icon-lock.js +0 -12
- package/components/icons/icon-log-locked.d.ts +0 -3
- package/components/icons/icon-log-locked.js +0 -12
- package/components/icons/icon-log.d.ts +0 -3
- package/components/icons/icon-log.js +0 -12
- package/components/icons/icon-menu.d.ts +0 -3
- package/components/icons/icon-menu.js +0 -12
- package/components/icons/icon-minus.d.ts +0 -3
- package/components/icons/icon-minus.js +0 -12
- package/components/icons/icon-moment-start.d.ts +0 -3
- package/components/icons/icon-moment-start.js +0 -12
- package/components/icons/icon-moment-stop.d.ts +0 -3
- package/components/icons/icon-moment-stop.js +0 -12
- package/components/icons/icon-norrbotten.d.ts +0 -3
- package/components/icons/icon-norrbotten.js +0 -12
- package/components/icons/icon-office-building.d.ts +0 -3
- package/components/icons/icon-office-building.js +0 -12
- package/components/icons/icon-orebro.d.ts +0 -3
- package/components/icons/icon-orebro.js +0 -12
- package/components/icons/icon-organization.d.ts +0 -3
- package/components/icons/icon-organization.js +0 -12
- package/components/icons/icon-ostergotland.d.ts +0 -3
- package/components/icons/icon-ostergotland.js +0 -12
- package/components/icons/icon-plus.d.ts +0 -3
- package/components/icons/icon-plus.js +0 -12
- package/components/icons/icon-prescription.d.ts +0 -3
- package/components/icons/icon-prescription.js +0 -12
- package/components/icons/icon-print.d.ts +0 -3
- package/components/icons/icon-print.js +0 -12
- package/components/icons/icon-question.d.ts +0 -3
- package/components/icons/icon-question.js +0 -12
- package/components/icons/icon-reload.d.ts +0 -3
- package/components/icons/icon-reload.js +0 -12
- package/components/icons/icon-reply.d.ts +0 -3
- package/components/icons/icon-reply.js +0 -12
- package/components/icons/icon-search-inera.d.ts +0 -3
- package/components/icons/icon-search-inera.js +0 -12
- package/components/icons/icon-search.d.ts +0 -3
- package/components/icons/icon-search.js +0 -12
- package/components/icons/icon-share.d.ts +0 -3
- package/components/icons/icon-share.js +0 -12
- package/components/icons/icon-shield-locked-primary.d.ts +0 -3
- package/components/icons/icon-shield-locked-primary.js +0 -12
- package/components/icons/icon-shield-locked.d.ts +0 -3
- package/components/icons/icon-shield-locked.js +0 -12
- package/components/icons/icon-skane.d.ts +0 -3
- package/components/icons/icon-skane.js +0 -12
- package/components/icons/icon-sormland.d.ts +0 -3
- package/components/icons/icon-sormland.js +0 -12
- package/components/icons/icon-star-filled.d.ts +0 -3
- package/components/icons/icon-star-filled.js +0 -12
- package/components/icons/icon-star.d.ts +0 -3
- package/components/icons/icon-star.js +0 -12
- package/components/icons/icon-stockholm.d.ts +0 -3
- package/components/icons/icon-stockholm.js +0 -12
- package/components/icons/icon-success.d.ts +0 -3
- package/components/icons/icon-success.js +0 -12
- package/components/icons/icon-swap.d.ts +0 -3
- package/components/icons/icon-swap.js +0 -12
- package/components/icons/icon-switch-person.d.ts +0 -3
- package/components/icons/icon-switch-person.js +0 -12
- package/components/icons/icon-telephone.d.ts +0 -3
- package/components/icons/icon-telephone.js +0 -12
- package/components/icons/icon-test-tube-analyze.d.ts +0 -3
- package/components/icons/icon-test-tube-analyze.js +0 -12
- package/components/icons/icon-test-tube-empty.d.ts +0 -3
- package/components/icons/icon-test-tube-empty.js +0 -12
- package/components/icons/icon-test-tube.d.ts +0 -3
- package/components/icons/icon-test-tube.js +0 -12
- package/components/icons/icon-toggle-card.d.ts +0 -3
- package/components/icons/icon-toggle-card.js +0 -12
- package/components/icons/icon-toggle-list.d.ts +0 -3
- package/components/icons/icon-toggle-list.js +0 -12
- package/components/icons/icon-trash.d.ts +0 -3
- package/components/icons/icon-trash.js +0 -12
- package/components/icons/icon-twitter.d.ts +0 -3
- package/components/icons/icon-twitter.js +0 -12
- package/components/icons/icon-uppsala.d.ts +0 -3
- package/components/icons/icon-uppsala.js +0 -12
- package/components/icons/icon-user.d.ts +0 -3
- package/components/icons/icon-user.js +0 -12
- package/components/icons/icon-varmland.d.ts +0 -3
- package/components/icons/icon-varmland.js +0 -12
- package/components/icons/icon-vasterbotten.d.ts +0 -3
- package/components/icons/icon-vasterbotten.js +0 -12
- package/components/icons/icon-vasternorrland.d.ts +0 -3
- package/components/icons/icon-vasternorrland.js +0 -12
- package/components/icons/icon-vastmanland.d.ts +0 -3
- package/components/icons/icon-vastmanland.js +0 -12
- package/components/icons/icon-vastra-gotaland.d.ts +0 -3
- package/components/icons/icon-vastra-gotaland.js +0 -12
- package/components/icons/icon-video-off.d.ts +0 -3
- package/components/icons/icon-video-off.js +0 -12
- package/components/icons/icon-video-on.d.ts +0 -3
- package/components/icons/icon-video-on.js +0 -12
- package/components/icons/icon-video-switch.d.ts +0 -3
- package/components/icons/icon-video-switch.js +0 -12
- package/components/icons/icon-visibility-off.d.ts +0 -3
- package/components/icons/icon-visibility-off.js +0 -12
- package/components/icons/icon-visibility.d.ts +0 -3
- package/components/icons/icon-visibility.js +0 -12
- package/components/icons/icon-warning.d.ts +0 -3
- package/components/icons/icon-warning.js +0 -12
- package/components/icons/icon-x.d.ts +0 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import
|
|
3
|
+
import { useState, useRef, Children, useEffect } from 'react';
|
|
4
4
|
import '@inera/ids-design/components/carousel/carousel.css';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { breakPoints } from '../utils/utils.js';
|
|
7
7
|
|
|
8
|
-
const IDSCarousel = ({
|
|
8
|
+
const IDSCarousel = ({ srNextLabel = "Nästa", srPrevLabel = "Föregående", className, children, ...props }) => {
|
|
9
9
|
const [activeSlideIndex, setActiveSlideIndex] = useState(0);
|
|
10
10
|
const [isAnimating, setIsAnimating] = useState(false);
|
|
11
11
|
const [isAnimatingLeft, setIsAnimatingLeft] = useState(false);
|
|
@@ -61,9 +61,7 @@ const IDSCarousel = ({ autoplay = false, autoplayDelay = 5000, srNextLabel = "N
|
|
|
61
61
|
}, []);
|
|
62
62
|
// Set button location
|
|
63
63
|
const setButtonLocation = () => {
|
|
64
|
-
const imageHeight = carouselRef.current
|
|
65
|
-
?.querySelector(".ids-carousel-item__image")
|
|
66
|
-
?.getBoundingClientRect().height;
|
|
64
|
+
const imageHeight = carouselRef.current?.querySelector(".ids-carousel-item__image")?.getBoundingClientRect().height;
|
|
67
65
|
const buttonPlacement = imageHeight / 2;
|
|
68
66
|
if (imageHeight && buttonPlacement) {
|
|
69
67
|
setButtonPosition({
|
|
@@ -72,15 +70,6 @@ const IDSCarousel = ({ autoplay = false, autoplayDelay = 5000, srNextLabel = "N
|
|
|
72
70
|
});
|
|
73
71
|
}
|
|
74
72
|
};
|
|
75
|
-
useEffect(() => {
|
|
76
|
-
if (!autoplay)
|
|
77
|
-
return;
|
|
78
|
-
const delay = Math.max(autoplayDelay, 500);
|
|
79
|
-
const timer = setInterval(() => {
|
|
80
|
-
handleNext();
|
|
81
|
-
}, delay);
|
|
82
|
-
return () => clearInterval(timer);
|
|
83
|
-
}, [autoplay, autoplayDelay]);
|
|
84
73
|
// change slide
|
|
85
74
|
const handleNext = () => {
|
|
86
75
|
if (isAnimating)
|
|
@@ -93,7 +82,6 @@ const IDSCarousel = ({ autoplay = false, autoplayDelay = 5000, srNextLabel = "N
|
|
|
93
82
|
setIsAnimatingRight(false);
|
|
94
83
|
}, 500);
|
|
95
84
|
};
|
|
96
|
-
// Previous slide
|
|
97
85
|
const handlePrev = () => {
|
|
98
86
|
if (isAnimating)
|
|
99
87
|
return;
|
|
@@ -105,6 +93,22 @@ const IDSCarousel = ({ autoplay = false, autoplayDelay = 5000, srNextLabel = "N
|
|
|
105
93
|
setIsAnimatingLeft(false);
|
|
106
94
|
}, 500);
|
|
107
95
|
};
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
if (!carouselRef.current)
|
|
98
|
+
return;
|
|
99
|
+
const allSlides = carouselRef.current.querySelectorAll(".ids-carousel-item-wrapper");
|
|
100
|
+
allSlides.forEach((slide, index) => {
|
|
101
|
+
const isActive = index === activeSlideIndex;
|
|
102
|
+
if (isActive) {
|
|
103
|
+
slide.removeAttribute("inert");
|
|
104
|
+
slide.setAttribute("aria-hidden", "false");
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
slide.setAttribute("inert", "");
|
|
108
|
+
slide.setAttribute("aria-hidden", "true");
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}, [activeSlideIndex]);
|
|
108
112
|
// Touch/swipe
|
|
109
113
|
const touchStartX = useRef(null);
|
|
110
114
|
const handleTouchStart = (e) => {
|
|
@@ -118,28 +122,6 @@ const IDSCarousel = ({ autoplay = false, autoplayDelay = 5000, srNextLabel = "N
|
|
|
118
122
|
handleNext();
|
|
119
123
|
touchStartX.current = null;
|
|
120
124
|
};
|
|
121
|
-
const setTabIndexRecursively = (node, tabIndex) => {
|
|
122
|
-
if (React__default.isValidElement(node)) {
|
|
123
|
-
const props = {};
|
|
124
|
-
// Skip recursion into IDSLink — set tabIndex only at the top level if needed
|
|
125
|
-
if (node.type.displayName === "IDSLink" || node.type.name === "IDSLink") {
|
|
126
|
-
return React__default.cloneElement(node, {
|
|
127
|
-
tabIndex
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
if (typeof node.type === "string") {
|
|
131
|
-
const focusableTags = ["a", "button", "input", "select", "textarea"];
|
|
132
|
-
if (focusableTags.includes(node.type)) {
|
|
133
|
-
props.tabIndex = tabIndex;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
if (node.props && node.props.children) {
|
|
137
|
-
props.children = React__default.Children.map(node.props.children, child => setTabIndexRecursively(child, tabIndex));
|
|
138
|
-
}
|
|
139
|
-
return React__default.cloneElement(node, props);
|
|
140
|
-
}
|
|
141
|
-
return node;
|
|
142
|
-
};
|
|
143
125
|
const slides = Children.map(children, (child, index) => {
|
|
144
126
|
const isActive = index === activeSlideIndex;
|
|
145
127
|
const isPrev = index === (activeSlideIndex - 1 + slideCount) % slideCount;
|
|
@@ -151,16 +133,14 @@ const IDSCarousel = ({ autoplay = false, autoplayDelay = 5000, srNextLabel = "N
|
|
|
151
133
|
itemClass += " prev";
|
|
152
134
|
else if (isNext)
|
|
153
135
|
itemClass += " next";
|
|
154
|
-
|
|
155
|
-
const processedChild = isActive ? child : setTabIndexRecursively(child, -1);
|
|
156
|
-
return (jsx("div", { className: itemClass, "aria-hidden": !isActive, children: processedChild }, index));
|
|
136
|
+
return isActive ? (jsx("div", { className: itemClass, "aria-hidden": "false", children: child }, index)) : (jsx("div", { className: itemClass, "aria-hidden": "true", inert: true, children: child }, index));
|
|
157
137
|
});
|
|
158
138
|
const isMobile = windowWidth < breakPoints.medium;
|
|
159
|
-
return (jsxs("div", { className: clsx("ids-carousel", className), ref: carouselRef, children: [jsx("button", { "aria-label": srPrevLabel, className: clsx("ids-carousel__button-prev", {
|
|
139
|
+
return (jsxs("div", { className: clsx("ids-carousel", className), ref: carouselRef, ...props, children: [jsx("button", { "aria-label": srPrevLabel, className: clsx("ids-carousel__button-prev", {
|
|
160
140
|
"ids-carousel__button-prev--mobile": isMobile
|
|
161
141
|
}), onClick: handlePrev, style: buttonPosition, children: isMobile && jsx("div", { className: "ids-carousel-btn__inner" }) }), jsx("button", { "aria-label": srNextLabel, className: clsx("ids-carousel__button-next", {
|
|
162
142
|
"ids-carousel__button-next--mobile": isMobile
|
|
163
|
-
}), onClick: handleNext, style: buttonPosition, children: isMobile && jsx("div", { className: "ids-carousel-btn__inner" }) }), jsx("div", { className: clsx("ids-carousel-
|
|
143
|
+
}), onClick: handleNext, style: buttonPosition, children: isMobile && jsx("div", { className: "ids-carousel-btn__inner" }) }), jsx("div", { className: clsx("ids-carousel-content js-carousel-slide", {
|
|
164
144
|
"animating-left": isAnimatingLeft,
|
|
165
145
|
"animating-right": isAnimatingRight
|
|
166
146
|
}), onTouchStart: handleTouchStart, onTouchEnd: handleTouchEnd, children: jsx("div", { "aria-live": "polite", children: slides }) })] }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { DetailedHTMLProps, TimeHTMLAttributes } from "react";
|
|
2
2
|
import "@inera/ids-design/components/date-label/date-label.css";
|
|
3
3
|
interface IDSDateLabelProps extends DetailedHTMLProps<TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement> {
|
|
4
4
|
date?: Date | null;
|
|
@@ -6,6 +6,12 @@ interface IDSDateLabelProps extends DetailedHTMLProps<TimeHTMLAttributes<HTMLTim
|
|
|
6
6
|
month?: number;
|
|
7
7
|
monthLabel?: string;
|
|
8
8
|
day?: number;
|
|
9
|
+
dateTo?: Date | null;
|
|
10
|
+
yearTo?: number;
|
|
11
|
+
monthTo?: number;
|
|
12
|
+
monthToLabel?: string;
|
|
13
|
+
dayTo?: number;
|
|
14
|
+
srText?: string;
|
|
9
15
|
}
|
|
10
|
-
export declare
|
|
16
|
+
export declare function IDSDateLabel({ date, year, month, day, monthLabel, dateTo, yearTo, monthTo, monthToLabel, srText, dayTo, children, className, ...props }: IDSDateLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
11
17
|
export {};
|
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { useState, useEffect } from 'react';
|
|
4
2
|
import '@inera/ids-design/components/date-label/date-label.css';
|
|
5
3
|
import { getDayAsText, getMonthAsSweText } from '../utils/utils.js';
|
|
6
4
|
import clsx from 'clsx';
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const getYear = () => (presentedDate ? presentedDate.getFullYear() : year);
|
|
16
|
-
const getMonth = () => (presentedDate ? presentedDate.getMonth() + 1 : month);
|
|
17
|
-
const getDay = () => {
|
|
18
|
-
const dayNumber = presentedDate ? presentedDate.getDate() : day;
|
|
19
|
-
return getDayAsText(dayNumber);
|
|
20
|
-
};
|
|
6
|
+
function IDSDateLabel({ date = null, year = 0, month = 0, day = 0, monthLabel = "", dateTo = null, yearTo = 0, monthTo = 0, monthToLabel = "", srText = "", dayTo = 0, children, className, ...props }) {
|
|
7
|
+
const getYear = () => (date ? date.getFullYear() : year);
|
|
8
|
+
const getYearTo = () => (dateTo ? dateTo.getFullYear() : yearTo);
|
|
9
|
+
const getMonth = () => (date ? date.getMonth() + 1 : month);
|
|
10
|
+
const getMonthTo = () => (dateTo ? dateTo.getMonth() + 1 : monthTo);
|
|
11
|
+
const getDay = () => (date ? getDayAsText(date.getDate()) : getDayAsText(day));
|
|
12
|
+
const getDayTo = () => (dateTo ? getDayAsText(dateTo.getDate()) : getDayAsText(dayTo));
|
|
21
13
|
const getMonthText = () => (monthLabel ? monthLabel : getMonthAsSweText(getMonth() - 1, 3));
|
|
22
|
-
|
|
23
|
-
};
|
|
14
|
+
const getMonthToText = () => (monthToLabel ? monthToLabel : getMonthAsSweText(getMonthTo() - 1, 3));
|
|
15
|
+
return (jsxs("span", { className: clsx("ids-date-label", className), "aria-label": srText, ...props, role: "text", children: [jsxs("time", { className: "ids-date-label__time", "aria-hidden": "true", children: [jsx("span", { className: "ids-date-label__day", children: getDay() }), jsx("span", { className: "ids-date-label__month", children: getMonthText() }), jsx("span", { className: "ids-date-label__year", children: getYear() })] }), !!(dateTo || (dayTo && monthTo && yearTo)) && (jsxs("time", { className: "ids-date-label__time ids-date-label__time--separator", "aria-hidden": "true", children: [jsx("span", { className: "ids-date-label__day", children: getDayTo() }), jsx("span", { className: "ids-date-label__month", children: getMonthToText() }), jsx("span", { className: "ids-date-label__year", children: getYearTo() })] }))] }));
|
|
16
|
+
}
|
|
24
17
|
|
|
25
18
|
export { IDSDateLabel };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import "@inera/ids-design/components/dialog/dialog.css";
|
|
3
3
|
interface IDSDialogProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
|
|
5
|
-
srClose?: string;
|
|
6
|
-
dismissible?: boolean;
|
|
4
|
+
actions?: ReactNode;
|
|
7
5
|
autoFocus?: boolean;
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
dismissible?: boolean;
|
|
7
|
+
headline?: ReactNode;
|
|
8
|
+
height?: string;
|
|
10
9
|
keepScrollbar?: boolean;
|
|
11
|
-
persistent?: boolean;
|
|
12
|
-
noScrollAreaFocus?: boolean;
|
|
13
|
-
width?: string;
|
|
14
10
|
maxWidth?: string;
|
|
15
|
-
|
|
11
|
+
noFocusTrap?: boolean;
|
|
12
|
+
noOverlay?: boolean;
|
|
13
|
+
noScrollAreaFocus?: boolean;
|
|
14
|
+
persistent?: boolean;
|
|
15
|
+
show?: boolean;
|
|
16
|
+
srClose?: string;
|
|
16
17
|
trigger?: ReactNode;
|
|
17
|
-
|
|
18
|
-
actions?: ReactNode;
|
|
18
|
+
width?: string;
|
|
19
19
|
children?: ReactNode;
|
|
20
|
-
onVisibilityChange?: (
|
|
20
|
+
onVisibilityChange?: (isVisible: boolean) => void;
|
|
21
21
|
}
|
|
22
|
-
export declare
|
|
22
|
+
export declare function IDSDialog({ show, srClose, dismissible, autoFocus, noOverlay, noFocusTrap, keepScrollbar, persistent, noScrollAreaFocus, width, maxWidth, height, trigger, headline, actions, children, className, onVisibilityChange, ...props }: IDSDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export {};
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { useState, useRef,
|
|
3
|
+
import { useState, useRef, useEffect } from 'react';
|
|
4
4
|
import '@inera/ids-design/components/dialog/dialog.css';
|
|
5
5
|
import { useFocusTrap } from '../utils/hooks/useFocusTrap.js';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function IDSDialog({ show = false, srClose = "Stäng", dismissible = false, autoFocus = true, noOverlay = false, noFocusTrap = false, keepScrollbar = false, persistent = false, noScrollAreaFocus = false, width = "", maxWidth = "", height = "", trigger, headline, actions, children, className, onVisibilityChange, ...props }) {
|
|
9
9
|
const [isVisible, setIsVisible] = useState(show);
|
|
10
10
|
const dialogRef = useRef(null);
|
|
11
11
|
const bodyRef = useRef(null);
|
|
12
|
-
const headlineId = useId();
|
|
13
|
-
const contentId = useId();
|
|
14
12
|
const [hasScrollbar, setHasScrollbar] = useState(false);
|
|
15
13
|
useFocusTrap(dialogRef.current, isVisible && !noFocusTrap);
|
|
16
14
|
useEffect(() => {
|
|
@@ -50,8 +48,7 @@ const IDSDialog = ({ show = false, srClose = "Stäng", dismissible = false, auto
|
|
|
50
48
|
setTimeout(() => {
|
|
51
49
|
const focusable = bodyRef.current?.querySelector(".ids-focus-anchor") ||
|
|
52
50
|
bodyRef.current?.querySelector("h1, h2, h3, [tabindex]:not([tabindex='-1']), button:not([disabled]), a, input:not([disabled]), textarea:not([disabled])") ||
|
|
53
|
-
dialogRef.current?.querySelector("button.ids-
|
|
54
|
-
console.log("focusable", focusable);
|
|
51
|
+
dialogRef.current?.querySelector("button.ids-dialog__close-button");
|
|
55
52
|
focusable?.focus();
|
|
56
53
|
});
|
|
57
54
|
}
|
|
@@ -61,19 +58,19 @@ const IDSDialog = ({ show = false, srClose = "Stäng", dismissible = false, auto
|
|
|
61
58
|
setIsVisible(false);
|
|
62
59
|
}
|
|
63
60
|
};
|
|
64
|
-
return (jsxs(Fragment, { children: [jsx("div", { className: "ids-dialog__trigger", children: trigger }), jsx("div", { className: clsx("ids-dialog-overlay", {
|
|
65
|
-
"ids-dialog-overlay--hidden": !isVisible
|
|
66
|
-
}), onClick: overlayClick }), jsxs("div", { ref: dialogRef, className: clsx("ids-dialog", {
|
|
61
|
+
return (jsxs(Fragment, { children: [jsx("div", { className: "ids-dialog__trigger", children: trigger }), !noOverlay && (jsx("div", { className: clsx("ids-dialog-overlay", {
|
|
62
|
+
"ids-dialog-overlay--hidden": !isVisible
|
|
63
|
+
}), onClick: overlayClick })), jsxs("div", { ref: dialogRef, className: clsx("ids-dialog", {
|
|
67
64
|
"ids-dialog--hidden": !isVisible
|
|
68
|
-
}, className), role: "dialog", "aria-modal": "true",
|
|
65
|
+
}, className), role: "dialog", "aria-modal": "true", style: {
|
|
69
66
|
width,
|
|
70
67
|
maxWidth,
|
|
71
68
|
height,
|
|
72
69
|
maxHeight: height || undefined
|
|
73
|
-
}, ...props, children: [dismissible && (jsx("div", { className: "ids-
|
|
70
|
+
}, ...props, children: [dismissible && (jsx("div", { className: "ids-dialog__dismissible", children: jsx("button", { "aria-label": srClose, className: "ids-dialog__close-button", onClick: () => setIsVisible(false) }) })), jsxs("div", { ref: bodyRef, className: clsx("ids-dialog__body", {
|
|
74
71
|
"ids-dialog__body--has-scrollbar": hasScrollbar,
|
|
75
72
|
"ids-dialog__body--scroll-area-focus": !noScrollAreaFocus
|
|
76
|
-
}), tabIndex: noScrollAreaFocus ? -1 : 0, children: [jsx("div", {
|
|
77
|
-
}
|
|
73
|
+
}), tabIndex: noScrollAreaFocus ? -1 : 0, children: [jsx("div", { className: "ids-dialog__body-headline", children: headline }), jsx("div", { className: "ids-dialog__body-content", children: children }), actions && jsx("div", { className: "ids-dialog__footer", children: actions })] })] })] }));
|
|
74
|
+
}
|
|
78
75
|
|
|
79
76
|
export { IDSDialog };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import "@inera/ids-design/components/dropdown/dropdown.css";
|
|
3
|
+
export interface IDSDropdownContentButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
4
|
+
icon?: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const IDSDropdownContentButton: import("react").ForwardRefExoticComponent<IDSDropdownContentButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import '@inera/ids-design/components/dropdown/dropdown.css';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
|
|
6
|
+
const IDSDropdownContentButton = forwardRef(({ icon, children, className, ...props }, ref) => {
|
|
7
|
+
return (jsxs("button", { ...props, ref: ref, role: "menuitem", className: clsx("ids-dropdown-content__button", className), children: [icon && jsx("span", { className: `ids-icon-${icon} ids-dropdown--start-icon` }), children] }));
|
|
8
|
+
});
|
|
9
|
+
IDSDropdownContentButton.displayName = "IDSDropdownContentButton";
|
|
10
|
+
|
|
11
|
+
export { IDSDropdownContentButton };
|
|
@@ -3,4 +3,4 @@ import "@inera/ids-design/components/dropdown/dropdown.css";
|
|
|
3
3
|
export interface IDSDropdownContentLinkProps extends Omit<HTMLAttributes<HTMLAnchorElement>, "children"> {
|
|
4
4
|
children: ReactElement;
|
|
5
5
|
}
|
|
6
|
-
export declare
|
|
6
|
+
export declare function IDSDropdownContentLink({ children, className, ...props }: IDSDropdownContentLinkProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
@@ -3,18 +3,19 @@ import { isValidElement, cloneElement } from 'react';
|
|
|
3
3
|
import '@inera/ids-design/components/dropdown/dropdown.css';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
function IDSDropdownContentLink({ children, className, ...props }) {
|
|
7
7
|
if (!isValidElement(children) || children.type !== "a") {
|
|
8
8
|
console.error("IDSDropdownContentLink expects a single <a> element as its child.");
|
|
9
9
|
return null;
|
|
10
10
|
}
|
|
11
|
-
const childClassName = clsx("ids-dropdown-
|
|
11
|
+
const childClassName = clsx("ids-dropdown-content__link", children.props.className, className);
|
|
12
12
|
const content = jsx(Fragment, { children: children.props.children });
|
|
13
13
|
return cloneElement(children, {
|
|
14
14
|
...props,
|
|
15
15
|
className: childClassName,
|
|
16
|
+
role: "menuitem",
|
|
16
17
|
children: content
|
|
17
18
|
});
|
|
18
|
-
}
|
|
19
|
+
}
|
|
19
20
|
|
|
20
21
|
export { IDSDropdownContentLink };
|
|
@@ -2,15 +2,16 @@ import React, { ReactNode, ReactElement } from "react";
|
|
|
2
2
|
import "@inera/ids-design/components/dropdown/dropdown.css";
|
|
3
3
|
type Position = "left" | "right";
|
|
4
4
|
interface IDSDropdownProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
5
|
+
button: ReactElement;
|
|
5
6
|
expanded?: boolean;
|
|
7
|
+
mBlock?: boolean;
|
|
8
|
+
onClosed?: () => void;
|
|
9
|
+
onOpened?: () => void;
|
|
6
10
|
persistent?: boolean;
|
|
7
11
|
position?: Position;
|
|
8
12
|
sBlock?: boolean;
|
|
9
|
-
|
|
10
|
-
onOpened?: () => void;
|
|
11
|
-
onClosed?: () => void;
|
|
12
|
-
button: ReactElement;
|
|
13
|
+
maxHeight?: string;
|
|
13
14
|
children: ReactNode;
|
|
14
15
|
}
|
|
15
|
-
export declare
|
|
16
|
+
export declare function IDSDropdown({ expanded, persistent, position, sBlock, mBlock, maxHeight, onOpened, onClosed, children, className, button, ...props }: IDSDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export {};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import
|
|
3
|
+
import React, { useState, useRef, useEffect, isValidElement, cloneElement } from 'react';
|
|
4
4
|
import '@inera/ids-design/components/dropdown/dropdown.css';
|
|
5
5
|
import { useElementId } from '../utils/hooks/useElementId.js';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
function IDSDropdown({ expanded = false, persistent = false, position = "right", sBlock = false, mBlock = false, maxHeight = "", onOpened, onClosed, children, className, button, ...props }) {
|
|
9
9
|
const [isExpanded, setIsExpanded] = useState(expanded);
|
|
10
10
|
const triggerRef = useRef(null);
|
|
11
11
|
const contentRef = useRef(null);
|
|
12
12
|
const buttonId = useElementId();
|
|
13
|
-
const contentId = useElementId();
|
|
14
13
|
useEffect(() => {
|
|
15
14
|
setIsExpanded(expanded);
|
|
16
15
|
}, [expanded]);
|
|
@@ -45,30 +44,32 @@ const IDSDropdown = ({ expanded = false, persistent = false, position = "right",
|
|
|
45
44
|
id: buttonId,
|
|
46
45
|
ref: triggerRef,
|
|
47
46
|
onClick: handleToggle,
|
|
48
|
-
"aria-controls": contentId,
|
|
49
47
|
"aria-expanded": isExpanded,
|
|
48
|
+
"aria-haspopup": "menu",
|
|
50
49
|
className: clsx(button.props.className)
|
|
51
50
|
});
|
|
52
51
|
}
|
|
53
52
|
return null;
|
|
54
53
|
};
|
|
55
54
|
const renderDropdownContent = () => {
|
|
56
|
-
const enhancedChildren =
|
|
57
|
-
if (!
|
|
55
|
+
const enhancedChildren = React.Children.map(children, (child, i) => {
|
|
56
|
+
if (!React.isValidElement(child))
|
|
58
57
|
return child;
|
|
59
58
|
return cloneElement(child, {
|
|
60
59
|
key: `dropdown-content-link-${i}`
|
|
61
60
|
});
|
|
62
61
|
});
|
|
63
|
-
return (jsx("div", {
|
|
64
|
-
"ids-
|
|
65
|
-
"ids-
|
|
66
|
-
|
|
62
|
+
return (jsx("div", { ref: contentRef, "aria-labelledby": buttonId, "aria-hidden": !isExpanded, role: "menu", className: clsx(`ids-dropdown-content ids-dropdown-content--position-${position}`, {
|
|
63
|
+
"ids-dropdown-content--show": isExpanded,
|
|
64
|
+
"ids-dropdown-content--mblock": mBlock,
|
|
65
|
+
"ids-dropdown-content--sblock": sBlock,
|
|
66
|
+
"ids-dropdown-content--scrollable": !!maxHeight
|
|
67
|
+
}), ...props, children: jsx("div", { className: "ids-dropdown-content__scroll-area", role: "menu", style: { maxHeight: maxHeight || "auto" }, tabIndex: !!maxHeight ? 0 : -1, children: enhancedChildren }) }));
|
|
67
68
|
};
|
|
68
69
|
return (jsxs("span", { className: clsx(`ids-dropdown`, className, {
|
|
69
70
|
"ids-dropdown--mblock": mBlock,
|
|
70
71
|
"ids-dropdown--sblock": sBlock
|
|
71
72
|
}), children: [renderTrigger(), isExpanded && renderDropdownContent()] }));
|
|
72
|
-
}
|
|
73
|
+
}
|
|
73
74
|
|
|
74
75
|
export { IDSDropdown };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactElement, ReactNode } from "react";
|
|
2
|
-
import "@inera/ids-design/components/footer-1177/footer-1177.css";
|
|
3
2
|
import { IDSLinkProps } from "../link/link";
|
|
4
|
-
|
|
3
|
+
import "@inera/ids-design/components/footer-1177/footer-1177.css";
|
|
4
|
+
export interface Footer1177Props extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
headline?: string;
|
|
6
6
|
srHeadline?: string;
|
|
7
7
|
subHeadline?: string;
|
|
@@ -9,9 +9,6 @@ interface Footer1177Props extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
9
9
|
col1?: ReactElement<IDSLinkProps>[];
|
|
10
10
|
col2?: ReactElement<IDSLinkProps>[];
|
|
11
11
|
col3?: ReactElement<IDSLinkProps>[];
|
|
12
|
-
col1Size?: string;
|
|
13
|
-
col2Size?: string;
|
|
14
|
-
col3Size?: string;
|
|
15
12
|
subFooterLeft?: ReactNode;
|
|
16
13
|
subFooterRight?: ReactNode;
|
|
17
14
|
mobileMenu?: ReactNode;
|
|
@@ -19,5 +16,4 @@ interface Footer1177Props extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
19
16
|
subFooterMobile?: ReactNode;
|
|
20
17
|
children?: ReactNode;
|
|
21
18
|
}
|
|
22
|
-
export declare
|
|
23
|
-
export {};
|
|
19
|
+
export declare function IDSFooter1177({ headline, srHeadline, subHeadline, cols, col1, col2, col3, subFooterLeft, subFooterRight, mobileMenu, mobileLinks, subFooterMobile, children, className, ...props }: Footer1177Props): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,67 +1,24 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
-
import React__default, { useRef, useEffect } from 'react';
|
|
4
2
|
import clsx from 'clsx';
|
|
5
3
|
import '@inera/ids-design/components/footer-1177/footer-1177.css';
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
const ref = useRef(null);
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
}, [cols, col1Size, col2Size, col3Size]);
|
|
11
|
-
const getColumnWidth = (col) => {
|
|
12
|
-
const map = { 1: col1Size, 2: col2Size, 3: col3Size };
|
|
13
|
-
return `ids-footer-1177__col-size-${map[col]}`;
|
|
14
|
-
};
|
|
5
|
+
function IDSFooter1177({ headline = "", srHeadline = "", subHeadline = "", cols = 3, col1 = [], col2 = [], col3 = [], subFooterLeft, subFooterRight, mobileMenu, mobileLinks, subFooterMobile, children, className, ...props }) {
|
|
15
6
|
const renderHeadline = () => {
|
|
16
7
|
if (srHeadline) {
|
|
17
|
-
return (jsxs(Fragment, { children: [jsxs("
|
|
8
|
+
return (jsxs(Fragment, { children: [jsxs("h2", { className: "ids-footer-1177__headline--sr", children: [srHeadline, jsx("span", { className: "ids-footer-1177__headline--sub", children: subHeadline })] }), jsxs("h2", { "aria-hidden": "true", className: "ids-footer-1177__headline", children: [headline, jsx("span", { className: "ids-footer-1177__headline--sub", children: subHeadline })] })] }));
|
|
18
9
|
}
|
|
19
|
-
return (jsxs("
|
|
20
|
-
};
|
|
21
|
-
const renderCol = (column) => {
|
|
22
|
-
return column?.map((link, idx) => {
|
|
23
|
-
if (React__default.isValidElement(link)) {
|
|
24
|
-
return React__default.cloneElement(link, {
|
|
25
|
-
key: `footer-link-${idx}`,
|
|
26
|
-
colorPreset: 2,
|
|
27
|
-
block: true
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
return link;
|
|
31
|
-
});
|
|
10
|
+
return (jsxs("h2", { className: "ids-footer-1177__headline", children: [headline, jsx("span", { className: "ids-footer-1177__headline--sub", children: subHeadline })] }));
|
|
32
11
|
};
|
|
33
12
|
const renderCols = () => {
|
|
34
13
|
if (cols === 1) {
|
|
35
|
-
return
|
|
14
|
+
return jsx("div", { className: clsx("ids-footer-1177__link-col", "ids-footer-1177__link-col--100"), children: col1 });
|
|
36
15
|
}
|
|
37
|
-
|
|
38
|
-
return (jsxs(Fragment, { children: [jsx("div", { className: clsx("ids-footer-1177__link-col", "ids-footer-1177__link-col--
|
|
16
|
+
if (cols === 2) {
|
|
17
|
+
return (jsxs(Fragment, { children: [jsx("div", { className: clsx("ids-footer-1177__link-col", "ids-footer-1177__link-col--50"), children: col1 }), jsx("div", { className: clsx("ids-footer-1177__link-col", "ids-footer-1177__link-col--50"), children: col2 })] }));
|
|
39
18
|
}
|
|
40
|
-
return (jsxs(Fragment, { children: [jsx("div", { className: clsx("ids-footer-1177__link-col",
|
|
41
|
-
};
|
|
42
|
-
const renderCookieLinks = (content) => {
|
|
43
|
-
const applyProps = (node, keyPrefix = "") => {
|
|
44
|
-
if (!node)
|
|
45
|
-
return null;
|
|
46
|
-
if (Array.isArray(node)) {
|
|
47
|
-
return node.map((child, idx) => applyProps(child, `${keyPrefix}-${idx}`));
|
|
48
|
-
}
|
|
49
|
-
if (React__default.isValidElement(node)) {
|
|
50
|
-
if (node.type === React__default.Fragment) {
|
|
51
|
-
return (jsx(React__default.Fragment, { children: applyProps(node.props.children, keyPrefix) }, keyPrefix));
|
|
52
|
-
}
|
|
53
|
-
return React__default.cloneElement(node, {
|
|
54
|
-
key: `footer-sub-footer-right-link-${keyPrefix}`,
|
|
55
|
-
colorPreset: 4,
|
|
56
|
-
small: true,
|
|
57
|
-
...node.props
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
return node;
|
|
61
|
-
};
|
|
62
|
-
return applyProps(content, "root");
|
|
19
|
+
return (jsxs(Fragment, { children: [jsx("div", { className: clsx("ids-footer-1177__link-col", "ids-footer-1177__link-col--33"), children: col1 }), jsx("div", { className: clsx("ids-footer-1177__link-col", "ids-footer-1177__link-col--33"), children: col2 }), jsx("div", { className: clsx("ids-footer-1177__link-col", "ids-footer-1177__link-col--33"), children: col3 })] }));
|
|
63
20
|
};
|
|
64
|
-
return (jsxs("footer", { className: clsx("ids-footer-1177", className),
|
|
65
|
-
}
|
|
21
|
+
return (jsxs("footer", { className: clsx("ids-footer-1177", className), ...props, children: [jsx("div", { className: "ids-footer-1177__inner-wrapper", children: jsxs("div", { className: "ids-footer-1177__inner", children: [jsx("div", { className: "ids-footer-1177__headline-wrapper", children: renderHeadline() }), jsxs("div", { className: "ids-footer-1177__content", children: [jsx("div", { className: "ids-footer-1177__text", children: children }), jsx("div", { className: "ids-footer-1177__cols", children: renderCols() })] })] }) }), jsx("div", { className: "ids-footer-1177__mobile-menu", children: mobileMenu }), jsxs("div", { className: "ids-footer-1177__sub-footer", children: [jsx("div", { className: "ids-footer-1177__sub-footer-container", children: jsxs("div", { className: "ids-footer-1177__sub-footer-inner", children: [jsx("div", { className: "ids-footer-1177__sub-footer-left", children: subFooterLeft }), jsx("div", { className: "ids-footer-1177__sub-footer-right", children: subFooterRight }), jsx("div", { className: "ids-footer-1177__mobile-links", children: mobileLinks })] }) }), jsx("div", { className: "ids-footer-1177__sub-footer-mobile", children: jsx("div", { className: "ids-footer-1177__sub-footer-mobile-text", children: subFooterMobile }) })] })] }));
|
|
22
|
+
}
|
|
66
23
|
|
|
67
24
|
export { IDSFooter1177 };
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import React, { ReactElement, ReactNode } from "react";
|
|
2
|
-
import "@inera/ids-design/components/footer-1177-admin/footer-1177-admin.css";
|
|
3
2
|
import { IDSLinkProps } from "../link/link";
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
import "@inera/ids-design/components/footer-1177-admin/footer-1177-admin.css";
|
|
4
|
+
interface Footer1177AdminProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
headline?: string;
|
|
6
|
+
srHeadline?: string;
|
|
6
7
|
cols?: 1 | 2 | 3;
|
|
7
8
|
col1?: ReactElement<IDSLinkProps>[];
|
|
8
9
|
col2?: ReactElement<IDSLinkProps>[];
|
|
9
10
|
col3?: ReactElement<IDSLinkProps>[];
|
|
10
|
-
col1Size?: string;
|
|
11
|
-
col2Size?: string;
|
|
12
|
-
col3Size?: string;
|
|
13
11
|
subFooterLeft?: ReactNode;
|
|
14
12
|
subFooterRight?: ReactNode;
|
|
15
|
-
subFooterMobile?: ReactNode;
|
|
16
13
|
mobileMenu?: ReactNode;
|
|
17
14
|
mobileLinks?: ReactNode;
|
|
15
|
+
subFooterMobile?: ReactNode;
|
|
18
16
|
children?: ReactNode;
|
|
19
17
|
}
|
|
20
|
-
export declare const IDSFooter1177Admin: React.FC<
|
|
18
|
+
export declare const IDSFooter1177Admin: React.FC<Footer1177AdminProps>;
|
|
21
19
|
export {};
|