@inera/ids-react 7.2.0 → 8.0.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.js +4 -4
- package/components/alert/alert.d.ts +3 -3
- package/components/alert/alert.js +8 -5
- package/components/badge/badge.d.ts +0 -1
- package/components/badge/badge.js +2 -2
- package/components/box-link/box-link.js +2 -2
- package/components/breadcrumbs/breadcrumbs.js +3 -3
- package/components/button/button.d.ts +6 -7
- package/components/button/button.js +5 -79
- package/components/card/card.d.ts +4 -4
- package/components/card/card.js +5 -4
- 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 +6 -0
- package/components/date-label/date-label.js +18 -3
- package/components/dialog/dialog.d.ts +12 -12
- package/components/dialog/dialog.js +5 -7
- 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.js +2 -1
- package/components/dropdown/dropdown.d.ts +5 -4
- package/components/dropdown/dropdown.js +11 -10
- package/components/footer-1177/footer-1177.d.ts +0 -3
- package/components/footer-1177/footer-1177.js +17 -23
- package/components/footer-1177-admin/footer-1177-admin.d.ts +5 -7
- package/components/footer-1177-admin/footer-1177-admin.js +21 -26
- package/components/footer-1177-pro/footer-1177-pro.d.ts +15 -10
- package/components/footer-1177-pro/footer-1177-pro.js +41 -22
- package/components/footer-inera/footer-inera.d.ts +2 -6
- package/components/footer-inera/footer-inera.js +21 -27
- package/components/footer-inera-admin/footer-inera-admin.d.ts +2 -6
- package/components/footer-inera-admin/footer-inera-admin.js +23 -26
- 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 +2 -2
- 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/container.d.ts +0 -1
- package/components/grid/container.js +4 -4
- 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 +1 -0
- package/components/header-1177/header-1177-item.js +6 -5
- 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 +4 -4
- package/components/header-1177/header-1177-nav-item.js +6 -7
- package/components/header-1177/header-1177-nav.d.ts +2 -0
- package/components/header-1177/header-1177-nav.js +3 -4
- 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 +2 -6
- package/components/header-1177/header-1177.js +6 -22
- 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.js +4 -4
- 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.js +10 -11
- package/components/header-1177-admin/header-1177-admin-nav.js +4 -5
- package/components/header-1177-admin/header-1177-admin.d.ts +1 -4
- package/components/header-1177-admin/header-1177-admin.js +5 -18
- 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.js +5 -5
- 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.js +11 -11
- package/components/header-1177-pro/header-1177-pro-nav.d.ts +2 -2
- package/components/header-1177-pro/header-1177-pro-nav.js +5 -20
- 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 +4 -7
- package/components/header-1177-pro/header-1177-pro.js +4 -28
- package/components/header-inera/header-inera-item.js +1 -2
- 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 +6 -9
- package/components/header-inera/header-inera-nav.js +2 -3
- package/components/header-inera/header-inera.d.ts +1 -2
- package/components/header-inera/header-inera.js +4 -7
- 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.js +1 -1
- 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.js +6 -9
- package/components/header-inera-admin/header-inera-admin-nav.js +2 -3
- package/components/header-inera-admin/header-inera-admin.d.ts +1 -1
- package/components/header-inera-admin/header-inera-admin.js +4 -5
- 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 +3 -3
- package/components/link/link.js +3 -3
- package/components/mobile/menu/item/mobile-item.js +4 -4
- package/components/navigation/content/navigation-content.d.ts +1 -0
- package/components/navigation/content/navigation-content.js +7 -6
- package/components/pagination/data-pagination/data-pagination.d.ts +7 -11
- package/components/pagination/data-pagination/data-pagination.js +7 -7
- package/components/pagination/list-pagination/list-pagination.js +6 -11
- package/components/popover/popover.js +9 -9
- package/components/progressbar/progressbar.js +2 -2
- package/components/puff-list/puff-list-item/puff-list-item-info.d.ts +1 -0
- package/components/puff-list/puff-list-item/puff-list-item-info.js +5 -2
- package/components/puff-list/puff-list-item/puff-list-item.d.ts +8 -0
- package/components/puff-list/puff-list-item/puff-list-item.js +47 -13
- package/components/puff-list/puff-list.js +2 -2
- package/components/region-icon/region-icon.js +1 -2
- package/components/side-menu/side-menu.d.ts +1 -1
- package/components/side-menu/side-menu.js +6 -6
- 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.js +4 -4
- package/components/tabs/tab-panel.js +2 -2
- package/components/tabs/tab.js +2 -2
- package/components/tabs/tabs.js +13 -13
- package/components/tooltip/tooltip.js +2 -2
- package/components/utils/contexts/HeaderContext.d.ts +0 -2
- package/index.d.ts +16 -144
- package/index.js +16 -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,35 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { useState, useRef, useEffect } from 'react';
|
|
3
|
+
import { useId, useState, useRef, useEffect } from 'react';
|
|
4
4
|
import '@inera/ids-design/components/header-inera-admin/header-inera-admin-avatar.css';
|
|
5
|
-
import { useHeaderContext } from '../utils/contexts/HeaderContext.js';
|
|
6
5
|
import clsx from 'clsx';
|
|
6
|
+
import { useHeaderContext } from '../utils/contexts/HeaderContext.js';
|
|
7
7
|
|
|
8
|
-
const IDSHeaderIneraAdminAvatar = ({ username
|
|
8
|
+
const IDSHeaderIneraAdminAvatar = ({ username, unit, expanded = false, children, persistent = false, ...props }) => {
|
|
9
|
+
const dropdownId = useId();
|
|
10
|
+
const [isExpanded, setIsExpanded] = useState(expanded);
|
|
9
11
|
const headerContext = useHeaderContext();
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
+
const containerRef = useRef(null);
|
|
13
|
+
const dropdownRef = useRef(null);
|
|
14
|
+
const toggleExpanded = () => setIsExpanded(prev => !prev);
|
|
15
|
+
const handleClickOutside = (event) => {
|
|
16
|
+
if (!persistent && containerRef.current && !containerRef.current.contains(event.target)) {
|
|
17
|
+
setIsExpanded(false);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
12
20
|
useEffect(() => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
toggleExpanded();
|
|
17
|
-
}
|
|
21
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
22
|
+
return () => {
|
|
23
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
18
24
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const toggleExpanded = () => {
|
|
23
|
-
const newExpanded = !expanded;
|
|
24
|
-
setExpanded(newExpanded);
|
|
25
|
-
newExpanded ? onExpanded?.() : onClosed?.();
|
|
25
|
+
}, [persistent]);
|
|
26
|
+
const handleLinkClick = () => {
|
|
27
|
+
setIsExpanded(false);
|
|
26
28
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (!persistent && isExpanded) {
|
|
31
|
+
const links = dropdownRef.current?.querySelectorAll("a") || [];
|
|
32
|
+
links.forEach(link => link.addEventListener("click", handleLinkClick));
|
|
33
|
+
return () => {
|
|
34
|
+
links.forEach(link => link.removeEventListener("click", handleLinkClick));
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}, [isExpanded, persistent]);
|
|
38
|
+
return (jsx("div", { ref: containerRef, className: clsx("ids-header-inera-admin-avatar", {
|
|
29
39
|
"ids-header-inera-admin-avatar--unresponsive": headerContext?.unresponsive
|
|
30
|
-
}),
|
|
31
|
-
|
|
32
|
-
|
|
40
|
+
}), ...props, children: jsxs("div", { className: "ids-header-inera-admin-avatar__menu-wrapper", children: [jsxs("button", { className: clsx("ids-header-inera-admin-avatar__button", {
|
|
41
|
+
"ids-header-inera-admin-avatar__button--expanded": isExpanded
|
|
42
|
+
}), onClick: toggleExpanded, "aria-controls": dropdownId, "aria-expanded": isExpanded, children: [jsx("div", { className: "ids-header-inera-admin-avatar__name", title: username, children: username }), unit && (jsx("div", { className: "ids-header-inera-admin-avatar__unit", title: unit, children: unit }))] }), jsx("div", { ref: dropdownRef, id: dropdownId, className: clsx("ids-header-inera-admin-avatar__menu", {
|
|
43
|
+
"ids-header-inera-admin-avatar__menu--expanded": isExpanded
|
|
44
|
+
}), children: children && jsx("div", { className: "ids-header-inera-admin-avatar__menu-links", children: children }) })] }) }));
|
|
33
45
|
};
|
|
34
46
|
|
|
35
47
|
export { IDSHeaderIneraAdminAvatar };
|
|
@@ -12,7 +12,7 @@ const IDSHeaderIneraAdminItem = ({ mobile = false, separatorLeft = false, icon =
|
|
|
12
12
|
"ids-header-inera-admin-item__separator": separatorLeft,
|
|
13
13
|
"ids-header-inera-admin-item--unresponsive": headerContext?.unresponsive
|
|
14
14
|
});
|
|
15
|
-
const renderContent = () => (jsxs(Fragment, { children: [icon && (jsx("div", { className: "ids-header-inera-admin-item__icon", "aria-
|
|
15
|
+
const renderContent = () => (jsxs(Fragment, { children: [icon && (jsx("div", { className: "ids-header-inera-admin-item__icon", "aria-hidden": "true", children: jsx("span", { className: `ids-icon-${icon}` }) })), jsx("div", { className: "ids-header-inera-admin-item__text", children: text })] }));
|
|
16
16
|
if (link && isValidElement(link)) {
|
|
17
17
|
return cloneElement(link, {
|
|
18
18
|
...props,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import "@inera/ids-design/components/header-inera-admin/header-inera-admin-menu-mobile.css";
|
|
3
|
+
interface IDSHeaderIneraAdminMenuMobileProps {
|
|
4
|
+
srLabel?: string;
|
|
5
|
+
persistent?: boolean;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
onExpanded?: () => void;
|
|
8
|
+
onClosed?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const IDSHeaderIneraAdminMenuMobile: React.FC<IDSHeaderIneraAdminMenuMobileProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useRef, useEffect } from 'react';
|
|
4
|
+
import '@inera/ids-design/components/header-inera-admin/header-inera-admin-menu-mobile.css';
|
|
5
|
+
import { useHeaderContext } from '../utils/contexts/HeaderContext.js';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
|
|
8
|
+
const IDSHeaderIneraAdminMenuMobile = ({ srLabel = "Meny", persistent = false, children, onExpanded, onClosed, ...props }) => {
|
|
9
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
10
|
+
const headerContext = useHeaderContext();
|
|
11
|
+
const containerRef = useRef(null);
|
|
12
|
+
const menuRef = useRef(null);
|
|
13
|
+
const handleLinkClick = () => {
|
|
14
|
+
setIsExpanded(false);
|
|
15
|
+
onClosed?.();
|
|
16
|
+
};
|
|
17
|
+
const handleClickOutside = (event) => {
|
|
18
|
+
if (!persistent && containerRef.current && !containerRef.current.contains(event.target)) {
|
|
19
|
+
setIsExpanded(false);
|
|
20
|
+
onClosed?.();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
document.addEventListener("click", handleClickOutside);
|
|
25
|
+
return () => {
|
|
26
|
+
document.removeEventListener("click", handleClickOutside);
|
|
27
|
+
};
|
|
28
|
+
}, [persistent]);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (!persistent && isExpanded) {
|
|
31
|
+
const links = menuRef.current?.querySelectorAll("a") || [];
|
|
32
|
+
links.forEach(link => link.addEventListener("click", handleLinkClick));
|
|
33
|
+
return () => {
|
|
34
|
+
links.forEach(link => link.removeEventListener("click", handleLinkClick));
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}, [isExpanded, persistent]);
|
|
38
|
+
const toggleExpanded = () => {
|
|
39
|
+
const newExpanded = !isExpanded;
|
|
40
|
+
setIsExpanded(newExpanded);
|
|
41
|
+
if (newExpanded) {
|
|
42
|
+
onExpanded?.();
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
onClosed?.();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
return (jsxs("div", { className: "ids-header-inera-admin-menu-mobile-component", ref: containerRef, ...props, children: [jsx("button", { onClick: toggleExpanded, "aria-expanded": isExpanded, "aria-label": srLabel, className: clsx("ids-header-inera-admin-menu-mobile", {
|
|
49
|
+
"ids-header-inera-admin-menu-mobile--unresponsive": headerContext?.unresponsive
|
|
50
|
+
}), children: jsx("div", { className: "ids-hamburger", children: jsx("span", { className: "ids-hamburger__lines" }) }) }), isExpanded && (jsx("div", { className: "ids-header-inera-admin-menu-mobile__items", ref: menuRef, children: children }))] }));
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export { IDSHeaderIneraAdminMenuMobile };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import
|
|
3
|
+
import React, { useState, useRef, useCallback, useEffect } from 'react';
|
|
4
4
|
import '@inera/ids-design/components/header-inera-admin/header-inera-admin-nav-item.css';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { useHeaderContext } from '../utils/contexts/HeaderContext.js';
|
|
7
7
|
import { useElementId } from '../utils/hooks/useElementId.js';
|
|
8
8
|
|
|
9
|
-
const IDSHeaderIneraAdminNavItem = ({ label = "", active = false, expanded = false, notification, children, col1, col2, col3, col4 }) => {
|
|
9
|
+
const IDSHeaderIneraAdminNavItem = ({ label = "", active = false, expanded = false, notification, children, col1, col2, col3, col4, ...props }) => {
|
|
10
10
|
const headerContext = useHeaderContext();
|
|
11
11
|
const [isExpanded, setIsExpanded] = useState(expanded);
|
|
12
12
|
const containerRef = useRef(null);
|
|
@@ -37,8 +37,8 @@ const IDSHeaderIneraAdminNavItem = ({ label = "", active = false, expanded = fal
|
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
const renderLink = (link) => {
|
|
40
|
-
return
|
|
41
|
-
?
|
|
40
|
+
return React.isValidElement(link)
|
|
41
|
+
? React.cloneElement(link, {
|
|
42
42
|
activeIcon: true,
|
|
43
43
|
block: true,
|
|
44
44
|
colorPreset: 2,
|
|
@@ -49,14 +49,11 @@ const IDSHeaderIneraAdminNavItem = ({ label = "", active = false, expanded = fal
|
|
|
49
49
|
const renderContent = () => {
|
|
50
50
|
if (!isExpanded)
|
|
51
51
|
return null;
|
|
52
|
-
return (jsx("div", { id: contentId, className: "ids-header-inera-admin-nav-
|
|
53
|
-
"ids-header-inera-admin-nav-item__content-inner--fluid": headerContext?.fluid
|
|
54
|
-
}), children: [jsx("div", { className: "ids-header-inera-admin-nav-item__content-col", children: col1?.map((link, idx) => (jsx("div", { className: "ids-header-inera-admin-nav-item__wrapper", children: renderLink(link) }, idx))) }), jsx("div", { className: "ids-header-inera-admin-nav-item__content-col", children: col2?.map((link, idx) => (jsx("div", { className: "ids-header-inera-admin-nav-item__wrapper", children: renderLink(link) }, idx))) }), jsx("div", { className: "ids-header-inera-admin-nav-item__content-col", children: col3?.map((link, idx) => (jsx("div", { className: "ids-header-inera-admin-nav-item__wrapper", children: renderLink(link) }, idx))) }), jsx("div", { className: "ids-header-inera-admin-nav-item__content-col", children: col4 })] }) }));
|
|
52
|
+
return (jsx("div", { id: contentId, className: "ids-header-inera-admin-nav-item__menu ids-header-inera-admin-nav-item__menu--expanded", children: jsxs("div", { className: "ids-header-inera-admin-nav-item__menu-inner", children: [jsx("div", { className: "ids-header-inera-admin-nav-item__menu-col", children: col1?.map((link, idx) => (jsx("div", { className: "ids-header-inera-admin-nav__menu-item-wrapper", children: renderLink(link) }, idx))) }), jsx("div", { className: "ids-header-inera-admin-nav-item__menu-col", children: col2?.map((link, idx) => (jsx("div", { className: "ids-header-inera-admin-nav__menu-item-wrapper", children: renderLink(link) }, idx))) }), jsx("div", { className: "ids-header-inera-admin-nav-item__menu-col", children: col3?.map((link, idx) => (jsx("div", { className: "ids-header-inera-admin-nav__menu-item-wrapper", children: renderLink(link) }, idx))) }), jsx("div", { className: "ids-header-inera-admin-nav-item__menu-col", children: col4 })] }) }));
|
|
55
53
|
};
|
|
56
54
|
return (jsxs("div", { ref: containerRef, className: clsx("ids-header-inera-admin-nav-item", {
|
|
57
|
-
"ids-header-inera-admin-nav-item--fluid": headerContext?.fluid,
|
|
58
55
|
"ids-header-inera-admin-nav-item--unresponsive": headerContext?.unresponsive
|
|
59
|
-
}), children: [renderNavItem(), renderContent()] }));
|
|
56
|
+
}), ...props, children: [renderNavItem(), renderContent()] }));
|
|
60
57
|
};
|
|
61
58
|
|
|
62
59
|
export { IDSHeaderIneraAdminNavItem };
|
|
@@ -4,13 +4,12 @@ import '@inera/ids-design/components/header-inera-admin/header-inera-admin-nav.c
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useHeaderContext } from '../utils/contexts/HeaderContext.js';
|
|
6
6
|
|
|
7
|
-
const IDSHeaderIneraAdminNav = ({ srText = "Huvudmeny", children }) => {
|
|
7
|
+
const IDSHeaderIneraAdminNav = ({ srText = "Huvudmeny", children, ...props }) => {
|
|
8
8
|
const headerContext = useHeaderContext();
|
|
9
9
|
const classNames = clsx("ids-header-inera-admin-nav", {
|
|
10
|
-
"ids-header-inera-admin-nav--fluid": headerContext?.fluid,
|
|
11
10
|
"ids-header-inera-admin-nav--unresponsive": headerContext?.unresponsive
|
|
12
11
|
});
|
|
13
|
-
return (jsx("nav", { className: classNames, "aria-label": srText, children: jsx("div", { className: "ids-header-inera-admin-nav__nav-items", children: children }) }));
|
|
12
|
+
return (jsx("nav", { className: classNames, "aria-label": srText, ...props, children: jsx("div", { className: "ids-header-inera-admin-nav__nav-items", children: children }) }));
|
|
14
13
|
};
|
|
15
14
|
|
|
16
15
|
export { IDSHeaderIneraAdminNav };
|
|
@@ -3,7 +3,7 @@ import "@inera/ids-design/components/header-inera-admin/header-inera-admin.css";
|
|
|
3
3
|
export interface IDSHeaderIneraAdminProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
brandText?: string;
|
|
5
5
|
serviceName?: string;
|
|
6
|
-
|
|
6
|
+
srLogoText?: string;
|
|
7
7
|
unresponsive?: boolean;
|
|
8
8
|
showLogo?: boolean;
|
|
9
9
|
items?: ReactNode;
|
|
@@ -5,7 +5,7 @@ import '@inera/ids-design/components/header-inera-admin/header-inera-admin.css';
|
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { HeaderProvider } from '../utils/contexts/HeaderContext.js';
|
|
7
7
|
|
|
8
|
-
const IDSHeaderIneraAdmin = ({ brandText = "",
|
|
8
|
+
const IDSHeaderIneraAdmin = ({ brandText = "", unresponsive = false, showLogo = false, items, avatar, skipToContent, brandLink, srLogoText = "Logotyp inera", serviceName = "EN TJÄNST FRÅN INERA", mobileMenu, className, children, ...props }) => {
|
|
9
9
|
const renderBrandText = () => {
|
|
10
10
|
if (brandLink && isValidElement(brandLink)) {
|
|
11
11
|
return (jsx("span", { className: "ids-header-inera-admin__brand-link", children: cloneElement(brandLink, {
|
|
@@ -14,10 +14,9 @@ const IDSHeaderIneraAdmin = ({ brandText = "", fluid = false, unresponsive = fal
|
|
|
14
14
|
}
|
|
15
15
|
return null;
|
|
16
16
|
};
|
|
17
|
-
return (jsx(HeaderProvider, { value: { unresponsive,
|
|
18
|
-
"ids-header-inera-admin--unresponsive": unresponsive
|
|
19
|
-
|
|
20
|
-
}, className), children: [skipToContent && jsx("div", { className: "ids-header-inera-admin__skip-to-content", children: skipToContent }), jsxs("div", { className: "ids-header-inera-admin__inner", children: [jsx("div", { className: "ids-header-inera-admin__service-wrapper", children: jsxs("div", { className: "ids-header-inera-admin__brand", children: [showLogo && jsx("div", { className: "ids-header-inera-admin__logo", "aria-label": "Logotyp inera" }), jsxs("div", { className: "ids-header-inera-admin__brand-inner", children: [renderBrandText(), jsx("h1", { className: "ids-header-inera-admin__brand-text", children: brandText }), jsx("h2", { className: "ids-header-inera-admin__service-name", children: serviceName })] })] }) }), jsxs("div", { className: "ids-header-inera-admin__items", children: [items, " ", avatar, " ", mobileMenu] })] }), children] }) }));
|
|
17
|
+
return (jsx(HeaderProvider, { value: { unresponsive, hideRegionPicker: true }, children: jsxs("header", { className: clsx("ids-header-inera-admin", {
|
|
18
|
+
"ids-header-inera-admin--unresponsive": unresponsive
|
|
19
|
+
}, className), ...props, children: [skipToContent && jsx("div", { className: "ids-header-inera-admin__skip-to-content", children: skipToContent }), jsxs("div", { className: "ids-header-inera-admin__inner", children: [jsxs("div", { className: "ids-header-inera-admin__main", children: [jsx("div", { className: "ids-header-inera-admin__service-wrapper", children: jsxs("div", { className: "ids-header-inera-admin__brand", children: [showLogo && jsx("div", { className: "ids-header-inera-admin__logo", role: "img", "aria-label": srLogoText }), jsxs("div", { className: "ids-header-inera-admin__brand-inner", children: [renderBrandText(), jsx("h1", { className: "ids-header-inera-admin__brand-text", children: brandText }), jsx("h2", { className: "ids-header-inera-admin__service-name", children: serviceName })] })] }) }), jsxs("div", { className: "ids-header-inera-admin__items", children: [items, " ", avatar, " ", mobileMenu && jsx("div", { className: "ids-header-inera-admin__mobile-menu", children: mobileMenu })] })] }), children] })] }) }));
|
|
21
20
|
};
|
|
22
21
|
|
|
23
22
|
export { IDSHeaderIneraAdmin };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import "@inera/ids-design/components/header-patient/header-patient.css";
|
|
3
3
|
interface IDSHeaderPatientProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
|
|
4
|
+
buttons?: ReactNode;
|
|
5
|
+
collapse?: boolean;
|
|
5
6
|
name?: string;
|
|
7
|
+
srLabel?: string;
|
|
6
8
|
ssn?: string;
|
|
7
|
-
collapse?: boolean;
|
|
8
9
|
stack?: boolean;
|
|
9
|
-
buttons?: ReactNode;
|
|
10
10
|
children?: ReactNode;
|
|
11
11
|
}
|
|
12
12
|
export declare const IDSHeaderPatient: React.FC<IDSHeaderPatientProps>;
|
|
@@ -4,7 +4,7 @@ import { useMemo } from 'react';
|
|
|
4
4
|
import '@inera/ids-design/components/header-patient/header-patient.css';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
|
|
7
|
-
const IDSHeaderPatient = ({ srLabel = "", name = "", ssn = "", collapse = false, stack = false, buttons, className, children }) => {
|
|
7
|
+
const IDSHeaderPatient = ({ srLabel = "", name = "", ssn = "", collapse = false, stack = false, buttons, className, children, ...props }) => {
|
|
8
8
|
const isLong = useMemo(() => {
|
|
9
9
|
const trimmed = name.trim();
|
|
10
10
|
const whitespaceCount = (trimmed.match(/\s/g) || []).length;
|
|
@@ -15,7 +15,7 @@ const IDSHeaderPatient = ({ srLabel = "", name = "", ssn = "", collapse = false,
|
|
|
15
15
|
"ids-header-patient--collapse": collapse,
|
|
16
16
|
"ids-header-patient--long-name": isLong
|
|
17
17
|
}, className);
|
|
18
|
-
return (jsx("section", { className: classNames, "aria-label": srLabel, children: jsxs("div", { className: "ids-patient-header__inner", children: [jsxs("div", { className: "ids-header-patient__content", children: [jsxs("div", { className: "ids-header-patient__id", children: [jsx("span", { className: "ids-header-patient__name", children: name }), jsx("span", { className: "ids-header-patient__ssn", children: ssn })] }), jsx("div", { className: "ids-header-patient__info", children: children })] }), buttons && jsx("div", { className: "ids-header-patient__buttons", children: buttons })] }) }));
|
|
18
|
+
return (jsx("section", { className: classNames, "aria-label": srLabel, ...props, children: jsxs("div", { className: "ids-patient-header__inner", children: [jsxs("div", { className: "ids-header-patient__content", children: [jsxs("div", { className: "ids-header-patient__id", children: [jsx("span", { className: "ids-header-patient__name", children: name }), jsx("span", { className: "ids-header-patient__ssn", children: ssn })] }), jsx("div", { className: "ids-header-patient__info", children: children })] }), buttons && jsx("div", { className: "ids-header-patient__buttons", children: buttons })] }) }));
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export { IDSHeaderPatient };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React, { ReactNode, ReactElement, AnchorHTMLAttributes } from "react";
|
|
2
|
-
export type ColorPreset = 0 | 1 | 2 | 3
|
|
2
|
+
export type ColorPreset = 0 | 1 | 2 | 3;
|
|
3
3
|
export interface IDSLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "children"> {
|
|
4
4
|
colorPreset?: ColorPreset;
|
|
5
|
-
light?: boolean;
|
|
6
5
|
active?: boolean;
|
|
7
6
|
activeIcon?: boolean;
|
|
8
7
|
block?: boolean;
|
|
8
|
+
footer?: boolean;
|
|
9
|
+
menu?: boolean;
|
|
9
10
|
underlined?: boolean;
|
|
10
11
|
noUnderline?: boolean;
|
|
11
12
|
small?: boolean;
|
|
12
|
-
large?: boolean;
|
|
13
13
|
focusAnchor?: boolean;
|
|
14
14
|
endItem?: ReactNode;
|
|
15
15
|
children?: ReactElement;
|
package/components/link/link.js
CHANGED
|
@@ -14,7 +14,7 @@ const containsIcon = (node) => {
|
|
|
14
14
|
}
|
|
15
15
|
return false;
|
|
16
16
|
};
|
|
17
|
-
const IDSLink = ({ colorPreset = 0,
|
|
17
|
+
const IDSLink = ({ colorPreset = 0, menu = false, footer = false, active = false, activeIcon = false, block = false, underlined = false, noUnderline = false, small = false, focusAnchor = false, endItem, children, className, ...props }) => {
|
|
18
18
|
const ref = useRef(null);
|
|
19
19
|
if (!isValidElement(children)) {
|
|
20
20
|
console.error("IDSLink requires a single valid React element (e.g., <a> or <Link>) as a child.");
|
|
@@ -24,10 +24,10 @@ const IDSLink = ({ colorPreset = 0, light = false, active = false, activeIcon =
|
|
|
24
24
|
const classNames = clsx("ids-link", colorPreset > 0 && `ids-link--color-${colorPreset}`, {
|
|
25
25
|
"ids-link--icon": hasIcon,
|
|
26
26
|
"ids-link--active-icon": activeIcon,
|
|
27
|
-
"ids-link--light": light || colorPreset === 4,
|
|
28
27
|
"ids-link--block": block,
|
|
28
|
+
"ids-link--menu": menu,
|
|
29
|
+
"ids-link--footer": footer,
|
|
29
30
|
"ids-link--small": small,
|
|
30
|
-
"ids-link--large": large,
|
|
31
31
|
"ids-link--active": active,
|
|
32
32
|
"ids-link--underlined": underlined,
|
|
33
33
|
"ids-link--no-underline": noUnderline,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
-
import
|
|
3
|
+
import React, { useState, useRef, useEffect } from 'react';
|
|
4
4
|
import '@inera/ids-design/components/mobile-menu/mobile-menu.css';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { useElementId } from '../../../utils/hooks/useElementId.js';
|
|
7
7
|
|
|
8
|
-
const IDSMobileMenuItem = ({ level = 1, secondary = false, expanded = false, headline = "", link, active = false, showText = "
|
|
8
|
+
const IDSMobileMenuItem = ({ level = 1, secondary = false, expanded = false, headline = "", link, active = false, showText = "Expandera", hideText = "Minimera", children, onToggleExpansion, ...props }) => {
|
|
9
9
|
const [isExpanded, setIsExpanded] = useState(expanded);
|
|
10
10
|
const subItemId = useRef(useElementId());
|
|
11
11
|
const contentRef = useRef(null);
|
|
@@ -50,8 +50,8 @@ const IDSMobileMenuItem = ({ level = 1, secondary = false, expanded = false, hea
|
|
|
50
50
|
return link;
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
return (jsxs("div", { ref: contentRef, className: clsx(getItemLevelClass(), isExpanded && "ids-mobile-menu-item--expanded", active && "ids-mobile-menu-item--active", secondary && "ids-mobile-menu-item--secondary"), ...props, children: [jsx("div", { className: `ids-mobile-menu-item__inner ${level && "ids-mobile-menu-item__inner--level-" + level}`, children: renderItem() }), jsx("div", { id: subItemId.current, className: "ids-mobile-menu-item__sub-items", children:
|
|
54
|
-
?
|
|
53
|
+
return (jsxs("div", { ref: contentRef, className: clsx(getItemLevelClass(), isExpanded && "ids-mobile-menu-item--expanded", active && "ids-mobile-menu-item--active", secondary && "ids-mobile-menu-item--secondary"), ...props, children: [jsx("div", { className: `ids-mobile-menu-item__inner ${level && "ids-mobile-menu-item__inner--level-" + level}`, children: renderItem() }), jsx("div", { id: subItemId.current, className: "ids-mobile-menu-item__sub-items", children: React.Children.map(children, child => React.isValidElement(child)
|
|
54
|
+
? React.cloneElement(child, {
|
|
55
55
|
"data-ids-sub-item": true,
|
|
56
56
|
level: level + 1
|
|
57
57
|
})
|
|
@@ -2,6 +2,7 @@ import React, { ReactNode } from "react";
|
|
|
2
2
|
import "@inera/ids-design/components/navigation/content/navigation-content.css";
|
|
3
3
|
export interface IDSNavigationContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
headline?: string;
|
|
5
|
+
maxHeight?: string;
|
|
5
6
|
children?: ReactNode;
|
|
6
7
|
}
|
|
7
8
|
export declare const IDSNavigationContent: React.FC<IDSNavigationContentProps>;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import
|
|
3
|
+
import React from 'react';
|
|
4
4
|
import '@inera/ids-design/components/navigation/content/navigation-content.css';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
|
|
7
|
-
const IDSNavigationContent = ({ headline = "", children, className, ...props }) => {
|
|
8
|
-
const enhancedLinks =
|
|
9
|
-
if (!
|
|
7
|
+
const IDSNavigationContent = ({ headline = "", maxHeight = "", children, className, ...props }) => {
|
|
8
|
+
const enhancedLinks = React.Children.map(children, (link, i) => {
|
|
9
|
+
if (!React.isValidElement(link))
|
|
10
10
|
return link;
|
|
11
|
-
const cloned =
|
|
11
|
+
const cloned = React.cloneElement(link, {
|
|
12
12
|
key: `navigation-content-link-${i}`,
|
|
13
13
|
block: true,
|
|
14
|
+
activeIcon: true,
|
|
14
15
|
noUnderline: true
|
|
15
16
|
});
|
|
16
17
|
return (jsx("div", { className: "ids-navigation-content__link-wrapper", children: cloned }, `link-wrapper-${i}`));
|
|
17
18
|
});
|
|
18
|
-
return (jsxs("div", { className: clsx("ids-navigation-content", className), ...props, children: [jsx("div", { className: "ids-navigation-content__border-top", children: jsx("div", { className: "ids-navigation-content__border-top-content" }) }), jsxs("nav", { className: "ids-navigation-content__inner", "aria-labelledby": "content-navigation-headline", id: "content-navigation-inner", children: [jsx("h2", { className: "ids-navigation-content__inner__headline", id: "content-navigation-headline", children: headline }), jsx("div", { className: "ids-navigation-content__links", children: enhancedLinks })] })] }));
|
|
19
|
+
return (jsxs("div", { className: clsx("ids-navigation-content", { "ids-navigation-content--scrollable": maxHeight }, className), ...props, children: [jsx("div", { className: "ids-navigation-content__border-top", children: jsx("div", { className: "ids-navigation-content__border-top-content" }) }), jsxs("nav", { className: "ids-navigation-content__inner", "aria-labelledby": "content-navigation-headline", id: "content-navigation-inner", children: [jsx("h2", { className: "ids-navigation-content__inner__headline", id: "content-navigation-headline", children: headline }), jsx("div", { className: "ids-navigation-content__links", style: { maxHeight: maxHeight }, children: enhancedLinks })] })] }));
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
export { IDSNavigationContent };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ReactNode } from "react";
|
|
1
|
+
import React, { ReactNode, ChangeEvent } from "react";
|
|
2
2
|
import "@inera/ids-design/components/pagination/data-pagination/data-pagination.css";
|
|
3
3
|
export interface IDSDataPaginationProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
label?: string;
|
|
@@ -8,17 +8,13 @@ export interface IDSDataPaginationProps extends React.HTMLAttributes<HTMLDivElem
|
|
|
8
8
|
total: number;
|
|
9
9
|
defaultValue?: string;
|
|
10
10
|
selectId?: string;
|
|
11
|
-
prevId?: string;
|
|
12
|
-
nextId?: string;
|
|
13
11
|
light?: boolean;
|
|
14
12
|
noSelect?: boolean;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
onPrevious?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
21
|
-
onSelectChange?: (event: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
13
|
+
firstPageButton?: ReactNode;
|
|
14
|
+
previousButton?: ReactNode;
|
|
15
|
+
nextButton?: ReactNode;
|
|
16
|
+
lastPageButton?: ReactNode;
|
|
17
|
+
onSelectChange?: (event: ChangeEvent<HTMLSelectElement>) => void;
|
|
22
18
|
children?: ReactNode;
|
|
23
19
|
}
|
|
24
|
-
export declare const IDSDataPagination: React.
|
|
20
|
+
export declare const IDSDataPagination: React.ForwardRefExoticComponent<IDSDataPaginationProps & React.RefAttributes<HTMLSelectElement>>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { useRef } from 'react';
|
|
3
|
+
import { forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
4
|
import '@inera/ids-design/components/pagination/data-pagination/data-pagination.css';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { useElementId } from '../../utils/hooks/useElementId.js';
|
|
7
7
|
|
|
8
|
-
const IDSDataPagination = ({ label = "Rader per sida", from, to, of = "av", total, defaultValue = "", selectId = "",
|
|
8
|
+
const IDSDataPagination = forwardRef(({ label = "Rader per sida", from, to, of = "av", total, defaultValue = "", selectId = "", firstPageButton, previousButton, nextButton, lastPageButton, light = false, noSelect = false, onSelectChange, className, children, ...props }, ref) => {
|
|
9
9
|
const summaryText = `${from} - ${to} ${of} ${total}`;
|
|
10
10
|
const selectElementId = useElementId(selectId);
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
const internalSelectRef = useRef(null);
|
|
12
|
+
useImperativeHandle(ref, () => internalSelectRef.current);
|
|
13
|
+
return (jsxs("div", { className: clsx("ids-data-pagination", { "ids-data-pagination--light": light }, className), ...props, children: [!noSelect && (jsxs("div", { className: "ids-data-pagination__select", children: [jsx("label", { htmlFor: selectElementId, children: label }), jsx("select", { id: selectElementId, ref: internalSelectRef, name: "data-pagination-select-options", defaultValue: defaultValue, onChange: onSelectChange, children: children })] })), jsx("div", { className: "ids-data-pagination__summary", children: summaryText }), jsxs("div", { className: "ids-data-pagination__buttons", children: [firstPageButton && jsx("div", { className: "ids-data-pagination__first-page-button", children: firstPageButton }), previousButton && jsx("div", { className: "ids-data-pagination__prev-button", children: previousButton }), nextButton && jsx("div", { className: "ids-data-pagination__next-button", children: nextButton }), lastPageButton && jsx("div", { className: "ids-data-pagination__last-page-button", children: lastPageButton })] })] }));
|
|
14
|
+
});
|
|
15
|
+
IDSDataPagination.displayName = "IDSDataPagination";
|
|
16
16
|
|
|
17
17
|
export { IDSDataPagination };
|
|
@@ -3,22 +3,22 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import '@inera/ids-design/components/pagination/list-pagination/list-pagination.css';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
|
|
6
|
-
const IDSListPagination = ({ showing = "Visar", from = 0, to = 0, of = "av", total = 0, current = 1, pages = 1, srCurrentPage = "Aktuell sida", srGoToPage = "Gå till sida", srPrevious = "Föregående sida", srNext = "Nästa sida", className, onChangePage, onPrevPage, onNextPage }) => {
|
|
6
|
+
const IDSListPagination = ({ showing = "Visar", from = 0, to = 0, of = "av", total = 0, current = 1, pages = 1, srCurrentPage = "Aktuell sida", srGoToPage = "Gå till sida", srPrevious = "Föregående sida", srNext = "Nästa sida", className, onChangePage, onPrevPage, onNextPage, ...props }) => {
|
|
7
7
|
const renderSummary = () => {
|
|
8
8
|
if (from && to && total) {
|
|
9
|
-
return
|
|
9
|
+
return jsx("div", { className: "ids-list-pagination__summary", children: `${showing} ${from} - ${to} ${of} ${total}` });
|
|
10
10
|
}
|
|
11
11
|
return null;
|
|
12
12
|
};
|
|
13
13
|
const renderPrevButton = () => {
|
|
14
14
|
if (current > 1) {
|
|
15
|
-
return
|
|
15
|
+
return jsx("button", { "aria-label": srPrevious, onClick: () => onPrevPage?.(current - 1), id: "prev-button" });
|
|
16
16
|
}
|
|
17
17
|
return null;
|
|
18
18
|
};
|
|
19
19
|
const renderNextButton = () => {
|
|
20
20
|
if (current < pages) {
|
|
21
|
-
return
|
|
21
|
+
return jsx("button", { "aria-label": srNext, onClick: () => onNextPage?.(current + 1), id: "next-button" });
|
|
22
22
|
}
|
|
23
23
|
return null;
|
|
24
24
|
};
|
|
@@ -37,18 +37,13 @@ const IDSListPagination = ({ showing = "Visar", from = 0, to = 0, of = "av", tot
|
|
|
37
37
|
current + 1,
|
|
38
38
|
...(current < 4 ? [2, 3, 4] : []),
|
|
39
39
|
...(current > pages - 3 ? [pages - 1, pages - 2, pages - 3] : [])
|
|
40
|
-
].includes(i), "data-hidden-before": pages > 7 &&
|
|
41
|
-
i > 1 &&
|
|
42
|
-
buttonArray[i - 2]?.props.hidden &&
|
|
43
|
-
!buttonArray[i - 1]?.props.hidden
|
|
44
|
-
? true
|
|
45
|
-
: undefined, children: jsx("button", { className: clsx("ids-list-pagination__button", {
|
|
40
|
+
].includes(i), "data-hidden-before": pages > 7 && i > 1 && buttonArray[i - 2]?.props.hidden && !buttonArray[i - 1]?.props.hidden ? true : undefined, children: jsx("button", { className: clsx("ids-list-pagination__button", {
|
|
46
41
|
"ids-list-pagination__button--current": isCurrent
|
|
47
42
|
}), "aria-label": isCurrent ? srCurrentPage : `${srGoToPage} ${i}`, onClick: () => !isCurrent && onChangePage?.(i), disabled: isCurrent, children: i }) }, i));
|
|
48
43
|
}
|
|
49
44
|
return (jsx("nav", { children: jsx("ul", { className: "ids-list-pagination__list", children: buttonArray }) }));
|
|
50
45
|
};
|
|
51
|
-
return (jsxs("div", { className: clsx("ids-list-pagination", className), children: [renderSummary(), jsxs("div", { className: "ids-list-pagination__content", children: [jsx("div", { className: "ids-list-pagination__prev-button", children: renderPrevButton() }), jsx("div", { className: "ids-list-pagination__nav-buttons", children: renderButtons() }), jsx("div", { className: "ids-list-pagination__next-button", children: renderNextButton() })] })] }));
|
|
46
|
+
return (jsxs("div", { className: clsx("ids-list-pagination", className), ...props, children: [renderSummary(), jsxs("div", { className: "ids-list-pagination__content", children: [jsx("div", { className: "ids-list-pagination__prev-button", children: renderPrevButton() }), jsx("div", { className: "ids-list-pagination__nav-buttons", children: renderButtons() }), jsx("div", { className: "ids-list-pagination__next-button", children: renderNextButton() })] })] }));
|
|
52
47
|
};
|
|
53
48
|
|
|
54
49
|
export { IDSListPagination };
|
|
@@ -5,8 +5,10 @@ import '@inera/ids-design/components/popover/popover.css';
|
|
|
5
5
|
import '@inera/ids-design/components/popover/popover-content.css';
|
|
6
6
|
import { useFocusTrap } from '../utils/hooks/useFocusTrap.js';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
|
+
import { useElementId } from '../utils/hooks/useElementId.js';
|
|
8
9
|
|
|
9
|
-
const IDSPopover = ({ position = "bottom", category = "", trigger, maxWidth = 260, maxHeight = 260, show = false, noFocusTrap = false, autoFocus = false, srCloseText = "Stäng", headline, children, className, onVisibilityChange }) => {
|
|
10
|
+
const IDSPopover = ({ position = "bottom", category = "", trigger, maxWidth = 260, maxHeight = 260, show = false, noFocusTrap = false, autoFocus = false, srCloseText = "Stäng", headline, children, className, onVisibilityChange, ...props }) => {
|
|
11
|
+
const contentId = useElementId();
|
|
10
12
|
const [isVisible, setIsVisible] = useState(show);
|
|
11
13
|
const [popoverContentStyle, setPopoverContentStyle] = useState({
|
|
12
14
|
position: "absolute",
|
|
@@ -19,7 +21,6 @@ const IDSPopover = ({ position = "bottom", category = "", trigger, maxWidth = 26
|
|
|
19
21
|
});
|
|
20
22
|
const popoverRef = useRef(null);
|
|
21
23
|
const triggerRef = useRef(null);
|
|
22
|
-
const topBarRef = useRef(null);
|
|
23
24
|
const contentWrapperRef = useRef(null);
|
|
24
25
|
const popoverContentRef = useRef(null);
|
|
25
26
|
useFocusTrap(popoverContentRef.current, isVisible && !noFocusTrap);
|
|
@@ -103,12 +104,11 @@ const IDSPopover = ({ position = "bottom", category = "", trigger, maxWidth = 26
|
|
|
103
104
|
return () => document.removeEventListener("keydown", handleEsc);
|
|
104
105
|
}, [isVisible]);
|
|
105
106
|
useEffect(() => {
|
|
106
|
-
if (
|
|
107
|
-
const topBarHeight = topBarRef.current.getBoundingClientRect().height;
|
|
107
|
+
if (contentWrapperRef.current) {
|
|
108
108
|
const contentWrapperHeight = contentWrapperRef.current.getBoundingClientRect().height;
|
|
109
|
-
if (contentWrapperHeight >= maxHeight -
|
|
109
|
+
if (contentWrapperHeight >= maxHeight - 40) {
|
|
110
110
|
setPopoverContentWrapperStyle({
|
|
111
|
-
height: `${maxHeight -
|
|
111
|
+
height: `${maxHeight - 40}px`,
|
|
112
112
|
paddingRight: "1rem"
|
|
113
113
|
});
|
|
114
114
|
}
|
|
@@ -119,7 +119,7 @@ const IDSPopover = ({ position = "bottom", category = "", trigger, maxWidth = 26
|
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
}, [
|
|
122
|
+
}, [contentWrapperRef, isVisible]);
|
|
123
123
|
useEffect(() => {
|
|
124
124
|
const content = popoverContentRef?.current;
|
|
125
125
|
if (!content)
|
|
@@ -186,9 +186,9 @@ const IDSPopover = ({ position = "bottom", category = "", trigger, maxWidth = 26
|
|
|
186
186
|
}));
|
|
187
187
|
}, [position, isVisible]);
|
|
188
188
|
const renderCaret = (pos) => {
|
|
189
|
-
return (jsxs("div", { className: `ids-popover-content__caret ids-popover-
|
|
189
|
+
return (jsxs("div", { className: `ids-popover-content__caret ids-popover-content__caret--${pos}`, children: [jsx("span", { className: `ids-popover-content__caret-body ids-popover-content__caret--${pos}` }), jsx("span", { className: `ids-popover-content__caret-border ids-popover-content__caret--${pos}` }), jsx("span", { className: `ids-popover-content__caret-shadow ids-popover-content__caret--${pos}` })] }));
|
|
190
190
|
};
|
|
191
|
-
return (jsxs("span", { className: clsx("ids-popover", className), ref: popoverRef, "data-popover-category": category, ...(isVisible ? { "data-show": "true" } : {}), children: [jsx("span", { className: "ids-popover-trigger", onClick: togglePopover, onKeyDown: handleTriggerKeyDown, ref: triggerRef, children: trigger }), isVisible && (jsxs("div", { className: `ids-popover-content ${!noFocusTrap && "ids-focus-trap"}`, ref: popoverContentRef, style: popoverContentStyle, "data-position": position, children: [renderCaret(position),
|
|
191
|
+
return (jsxs("span", { className: clsx("ids-popover", className), ref: popoverRef, "data-popover-category": category, ...(isVisible ? { "data-show": "true" } : {}), ...props, children: [jsx("span", { className: "ids-popover-trigger", "aria-haspopup": "dialog", onClick: togglePopover, onKeyDown: handleTriggerKeyDown, ref: triggerRef, children: trigger }), isVisible && (jsxs("div", { className: `ids-popover-content ${!noFocusTrap && "ids-focus-trap"}`, role: "tooltip", id: contentId, ref: popoverContentRef, style: popoverContentStyle, "data-position": position, children: [renderCaret(position), jsx("div", { className: "ids-popover-content__close-btn-wrapper", children: jsx("button", { "aria-label": srCloseText, className: "ids-popover-content__close-btn", onClick: closePopover }) }), jsx("div", { className: "ids-popover-content__content-wrapper", tabIndex: 0, ref: contentWrapperRef, style: popoverContentWrapperStyle, children: jsxs("div", { className: "ids-popover-content__content-wrapper-inner", children: [headline && jsx("div", { className: "ids-popover-content__headline", children: headline }), children] }) })] }))] }));
|
|
192
192
|
};
|
|
193
193
|
|
|
194
194
|
export { IDSPopover };
|
|
@@ -3,8 +3,8 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import '@inera/ids-design/components/progressbar/progressbar.css';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
|
|
6
|
-
const IDSProgressbar = ({ label = "", hideLabel = false, value = 0, srLabel = "", className }) => {
|
|
7
|
-
return (jsxs("div", { className: clsx("ids-progressbar", className), children: [hideLabel ? null : (jsxs("div", { className: "ids-progressbar__label", children: [label, " ", value, "%"] })), jsx("div", { className: "ids-progressbar__bar", role: "progressbar", "aria-label": srLabel, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": value, children: value > 0 ? (jsx("div", { className: "ids-progressbar__progress", style: { width: `calc(${value}% + 0.125rem)` } })) : null })] }));
|
|
6
|
+
const IDSProgressbar = ({ label = "", hideLabel = false, value = 0, srLabel = "", className, ...props }) => {
|
|
7
|
+
return (jsxs("div", { className: clsx("ids-progressbar", className), ...props, children: [hideLabel ? null : (jsxs("div", { className: "ids-progressbar__label", children: [label, " ", value, "%"] })), jsx("div", { className: "ids-progressbar__bar", role: "progressbar", "aria-label": srLabel, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": value, children: value > 0 ? (jsx("div", { className: "ids-progressbar__progress", style: { width: `calc(${value}% + 0.125rem)` } })) : null })] }));
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
export { IDSProgressbar };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import "@inera/ids-design/components/puff-list/puff-list.css";
|
|
3
3
|
interface IDSPuffListItemInfoProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
bottom?: boolean;
|
|
4
5
|
children?: ReactNode;
|
|
5
6
|
}
|
|
6
7
|
export declare const IDSPuffListItemInfo: React.FC<IDSPuffListItemInfoProps>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import '@inera/ids-design/components/puff-list/puff-list.css';
|
|
3
|
+
import clsx from 'clsx';
|
|
3
4
|
|
|
4
|
-
const IDSPuffListItemInfo = ({ children }) => {
|
|
5
|
-
return jsx("div", { className: "ids-puff-list-item__info",
|
|
5
|
+
const IDSPuffListItemInfo = ({ bottom, children, ...props }) => {
|
|
6
|
+
return (jsx("div", { className: clsx("ids-puff-list-item__info", {
|
|
7
|
+
"ids-puff-list-item__info--bottom": bottom
|
|
8
|
+
}), ...props, children: children }));
|
|
6
9
|
};
|
|
7
10
|
|
|
8
11
|
export { IDSPuffListItemInfo };
|