@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,20 +1,17 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import "@inera/ids-design/components/puff-list/puff-list.css";
|
|
3
|
-
interface IDSPuffListItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
|
|
5
|
-
headlineLevel?: 2 | 3 | 4 | 5;
|
|
6
|
-
headlineLink?: React.ReactElement;
|
|
3
|
+
export interface IDSPuffListItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
header?: ReactNode;
|
|
7
5
|
itemLink?: React.ReactElement;
|
|
8
|
-
date?:
|
|
9
|
-
|
|
10
|
-
month?: number;
|
|
11
|
-
monthLabel?: string;
|
|
12
|
-
day?: number;
|
|
13
|
-
time?: string;
|
|
6
|
+
date?: React.ReactElement;
|
|
7
|
+
dateTo?: React.ReactElement;
|
|
14
8
|
noContent?: boolean;
|
|
15
|
-
|
|
9
|
+
lean?: boolean;
|
|
16
10
|
dateLabel?: ReactNode;
|
|
11
|
+
extra?: ReactNode;
|
|
17
12
|
children?: ReactNode;
|
|
18
13
|
}
|
|
19
|
-
export declare
|
|
20
|
-
export {
|
|
14
|
+
export declare function IDSPuffListItem({ header, itemLink, date, dateTo, noContent, lean, dateLabel, extra, className, children, ...props }: IDSPuffListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare namespace IDSPuffListItem {
|
|
16
|
+
var displayName: string;
|
|
17
|
+
}
|
|
@@ -1,49 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import React__default, { useState, useEffect, isValidElement, cloneElement } from 'react';
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { isValidElement, cloneElement } from 'react';
|
|
4
3
|
import '@inera/ids-design/components/puff-list/puff-list.css';
|
|
5
|
-
import { getMonthAsSweText, getDayAsText } from '../../utils/utils.js';
|
|
6
4
|
import clsx from 'clsx';
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
const [presentedDate, setPresentedDate] = useState(date);
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
if (date) {
|
|
12
|
-
setPresentedDate(new Date(date));
|
|
13
|
-
}
|
|
14
|
-
}, [date]);
|
|
15
|
-
const hasDate = () => date || year || month !== -1 || day !== -1;
|
|
16
|
-
const getYear = () => presentedDate?.getFullYear() || year;
|
|
17
|
-
const getMonth = () => (presentedDate ? presentedDate.getMonth() + 1 : month);
|
|
18
|
-
const getMonthText = () => (monthLabel ? monthLabel : getMonthAsSweText(getMonth() - 1, 3));
|
|
19
|
-
const getDay = () => getDayAsText(presentedDate?.getDate() || day);
|
|
20
|
-
const getTime = () => {
|
|
21
|
-
if (time)
|
|
22
|
-
return time;
|
|
23
|
-
if (presentedDate) {
|
|
24
|
-
const hour = presentedDate.getHours();
|
|
25
|
-
const min = presentedDate.getMinutes();
|
|
26
|
-
return `${hour.toString().padStart(2, "0")}:${min.toString().padStart(2, "0")}`;
|
|
27
|
-
}
|
|
28
|
-
return "";
|
|
29
|
-
};
|
|
30
|
-
const getHeaderClass = (noMargin) => clsx("ids-puff-list-item__header", {
|
|
31
|
-
"ids-puff-list-item--no-margin": noMargin
|
|
32
|
-
});
|
|
33
|
-
const renderHeadline = () => {
|
|
34
|
-
const level = [2, 3, 4, 5].includes(headlineLevel) ? headlineLevel : 2;
|
|
35
|
-
const Tag = `h${level}`;
|
|
36
|
-
const headlineContent = jsx(Fragment, { children: headline });
|
|
37
|
-
if (headlineLink && isValidElement(headlineLink)) {
|
|
38
|
-
return React__default.createElement(Tag, { className: getHeaderClass(noMargin) }, cloneElement(headlineLink, {
|
|
39
|
-
...headlineLink.props,
|
|
40
|
-
children: headlineContent
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
return React__default.createElement(Tag, { className: getHeaderClass(noMargin) }, headline);
|
|
44
|
-
};
|
|
6
|
+
function IDSPuffListItem({ header, itemLink, date, dateTo, noContent = false, lean = false, dateLabel, extra, className, children, ...props }) {
|
|
45
7
|
const renderBody = () => {
|
|
46
|
-
const content = (jsxs(Fragment, { children: [
|
|
8
|
+
const content = (jsxs(Fragment, { children: [jsx("div", { className: "ids-puff-list-item-header", children: header }), !noContent && jsx("div", { className: "ids-puff-list-item__body", children: children })] }));
|
|
47
9
|
if (itemLink && isValidElement(itemLink)) {
|
|
48
10
|
return cloneElement(itemLink, {
|
|
49
11
|
...itemLink.props,
|
|
@@ -53,9 +15,11 @@ const IDSPuffListItem = ({ headline = "", headlineLevel = 2, headlineLink, itemL
|
|
|
53
15
|
}
|
|
54
16
|
return content;
|
|
55
17
|
};
|
|
56
|
-
return (
|
|
57
|
-
"ids-puff-list-item--interactive": !!itemLink
|
|
58
|
-
|
|
59
|
-
};
|
|
18
|
+
return (jsxs("div", { className: clsx("ids-puff-list-item", {
|
|
19
|
+
"ids-puff-list-item--interactive": !!itemLink,
|
|
20
|
+
"ids-puff-list-item--lean": !!lean
|
|
21
|
+
}, className), ...props, children: [jsxs("div", { className: "ids-puff-list-item__inner", children: [dateLabel && jsx("div", { className: "ids-puff-list-item__date-label", children: dateLabel }), jsxs("div", { className: "ids-puff-list-item__content", children: [!!date && date, !!date && !!dateTo && (jsxs(Fragment, { children: [jsx("span", { className: "ids-puff-list-item__date-spacer", children: "\u2015" }), dateTo] })), renderBody()] }), extra && jsx("div", { className: "ids-puff-list-item__extra-content", children: extra })] }), jsx("div", { className: "ids-puff-list-item-separator" })] }));
|
|
22
|
+
}
|
|
23
|
+
IDSPuffListItem.displayName = "IDSPuffListItem";
|
|
60
24
|
|
|
61
25
|
export { IDSPuffListItem };
|
|
@@ -3,5 +3,5 @@ import "@inera/ids-design/components/puff-list/puff-list.css";
|
|
|
3
3
|
interface IDSPuffListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
}
|
|
6
|
-
export declare
|
|
6
|
+
export declare function IDSPuffList({ children, className, ...props }: IDSPuffListProps): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -2,8 +2,9 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import '@inera/ids-design/components/puff-list/puff-list.css';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
5
|
+
function IDSPuffList({ children, className, ...props }) {
|
|
6
|
+
const classes = clsx("ids-puff-list", className);
|
|
7
|
+
return (jsx("div", { className: classes, ...props, children: children }));
|
|
8
|
+
}
|
|
8
9
|
|
|
9
10
|
export { IDSPuffList };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "@inera/ids-design/components/region-icon/region-icon.css";
|
|
3
3
|
type Size = "xs" | "s" | "m" | "l" | "ml";
|
|
4
|
-
interface IDSRegionIconProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
export interface IDSRegionIconProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
5
5
|
name: string;
|
|
6
6
|
size?: Size;
|
|
7
7
|
colorPreset?: number;
|
|
8
8
|
light?: boolean;
|
|
9
9
|
inline?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export declare
|
|
11
|
+
export declare function IDSRegionIcon({ name, size, colorPreset, light, inline, className, ...props }: IDSRegionIconProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import '@inera/ids-design/components/region-icon/region-icon.css';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
function IDSRegionIcon({ name, size = "m", colorPreset = 1, light = false, inline = false, className, ...props }) {
|
|
7
6
|
const getSize = () => {
|
|
8
7
|
switch (size) {
|
|
9
8
|
case "l":
|
|
10
9
|
return "3rem";
|
|
10
|
+
case "ml":
|
|
11
|
+
return "2.75rem";
|
|
11
12
|
case "m":
|
|
12
13
|
return "2.5rem";
|
|
13
14
|
case "s":
|
|
14
|
-
return "
|
|
15
|
+
return "2rem";
|
|
15
16
|
case "xs":
|
|
16
17
|
return "1.5rem";
|
|
17
18
|
default:
|
|
18
19
|
return "2.5rem";
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
22
|
+
return (jsx("span", { className: clsx("ids-region-icon", `ids-region-icon--${name}`, `ids-region-icon--color-preset-${light ? 3 : colorPreset}`, { "ids-region-icon--inline": inline }, className), style: { fontSize: getSize() }, ...props }));
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
export { IDSRegionIcon };
|
|
@@ -10,7 +10,7 @@ interface IDSSideMenuProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
10
10
|
labelNotification?: ReactNode;
|
|
11
11
|
link?: ReactNode;
|
|
12
12
|
children?: ReactNode;
|
|
13
|
-
onExpandedChange?: (
|
|
13
|
+
onExpandedChange?: (isExpanded: boolean) => void;
|
|
14
14
|
}
|
|
15
15
|
export declare const IDSSideMenu: React.FC<IDSSideMenuProps>;
|
|
16
16
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
|
-
import
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
4
|
import '@inera/ids-design/components/side-menu/side-menu.css';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
|
|
7
|
-
const IDSSideMenu = ({ label = "", srToggleText = "Sektion", expanded = false, active = false, level = 1, icon = "", labelNotification, link, children, className, onExpandedChange }) => {
|
|
7
|
+
const IDSSideMenu = ({ label = "", srToggleText = "Sektion", expanded = false, active = false, level = 1, icon = "", labelNotification, link, children, className, onExpandedChange, ...props }) => {
|
|
8
8
|
const [isExpanded, setIsExpanded] = useState(expanded);
|
|
9
|
-
const hasChildren =
|
|
9
|
+
const hasChildren = React.Children.toArray(children).some(child => React.isValidElement(child) && child.type === IDSSideMenu);
|
|
10
10
|
const toggleExpanded = (e) => {
|
|
11
11
|
e.stopPropagation();
|
|
12
12
|
if (hasChildren) {
|
|
@@ -30,7 +30,7 @@ const IDSSideMenu = ({ label = "", srToggleText = "Sektion", expanded = false, a
|
|
|
30
30
|
"ids-side-menu__chevron-button--expanded": isExpanded
|
|
31
31
|
}), onClick: toggleExpanded, onKeyDown: handleKeyDown, "aria-expanded": isExpanded, "aria-label": srToggleText }));
|
|
32
32
|
}
|
|
33
|
-
return icon ? (jsx("div", { className: "ids-side-menu__leaf-icon", children: jsx("span", { className: `ids-icon-${icon}` }) })) : (jsx("div", { className: "ids-side-menu__leaf-icon--empty" }));
|
|
33
|
+
return icon ? (jsx("div", { className: "ids-side-menu__leaf-icon", "aria-hidden": "true", children: jsx("span", { className: `ids-icon-${icon}` }) })) : (jsx("div", { className: "ids-side-menu__leaf-icon--empty" }));
|
|
34
34
|
};
|
|
35
35
|
const renderLabel = () => {
|
|
36
36
|
if (hasChildren) {
|
|
@@ -38,15 +38,15 @@ const IDSSideMenu = ({ label = "", srToggleText = "Sektion", expanded = false, a
|
|
|
38
38
|
"ids-side-menu__label-chevron--expanded": isExpanded
|
|
39
39
|
}) }), jsxs("div", { className: "ids-side-menu__label", children: [label, labelNotification] })] }));
|
|
40
40
|
}
|
|
41
|
-
return (jsxs(Fragment, { children: [icon ? (jsx("div", { className: "ids-side-menu__leaf-icon", children: jsx("span", { className: `ids-icon-${icon}` }) })) : (jsx("div", { className: "ids-side-menu__leaf-icon--empty" })), jsxs("div", { className: "ids-side-menu__label", children: [jsx("span", { className: "ids-side-menu__label-text", children: label }), labelNotification] })] }));
|
|
41
|
+
return (jsxs(Fragment, { children: [icon ? (jsx("div", { className: "ids-side-menu__leaf-icon", "aria-hidden": "true", children: jsx("span", { className: `ids-icon-${icon}` }) })) : (jsx("div", { className: "ids-side-menu__leaf-icon--empty" })), jsxs("div", { className: "ids-side-menu__label", children: [jsx("span", { className: "ids-side-menu__label-text", children: label }), labelNotification] })] }));
|
|
42
42
|
};
|
|
43
43
|
const renderMenuPost = () => {
|
|
44
44
|
if (label) {
|
|
45
45
|
return renderLabel();
|
|
46
46
|
}
|
|
47
|
-
return (jsxs(Fragment, { children: [renderExpandButton(), jsx("div", { className: "ids-side-menu__link",
|
|
47
|
+
return (jsxs(Fragment, { children: [renderExpandButton(), jsx("div", { className: "ids-side-menu__link", children: link })] }));
|
|
48
48
|
};
|
|
49
|
-
return (jsxs("div", { className: clsx("ids-side-menu", className), children: [jsx("div", { className: clsx("ids-side-menu__header", `ids-side-menu--level-${level}`, {
|
|
49
|
+
return (jsxs("div", { className: clsx("ids-side-menu", className), ...props, children: [jsx("div", { className: clsx("ids-side-menu__header", `ids-side-menu--level-${level}`, {
|
|
50
50
|
"ids-side-menu--active": active,
|
|
51
51
|
"ids-side-menu--node-label": hasChildren && label
|
|
52
52
|
}), children: jsx("div", { className: "ids-side-menu__header-inner", children: renderMenuPost() }) }), isExpanded && jsx("div", { className: "ids-side-menu__children", children: children })] }));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import "@inera/ids-design/components/side-panel/side-panel.css";
|
|
3
|
+
type PanelSize = "s" | "m" | "l";
|
|
3
4
|
interface IDSSidePanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
5
|
show?: boolean;
|
|
5
6
|
left?: boolean;
|
|
@@ -9,6 +10,7 @@ interface IDSSidePanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
9
10
|
srLabel?: string;
|
|
10
11
|
srClose?: string;
|
|
11
12
|
srOpen?: string;
|
|
13
|
+
size?: PanelSize;
|
|
12
14
|
onVisibilityChange?: (visible: boolean) => void;
|
|
13
15
|
onOpen?: () => void;
|
|
14
16
|
onClose?: () => void;
|
|
@@ -4,11 +4,11 @@ import { useState, useRef, useEffect } from 'react';
|
|
|
4
4
|
import '@inera/ids-design/components/side-panel/side-panel.css';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
|
|
7
|
-
const IDSSidePanel = ({ show = false, left = false, elevated = false, menu = false, footer = false, srLabel = "Sidopanel", srClose = "Stäng", srOpen = "Öppna", onVisibilityChange, onOpen, onClose, footerLinks, footerText, headline, className, children, ...props }) => {
|
|
7
|
+
const IDSSidePanel = ({ show = false, left = false, elevated = false, menu = false, footer = false, size = "m", srLabel = "Sidopanel", srClose = "Stäng", srOpen = "Öppna", onVisibilityChange, onOpen, onClose, footerLinks, footerText, headline, className, children, ...props }) => {
|
|
8
8
|
const [isVisible, setIsVisible] = useState(show);
|
|
9
9
|
const hamburgerRef = useRef(null);
|
|
10
10
|
const panelRef = useRef(null);
|
|
11
|
-
const classNames = clsx("ids-side-panel", "ids-focus-trap--tablet", menu ? "ids-side-panel--menu" : "ids-side-panel--regular", {
|
|
11
|
+
const classNames = clsx("ids-side-panel", "ids-focus-trap--tablet", size && !menu && `ids-side-panel--${size}`, menu ? "ids-side-panel--menu" : "ids-side-panel--regular", {
|
|
12
12
|
"ids-side-panel--show": isVisible,
|
|
13
13
|
"ids-side-panel--elevated": elevated,
|
|
14
14
|
"ids-side-panel--left": !menu && left
|
|
@@ -48,9 +48,9 @@ const IDSSidePanel = ({ show = false, left = false, elevated = false, menu = fal
|
|
|
48
48
|
onVisibilityChange?.(isVisible);
|
|
49
49
|
if (isVisible) {
|
|
50
50
|
onOpen?.();
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
const heading = panelRef.current?.querySelector("h1, h2, h3, h4, h5, h6");
|
|
52
|
+
heading?.setAttribute("tabindex", "-1");
|
|
53
|
+
heading?.focus();
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
56
|
onClose?.();
|
|
@@ -4,7 +4,7 @@ import { useState, useEffect } from 'react';
|
|
|
4
4
|
import '@inera/ids-design/components/stepper/stepper.css';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
|
|
7
|
-
const IDSStep = ({ state = "", headline, label = "", stepNumber = "", srIndicatorText = "", last = "false", expanded: expandedProp = false, disabled = false, onToggleExpansion, onExpanded, onClosed, className, children }) => {
|
|
7
|
+
const IDSStep = ({ state = "", headline, label = "", stepNumber = "", srIndicatorText = "", last = "false", expanded: expandedProp = false, disabled = false, onToggleExpansion, onExpanded, onClosed, className, children, ...props }) => {
|
|
8
8
|
const [expanded, setExpanded] = useState(expandedProp);
|
|
9
9
|
useEffect(() => {
|
|
10
10
|
setExpanded(expandedProp);
|
|
@@ -29,7 +29,7 @@ const IDSStep = ({ state = "", headline, label = "", stepNumber = "", srIndicato
|
|
|
29
29
|
return null;
|
|
30
30
|
return stepNumber;
|
|
31
31
|
};
|
|
32
|
-
return (jsxs("div", { className: clsx("ids-step", className), ...(last ? { last } : {}), children: [jsx("div", { role: "button", tabIndex: disabled ? -1 : 0, className: clsx("ids-step__button", {
|
|
32
|
+
return (jsxs("div", { className: clsx("ids-step", className), ...(last ? { last } : {}), ...props, children: [jsx("div", { role: "button", tabIndex: disabled ? -1 : 0, className: clsx("ids-step__button", {
|
|
33
33
|
"ids-step__button--disabled": disabled
|
|
34
34
|
}), "aria-expanded": expanded, onClick: toggleExpansion, onKeyDown: handleKeyPress, children: jsxs("div", { className: "ids-step__button-inner", children: [jsx("div", { className: "ids-step__indicator-wrapper", children: jsx("div", { "aria-label": srIndicatorText || stepNumber, role: "img", className: `ids-step__indicator ids-step__indicator--${state}`, children: renderStepIndicator() }) }), jsxs("div", { className: "ids-step__button-text", children: [jsxs("div", { className: "ids-step__headline-label", children: [label && jsx("div", { className: "ids-step__label", children: label }), headline && jsx("div", { className: "ids-step__headline", children: headline })] }), jsx("div", { className: clsx("ids-step__chevron", {
|
|
35
35
|
"ids-step__chevron--expanded": expanded
|
|
@@ -5,5 +5,5 @@ interface IDSStepperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
5
5
|
children: ReactElement<IDSStepProps>[] | ReactElement<IDSStepProps>;
|
|
6
6
|
onToggleExpansion?: (step: number, expanded: boolean) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare
|
|
8
|
+
export declare function IDSStepper({ children, onToggleExpansion, className, ...props }: IDSStepperProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import
|
|
3
|
+
import React, { isValidElement, cloneElement } from 'react';
|
|
4
4
|
import '@inera/ids-design/components/stepper/stepper.css';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
const stepsArray =
|
|
7
|
+
function IDSStepper({ children, onToggleExpansion, className, ...props }) {
|
|
8
|
+
const stepsArray = React.Children.toArray(children).filter(isValidElement);
|
|
9
9
|
const handleExpansion = (step, expanded) => {
|
|
10
10
|
onToggleExpansion?.(step, expanded);
|
|
11
11
|
};
|
|
@@ -17,7 +17,7 @@ const IDSStepper = ({ children, onToggleExpansion, className }) => {
|
|
|
17
17
|
onToggleExpansion: handleExpansion
|
|
18
18
|
});
|
|
19
19
|
});
|
|
20
|
-
return jsx("div", { className: clsx("ids-stepper", className), children: enhancedSteps });
|
|
21
|
-
}
|
|
20
|
+
return (jsx("div", { className: clsx("ids-stepper", className), ...props, children: enhancedSteps }));
|
|
21
|
+
}
|
|
22
22
|
|
|
23
23
|
export { IDSStepper };
|
|
@@ -4,7 +4,7 @@ import { useRef, useEffect } from 'react';
|
|
|
4
4
|
import '@inera/ids-design/components/tabs/tab-panel.css';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
|
|
7
|
-
const IDSTabPanel = ({ compact = false, noFocus = false, selected = false, id = "", tabId = "", children, className }) => {
|
|
7
|
+
const IDSTabPanel = ({ compact = false, noFocus = false, selected = false, id = "", tabId = "", children, className, ...props }) => {
|
|
8
8
|
const panelRef = useRef(null);
|
|
9
9
|
useEffect(() => {
|
|
10
10
|
if (panelRef.current && !noFocus) {
|
|
@@ -14,7 +14,7 @@ const IDSTabPanel = ({ compact = false, noFocus = false, selected = false, id =
|
|
|
14
14
|
return (jsx("div", { ref: panelRef, role: "tabpanel", id: id, "aria-hidden": !selected, "aria-labelledby": tabId, hidden: !selected, className: clsx("ids-tab-panel", {
|
|
15
15
|
"ids-tab-panel--selected": selected,
|
|
16
16
|
"ids-tab-panel--compact": compact
|
|
17
|
-
}, className), children: children }));
|
|
17
|
+
}, className), ...props, children: children }));
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export { IDSTabPanel };
|
package/components/tabs/tab.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useRef } from 'react';
|
|
|
4
4
|
import '@inera/ids-design/components/tabs/tab.css';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
|
|
7
|
-
const IDSTab = ({ label, index, id = "", panelId = "", selected = false, icon = "", notification, className, onTabClick, onKeyDown }) => {
|
|
7
|
+
const IDSTab = ({ label, index, id = "", panelId = "", selected = false, icon = "", notification, className, onTabClick, onKeyDown, ...props }) => {
|
|
8
8
|
const tabRef = useRef(null);
|
|
9
9
|
const handleClick = () => {
|
|
10
10
|
if (!selected) {
|
|
@@ -13,7 +13,7 @@ const IDSTab = ({ label, index, id = "", panelId = "", selected = false, icon =
|
|
|
13
13
|
};
|
|
14
14
|
return (jsx("div", { id: id, ref: tabRef, role: "tab", tabIndex: 0, onClick: handleClick, onKeyDown: onKeyDown, className: clsx("ids-tab", {
|
|
15
15
|
"ids-tab--selected": selected
|
|
16
|
-
}, className), "aria-selected": selected, "aria-controls": panelId, children: jsxs("div", { className: "ids-tab__label", children: [icon && jsx("span", { className: `ids-icon-${icon} ids-icon--m
|
|
16
|
+
}, className), "aria-selected": selected, "aria-controls": panelId, ...props, children: jsxs("div", { className: "ids-tab__label", children: [icon && jsx("span", { className: `ids-icon-${icon} ids-icon--m`, "aria-hidden": "true" }), label, notification] }) }));
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
export { IDSTab };
|
package/components/tabs/tabs.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
4
|
import { IDSSelect } from '../form/select/select.js';
|
|
5
5
|
import '@inera/ids-design/components/tabs/tabs.css';
|
|
6
6
|
import { useElementId } from '../utils/hooks/useElementId.js';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
|
|
9
|
-
const IDSTabs = ({ unresponsive = false, light = false, compact = false, breakpoint = "m", selectLabel = "", tabs = [], children, className, onTabChange }) => {
|
|
9
|
+
const IDSTabs = ({ unresponsive = false, light = false, compact = false, breakpoint = "m", selectLabel = "", tabs = [], children, className, onTabChange, ...props }) => {
|
|
10
10
|
const tabsId = useElementId();
|
|
11
|
-
const initialSelectedIndex = tabs.findIndex(tab =>
|
|
11
|
+
const initialSelectedIndex = tabs.findIndex(tab => React.isValidElement(tab) && tab.props.selected === true);
|
|
12
12
|
const [activeTab, setActiveTab] = useState(initialSelectedIndex !== -1 ? initialSelectedIndex : 0);
|
|
13
13
|
const responsiveOnM = breakpoint === "m" && !unresponsive;
|
|
14
14
|
const responsiveOnS = breakpoint === "s" && !unresponsive;
|
|
@@ -36,10 +36,10 @@ const IDSTabs = ({ unresponsive = false, light = false, compact = false, breakpo
|
|
|
36
36
|
const getTabPanelId = (index) => {
|
|
37
37
|
return `${tabsId}-tab-panel-${index}`;
|
|
38
38
|
};
|
|
39
|
-
const enhancedTabs =
|
|
40
|
-
if (!
|
|
39
|
+
const enhancedTabs = React.Children.map(tabs, (tab, idx) => {
|
|
40
|
+
if (!React.isValidElement(tab))
|
|
41
41
|
return tab;
|
|
42
|
-
return
|
|
42
|
+
return React.cloneElement(tab, {
|
|
43
43
|
key: `tab-key-${idx}`,
|
|
44
44
|
id: getTabId(idx),
|
|
45
45
|
panelId: getTabPanelId(idx),
|
|
@@ -50,10 +50,10 @@ const IDSTabs = ({ unresponsive = false, light = false, compact = false, breakpo
|
|
|
50
50
|
onKeyDown: (e) => handleKeydown(e, idx)
|
|
51
51
|
});
|
|
52
52
|
});
|
|
53
|
-
const enhancedTabPanels =
|
|
54
|
-
if (!
|
|
53
|
+
const enhancedTabPanels = React.Children.map(children, (panel, idx) => {
|
|
54
|
+
if (!React.isValidElement(panel))
|
|
55
55
|
return panel;
|
|
56
|
-
return
|
|
56
|
+
return React.cloneElement(panel, {
|
|
57
57
|
key: `tab-panel-key-${idx}`,
|
|
58
58
|
id: getTabPanelId(idx),
|
|
59
59
|
tabId: getTabId(idx),
|
|
@@ -68,16 +68,16 @@ const IDSTabs = ({ unresponsive = false, light = false, compact = false, breakpo
|
|
|
68
68
|
handleSelect(index);
|
|
69
69
|
};
|
|
70
70
|
const renderTabOptions = () => tabs?.map((tab, i) => {
|
|
71
|
-
if (!
|
|
71
|
+
if (!React.isValidElement(tab))
|
|
72
72
|
return null;
|
|
73
73
|
const { label, notification } = tab.props;
|
|
74
74
|
let notificationText = "";
|
|
75
75
|
if (typeof notification === "string" || typeof notification === "number") {
|
|
76
76
|
notificationText = String(notification);
|
|
77
77
|
}
|
|
78
|
-
else if (
|
|
78
|
+
else if (React.isValidElement(notification)) {
|
|
79
79
|
const badge = notification;
|
|
80
|
-
const childTexts =
|
|
80
|
+
const childTexts = React.Children.toArray(badge.props.children)
|
|
81
81
|
.map(child => (typeof child === "string" || typeof child === "number" ? child : ""))
|
|
82
82
|
.join("");
|
|
83
83
|
notificationText = childTexts.trim();
|
|
@@ -89,7 +89,7 @@ const IDSTabs = ({ unresponsive = false, light = false, compact = false, breakpo
|
|
|
89
89
|
"ids-tabs--unresponsive": unresponsive,
|
|
90
90
|
"ids-tabs--responsive-on-m": responsiveOnM,
|
|
91
91
|
"ids-tabs--responsive-on-s": responsiveOnS
|
|
92
|
-
}, className), children: [jsx("div", { className: "ids-tabs__select", children: jsx(IDSSelect, { label: selectLabel, onChange: tabChangedFromSelect, value: activeTab, light: light, children: renderTabOptions() }) }), jsx("div", { className: "ids-tabs__tabs", role: "tablist", children: enhancedTabs }), jsx("div", { className: "ids-tabs__panels", children: enhancedTabPanels })] }));
|
|
92
|
+
}, className), ...props, children: [jsx("div", { className: "ids-tabs__select", children: jsx(IDSSelect, { label: selectLabel, onChange: tabChangedFromSelect, value: activeTab, light: light, children: renderTabOptions() }) }), jsx("div", { className: "ids-tabs__tabs", role: "tablist", children: enhancedTabs }), jsx("div", { className: "ids-tabs__panels", children: enhancedTabPanels })] }));
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
export { IDSTabs };
|
package/components/tag/tag.d.ts
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import "@inera/ids-design/components/tag/tag.css";
|
|
3
|
-
|
|
3
|
+
type ButtonTagProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
onClose?: () => void;
|
|
4
6
|
srCloseLabel?: string;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
type SpanTagProps = React.HTMLAttributes<HTMLSpanElement> & {
|
|
10
|
+
onClick?: undefined;
|
|
5
11
|
onClose?: () => void;
|
|
6
|
-
|
|
12
|
+
srCloseLabel?: string;
|
|
7
13
|
children?: ReactNode;
|
|
8
|
-
}
|
|
9
|
-
|
|
14
|
+
};
|
|
15
|
+
type IDSTagProps = ButtonTagProps | SpanTagProps;
|
|
16
|
+
export declare const IDSTag: React.ForwardRefExoticComponent<IDSTagProps & React.RefAttributes<HTMLButtonElement | HTMLSpanElement>>;
|
|
10
17
|
export {};
|
package/components/tag/tag.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
3
|
import '@inera/ids-design/components/tag/tag.css';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
|
|
6
|
-
const IDSTag = ({ srCloseLabel = "", onClose, onClick,
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}, className), onClick: !!onClick ? onClick : undefined, ...props, children: jsxs("div", { className: "ids-tag__content", children: [children, !onClick && !!onClose && (jsx("button", { className: "ids-tag__close-btn", "aria-label": srCloseLabel, onClick: e => {
|
|
6
|
+
const IDSTag = forwardRef(({ srCloseLabel = "", onClose, onClick, className, children, ...props }, ref) => {
|
|
7
|
+
const isClickable = !!onClick;
|
|
8
|
+
const TagWrapper = isClickable ? "button" : "span";
|
|
9
|
+
return (jsx(TagWrapper, { ref: ref, ...props, className: clsx("ids-tag", { "ids-tag--clickable": isClickable }, className), onClick: isClickable ? onClick : undefined, children: jsxs("div", { className: "ids-tag__content", children: [children, !isClickable && !!onClose && (jsx("button", { type: "button", className: "ids-tag__close-btn", "aria-label": srCloseLabel, onClick: e => {
|
|
11
10
|
e.stopPropagation();
|
|
12
11
|
onClose?.();
|
|
13
12
|
} }))] }) }));
|
|
14
|
-
};
|
|
13
|
+
});
|
|
14
|
+
IDSTag.displayName = "IDSTag";
|
|
15
15
|
|
|
16
16
|
export { IDSTag };
|
|
@@ -3,6 +3,7 @@ import "@inera/ids-design/components/tooltip/tooltip.css";
|
|
|
3
3
|
export type TooltipPosition = "top-left" | "top" | "top-right" | "bottom-left" | "bottom" | "bottom-right";
|
|
4
4
|
interface IDSTooltipProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
position?: TooltipPosition;
|
|
6
|
+
maxWidth?: string;
|
|
6
7
|
trigger: ReactNode;
|
|
7
8
|
children?: ReactNode;
|
|
8
9
|
}
|
|
@@ -5,7 +5,7 @@ import '@inera/ids-design/components/tooltip/tooltip.css';
|
|
|
5
5
|
import { useElementId } from '../utils/hooks/useElementId.js';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
|
|
8
|
-
const IDSTooltip = ({ position = "top", trigger, children, className }) => {
|
|
8
|
+
const IDSTooltip = ({ position = "top", maxWidth = "20rem", trigger, children, className, ...props }) => {
|
|
9
9
|
const [translateX, setTranslateX] = useState(position === "top" || position === "bottom" ? "-50%" : "0");
|
|
10
10
|
const [translateY, setTranslateY] = useState(position.includes("top") ? "-100%" : "100%");
|
|
11
11
|
const tooltipContentRef = useRef(null);
|
|
@@ -19,9 +19,11 @@ const IDSTooltip = ({ position = "top", trigger, children, className }) => {
|
|
|
19
19
|
};
|
|
20
20
|
const handleOverflow = () => {
|
|
21
21
|
const tooltipContent = tooltipContentRef.current;
|
|
22
|
-
|
|
22
|
+
const trigger = triggerRef.current;
|
|
23
|
+
if (!tooltipContent || !trigger)
|
|
23
24
|
return;
|
|
24
25
|
const rect = tooltipContent.getBoundingClientRect();
|
|
26
|
+
const triggerHeight = trigger.getBoundingClientRect().height;
|
|
25
27
|
const vw = window.innerWidth;
|
|
26
28
|
const vh = window.innerHeight;
|
|
27
29
|
if (rect.right > vw) {
|
|
@@ -35,10 +37,10 @@ const IDSTooltip = ({ position = "top", trigger, children, className }) => {
|
|
|
35
37
|
setTranslateX("0");
|
|
36
38
|
}
|
|
37
39
|
if (rect.bottom > vh) {
|
|
38
|
-
setTranslateY(
|
|
40
|
+
setTranslateY(`-${triggerHeight + 16}px`);
|
|
39
41
|
}
|
|
40
42
|
if (rect.top < 0) {
|
|
41
|
-
setTranslateY(
|
|
43
|
+
setTranslateY(`${triggerHeight + 16}px`);
|
|
42
44
|
}
|
|
43
45
|
};
|
|
44
46
|
const checkKey = (e) => {
|
|
@@ -53,8 +55,7 @@ const IDSTooltip = ({ position = "top", trigger, children, className }) => {
|
|
|
53
55
|
tooltipContent.setAttribute("role", "tooltip");
|
|
54
56
|
const focusable = getFirstFocusableContent();
|
|
55
57
|
if (focusable) {
|
|
56
|
-
if (triggerRef.current?.querySelector('[class^="ids-icon-"]') ||
|
|
57
|
-
triggerRef.current?.querySelector("ids-icon")) {
|
|
58
|
+
if (triggerRef.current?.querySelector('[class^="ids-icon-"]') || triggerRef.current?.querySelector("ids-icon")) {
|
|
58
59
|
focusable.setAttribute("role", "img");
|
|
59
60
|
focusable.setAttribute("aria-labelledby", tooltipId);
|
|
60
61
|
}
|
|
@@ -76,7 +77,7 @@ const IDSTooltip = ({ position = "top", trigger, children, className }) => {
|
|
|
76
77
|
triggerWrapper.removeEventListener("focusin", handleOverflow);
|
|
77
78
|
};
|
|
78
79
|
}, [triggerRef]);
|
|
79
|
-
return (jsxs("span", { className: clsx("ids-tooltip", className), children: [jsx("span", { className: "ids-tooltip__trigger", ref: triggerRef, children: trigger }), jsx("span", { className: clsx("ids-tooltip__content", `ids-tooltip__content--${position}`), ref: tooltipContentRef, id: tooltipId, style: { transform: `translate(${translateX}, ${translateY})
|
|
80
|
+
return (jsxs("span", { className: clsx("ids-tooltip", className), ...props, children: [jsx("span", { className: "ids-tooltip__trigger", ref: triggerRef, children: trigger }), jsx("span", { className: clsx("ids-tooltip__content", `ids-tooltip__content--${position}`), ref: tooltipContentRef, id: tooltipId, style: { transform: `translate(${translateX}, ${translateY})`, maxWidth }, children: children })] }));
|
|
80
81
|
};
|
|
81
82
|
|
|
82
83
|
export { IDSTooltip };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export interface IDSHeaderConfig {
|
|
2
2
|
unresponsive: boolean;
|
|
3
|
-
fluid: boolean;
|
|
4
3
|
hideRegionPicker?: boolean;
|
|
5
|
-
regionPickerText?: string;
|
|
6
4
|
}
|
|
7
5
|
export declare const HeaderContext: import("react").Context<IDSHeaderConfig>;
|
|
8
6
|
export declare const useHeaderContext: () => IDSHeaderConfig;
|
|
@@ -8,7 +8,8 @@ function useFocusTrap(container, active) {
|
|
|
8
8
|
"a[href]",
|
|
9
9
|
"button:not([disabled])",
|
|
10
10
|
"textarea:not([disabled])",
|
|
11
|
-
"input:not([disabled])",
|
|
11
|
+
"input:not([disabled]):not([type='radio'])",
|
|
12
|
+
".ids-focus-anchor",
|
|
12
13
|
"select:not([disabled])",
|
|
13
14
|
'[tabindex]:not([tabindex="-1"])'
|
|
14
15
|
];
|